WordPress.org

Plugin Directory

Changeset 1159751


Ignore:
Timestamp:
05/13/15 16:41:39 (3 years ago)
Author:
scweber
Message:

Added some additional variables for the LINK URLs

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

Legend:

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

    r1144021 r1159751  
    33 * 
    44 * @package Custom_Comment_Notifications 
    5  * @version 1.0.6 
     5 * @version 1.0.7 
    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.6 
     12  Version: 1.0.7 
    1313  Author URI: https://github.com/scweber 
    1414 */ 
     
    250250                            <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> 
    251251                            <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> 
     252                            <tr><td id="ccn-variable"><?php _e('P_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    252253                            <tr><td id="ccn-variable"><?php _e('P_LINK_COMMENT', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to post that was commented on (navigate to current comment)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
    253254                            <tr><td id="ccn-variable"><?php _e('P_LINK_COMMENTS', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to the post that was commented on (navigate to comments section)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     
    274275                            <tr><td id="ccn-variable"><?php _e('SPAM_COMMENT_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to mark comment as spam', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
    275276                            <tr><td id="ccn-variable"><?php _e('MODERATION_PANEL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to Moderation Panel (only valid on Moderator Template)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     277                             <tr><td id="ccn-variable"><?php _e('DELETE_TRASH_COMMENT_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to trash or delete Comment (depends on ', 'custom-comment-notifications'); ?><a href=https://codex.wordpress.org/Trash_status><?php _e('EMPTY_TRASH_DAYS', 'custom-comment-notifications'); ?></a><?php _e(' variable)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     278                            <tr><td id="ccn-variable"><?php _e('APPROVE_COMMENT_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to approve comment (only valid on Moderator Template)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
     279                            <tr><td id="ccn-variable"><?php _e('SPAM_COMMENT_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to mark comment as spam', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
     280                            <tr><td id="ccn-variable"><?php _e('MODERATION_PANEL_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to Moderation Panel (only valid on Moderator Template)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    276281                        </table> 
    277282                        <hr/><h3><?php _e('Site Variables', 'custom-comment-notifications'); ?></h3><hr/> 
     
    279284                            <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> 
    280285                            <tr><td id="ccn-variable"><?php _e('SITE_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to Site', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     286                            <tr><td id="ccn-variable"><?php _e('SITE_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to Site', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    281287                            <tr><td id="ccn-variable"><?php _e('BLOG_NAME', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Blog Name', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    282288                        </table> 
     
    562568        if($email_format === 'html') { 
    563569            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     570            $P_LINK_URL = get_permalink($P_ID); 
    564571            $P_LINK_COMMENT = '<a href="'.get_permalink($P_ID).'#comment-'.$comment_id.'">'.$P_TITLE.'</a>'; 
    565572            $P_LINK_COMMENTS = '<a href="'.get_permalink($P_ID).'#comments">'.$P_TITLE.'</a>'; 
    566573        } else { 
    567574            $P_LINK = $P_TITLE.' - '.get_permalink($P_ID); 
     575            $P_LINK_URL = get_permalink($P_ID); 
    568576            $P_LINK_COMMENT = $P_TITLE.' - '.get_permalink($P_ID).'#comment-'.$comment_id; 
    569577            $P_LINK_COMMENTS = $P_TITLE.' - '.get_permalink($P_ID).'#comments'; 
     
    601609        if($email_format == 'html') { 
    602610            $SPAM_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=spam&c='.$comment_id).'">Spam It</a>'; 
     611            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    603612            if(EMPTY_TRASH_DAYS) { 
    604613                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=trash&c='.$comment_id).'">Trash It</a>'; 
     614                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    605615            } else { 
    606616                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=delete&c='.$comment_id).'">Delete It</a>'; 
     617                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    607618            } 
    608619        } else { 
    609620            $SPAM_COMMENT_LINK = 'Spam It - '.admin_url('comment.php?action=spam&c='.$comment_id); 
     621            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    610622            if(EMPTY_TRASH_DAYS) { 
    611623                $DELETE_TRASH_COMMENT_LINK = 'Trash It - '.admin_url('comment.php?action=trash&c='.$comment_id); 
     624                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    612625            } else { 
    613626                $DELETE_TRASH_COMMENT_LINK = 'Delete It - '.admin_url('comment.php?action=delete&c='.$comment_id); 
     627                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    614628            } 
    615629        } 
     
    623637        if($email_format == 'html') { 
    624638            $BLOG_NAME = get_option('blogname'); 
    625             $SITE_LINK = get_option('siteurl'); 
     639            $SITE_LINK = '<a href="'.get_option('siteurl').'">Site</a>'; 
     640            $SITE_LINK_URL = get_option('siteurl'); 
    626641        } else { 
    627642            $BLOG_NAME = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); 
    628643            $SITE_LINK = get_option('siteurl'); 
     644            $SITE_LINK_URL = get_option('siteurl'); 
    629645        } 
    630646 
     
    638654        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    639655        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     656        $notify_message = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $notify_message); 
    640657        $notify_message = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $notify_message); 
    641658        $notify_message = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $notify_message); 
     
    651668        $notify_message = preg_replace("/\bSPAM_COMMENT_LINK\b/u", $SPAM_COMMENT_LINK, $notify_message); 
    652669        $notify_message = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $notify_message); 
     670        $notify_message = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $notify_message); 
     671        $notify_message = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $notify_message); 
     672        $notify_message = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $notify_message); 
    653673        $notify_message = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $notify_message); 
    654674        $notify_message = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $notify_message); 
     
    658678        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    659679        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
     680        $subject = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $subject); 
    660681        $subject = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $subject); 
    661682        $subject = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $subject); 
     
    671692        $subject = preg_replace("/\bSPAM_COMMENT_LINK\b/u", $SPAM_COMMENT_LINK, $subject); 
    672693        $subject = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $subject); 
     694        $subject = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $subject); 
     695        $subject = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $subject); 
     696        $subject = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $subject); 
    673697        $subject = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $subject); 
    674698        $subject = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $subject); 
     
    783807        if($email_format === 'html') { 
    784808            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     809            $P_LINK_URL = get_permalink($P_ID); 
    785810            $P_LINK_COMMENT = '<a href="'.get_permalink($P_ID).'#comment-'.$comment_id.'">'.$P_TITLE.'</a>'; 
    786811            $P_LINK_COMMENTS = '<a href="'.get_permalink($P_ID).'#comments">'.$P_TITLE.'</a>'; 
    787812        } else { 
    788813            $P_LINK = $P_TITLE.' - '.get_permalink($P_ID); 
     814            $P_LINK_URL = get_permalink($P_ID); 
    789815            $P_LINK_COMMENT = $P_TITLE.' - '.get_permalink($P_ID).'#comment-'.$comment_id; 
    790816            $P_LINK_COMMENTS = $P_TITLE.' - '.get_permalink($P_ID).'#comments'; 
     
    812838        if($email_format == 'html') { 
    813839            $SPAM_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=spam&c='.$comment_id).'">Spam It</a>'; 
     840            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    814841            $APPROVE_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=approve&c='.$comment_id).'">Approve It</a>'; 
     842            $APPROVE_COMMENT_LINK_URL = admin_url('comment.php?action=approve&c='.$comment_id); 
    815843            $MODERATION_PANEL = '<a href="'.admin_url('edit-comments.php?comment_status=moderated').'">Moderation Panel</a>'; 
     844            $MODERATION_PANEL_URL = admin_url('edit-comments.php?comment_status=moderated'); 
    816845            if(EMPTY_TRASH_DAYS) { 
    817846                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=trash&c='.$comment_id).'">Trash It</a>'; 
     847                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    818848            } else { 
    819849                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=delete&c='.$comment_id).'">Delete It</a>'; 
     850                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    820851            } 
    821852        } else { 
    822853            $SPAM_COMMENT_LINK = 'Spam It - '.admin_url('comment.php?action=spam&c='.$comment_id); 
     854            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    823855            $APPROVE_COMMENT_LINK = 'Approve It - '.admin_url('comment.php?action=approve&c='.$comment_id); 
     856            $APPROVE_COMMENT_LINK_URL = admin_url('comment.php?action=approve&c='.$comment_id); 
    824857            $MODERATION_PANEL = 'Moderation Panel - '.admin_url('edit-comments.php?comment_status=moderated'); 
     858            $MODERATION_PANEL_URL = admin_url('edit-comments.php?comment_status=moderated'); 
    825859            if(EMPTY_TRASH_DAYS) { 
    826860                $DELETE_TRASH_COMMENT_LINK = 'Trash It - '.admin_url('comment.php?action=trash&c='.$comment_id); 
     861                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    827862            } else { 
    828863                $DELETE_TRASH_COMMENT_LINK = 'Delete It - '.admin_url('comment.php?action=delete&c='.$comment_id); 
     864                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    829865            } 
    830866        } 
     
    840876            $BLOG_NAME = get_option('blogname'); 
    841877            $SITE_LINK = get_option('siteurl'); 
     878            $SITE_LINK_URL = get_option('siteurl'); 
    842879        } else { 
    843880            $BLOG_NAME = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); 
    844881            $SITE_LINK = get_option('siteurl'); 
     882            $SITE_LINK_URL = get_option('siteurl'); 
    845883        } 
    846884 
     
    854892        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    855893        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     894        $notify_message = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $notify_message); 
    856895        $notify_message = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $notify_message); 
    857896        $notify_message = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $notify_message); 
     
    870909        $notify_message = preg_replace("/\bMODERATION_PANEL\b/u", $MODERATION_PANEL, $notify_message); 
    871910        $notify_message = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $notify_message); 
     911        $notify_message = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $notify_message); 
     912        $notify_message = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $notify_message); 
     913        $notify_message = preg_replace("/\bAPPROVE_COMMENT_LINK_URL\b/u", $APPROVE_COMMENT_LINK_URL, $notify_message); 
     914        $notify_message = preg_replace("/\bMODERATION_PANEL_URL\b/u", $MODERATION_PANEL_URL, $notify_message); 
     915        $notify_message = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $notify_message); 
    872916        $notify_message = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $notify_message); 
    873917        $notify_message = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $notify_message); 
     
    877921        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    878922        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
     923        $subject = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $subject); 
    879924        $subject = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $subject); 
    880925        $subject = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $subject); 
     
    893938        $subject = preg_replace("/\bMODERATION_PANEL\b/u", $MODERATION_PANEL, $subject); 
    894939        $subject = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $subject); 
     940        $subject = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $subject); 
     941        $subject = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $subject); 
     942        $subject = preg_replace("/\bAPPROVE_COMMENT_LINK_URL\b/u", $APPROVE_COMMENT_LINK_URL, $subject); 
     943        $subject = preg_replace("/\bMODERATION_PANEL_URL\b/u", $MODERATION_PANEL_URL, $subject); 
     944        $subject = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $subject); 
    895945        $subject = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $subject); 
    896946        $subject = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $subject); 
  • custom-comment-notifications/tags/1.0.7/readme.txt

    r1159735 r1159751  
    44Requires at least: 3.0 
    55Tested up to: 4.2.2 
    6 Stable tag: 1.0.6 
     6Stable tag: 1.0.7 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    7474 
    7575== Changelog == 
     76= 1.0.7 = 
     77* **Enhancements** 
     78  * URLs added as additional variables to the Links 
     79 
    7680= 1.0.6 =  
    7781* **Enhancements** 
  • custom-comment-notifications/trunk/custom-comment-notifications.php

    r1144021 r1159751  
    33 * 
    44 * @package Custom_Comment_Notifications 
    5  * @version 1.0.6 
     5 * @version 1.0.7 
    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.6 
     12  Version: 1.0.7 
    1313  Author URI: https://github.com/scweber 
    1414 */ 
     
    250250                            <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> 
    251251                            <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> 
     252                            <tr><td id="ccn-variable"><?php _e('P_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to post that was commented on', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    252253                            <tr><td id="ccn-variable"><?php _e('P_LINK_COMMENT', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to post that was commented on (navigate to current comment)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
    253254                            <tr><td id="ccn-variable"><?php _e('P_LINK_COMMENTS', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to the post that was commented on (navigate to comments section)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     
    274275                            <tr><td id="ccn-variable"><?php _e('SPAM_COMMENT_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to mark comment as spam', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
    275276                            <tr><td id="ccn-variable"><?php _e('MODERATION_PANEL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to Moderation Panel (only valid on Moderator Template)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     277                             <tr><td id="ccn-variable"><?php _e('DELETE_TRASH_COMMENT_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to trash or delete Comment (depends on ', 'custom-comment-notifications'); ?><a href=https://codex.wordpress.org/Trash_status><?php _e('EMPTY_TRASH_DAYS', 'custom-comment-notifications'); ?></a><?php _e(' variable)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     278                            <tr><td id="ccn-variable"><?php _e('APPROVE_COMMENT_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to approve comment (only valid on Moderator Template)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
     279                            <tr><td id="ccn-variable"><?php _e('SPAM_COMMENT_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to mark comment as spam', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
     280                            <tr><td id="ccn-variable"><?php _e('MODERATION_PANEL_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('URL to Moderation Panel (only valid on Moderator Template)', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    276281                        </table> 
    277282                        <hr/><h3><?php _e('Site Variables', 'custom-comment-notifications'); ?></h3><hr/> 
     
    279284                            <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> 
    280285                            <tr><td id="ccn-variable"><?php _e('SITE_LINK', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to Site', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Anchor', 'custom-comment-notifications'); ?></td></tr> 
     286                            <tr><td id="ccn-variable"><?php _e('SITE_LINK_URL', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Link to Site', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    281287                            <tr><td id="ccn-variable"><?php _e('BLOG_NAME', 'custom-comment-notifications'); ?></td><td id="ccn-variable-description"><?php _e('Blog Name', 'custom-comment-notifications'); ?></td><td id="ccn-variable-type"><?php _e('Text', 'custom-comment-notifications'); ?></td></tr> 
    282288                        </table> 
     
    562568        if($email_format === 'html') { 
    563569            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     570            $P_LINK_URL = get_permalink($P_ID); 
    564571            $P_LINK_COMMENT = '<a href="'.get_permalink($P_ID).'#comment-'.$comment_id.'">'.$P_TITLE.'</a>'; 
    565572            $P_LINK_COMMENTS = '<a href="'.get_permalink($P_ID).'#comments">'.$P_TITLE.'</a>'; 
    566573        } else { 
    567574            $P_LINK = $P_TITLE.' - '.get_permalink($P_ID); 
     575            $P_LINK_URL = get_permalink($P_ID); 
    568576            $P_LINK_COMMENT = $P_TITLE.' - '.get_permalink($P_ID).'#comment-'.$comment_id; 
    569577            $P_LINK_COMMENTS = $P_TITLE.' - '.get_permalink($P_ID).'#comments'; 
     
    601609        if($email_format == 'html') { 
    602610            $SPAM_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=spam&c='.$comment_id).'">Spam It</a>'; 
     611            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    603612            if(EMPTY_TRASH_DAYS) { 
    604613                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=trash&c='.$comment_id).'">Trash It</a>'; 
     614                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    605615            } else { 
    606616                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=delete&c='.$comment_id).'">Delete It</a>'; 
     617                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    607618            } 
    608619        } else { 
    609620            $SPAM_COMMENT_LINK = 'Spam It - '.admin_url('comment.php?action=spam&c='.$comment_id); 
     621            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    610622            if(EMPTY_TRASH_DAYS) { 
    611623                $DELETE_TRASH_COMMENT_LINK = 'Trash It - '.admin_url('comment.php?action=trash&c='.$comment_id); 
     624                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    612625            } else { 
    613626                $DELETE_TRASH_COMMENT_LINK = 'Delete It - '.admin_url('comment.php?action=delete&c='.$comment_id); 
     627                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    614628            } 
    615629        } 
     
    623637        if($email_format == 'html') { 
    624638            $BLOG_NAME = get_option('blogname'); 
    625             $SITE_LINK = get_option('siteurl'); 
     639            $SITE_LINK = '<a href="'.get_option('siteurl').'">Site</a>'; 
     640            $SITE_LINK_URL = get_option('siteurl'); 
    626641        } else { 
    627642            $BLOG_NAME = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); 
    628643            $SITE_LINK = get_option('siteurl'); 
     644            $SITE_LINK_URL = get_option('siteurl'); 
    629645        } 
    630646 
     
    638654        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    639655        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     656        $notify_message = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $notify_message); 
    640657        $notify_message = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $notify_message); 
    641658        $notify_message = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $notify_message); 
     
    651668        $notify_message = preg_replace("/\bSPAM_COMMENT_LINK\b/u", $SPAM_COMMENT_LINK, $notify_message); 
    652669        $notify_message = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $notify_message); 
     670        $notify_message = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $notify_message); 
     671        $notify_message = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $notify_message); 
     672        $notify_message = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $notify_message); 
    653673        $notify_message = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $notify_message); 
    654674        $notify_message = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $notify_message); 
     
    658678        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    659679        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
     680        $subject = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $subject); 
    660681        $subject = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $subject); 
    661682        $subject = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $subject); 
     
    671692        $subject = preg_replace("/\bSPAM_COMMENT_LINK\b/u", $SPAM_COMMENT_LINK, $subject); 
    672693        $subject = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $subject); 
     694        $subject = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $subject); 
     695        $subject = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $subject); 
     696        $subject = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $subject); 
    673697        $subject = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $subject); 
    674698        $subject = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $subject); 
     
    783807        if($email_format === 'html') { 
    784808            $P_LINK = '<a href="'.get_permalink($P_ID).'">'.$P_TITLE.'</a>'; 
     809            $P_LINK_URL = get_permalink($P_ID); 
    785810            $P_LINK_COMMENT = '<a href="'.get_permalink($P_ID).'#comment-'.$comment_id.'">'.$P_TITLE.'</a>'; 
    786811            $P_LINK_COMMENTS = '<a href="'.get_permalink($P_ID).'#comments">'.$P_TITLE.'</a>'; 
    787812        } else { 
    788813            $P_LINK = $P_TITLE.' - '.get_permalink($P_ID); 
     814            $P_LINK_URL = get_permalink($P_ID); 
    789815            $P_LINK_COMMENT = $P_TITLE.' - '.get_permalink($P_ID).'#comment-'.$comment_id; 
    790816            $P_LINK_COMMENTS = $P_TITLE.' - '.get_permalink($P_ID).'#comments'; 
     
    812838        if($email_format == 'html') { 
    813839            $SPAM_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=spam&c='.$comment_id).'">Spam It</a>'; 
     840            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    814841            $APPROVE_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=approve&c='.$comment_id).'">Approve It</a>'; 
     842            $APPROVE_COMMENT_LINK_URL = admin_url('comment.php?action=approve&c='.$comment_id); 
    815843            $MODERATION_PANEL = '<a href="'.admin_url('edit-comments.php?comment_status=moderated').'">Moderation Panel</a>'; 
     844            $MODERATION_PANEL_URL = admin_url('edit-comments.php?comment_status=moderated'); 
    816845            if(EMPTY_TRASH_DAYS) { 
    817846                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=trash&c='.$comment_id).'">Trash It</a>'; 
     847                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    818848            } else { 
    819849                $DELETE_TRASH_COMMENT_LINK = '<a href="'.admin_url('comment.php?action=delete&c='.$comment_id).'">Delete It</a>'; 
     850                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    820851            } 
    821852        } else { 
    822853            $SPAM_COMMENT_LINK = 'Spam It - '.admin_url('comment.php?action=spam&c='.$comment_id); 
     854            $SPAM_COMMENT_LINK_URL = admin_url('comment.php?action=spam&c='.$comment_id); 
    823855            $APPROVE_COMMENT_LINK = 'Approve It - '.admin_url('comment.php?action=approve&c='.$comment_id); 
     856            $APPROVE_COMMENT_LINK_URL = admin_url('comment.php?action=approve&c='.$comment_id); 
    824857            $MODERATION_PANEL = 'Moderation Panel - '.admin_url('edit-comments.php?comment_status=moderated'); 
     858            $MODERATION_PANEL_URL = admin_url('edit-comments.php?comment_status=moderated'); 
    825859            if(EMPTY_TRASH_DAYS) { 
    826860                $DELETE_TRASH_COMMENT_LINK = 'Trash It - '.admin_url('comment.php?action=trash&c='.$comment_id); 
     861                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=trash&c='.$comment_id); 
    827862            } else { 
    828863                $DELETE_TRASH_COMMENT_LINK = 'Delete It - '.admin_url('comment.php?action=delete&c='.$comment_id); 
     864                $DELETE_TRASH_COMMENT_LINK_URL = admin_url('comment.php?action=delete&c='.$comment_id); 
    829865            } 
    830866        } 
     
    840876            $BLOG_NAME = get_option('blogname'); 
    841877            $SITE_LINK = get_option('siteurl'); 
     878            $SITE_LINK_URL = get_option('siteurl'); 
    842879        } else { 
    843880            $BLOG_NAME = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); 
    844881            $SITE_LINK = get_option('siteurl'); 
     882            $SITE_LINK_URL = get_option('siteurl'); 
    845883        } 
    846884 
     
    854892        $notify_message = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $notify_message); 
    855893        $notify_message = preg_replace("/\bP_LINK\b/u", $P_LINK, $notify_message); 
     894        $notify_message = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $notify_message); 
    856895        $notify_message = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $notify_message); 
    857896        $notify_message = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $notify_message); 
     
    870909        $notify_message = preg_replace("/\bMODERATION_PANEL\b/u", $MODERATION_PANEL, $notify_message); 
    871910        $notify_message = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $notify_message); 
     911        $notify_message = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $notify_message); 
     912        $notify_message = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $notify_message); 
     913        $notify_message = preg_replace("/\bAPPROVE_COMMENT_LINK_URL\b/u", $APPROVE_COMMENT_LINK_URL, $notify_message); 
     914        $notify_message = preg_replace("/\bMODERATION_PANEL_URL\b/u", $MODERATION_PANEL_URL, $notify_message); 
     915        $notify_message = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $notify_message); 
    872916        $notify_message = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $notify_message); 
    873917        $notify_message = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $notify_message); 
     
    877921        $subject = preg_replace("/\bP_TITLE\b/u", $P_TITLE, $subject); 
    878922        $subject = preg_replace("/\bP_LINK\b/u", $P_LINK, $subject); 
     923        $subject = preg_replace("/\bP_LINK_URL\b/u", $P_LINK_URL, $subject); 
    879924        $subject = preg_replace("/\bP_LINK_COMMENT\b/u", $P_LINK_COMMENT, $subject); 
    880925        $subject = preg_replace("/\bP_LINK_COMMENTS\b/u", $P_LINK_COMMENTS, $subject); 
     
    893938        $subject = preg_replace("/\bMODERATION_PANEL\b/u", $MODERATION_PANEL, $subject); 
    894939        $subject = preg_replace("/\bSITE_LINK\b/u", $SITE_LINK, $subject); 
     940        $subject = preg_replace("/\bDELETE_TRASH_COMMENT_LINK_URL\b/u", $DELETE_TRASH_COMMENT_LINK_URL, $subject); 
     941        $subject = preg_replace("/\bSPAM_COMMENT_LINK_URL\b/u", $SPAM_COMMENT_LINK_URL, $subject); 
     942        $subject = preg_replace("/\bAPPROVE_COMMENT_LINK_URL\b/u", $APPROVE_COMMENT_LINK_URL, $subject); 
     943        $subject = preg_replace("/\bMODERATION_PANEL_URL\b/u", $MODERATION_PANEL_URL, $subject); 
     944        $subject = preg_replace("/\bSITE_LINK_URL\b/u", $SITE_LINK_URL, $subject); 
    895945        $subject = preg_replace("/\bBLOG_NAME\b/u", $BLOG_NAME, $subject); 
    896946        $subject = preg_replace("/\bP_CATEGORY\b/u", $P_CATEGORY, $subject); 
  • custom-comment-notifications/trunk/readme.txt

    r1159735 r1159751  
    44Requires at least: 3.0 
    55Tested up to: 4.2.2 
    6 Stable tag: 1.0.6 
     6Stable tag: 1.0.7 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    7474 
    7575== Changelog == 
     76= 1.0.7 = 
     77* **Enhancements** 
     78  * URLs added as additional variables to the Links 
     79 
    7680= 1.0.6 =  
    7781* **Enhancements** 
Note: See TracChangeset for help on using the changeset viewer.