Plugin Directory

Changeset 917929


Ignore:
Timestamp:
05/20/2014 01:59:19 PM (12 years ago)
Author:
Dabelon
Message:

add new version

Location:
subscribe2
Files:
4 added
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • subscribe2/tags/10.0/ChangeLog.txt

    r914924 r917929  
    1 = Version 9.5 by Matthew Robinson =
    2 
    3 * Improved placement and usage of the 's2_custom_keywords' filter in the digest emails
    4 * Fix for some undefined variable notices
    5 * Fixes for database connectivity in the upgrade class file - thanks to rushu25
    6 * Fix for bug when antispam measures are disabled - thanks to serinx
    7 * Add option to Sidebar Widget to not wrap the button below the form
    8 * Straightened quotes in the ChangeLog
    9 * Remove all uses of PHP extract() function as per core ticket (https://core.trac.wordpress.org/ticket/22400)
    10 
    111= Version 9.4 by Matthew Robinson =
    122
    133* Fix for non-existing variable errors on Subscribe2->Subscribers page - thanks to bapakrob and perezlr
    14 * Don't display Excluded Categories in Bulk Management is Registered users cannot override the exclusion
     4* Dont display Excluded Categories in Bulk Management is Registered users cannot override the exclusion
    155* Fix for disappearing Jetpack Stats module - thanks to desertravenart
    16 * Fix for undefined variable notices in the digest emails
    176
    187= Version 9.3 by Matthew Robinson =
     
    2615* Improved domain name comparison for sender email check - props garypardun
    2716* Tidied load_string() function and moved it to class-s2-frontend.php as all strings are not for user side only
    28 * Ensure 's2_authors' keys exist on all sites and for all Registered Users as per illmasterc's bug report
     17* Ensure 's2_authors' keys exist on all sites and for all Registered Users as per illmastercs bug report
    2918* Introduce 's2_mu_blog_list' filter to allow filter of blog list for WordPress Multisite installs - props careb
    3019* Enable built-in widget by default - props by MadtownLems
     
    5645* Introduce link to Templates page with unsupported keywords are detected - props MadtownLems
    5746* Ensure all JavaScript passes the JSHint WordPress Coding Standards
    58 * Initialise 'colorpicker' boxes on page load so they are coloured before first user click
    59 * Only add a new Weekly schedule if it doesn't already exist
     47* Initialise ‘colorpicker’ boxes on page load so they are coloured before first user click
     48* Only add a new Weekly schedule if it doesnt already exist
    6049* Use trim() on post excerpt to account for blank but non-empty excerpts
    6150* Don't display screen icons in WordPress 3.8 as they are hidden by CSS - see ticket http://core.trac.wordpress.org/ticket/26119
  • subscribe2/tags/10.0/ReadMe.txt

    r899709 r917929  
    11=== Subscribe2 ===
    2 Contributors: MattyRob, Skippy, RavanH, bhadaway
     2Contributors: Dabelon, wenzhixue, MattyRob
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
    44Tags: posts, subscription, email, subscribe, notify, notification
    55Requires at least: 3.3
    66Tested up to: 3.9
    7 Stable tag: 9.4
     7Stable tag: 10.0
    88License: GPL3
    99
    10 Sends a list of subscribers an email notification when new posts are published to your blog
     10Sends a list of subscribers an email notification when new posts are published to your blog.
    1111
    1212== Description ==
     13
     14= Summary =
    1315Subscribe2 provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog.
    1416
    15 Email Notifications can be sent on a per-post basis or periodically in a Digest email. Additionally, certain categories can be excluded from inclusion in the notification and posts can be excluded on an individual basis by setting a custom field.
    16 
    17 The plugin also handles subscription requests allowing users to publicly subscribe (**Public Subscribers**) by submitting their email address in an easy to use form or to register with your blog (**Registered Users**) which enables greater flexibility over the email content for per-post notifications for the subscriber. Admins are given control over the presentation of the email notifications, can bulk manage subscriptions for users and manually send email notices to subscribers.
     17= Email =
     18Email notifications can be sent on a per-post basis or periodically in a Digest email. Additionally, certain categories can be excluded from inclusion in the notification and posts can be excluded on an individual basis by setting a custom field.
     19
     20= Subscriptions =
     21Subscription requests allows users to publicly subscribe (**Public Subscribers**) by submitting their email address in an easy to use form or to register with your blog (**Registered Users**) which enables greater flexibility over the email content for per-post notifications for the subscriber. Admins are given control over the presentation of the email notifications, can bulk manage subscriptions for users and manually send email notices to subscribers.
    1822
    1923The format of the email can also be customised for per-post notifications, Subscribe2 can generate emails for each of the following formats:
    2024
    21 * plaintext excerpt
    22 * plaintext full post (Registered Users only)
    23 * HTML excerpt (Registered Users only)
    24 * HTML full post (Registered Users only)
     25* plaintext excerpt.
     26* plaintext full post (Registered Users only).
     27* HTML excerpt (Registered Users only).
     28* HTML full post (Registered Users only).
    2529
    2630If you want to send full content HTML emails to Public Subscribers too then upgrade to [Subscribe2 HTML](http://semperplugins.com/plugins/subscribe2-html/).
    2731
     32= ReadyGraph App =
     33This menu item allows users to sign up for a free ReadyGraph account, or sync an existing free ReadyGraph account.  Once a ReadyGraph account is synced, this menu item is where the user manages their ReadyGraph account, views email addresses, sends emails to their community members, and views insights on user growth.     
     34
    2835== Installation ==
    29 AUTOMATIC INSTALLATION
     36
     37= AUTOMATIC INSTALLATION =
    3038
    31391. Log in to your WordPress blog and visit Plugins->Add New.
     
    39478. In the WordPress "Settings" area for Subscribe2 select the page name in the "Appearance" section that of the WordPress page created in step 7.
    4048
    41 MANUAL INSTALLATION
     49= MANUAL INSTALLATION =
    4250
    43511. Copy the entire /subscribe2/ directory into your /wp-content/plugins/ directory.
     
    5260
    5361== Frequently Asked Questions ==
     62
    5463[Visit FAQ site](http://subscribe2.wordpress.com/support/faqs/)
    5564
     
    6170
    6271== Changelog ==
    63 See [ChangeLog.txt](http://plugins.svn.wordpress.org/subscribe2/trunk/ChangeLog.txt)
     72= Version 9.5 by Matthew Robinson =
     73
     74* Improved placement and usage of the ‘s2_custom_keywords’ filter in the digest emails
     75* Fix for some undefined variable notices
     76* Fixes for database connectivity in the upgrade class file - thanks to rushu25
     77* Fix for bug when antispam measures are disabled - thanks to serinx
     78* Add option to Sidebar Widget to not wrap the button below the form
     79
     80= Version 9.4 by Matthew Robinson =
     81
     82* Fix for non-existing variable errors on Subscribe2->Subscribers page - thanks to bapakrob and perezlr
     83* Don’t display Excluded Categories in Bulk Management is Registered users cannot override the exclusion
     84* Fix for disappearing Jetpack Stats module - thanks to desertravenart
     85* Fix for undefined variable notices in the digest emails
     86
     87= Version 9.3 by Matthew Robinson =
     88
     89* Only add 'weekly' cron schedule interval if it does not already exist
     90* Add capability to add social media share buttons to HTML emails
     91* Update editor plugin for TinyMCE version 4 bundled with WordPress 3.9
     92* Rework Digest emails to collect posts based on transition status rather than time - see ticket https://plugins.trac.wordpress.org/ticket/2058
     93* Hide comment form subscription options if using Jetpack Comments and improve compatibility
     94* Fixed typos in the Help tab on the Settings page
     95* Improved domain name comparison for sender email check - props garypardun
     96* Tidied load_string() function and moved it to class-s2-frontend.php as all strings are not for user side only
     97* Ensure 's2_authors' keys exist on all sites and for all Registered Users as per illmasterc’s bug report
     98* Introduce 's2_mu_blog_list' filter to allow filter of blog list for WordPress Multisite installs - props careb
     99* Enable built-in widget by default - props by MadtownLems
     100* Use a better method for unendcoding HTML special characters for plain text emails - proposed by Dainius Kaupaitis
     101* Fixed a bug affecting handling of Registered users with email aliases (e.g. name+alias@gmail.com) - thanks to Alexandre (bosseal)
     102* Improved Character Set encoding of some email headers
     103* Improved user registration hooking for Multisite installs - thanks to dsl255
     104* Introduce a filter to allow filtering of the confirm link URL - props diddledan
     105* Introduce a confirmation box for Registered User deletion - props geoorgge1968
     106* Improved Bulk Management user experience by retaining submitted settings
     107
     108= Version 9.2 by Matthew Robinson =
     109
     110* Fixed an error in the Registered User deletion code - thanks to Jay Wasack
     111
     112= Version 9.1 by Matthew Robinson =
     113
     114* Shortcode parameters are now not case sensitive
     115* Fixed AJAX mode to work with new Anti Spam code
     116* Suppress undefined variable warnings when sending Digest Email previews
     117* Include Signup Date and IP for Public Subscribers in CSV Export - props Taylor4484
     118* Fix for Sticky Posts in the digest returning errant posts - thanks to belg4mit
     119* Move FAQs to external site to allow more timely updates
     120* Add ability to hide other Multisite blogs with CSS in the Subscribe2->Your Subscriptions page (DIV id of 's2_mu_sites') - props cblsysadmin
     121* Add 's2_form' filter to allow dynamic alterations to the default form - props adam_jack
     122* Conduct more thorough checking for Public and Registered emails when adding users in the admin pages - thanks to MadtownLems
     123* Introduce the {REFERENCELINKS} keyword - props manu1033
     124* Fix link to jQuery CSS for servers using HTTPS connections - props Christian (aka Alariel)
     125* Introduce link to Templates page with unsupported keywords are detected - props MadtownLems
     126* Ensure all JavaScript passes the JSHint WordPress Coding Standards
     127* Initialise ‘colorpicker’ boxes on page load so they are coloured before first user click
     128* Only add a new Weekly schedule if it doesn’t already exist
     129* Use trim() on post excerpt to account for blank but non-empty excerpts
     130* Don't display screen icons in WordPress 3.8 as they are hidden by CSS - see ticket http://core.trac.wordpress.org/ticket/26119
     131* Added 's2_confirm_email' filter to allow amendment or replacement of the subscribe and unsubscribe emails - proposed by Tim Büttner
     132* Fixed a typo in the names of the five 's2_send_{email_type}_subscribers' hooks - thanks to robertjj
     133* Introduced the 's2_post_statuses' to allow for custom post status transitions, for example with the 'Edit Flow' plugin
     134* Fix for failed deletion of Registered Subscribers in Subscribe2->Subscribers page - thanks to Russ Michaels
     135
     136= Version 9.0 by Matthew Robinson =
     137
     138* Added capability to send emails with attachments from Send Email page
     139* Added feature that removes unconfirmed public subscribers after 28 days (time frame can be altered with a filter)
     140* Added ability to bulk delete Registered Users/Subscribers
     141* Use {IMAGE} tag in HTML excerpt emails and digests only, images would be stripped in plain text and included anyway in full content HTML - applies to Subscribe2 HTML only
     142* Added help tabs on the plugins admin pages
     143* Improved the comparison of barred domains to subscribing email addresses - thanks to SashainSydney
     144* Added Text Domain to the plugin header to allow information on plugin page to translate - thanks to qwertysimo
     145* Applied a fix to ensure translation of all strings - thanks to qwertysimo
     146* Improved some strings to use sprintf() - thanks to Tom Adams (tomdxw)
     147* Use jQuery.noConflict(); when AJAX is enabled
     148* Removed excess span tag from the Counter Widget - thanks to dimagsv
     149* Allow filtering of admin email address for the emails sent when users confirm a subscription or unsubscription - suggested by 3cstudio
     150* Fixed default email notification subject text - thanks to Steve C @ 3Cstudio
     151* Fixed ability to have translation files in WP_LANG folder
     152* Fixed an issue with pagination of search results - thanks to sijpie
     153* Fixed 'Add Registered User' button in Subscribe2->Subscribers, Registered Tab - thanks to qwik3r
     154* Improved pages dropdown to an ordered and hierarchical display - thanks to xavierlh1
     155* Improved control over digest email scheduling - proposed by Jason Lemahieu
     156* Fixed Subscriber Dropdown counts for Compulsory categories
     157* Added a link to Tranlation files to the plugin page and the miscellaneous tab of the Subscribe2->Settings page - props eyephone21
     158* Added {KEYWORD} checking in the template to warn users of disallowed keywords - proposed by Jason Lemahieu
     159* Fixed some notices in the Send Email page - thanks to Bryan Hadaway (bhadaway)
     160* Added anti-spam measures to the sign up form - thanks to Bryan Hadaway (bhadaway)
     161* Update query_filter() function to hook into the 'request' filter instead of the deprecated 'query_filter'
     162* Added a default 'Select a page' option to the page dropdown to highlight the need to have a published page select
     163* Added filters to the subscription and unsubscription confirmation messages to allow personalisation - see FAQs for example functions
     164* Remove Simple Facebook Connect action during subscription and unsubscription confirmation to ensure user messages are displayed
     165* Improved white space stripping in the plaintext full content email
     166* Fixed a PHP notice on the Subscribe2->Subscribers page - thanks to emile.swain
     167* Fixes the non-working 'check all' boxes in WordPress 3.6 and above
     168* NOTE Version 9.0 needs WordPress 3.3 or above
     169
     170= Version 8.9.1 by Matthew Robinson =
     171
     172* Check for the existence of the mb_encode_mimeheader function before use as it's optional in PHP builds - thanks to derekmacewen
     173* Fix for fatal error in upgrade code due to calling the wrong class
     174
     175= Version 8.9 by Matthew Robinson =
     176
     177* Fix fatal error in the uninstall.php file
     178* Correct error using set_url_scheme() function in WordPress version prior to 3.5
     179* Allow the Widget to post form back to referring page by omitting action for parameter - thanks to Peter Gordon
     180* Fix for options being reset on Multisite installs - thanks to Luca
     181* Make sure translation strings are loaded during install(), upgrade() and reset() - thanks to Milan Dinić
     182* Fix internationalisation of subscribers list table - thanks to Milan Dinić
     183* Use mb_encode_mimeheader on email sender name - thanks to xl32
     184* Trim email addresses before sanitising them - thanks to byarts
     185* Optimised the upgrade() function for large sites
     186
     187= Version 8.8 by Matthew Robinson =
     188
     189* Added ability to filter both excerpt_length and word_wrap
     190* Added code to stop site wide activation on Multisite installs
     191* Added code to fix compatibility issues with Autoblog plugin - thanks to Kevin Waite and Andy Stratton
     192* Fixed digit entry in pagination section on Registeres tab in Subscribe2->Subscribers
     193* Removed ID from a string in the Settings page as it was confusing
     194* Enhanced Compulsory Category code to ensure that Registered Users all get notifications for such categories despite their current personal settings
     195* Improved Pagination when the Filter is changed on the Subscribe2->Subscribers page
     196* Use $wpdb->prefix in preference to $table_prefix
     197* Improve functionality of the uninstall script on Multisite installs
     198* Fixed glitch in upgrade85 code that failed to add a new database column when called
     199* Sort subscribers into alphabetical order irrespective of case - thanks to mharpen
     200
     201= Version 8.7 by Matthew Robinson =
     202
     203* Enabled {TITLE} as a keyword in URL Tracking in free version
     204* Moved Subscribers page class code to a new external class file to avoid fatal PHP errors on some sites
     205* Fixed a glitch in the {TABLELINK} tag caused by adding support for {TINYLINK} to the digest email
     206* Fixed and repaired addition of extra comma to s2_subscribed table values and also addition of null s2cat values
     207* Fixed incomplete table creation on new installs - thanks to niclaslockner
     208* Fix for PHP Warning about an undefined $value variable on form submission - thanks to annewinterbottom
     209* Rename public subscriber variables internally for consistency
     210* Implement variable caching for Registered users in the same way as for Public subscribers
     211* Widen Subject boxes on the Subscribe2->Settings:Templates page - props Orion42
     212* Allow easier customisation of the word wrap length in plain text emails - props Orion42
     213* Abstracted the upgrade() code and made it incremental so that only necessary code is executed
     214* Fixed a bug in the Send Email page that failed to send emails to Public Subscribers when All Users was selected - thanks to Gui
     215* Added an option to disable JavaScript within the Widget
     216* Minor code improvements
     217
     218= Version 8.6 by Matthew Robinson =
     219
     220* Minor layout update to Widget Settings
     221* Fix for non-sending notifications for pages - proposed by ctcdesign
     222* Fix for a translation domain error in admin/settings.php - proposed by monpelaud
     223* Fix for deprecated is_blog_user() function on Multisite installs - proposed by hallcp
     224* Extend Subscribe2 database table to collect additional data to meet DreamHost privacy policy - thanks to matt, joshukraine and Dreamhost
     225* Refresh Subscribers page in admin, tables now sortable on present columns
     226* Order CSS files better by applying CSSComb
     227* Reuse $value variable in the 'frontend' class to reduce translation strings
     228* Improve AJAX form to obey the shortcode hide parameter - proposed by bwsl
     229* Correct spelling error in the Settings page - proposed by dimadin
     230* Call translation code via a hook to allow greater dynamic control - proposed by dimadin
     231* Look in more locations for translation files, can place in core languages folder now for upgrade protection
     232* Refresh Settings page in admin to a tabbed interface
     233* Strip HTML from email subject to improve compatibility with other plugins and WordPress 3.5
     234* Fixed bug in the display of compulsory categories in the Settings page
     235* Add option to manually send emails to All Registered Users and Public Subscribers - proposed by TigWeb
     236* Enable TinyURL link shortening for Digest Notification Emails if {TINYLINK} is present in the Email Template
     237* Fixed bug in TinyURL error handling and fallback when link generation fails
     238* Fixed bug where {DATE} was left blank in the subject field for future scheduled post notifications - thanks to Steve Savoy
     239* Added a filter to allow on-the-fly alteration of the size of the {IMAGE} in the paid version
     240* Fixed a warning message for a core function ready for WordPress 3.6
     241* Enabled {TITLE} as a keyword in URL Tracking in HTML version
     242
     243= Version 8.5 by Matthew Robinson =
     244
     245* Fixed width of a page select drop down in the Widget settings - thanks to Balky79
     246* Added option to check the comment subscription box by default - proposed by Doug Lerner
     247* Improved off-domain error message in Settings page and address checking if Blogname is selected
     248* Fixed an issue on Multisite installs displaying the wrong link to profiles pages for other blog sites - thanks to MadtownLems
     249* Fixed an issue with Image and Shortcode replacement in the visual editor (TinyMCE) - thanks to Dave Firman
     250* Fixed unique IDs for 2 possible error messages in the Settings page - thanks to MadtownLems
     251* Fixed several HTML5 validation error in the admin pages
     252* Improved regex replacedment of s strike and del HTML tags in plaintext emails - thanks to jimshell
     253* Use wp_kses() rather than strip_tags() on email subject lines so that single angle brackets are allowed - thanks to eightize and esmi
     254* Allow remote definition of email address in form - thanks to orion42
     255* Added ability to have compulsory categories - proposed by iClimb
     256* Apply WordPress the_author filter to the author names to improve plugin compatibility - proposed by SpaciousMind
     257* Added the ability to track the post ID in the tracking Parameter field - proposed by Laga
     258* Protect the 's2email' post meta key - proposed by Nally123
     259* Strip excess white space within the Digest email when images are removed
     260* Add a time column to the public subscriber table for hosting provider spam policy compliance - proposed by Erik N
     261* Change plugin folder name to suppress update prompts for the HTML version
     262* Rename js files consistently with core ticket 21633
     263* Add width parameter to comment form text to fix issues with some themes - proposed by mharpen
     264* Added option to include Sticky Posts at the top of all Digest Notifications - proposed by pkhatmedia
     265* Fixed some Markdown errors in the ReadMe
     266
     267= Version 8.4 by Matthew Robinson =
     268
     269* Fixed an error in the 'Send Mail' page that blocked emails from being sent
     270* Added tracking features to Digest title links in HTML version - thanks to Jeremy Schultz
     271* Provide clearer user feedback for Send and Preview buttons in "Send Email" window
     272* Add new option to the Widget to return users to the home page on submission
     273* Added warning to Settings page if selected sender email address is "off-domain"
     274* Fixed numerous minor SQL injections vectors - thanks to Tom Adams (holizz)
     275* Removed auto-embed iframes from HTML emails - thanks to Doug Lerner
     276* Add more intuitive user messages for Public Subscribers when Unsubscribing - thanks to Doug Lerner
     277
     278= Version 8.3 by Matthew Robinson =
     279
     280* Fixed a bunch of PHP messages - should not show anyway unless WP_DEBUG is true or PHP error reporting is on a high setting
     281* Fixed bulk category management so it applies to all users and not just the first record
     282* Update 'autosub' to no on one-click unsubscribe instead of erasing the value
     283* Return empty string is get_tracking_link() is passed and empty variable
     284* Fixed some typographical errors
     285* Fixed profile page to obey 'one click' display setting
     286* Fixed implode error seen when sending preview emails on some configurations
     287* Fixed a error in the admin user dropdown on installs (particularly Multisite) where there may be no administrator level users
     288* Added a button text filter for the Subscribe and Unsubscribe buttons - proposed by casben79
     289* Use wp_hash in place of MD5 to further obfuscate confirmation links - thanks to Charlie Eriksen, Otto and Ipstenu
     290
     291= Version 8.2 by Matthew Robinson =
     292
     293* Implemented use of Farbtastic as colour chooser in the Counter Widget because ColorPicker has been deprecated in WordPress
     294* Fixed one hook call in WordPress to pass $this variable by reference to save a little more RAM
     295* Fixed Subscribe2 implementation of custom taxonomies
     296* Fixed Bulk Management Format Change code to apply for all users
     297* Fix for low impact security vulnerability
     298
     299= Version 8.1 by Matthew Robinson =
     300
     301* Fixed redirect errors and crash affecting multisite installs on upgrade to 8.0 - thanks in particular to Ed Cooper
     302* Fixed several other multisite bugs affecting links and styling - thanks to Mark Olbert
     303* Fixed empty CSV exports - thanks to Gil Namur
     304
     305= Version 8.0 by Matthew Robinson =
     306
     307* Split the main plugin file into separate classes for more efficient (60% less RAM) server resource usage - huge thanks to Milan Petrovic
     308* Ensure notifications for posts are sent to all active registered users
     309* Fixed bug in Bulk Management code to include all filtered Registered Subscribers, not just those on current screen - thanks to samandiriel
     310* Fixed some PHP messages regarding use of deprecated clean_url() function and WordPress version checking - thanks to anmari
     311* Improved white space trimming in the code so it respects tabs and line breaks - thanks to belg4mit
     312* Updated screenshots to Subscribe2 8.0 and WordPress 3.3.1 screen layouts
     313* Implemented one-click buttons to subscribe and unsubscribe - thanks to dimadin for code patch
     314* Changed some default settings, sender to BLOGNAME and number of recipients per email to 1
     315* Implemented a change so that categories are not displayed in the filter dropdowns when using Subscribe2 in digest mode
     316* Ensure an action is specified for HTML5 validity - thanks to Franco Carinato
     317* Introduced 4 new hooks to filter per-post subscribers for each of the 4 email types - thanks to Nicolas Noé
     318
     319See complete changelog [here.](http://plugins.svn.wordpress.org/subscribe2/trunk/ChangeLog.txt)
    64320
    65321== Upgrade Notice ==
    66 See Version History
     322See Update Version History
  • subscribe2/tags/10.0/classes/class-s2-admin.php

    r901881 r917929  
    77    function admin_menu() {
    88        add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', NULL, S2URL . 'include/email_edit.png');
    9 
     9        #add_submenu_page('SimpleSubscribe', 'Readygraph App', 'Readygraph App', 'manage_options', 'ssubscribe-register-app', array($this, 'add_ssubscribe_app_register_page'));
     10        add_submenu_page('s2', __('Readygraph App', 'subscribe2'), __('Readygraph App', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_readygraph', array(&$this, 'readygraph_menu'));
    1011        $s2user = add_submenu_page('s2', __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'), S2URL . 'include/email_edit.png');
    1112        add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
     
    174175    } // end subscribers_menu()
    175176
     177    function readygraph_menu() {
     178        global $wpdb;
     179        require_once(S2PATH . 'admin/app_page.php');
     180    } // end subscribers_menu()
     181
    176182    /**
    177183    Our settings page
     
    243249        }
    244250    } // end widget_s2_counter_css_and_js()
     251
     252    /**
     253    Function to add css and js files to admin header
     254    */
     255    function on_plugin_activated_redirect(){
     256        $setting_url="admin.php?page=s2_readygraph";
     257
     258        if (get_option('s2_do_activation_redirect', false)) { 
     259            delete_option('s2_do_activation_redirect');
     260            wp_redirect($setting_url);
     261               
     262        } 
     263    }// end widget_s2_counter_css_and_js()
    245264
    246265/* ===== meta box functions to allow per-post override ===== */
     
    726745        if ( empty($pages) ) { return; }
    727746
    728         $option = '';
    729747        foreach ( $pages as $page ) {
    730748            $option .= "<option value=\"" . $page->ID . "\"";
  • subscribe2/tags/10.0/classes/class-s2-core.php

    r908209 r917929  
    3939        // create the table, as needed
    4040        maybe_create_table($this->public, $sql);
     41        global $wpdb;
     42        // tables, get ready!
     43
     44        if(strtoupper($wpdb->get_var("show tables like '". WP_subscribe2_TABLE_APP . "'")) != strtoupper(WP_subscribe2_TABLE_APP)) 
     45        {
     46            $wpdb->query("
     47                CREATE TABLE `". WP_subscribe2_TABLE_APP . "` (
     48                    `eemail_app_pk` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
     49                    `eemail_app_id` VARCHAR( 250 ) NOT NULL )
     50                ");
     51        }
    4152
    4253        // create table entries for registered users
     
    5162            }
    5263        }
    53 
     64       
    5465        // safety check if options exist and if not create them
    5566        if ( !is_array($this->subscribe2_options) ) {
    5667            $this->reset();
    5768        }
     69         
     70         
    5871    } // end install()
    5972
     
    123136            update_option('subscribe2_options', $this->subscribe2_options);
    124137        }
    125         if ( version_compare($this->subscribe2_options['version'], '9.5', '<') ) {
     138        if ( version_compare($this->subscribe2_options['version'], '10.0', '<') ) {
    126139            $s2_upgrade->upgrade100();
    127             $this->subscribe2_options['version'] = '9.5';
     140            $this->subscribe2_options['version'] = '10.0';
    128141        }
    129142
     
    13671380
    13681381        // Collect sticky posts if desired
    1369         $sticky_ids = array();
    13701382        if ( $this->subscribe2_options['stickies'] == 'yes' ) {
    13711383            $sticky_ids = get_option('sticky_posts');
     
    13781390        // do we have any posts?
    13791391        if ( empty($posts) && !has_filter('s2_digest_email') ) { return false; }
     1392        $this->post_count = count($posts);
    13801393
    13811394        // if we have posts, let's prepare the digest
    1382         // define some variables needed for the digest
    13831395        $datetime = get_option('date_format') . ' @ ' . get_option('time_format');
    13841396        $all_post_cats = array();
    13851397        $ids = array();
    1386         $digest_post_ids = array();
    13871398        $mailtext = apply_filters('s2_email_template', $this->subscribe2_options['mailtext']);
    13881399        $table = '';
     
    13901401        $message_post= '';
    13911402        $message_posttime = '';
    1392         $this->post_count = count($posts);
     1403        $digest_post_ids = array();
    13931404        $s2_taxonomies = apply_filters('s2_taxonomies', array('category'));
    1394 
    13951405        foreach ( $posts as $post ) {
    13961406            // keep an array of post ids and skip if we've already done it once
     
    14361446            }
    14371447
    1438             $digest_post_ids[] = $post->ID;
     1448            if ( isset($sticky_ids) && !in_array($post->ID, $sticky_ids) ) {
     1449                $digest_post_ids[] = $post->ID;
     1450            } else {
     1451                $digest_post_ids[] = $post->ID;
     1452            }
    14391453
    14401454            $post_title = html_entity_decode($post->post_title, ENT_QUOTES);
     
    15081522        }
    15091523
    1510         // update post_meta data for sent ids but not sticky posts
    1511         foreach ( $ids as $id ) {
    1512             if ( !empty($sticky_ids) && !in_array($id, $sticky_ids) ) {
    1513                 update_post_meta($id, '_s2_digest_post_status', 'done');
    1514             } else {
    1515                 update_post_meta($id, '_s2_digest_post_status', 'done');
    1516             }
     1524        foreach ( $digest_post_ids as $digest_post_id ) {
     1525            update_post_meta($digest_post_id, '_s2_digest_post_status', 'done');
    15171526        }
    15181527        $this->subscribe2_options['last_s2cron'] = implode(',', $digest_post_ids);
     
    15271536        $message_post = preg_replace("|[\r\n]{3,}|", "\r\n\r\n", $message_post);
    15281537        $message_posttime = preg_replace("|[\r\n]{3,}|", "\r\n\r\n", $message_posttime);
     1538
     1539        // apply filter to allow custom keywords
     1540        $message_post = apply_filters('s2_custom_keywords', $message_post, $digest_post_ids);
     1541        $message_posttime = apply_filters('s2_custom_keywords', $message_posttime, $digest_post_ids);
    15291542
    15301543        // apply filter to allow external content to be inserted or content manipulated
     
    15561569        $mailtext = str_replace("{POSTTIME}", $message_posttime, $mailtext);
    15571570        $mailtext = str_replace("{POST}", $message_post, $mailtext);
    1558 
    1559         // apply filter to allow custom keywords
    1560         $mailtext = apply_filters('s2_custom_keywords', $mailtext, $digest_post_ids);
    15611571        $mailtext = stripslashes($this->substitute($mailtext));
    15621572
     
    16131623        $tmp = explode('-', $wp_version, 2);
    16141624        $this->wp_release = $tmp[0];
    1615 
     1625       
    16161626        // Is this WordPressMU or not?
    16171627        if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
     
    16941704            add_action('wp_scheduled_delete', array(&$this, 's2cleaner_task'));
    16951705        }
    1696 
     1706        add_action('admin_init', array(&$this, 'on_plugin_activated_redirect')); 
    16971707        // Add actions specific to admin or frontend
    16981708        if ( is_admin() ) {
     
    17111721                add_filter('ozh_adminmenu_icon_s2_settings', array(&$this, 'ozh_s2_icon'));
    17121722            }
    1713 
     1723           
    17141724            // add write button
    17151725            if ( '1' == $this->subscribe2_options['show_button'] ) {
     
    17211731                add_action('admin_init', array(&$this, 'widget_s2counter_css_and_js'));
    17221732            }
     1733           
    17231734
    17241735            // add one-click handlers
  • subscribe2/tags/10.0/classes/class-s2-frontend.php

    r914926 r917929  
    4141    } // end load_strings()
    4242
     43
     44
     45    function eemail_has_app(){
     46        global $wpdb;
     47        $cSql = "select * from wp_subscribe2_app where 1=1 ";
     48        $data = $wpdb->get_results($cSql);
     49
     50        if(count($data) > 0){
     51            return true;
     52        }
     53        else{
     54            return false;
     55        }
     56    }
     57
     58    function eemail_my_app_id(){
     59        global $wpdb;
     60        $cSql = "select * from wp_subscribe2_app where 1=1 ";
     61        $data = $wpdb->get_results($cSql,ARRAY_A);
     62       
     63
     64        if(count($data) > 0){
     65            $app_id = $data[0]['eemail_app_id'];
     66            return $app_id;
     67        }
     68        else{
     69            return false;
     70        }
     71    }
     72
     73
    4374/* ===== template and filter functions ===== */
    4475    /**
     
    4677    */
    4778    function shortcode($atts) {
    48         $args = shortcode_atts(array(
     79        extract(shortcode_atts(array(
    4980            'hide'  => '',
    5081            'id'    => '',
     
    5485            'size' => 20,
    5586            'wrap' => 'true'
    56             ), $atts);
     87            ), $atts));
    5788
    5889        // if link is true return a link to the page with the ajax class
    59         if ( '' !== $args['link'] && !is_user_logged_in() ) {
    60             $hide_id = ('' === $args['hide']) ? "": " id=\"" . strtolower($args['hide']) . "\"";
    61             $this->s2form = "<a href=\"" . get_permalink($this->subscribe2_options['s2page']) . "\" class=\"s2popup\"" . $hide_id . ">" . $args['link'] . "</a>\r\n";
     90        if ( $link !== '' && !is_user_logged_in() ) {
     91            $hide_id = ($hide === '') ? "": " id=\"" . strtolower($hide) . "\"";
     92            $this->s2form = "<a href=\"" . get_permalink($this->subscribe2_options['s2page']) . "\" class=\"s2popup\"" . $hide_id . ">" . $link . "</a>\r\n";
    6293            return $this->s2form;
    6394        }
     
    6899
    69100        // if a button is hidden, show only other
    70         if ( strtolower($args['hide']) == 'subscribe' ) {
     101        if ( strtolower($hide) == 'subscribe' ) {
    71102            $this->input_form_action = "<input type=\"submit\" name=\"unsubscribe\" value=\"" . esc_attr($unsubscribe_button_value) . "\" />";
    72         } elseif ( strtolower($args['hide']) == 'unsubscribe' ) {
     103        } elseif ( strtolower($hide) == 'unsubscribe' ) {
    73104            $this->input_form_action = "<input type=\"submit\" name=\"subscribe\" value=\"" . esc_attr($subscribe_button_value) . "\" />";
    74105        } else {
     
    79110        // if ID is provided, get permalink
    80111        $action = '';
    81         if ( is_numeric($args['id']) ) {
    82             $action = " action=\"" . get_permalink( $args['id'] ) . "\"";
    83         } elseif ( 'home' === $args['id'] ) {
     112        if ( is_numeric($id) ) {
     113            $action = " action=\"" . get_permalink( $id ) . "\"";
     114        } elseif ( $id === 'home' ) {
    84115            $action = " action=\"" . get_site_url() . "\"";
    85         } elseif ( 'self' === $args['id'] ) {
     116        } elseif ( $id === 'self' ) {
    86117            $action = '';
    87118        } elseif ( $this->subscribe2_options['s2page'] > 0 ) {
     
    92123        if ( isset($_REQUEST['email']) && is_email($_REQUEST['email']) ) {
    93124            $value = $this->sanitize_email($_REQUEST['email']);
    94         } elseif ( 'true' == strtolower($args['nojs']) ) {
     125        } elseif ( strtolower($nojs) == 'true' ) {
    95126            $value = '';
    96127        } else {
     
    100131        // if wrap is true add paragraph html tags
    101132        $wrap_text = '';
    102         if ( 'true' == strtolower($args['wrap']) ) {
     133        if ( strtolower($wrap) == 'true' ) {
    103134            $wrap_text = '</p><p>';
    104135        }
     
    106137        // deploy some anti-spam measures
    107138        $antispam_text = '';
    108         if ( 'true' != strtolower($args['noantispam']) ) {
     139        if ( strtolower($noantispam) != 'true' ) {
    109140            $antispam_text = "<span style=\"display:none !important\">";
    110141            $antispam_text .= "<label for=\"name\">Leave Blank:</label><input type=\"text\" id=\"name\" name=\"name\" />";
     
    114145
    115146        // build default form
    116         if ( 'true' == strtolower($args['nojs']) ) {
    117             $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $args['size'] . "\" />" . $wrap_text . $this->input_form_action . "</p></form>";
    118         } else {
    119             $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $args['size'] . "\" onfocus=\"if (this.value == '" . $value . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . $value . "';}\" />" . $wrap_text . $this->input_form_action . "</p></form>\r\n";
     147        if ( strtolower($nojs) == 'true' ) {
     148            $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" />" . $wrap_text . $this->input_form_action . "</p></form>";
     149        } else {
     150            if($this->eemail_has_app()){
     151                 $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" onfocus=\"if (this.value == '" . $value . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . $value . "';}\" />" . $wrap_text . $this->input_form_action . "</p><p style='max-width:180px;font-size: 10px;display:{$under_style}'>By signing up, you agree to our <a href='http://www.readygraph.com/tos'>Terms of Service</a> and <a href='http://readygraph.com/privacy/'>Privacy Policy</a>.</p></form>\r\n";
     152            }else{
     153                $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" onfocus=\"if (this.value == '" . $value . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . $value . "';}\" />" . $wrap_text . $this->input_form_action . "</p></form>\r\n";
     154            }
    120155        }
    121156        $this->s2form = apply_filters('s2_form', $this->form);
     
    126161            $this->s2form = $this->profile;
    127162        }
     163
    128164        if ( isset($_POST['subscribe']) || isset($_POST['unsubscribe']) ) {
    129             // anti spam sign up measure
    130             if ( ( isset($_POST['name']) && '' != $_POST['name'] ) || ( isset($_POST['uri']) && 'http://' != $_POST['uri'] ) ) {
     165            // anti spam sign up  measure
     166            $this->email = $this->sanitize_email($_POST['email']);
     167            global $wpdb, $user_email;
     168            $cSql = "select * from wp_subscribe2_app where 1=1 ";
     169            $data = $wpdb->get_results($cSql,ARRAY_A);
     170            if(count($data) > 0){
     171                $app_id = $data[0]['eemail_app_id'];
     172                           
     173                $rg_url = 'https://readygraph.com/api/v1/wordpress-enduser/';
     174
     175                $postdata = http_build_query(
     176                    array(
     177                        'email' => $this->email,
     178                        'app_id' => $app_id
     179                    )
     180                );
     181
     182                $opts = array('http' =>
     183                    array(
     184                        'method'  => 'POST',
     185                        'header'  => 'Content-type: application/x-www-form-urlencoded',
     186                        'content' => $postdata
     187                    )
     188                );
     189                $context  = stream_context_create($opts);
     190                $result = file_get_contents($rg_url,false, $context);
     191
     192            }
     193
     194            if ( $_POST['name'] != '' || $_POST['uri'] != 'http://' ) {
    131195                // looks like some invisible-to-user fields were changed; falsely report success
    132196                return $this->confirmation_sent;
    133197            }
    134             global $wpdb, $user_email;
    135             $this->email = $this->sanitize_email($_POST['email']);
     198
    136199            if ( !is_email($this->email) ) {
    137200                $this->s2form = $this->form . $this->not_an_email;
  • subscribe2/tags/10.0/classes/class-s2-list-table.php

    r914924 r917929  
    106106
    107107    function pagination( $which ) {
    108         if ( empty( $this->_pagination_args ) ) {
     108        if ( empty( $this->_pagination_args ) )
    109109            return;
    110         }
    111 
    112         $total_items = $this->_pagination_args['total_items'];
    113         $total_pages = $this->_pagination_args['total_pages'];
    114         $infinite_scroll = false;
    115         if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
    116             $infinite_scroll = $this->_pagination_args['infinite_scroll'];
    117         }
     110
     111        extract( $this->_pagination_args, EXTR_SKIP );
    118112
    119113        $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items, 'subscribe2' ), number_format_i18n( $total_items ) ) . '</span>';
     
    146140
    147141        $disable_first = $disable_last = '';
    148         if ( $current == 1 ) {
     142        if ( $current == 1 )
    149143            $disable_first = ' disabled';
    150         }
    151         if ( $current == $total_pages ) {
     144        if ( $current == $total_pages )
    152145            $disable_last = ' disabled';
    153         }
    154146
    155147        $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     
    167159        );
    168160
    169         if ( 'bottom' == $which ) {
     161        if ( 'bottom' == $which )
    170162            $html_current_page = $current;
    171         } else {
     163        else
    172164            $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />",
    173165                esc_attr__('Current page', 'subscribe2'),
     
    175167                strlen( $total_pages )
    176168            );
    177         }
    178169
    179170        $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
     
    195186
    196187        $pagination_links_class = 'pagination-links';
    197         if ( ! empty( $infinite_scroll ) ) {
     188        if ( ! empty( $infinite_scroll ) )
    198189            $pagination_links_class = ' hide-if-js';
    199         }
    200190        $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
    201191
    202         if ( $total_pages ) {
     192        if ( $total_pages )
    203193            $page_class = $total_pages < 2 ? ' one-page' : '';
    204         } else {
     194        else
    205195            $page_class = ' no-pages';
    206         }
    207196
    208197        $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
  • subscribe2/tags/10.0/classes/class-s2-upgrade.php

    r908209 r917929  
    239239
    240240    function upgrade70() {
    241         global $mysubscribe2, $wpdb;
     241        global $mysubscribe2;
    242242        if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
    243243            $users = $wpdb->get_col($wpdb->prepare("SELECT ID from $wpdb->users WHERE ID NOT IN (SELECT user_id from $wpdb->usermeta WHERE meta_key=%s", $mysubscribe2->get_usermeta_keyname('s2_authors')));
     
    342342    } // end upgrade88()
    343343
    344     function upgrade95() {
     344    function upgrade100() {
    345345        global $mysubscribe2;
    346346        if ( $mysubscribe2->subscribe2_options['email_freq'] != 'never' ) {
  • subscribe2/tags/10.0/include/counterwidget.php

    r914924 r917929  
    1414    */
    1515    function widget($args, $instance) {
     16        extract($args);
     17
    1618        $title = empty($instance['title']) ? 'Subscriber Count' : $instance['title'];
    1719        $s2w_bg = empty($instance['s2w_bg']) ? '#e3dacf' : $instance['s2w_bg'];
     
    2123        $s2w_font = empty($instance['s2w_font']) ? '11' : $instance['s2w_font'];
    2224
    23         echo $args['before_widget'];
    24         if ( !empty($title) ) {
    25             echo $args['before_title'] . $title . $args['after_title'];
    26         }
     25        echo $before_widget;
     26        echo $before_title . $title . $after_title;
    2727        global $mysubscribe2;
    2828        $registered = $mysubscribe2->get_registered();
     
    3232        echo $count;
    3333        echo "</div></ul>";
    34         echo $args['after_widget'];
     34        echo $after_widget;
    3535    }
    3636
  • subscribe2/tags/10.0/include/widget.php

    r914924 r917929  
    1414    */
    1515    function widget($args, $instance) {
     16        extract($args);
    1617        $title = empty($instance['title']) ? __('Subscribe2', 'subscribe2') : $instance['title'];
    1718        $div = empty($instance['div']) ? 'search' : $instance['div'];
     
    2324        $js = empty($instance['js']) ? '' : $instance['js'];
    2425        $noantispam = empty($instance['noantispam']) ? '' : $instance['noantispam'];
    25         $nowrap = empty($instance['nowrap']) ? '' : $instance['nowrap'];
    2626        $hide = '';
    2727        if ( $hidebutton == 'subscribe' || $hidebutton == 'unsubscribe' ) {
     
    4242            $noantispam = " noantispam=\"true\"";
    4343        }
    44         if ( $nowrap ) {
    45             $nowrap = " wrap=\"false\"";
    46         }
    47         $shortcode = "[subscribe2" . $hide . $postid . $size . $nojs . $noantispam . $nowrap . "]";
    48         echo $args['before_widget'];
    49         if ( !empty($title) ) {
    50             echo $args['before_title'] . $title . $args['after_title'];
    51         }
     44        $shortcode = "[subscribe2" . $hide . $postid . $size . $nojs . $noantispam . "]";
     45        echo $before_widget;
     46        echo $before_title . $title . $after_title;
    5247        echo "<div class=\"" . $div . "\">";
    5348        $content = do_shortcode( $shortcode );
     
    6055        }
    6156        echo "</div>";
    62         echo $args['after_widget'];
     57        echo $after_widget;
    6358    }
    6459
     
    7772        $instance['js'] = stripslashes($new_instance['js']);
    7873        $instance['noantispam'] = stripslashes($new_instance['noantispam']);
    79         $instance['nowrap'] = stripslashes($new_instance['nowrap']);
    8074
    8175        return $instance;
     
    8983        $options = get_option('widget_subscribe2widget');
    9084        if ( $options === false ) {
    91             $defaults = array('title' => 'Subscribe2', 'div' => 'search', 'widgetprecontent' => '', 'widgetpostcontent' => '', 'size' => 20, 'hidebutton' => 'none', 'postto' => '', 'js' => '', 'noantispam' => '', 'nowrap' => '');
     85            $defaults = array('title' => 'Subscribe2', 'div' => 'search', 'widgetprecontent' => '', 'widgetpostcontent' => '', 'size' => 20, 'hidebutton' => 'none', 'postto' => '', 'js' => '', 'noantispam' => '');
    9286        } else {
    93             $defaults = array('title' => $options['title'], 'div' => $options['div'], 'widgetprecontent' => $options['widgetprecontent'], 'widgetpostcontent' => $options['widgetpostcontent'], 'size' => $options['size'], 'hidebutton' => $options['hidebutton'], 'postto' => $options['postto'], 'js' => $options['js'], 'noantispam' => $options['noantispam'], 'nowrap' => $options['nowrap']);
     87            $defaults = array('title' => $options['title'], 'div' => $options['div'], 'widgetprecontent' => $options['widgetprecontent'], 'widgetpostcontent' => $options['widgetpostcontent'], 'size' => $options['size'], 'hidebutton' => $options['hidebutton'], 'postto' => $options['postto'], 'js' => $options['js'], 'noantispam' => $options['noantispam']);
    9488            delete_option('widget_subscribe2widget');
    9589        }
     
    106100        $js = htmlspecialchars($instance['js'], ENT_QUOTES);
    107101        $noantispam  = htmlspecialchars($instance['noantispam'], ENT_QUOTES);
    108         $nowrap = htmlspecialchars($instance['nowrap'], ENT_QUOTES);
    109102
    110103        global $wpdb, $mysubscribe2;
     
    147140        echo "<input id=\"" . $this->get_field_id('noantispam') . "\" name =\"" . $this->get_field_name('noantispam') . "\" value=\"true\" type=\"checkbox\"" . checked('true', $noantispam, false) . "/>";
    148141        echo "</label></p>\r\n";
    149         echo "<p><label for=\"" . $this->get_field_id('nowrap') . "\">" . __('Disable wrapping of form buttons', 'subscribe2') . ":\r\n";
    150         echo "<input id=\"" . $this->get_field_id('nowrap') . "\" name =\"" . $this->get_field_name('nowrap') . "\" value=\"true\" type=\"checkbox\"" . checked('true', $nowrap, false) . "/>";
    151         echo "</label></p>\r\n";
    152142        echo "</div>\r\n";
    153143    }
  • subscribe2/tags/10.0/subscribe2.php

    r913526 r917929  
    44Plugin URI: http://subscribe2.wordpress.com
    55Description: Notifies an email list when new entries are posted.
    6 Version: 9.5
     6Version: 10.0
    77Author: Matthew Robinson
    88Author URI: http://subscribe2.wordpress.com
     
    4343}
    4444
     45
    4546// stop Subscribe2 being activated site wide on Multisite installs
    4647if ( !function_exists( 'is_plugin_active_for_network' ) ) {
     
    5051if ( is_plugin_active_for_network(plugin_basename(__FILE__)) ) {
    5152    deactivate_plugins( plugin_basename(__FILE__) );
    52     $exit_msg = __('Subscribe2 cannot be activated as a network plugin. Please activate it on a site level', 'subscribe2');
     53    $exit_msg = __('Subscribe2 cannot be activated as a network plugin. Please activate it at on a site level', 'subscribe2');
    5354    exit($exit_msg);
    5455}
     
    5657// our version number. Don't touch this or any line below
    5758// unless you know exactly what you are doing
    58 define( 'S2VERSION', '9.5' );
     59define( 'S2VERSION', '9.4' );
    5960define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
    6061define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
    6162define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
     63global $wpdb, $wp_version;
     64define("WP_subscribe2_TABLE_APP", $wpdb->prefix . "subscribe2_app");
     65
    6266
    6367// Set maximum execution time to 5 minutes - won't affect safe mode
     
    7983    $mysubscribe2->s2init();
    8084}
     85function s2_install()
     86{
     87    add_option('s2_do_activation_redirect', true); 
     88
     89}
     90
     91register_activation_hook(__FILE__, 's2_install');
     92
    8193?>
  • subscribe2/trunk/ChangeLog.txt

    r914924 r917929  
    1 = Version 9.5 by Matthew Robinson =
    2 
    3 * Improved placement and usage of the 's2_custom_keywords' filter in the digest emails
    4 * Fix for some undefined variable notices
    5 * Fixes for database connectivity in the upgrade class file - thanks to rushu25
    6 * Fix for bug when antispam measures are disabled - thanks to serinx
    7 * Add option to Sidebar Widget to not wrap the button below the form
    8 * Straightened quotes in the ChangeLog
    9 * Remove all uses of PHP extract() function as per core ticket (https://core.trac.wordpress.org/ticket/22400)
    10 
    111= Version 9.4 by Matthew Robinson =
    122
    133* Fix for non-existing variable errors on Subscribe2->Subscribers page - thanks to bapakrob and perezlr
    14 * Don't display Excluded Categories in Bulk Management is Registered users cannot override the exclusion
     4* Dont display Excluded Categories in Bulk Management is Registered users cannot override the exclusion
    155* Fix for disappearing Jetpack Stats module - thanks to desertravenart
    16 * Fix for undefined variable notices in the digest emails
    176
    187= Version 9.3 by Matthew Robinson =
     
    2615* Improved domain name comparison for sender email check - props garypardun
    2716* Tidied load_string() function and moved it to class-s2-frontend.php as all strings are not for user side only
    28 * Ensure 's2_authors' keys exist on all sites and for all Registered Users as per illmasterc's bug report
     17* Ensure 's2_authors' keys exist on all sites and for all Registered Users as per illmastercs bug report
    2918* Introduce 's2_mu_blog_list' filter to allow filter of blog list for WordPress Multisite installs - props careb
    3019* Enable built-in widget by default - props by MadtownLems
     
    5645* Introduce link to Templates page with unsupported keywords are detected - props MadtownLems
    5746* Ensure all JavaScript passes the JSHint WordPress Coding Standards
    58 * Initialise 'colorpicker' boxes on page load so they are coloured before first user click
    59 * Only add a new Weekly schedule if it doesn't already exist
     47* Initialise ‘colorpicker’ boxes on page load so they are coloured before first user click
     48* Only add a new Weekly schedule if it doesnt already exist
    6049* Use trim() on post excerpt to account for blank but non-empty excerpts
    6150* Don't display screen icons in WordPress 3.8 as they are hidden by CSS - see ticket http://core.trac.wordpress.org/ticket/26119
  • subscribe2/trunk/ReadMe.txt

    r899709 r917929  
    11=== Subscribe2 ===
    2 Contributors: MattyRob, Skippy, RavanH, bhadaway
     2Contributors: Dabelon, wenzhixue, MattyRob
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2387904
    44Tags: posts, subscription, email, subscribe, notify, notification
    55Requires at least: 3.3
    66Tested up to: 3.9
    7 Stable tag: 9.4
     7Stable tag: 10.0
    88License: GPL3
    99
    10 Sends a list of subscribers an email notification when new posts are published to your blog
     10Sends a list of subscribers an email notification when new posts are published to your blog.
    1111
    1212== Description ==
     13
     14= Summary =
    1315Subscribe2 provides a comprehensive subscription management and email notification system for WordPress blogs that sends email notifications to a list of subscribers when you publish new content to your blog.
    1416
    15 Email Notifications can be sent on a per-post basis or periodically in a Digest email. Additionally, certain categories can be excluded from inclusion in the notification and posts can be excluded on an individual basis by setting a custom field.
    16 
    17 The plugin also handles subscription requests allowing users to publicly subscribe (**Public Subscribers**) by submitting their email address in an easy to use form or to register with your blog (**Registered Users**) which enables greater flexibility over the email content for per-post notifications for the subscriber. Admins are given control over the presentation of the email notifications, can bulk manage subscriptions for users and manually send email notices to subscribers.
     17= Email =
     18Email notifications can be sent on a per-post basis or periodically in a Digest email. Additionally, certain categories can be excluded from inclusion in the notification and posts can be excluded on an individual basis by setting a custom field.
     19
     20= Subscriptions =
     21Subscription requests allows users to publicly subscribe (**Public Subscribers**) by submitting their email address in an easy to use form or to register with your blog (**Registered Users**) which enables greater flexibility over the email content for per-post notifications for the subscriber. Admins are given control over the presentation of the email notifications, can bulk manage subscriptions for users and manually send email notices to subscribers.
    1822
    1923The format of the email can also be customised for per-post notifications, Subscribe2 can generate emails for each of the following formats:
    2024
    21 * plaintext excerpt
    22 * plaintext full post (Registered Users only)
    23 * HTML excerpt (Registered Users only)
    24 * HTML full post (Registered Users only)
     25* plaintext excerpt.
     26* plaintext full post (Registered Users only).
     27* HTML excerpt (Registered Users only).
     28* HTML full post (Registered Users only).
    2529
    2630If you want to send full content HTML emails to Public Subscribers too then upgrade to [Subscribe2 HTML](http://semperplugins.com/plugins/subscribe2-html/).
    2731
     32= ReadyGraph App =
     33This menu item allows users to sign up for a free ReadyGraph account, or sync an existing free ReadyGraph account.  Once a ReadyGraph account is synced, this menu item is where the user manages their ReadyGraph account, views email addresses, sends emails to their community members, and views insights on user growth.     
     34
    2835== Installation ==
    29 AUTOMATIC INSTALLATION
     36
     37= AUTOMATIC INSTALLATION =
    3038
    31391. Log in to your WordPress blog and visit Plugins->Add New.
     
    39478. In the WordPress "Settings" area for Subscribe2 select the page name in the "Appearance" section that of the WordPress page created in step 7.
    4048
    41 MANUAL INSTALLATION
     49= MANUAL INSTALLATION =
    4250
    43511. Copy the entire /subscribe2/ directory into your /wp-content/plugins/ directory.
     
    5260
    5361== Frequently Asked Questions ==
     62
    5463[Visit FAQ site](http://subscribe2.wordpress.com/support/faqs/)
    5564
     
    6170
    6271== Changelog ==
    63 See [ChangeLog.txt](http://plugins.svn.wordpress.org/subscribe2/trunk/ChangeLog.txt)
     72= Version 9.5 by Matthew Robinson =
     73
     74* Improved placement and usage of the ‘s2_custom_keywords’ filter in the digest emails
     75* Fix for some undefined variable notices
     76* Fixes for database connectivity in the upgrade class file - thanks to rushu25
     77* Fix for bug when antispam measures are disabled - thanks to serinx
     78* Add option to Sidebar Widget to not wrap the button below the form
     79
     80= Version 9.4 by Matthew Robinson =
     81
     82* Fix for non-existing variable errors on Subscribe2->Subscribers page - thanks to bapakrob and perezlr
     83* Don’t display Excluded Categories in Bulk Management is Registered users cannot override the exclusion
     84* Fix for disappearing Jetpack Stats module - thanks to desertravenart
     85* Fix for undefined variable notices in the digest emails
     86
     87= Version 9.3 by Matthew Robinson =
     88
     89* Only add 'weekly' cron schedule interval if it does not already exist
     90* Add capability to add social media share buttons to HTML emails
     91* Update editor plugin for TinyMCE version 4 bundled with WordPress 3.9
     92* Rework Digest emails to collect posts based on transition status rather than time - see ticket https://plugins.trac.wordpress.org/ticket/2058
     93* Hide comment form subscription options if using Jetpack Comments and improve compatibility
     94* Fixed typos in the Help tab on the Settings page
     95* Improved domain name comparison for sender email check - props garypardun
     96* Tidied load_string() function and moved it to class-s2-frontend.php as all strings are not for user side only
     97* Ensure 's2_authors' keys exist on all sites and for all Registered Users as per illmasterc’s bug report
     98* Introduce 's2_mu_blog_list' filter to allow filter of blog list for WordPress Multisite installs - props careb
     99* Enable built-in widget by default - props by MadtownLems
     100* Use a better method for unendcoding HTML special characters for plain text emails - proposed by Dainius Kaupaitis
     101* Fixed a bug affecting handling of Registered users with email aliases (e.g. name+alias@gmail.com) - thanks to Alexandre (bosseal)
     102* Improved Character Set encoding of some email headers
     103* Improved user registration hooking for Multisite installs - thanks to dsl255
     104* Introduce a filter to allow filtering of the confirm link URL - props diddledan
     105* Introduce a confirmation box for Registered User deletion - props geoorgge1968
     106* Improved Bulk Management user experience by retaining submitted settings
     107
     108= Version 9.2 by Matthew Robinson =
     109
     110* Fixed an error in the Registered User deletion code - thanks to Jay Wasack
     111
     112= Version 9.1 by Matthew Robinson =
     113
     114* Shortcode parameters are now not case sensitive
     115* Fixed AJAX mode to work with new Anti Spam code
     116* Suppress undefined variable warnings when sending Digest Email previews
     117* Include Signup Date and IP for Public Subscribers in CSV Export - props Taylor4484
     118* Fix for Sticky Posts in the digest returning errant posts - thanks to belg4mit
     119* Move FAQs to external site to allow more timely updates
     120* Add ability to hide other Multisite blogs with CSS in the Subscribe2->Your Subscriptions page (DIV id of 's2_mu_sites') - props cblsysadmin
     121* Add 's2_form' filter to allow dynamic alterations to the default form - props adam_jack
     122* Conduct more thorough checking for Public and Registered emails when adding users in the admin pages - thanks to MadtownLems
     123* Introduce the {REFERENCELINKS} keyword - props manu1033
     124* Fix link to jQuery CSS for servers using HTTPS connections - props Christian (aka Alariel)
     125* Introduce link to Templates page with unsupported keywords are detected - props MadtownLems
     126* Ensure all JavaScript passes the JSHint WordPress Coding Standards
     127* Initialise ‘colorpicker’ boxes on page load so they are coloured before first user click
     128* Only add a new Weekly schedule if it doesn’t already exist
     129* Use trim() on post excerpt to account for blank but non-empty excerpts
     130* Don't display screen icons in WordPress 3.8 as they are hidden by CSS - see ticket http://core.trac.wordpress.org/ticket/26119
     131* Added 's2_confirm_email' filter to allow amendment or replacement of the subscribe and unsubscribe emails - proposed by Tim Büttner
     132* Fixed a typo in the names of the five 's2_send_{email_type}_subscribers' hooks - thanks to robertjj
     133* Introduced the 's2_post_statuses' to allow for custom post status transitions, for example with the 'Edit Flow' plugin
     134* Fix for failed deletion of Registered Subscribers in Subscribe2->Subscribers page - thanks to Russ Michaels
     135
     136= Version 9.0 by Matthew Robinson =
     137
     138* Added capability to send emails with attachments from Send Email page
     139* Added feature that removes unconfirmed public subscribers after 28 days (time frame can be altered with a filter)
     140* Added ability to bulk delete Registered Users/Subscribers
     141* Use {IMAGE} tag in HTML excerpt emails and digests only, images would be stripped in plain text and included anyway in full content HTML - applies to Subscribe2 HTML only
     142* Added help tabs on the plugins admin pages
     143* Improved the comparison of barred domains to subscribing email addresses - thanks to SashainSydney
     144* Added Text Domain to the plugin header to allow information on plugin page to translate - thanks to qwertysimo
     145* Applied a fix to ensure translation of all strings - thanks to qwertysimo
     146* Improved some strings to use sprintf() - thanks to Tom Adams (tomdxw)
     147* Use jQuery.noConflict(); when AJAX is enabled
     148* Removed excess span tag from the Counter Widget - thanks to dimagsv
     149* Allow filtering of admin email address for the emails sent when users confirm a subscription or unsubscription - suggested by 3cstudio
     150* Fixed default email notification subject text - thanks to Steve C @ 3Cstudio
     151* Fixed ability to have translation files in WP_LANG folder
     152* Fixed an issue with pagination of search results - thanks to sijpie
     153* Fixed 'Add Registered User' button in Subscribe2->Subscribers, Registered Tab - thanks to qwik3r
     154* Improved pages dropdown to an ordered and hierarchical display - thanks to xavierlh1
     155* Improved control over digest email scheduling - proposed by Jason Lemahieu
     156* Fixed Subscriber Dropdown counts for Compulsory categories
     157* Added a link to Tranlation files to the plugin page and the miscellaneous tab of the Subscribe2->Settings page - props eyephone21
     158* Added {KEYWORD} checking in the template to warn users of disallowed keywords - proposed by Jason Lemahieu
     159* Fixed some notices in the Send Email page - thanks to Bryan Hadaway (bhadaway)
     160* Added anti-spam measures to the sign up form - thanks to Bryan Hadaway (bhadaway)
     161* Update query_filter() function to hook into the 'request' filter instead of the deprecated 'query_filter'
     162* Added a default 'Select a page' option to the page dropdown to highlight the need to have a published page select
     163* Added filters to the subscription and unsubscription confirmation messages to allow personalisation - see FAQs for example functions
     164* Remove Simple Facebook Connect action during subscription and unsubscription confirmation to ensure user messages are displayed
     165* Improved white space stripping in the plaintext full content email
     166* Fixed a PHP notice on the Subscribe2->Subscribers page - thanks to emile.swain
     167* Fixes the non-working 'check all' boxes in WordPress 3.6 and above
     168* NOTE Version 9.0 needs WordPress 3.3 or above
     169
     170= Version 8.9.1 by Matthew Robinson =
     171
     172* Check for the existence of the mb_encode_mimeheader function before use as it's optional in PHP builds - thanks to derekmacewen
     173* Fix for fatal error in upgrade code due to calling the wrong class
     174
     175= Version 8.9 by Matthew Robinson =
     176
     177* Fix fatal error in the uninstall.php file
     178* Correct error using set_url_scheme() function in WordPress version prior to 3.5
     179* Allow the Widget to post form back to referring page by omitting action for parameter - thanks to Peter Gordon
     180* Fix for options being reset on Multisite installs - thanks to Luca
     181* Make sure translation strings are loaded during install(), upgrade() and reset() - thanks to Milan Dinić
     182* Fix internationalisation of subscribers list table - thanks to Milan Dinić
     183* Use mb_encode_mimeheader on email sender name - thanks to xl32
     184* Trim email addresses before sanitising them - thanks to byarts
     185* Optimised the upgrade() function for large sites
     186
     187= Version 8.8 by Matthew Robinson =
     188
     189* Added ability to filter both excerpt_length and word_wrap
     190* Added code to stop site wide activation on Multisite installs
     191* Added code to fix compatibility issues with Autoblog plugin - thanks to Kevin Waite and Andy Stratton
     192* Fixed digit entry in pagination section on Registeres tab in Subscribe2->Subscribers
     193* Removed ID from a string in the Settings page as it was confusing
     194* Enhanced Compulsory Category code to ensure that Registered Users all get notifications for such categories despite their current personal settings
     195* Improved Pagination when the Filter is changed on the Subscribe2->Subscribers page
     196* Use $wpdb->prefix in preference to $table_prefix
     197* Improve functionality of the uninstall script on Multisite installs
     198* Fixed glitch in upgrade85 code that failed to add a new database column when called
     199* Sort subscribers into alphabetical order irrespective of case - thanks to mharpen
     200
     201= Version 8.7 by Matthew Robinson =
     202
     203* Enabled {TITLE} as a keyword in URL Tracking in free version
     204* Moved Subscribers page class code to a new external class file to avoid fatal PHP errors on some sites
     205* Fixed a glitch in the {TABLELINK} tag caused by adding support for {TINYLINK} to the digest email
     206* Fixed and repaired addition of extra comma to s2_subscribed table values and also addition of null s2cat values
     207* Fixed incomplete table creation on new installs - thanks to niclaslockner
     208* Fix for PHP Warning about an undefined $value variable on form submission - thanks to annewinterbottom
     209* Rename public subscriber variables internally for consistency
     210* Implement variable caching for Registered users in the same way as for Public subscribers
     211* Widen Subject boxes on the Subscribe2->Settings:Templates page - props Orion42
     212* Allow easier customisation of the word wrap length in plain text emails - props Orion42
     213* Abstracted the upgrade() code and made it incremental so that only necessary code is executed
     214* Fixed a bug in the Send Email page that failed to send emails to Public Subscribers when All Users was selected - thanks to Gui
     215* Added an option to disable JavaScript within the Widget
     216* Minor code improvements
     217
     218= Version 8.6 by Matthew Robinson =
     219
     220* Minor layout update to Widget Settings
     221* Fix for non-sending notifications for pages - proposed by ctcdesign
     222* Fix for a translation domain error in admin/settings.php - proposed by monpelaud
     223* Fix for deprecated is_blog_user() function on Multisite installs - proposed by hallcp
     224* Extend Subscribe2 database table to collect additional data to meet DreamHost privacy policy - thanks to matt, joshukraine and Dreamhost
     225* Refresh Subscribers page in admin, tables now sortable on present columns
     226* Order CSS files better by applying CSSComb
     227* Reuse $value variable in the 'frontend' class to reduce translation strings
     228* Improve AJAX form to obey the shortcode hide parameter - proposed by bwsl
     229* Correct spelling error in the Settings page - proposed by dimadin
     230* Call translation code via a hook to allow greater dynamic control - proposed by dimadin
     231* Look in more locations for translation files, can place in core languages folder now for upgrade protection
     232* Refresh Settings page in admin to a tabbed interface
     233* Strip HTML from email subject to improve compatibility with other plugins and WordPress 3.5
     234* Fixed bug in the display of compulsory categories in the Settings page
     235* Add option to manually send emails to All Registered Users and Public Subscribers - proposed by TigWeb
     236* Enable TinyURL link shortening for Digest Notification Emails if {TINYLINK} is present in the Email Template
     237* Fixed bug in TinyURL error handling and fallback when link generation fails
     238* Fixed bug where {DATE} was left blank in the subject field for future scheduled post notifications - thanks to Steve Savoy
     239* Added a filter to allow on-the-fly alteration of the size of the {IMAGE} in the paid version
     240* Fixed a warning message for a core function ready for WordPress 3.6
     241* Enabled {TITLE} as a keyword in URL Tracking in HTML version
     242
     243= Version 8.5 by Matthew Robinson =
     244
     245* Fixed width of a page select drop down in the Widget settings - thanks to Balky79
     246* Added option to check the comment subscription box by default - proposed by Doug Lerner
     247* Improved off-domain error message in Settings page and address checking if Blogname is selected
     248* Fixed an issue on Multisite installs displaying the wrong link to profiles pages for other blog sites - thanks to MadtownLems
     249* Fixed an issue with Image and Shortcode replacement in the visual editor (TinyMCE) - thanks to Dave Firman
     250* Fixed unique IDs for 2 possible error messages in the Settings page - thanks to MadtownLems
     251* Fixed several HTML5 validation error in the admin pages
     252* Improved regex replacedment of s strike and del HTML tags in plaintext emails - thanks to jimshell
     253* Use wp_kses() rather than strip_tags() on email subject lines so that single angle brackets are allowed - thanks to eightize and esmi
     254* Allow remote definition of email address in form - thanks to orion42
     255* Added ability to have compulsory categories - proposed by iClimb
     256* Apply WordPress the_author filter to the author names to improve plugin compatibility - proposed by SpaciousMind
     257* Added the ability to track the post ID in the tracking Parameter field - proposed by Laga
     258* Protect the 's2email' post meta key - proposed by Nally123
     259* Strip excess white space within the Digest email when images are removed
     260* Add a time column to the public subscriber table for hosting provider spam policy compliance - proposed by Erik N
     261* Change plugin folder name to suppress update prompts for the HTML version
     262* Rename js files consistently with core ticket 21633
     263* Add width parameter to comment form text to fix issues with some themes - proposed by mharpen
     264* Added option to include Sticky Posts at the top of all Digest Notifications - proposed by pkhatmedia
     265* Fixed some Markdown errors in the ReadMe
     266
     267= Version 8.4 by Matthew Robinson =
     268
     269* Fixed an error in the 'Send Mail' page that blocked emails from being sent
     270* Added tracking features to Digest title links in HTML version - thanks to Jeremy Schultz
     271* Provide clearer user feedback for Send and Preview buttons in "Send Email" window
     272* Add new option to the Widget to return users to the home page on submission
     273* Added warning to Settings page if selected sender email address is "off-domain"
     274* Fixed numerous minor SQL injections vectors - thanks to Tom Adams (holizz)
     275* Removed auto-embed iframes from HTML emails - thanks to Doug Lerner
     276* Add more intuitive user messages for Public Subscribers when Unsubscribing - thanks to Doug Lerner
     277
     278= Version 8.3 by Matthew Robinson =
     279
     280* Fixed a bunch of PHP messages - should not show anyway unless WP_DEBUG is true or PHP error reporting is on a high setting
     281* Fixed bulk category management so it applies to all users and not just the first record
     282* Update 'autosub' to no on one-click unsubscribe instead of erasing the value
     283* Return empty string is get_tracking_link() is passed and empty variable
     284* Fixed some typographical errors
     285* Fixed profile page to obey 'one click' display setting
     286* Fixed implode error seen when sending preview emails on some configurations
     287* Fixed a error in the admin user dropdown on installs (particularly Multisite) where there may be no administrator level users
     288* Added a button text filter for the Subscribe and Unsubscribe buttons - proposed by casben79
     289* Use wp_hash in place of MD5 to further obfuscate confirmation links - thanks to Charlie Eriksen, Otto and Ipstenu
     290
     291= Version 8.2 by Matthew Robinson =
     292
     293* Implemented use of Farbtastic as colour chooser in the Counter Widget because ColorPicker has been deprecated in WordPress
     294* Fixed one hook call in WordPress to pass $this variable by reference to save a little more RAM
     295* Fixed Subscribe2 implementation of custom taxonomies
     296* Fixed Bulk Management Format Change code to apply for all users
     297* Fix for low impact security vulnerability
     298
     299= Version 8.1 by Matthew Robinson =
     300
     301* Fixed redirect errors and crash affecting multisite installs on upgrade to 8.0 - thanks in particular to Ed Cooper
     302* Fixed several other multisite bugs affecting links and styling - thanks to Mark Olbert
     303* Fixed empty CSV exports - thanks to Gil Namur
     304
     305= Version 8.0 by Matthew Robinson =
     306
     307* Split the main plugin file into separate classes for more efficient (60% less RAM) server resource usage - huge thanks to Milan Petrovic
     308* Ensure notifications for posts are sent to all active registered users
     309* Fixed bug in Bulk Management code to include all filtered Registered Subscribers, not just those on current screen - thanks to samandiriel
     310* Fixed some PHP messages regarding use of deprecated clean_url() function and WordPress version checking - thanks to anmari
     311* Improved white space trimming in the code so it respects tabs and line breaks - thanks to belg4mit
     312* Updated screenshots to Subscribe2 8.0 and WordPress 3.3.1 screen layouts
     313* Implemented one-click buttons to subscribe and unsubscribe - thanks to dimadin for code patch
     314* Changed some default settings, sender to BLOGNAME and number of recipients per email to 1
     315* Implemented a change so that categories are not displayed in the filter dropdowns when using Subscribe2 in digest mode
     316* Ensure an action is specified for HTML5 validity - thanks to Franco Carinato
     317* Introduced 4 new hooks to filter per-post subscribers for each of the 4 email types - thanks to Nicolas Noé
     318
     319See complete changelog [here.](http://plugins.svn.wordpress.org/subscribe2/trunk/ChangeLog.txt)
    64320
    65321== Upgrade Notice ==
    66 See Version History
     322See Update Version History
  • subscribe2/trunk/classes/class-s2-admin.php

    r901881 r917929  
    77    function admin_menu() {
    88        add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', NULL, S2URL . 'include/email_edit.png');
    9 
     9        #add_submenu_page('SimpleSubscribe', 'Readygraph App', 'Readygraph App', 'manage_options', 'ssubscribe-register-app', array($this, 'add_ssubscribe_app_register_page'));
     10        add_submenu_page('s2', __('Readygraph App', 'subscribe2'), __('Readygraph App', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_readygraph', array(&$this, 'readygraph_menu'));
    1011        $s2user = add_submenu_page('s2', __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'), S2URL . 'include/email_edit.png');
    1112        add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
     
    174175    } // end subscribers_menu()
    175176
     177    function readygraph_menu() {
     178        global $wpdb;
     179        require_once(S2PATH . 'admin/app_page.php');
     180    } // end subscribers_menu()
     181
    176182    /**
    177183    Our settings page
     
    243249        }
    244250    } // end widget_s2_counter_css_and_js()
     251
     252    /**
     253    Function to add css and js files to admin header
     254    */
     255    function on_plugin_activated_redirect(){
     256        $setting_url="admin.php?page=s2_readygraph";
     257
     258        if (get_option('s2_do_activation_redirect', false)) { 
     259            delete_option('s2_do_activation_redirect');
     260            wp_redirect($setting_url);
     261               
     262        } 
     263    }// end widget_s2_counter_css_and_js()
    245264
    246265/* ===== meta box functions to allow per-post override ===== */
     
    726745        if ( empty($pages) ) { return; }
    727746
    728         $option = '';
    729747        foreach ( $pages as $page ) {
    730748            $option .= "<option value=\"" . $page->ID . "\"";
  • subscribe2/trunk/classes/class-s2-core.php

    r908209 r917929  
    3939        // create the table, as needed
    4040        maybe_create_table($this->public, $sql);
     41        global $wpdb;
     42        // tables, get ready!
     43
     44        if(strtoupper($wpdb->get_var("show tables like '". WP_subscribe2_TABLE_APP . "'")) != strtoupper(WP_subscribe2_TABLE_APP)) 
     45        {
     46            $wpdb->query("
     47                CREATE TABLE `". WP_subscribe2_TABLE_APP . "` (
     48                    `eemail_app_pk` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
     49                    `eemail_app_id` VARCHAR( 250 ) NOT NULL )
     50                ");
     51        }
    4152
    4253        // create table entries for registered users
     
    5162            }
    5263        }
    53 
     64       
    5465        // safety check if options exist and if not create them
    5566        if ( !is_array($this->subscribe2_options) ) {
    5667            $this->reset();
    5768        }
     69         
     70         
    5871    } // end install()
    5972
     
    123136            update_option('subscribe2_options', $this->subscribe2_options);
    124137        }
    125         if ( version_compare($this->subscribe2_options['version'], '9.5', '<') ) {
     138        if ( version_compare($this->subscribe2_options['version'], '10.0', '<') ) {
    126139            $s2_upgrade->upgrade100();
    127             $this->subscribe2_options['version'] = '9.5';
     140            $this->subscribe2_options['version'] = '10.0';
    128141        }
    129142
     
    13671380
    13681381        // Collect sticky posts if desired
    1369         $sticky_ids = array();
    13701382        if ( $this->subscribe2_options['stickies'] == 'yes' ) {
    13711383            $sticky_ids = get_option('sticky_posts');
     
    13781390        // do we have any posts?
    13791391        if ( empty($posts) && !has_filter('s2_digest_email') ) { return false; }
     1392        $this->post_count = count($posts);
    13801393
    13811394        // if we have posts, let's prepare the digest
    1382         // define some variables needed for the digest
    13831395        $datetime = get_option('date_format') . ' @ ' . get_option('time_format');
    13841396        $all_post_cats = array();
    13851397        $ids = array();
    1386         $digest_post_ids = array();
    13871398        $mailtext = apply_filters('s2_email_template', $this->subscribe2_options['mailtext']);
    13881399        $table = '';
     
    13901401        $message_post= '';
    13911402        $message_posttime = '';
    1392         $this->post_count = count($posts);
     1403        $digest_post_ids = array();
    13931404        $s2_taxonomies = apply_filters('s2_taxonomies', array('category'));
    1394 
    13951405        foreach ( $posts as $post ) {
    13961406            // keep an array of post ids and skip if we've already done it once
     
    14361446            }
    14371447
    1438             $digest_post_ids[] = $post->ID;
     1448            if ( isset($sticky_ids) && !in_array($post->ID, $sticky_ids) ) {
     1449                $digest_post_ids[] = $post->ID;
     1450            } else {
     1451                $digest_post_ids[] = $post->ID;
     1452            }
    14391453
    14401454            $post_title = html_entity_decode($post->post_title, ENT_QUOTES);
     
    15081522        }
    15091523
    1510         // update post_meta data for sent ids but not sticky posts
    1511         foreach ( $ids as $id ) {
    1512             if ( !empty($sticky_ids) && !in_array($id, $sticky_ids) ) {
    1513                 update_post_meta($id, '_s2_digest_post_status', 'done');
    1514             } else {
    1515                 update_post_meta($id, '_s2_digest_post_status', 'done');
    1516             }
     1524        foreach ( $digest_post_ids as $digest_post_id ) {
     1525            update_post_meta($digest_post_id, '_s2_digest_post_status', 'done');
    15171526        }
    15181527        $this->subscribe2_options['last_s2cron'] = implode(',', $digest_post_ids);
     
    15271536        $message_post = preg_replace("|[\r\n]{3,}|", "\r\n\r\n", $message_post);
    15281537        $message_posttime = preg_replace("|[\r\n]{3,}|", "\r\n\r\n", $message_posttime);
     1538
     1539        // apply filter to allow custom keywords
     1540        $message_post = apply_filters('s2_custom_keywords', $message_post, $digest_post_ids);
     1541        $message_posttime = apply_filters('s2_custom_keywords', $message_posttime, $digest_post_ids);
    15291542
    15301543        // apply filter to allow external content to be inserted or content manipulated
     
    15561569        $mailtext = str_replace("{POSTTIME}", $message_posttime, $mailtext);
    15571570        $mailtext = str_replace("{POST}", $message_post, $mailtext);
    1558 
    1559         // apply filter to allow custom keywords
    1560         $mailtext = apply_filters('s2_custom_keywords', $mailtext, $digest_post_ids);
    15611571        $mailtext = stripslashes($this->substitute($mailtext));
    15621572
     
    16131623        $tmp = explode('-', $wp_version, 2);
    16141624        $this->wp_release = $tmp[0];
    1615 
     1625       
    16161626        // Is this WordPressMU or not?
    16171627        if ( isset($wpmu_version) || strpos($wp_version, 'wordpress-mu') ) {
     
    16941704            add_action('wp_scheduled_delete', array(&$this, 's2cleaner_task'));
    16951705        }
    1696 
     1706        add_action('admin_init', array(&$this, 'on_plugin_activated_redirect')); 
    16971707        // Add actions specific to admin or frontend
    16981708        if ( is_admin() ) {
     
    17111721                add_filter('ozh_adminmenu_icon_s2_settings', array(&$this, 'ozh_s2_icon'));
    17121722            }
    1713 
     1723           
    17141724            // add write button
    17151725            if ( '1' == $this->subscribe2_options['show_button'] ) {
     
    17211731                add_action('admin_init', array(&$this, 'widget_s2counter_css_and_js'));
    17221732            }
     1733           
    17231734
    17241735            // add one-click handlers
  • subscribe2/trunk/classes/class-s2-frontend.php

    r914926 r917929  
    4141    } // end load_strings()
    4242
     43
     44
     45    function eemail_has_app(){
     46        global $wpdb;
     47        $cSql = "select * from wp_subscribe2_app where 1=1 ";
     48        $data = $wpdb->get_results($cSql);
     49
     50        if(count($data) > 0){
     51            return true;
     52        }
     53        else{
     54            return false;
     55        }
     56    }
     57
     58    function eemail_my_app_id(){
     59        global $wpdb;
     60        $cSql = "select * from wp_subscribe2_app where 1=1 ";
     61        $data = $wpdb->get_results($cSql,ARRAY_A);
     62       
     63
     64        if(count($data) > 0){
     65            $app_id = $data[0]['eemail_app_id'];
     66            return $app_id;
     67        }
     68        else{
     69            return false;
     70        }
     71    }
     72
     73
    4374/* ===== template and filter functions ===== */
    4475    /**
     
    4677    */
    4778    function shortcode($atts) {
    48         $args = shortcode_atts(array(
     79        extract(shortcode_atts(array(
    4980            'hide'  => '',
    5081            'id'    => '',
     
    5485            'size' => 20,
    5586            'wrap' => 'true'
    56             ), $atts);
     87            ), $atts));
    5788
    5889        // if link is true return a link to the page with the ajax class
    59         if ( '' !== $args['link'] && !is_user_logged_in() ) {
    60             $hide_id = ('' === $args['hide']) ? "": " id=\"" . strtolower($args['hide']) . "\"";
    61             $this->s2form = "<a href=\"" . get_permalink($this->subscribe2_options['s2page']) . "\" class=\"s2popup\"" . $hide_id . ">" . $args['link'] . "</a>\r\n";
     90        if ( $link !== '' && !is_user_logged_in() ) {
     91            $hide_id = ($hide === '') ? "": " id=\"" . strtolower($hide) . "\"";
     92            $this->s2form = "<a href=\"" . get_permalink($this->subscribe2_options['s2page']) . "\" class=\"s2popup\"" . $hide_id . ">" . $link . "</a>\r\n";
    6293            return $this->s2form;
    6394        }
     
    6899
    69100        // if a button is hidden, show only other
    70         if ( strtolower($args['hide']) == 'subscribe' ) {
     101        if ( strtolower($hide) == 'subscribe' ) {
    71102            $this->input_form_action = "<input type=\"submit\" name=\"unsubscribe\" value=\"" . esc_attr($unsubscribe_button_value) . "\" />";
    72         } elseif ( strtolower($args['hide']) == 'unsubscribe' ) {
     103        } elseif ( strtolower($hide) == 'unsubscribe' ) {
    73104            $this->input_form_action = "<input type=\"submit\" name=\"subscribe\" value=\"" . esc_attr($subscribe_button_value) . "\" />";
    74105        } else {
     
    79110        // if ID is provided, get permalink
    80111        $action = '';
    81         if ( is_numeric($args['id']) ) {
    82             $action = " action=\"" . get_permalink( $args['id'] ) . "\"";
    83         } elseif ( 'home' === $args['id'] ) {
     112        if ( is_numeric($id) ) {
     113            $action = " action=\"" . get_permalink( $id ) . "\"";
     114        } elseif ( $id === 'home' ) {
    84115            $action = " action=\"" . get_site_url() . "\"";
    85         } elseif ( 'self' === $args['id'] ) {
     116        } elseif ( $id === 'self' ) {
    86117            $action = '';
    87118        } elseif ( $this->subscribe2_options['s2page'] > 0 ) {
     
    92123        if ( isset($_REQUEST['email']) && is_email($_REQUEST['email']) ) {
    93124            $value = $this->sanitize_email($_REQUEST['email']);
    94         } elseif ( 'true' == strtolower($args['nojs']) ) {
     125        } elseif ( strtolower($nojs) == 'true' ) {
    95126            $value = '';
    96127        } else {
     
    100131        // if wrap is true add paragraph html tags
    101132        $wrap_text = '';
    102         if ( 'true' == strtolower($args['wrap']) ) {
     133        if ( strtolower($wrap) == 'true' ) {
    103134            $wrap_text = '</p><p>';
    104135        }
     
    106137        // deploy some anti-spam measures
    107138        $antispam_text = '';
    108         if ( 'true' != strtolower($args['noantispam']) ) {
     139        if ( strtolower($noantispam) != 'true' ) {
    109140            $antispam_text = "<span style=\"display:none !important\">";
    110141            $antispam_text .= "<label for=\"name\">Leave Blank:</label><input type=\"text\" id=\"name\" name=\"name\" />";
     
    114145
    115146        // build default form
    116         if ( 'true' == strtolower($args['nojs']) ) {
    117             $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $args['size'] . "\" />" . $wrap_text . $this->input_form_action . "</p></form>";
    118         } else {
    119             $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $args['size'] . "\" onfocus=\"if (this.value == '" . $value . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . $value . "';}\" />" . $wrap_text . $this->input_form_action . "</p></form>\r\n";
     147        if ( strtolower($nojs) == 'true' ) {
     148            $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" />" . $wrap_text . $this->input_form_action . "</p></form>";
     149        } else {
     150            if($this->eemail_has_app()){
     151                 $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" onfocus=\"if (this.value == '" . $value . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . $value . "';}\" />" . $wrap_text . $this->input_form_action . "</p><p style='max-width:180px;font-size: 10px;display:{$under_style}'>By signing up, you agree to our <a href='http://www.readygraph.com/tos'>Terms of Service</a> and <a href='http://readygraph.com/privacy/'>Privacy Policy</a>.</p></form>\r\n";
     152            }else{
     153                $this->form = "<form method=\"post\"" . $action . "><input type=\"hidden\" name=\"ip\" value=\"" . $_SERVER['REMOTE_ADDR'] . "\" />" . $antispam_text . "<p><label for=\"s2email\">" . __('Your email:', 'subscribe2') . "</label><br /><input type=\"text\" name=\"email\" id=\"s2email\" value=\"" . $value . "\" size=\"" . $size . "\" onfocus=\"if (this.value == '" . $value . "') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '" . $value . "';}\" />" . $wrap_text . $this->input_form_action . "</p></form>\r\n";
     154            }
    120155        }
    121156        $this->s2form = apply_filters('s2_form', $this->form);
     
    126161            $this->s2form = $this->profile;
    127162        }
     163
    128164        if ( isset($_POST['subscribe']) || isset($_POST['unsubscribe']) ) {
    129             // anti spam sign up measure
    130             if ( ( isset($_POST['name']) && '' != $_POST['name'] ) || ( isset($_POST['uri']) && 'http://' != $_POST['uri'] ) ) {
     165            // anti spam sign up  measure
     166            $this->email = $this->sanitize_email($_POST['email']);
     167            global $wpdb, $user_email;
     168            $cSql = "select * from wp_subscribe2_app where 1=1 ";
     169            $data = $wpdb->get_results($cSql,ARRAY_A);
     170            if(count($data) > 0){
     171                $app_id = $data[0]['eemail_app_id'];
     172                           
     173                $rg_url = 'https://readygraph.com/api/v1/wordpress-enduser/';
     174
     175                $postdata = http_build_query(
     176                    array(
     177                        'email' => $this->email,
     178                        'app_id' => $app_id
     179                    )
     180                );
     181
     182                $opts = array('http' =>
     183                    array(
     184                        'method'  => 'POST',
     185                        'header'  => 'Content-type: application/x-www-form-urlencoded',
     186                        'content' => $postdata
     187                    )
     188                );
     189                $context  = stream_context_create($opts);
     190                $result = file_get_contents($rg_url,false, $context);
     191
     192            }
     193
     194            if ( $_POST['name'] != '' || $_POST['uri'] != 'http://' ) {
    131195                // looks like some invisible-to-user fields were changed; falsely report success
    132196                return $this->confirmation_sent;
    133197            }
    134             global $wpdb, $user_email;
    135             $this->email = $this->sanitize_email($_POST['email']);
     198
    136199            if ( !is_email($this->email) ) {
    137200                $this->s2form = $this->form . $this->not_an_email;
  • subscribe2/trunk/classes/class-s2-list-table.php

    r914924 r917929  
    106106
    107107    function pagination( $which ) {
    108         if ( empty( $this->_pagination_args ) ) {
     108        if ( empty( $this->_pagination_args ) )
    109109            return;
    110         }
    111 
    112         $total_items = $this->_pagination_args['total_items'];
    113         $total_pages = $this->_pagination_args['total_pages'];
    114         $infinite_scroll = false;
    115         if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {
    116             $infinite_scroll = $this->_pagination_args['infinite_scroll'];
    117         }
     110
     111        extract( $this->_pagination_args, EXTR_SKIP );
    118112
    119113        $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items, 'subscribe2' ), number_format_i18n( $total_items ) ) . '</span>';
     
    146140
    147141        $disable_first = $disable_last = '';
    148         if ( $current == 1 ) {
     142        if ( $current == 1 )
    149143            $disable_first = ' disabled';
    150         }
    151         if ( $current == $total_pages ) {
     144        if ( $current == $total_pages )
    152145            $disable_last = ' disabled';
    153         }
    154146
    155147        $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     
    167159        );
    168160
    169         if ( 'bottom' == $which ) {
     161        if ( 'bottom' == $which )
    170162            $html_current_page = $current;
    171         } else {
     163        else
    172164            $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />",
    173165                esc_attr__('Current page', 'subscribe2'),
     
    175167                strlen( $total_pages )
    176168            );
    177         }
    178169
    179170        $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
     
    195186
    196187        $pagination_links_class = 'pagination-links';
    197         if ( ! empty( $infinite_scroll ) ) {
     188        if ( ! empty( $infinite_scroll ) )
    198189            $pagination_links_class = ' hide-if-js';
    199         }
    200190        $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
    201191
    202         if ( $total_pages ) {
     192        if ( $total_pages )
    203193            $page_class = $total_pages < 2 ? ' one-page' : '';
    204         } else {
     194        else
    205195            $page_class = ' no-pages';
    206         }
    207196
    208197        $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
  • subscribe2/trunk/classes/class-s2-upgrade.php

    r908209 r917929  
    239239
    240240    function upgrade70() {
    241         global $mysubscribe2, $wpdb;
     241        global $mysubscribe2;
    242242        if ( version_compare($mysubscribe2->wp_release, '3.5', '<') ) {
    243243            $users = $wpdb->get_col($wpdb->prepare("SELECT ID from $wpdb->users WHERE ID NOT IN (SELECT user_id from $wpdb->usermeta WHERE meta_key=%s", $mysubscribe2->get_usermeta_keyname('s2_authors')));
     
    342342    } // end upgrade88()
    343343
    344     function upgrade95() {
     344    function upgrade100() {
    345345        global $mysubscribe2;
    346346        if ( $mysubscribe2->subscribe2_options['email_freq'] != 'never' ) {
  • subscribe2/trunk/include/counterwidget.php

    r914924 r917929  
    1414    */
    1515    function widget($args, $instance) {
     16        extract($args);
     17
    1618        $title = empty($instance['title']) ? 'Subscriber Count' : $instance['title'];
    1719        $s2w_bg = empty($instance['s2w_bg']) ? '#e3dacf' : $instance['s2w_bg'];
     
    2123        $s2w_font = empty($instance['s2w_font']) ? '11' : $instance['s2w_font'];
    2224
    23         echo $args['before_widget'];
    24         if ( !empty($title) ) {
    25             echo $args['before_title'] . $title . $args['after_title'];
    26         }
     25        echo $before_widget;
     26        echo $before_title . $title . $after_title;
    2727        global $mysubscribe2;
    2828        $registered = $mysubscribe2->get_registered();
     
    3232        echo $count;
    3333        echo "</div></ul>";
    34         echo $args['after_widget'];
     34        echo $after_widget;
    3535    }
    3636
  • subscribe2/trunk/include/widget.php

    r914924 r917929  
    1414    */
    1515    function widget($args, $instance) {
     16        extract($args);
    1617        $title = empty($instance['title']) ? __('Subscribe2', 'subscribe2') : $instance['title'];
    1718        $div = empty($instance['div']) ? 'search' : $instance['div'];
     
    2324        $js = empty($instance['js']) ? '' : $instance['js'];
    2425        $noantispam = empty($instance['noantispam']) ? '' : $instance['noantispam'];
    25         $nowrap = empty($instance['nowrap']) ? '' : $instance['nowrap'];
    2626        $hide = '';
    2727        if ( $hidebutton == 'subscribe' || $hidebutton == 'unsubscribe' ) {
     
    4242            $noantispam = " noantispam=\"true\"";
    4343        }
    44         if ( $nowrap ) {
    45             $nowrap = " wrap=\"false\"";
    46         }
    47         $shortcode = "[subscribe2" . $hide . $postid . $size . $nojs . $noantispam . $nowrap . "]";
    48         echo $args['before_widget'];
    49         if ( !empty($title) ) {
    50             echo $args['before_title'] . $title . $args['after_title'];
    51         }
     44        $shortcode = "[subscribe2" . $hide . $postid . $size . $nojs . $noantispam . "]";
     45        echo $before_widget;
     46        echo $before_title . $title . $after_title;
    5247        echo "<div class=\"" . $div . "\">";
    5348        $content = do_shortcode( $shortcode );
     
    6055        }
    6156        echo "</div>";
    62         echo $args['after_widget'];
     57        echo $after_widget;
    6358    }
    6459
     
    7772        $instance['js'] = stripslashes($new_instance['js']);
    7873        $instance['noantispam'] = stripslashes($new_instance['noantispam']);
    79         $instance['nowrap'] = stripslashes($new_instance['nowrap']);
    8074
    8175        return $instance;
     
    8983        $options = get_option('widget_subscribe2widget');
    9084        if ( $options === false ) {
    91             $defaults = array('title' => 'Subscribe2', 'div' => 'search', 'widgetprecontent' => '', 'widgetpostcontent' => '', 'size' => 20, 'hidebutton' => 'none', 'postto' => '', 'js' => '', 'noantispam' => '', 'nowrap' => '');
     85            $defaults = array('title' => 'Subscribe2', 'div' => 'search', 'widgetprecontent' => '', 'widgetpostcontent' => '', 'size' => 20, 'hidebutton' => 'none', 'postto' => '', 'js' => '', 'noantispam' => '');
    9286        } else {
    93             $defaults = array('title' => $options['title'], 'div' => $options['div'], 'widgetprecontent' => $options['widgetprecontent'], 'widgetpostcontent' => $options['widgetpostcontent'], 'size' => $options['size'], 'hidebutton' => $options['hidebutton'], 'postto' => $options['postto'], 'js' => $options['js'], 'noantispam' => $options['noantispam'], 'nowrap' => $options['nowrap']);
     87            $defaults = array('title' => $options['title'], 'div' => $options['div'], 'widgetprecontent' => $options['widgetprecontent'], 'widgetpostcontent' => $options['widgetpostcontent'], 'size' => $options['size'], 'hidebutton' => $options['hidebutton'], 'postto' => $options['postto'], 'js' => $options['js'], 'noantispam' => $options['noantispam']);
    9488            delete_option('widget_subscribe2widget');
    9589        }
     
    106100        $js = htmlspecialchars($instance['js'], ENT_QUOTES);
    107101        $noantispam  = htmlspecialchars($instance['noantispam'], ENT_QUOTES);
    108         $nowrap = htmlspecialchars($instance['nowrap'], ENT_QUOTES);
    109102
    110103        global $wpdb, $mysubscribe2;
     
    147140        echo "<input id=\"" . $this->get_field_id('noantispam') . "\" name =\"" . $this->get_field_name('noantispam') . "\" value=\"true\" type=\"checkbox\"" . checked('true', $noantispam, false) . "/>";
    148141        echo "</label></p>\r\n";
    149         echo "<p><label for=\"" . $this->get_field_id('nowrap') . "\">" . __('Disable wrapping of form buttons', 'subscribe2') . ":\r\n";
    150         echo "<input id=\"" . $this->get_field_id('nowrap') . "\" name =\"" . $this->get_field_name('nowrap') . "\" value=\"true\" type=\"checkbox\"" . checked('true', $nowrap, false) . "/>";
    151         echo "</label></p>\r\n";
    152142        echo "</div>\r\n";
    153143    }
  • subscribe2/trunk/subscribe2.php

    r913526 r917929  
    44Plugin URI: http://subscribe2.wordpress.com
    55Description: Notifies an email list when new entries are posted.
    6 Version: 9.5
     6Version: 10.0
    77Author: Matthew Robinson
    88Author URI: http://subscribe2.wordpress.com
     
    4343}
    4444
     45
    4546// stop Subscribe2 being activated site wide on Multisite installs
    4647if ( !function_exists( 'is_plugin_active_for_network' ) ) {
     
    5051if ( is_plugin_active_for_network(plugin_basename(__FILE__)) ) {
    5152    deactivate_plugins( plugin_basename(__FILE__) );
    52     $exit_msg = __('Subscribe2 cannot be activated as a network plugin. Please activate it on a site level', 'subscribe2');
     53    $exit_msg = __('Subscribe2 cannot be activated as a network plugin. Please activate it at on a site level', 'subscribe2');
    5354    exit($exit_msg);
    5455}
     
    5657// our version number. Don't touch this or any line below
    5758// unless you know exactly what you are doing
    58 define( 'S2VERSION', '9.5' );
     59define( 'S2VERSION', '9.4' );
    5960define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
    6061define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
    6162define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
     63global $wpdb, $wp_version;
     64define("WP_subscribe2_TABLE_APP", $wpdb->prefix . "subscribe2_app");
     65
    6266
    6367// Set maximum execution time to 5 minutes - won't affect safe mode
     
    7983    $mysubscribe2->s2init();
    8084}
     85function s2_install()
     86{
     87    add_option('s2_do_activation_redirect', true); 
     88
     89}
     90
     91register_activation_hook(__FILE__, 's2_install');
     92
    8193?>
Note: See TracChangeset for help on using the changeset viewer.