Skip to content

Commit

Permalink
Merge pull request GeoDirectory#15 from GeoDirectory/master
Browse files Browse the repository at this point in the history
Merge from master
  • Loading branch information
kprajapatii committed Mar 28, 2016
2 parents bb8fcdd + 0c15cbf commit 664648e
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 15 deletions.
4 changes: 2 additions & 2 deletions bp-compliments.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: BuddyPress Compliments
* Plugin URI: http://wpgeodirectory.com/
* Description: Compliments module for BuddyPress.
* Version: 1.0.5
* Version: 1.0.6
* Author: GeoDirectory
* Author URI: http://wpgeodirectory.com
* Text Domain: bp-compliments
Expand All @@ -23,7 +23,7 @@
if ( !defined( 'ABSPATH' ) ) exit;

// Define the plugin version.
define( 'BP_COMPLIMENTS_VER', '1.0.5' );
define( 'BP_COMPLIMENTS_VER', '1.0.6' );

/**
* BuddyPress compliments text domain.
Expand Down
3 changes: 3 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.0.6
Notification incorrect from email - FIXED

v1.0.5
Email notifications not working - FIXED
Compliment line break and clickable support removed. Use filter to override - CHANGED
Expand Down
36 changes: 35 additions & 1 deletion includes/bp-compliments-notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,40 @@ function bp_compliments_new_compliment_email_notification($args = array()) {
%s', 'bp-compliments' ), $settings_link );
}

// check for GeoDirectory plugin settings first
if (function_exists('geodir_sendEmail')) {
$sitefromEmail = get_option('site_email');
$sitefromEmailName = get_site_emailName();
} else {
$sitefromEmail = get_option( 'admin_email' );
$sitefromEmailName = stripslashes(get_option('blogname'));
}


/**
* Filters the notification from email.
*
* @since 1.0.6
* @package BuddyPress_Compliments
*
* @param string $sitefromEmail Notification from email.
*/
$sitefromEmail = apply_filters( 'bp_compliments_notification_from_email', $sitefromEmail );

/**
* Filters the notification from name.
*
* @since 1.0.6
* @package BuddyPress_Compliments
*
* @param string $sitefromEmail Notification from name.
*/
$sitefromEmailName = apply_filters( 'bp_compliments_notification_from_name', $sitefromEmailName );

$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$headers .= 'From: ' . $sitefromEmailName . ' <' . $sitefromEmail . '>' . "\r\n";

// Send the message

/**
Expand Down Expand Up @@ -224,7 +258,7 @@ function bp_compliments_new_compliment_email_notification($args = array()) {
* @param string $compliment_link Compliment Link.
*/
$message = apply_filters( 'bp_compliments_notification_message', $message, $sender_name, $compliment_link );
wp_mail( $to, $subject, $message );
wp_mail( $to, $subject, $message, $headers );
}

/**
Expand Down
Binary file modified languages/bp-compliments-en_US.mo
Binary file not shown.
22 changes: 11 additions & 11 deletions languages/bp-compliments-en_US.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: BuddyPress Compliments 1.0.5\n"
"POT-Creation-Date: 2016-03-11 11:11-0000\n"
"PO-Revision-Date: 2016-03-11 11:11-0000\n"
"Project-Id-Version: BuddyPress Compliments 1.0.6\n"
"POT-Creation-Date: 2016-03-26 14:32-0000\n"
"PO-Revision-Date: 2016-03-26 14:32-0000\n"
"Last-Translator: \n"
"Language-Team: GeoDirectory <[email protected]>\n"
"Language: en_US\n"
Expand All @@ -15,27 +15,27 @@ msgstr ""
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x\n"
"X-Poedit-SearchPath-0: .\n"

#: bp-compliments-core.php:44 bp-compliments.php:32
#: bp-compliments-core.php:44 bp-compliments.php:36
#: includes/bp-compliments-settings.php:154
msgid "Compliments"
msgstr ""

#: bp-compliments.php:31
#: bp-compliments.php:35
msgid "Compliment"
msgstr ""

#: bp-compliments.php:33
#: bp-compliments.php:37
msgid "compliments"
msgstr ""

#: bp-compliments.php:148
#: bp-compliments.php:152
#, php-format
msgid ""
"BuddyPress Compliments requires <a target=\"_blank\" href=\"%s\">BuddyPress</"
"a> plugin."
msgstr ""

#: bp-compliments.php:155
#: bp-compliments.php:159
msgid "Hey! BP Compliments requires BuddyPress 1.5 or higher."
msgstr ""

Expand Down Expand Up @@ -122,21 +122,21 @@ msgid ""
"%s"
msgstr ""

#: includes/bp-compliments-notifications.php:271
#: includes/bp-compliments-notifications.php:305
#: includes/bp-compliments-settings.php:89
#: includes/bp-compliments-settings.php:98
#: includes/bp-compliments-settings.php:107
msgid "Yes"
msgstr ""

#: includes/bp-compliments-notifications.php:272
#: includes/bp-compliments-notifications.php:306
#: includes/bp-compliments-settings.php:90
#: includes/bp-compliments-settings.php:99
#: includes/bp-compliments-settings.php:108
msgid "No"
msgstr ""

#: includes/bp-compliments-notifications.php:279
#: includes/bp-compliments-notifications.php:313
#, php-format
msgid "A member sends you a %s"
msgstr ""
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://wpgeodirectory.com/
Tags: buddypress, buddypress compliments, WordPress yelp compliments, buddypress integration, business directory plugin, directory, directory plugin, geodirectory, geodirectory buddypress, geodirectory buddypress integration, social network, yelp clone, yelp compliments
Requires at least: 3.1
Tested up to: 4.4
Stable tag: 1.0.5
Stable tag: 1.0.6
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -72,6 +72,9 @@ No questions so far, but don't hesitate to ask!

== Changelog ==

= 1.0.6 =
Notification incorrect from email - FIXED

= 1.0.5 =
Email notifications not working - FIXED
Compliment line break and clickable support removed. Use filter to override - CHANGED
Expand Down

0 comments on commit 664648e

Please sign in to comment.