WordPress.org

Plugin Directory

Changeset 613344


Ignore:
Timestamp:
10/16/12 19:43:51 (18 months ago)
Author:
MattyRob
Message:

Refresh Settings page to tabbed interface

Location:
subscribe2/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • subscribe2/trunk/ReadMe.txt

    r610095 r613344  
    330330* Correct spelling error in the Settings page - proposed by dimadin 
    331331* Call translation code via a hook to allow greater dynamic control - proposed by dimadin 
     332* Look in more locations for translation files, can place in core languages folder now for upgrade protection 
     333* Refresh Settings page in admin to a tabbed interface 
    332334 
    333335= Version 8.5 by Matthew Robinson = 
  • subscribe2/trunk/admin/settings.php

    r609897 r613344  
    44} 
    55 
    6 global $s2nonce, $wpdb, $wp_version; 
     6global $s2nonce, $wpdb, $wp_version, $current_tab; 
    77 
    88// was anything POSTed? 
     
    3131        } 
    3232    } elseif ( isset($_POST['submit']) ) { 
    33         // BCClimit 
    34         if ( is_numeric($_POST['bcc']) && $_POST['bcc'] >= 0 ) { 
    35             $this->subscribe2_options['bcclimit'] = $_POST['bcc']; 
    36         } 
    37         // admin_email 
    38         $this->subscribe2_options['admin_email'] = $_POST['admin_email']; 
    39  
    40         // send as blogname, author or admin? 
    41         if ( is_numeric($_POST['sender']) ) { 
    42             $sender = $_POST['sender']; 
    43         } elseif ($_POST['sender'] == 'author') { 
    44             $sender = 'author'; 
    45         } else { 
    46             $sender = 'blogname'; 
    47         } 
    48         $this->subscribe2_options['sender'] = $sender; 
    49  
    50         // send email for pages, private and password protected posts 
    51         $this->subscribe2_options['stylesheet'] = $_POST['stylesheet']; 
    52         $this->subscribe2_options['pages'] = $_POST['pages']; 
    53         $this->subscribe2_options['password'] = $_POST['password']; 
    54         $this->subscribe2_options['private'] = $_POST['private']; 
    55         $this->subscribe2_options['stickies'] = $_POST['stickies']; 
    56         $this->subscribe2_options['cron_order'] = $_POST['cron_order']; 
    57         $this->subscribe2_options['tracking'] = $_POST['tracking']; 
    58  
    59         // send per-post or digest emails 
    60         $email_freq = $_POST['email_freq']; 
    61         $scheduled_time = wp_next_scheduled('s2_digest_cron'); 
    62         if ( $email_freq != $this->subscribe2_options['email_freq'] || $_POST['hour'] != date('H', $scheduled_time) ) { 
    63             $this->subscribe2_options['email_freq'] = $email_freq; 
    64             wp_clear_scheduled_hook('s2_digest_cron'); 
    65             $scheds = (array)wp_get_schedules(); 
    66             $interval = ( isset($scheds[$email_freq]['interval']) ) ? (int) $scheds[$email_freq]['interval'] : 0; 
    67             if ( $interval == 0 ) { 
    68                 // if we are on per-post emails remove last_cron entry 
    69                 unset($this->subscribe2_options['last_s2cron']); 
    70                 unset($this->subscribe2_options['previous_s2cron']); 
     33        foreach ($_POST as $key => $value) { 
     34            if ( in_array($key, array('bcclimit', 's2page', 'entries')) ) { 
     35                // numerical inputs fixed for old option names 
     36                if ( is_numeric($_POST[$key]) && $_POST[$key] >= 0 ) { 
     37                    $this->subscribe2_options[$key] = (int)$_POST[$key]; 
     38                } 
     39            } elseif ( in_array($key, array('show_meta', 'show_button', 'ajax', 'widget', 'counterwidget', 's2meta_default', 'reg_override')) ){ 
     40                // check box entries 
     41                ( isset($_POST[$key]) && $_POST[$key] == '1' ) ? $newvalue = '1' : $newvalue = '0'; 
     42                $this->subscribe2_options[$key] = $newvalue; 
     43            } elseif ( in_array($key, array('notification_subject', 'mailtext', 'confirm_subject', 'confirm_email', 'remind_subject', 'remind_email')) && !empty($_POST[$key]) ) { 
     44                            // email subject and body templates 
     45                $this->subscribe2_options[$key] = $_POST[$key]; 
     46            } elseif ( in_array($key, array('compulsory', 'category', 'format')) ) { 
     47                if ( !empty($_POST[$key]) ) { 
     48                    sort($_POST[$key]); 
     49                    $newvalue = implode(',', $_POST[$key]); 
     50                } else { 
     51                    $newvalue = ''; 
     52                } 
     53                if ( $key === 'category' ) { 
     54                    $this->subscribe2_options['exclude'] = $newvalue; 
     55                } elseif ($key === 'format') { 
     56                    $this->subscribe2_options['exclude_formats'] = $newvalue; 
     57                } else { 
     58                    $this->subscribe2_options[$key] = $newvalue; 
     59                } 
     60            } elseif ( $key === 'email_freq' ) { 
     61                // send per-post or digest emails 
     62                $email_freq = $_POST['email_freq']; 
     63                $scheduled_time = wp_next_scheduled('s2_digest_cron'); 
     64                if ( $email_freq != $this->subscribe2_options['email_freq'] || $_POST['hour'] != date('H', wp_next_scheduled('s2_digest_cron')) ) { 
     65                    $this->subscribe2_options['email_freq'] = $email_freq; 
     66                    wp_clear_scheduled_hook('s2_digest_cron'); 
     67                    $scheds = (array)wp_get_schedules(); 
     68                    $interval = ( isset($scheds[$email_freq]['interval']) ) ? (int) $scheds[$email_freq]['interval'] : 0; 
     69                    if ( $interval == 0 ) { 
     70                        // if we are on per-post emails remove last_cron entry 
     71                        unset($this->subscribe2_options['last_s2cron']); 
     72                        unset($this->subscribe2_options['previous_s2cron']); 
     73                    } else { 
     74                        // if we are using digest schedule the event and prime last_cron as now 
     75                        $time = time() + $interval; 
     76                        $timestamp = mktime($_POST['hour'], 0, 0, date('m', $time), date('d', $time), date('Y', $time)); 
     77                        while ($timestamp < time()) { 
     78                            // if we are trying to set the time in the past increment it forward 
     79                            // by the interval period until it is in the future 
     80                            $timestamp += $interval; 
     81                        } 
     82                        wp_schedule_event($timestamp, $email_freq, 's2_digest_cron'); 
     83                        if ( !isset($this->subscribe2_options['last_s2cron']) ) { 
     84                            $this->subscribe2_options['last_s2cron'] = current_time('mysql'); 
     85                        } 
     86                    } 
     87                } 
    7188            } else { 
    72                 // if we are using digest schedule the event and prime last_cron as now 
    73                 $time = time() + $interval; 
    74                 $timestamp = mktime($_POST['hour'], 0, 0, date('m', $time), date('d', $time), date('Y', $time)); 
    75                 while ($timestamp < time()) { 
    76                     // if we are trying to set the time in the past increment it forward 
    77                     // by the interval period until it is in the future 
    78                     $timestamp += $interval; 
    79                 } 
    80                 wp_schedule_event($timestamp, $email_freq, 's2_digest_cron'); 
    81                 if ( !isset($this->subscribe2_options['last_s2cron']) ) { 
    82                     $this->subscribe2_options['last_s2cron'] = current_time('mysql'); 
     89                if ( isset($this->subscribe2_options[$key]) ) { 
     90                    $this->subscribe2_options[$key] = $_POST[$key]; 
    8391                } 
    8492            } 
    8593        } 
    86  
    87         // email subject and body templates 
    88         // ensure that are not empty before updating 
    89         if ( !empty($_POST['notification_subject']) ) { 
    90             $this->subscribe2_options['notification_subject'] = $_POST['notification_subject']; 
    91         } 
    92         if ( !empty($_POST['mailtext']) ) { 
    93             $this->subscribe2_options['mailtext'] = $_POST['mailtext']; 
    94         } 
    95         if ( !empty($_POST['confirm_subject']) ) { 
    96             $this->subscribe2_options['confirm_subject'] = $_POST['confirm_subject']; 
    97         } 
    98         if ( !empty($_POST['confirm_email']) ) { 
    99             $this->subscribe2_options['confirm_email'] = $_POST['confirm_email']; 
    100         } 
    101         if ( !empty($_POST['remind_subject']) ) { 
    102             $this->subscribe2_options['remind_subject'] = $_POST['remind_subject']; 
    103         } 
    104         if ( !empty($_POST['remind_email']) ) { 
    105             $this->subscribe2_options['remind_email'] = $_POST['remind_email']; 
    106         } 
    107  
    108         // compulsory categories 
    109         if ( !empty($_POST['compulsory']) ) { 
    110             sort($_POST['compulsory']); 
    111             $compulsory_cats = implode(',', $_POST['compulsory']); 
    112         } else { 
    113             $compulsory_cats = ''; 
    114         } 
    115         $this->subscribe2_options['compulsory'] = $compulsory_cats; 
    116  
    117         // excluded categories 
    118         if ( !empty($_POST['category']) ) { 
    119             sort($_POST['category']); 
    120             $exclude_cats = implode(',', $_POST['category']); 
    121         } else { 
    122             $exclude_cats = ''; 
    123         } 
    124         $this->subscribe2_options['exclude'] = $exclude_cats; 
    125         // allow override? 
    126         ( isset($_POST['reg_override']) ) ? $override = '1' : $override = '0'; 
    127         $this->subscribe2_options['reg_override'] = $override; 
    128  
    129         // excluded formats 
    130         if ( !empty($_POST['format']) ) { 
    131             $exclude_formats = implode(',', $_POST['format']); 
    132         } else { 
    133             $exclude_formats = ''; 
    134         } 
    135         $this->subscribe2_options['exclude_formats'] = $exclude_formats; 
    136  
    137         // default WordPress page where Subscribe2 token is placed 
    138         if ( is_numeric($_POST['page']) && $_POST['page'] >= 0 ) { 
    139             $this->subscribe2_options['s2page'] = $_POST['page']; 
    140         } 
    141  
    142         // Number of subscriber per page 
    143         if ( is_numeric($_POST['entries']) && $_POST['entries'] > 0 ) { 
    144             $this->subscribe2_options['entries'] = (int)$_POST['entries']; 
    145         } 
    146  
    147         // show meta link? 
    148         ( isset($_POST['show_meta']) && $_POST['show_meta'] == '1' ) ? $showmeta = '1' : $showmeta = '0'; 
    149         $this->subscribe2_options['show_meta'] = $showmeta; 
    150  
    151         // show button? 
    152         ( isset($_POST['show_button']) && $_POST['show_button'] == '1' ) ? $showbutton = '1' : $showbutton = '0'; 
    153         $this->subscribe2_options['show_button'] = $showbutton; 
    154  
    155         // enable AJAX style form 
    156         ( isset($_POST['ajax']) && $_POST['ajax'] == '1' ) ? $ajax = '1' : $ajax = '0'; 
    157         $this->subscribe2_options['ajax'] = $ajax; 
    158  
    159         // show widget in Presentation->Widgets 
    160         ( isset($_POST['widget']) && $_POST['widget'] == '1' ) ? $showwidget = '1' : $showwidget = '0'; 
    161         $this->subscribe2_options['widget'] = $showwidget; 
    162  
    163         // show counterwidget in Presentation->Widgets 
    164         ( isset($_POST['counterwidget']) && $_POST['counterwidget'] == '1' ) ? $showcounterwidget = '1' : $showcounterwidget = '0'; 
    165         $this->subscribe2_options['counterwidget'] = $showcounterwidget; 
    166  
    167         // Subscribe2 over ride postmeta checked by default 
    168         ( isset($_POST['s2meta_default']) && $_POST['s2meta_default'] == '1' ) ? $s2meta_default = '1' : $s2meta_default = '0'; 
    169         $this->subscribe2_options['s2meta_default'] = $s2meta_default; 
    170  
    171         //automatic subscription 
    172         $this->subscribe2_options['autosub'] = $_POST['autosub']; 
    173         $this->subscribe2_options['newreg_override'] = $_POST['newreg_override']; 
    174         $this->subscribe2_options['wpregdef'] = $_POST['wpregdef']; 
    175         $this->subscribe2_options['autoformat'] = $_POST['autoformat']; 
    176         $this->subscribe2_options['show_autosub'] = $_POST['show_autosub']; 
    177         $this->subscribe2_options['autosub_def'] = $_POST['autosub_def']; 
    178         $this->subscribe2_options['comment_subs'] = $_POST['comment_subs']; 
    179         $this->subscribe2_options['comment_def'] = $_POST['comment_def']; 
    180         $this->subscribe2_options['one_click_profile'] = $_POST['one_click_profile']; 
    181  
    182         //barred domains 
    183         $this->subscribe2_options['barred'] = $_POST['barred']; 
    18494 
    18595        echo "<div id=\"message\" class=\"updated fade\"><p><strong>$this->options_saved</strong></p></div>"; 
     
    207117} 
    208118 
     119// detect or define which tab we are in 
     120$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'email'; 
     121 
    209122// show our form 
    210123echo "<div class=\"wrap\">"; 
    211124echo "<div id=\"icon-options-general\" class=\"icon32\"></div>"; 
    212 echo "<h2>" . __('Subscribe2 Settings', 'subscribe2') . "</h2>\r\n"; 
    213 echo "<a href=\"http://subscribe2.wordpress.com/\">" . __('Plugin Blog', 'subscribe2') . "</a> | "; 
    214 echo "<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2387904\">" . __('Make a donation via PayPal', 'subscribe2') . "</a>"; 
     125$tabs = array('email' => __('Email Settings', 'subscribe2'), 
     126    'templates' => __('Templates', 'subscribe2'), 
     127    'registered' => __('Registered Users', 'subscribe2'), 
     128    'appearance' => __('Appearance', 'subscribe2'), 
     129    'misc' => __('Miscellaneous', 'subscribe2')); 
     130echo "<h2 class=\"nav-tab-wrapper\">"; 
     131foreach ( $tabs as $tab_key => $tab_caption ) { 
     132    $active = ($current_tab == $tab_key) ? "nav-tab-active" : ""; 
     133    echo "<a class=\"nav-tab " . $active . "\" href=\"?page=s2_settings&amp;tab=" . $tab_key . "\">" . $tab_caption . "</a>"; 
     134} 
     135echo "</h2>"; 
     136 
    215137echo "<form method=\"post\">\r\n"; 
    216138if ( function_exists('wp_nonce_field') ) { 
     
    218140} 
    219141echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" />\r\n"; 
    220 echo "<input type=\"hidden\" id=\"jsbcc\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" />"; 
    221 echo "<input type=\"hidden\" id=\"jspage\" value=\"" . $this->subscribe2_options['s2page'] . "\" />"; 
     142echo "<input type=\"hidden\" id=\"jsbcclimit\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" />"; 
    222143echo "<input type=\"hidden\" id=\"jsentries\" value=\"" . $this->subscribe2_options['entries'] . "\" />"; 
    223144 
    224 // settings for outgoing emails 
    225 echo "<div class=\"s2_admin\" id=\"s2_notification_settings\">\r\n"; 
    226 echo "<h2>" . __('Notification Settings', 'subscribe2') . "</h2>\r\n"; 
    227 echo __('Restrict the number of recipients per email to (0 for unlimited)', 'subscribe2') . ': '; 
    228 echo "<span id=\"s2bcc_1\"><span id=\"s2bcc\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['bcclimit'] . "</span> "; 
    229 echo "<a href=\"#\" onclick=\"s2_show('bcc'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n"; 
    230 echo "<span id=\"s2bcc_2\">\r\n"; 
    231 echo "<input type=\"text\" name=\"bcc\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" size=\"3\" />\r\n"; 
    232 echo "<a href=\"#\" onclick=\"s2_update('bcc'); return false;\">". __('Update', 'subscribe2') . "</a>\n"; 
    233 echo "<a href=\"#\" onclick=\"s2_revert('bcc'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n"; 
    234  
    235 echo "<br /><br />" . __('Send Admins notifications for new', 'subscribe2') . ': '; 
    236 echo "<label><input type=\"radio\" name=\"admin_email\" value=\"subs\"" . checked($this->subscribe2_options['admin_email'], 'subs', false) . " />\r\n"; 
    237 echo __('Subscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    238 echo "<label><input type=\"radio\" name=\"admin_email\" value=\"unsubs\"" . checked($this->subscribe2_options['admin_email'], 'unsubs', false) . " />\r\n"; 
    239 echo __('Unsubscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    240 echo "<label><input type=\"radio\" name=\"admin_email\" value=\"both\"" . checked($this->subscribe2_options['admin_email'], 'both', false) . " />\r\n"; 
    241 echo __('Both', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    242 echo "<label><input type=\"radio\" name=\"admin_email\" value=\"none\"" . checked($this->subscribe2_options['admin_email'], 'none', false) . " />\r\n"; 
    243 echo __('Neither', 'subscribe2') . "</label><br /><br />\r\n"; 
    244  
    245 echo __('Include theme CSS stylesheet in HTML notifications', 'subscribe2') . ': '; 
    246 echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"yes\"" . checked($this->subscribe2_options['stylesheet'], 'yes', false) . " /> "; 
    247 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    248 echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"no\"" . checked($this->subscribe2_options['stylesheet'], 'no', false) . " /> "; 
    249 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    250  
    251 echo __('Send Emails for Pages', 'subscribe2') . ': '; 
    252 echo "<label><input type=\"radio\" name=\"pages\" value=\"yes\"" . checked($this->subscribe2_options['pages'], 'yes', false) . " /> "; 
    253 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    254 echo "<label><input type=\"radio\" name=\"pages\" value=\"no\"" . checked($this->subscribe2_options['pages'], 'no', false) . " /> "; 
    255 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    256 $s2_post_types = apply_filters('s2_post_types', NULL); 
    257 if ( !empty($s2_post_types) ) { 
    258     $types = ''; 
    259     echo __('Subscribe2 will send email notifications for the following custom post types', 'subscribe2') . ': <strong>'; 
    260     foreach ($s2_post_types as $type) { 
    261         ('' == $types) ? $types = ucwords($type) : $types .= ", " . ucwords($type); 
    262     } 
    263     echo $types . "</strong><br /><br />\r\n"; 
    264 } 
    265 echo __('Send Emails for Password Protected Posts', 'subscribe2') . ': '; 
    266 echo "<label><input type=\"radio\" name=\"password\" value=\"yes\"" . checked($this->subscribe2_options['password'], 'yes', false) . " /> "; 
    267 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    268 echo "<label><input type=\"radio\" name=\"password\" value=\"no\"" . checked($this->subscribe2_options['password'], 'no', false) . " /> "; 
    269 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    270 echo __('Send Emails for Private Posts', 'subscribe2') . ': '; 
    271 echo "<label><input type=\"radio\" name=\"private\" value=\"yes\"" . checked($this->subscribe2_options['private'], 'yes', false) . " /> "; 
    272 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    273 echo "<label><input type=\"radio\" name=\"private\" value=\"no\"" . checked($this->subscribe2_options['private'], 'no', false) . " /> "; 
    274 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    275 echo __('Include Sticky Posts at the top of all Digest Notifications', 'subscribe2') . ': '; 
    276 echo "<label><input type=\"radio\" name=\"stickies\" value=\"yes\"" . checked($this->subscribe2_options['stickies'], 'yes', false) . " /> "; 
    277 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    278 echo "<label><input type=\"radio\" name=\"stickies\" value=\"no\"" . checked($this->subscribe2_options['stickies'], 'no', false) . " /> "; 
    279 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    280 echo __('Send Email From', 'subscribe2') . ': '; 
    281 echo "<label>\r\n"; 
    282 $this->admin_dropdown(true); 
    283 echo "</label><br /><br />\r\n"; 
    284 if ( function_exists('wp_schedule_event') ) { 
    285     echo __('Send Emails', 'subscribe2') . ": <br /><br />\r\n"; 
    286     $this->display_digest_choices(); 
    287     echo __('For digest notifications, date order for posts is', 'subscribe2') . ": \r\n"; 
    288     echo "<label><input type=\"radio\" name=\"cron_order\" value=\"desc\"" . checked($this->subscribe2_options['cron_order'], 'desc', false) . " /> "; 
    289     echo __('Descending', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    290     echo "<label><input type=\"radio\" name=\"cron_order\" value=\"asc\"" . checked($this->subscribe2_options['cron_order'], 'asc', false) . " /> "; 
    291     echo __('Ascending', 'subscribe2') . "</label><br /><br />\r\n"; 
    292 } 
    293 echo __('Add Tracking Parameters to the Permalink', 'subscribe2') . ": "; 
    294 echo "<input type=\"text\" name=\"tracking\" value=\"" . stripslashes($this->subscribe2_options['tracking']) . "\" size=\"50\" /> "; 
    295 echo "<br />" . __('eg. utm_source=subscribe2&amp;utm_medium=email&amp;utm_campaign=postnotify&amp;utm_id={ID}', 'subscribe2') . "<br /><br />\r\n"; 
    296 echo "</div>\r\n"; 
    297  
    298 // email templates 
    299 echo "<div class=\"s2_admin\" id=\"s2_templates\">\r\n"; 
    300 echo "<h2>" . __('Email Templates', 'subscribe2') . "</h2>\r\n"; 
    301 echo "<br />"; 
    302 echo "<table style=\"width: 100%; border-collapse: separate; border-spacing: 5px; *border-collapse: expression('separate', cellSpacing = '5px');\" class=\"editform\">\r\n"; 
    303 echo "<tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">"; 
    304 echo __('New Post email (must not be empty)', 'subscribe2') . ":<br />\r\n"; 
    305 echo __('Subject Line', 'subscribe2') . ": "; 
    306 echo "<input type=\"text\" name=\"notification_subject\" value=\"" . stripslashes($this->subscribe2_options['notification_subject']) . "\" size=\"30\" />"; 
    307 echo "<br />\r\n"; 
    308 echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea>\r\n"; 
    309 echo "</td><td style=\"vertical-align: top;\" rowspan=\"3\">"; 
    310 echo "<p class=\"submit\"><input type=\"submit\" class=\"button-secondary\" name=\"preview\" value=\"" . __('Send Email Preview', 'subscribe2') . "\" /></p>\r\n"; 
    311 echo "<h3>" . __('Message substitutions', 'subscribe2') . "</h3>\r\n"; 
    312 echo "<dl>"; 
    313 echo "<dt><b><em style=\"color: red\">" . __('IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED' ,'subscribe2') . "</em></b></dt><dd></dd>\r\n"; 
    314 echo "<dt><b>{BLOGNAME}</b></dt><dd>" . get_option('blogname') . "</dd>\r\n"; 
    315 echo "<dt><b>{BLOGLINK}</b></dt><dd>" . get_option('home') . "</dd>\r\n"; 
    316 echo "<dt><b>{TITLE}</b></dt><dd>" . __("the post's title<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
    317 echo "<dt><b>{POST}</b></dt><dd>" . __("the excerpt or the entire post<br />(<i>based on the subscriber's preferences</i>)", 'subscribe2') . "</dd>\r\n"; 
    318 echo "<dt><b>{POSTTIME}</b></dt><dd>" . __("the excerpt of the post and the time it was posted<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
    319 echo "<dt><b>{TABLE}</b></dt><dd>" . __("a list of post titles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
    320 echo "<dt><b>{TABLELINKS}</b></dt><dd>" . __("a list of post titles followed by links to the atricles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
    321 echo "<dt><b>{PERMALINK}</b></dt><dd>" . __("the post's permalink<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
    322 echo "<dt><b>{TINYLINK}</b></dt><dd>" . __("the post's permalink after conversion by TinyURL<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
    323 echo "<dt><b>{DATE}</b></dt><dd>" . __("the date the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n"; 
    324 echo "<dt><b>{TIME}</b></dt><dd>" . __("the time the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n"; 
    325 echo "<dt><b>{MYNAME}</b></dt><dd>" . __("the admin or post author's name", 'subscribe2') . "</dd>\r\n"; 
    326 echo "<dt><b>{EMAIL}</b></dt><dd>" . __("the admin or post author's email", 'subscribe2') . "</dd>\r\n"; 
    327 echo "<dt><b>{AUTHORNAME}</b></dt><dd>" . __("the post author's name", 'subscribe2') . "</dd>\r\n"; 
    328 echo "<dt><b>{LINK}</b></dt><dd>" . __("the generated link to confirm a request<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n"; 
    329 echo "<dt><b>{ACTION}</b></dt><dd>" . __("Action performed by LINK in confirmation email<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n"; 
    330 echo "<dt><b>{CATS}</b></dt><dd>" . __("the post's assigned categories", 'subscribe2') . "</dd>\r\n"; 
    331 echo "<dt><b>{TAGS}</b></dt><dd>" . __("the post's assigned Tags", 'subscribe2') . "</dd>\r\n"; 
    332 echo "<dt><b>{COUNT}</b></dt><dd>" . __("the number of posts included in the digest email<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
    333 echo "</dl></td></tr><tr><td  style=\"vertical-align: top; height: 350px; min-height: 350px;\">"; 
    334 echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n"; 
    335 echo __('Subject Line', 'subscribe2') . ": "; 
    336 echo "<input type=\"text\" name=\"confirm_subject\" value=\"" . stripslashes($this->subscribe2_options['confirm_subject']) . "\" size=\"30\" /><br />\r\n"; 
    337 echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea>\r\n"; 
    338 echo "</td></tr><tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">"; 
    339 echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n"; 
    340 echo __('Subject Line', 'subscribe2') . ": "; 
    341 echo "<input type=\"text\" name=\"remind_subject\" value=\"" . stripslashes($this->subscribe2_options['remind_subject']) . "\" size=\"30\" /><br />\r\n"; 
    342 echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea><br /><br />\r\n"; 
    343 echo "</td></tr></table><br />\r\n"; 
    344 echo "</div>\r\n"; 
    345  
    346 // compulsory categories 
    347 echo "<div class=\"s2_admin\" id=\"s2_compulsory_categories\">\r\n"; 
    348 echo "<h2>" . __('Compulsory Categories', 'subscribe2') . "</h2>\r\n"; 
    349 echo "<p>"; 
    350 echo "<strong><em style=\"color: red\">" . __('Compulsory categories will be checked by default for Registered Subscribers', 'subscribe2') . "</em></strong><br />\r\n"; 
    351 echo "</p>"; 
    352 $this->display_category_form(array(), 1, explode(',', $this->subscribe2_options['compulsory']), 'compulsory'); 
    353 echo "</div>\r\n"; 
    354  
    355 // excluded categories 
    356 echo "<div class=\"s2_admin\" id=\"s2_excluded_categories\">\r\n"; 
    357 echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n"; 
    358 echo "<p>"; 
    359 echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Category do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n"; 
    360 echo "</p>"; 
    361 $this->display_category_form(explode(',', $this->subscribe2_options['exclude'])); 
    362 echo "<p style=\"text-align: center;\"><label><input type=\"checkbox\" name=\"reg_override\" value=\"1\"" . checked($this->subscribe2_options['reg_override'], '1', false) . " /> "; 
    363 echo __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</label></p><br />\r\n"; 
    364 echo "</div>\r\n"; 
    365  
    366 // excluded post formats 
    367 $formats = get_theme_support('post-formats'); 
    368 if ( $formats !== false ) { 
    369     // excluded formats 
    370     echo "<div class=\"s2_admin\" id=\"s2_excluded_formats\">\r\n"; 
    371     echo "<h2>" . __('Excluded Formats', 'subscribe2') . "</h2>\r\n"; 
    372     echo "<p>"; 
    373     echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Format do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n"; 
    374     echo "</p>"; 
    375     $this->display_format_form($formats, explode(',', $this->subscribe2_options['exclude_formats'])); 
    376     echo "</div>\r\n"; 
    377 } 
    378  
    379 // Appearance options 
    380 echo "<div class=\"s2_admin\" id=\"s2_appearance_settings\">\r\n"; 
    381 echo "<h2>" . __('Appearance', 'subscribe2') . "</h2>\r\n"; 
    382 echo "<p>"; 
    383  
    384 // WordPress page ID where subscribe2 token is used 
    385 echo __('Set default Subscribe2 page as ID', 'subscribe2') . ': '; 
    386 echo "<select name=\"page\">\r\n"; 
    387 $this->pages_dropdown($this->subscribe2_options['s2page']); 
    388 echo "</select>\r\n"; 
    389  
    390 // Number of subscribers per page 
    391 echo "<br /><br />" . __('Set the number of Subscribers displayed per page', 'subscribe2') . ': '; 
    392 echo "<span id=\"s2entries_1\"><span id=\"s2entries\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['entries'] . "</span> "; 
    393 echo "<a href=\"#\" onclick=\"s2_show('entries'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n"; 
    394 echo "<span id=\"s2entries_2\">\r\n"; 
    395 echo "<input type=\"text\" name=\"entries\" value=\"" . $this->subscribe2_options['entries'] . "\" size=\"3\" />\r\n"; 
    396 echo "<a href=\"#\" onclick=\"s2_update('entries'); return false;\">". __('Update', 'subscribe2') . "</a>\n"; 
    397 echo "<a href=\"#\" onclick=\"s2_revert('entries'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n"; 
    398  
    399 // show link to WordPress page in meta 
    400 echo "<br /><br /><label><input type=\"checkbox\" name=\"show_meta\" value=\"1\"" . checked($this->subscribe2_options['show_meta'], '1', false) . " /> "; 
    401 echo __('Show a link to your subscription page in "meta"?', 'subscribe2') . "</label><br /><br />\r\n"; 
    402  
    403 // show QuickTag button 
    404 echo "<label><input type=\"checkbox\" name=\"show_button\" value=\"1\"" . checked($this->subscribe2_options['show_button'], '1', false) . " /> "; 
    405 echo __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "</label><br /><br />\r\n"; 
    406  
    407 // enable AJAX style form 
    408 echo "<label><input type=\"checkbox\" name=\"ajax\" value=\"1\"" . checked($this->subscribe2_options['ajax'], '1', false) . " /> "; 
    409 echo __('Enable AJAX style subscription form?', 'subscribe2') . "</label><br /><br />\r\n"; 
    410  
    411 // show Widget 
    412 echo "<label><input type=\"checkbox\" name=\"widget\" value=\"1\"" . checked($this->subscribe2_options['widget'], '1', false) . " /> "; 
    413 echo __('Enable Subscribe2 Widget?', 'subscribe2') . "</label><br /><br />\r\n"; 
    414  
    415 // show Counter Widget 
    416 echo "<label><input type=\"checkbox\" name=\"counterwidget\" value=\"1\"" . checked($this->subscribe2_options['counterwidget'], '1', false) . " /> "; 
    417 echo __('Enable Subscribe2 Counter Widget?', 'subscribe2') . "</label><br /><br />\r\n"; 
    418  
    419 // s2_meta checked by default 
    420 echo "<label><input type =\"checkbox\" name=\"s2meta_default\" value=\"1\"" . checked($this->subscribe2_options['s2meta_default'], '1', false) . " /> "; 
    421 echo __('Disable email notifications is checked by default on authoring pages?', 'subscribe2') . "</label>\r\n"; 
    422 echo "</p>"; 
    423 echo "</div>\r\n"; 
    424  
    425 //Auto Subscription for new registrations 
    426 echo "<div class=\"s2_admin\" id=\"s2_autosubscribe_settings\">\r\n"; 
    427 echo "<h2>" . __('Auto Subscribe', 'subscribe2') . "</h2>\r\n"; 
    428 echo "<p>"; 
    429 echo __('Subscribe new users registering with your blog', 'subscribe2') . ":<br />\r\n"; 
    430 echo "<label><input type=\"radio\" name=\"autosub\" value=\"yes\"" . checked($this->subscribe2_options['autosub'], 'yes', false) . " /> "; 
    431 echo __('Automatically', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    432 echo "<label><input type=\"radio\" name=\"autosub\" value=\"wpreg\"" . checked($this->subscribe2_options['autosub'], 'wpreg', false) . " /> "; 
    433 echo __('Display option on Registration Form', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    434 echo "<label><input type=\"radio\" name=\"autosub\" value=\"no\"" . checked($this->subscribe2_options['autosub'], 'no', false) . " /> "; 
    435 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    436 echo __('Auto-subscribe includes any excluded categories', 'subscribe2') . ":<br />\r\n"; 
    437 echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"yes\"" . checked($this->subscribe2_options['newreg_override'], 'yes', false) . " /> "; 
    438 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    439 echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"no\"" . checked($this->subscribe2_options['newreg_override'], 'no', false) . " /> "; 
    440 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    441 echo __('Registration Form option is checked by default', 'subscribe2') . ":<br />\r\n"; 
    442 echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"yes\"" . checked($this->subscribe2_options['wpregdef'], 'yes', false) . " /> "; 
    443 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    444 echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"no\"" . checked($this->subscribe2_options['wpregdef'], 'no', false) . " /> "; 
    445 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    446 echo __('Auto-subscribe users to receive email as', 'subscribe2') . ": <br />\r\n"; 
    447 echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html\"" . checked($this->subscribe2_options['autoformat'], 'html', false) . " /> "; 
    448 echo __('HTML - Full', 'subscribe2') ."</label>&nbsp;&nbsp;"; 
    449 echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html_excerpt\"" . checked($this->subscribe2_options['autoformat'], 'html_excerpt', false) . " /> "; 
    450 echo __('HTML - Excerpt', 'subscribe2') ."</label>&nbsp;&nbsp;"; 
    451 echo "<label><input type=\"radio\" name=\"autoformat\" value=\"post\"" . checked($this->subscribe2_options['autoformat'], 'post', false) . " /> "; 
    452 echo __('Plain Text - Full', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    453 echo "<label><input type=\"radio\" name=\"autoformat\" value=\"excerpt\"" . checked($this->subscribe2_options['autoformat'], 'excerpt', false) . " /> "; 
    454 echo __('Plain Text - Excerpt', 'subscribe2') . "</label><br /><br />"; 
    455 echo __('Registered Users have the option to auto-subscribe to new categories', 'subscribe2') . ": <br />\r\n"; 
    456 echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"yes\"" . checked($this->subscribe2_options['show_autosub'], 'yes', false) . " /> "; 
    457 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    458 echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"no\"" . checked($this->subscribe2_options['show_autosub'], 'no', false) . " /> "; 
    459 echo __('No', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    460 echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"exclude\"" . checked($this->subscribe2_options['show_autosub'], 'exclude', false) . " /> "; 
    461 echo __('New categories are immediately excluded', 'subscribe2') . "</label><br /><br />"; 
    462 echo __('Option for Registered Users to auto-subscribe to new categories is checked by default', 'subscribe2') . ": <br />\r\n"; 
    463 echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"yes\"" . checked($this->subscribe2_options['autosub_def'], 'yes', false) . " /> "; 
    464 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    465 echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"no\"" . checked($this->subscribe2_options['autosub_def'], 'no', false) . " /> "; 
    466 echo __('No', 'subscribe2') . "</label><br /><br />"; 
    467 echo __('Display checkbox to allow subscriptions from the comment form', 'subscribe2') . ": <br />\r\n"; 
    468 echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"before\"" . checked($this->subscribe2_options['comment_subs'], 'before', false) . " /> "; 
    469 echo __('Before the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    470 echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"after\"" . checked($this->subscribe2_options['comment_subs'], 'after', false) . " /> "; 
    471 echo __('After the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    472 echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"no\"" . checked($this->subscribe2_options['comment_subs'], 'no', false) . " /> "; 
    473 echo __('No', 'subscribe2') . "</label><br /><br />"; 
    474 echo __('Comment form checkbox is checked by default', 'subscribe2') . ": <br />\r\n"; 
    475 echo "<label><input type=\"radio\" name=\"comment_def\" value=\"yes\"" . checked($this->subscribe2_options['comment_def'], 'yes', false) . " /> "; 
    476 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    477 echo "<label><input type=\"radio\" name=\"comment_def\" value=\"no\"" . checked($this->subscribe2_options['comment_def'], 'no', false) . " /> "; 
    478 echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
    479 echo __('Show one-click subscription on profile page', 'subscribe2') . ":<br />\r\n"; 
    480 echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"yes\"" . checked($this->subscribe2_options['one_click_profile'], 'yes', false) . " /> "; 
    481 echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
    482 echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"no\"" . checked($this->subscribe2_options['one_click_profile'], 'no', false) . " /> "; 
    483 echo __('No', 'subscribe2') . "</label>\r\n"; 
    484 echo "</p></div>\r\n"; 
    485  
    486 //barred domains 
    487 echo "<div class=\"s2_admin\" id=\"s2_barred_domains\">\r\n"; 
    488 echo "<h2>" . __('Barred Domains', 'subscribe2') . "</h2>\r\n"; 
    489 echo "<p>"; 
    490 echo __('Enter domains to bar from public subscriptions: <br /> (Use a new line for each entry and omit the "@" symbol, for example email.com)', 'subscribe2'); 
    491 echo "<br />\r\n<textarea style=\"width: 98%;\" rows=\"4\" cols=\"60\" name=\"barred\">" . esc_textarea($this->subscribe2_options['barred']) . "</textarea>"; 
    492 echo "</p>"; 
    493 echo "</div>\r\n"; 
    494  
     145switch ($current_tab) { 
     146    case 'email': 
     147        // settings for outgoing emails 
     148        echo "<div class=\"s2_admin\" id=\"s2_notification_settings\">\r\n"; 
     149        echo "<p>\r\n"; 
     150        echo __('Restrict the number of recipients per email to (0 for unlimited)', 'subscribe2') . ': '; 
     151        echo "<span id=\"s2bcclimit_1\"><span id=\"s2bcclimit\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['bcclimit'] . "</span> "; 
     152        echo "<a href=\"#\" onclick=\"s2_show('bcclimit'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n"; 
     153        echo "<span id=\"s2bcclimit_2\">\r\n"; 
     154        echo "<input type=\"text\" name=\"bcclimit\" value=\"" . $this->subscribe2_options['bcclimit'] . "\" size=\"3\" />\r\n"; 
     155        echo "<a href=\"#\" onclick=\"s2_update('bcclimit'); return false;\">". __('Update', 'subscribe2') . "</a>\n"; 
     156        echo "<a href=\"#\" onclick=\"s2_revert('bcclimit'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n"; 
     157 
     158        echo "<br /><br />" . __('Send Admins notifications for new', 'subscribe2') . ': '; 
     159        echo "<label><input type=\"radio\" name=\"admin_email\" value=\"subs\"" . checked($this->subscribe2_options['admin_email'], 'subs', false) . " />\r\n"; 
     160        echo __('Subscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     161        echo "<label><input type=\"radio\" name=\"admin_email\" value=\"unsubs\"" . checked($this->subscribe2_options['admin_email'], 'unsubs', false) . " />\r\n"; 
     162        echo __('Unsubscriptions', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     163        echo "<label><input type=\"radio\" name=\"admin_email\" value=\"both\"" . checked($this->subscribe2_options['admin_email'], 'both', false) . " />\r\n"; 
     164        echo __('Both', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     165        echo "<label><input type=\"radio\" name=\"admin_email\" value=\"none\"" . checked($this->subscribe2_options['admin_email'], 'none', false) . " />\r\n"; 
     166        echo __('Neither', 'subscribe2') . "</label><br /><br />\r\n"; 
     167 
     168        echo __('Include theme CSS stylesheet in HTML notifications', 'subscribe2') . ': '; 
     169        echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"yes\"" . checked($this->subscribe2_options['stylesheet'], 'yes', false) . " /> "; 
     170        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     171        echo "<label><input type=\"radio\" name=\"stylesheet\" value=\"no\"" . checked($this->subscribe2_options['stylesheet'], 'no', false) . " /> "; 
     172        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     173 
     174        echo __('Send Emails for Pages', 'subscribe2') . ': '; 
     175        echo "<label><input type=\"radio\" name=\"pages\" value=\"yes\"" . checked($this->subscribe2_options['pages'], 'yes', false) . " /> "; 
     176        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     177        echo "<label><input type=\"radio\" name=\"pages\" value=\"no\"" . checked($this->subscribe2_options['pages'], 'no', false) . " /> "; 
     178        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     179        $s2_post_types = apply_filters('s2_post_types', NULL); 
     180        if ( !empty($s2_post_types) ) { 
     181            $types = ''; 
     182            echo __('Subscribe2 will send email notifications for the following custom post types', 'subscribe2') . ': <strong>'; 
     183            foreach ($s2_post_types as $type) { 
     184                ('' == $types) ? $types = ucwords($type) : $types .= ", " . ucwords($type); 
     185            } 
     186            echo $types . "</strong><br /><br />\r\n"; 
     187        } 
     188        echo __('Send Emails for Password Protected Posts', 'subscribe2') . ': '; 
     189        echo "<label><input type=\"radio\" name=\"password\" value=\"yes\"" . checked($this->subscribe2_options['password'], 'yes', false) . " /> "; 
     190        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     191        echo "<label><input type=\"radio\" name=\"password\" value=\"no\"" . checked($this->subscribe2_options['password'], 'no', false) . " /> "; 
     192        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     193        echo __('Send Emails for Private Posts', 'subscribe2') . ': '; 
     194        echo "<label><input type=\"radio\" name=\"private\" value=\"yes\"" . checked($this->subscribe2_options['private'], 'yes', false) . " /> "; 
     195        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     196        echo "<label><input type=\"radio\" name=\"private\" value=\"no\"" . checked($this->subscribe2_options['private'], 'no', false) . " /> "; 
     197        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     198        echo __('Include Sticky Posts at the top of all Digest Notifications', 'subscribe2') . ': '; 
     199        echo "<label><input type=\"radio\" name=\"stickies\" value=\"yes\"" . checked($this->subscribe2_options['stickies'], 'yes', false) . " /> "; 
     200        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     201        echo "<label><input type=\"radio\" name=\"stickies\" value=\"no\"" . checked($this->subscribe2_options['stickies'], 'no', false) . " /> "; 
     202        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     203        echo __('Send Email From', 'subscribe2') . ': '; 
     204        echo "<label>\r\n"; 
     205        $this->admin_dropdown(true); 
     206        echo "</label><br /><br />\r\n"; 
     207        if ( function_exists('wp_schedule_event') ) { 
     208            echo __('Send Emails', 'subscribe2') . ": <br /><br />\r\n"; 
     209            $this->display_digest_choices(); 
     210            echo __('For digest notifications, date order for posts is', 'subscribe2') . ": \r\n"; 
     211            echo "<label><input type=\"radio\" name=\"cron_order\" value=\"desc\"" . checked($this->subscribe2_options['cron_order'], 'desc', false) . " /> "; 
     212            echo __('Descending', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     213            echo "<label><input type=\"radio\" name=\"cron_order\" value=\"asc\"" . checked($this->subscribe2_options['cron_order'], 'asc', false) . " /> "; 
     214            echo __('Ascending', 'subscribe2') . "</label><br /><br />\r\n"; 
     215        } 
     216        echo __('Add Tracking Parameters to the Permalink', 'subscribe2') . ": "; 
     217        echo "<input type=\"text\" name=\"tracking\" value=\"" . stripslashes($this->subscribe2_options['tracking']) . "\" size=\"50\" /> "; 
     218        echo "<br />" . __('eg. utm_source=subscribe2&amp;utm_medium=email&amp;utm_campaign=postnotify&amp;utm_id={ID}', 'subscribe2') . "\r\n"; 
     219        echo "</p>\r\n"; 
     220        echo "</div>\r\n"; 
     221    break; 
     222 
     223    case 'templates': 
     224        // email templates 
     225        echo "<div class=\"s2_admin\" id=\"s2_templates\">\r\n"; 
     226        echo "<p>\r\n"; 
     227        echo "<table style=\"width: 100%; border-collapse: separate; border-spacing: 5px; *border-collapse: expression('separate', cellSpacing = '5px');\" class=\"editform\">\r\n"; 
     228        echo "<tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">"; 
     229        echo __('New Post email (must not be empty)', 'subscribe2') . ":<br />\r\n"; 
     230        echo __('Subject Line', 'subscribe2') . ": "; 
     231        echo "<input type=\"text\" name=\"notification_subject\" value=\"" . stripslashes($this->subscribe2_options['notification_subject']) . "\" size=\"30\" />"; 
     232        echo "<br />\r\n"; 
     233        echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea>\r\n"; 
     234        echo "</td><td style=\"vertical-align: top;\" rowspan=\"3\">"; 
     235        echo "<p class=\"submit\"><input type=\"submit\" class=\"button-secondary\" name=\"preview\" value=\"" . __('Send Email Preview', 'subscribe2') . "\" /></p>\r\n"; 
     236        echo "<h3>" . __('Message substitutions', 'subscribe2') . "</h3>\r\n"; 
     237        echo "<dl>"; 
     238        echo "<dt><b><em style=\"color: red\">" . __('IF THE FOLLOWING KEYWORDS ARE ALSO IN YOUR POST THEY WILL BE SUBSTITUTED' ,'subscribe2') . "</em></b></dt><dd></dd>\r\n"; 
     239        echo "<dt><b>{BLOGNAME}</b></dt><dd>" . get_option('blogname') . "</dd>\r\n"; 
     240        echo "<dt><b>{BLOGLINK}</b></dt><dd>" . get_option('home') . "</dd>\r\n"; 
     241        echo "<dt><b>{TITLE}</b></dt><dd>" . __("the post's title<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
     242        echo "<dt><b>{POST}</b></dt><dd>" . __("the excerpt or the entire post<br />(<i>based on the subscriber's preferences</i>)", 'subscribe2') . "</dd>\r\n"; 
     243        echo "<dt><b>{POSTTIME}</b></dt><dd>" . __("the excerpt of the post and the time it was posted<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
     244        echo "<dt><b>{TABLE}</b></dt><dd>" . __("a list of post titles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
     245        echo "<dt><b>{TABLELINKS}</b></dt><dd>" . __("a list of post titles followed by links to the atricles<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
     246        echo "<dt><b>{PERMALINK}</b></dt><dd>" . __("the post's permalink<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
     247        echo "<dt><b>{TINYLINK}</b></dt><dd>" . __("the post's permalink after conversion by TinyURL<br />(<i>for per-post emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
     248        echo "<dt><b>{DATE}</b></dt><dd>" . __("the date the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n"; 
     249        echo "<dt><b>{TIME}</b></dt><dd>" . __("the time the post was made<br />(<i>for per-post emails only</i>)", "subscribe2") . "</dd>\r\n"; 
     250        echo "<dt><b>{MYNAME}</b></dt><dd>" . __("the admin or post author's name", 'subscribe2') . "</dd>\r\n"; 
     251        echo "<dt><b>{EMAIL}</b></dt><dd>" . __("the admin or post author's email", 'subscribe2') . "</dd>\r\n"; 
     252        echo "<dt><b>{AUTHORNAME}</b></dt><dd>" . __("the post author's name", 'subscribe2') . "</dd>\r\n"; 
     253        echo "<dt><b>{LINK}</b></dt><dd>" . __("the generated link to confirm a request<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n"; 
     254        echo "<dt><b>{ACTION}</b></dt><dd>" . __("Action performed by LINK in confirmation email<br />(<i>only used in the confirmation email template</i>)", 'subscribe2') . "</dd>\r\n"; 
     255        echo "<dt><b>{CATS}</b></dt><dd>" . __("the post's assigned categories", 'subscribe2') . "</dd>\r\n"; 
     256        echo "<dt><b>{TAGS}</b></dt><dd>" . __("the post's assigned Tags", 'subscribe2') . "</dd>\r\n"; 
     257        echo "<dt><b>{COUNT}</b></dt><dd>" . __("the number of posts included in the digest email<br />(<i>for digest emails only</i>)", 'subscribe2') . "</dd>\r\n"; 
     258        echo "</dl></td></tr><tr><td  style=\"vertical-align: top; height: 350px; min-height: 350px;\">"; 
     259        echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n"; 
     260        echo __('Subject Line', 'subscribe2') . ": "; 
     261        echo "<input type=\"text\" name=\"confirm_subject\" value=\"" . stripslashes($this->subscribe2_options['confirm_subject']) . "\" size=\"30\" /><br />\r\n"; 
     262        echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea>\r\n"; 
     263        echo "</td></tr><tr><td style=\"vertical-align: top; height: 350px; min-height: 350px;\">"; 
     264        echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n"; 
     265        echo __('Subject Line', 'subscribe2') . ": "; 
     266        echo "<input type=\"text\" name=\"remind_subject\" value=\"" . stripslashes($this->subscribe2_options['remind_subject']) . "\" size=\"30\" /><br />\r\n"; 
     267        echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea><br /><br />\r\n"; 
     268        echo "</td></tr></table>\r\n"; 
     269        echo "</div>\r\n"; 
     270    break; 
     271 
     272    case 'registered': 
     273        // compulsory categories 
     274        echo "<div class=\"s2_admin\" id=\"s2_compulsory_categories\">\r\n"; 
     275        echo "<h3>" . __('Compulsory Categories', 'subscribe2') . "</h3>\r\n"; 
     276        echo "<p>\r\n"; 
     277        echo "<strong><em style=\"color: red\">" . __('Compulsory categories will be checked by default for Registered Subscribers', 'subscribe2') . "</em></strong><br />\r\n"; 
     278        echo "</p>"; 
     279        $this->display_category_form(array(), 1, explode(',', $this->subscribe2_options['compulsory']), 'compulsory'); 
     280        echo "</div>\r\n"; 
     281 
     282        // excluded categories 
     283        echo "<div class=\"s2_admin\" id=\"s2_excluded_categories\">\r\n"; 
     284        echo "<h3>" . __('Excluded Categories', 'subscribe2') . "</h3>\r\n"; 
     285        echo "<p>"; 
     286        echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Category do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n"; 
     287        echo "</p>"; 
     288        $this->display_category_form(explode(',', $this->subscribe2_options['exclude'])); 
     289        echo "<p style=\"text-align: center;\"><label><input type=\"checkbox\" name=\"reg_override\" value=\"1\"" . checked($this->subscribe2_options['reg_override'], '1', false) . " /> "; 
     290        echo __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</label></p>\r\n"; 
     291        echo "</div>\r\n"; 
     292 
     293        // excluded post formats 
     294        $formats = get_theme_support('post-formats'); 
     295        if ( $formats !== false ) { 
     296            // excluded formats 
     297            echo "<div class=\"s2_admin\" id=\"s2_excluded_formats\">\r\n"; 
     298            echo "<h3>" . __('Excluded Formats', 'subscribe2') . "</h3>\r\n"; 
     299            echo "<p>"; 
     300            echo "<strong><em style=\"color: red\">" . __('Posts assigned to any Excluded Format do not generate notifications and are not included in digest notifications', 'subscribe2') . "</em></strong><br />\r\n"; 
     301            echo "</p>"; 
     302            $this->display_format_form($formats, explode(',', $this->subscribe2_options['exclude_formats'])); 
     303            echo "</div>\r\n"; 
     304        } 
     305        echo "</p>\r\n"; 
     306 
     307        //Auto Subscription for new registrations 
     308        echo "<div class=\"s2_admin\" id=\"s2_autosubscribe_settings\">\r\n"; 
     309        echo "<h3>" . __('Auto-Subscribe', 'subscribe2') . "</h3>\r\n"; 
     310        echo "<p>\r\n"; 
     311        echo __('Subscribe new users registering with your blog', 'subscribe2') . ":<br />\r\n"; 
     312        echo "<label><input type=\"radio\" name=\"autosub\" value=\"yes\"" . checked($this->subscribe2_options['autosub'], 'yes', false) . " /> "; 
     313        echo __('Automatically', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     314        echo "<label><input type=\"radio\" name=\"autosub\" value=\"wpreg\"" . checked($this->subscribe2_options['autosub'], 'wpreg', false) . " /> "; 
     315        echo __('Display option on Registration Form', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     316        echo "<label><input type=\"radio\" name=\"autosub\" value=\"no\"" . checked($this->subscribe2_options['autosub'], 'no', false) . " /> "; 
     317        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     318        echo __('Auto-subscribe includes any excluded categories', 'subscribe2') . ":<br />\r\n"; 
     319        echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"yes\"" . checked($this->subscribe2_options['newreg_override'], 'yes', false) . " /> "; 
     320        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     321        echo "<label><input type=\"radio\" name=\"newreg_override\" value=\"no\"" . checked($this->subscribe2_options['newreg_override'], 'no', false) . " /> "; 
     322        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     323        echo __('Registration Form option is checked by default', 'subscribe2') . ":<br />\r\n"; 
     324        echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"yes\"" . checked($this->subscribe2_options['wpregdef'], 'yes', false) . " /> "; 
     325        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     326        echo "<label><input type=\"radio\" name=\"wpregdef\" value=\"no\"" . checked($this->subscribe2_options['wpregdef'], 'no', false) . " /> "; 
     327        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     328        echo __('Auto-subscribe users to receive email as', 'subscribe2') . ": <br />\r\n"; 
     329        echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html\"" . checked($this->subscribe2_options['autoformat'], 'html', false) . " /> "; 
     330        echo __('HTML - Full', 'subscribe2') ."</label>&nbsp;&nbsp;"; 
     331        echo "<label><input type=\"radio\" name=\"autoformat\" value=\"html_excerpt\"" . checked($this->subscribe2_options['autoformat'], 'html_excerpt', false) . " /> "; 
     332        echo __('HTML - Excerpt', 'subscribe2') ."</label>&nbsp;&nbsp;"; 
     333        echo "<label><input type=\"radio\" name=\"autoformat\" value=\"post\"" . checked($this->subscribe2_options['autoformat'], 'post', false) . " /> "; 
     334        echo __('Plain Text - Full', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     335        echo "<label><input type=\"radio\" name=\"autoformat\" value=\"excerpt\"" . checked($this->subscribe2_options['autoformat'], 'excerpt', false) . " /> "; 
     336        echo __('Plain Text - Excerpt', 'subscribe2') . "</label><br /><br />"; 
     337        echo __('Registered Users have the option to auto-subscribe to new categories', 'subscribe2') . ": <br />\r\n"; 
     338        echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"yes\"" . checked($this->subscribe2_options['show_autosub'], 'yes', false) . " /> "; 
     339        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     340        echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"no\"" . checked($this->subscribe2_options['show_autosub'], 'no', false) . " /> "; 
     341        echo __('No', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     342        echo "<label><input type=\"radio\" name=\"show_autosub\" value=\"exclude\"" . checked($this->subscribe2_options['show_autosub'], 'exclude', false) . " /> "; 
     343        echo __('New categories are immediately excluded', 'subscribe2') . "</label><br /><br />"; 
     344        echo __('Option for Registered Users to auto-subscribe to new categories is checked by default', 'subscribe2') . ": <br />\r\n"; 
     345        echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"yes\"" . checked($this->subscribe2_options['autosub_def'], 'yes', false) . " /> "; 
     346        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     347        echo "<label><input type=\"radio\" name=\"autosub_def\" value=\"no\"" . checked($this->subscribe2_options['autosub_def'], 'no', false) . " /> "; 
     348        echo __('No', 'subscribe2') . "</label><br /><br />"; 
     349        echo __('Display checkbox to allow subscriptions from the comment form', 'subscribe2') . ": <br />\r\n"; 
     350        echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"before\"" . checked($this->subscribe2_options['comment_subs'], 'before', false) . " /> "; 
     351        echo __('Before the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     352        echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"after\"" . checked($this->subscribe2_options['comment_subs'], 'after', false) . " /> "; 
     353        echo __('After the Comment Submit button', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     354        echo "<label><input type=\"radio\" name=\"comment_subs\" value=\"no\"" . checked($this->subscribe2_options['comment_subs'], 'no', false) . " /> "; 
     355        echo __('No', 'subscribe2') . "</label><br /><br />"; 
     356        echo __('Comment form checkbox is checked by default', 'subscribe2') . ": <br />\r\n"; 
     357        echo "<label><input type=\"radio\" name=\"comment_def\" value=\"yes\"" . checked($this->subscribe2_options['comment_def'], 'yes', false) . " /> "; 
     358        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     359        echo "<label><input type=\"radio\" name=\"comment_def\" value=\"no\"" . checked($this->subscribe2_options['comment_def'], 'no', false) . " /> "; 
     360        echo __('No', 'subscribe2') . "</label><br /><br />\r\n"; 
     361        echo __('Show one-click subscription on profile page', 'subscribe2') . ":<br />\r\n"; 
     362        echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"yes\"" . checked($this->subscribe2_options['one_click_profile'], 'yes', false) . " /> "; 
     363        echo __('Yes', 'subscribe2') . "</label>&nbsp;&nbsp;"; 
     364        echo "<label><input type=\"radio\" name=\"one_click_profile\" value=\"no\"" . checked($this->subscribe2_options['one_click_profile'], 'no', false) . " /> "; 
     365        echo __('No', 'subscribe2') . "</label>\r\n"; 
     366        echo "</p></div>\r\n"; 
     367    break; 
     368 
     369    case 'appearance': 
     370        // Appearance options 
     371        echo "<div class=\"s2_admin\" id=\"s2_appearance_settings\">\r\n"; 
     372        echo "<p>\r\n"; 
     373 
     374        // WordPress page ID where subscribe2 token is used 
     375        echo __('Set default Subscribe2 page as ID', 'subscribe2') . ': '; 
     376        echo "<select name=\"s2page\">\r\n"; 
     377        $this->pages_dropdown($this->subscribe2_options['s2page']); 
     378        echo "</select>\r\n"; 
     379 
     380        // Number of subscribers per page 
     381        echo "<br /><br />" . __('Set the number of Subscribers displayed per page', 'subscribe2') . ': '; 
     382        echo "<span id=\"s2entries_1\"><span id=\"s2entries\" style=\"background-color: #FFFBCC\">" . $this->subscribe2_options['entries'] . "</span> "; 
     383        echo "<a href=\"#\" onclick=\"s2_show('entries'); return false;\">" . __('Edit', 'subscribe2') . "</a></span>\n"; 
     384        echo "<span id=\"s2entries_2\">\r\n"; 
     385        echo "<input type=\"text\" name=\"entries\" value=\"" . $this->subscribe2_options['entries'] . "\" size=\"3\" />\r\n"; 
     386        echo "<a href=\"#\" onclick=\"s2_update('entries'); return false;\">". __('Update', 'subscribe2') . "</a>\n"; 
     387        echo "<a href=\"#\" onclick=\"s2_revert('entries'); return false;\">". __('Revert', 'subscribe2') . "</a></span>\n"; 
     388 
     389        // show link to WordPress page in meta 
     390        echo "<br /><br /><label><input type=\"checkbox\" name=\"show_meta\" value=\"1\"" . checked($this->subscribe2_options['show_meta'], '1', false) . " /> "; 
     391        echo __('Show a link to your subscription page in "meta"?', 'subscribe2') . "</label><br /><br />\r\n"; 
     392 
     393        // show QuickTag button 
     394        echo "<label><input type=\"checkbox\" name=\"show_button\" value=\"1\"" . checked($this->subscribe2_options['show_button'], '1', false) . " /> "; 
     395        echo __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "</label><br /><br />\r\n"; 
     396 
     397        // enable AJAX style form 
     398        echo "<label><input type=\"checkbox\" name=\"ajax\" value=\"1\"" . checked($this->subscribe2_options['ajax'], '1', false) . " /> "; 
     399        echo __('Enable AJAX style subscription form?', 'subscribe2') . "</label><br /><br />\r\n"; 
     400 
     401        // show Widget 
     402        echo "<label><input type=\"checkbox\" name=\"widget\" value=\"1\"" . checked($this->subscribe2_options['widget'], '1', false) . " /> "; 
     403        echo __('Enable Subscribe2 Widget?', 'subscribe2') . "</label><br /><br />\r\n"; 
     404 
     405        // show Counter Widget 
     406        echo "<label><input type=\"checkbox\" name=\"counterwidget\" value=\"1\"" . checked($this->subscribe2_options['counterwidget'], '1', false) . " /> "; 
     407        echo __('Enable Subscribe2 Counter Widget?', 'subscribe2') . "</label><br /><br />\r\n"; 
     408 
     409        // s2_meta checked by default 
     410        echo "<label><input type =\"checkbox\" name=\"s2meta_default\" value=\"1\"" . checked($this->subscribe2_options['s2meta_default'], '1', false) . " /> "; 
     411        echo __('Disable email notifications is checked by default on authoring pages?', 'subscribe2') . "</label>\r\n"; 
     412        echo "</p>"; 
     413        echo "</div>\r\n"; 
     414    break; 
     415 
     416    case 'misc': 
     417        //barred domains 
     418        echo "<div class=\"s2_admin\" id=\"s2_barred_domains\">\r\n"; 
     419        echo "<h3>" . __('Barred Domains', 'subscribe2') . "</h3>\r\n"; 
     420        echo "<p>\r\n"; 
     421        echo __('Enter domains to bar from public subscriptions: <br /> (Use a new line for each entry and omit the "@" symbol, for example email.com)', 'subscribe2'); 
     422        echo "<br />\r\n<textarea style=\"width: 98%;\" rows=\"4\" cols=\"60\" name=\"barred\">" . esc_textarea($this->subscribe2_options['barred']) . "</textarea>"; 
     423        echo "</p>"; 
     424        echo "<h3>" . __('Links', 'subscribe2') . "</h3>\r\n"; 
     425        echo "<a href=\"http://wordpress.org/extend/plugins/subscribe2/\">" . __('Plugin Site', 'subscribe2') . "</a><br />"; 
     426        echo "<a href=\"http://wordpress.org/support/plugin/subscribe2\">" . __('Plugin Forum', 'subscribe2') . "</a><br />"; 
     427        echo "<a href=\"http://subscribe2.wordpress.com/\">" . __('Plugin Blog', 'subscribe2') . "</a><br />"; 
     428        echo "<a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2387904\">" . __('Make a donation via PayPal', 'subscribe2') . "</a>"; 
     429        echo "</div>\r\n"; 
     430    break; 
     431 
     432} 
    495433// submit 
    496434echo "<p class=\"submit\" style=\"text-align: center\"><input type=\"submit\" class=\"button-primary\" name=\"submit\" value=\"" . __('Submit', 'subscribe2') . "\" /></p>"; 
    497435 
    498 // reset 
    499 echo "<h2>" . __('Reset Default', 'subscribe2') . "</h2>\r\n"; 
    500 echo "<p>" . __('Use this to reset all options to their defaults. This <strong><em>will not</em></strong> modify your list of subscribers.', 'subscribe2') . "</p>\r\n"; 
    501 echo "<p class=\"submit\" style=\"text-align: center\">"; 
    502 echo "<input type=\"submit\" id=\"deletepost\" name=\"reset\" value=\"" . __('RESET', 'subscribe2') . 
    503 "\" />"; 
     436if ($current_tab === 'misc') { 
     437    // reset 
     438    echo "<h3>" . __('Reset to Default Settings', 'subscribe2') . "</h3>\r\n"; 
     439    echo "<p>" . __('Use this to reset all options to their defaults. This <strong><em>will not</em></strong> modify your list of subscribers.', 'subscribe2') . "</p>\r\n"; 
     440    echo "<p class=\"submit\" style=\"text-align: center\">"; 
     441    echo "<input type=\"submit\" id=\"deletepost\" name=\"reset\" value=\"" . __('RESET', 'subscribe2') . 
     442    "\" />"; 
     443} 
    504444echo "</p></form></div>\r\n"; 
    505445 
  • subscribe2/trunk/classes/class-s2-admin.php

    r607157 r613344  
    4646 
    4747    function option_form_js() { 
    48         wp_register_script('s2_edit', S2URL . 'include/s2_edit' . $this->script_debug . '.js', array('jquery'), '1.0'); 
     48        wp_register_script('s2_edit', S2URL . 'include/s2_edit' . $this->script_debug . '.js', array('jquery'), '1.1'); 
    4949        wp_enqueue_script('s2_edit'); 
    5050    } // end option_form_js() 
  • subscribe2/trunk/include/s2_edit.js

    r595090 r613344  
    11// Version 1.0 - original version 
     2// Version 1.1 - updated for Subscribe2 8.6 
    23jQuery(document).ready(function () { 
    34    // hide our span before page loads 
    4     jQuery('#s2bcc_2').hide(); 
    5     jQuery('#s2page_2').hide(); 
     5    jQuery('#s2bcclimit_2').hide(); 
    66    jQuery('#s2entries_2').hide(); 
    77}); 
  • subscribe2/trunk/include/s2_edit.min.js

    r595090 r613344  
    1 jQuery(document).ready(function(){jQuery('#s2bcc_2').hide();jQuery('#s2page_2').hide();jQuery('#s2entries_2').hide()});function s2_show(id){jQuery('#s2'+id+'_2').show();jQuery('#s2'+id+'_1').hide();return false}function s2_hide(id){jQuery('#s2'+id+'_1').show();jQuery('#s2'+id+'_2').hide();return false}function s2_update(id){var input=jQuery('input[name="'+id+'"]').val();jQuery('input[name="'+id+'"]').val(input);jQuery('#s2'+id).html(input);s2_hide(id)}function s2_revert(id){var option=jQuery('#js'+id).val();jQuery('input[name="'+id+'"]').val(option);jQuery('#s2'+id).html(option);s2_hide(id)} 
     1jQuery(document).ready(function(){jQuery('#s2bcclimit_2').hide();jQuery('#s2entries_2').hide()});function s2_show(id){jQuery('#s2'+id+'_2').show();jQuery('#s2'+id+'_1').hide();return false}function s2_hide(id){jQuery('#s2'+id+'_1').show();jQuery('#s2'+id+'_2').hide();return false}function s2_update(id){var input=jQuery('input[name="'+id+'"]').val();jQuery('input[name="'+id+'"]').val(input);jQuery('#s2'+id).html(input);s2_hide(id)}function s2_revert(id){var option=jQuery('#js'+id).val();jQuery('input[name="'+id+'"]').val(option);jQuery('#s2'+id).html(option);s2_hide(id)} 
Note: See TracChangeset for help on using the changeset viewer.