Version Description
Download this release
Release Info
| Developer | markjaquith |
| Plugin | |
| Version | 2.1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.1 to 2.1.1
- readme.txt +1 -1
- subscribe-to-comments.php +45 -35
readme.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
Tags: comments, subscription, email
|
| 3 |
Contributors: markjaquith
|
| 4 |
Requires at least: 2.0
|
| 5 |
-
Tested up to: 2.1
|
| 6 |
Stable tag: trunk
|
| 7 |
|
| 8 |
Subscribe to Comments allows commenters on an entry to subscribe to e-mail notifications for subsequent comments.
|
| 2 |
Tags: comments, subscription, email
|
| 3 |
Contributors: markjaquith
|
| 4 |
Requires at least: 2.0
|
| 5 |
+
Tested up to: 2.2.1
|
| 6 |
Stable tag: trunk
|
| 7 |
|
| 8 |
Subscribe to Comments allows commenters on an entry to subscribe to e-mail notifications for subsequent comments.
|
subscribe-to-comments.php
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Subscribe To Comments
|
| 4 |
-
Version: 2.1
|
| 5 |
Plugin URI: http://txfx.net/code/wordpress/subscribe-to-comments/
|
| 6 |
-
Description: Allows readers to
|
| 7 |
Author: Mark Jaquith
|
| 8 |
Author URI: http://txfx.net/
|
| 9 |
*/
|
|
@@ -14,15 +14,18 @@ function show_subscription_checkbox ($id='0') {
|
|
| 14 |
sg_subscribe_start();
|
| 15 |
|
| 16 |
if ( $sg_subscribe->checkbox_shown ) return $id;
|
| 17 |
-
if ( !$email = $sg_subscribe->current_viewer_subscription_status() ) :
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 20 |
<?php /* This is the text that is displayed for users who are NOT subscribed */ ?>
|
| 21 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 22 |
|
| 23 |
<p <?php if ($sg_subscribe->clear_both) echo 'style="clear: both;" '; ?>class="subscribe-to-comments">
|
| 24 |
-
|
| 25 |
-
|
| 26 |
</p>
|
| 27 |
|
| 28 |
<?php /* ------------------------------------------------------------------- */ ?>
|
|
@@ -74,10 +77,10 @@ if ( !$sg_subscribe->current_viewer_subscription_status() ) :
|
|
| 74 |
<?php /* This is the text that is displayed for users who are NOT subscribed */ ?>
|
| 75 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 76 |
|
| 77 |
-
<form action="
|
| 78 |
<input type="hidden" name="solo-comment-subscribe" value="solo-comment-subscribe" />
|
| 79 |
-
<input type="hidden" name="postid" value="<?php echo $id; ?>" />
|
| 80 |
-
<input type="hidden" name="ref" value="<?php echo urlencode('http://' . $_SERVER['HTTP_HOST'] .
|
| 81 |
|
| 82 |
<p class="solo-subscribe-to-comments">
|
| 83 |
<?php _e('Subscribe without commenting', 'subscribe-to-comments'); ?>
|
|
@@ -128,14 +131,13 @@ return false;
|
|
| 128 |
class sg_subscribe_settings {
|
| 129 |
function options_page_contents() {
|
| 130 |
/** Commit changed options if posted **/
|
| 131 |
-
// var_dump($_POST);
|
| 132 |
if ( isset($_POST['sg_subscribe_settings_submit']) ) {
|
| 133 |
check_admin_referer('subscribe-to-comments-update_options');
|
| 134 |
update_option('sg_subscribe_settings', $_POST['sg_subscribe_settings']);
|
| 135 |
}
|
| 136 |
|
| 137 |
|
| 138 |
-
echo '<h2>Subscribe to Comments Options</h2>';
|
| 139 |
echo '<ul>';
|
| 140 |
|
| 141 |
echo '<li><label for="name">' . __('"From" name for notifications:', 'subscribe-to-comments') . ' <input type="text" size="40" id="name" name="sg_subscribe_settings[name]" value="' . sg_subscribe_settings::form_setting('name') . '" /></label></li>';
|
|
@@ -196,7 +198,7 @@ class sg_subscribe_settings {
|
|
| 196 |
function options_page() {
|
| 197 |
/** Display "saved" notification on post **/
|
| 198 |
if ( isset($_POST['sg_subscribe_settings_submit']) )
|
| 199 |
-
echo '<div class="updated"><p><strong>' . __('Options saved.', '
|
| 200 |
|
| 201 |
echo '<form method="post"><div class="wrap">';
|
| 202 |
|
|
@@ -292,7 +294,7 @@ class sg_subscribe {
|
|
| 292 |
|
| 293 |
foreach ( array('email', 'key', 'ref', 'new_email') as $var )
|
| 294 |
if ( isset($_REQUEST[$var]) && !empty($_REQUEST[$var]) )
|
| 295 |
-
$this->{$var} =
|
| 296 |
if ( !$this->key )
|
| 297 |
$this->key = 'unset';
|
| 298 |
}
|
|
@@ -754,11 +756,11 @@ class sg_subscribe {
|
|
| 754 |
function manage_link($email='', $html=true, $echo=true) {
|
| 755 |
$link = get_option('home') . '/?wp-subscription-manager=1';
|
| 756 |
if ( $email != 'admin' ) {
|
| 757 |
-
$link = add_query_arg('email', urlencode(
|
| 758 |
$link = add_query_arg('key', $this->generate_key($email), $link);
|
| 759 |
}
|
| 760 |
-
$link = add_query_arg('ref',
|
| 761 |
-
|
| 762 |
if ( $html )
|
| 763 |
$link = htmlentities($link);
|
| 764 |
if ( !$echo )
|
|
@@ -779,10 +781,7 @@ class sg_subscribe {
|
|
| 779 |
function add_admin_menu() {
|
| 780 |
add_management_page(__('Comment Subscription Manager', 'subscribe-to-comments'), __('Subscriptions', 'subscribe-to-comments'), 8, __FILE__, 'sg_subscribe_admin');
|
| 781 |
|
| 782 |
-
|
| 783 |
-
add_action('small_options_page', array('sg_subscribe_settings', 'options_page_contents'));
|
| 784 |
-
else
|
| 785 |
-
add_options_page(__('Subscribe to Comments', 'subscribe-to-comments'), __('Subscribe to Comments', 'subscribe-to-comments'), 5, basename(__FILE__), array('sg_subscribe_settings', 'options_page'));
|
| 786 |
}
|
| 787 |
|
| 788 |
|
|
@@ -792,6 +791,14 @@ class sg_subscribe {
|
|
| 792 |
|
| 793 |
|
| 794 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 795 |
|
| 796 |
function sg_subscribe_start() {
|
| 797 |
global $sg_subscribe;
|
|
@@ -815,6 +822,9 @@ add_action('admin_menu', create_function('$a', 'global $sg_subscribe; sg_subscri
|
|
| 815 |
add_action('admin_head', create_function('$a', 'global $sg_subscribe; sg_subscribe_start(); $sg_subscribe->sg_wp_head();'));
|
| 816 |
add_action('edit_comment', array('sg_subscribe', 'on_edit'));
|
| 817 |
|
|
|
|
|
|
|
|
|
|
| 818 |
|
| 819 |
// detect "subscribe without commenting" attempts
|
| 820 |
add_action('init', create_function('$a','global $sg_subscribe; if ( $_POST[\'solo-comment-subscribe\'] == \'solo-comment-subscribe\' && is_numeric($_POST[\'postid\']) ) {
|
|
@@ -859,30 +869,30 @@ function sg_subscribe_admin($standalone = false) {
|
|
| 859 |
|
| 860 |
case "change_email" :
|
| 861 |
if ( $sg_subscribe->change_email() ) {
|
| 862 |
-
|
| 863 |
-
|
| 864 |
-
|
| 865 |
-
|
| 866 |
-
|
| 867 |
-
|
| 868 |
}
|
| 869 |
break;
|
| 870 |
|
| 871 |
case "remove_subscriptions" :
|
| 872 |
$postsremoved = $sg_subscribe->remove_subscriptions($_POST['subscrips']);
|
| 873 |
if ( $postsremoved > 0 )
|
| 874 |
-
|
| 875 |
break;
|
| 876 |
|
| 877 |
case "remove_block" :
|
| 878 |
-
if ($sg_subscribe->remove_block($sg_subscribe->email))
|
| 879 |
$sg_subscribe->add_message(sprintf(__('The block on <strong>%s</strong> has been successfully removed.', 'subscribe-to-comments'), $sg_subscribe->email));
|
| 880 |
else
|
| 881 |
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> isn\'t blocked!', 'subscribe-to-comments'), $sg_subscribe->email), 'manager');
|
| 882 |
break;
|
| 883 |
|
| 884 |
case "email_change_request" :
|
| 885 |
-
if ($sg_subscribe->is_blocked($sg_subscribe->email))
|
| 886 |
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has been blocked from receiving notifications. You will have to have the administrator remove the block before you will be able to change your notification address.', 'subscribe-to-comments'), $sg_subscribe->email));
|
| 887 |
else
|
| 888 |
if ($sg_subscribe->change_email_request($sg_subscribe->email, $sg_subscribe->new_email))
|
|
@@ -895,12 +905,12 @@ function sg_subscribe_admin($standalone = false) {
|
|
| 895 |
break;
|
| 896 |
|
| 897 |
case "solo_subscribe" :
|
| 898 |
-
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> has been successfully subscribed to %s', 'subscribe-to-comments'), $sg_subscribe->email, $sg_subscribe->entry_link($_GET['subscribeid'])));
|
| 899 |
break;
|
| 900 |
|
| 901 |
case "block" :
|
| 902 |
if ($sg_subscribe->add_block($sg_subscribe->email))
|
| 903 |
-
$sg_subscribe->add_message(sprintf(__('<strong>%s</strong> has been added to the "do not mail" list. You will no longer receive any notifications from this site. If this was done in error, please contact the <a href="mailto:%s">site administrator</a> to remove this block.', 'subscribe-to-comments'), $sg_subscribe->email, $sg_subscribe->site_email));
|
| 904 |
else
|
| 905 |
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has already been blocked!', 'subscribe-to-comments'), $sg_subscribe->email), 'manager');
|
| 906 |
$sg_subscribe->key = $sg_subscribe->generate_key($sg_subscribe->email);
|
|
@@ -943,7 +953,7 @@ function sg_subscribe_admin($standalone = false) {
|
|
| 943 |
|
| 944 |
|
| 945 |
<div class="wrap">
|
| 946 |
-
<h2><?php
|
| 947 |
|
| 948 |
<?php if (!empty($sg_subscribe->ref)) : ?>
|
| 949 |
<?php $sg_subscribe->add_message(sprintf(__('Return to the page you were viewing: %s', 'subscribe-to-comments'), $sg_subscribe->entry_link(url_to_postid($sg_subscribe->ref), $sg_subscribe->ref))); ?>
|
|
@@ -979,7 +989,7 @@ function sg_subscribe_admin($standalone = false) {
|
|
| 979 |
<legend><?php _e('Blocked', 'subscribe-to-comments'); ?></legend>
|
| 980 |
|
| 981 |
<p>
|
| 982 |
-
<?php printf(__('You have indicated that you do not wish to receive any notifications at <strong>%s</strong> from this site. If this is incorrect, or if you wish to have the block removed, please contact the <a href="mailto:%s">site administrator</a>.', 'subscribe-to-comments'), $sg_subscribe->email, $sg_subscribe->site_email); ?>
|
| 983 |
</p>
|
| 984 |
</fieldset>
|
| 985 |
|
|
@@ -1052,11 +1062,11 @@ function sg_subscribe_admin($standalone = false) {
|
|
| 1052 |
}
|
| 1053 |
|
| 1054 |
if ( !$_REQUEST['showallsubscribers'] ) : ?>
|
| 1055 |
-
<p><a href="<?php echo add_query_arg('showallsubscribers', '1', $sg_subscribe->form_action); ?>"><?php _e('Show all subscribers', 'subscribe-to-comments'); ?></a></p>
|
| 1056 |
<?php elseif ( !$_REQUEST['showccfield'] ) : ?>
|
| 1057 |
<p><a href="<?php echo add_query_arg('showccfield', '1'); ?>"><?php _e('Show list of subscribers in <code>CC:</code>-field format (for bulk e-mailing)', 'subscribe-to-comments'); ?></a></p>
|
| 1058 |
<?php else : ?>
|
| 1059 |
-
<p><a href="<?php echo $sg_subscribe->form_action; ?>"><?php _e('« Back to regular view'); ?></a></p>
|
| 1060 |
<p><textarea cols="60" rows="10"><?php echo implode(', ', array_keys($all_subscriptions) ); ?></textarea></p>
|
| 1061 |
<?php endif;
|
| 1062 |
|
|
@@ -1066,7 +1076,7 @@ if ( !$_REQUEST['showallsubscribers'] ) : ?>
|
|
| 1066 |
echo "<ul>\n";
|
| 1067 |
foreach ( (array) $all_subscriptions as $email => $ccount ) {
|
| 1068 |
$enc_email = urlencode($email);
|
| 1069 |
-
echo "<li>($ccount) <a href='
|
| 1070 |
}
|
| 1071 |
echo "</ul>\n";
|
| 1072 |
}
|
| 1 |
<?php
|
| 2 |
/*
|
| 3 |
Plugin Name: Subscribe To Comments
|
| 4 |
+
Version: 2.1.1
|
| 5 |
Plugin URI: http://txfx.net/code/wordpress/subscribe-to-comments/
|
| 6 |
+
Description: Allows readers to receive notifications of new comments that are posted to an entry. Based on version 1 from <a href="http://scriptygoddess.com/">Scriptygoddess</a>
|
| 7 |
Author: Mark Jaquith
|
| 8 |
Author URI: http://txfx.net/
|
| 9 |
*/
|
| 14 |
sg_subscribe_start();
|
| 15 |
|
| 16 |
if ( $sg_subscribe->checkbox_shown ) return $id;
|
| 17 |
+
if ( !$email = $sg_subscribe->current_viewer_subscription_status() ) :
|
| 18 |
+
if (!empty($_COOKIE['subscribe_checkbox_'.COOKIEHASH]))
|
| 19 |
+
$checked_status = ( 'checked' == $_COOKIE['subscribe_checkbox_'.COOKIEHASH] ) ? true : false;
|
| 20 |
+
?>
|
| 21 |
|
| 22 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 23 |
<?php /* This is the text that is displayed for users who are NOT subscribed */ ?>
|
| 24 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 25 |
|
| 26 |
<p <?php if ($sg_subscribe->clear_both) echo 'style="clear: both;" '; ?>class="subscribe-to-comments">
|
| 27 |
+
<input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" <?php if ( (isset($checked_status) && $checked_status ) || ( !isset($checked_status) && $sg_subscribe->default_subscribed ) ) echo 'checked="checked" '; ?>/>
|
| 28 |
+
<label for="subscribe"><?php echo $sg_subscribe->not_subscribed_text; ?></label>
|
| 29 |
</p>
|
| 30 |
|
| 31 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 77 |
<?php /* This is the text that is displayed for users who are NOT subscribed */ ?>
|
| 78 |
<?php /* ------------------------------------------------------------------- */ ?>
|
| 79 |
|
| 80 |
+
<form action="" method="post">
|
| 81 |
<input type="hidden" name="solo-comment-subscribe" value="solo-comment-subscribe" />
|
| 82 |
+
<input type="hidden" name="postid" value="<?php echo (int) $id; ?>" />
|
| 83 |
+
<input type="hidden" name="ref" value="<?php echo urlencode('http://' . $_SERVER['HTTP_HOST'] . attribute_escape($_SERVER['REQUEST_URI'])); ?>" />
|
| 84 |
|
| 85 |
<p class="solo-subscribe-to-comments">
|
| 86 |
<?php _e('Subscribe without commenting', 'subscribe-to-comments'); ?>
|
| 131 |
class sg_subscribe_settings {
|
| 132 |
function options_page_contents() {
|
| 133 |
/** Commit changed options if posted **/
|
|
|
|
| 134 |
if ( isset($_POST['sg_subscribe_settings_submit']) ) {
|
| 135 |
check_admin_referer('subscribe-to-comments-update_options');
|
| 136 |
update_option('sg_subscribe_settings', $_POST['sg_subscribe_settings']);
|
| 137 |
}
|
| 138 |
|
| 139 |
|
| 140 |
+
echo '<h2>'.__('Subscribe to Comments Options','subscribe-to-comments').'</h2>';
|
| 141 |
echo '<ul>';
|
| 142 |
|
| 143 |
echo '<li><label for="name">' . __('"From" name for notifications:', 'subscribe-to-comments') . ' <input type="text" size="40" id="name" name="sg_subscribe_settings[name]" value="' . sg_subscribe_settings::form_setting('name') . '" /></label></li>';
|
| 198 |
function options_page() {
|
| 199 |
/** Display "saved" notification on post **/
|
| 200 |
if ( isset($_POST['sg_subscribe_settings_submit']) )
|
| 201 |
+
echo '<div class="updated"><p><strong>' . __('Options saved.', 'subscribe-to-comments') . '</strong></p></div>';
|
| 202 |
|
| 203 |
echo '<form method="post"><div class="wrap">';
|
| 204 |
|
| 294 |
|
| 295 |
foreach ( array('email', 'key', 'ref', 'new_email') as $var )
|
| 296 |
if ( isset($_REQUEST[$var]) && !empty($_REQUEST[$var]) )
|
| 297 |
+
$this->{$var} = attribute_escape(trim(stripslashes($_REQUEST[$var])));
|
| 298 |
if ( !$this->key )
|
| 299 |
$this->key = 'unset';
|
| 300 |
}
|
| 756 |
function manage_link($email='', $html=true, $echo=true) {
|
| 757 |
$link = get_option('home') . '/?wp-subscription-manager=1';
|
| 758 |
if ( $email != 'admin' ) {
|
| 759 |
+
$link = add_query_arg('email', urlencode($email), $link);
|
| 760 |
$link = add_query_arg('key', $this->generate_key($email), $link);
|
| 761 |
}
|
| 762 |
+
$link = add_query_arg('ref', rawurlencode('http://' . $_SERVER['HTTP_HOST'] . attribute_escape($_SERVER['REQUEST_URI'])), $link);
|
| 763 |
+
//$link = str_replace('+', '%2B', $link);
|
| 764 |
if ( $html )
|
| 765 |
$link = htmlentities($link);
|
| 766 |
if ( !$echo )
|
| 781 |
function add_admin_menu() {
|
| 782 |
add_management_page(__('Comment Subscription Manager', 'subscribe-to-comments'), __('Subscriptions', 'subscribe-to-comments'), 8, __FILE__, 'sg_subscribe_admin');
|
| 783 |
|
| 784 |
+
add_options_page(__('Subscribe to Comments', 'subscribe-to-comments'), __('Subscribe to Comments', 'subscribe-to-comments'), 5, basename(__FILE__), array('sg_subscribe_settings', 'options_page'));
|
|
|
|
|
|
|
|
|
|
| 785 |
}
|
| 786 |
|
| 787 |
|
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
+
function stc_checkbox_state($data) {
|
| 795 |
+
if ( isset($_POST['subscribe']) )
|
| 796 |
+
setcookie('subscribe_checkbox_'. COOKIEHASH, 'checked', time() + 30000000, COOKIEPATH);
|
| 797 |
+
else
|
| 798 |
+
setcookie('subscribe_checkbox_'. COOKIEHASH, 'unchecked', time() + 30000000, COOKIEPATH);
|
| 799 |
+
return $data;
|
| 800 |
+
}
|
| 801 |
+
|
| 802 |
|
| 803 |
function sg_subscribe_start() {
|
| 804 |
global $sg_subscribe;
|
| 822 |
add_action('admin_head', create_function('$a', 'global $sg_subscribe; sg_subscribe_start(); $sg_subscribe->sg_wp_head();'));
|
| 823 |
add_action('edit_comment', array('sg_subscribe', 'on_edit'));
|
| 824 |
|
| 825 |
+
// save users' checkbox preference
|
| 826 |
+
add_filter('preprocess_comment', 'stc_checkbox_state', 1);
|
| 827 |
+
|
| 828 |
|
| 829 |
// detect "subscribe without commenting" attempts
|
| 830 |
add_action('init', create_function('$a','global $sg_subscribe; if ( $_POST[\'solo-comment-subscribe\'] == \'solo-comment-subscribe\' && is_numeric($_POST[\'postid\']) ) {
|
| 869 |
|
| 870 |
case "change_email" :
|
| 871 |
if ( $sg_subscribe->change_email() ) {
|
| 872 |
+
$sg_subscribe->add_message(sprintf(__('All notifications that were formerly sent to <strong>%1$s</strong> will now be sent to <strong>%2$s</strong>!', 'subscribe-to-comments'), $sg_subscribe->email, $sg_subscribe->new_email));
|
| 873 |
+
// change info to the new email
|
| 874 |
+
$sg_subscribe->email = $sg_subscribe->new_email;
|
| 875 |
+
unset($sg_subscribe->new_email);
|
| 876 |
+
$sg_subscribe->key = $sg_subscribe->generate_key($sg_subscribe->email);
|
| 877 |
+
$sg_subscribe->validate_key();
|
| 878 |
}
|
| 879 |
break;
|
| 880 |
|
| 881 |
case "remove_subscriptions" :
|
| 882 |
$postsremoved = $sg_subscribe->remove_subscriptions($_POST['subscrips']);
|
| 883 |
if ( $postsremoved > 0 )
|
| 884 |
+
$sg_subscribe->add_message(sprintf(__('<strong>%1$s</strong> %2$s removed successfully.', 'subscribe-to-comments'), $postsremoved, ($postsremoved != 1) ? __('subscriptions', 'subscribe-to-comments') : __('subscription', 'subscribe-to-comments')));
|
| 885 |
break;
|
| 886 |
|
| 887 |
case "remove_block" :
|
| 888 |
+
if ( $sg_subscribe->remove_block($sg_subscribe->email) )
|
| 889 |
$sg_subscribe->add_message(sprintf(__('The block on <strong>%s</strong> has been successfully removed.', 'subscribe-to-comments'), $sg_subscribe->email));
|
| 890 |
else
|
| 891 |
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> isn\'t blocked!', 'subscribe-to-comments'), $sg_subscribe->email), 'manager');
|
| 892 |
break;
|
| 893 |
|
| 894 |
case "email_change_request" :
|
| 895 |
+
if ( $sg_subscribe->is_blocked($sg_subscribe->email) )
|
| 896 |
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has been blocked from receiving notifications. You will have to have the administrator remove the block before you will be able to change your notification address.', 'subscribe-to-comments'), $sg_subscribe->email));
|
| 897 |
else
|
| 898 |
if ($sg_subscribe->change_email_request($sg_subscribe->email, $sg_subscribe->new_email))
|
| 905 |
break;
|
| 906 |
|
| 907 |
case "solo_subscribe" :
|
| 908 |
+
$sg_subscribe->add_message(sprintf(__('<strong>%1$s</strong> has been successfully subscribed to %2$s', 'subscribe-to-comments'), $sg_subscribe->email, $sg_subscribe->entry_link($_GET['subscribeid'])));
|
| 909 |
break;
|
| 910 |
|
| 911 |
case "block" :
|
| 912 |
if ($sg_subscribe->add_block($sg_subscribe->email))
|
| 913 |
+
$sg_subscribe->add_message(sprintf(__('<strong>%1$s</strong> has been added to the "do not mail" list. You will no longer receive any notifications from this site. If this was done in error, please contact the <a href="mailto:%2$s">site administrator</a> to remove this block.', 'subscribe-to-comments'), $sg_subscribe->email, $sg_subscribe->site_email));
|
| 914 |
else
|
| 915 |
$sg_subscribe->add_error(sprintf(__('<strong>%s</strong> has already been blocked!', 'subscribe-to-comments'), $sg_subscribe->email), 'manager');
|
| 916 |
$sg_subscribe->key = $sg_subscribe->generate_key($sg_subscribe->email);
|
| 953 |
|
| 954 |
|
| 955 |
<div class="wrap">
|
| 956 |
+
<h2><?php printf(__('%s Comment Subscription Manager', 'subscribe-to-comments'), bloginfo('name')); ?></h2>
|
| 957 |
|
| 958 |
<?php if (!empty($sg_subscribe->ref)) : ?>
|
| 959 |
<?php $sg_subscribe->add_message(sprintf(__('Return to the page you were viewing: %s', 'subscribe-to-comments'), $sg_subscribe->entry_link(url_to_postid($sg_subscribe->ref), $sg_subscribe->ref))); ?>
|
| 989 |
<legend><?php _e('Blocked', 'subscribe-to-comments'); ?></legend>
|
| 990 |
|
| 991 |
<p>
|
| 992 |
+
<?php printf(__('You have indicated that you do not wish to receive any notifications at <strong>%1$s</strong> from this site. If this is incorrect, or if you wish to have the block removed, please contact the <a href="mailto:%2$s">site administrator</a>.', 'subscribe-to-comments'), $sg_subscribe->email, $sg_subscribe->site_email); ?>
|
| 993 |
</p>
|
| 994 |
</fieldset>
|
| 995 |
|
| 1062 |
}
|
| 1063 |
|
| 1064 |
if ( !$_REQUEST['showallsubscribers'] ) : ?>
|
| 1065 |
+
<p><a href="<?php echo attribute_escape(add_query_arg('showallsubscribers', '1', $sg_subscribe->form_action)); ?>"><?php _e('Show all subscribers', 'subscribe-to-comments'); ?></a></p>
|
| 1066 |
<?php elseif ( !$_REQUEST['showccfield'] ) : ?>
|
| 1067 |
<p><a href="<?php echo add_query_arg('showccfield', '1'); ?>"><?php _e('Show list of subscribers in <code>CC:</code>-field format (for bulk e-mailing)', 'subscribe-to-comments'); ?></a></p>
|
| 1068 |
<?php else : ?>
|
| 1069 |
+
<p><a href="<?php echo attribute_escape($sg_subscribe->form_action); ?>"><?php _e('« Back to regular view'); ?></a></p>
|
| 1070 |
<p><textarea cols="60" rows="10"><?php echo implode(', ', array_keys($all_subscriptions) ); ?></textarea></p>
|
| 1071 |
<?php endif;
|
| 1072 |
|
| 1076 |
echo "<ul>\n";
|
| 1077 |
foreach ( (array) $all_subscriptions as $email => $ccount ) {
|
| 1078 |
$enc_email = urlencode($email);
|
| 1079 |
+
echo "<li>($ccount) <a href='" . attribute_escape($sg_subscribe->form_action . "&email=$enc_email") . "'>" . wp_specialchars($email) . "</a></li>\n";
|
| 1080 |
}
|
| 1081 |
echo "</ul>\n";
|
| 1082 |
}
|
