WordPress.org

Plugin Directory

Changeset 1144021


Ignore:
Timestamp:
04/24/15 01:37:29 (2 years ago)
Author:
scweber
Message:

Added Post Author Variable

Location:
custom-comment-notifications
Files:
2 edited
7 copied

Legend:

Unmodified
Added
Removed
  • custom-comment-notifications/tags/1.0.6/custom-comment-notifications.php

    r1141517 r1144021  
    33 * 
    44 * @package Custom_Comment_Notifications 
    5  * @version 1.0.5 
     5 * @version 1.0.6 
    66 */ 
    77/* 
     
    1010  Description: This plugin allows for the comment e-mail notifications that are sent to the comment moderator as well as the post author to be completely customized. 
    1111  Author: Scott Weber 
    12   Version: 1.0.5 
     12  Version: 1.0.6 
    1313  Author URI: https://github.com/scweber 
    1414 */ 
     
    247247                            <thead><tr><th><?php _e('Variable', 'custom-comment-notifications'); ?></th><th><?php _e('Description', 'custom-comment-notifications'); ?></th><th><?php _e('Type', 'custom-comment-notifications'); ?></th></tr></thead> 
    248248                            <tr><td id="ccn-variable"><?php _e('P_ID', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('ID of post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
     249                            <tr><td id="ccn-variable"><?php _e('P_AUTHOR', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Author of post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    249250                            <tr><td id="ccn-variable"><?php _e('P_TITLE', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Title of post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    250251                            <tr><td id="ccn-variable"><?php _e('P_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     
    558559        $P_ID = $comment->comment_post_ID; 
    559560        $P_TITLE = $post->post_title; 
     561        $P_AUTHOR = $postAuthor->display_name; 
    560562        if($email_format === 'html') { 
    561563            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     
    633635        //REPLACE VARIABLES 
    634636        $notify_message = preg_replace("/\bP_ID\b/u", $P_ID, $notify_message); 
     637        $notify_message = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $notify_message); 
    635638        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    636639        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     
    652655 
    653656        $subject = preg_replace("/\bP_ID\b/u", $P_ID, $subject); 
     657        $subject = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $subject); 
    654658        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    655659        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
     
    776780        $P_ID = $comment->comment_post_ID; 
    777781        $P_TITLE = $post->post_title; 
     782        $P_AUTHOR = $postAuthor->display_name; 
    778783        if($email_format === 'html') { 
    779784            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     
    846851        //REPLACE VARIABLES 
    847852        $notify_message = preg_replace("/\bP_ID\b/u", $P_ID, $notify_message); 
     853        $notify_message = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $notify_message); 
    848854        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    849855        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     
    868874 
    869875        $subject = preg_replace("/\bP_ID\b/u", $P_ID, $subject); 
     876        $subject = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $subject); 
    870877        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    871878        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
  • custom-comment-notifications/tags/1.0.6/readme.txt

    r1141524 r1144021  
    44Requires at least: 3.0 
    55Tested up to: 4.1.2 
    6 Stable tag: 1.0.5 
     6Stable tag: 1.0.6 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    2323  * Post Link to Specific Comment 
    2424  * Post Link to Comments Section 
    25   * Post Category (only the first category assigned to post) 
    2625 
    2726* **Comment Variables** 
     
    3332  * Comment Author ARIN Lookup 
    3433  * Comment Content 
    35   * Comment Excerpt 
    3634  * Comments Awaiting Moderation (Moderator Templates Only) 
    3735 
     
    4745 
    4846= Planned Updates = 
    49 * There are currently no planned updates. If you would like to see some additional features or variables please create a support ticket and add "Feature Request" to the subject line. 
     47* I plan on adding the following features shortly 
     48  * Ability to specify additional recipients of the e-mails on a per template basis 
     49    * This will allow for only the administrators to receive the moderation e-mails.  Or if you have multiple moderators, it will allow each moderator to receive an e-mail 
     50    * The additional users will be required to have an account on your site 
    5051 
    5152== Frequently Asked Questions == 
     
    7273 
    7374== Changelog == 
     75= 1.0.6 =  
     76* **Enhancements** 
     77  * Post Author variable added that will show the display name of the Post Author 
     78 
    7479= 1.0.5 = 
    7580* **Enhancements** 
  • custom-comment-notifications/trunk/custom-comment-notifications.php

    r1141517 r1144021  
    33 * 
    44 * @package Custom_Comment_Notifications 
    5  * @version 1.0.5 
     5 * @version 1.0.6 
    66 */ 
    77/* 
     
    1010  Description: This plugin allows for the comment e-mail notifications that are sent to the comment moderator as well as the post author to be completely customized. 
    1111  Author: Scott Weber 
    12   Version: 1.0.5 
     12  Version: 1.0.6 
    1313  Author URI: https://github.com/scweber 
    1414 */ 
     
    247247                            <thead><tr><th><?php _e('Variable', 'custom-comment-notifications'); ?></th><th><?php _e('Description', 'custom-comment-notifications'); ?></th><th><?php _e('Type', 'custom-comment-notifications'); ?></th></tr></thead> 
    248248                            <tr><td id="ccn-variable"><?php _e('P_ID', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('ID of post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
     249                            <tr><td id="ccn-variable"><?php _e('P_AUTHOR', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Author of post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    249250                            <tr><td id="ccn-variable"><?php _e('P_TITLE', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Title of post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    250251                            <tr><td id="ccn-variable"><?php _e('P_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     
    558559        $P_ID = $comment->comment_post_ID; 
    559560        $P_TITLE = $post->post_title; 
     561        $P_AUTHOR = $postAuthor->display_name; 
    560562        if($email_format === 'html') { 
    561563            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     
    633635        //REPLACE VARIABLES 
    634636        $notify_message = preg_replace("/\bP_ID\b/u", $P_ID, $notify_message); 
     637        $notify_message = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $notify_message); 
    635638        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    636639        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     
    652655 
    653656        $subject = preg_replace("/\bP_ID\b/u", $P_ID, $subject); 
     657        $subject = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $subject); 
    654658        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    655659        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
     
    776780        $P_ID = $comment->comment_post_ID; 
    777781        $P_TITLE = $post->post_title; 
     782        $P_AUTHOR = $postAuthor->display_name; 
    778783        if($email_format === 'html') { 
    779784            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     
    846851        //REPLACE VARIABLES 
    847852        $notify_message = preg_replace("/\bP_ID\b/u", $P_ID, $notify_message); 
     853        $notify_message = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $notify_message); 
    848854        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    849855        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     
    868874 
    869875        $subject = preg_replace("/\bP_ID\b/u", $P_ID, $subject); 
     876        $subject = preg_replace("/\bP_AUTHOR\b/u", $P_AUTHOR, $subject); 
    870877        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    871878        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
  • custom-comment-notifications/trunk/readme.txt

    r1141524 r1144021  
    44Requires at least: 3.0 
    55Tested up to: 4.1.2 
    6 Stable tag: 1.0.5 
     6Stable tag: 1.0.6 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    2323  * Post Link to Specific Comment 
    2424  * Post Link to Comments Section 
    25   * Post Category (only the first category assigned to post) 
    2625 
    2726* **Comment Variables** 
     
    3332  * Comment Author ARIN Lookup 
    3433  * Comment Content 
    35   * Comment Excerpt 
    3634  * Comments Awaiting Moderation (Moderator Templates Only) 
    3735 
     
    4745 
    4846= Planned Updates = 
    49 * There are currently no planned updates. If you would like to see some additional features or variables please create a support ticket and add "Feature Request" to the subject line. 
     47* I plan on adding the following features shortly 
     48  * Ability to specify additional recipients of the e-mails on a per template basis 
     49    * This will allow for only the administrators to receive the moderation e-mails.  Or if you have multiple moderators, it will allow each moderator to receive an e-mail 
     50    * The additional users will be required to have an account on your site 
    5051 
    5152== Frequently Asked Questions == 
     
    7273 
    7374== Changelog == 
     75= 1.0.6 =  
     76* **Enhancements** 
     77  * Post Author variable added that will show the display name of the Post Author 
     78 
    7479= 1.0.5 = 
    7580* **Enhancements** 
Note: See TracChangeset for help on using the changeset viewer.