WordPress.org

Plugin Directory

Changeset 396769


Ignore:
Timestamp:
06/13/11 16:48:56 (3 years ago)
Author:
Strictly Software
Message:

Just cleaned up some code, removed some comments and old bits of code and added a couple of new words to the Strictly Text Shrink function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • strictly-tweetbot/trunk/strictly-tweetbot.class.php

    r396056 r396769  
    9696        $this->pluginurl        = plugin_dir_url(__FILE__); 
    9797 
    98             // set up values for config options  
     98        // set up values for config options  
    9999        $this->GetOptions(); 
    100100 
     
    104104        // add options to admin menu 
    105105        add_action('admin_menu', array(&$this, 'RegisterAdminPage')); 
    106  
    107         //add_filter('tweetbot_post_url', array(&$this, 'BitlyShortenUrl')); 
    108          
     106                 
    109107        // set a function to run whenever posts are saved that will call our AutoTag function 
    110108        add_action( 'publish_post', array(&$this, 'PostTweets') , 999); 
     
    197195             
    198196 
    199             $rep = array( 'are'=>'R', 'become' => 'bcum','queue'=>'Q', 'mother fucking'=>'muthafuckin','mother fucker'=>'muthafucker','tea'=>'T','you\'re'=>'yr','your'=>'ur', 'you'=>'U', 'and'=>'&', 'greater'=>'>', 'less'=>'<', 'why'=>'Y', 'come'=>'cum', 'back'=>'bak', 'help'=>'hlp', 'what'=>'wht','please' => 'pls', 'be' => 'B', 'about'=>'abt', 'hours'=>'hrs','play'=>'ply', 'first'=>'1st','second'=>'2nd','third'=>'3rd','fourth'=>'4th','fifth'=>'5th','down'=>'dn', 'because'=>'coz', 'when'=>'wen','this'=>'ths','would'=>'wud','could'=>'cud','great'=>'gr8','government'=>'gov','prime minister'=>'PM','morning'=>'AM','afternoon'=>'PM','evening'=>'PM', 'like'=>'lk', 'with'=>'wiv','noone'=>'no1','no-one'=>'no1', 'dollars'=>'$', 'money'=>'$','cash'=>'$', 'pounds'=>'£', 'big bucks'=>'$$', 'lots of cash'=>'$$','video'=>'vid','videos'=>'vids','double'=>'dbl','single'=>'sngl','love'=>'luv','see'=>'c','hundreds'=>'00\'s','thousands'=>'000\'s','don\'t know'=>'dnt no','listen'=>'lstn','Triple X'=>'XXX', 'Double Penetration'=>'DP', 'Tomorrow'=>'2morro','night'=>'nite','television'=>'TV','message'=>'msg','thanks'=>'thnx','hello'=>'hi','goodbye'=>'bye','mother'=>'mum','father'=>'dad','grandmother'=>'gran','grandfather'=>'grampa','granny'=>'gran','ever'=>'evr','over'=>'ovr','how'=>'hw','in my opinion'=>'IMO','laugh out loud'=>'LOL','peer 2 peer'=>'P2P','send'=>'snd','in my honest opinion'=>'IMHO', 'plus'=>'+', 'United Kingdom' => 'UK', 'United States' => 'USA', 'United States of America'=>'USA','Great Britain'=>'GBR', 'Ireland'=>'IRE', 'England'=>'ENG', 'to'=>'2','for'=>'4', 'before'=>'b4','free'=>'3', 'police'=>'cops'); 
     197            $rep = array( 'are'=>'R', 'become' => 'bcum','queue'=>'Q', 'mother fucking'=>'muthafuckin','mother fucker'=>'muthafucka','tea'=>'T','you\'re'=>'yr','your'=>'ur', 'you'=>'U', 'and'=>'&', 'greater'=>'>', 'less'=>'<', 'why'=>'Y', 'come'=>'cum', 'back'=>'bak', 'help'=>'hlp', 'what'=>'wht','please' => 'pls', 'be' => 'B', 'about'=>'abt', 'hours'=>'hrs','play'=>'ply', 'first'=>'1st','second'=>'2nd','third'=>'3rd','fourth'=>'4th','fifth'=>'5th','down'=>'dn', 'because'=>'coz', 'when'=>'wen','this'=>'ths','would'=>'wud','could'=>'cud','great'=>'gr8','government'=>'gov','prime minister'=>'PM','morning'=>'AM','afternoon'=>'PM','evening'=>'PM', 'like'=>'lk', 'with'=>'wiv','noone'=>'no1','no-one'=>'no1', 'dollars'=>'$', 'money'=>'$','cash'=>'$', 'pounds'=>'£', 'big bucks'=>'$$', 'lots of cash'=>'$$','video'=>'vid','videos'=>'vids','double'=>'dbl','single'=>'sngl','love'=>'luv','see'=>'c','hundreds'=>'00\'s','thousands'=>'000\'s','don\'t know'=>'dnt no','listen'=>'lstn','Triple X'=>'XXX', 'Double Penetration'=>'DP', 'cannot'=>'cant','will not'=>'wont', 'Tomorrow'=>'2morro','night'=>'nite','television'=>'TV','message'=>'msg','thanks'=>'thnx','hello'=>'hi','goodbye'=>'bye','mother'=>'mum','father'=>'dad','grandmother'=>'gran','grandfather'=>'grampa','granny'=>'gran','ever'=>'evr','over'=>'ovr','how'=>'hw','in my opinion'=>'IMO','laugh out loud'=>'LOL','peer 2 peer'=>'P2P','send'=>'snd','in my honest opinion'=>'IMHO', 'plus'=>'+', 'United Kingdom' => 'UK', 'United States' => 'USA', 'United States of America'=>'USA','Great Britain'=>'GBR', 'Ireland'=>'IRE', 'England'=>'ENG', 'to'=>'2','for'=>'4', 'before'=>'b4','free'=>'3', 'police'=>'cops'); 
    200198 
    201199 
     
    425423            /* 
    426424            {"errorCode": 203, "errorMessage": "You must be authenticated to access shorten", "statusCode": "ERROR"} 
    427  
    428             {"errorCode": 0, "errorMessage": "", "results": {"http://www.darkpolitricks.com": {"userHash": "87CuOG", "hash": "686AME", "shortUrl": "http://j.mp/87CuOG", "shortCNAMEUrl": "http://j.mp/87CuOG", "shortKeywordUrl": ""}}, "statusCode": "OK"} 
    429  
    430425            */ 
    431426 
     
    991986     */ 
    992987    protected function IsVerified($account=""){ 
    993  
    994          
    995          
    996         if(!empty($account)){ 
    997  
    998             if(isset($this->verified[$account])){ 
    999988                 
    1000             } 
    1001             if($this->verified[$account]===true){ 
    1002                  
    1003             }else{ 
    1004                  
    1005             } 
     989        if(!empty($account)){        
    1006990             
    1007991            $ret = (isset($this->verified[$account]) && $this->verified[$account]===true ? true : false); 
    1008  
    1009992             
    1010993 
     
    10311014        $accessTokenSecret  = $this->GetAccessTokenSecret($account); 
    10321015 
    1033         if(!empty($accessToken) && !empty($accessTokenSecret)){ 
    1034  
    1035              
     1016        if(!empty($accessToken) && !empty($accessTokenSecret)){          
    10361017 
    10371018            $oauth = new TwitterOAuth(APP_CONSUMER_KEY, APP_CONSUMER_SECRET, $accessToken, $accessTokenSecret); 
     
    10461027 
    10471028            $errmsg = sprintf(__("Connection to Twitter account %s aborted. Invalid Access Tokens were supplied.","strictlytweetbot"),$account); 
    1048  
    10491029             
    10501030 
     
    16281608 
    16291609                $saveerr = false; 
    1630                 //unset($this->accounts,$this->account_names,$this->access_tokens,$this->access_token_secrets,$this->verified,$this->defaulttags,$this->formats,$this->active,$this->tagtypes,$this->verified); 
    1631  
     1610                 
    16321611                for($x = 1; $x<=$accounts; $x++){ 
    16331612                     
     
    16421621                        if(is_array($this->accounts) && count($this->accounts) > 0){ 
    16431622 
    1644                             // new accounts wont have a saved key and we only need to check new accounts for dupes 
    1645  
    1646                             //if(!isset($this->saved_keys[$account]) || $this->saved_keys[$account]!= $account_saved_key){ 
     1623                            // new accounts won't have a saved key and we only need to check new accounts for dupes 
     1624                             
    16471625                            if( $this->GetAccountFromKey($account_saved_key) === false){ 
    16481626 
     
    16581636 
    16591637                                    $errmsg .= sprintf(__('<p>Account Names must be unique. There is already an Account with the name %s. The Account has been changed to %s.</p>','strictlytweetbot'),$account,$newaccount); 
    1660                                      
    1661                                     //$recerr       = true; 
     1638                                                                         
    16621639                                    $saveerr    = true; // show error message but dont prevent the save key from being udpated 
    16631640                                    $account    = $newaccount; 
Note: See TracChangeset for help on using the changeset viewer.