WordPress.org

Plugin Directory

Changeset 690784


Ignore:
Timestamp:
04/02/13 20:08:45 (13 months ago)
Author:
joedolson
Message:

WP to Twitter version 2.6.0. Significant update.

Location:
wp-to-twitter
Files:
114 added
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • wp-to-twitter/trunk/js/jquery.charcount.js

    r630944 r690784  
    1717 
    1818    $.fn.charCount = function(options){ 
    19        
    2019        // default configuration properties 
    2120        var defaults = {     
     
    5352                 
    5453        this.each(function() {               
    55             $(this).after('<'+ options.counterElement +' class="' + options.css + '">'+ options.counterText +'</'+ options.counterElement +'>'); 
     54            $(this).after('<'+ options.counterElement +' aria-live="polite" aria-atomic="true" class="' + options.css + '">'+ options.counterText +'</'+ options.counterElement +'>'); 
    5655            calculate(this); 
    5756            $(this).keyup(function(){calculate(this)}); 
  • wp-to-twitter/trunk/lang/wp-to-twitter-fr_FR.po

    r667701 r690784  
    33msgid "" 
    44msgstr "" 
    5 "PO-Revision-Date: 2013-02-14 00:37:44+0000\n" 
     5"PO-Revision-Date: 2013-04-02 19:46:58+0000\n" 
    66"MIME-Version: 1.0\n" 
    77"Content-Type: text/plain; charset=UTF-8\n" 
     
    1111"Project-Id-Version: WP to Twitter\n" 
    1212 
    13 #: wp-to-twitter-manager.php:177 
     13#: wp-to-twitter-manager.php:716 
     14msgid "Use tag slug as hashtag value" 
     15msgstr "Utiliser l'identifiant des mots-clefs comme valeur de hashtag" 
     16 
     17#: wp-to-twitter.php:1242 
     18msgid "Tweets are no more than 140 characters; Twitter counts URLs as 20 or 21 characters. Template tags: <code>#url#</code>, <code>#title#</code>, <code>#post#</code>, <code>#category#</code>, <code>#date#</code>, <code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, <code>#tags#</code>, or <code>#blog#</code>." 
     19msgstr "Les Tweets font un maximum de 140 caractères; l'url Twitter compte pour 20 ou 21 caractères. Balises de modèle : <code>#url#</code>, <code>#title#</code>, <code>#post#</code>, <code>#category#</code>, <code>#date#</code>, <code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, <code>#tags#</code>, ou <code>#blog#</code>." 
     20 
     21#: wp-to-twitter-manager.php:176 
    1422msgid "WP to Twitter failed to connect with Twitter. Try <a href=\"#wpt_http\">switching to an HTTP connection</a>." 
    1523msgstr "Wp to Twitter n'a pas réussi à se connecter à Twitter. Essayer de <a href=\"#wpt_http\">passer à une connexion HTTP</a>." 
     
    3543msgstr "Voir vos informations de l'API de Bit.ly" 
    3644 
    37 #: wp-to-twitter.php:63 
     45#: wp-to-twitter.php:67 
    3846msgid "The current version of WP Tweets PRO is <strong>%s</strong>. Upgrade for best compatibility!" 
    3947msgstr "La version actuelle de WP Tweets PRO est la <strong>%s</strong>. Mettez à jour pour une meilleure compatibilité !" 
     
    5159msgstr "Répondre à :" 
    5260 
    53 #: wp-to-twitter-manager.php:835 
     61#: wp-to-twitter-manager.php:838 
    5462msgid "The lowest user group that can add their Twitter information" 
    5563msgstr "Choisissez le groupe d'utilisateur le plus bas pouvant ajouter ses infos Twitter" 
    5664 
    57 #: wp-to-twitter-manager.php:840 
     65#: wp-to-twitter-manager.php:843 
    5866msgid "The lowest user group that can see the Custom Tweet options when posting" 
    5967msgstr "Choisissez le groupe d'utilisateur le plus bas pouvant voir les options de Tweet personnalisés lors de la publication" 
    6068 
    61 #: wp-to-twitter-manager.php:845 
     69#: wp-to-twitter-manager.php:848 
    6270msgid "The lowest user group that can toggle the Tweet/Don't Tweet option" 
    6371msgstr "Choisissez le groupe d'utilisateur le plus bas pouvant modifier l'option Tweeter/Pas Tweeter" 
    6472 
    65 #: wp-to-twitter-manager.php:850 
     73#: wp-to-twitter-manager.php:853 
    6674msgid "The lowest user group that can send Twitter updates" 
    6775msgstr "Choisissez le groupe d'utilisateur le plus bas pouvant envoyer des mises à jour Twitter" 
    6876 
    69 #: wp-to-twitter-manager.php:982 
     77#: wp-to-twitter-manager.php:985 
    7078msgid "<code>#author#</code>: the post author (@reference if available, otherwise display name)" 
    7179msgstr "<code>#author#</code> : l'auteur de l'article (référence@ si disponible, sinon affiche le nom)" 
    7280 
    73 #: wp-to-twitter-manager.php:983 
     81#: wp-to-twitter-manager.php:986 
    7482msgid "<code>#displayname#</code>: post author's display name" 
    7583msgstr "<code>#displayname#</code> : affiche le nom de l'auteur de l'article" 
    7684 
    77 #: wp-to-twitter.php:74 
     85#: wp-to-twitter.php:76 
    7886msgid "WP to Twitter requires WordPress 3.0.6 or a more recent version <a href=\"http://codex.wordpress.org/Upgrading_WordPress\">Please update WordPress to continue using WP to Twitter with all features!</a>" 
    7987msgstr "WP to Twitter necessite WordPress 3.0.6 ou une version plus récente <a href=\"http://codex.wordpress.org/Upgrading_WordPress\"> S'il vous plaît mettez à jour WordPress pour continuer à utiliser WP to Twitter avec toutes ses fonctionnalités ! </a>" 
    8088 
    81 #: wp-to-twitter.php:285 
     89#: wp-to-twitter.php:287 
    8290msgid "This tweet was blank and could not be sent to Twitter." 
    8391msgstr "Ce tweet est vide et ne peux pas être envoyé sur Twitter." 
    8492 
    85 #: wp-to-twitter.php:336 
     93#: wp-to-twitter.php:338 
    8694msgid "404 Not Found: The URI requested is invalid or the resource requested does not exist." 
    8795msgstr "404 Non trouvé : L'URL demandée est invalide ou à la ressource demandée n'existe pas." 
    8896 
    89 #: wp-to-twitter.php:340 
     97#: wp-to-twitter.php:342 
    9098msgid "406 Not Acceptable: Invalid Format Specified." 
    9199msgstr "406 Non Acceptable : Format spécifié invalide." 
    92100 
    93 #: wp-to-twitter.php:344 
     101#: wp-to-twitter.php:346 
    94102msgid "429 Too Many Requests: You have exceeded your rate limits." 
    95103msgstr "429 Trop de requêtes : Vous avez dépassé vos limites." 
    96104 
    97 #: wp-to-twitter.php:360 
     105#: wp-to-twitter.php:362 
    98106msgid "504 Gateway Timeout: The Twitter servers are up, but the request couldn't be serviced due to some failure within our stack. Try again later." 
    99107msgstr "504 Gateway Timeout : Les serveurs de Twitter fonctionnent, mais la demande n'a pas pu être éxécuté en raison d'une défaillance au sein de notre file d'attente. Réessayez plus tard." 
    100108 
    101 #: wp-to-twitter.php:1162 
     109#: wp-to-twitter.php:1185 
    102110msgid "Your prepended Tweet text; not part of your template." 
    103111msgstr "Votre texte de Tweet préfixé; ne fait pas partie de votre modèle." 
    104112 
    105 #: wp-to-twitter.php:1165 
     113#: wp-to-twitter.php:1188 
    106114msgid "Your appended Tweet text; not part of your template." 
    107115msgstr "Votre texte de Tweet annexé; ne fait pas partie de votre modèle." 
    108116 
    109 #: wp-to-twitter.php:1219 
    110 msgid "Tweets are no more than 140 characters; Twitter counts URLs as 20 characters. Template tags: <code>#url#</code>, <code>#title#</code>, <code>#post#</code>, <code>#category#</code>, <code>#date#</code>, <code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, <code>#tags#</code>, or <code>#blog#</code>." 
    111 msgstr "Les messages Twitter font un maximum de 140 caractères; l'url Twitter compte pour 20 caractères. Balises de modèle : <code>#url#</code>, <code>#title#</code>, <code>#post#</code>, <code>#category#</code>, <code>#date#</code>, <code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, <code>#tags#</code>, ou <code>#blog#</code>." 
    112  
    113 #: wp-to-twitter.php:1231 
     117#: wp-to-twitter.php:1254 
    114118msgid "Your role does not have the ability to Post Tweets from this site." 
    115119msgstr "Votre rôle n'a pas la capacité de publier des Tweets à partir de ce site." 
    116120 
    117 #: wp-to-twitter.php:1355 
     121#: wp-to-twitter.php:1373 
    118122msgid "Hide account name in Tweets" 
    119123msgstr "Cacher le nom du compte dans les Tweets" 
    120124 
    121 #: wp-to-twitter.php:1356 
     125#: wp-to-twitter.php:1374 
    122126msgid "Do not display my account in the #account# template tag." 
    123127msgstr "Ne pas afficher mon compte dans la balise de modèle #account#." 
     
    155159msgstr "Texte pour une nouvelle mise à jour de %1$s" 
    156160 
    157 #: wp-to-twitter-oauth.php:190 
     161#: wp-to-twitter-oauth.php:201 
    158162msgid "Your server timezone (should be UTC,GMT,Europe/London or equivalent):" 
    159163msgstr "Votre fuseau horaire du serveur (devrait être UTC, GMT, Europe/Londres ou équivalent) :" 
     
    171175msgstr "Votre raccourcisseur ne nécessite pas de paramètres de compte." 
    172176 
    173 #: wp-to-twitter.php:314 
     177#: wp-to-twitter.php:316 
    174178msgid "Your Twitter application does not have read and write permissions. Go to <a href=\"%s\">your Twitter apps</a> to modify these settings." 
    175179msgstr "Votre application Twitter n'a pas les droits en lecture et en écriture. Aller à la <a href=\"%s\"> votre application Twitter </a> pour modifier ces paramètres." 
    176180 
    177 #: wp-to-twitter.php:1135 
     181#: wp-to-twitter.php:1158 
    178182msgid "Failed Tweets" 
    179183msgstr "Tweets raté" 
    180184 
    181 #: wp-to-twitter.php:1150 
     185#: wp-to-twitter.php:1173 
    182186msgid "No failed tweets on this post." 
    183187msgstr "Pas de tweet raté sur cette article." 
    184188 
    185 #: wp-to-twitter-manager.php:957 
     189#: wp-to-twitter-manager.php:960 
    186190msgid "Upgrade to <strong>WP Tweets PRO</strong> for more options!" 
    187191msgstr "Mettre à jour vers <strong>WP Tweets PRO</strong> pour plus d'options !" 
    188192 
    189 #: wp-to-twitter-manager.php:987 
     193#: wp-to-twitter-manager.php:990 
    190194msgid "<code>#reference#</code>: Used only in co-tweeting. @reference to main account when posted to author account, @reference to author account in post to main account." 
    191195msgstr "<code>#reference#</code> : utilisé uniquement en co-tweeting. référence@ au compte principal lorsque publié pour compte d'auteur, référence@ au compte de l'auteur lorsque publié pour le compte principal." 
    192196 
    193 #: wp-to-twitter-oauth.php:165 
     197#: wp-to-twitter-oauth.php:176 
    194198msgid "Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> queries</a>.<br />" 
    195199msgstr "Problèmes de connexion ? Essayer <a href='#wpt_http'>de passer en requète <code>http</code></a>.<br />" 
    196200 
    197 #: wp-to-twitter-oauth.php:259 
     201#: wp-to-twitter-oauth.php:270 
    198202msgid "WP to Twitter could not contact Twitter's remote server. Here is the error triggered: " 
    199203msgstr "WP to Twitter n'a pas pu contacter le serveur distant de Twitter. Voici l'erreur trouvée :" 
    200204 
    201 #: wp-to-twitter.php:271 
     205#: wp-to-twitter.php:273 
    202206msgid "This account is not authorized to post to Twitter." 
    203207msgstr "Ce compte n'est pas autorisé à publier sur Twitter." 
    204208 
    205 #: wp-to-twitter.php:279 
     209#: wp-to-twitter.php:281 
    206210msgid "This tweet is identical to another Tweet recently sent to this account." 
    207211msgstr "Ce tweeter est identique à un autre Tweet récemment envoyé à ce compte." 
    208212 
    209 #: wp-to-twitter.php:1154 
     213#: wp-to-twitter.php:1177 
    210214msgid "WP to Twitter can do more for you! Take a look at WP Tweets Pro!" 
    211215msgstr "WP to Twitter peut faire plus pour vous ! Jetez un oeil à WP Tweets Pro !" 
     
    215219msgstr "(optionnel)" 
    216220 
    217 #: wp-to-twitter-manager.php:771 
     221#: wp-to-twitter-manager.php:774 
    218222msgid "Do not post Tweets by default (editing only)" 
    219223msgstr "Ne pas publier de Tweets par défaut (modification uniquement)" 
    220224 
    221 #: wp-to-twitter-manager.php:980 
     225#: wp-to-twitter-manager.php:983 
    222226msgid "<code>#modified#</code>: the post modified date" 
    223227msgstr "<code>#modified#</code> : la date de modification de l'article." 
    224228 
    225 #: wp-to-twitter-oauth.php:257 
     229#: wp-to-twitter-oauth.php:268 
    226230msgid "Your time stamps are more than 5 minutes apart. Your server could lose its connection with Twitter." 
    227231msgstr "Vos horodatages ont plus de 5 minutes d'intervalle. Votre serveur peut perdre sa connexion avec Twitter." 
    228232 
    229 #: wp-to-twitter-manager.php:815 
     233#: wp-to-twitter-manager.php:818 
    230234msgid "Individual Authors" 
    231235msgstr "Auteurs individuels" 
    232236 
    233 #: wp-to-twitter-manager.php:818 
     237#: wp-to-twitter-manager.php:821 
    234238msgid "Authors have individual Twitter accounts" 
    235239msgstr "Auteurs avec compte Twitter personnel" 
    236240 
    237 #: wp-to-twitter-manager.php:818 
     241#: wp-to-twitter-manager.php:821 
    238242msgid "Authors can add their username in their user profile. This feature can only add an @reference to the author. The @reference is placed using the <code>#account#</code> shortcode, which will pick up the main account if user accounts are not enabled." 
    239243msgstr "Les auteurs peuvent ajouter leur nom d'utilisateur dans leur profil utilisateur. Cette fonction ne peut ajouter une référence@ à l'auteur. La référence@ est placé en utilisant le raccourci <code>#account#</code>, qui reprendra le compte principal, si les comptes d'utilisateurs ne sont pas activés." 
    240244 
    241 #: wp-to-twitter-manager.php:856 
     245#: wp-to-twitter-manager.php:859 
    242246msgid "Disable Error Messages" 
    243247msgstr "Désactiver les messages d'erreurs" 
    244248 
    245 #: wp-to-twitter-manager.php:858 
     249#: wp-to-twitter-manager.php:861 
    246250msgid "Disable global URL shortener error messages." 
    247251msgstr "Désactiver l'ensemble des messages d'erreurs de réduction d'URL." 
    248252 
    249 #: wp-to-twitter-manager.php:859 
     253#: wp-to-twitter-manager.php:862 
    250254msgid "Disable global Twitter API error messages." 
    251255msgstr "Désactiver l'ensemble des messages d'erreurs d'API sur Twitter." 
    252256 
    253 #: wp-to-twitter-manager.php:860 
     257#: wp-to-twitter-manager.php:863 
    254258msgid "Disable notification to implement OAuth" 
    255259msgstr "Désactiver la notification d'implementation d'OAuth" 
    256260 
    257 #: wp-to-twitter-manager.php:862 
     261#: wp-to-twitter-manager.php:865 
    258262msgid "Get Debugging Data for OAuth Connection" 
    259263msgstr "Obtenir le débogage des données pour la connexion OAuth" 
    260264 
    261 #: wp-to-twitter-manager.php:864 
     265#: wp-to-twitter-manager.php:867 
    262266msgid "Switch to <code>http</code> connection. (Default is https)" 
    263267msgstr "Passer en connexion<code>http </code>. (La valeur par défaut est https)" 
    264268 
    265 #: wp-to-twitter-manager.php:866 
     269#: wp-to-twitter-manager.php:869 
    266270msgid "I made a donation, so stop whinging at me, please." 
    267271msgstr "J'ai fait un don, vous pouvez arrêter de me demander maintenant, s'il vous plaît." 
    268272 
    269 #: wp-to-twitter-manager.php:880 
     273#: wp-to-twitter-manager.php:883 
    270274msgid "Limit Updating Categories" 
    271275msgstr "Limitation des catégories mises à jour" 
    272276 
    273 #: wp-to-twitter-manager.php:883 
     277#: wp-to-twitter-manager.php:886 
    274278msgid "If no categories are checked, limiting by category will be ignored, and all categories will be Tweeted." 
    275279msgstr "Si aucune catégorie n'est cochée, la limitation par catégorie sera ignorée, et toutes les catégories seront tweetées." 
    276280 
    277 #: wp-to-twitter-manager.php:884 
     281#: wp-to-twitter-manager.php:887 
    278282msgid "<em>Category limits are disabled.</em>" 
    279283msgstr " <em>Les limitations de catégories sont désactivées.</em>" 
    280284 
    281 #: wp-to-twitter-manager.php:893 
     285#: wp-to-twitter-manager.php:896 
    282286msgid "Get Plug-in Support" 
    283287msgstr "Besoin d'aide ?" 
    284288 
    285 #: wp-to-twitter-manager.php:904 
     289#: wp-to-twitter-manager.php:907 
    286290msgid "Check Support" 
    287291msgstr "Support de vérification" 
    288292 
    289 #: wp-to-twitter-manager.php:904 
     293#: wp-to-twitter-manager.php:907 
    290294msgid "Check whether your server supports <a href=\"http://www.joedolson.com/articles/wp-to-twitter/\">WP to Twitter's</a> queries to the Twitter and URL shortening APIs. This test will send a status update to Twitter and shorten a URL using your selected methods." 
    291295msgstr "Vérifiez que votre serveur supporte les demandes de <a href=\"http://www.joedolson.com/articles/wp-to-twitter/\">l'extension WP to Twitter</a> vers Twitter et les API de réduction d'URL. Une mise à jour de statut sera envoyée à Twitter ainsi qu'une réduction d'URL réalisée en utilisant les méthodes que vous aurez choisies." 
    292296 
    293 #: wp-to-twitter-manager.php:922 
     297#: wp-to-twitter-manager.php:925 
    294298msgid "Support WP to Twitter" 
    295299msgstr "Soutenir WP to Twitter" 
    296300 
    297 #: wp-to-twitter-manager.php:924 
     301#: wp-to-twitter-manager.php:927 
    298302msgid "WP to Twitter Support" 
    299303msgstr "Soutenir WP to Twitter" 
    300304 
    301 #: wp-to-twitter-manager.php:932 
     305#: wp-to-twitter-manager.php:935 
    302306msgid "View Settings" 
    303307msgstr "Afficher les réglages" 
    304308 
    305 #: wp-to-twitter-manager.php:934 wp-to-twitter.php:1224 wp-to-twitter.php:1226 
     309#: wp-to-twitter-manager.php:937 wp-to-twitter.php:1247 wp-to-twitter.php:1249 
    306310msgid "Get Support" 
    307311msgstr "Obtenir de l'aide" 
    308312 
    309 #: wp-to-twitter-manager.php:938 
     313#: wp-to-twitter-manager.php:941 
    310314msgid "<a href=\"http://www.joedolson.com/donate.php\">Make a donation today!</a> Every donation counts - donate $2, $10, or $100 and help me keep this plug-in running!" 
    311315msgstr "<a href=\"http://www.joedolson.com/donate.php\">Faites un don aujourd'hui !</a> Tous les dons comptent - donner $2, $10, or $100 et aider moi à garder cette extension au top !" 
    312316 
    313 #: wp-to-twitter-manager.php:955 
     317#: wp-to-twitter-manager.php:958 
    314318msgid "Upgrade Now!" 
    315319msgstr "Mettre à jour maintenant !" 
    316320 
    317 #: wp-to-twitter-manager.php:958 
     321#: wp-to-twitter-manager.php:961 
    318322msgid "Extra features with the PRO upgrade:" 
    319323msgstr "Les fonctionnalités supplémentaires avec la version PRO :" 
    320324 
    321 #: wp-to-twitter-manager.php:960 
     325#: wp-to-twitter-manager.php:963 
    322326msgid "Users can post to their own Twitter accounts" 
    323327msgstr "Les utilisateurs peuvent publier sur leurs propres comptes Twitter" 
    324328 
    325 #: wp-to-twitter-manager.php:961 
     329#: wp-to-twitter-manager.php:964 
    326330msgid "Set a timer to send your Tweet minutes or hours after you publish the post" 
    327331msgstr "Réglez une minuterie pour envoyer vos Tweets à un moment différents de l'heure de publication de l'article" 
    328332 
    329 #: wp-to-twitter-manager.php:962 
     333#: wp-to-twitter-manager.php:965 
    330334msgid "Automatically re-send Tweets at an assigned time after publishing" 
    331335msgstr "Automatiquement ré-envoyer les tweets à un temps imparti après la publication" 
    332336 
    333 #: wp-to-twitter-manager.php:971 
     337#: wp-to-twitter-manager.php:974 
    334338msgid "Shortcodes" 
    335339msgstr "Raccourcis" 
    336340 
    337 #: wp-to-twitter-manager.php:973 
     341#: wp-to-twitter-manager.php:976 
    338342msgid "Available in post update templates:" 
    339343msgstr "Raccourcis disponibles dans les modèles de mises à jour d'article :" 
    340344 
    341 #: wp-to-twitter-manager.php:975 
     345#: wp-to-twitter-manager.php:978 
    342346msgid "<code>#title#</code>: the title of your blog post" 
    343347msgstr "<code>#title#</code> : le titre de votre article" 
    344348 
    345 #: wp-to-twitter-manager.php:976 
     349#: wp-to-twitter-manager.php:979 
    346350msgid "<code>#blog#</code>: the title of your blog" 
    347351msgstr "<code>#blog#</code> : titre de votre blog" 
    348352 
    349 #: wp-to-twitter-manager.php:977 
     353#: wp-to-twitter-manager.php:980 
    350354msgid "<code>#post#</code>: a short excerpt of the post content" 
    351355msgstr "<code>#post#</code> : un court extrait du contenu de l'article" 
    352356 
    353 #: wp-to-twitter-manager.php:978 
     357#: wp-to-twitter-manager.php:981 
    354358msgid "<code>#category#</code>: the first selected category for the post" 
    355359msgstr "<code>#category#</code>: la première catégorie sélectionnée pour l'article" 
    356360 
    357 #: wp-to-twitter-manager.php:979 
     361#: wp-to-twitter-manager.php:982 
    358362msgid "<code>#date#</code>: the post date" 
    359363msgstr "<code>#date#</code> : la date de l'article" 
    360364 
    361 #: wp-to-twitter-manager.php:981 
     365#: wp-to-twitter-manager.php:984 
    362366msgid "<code>#url#</code>: the post URL" 
    363367msgstr "<code>#url#</code> : l'URL de l'article" 
    364368 
    365 #: wp-to-twitter-manager.php:984 
     369#: wp-to-twitter-manager.php:987 
    366370msgid "<code>#account#</code>: the twitter @reference for the account (or the author, if author settings are enabled and set.)" 
    367371msgstr "<code>#account#</code> :  la référence twitter @ pour le compte (ou l'auteur, si les paramètres d'auteur sont activés et réglés.)" 
    368372 
    369 #: wp-to-twitter-manager.php:985 
     373#: wp-to-twitter-manager.php:988 
    370374msgid "<code>#tags#</code>: your tags modified into hashtags. See options in the Advanced Settings section, below." 
    371375msgstr "<code>#tags#</code>: vos mots-clefs changés en hashtags. Voir les options dans la section Réglages avancés, ci-dessous." 
    372376 
    373 #: wp-to-twitter-manager.php:990 
     377#: wp-to-twitter-manager.php:993 
    374378msgid "You can also create custom shortcodes to access WordPress custom fields. Use doubled square brackets surrounding the name of your custom field to add the value of that custom field to your status update. Example: <code>[[custom_field]]</code></p>" 
    375379msgstr "Vous pouvez également créer des raccourcis personnalisés afin d'accéder aux champs personnalisés de WordPress. Utiliser les doubles crochets pour encadrer le nom de votre champ personnalisé afin d'ajouter la valeur de ce champ à la mise à jour de votre statut. Exemple : <code>[[champ_personnalisé]]</code></p>" 
    376380 
    377 #: wp-to-twitter-oauth.php:96 
     381#: wp-to-twitter-oauth.php:107 
    378382msgid "WP to Twitter was unable to establish a connection to Twitter." 
    379383msgstr "WP to Twitter est incapable d'établir la connexion avec Twitter." 
    380384 
    381 #: wp-to-twitter-oauth.php:166 
     385#: wp-to-twitter-oauth.php:177 
    382386msgid "There was an error querying Twitter's servers" 
    383387msgstr "Il y a eu une erreur en interrogeant les serveurs de Twitter" 
    384388 
    385 #: wp-to-twitter-oauth.php:182 wp-to-twitter-oauth.php:184 
     389#: wp-to-twitter-oauth.php:193 wp-to-twitter-oauth.php:195 
    386390msgid "Connect to Twitter" 
    387391msgstr "Connectez-vous à Twitter" 
    388392 
    389 #: wp-to-twitter-oauth.php:187 
     393#: wp-to-twitter-oauth.php:198 
    390394msgid "WP to Twitter Set-up" 
    391395msgstr "Configuration de WP to Twitter" 
    392396 
    393 #: wp-to-twitter-oauth.php:188 wp-to-twitter-oauth.php:281 
     397#: wp-to-twitter-oauth.php:199 wp-to-twitter-oauth.php:292 
    394398msgid "Your server time:" 
    395399msgstr "Heure de votre serveur : " 
    396400 
    397 #: wp-to-twitter-oauth.php:188 
     401#: wp-to-twitter-oauth.php:199 
    398402msgid "Twitter's time:" 
    399403msgstr "Heure Twitter :" 
    400404 
    401 #: wp-to-twitter-oauth.php:188 
     405#: wp-to-twitter-oauth.php:199 
    402406msgid "If these timestamps are not within 5 minutes of each other, your server will not connect to Twitter." 
    403407msgstr "Si ces horodatages ne sont pas séparés de moins de 5 minutes l'un de l'autre, votre serveur ne se connectera pas à Twitter." 
    404408 
    405 #: wp-to-twitter-oauth.php:192 
     409#: wp-to-twitter-oauth.php:203 
    406410msgid "<em>Note</em>: you will not add your Twitter user information to WP to Twitter; it is not used in this authentication method." 
    407411msgstr "<em>Remarque </em>: vous n'ajouterez pas vos informations d'utilisateur Twitter à WP to Twitter, elles ne sont pas utilisées dans cette méthode d'authentification." 
    408412 
    409 #: wp-to-twitter-oauth.php:196 
     413#: wp-to-twitter-oauth.php:207 
    410414msgid "1. Register this site as an application on " 
    411415msgstr "1. Enregistrer ce site comme une application sur " 
    412416 
    413 #: wp-to-twitter-oauth.php:196 
     417#: wp-to-twitter-oauth.php:207 
    414418msgid "Twitter's application registration page" 
    415419msgstr "la page Twitter d'enregistrement d'application" 
    416420 
    417 #: wp-to-twitter-oauth.php:198 
     421#: wp-to-twitter-oauth.php:209 
    418422msgid "If you're not currently logged in to Twitter, log-in to the account you want associated with this site" 
    419423msgstr "Si vous n'êtes pas actuellement connecté à Twitter, connectez-vous au compte que vous souhaitez associer à ce site" 
    420424 
    421 #: wp-to-twitter-oauth.php:199 
     425#: wp-to-twitter-oauth.php:210 
    422426msgid "Your Application's Name will show up after \"via\" in your twitter stream. Your application name cannot include the word \"Twitter.\"" 
    423427msgstr "Le nom de votre application sera affiché après \"via \" dans votre flux twitter. Votre nom d'application ne peut pas inclure le mot \"Twitter.\"" 
    424428 
    425 #: wp-to-twitter-oauth.php:200 
     429#: wp-to-twitter-oauth.php:211 
    426430msgid "Your Application Description can be anything." 
    427431msgstr "La description de votre application peut être n'importe quoi" 
    428432 
    429 #: wp-to-twitter-oauth.php:201 
     433#: wp-to-twitter-oauth.php:212 
    430434msgid "The WebSite and Callback URL should be " 
    431435msgstr "L'URL du site et de callback doit être " 
    432436 
    433 #: wp-to-twitter-oauth.php:203 
     437#: wp-to-twitter-oauth.php:214 
    434438msgid "Agree to the Developer Rules of the Road and continue." 
    435439msgstr "Accepter 'the Developper Rules of the Road' et continuer." 
    436440 
    437 #: wp-to-twitter-oauth.php:204 
     441#: wp-to-twitter-oauth.php:215 
    438442msgid "2. Switch to the \"Settings\" tab in Twitter apps" 
    439443msgstr "2. Passez dans l'onglet  \"Settings\" de l'application Twitter" 
    440444 
    441 #: wp-to-twitter-oauth.php:206 
     445#: wp-to-twitter-oauth.php:217 
    442446msgid "Select \"Read and Write\" for the Application Type" 
    443447msgstr "Sélectionnez \"Read and Write\" pour le type d'application" 
    444448 
    445 #: wp-to-twitter-oauth.php:207 
     449#: wp-to-twitter-oauth.php:218 
    446450msgid "Update the application settings" 
    447451msgstr "Mettez à jour les réglages de l'application" 
    448452 
    449 #: wp-to-twitter-oauth.php:208 
     453#: wp-to-twitter-oauth.php:219 
    450454msgid "Return to the Details tab and create your access token. Refresh page to view your access tokens." 
    451455msgstr "Revenez à l'onglet Détails et créez votre jeton d'accès. Actualiser la page pour voir vos jetons d'accès." 
    452456 
    453 #: wp-to-twitter-oauth.php:210 
     457#: wp-to-twitter-oauth.php:221 
    454458msgid "Once you have registered your site as an application, you will be provided with four keys." 
    455459msgstr "Une fois que vous avez enregistré votre site en tant qu'application, il vous sera fourni quatre clefs." 
    456460 
    457 #: wp-to-twitter-oauth.php:211 
     461#: wp-to-twitter-oauth.php:222 
    458462msgid "3. Copy and paste your consumer key and consumer secret into the fields below" 
    459463msgstr "3. Copiez et collez votre clef (consumer key) et votre clef secrète (consumer secret) dans les champs ci-dessous" 
    460464 
    461 #: wp-to-twitter-oauth.php:214 
     465#: wp-to-twitter-oauth.php:225 
    462466msgid "Twitter Consumer Key" 
    463467msgstr "Twitter Consumer Key" 
    464468 
    465 #: wp-to-twitter-oauth.php:218 
     469#: wp-to-twitter-oauth.php:229 
    466470msgid "Twitter Consumer Secret" 
    467471msgstr "Twitter Consumer Secret" 
    468472 
    469 #: wp-to-twitter-oauth.php:222 
     473#: wp-to-twitter-oauth.php:233 
    470474msgid "4. Copy and paste your Access Token and Access Token Secret into the fields below" 
    471475msgstr "4. Copiez et collez votre jeton d'accès et votre jeton d'accès secret (Token and Access Token Secret ) dans les champs ci-dessous" 
    472476 
    473 #: wp-to-twitter-oauth.php:223 
     477#: wp-to-twitter-oauth.php:234 
    474478msgid "If the Access level for your Access Token is not \"<em>Read and write</em>\", you must return to step 2 and generate a new Access Token." 
    475479msgstr "Si le niveau d'accès pour votre jeton d'accès (Access Token) n'est pas \"<em>Read and write</em>\", vous devez retourner à l'étape 2 et générer un nouveau jeton d'accès" 
    476480 
    477 #: wp-to-twitter-oauth.php:226 
     481#: wp-to-twitter-oauth.php:237 
    478482msgid "Access Token" 
    479483msgstr "Access Token" 
    480484 
    481 #: wp-to-twitter-oauth.php:230 
     485#: wp-to-twitter-oauth.php:241 
    482486msgid "Access Token Secret" 
    483487msgstr "Access Token Secret" 
    484488 
    485 #: wp-to-twitter-oauth.php:249 
     489#: wp-to-twitter-oauth.php:260 
    486490msgid "Disconnect Your WordPress and Twitter Account" 
    487491msgstr "Déconnecter votre WordPress de votre compte Twitter" 
    488492 
    489 #: wp-to-twitter-oauth.php:253 
     493#: wp-to-twitter-oauth.php:264 
    490494msgid "Disconnect your WordPress and Twitter Account" 
    491495msgstr "Déconnecter votre WordPress de votre compte Twitter" 
    492496 
    493 #: wp-to-twitter-oauth.php:255 
     497#: wp-to-twitter-oauth.php:266 
    494498msgid "<strong>Troubleshooting tip:</strong> Connected, but getting a notice that your Authentication credentials are missing or incorrect? Check whether your Access token has read and write permission. If not, you'll need to create a new token." 
    495499msgstr "<strong>Astuce de Dépannage : </strong> Connecté, mais recevant un avis que vos informations d'authentification sont manquantes ou incorrectes? Vérifiez si votre jeton d'accès a la permission de lecture et d'écriture. Si non, vous aurez besoin pour créer un nouveau jeton." 
    496500 
    497 #: wp-to-twitter-oauth.php:263 
     501#: wp-to-twitter-oauth.php:274 
    498502msgid "Disconnect from Twitter" 
    499503msgstr "Vous deconnectez de Twitter" 
    500504 
    501 #: wp-to-twitter-oauth.php:269 
     505#: wp-to-twitter-oauth.php:280 
    502506msgid "Twitter Username " 
    503507msgstr "Nom d'utilisateur Twitter" 
    504508 
    505 #: wp-to-twitter-oauth.php:270 
     509#: wp-to-twitter-oauth.php:281 
    506510msgid "Consumer Key " 
    507511msgstr "Consumer Key " 
    508512 
    509 #: wp-to-twitter-oauth.php:271 
     513#: wp-to-twitter-oauth.php:282 
    510514msgid "Consumer Secret " 
    511515msgstr "Secret d'utilisateur" 
    512516 
    513 #: wp-to-twitter-oauth.php:272 
     517#: wp-to-twitter-oauth.php:283 
    514518msgid "Access Token " 
    515519msgstr "Access Token " 
    516520 
    517 #: wp-to-twitter-oauth.php:273 
     521#: wp-to-twitter-oauth.php:284 
    518522msgid "Access Token Secret " 
    519523msgstr "Access Token Secret " 
    520524 
    521 #: wp-to-twitter-oauth.php:281 
     525#: wp-to-twitter-oauth.php:292 
    522526msgid "Twitter's current server time: " 
    523527msgstr "Heure actuelle du serveur Twitter :" 
    524528 
    525 #: wp-to-twitter.php:45 
     529#: wp-to-twitter.php:49 
    526530msgid "WP to Twitter requires PHP version 5 or above. Please upgrade PHP to run WP to Twitter." 
    527531msgstr "WP to Twitter requiert la version PHP 5 ou supérieur. S'il vous plaît mettre à jour PHP pour exécuter WP to Twitter." 
    528532 
    529 #: wp-to-twitter.php:92 
     533#: wp-to-twitter.php:94 
    530534msgid "Twitter requires authentication by OAuth. You will need to <a href='%s'>update your settings</a> to complete installation of WP to Twitter." 
    531535msgstr "Twitter requiert une authentification par OAuth. Vous avez besoin de <a href='%s'>mettre à jour</a> vos réglages pour terminer l'installation de WP to Twitter." 
    532536 
    533 #: wp-to-twitter.php:318 
     537#: wp-to-twitter.php:320 
    534538msgid "200 OK: Success!" 
    535539msgstr "200 OK : Succès !" 
    536540 
    537 #: wp-to-twitter.php:323 
     541#: wp-to-twitter.php:325 
    538542msgid "400 Bad Request: The request was invalid. This is the status code returned during rate limiting." 
    539543msgstr "400 Bad Request : La demande n'était pas valide. C'est le code d'état retourné lors de la limitation du débit." 
    540544 
    541 #: wp-to-twitter.php:327 
     545#: wp-to-twitter.php:329 
    542546msgid "401 Unauthorized: Authentication credentials were missing or incorrect." 
    543547msgstr "401 Unauthorized : informations d'authentification sont manquantes ou incorrectes." 
    544548 
    545 #: wp-to-twitter.php:332 
     549#: wp-to-twitter.php:334 
    546550msgid "403 Forbidden: The request is understood, but it has been refused. This code is used when requests are understood, but are denied by Twitter. Reasons can include: Too many Tweets created in a short time or the same Tweet was submitted twice in a row, among others. This is not an error by WP to Twitter." 
    547551msgstr "403 Forbidden : La requète est comprise, mais a été refusée. Ce code est utilisé lorsque les requètes sont comprises, mais sont refusées par Twitter. Ces raisons peuvent inclure : Trop de Tweets créés dans un laps de temps trop court ou le même Tweet a été présenté deux fois de suite, entre autres. Ce n'est pas une erreur de WP to Twitter." 
    548552 
    549 #: wp-to-twitter.php:348 
     553#: wp-to-twitter.php:350 
    550554msgid "500 Internal Server Error: Something is broken at Twitter." 
    551555msgstr "500 Internal Server Error : Quelque chose est cassé chez Twitter." 
    552556 
    553 #: wp-to-twitter.php:356 
     557#: wp-to-twitter.php:358 
    554558msgid "503 Service Unavailable: The Twitter servers are up, but overloaded with requests - Please try again later." 
    555559msgstr "503 Service Unavailable : Les serveurs de Twitter fonctionnent, mais sont surchargés de demandes - Veuillez réessayer plus tard." 
    556560 
    557 #: wp-to-twitter.php:352 
     561#: wp-to-twitter.php:354 
    558562msgid "502 Bad Gateway: Twitter is down or being upgraded." 
    559563msgstr "502 Bad Gateway : Twitter est en panne ou en cours de mis à jour." 
    560564 
    561 #: wp-to-twitter.php:390 
     565#: wp-to-twitter.php:392 
    562566msgid "No Twitter OAuth connection found." 
    563567msgstr "Pas de connexion Twitter OAuth trouvé." 
    564568 
    565 #: wp-to-twitter.php:1079 
     569#: wp-to-twitter.php:1102 
    566570msgid "WP Tweets" 
    567571msgstr "WP Tweets" 
    568572 
    569 #: wp-to-twitter.php:1121 
     573#: wp-to-twitter.php:1144 
    570574msgid "Previous Tweets" 
    571575msgstr "Tweets précédents" 
    572576 
    573 #: wp-to-twitter.php:1157 
     577#: wp-to-twitter.php:1180 
    574578msgid "Custom Twitter Post" 
    575579msgstr "Message personnalisé Twitter" 
    576580 
    577 #: wp-to-twitter.php:1181 
     581#: wp-to-twitter.php:1204 
    578582msgid "Your template:" 
    579583msgstr "Votre modèle :" 
    580584 
    581 #: wp-to-twitter.php:1186 
     585#: wp-to-twitter.php:1209 
    582586msgid "YOURLS Custom Keyword" 
    583587msgstr "Mot-clef personnalisé de YOURLS" 
    584588 
    585 #: wp-to-twitter.php:1224 
     589#: wp-to-twitter.php:1247 
    586590msgid "Upgrade to WP Tweets Pro" 
    587591msgstr "Mise à niveau vers WP Tweets Pro" 
    588592 
    589 #: wp-to-twitter.php:1198 
     593#: wp-to-twitter.php:1221 
    590594msgid "Don't Tweet this post." 
    591595msgstr "Ne pas publier cet article sur Twitter." 
    592596 
    593 #: wp-to-twitter.php:1198 
     597#: wp-to-twitter.php:1221 
    594598msgid "Tweet this post." 
    595599msgstr "Tweeter cet article." 
    596600 
    597 #: wp-to-twitter.php:1210 
     601#: wp-to-twitter.php:1233 
    598602msgid "Access to customizing WP to Twitter values is not allowed for your user role." 
    599603msgstr "L'accès à la personnalisation des valeurs de WP to Twitter n'est pas autorisée pour votre rôle d'utilisateur." 
    600604 
    601 #: wp-to-twitter.php:1280 
     605#: wp-to-twitter.php:1299 
    602606msgid "Characters left: " 
    603607msgstr "Caractères restants :" 
    604608 
    605 #: wp-to-twitter.php:1341 
     609#: wp-to-twitter.php:1359 
    606610msgid "WP Tweets User Settings" 
    607611msgstr "Réglages de l'utilisateur de WP to Twitter" 
    608612 
    609 #: wp-to-twitter.php:1345 
     613#: wp-to-twitter.php:1363 
    610614msgid "Use My Twitter Username" 
    611615msgstr "Utiliser votre nom d'utilisateur Twitter" 
    612616 
    613 #: wp-to-twitter.php:1346 
     617#: wp-to-twitter.php:1364 
    614618msgid "Tweet my posts with an @ reference to my username." 
    615619msgstr "Tweeter mes articles avec une référence @ à mon nom d'utilisateur." 
    616620 
    617 #: wp-to-twitter.php:1347 
     621#: wp-to-twitter.php:1365 
    618622msgid "Tweet my posts with an @ reference to both my username and to the main site username." 
    619623msgstr "Tweeter mes articles avec une référence @ à la fois à mon nom d'utilisateur et au nom d'utilisateur du site principal." 
    620624 
    621 #: wp-to-twitter.php:1351 
     625#: wp-to-twitter.php:1369 
    622626msgid "Your Twitter Username" 
    623627msgstr "Nom d'utilisateur Twitter" 
    624628 
    625 #: wp-to-twitter.php:1352 
     629#: wp-to-twitter.php:1370 
    626630msgid "Enter your own Twitter username." 
    627631msgstr "Saisissez votre nom d'utilisateur Twitter." 
    628632 
    629 #: wp-to-twitter.php:1405 
     633#: wp-to-twitter.php:1423 
    630634msgid "Check off categories to tweet" 
    631635msgstr "Cochez les catégories que vous souhaitez tweeter" 
    632636 
    633 #: wp-to-twitter.php:1409 
     637#: wp-to-twitter.php:1427 
    634638msgid "Do not tweet posts in checked categories (Reverses default behavior)" 
    635639msgstr "Ne pas tweeter les articles dans les catégories cochées (Inverse le comportement par défaut)" 
    636640 
    637 #: wp-to-twitter.php:1426 
     641#: wp-to-twitter.php:1444 
    638642msgid "Limits are exclusive. If a post is in one category which should be posted and one category that should not, it will not be posted." 
    639643msgstr "Les limitations sont exclusives. Si un article est dans une catégorie qui devrait être affichée et une catégorie qui ne devrait pas, il ne sera pas affiché." 
    640644 
    641 #: wp-to-twitter.php:1429 
     645#: wp-to-twitter.php:1447 
    642646msgid "Set Categories" 
    643647msgstr "Configurer les catégories" 
    644648 
    645 #: wp-to-twitter.php:1451 
     649#: wp-to-twitter.php:1469 
    646650msgid "Settings" 
    647651msgstr "Réglages" 
    648652 
    649 #: wp-to-twitter.php:1486 
     653#: wp-to-twitter.php:1504 
    650654msgid "<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href=\"%1$s\">changelog</a> before upgrading." 
    651655msgstr "<br /><strong>Remarque :</strong> S'il vous plaît examiner le <a class=\"thickbox\" href=\"%1$s\">changelog</a> avant de faire la mise à jour." 
     
    694698msgstr "Les informations supplémentaires suivantes seront envoyées avec votre demande de soutien :" 
    695699 
    696 #: wp-to-twitter-manager.php:40 
     700#: wp-to-twitter-manager.php:39 
    697701msgid "No error information is available for your shortener." 
    698702msgstr "Aucune information d'erreur est disponible pour votre raccourcisseur." 
    699703 
    700 #: wp-to-twitter-manager.php:42 
     704#: wp-to-twitter-manager.php:41 
    701705msgid "<li class=\"error\"><strong>WP to Twitter was unable to contact your selected URL shortening service.</strong></li>" 
    702706msgstr "<li class=\"error\"><strong>L'extension WP to Twitter n'a pas réussi à se connecter au service de réduction d'URL que vous avez choisi.</strong></li>" 
    703707 
    704 #: wp-to-twitter-manager.php:45 
     708#: wp-to-twitter-manager.php:44 
    705709msgid "<li><strong>WP to Twitter successfully contacted your selected URL shortening service.</strong>  The following link should point to your blog homepage:" 
    706710msgstr "<li><strong>L'extension WP to Twitter s'est connecté avec succés au service de réduction d'URL que vous avez choisi.</strong>  Le lien suivant doit renvoyer à la page d'accueil de votre blog :" 
    707711 
    708 #: wp-to-twitter-manager.php:53 
     712#: wp-to-twitter-manager.php:52 
    709713msgid "<li><strong>WP to Twitter successfully submitted a status update to Twitter.</strong></li>" 
    710714msgstr "<li><strong>WP to Twitter a soumis avec succès une mise à jour de statut sur Twitter.</strong></li>" 
    711715 
    712 #: wp-to-twitter-manager.php:56 
     716#: wp-to-twitter-manager.php:55 
    713717msgid "<li class=\"error\"><strong>WP to Twitter failed to submit an update to Twitter.</strong></li>" 
    714718msgstr "<li class=\"error\"><strong>WP to Twitter n'a pas réussi à soumettre une mise à jour du statut sur Twitter.</strong></li>" 
    715719 
    716 #: wp-to-twitter-manager.php:60 
     720#: wp-to-twitter-manager.php:59 
    717721msgid "You have not connected WordPress to Twitter." 
    718722msgstr "Vous n'avez pas connecter WordPress à Twitter." 
    719723 
    720 #: wp-to-twitter-manager.php:64 
     724#: wp-to-twitter-manager.php:63 
    721725msgid "<li class=\"error\"><strong>Your server does not appear to support the required methods for WP to Twitter to function.</strong> You can try it anyway - these tests aren't perfect.</li>" 
    722726msgstr "<li class=\"error\"><strong>Votre serveur ne semble pas supporter les méthodes nécessaires au fonctionnement de Twitter.</strong> Cependant, vous pouvez réessayer car ces tests ne sont pas parfaits.</li>" 
    723727 
    724 #: wp-to-twitter-manager.php:68 
     728#: wp-to-twitter-manager.php:67 
    725729msgid "<li><strong>Your server should run WP to Twitter successfully.</strong></li>" 
    726730msgstr "<li><strong>Votre serveur devrait correctement exécuter l'extension WP to Twitter.</strong></li>" 
    727731 
    728 #: wp-to-twitter-manager.php:86 
     732#: wp-to-twitter-manager.php:85 
    729733msgid "WP to Twitter Errors Cleared" 
    730734msgstr "Erreurs de l'extension WP to Twitter effacées" 
    731735 
    732 #: wp-to-twitter-manager.php:170 
     736#: wp-to-twitter-manager.php:169 
    733737msgid "WP to Twitter is now connected with Twitter." 
    734738msgstr "WP to Twitter est maintenat connecté avec Twitter." 
    735739 
    736 #: wp-to-twitter-manager.php:184 
     740#: wp-to-twitter-manager.php:183 
    737741msgid "OAuth Authentication Data Cleared." 
    738742msgstr "Données d'authentification OAuth éffacées." 
    739743 
    740 #: wp-to-twitter-manager.php:191 
     744#: wp-to-twitter-manager.php:190 
    741745msgid "OAuth Authentication Failed. Your server time is not in sync with the Twitter servers. Talk to your hosting service to see what can be done." 
    742746msgstr "Échec de l'authentification OAuth. L'heure de votre serveur n'est pas synchronisée avec les serveurs de Twitter. Parlez-en à votre service d'hébergement pour voir ce qui peut être fait." 
    743747 
    744 #: wp-to-twitter-manager.php:198 
     748#: wp-to-twitter-manager.php:197 
    745749msgid "OAuth Authentication response not understood." 
    746750msgstr "Réponse d'authentification OAuth non comprise." 
     
    10181022msgstr "Réglages avancés" 
    10191023 
    1020 #: wp-to-twitter-manager.php:707 wp-to-twitter-manager.php:872 
     1024#: wp-to-twitter-manager.php:707 wp-to-twitter-manager.php:875 
    10211025msgid "Save Advanced WP->Twitter Options" 
    10221026msgstr "Enregistrer les options avancées de WP->Twitter " 
     
    10341038msgstr "Les espaces dans les mots-clefs remplacées par :" 
    10351039 
    1036 #: wp-to-twitter-manager.php:714 
     1040#: wp-to-twitter-manager.php:713 
    10371041msgid "Default replacement is an underscore (<code>_</code>). Use <code>[ ]</code> to remove spaces entirely." 
    10381042msgstr "Par défaut, le caractère de remplacement est un underscore (<code>_</code>). Pour supprimer entièrement les espaces, utilisez le code suivant : <code>[ ]</code>." 
    10391043 
    1040 #: wp-to-twitter-manager.php:717 
     1044#: wp-to-twitter-manager.php:720 
    10411045msgid "Maximum number of tags to include:" 
    10421046msgstr "Nombre maximal de mots-clefs à ajouter :" 
    10431047 
    1044 #: wp-to-twitter-manager.php:718 
     1048#: wp-to-twitter-manager.php:721 
    10451049msgid "Maximum length in characters for included tags:" 
    10461050msgstr "Nombre de caractères maximum pour un mot-clef ajouté :" 
    10471051 
    1048 #: wp-to-twitter-manager.php:719 
     1052#: wp-to-twitter-manager.php:722 
    10491053msgid "These options allow you to restrict the length and number of WordPress tags sent to Twitter as hashtags. Set to <code>0</code> or leave blank to allow any and all tags." 
    10501054msgstr "Ces options vous permettent de restreindre la longueur et le nombre de mots-clefs WordPress envoyés sur Twitter sous forme de hashtags. Configurer ainsi : <code>0</code> ou laisser un espace vide pour autoriser toute sorte de mots-clefs." 
    10511055 
    1052 #: wp-to-twitter-manager.php:722 
     1056#: wp-to-twitter-manager.php:725 
    10531057msgid "Length of post excerpt (in characters):" 
    10541058msgstr "Longueur de l'extrait de l'article (en nombre de caractères) :" 
    10551059 
    1056 #: wp-to-twitter-manager.php:722 
     1060#: wp-to-twitter-manager.php:725 
    10571061msgid "By default, extracted from the post itself. If you use the 'Excerpt' field, that will be used instead." 
    10581062msgstr "Par défaut extrait du contenu de l'article. Si vous spécifiez le champ \"Excerpt\", son contenu sera utilisé à la place." 
    10591063 
    1060 #: wp-to-twitter-manager.php:725 
     1064#: wp-to-twitter-manager.php:728 
    10611065msgid "WP to Twitter Date Formatting:" 
    10621066msgstr "Date de formatage de l'extension WP to Twitter :" 
    10631067 
    1064 #: wp-to-twitter-manager.php:726 
     1068#: wp-to-twitter-manager.php:729 
    10651069msgid "Default is from your general settings. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Date Formatting Documentation</a>." 
    10661070msgstr "L'ensemble de vos réglages sont des réglages par défaut. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Informations sur la date de formatage</a>." 
    10671071 
    1068 #: wp-to-twitter-manager.php:730 
     1072#: wp-to-twitter-manager.php:733 
    10691073msgid "Custom text before all Tweets:" 
    10701074msgstr "Personnaliser le texte avant chaque tweet :" 
    10711075 
    1072 #: wp-to-twitter-manager.php:731 
     1076#: wp-to-twitter-manager.php:734 
    10731077msgid "Custom text after all Tweets:" 
    10741078msgstr "Personnaliser le texte après chaque tweet :" 
    10751079 
    1076 #: wp-to-twitter-manager.php:734 
     1080#: wp-to-twitter-manager.php:737 
    10771081msgid "Custom field for an alternate URL to be shortened and Tweeted:" 
    10781082msgstr "Personnaliser le champ pour une URL alternative à réduire et à publier sur Twitter :" 
    10791083 
    1080 #: wp-to-twitter-manager.php:735 
     1084#: wp-to-twitter-manager.php:738 
    10811085msgid "You can use a custom field to send an alternate URL for your post. The value is the name of a custom field containing your external URL." 
    10821086msgstr "Vous pouvez utiliser un champ personnalisé pour envoyer une URL alternative pour vos articles. La valeur est le nom d'un champ personnalisé contenant votre URL externe." 
    10831087 
    1084 #: wp-to-twitter-manager.php:758 
     1088#: wp-to-twitter-manager.php:761 
    10851089msgid "Preferred status update truncation sequence" 
    10861090msgstr "Séquence d'abbreviation préférée de la mise a jour de votre statut" 
    10871091 
    1088 #: wp-to-twitter-manager.php:761 
     1092#: wp-to-twitter-manager.php:764 
    10891093msgid "This is the order in which items will be abbreviated or removed from your status update if it is too long to send to Twitter." 
    10901094msgstr "C'est l'ordre dans lequel les articles seront abrégés ou supprimés de votre mise à jour de statut s'il est trop long pour être envoyé sur Twitter." 
    10911095 
    1092 #: wp-to-twitter-manager.php:766 
     1096#: wp-to-twitter-manager.php:769 
    10931097msgid "Special Cases when WordPress should send a Tweet" 
    10941098msgstr "Cas particuliers lorsque WordPress doit envoyer un tweet" 
    10951099 
    1096 #: wp-to-twitter-manager.php:769 
     1100#: wp-to-twitter-manager.php:772 
    10971101msgid "Do not post Tweets by default" 
    10981102msgstr "Ne pas publier de Tweets par défaut" 
    10991103 
    1100 #: wp-to-twitter-manager.php:772 
     1104#: wp-to-twitter-manager.php:775 
    11011105msgid "By default, all posts meeting other requirements will be posted to Twitter. Check this to change your setting." 
    11021106msgstr "Tous les articles répondant à d'autres modalités seront postés par défaut sur Twitter. Cochez cette case pour changer le réglage." 
    11031107 
    1104 #: wp-to-twitter-manager.php:776 
     1108#: wp-to-twitter-manager.php:779 
    11051109msgid "Allow status updates from Quick Edit" 
    11061110msgstr "Autoriser les mises à jour de statut dans le Press-Minute" 
    11071111 
    1108 #: wp-to-twitter-manager.php:777 
     1112#: wp-to-twitter-manager.php:780 
    11091113msgid "If checked, all posts edited individually or in bulk through the Quick Edit feature will be Tweeted." 
    11101114msgstr "Si cochée, tous les articles modifiés individuellement ou en actions groupées grâce à la fonction Modification Rapide seront tweetés." 
    11111115 
    1112 #: wp-to-twitter-manager.php:782 
     1116#: wp-to-twitter-manager.php:785 
    11131117msgid "Delaying tweets with WP Tweets PRO moves Tweeting to an publishing-independent action." 
    11141118msgstr "Retarder les tweets avec WP Tweets PRO transforme le tweeting en une action d'édition indépendante." 
    11151119 
    1116 #: wp-to-twitter-manager.php:789 
     1120#: wp-to-twitter-manager.php:792 
    11171121msgid "Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)" 
    11181122msgstr "Envoyer les mises à jour Twitter sur publication distante (Envoyé par e-mail ou par Client XMLRPC)" 
    11191123 
    1120 #: wp-to-twitter-manager.php:794 
     1124#: wp-to-twitter-manager.php:797 
    11211125msgid "Google Analytics Settings" 
    11221126msgstr "Réglages Google Analytics" 
    11231127 
    1124 #: wp-to-twitter-manager.php:795 
     1128#: wp-to-twitter-manager.php:798 
    11251129msgid "You can track the response from Twitter using Google Analytics by defining a campaign identifier here. You can either define a static identifier or a dynamic identifier. Static identifiers don't change from post to post; dynamic identifiers are derived from information relevant to the specific post. Dynamic identifiers will allow you to break down your statistics by an additional variable." 
    11261130msgstr "Vous pouvez suivre la réponse depuis Twitter grâce à Google Analytics en spécifiant un identifiant de campagne. Vous avez le choix entre un identifiant statique ou dynamique. Les identifiants statiques ne changent pas d'un article à un autre tandis que les dynamiques sont tirés d'informations liées à un article spécifique. Les identifiants dynamiques vous permettront d'analyser vos statistiques par variable additionnelle." 
    11271131 
    1128 #: wp-to-twitter-manager.php:799 
     1132#: wp-to-twitter-manager.php:802 
    11291133msgid "Use a Static Identifier with WP-to-Twitter" 
    11301134msgstr "Choisir un identifiant statique avec l'extension WP to Twitter" 
    11311135 
    1132 #: wp-to-twitter-manager.php:800 
     1136#: wp-to-twitter-manager.php:803 
    11331137msgid "Static Campaign identifier for Google Analytics:" 
    11341138msgstr "Identifiant de campagne statique pour Google Analytics :" 
    11351139 
    1136 #: wp-to-twitter-manager.php:804 
     1140#: wp-to-twitter-manager.php:807 
    11371141msgid "Use a dynamic identifier with Google Analytics and WP-to-Twitter" 
    11381142msgstr "Choisir un identifiant dynamique avec Google Analytics et l'extension WP to Twitter" 
    11391143 
    1140 #: wp-to-twitter-manager.php:805 
     1144#: wp-to-twitter-manager.php:808 
    11411145msgid "What dynamic identifier would you like to use?" 
    11421146msgstr "Quel identifiant dynamique choisissez-vous ?" 
    11431147 
    1144 #: wp-to-twitter-manager.php:807 
     1148#: wp-to-twitter-manager.php:810 
    11451149msgid "Category" 
    11461150msgstr "Catégorie" 
    11471151 
    1148 #: wp-to-twitter-manager.php:808 
     1152#: wp-to-twitter-manager.php:811 
    11491153msgid "Post ID" 
    11501154msgstr "ID de l'article" 
    11511155 
    1152 #: wp-to-twitter-manager.php:809 
     1156#: wp-to-twitter-manager.php:812 
    11531157msgid "Post Title" 
    11541158msgstr "Titre de l'article" 
    11551159 
    1156 #: wp-to-twitter-manager.php:810 
     1160#: wp-to-twitter-manager.php:813 
    11571161msgid "Author" 
    11581162msgstr "Auteur" 
  • wp-to-twitter/trunk/lang/wp-to-twitter.pot

    r649873 r690784  
    33msgid "" 
    44msgstr "" 
    5 "Project-Id-Version: WP to Twitter 2.5.3\n" 
     5"Project-Id-Version: WP to Twitter 2.5.9\n" 
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n" 
    7 "POT-Creation-Date: 2013-01-02 22:48:56+00:00\n" 
     7"POT-Creation-Date: 2013-02-18 18:24:52+00:00\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=UTF-8\n" 
     
    8181msgstr "" 
    8282 
    83 #: wp-to-twitter-manager.php:40 
     83#: wp-to-twitter-manager.php:39 
    8484msgid "No error information is available for your shortener." 
    8585msgstr "" 
    8686 
    87 #: wp-to-twitter-manager.php:42 
     87#: wp-to-twitter-manager.php:41 
    8888msgid "" 
    8989"<li class=\"error\"><strong>WP to Twitter was unable to contact your " 
     
    9191msgstr "" 
    9292 
    93 #: wp-to-twitter-manager.php:45 
     93#: wp-to-twitter-manager.php:44 
    9494msgid "" 
    9595"<li><strong>WP to Twitter successfully contacted your selected URL " 
     
    9898msgstr "" 
    9999 
    100 #: wp-to-twitter-manager.php:53 
     100#: wp-to-twitter-manager.php:52 
    101101msgid "" 
    102102"<li><strong>WP to Twitter successfully submitted a status update to Twitter." 
     
    104104msgstr "" 
    105105 
    106 #: wp-to-twitter-manager.php:56 
     106#: wp-to-twitter-manager.php:55 
    107107msgid "" 
    108108"<li class=\"error\"><strong>WP to Twitter failed to submit an update to " 
     
    110110msgstr "" 
    111111 
    112 #: wp-to-twitter-manager.php:60 
     112#: wp-to-twitter-manager.php:59 
    113113msgid "You have not connected WordPress to Twitter." 
    114114msgstr "" 
    115115 
    116 #: wp-to-twitter-manager.php:64 
     116#: wp-to-twitter-manager.php:63 
    117117msgid "" 
    118118"<li class=\"error\"><strong>Your server does not appear to support the " 
     
    121121msgstr "" 
    122122 
    123 #: wp-to-twitter-manager.php:68 
     123#: wp-to-twitter-manager.php:67 
    124124msgid "" 
    125125"<li><strong>Your server should run WP to Twitter successfully.</strong></li>" 
    126126msgstr "" 
    127127 
    128 #: wp-to-twitter-manager.php:86 
     128#: wp-to-twitter-manager.php:85 
    129129msgid "WP to Twitter Errors Cleared" 
    130130msgstr "" 
    131131 
    132 #: wp-to-twitter-manager.php:170 
     132#: wp-to-twitter-manager.php:169 
    133133msgid "WP to Twitter is now connected with Twitter." 
    134134msgstr "" 
    135135 
    136 #: wp-to-twitter-manager.php:177 
     136#: wp-to-twitter-manager.php:176 
    137137msgid "" 
    138138"WP to Twitter failed to connect with Twitter. Try <a href=\"#wpt_http" 
     
    140140msgstr "" 
    141141 
    142 #: wp-to-twitter-manager.php:184 
     142#: wp-to-twitter-manager.php:183 
    143143msgid "OAuth Authentication Data Cleared." 
    144144msgstr "" 
    145145 
    146 #: wp-to-twitter-manager.php:191 
     146#: wp-to-twitter-manager.php:190 
    147147msgid "" 
    148148"OAuth Authentication Failed. Your server time is not in sync with the " 
     
    150150msgstr "" 
    151151 
    152 #: wp-to-twitter-manager.php:198 
     152#: wp-to-twitter-manager.php:197 
    153153msgid "OAuth Authentication response not understood." 
    154154msgstr "" 
     
    523523msgstr "" 
    524524 
    525 #: wp-to-twitter-manager.php:707 wp-to-twitter-manager.php:872 
     525#: wp-to-twitter-manager.php:707 wp-to-twitter-manager.php:875 
    526526msgid "Save Advanced WP->Twitter Options" 
    527527msgstr "" 
     
    539539msgstr "" 
    540540 
    541 #: wp-to-twitter-manager.php:714 
     541#: wp-to-twitter-manager.php:713 
    542542msgid "" 
    543543"Default replacement is an underscore (<code>_</code>). Use <code>[ ]</code> " 
     
    545545msgstr "" 
    546546 
    547 #: wp-to-twitter-manager.php:717 
     547#: wp-to-twitter-manager.php:716 
     548msgid "Use tag slug as hashtag value" 
     549msgstr "" 
     550 
     551#: wp-to-twitter-manager.php:720 
    548552msgid "Maximum number of tags to include:" 
    549553msgstr "" 
    550554 
    551 #: wp-to-twitter-manager.php:718 
     555#: wp-to-twitter-manager.php:721 
    552556msgid "Maximum length in characters for included tags:" 
    553557msgstr "" 
    554558 
    555 #: wp-to-twitter-manager.php:719 
     559#: wp-to-twitter-manager.php:722 
    556560msgid "" 
    557561"These options allow you to restrict the length and number of WordPress tags " 
     
    560564msgstr "" 
    561565 
    562 #: wp-to-twitter-manager.php:722 
     566#: wp-to-twitter-manager.php:725 
    563567msgid "Length of post excerpt (in characters):" 
    564568msgstr "" 
    565569 
    566 #: wp-to-twitter-manager.php:722 
     570#: wp-to-twitter-manager.php:725 
    567571msgid "" 
    568572"By default, extracted from the post itself. If you use the 'Excerpt' field, " 
     
    570574msgstr "" 
    571575 
    572 #: wp-to-twitter-manager.php:725 
     576#: wp-to-twitter-manager.php:728 
    573577msgid "WP to Twitter Date Formatting:" 
    574578msgstr "" 
    575579 
    576 #: wp-to-twitter-manager.php:726 
     580#: wp-to-twitter-manager.php:729 
    577581msgid "" 
    578582"Default is from your general settings. <a href='http://codex.wordpress.org/" 
     
    580584msgstr "" 
    581585 
    582 #: wp-to-twitter-manager.php:730 
     586#: wp-to-twitter-manager.php:733 
    583587msgid "Custom text before all Tweets:" 
    584588msgstr "" 
    585589 
    586 #: wp-to-twitter-manager.php:731 
     590#: wp-to-twitter-manager.php:734 
    587591msgid "Custom text after all Tweets:" 
    588592msgstr "" 
    589593 
    590 #: wp-to-twitter-manager.php:734 
     594#: wp-to-twitter-manager.php:737 
    591595msgid "Custom field for an alternate URL to be shortened and Tweeted:" 
    592596msgstr "" 
    593597 
    594 #: wp-to-twitter-manager.php:735 
     598#: wp-to-twitter-manager.php:738 
    595599msgid "" 
    596600"You can use a custom field to send an alternate URL for your post. The value " 
     
    598602msgstr "" 
    599603 
    600 #: wp-to-twitter-manager.php:758 
     604#: wp-to-twitter-manager.php:761 
    601605msgid "Preferred status update truncation sequence" 
    602606msgstr "" 
    603607 
    604 #: wp-to-twitter-manager.php:761 
     608#: wp-to-twitter-manager.php:764 
    605609msgid "" 
    606610"This is the order in which items will be abbreviated or removed from your " 
     
    608612msgstr "" 
    609613 
    610 #: wp-to-twitter-manager.php:766 
     614#: wp-to-twitter-manager.php:769 
    611615msgid "Special Cases when WordPress should send a Tweet" 
    612616msgstr "" 
    613617 
    614 #: wp-to-twitter-manager.php:769 
     618#: wp-to-twitter-manager.php:772 
    615619msgid "Do not post Tweets by default" 
    616620msgstr "" 
    617621 
    618 #: wp-to-twitter-manager.php:771 
     622#: wp-to-twitter-manager.php:774 
    619623msgid "Do not post Tweets by default (editing only)" 
    620624msgstr "" 
    621625 
    622 #: wp-to-twitter-manager.php:772 
     626#: wp-to-twitter-manager.php:775 
    623627msgid "" 
    624628"By default, all posts meeting other requirements will be posted to Twitter. " 
     
    626630msgstr "" 
    627631 
    628 #: wp-to-twitter-manager.php:776 
     632#: wp-to-twitter-manager.php:779 
    629633msgid "Allow status updates from Quick Edit" 
    630634msgstr "" 
    631635 
    632 #: wp-to-twitter-manager.php:777 
     636#: wp-to-twitter-manager.php:780 
    633637msgid "" 
    634638"If checked, all posts edited individually or in bulk through the Quick Edit " 
     
    636640msgstr "" 
    637641 
    638 #: wp-to-twitter-manager.php:782 
     642#: wp-to-twitter-manager.php:785 
    639643msgid "" 
    640644"Delaying tweets with WP Tweets PRO moves Tweeting to an publishing-" 
     
    642646msgstr "" 
    643647 
    644 #: wp-to-twitter-manager.php:789 
     648#: wp-to-twitter-manager.php:792 
    645649msgid "" 
    646650"Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)" 
    647651msgstr "" 
    648652 
    649 #: wp-to-twitter-manager.php:794 
     653#: wp-to-twitter-manager.php:797 
    650654msgid "Google Analytics Settings" 
    651655msgstr "" 
    652656 
    653 #: wp-to-twitter-manager.php:795 
     657#: wp-to-twitter-manager.php:798 
    654658msgid "" 
    655659"You can track the response from Twitter using Google Analytics by defining a " 
     
    661665msgstr "" 
    662666 
    663 #: wp-to-twitter-manager.php:799 
     667#: wp-to-twitter-manager.php:802 
    664668msgid "Use a Static Identifier with WP-to-Twitter" 
    665669msgstr "" 
    666670 
    667 #: wp-to-twitter-manager.php:800 
     671#: wp-to-twitter-manager.php:803 
    668672msgid "Static Campaign identifier for Google Analytics:" 
    669673msgstr "" 
    670674 
    671 #: wp-to-twitter-manager.php:804 
     675#: wp-to-twitter-manager.php:807 
    672676msgid "Use a dynamic identifier with Google Analytics and WP-to-Twitter" 
    673677msgstr "" 
    674678 
    675 #: wp-to-twitter-manager.php:805 
     679#: wp-to-twitter-manager.php:808 
    676680msgid "What dynamic identifier would you like to use?" 
    677681msgstr "" 
    678682 
    679 #: wp-to-twitter-manager.php:807 
     683#: wp-to-twitter-manager.php:810 
    680684msgid "Category" 
    681685msgstr "" 
    682686 
    683 #: wp-to-twitter-manager.php:808 
     687#: wp-to-twitter-manager.php:811 
    684688msgid "Post ID" 
    685689msgstr "" 
    686690 
    687 #: wp-to-twitter-manager.php:809 
     691#: wp-to-twitter-manager.php:812 
    688692msgid "Post Title" 
    689693msgstr "" 
    690694 
    691 #: wp-to-twitter-manager.php:810 
     695#: wp-to-twitter-manager.php:813 
    692696msgid "Author" 
    693697msgstr "" 
    694698 
    695 #: wp-to-twitter-manager.php:815 
     699#: wp-to-twitter-manager.php:818 
    696700msgid "Individual Authors" 
    697701msgstr "" 
    698702 
    699 #: wp-to-twitter-manager.php:818 
     703#: wp-to-twitter-manager.php:821 
    700704msgid "Authors have individual Twitter accounts" 
    701705msgstr "" 
    702706 
    703 #: wp-to-twitter-manager.php:818 
     707#: wp-to-twitter-manager.php:821 
    704708msgid "" 
    705709"Authors can add their username in their user profile. This feature can only " 
     
    709713msgstr "" 
    710714 
    711 #: wp-to-twitter-manager.php:835 
     715#: wp-to-twitter-manager.php:838 
    712716msgid "The lowest user group that can add their Twitter information" 
    713717msgstr "" 
    714718 
    715 #: wp-to-twitter-manager.php:840 
     719#: wp-to-twitter-manager.php:843 
    716720msgid "" 
    717721"The lowest user group that can see the Custom Tweet options when posting" 
    718722msgstr "" 
    719723 
    720 #: wp-to-twitter-manager.php:845 
     724#: wp-to-twitter-manager.php:848 
    721725msgid "The lowest user group that can toggle the Tweet/Don't Tweet option" 
    722726msgstr "" 
    723727 
    724 #: wp-to-twitter-manager.php:850 
     728#: wp-to-twitter-manager.php:853 
    725729msgid "The lowest user group that can send Twitter updates" 
    726730msgstr "" 
    727731 
    728 #: wp-to-twitter-manager.php:856 
     732#: wp-to-twitter-manager.php:859 
    729733msgid "Disable Error Messages" 
    730734msgstr "" 
    731735 
    732 #: wp-to-twitter-manager.php:858 
     736#: wp-to-twitter-manager.php:861 
    733737msgid "Disable global URL shortener error messages." 
    734738msgstr "" 
    735739 
    736 #: wp-to-twitter-manager.php:859 
     740#: wp-to-twitter-manager.php:862 
    737741msgid "Disable global Twitter API error messages." 
    738742msgstr "" 
    739743 
    740 #: wp-to-twitter-manager.php:860 
     744#: wp-to-twitter-manager.php:863 
    741745msgid "Disable notification to implement OAuth" 
    742746msgstr "" 
    743747 
    744 #: wp-to-twitter-manager.php:862 
     748#: wp-to-twitter-manager.php:865 
    745749msgid "Get Debugging Data for OAuth Connection" 
    746750msgstr "" 
    747751 
    748 #: wp-to-twitter-manager.php:864 
     752#: wp-to-twitter-manager.php:867 
    749753msgid "Switch to <code>http</code> connection. (Default is https)" 
    750754msgstr "" 
    751755 
    752 #: wp-to-twitter-manager.php:866 
     756#: wp-to-twitter-manager.php:869 
    753757msgid "I made a donation, so stop whinging at me, please." 
    754758msgstr "" 
    755759 
    756 #: wp-to-twitter-manager.php:880 
     760#: wp-to-twitter-manager.php:883 
    757761msgid "Limit Updating Categories" 
    758762msgstr "" 
    759763 
    760 #: wp-to-twitter-manager.php:883 
     764#: wp-to-twitter-manager.php:886 
    761765msgid "" 
    762766"If no categories are checked, limiting by category will be ignored, and all " 
     
    764768msgstr "" 
    765769 
    766 #: wp-to-twitter-manager.php:884 
     770#: wp-to-twitter-manager.php:887 
    767771msgid "<em>Category limits are disabled.</em>" 
    768772msgstr "" 
    769773 
    770 #: wp-to-twitter-manager.php:893 
     774#: wp-to-twitter-manager.php:896 
    771775msgid "Get Plug-in Support" 
    772776msgstr "" 
    773777 
    774 #: wp-to-twitter-manager.php:904 
     778#: wp-to-twitter-manager.php:907 
    775779msgid "Check Support" 
    776780msgstr "" 
    777781 
    778 #: wp-to-twitter-manager.php:904 
     782#: wp-to-twitter-manager.php:907 
    779783msgid "" 
    780784"Check whether your server supports <a href=\"http://www.joedolson.com/" 
     
    784788msgstr "" 
    785789 
    786 #: wp-to-twitter-manager.php:922 
     790#: wp-to-twitter-manager.php:925 
    787791msgid "Support WP to Twitter" 
    788792msgstr "" 
    789793 
    790 #: wp-to-twitter-manager.php:924 
     794#: wp-to-twitter-manager.php:927 
    791795msgid "WP to Twitter Support" 
    792796msgstr "" 
    793797 
    794 #: wp-to-twitter-manager.php:932 
     798#: wp-to-twitter-manager.php:935 
    795799msgid "View Settings" 
    796800msgstr "" 
    797801 
    798 #: wp-to-twitter-manager.php:934 wp-to-twitter.php:1224 wp-to-twitter.php:1226 
     802#: wp-to-twitter-manager.php:937 wp-to-twitter.php:1247 wp-to-twitter.php:1249 
    799803msgid "Get Support" 
    800804msgstr "" 
    801805 
    802 #: wp-to-twitter-manager.php:938 
     806#: wp-to-twitter-manager.php:941 
    803807msgid "" 
    804808"<a href=\"http://www.joedolson.com/donate.php\">Make a donation today!</a> " 
     
    807811msgstr "" 
    808812 
    809 #: wp-to-twitter-manager.php:955 
     813#: wp-to-twitter-manager.php:958 
    810814msgid "Upgrade Now!" 
    811815msgstr "" 
    812816 
    813 #: wp-to-twitter-manager.php:957 
     817#: wp-to-twitter-manager.php:960 
    814818msgid "Upgrade to <strong>WP Tweets PRO</strong> for more options!" 
    815819msgstr "" 
    816820 
    817 #: wp-to-twitter-manager.php:958 
     821#: wp-to-twitter-manager.php:961 
    818822msgid "Extra features with the PRO upgrade:" 
    819823msgstr "" 
    820824 
    821 #: wp-to-twitter-manager.php:960 
     825#: wp-to-twitter-manager.php:963 
    822826msgid "Users can post to their own Twitter accounts" 
    823827msgstr "" 
    824828 
    825 #: wp-to-twitter-manager.php:961 
     829#: wp-to-twitter-manager.php:964 
    826830msgid "" 
    827831"Set a timer to send your Tweet minutes or hours after you publish the post" 
    828832msgstr "" 
    829833 
    830 #: wp-to-twitter-manager.php:962 
     834#: wp-to-twitter-manager.php:965 
    831835msgid "Automatically re-send Tweets at an assigned time after publishing" 
    832836msgstr "" 
    833837 
    834 #: wp-to-twitter-manager.php:971 
     838#: wp-to-twitter-manager.php:974 
    835839msgid "Shortcodes" 
    836840msgstr "" 
    837841 
    838 #: wp-to-twitter-manager.php:973 
     842#: wp-to-twitter-manager.php:976 
    839843msgid "Available in post update templates:" 
    840844msgstr "" 
    841845 
    842 #: wp-to-twitter-manager.php:975 
     846#: wp-to-twitter-manager.php:978 
    843847msgid "<code>#title#</code>: the title of your blog post" 
    844848msgstr "" 
    845849 
    846 #: wp-to-twitter-manager.php:976 
     850#: wp-to-twitter-manager.php:979 
    847851msgid "<code>#blog#</code>: the title of your blog" 
    848852msgstr "" 
    849853 
    850 #: wp-to-twitter-manager.php:977 
     854#: wp-to-twitter-manager.php:980 
    851855msgid "<code>#post#</code>: a short excerpt of the post content" 
    852856msgstr "" 
    853857 
    854 #: wp-to-twitter-manager.php:978 
     858#: wp-to-twitter-manager.php:981 
    855859msgid "<code>#category#</code>: the first selected category for the post" 
    856860msgstr "" 
    857861 
    858 #: wp-to-twitter-manager.php:979 
     862#: wp-to-twitter-manager.php:982 
    859863msgid "<code>#date#</code>: the post date" 
    860864msgstr "" 
    861865 
    862 #: wp-to-twitter-manager.php:980 
     866#: wp-to-twitter-manager.php:983 
    863867msgid "<code>#modified#</code>: the post modified date" 
    864868msgstr "" 
    865869 
    866 #: wp-to-twitter-manager.php:981 
     870#: wp-to-twitter-manager.php:984 
    867871msgid "<code>#url#</code>: the post URL" 
    868872msgstr "" 
    869873 
    870 #: wp-to-twitter-manager.php:982 
     874#: wp-to-twitter-manager.php:985 
    871875msgid "" 
    872876"<code>#author#</code>: the post author (@reference if available, otherwise " 
     
    874878msgstr "" 
    875879 
    876 #: wp-to-twitter-manager.php:983 
     880#: wp-to-twitter-manager.php:986 
    877881msgid "<code>#displayname#</code>: post author's display name" 
    878882msgstr "" 
    879883 
    880 #: wp-to-twitter-manager.php:984 
     884#: wp-to-twitter-manager.php:987 
    881885msgid "" 
    882886"<code>#account#</code>: the twitter @reference for the account (or the " 
     
    884888msgstr "" 
    885889 
    886 #: wp-to-twitter-manager.php:985 
     890#: wp-to-twitter-manager.php:988 
    887891msgid "" 
    888892"<code>#tags#</code>: your tags modified into hashtags. See options in the " 
     
    890894msgstr "" 
    891895 
    892 #: wp-to-twitter-manager.php:987 
     896#: wp-to-twitter-manager.php:990 
    893897msgid "" 
    894898"<code>#reference#</code>: Used only in co-tweeting. @reference to main " 
     
    897901msgstr "" 
    898902 
    899 #: wp-to-twitter-manager.php:990 
     903#: wp-to-twitter-manager.php:993 
    900904msgid "" 
    901905"You can also create custom shortcodes to access WordPress custom fields. Use " 
     
    905909msgstr "" 
    906910 
    907 #: wp-to-twitter-oauth.php:96 
     911#: wp-to-twitter-oauth.php:107 
    908912msgid "WP to Twitter was unable to establish a connection to Twitter." 
    909913msgstr "" 
    910914 
    911 #: wp-to-twitter-oauth.php:165 
     915#: wp-to-twitter-oauth.php:176 
    912916msgid "" 
    913917"Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> " 
     
    915919msgstr "" 
    916920 
    917 #: wp-to-twitter-oauth.php:166 
     921#: wp-to-twitter-oauth.php:177 
    918922msgid "There was an error querying Twitter's servers" 
    919923msgstr "" 
    920924 
    921 #: wp-to-twitter-oauth.php:182 wp-to-twitter-oauth.php:184 
     925#: wp-to-twitter-oauth.php:193 wp-to-twitter-oauth.php:195 
    922926msgid "Connect to Twitter" 
    923927msgstr "" 
    924928 
    925 #: wp-to-twitter-oauth.php:187 
     929#: wp-to-twitter-oauth.php:198 
    926930msgid "WP to Twitter Set-up" 
    927931msgstr "" 
    928932 
    929 #: wp-to-twitter-oauth.php:188 wp-to-twitter-oauth.php:281 
     933#: wp-to-twitter-oauth.php:199 wp-to-twitter-oauth.php:292 
    930934msgid "Your server time:" 
    931935msgstr "" 
    932936 
    933 #: wp-to-twitter-oauth.php:188 
     937#: wp-to-twitter-oauth.php:199 
    934938msgid "Twitter's time:" 
    935939msgstr "" 
    936940 
    937 #: wp-to-twitter-oauth.php:188 
     941#: wp-to-twitter-oauth.php:199 
    938942msgid "" 
    939943"If these timestamps are not within 5 minutes of each other, your server will " 
     
    941945msgstr "" 
    942946 
    943 #: wp-to-twitter-oauth.php:190 
     947#: wp-to-twitter-oauth.php:201 
    944948msgid "Your server timezone (should be UTC,GMT,Europe/London or equivalent):" 
    945949msgstr "" 
    946950 
    947 #: wp-to-twitter-oauth.php:192 
     951#: wp-to-twitter-oauth.php:203 
    948952msgid "" 
    949953"<em>Note</em>: you will not add your Twitter user information to WP to " 
     
    951955msgstr "" 
    952956 
    953 #: wp-to-twitter-oauth.php:196 
     957#: wp-to-twitter-oauth.php:207 
    954958msgid "1. Register this site as an application on " 
    955959msgstr "" 
    956960 
    957 #: wp-to-twitter-oauth.php:196 
     961#: wp-to-twitter-oauth.php:207 
    958962msgid "Twitter's application registration page" 
    959963msgstr "" 
    960964 
    961 #: wp-to-twitter-oauth.php:198 
     965#: wp-to-twitter-oauth.php:209 
    962966msgid "" 
    963967"If you're not currently logged in to Twitter, log-in to the account you want " 
     
    965969msgstr "" 
    966970 
    967 #: wp-to-twitter-oauth.php:199 
     971#: wp-to-twitter-oauth.php:210 
    968972msgid "" 
    969973"Your Application's Name will show up after \"via\" in your twitter stream. " 
     
    971975msgstr "" 
    972976 
    973 #: wp-to-twitter-oauth.php:200 
     977#: wp-to-twitter-oauth.php:211 
    974978msgid "Your Application Description can be anything." 
    975979msgstr "" 
    976980 
    977 #: wp-to-twitter-oauth.php:201 
     981#: wp-to-twitter-oauth.php:212 
    978982msgid "The WebSite and Callback URL should be " 
    979983msgstr "" 
    980984 
    981 #: wp-to-twitter-oauth.php:203 
     985#: wp-to-twitter-oauth.php:214 
    982986msgid "Agree to the Developer Rules of the Road and continue." 
    983987msgstr "" 
    984988 
    985 #: wp-to-twitter-oauth.php:204 
     989#: wp-to-twitter-oauth.php:215 
    986990msgid "2. Switch to the \"Settings\" tab in Twitter apps" 
    987991msgstr "" 
    988992 
    989 #: wp-to-twitter-oauth.php:206 
     993#: wp-to-twitter-oauth.php:217 
    990994msgid "Select \"Read and Write\" for the Application Type" 
    991995msgstr "" 
    992996 
    993 #: wp-to-twitter-oauth.php:207 
     997#: wp-to-twitter-oauth.php:218 
    994998msgid "Update the application settings" 
    995999msgstr "" 
    9961000 
    997 #: wp-to-twitter-oauth.php:208 
     1001#: wp-to-twitter-oauth.php:219 
    9981002msgid "" 
    9991003"Return to the Details tab and create your access token. Refresh page to view " 
     
    10011005msgstr "" 
    10021006 
    1003 #: wp-to-twitter-oauth.php:210 
     1007#: wp-to-twitter-oauth.php:221 
    10041008msgid "" 
    10051009"Once you have registered your site as an application, you will be provided " 
     
    10071011msgstr "" 
    10081012 
    1009 #: wp-to-twitter-oauth.php:211 
     1013#: wp-to-twitter-oauth.php:222 
    10101014msgid "" 
    10111015"3. Copy and paste your consumer key and consumer secret into the fields below" 
    10121016msgstr "" 
    10131017 
    1014 #: wp-to-twitter-oauth.php:214 
     1018#: wp-to-twitter-oauth.php:225 
    10151019msgid "Twitter Consumer Key" 
    10161020msgstr "" 
    10171021 
    1018 #: wp-to-twitter-oauth.php:218 
     1022#: wp-to-twitter-oauth.php:229 
    10191023msgid "Twitter Consumer Secret" 
    10201024msgstr "" 
    10211025 
    1022 #: wp-to-twitter-oauth.php:222 
     1026#: wp-to-twitter-oauth.php:233 
    10231027msgid "" 
    10241028"4. Copy and paste your Access Token and Access Token Secret into the fields " 
     
    10261030msgstr "" 
    10271031 
    1028 #: wp-to-twitter-oauth.php:223 
     1032#: wp-to-twitter-oauth.php:234 
    10291033msgid "" 
    10301034"If the Access level for your Access Token is not \"<em>Read and write</em>" 
     
    10321036msgstr "" 
    10331037 
    1034 #: wp-to-twitter-oauth.php:226 
     1038#: wp-to-twitter-oauth.php:237 
    10351039msgid "Access Token" 
    10361040msgstr "" 
    10371041 
    1038 #: wp-to-twitter-oauth.php:230 
     1042#: wp-to-twitter-oauth.php:241 
    10391043msgid "Access Token Secret" 
    10401044msgstr "" 
    10411045 
    1042 #: wp-to-twitter-oauth.php:249 
     1046#: wp-to-twitter-oauth.php:260 
    10431047msgid "Disconnect Your WordPress and Twitter Account" 
    10441048msgstr "" 
    10451049 
    1046 #: wp-to-twitter-oauth.php:253 
     1050#: wp-to-twitter-oauth.php:264 
    10471051msgid "Disconnect your WordPress and Twitter Account" 
    10481052msgstr "" 
    10491053 
    1050 #: wp-to-twitter-oauth.php:255 
     1054#: wp-to-twitter-oauth.php:266 
    10511055msgid "" 
    10521056"<strong>Troubleshooting tip:</strong> Connected, but getting a notice that " 
     
    10561060msgstr "" 
    10571061 
    1058 #: wp-to-twitter-oauth.php:257 
     1062#: wp-to-twitter-oauth.php:268 
    10591063msgid "" 
    10601064"Your time stamps are more than 5 minutes apart. Your server could lose its " 
     
    10621066msgstr "" 
    10631067 
    1064 #: wp-to-twitter-oauth.php:259 
     1068#: wp-to-twitter-oauth.php:270 
    10651069msgid "" 
    10661070"WP to Twitter could not contact Twitter's remote server. Here is the error " 
     
    10681072msgstr "" 
    10691073 
    1070 #: wp-to-twitter-oauth.php:263 
     1074#: wp-to-twitter-oauth.php:274 
    10711075msgid "Disconnect from Twitter" 
    10721076msgstr "" 
    10731077 
    1074 #: wp-to-twitter-oauth.php:269 
     1078#: wp-to-twitter-oauth.php:280 
    10751079msgid "Twitter Username " 
    10761080msgstr "" 
    10771081 
    1078 #: wp-to-twitter-oauth.php:270 
     1082#: wp-to-twitter-oauth.php:281 
    10791083msgid "Consumer Key " 
    10801084msgstr "" 
    10811085 
    1082 #: wp-to-twitter-oauth.php:271 
     1086#: wp-to-twitter-oauth.php:282 
    10831087msgid "Consumer Secret " 
    10841088msgstr "" 
    10851089 
    1086 #: wp-to-twitter-oauth.php:272 
     1090#: wp-to-twitter-oauth.php:283 
    10871091msgid "Access Token " 
    10881092msgstr "" 
    10891093 
    1090 #: wp-to-twitter-oauth.php:273 
     1094#: wp-to-twitter-oauth.php:284 
    10911095msgid "Access Token Secret " 
    10921096msgstr "" 
    10931097 
    1094 #: wp-to-twitter-oauth.php:281 
     1098#: wp-to-twitter-oauth.php:292 
    10951099msgid "Twitter's current server time: " 
    10961100msgstr "" 
    10971101 
    1098 #: wp-to-twitter.php:45 
     1102#: wp-to-twitter.php:49 
    10991103msgid "" 
    11001104"WP to Twitter requires PHP version 5 or above. Please upgrade PHP to run WP " 
     
    11021106msgstr "" 
    11031107 
    1104 #: wp-to-twitter.php:63 
     1108#: wp-to-twitter.php:67 
    11051109msgid "" 
    11061110"The current version of WP Tweets PRO is <strong>%s</strong>. Upgrade for " 
     
    11081112msgstr "" 
    11091113 
    1110 #: wp-to-twitter.php:74 
     1114#: wp-to-twitter.php:76 
    11111115msgid "" 
    11121116"WP to Twitter requires WordPress 3.0.6 or a more recent version <a href=" 
     
    11151119msgstr "" 
    11161120 
    1117 #: wp-to-twitter.php:92 
     1121#: wp-to-twitter.php:94 
    11181122msgid "" 
    11191123"Twitter requires authentication by OAuth. You will need to <a " 
     
    11211125msgstr "" 
    11221126 
    1123 #: wp-to-twitter.php:271 
     1127#: wp-to-twitter.php:273 
    11241128msgid "This account is not authorized to post to Twitter." 
    11251129msgstr "" 
    11261130 
    1127 #: wp-to-twitter.php:279 
     1131#: wp-to-twitter.php:281 
    11281132msgid "This tweet is identical to another Tweet recently sent to this account." 
    11291133msgstr "" 
    11301134 
    1131 #: wp-to-twitter.php:285 
     1135#: wp-to-twitter.php:287 
    11321136msgid "This tweet was blank and could not be sent to Twitter." 
    11331137msgstr "" 
    11341138 
    1135 #: wp-to-twitter.php:314 
     1139#: wp-to-twitter.php:316 
    11361140msgid "" 
    11371141"Your Twitter application does not have read and write permissions. Go to <a " 
     
    11391143msgstr "" 
    11401144 
    1141 #: wp-to-twitter.php:318 
     1145#: wp-to-twitter.php:320 
    11421146msgid "200 OK: Success!" 
    11431147msgstr "" 
    11441148 
    1145 #: wp-to-twitter.php:323 
     1149#: wp-to-twitter.php:325 
    11461150msgid "" 
    11471151"400 Bad Request: The request was invalid. This is the status code returned " 
     
    11491153msgstr "" 
    11501154 
    1151 #: wp-to-twitter.php:327 
     1155#: wp-to-twitter.php:329 
    11521156msgid "401 Unauthorized: Authentication credentials were missing or incorrect." 
    11531157msgstr "" 
    11541158 
    1155 #: wp-to-twitter.php:332 
     1159#: wp-to-twitter.php:334 
    11561160msgid "" 
    11571161"403 Forbidden: The request is understood, but it has been refused. This code " 
     
    11621166msgstr "" 
    11631167 
    1164 #: wp-to-twitter.php:336 
     1168#: wp-to-twitter.php:338 
    11651169msgid "" 
    11661170"404 Not Found: The URI requested is invalid or the resource requested does " 
     
    11681172msgstr "" 
    11691173 
    1170 #: wp-to-twitter.php:340 
     1174#: wp-to-twitter.php:342 
    11711175msgid "406 Not Acceptable: Invalid Format Specified." 
    11721176msgstr "" 
    11731177 
    1174 #: wp-to-twitter.php:344 
     1178#: wp-to-twitter.php:346 
    11751179msgid "429 Too Many Requests: You have exceeded your rate limits." 
    11761180msgstr "" 
    11771181 
    1178 #: wp-to-twitter.php:348 
     1182#: wp-to-twitter.php:350 
    11791183msgid "500 Internal Server Error: Something is broken at Twitter." 
    11801184msgstr "" 
    11811185 
    1182 #: wp-to-twitter.php:352 
     1186#: wp-to-twitter.php:354 
    11831187msgid "502 Bad Gateway: Twitter is down or being upgraded." 
    11841188msgstr "" 
    11851189 
    1186 #: wp-to-twitter.php:356 
     1190#: wp-to-twitter.php:358 
    11871191msgid "" 
    11881192"503 Service Unavailable: The Twitter servers are up, but overloaded with " 
     
    11901194msgstr "" 
    11911195 
    1192 #: wp-to-twitter.php:360 
     1196#: wp-to-twitter.php:362 
    11931197msgid "" 
    11941198"504 Gateway Timeout: The Twitter servers are up, but the request couldn't be " 
     
    11961200msgstr "" 
    11971201 
    1198 #: wp-to-twitter.php:390 
     1202#: wp-to-twitter.php:392 
    11991203msgid "No Twitter OAuth connection found." 
    12001204msgstr "" 
    12011205 
    1202 #: wp-to-twitter.php:1079 
     1206#: wp-to-twitter.php:1102 
    12031207msgid "WP Tweets" 
    12041208msgstr "" 
    12051209 
    1206 #: wp-to-twitter.php:1121 
     1210#: wp-to-twitter.php:1144 
    12071211msgid "Previous Tweets" 
    12081212msgstr "" 
    12091213 
    1210 #: wp-to-twitter.php:1135 
     1214#: wp-to-twitter.php:1158 
    12111215msgid "Failed Tweets" 
    12121216msgstr "" 
    12131217 
    1214 #: wp-to-twitter.php:1150 
     1218#: wp-to-twitter.php:1173 
    12151219msgid "No failed tweets on this post." 
    12161220msgstr "" 
    12171221 
    1218 #: wp-to-twitter.php:1154 
     1222#: wp-to-twitter.php:1177 
    12191223msgid "WP to Twitter can do more for you! Take a look at WP Tweets Pro!" 
    12201224msgstr "" 
    12211225 
    1222 #: wp-to-twitter.php:1157 
     1226#: wp-to-twitter.php:1180 
    12231227msgid "Custom Twitter Post" 
    12241228msgstr "" 
    12251229 
    1226 #: wp-to-twitter.php:1162 
     1230#: wp-to-twitter.php:1185 
    12271231msgid "Your prepended Tweet text; not part of your template." 
    12281232msgstr "" 
    12291233 
    1230 #: wp-to-twitter.php:1165 
     1234#: wp-to-twitter.php:1188 
    12311235msgid "Your appended Tweet text; not part of your template." 
    12321236msgstr "" 
    12331237 
    1234 #: wp-to-twitter.php:1181 
     1238#: wp-to-twitter.php:1204 
    12351239msgid "Your template:" 
    12361240msgstr "" 
    12371241 
    1238 #: wp-to-twitter.php:1186 
     1242#: wp-to-twitter.php:1209 
    12391243msgid "YOURLS Custom Keyword" 
    12401244msgstr "" 
    12411245 
    1242 #: wp-to-twitter.php:1198 
     1246#: wp-to-twitter.php:1221 
    12431247msgid "Don't Tweet this post." 
    12441248msgstr "" 
    12451249 
    1246 #: wp-to-twitter.php:1198 
     1250#: wp-to-twitter.php:1221 
    12471251msgid "Tweet this post." 
    12481252msgstr "" 
    12491253 
    1250 #: wp-to-twitter.php:1210 
     1254#: wp-to-twitter.php:1233 
    12511255msgid "" 
    12521256"Access to customizing WP to Twitter values is not allowed for your user role." 
    12531257msgstr "" 
    12541258 
    1255 #: wp-to-twitter.php:1219 
    1256 msgid "" 
    1257 "Tweets are no more than 140 characters; Twitter counts URLs as 20 " 
     1259#: wp-to-twitter.php:1242 
     1260msgid "" 
     1261"Tweets are no more than 140 characters; Twitter counts URLs as 20 or 21 " 
    12581262"characters. Template tags: <code>#url#</code>, <code>#title#</code>, " 
    12591263"<code>#post#</code>, <code>#category#</code>, <code>#date#</code>, " 
     
    12621266msgstr "" 
    12631267 
    1264 #: wp-to-twitter.php:1224 
     1268#: wp-to-twitter.php:1247 
    12651269msgid "Upgrade to WP Tweets Pro" 
    12661270msgstr "" 
    12671271 
    1268 #: wp-to-twitter.php:1231 
     1272#: wp-to-twitter.php:1254 
    12691273msgid "Your role does not have the ability to Post Tweets from this site." 
    12701274msgstr "" 
    12711275 
    1272 #: wp-to-twitter.php:1280 
     1276#: wp-to-twitter.php:1299 
    12731277msgid "Characters left: " 
    12741278msgstr "" 
    12751279 
    1276 #: wp-to-twitter.php:1341 
     1280#: wp-to-twitter.php:1359 
    12771281msgid "WP Tweets User Settings" 
    12781282msgstr "" 
    12791283 
    1280 #: wp-to-twitter.php:1345 
     1284#: wp-to-twitter.php:1363 
    12811285msgid "Use My Twitter Username" 
    12821286msgstr "" 
    12831287 
    1284 #: wp-to-twitter.php:1346 
     1288#: wp-to-twitter.php:1364 
    12851289msgid "Tweet my posts with an @ reference to my username." 
    12861290msgstr "" 
    12871291 
    1288 #: wp-to-twitter.php:1347 
     1292#: wp-to-twitter.php:1365 
    12891293msgid "" 
    12901294"Tweet my posts with an @ reference to both my username and to the main site " 
     
    12921296msgstr "" 
    12931297 
    1294 #: wp-to-twitter.php:1351 
     1298#: wp-to-twitter.php:1369 
    12951299msgid "Your Twitter Username" 
    12961300msgstr "" 
    12971301 
    1298 #: wp-to-twitter.php:1352 
     1302#: wp-to-twitter.php:1370 
    12991303msgid "Enter your own Twitter username." 
    13001304msgstr "" 
    13011305 
    1302 #: wp-to-twitter.php:1355 
     1306#: wp-to-twitter.php:1373 
    13031307msgid "Hide account name in Tweets" 
    13041308msgstr "" 
    13051309 
    1306 #: wp-to-twitter.php:1356 
     1310#: wp-to-twitter.php:1374 
    13071311msgid "Do not display my account in the #account# template tag." 
    13081312msgstr "" 
    13091313 
    1310 #: wp-to-twitter.php:1405 
     1314#: wp-to-twitter.php:1423 
    13111315msgid "Check off categories to tweet" 
    13121316msgstr "" 
    13131317 
    1314 #: wp-to-twitter.php:1409 
     1318#: wp-to-twitter.php:1427 
    13151319msgid "Do not tweet posts in checked categories (Reverses default behavior)" 
    13161320msgstr "" 
    13171321 
    1318 #: wp-to-twitter.php:1426 
     1322#: wp-to-twitter.php:1444 
    13191323msgid "" 
    13201324"Limits are exclusive. If a post is in one category which should be posted " 
     
    13221326msgstr "" 
    13231327 
    1324 #: wp-to-twitter.php:1429 
     1328#: wp-to-twitter.php:1447 
    13251329msgid "Set Categories" 
    13261330msgstr "" 
    13271331 
    1328 #: wp-to-twitter.php:1451 
     1332#: wp-to-twitter.php:1469 
    13291333msgid "Settings" 
    13301334msgstr "" 
    13311335 
    1332 #: wp-to-twitter.php:1486 
     1336#: wp-to-twitter.php:1504 
    13331337msgid "" 
    13341338"<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href=" 
  • wp-to-twitter/trunk/readme.txt

    r668985 r690784  
    33Donate link: http://www.joedolson.com/donate.php 
    44Tags: twitter, microblogging, su.pr, bitly, yourls, redirect, shortener, post, links 
    5 Requires at least: 3.0.6 
     5Requires at least: 3.1.4 
    66Tested up to: 3.5.1 
    77License: GPLv2 or later 
    88Stable tag: trunk 
    99 
    10 Auto-posts a Twitter update when you update your WordPress blog or blogroll, with your chosen URL shortening service. Requires PHP 5.  
     10Auto-posts a Twitter update when you update your WordPress blog or blogroll, with your chosen URL shortening service. 
    1111 
    1212== Description == 
    1313 
    14 WP to Twitter automatically posts a Tweet from your WordPress blog to Twitter using your URL shortening service to provide a link back to your post from Twitter.  
     14WP to Twitter automatically posts Tweets from WordPress to Twitter using your URL shortening service to provide a link back to your post from Twitter.  
     15 
     16Upgrade to [WP Tweets Pro](http://www.joedolson.com/articles/wp-tweets-pro/) 
    1517 
    1618The plugin supports a customizable Tweet template for updating or editing posts and pages, supports your custom post types, and allows you to write a custom Tweet for each post, using a selection of custom template tags to generate the text.  
     
    2527* Limiting Tweeting from specific categories 
    2628 
    27 Any status update you write which is longer than 140 characters will be truncated by the plugin.  
     29Any status update longer than 140 characters will be truncated by the plugin.  
    2830 
    2931Upgrade to [WP Tweets Pro](http://www.joedolson.com/articles/wp-tweets-pro/) for extra features, including: 
     
    4042 
    4143Languages available (in order of completeness): 
    42 French, Italian, Dutch, Chinese, Portuguese, Japanese, Romanian, Danish, Estonian, Russian, Lithuanian, Belarusian, Ukrainian, German, Irish, Spanish, Turkish, Persian 
    43  
    44 Translator Credits (in no particular order)*: 
    45 [Ale Gonzalez](http://60rpm.tv/i), [Outshine Solutions](http://outshinesolutions.com), [Jakob Smith](http://www.omkalfatring.dk/),, [globus2008](http://wordpress.org/support/profile/globus2008), Frederic Escallier, Luud Heck, Wim Strijbos, [Daisuke Abe](http://www.alter-ego.jp/), [Alex](http://blog.sotvoril.ru/), Mehmet Ko&ccedil;ali, Uwe Jonas, Florian Edelmann, Efva Nyberg, [Sabir Musta](http://mustaphasabir.altervista.org), Massimo Sgobino, Leonardo Kfoury, Alexandre Carvalho, Amir Khalilnejad, [Aurelio De Rosa](http://www.audero.it/), Bayram Dede, Dani Locasati, Dario Nunez, Dirk Ginader, Evren Erten, Fl&aacute;vio Pereira, Francois-Xavier Benard, [Gianni Diurno](http://www.gidibao.net), Giksi, Heinz Ochsner,  Kazuyuki Kumai, Liam Boogar, Maks, Mano, Massimo Sgobino, Mohsen Aghaei, Oscar Romero, [Rashid Niamat](http://niamatmediagroup.nl/), Stefan Wikstrom, Thomas Meyer, Vedar Ozdemir, [Vikas Arora](http://www.wiznicworld.com), [Miriam de Paula](http://wpmidia.com.br), [HostUCan](http://www.hostucan.com), [Alex Alexandrov](http://www.webhostingrating.com), [Alyona Lompar](http://www.webhostinggeeks.com), [David Gil P&eacute;rez](http://www.sohelet.com), [Burkov Boris](http://chernobog.ru), [Raivo Ratsep](http://raivoratsep.com), [Jibo](http://jibo.ro), [Rasmus Himmelstrup](http://seoanalyst.dk), [kndb](http://blog.layer8.sh/) 
     44Danish, French, Italian, Catalan, Dutch, Chinese, Portuguese, Japanese, Romanian, Estonian, German, Ukrainian, Russian, Lithuanian, Belarusian, Irish, Spanish, Turkish, Persian 
    4645 
    4746Translating my plug-ins is always appreciated. Visit <a href="http://translate.joedolson.com">my translations site</a> to start getting your language into shape! 
     
    5251 
    5352== Changelog == 
     53 
     54= 2.6.0 = 
     55 
     56* Support for new features in WP Tweets PRO 1.4.0. 
     57* Minor interface tweaks. 
     58* Removed settings export (it was out of date and nobody sent it anyway). 
     59* Bug fix: bad settings link in API failure warnings. 
     60* Bug fix: URL shortener returned error when not shortening URLs. 
     61* Bug fix: Category limits are not applied if 'category' is not an available taxonomy. 
     62* Bug fix: Prevent publish actions from running twice for scheduled posts. 
     63* Change: significant changes to large portions of plug-in text. My apologies to translators...but there's less text, now! 
     64* File restructuring and code cleanup. 
     65* Added Danish translation. 
     66* Updated French translation. 
    5467 
    5568= 2.5.9 = 
     
    780793== Upgrade Notice == 
    781794 
    782 * 2.5.7 Changes in 2.5.6 only effect people using the WP Tweets PRO upgrade. 
     795* 2.6.0 Bug fixes, new translations, WP Tweets PRO features. 
  • wp-to-twitter/trunk/styles.css

    r630944 r690784  
    33#wp-to-twitter form .error p {background: none;border: none;} 
    44legend {font-weight: 700;font-size: 1.2em;padding: 6px 0;} 
    5 #wp-to-twitter .resources {background: url(logo.png) 50% 5px no-repeat; padding-top: 70px;} 
     5#wp-to-twitter .resources {background: url(logo.png) 50% 5px no-repeat; padding-top: 70px; text-align: center;} 
    66#wp-to-twitter .resources form {margin: 0;} 
    77.settings {margin: 25px 0;background: #fff;padding: 10px;border: 1px solid #000;} 
    8 #wp-to-twitter .panel {border-bottom: 1px solid #ddd;padding: 0 5px;margin: 0 5px;} 
    98#wp-to-twitter ul {list-style-type: disc;margin-left: 2em;font-size: 1em;} 
    109#wp-to-twitter li {line-height: 1.2;} 
    1110#wp-to-twitter .inside em {color: #f33;} 
    12 #wp-to-twitter .button-side { position: absolute; top: 10px; right: 10px;} 
     11#wp-to-twitter .button-side { position: absolute; top: 0; right: 10px;} 
    1312#wp-to-twitter .tokens label { width: 13em; display: block; float: left; margin-top:5px;} 
    1413#wp-to-twitter .categories ul { -moz-column-count: 3; -moz-column-gap: 20px; -webkit-column-count: 3; -webkit-column-gap: 20px; margin: 0 0 20px; padding: 0; } 
    1514#wp-to-twitter .categories li { list-style-type: none; margin: 3px 0; padding: 0;} 
    16 #wp-to-twitter .inside .wpt_types { float: left; width: 45%; } 
     15#wp-to-twitter .inside .wpt_types { float: left; width: 47%; } 
    1716#wp-to-twitter .inside .comments { clear: both;} 
    1817#wp-to-twitter .postbox { margin: 10px 10px 0 0;    } 
    1918#wp-to-twitter .meta-box-sortables { min-height: 0; } 
    20 .wp-tweets-notes { float: right; width: 30%; min-width: 175px; } 
     19#wp-to-twitter .wpt-template, #wp-to-twitter .support-request { width: 95%; } 
     20.wp-tweets-notes { float: right; width: 30%; min-width: 140px; max-width: 240px; margin-left: 10px; } 
    2121#wp-to-twitter .indent { margin-left: 30px; } 
     22#wp-to-twitter .flattr { float: right; } 
  • wp-to-twitter/trunk/wp-to-twitter-manager.php

    r668985 r690784  
    121121        update_option('jd_max_tags',3); 
    122122        update_option('jd_max_characters',15);   
    123         update_option('jd_replace_character','_'); 
     123        update_option('jd_replace_character',''); 
    124124        update_option('wtt_user_permissions','administrator'); 
    125125        $administrator = get_role('administrator'); 
     
    212212        update_option( 'jd_post_excerpt', $_POST['jd_post_excerpt'] );   
    213213        update_option( 'jd_max_tags',$_POST['jd_max_tags']); 
    214         update_option( 'wpt_tag_source', ( ( $_POST['wpt_tag_source'] == 'slug' )?'slug':'' ) ); 
     214        update_option( 'wpt_tag_source', ( ( isset($_POST['wpt_tag_source']) && $_POST['wpt_tag_source'] == 'slug' )?'slug':'' ) ); 
    215215        update_option( 'jd_max_characters',$_POST['jd_max_characters']);     
    216216        update_option( 'jd_replace_character',$_POST['jd_replace_character']); 
     
    377377        update_option( 'comment-published-text', $_POST['comment-published-text'] ); 
    378378        update_option( 'comment-published-update',(isset($_POST['comment-published-update']) )?$_POST['comment-published-update']:"" );  
    379         update_option( 'jd_shortener', $_POST['jd_shortener'] ); 
    380  
    381         if ( get_option( 'jd_shortener' ) == 2 && ( get_option( 'bitlylogin' ) == "" || get_option( 'bitlyapi' ) == "" ) ) { 
    382             $message .= __( 'You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly.' , 'wp-to-twitter'); 
    383             $message .= "<br />"; 
    384         } 
    385         if ( get_option( 'jd_shortener' ) == 6 && ( get_option( 'yourlslogin' ) == "" || get_option( 'yourlsapi' ) == "" || get_option( 'yourlsurl' ) == "" ) ) { 
    386             $message .= __( 'You must add your YOURLS remote URL, login, and password in order to shorten URLs with a remote installation of YOURLS.' , 'wp-to-twitter'); 
    387             $message .= "<br />"; 
    388         } 
    389         if ( get_option( 'jd_shortener' ) == 5 && ( get_option( 'yourlspath' ) == "" ) ) { 
    390             $message .= __( 'You must add your YOURLS server path in order to shorten URLs with a remote installation of YOURLS.' , 'wp-to-twitter'); 
    391             $message .= "<br />"; 
    392         }        
     379 
     380        $message = wpt_select_shortener( $_POST ); 
     381         
    393382        $message .= __( 'WP to Twitter Options Updated' , 'wp-to-twitter'); 
    394383    } 
     
    407396        } 
    408397    } 
    409          
    410     if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'yourlsapi' ) { 
    411         if ( $_POST['yourlsapi'] != '' && isset( $_POST['submit'] ) ) { 
    412             update_option( 'yourlsapi', trim($_POST['yourlsapi']) ); 
    413             $message = __("YOURLS password updated. ", 'wp-to-twitter'); 
    414         } else if ( isset( $_POST['clear'] ) ) { 
    415             update_option( 'yourlsapi','' ); 
    416             $message = __( "YOURLS password deleted. You will be unable to use your remote YOURLS account to create short URLS.", 'wp-to-twitter'); 
    417         } else { 
    418             $message = __( "Failed to save your YOURLS password! ", 'wp-to-twitter' ); 
    419         } 
    420         if ( $_POST['yourlslogin'] != '' ) { 
    421             update_option( 'yourlslogin', trim($_POST['yourlslogin']) ); 
    422             $message .= __( "YOURLS username added. ",'wp-to-twitter' );  
    423         } 
    424         if ( $_POST['yourlsurl'] != '' ) { 
    425             update_option( 'yourlsurl', trim($_POST['yourlsurl']) ); 
    426             $message .= __( "YOURLS API url added. ",'wp-to-twitter' );  
    427         } else { 
    428             update_option('yourlsurl',''); 
    429             $message .= __( "YOURLS API url removed. ",'wp-to-twitter' );            
    430         } 
    431         if ( $_POST['yourlspath'] != '' ) { 
    432             update_option( 'yourlspath', trim($_POST['yourlspath']) );   
    433             if ( file_exists( $_POST['yourlspath'] ) ) { 
    434             $message .= __( "YOURLS local server path added. ",'wp-to-twitter');  
    435             } else { 
    436             $message .= __( "The path to your YOURLS installation is not correct. ",'wp-to-twitter' ); 
    437             } 
    438         } else { 
    439             update_option( 'yourlspath','' ); 
    440             $message .= __( "YOURLS local server path removed. ",'wp-to-twitter'); 
    441         } 
    442         if ( $_POST['jd_keyword_format'] != '' ) { 
    443             update_option( 'jd_keyword_format', $_POST['jd_keyword_format'] ); 
    444             if ( $_POST['jd_keyword_format'] == 1 ) { 
    445             $message .= __( "YOURLS will use Post ID for short URL slug.",'wp-to-twitter'); 
    446             } else { 
    447             $message .= __( "YOURLS will use your custom keyword for short URL slug.",'wp-to-twitter'); 
    448             } 
    449         } else { 
    450             update_option( 'jd_keyword_format','' ); 
    451             $message .= __( "YOURLS will not use Post ID for the short URL slug.",'wp-to-twitter'); 
    452         } 
    453     }  
    454      
    455     if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'suprapi' ) { 
    456         if ( $_POST['suprapi'] != '' && isset( $_POST['submit'] ) ) { 
    457             update_option( 'suprapi', trim($_POST['suprapi']) ); 
    458             update_option( 'suprlogin', trim($_POST['suprlogin']) ); 
    459             $message = __("Su.pr API Key and Username Updated", 'wp-to-twitter'); 
    460         } else if ( isset( $_POST['clear'] ) ) { 
    461             update_option( 'suprapi','' ); 
    462             update_option( 'suprlogin','' ); 
    463             $message = __("Su.pr API Key and username deleted. Su.pr URLs created by WP to Twitter will no longer be associated with your account. ", 'wp-to-twitter'); 
    464         } else { 
    465             $message = __("Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! ", 'wp-to-twitter'); 
    466         } 
    467     }  
    468     if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'bitlyapi' ) { 
    469         if ( $_POST['bitlyapi'] != '' && isset( $_POST['submit'] ) ) { 
    470             update_option( 'bitlyapi', trim($_POST['bitlyapi']) ); 
    471             $message = __("Bit.ly API Key Updated.", 'wp-to-twitter'); 
    472         } else if ( isset( $_POST['clear'] ) ) { 
    473             update_option( 'bitlyapi','' ); 
    474             $message = __("Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. ", 'wp-to-twitter'); 
    475         } else { 
    476             $message = __("Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</a>! An API key is required to use the Bit.ly URL shortening service.", 'wp-to-twitter'); 
    477         } 
    478         if ( $_POST['bitlylogin'] != '' && isset( $_POST['submit'] ) ) { 
    479             update_option( 'bitlylogin', trim($_POST['bitlylogin']) ); 
    480             $message .= __(" Bit.ly User Login Updated.", 'wp-to-twitter'); 
    481         } else if ( isset( $_POST['clear'] ) ) { 
    482             update_option( 'bitlylogin','' ); 
    483             $message = __("Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. ", 'wp-to-twitter'); 
    484         } else { 
    485             $message = __("Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! ", 'wp-to-twitter'); 
    486         } 
     398    if ( isset($_POST['wpt_shortener_update']) && $_POST['wpt_shortener_update'] == 'true' ) { 
     399        $message = wpt_shortener_update( $_POST ); 
    487400    } 
    488401    // Check whether the server has supported for needed functions. 
     
    520433} 
    521434?>   
    522 <?php if (isset($_GET['export']) && $_GET['export'] == "settings") { print_settings(); } ?> 
    523435<h2><?php _e("WP to Twitter Options", 'wp-to-twitter'); ?></h2> 
    524436<div id="wpt_settings_page" class="postbox-container" style="width: 70%"> 
     
    541453    <div>    
    542454        <input type="submit" name="submit" value="<?php _e("Save WP->Twitter Options", 'wp-to-twitter'); ?>" class="button-primary button-side" />   
    543             <p>  
    544             <label><?php _e("Choose a short URL service (account settings below)",'wp-to-twitter' ); ?></label> 
    545             <select name="jd_shortener" id="jd_shortener"> 
    546                 <option value="3" <?php echo jd_checkSelect('jd_shortener','3'); ?>><?php _e("Don't shorten URLs.", 'wp-to-twitter'); ?></option> 
    547                 <option value="7" <?php echo jd_checkSelect('jd_shortener','7'); ?>>Su.pr</option>  
    548                 <option value="2" <?php echo jd_checkSelect('jd_shortener','2'); ?>>Bit.ly</option> 
    549                 <option value="8" <?php echo jd_checkSelect('jd_shortener','8'); ?>>Goo.gl</option>                  
    550                 <option value="5" <?php echo jd_checkSelect('jd_shortener','5'); ?>><?php _e("YOURLS (on this server)", 'wp-to-twitter'); ?></option> 
    551                 <option value="6" <?php echo jd_checkSelect('jd_shortener','6'); ?>><?php _e("YOURLS (on a remote server)", 'wp-to-twitter'); ?></option>        
    552                 <option value="4" <?php echo jd_checkSelect('jd_shortener','4'); ?>>WordPress</option>  
    553                 <?php if ( function_exists( 'twitter_link' ) ) { ?><option value="9" <?php echo jd_checkSelect('jd_shortener','9'); ?>><?php _e("Use Twitter Friendly Links.", 'wp-to-twitter'); ?></option><?php } ?> 
    554             </select> 
    555             </p> 
     455        <?php echo apply_filters('wpt_pick_shortener',''); ?> 
    556456        <?php  
     457             
    557458            $post_types = get_post_types( array('public'=>true), 'names' ); 
    558459            $wpt_settings = get_option('wpt_post_types'); 
     
    572473            <p> 
    573474                <input type="checkbox" name="wpt_post_types[<?php echo $type; ?>][post-published-update]" id="<?php echo $type; ?>-post-published-update" value="1" <?php echo jd_checkCheckbox('wpt_post_types',$type,'post-published-update')?> /> 
    574                 <label for="<?php echo $type; ?>-post-published-update"><strong><?php printf(__('Update when %1$s %2$s is published','wp-to-twitter'),$word, $type); ?></strong></label> <label for="<?php echo $type; ?>-post-published-text"><br /><?php printf(__('Text for new %1$s updates','wp-to-twitter'),$type); ?></label><br /><input type="text" name="wpt_post_types[<?php echo $type; ?>][post-published-text]" id="<?php echo $type; ?>-post-published-text" size="60" maxlength="120" value="<?php if ( isset( $wpt_settings[$type] ) ) { echo esc_attr( stripslashes( $wpt_settings[$type]['post-published-text'] ) ); } ?>" /> 
     475                <label for="<?php echo $type; ?>-post-published-update"><strong><?php printf(__('Update when %1$s %2$s is published','wp-to-twitter'),$word, $type); ?></strong></label> <label for="<?php echo $type; ?>-post-published-text"><br /><?php printf(__('Text for new %1$s updates','wp-to-twitter'),$type); ?></label><br /><input type="text" class="wpt-template" name="wpt_post_types[<?php echo $type; ?>][post-published-text]" id="<?php echo $type; ?>-post-published-text" size="60" maxlength="120" value="<?php if ( isset( $wpt_settings[$type] ) ) { echo esc_attr( stripslashes( $wpt_settings[$type]['post-published-text'] ) ); } ?>" /> 
    575476            </p> 
    576477            <p> 
    577478                <input type="checkbox" name="wpt_post_types[<?php echo $type; ?>][post-edited-update]" id="<?php echo $type; ?>-post-edited-update" value="1" <?php echo jd_checkCheckbox('wpt_post_types',$type,'post-edited-update')?> /> 
    578                 <label for="<?php echo $type; ?>-post-edited-update"><strong><?php printf(__('Update when %1$s %2$s is edited','wp-to-twitter'),$word, $type); ?></strong></label><br /><label for="<?php echo $type; ?>-post-edited-text"><?php printf(__('Text for %1$s editing updates','wp-to-twitter'),$type); ?></label><br /><input type="text" name="wpt_post_types[<?php echo $type; ?>][post-edited-text]" id="<?php echo $type; ?>-post-edited-text" size="60" maxlength="120" value="<?php if ( isset( $wpt_settings[$type] ) ) { echo esc_attr( stripslashes( $wpt_settings[$type]['post-edited-text'] ) ); } ?>" />    
     479                <label for="<?php echo $type; ?>-post-edited-update"><strong><?php printf(__('Update when %1$s %2$s is edited','wp-to-twitter'),$word, $type); ?></strong></label><br /><label for="<?php echo $type; ?>-post-edited-text"><?php printf(__('Text for %1$s editing updates','wp-to-twitter'),$type); ?></label><br /><input type="text" class="wpt-template" name="wpt_post_types[<?php echo $type; ?>][post-edited-text]" id="<?php echo $type; ?>-post-edited-text" size="60" maxlength="120" value="<?php if ( isset( $wpt_settings[$type] ) ) { echo esc_attr( stripslashes( $wpt_settings[$type]['post-edited-text'] ) ); } ?>" />   
    579480            </p> 
    580481            </fieldset> 
     
    588489                <input type="checkbox" name="comment-published-update" id="comment-published-update" value="1" <?php echo jd_checkCheckbox('comment-published-update')?> /> 
    589490                <label for="comment-published-update"><strong><?php _e("Update Twitter when new comments are posted", 'wp-to-twitter'); ?></strong></label><br />                
    590                 <label for="comment-published-text"><?php _e("Text for new comments:", 'wp-to-twitter'); ?></label> <input type="text" name="comment-published-text" id="comment-published-text" size="60" maxlength="120" value="<?php echo ( esc_attr( stripslashes( get_option( 'comment-published-text' ) ) ) ); ?>" /> 
    591             </p> 
    592             <p><?php _e('In addition to standard template tags, comments can use <code>#commenter#</code> to post the commenter\'s name in the Tweet. <em>Use this at your own risk</em>, as it lets anybody who can post a comment on your site post a phrase in your Twitter stream.','wp-to-twitter'); ?> 
     491                <label for="comment-published-text"><?php _e("Text for new comments:", 'wp-to-twitter'); ?></label> <input aria-labelledby="comment-published-text-label" type="text" class="wpt-template" name="comment-published-text" id="comment-published-text" size="60" maxlength="120" value="<?php echo ( esc_attr( stripslashes( get_option( 'comment-published-text' ) ) ) ); ?>" /> 
     492            </p> 
     493            <p id='comment-published-text-label'><?php _e('In addition to standard template tags, comments can use <code>#commenter#</code> to post the commenter\'s name in the Tweet. <em>Use this at your own risk</em>, as it lets anybody who can post a comment on your site post a phrase in your Twitter stream.','wp-to-twitter'); ?> 
    593494            </fieldset>                  
    594495            <fieldset> 
     
    597498                <input type="checkbox" name="jd_twit_blogroll" id="jd_twit_blogroll" value="1" <?php echo jd_checkCheckbox('jd_twit_blogroll')?> /> 
    598499                <label for="jd_twit_blogroll"><strong><?php _e("Update Twitter when you post a Blogroll link", 'wp-to-twitter'); ?></strong></label><br />               
    599                 <label for="newlink-published-text"><?php _e("Text for new link updates:", 'wp-to-twitter'); ?></label> <input type="text" name="newlink-published-text" id="newlink-published-text" size="60" maxlength="120" value="<?php echo ( esc_attr( stripslashes( get_option( 'newlink-published-text' ) ) ) ); ?>" /><br /><small><?php _e('Available shortcodes: <code>#url#</code>, <code>#title#</code>, and <code>#description#</code>.','wp-to-twitter'); ?></small> 
     500                <label for="newlink-published-text"><?php _e("Text for new link updates:", 'wp-to-twitter'); ?></label> <input aria-labelledby="newlink-published-text-label" type="text" class="wpt-template" name="newlink-published-text" id="newlink-published-text" size="60" maxlength="120" value="<?php echo ( esc_attr( stripslashes( get_option( 'newlink-published-text' ) ) ) ); ?>" /><br /><span id="newlink-published-text-label"><?php _e('Available shortcodes: <code>#url#</code>, <code>#title#</code>, and <code>#description#</code>.','wp-to-twitter'); ?></span> 
    600501            </p> 
    601502            </fieldset> 
     
    610511</div> 
    611512</div> 
    612 <div class="ui-sortable meta-box-sortables"> 
    613 <div class="postbox"> 
    614 <h3><?php _e('<abbr title="Uniform Resource Locator">URL</abbr> Shortener Account Settings','wp-to-twitter'); ?></h3> 
    615     <div class="inside"> 
    616         <?php if ( get_option('jd_shortener') == 7 ) { ?> 
    617         <div class="panel"> 
    618         <h4 class="supr"><span><?php _e("Your Su.pr account details", 'wp-to-twitter'); ?> <?php _e('(optional)','wp-to-twitter'); ?></span></h4> 
    619     <form method="post" action=""> 
    620     <div> 
    621         <p> 
    622         <label for="suprlogin"><?php _e("Your Su.pr Username:", 'wp-to-twitter'); ?></label> 
    623         <input type="text" name="suprlogin" id="suprlogin" size="40" value="<?php echo ( esc_attr( get_option( 'suprlogin' ) ) ) ?>" /> 
    624         </p> 
    625         <p> 
    626         <label for="suprapi"><?php _e("Your Su.pr <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label> 
    627         <input type="text" name="suprapi" id="suprapi" size="40" value="<?php echo ( esc_attr( get_option( 'suprapi' ) ) ) ?>" /> 
    628         </p> 
    629         <div> 
    630         <input type="hidden" name="submit-type" value="suprapi" /> 
    631         </div> 
    632         <?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);  echo "<div>$nonce</div>"; ?>     
    633         <p><input type="submit" name="submit" value="Save Su.pr API Key" class="button-primary" /> <input type="submit" name="clear" value="Clear Su.pr API Key" />&raquo; <small><?php _e("Don't have a Su.pr account or API key? <a href='http://su.pr/'>Get one here</a>!<br />You'll need an API key in order to associate the URLs you create with your Su.pr account.", 'wp-to-twitter'); ?></small></p> 
    634     </div> 
    635     </form> 
    636     </div> 
    637     <?php } else if ( get_option('jd_shortener') == 2 ) { ?> 
    638     <div class="panel"> 
    639     <h4 class="bitly"><span><?php _e("Your Bit.ly account details", 'wp-to-twitter'); ?></span></h4> 
    640         <form method="post" action=""> 
    641         <div> 
    642             <p> 
    643             <label for="bitlylogin"><?php _e("Your Bit.ly username:", 'wp-to-twitter'); ?></label> 
    644             <input type="text" name="bitlylogin" id="bitlylogin" value="<?php echo ( esc_attr( get_option( 'bitlylogin' ) ) ) ?>" /> 
    645             <br /><small><a href="http://bitly.com/a/your_api_key"><?php _e('Get your Bit.ly API information.','wp-to-twitter'); ?></a></small></p>  
    646             <p> 
    647             <label for="bitlyapi"><?php _e("Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label> 
    648             <input type="text" name="bitlyapi" id="bitlyapi" size="40" value="<?php echo ( esc_attr( get_option( 'bitlyapi' ) ) ) ?>" /> 
    649             </p> 
    650             <p><a href="http://bitly.com/a/your_api_key"><?php _e('View your Bit.ly username and API key','wp-to-twitter'); ?></a></p> 
    651             <div> 
    652             <input type="hidden" name="submit-type" value="bitlyapi" /> 
    653             </div> 
    654         <?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);  echo "<div>$nonce</div>"; ?>     
    655             <p><input type="submit" name="submit" value="<?php _e('Save Bit.ly API Key','wp-to-twitter'); ?>" class="button-primary" /> <input type="submit" name="clear" value="<?php _e('Clear Bit.ly API Key','wp-to-twitter'); ?>" /><br /><small><?php _e("A Bit.ly API key and username is required to shorten URLs via the Bit.ly API and WP to Twitter.", 'wp-to-twitter' ); ?></small></p> 
    656         </div> 
    657         </form>  
    658     </div> 
    659     <?php } else if ( get_option('jd_shortener') == 5 || get_option('jd_shortener') == 6 ) { ?> 
    660     <div class="panel"> 
    661     <h4 class="yourls"><span><?php _e("Your YOURLS account details", 'wp-to-twitter'); ?></span></h4> 
    662         <form method="post" action=""> 
    663         <div> 
    664             <p> 
    665             <label for="yourlspath"><?php _e('Path to your YOURLS config file (Local installations)','wp-to-twitter'); ?></label> <input type="text" id="yourlspath" name="yourlspath" size="60" value="<?php echo ( esc_attr( get_option( 'yourlspath' ) ) ); ?>"/> 
    666             <small><?php _e('Example:','wp-to-twitter'); ?> <code>/home/username/www/www/yourls/includes/config.php</code></small> 
    667             </p>                 
    668             <p> 
    669             <label for="yourlsurl"><?php _e('URI to the YOURLS API (Remote installations)','wp-to-twitter'); ?></label> <input type="text" id="yourlsurl" name="yourlsurl" size="60" value="<?php echo ( esc_attr( get_option( 'yourlsurl' ) ) ); ?>"/> 
    670             <small><?php _e('Example:','wp-to-twitter'); ?> <code>http://domain.com/yourls-api.php</code></small> 
    671             </p> 
    672             <p> 
    673             <label for="yourlslogin"><?php _e("Your YOURLS username:", 'wp-to-twitter'); ?></label> 
    674             <input type="text" name="yourlslogin" id="yourlslogin" size="30" value="<?php echo ( esc_attr( get_option( 'yourlslogin' ) ) ) ?>" /> 
    675             </p>     
    676             <p> 
    677             <label for="yourlsapi"><?php _e("Your YOURLS password:", 'wp-to-twitter'); ?> <?php if ( get_option( 'yourlsapi' ) != '') { _e("<em>Saved</em>",'wp-to-twitter'); } ?></label> 
    678             <input type="password" name="yourlsapi" id="yourlsapi" size="30" value="" /> 
    679             </p> 
    680             <p> 
    681             <input type="radio" name="jd_keyword_format" id="jd_keyword_id" value="1" <?php echo jd_checkSelect( 'jd_keyword_format',1,'checkbox' ); ?> />      <label for="jd_keyword_id"><?php _e("Post ID for YOURLS url slug.",'wp-to-twitter'); ?></label><br /> 
    682             <input type="radio" name="jd_keyword_format" id="jd_keyword" value="2" <?php echo jd_checkSelect( 'jd_keyword_format',2,'checkbox' ); ?> />         <label for="jd_keyword"><?php _e("Custom keyword for YOURLS url slug.",'wp-to-twitter'); ?></label><br /> 
    683             <input type="radio" name="jd_keyword_format" id="jd_keyword_default" value="0" <?php echo jd_checkSelect( 'jd_keyword_format',0,'checkbox' ); ?> /> <label for="jd_keyword_default"><?php _e("Default: sequential URL numbering.",'wp-to-twitter'); ?></label> 
    684             </p> 
    685             <div> 
    686             <input type="hidden" name="submit-type" value="yourlsapi" /> 
    687             </div> 
    688         <?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);  echo "<div>$nonce</div>"; ?>     
    689             <p><input type="submit" name="submit" value="<?php _e('Save YOURLS Account Info','wp-to-twitter'); ?>" class="button-primary" /> <input type="submit" name="clear" value="<?php _e('Clear YOURLS password','wp-to-twitter'); ?>" /><br /><small><?php _e("A YOURLS password and username is required to shorten URLs via the remote YOURLS API and WP to Twitter.", 'wp-to-twitter' ); ?></small></p> 
    690         </div> 
    691         </form>      
    692         </div> 
    693     <?php } else { ?> 
    694     <?php _e('Your shortener does not require any account settings.','wp-to-twitter'); ?> 
    695     <?php } ?> 
    696         </div> 
    697 </div> 
    698 </div> 
     513 
     514<?php echo apply_filters( 'wpt_shortener_controls', '' ); ?> 
    699515 
    700516<div class="ui-sortable meta-box-sortables"> 
     
    706522    <?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);  echo "<div>$nonce</div>"; ?>     
    707523    <input type="submit" name="submit" value="<?php _e("Save Advanced WP->Twitter Options", 'wp-to-twitter'); ?>" class="button-primary button-side" />  
     524         
    708525            <fieldset> 
    709                 <legend><?php _e("Advanced Tweet settings","wp-to-twitter"); ?></legend> 
    710             <p> 
    711                  <input type="checkbox" name="jd_strip_nonan" id="jd_strip_nonan" value="1" <?php echo jd_checkCheckbox('jd_strip_nonan'); ?> /> <label for="jd_strip_nonan"><?php _e("Strip nonalphanumeric characters from tags",'wp-to-twitter'); ?></label><br /> 
    712                 <label for="jd_replace_character"><?php _e("Spaces in tags replaced with:",'wp-to-twitter'); ?></label> <input type="text" name="jd_replace_character" id="jd_replace_character" value="<?php echo esc_attr( get_option('jd_replace_character') ); ?>" size="3" /><br /> 
    713                 <small><?php _e("Default replacement is an underscore (<code>_</code>). Use <code>[ ]</code> to remove spaces entirely.",'wp-to-twitter'); ?></small>                    
     526                <legend><?php _e('Tags','wp-to-twitter'); ?></legend> 
     527            <p> 
     528                 <input type="checkbox" name="jd_strip_nonan" id="jd_strip_nonan" value="1" <?php echo jd_checkCheckbox('jd_strip_nonan'); ?> /> <label for="jd_strip_nonan"><?php _e("Strip nonalphanumeric characters from tags",'wp-to-twitter'); ?></label> 
    714529            </p> 
    715530            <p> 
    716531            <input type="checkbox" name="wpt_tag_source" id="wpt_tag_source" value="slug" <?php echo jd_checkSelect( 'wpt_tag_source', 'slug', 'checkbox' ); ?> /> <label for="wpt_tag_source"><?php _e("Use tag slug as hashtag value",'wp-to-twitter'); ?></label><br /> 
    717  
    718             </p> 
    719             <p> 
    720             <label for="jd_max_tags"><?php _e("Maximum number of tags to include:",'wp-to-twitter'); ?></label> <input type="text" name="jd_max_tags" id="jd_max_tags" value="<?php echo esc_attr( get_option('jd_max_tags') ); ?>" size="3" /> 
    721             <label for="jd_max_characters"><?php _e("Maximum length in characters for included tags:",'wp-to-twitter'); ?></label> <input type="text" name="jd_max_characters" id="jd_max_characters" value="<?php echo esc_attr( get_option('jd_max_characters') ); ?>" size="3" /><br /> 
    722             <small><?php _e("These options allow you to restrict the length and number of WordPress tags sent to Twitter as hashtags. Set to <code>0</code> or leave blank to allow any and all tags.",'wp-to-twitter'); ?></small>          
    723             </p>             
    724             <p> 
    725                 <label for="jd_post_excerpt"><?php _e("Length of post excerpt (in characters):", 'wp-to-twitter'); ?></label> <input type="text" name="jd_post_excerpt" id="jd_post_excerpt" size="3" maxlength="3" value="<?php echo ( esc_attr( get_option( 'jd_post_excerpt' ) ) ) ?>" /><br /><small><?php _e("By default, extracted from the post itself. If you use the 'Excerpt' field, that will be used instead.", 'wp-to-twitter'); ?></small> 
     532            </p> 
     533            <p> 
     534                <label for="jd_replace_character"><?php _e("Spaces in tags replaced with:",'wp-to-twitter'); ?></label> <input type="text" name="jd_replace_character" id="jd_replace_character" value="<?php echo esc_attr( get_option('jd_replace_character') ); ?>" size="3" /> 
     535            </p> 
     536            <p> 
     537            <label for="jd_max_tags"><?php _e("Maximum number of tags to include:",'wp-to-twitter'); ?></label> <input aria-labelledby="jd_max_characters_label" type="text" name="jd_max_tags" id="jd_max_tags" value="<?php echo esc_attr( get_option('jd_max_tags') ); ?>" size="3" /> 
     538            <label for="jd_max_characters"><?php _e("Maximum length in characters for included tags:",'wp-to-twitter'); ?></label> <input type="text" name="jd_max_characters" id="jd_max_characters" value="<?php echo esc_attr( get_option('jd_max_characters') ); ?>" size="3" /> 
     539            </p> 
     540            </fieldset> 
     541            <fieldset> 
     542            <legend><?php _e('Template Tag Settings','wp-to-twitter'); ?></legend> 
     543            <p> 
     544                <label for="jd_post_excerpt"><?php _e("Length of post excerpt (in characters):", 'wp-to-twitter'); ?></label> <input aria-labelledby="jd_post_excerpt_label" type="text" name="jd_post_excerpt" id="jd_post_excerpt" size="3" maxlength="3" value="<?php echo ( esc_attr( get_option( 'jd_post_excerpt' ) ) ) ?>" /> (<em id="jd_post_excerpt_label"><?php _e("Extracted from the post. If you use the 'Excerpt' field, it will be used instead.", 'wp-to-twitter'); ?></em>) 
    726545            </p>                 
    727546            <p> 
    728                 <label for="jd_date_format"><?php _e("WP to Twitter Date Formatting:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_date_format" id="jd_date_format" size="12" maxlength="12" value="<?php if (get_option('jd_date_format')=='') { echo ( esc_attr( stripslashes( get_option('date_format') ) ) ); } else { echo ( esc_attr( get_option( 'jd_date_format' ) ) ); }?>" /> (<?php if ( get_option( 'jd_date_format' ) != '' ) { echo date_i18n( get_option( 'jd_date_format' ) ); } else { echo "<em>".date_i18n( get_option( 'date_format' ) )."</em>"; } ?>)<br /> 
    729                 <small><?php _e("Default is from your general settings. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Date Formatting Documentation</a>.", 'wp-to-twitter'); ?></small> 
     547                <label for="jd_date_format"><?php _e("WP to Twitter Date Formatting:", 'wp-to-twitter'); ?></label> <input type="text" aria-labelledby="date_format_label" name="jd_date_format" id="jd_date_format" size="12" maxlength="12" value="<?php if (get_option('jd_date_format')=='') { echo ( esc_attr( stripslashes( get_option('date_format') ) ) ); } else { echo ( esc_attr( get_option( 'jd_date_format' ) ) ); }?>" /> <?php if ( get_option( 'jd_date_format' ) != '' ) { echo date_i18n( get_option( 'jd_date_format' ) ); } else { echo "<em>".date_i18n( get_option( 'date_format' ) )."</em>"; } ?> (<em id="date_format_label"><?php _e("Default is from your general settings. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Date Formatting Documentation</a>.", 'wp-to-twitter'); ?></em>) 
    730548            </p> 
    731549             
    732550            <p> 
    733551                <label for="jd_twit_prepend"><?php _e("Custom text before all Tweets:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_twit_prepend" id="jd_twit_prepend" size="20" value="<?php echo ( esc_attr( stripslashes( get_option( 'jd_twit_prepend' ) ) ) ) ?>" /> 
     552            </p> 
     553            <p> 
    734554                <label for="jd_twit_append"><?php _e("Custom text after all Tweets:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_twit_append" id="jd_twit_append" size="20" value="<?php echo ( esc_attr( stripslashes( get_option( 'jd_twit_append' ) ) ) ) ?>" /> 
    735555            </p> 
    736556            <p> 
    737                 <label for="jd_twit_custom_url"><?php _e("Custom field for an alternate URL to be shortened and Tweeted:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_twit_custom_url" id="jd_twit_custom_url" size="40" maxlength="120" value="<?php echo ( esc_attr( stripslashes( get_option( 'jd_twit_custom_url' ) ) ) ) ?>" /><br /> 
    738                 <small><?php _e("You can use a custom field to send an alternate URL for your post. The value is the name of a custom field containing your external URL.", 'wp-to-twitter'); ?></small> 
    739             </p> 
    740             <?php  
     557                <label for="jd_twit_custom_url"><?php _e("Custom field for an alternate URL to be shortened and Tweeted:", 'wp-to-twitter'); ?></label> <input type="text" name="jd_twit_custom_url" id="jd_twit_custom_url" size="40" maxlength="120" value="<?php echo ( esc_attr( stripslashes( get_option( 'jd_twit_custom_url' ) ) ) ) ?>" /> 
     558            </p> 
     559            </fieldset> 
     560             
     561            <?php 
    741562            $inputs = ''; 
    742563            $default_order = array(  
     
    749570                'account'=>6, 
    750571                'tags'=>7, 
    751                 'modified'=>8 ); 
     572                'modified'=>8, 
     573                '@'=>9, 
     574                'cat_desc'=>10 
     575                ); 
    752576            $preferred_order = get_option( 'wpt_truncation_order' ); 
     577            if ( !$preferred_order ) $preferred_order = array(); 
     578            $preferred_order = array_merge( $preferred_order, $default_order ); 
    753579            if ( is_array( $preferred_order ) ) { $default_order = $preferred_order; } 
    754580            asort($default_order); 
     
    759585            ?> 
    760586            <fieldset> 
    761             <legend><?php _e('Preferred status update truncation sequence','wp-to-twitter'); ?></legend> 
     587            <legend><?php _e('Template tag priority order','wp-to-twitter'); ?></legend> 
     588            <p style="float: right; width: 80%;"><?php _e('The order in which items will be abbreviated or removed from your Tweet if the Tweet is too long to send to Twitter.','wp-to-twitter'); ?></p> 
    762589            <p> 
    763590            <?php echo $inputs; ?> 
    764             <small><?php _e('This is the order in which items will be abbreviated or removed from your status update if it is too long to send to Twitter.','wp-to-twitter'); ?></small> 
    765591            </p> 
    766592            </fieldset> 
    767         </fieldset>  
    768593        <fieldset> 
    769594        <legend><?php _e( "Special Cases when WordPress should send a Tweet",'wp-to-twitter' ); ?></legend> 
     
    773598                <input type="checkbox" name="jd_tweet_default_edit" id="jd_tweet_default_edit" value="1" <?php echo jd_checkCheckbox('jd_tweet_default_edit')?> /> 
    774599                <label for="jd_tweet_default_edit"><?php _e("Do not post Tweets by default (editing only)", 'wp-to-twitter'); ?></label><br />               
    775                 <small><?php _e("By default, all posts meeting other requirements will be posted to Twitter. Check this to change your setting.", 'wp-to-twitter'); ?></small> 
    776600            </p> 
    777601            <p> 
    778602                <input type="checkbox" name="wpt_inline_edits" id="wpt_inline_edits" value="1" <?php echo jd_checkCheckbox('wpt_inline_edits')?> /> 
    779603                <label for="wpt_inline_edits"><?php _e("Allow status updates from Quick Edit", 'wp-to-twitter'); ?></label><br /> 
    780                 <small><?php _e("If checked, all posts edited individually or in bulk through the Quick Edit feature will be Tweeted.", 'wp-to-twitter'); ?></small> 
    781  
    782             </p> 
    783             <?php if ( function_exists( 'wpt_pro_exists') && wpt_pro_exists() == true && get_option( 'wpt_delay_tweets' ) > 0 ) {  
     604 
     605            </p> 
     606            <?php if ( function_exists( 'wpt_pro_exists') && wpt_pro_exists() == true && get_option( 'wpt_delay_tweets' ) > 0 ) { 
    784607                $r_disabled = " disabled='disabled'";  
    785608                $r_message = "<em>".__('Delaying tweets with WP Tweets PRO moves Tweeting to an publishing-independent action.','wp-to-twitter' )."</em>";  
     
    816639        </fieldset> 
    817640        <fieldset id="indauthors"> 
    818         <legend><?php _e('Individual Authors','wp-to-twitter'); ?></legend> 
    819             <p> 
    820                 <input type="checkbox" name="jd_individual_twitter_users" id="jd_individual_twitter_users" value="1" <?php echo jd_checkCheckbox('jd_individual_twitter_users')?> /> 
    821                 <label for="jd_individual_twitter_users"><?php _e("Authors have individual Twitter accounts", 'wp-to-twitter'); ?></label><br /><small><?php _e('Authors can add their username in their user profile. This feature can only add an @reference to the author. The @reference is placed using the <code>#account#</code> shortcode, which will pick up the main account if user accounts are not enabled.', 'wp-to-twitter'); ?></small> 
    822             </p> 
     641        <legend><?php _e('Author Settings','wp-to-twitter'); ?></legend> 
     642            <p> 
     643                <input aria-labelledby="jd_individual_twitter_users_label" type="checkbox" name="jd_individual_twitter_users" id="jd_individual_twitter_users" value="1" <?php echo jd_checkCheckbox('jd_individual_twitter_users')?> /> 
     644                <label for="jd_individual_twitter_users"><?php _e("Authors have individual Twitter accounts", 'wp-to-twitter'); ?></label> 
     645            </p> 
     646            <p id="jd_individual_twitter_users_label"><?php _e('Authors can add their username in their user profile. With the free edition of WP to Twitter, it adds an @reference to the author. The @reference is placed using the <code>#account#</code> shortcode, which will pick up the main account if the user account isn\'t configured.', 'wp-to-twitter'); ?> 
     647            </p> 
     648        </fieldset> 
     649        <fieldset> 
     650        <legend><?php _e('Permissions','wp-to-twitter'); ?></legend> 
    823651        <?php 
    824652        global $wp_roles; 
     
    836664        ?> 
    837665            <p> 
    838             <label for="wtt_user_permissions"><?php _e('The lowest user group that can add their Twitter information','wp-to-twitter'); ?></label> <select id="wtt_user_permissions" name="wtt_user_permissions"> 
     666            <select id="wtt_user_permissions" name="wtt_user_permissions"> 
    839667                <?php echo $permissions; ?> 
    840             </select>  
     668            </select> <label for="wtt_user_permissions"><?php _e('The lowest user group that can add their Twitter information','wp-to-twitter'); ?></label>  
    841669            </p> 
    842670            <p> 
    843             <label for="wtt_show_custom_tweet"><?php _e('The lowest user group that can see the Custom Tweet options when posting','wp-to-twitter'); ?></label> <select id="wtt_show_custom_tweet" name="wtt_show_custom_tweet"> 
     671            <select id="wtt_show_custom_tweet" name="wtt_show_custom_tweet"> 
    844672                <?php echo $options; ?> 
    845             </select>  
    846             </p> 
    847             <p> 
    848             <label for="wpt_twitter_switch"><?php _e('The lowest user group that can toggle the Tweet/Don\'t Tweet option','wp-to-twitter'); ?></label> <select id="wpt_twitter_switch" name="wpt_twitter_switch"> 
     673            </select> <label for="wtt_show_custom_tweet"><?php _e('The lowest user group that can see the Custom Tweet options when posting','wp-to-twitter'); ?></label>  
     674            </p> 
     675            <p> 
     676            <select id="wpt_twitter_switch" name="wpt_twitter_switch"> 
    849677                <?php echo $switcher; ?> 
    850             </select>  
    851             </p> 
    852             <p> 
    853             <label for="wpt_can_tweet"><?php _e('The lowest user group that can send Twitter updates','wp-to-twitter'); ?></label> <select id="wpt_can_tweet" name="wpt_can_tweet"> 
     678            </select> <label for="wpt_twitter_switch"><?php _e('The lowest user group that can toggle the Tweet/Don\'t Tweet option','wp-to-twitter'); ?></label>  
     679            </p> 
     680            <p> 
     681            <select id="wpt_can_tweet" name="wpt_can_tweet"> 
    854682                <?php echo $can_tweet; ?> 
    855             </select>  
     683            </select> <label for="wpt_can_tweet"><?php _e('The lowest user group that can send Twitter updates','wp-to-twitter'); ?></label>  
    856684            </p>             
    857685        </fieldset> 
    858686        <fieldset> 
    859         <legend><?php _e('Disable Error Messages','wp-to-twitter'); ?></legend> 
     687        <legend><?php _e('Error Messages and Debugging','wp-to-twitter'); ?></legend> 
    860688            <ul> 
    861689            <li><input type="checkbox" name="disable_url_failure" id="disable_url_failure" value="1" <?php echo jd_checkCheckbox('disable_url_failure')?> />    <label for="disable_url_failure"><?php _e("Disable global URL shortener error messages.", 'wp-to-twitter'); ?></label></li> 
    862690            <li><input type="checkbox" name="disable_twitter_failure" id="disable_twitter_failure" value="1" <?php echo jd_checkCheckbox('disable_twitter_failure')?> />    <label for="disable_twitter_failure"><?php _e("Disable global Twitter API error messages.", 'wp-to-twitter'); ?></label></li> 
    863             <li><input type="checkbox" name="disable_oauth_notice" id="disable_oauth_notice" value="1" <?php echo jd_checkCheckbox('disable_oauth_notice')?> /> <label for="disable_oauth_notice"><?php _e("Disable notification to implement OAuth", 'wp-to-twitter'); ?></label></li> 
    864691            <li><input type="checkbox" name="wp_debug_oauth" id="wp_debug_oauth" value="1" <?php echo jd_checkCheckbox('wp_debug_oauth')?> /> 
    865692                <label for="wp_debug_oauth"><?php _e("Get Debugging Data for OAuth Connection", 'wp-to-twitter'); ?></label></li> 
     
    929756            <div class="inside resources"> 
    930757            <p> 
    931             <a href="https://twitter.com/intent/tweet?screen_name=joedolson&text=WP%20to%20Twitter%20is%great!" class="twitter-mention-button" data-size="large" data-related="joedolson">Tweet to @joedolson</a> 
    932             <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> 
    933             </p> 
    934             <ul> 
    935             <li><a href="?page=wp-to-twitter/wp-to-twitter.php&amp;export=settings"><?php _e("View Settings",'wp-to-twitter'); ?></a> /  
    936             <?php if ( function_exists( 'wpt_pro_exists' ) ) { $support = admin_url('admin.php?page=wp-tweets-pro'); } else { $support = admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php');} ?> 
    937             <a href="<?php echo $support; ?>#get-support"><?php _e("Get Support",'wp-to-twitter'); ?></a></li> 
    938             </ul> 
     758            <a href="https://twitter.com/intent/tweet?screen_name=joedolson&text=WP%20to%20Twitter%20is%20great!" class="twitter-mention-button" data-size="large" data-related="joedolson">Tweet about WP to Twitter</a> 
     759            <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> 
     760            </p> 
     761            <?php if ( function_exists( 'wpt_pro_exists' ) ) { $support = admin_url('admin.php?page=wp-tweets-pro'); } else { $support = admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php'); } ?> 
     762            <a href="<?php echo $support; ?>#get-support"><?php _e("Get Support",'wp-to-twitter'); ?></a> 
    939763            <?php if ( get_option('jd_donations') != 1 && !function_exists( 'wpt_pro_exists' )  ) { ?> 
    940764            <div> 
    941765            <p><?php _e('<a href="http://www.joedolson.com/donate.php">Make a donation today!</a> Every donation counts - donate $2, $10, or $100 and help me keep this plug-in running!','wp-to-twitter'); ?></p> 
     766            <p class='flattr'><a href="http://flattr.com/thing/559528/WP-to-Twitter"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr WP to Twitter" /></a></p>            
    942767            <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
    943768                <div> 
     
    948773                </div> 
    949774            </form> 
    950             </div>       
     775            </div> 
    951776        <?php } ?> 
    952777            </div> 
     
    980805            <li><?php _e("<code>#post#</code>: a short excerpt of the post content", 'wp-to-twitter'); ?></li> 
    981806            <li><?php _e("<code>#category#</code>: the first selected category for the post", 'wp-to-twitter'); ?></li> 
     807            <li><?php _e("<code>#cat_desc#</code>: custom value from the category description field",'wp-to-twitter'); ?></li>           
    982808            <li><?php _e("<code>#date#</code>: the post date", 'wp-to-twitter'); ?></li> 
    983809            <li><?php _e("<code>#modified#</code>: the post modified date", 'wp-to-twitter'); ?></li> 
     
    986812            <li><?php _e("<code>#displayname#</code>: post author's display name", 'wp-to-twitter'); ?></li> 
    987813            <li><?php _e("<code>#account#</code>: the twitter @reference for the account (or the author, if author settings are enabled and set.)",'wp-to-twitter'); ?></li> 
     814            <li><?php _e("<code>#@#</code>: the twitter @reference for the author or blank, if not set",'wp-to-twitter'); ?></li> 
    988815            <li><?php _e("<code>#tags#</code>: your tags modified into hashtags. See options in the Advanced Settings section, below.",'wp-to-twitter'); ?></li> 
    989816<?php if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) { ?> 
  • wp-to-twitter/trunk/wp-to-twitter-oauth.php

    r667701 r690784  
    3838} 
    3939    if ( !empty( $ack ) && !empty( $acs ) && !empty( $ot ) && !empty( $ots ) ) {     
    40         require_once( plugin_dir_path(__FILE__).'/jd_twitterOAuth.php' ); 
     40        require_once( plugin_dir_path(__FILE__).'wpt_twitter_oauth.php' ); 
    4141        $connection = new jd_TwitterOAuth( $ack,$acs,$ot,$ots ); 
    4242        $connection->useragent = 'WP to Twitter http://www.joedolson.com/articles/wp-to-twitter'; 
     
    174174        $warning .= "</ul>"; 
    175175    } 
    176     $ssl = __("Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> queries</a>.<br />",'wp-to-twitter'); 
     176    $ssl = __("Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> queries</a>.",'wp-to-twitter'); 
    177177    $date = __("There was an error querying Twitter's servers",'wp-to-twitter'); 
    178     $errors = "<p>".$ssl.$warning."</p>"; 
     178    $errors = "<p>".$ssl."</p>".$warning; 
    179179} else { 
    180180    $date = date( DATE_COOKIE, strtotime($response['headers']['date']) ); 
     
    186186 
    187187    if ( !wtt_oauth_test( $auth,'verify' ) ) { 
     188     
     189    // show notification to authenticate with OAuth. No longer global; settings only. 
     190    if ( !wpt_check_oauth() ) { 
     191        $admin_url = ( is_plugin_active('wp-tweets-pro/wpt-pro-functions.php') )?admin_url('admin.php?page=wp-tweets-pro'):admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php'); 
     192        $message = sprintf(__("Twitter requires authentication by OAuth. You will need to <a href='%s'>update your settings</a> to complete installation of WP to Twitter.", 'wp-to-twitter'), $admin_url ); 
     193        echo "<div class='error'><p>$message</p></div>"; 
     194    } 
     195     
    188196        $ack = ( !$auth )?esc_attr( get_option('app_consumer_key') ):esc_attr( get_user_meta( $auth,'app_consumer_key', true ) ); 
    189197        $acs = ( !$auth )?esc_attr( get_option('app_consumer_secret') ):esc_attr( get_user_meta( $auth,'app_consumer_secret', true ) ); 
     
    200208            '.$errors.' 
    201209            <p>'.__('Your server timezone (should be UTC,GMT,Europe/London or equivalent):','wp-to-twitter').date_default_timezone_get().'</p> 
    202  
    203             <p>'.__('<em>Note</em>: you will not add your Twitter user information to WP to Twitter; it is not used in this authentication method.', 'wp-to-twitter').'</p>  
    204210            </div> 
    205211            '.$form.' 
     
    264270            $submit = '<input type="checkbox" name="oauth_settings" value="wtt_twitter_disconnect" id="disconnect" /> <label for="disconnect">'.__('Disconnect your WordPress and Twitter Account','wp-to-twitter').'</label>'; 
    265271        } 
    266         $warning =  ( get_option('wpt_authentication_missing') == 'true' )?'<p>'.__('<strong>Troubleshooting tip:</strong> Connected, but getting a notice that your Authentication credentials are missing or incorrect? Check whether your Access token has read and write permission. If not, you\'ll need to create a new token.','wp-to-twitter').'</p>':''; 
     272        $warning =  ( get_option('wpt_authentication_missing') )?'<p>'.__('<strong>Troubleshooting tip:</strong> Connected, but getting a error that your Authentication credentials are missing or incorrect? Check that your Access token has read and write permission. If not, you\'ll need to create a new token. <a href="http://www.joedolson.com/articles/wp-to-twitter/support-2/#q1">Read the FAQ</a>','wp-to-twitter').'</p>':''; 
    267273        if ( !is_wp_error( $response ) ) {  
    268274            $diff = ( abs( time() - strtotime($response['headers']['date']) ) > 300 )?'<p> '.__( 'Your time stamps are more than 5 minutes apart. Your server could lose its connection with Twitter.','wp-to-twitter').'</p>':'';  
     
    290296                </div>       
    291297                '.$nonce.' 
    292             <p>'.__('Your server time:','wp-to-twitter').' <code>'.$server_time.'</code>.<br />'.__('Twitter\'s current server time: ','wp-to-twitter').'<code>'.$date.'</code>.</p> 
     298            <p>'.__('Your server time:','wp-to-twitter').' <code>'.$server_time.'</code>.<br />'.__('Twitter\'s server time: ','wp-to-twitter').'<code>'.$date.'</code>.</p> 
    293299            '.$errors.$diff.'</div>' ); 
     300            // sent as debugging 
     301            global $wpt_server_string; 
     302            $wpt_server_string =  
     303            __('Your server time:','wp-to-twitter').' <code>'.$server_time.'</code> 
     304            '.__('Twitter\'s server time: ','wp-to-twitter').'<code>'.$date.'</code> 
     305            '.$errors.$diff; 
    294306    } 
    295307    if ( !$auth ) { 
  • wp-to-twitter/trunk/wp-to-twitter-shorteners.php

    r667701 r690784  
    44//jd_expand_yourl 
    55 
    6 add_filter( 'wptt_shorten_link','jd_shorten_link', 10, 4 ); 
     6if ( !function_exists( 'jd_shorten_link' ) ) { // prep work for future plug-in replacement. 
    77 
    8 function jd_shorten_link( $thispostlink, $thisposttitle, $post_ID, $testmode=false ) { 
    9     if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    10         wp_mail( WPT_DEBUG_ADDRESS,"Initial Link Data: #$post_ID","$thispostlink, $thisposttitle, $post_ID, $testmode" ); // DEBUG 
    11     } 
    12         // filter link before sending to shortener or adding analytics 
    13         $thispostlink = apply_filters('wpt_shorten_link',$thispostlink,$post_ID ); 
    14         $suprapi =  trim ( get_option( 'suprapi' ) ); 
    15         $suprlogin = trim ( get_option( 'suprlogin' ) ); 
    16         $bitlyapi =  trim ( get_option( 'bitlyapi' ) ); 
    17         $bitlylogin =  trim ( strtolower( get_option( 'bitlylogin' ) ) ); 
    18         $yourlslogin =  trim ( get_option( 'yourlslogin') ); 
    19         $yourlsapi = stripcslashes( get_option( 'yourlsapi' ) ); 
    20         if ($testmode == false ) { 
    21             if ( get_option('use-twitter-analytics') == 1 || get_option('use_dynamic_analytics') == 1 ) { 
    22                 if ( get_option('use_dynamic_analytics') == '1' ) { 
    23                     $campaign_type = get_option('jd_dynamic_analytics'); 
    24                     if ( $campaign_type == "post_category" && $testmode != 'link' ) { 
    25                         $category = get_the_category( $post_ID ); 
    26                         $campaign = sanitize_title( $category[0]->cat_name ); 
    27                     } else if ( $campaign_type == "post_ID") { 
    28                         $campaign = $post_ID; 
    29                     } else if ( $campaign_type == "post_title" && $testmode != 'link' ) { 
    30                         $post = get_post( $post_ID ); 
    31                         $campaign = sanitize_title( $post->post_title );  
    32                     } else { 
    33                         if ( $testmode != 'link' ) { 
     8    add_filter( 'wptt_shorten_link','jd_shorten_link', 10, 4 ); 
     9 
     10    function jd_shorten_link( $url, $thisposttitle, $post_ID, $testmode=false ) { 
     11        if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
     12            wp_mail( WPT_DEBUG_ADDRESS,"Initial Link Data: #$post_ID","$url, $thisposttitle, $post_ID, $testmode" ); // DEBUG 
     13        } 
     14            // filter link before sending to shortener or adding analytics 
     15            $url = apply_filters('wpt_shorten_link',$url,$post_ID ); 
     16            $suprapi =  trim ( get_option( 'suprapi' ) ); 
     17            $suprlogin = trim ( get_option( 'suprlogin' ) ); 
     18            $bitlyapi =  trim ( get_option( 'bitlyapi' ) ); 
     19            $bitlylogin =  trim ( strtolower( get_option( 'bitlylogin' ) ) ); 
     20            $yourlslogin =  trim ( get_option( 'yourlslogin') ); 
     21            $yourlsapi = stripcslashes( get_option( 'yourlsapi' ) ); 
     22            if ($testmode == false ) { 
     23                if ( get_option('use-twitter-analytics') == 1 || get_option('use_dynamic_analytics') == 1 ) { 
     24                    if ( get_option('use_dynamic_analytics') == '1' ) { 
     25                        $campaign_type = get_option('jd_dynamic_analytics'); 
     26                        if ( $campaign_type == "post_category" && $testmode != 'link' ) { 
     27                            $category = get_the_category( $post_ID ); 
     28                            $campaign = sanitize_title( $category[0]->cat_name ); 
     29                        } else if ( $campaign_type == "post_ID") { 
     30                            $campaign = $post_ID; 
     31                        } else if ( $campaign_type == "post_title" && $testmode != 'link' ) { 
    3432                            $post = get_post( $post_ID ); 
    35                             $post_author = $post->post_author; 
    36                             $campaign = get_the_author_meta( 'user_login',$post_author ); 
     33                            $campaign = sanitize_title( $post->post_title );  
    3734                        } else { 
    38                             $post_author = ''; 
    39                             $campaign = ''; 
     35                            if ( $testmode != 'link' ) { 
     36                                $post = get_post( $post_ID ); 
     37                                $post_author = $post->post_author; 
     38                                $campaign = get_the_author_meta( 'user_login',$post_author ); 
     39                            } else { 
     40                                $post_author = ''; 
     41                                $campaign = ''; 
     42                            } 
    4043                        } 
    41                     } 
     44                    } else { 
     45                        $campaign = get_option('twitter-analytics-campaign'); 
     46                    } 
     47                    if ( strpos( $url,"%3F" ) === FALSE && strpos( $url,"?" ) === FALSE ) { 
     48                        $ct = "?"; 
     49                    } else { 
     50                        $ct = "&"; 
     51                    } 
     52                    $ga = "utm_campaign=$campaign&utm_medium=twitter&utm_source=twitter"; 
     53                    $url .= $ct .= $ga; 
     54                } 
     55            } 
     56            $url = urlencode(urldecode(trim($url))); // prevent double-encoding 
     57 
     58            // custom word setting 
     59            $keyword_format = ( get_option( 'jd_keyword_format' ) == '1' )?$post_ID:false; 
     60            $keyword_format = ( get_option( 'jd_keyword_format' ) == '2' )?get_post_meta( $post_ID,'_yourls_keyword',true ):$keyword_format; 
     61            // Generate and grab the short url 
     62            switch ( get_option( 'jd_shortener' ) ) { 
     63                case 0: 
     64                case 1: 
     65                case 3: 
     66                    $shrink = urldecode($url); 
     67                    break; 
     68                case 4: 
     69                    $shrink = urldecode($url);               
     70                    if ( function_exists('wp_get_shortlink') ) { // use wp_get_shortlink if available 
     71                        $shrink = ( $post_ID != false )?wp_get_shortlink( $post_ID ):$url; 
     72                    }  
     73                break; 
     74                case 2: // updated to v3 3/31/2010 
     75                $decoded = jd_remote_json( "http://api.bitly.com/v3/shorten?longUrl=".$url."&login=".$bitlylogin."&apiKey=".$bitlyapi."&format=json" ); 
     76                $error = ''; 
     77                    if ($decoded) { 
     78                        if ($decoded['status_code'] != 200) { 
     79                            $shrink = $decoded; 
     80                            $error = $decoded['status_txt']; 
     81                        } else { 
     82                            $shrink = $decoded['data']['url'];       
     83                        } 
     84                    } else { 
     85                    $shrink = false; 
     86                    update_option( 'wp_bitly_error',"JSON result could not be decoded"); 
     87                    }    
     88                    if ( !is_valid_url($shrink) ) { $shrink = false; update_option( 'wp_bitly_error',$error ); } 
     89                break; 
     90                case 5: 
     91                    // local YOURLS installation 
     92                    $url = urldecode($url); 
     93                    global $yourls_reserved_URL; 
     94                    define('YOURLS_INSTALLING', true); // Pretend we're installing YOURLS to bypass test for install or upgrade 
     95                    define('YOURLS_FLOOD_DELAY_SECONDS', 0); // Disable flood check 
     96                    $opath = get_option( 'yourlspath' ); 
     97                    $ypath = str_replace( 'user','includes', $opath ); 
     98                    if ( file_exists( dirname( $ypath ).'/load-yourls.php' ) ) { // YOURLS 1.4+ 
     99                        require_once( dirname( $ypath ).'/load-yourls.php' ); 
     100                        global $ydb; 
     101                        if ( function_exists( 'yourls_add_new_link' ) ) { 
     102                            $yourls_result = yourls_add_new_link( $url, $keyword_format, $thisposttitle ); 
     103                        } else { 
     104                            $yourls_result = $url; 
     105                        } 
     106                    } else { // YOURLS 1.3 
     107                        if ( file_exists( get_option( 'yourslpath' ) ) ) { 
     108                            require_once( get_option( 'yourlspath' ) );  
     109                            $yourls_db = new wpdb( YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_DB_HOST ); 
     110                            $yourls_result = yourls_add_new_link( $url, $keyword_format, $yourls_db ); 
     111                        } 
     112                    } 
     113                    if ($yourls_result) { 
     114                        $shrink = $yourls_result['shorturl'];            
     115                    } else { 
     116                        $shrink = false; 
     117                    } 
     118                    break; 
     119                case 6: 
     120                    // remote YOURLS installation 
     121                    $api_url = sprintf( get_option('yourlsurl') . '?username=%s&password=%s&url=%s&format=json&action=shorturl&keyword=%s', 
     122                        $yourlslogin, $yourlsapi, $url, $keyword_format ); 
     123                    $json = jd_remote_json( $api_url, false );           
     124                    if ($json) { 
     125                        $shrink = $json->shorturl; 
     126                    } else { 
     127                        $shrink = false; 
     128                    }    
     129                break; 
     130                case 7: 
     131                    if ( $suprapi != '') { 
     132                        $decoded = jd_remote_json( "http://su.pr/api/shorten?longUrl=".$url."&login=".$suprlogin."&apiKey=".$suprapi ); 
     133                    } else { 
     134                        $decoded = jd_remote_json( "http://su.pr/api/shorten?longUrl=".$url ); 
     135                    } 
     136                    update_option( 'wp_supr_error',"Su.pr API result: $decoded" ); 
     137                    if ($decoded['statusCode'] == 'OK') { 
     138                        $page = str_replace("&","&#38;", urldecode($url)); 
     139                        $shrink = $decoded['results'][$page]['shortUrl']; 
     140                        $error = $decoded['errorMessage']; 
     141                    } else { 
     142                        $shrink = false; 
     143                        $error = $decoded['errorMessage']; 
     144                        update_option( 'wp_supr_error',"JSON result could not be decoded"); 
     145                    }    
     146                    if ( !is_valid_url($shrink) ) { $shrink = false; update_option( 'wp_supr_error',$error ); } 
     147                break; 
     148                case 8: 
     149                // Goo.gl 
     150                    $url = "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBSnqQOg3vX1gwR7y2l-40yEG9SZiaYPUQ"; 
     151                    $link = urldecode($url); 
     152                    $body = "{'longUrl':'$link'}"; 
     153                    //$body = json_encode($data); 
     154                    $json = jd_fetch_url( $url, 'POST', $body, 'Content-Type: application/json' ); 
     155                    $decoded = json_decode($json); 
     156                    //$url = $decoded['id']; 
     157                    $shrink = $decoded->id; 
     158                    if ( !is_valid_url($shrink) ) { $shrink = false; } 
     159                break; 
     160                case 9: 
     161                // Twitter Friendly Links 
     162                    $shrink = urldecode($url); 
     163                    if ( function_exists( 'twitter_link' ) ) { // use twitter_link if available 
     164                        $shrink = twitter_link( $post_ID ); 
     165                    } 
     166                break; 
     167            } 
     168            if ( !$testmode ) { 
     169                if ( $shrink === false || ( stristr( $shrink, "http://" ) === FALSE )) { 
     170                update_option( 'wp_url_failure','1' ); 
     171                $shrink = urldecode( $url ); 
    42172                } else { 
    43                     $campaign = get_option('twitter-analytics-campaign'); 
     173                    update_option( 'wp_url_failure','0' ); 
    44174                } 
    45                 if ( strpos( $thispostlink,"%3F" ) === FALSE && strpos( $thispostlink,"?" ) === FALSE ) { 
    46                     $ct = "?"; 
    47                 } else { 
    48                     $ct = "&"; 
    49                 } 
    50                 $ga = "utm_campaign=$campaign&utm_medium=twitter&utm_source=twitter"; 
    51                 $thispostlink .= $ct .= $ga; 
    52             } 
    53         } 
    54         $thispostlink = urlencode(urldecode(trim($thispostlink))); // prevent double-encoding 
     175            } 
     176            wpt_store_url( $post_ID, $shrink ); 
     177        return $shrink; 
     178    } 
    55179 
    56         // custom word setting 
    57         $keyword_format = ( get_option( 'jd_keyword_format' ) == '1' )?$post_ID:''; 
    58         $keyword_format = ( get_option( 'jd_keyword_format' ) == '2' )?get_post_meta( $post_ID,'_yourls_keyword',true ):$keyword_format; 
    59         // Generate and grab the short url 
    60         switch ( get_option( 'jd_shortener' ) ) { 
    61             case 0: 
    62             case 1: 
    63                 $shrink = urldecode($thispostlink); 
    64             case 4: 
    65                 $shrink = urldecode($thispostlink);              
    66                 if ( function_exists('wp_get_shortlink') ) { // use wp_get_shortlink if available 
    67                     $shrink = ( $post_ID != false )?wp_get_shortlink( $post_ID ):$thispostlink; 
    68                 }  
    69             break; 
    70             case 2: // updated to v3 3/31/2010 
    71             $decoded = jd_remote_json( "http://api.bitly.com/v3/shorten?longUrl=".$thispostlink."&login=".$bitlylogin."&apiKey=".$bitlyapi."&format=json" ); 
    72             $error = ''; 
    73                 if ($decoded) { 
    74                     if ($decoded['status_code'] != 200) { 
    75                         $shrink = $decoded; 
    76                         $error = $decoded['status_txt']; 
    77                     } else { 
    78                         $shrink = $decoded['data']['url'];       
    79                     } 
    80                 } else { 
    81                 $shrink = false; 
    82                 update_option( 'wp_bitly_error',"JSON result could not be decoded"); 
    83                 }    
    84                 if ( !is_valid_url($shrink) ) { $shrink = false; update_option( 'wp_bitly_error',$error ); } 
    85             break; 
    86             case 3: 
    87             $shrink = urldecode($thispostlink); 
    88             break; 
    89             case 5: 
    90             // local YOURLS installation 
    91             $thispostlink = urldecode($thispostlink); 
     180    function wpt_store_url($post_ID, $url) { 
     181        if ( function_exists('jd_shorten_link') ) { 
     182            $shortener = get_option( 'jd_shortener' ); 
     183            switch ($shortener) { 
     184                case 0: case 1: case 4: $ext = '_wp';break; 
     185                case 2: $ext = '_bitly';break; 
     186                case 3: $ext = '_url';break; 
     187                case 5: case 6: $ext = '_yourls';break; 
     188                case 7: $ext = '_supr'; break; 
     189                case 8: $ext = '_goo';  break; 
     190                case 9: $ext = '_tfl'; break; 
     191                default:$ext = '_ind'; 
     192            } 
     193            if ( get_post_meta ( $post_ID, "_wp_jd$ext", TRUE ) != $url ) { 
     194                update_post_meta ( $post_ID, "_wp_jd$ext", $url ); 
     195            } 
     196            switch ( $shortener ) { 
     197                case 0: case 1: case 2: case 7: case 8: $target = jd_expand_url( $url );break; 
     198                case 5: case 6: $target = jd_expand_yourl( $url, $shortener );break; 
     199                case 9: $target = $url;  
     200                default: $target = $url; 
     201            } 
     202        } else { 
     203            $target = $url; 
     204        } 
     205        update_post_meta( $post_ID, '_wp_jd_target', $target ); 
     206    }    
     207     
     208    function jd_expand_url( $short_url ) { 
     209        $short_url = urlencode( $short_url ); 
     210        $decoded = jd_remote_json("http://api.longurl.org/v2/expand?format=json&url=" . $short_url ); 
     211        $url = $decoded['long-url']; 
     212        return $url; 
     213        //return $short_url; 
     214    } 
     215    function jd_expand_yourl( $short_url, $remote ) { 
     216        if ( $remote == 6 ) { 
     217            $short_url = urlencode( $short_url ); 
     218            $yourl_api = get_option( 'yourlsurl' ); 
     219            $user = get_option( 'yourlslogin' ); 
     220            $pass = stripcslashes( get_option( 'yourlsapi' ) ); 
     221            $decoded = jd_remote_json( $yourl_api . "?action=expand&shorturl=$short_url&format=json&username=$user&password=$pass" ); 
     222            $url = $decoded['longurl']; 
     223            return $url; 
     224        } else { 
    92225            global $yourls_reserved_URL; 
    93226            define('YOURLS_INSTALLING', true); // Pretend we're installing YOURLS to bypass test for install or upgrade 
    94227            define('YOURLS_FLOOD_DELAY_SECONDS', 0); // Disable flood check 
    95             $opath = get_option( 'yourlspath' ); 
    96             $ypath = str_replace( 'user','includes', $opath ); 
    97             if ( file_exists( dirname( $ypath ).'/load-yourls.php' ) ) { // YOURLS 1.4+ 
     228            if ( file_exists( dirname( get_option( 'yourlspath' ) ).'/load-yourls.php' ) ) { // YOURLS 1.4 
    98229                global $ydb; 
    99                 require_once( dirname( $ypath ).'/load-yourls.php' ); 
    100                 if ( function_exists( 'yourls_add_new_link' ) ) { 
    101                     $yourls_result = yourls_add_new_link( $thispostlink, $keyword_format ); 
     230                require_once( dirname( get_option( 'yourlspath' ) ).'/load-yourls.php' );  
     231                $yourls_result = yourls_api_expand( $short_url ); 
     232            } else { // YOURLS 1.3 
     233                if ( file_exists( get_option( 'yourlspath' ) ) ) { 
     234                    require_once( get_option( 'yourlspath' ) );  
     235                    $yourls_db = new wpdb( YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_DB_HOST ); 
     236                    $yourls_result = yourls_api_expand( $short_url ); 
     237                } 
     238            }    
     239            $url = $yourls_result['longurl']; 
     240            return $url; 
     241        } 
     242    } 
     243     
     244    add_filter( 'wpt_shortener_controls', 'wpt_shortener_controls' ); 
     245    function wpt_shortener_controls() { 
     246    // for the moment, this just displays the fields. Eventually, a real filter. 
     247    ?> 
     248<div class="ui-sortable meta-box-sortables"> 
     249<div class="postbox"> 
     250<h3><?php _e('<abbr title="Uniform Resource Locator">URL</abbr> Shortener Account Settings','wp-to-twitter'); ?></h3> 
     251    <div class="inside"> 
     252        <?php if ( get_option('jd_shortener') == 7 ) { ?> 
     253        <div class="panel"> 
     254        <h4 class="supr"><span><?php _e("Your Su.pr account details", 'wp-to-twitter'); ?> <?php _e('(optional)','wp-to-twitter'); ?></span></h4> 
     255            <form method="post" action=""> 
     256            <div><input type='hidden' name='wpt_shortener_update' value='true' /></div> 
     257            <div> 
     258                <p> 
     259                <label for="suprlogin"><?php _e("Your Su.pr Username:", 'wp-to-twitter'); ?></label> 
     260                <input type="text" name="suprlogin" id="suprlogin" size="40" value="<?php echo ( esc_attr( get_option( 'suprlogin' ) ) ) ?>" /> 
     261                </p> 
     262                <p> 
     263                <label for="suprapi"><?php _e("Your Su.pr <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label> 
     264                <input type="text" name="suprapi" id="suprapi" size="40" value="<?php echo ( esc_attr( get_option( 'suprapi' ) ) ) ?>" /> 
     265                </p> 
     266                <div> 
     267                <input type="hidden" name="submit-type" value="suprapi" /> 
     268                </div> 
     269                <?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);  echo "<div>$nonce</div>"; ?>     
     270                <p><input type="submit" name="submit" value="Save Su.pr API Key" class="button-primary" /> <input type="submit" name="clear" value="Clear Su.pr API Key" />&raquo; <small><?php _e("Don't have a Su.pr account or API key? <a href='http://su.pr/'>Get one here</a>!<br />You'll need an API key in order to associate the URLs you create with your Su.pr account.", 'wp-to-twitter'); ?></small></p> 
     271            </div> 
     272            </form> 
     273        </div> 
     274    <?php } else if ( get_option('jd_shortener') == 2 ) { ?> 
     275    <div class="panel"> 
     276    <h4 class="bitly"><span><?php _e("Your Bit.ly account details", 'wp-to-twitter'); ?></span></h4> 
     277        <form method="post" action=""> 
     278        <div><input type='hidden' name='wpt_shortener_update' value='true' /></div> 
     279        <div> 
     280            <p> 
     281            <label for="bitlylogin"><?php _e("Your Bit.ly username:", 'wp-to-twitter'); ?></label> 
     282            <input type="text" name="bitlylogin" id="bitlylogin" value="<?php echo ( esc_attr( get_option( 'bitlylogin' ) ) ) ?>" /> 
     283            </p>     
     284            <p> 
     285            <label for="bitlyapi"><?php _e("Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label> 
     286            <input type="text" name="bitlyapi" id="bitlyapi" size="40" value="<?php echo ( esc_attr( get_option( 'bitlyapi' ) ) ) ?>" /> 
     287            </p> 
     288            <p><a href="http://bitly.com/a/your_api_key"><?php _e('View your Bit.ly username and API key','wp-to-twitter'); ?></a></p> 
     289            <div> 
     290            <input type="hidden" name="submit-type" value="bitlyapi" /> 
     291            </div> 
     292        <?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);  echo "<div>$nonce</div>"; ?>     
     293            <p><input type="submit" name="submit" value="<?php _e('Save Bit.ly API Key','wp-to-twitter'); ?>" class="button-primary" /> <input type="submit" name="clear" value="<?php _e('Clear Bit.ly API Key','wp-to-twitter'); ?>" /><br /><small><?php _e("A Bit.ly API key and username is required to shorten URLs via the Bit.ly API and WP to Twitter.", 'wp-to-twitter' ); ?></small></p> 
     294        </div> 
     295        </form>  
     296    </div> 
     297    <?php } else if ( get_option('jd_shortener') == 5 || get_option('jd_shortener') == 6 ) { ?> 
     298    <div class="panel"> 
     299    <h4 class="yourls"><span><?php _e("Your YOURLS account details", 'wp-to-twitter'); ?></span></h4> 
     300        <form method="post" action=""> 
     301        <div><input type='hidden' name='wpt_shortener_update' value='true' /></div> 
     302        <div> 
     303            <p> 
     304            <label for="yourlspath"><?php _e('Path to your YOURLS config file (Local installations)','wp-to-twitter'); ?></label> <input type="text" id="yourlspath" name="yourlspath" size="60" value="<?php echo ( esc_attr( get_option( 'yourlspath' ) ) ); ?>"/> 
     305            <small><?php _e('Example:','wp-to-twitter'); ?> <code>/home/username/www/www/yourls/includes/config.php</code></small> 
     306            </p>                 
     307            <p> 
     308            <label for="yourlsurl"><?php _e('URI to the YOURLS API (Remote installations)','wp-to-twitter'); ?></label> <input type="text" id="yourlsurl" name="yourlsurl" size="60" value="<?php echo ( esc_attr( get_option( 'yourlsurl' ) ) ); ?>"/> 
     309            <small><?php _e('Example:','wp-to-twitter'); ?> <code>http://domain.com/yourls-api.php</code></small> 
     310            </p> 
     311            <p> 
     312            <label for="yourlslogin"><?php _e("Your YOURLS username:", 'wp-to-twitter'); ?></label> 
     313            <input type="text" name="yourlslogin" id="yourlslogin" size="30" value="<?php echo ( esc_attr( get_option( 'yourlslogin' ) ) ) ?>" /> 
     314            </p>     
     315            <p> 
     316            <label for="yourlsapi"><?php _e("Your YOURLS password:", 'wp-to-twitter'); ?> <?php if ( get_option( 'yourlsapi' ) != '') { _e("<em>Saved</em>",'wp-to-twitter'); } ?></label> 
     317            <input type="password" name="yourlsapi" id="yourlsapi" size="30" value="" /> 
     318            </p> 
     319            <p> 
     320            <input type="radio" name="jd_keyword_format" id="jd_keyword_id" value="1" <?php echo jd_checkSelect( 'jd_keyword_format',1,'checkbox' ); ?> />      <label for="jd_keyword_id"><?php _e("Post ID for YOURLS url slug.",'wp-to-twitter'); ?></label><br /> 
     321            <input type="radio" name="jd_keyword_format" id="jd_keyword" value="2" <?php echo jd_checkSelect( 'jd_keyword_format',2,'checkbox' ); ?> />         <label for="jd_keyword"><?php _e("Custom keyword for YOURLS url slug.",'wp-to-twitter'); ?></label><br /> 
     322            <input type="radio" name="jd_keyword_format" id="jd_keyword_default" value="0" <?php echo jd_checkSelect( 'jd_keyword_format',0,'checkbox' ); ?> /> <label for="jd_keyword_default"><?php _e("Default: sequential URL numbering.",'wp-to-twitter'); ?></label> 
     323            </p> 
     324            <div> 
     325            <input type="hidden" name="submit-type" value="yourlsapi" /> 
     326            </div> 
     327        <?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);  echo "<div>$nonce</div>"; ?>     
     328            <p><input type="submit" name="submit" value="<?php _e('Save YOURLS Account Info','wp-to-twitter'); ?>" class="button-primary" /> <input type="submit" name="clear" value="<?php _e('Clear YOURLS password','wp-to-twitter'); ?>" /><br /><small><?php _e("A YOURLS password and username is required to shorten URLs via the remote YOURLS API and WP to Twitter.", 'wp-to-twitter' ); ?></small></p> 
     329        </div> 
     330        </form>      
     331        </div> 
     332    <?php } else { ?> 
     333    <?php _e('Your shortener does not require any account settings.','wp-to-twitter'); ?> 
     334    <?php } ?> 
     335        </div> 
     336</div> 
     337</div> 
     338    <?php 
     339    } 
     340     
     341    function wpt_shortener_update( $post ) { 
     342        if ( isset($post['submit-type']) && $post['submit-type'] == 'yourlsapi' ) { 
     343            if ( $post['yourlsapi'] != '' && isset( $post['submit'] ) ) { 
     344                update_option( 'yourlsapi', trim($post['yourlsapi']) ); 
     345                $message = __("YOURLS password updated. ", 'wp-to-twitter'); 
     346            } else if ( isset( $post['clear'] ) ) { 
     347                update_option( 'yourlsapi','' ); 
     348                $message = __( "YOURLS password deleted. You will be unable to use your remote YOURLS account to create short URLS.", 'wp-to-twitter'); 
     349            } else { 
     350                $message = __( "Failed to save your YOURLS password! ", 'wp-to-twitter' ); 
     351            } 
     352            if ( $post['yourlslogin'] != '' ) { 
     353                update_option( 'yourlslogin', trim($post['yourlslogin']) ); 
     354                $message .= __( "YOURLS username added. ",'wp-to-twitter' );  
     355            } 
     356            if ( $post['yourlsurl'] != '' ) { 
     357                update_option( 'yourlsurl', trim($post['yourlsurl']) ); 
     358                $message .= __( "YOURLS API url added. ",'wp-to-twitter' );  
     359            } else { 
     360                update_option('yourlsurl',''); 
     361                $message .= __( "YOURLS API url removed. ",'wp-to-twitter' );            
     362            } 
     363            if ( $post['yourlspath'] != '' ) { 
     364                update_option( 'yourlspath', trim($post['yourlspath']) );    
     365                if ( file_exists( $post['yourlspath'] ) ) { 
     366                $message .= __( "YOURLS local server path added. ",'wp-to-twitter');  
    102367                } else { 
    103                     $yourls_result = $thispostlink; 
     368                $message .= __( "The path to your YOURLS installation is not correct. ",'wp-to-twitter' ); 
    104369                } 
    105             } else { // YOURLS 1.3 
    106                 require_once( get_option( 'yourlspath' ) );  
    107                 $yourls_db = new wpdb( YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_DB_HOST ); 
    108                 $yourls_result = yourls_add_new_link( $thispostlink, $keyword_format, $yourls_db ); 
    109             } 
    110             if ($yourls_result) { 
    111                 $shrink = $yourls_result['shorturl'];            
    112             } else { 
    113                 $shrink = false; 
    114             } 
    115             break; 
    116             case 6: 
    117             // remote YOURLS installation 
    118             $api_url = sprintf( get_option('yourlsurl') . '?username=%s&password=%s&url=%s&format=json&action=shorturl&keyword=%s', 
    119                 $yourlslogin, $yourlsapi, $thispostlink, $keyword_format ); 
    120             $json = jd_remote_json( $api_url, false );           
    121             if ($json) { 
    122                 $shrink = $json->shorturl; 
    123             } else { 
    124                 $shrink = false; 
    125             } 
    126             break; 
    127             case 7: 
    128                 if ( $suprapi != '') { 
    129                     $decoded = jd_remote_json( "http://su.pr/api/shorten?longUrl=".$thispostlink."&login=".$suprlogin."&apiKey=".$suprapi ); 
     370            } else { 
     371                update_option( 'yourlspath','' ); 
     372                $message .= __( "YOURLS local server path removed. ",'wp-to-twitter'); 
     373            } 
     374            if ( $post['jd_keyword_format'] != '' ) { 
     375                update_option( 'jd_keyword_format', $post['jd_keyword_format'] ); 
     376                if ( $post['jd_keyword_format'] == 1 ) { 
     377                $message .= __( "YOURLS will use Post ID for short URL slug.",'wp-to-twitter'); 
    130378                } else { 
    131                     $decoded = jd_remote_json( "http://su.pr/api/shorten?longUrl=".$thispostlink ); 
     379                $message .= __( "YOURLS will use your custom keyword for short URL slug.",'wp-to-twitter'); 
    132380                } 
    133                 update_option( 'wp_supr_error',"Su.pr API result: $decoded" ); 
    134                 if ($decoded['statusCode'] == 'OK') { 
    135                     $page = str_replace("&","&#38;", urldecode($thispostlink)); 
    136                     $shrink = $decoded['results'][$page]['shortUrl']; 
    137                     $error = $decoded['errorMessage']; 
    138                 } else { 
    139                     $shrink = false; 
    140                     $error = $decoded['errorMessage']; 
    141                     update_option( 'wp_supr_error',"JSON result could not be decoded"); 
    142                 }    
    143                 if ( !is_valid_url($shrink) ) { $shrink = false; update_option( 'wp_supr_error',$error ); } 
    144             break; 
    145             case 8: 
    146             // Goo.gl 
    147                 $url = "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBSnqQOg3vX1gwR7y2l-40yEG9SZiaYPUQ"; 
    148                 $link = urldecode($thispostlink); 
    149                 $body = "{'longUrl':'$link'}"; 
    150                 //$body = json_encode($data); 
    151                 $json = jd_fetch_url( $url, 'POST', $body, 'Content-Type: application/json' ); 
    152                 $decoded = json_decode($json); 
    153                 //$url = $decoded['id']; 
    154                 $shrink = $decoded->id; 
    155                 if ( !is_valid_url($shrink) ) { $shrink = false; } 
    156             break; 
    157             case 9: 
    158             // Twitter Friendly Links 
    159                 $shrink = urldecode($thispostlink); 
    160                 if ( function_exists( 'twitter_link' ) ) { // use twitter_link if available 
    161                     $shrink = twitter_link( $post_ID ); 
    162                 } 
    163             break; 
    164         } 
    165         if ($testmode != 'true') { 
    166             if ( $shrink === false || ( stristr( $shrink, "http://" ) === FALSE )) { 
    167                 update_option( 'wp_url_failure','1' ); 
    168                 $shrink = urldecode( $thispostlink ); 
    169             } else { 
    170                 update_option( 'wp_url_failure','0' ); 
    171             } 
    172         } 
    173     return $shrink; 
     381            } else { 
     382                update_option( 'jd_keyword_format','' ); 
     383                $message .= __( "YOURLS will not use Post ID for the short URL slug.",'wp-to-twitter'); 
     384            } 
     385        }  
     386         
     387        if ( isset($post['submit-type']) && $post['submit-type'] == 'suprapi' ) { 
     388            if ( $post['suprapi'] != '' && isset( $post['submit'] ) ) { 
     389                update_option( 'suprapi', trim($post['suprapi']) ); 
     390                update_option( 'suprlogin', trim($post['suprlogin']) ); 
     391                $message = __("Su.pr API Key and Username Updated", 'wp-to-twitter'); 
     392            } else if ( isset( $post['clear'] ) ) { 
     393                update_option( 'suprapi','' ); 
     394                update_option( 'suprlogin','' ); 
     395                $message = __("Su.pr API Key and username deleted. Su.pr URLs created by WP to Twitter will no longer be associated with your account. ", 'wp-to-twitter'); 
     396            } else { 
     397                $message = __("Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! ", 'wp-to-twitter'); 
     398            } 
     399        }  
     400        if ( isset($post['submit-type']) && $post['submit-type'] == 'bitlyapi' ) { 
     401            if ( $post['bitlyapi'] != '' && isset( $post['submit'] ) ) { 
     402                update_option( 'bitlyapi', trim($post['bitlyapi']) ); 
     403                $message = __("Bit.ly API Key Updated.", 'wp-to-twitter'); 
     404            } else if ( isset( $post['clear'] ) ) { 
     405                update_option( 'bitlyapi','' ); 
     406                $message = __("Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. ", 'wp-to-twitter'); 
     407            } else { 
     408                $message = __("Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</a>! An API key is required to use the Bit.ly URL shortening service.", 'wp-to-twitter'); 
     409            } 
     410            if ( $post['bitlylogin'] != '' && isset( $post['submit'] ) ) { 
     411                update_option( 'bitlylogin', trim($post['bitlylogin']) ); 
     412                $message .= __(" Bit.ly User Login Updated.", 'wp-to-twitter'); 
     413            } else if ( isset( $post['clear'] ) ) { 
     414                update_option( 'bitlylogin','' ); 
     415                $message = __("Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. ", 'wp-to-twitter'); 
     416            } else { 
     417                $message = __("Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! ", 'wp-to-twitter'); 
     418            } 
     419        }    
     420        return $message; 
     421    } 
     422     
     423    function wpt_select_shortener( $post ) { 
     424        update_option( 'jd_shortener', $post['jd_shortener'] ); 
     425        if ( $post['jd_shortener'] == get_option('jd_shortener') ) return; // no message if no change. 
     426        if ( get_option( 'jd_shortener' ) == 2 && ( get_option( 'bitlylogin' ) == "" || get_option( 'bitlyapi' ) == "" ) ) { 
     427            $message .= __( 'You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly.' , 'wp-to-twitter'); 
     428            $message .= "<br />"; 
     429        } 
     430        if ( get_option( 'jd_shortener' ) == 6 && ( get_option( 'yourlslogin' ) == "" || get_option( 'yourlsapi' ) == "" || get_option( 'yourlsurl' ) == "" ) ) { 
     431            $message .= __( 'You must add your YOURLS remote URL, login, and password in order to shorten URLs with a remote installation of YOURLS.' , 'wp-to-twitter'); 
     432            $message .= "<br />"; 
     433        } 
     434        if ( get_option( 'jd_shortener' ) == 5 && ( get_option( 'yourlspath' ) == "" ) ) { 
     435            $message .= __( 'You must add your YOURLS server path in order to shorten URLs with a remote installation of YOURLS.' , 'wp-to-twitter'); 
     436            $message .= "<br />"; 
     437        } 
     438        return $message; 
     439    } 
     440     
     441    add_filter( 'wpt_pick_shortener','wpt_pick_shortener'); 
     442    function wpt_pick_shortener() { 
     443        ?> 
     444            <p>  
     445            <label><?php _e("Choose a short URL service (account settings below)",'wp-to-twitter' ); ?></label> 
     446            <select name="jd_shortener" id="jd_shortener"> 
     447                <option value="3" <?php echo jd_checkSelect('jd_shortener','3'); ?>><?php _e("Don't shorten URLs.", 'wp-to-twitter'); ?></option> 
     448                <option value="7" <?php echo jd_checkSelect('jd_shortener','7'); ?>>Su.pr</option>  
     449                <option value="2" <?php echo jd_checkSelect('jd_shortener','2'); ?>>Bit.ly</option> 
     450                <option value="8" <?php echo jd_checkSelect('jd_shortener','8'); ?>>Goo.gl</option>                  
     451                <option value="5" <?php echo jd_checkSelect('jd_shortener','5'); ?>><?php _e("YOURLS (on this server)", 'wp-to-twitter'); ?></option> 
     452                <option value="6" <?php echo jd_checkSelect('jd_shortener','6'); ?>><?php _e("YOURLS (on a remote server)", 'wp-to-twitter'); ?></option>        
     453                <option value="4" <?php echo jd_checkSelect('jd_shortener','4'); ?>>WordPress</option>  
     454                <?php if ( function_exists( 'twitter_link' ) ) { ?><option value="9" <?php echo jd_checkSelect('jd_shortener','9'); ?>><?php _e("Use Twitter Friendly Links.", 'wp-to-twitter'); ?></option><?php } ?> 
     455            </select> 
     456            </p> 
     457        <?php 
     458    } 
    174459} 
    175  
    176 function jd_expand_url( $short_url ) { 
    177     $short_url = urlencode( $short_url ); 
    178     $decoded = jd_remote_json("http://api.longurl.org/v2/expand?format=json&url=" . $short_url ); 
    179     $url = $decoded['long-url']; 
    180     return $url; 
    181     //return $short_url; 
    182 } 
    183 function jd_expand_yourl( $short_url, $remote ) { 
    184     if ( $remote == 6 ) { 
    185         $short_url = urlencode( $short_url ); 
    186         $yourl_api = get_option( 'yourlsurl' ); 
    187         $user = get_option( 'yourlslogin' ); 
    188         $pass = stripcslashes( get_option( 'yourlsapi' ) ); 
    189         $decoded = jd_remote_json( $yourl_api . "?action=expand&shorturl=$short_url&format=json&username=$user&password=$pass" ); 
    190         $url = $decoded['longurl']; 
    191         return $url; 
    192     } else { 
    193         global $yourls_reserved_URL; 
    194         define('YOURLS_INSTALLING', true); // Pretend we're installing YOURLS to bypass test for install or upgrade 
    195         define('YOURLS_FLOOD_DELAY_SECONDS', 0); // Disable flood check 
    196         if ( file_exists( dirname( get_option( 'yourlspath' ) ).'/load-yourls.php' ) ) { // YOURLS 1.4 
    197             global $ydb; 
    198             require_once( dirname( get_option( 'yourlspath' ) ).'/load-yourls.php' );  
    199             $yourls_result = yourls_api_expand( $short_url ); 
    200         } else { // YOURLS 1.3 
    201             require_once( get_option( 'yourlspath' ) );  
    202             $yourls_db = new wpdb( YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_DB_HOST ); 
    203             $yourls_result = yourls_api_expand( $short_url ); 
    204         }    
    205         $url = $yourls_result['longurl']; 
    206         return $url; 
    207     } 
    208 } 
  • wp-to-twitter/trunk/wp-to-twitter.php

    r668985 r690784  
    44Plugin URI: http://www.joedolson.com/articles/wp-to-twitter/ 
    55Description: Posts a Tweet when you update your WordPress blog or post to your blogroll, using your chosen URL shortening service. Rich in features for customizing and promoting your Tweets. 
    6 Version: 2.5.9 
     6Version: 2.6.0 
    77Author: Joseph Dolson 
    88Author URI: http://www.joedolson.com/ 
    99*/ 
    10 /*  Copyright 2008-2012  Joseph C Dolson  (email : wp-to-twitter@joedolson.com) 
     10/*  Copyright 2008-2013  Joseph C Dolson  (email : wp-to-twitter@joedolson.com) 
    1111 
    1212    This program is free software; you can redistribute it and/or modify 
     
    2727if ('wp-to-twitter.php' == basename($_SERVER['SCRIPT_FILENAME'])) { die ('<h2>Direct File Access Prohibited</h2>');} 
    2828global $wp_version; 
    29 if ( version_compare( $wp_version , '3.0' , '<' ) && is_ssl() ) { 
    30     $wp_content_url = str_replace( 'http://' , 'https://' , get_option( 'siteurl' ) ); 
    31 } else { 
    32     $wp_content_url = get_option( 'siteurl' ); 
    33 } 
    3429$wp_content_url = content_url(); 
    3530$wp_content_dir = str_replace( '/plugins/wp-to-twitter','',plugin_dir_path( __FILE__ ) ); 
     
    3934define( 'WPT_DEBUG',false ); 
    4035define( 'WPT_DEBUG_ADDRESS', 'debug@joedolson.com' ); 
    41 /*function wpt_pro_exists() { 
    42     return false; 
    43 }*/ 
     36// define( 'WPT_DEBUG_ADDRESS', 'debug@joedolson.com, yourname@youraddress.com' ); // for multiple recipients. 
    4437 
    4538$wp_plugin_url = plugins_url(); 
     
    5447require_once( plugin_dir_path(__FILE__).'/wp-to-twitter-shorteners.php' ); 
    5548require_once( plugin_dir_path(__FILE__).'/wp-to-twitter-manager.php' ); 
    56 require_once( plugin_dir_path(__FILE__).'/functions.php' ); 
     49require_once( plugin_dir_path(__FILE__).'/wpt-functions.php' ); 
    5750 
    5851global $wpt_version,$jd_plugin_url; 
    59 $wpt_version = "2.5.9"; 
     52$wpt_version = "2.6.0"; 
    6053$plugin_dir = basename(dirname(__FILE__)); 
    6154load_plugin_textdomain( 'wp-to-twitter', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' ); 
     
    6356function wpt_pro_compatibility() { 
    6457    global $wptp_version; 
    65     $current_wptp_version = '1.3.2'; 
     58    $current_wptp_version = '1.4.0'; 
    6659    if ( version_compare( $wptp_version, $current_wptp_version, '<' ) ) { 
    6760        echo "<div class='error notice'><p class='upgrade'>".sprintf( __('The current version of WP Tweets PRO is <strong>%s</strong>. Upgrade for best compatibility!','wp-to-twitter'),$current_wptp_version )."</p></div>"; 
     
    7467function wpt_marginal_function() { 
    7568global $wp_version; 
    76 $exit_msg=__('WP to Twitter requires WordPress 3.0.6 or a more recent version <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update WordPress to continue using WP to Twitter with all features!</a>','wp-to-twitter'); 
    77     if ( version_compare( $wp_version,"3.0.6","<" ) ) { 
     69$exit_msg=__('WP to Twitter requires WordPress 3.1.4 or a more recent version <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update WordPress to continue using WP to Twitter with all features!</a>','wp-to-twitter'); 
     70    if ( version_compare( $wp_version,"3.1.4","<" ) ) { 
    7871        if ( is_admin() ) { 
    7972            echo "<div class='error'><p>".($exit_msg)."</p></div>"; 
     
    8982    } 
    9083    return $oauth; 
    91 } 
    92 if ( !wpt_check_oauth() && get_option('disable_oauth_notice') != '1' ) { 
    93     $admin_url = ( is_plugin_active('wp-tweets-pro/wpt-pro-functions.php') )?admin_url('admin.php?page=wp-tweets-pro'):admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php'); 
    94     $message = sprintf(__("Twitter requires authentication by OAuth. You will need to <a href='%s'>update your settings</a> to complete installation of WP to Twitter.", 'wp-to-twitter'), $admin_url ); 
    95     add_action('admin_notices', create_function( "", "if ( ! current_user_can( 'manage_options' ) ) { return; } else {  
    96         echo \"<div class='error'><p>$message</p></div>\";}" ) ); 
    9784} 
    9885 
     
    250237     
    251238// Function checks for an alternate URL to be Tweeted. Contribution by Bill Berry.   
    252 function external_or_permalink( $post_ID ) { 
     239function wpt_link( $post_ID ) { 
    253240    $ex_link = false; 
    254241       $wtb_extlink_custom_field = get_option('jd_twit_custom_url');  
     
    269256// This function performs the API post to Twitter 
    270257function jd_doTwitterAPIPost( $twit, $auth=false, $id=false ) { 
    271     // prevent duplicate Tweets 
    272258    if ( !wpt_check_oauth( $auth )  ) {  
    273259            wpt_saves_error( $id, $auth, $twit, __('This account is not authorized to post to Twitter.','wp-tweets-pro'), '401', time() ); 
     
    275261    } // exit silently if not authorized 
    276262    $check = ( !$auth )?get_option('jd_last_tweet'):get_user_meta( $auth, 'wpt_last_tweet', true ); // get user's last tweet 
     263    // prevent duplicate Tweets 
    277264    if ( $check == $twit ) { 
    278265        if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    279             wp_mail( WPT_DEBUG_ADDRESS,'Matched twit check: tweet identical',"$twit, $auth, $id" ); // DEBUG 
     266            wp_mail( WPT_DEBUG_ADDRESS,"Matched twit check: tweet identical: #$id","$twit, $auth, $id" ); // DEBUG 
    280267        } 
    281268        wpt_saves_error( $id, $auth, $twit, __('This tweet is identical to another Tweet recently sent to this account.','wp-tweets-pro'), '403', time() ); 
     
    283270    } else if ( $twit == '' || !$twit ) { 
    284271        if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    285             wp_mail( WPT_DEBUG_ADDRESS,'Tweet check: empty sentence.',"$twit, $auth, $id" ); // DEBUG 
     272            wp_mail( WPT_DEBUG_ADDRESS,"Tweet check: empty sentence: #$id","$twit, $auth, $id" ); // DEBUG 
    286273        } 
    287274        wpt_saves_error( $id, $auth, $twit, __('This tweet was blank and could not be sent to Twitter.','wp-tweets-pro'), '403', time() ); 
     
    290277        $protocol = ( get_option( 'wpt_http' ) == '1' )?'http:':'https:'; 
    291278        $jdwp_api_post_status = "$protocol//api.twitter.com/1.1/statuses/update.json"; 
    292         //$jdwp_api_media_status = "$protocol//upload.twitter.com/1.1/statuses/update_with_media.json"; 
    293279        if ( wtt_oauth_test( $auth ) && ( $connection = wtt_oauth_connection( $auth ) ) ) { 
    294             /* $add_media = true; // This needs to wait until I figure out multipart submissions via OAuth. 
    295             if ( $add_media == true ) { 
    296                 $featured = get_post_thumbnail_id( $id ); 
    297                 $image = wp_get_attachment_image_src( $featured, 'large' ); 
    298                 $url = $image[0]; 
    299                 $base = wp_upload_dir(); 
    300                 $base_url = $base['baseurl']; 
    301                 $base_path = $base['basedir']; 
    302                 $path = str_replace( $base_url, $base_path, $url ); 
    303                 $connection->media( $jdwp_api_media_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true', 'media[]'=>"@{$path}"  ) ); 
    304                 $http_code = ($connection)?$connection->http_code:'failed';  
    305                 $debug = array( $connection, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true', 'media[]'=>"$path"    ) ); 
    306                 wp_mail( WPT_DEBUG_ADDRESS,'Add Media Test',print_r($debug,1) ); 
    307             } else { */ 
    308                 $connection->post( $jdwp_api_post_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true', 'lang'=>'de' ) ); 
    309                 $http_code = ($connection)?$connection->http_code:'failed'; 
    310             // } 
     280            $connection->post( $jdwp_api_post_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true', 'lang'=>'de' ) ); 
     281            $http_code = ($connection)?$connection->http_code:'failed'; 
    311282        } else if ( wtt_oauth_test( false ) && ( $connection = wtt_oauth_connection( false ) ) ) { 
    312283            $connection->post( $jdwp_api_post_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true'   ) ); 
    313284            $http_code = ($connection)?$connection->http_code:'failed';  
    314285        } 
     286        // DEBUG JCD 
    315287        if ( $connection ) { 
    316             if ( isset($connection->http_header['x-access-level']) && $connection->http_header['x-access-level'] == 'read' ) { $supplement = __('Your Twitter application does not have read and write permissions. Go to <a href="%s">your Twitter apps</a> to modify these settings.','wp-to-twitter'); } else { $supplement = ''; } 
     288            if ( isset($connection->http_header['x-access-level']) && $connection->http_header['x-access-level'] == 'read' ) { $supplement = sprintf( __('Your Twitter application does not have read and write permissions. Go to <a href="%s">your Twitter apps</a> to modify these settings.','wp-to-twitter'), 'https://dev.twitter.com/apps/' ); } else { $supplement = ''; } 
     289            $return = false; 
    317290            switch ($http_code) { 
    318291                case '200': 
    319292                    $return = true; 
    320293                    $error = __("200 OK: Success!",'wp-to-twitter'); 
    321                     delete_option('wpt_authentication_missing'); 
     294                    update_option('wpt_authentication_missing', false ); 
    322295                    break; 
    323296                case '400': 
    324                     $return = false; 
    325297                    $error = __("400 Bad Request: The request was invalid. This is the status code returned during rate limiting.",'wp-to-twitter'); 
    326298                    break; 
    327299                case '401': 
    328                     $return = false; 
    329300                    $error = __("401 Unauthorized: Authentication credentials were missing or incorrect.",'wp-to-twitter'); 
    330                     update_option( 'wpt_authentication_missing','true'); 
     301                    update_option( 'wpt_authentication_missing',"$auth"); 
    331302                    break; 
    332303                case '403': 
    333                     $return = false; 
    334                     $error = __("403 Forbidden: The request is understood, but it has been refused. This code is used when requests are understood, but are denied by Twitter. Reasons can include: Too many Tweets created in a short time or the same Tweet was submitted twice in a row, among others. This is not an error by WP to Twitter.",'wp-to-twitter'); 
     304                    $error = __("403 Forbidden: The request is understood, but it has been refused by Twitter. Reasons: Too many Tweets in a short time or the same Tweet was submitted twice, among others. Not an error from WP to Twitter.",'wp-to-twitter'); 
    335305                    break; 
    336306                case '404': 
    337                     $return = false; 
    338307                    $error = __("404 Not Found: The URI requested is invalid or the resource requested does not exist.",'wp-to-twitter'); 
    339308                    break;   
    340309                case '406': 
    341                     $return = false; 
    342310                    $error = __("406 Not Acceptable: Invalid Format Specified.",'wp-to-twitter'); 
    343311                    break; 
    344312                case '429': 
    345                     $return = false; 
    346313                    $error = __("429 Too Many Requests: You have exceeded your rate limits.",'wp-to-twitter'); 
    347314                    break;                   
    348315                case '500': 
    349                     $return = false; 
    350316                    $error = __("500 Internal Server Error: Something is broken at Twitter.",'wp-to-twitter'); 
    351317                    break; 
    352318                case '502': 
    353                     $return = false; 
    354319                    $error = __("502 Bad Gateway: Twitter is down or being upgraded.",'wp-to-twitter'); 
    355320                    break;                   
    356321                case '503': 
    357                     $return = false; 
    358322                    $error = __("503 Service Unavailable: The Twitter servers are up, but overloaded with requests - Please try again later.",'wp-to-twitter'); 
    359323                    break; 
    360324                case '504': 
    361                     $return = false; 
    362325                    $error = __("504 Gateway Timeout: The Twitter servers are up, but the request couldn't be serviced due to some failure within our stack. Try again later.",'wp-to-twitter'); 
    363326                    break; 
    364327                default: 
    365                     $return = false; 
    366328                    $error = __("<strong>Code $http_code</strong>: Twitter did not return a recognized response code.",'wp-to-twitter'); 
    367329                    break; 
     
    370332            // debugging 
    371333                if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    372                     wp_mail( WPT_DEBUG_ADDRESS,'Twitter Response Code',"$http_code, $error" ); // DEBUG 
     334                    wp_mail( WPT_DEBUG_ADDRESS,"Twitter Response Code: #$id","$http_code, $error" ); // DEBUG 
    373335                }            
    374336            // end debugging 
     
    414376    } else { 
    415377        $shrink = apply_filters( 'wptt_shorten_link', $postinfo['postLink'], $postinfo['postTitle'], $post_ID, false ); 
    416         store_url( $post_ID, $shrink ); 
    417378    } 
    418379    // generate all template variable values 
     
    423384    $thisposturl = trim($shrink); 
    424385    $category = trim($postinfo['category']); 
     386    $cat_desc = trim($postinfo['cat_desc']); 
    425387        $post = get_post( $post_ID ); 
    426388        $user_account = get_user_meta( $auth,'wtt_twitter_username', true ) ; 
    427389    $author = ( $user_account != '' )?"@$user_account":get_the_author_meta( 'display_name',$post->post_author ); 
    428390    $display_name = get_the_author_meta( 'display_name',$post->post_author ); 
    429     $tags = generate_hash_tags( $post_ID ); 
    430     $account = "@".get_option('wtt_twitter_username'); 
     391    $tags = wpt_generate_hash_tags( $post_ID ); 
     392    $account = get_option('wtt_twitter_username'); 
    431393    $date = trim($postinfo['postDate']); 
    432394    $modified = trim($postinfo['postModified']); 
     
    434396        if ( $user_account == '' ) { 
    435397            if ( get_user_meta( $auth, 'wp-to-twitter-enable-user',true ) == 'mainAtTwitter' ) { 
    436                 $account = "@" . stripcslashes(get_user_meta( $auth, 'wp-to-twitter-user-username',true )); 
     398                $account = stripcslashes(get_user_meta( $auth, 'wp-to-twitter-user-username',true )); 
    437399            } else if ( get_user_meta( $auth, 'wp-to-twitter-enable-user',true ) == 'mainAtTwitterPlus' ) { 
    438                 $account = "@" . stripcslashes(get_user_meta( $auth, 'wp-to-twitter-user-username',true ) . ' @' . get_option( 'wtt_twitter_username' )); 
     400                $account = stripcslashes(get_user_meta( $auth, 'wp-to-twitter-user-username',true ) . ' @' . get_option( 'wtt_twitter_username' )); 
    439401            } 
    440402        } else { 
    441             $account = "@$user_account"; 
    442         } 
    443     } 
     403            $account = "$user_account"; 
     404        } 
     405    } 
     406    $uaccount = ( $user_account != '' )?"@$user_account":''; 
     407    $account = ( $account != '' )?"@$account":''; 
     408    $account = str_ireplace( '@@','@',$account ); 
     409    $uaccount = str_ireplace( '@@', '@', $uaccount ); 
     410    $author = str_ireplace( '@@', '@', $author ); 
    444411    if ( get_user_meta( $auth, 'wpt-remove', true ) == 'on' ) { $account = ''; } 
    445412    if ( get_option( 'jd_twit_prepend' ) != "" && $sentence != '' ) { 
     
    463430        && strpos( $sentence, '#reference#' ) === false      
    464431        && strpos( $sentence, '#account#' ) === false    
     432        && strpos( $sentence, '#@#' ) === false 
     433        && strpos( $sentence, '#cat_desc' ) === false 
    465434    ) { 
    466435        // there are no tags in this Tweet. Truncate and return. 
    467         $post_sentence = mb_substr( $sentence , 0, 139 ,$encoding );  
     436        $post_sentence = mb_substr( $sentence, 0, 139, $encoding );  
    468437        return $post_sentence; 
    469438    } 
     
    474443    // create full unconditional post sentence - prior to truncation 
    475444    $post_sentence = str_ireplace( '#account#', $account, $sentence ); 
     445    $post_sentence = str_ireplace( '#@#', $uaccount, $post_sentence ); 
    476446    if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true  ) { 
    477447        $post_sentence = str_ireplace( '#reference#', $reference, $post_sentence ); 
     
    484454    $post_sentence = str_ireplace( '#post#',$excerpt, $post_sentence ); 
    485455    $post_sentence = str_ireplace( '#category#',$category, $post_sentence ); 
     456    $post_sentence = str_ireplace( '#cat_desc#',$cat_desc, $post_sentence ); 
    486457    $post_sentence = str_ireplace( '#date#', $date, $post_sentence ); 
    487458    $post_sentence = str_ireplace( '#author#', $author, $post_sentence ); 
     
    504475        $length_array['date'] = mb_strlen(fake_normalize($date),$encoding);      
    505476        $length_array['category'] = mb_strlen(fake_normalize($category),$encoding); 
     477        $length_array['cat_desc'] = mb_strlen(fake_normalize($cat_desc),$encoding); 
     478        $length_array['@'] = mb_strlen(fake_normalize("$uaccount"),$encoding); 
    506479        $length_array['blogname'] = mb_strlen(fake_normalize($blogname),$encoding); 
    507480        $length_array['author'] = mb_strlen(fake_normalize($author),$encoding); 
    508481        $length_array['account'] = mb_strlen(fake_normalize($account),$encoding); 
    509     if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true  ) { 
    510         $length_array['reference'] = mb_strlen(fake_normalize($reference),$encoding); 
    511     } 
     482        if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true  ) { 
     483            $length_array['reference'] = mb_strlen(fake_normalize($reference),$encoding); 
     484        } 
    512485        $length_array['tags'] = mb_strlen(fake_normalize($tags),$encoding); 
    513486        $length_array['modified'] = mb_strlen(fake_normalize($modified),$encoding); 
    514487        // if the total length is too long, truncate items until the length is appropriate.  
    515         // truncation is in order of items which can most afford to be truncated. URL is never truncated. 
    516         // Twitter has made their t.co shortener automatic and mandatory; this has some weird effects on 
    517         // character counting. All URLS are defined by the max-character value set by Twitter. Period. 
    518         $change = wpt_date_compare( date('Y-m-d'), '2-20-2012' ); 
    519         if ( $change === 1 ) { 
    520             $tco = ( wpt_is_ssl( $thisposturl ) )?21:20; 
    521         } else { 
    522             $tco = ( wpt_is_ssl( $thisposturl ) )?23:22; 
    523         } 
     488        // Twitter's t.co shortener is mandatory. All URLS are max-character value set by Twitter.           
     489        $tco = ( wpt_is_ssl( $thisposturl ) )?23:22; 
    524490        $order = get_option( 'wpt_truncation_order' ); 
    525491        if ( is_array( $order ) ) { 
     
    542508                    $post_sentence = str_ireplace( $thisposturl, '#url#', $post_sentence );  
    543509                    // modify the value and replace old with new 
    544                     if ( $key == 'account' || $key == 'author' || $key == 'category' || $key == 'date' || $key == 'modified' || $key == 'reference' ) { 
     510                    if ( $key == 'account' || $key == 'author' || $key == 'category' || $key == 'date' || $key == 'modified' || $key == 'reference' || $key == '@' ) { 
    545511                        // these elements make no sense if truncated, so remove them entirely. 
    546512                        $new_value = ''; 
     
    586552} 
    587553 
    588 function in_allowed_category( $array ) { 
     554function wpt_in_allowed_category( $array ) { 
    589555    $allowed_categories =  get_option( 'tweet_categories' ); 
    590556    if ( is_array( $array ) && is_array( $allowed_categories ) ) { 
     
    599565        } 
    600566    } else { 
    601         if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    602             wp_mail(WPT_DEBUG_ADDRESS,'Category limits not arrays.','Content not relevant.'); 
    603         } 
    604567        return true; 
    605568    } 
     
    625588    $values['postModified'] = mysql2date( $dateformat,$moddate ); 
    626589    // get first category 
    627         $category = null; 
     590        $category = $cat_desc = null; 
    628591        $categories = get_the_category( $post_ID ); 
    629592        if ( is_array( $categories ) ) { 
    630593            if ( count($categories) > 0 ) { 
    631594                $category = $categories[0]->cat_name; 
    632             }        
     595                $cat_desc = $categories[0]->description; 
     596            }  
    633597            foreach ($categories AS $cat) { 
    634598                $category_ids[] = $cat->term_id; 
     
    636600        } else { 
    637601            $category = ''; 
     602            $cat_desc = ''; 
    638603            $category_ids = array(); 
    639604        } 
    640605    $values['categoryIds'] = $category_ids; 
    641606    $values['category'] = $category; 
     607    $values['cat_desc'] = $cat_desc; 
    642608        $excerpt_length = get_option( 'jd_post_excerpt' ); 
    643609    $post_excerpt = ( trim( $post->post_excerpt ) == "" )?@mb_substr( strip_tags( strip_shortcodes( $post->post_content ) ), 0, $excerpt_length ):@mb_substr( strip_tags( strip_shortcodes( $post->post_excerpt ) ), 0, $excerpt_length ); 
     
    648614        } 
    649615    $values['postTitle'] = html_entity_decode( $thisposttitle, ENT_COMPAT, get_option('blog_charset') ); 
    650     $values['postLink'] = external_or_permalink( $post_ID ); 
     616    $values['postLink'] = wpt_link( $post_ID ); 
    651617    $values['blogTitle'] = get_bloginfo( 'name' ); 
    652618    $values['shortUrl'] = wpt_short_url( $post_ID ); 
     
    679645 
    680646function jd_twit( $post_ID, $type='instant' ) { 
    681     // new 
    682647    if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    683         wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 0: jd_twit running #$post_ID","Post ID: $post_ID" ); // DEBUG 
     648        wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 0: jd_twit running #$post_ID","Post ID: $post_ID / $type" ); // DEBUG 
    684649    }    
    685650    if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE || wp_is_post_revision($post_ID) ) { return $post_ID; } 
     
    694659    } 
    695660    if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    696         wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 1: JD Tweet This Value: #$post_ID","Tweet this: $jd_tweet_this" ); // DEBUG 
     661        wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 1: JD Tweet This Value: #$post_ID","Tweet this: $jd_tweet_this / $type" ); // DEBUG 
    697662    }    
    698663    if ( get_option('jd_tweet_default') == 0 ) {  
     
    710675        /* debug data */ 
    711676        if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    712             wp_mail(WPT_DEBUG_ADDRESS,"jd_twit 2: POST Debug Data #$post_ID","Post_Info: ".print_r($post_info,1)."POST: ".print_r($_POST, 1) ); 
     677            wp_mail(WPT_DEBUG_ADDRESS,"jd_twit 2: POST Debug Data #$post_ID","Post_Info: ".print_r($post_info,1)."POST: ".print_r($_POST, 1). " / $type" ); 
    713678        } 
    714679        if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true && function_exists('wpt_filter_post_info') ) { 
     
    716681            if ( $filter == true ) { 
    717682                if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {  
    718                     wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 3: Post filtered: #$post_ID",print_r($post_info,1) );  
     683                    wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 3: Post filtered: #$post_ID",print_r($post_info,1)." / $type" );  
    719684                } 
    720685                return false;  
     
    726691            $new = 1; // if this is a future action, then it should be published regardless of relationship 
    727692            if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {  
    728                 wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 4: Future post: #$post_ID",print_r($post_info,1) );  
     693                wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 4: Future post: #$post_ID",print_r($post_info,1)." / $type" );  
    729694            }            
    730695        } else { 
     
    741706            if ( isset( $_POST['_jd_twitter'] ) && $_POST['_jd_twitter'] != '' ) { $cT = $_POST['_jd_twitter']; } 
    742707            $customTweet = ( $cT != '' )?stripcslashes( trim( $cT ) ):''; 
    743             // excluded post statuses that should never be tweeted   
    744             // if ( $post_info['postStatus'] != 'draft' && $post_info['postStatus'] != 'auto-draft' && $post_info['postStatus'] != 'private' && $post_info['postStatus'] != 'inherit' && $post_info['postStatus'] != 'trash' ) { // eliminated 12/30/2012. Continue testing JCD 
    745             // && $post_info['postStatus'] != 'pending' 
    746708                // if ops is set and equals 'publish', this is being edited. Otherwise, it's a new post. 
    747709                if ( ( $new == 0 && $post_info['postStatus'] != 'future' ) || $is_inline_edit == true ) { 
    748710                    // if this is an old post and editing updates are enabled 
    749711                    if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    750                         wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 4a: Processed as an Edit #$post_ID","Tweet this post: ".$post_info['postTitle']."\n".print_r($post_info,1) ); // DEBUG 
    751                     }                        
     712                        wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 4a: Processed as an Edit #$post_ID","Tweet this post: ".$post_info['postTitle']."\n".print_r($post_info,1)." / $type" ); // DEBUG 
     713                    } 
    752714                    if ( $post_type_settings[$post_type]['post-edited-update'] == '1' ) {                    
    753715                        $nptext = stripcslashes( $post_type_settings[$post_type]['post-edited-text'] ); 
     
    756718                } else { 
    757719                    if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    758                         wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 4b: Processed as a New Post #$post_ID","Tweet this: ".$post_info['postTitle']."\n".print_r($post_info,1) ); // DEBUG 
     720                        wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 4b: Processed as a New Post #$post_ID","Tweet this: ".$post_info['postTitle']."\n".print_r($post_info,1)." / $type" ); // DEBUG 
    759721                    }                
    760722                    if ( $post_type_settings[$post_type]['post-published-update'] == '1' ) { 
    761                         $nptext = stripcslashes( $post_type_settings[$post_type]['post-published-text'] );   
     723                        $nptext = stripcslashes( $post_type_settings[$post_type]['post-published-text'] );           
    762724                        $newpost = true; 
    763725                    } 
     
    768730                $sentence = jd_truncate_tweet( $template, $post_info, $post_ID ); 
    769731                    if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    770                         wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 5: Tweet Truncated #$post_ID","Truncated Tweet: $sentence" ); // DEBUG 
     732                        wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 5: Tweet Truncated #$post_ID","Truncated Tweet: $sentence / $type" ); // DEBUG 
    771733                    }                    
    772734                if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true  ) { 
     
    775737            } 
    776738            if ( $sentence != '' ) { 
    777                 if ( get_option('jd_twit_cats') == '1' ) { 
    778                     $continue = ( !in_allowed_category( $post_info['categoryIds'] ) )?true:false; 
    779                 } else { 
    780                     $continue = ( in_allowed_category( $post_info['categoryIds'] ) )?true:false; 
    781                 } 
     739                    $post_type_cats = get_object_taxonomies( $post_type ); 
     740                    if ( in_array( 'category', $post_type_cats ) ) {  
     741                    // 'category' is assigned to this post type, so apply filters. 
     742                        if ( get_option('jd_twit_cats') == '1' ) { 
     743                            $continue = ( !wpt_in_allowed_category( $post_info['categoryIds'] ) )?true:false; 
     744                        } else { 
     745                            $continue = ( wpt_in_allowed_category( $post_info['categoryIds'] ) )?true:false; 
     746                        } 
     747                    } else { 
     748                        $continue = true;  
     749                    } 
    782750                if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) && !$continue ) { 
    783                     wp_mail(WPT_DEBUG_ADDRESS,"jd_twit 6: Category limits applied #$post_ID", print_r($post_info['categoryIds'],1) ); 
     751                    wp_mail(WPT_DEBUG_ADDRESS,"jd_twit 6: Category limits applied #$post_ID", print_r($post_info['categoryIds'],1)." / $type" ); 
    784752                } 
    785753                if ( get_option('limit_categories') == '0' ) { $continue = true; } 
     
    793761                            $tweet = jd_doTwitterAPIPost( $sentence, $auth, $post_ID ); 
    794762                            if ( $post_info['wpt_cotweet'] == 1 && $auth_verified ) { 
    795                                 $tweet2 = jd_doTwitterAPIPost( $sentence2, false, $post_ID );                    
     763                                $tweet2 = jd_doTwitterAPIPost( $sentence2, false, $post_ID );                
    796764                            } 
    797765                        } else { 
     
    799767                            wp_schedule_single_event( time()+$time, 'wpt_schedule_tweet_action', array( 'id'=>$auth, 'sentence'=>$sentence, 'rt'=>0, 'post_id'=>$post_ID ) ); 
    800768                            if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    801                                 wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 7: JD Main Tweet Scheduled #$post_ID",print_r( array( 'id'=>$auth, 'sentence'=>$sentence, 'rt'=>0, 'post_id'=>$post_ID, 'timestamp'=>time()+$time, 'current_time'=>time(), 'timezone'=>get_option('gmt_offset') ),1) ); // DEBUG 
     769                                wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 7: JD Main Tweet Scheduled #$post_ID",print_r( array( 'id'=>$auth, 'sentence'=>$sentence, 'rt'=>0, 'post_id'=>$post_ID, 'timestamp'=>time()+$time, 'current_time'=>time(), 'timezone'=>get_option('gmt_offset') ),1)." / $type" ); // DEBUG 
    802770                            }                                
    803771                         
     
    806774                                wp_schedule_single_event( time()+$time+$offset, 'wpt_schedule_tweet_action', array( 'id'=>false, 'sentence'=>$sentence2, 'rt'=>0, 'post_id'=>$post_ID ) ); 
    807775                                    if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    808                                         wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 8: JD CoTweet Scheduled #$post_ID",print_r($post_info,1) ); // DEBUG 
     776                                        wp_mail( WPT_DEBUG_ADDRESS,"jd_twit 8: JD CoTweet Scheduled #$post_ID",print_r($post_info,1)." / $type" ); // DEBUG 
    809777                                    } 
    810778                                } 
     
    897865    } 
    898866} 
    899 // HANDLES xmlrpc POSTS 
    900 function jd_twit_xmlrpc( $post_ID ) { 
    901     wpt_check_version(); 
    902      
    903     $post_info = jd_post_info( $post_ID );   
    904         if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true ) { 
    905             $auth = ( get_option( 'wpt_cotweet_lock' ) == 'false' || !get_option('wpt_cotweet_lock') )?$post_info['authId']:get_option('wpt_cotweet_lock'); 
    906         } else { 
    907             $auth = $post_info['authId']; 
    908         } 
    909     $post_type = $post_info['postType']; 
    910     $settings = get_option('wpt_post_types'); 
    911     $post_types = array_keys($settings); 
    912     // if the post modified date and the post date are the same, this is new. 
    913     $new = wpt_date_compare( $post_info['_postModified'], $post_info['_postDate'] ); 
    914     if ( in_array( $post_type, $post_types ) ) {         
    915         $template = '';  
    916         if ( get_option('jd_tweet_default') != '1' && get_option('jd_twit_remote') == '1' ) { 
    917             $poststatus = $post_info['postStatus']; 
    918             if ( $poststatus == 'publish' ) { 
    919                 if ( $new === 1 && $settings[$post_type]['post-published-update'] == '1' ) { 
    920                     $template = stripcslashes( $settings[$post_type]['post-published-text'] ); 
    921                 } else if ( $new === 0 && $settings[$post_type]['post-edited-update'] == '1' && get_option( 'jd_tweet_default_edit' ) != '1' ) { 
    922                     $template = stripcslashes( $settings[$post_type]['post-edited-text'] ); 
    923                 } else { 
    924                     return; 
    925                 } 
    926             } else { 
    927                 return; 
    928             }    
    929             // Check the length of the Tweet and truncate parts as necessary. 
    930             $sentence = jd_truncate_tweet( $template, $post_info, $post_ID ); 
    931             if ( function_exists('wpt_pro_exists') ) { 
    932                 $sentence2 = jd_truncate_tweet( $template, $post_info, $post_ID, false, $auth ); 
    933             } 
    934             if ( $sentence != '' ) {     
    935                 if ( get_option('jd_twit_cats') == '1' ) { 
    936                     $continue = ( !in_allowed_category( $post_info['categoryIds'] ) )?true:false; 
    937                 } else { 
    938                     $continue = ( in_allowed_category( $post_info['categoryIds'] ) )?true:false;                 
    939                 } 
    940                 if ( get_option('limit_categories') == '0' ) { $continue = true; } 
    941                 if ( $continue ) { 
    942                     // WPT PRO // 
    943                     if ( function_exists( 'wpt_pro_exists' ) ) { 
    944                         $user = get_userdata( $auth ); 
    945                         $auth_verified = wtt_oauth_test( $auth,'verify' ); 
    946                         if ( $post_info['wpt_delay_tweet'] == 0 || $post_info['wpt_delay_tweet'] == '' || $post_info['wpt_no_delay'] == 'on' ) { 
    947                             $tweet = jd_doTwitterAPIPost( $sentence, $auth, $post_ID ); 
    948                             if ( $post_info['wpt_cotweet'] == 1 && $auth_verified ) { 
    949                                 $offset = rand(60,240); // delay co-tweet by 1-4 minutes. 
    950                                 wp_schedule_single_event( time()+$offset, 'wpt_schedule_tweet_action', array( 'id'=>false, 'sentence'=>$sentence2, 'rt'=>0, 'post_id'=>$post_ID ) ); 
    951                             } 
    952                         } else { 
    953                             $time = ( (int) $post_info['wpt_delay_tweet'] )*60; 
    954                             wp_schedule_single_event( time()+$time, 'wpt_schedule_tweet_action', array( 'id'=>$auth, 'sentence'=>$sentence, 'rt'=>0, 'post_id'=>$post_ID ) ); 
    955                             if ( $post_info['wpt_cotweet'] == 1 && $auth_verified ) { 
    956                                 $offset = rand(60,240); // delay co-tweet by 1-4 minutes.                        
    957                                 wp_schedule_single_event( time()+$time+$offset, 'wpt_schedule_tweet_action', array( 'id'=>false, 'sentence'=>$sentence2, 'rt'=>0, 'post_id'=>$post_ID ) ); 
    958                             } 
    959                             $tweet = true; 
    960                         } 
    961                         if ( $post_info['wpt_retweet_after'] != 0 && $post_info['wpt_no_repost'] != 'on' ) { 
    962                             $repeat = $post_info['wpt_retweet_repeat']; 
    963                             for ( $i=1;$i<=$repeat;$i++ ) { 
    964                                 if ( $i == 1 ) {  
    965                                     $prepend = ( get_option('wpt_prepend') == 1 )?'':get_option('wpt_prepend_rt'); 
    966                                     $append = ( get_option('wpt_prepend') != 1 )?'':get_option('wpt_prepend_rt'); 
    967                                     $retweet = jd_truncate_tweet( trim( $prepend.$sentence.$append ), $post_info, $post_ID,true ); 
    968                                     $retweet2 = jd_truncate_tweet( trim( $prepend.$sentence2.$append ), $post_info, $post_ID,true, $auth ); 
    969                                 } 
    970                                 if ( $i == 2 ) { 
    971                                     $prepend = ( get_option('wpt_prepend') == 1 )?'':get_option('wpt_prepend_rt2'); 
    972                                     $append = ( get_option('wpt_prepend') != 1 )?'':get_option('wpt_prepend_rt2');                               
    973                                     $retweet = jd_truncate_tweet( trim( $prepend.$sentence.$append ), $post_info, $post_ID,true ); 
    974                                     $retweet2 = jd_truncate_tweet( trim( $prepend.$sentence2.$append ), $post_info, $post_ID,true, $auth ); 
    975                                 } 
    976                                 if ( $i == 3 ) {  
    977                                     $retweet = $sentence;  
    978                                 } 
    979                                 if ( $i == 4 ) { 
    980                                     $prepend = ( get_option('wpt_prepend') == 1 )?'':get_option('wpt_prepend_rt'); 
    981                                     $append = ( get_option('wpt_prepend') != 1 )?'':get_option('wpt_prepend_rt');                                
    982                                     $retweet = jd_truncate_tweet( trim( $prepend.$sentence.$append ), $post_info, $post_ID,true );  
    983                                     $retweet2 = jd_truncate_tweet( trim( $prepend.$sentence2.$append ), $post_info, $post_ID,true, $auth );                                  
    984                                 } 
    985                                 $time = ($post_info['wpt_retweet_after'])*(60*60)*$i; 
    986                                 wp_schedule_single_event( time()+$time, 'wpt_schedule_tweet_action', array( 'id'=>$auth, 'sentence'=>$retweet, 'rt'=>$i, 'post_id'=>$post_ID ) ); 
    987                                 if ( $post_info['wpt_cotweet'] == 1 && $auth_verified ) { 
    988                                     $offset = rand(60,240); // delay each co-tweet by 1-4 minutes 
    989                                     wp_schedule_single_event( time()+$time+$offset, 'wpt_schedule_tweet_action', array( 'id'=>false, 'sentence'=>$retweet2, 'rt'=>$i, 'post_id'=>$post_ID ) ); 
    990                                 } 
    991                                 $tweet = true; 
    992                                 if ( $i == 4 ) { break; } 
    993                             } 
    994                         } 
    995                     } else { 
    996                         $tweet = jd_doTwitterAPIPost( $sentence, false, $post_ID ); 
    997                     } 
    998                     // END WPT PRO //            
    999                     /*if ( $tweet && $tweet != 2 ) { 
    1000                         $jwt = get_post_meta( $post_ID, '_jd_wp_twitter', true ); 
    1001                         if ( !is_array( $jwt ) ){ $jwt=array(); } 
    1002                         $jwt[] = urldecode( $sentence ); 
    1003                         $_POST['_jd_wp_twitter'] = $jwt; 
    1004                         update_post_meta( $post_ID,'_jd_wp_twitter', $jwt ); 
    1005                     }*/                  
    1006                     if ($tweet == false ) { 
    1007                         update_option('wp_twitter_failure','1'); 
    1008                     } 
    1009                 }                
    1010             } 
    1011         } 
    1012     return $post_ID; 
    1013     } 
    1014 } // END jd_twit_xmlrpc 
    1015867 
    1016868// Add comment Tweet function from Luis Nobrega 
     
    1033885} 
    1034886 
    1035 add_action('admin_menu','jd_add_twitter_outer_box'); 
    1036  
    1037 function store_url($post_ID, $url) { 
    1038     if ( function_exists('jd_shorten_link') ) { 
    1039         $shortener = get_option( 'jd_shortener' ); 
    1040         switch ($shortener) { 
    1041             case 0: case 1: case 4: $ext = '_wp';break; 
    1042             case 2: $ext = '_bitly';break; 
    1043             case 3: $ext = '_url';break; 
    1044             case 5: case 6: $ext = '_yourls';break; 
    1045             case 7: $ext = '_supr'; break; 
    1046             case 8: $ext = '_goo';  break; 
    1047             case 9: $ext = '_tfl'; break; 
    1048             default:$ext = '_ind'; 
    1049         } 
    1050         if ( get_post_meta ( $post_ID, "_wp_jd$ext", TRUE ) != $url ) { 
    1051             update_post_meta ( $post_ID, "_wp_jd$ext", $url ); 
    1052         } 
    1053         switch ( $shortener ) { 
    1054             case 0: case 1: case 2: case 7: case 8: $target = jd_expand_url( $url );break; 
    1055             case 5: case 6: $target = jd_expand_yourl( $url, $shortener );break; 
    1056             case 9: $target = $url;  
    1057             default: $target = $url; 
    1058         } 
    1059     } 
    1060     update_post_meta( $post_ID, '_wp_jd_target', $target ); 
    1061 } 
    1062  
    1063 function generate_hash_tags( $post_ID ) { 
     887function wpt_generate_hash_tags( $post_ID ) { 
    1064888    $hashtags = ''; 
    1065889    $max_tags = get_option( 'jd_max_tags' ); 
     
    1079903            $strip = get_option( 'jd_strip_nonan' ); 
    1080904            $search = "/[^\p{L}\p{N}\s]/u"; 
    1081             if ($replace == "[ ]") { $replace = ""; } 
     905            if ( $replace == "[ ]" || $replace == "" ) { $replace = ""; } 
    1082906            $tag = str_ireplace( " ",$replace,trim( $tag ) ); 
    1083907            if ($strip == '1') { $tag = preg_replace( $search, $replace, $tag ); } 
    1084             if ($replace == "" || !$replace) { $replace = "_"; } 
    1085908                $newtag = "#$tag"; 
    1086909                    if ( mb_strlen( $newtag ) > 2 && (mb_strlen( $newtag ) <= $max_characters) && ($i <= $max_tags) ) { 
     
    1095918} 
    1096919 
    1097 function jd_add_twitter_old_box() { 
    1098 ?> 
    1099 <div class="dbx-b-ox-wrapper"> 
    1100     <fieldset id="twitdiv" class="dbx-box"> 
    1101         <div class="dbx-h-andle-wrapper"> 
    1102         <h3 class="dbx-handle"><?php _e('WP Tweets', 'wp-to-twitter', 'wp-to-twitter') ?></h3> 
    1103         </div> 
    1104         <div class="dbx-c-ontent-wrapper"> 
    1105             <div class="dbx-content"> 
    1106             <?php jd_add_twitter_inner_box(); ?> 
    1107             </div> 
    1108         </div> 
    1109     </fieldset> 
    1110 </div> 
    1111 <?php 
    1112 } 
    1113  
    1114 function jd_add_twitter_inner_box() { 
    1115  
    1116 if ( current_user_can('wpt_can_tweet') ) { 
    1117 global $post, $jd_plugin_url, $jd_donate_url; 
    1118     $post_length = 140; 
    1119     $wpt_settings = get_option('wpt_post_types'); 
    1120     $post_id = $post; 
    1121     if ( is_object( $post_id ) ) { 
    1122         $type = $post_id->post_type; 
    1123         $status = $post_id->post_status; 
    1124         $post_id = $post_id->ID; 
    1125     } else { 
    1126         $post = get_post( $post_id ); 
    1127         $type = $post->post_type; 
    1128         $status = $post->post_status; 
    1129     } 
    1130     $jd_twitter = esc_attr( stripcslashes( get_post_meta($post_id, '_jd_twitter', true ) ) ); 
    1131     $jd_template = ( $status == 'publish' )?$wpt_settings[$type]['post-edited-text']:$wpt_settings[$type]['post-published-text']; 
    1132     $jd_tweet_this = get_post_meta( $post_id, '_jd_tweet_this', true ); 
    1133     if ( $jd_tweet_this == '' ) {  
    1134         $jd_tweet_this = (get_option( 'jd_tweet_default' ) == '1' )?'no':'yes';  
    1135     } 
    1136     if ( isset($_GET['action']) && $_GET['action'] == 'edit' && get_option( 'jd_tweet_default_edit' ) == '1' ) { $jd_tweet_this = 'no'; } 
    1137     $previous_tweets = get_post_meta ( $post_id, '_jd_wp_twitter', true ); 
    1138     $failed_tweets = get_post_meta( $post_id, '_wpt_failed' ); 
    1139     ?> 
    1140 <?php if ( current_user_can('update_core') && function_exists( 'wpt_pro_exists' ) ) { wpt_pro_compatibility(); } ?> 
    1141  
    1142 <?php if ( !is_array( $previous_tweets ) && $previous_tweets != '' ) { $previous_tweets = array( 0=>$previous_tweets ); } ?> 
    1143 <?php if ( ! empty( $previous_tweets ) || ! empty( $failed_tweets ) ) { ?> 
    1144 <p class='error'><strong><?php _e('Previous Tweets','wp-to-twitter'); ?>:</strong></p> 
    1145 <ul> 
    1146 <?php 
    1147 $hidden_fields = ''; 
    1148     if ( is_array( $previous_tweets ) ) { 
    1149         foreach ( $previous_tweets as $previous_tweet ) { 
    1150             if ( $previous_tweet != '' ) { 
    1151                 $hidden_fields .= "<input type='hidden' name='_jd_wp_twitter[]' value='".esc_attr($previous_tweet)."' />"; 
    1152                 echo "<li>$previous_tweet <a href='http://twitter.com/intent/tweet?text=".urlencode($previous_tweet)."'>Retweet this</a></li>"; 
    1153             } 
    1154         } 
    1155     } 
    1156 ?> 
    1157 </ul> 
    1158 <p class='error'><strong><?php _e('Failed Tweets','wp-to-twitter'); ?>:</strong></p> 
    1159 <ul> 
    1160 <?php 
    1161     $list = false; 
    1162     if ( is_array( $failed_tweets ) ) { 
    1163         foreach ( $failed_tweets as $failed_tweet ) { 
    1164             if ( !empty($failed_tweet) ) { 
    1165                 $ft = $failed_tweet['sentence']; 
    1166                 $reason = $failed_tweet['code']; 
    1167                 $error = $failed_tweet['error']; 
    1168                 $list = true; 
    1169                 echo "<li> <code title='$error'>Error: $reason</code> $ft <a href='http://twitter.com/intent/tweet?text=".urlencode($ft)."'>Tweet this</a></li>"; 
    1170             } 
    1171         } 
    1172     } 
    1173     if ( !$list ) { echo "<li>".__('No failed tweets on this post.','wp-to-twitter')."</li>"; } 
    1174 ?> 
    1175 </ul> 
    1176 <?php echo "<div>".$hidden_fields."</div>"; } ?> 
    1177 <?php if ( current_user_can('update_core') && !function_exists( 'wpt_pro_exists' ) ) { ?> <strong><a target="__blank" href="<?php echo $jd_donate_url; ?>"><?php _e('WP to Twitter can do more for you! Take a look at WP Tweets Pro!', 'wp-to-twitter', 'wp-to-twitter') ?></a></strong> <?php } ?> 
    1178 <?php if ( current_user_can( 'wpt_twitter_custom' ) || current_user_can('update_core') ) { ?> 
    1179 <p class='jtw'> 
    1180 <label for="jtw"><?php _e("Custom Twitter Post", 'wp-to-twitter', 'wp-to-twitter') ?></label><br /><textarea class="attachmentlinks" name="_jd_twitter" id="jtw" rows="2" cols="60"><?php echo esc_attr( $jd_twitter ); ?></textarea> 
    1181 </p> 
    1182 <?php 
    1183     $jd_expanded = $jd_template; 
    1184         if ( get_option( 'jd_twit_prepend' ) != "" ) { 
    1185             $jd_expanded = "<span title='".__('Your prepended Tweet text; not part of your template.','wp-to-twitter')."'>".stripslashes( get_option( 'jd_twit_prepend' )) . "</span> " . $jd_expanded; 
    1186         } 
    1187         if ( get_option( 'jd_twit_append' ) != "" ) { 
    1188             $jd_expanded = $jd_expanded . " <span title='".__('Your appended Tweet text; not part of your template.','wp-to-twitter')."'>" . stripslashes(get_option( 'jd_twit_append' ))."</span>"; 
    1189         } 
    1190         /* $turl = ( $status = "publish" )?wpt_short_url( $post_id ):'http://t.co/example1'; 
    1191         $search = array( '#url#','#title#','#reference#','#post#','#category#','#date#','#modified#','#author#','#account#','#tags#','#blog#' ); 
    1192         $replace = array(  
    1193             '<span class="tw_url">'.$turl.'</span>', 
    1194             '<span class="tw_title">#title#</span>', 
    1195             '<span class="tw_post">#post#</span>', 
    1196             '<span class="tw_reference">#reference#</span>', 
    1197             '<span class="tw_category">#category#</span>', 
    1198             '<span class="tw_date">#date#</span>', 
    1199             '<span class="tw_modified">#modified#</span>', 
    1200             '<span class="tw_author">#author#</span>', 
    1201             '<span class="tw_tags">#tags#</span>', 
    1202             get_bloginfo('blogname') ); 
    1203         $jd_expanded = str_replace( $search, $replace, $jd_expanded ); */ ?> 
    1204 <p class='template'><?php _e('Your template:','wp-to-twitter'); ?> <code><?php echo stripcslashes( $jd_expanded ); ?></code></p> 
    1205  
    1206 <?php  
    1207     if ( get_option('jd_keyword_format') == 2 ) { 
    1208         $custom_keyword = get_post_meta( $post_id, '_yourls_keyword', true ); 
    1209         echo "<label for='yourls_keyword'>".__('YOURLS Custom Keyword','wp-to-twitter')."</label> <input type='text' name='_yourls_keyword' id='yourls_keyword' value='$custom_keyword' />"; 
    1210     } 
    1211 ?> 
    1212 <?php } else { ?> 
    1213 <input type="hidden" name='_jd_twitter' value='' /> 
    1214 <?php } ?> 
    1215 <?php if ( current_user_can( 'wpt_twitter_switch' ) || current_user_can('update_core') ) { ?> 
    1216 <?php 
    1217     // "no" means 'Don't Tweet' (is checked) 
    1218     $nochecked = ( $jd_tweet_this == 'no' )?' checked="checked"':''; 
    1219     $yeschecked = ( $jd_tweet_this == 'yes' )?' checked="checked"':''; 
    1220 ?> 
    1221 <p><input type="radio" name="_jd_tweet_this" value="no" id="jtn"<?php echo $nochecked; ?> /> <label for="jtn"><?php _e("Don't Tweet this post.", 'wp-to-twitter'); ?></label> <input type="radio" name="_jd_tweet_this" value="yes" id="jty"<?php echo $yeschecked; ?> /> <label for="jty"><?php _e("Tweet this post.", 'wp-to-twitter'); ?></label></p> 
    1222 <?php } else { ?> 
    1223     <input type='hidden' name='_jd_tweet_this' value='<?php echo $jd_tweet_this; ?>' /> 
    1224 <?php } ?> 
    1225 <?php /* WPT PRO */ ?> 
    1226 <?php  
    1227 if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true  && ( current_user_can( 'wpt_twitter_custom' ) || current_user_can( 'update_core' ) ) ) {  
    1228     wpt_schedule_values( $post_id );  
    1229 } ?> 
    1230 <?php /* WPT PRO */ ?> 
    1231 <?php if ( !current_user_can( 'wpt_twitter_custom' ) && !current_user_can( 'update_core' ) ) { ?> 
    1232 <div> 
    1233 <p><?php _e('Access to customizing WP to Twitter values is not allowed for your user role.','wp-to-twitter'); ?></p> 
    1234 <?php  
    1235 if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) {  
    1236     wpt_schedule_values( $post_id, 'hidden' );  
    1237 } ?> 
    1238 </div> 
    1239 <?php } ?> 
    1240 <?php if ( current_user_can( 'wpt_twitter_custom' ) || current_user_can( 'update_core' ) ) { ?> 
    1241 <p> 
    1242 <?php _e("Tweets are no more than 140 characters; Twitter counts URLs as 20 or 21 characters. Template tags: <code>#url#</code>, <code>#title#</code>, <code>#post#</code>, <code>#category#</code>, <code>#date#</code>, <code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, <code>#tags#</code>, or <code>#blog#</code>.", 'wp-to-twitter') ?>  
    1243 </p> 
    1244 <?php } ?> 
    1245 <p> 
    1246 <?php if ( !function_exists( 'wpt_pro_exists' ) ) { ?> 
    1247 <a target="_blank" href="<?php echo admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php'); ?>#get-support"><?php _e('Get Support', 'wp-to-twitter', 'wp-to-twitter') ?></a> &bull; <strong><a target="__blank" href="<?php echo $jd_donate_url; ?>"><?php _e('Upgrade to WP Tweets Pro', 'wp-to-twitter', 'wp-to-twitter') ?></a></strong> &raquo; 
    1248 <?php } else { ?> 
    1249 <a target="_blank" href="<?php echo admin_url('admin.php?page=wp-tweets-pro'); ?>#get-support"><?php _e('Get Support', 'wp-to-twitter', 'wp-to-twitter') ?></a> &raquo; 
    1250 <?php } ?> 
    1251 </p> 
    1252 <?php  
    1253     } else { // permissions: this user isn't allowed to Tweet; 
    1254         _e('Your role does not have the ability to Post Tweets from this site.','wp-to-twitter'); ?> <input type='hidden' name='_jd_tweet_this' value='no' /> <?php 
    1255     } 
    1256 }  
     920add_action('admin_menu','jd_add_twitter_outer_box'); 
     921 
    1257922function jd_add_twitter_outer_box() { 
    1258923    wpt_check_version(); 
     924    // add Twitter panel to post types where it's enabled. 
    1259925    $wpt_post_types = get_option('wpt_post_types'); 
    1260926    if ( function_exists( 'add_meta_box' )) { 
     
    1268934    } 
    1269935} 
     936 
     937function jd_add_twitter_inner_box( $post ) { 
     938    if ( current_user_can('wpt_can_tweet') ) { 
     939    global $jd_plugin_url, $jd_donate_url; 
     940        $post_length = 140; 
     941        $wpt_settings = get_option('wpt_post_types'); 
     942        if ( is_object( $post ) ) { 
     943            $type = $post->post_type; 
     944            $status = $post->post_status; 
     945            $post_id = $post->ID; 
     946        }  
     947        $jd_twitter = esc_attr( stripcslashes( get_post_meta($post_id, '_jd_twitter', true ) ) ); 
     948        $jd_twitter = apply_filters( 'wpt_user_text', $jd_twitter, $status ); 
     949        $jd_template = ( $status == 'publish' )?$wpt_settings[$type]['post-edited-text']:$wpt_settings[$type]['post-published-text']; 
     950        $jd_tweet_this = get_post_meta( $post_id, '_jd_tweet_this', true ); 
     951        if ( $jd_tweet_this == '' ) {  
     952            $jd_tweet_this = (get_option( 'jd_tweet_default' ) == '1' )?'no':'yes';  
     953        } 
     954        if ( isset( $_GET['action'] ) && $_GET['action'] == 'edit' && get_option( 'jd_tweet_default_edit' ) == '1' ) { $jd_tweet_this = 'no'; } 
     955        $previous_tweets = get_post_meta ( $post_id, '_jd_wp_twitter', true ); 
     956        $failed_tweets = get_post_meta( $post_id, '_wpt_failed' ); 
     957        ?> 
     958    <?php if ( current_user_can('update_core') && function_exists( 'wpt_pro_exists' ) ) { wpt_pro_compatibility(); } ?> 
     959    <?php if ( current_user_can('update_core') && !function_exists( 'wpt_pro_exists' ) ) { ?> <strong><a target="__blank" href="<?php echo $jd_donate_url; ?>"><?php _e('WP to Twitter can do more for you! Take a look at WP Tweets Pro!', 'wp-to-twitter', 'wp-to-twitter') ?></a></strong> <?php } ?> 
     960    <?php if ( current_user_can( 'wpt_twitter_custom' ) || current_user_can('update_core') ) { ?> 
     961    <p class='jtw'> 
     962    <label for="jtw"><?php _e("Custom Twitter Post", 'wp-to-twitter', 'wp-to-twitter') ?></label><br /><textarea class="attachmentlinks" name="_jd_twitter" id="jtw" rows="2" cols="60"><?php echo esc_attr( $jd_twitter ); ?></textarea> 
     963    </p> 
     964    <?php 
     965        $jd_expanded = $jd_template; 
     966            if ( get_option( 'jd_twit_prepend' ) != "" ) { 
     967                $jd_expanded = "<span title='".__('Your prepended Tweet text; not part of your template.','wp-to-twitter')."'>".stripslashes( get_option( 'jd_twit_prepend' )) . "</span> " . $jd_expanded; 
     968            } 
     969            if ( get_option( 'jd_twit_append' ) != "" ) { 
     970                $jd_expanded = $jd_expanded . " <span title='".__('Your appended Tweet text; not part of your template.','wp-to-twitter')."'>" . stripslashes(get_option( 'jd_twit_append' ))."</span>"; 
     971            } 
     972            /* $turl = ( $status = "publish" )?wpt_short_url( $post_id ):'http://t.co/example1'; 
     973            $search = array( '#url#','#title#','#reference#','#post#','#category#','#date#','#modified#','#author#','#account#','#tags#','#blog#' ); 
     974            $replace = array(  
     975                '<span class="tw_url">'.$turl.'</span>', 
     976                '<span class="tw_title">#title#</span>', 
     977                '<span class="tw_post">#post#</span>', 
     978                '<span class="tw_reference">#reference#</span>', 
     979                '<span class="tw_category">#category#</span>', 
     980                '<span class="tw_date">#date#</span>', 
     981                '<span class="tw_modified">#modified#</span>', 
     982                '<span class="tw_author">#author#</span>', 
     983                '<span class="tw_tags">#tags#</span>', 
     984                get_bloginfo('blogname') ); 
     985            $jd_expanded = str_replace( $search, $replace, $jd_expanded ); */ ?> 
     986    <p class='template'><?php _e('Your template:','wp-to-twitter'); ?> <code><?php echo stripcslashes( $jd_expanded ); ?></code></p> 
     987 
     988    <?php  
     989        if ( get_option('jd_keyword_format') == 2 ) { 
     990            $custom_keyword = get_post_meta( $post_id, '_yourls_keyword', true ); 
     991            echo "<label for='yourls_keyword'>".__('YOURLS Custom Keyword','wp-to-twitter')."</label> <input type='text' name='_yourls_keyword' id='yourls_keyword' value='$custom_keyword' />"; 
     992        } 
     993    ?> 
     994    <?php } else { ?> 
     995    <input type="hidden" name='_jd_twitter' value='' /> 
     996    <?php } ?> 
     997    <?php if ( current_user_can( 'wpt_twitter_switch' ) || current_user_can('update_core') ) { ?> 
     998    <?php 
     999        // "no" means 'Don't Tweet' (is checked) 
     1000        $nochecked = ( $jd_tweet_this == 'no' )?' checked="checked"':''; 
     1001        $yeschecked = ( $jd_tweet_this == 'yes' )?' checked="checked"':''; 
     1002    ?> 
     1003    <p><input type="radio" name="_jd_tweet_this" value="no" id="jtn"<?php echo $nochecked; ?> /> <label for="jtn"><?php _e("Don't Tweet this post.", 'wp-to-twitter'); ?></label> <input type="radio" name="_jd_tweet_this" value="yes" id="jty"<?php echo $yeschecked; ?> /> <label for="jty"><?php _e("Tweet this post.", 'wp-to-twitter'); ?></label></p> 
     1004    <?php } else { ?> 
     1005        <input type='hidden' name='_jd_tweet_this' value='<?php echo $jd_tweet_this; ?>' /> 
     1006    <?php } ?> 
     1007    <?php /* WPT PRO */ ?> 
     1008    <?php  
     1009    if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true  && ( current_user_can( 'wpt_twitter_custom' ) || current_user_can( 'update_core' ) ) ) {  
     1010        wpt_schedule_values( $post_id );  
     1011    } ?> 
     1012    <?php /* WPT PRO */ ?> 
     1013    <?php if ( !current_user_can( 'wpt_twitter_custom' ) && !current_user_can( 'update_core' ) ) { ?> 
     1014    <div> 
     1015    <p><?php _e('Access to customizing WP to Twitter values is not allowed for your user role.','wp-to-twitter'); ?></p> 
     1016    <?php  
     1017    if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) {  
     1018        wpt_schedule_values( $post_id, 'hidden' );  
     1019    } ?> 
     1020    </div> 
     1021    <?php } ?> 
     1022    <?php if ( current_user_can( 'wpt_twitter_custom' ) || current_user_can( 'update_core' ) ) { ?> 
     1023    <p> 
     1024    <?php _e("Tweets are no more than 140 characters; Twitter counts URLs as 20 or 21 characters. Template tags: <code>#url#</code>, <code>#title#</code>, <code>#post#</code>, <code>#category#</code>, <code>#date#</code>, <code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, <code>#tags#</code>, or <code>#blog#</code>.", 'wp-to-twitter') ?>  
     1025    </p> 
     1026    <?php } ?> 
     1027    <?php if ( !is_array( $previous_tweets ) && $previous_tweets != '' ) { $previous_tweets = array( 0=>$previous_tweets ); } ?> 
     1028    <?php if ( ! empty( $previous_tweets ) || ! empty( $failed_tweets ) ) { ?> 
     1029    <hr> 
     1030    <p class='error'><strong><?php _e('Previous Tweets','wp-to-twitter'); ?>:</strong></p> 
     1031    <ul> 
     1032    <?php 
     1033    $hidden_fields = ''; 
     1034        if ( is_array( $previous_tweets ) ) { 
     1035            foreach ( $previous_tweets as $previous_tweet ) { 
     1036                if ( $previous_tweet != '' ) { 
     1037                    $hidden_fields .= "<input type='hidden' name='_jd_wp_twitter[]' value='".esc_attr($previous_tweet)."' />"; 
     1038                    echo "<li>$previous_tweet <a href='http://twitter.com/intent/tweet?text=".urlencode($previous_tweet)."'>Retweet this</a></li>"; 
     1039                } 
     1040            } 
     1041        } 
     1042    ?> 
     1043    </ul> 
     1044    <p class='error'><strong><?php _e('Failed Tweets','wp-to-twitter'); ?>:</strong></p> 
     1045    <ul> 
     1046    <?php 
     1047        $list = false; 
     1048        if ( is_array( $failed_tweets ) ) { 
     1049            foreach ( $failed_tweets as $failed_tweet ) { 
     1050                if ( !empty($failed_tweet) ) { 
     1051                    $ft = $failed_tweet['sentence']; 
     1052                    $reason = $failed_tweet['code']; 
     1053                    $error = $failed_tweet['error']; 
     1054                    $list = true; 
     1055                    echo "<li> <code>Error: $reason</code> $ft <a href='http://twitter.com/intent/tweet?text=".urlencode($ft)."'>Tweet this</a><br /><em>$error</em></li>"; 
     1056                } 
     1057            } 
     1058        } 
     1059        if ( !$list ) { echo "<li>".__('No failed tweets on this post.','wp-to-twitter')."</li>"; } 
     1060    ?> 
     1061    </ul> 
     1062    <?php echo "<div>".$hidden_fields."</div>"; } ?>     
     1063    <p> 
     1064    <?php if ( !function_exists( 'wpt_pro_exists' ) ) { ?> 
     1065    <a target="_blank" href="<?php echo admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php'); ?>#get-support"><?php _e('Get Support', 'wp-to-twitter', 'wp-to-twitter') ?></a> &bull; <strong><a target="__blank" href="<?php echo $jd_donate_url; ?>"><?php _e('Upgrade to WP Tweets Pro', 'wp-to-twitter', 'wp-to-twitter') ?></a></strong> &raquo; 
     1066    <?php } else { ?> 
     1067    <a target="_blank" href="<?php echo admin_url('admin.php?page=wp-tweets-pro'); ?>#get-support"><?php _e('Get Support', 'wp-to-twitter', 'wp-to-twitter') ?></a> &raquo; 
     1068    <?php } ?> 
     1069    </p> 
     1070    <?php  
     1071    } else { // permissions: this user isn't allowed to Tweet; 
     1072        _e('Your role does not have the ability to Post Tweets from this site.','wp-to-twitter'); ?> <input type='hidden' name='_jd_tweet_this' value='no' /> <?php 
     1073    } 
     1074}  
    12701075 
    12711076function wpt_admin_scripts( $hook ) { 
     
    13731178            <th scope="row"><label for="wpt-remove"><?php _e("Hide account name in Tweets", 'wp-to-twitter'); ?></label></th> 
    13741179            <td><input type="checkbox" name="wpt-remove" id="wpt-remove" value="on"<?php if ( $wpt_remove == 'on' ) { echo ' checked="checked"'; } ?> /> <?php _e('Do not display my account in the #account# template tag.', 'wp-to-twitter'); ?></td> 
    1375         </tr>        
     1180        </tr> 
     1181        <?php if ( !function_exists('wpt_pro_exists') ) { add_filter( 'wpt_twitter_user_fields',create_function('','return;') ); } ?> 
     1182        <?php echo apply_filters('wpt_twitter_user_fields',$user_edit ); ?> 
    13761183        </table> 
    1377         <?php if ( function_exists('wpt_schedule_tweet') ) { ?> 
    1378         <?php if ( function_exists('wtt_connect_oauth') ) { wtt_connect_oauth( $user_edit ); } ?> 
    1379         <?php } 
     1184        <?php  
     1185        if ( function_exists('wpt_schedule_tweet') ) { 
     1186            if ( function_exists('wtt_connect_oauth') ) { wtt_connect_oauth( $user_edit ); } 
     1187        } 
    13801188    } 
    13811189} 
     
    14671275    if ( $file == plugin_basename(dirname(__FILE__).'/wp-to-twitter.php') ) { 
    14681276        $admin_url = ( is_plugin_active('wp-tweets-pro/wpt-pro-functions.php') )?admin_url('admin.php?page=wp-tweets-pro'):admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php'); 
     1277        global $jd_donate_url; 
    14691278        $links[] = "<a href='$admin_url'>" . __('Settings', 'wp-to-twitter', 'wp-to-twitter') . "</a>"; 
     1279        if ( ! function_exists( 'wpt_pro_exists' ) ) { $links[] = "<a href='$jd_donate_url'>" . __('Upgrade', 'wp-to-twitter', 'wp-to-twitter') . "</a>"; }  
    14701280    } 
    14711281    return $links; 
     
    14801290} 
    14811291 
     1292$admin_url = ( is_plugin_active('wp-tweets-pro/wpt-pro-functions.php') )?admin_url('admin.php?page=wp-tweets-pro'):admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php'); 
     1293 
    14821294if ( get_option( 'disable_url_failure' ) != '1' ) { 
    14831295    if ( get_option( 'wp_url_failure' ) == '1' && !( isset($_POST['submit-type']) && $_POST['submit-type'] == 'clear-error' ) ) { 
    1484         add_action('admin_notices', create_function( '', "if ( ! current_user_can( 'manage_options' ) ) { return; } echo '<div class=\"error\"><p>';_e('There\'s been an error shortening your URL! <a href=\"".site_url()."/wp-admin/options-general.php?page=wp-to-twitter/wp-to-twitter.php\">Visit your WP to Twitter settings page</a> to get more information and to clear this error message.','wp-to-twitter'); echo '</p></div>';" ) ); 
     1296        add_action('admin_notices', create_function( '', "if ( ! current_user_can( 'manage_options' ) ) { return; } echo '<div class=\"error\"><p>';_e('There\'s been an error shortening your URL! <a href=\"".$admin_url."\">Visit your WP to Twitter settings page</a> to get more information and to clear this error message.','wp-to-twitter'); echo '</p></div>';" ) ); 
    14851297    } 
    14861298} 
    14871299if ( get_option( 'disable_twitter_failure' ) != '1' ) { 
    14881300    if ( get_option( 'wp_twitter_failure' ) == '1' && !( isset($_POST['submit-type']) && $_POST['submit-type'] == 'clear-error' ) ) { 
    1489         add_action('admin_notices', create_function( '', "if ( ! current_user_can( 'manage_options' ) ) { return; } echo '<div class=\"error\"><p>';_e('There\'s been an error posting your Twitter status! <a href=\"".site_url()."/wp-admin/options-general.php?page=wp-to-twitter/wp-to-twitter.php\">Visit your WP to Twitter settings page</a> to get more information and to clear this error message.','wp-to-twitter'); echo '</p></div>';" ) ); 
     1301        add_action('admin_notices', create_function( '', "if ( ! current_user_can( 'manage_options' ) ) { return; } echo '<div class=\"error\"><p>';_e('There\'s been an error posting your Twitter status! <a href=\"".$admin_url."\">Visit your WP to Twitter settings page</a> to get more information and to clear this error message.','wp-to-twitter'); echo '</p></div>';" ) ); 
    14901302    } 
    14911303} 
     
    15151327    $post_types = array_keys($post_type_settings); 
    15161328    foreach ($post_types as $value ) { 
    1517         add_action( 'publish_future_'.$value, 'wpt_twit_future', 16 ); 
     1329        // in theory, publish_future_ only runs on scheduled, publish_ runs on all.  
     1330        if ( version_compare( $wp_version,"3.3.3","<" ) ) { // I've only tested through 3.3.3, but those versions work without this action. 
     1331            add_action( 'publish_future_'.$value, 'wpt_twit_future', 16 );  
     1332        } 
    15181333        add_action( 'publish_'.$value, 'post_jd_twitter', 10 ); 
    15191334        add_action( 'publish_'.$value, 'wpt_twit_instant', 16 );     
     
    15221337 
    15231338function wpt_twit_future( $id ) { 
     1339    set_transient( '_wpt_twit_future', $id, 10 ); 
     1340    // instant action has already run for this post. // prevent running actions twice (need both functions for older WP) 
     1341    if ( get_transient ( '_wpt_twit_instant' ) && get_transient( '_wpt_twit_instant' ) == $id ) { 
     1342        delete_transient( '_wpt_twit_instant' ); 
     1343        return; 
     1344    }    
    15241345    jd_twit( $id, 'future' ); 
    15251346} 
    15261347function wpt_twit_instant( $id ) { 
     1348    set_transient( '_wpt_twit_instant', $id, 10 ); 
     1349    // future action has already run for this post. 
     1350    if ( get_transient ( '_wpt_twit_future' ) && get_transient( '_wpt_twit_future' ) == $id ) { 
     1351        delete_transient( '_wpt_twit_future' ); 
     1352        return; 
     1353    } 
    15271354    jd_twit( $id, 'instant' ); 
    15281355} 
    1529  
    1530 if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) { 
    1531     //wp_mail( WPT_DEBUG_ADDRESS,'initialize jd_twit',print_r( $post_types, 1 ) ); // DEBUG 
    1532 } 
     1356function wpt_twit_xmlrpc( $id ) { 
     1357    jd_twit( $id, 'xmlrpc' ); 
     1358} 
     1359 
    15331360add_action( 'save_post', 'post_jd_twitter', 10 ); // Now things will happen twice. Hmmm...guess that's OK.  
    15341361 
    1535 if ( get_option( 'jd_twit_remote' ) == '1' ) { 
    1536     add_action( 'xmlrpc_publish_post', 'jd_twit_xmlrpc' );  
    1537     add_action( 'app_publish_post', 'jd_twit_xmlrpc' );  
    1538     add_action( 'publish_phone', 'jd_twit_xmlrpc' ); // to add later 
     1362if ( get_option( 'jd_twit_remote' ) == '1' || ( function_exists( 'wpt_pro_exists') && wpt_pro_exists() == true && get_option( 'wpt_delay_tweets' ) > 0 ) ) { 
     1363    add_action( 'xmlrpc_publish_post', 'wpt_twit_xmlrpc' );  
     1364    add_action( 'publish_phone', 'wpt_twit_xmlrpc' ); // to add later    
    15391365} 
    15401366if ( get_option('comment-published-update') == 1 ) { 
Note: See TracChangeset for help on using the changeset viewer.