Plugin Directory

Changeset 1367419


Ignore:
Timestamp:
03/09/2016 09:16:06 AM (10 years ago)
Author:
NerdCow
Message:

1.0.3.2

Location:
tweet-wheel
Files:
22 deleted
6 edited
50 copied

Legend:

Unmodified
Added
Removed
  • tweet-wheel/tags/1.0.3.2/includes/classes/class-twp-menus.php

    r1356848 r1367419  
    295295            foreach( $queues as $queue ) :
    296296       
    297                 $wp_admin_bar->add_node( array( 'parent' => 'twp', 'title' => $queue->name, 'href' => admin_url( '/admin.php?page=twp_queues&queue=' . $queue->term_id ) ) );
     297                $wp_admin_bar->add_node( array( 'id' => 'twp_queue_' . $queue->name, 'parent' => 'twp', 'parent' => 'twp', 'title' => $queue->name, 'href' => admin_url( '/admin.php?page=twp_queues&queue=' . $queue->term_id ) ) );
    298298       
    299299            endforeach;
     
    301301        endif;
    302302       
    303         $wp_admin_bar->add_node( array( 'parent' => 'twp', 'title' => 'Add New Queue', 'href' => admin_url( '/admin.php?page=twp_queues&queue=0' ) ) );
     303        $wp_admin_bar->add_node( array( 'id' => 'twp_queue_new', 'parent' => 'twp', 'title' => 'Add New Queue', 'href' => admin_url( '/admin.php?page=twp_queues&queue=0' ) ) );
    304304       
    305305    }
  • tweet-wheel/tags/1.0.3.2/includes/classes/class-twp-queues.php

    r1356848 r1367419  
    168168    }
    169169   
    170     // ...
    171    
    172     public static function create_default_queue() {
    173        
    174         $queues = TWP_Queues()->get_queues(true);
    175        
    176         if( $queues == false ) :
    177        
    178             $term = wp_insert_term(
    179                 'Untitled Queue',
    180                 'twp_queue'
    181             );
    182        
    183             TWP_Settings::restore_default_settings( $term['term_id'] );
    184             TWP_Schedule::restore_default_settings( $term['term_id'] );
    185        
    186             return true;
    187        
    188         endif; 
    189        
    190         return false;
    191        
    192     }
    193    
    194170}
    195171/**
  • tweet-wheel/tags/1.0.3.2/includes/helpers.php

    r1356848 r1367419  
    336336function twp_tweet_parse_excerpt( $post_id ) {
    337337   
    338     return html_entity_decode(get_the_excerpt($post_id),ENT_QUOTES,'UTF-8');
     338    return html_entity_decode(apply_filters('the_excerpt', get_post_field('post_excerpt', $post_id)),ENT_QUOTES,'UTF-8');
    339339   
    340340}
  • tweet-wheel/tags/1.0.3.2/includes/uninstall.php

    r1356848 r1367419  
    1919   
    2020    global $wpdb;
    21 
    22     //drop a custom db table (pre 2.0 compatibility)
    23     $wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "twp_queue" );
    24     $wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "twp_log" );
    25     $wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "twp_stats" );
    2621   
    2722    // Remove cron task
     
    3126   
    3227    // Don't run anything below if user opted-in to leave settings
    33     if( twp_get_option( 'twp_settings', 'keep_date' ) == 1 )
     28    if( twp_get_option( 'twp_settings', 'keep_data' ) == 1 )
    3429        return false;
    3530   
  • tweet-wheel/tags/1.0.3.2/readme.txt

    r1358021 r1367419  
    44Requires at least: 4.4
    55Tested up to: 4.4.2
    6 Stable tag: 1.0.3.1
     6Stable tag: 1.0.3.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1111
    1212== Description ==
    13 
    14 TIME TO WRITE. YOUR BLOG NOTICED. MORE TRAFFIC.
    1513
    1614**Tweet Wheel** plugin helps you to share your WordPress posts, pages, products and any post type on Twitter automatically without your supervision. Promote your WordPress website on Twitter by tweeting regularly to earn more followers and drive more traffic.
     
    9290== Changelog ==
    9391
     92= 1.0.3.2 =
     93* Fixed a few bugs
     94* Revised the code
     95
    9496= 1.0.3.1 =
    9597* Fixed a fatal error for new users upon the plugin activation
  • tweet-wheel/tags/1.0.3.2/tweet-wheel.php

    r1357267 r1367419  
    55 * Plugin URI: http://www.tweet-wheel.com
    66 * Description: A powerful tool that keeps your Twitter profile active. Even when you are busy.
    7  * Version: 1.0.3.1
     7 * Version: 1.0.3.2
    88 * Author: Tomasz Lisiecki from Nerd Cow Ltd.
    99 * Author URI: https://nerdcow.co.uk
     
    3232     * @var string
    3333     */
    34     public $version = '1.0.3.1';
     34    public $version = '1.0.3.2';
    3535   
    3636    // ...
     
    119119        global $pagenow;
    120120       
    121         add_action( 'admin_init', array( $this, 'check_version' ) );
    122 
    123         if ( ! self::compatible_version() )
    124             return;
    125        
    126         // ...
    127 
    128121        // Define all necessary constants
    129122        $this->constants();
     
    132125        $this->includes();
    133126       
     127        add_action( 'admin_init', 'twp_check_version' );
     128
     129        if ( ! twp_compatible_version() )
     130            return;
     131       
     132        // ...
     133
    134134        // Hooks
    135         add_action( 'admin_init', array( $this, 'redirect' ) );
     135        add_action( 'admin_init', 'twp_redirect' );
    136136       
    137137        // Assets
     
    234234       
    235235        // Fundamental settings
     236        require_once( 'includes/helpers.php' );
     237       
    236238        require_once( 'includes/classes/class-twp-menus.php' );
    237239        require_once( 'includes/libraries/sf-settings.php' );
     
    279281       
    280282        require_once( 'includes/twp-metaboxes.php' );
     283       
     284        require_once( 'includes/install.php' );
     285        require_once( 'includes/uninstall.php' );
    281286
    282287        if( defined( 'DOING_AJAX' ) ) :
     
    888893   
    889894    /**
    890      * Redirect after plugin activation (unless its a bulk update)
    891      *
    892      * @type function
    893      * @date 16/06/2015
    894      * @since 1.0
    895      *
    896      * @param N/A
    897      * @return N/A
    898      **/
    899 
    900     public function redirect() {
    901         if (get_option('twp_activation_redirect', false)) {
    902             delete_option('twp_activation_redirect');
    903             if(!isset($_GET['activate-multi']))
    904             {
    905                 wp_redirect(admin_url('/'));
    906             }
    907         }
    908     }
    909 
    910     public function assign_caps() {
    911        
    912         $this->constants();
    913      
    914         // Make sure admin always have the capability
    915         $admin = get_role( 'administrator' );       
    916         $admin->add_cap( TWP_USER_CAP );
    917 
    918     }
    919    
    920     // ...
    921    
    922     /**
    923895     * Checks if user is allowed to use the plugin
    924896     *
     
    12901262   
    12911263    public function admin_footer() {}
    1292    
    1293     // ...
    1294    
    1295     public static function activation_check() {
    1296         if ( ! self::compatible_version() ) {
    1297             deactivate_plugins( plugin_basename( __FILE__ ) );
    1298             wp_die( __( 'Tweet Wheel requires at least WordPress 4.4 and PHP 5.4!', TWP_TEXTDOMAIN ) );
    1299         }
    1300     }
    1301    
    1302     // ...
    1303 
    1304     public function check_version() {
    1305        
    1306         if ( ! self::compatible_version() ) {
    1307             if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {
    1308                 deactivate_plugins( plugin_basename( __FILE__ ) );
    1309                 add_action( 'admin_notices', array( $this, 'disabled_notice' ) );
    1310                 if ( isset( $_GET['activate'] ) ) {
    1311                     unset( $_GET['activate'] );
    1312                 }
    1313             }
    1314         }
    1315        
    1316     }
    1317    
    1318     // ...
    1319 
    1320     public function disabled_notice() {
    1321        
    1322         echo '<strong>' . esc_html__( 'Tweet Wheel requires WordPress 4.4 or higher and PHP 5.4 or higher!', TWP_TEXTDOMAIN ) . '</strong>';
    1323        
    1324     }
    1325    
    1326     // ...
    1327 
    1328     public static function compatible_version() {
    1329        
    1330         global $wp_version;
    1331        
    1332         if ( version_compare( $wp_version, '4.4', '<' ) ) {
    1333             return false;
    1334         }
    1335        
    1336         if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
    1337             return false;
    1338         }
    1339        
    1340         return true;
    1341     }
    1342    
     1264
    13431265}
    13441266
     
    13541276}
    13551277
    1356 require_once( 'includes/helpers.php' );
    1357 
    13581278TWP()->init();
    13591279
    1360 // Install     
    1361 require_once( 'includes/classes/class-twp-install.php' );       
    1362 register_activation_hook( __FILE__, array( 'TWP_Install', 'install' ) );
    1363 
    1364 // Uninstall       
    1365 require_once( 'includes/uninstall.php' );       
    1366 register_uninstall_hook( __FILE__, 'twp_uninstall' );       
    1367 
    1368 // Activate     
    1369 register_activation_hook( __FILE__, array( TweetWheel::instance(), 'assign_caps' ) );       
    1370 register_activation_hook( __FILE__, array( TweetWheel::instance(), 'activation_check' ) ); 
     1280register_activation_hook( __FILE__, 'twp_install' );
     1281register_activation_hook( __FILE__, 'twp_activation_check' );
     1282register_activation_hook( __FILE__, 'twp_assign_caps' );
     1283
     1284register_uninstall_hook( __FILE__, 'twp_uninstall' );; 
    13711285
    13721286endif;
  • tweet-wheel/trunk/includes/classes/class-twp-menus.php

    r1356848 r1367419  
    295295            foreach( $queues as $queue ) :
    296296       
    297                 $wp_admin_bar->add_node( array( 'parent' => 'twp', 'title' => $queue->name, 'href' => admin_url( '/admin.php?page=twp_queues&queue=' . $queue->term_id ) ) );
     297                $wp_admin_bar->add_node( array( 'id' => 'twp_queue_' . $queue->name, 'parent' => 'twp', 'parent' => 'twp', 'title' => $queue->name, 'href' => admin_url( '/admin.php?page=twp_queues&queue=' . $queue->term_id ) ) );
    298298       
    299299            endforeach;
     
    301301        endif;
    302302       
    303         $wp_admin_bar->add_node( array( 'parent' => 'twp', 'title' => 'Add New Queue', 'href' => admin_url( '/admin.php?page=twp_queues&queue=0' ) ) );
     303        $wp_admin_bar->add_node( array( 'id' => 'twp_queue_new', 'parent' => 'twp', 'title' => 'Add New Queue', 'href' => admin_url( '/admin.php?page=twp_queues&queue=0' ) ) );
    304304       
    305305    }
  • tweet-wheel/trunk/includes/classes/class-twp-queues.php

    r1356848 r1367419  
    168168    }
    169169   
    170     // ...
    171    
    172     public static function create_default_queue() {
    173        
    174         $queues = TWP_Queues()->get_queues(true);
    175        
    176         if( $queues == false ) :
    177        
    178             $term = wp_insert_term(
    179                 'Untitled Queue',
    180                 'twp_queue'
    181             );
    182        
    183             TWP_Settings::restore_default_settings( $term['term_id'] );
    184             TWP_Schedule::restore_default_settings( $term['term_id'] );
    185        
    186             return true;
    187        
    188         endif; 
    189        
    190         return false;
    191        
    192     }
    193    
    194170}
    195171/**
  • tweet-wheel/trunk/includes/helpers.php

    r1356848 r1367419  
    336336function twp_tweet_parse_excerpt( $post_id ) {
    337337   
    338     return html_entity_decode(get_the_excerpt($post_id),ENT_QUOTES,'UTF-8');
     338    return html_entity_decode(apply_filters('the_excerpt', get_post_field('post_excerpt', $post_id)),ENT_QUOTES,'UTF-8');
    339339   
    340340}
  • tweet-wheel/trunk/includes/uninstall.php

    r1356848 r1367419  
    1919   
    2020    global $wpdb;
    21 
    22     //drop a custom db table (pre 2.0 compatibility)
    23     $wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "twp_queue" );
    24     $wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "twp_log" );
    25     $wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "twp_stats" );
    2621   
    2722    // Remove cron task
     
    3126   
    3227    // Don't run anything below if user opted-in to leave settings
    33     if( twp_get_option( 'twp_settings', 'keep_date' ) == 1 )
     28    if( twp_get_option( 'twp_settings', 'keep_data' ) == 1 )
    3429        return false;
    3530   
  • tweet-wheel/trunk/readme.txt

    r1358021 r1367419  
    44Requires at least: 4.4
    55Tested up to: 4.4.2
    6 Stable tag: 1.0.3.1
     6Stable tag: 1.0.3.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1111
    1212== Description ==
    13 
    14 TIME TO WRITE. YOUR BLOG NOTICED. MORE TRAFFIC.
    1513
    1614**Tweet Wheel** plugin helps you to share your WordPress posts, pages, products and any post type on Twitter automatically without your supervision. Promote your WordPress website on Twitter by tweeting regularly to earn more followers and drive more traffic.
     
    9290== Changelog ==
    9391
     92= 1.0.3.2 =
     93* Fixed a few bugs
     94* Revised the code
     95
    9496= 1.0.3.1 =
    9597* Fixed a fatal error for new users upon the plugin activation
  • tweet-wheel/trunk/tweet-wheel.php

    r1357267 r1367419  
    55 * Plugin URI: http://www.tweet-wheel.com
    66 * Description: A powerful tool that keeps your Twitter profile active. Even when you are busy.
    7  * Version: 1.0.3.1
     7 * Version: 1.0.3.2
    88 * Author: Tomasz Lisiecki from Nerd Cow Ltd.
    99 * Author URI: https://nerdcow.co.uk
     
    3232     * @var string
    3333     */
    34     public $version = '1.0.3.1';
     34    public $version = '1.0.3.2';
    3535   
    3636    // ...
     
    119119        global $pagenow;
    120120       
    121         add_action( 'admin_init', array( $this, 'check_version' ) );
    122 
    123         if ( ! self::compatible_version() )
    124             return;
    125        
    126         // ...
    127 
    128121        // Define all necessary constants
    129122        $this->constants();
     
    132125        $this->includes();
    133126       
     127        add_action( 'admin_init', 'twp_check_version' );
     128
     129        if ( ! twp_compatible_version() )
     130            return;
     131       
     132        // ...
     133
    134134        // Hooks
    135         add_action( 'admin_init', array( $this, 'redirect' ) );
     135        add_action( 'admin_init', 'twp_redirect' );
    136136       
    137137        // Assets
     
    234234       
    235235        // Fundamental settings
     236        require_once( 'includes/helpers.php' );
     237       
    236238        require_once( 'includes/classes/class-twp-menus.php' );
    237239        require_once( 'includes/libraries/sf-settings.php' );
     
    279281       
    280282        require_once( 'includes/twp-metaboxes.php' );
     283       
     284        require_once( 'includes/install.php' );
     285        require_once( 'includes/uninstall.php' );
    281286
    282287        if( defined( 'DOING_AJAX' ) ) :
     
    888893   
    889894    /**
    890      * Redirect after plugin activation (unless its a bulk update)
    891      *
    892      * @type function
    893      * @date 16/06/2015
    894      * @since 1.0
    895      *
    896      * @param N/A
    897      * @return N/A
    898      **/
    899 
    900     public function redirect() {
    901         if (get_option('twp_activation_redirect', false)) {
    902             delete_option('twp_activation_redirect');
    903             if(!isset($_GET['activate-multi']))
    904             {
    905                 wp_redirect(admin_url('/'));
    906             }
    907         }
    908     }
    909 
    910     public function assign_caps() {
    911        
    912         $this->constants();
    913      
    914         // Make sure admin always have the capability
    915         $admin = get_role( 'administrator' );       
    916         $admin->add_cap( TWP_USER_CAP );
    917 
    918     }
    919    
    920     // ...
    921    
    922     /**
    923895     * Checks if user is allowed to use the plugin
    924896     *
     
    12901262   
    12911263    public function admin_footer() {}
    1292    
    1293     // ...
    1294    
    1295     public static function activation_check() {
    1296         if ( ! self::compatible_version() ) {
    1297             deactivate_plugins( plugin_basename( __FILE__ ) );
    1298             wp_die( __( 'Tweet Wheel requires at least WordPress 4.4 and PHP 5.4!', TWP_TEXTDOMAIN ) );
    1299         }
    1300     }
    1301    
    1302     // ...
    1303 
    1304     public function check_version() {
    1305        
    1306         if ( ! self::compatible_version() ) {
    1307             if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {
    1308                 deactivate_plugins( plugin_basename( __FILE__ ) );
    1309                 add_action( 'admin_notices', array( $this, 'disabled_notice' ) );
    1310                 if ( isset( $_GET['activate'] ) ) {
    1311                     unset( $_GET['activate'] );
    1312                 }
    1313             }
    1314         }
    1315        
    1316     }
    1317    
    1318     // ...
    1319 
    1320     public function disabled_notice() {
    1321        
    1322         echo '<strong>' . esc_html__( 'Tweet Wheel requires WordPress 4.4 or higher and PHP 5.4 or higher!', TWP_TEXTDOMAIN ) . '</strong>';
    1323        
    1324     }
    1325    
    1326     // ...
    1327 
    1328     public static function compatible_version() {
    1329        
    1330         global $wp_version;
    1331        
    1332         if ( version_compare( $wp_version, '4.4', '<' ) ) {
    1333             return false;
    1334         }
    1335        
    1336         if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
    1337             return false;
    1338         }
    1339        
    1340         return true;
    1341     }
    1342    
     1264
    13431265}
    13441266
     
    13541276}
    13551277
    1356 require_once( 'includes/helpers.php' );
    1357 
    13581278TWP()->init();
    13591279
    1360 // Install     
    1361 require_once( 'includes/classes/class-twp-install.php' );       
    1362 register_activation_hook( __FILE__, array( 'TWP_Install', 'install' ) );
    1363 
    1364 // Uninstall       
    1365 require_once( 'includes/uninstall.php' );       
    1366 register_uninstall_hook( __FILE__, 'twp_uninstall' );       
    1367 
    1368 // Activate     
    1369 register_activation_hook( __FILE__, array( TweetWheel::instance(), 'assign_caps' ) );       
    1370 register_activation_hook( __FILE__, array( TweetWheel::instance(), 'activation_check' ) ); 
     1280register_activation_hook( __FILE__, 'twp_install' );
     1281register_activation_hook( __FILE__, 'twp_activation_check' );
     1282register_activation_hook( __FILE__, 'twp_assign_caps' );
     1283
     1284register_uninstall_hook( __FILE__, 'twp_uninstall' );; 
    13711285
    13721286endif;
Note: See TracChangeset for help on using the changeset viewer.