From df6044fc9972d6d4011fb610134967a39657f0d2 Mon Sep 17 00:00:00 2001 From: Giri Dhar Date: Mon, 21 Mar 2016 13:03:05 +0530 Subject: [PATCH 1/2] Notification incorrect from email - FIXED --- change_log.txt | 3 ++ includes/bp-compliments-notifications.php | 36 ++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 64d7829..96aafec 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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 diff --git a/includes/bp-compliments-notifications.php b/includes/bp-compliments-notifications.php index 1629663..ef3d9d5 100644 --- a/includes/bp-compliments-notifications.php +++ b/includes/bp-compliments-notifications.php @@ -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 /** @@ -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 ); } /** From 0c15cbf506da1d8d05fb1f7d22a0297799a39443 Mon Sep 17 00:00:00 2001 From: NomadDevs Date: Sat, 26 Mar 2016 14:33:13 +0000 Subject: [PATCH 2/2] 1.0.6 --- bp-compliments.php | 4 ++-- languages/bp-compliments-en_US.mo | Bin 522 -> 522 bytes languages/bp-compliments-en_US.po | 22 +++++++++++----------- readme.txt | 5 ++++- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/bp-compliments.php b/bp-compliments.php index 339301a..d647d75 100644 --- a/bp-compliments.php +++ b/bp-compliments.php @@ -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 @@ -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. diff --git a/languages/bp-compliments-en_US.mo b/languages/bp-compliments-en_US.mo index 22db885c626a7217a01225cf41a54d3ef8312b91..70b90f680be7d6430107a39b74f023daf782cc73 100644 GIT binary patch delta 36 kcmeBT>0+6X!Du!yQ-;IHOu^8^%GhXPuL7LCacd|e0I&85ga7~l delta 36 kcmeBT>0+6X!Du=$Q-;IPP{Gj9%Fu9PuL7LCacd|e0IqQfYXATM diff --git a/languages/bp-compliments-en_US.po b/languages/bp-compliments-en_US.po index 29c78bb..df5ab2d 100644 --- a/languages/bp-compliments-en_US.po +++ b/languages/bp-compliments-en_US.po @@ -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 \n" "Language: en_US\n" @@ -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 BuddyPress plugin." msgstr "" -#: bp-compliments.php:155 +#: bp-compliments.php:159 msgid "Hey! BP Compliments requires BuddyPress 1.5 or higher." msgstr "" @@ -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 "" diff --git a/readme.txt b/readme.txt index 3a2b3cf..b76fc54 100644 --- a/readme.txt +++ b/readme.txt @@ -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 @@ -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