Plugin Directory

Changeset 829996

Timestamp:
12/30/2013 04:34:19 AM (11 years ago)
Author:
alexkingorg
Message:

version 3.1

Location:
twitter-tools/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • twitter-tools/trunk/README.txt

    r725718 r829996  
    22Contributors: alexkingorg, crowdfavorite
    33Tags: twitter, tweet, integration, post, notify, integrate, archive, widget, shortcode, social
    4 Requires at least: 3.4
    5 Tested up to: 3.5.1
    6 Stable tag: 3.0.4
     4Requires at least: 3.
     5Tested up to: 3.
     6Stable tag: 3.0.
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    141141== Upgrade Notice ==
    142142
    143 Version 3.0.4 brings support for Twitter API v1.1.
    144 
    145 Version 3.0 is a complete rewrite that utilizes <a href="http://wordpress.org/extend/plugins/social/">Social</a> to make connecting your Twitter account easy. It is compatibile with the latest Twitter API changes as of October 11, 2012. Please see the <a href="http://alexking.org/blog/2012/10/12/twitter-tools-3-0-faq">FAQ</a> for more details.
     143Version 3.1 brings support for Social 2.10's CRON action names and requires Social 2.10 and WordPress 3.8. It also adds a setting for the publish/draft status of blog posts created from tweets. Now you can set your blog posts to be created as drafts, then publish only the ones you choose to. We've also improved native RT support.
     144
    146145
    147146== Changelog ==
     147
     148
     149
     150
     151
     152
     153
     154
     155
    148156
    149157= 3.0.4 =
  • twitter-tools/trunk/classes/aktt.php

    r725717 r829996  
    33class AKTT {
    44    // settings: aktt_v3_settings
    5     static $ver = '3.0.1';
     5    static $ver = '3.1';
    66    static $enabled = false;
    77    static $prefix = 'aktt_';
     
    7878       
    7979        // Cron Hooks
    80         add_action('social_cron_15', array('AKTT', 'import_tweets'));
     80        add_action('social15', array('AKTT', 'import_tweets'));
    8181        add_action('aktt_backfill_tweets', array('AKTT', 'backfill_tweets'));
    8282       
  • twitter-tools/trunk/classes/aktt_account.php

    r725717 r829996  
    3737                'value' => 0,
    3838                'type'  => 'is_cat',
     39
     40
     41
     42
     43
     44
    3945            ),
    4046            'post_tags' => array( // tags to add to posts created from this acct
     
    167173            'post_category' => $this->option('post_category'),
    168174            'post_tags' => $this->option('post_tags'),
     175
    169176            'title_prefix' => $this->option('blog_post_title'),
    170177        );
  • twitter-tools/trunk/classes/aktt_tweet.php

    r725717 r829996  
    9191     */
    9292    public function content() {
     93
     94
     95
    9396        if (isset($this->data) && isset($this->data->text)) {
    9497            return $this->data->text;
     
    142145     */
    143146    public function hashtags() {
    144         return (isset($this->data) && isset($this->data->entities) ? $this->data->entities->hashtags : array());
     147        if ($this->is_native_retweet()) {
     148            return (isset($this->data->retweeted_status->entities) ? $this->data->retweeted_status->entities->hashtags : array());
     149        }
     150        else {
     151            return (isset($this->data) && isset($this->data->entities) ? $this->data->entities->hashtags : array());
     152        }
    145153    }
    146154   
     
    151159     */
    152160    public function mentions() {
    153         return (isset($this->data) && isset($this->data->entities) ? $this->data->entities->user_mentions : array());
     161        if ($this->is_native_retweet()) {
     162            return (isset($this->data->retweeted_status->entities) ? $this->data->retweeted_status->entities->user_mentions : array());
     163        }
     164        else {
     165            return (isset($this->data) && isset($this->data->entities) ? $this->data->entities->user_mentions : array());
     166        }
    154167    }
    155168   
     
    160173     */
    161174    public function urls() {
    162         return (isset($this->data) && isset($this->data->entities) ? $this->data->entities->urls : array());
     175        if ($this->is_native_retweet()) {
     176            return (isset($this->data->retweeted_status->entities) ? $this->data->retweeted_status->entities->urls : array());
     177        }
     178        else {
     179            return (isset($this->data) && isset($this->data->entities) ? $this->data->entities->urls : array());
     180        }
    163181    }
    164182   
     
    288306
    289307    /**
    290      * Is this a retweet?
     308     * Is this a native retweet?
     309     *
     310     * @return bool
     311     */
     312    function is_native_retweet() {
     313        return (bool) (isset($this->data) && !empty($this->data->retweeted_status));
     314    }
     315
     316
     317    /**
     318     * Is this a retweet? (This includes both native and non-native retweets.)
    291319     *
    292320     * @return bool
    293321     */
    294322    function is_retweet() {
    295         return (bool) (AKTT::substr($this->content(), 0, 2) == 'RT' || !empty($this->data->retweeted_status));
     323        return (bool) (AKTT::substr($this->content(), 0, 2) == 'RT' || ));
    296324    }
    297325   
     
    313341    }
    314342   
    315     function link_entities($defer_to_anywhere = true) {
     343    function link_entities($de = true) {
    316344        $entities = array();
    317345// mentions
    318         $anywhere = Social::option('twitter_anywhere_api_key');
    319         if (!$defer_to_anywhere || empty($anywhere) || is_feed()) {
    320             foreach ($this->mentions() as $entity) {
    321                 $entities['start_'.str_pad($entity->indices[0], 5, '0', STR_PAD_LEFT)] = array(
    322                     'find' => $entity->screen_name,
    323                     'replace' => AKTT::profile_link($entity->screen_name),
    324                     'start' => $entity->indices[0],
    325                     'end' => $entity->indices[1],
    326                 );
    327             }
     346        foreach ($this->mentions() as $entity) {
     347            $entities['start_'.str_pad($entity->indices[0], 5, '0', STR_PAD_LEFT)] = array(
     348                'find' => $entity->screen_name,
     349                'replace' => AKTT::profile_link($entity->screen_name),
     350                'start' => $entity->indices[0],
     351                'end' => $entity->indices[1],
     352            );
    328353        }
    329354// hashtags
     
    367392            $diff += AKTT::strlen($entity['replace']) - ($end - $start);
    368393        }
     394
     395
     396
     397
     398
     399
    369400        return $str;
    370401    }
     
    556587//              'post_tag' => array_map('trim', explode(',', $post_tags)),
    557588//          ),
    558             'post_status' => 'publish',
     589            'post_status' => ,
    559590            'post_type' => 'post',
    560591            'post_date' => date('Y-m-d H:i:s', AKTT::gmt_to_wp_time($gmt_time)),
  • twitter-tools/trunk/twitter-tools.php

    r725717 r829996  
    44Plugin URI: http://crowdfavorite.com/wordpress/plugins/twitter-tools/
    55Description: An integration between your WordPress site and Twitter. Create posts from your tweets. Show your tweets in your sidebar. Relies on <a href="http://wordpress.org/extend/plugins/social/">Social</a>.
    6 Version: 3.0.4
     6Version: 3.
    77Author: Crowd Favorite
    88Author URI: http://crowdfavorite.com
  • twitter-tools/trunk/views/admin-account.php

    r613060 r829996  
    4949            </p>
    5050            <p>
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
    5162                <label class="left" for="<?php echo esc_attr(sprintf($name, 'post_tags')); ?>"><?php _e('Tags', 'twitter-tools'); ?></label>
    5263                <input type="text" class="type-ahead" data-tax="post_tag" name="<?php echo esc_attr(sprintf($name, 'post_tags')); ?>" id="<?php echo esc_attr(sprintf($name, 'post_tags')); ?>" value="<?php echo esc_attr($account->option('post_tags')); ?>" />  <span class="help"><?php _e('(comma separated)', 'twitter-tools'); ?></span>
Note: See TracChangeset for help on using the changeset viewer.