Version Description
- Don't display promotional notice if donation option checked.
- WP Tweets PRO: fix for broken prepend text.
- WP Tweets PRO: Improved truncating if image uploads enabled.
- Updated translation: Italian
Download this release
Release Info
Developer | joedolson |
Plugin | WP to Twitter |
Version | 2.7.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.9 to 2.7.3
- WP_OAuth.php +879 -0
- js/jquery.charcount.js +1 -1
- lang/wp-to-twitter-es_ES.mo +0 -0
- lang/wp-to-twitter-es_ES.po +1078 -374
- lang/wp-to-twitter-it_IT.mo +0 -0
- lang/wp-to-twitter-it_IT.po +429 -341
- lang/wp-to-twitter.pot +234 -154
- post-styles.css +34 -0
- readme.txt +36 -6
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- spritev2.png +0 -0
- styles.css +24 -0
- tmhOAuth/tmhOAuth.php +0 -2
- twitter-bird-light-bgs.png +0 -0
- twitter-feed.css +15 -0
- uninstall.php +89 -0
- wp-to-twitter-manager.php +831 -0
- wp-to-twitter-oauth.php +321 -0
- wp-to-twitter-shorteners.php +563 -0
- wp-to-twitter.jpg +0 -0
- wp-to-twitter.php +1565 -0
- wpt-feed.php +159 -0
- wpt-functions.php +334 -0
- wpt-widget.php +276 -0
- wpt_twitter_oauth.php +255 -0
WP_OAuth.php
ADDED
@@ -0,0 +1,879 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// vim: foldmethod=marker
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
+
|
5 |
+
if (!class_exists('WPOAuthException')) {
|
6 |
+
|
7 |
+
/* Generic exception class
|
8 |
+
*/
|
9 |
+
class WPOAuthException extends Exception {
|
10 |
+
// pass
|
11 |
+
}
|
12 |
+
|
13 |
+
class WPOAuthConsumer {
|
14 |
+
public $key;
|
15 |
+
public $secret;
|
16 |
+
|
17 |
+
function __construct($key, $secret, $callback_url=NULL) {
|
18 |
+
$this->key = $key;
|
19 |
+
$this->secret = $secret;
|
20 |
+
$this->callback_url = $callback_url;
|
21 |
+
}
|
22 |
+
|
23 |
+
function __toString() {
|
24 |
+
return "OAuthConsumer[key=$this->key,secret=$this->secret]";
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
class WPOAuthToken {
|
29 |
+
// access tokens and request tokens
|
30 |
+
public $key;
|
31 |
+
public $secret;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* key = the token
|
35 |
+
* secret = the token secret
|
36 |
+
*/
|
37 |
+
function __construct($key, $secret) {
|
38 |
+
$this->key = $key;
|
39 |
+
$this->secret = $secret;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* generates the basic string serialization of a token that a server
|
44 |
+
* would respond to request_token and access_token calls with
|
45 |
+
*/
|
46 |
+
function to_string() {
|
47 |
+
return "oauth_token=" .
|
48 |
+
WPOAuthUtil::urlencode_rfc3986($this->key) .
|
49 |
+
"&oauth_token_secret=" .
|
50 |
+
WPOAuthUtil::urlencode_rfc3986($this->secret);
|
51 |
+
}
|
52 |
+
|
53 |
+
function __toString() {
|
54 |
+
return $this->to_string();
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* A class for implementing a Signature Method
|
60 |
+
* See section 9 ("Signing Requests") in the spec
|
61 |
+
*/
|
62 |
+
abstract class WPOAuthSignatureMethod {
|
63 |
+
/**
|
64 |
+
* Needs to return the name of the Signature Method (ie HMAC-SHA1)
|
65 |
+
* @return string
|
66 |
+
*/
|
67 |
+
abstract public function get_name();
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Build up the signature
|
71 |
+
* NOTE: The output of this function MUST NOT be urlencoded.
|
72 |
+
* the encoding is handled in OAuthRequest when the final
|
73 |
+
* request is serialized
|
74 |
+
* @param OAuthRequest $request
|
75 |
+
* @param OAuthConsumer $consumer
|
76 |
+
* @param OAuthToken $token
|
77 |
+
* @return string
|
78 |
+
*/
|
79 |
+
abstract public function build_signature($request, $consumer, $token);
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Verifies that a given signature is correct
|
83 |
+
* @param OAuthRequest $request
|
84 |
+
* @param OAuthConsumer $consumer
|
85 |
+
* @param OAuthToken $token
|
86 |
+
* @param string $signature
|
87 |
+
* @return bool
|
88 |
+
*/
|
89 |
+
public function check_signature($request, $consumer, $token, $signature) {
|
90 |
+
$built = $this->build_signature($request, $consumer, $token);
|
91 |
+
return $built == $signature;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
|
97 |
+
* where the Signature Base String is the text and the key is the concatenated values (each first
|
98 |
+
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
|
99 |
+
* character (ASCII code 38) even if empty.
|
100 |
+
* - Chapter 9.2 ("HMAC-SHA1")
|
101 |
+
*/
|
102 |
+
class WPOAuthSignatureMethod_HMAC_SHA1 extends WPOAuthSignatureMethod {
|
103 |
+
function get_name() {
|
104 |
+
return "HMAC-SHA1";
|
105 |
+
}
|
106 |
+
|
107 |
+
public function build_signature($request, $consumer, $token) {
|
108 |
+
$base_string = $request->get_signature_base_string();
|
109 |
+
$request->base_string = $base_string;
|
110 |
+
|
111 |
+
$key_parts = array(
|
112 |
+
$consumer->secret,
|
113 |
+
($token) ? $token->secret : ""
|
114 |
+
);
|
115 |
+
|
116 |
+
$key_parts = WPOAuthUtil::urlencode_rfc3986($key_parts);
|
117 |
+
$key = implode('&', $key_parts);
|
118 |
+
|
119 |
+
return base64_encode(hash_hmac('sha1', $base_string, $key, true));
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* The PLAINTEXT method does not provide any security protection and SHOULD only be used
|
125 |
+
* over a secure channel such as HTTPS. It does not use the Signature Base String.
|
126 |
+
* - Chapter 9.4 ("PLAINTEXT")
|
127 |
+
*/
|
128 |
+
class WPOAuthSignatureMethod_PLAINTEXT extends WPOAuthSignatureMethod {
|
129 |
+
public function get_name() {
|
130 |
+
return "PLAINTEXT";
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* oauth_signature is set to the concatenated encoded values of the Consumer Secret and
|
135 |
+
* Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
|
136 |
+
* empty. The result MUST be encoded again.
|
137 |
+
* - Chapter 9.4.1 ("Generating Signatures")
|
138 |
+
*
|
139 |
+
* Please note that the second encoding MUST NOT happen in the SignatureMethod, as
|
140 |
+
* OAuthRequest handles this!
|
141 |
+
*/
|
142 |
+
public function build_signature($request, $consumer, $token) {
|
143 |
+
$key_parts = array(
|
144 |
+
$consumer->secret,
|
145 |
+
($token) ? $token->secret : ""
|
146 |
+
);
|
147 |
+
|
148 |
+
$key_parts = WPOAuthUtil::urlencode_rfc3986($key_parts);
|
149 |
+
$key = implode('&', $key_parts);
|
150 |
+
$request->base_string = $key;
|
151 |
+
|
152 |
+
return $key;
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
|
158 |
+
* [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
|
159 |
+
* EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
|
160 |
+
* verified way to the Service Provider, in a manner which is beyond the scope of this
|
161 |
+
* specification.
|
162 |
+
* - Chapter 9.3 ("RSA-SHA1")
|
163 |
+
*/
|
164 |
+
abstract class WPOAuthSignatureMethod_RSA_SHA1 extends WPOAuthSignatureMethod {
|
165 |
+
public function get_name() {
|
166 |
+
return "RSA-SHA1";
|
167 |
+
}
|
168 |
+
|
169 |
+
// Up to the SP to implement this lookup of keys. Possible ideas are:
|
170 |
+
// (1) do a lookup in a table of trusted certs keyed off of consumer
|
171 |
+
// (2) fetch via http using a url provided by the requester
|
172 |
+
// (3) some sort of specific discovery code based on request
|
173 |
+
//
|
174 |
+
// Either way should return a string representation of the certificate
|
175 |
+
protected abstract function fetch_public_cert(&$request);
|
176 |
+
|
177 |
+
// Up to the SP to implement this lookup of keys. Possible ideas are:
|
178 |
+
// (1) do a lookup in a table of trusted certs keyed off of consumer
|
179 |
+
//
|
180 |
+
// Either way should return a string representation of the certificate
|
181 |
+
protected abstract function fetch_private_cert(&$request);
|
182 |
+
|
183 |
+
public function build_signature($request, $consumer, $token) {
|
184 |
+
$base_string = $request->get_signature_base_string();
|
185 |
+
$request->base_string = $base_string;
|
186 |
+
|
187 |
+
// Fetch the private key cert based on the request
|
188 |
+
$cert = $this->fetch_private_cert($request);
|
189 |
+
|
190 |
+
// Pull the private key ID from the certificate
|
191 |
+
$privatekeyid = openssl_get_privatekey($cert);
|
192 |
+
|
193 |
+
// Sign using the key
|
194 |
+
$ok = openssl_sign($base_string, $signature, $privatekeyid);
|
195 |
+
|
196 |
+
// Release the key resource
|
197 |
+
openssl_free_key($privatekeyid);
|
198 |
+
|
199 |
+
return base64_encode($signature);
|
200 |
+
}
|
201 |
+
|
202 |
+
public function check_signature($request, $consumer, $token, $signature) {
|
203 |
+
$decoded_sig = base64_decode($signature);
|
204 |
+
|
205 |
+
$base_string = $request->get_signature_base_string();
|
206 |
+
|
207 |
+
// Fetch the public key cert based on the request
|
208 |
+
$cert = $this->fetch_public_cert($request);
|
209 |
+
|
210 |
+
// Pull the public key ID from the certificate
|
211 |
+
$publickeyid = openssl_get_publickey($cert);
|
212 |
+
|
213 |
+
// Check the computed signature against the one passed in the query
|
214 |
+
$ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
|
215 |
+
|
216 |
+
// Release the key resource
|
217 |
+
openssl_free_key($publickeyid);
|
218 |
+
|
219 |
+
return $ok == 1;
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
class WPOAuthRequest {
|
224 |
+
private $parameters;
|
225 |
+
private $http_method;
|
226 |
+
private $http_url;
|
227 |
+
// for debug purposes
|
228 |
+
public $base_string;
|
229 |
+
public static $version = '1.0';
|
230 |
+
public static $POST_INPUT = 'php://input';
|
231 |
+
|
232 |
+
function __construct($http_method, $http_url, $parameters=NULL) {
|
233 |
+
@$parameters or $parameters = array();
|
234 |
+
$parameters = array_merge( WPOAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
|
235 |
+
$this->parameters = $parameters;
|
236 |
+
$this->http_method = $http_method;
|
237 |
+
$this->http_url = $http_url;
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
/**
|
242 |
+
* attempt to build up a request from what was passed to the server
|
243 |
+
*/
|
244 |
+
public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
|
245 |
+
$scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
|
246 |
+
? 'http'
|
247 |
+
: 'https';
|
248 |
+
@$http_url or $http_url = $scheme .
|
249 |
+
'://' . $_SERVER['HTTP_HOST'] .
|
250 |
+
':' .
|
251 |
+
$_SERVER['SERVER_PORT'] .
|
252 |
+
$_SERVER['REQUEST_URI'];
|
253 |
+
@$http_method or $http_method = $_SERVER['REQUEST_METHOD'];
|
254 |
+
|
255 |
+
// We weren't handed any parameters, so let's find the ones relevant to
|
256 |
+
// this request.
|
257 |
+
// If you run XML-RPC or similar you should use this to provide your own
|
258 |
+
// parsed parameter-list
|
259 |
+
if (!$parameters) {
|
260 |
+
// Find request headers
|
261 |
+
$request_headers = WPOAuthUtil::get_headers();
|
262 |
+
|
263 |
+
// Parse the query-string to find GET parameters
|
264 |
+
$parameters = WPOAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
|
265 |
+
|
266 |
+
// It's a POST request of the proper content-type, so parse POST
|
267 |
+
// parameters and add those overriding any duplicates from GET
|
268 |
+
if ($http_method == "POST"
|
269 |
+
&& @strstr($request_headers["Content-Type"],
|
270 |
+
"application/x-www-form-urlencoded")
|
271 |
+
) {
|
272 |
+
$post_data = WPOAuthUtil::parse_parameters(
|
273 |
+
file_get_contents(self::$POST_INPUT)
|
274 |
+
);
|
275 |
+
$parameters = array_merge($parameters, $post_data);
|
276 |
+
}
|
277 |
+
|
278 |
+
// We have a Authorization-header with OAuth data. Parse the header
|
279 |
+
// and add those overriding any duplicates from GET or POST
|
280 |
+
if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") {
|
281 |
+
$header_parameters = WPOAuthUtil::split_header(
|
282 |
+
$request_headers['Authorization']
|
283 |
+
);
|
284 |
+
$parameters = array_merge($parameters, $header_parameters);
|
285 |
+
}
|
286 |
+
|
287 |
+
}
|
288 |
+
|
289 |
+
return new WPOAuthRequest($http_method, $http_url, $parameters);
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* pretty much a helper function to set up the request
|
294 |
+
*/
|
295 |
+
public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
|
296 |
+
@$parameters or $parameters = array();
|
297 |
+
$defaults = array("oauth_version" => WPOAuthRequest::$version,
|
298 |
+
"oauth_nonce" => WPOAuthRequest::generate_nonce(),
|
299 |
+
"oauth_timestamp" => WPOAuthRequest::generate_timestamp(),
|
300 |
+
"oauth_consumer_key" => $consumer->key);
|
301 |
+
if ($token)
|
302 |
+
$defaults['oauth_token'] = $token->key;
|
303 |
+
|
304 |
+
$parameters = array_merge($defaults, $parameters);
|
305 |
+
|
306 |
+
return new WPOAuthRequest($http_method, $http_url, $parameters);
|
307 |
+
}
|
308 |
+
|
309 |
+
public function set_parameter($name, $value, $allow_duplicates = true) {
|
310 |
+
if ($allow_duplicates && isset($this->parameters[$name])) {
|
311 |
+
// We have already added parameter(s) with this name, so add to the list
|
312 |
+
if (is_scalar($this->parameters[$name])) {
|
313 |
+
// This is the first duplicate, so transform scalar (string)
|
314 |
+
// into an array so we can add the duplicates
|
315 |
+
$this->parameters[$name] = array($this->parameters[$name]);
|
316 |
+
}
|
317 |
+
|
318 |
+
$this->parameters[$name][] = $value;
|
319 |
+
} else {
|
320 |
+
$this->parameters[$name] = $value;
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
public function get_parameter($name) {
|
325 |
+
return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
|
326 |
+
}
|
327 |
+
|
328 |
+
public function get_parameters() {
|
329 |
+
return $this->parameters;
|
330 |
+
}
|
331 |
+
|
332 |
+
public function unset_parameter($name) {
|
333 |
+
unset($this->parameters[$name]);
|
334 |
+
}
|
335 |
+
|
336 |
+
/**
|
337 |
+
* The request parameters, sorted and concatenated into a normalized string.
|
338 |
+
* @return string
|
339 |
+
*/
|
340 |
+
public function get_signable_parameters() {
|
341 |
+
// Grab all parameters
|
342 |
+
$params = $this->parameters;
|
343 |
+
|
344 |
+
// Remove oauth_signature if present
|
345 |
+
// Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
|
346 |
+
if (isset($params['oauth_signature'])) {
|
347 |
+
unset($params['oauth_signature']);
|
348 |
+
}
|
349 |
+
|
350 |
+
return WPOAuthUtil::build_http_query($params);
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Returns the base string of this request
|
355 |
+
*
|
356 |
+
* The base string defined as the method, the url
|
357 |
+
* and the parameters (normalized), each urlencoded
|
358 |
+
* and the concated with &.
|
359 |
+
*/
|
360 |
+
public function get_signature_base_string() {
|
361 |
+
$parts = array(
|
362 |
+
$this->get_normalized_http_method(),
|
363 |
+
$this->get_normalized_http_url(),
|
364 |
+
$this->get_signable_parameters()
|
365 |
+
);
|
366 |
+
|
367 |
+
$parts = WPOAuthUtil::urlencode_rfc3986($parts);
|
368 |
+
|
369 |
+
return implode('&', $parts);
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* just uppercases the http method
|
374 |
+
*/
|
375 |
+
public function get_normalized_http_method() {
|
376 |
+
return strtoupper($this->http_method);
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* parses the url and rebuilds it to be
|
381 |
+
* scheme://host/path
|
382 |
+
*/
|
383 |
+
public function get_normalized_http_url() {
|
384 |
+
$parts = parse_url($this->http_url);
|
385 |
+
|
386 |
+
$port = @$parts['port'];
|
387 |
+
$scheme = @$parts['scheme'];
|
388 |
+
$host = @$parts['host'];
|
389 |
+
$path = @$parts['path'];
|
390 |
+
|
391 |
+
$port or $port = ($scheme == 'https') ? '443' : '80';
|
392 |
+
|
393 |
+
if (($scheme == 'https' && $port != '443')
|
394 |
+
|| ($scheme == 'http' && $port != '80')) {
|
395 |
+
$host = "$host:$port";
|
396 |
+
}
|
397 |
+
return "$scheme://$host$path";
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* builds a url usable for a GET request
|
402 |
+
*/
|
403 |
+
public function to_url() {
|
404 |
+
$post_data = $this->to_postdata();
|
405 |
+
$out = $this->get_normalized_http_url();
|
406 |
+
if ($post_data) {
|
407 |
+
$out .= '?'.$post_data;
|
408 |
+
}
|
409 |
+
return $out;
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* builds the data one would send in a POST request
|
414 |
+
*/
|
415 |
+
public function to_postdata() {
|
416 |
+
return WPOAuthUtil::build_http_query($this->parameters);
|
417 |
+
}
|
418 |
+
|
419 |
+
/**
|
420 |
+
* builds the Authorization: header
|
421 |
+
*/
|
422 |
+
public function to_header($realm=null) {
|
423 |
+
$first = true;
|
424 |
+
if($realm) {
|
425 |
+
$out = 'Authorization: OAuth realm="' . WPOAuthUtil::urlencode_rfc3986($realm) . '"';
|
426 |
+
$first = false;
|
427 |
+
} else
|
428 |
+
$out = 'Authorization: OAuth';
|
429 |
+
|
430 |
+
$total = array();
|
431 |
+
foreach ($this->parameters as $k => $v) {
|
432 |
+
if (substr($k, 0, 5) != "oauth") continue;
|
433 |
+
if (is_array($v)) {
|
434 |
+
throw new WPOAuthException('Arrays not supported in headers');
|
435 |
+
}
|
436 |
+
$out .= ($first) ? ' ' : ',';
|
437 |
+
$out .= WPOAuthUtil::urlencode_rfc3986($k) .
|
438 |
+
'="' .
|
439 |
+
WPOAuthUtil::urlencode_rfc3986($v) .
|
440 |
+
'"';
|
441 |
+
$first = false;
|
442 |
+
}
|
443 |
+
return $out;
|
444 |
+
}
|
445 |
+
|
446 |
+
public function __toString() {
|
447 |
+
return $this->to_url();
|
448 |
+
}
|
449 |
+
|
450 |
+
|
451 |
+
public function sign_request($signature_method, $consumer, $token) {
|
452 |
+
$this->set_parameter(
|
453 |
+
"oauth_signature_method",
|
454 |
+
$signature_method->get_name(),
|
455 |
+
false
|
456 |
+
);
|
457 |
+
$signature = $this->build_signature($signature_method, $consumer, $token);
|
458 |
+
$this->set_parameter("oauth_signature", $signature, false);
|
459 |
+
}
|
460 |
+
|
461 |
+
public function build_signature($signature_method, $consumer, $token) {
|
462 |
+
$signature = $signature_method->build_signature($this, $consumer, $token);
|
463 |
+
return $signature;
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* util function: current timestamp
|
468 |
+
*/
|
469 |
+
private static function generate_timestamp() {
|
470 |
+
// make sure that timestamp is in UTC
|
471 |
+
date_default_timezone_set('UTC');
|
472 |
+
return time();
|
473 |
+
}
|
474 |
+
|
475 |
+
/**
|
476 |
+
* util function: current nonce
|
477 |
+
*/
|
478 |
+
private static function generate_nonce() {
|
479 |
+
$mt = microtime();
|
480 |
+
$rand = mt_rand();
|
481 |
+
|
482 |
+
return md5($mt . $rand); // md5s look nicer than numbers
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
class WPOAuthServer {
|
487 |
+
protected $timestamp_threshold = 300; // in seconds, five minutes
|
488 |
+
protected $version = '1.0'; // hi blaine
|
489 |
+
protected $signature_methods = array();
|
490 |
+
|
491 |
+
protected $data_store;
|
492 |
+
|
493 |
+
function __construct($data_store) {
|
494 |
+
$this->data_store = $data_store;
|
495 |
+
}
|
496 |
+
|
497 |
+
public function add_signature_method($signature_method) {
|
498 |
+
$this->signature_methods[$signature_method->get_name()] =
|
499 |
+
$signature_method;
|
500 |
+
}
|
501 |
+
|
502 |
+
// high level functions
|
503 |
+
|
504 |
+
/**
|
505 |
+
* process a request_token request
|
506 |
+
* returns the request token on success
|
507 |
+
*/
|
508 |
+
public function fetch_request_token(&$request) {
|
509 |
+
$this->get_version($request);
|
510 |
+
|
511 |
+
$consumer = $this->get_consumer($request);
|
512 |
+
|
513 |
+
// no token required for the initial token request
|
514 |
+
$token = NULL;
|
515 |
+
|
516 |
+
$this->check_signature($request, $consumer, $token);
|
517 |
+
|
518 |
+
// Rev A change
|
519 |
+
$callback = $request->get_parameter('oauth_callback');
|
520 |
+
$new_token = $this->data_store->new_request_token($consumer, $callback);
|
521 |
+
|
522 |
+
return $new_token;
|
523 |
+
}
|
524 |
+
|
525 |
+
/**
|
526 |
+
* process an access_token request
|
527 |
+
* returns the access token on success
|
528 |
+
*/
|
529 |
+
public function fetch_access_token(&$request) {
|
530 |
+
$this->get_version($request);
|
531 |
+
|
532 |
+
$consumer = $this->get_consumer($request);
|
533 |
+
|
534 |
+
// requires authorized request token
|
535 |
+
$token = $this->get_token($request, $consumer, "request");
|
536 |
+
|
537 |
+
$this->check_signature($request, $consumer, $token);
|
538 |
+
|
539 |
+
// Rev A change
|
540 |
+
$verifier = $request->get_parameter('oauth_verifier');
|
541 |
+
$new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
|
542 |
+
|
543 |
+
return $new_token;
|
544 |
+
}
|
545 |
+
|
546 |
+
/**
|
547 |
+
* verify an api call, checks all the parameters
|
548 |
+
*/
|
549 |
+
public function verify_request(&$request) {
|
550 |
+
$this->get_version($request);
|
551 |
+
$consumer = $this->get_consumer($request);
|
552 |
+
$token = $this->get_token($request, $consumer, "access");
|
553 |
+
$this->check_signature($request, $consumer, $token);
|
554 |
+
return array($consumer, $token);
|
555 |
+
}
|
556 |
+
|
557 |
+
// Internals from here
|
558 |
+
/**
|
559 |
+
* version 1
|
560 |
+
*/
|
561 |
+
private function get_version(&$request) {
|
562 |
+
$version = $request->get_parameter("oauth_version");
|
563 |
+
if (!$version) {
|
564 |
+
// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
|
565 |
+
// Chapter 7.0 ("Accessing Protected Ressources")
|
566 |
+
$version = '1.0';
|
567 |
+
}
|
568 |
+
if ($version !== $this->version) {
|
569 |
+
throw new WPOAuthException("OAuth version '$version' not supported");
|
570 |
+
}
|
571 |
+
return $version;
|
572 |
+
}
|
573 |
+
|
574 |
+
/**
|
575 |
+
* figure out the signature with some defaults
|
576 |
+
*/
|
577 |
+
private function get_signature_method(&$request) {
|
578 |
+
$signature_method =
|
579 |
+
@$request->get_parameter("oauth_signature_method");
|
580 |
+
|
581 |
+
if (!$signature_method) {
|
582 |
+
// According to chapter 7 ("Accessing Protected Ressources") the signature-method
|
583 |
+
// parameter is required, and we can't just fallback to PLAINTEXT
|
584 |
+
throw new WPOAuthException('No signature method parameter. This parameter is required');
|
585 |
+
}
|
586 |
+
|
587 |
+
if (!in_array($signature_method,
|
588 |
+
array_keys($this->signature_methods))) {
|
589 |
+
throw new WPOAuthException(
|
590 |
+
"Signature method '$signature_method' not supported " .
|
591 |
+
"try one of the following: " .
|
592 |
+
implode(", ", array_keys($this->signature_methods))
|
593 |
+
);
|
594 |
+
}
|
595 |
+
return $this->signature_methods[$signature_method];
|
596 |
+
}
|
597 |
+
|
598 |
+
/**
|
599 |
+
* try to find the consumer for the provided request's consumer key
|
600 |
+
*/
|
601 |
+
private function get_consumer(&$request) {
|
602 |
+
$consumer_key = @$request->get_parameter("oauth_consumer_key");
|
603 |
+
if (!$consumer_key) {
|
604 |
+
throw new WPOAuthException("Invalid consumer key");
|
605 |
+
}
|
606 |
+
|
607 |
+
$consumer = $this->data_store->lookup_consumer($consumer_key);
|
608 |
+
if (!$consumer) {
|
609 |
+
throw new WPOAuthException("Invalid consumer");
|
610 |
+
}
|
611 |
+
|
612 |
+
return $consumer;
|
613 |
+
}
|
614 |
+
|
615 |
+
/**
|
616 |
+
* try to find the token for the provided request's token key
|
617 |
+
*/
|
618 |
+
private function get_token(&$request, $consumer, $token_type="access") {
|
619 |
+
$token_field = @$request->get_parameter('oauth_token');
|
620 |
+
$token = $this->data_store->lookup_token(
|
621 |
+
$consumer, $token_type, $token_field
|
622 |
+
);
|
623 |
+
if (!$token) {
|
624 |
+
throw new WPOAuthException("Invalid $token_type token: $token_field");
|
625 |
+
}
|
626 |
+
return $token;
|
627 |
+
}
|
628 |
+
|
629 |
+
/**
|
630 |
+
* all-in-one function to check the signature on a request
|
631 |
+
* should guess the signature method appropriately
|
632 |
+
*/
|
633 |
+
private function check_signature(&$request, $consumer, $token) {
|
634 |
+
// this should probably be in a different method
|
635 |
+
$timestamp = @$request->get_parameter('oauth_timestamp');
|
636 |
+
$nonce = @$request->get_parameter('oauth_nonce');
|
637 |
+
|
638 |
+
$this->check_timestamp($timestamp);
|
639 |
+
$this->check_nonce($consumer, $token, $nonce, $timestamp);
|
640 |
+
|
641 |
+
$signature_method = $this->get_signature_method($request);
|
642 |
+
|
643 |
+
$signature = $request->get_parameter('oauth_signature');
|
644 |
+
$valid_sig = $signature_method->check_signature(
|
645 |
+
$request,
|
646 |
+
$consumer,
|
647 |
+
$token,
|
648 |
+
$signature
|
649 |
+
);
|
650 |
+
|
651 |
+
if (!$valid_sig) {
|
652 |
+
throw new WPOAuthException("Invalid signature");
|
653 |
+
}
|
654 |
+
}
|
655 |
+
|
656 |
+
/**
|
657 |
+
* check that the timestamp is new enough
|
658 |
+
*/
|
659 |
+
private function check_timestamp($timestamp) {
|
660 |
+
if( ! $timestamp )
|
661 |
+
throw new WPOAuthException(
|
662 |
+
'Missing timestamp parameter. The parameter is required'
|
663 |
+
);
|
664 |
+
|
665 |
+
// verify that timestamp is recentish
|
666 |
+
$now = time();
|
667 |
+
if (abs($now - $timestamp) > $this->timestamp_threshold) {
|
668 |
+
throw new WPOAuthException(
|
669 |
+
"Expired timestamp, yours $timestamp, ours $now"
|
670 |
+
);
|
671 |
+
}
|
672 |
+
}
|
673 |
+
|
674 |
+
/**
|
675 |
+
* check that the nonce is not repeated
|
676 |
+
*/
|
677 |
+
private function check_nonce($consumer, $token, $nonce, $timestamp) {
|
678 |
+
if( ! $nonce )
|
679 |
+
throw new WPOAuthException(
|
680 |
+
'Missing nonce parameter. The parameter is required'
|
681 |
+
);
|
682 |
+
|
683 |
+
// verify that the nonce is uniqueish
|
684 |
+
$found = $this->data_store->lookup_nonce(
|
685 |
+
$consumer,
|
686 |
+
$token,
|
687 |
+
$nonce,
|
688 |
+
$timestamp
|
689 |
+
);
|
690 |
+
if ($found) {
|
691 |
+
throw new WPOAuthException("Nonce already used: $nonce");
|
692 |
+
}
|
693 |
+
}
|
694 |
+
|
695 |
+
}
|
696 |
+
|
697 |
+
class WPOAuthDataStore {
|
698 |
+
function lookup_consumer($consumer_key) {
|
699 |
+
// implement me
|
700 |
+
}
|
701 |
+
|
702 |
+
function lookup_token($consumer, $token_type, $token) {
|
703 |
+
// implement me
|
704 |
+
}
|
705 |
+
|
706 |
+
function lookup_nonce($consumer, $token, $nonce, $timestamp) {
|
707 |
+
// implement me
|
708 |
+
}
|
709 |
+
|
710 |
+
function new_request_token($consumer, $callback = null) {
|
711 |
+
// return a new token attached to this consumer
|
712 |
+
}
|
713 |
+
|
714 |
+
function new_access_token($token, $consumer, $verifier = null) {
|
715 |
+
// return a new access token attached to this consumer
|
716 |
+
// for the user associated with this token if the request token
|
717 |
+
// is authorized
|
718 |
+
// should also invalidate the request token
|
719 |
+
}
|
720 |
+
|
721 |
+
}
|
722 |
+
|
723 |
+
class WPOAuthUtil {
|
724 |
+
public static function urlencode_rfc3986($input) {
|
725 |
+
if (is_array($input)) {
|
726 |
+
return array_map(array('WPOAuthUtil', 'urlencode_rfc3986'), $input);
|
727 |
+
} else if (is_scalar($input)) {
|
728 |
+
return str_replace(
|
729 |
+
'+',
|
730 |
+
' ',
|
731 |
+
str_replace('%7E', '~', rawurlencode($input))
|
732 |
+
);
|
733 |
+
} else {
|
734 |
+
return '';
|
735 |
+
}
|
736 |
+
}
|
737 |
+
|
738 |
+
|
739 |
+
// This decode function isn't taking into consideration the above
|
740 |
+
// modifications to the encoding process. However, this method doesn't
|
741 |
+
// seem to be used anywhere so leaving it as is.
|
742 |
+
public static function urldecode_rfc3986($string) {
|
743 |
+
return urldecode($string);
|
744 |
+
}
|
745 |
+
|
746 |
+
// Utility function for turning the Authorization: header into
|
747 |
+
// parameters, has to do some unescaping
|
748 |
+
// Can filter out any non-oauth parameters if needed (default behaviour)
|
749 |
+
public static function split_header($header, $only_allow_oauth_parameters = true) {
|
750 |
+
$pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/';
|
751 |
+
$offset = 0;
|
752 |
+
$params = array();
|
753 |
+
while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) {
|
754 |
+
$match = $matches[0];
|
755 |
+
$header_name = $matches[2][0];
|
756 |
+
$header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0];
|
757 |
+
if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) {
|
758 |
+
$params[$header_name] = WPOAuthUtil::urldecode_rfc3986($header_content);
|
759 |
+
}
|
760 |
+
$offset = $match[1] + strlen($match[0]);
|
761 |
+
}
|
762 |
+
|
763 |
+
if (isset($params['realm'])) {
|
764 |
+
unset($params['realm']);
|
765 |
+
}
|
766 |
+
|
767 |
+
return $params;
|
768 |
+
}
|
769 |
+
|
770 |
+
// helper to try to sort out headers for people who aren't running apache
|
771 |
+
public static function get_headers() {
|
772 |
+
if (function_exists('apache_request_headers')) {
|
773 |
+
// we need this to get the actual Authorization: header
|
774 |
+
// because apache tends to tell us it doesn't exist
|
775 |
+
$headers = apache_request_headers();
|
776 |
+
|
777 |
+
// sanitize the output of apache_request_headers because
|
778 |
+
// we always want the keys to be Cased-Like-This and arh()
|
779 |
+
// returns the headers in the same case as they are in the
|
780 |
+
// request
|
781 |
+
$out = array();
|
782 |
+
foreach( $headers AS $key => $value ) {
|
783 |
+
$key = str_replace(
|
784 |
+
" ",
|
785 |
+
"-",
|
786 |
+
ucwords(strtolower(str_replace("-", " ", $key)))
|
787 |
+
);
|
788 |
+
$out[$key] = $value;
|
789 |
+
}
|
790 |
+
} else {
|
791 |
+
// otherwise we don't have apache and are just going to have to hope
|
792 |
+
// that $_SERVER actually contains what we need
|
793 |
+
$out = array();
|
794 |
+
if( isset($_SERVER['CONTENT_TYPE']) )
|
795 |
+
$out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
|
796 |
+
if( isset($_ENV['CONTENT_TYPE']) )
|
797 |
+
$out['Content-Type'] = $_ENV['CONTENT_TYPE'];
|
798 |
+
|
799 |
+
foreach ($_SERVER as $key => $value) {
|
800 |
+
if (substr($key, 0, 5) == "HTTP_") {
|
801 |
+
// this is chaos, basically it is just there to capitalize the first
|
802 |
+
// letter of every word that is not an initial HTTP and strip HTTP
|
803 |
+
// code from przemek
|
804 |
+
$key = str_replace(
|
805 |
+
" ",
|
806 |
+
"-",
|
807 |
+
ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
|
808 |
+
);
|
809 |
+
$out[$key] = $value;
|
810 |
+
}
|
811 |
+
}
|
812 |
+
}
|
813 |
+
return $out;
|
814 |
+
}
|
815 |
+
|
816 |
+
// This function takes a input like a=b&a=c&d=e and returns the parsed
|
817 |
+
// parameters like this
|
818 |
+
// array('a' => array('b','c'), 'd' => 'e')
|
819 |
+
public static function parse_parameters( $input ) {
|
820 |
+
if (!isset($input) || !$input) return array();
|
821 |
+
|
822 |
+
$pairs = explode('&', $input);
|
823 |
+
|
824 |
+
$parsed_parameters = array();
|
825 |
+
foreach ($pairs as $pair) {
|
826 |
+
$split = explode('=', $pair, 2);
|
827 |
+
$parameter = WPOAuthUtil::urldecode_rfc3986($split[0]);
|
828 |
+
$value = isset($split[1]) ? WPOAuthUtil::urldecode_rfc3986($split[1]) : '';
|
829 |
+
|
830 |
+
if (isset($parsed_parameters[$parameter])) {
|
831 |
+
// We have already recieved parameter(s) with this name, so add to the list
|
832 |
+
// of parameters with this name
|
833 |
+
|
834 |
+
if (is_scalar($parsed_parameters[$parameter])) {
|
835 |
+
// This is the first duplicate, so transform scalar (string) into an array
|
836 |
+
// so we can add the duplicates
|
837 |
+
$parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
|
838 |
+
}
|
839 |
+
|
840 |
+
$parsed_parameters[$parameter][] = $value;
|
841 |
+
} else {
|
842 |
+
$parsed_parameters[$parameter] = $value;
|
843 |
+
}
|
844 |
+
}
|
845 |
+
return $parsed_parameters;
|
846 |
+
}
|
847 |
+
|
848 |
+
public static function build_http_query($params) {
|
849 |
+
if (!$params) return '';
|
850 |
+
|
851 |
+
// Urlencode both keys and values
|
852 |
+
$keys = WPOAuthUtil::urlencode_rfc3986(array_keys($params));
|
853 |
+
$values = WPOAuthUtil::urlencode_rfc3986(array_values($params));
|
854 |
+
$params = array_combine($keys, $values);
|
855 |
+
|
856 |
+
// Parameters are sorted by name, using lexicographical byte value ordering.
|
857 |
+
// Ref: Spec: 9.1.1 (1)
|
858 |
+
uksort($params, 'strcmp');
|
859 |
+
|
860 |
+
$pairs = array();
|
861 |
+
foreach ($params as $parameter => $value) {
|
862 |
+
if (is_array($value)) {
|
863 |
+
// If two or more parameters share the same name, they are sorted by their value
|
864 |
+
// Ref: Spec: 9.1.1 (1)
|
865 |
+
natsort($value);
|
866 |
+
foreach ($value as $duplicate_value) {
|
867 |
+
$pairs[] = $parameter . '=' . $duplicate_value;
|
868 |
+
}
|
869 |
+
} else {
|
870 |
+
$pairs[] = $parameter . '=' . $value;
|
871 |
+
}
|
872 |
+
}
|
873 |
+
// For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
|
874 |
+
// Each name-value pair is separated by an '&' character (ASCII code 38)
|
875 |
+
return implode('&', $pairs);
|
876 |
+
}
|
877 |
+
}
|
878 |
+
|
879 |
+
} // class_exists check
|
js/jquery.charcount.js
CHANGED
@@ -31,7 +31,7 @@
|
|
31 |
function calculate(obj){
|
32 |
var count = $(obj).val().length;
|
33 |
// supported shortcodes
|
34 |
-
var urlcount = $(obj).val().indexOf('#url#') > -1 ?
|
35 |
var titlecount = $(obj).val().indexOf('#title#') > -1 ? ($('#title').val().length-7) : 0;
|
36 |
var namecount = $(obj).val().indexOf('#blog#') > -1 ? ($('#wp-admin-bar-site-name').val().length-6) : 0;
|
37 |
|
31 |
function calculate(obj){
|
32 |
var count = $(obj).val().length;
|
33 |
// supported shortcodes
|
34 |
+
var urlcount = $(obj).val().indexOf('#url#') > -1 ? 18 : 0;
|
35 |
var titlecount = $(obj).val().indexOf('#title#') > -1 ? ($('#title').val().length-7) : 0;
|
36 |
var namecount = $(obj).val().indexOf('#blog#') > -1 ? ($('#wp-admin-bar-site-name').val().length-6) : 0;
|
37 |
|
lang/wp-to-twitter-es_ES.mo
CHANGED
Binary file
|
lang/wp-to-twitter-es_ES.po
CHANGED
@@ -1,519 +1,1223 @@
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"
|
4 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n"
|
5 |
-
"POT-Creation-Date: 2009-09-26 22:40+0000\n"
|
6 |
-
"PO-Revision-Date: \n"
|
7 |
-
"Last-Translator: David Gil <dgilperez@gmail.com>\n"
|
8 |
-
"Language-Team: www.sohelet.com <dgilperez@sohelet.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"
|
13 |
-
"X-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
#:
|
16 |
-
msgid "
|
17 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
#:
|
20 |
-
msgid "Twitter
|
21 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
#:
|
24 |
-
msgid "
|
25 |
-
msgstr "
|
26 |
|
27 |
-
#: wp-to-twitter
|
28 |
-
msgid "
|
29 |
-
msgstr "
|
30 |
|
31 |
-
#: wp-to-twitter
|
32 |
-
msgid "
|
33 |
-
msgstr "
|
34 |
|
35 |
-
#: wp-to-twitter
|
36 |
-
msgid "
|
37 |
-
msgstr "
|
38 |
|
39 |
-
#: wp-to-twitter
|
40 |
-
msgid "
|
41 |
-
msgstr "
|
42 |
|
43 |
-
#: wp-to-twitter
|
44 |
-
msgid "
|
45 |
-
msgstr "
|
46 |
|
47 |
-
#: wp-to-twitter
|
48 |
-
msgid "
|
49 |
-
msgstr "
|
50 |
|
51 |
-
#: wp-to-twitter
|
52 |
-
msgid "
|
53 |
-
msgstr "
|
54 |
|
55 |
-
#: wp-to-twitter
|
56 |
-
msgid "
|
57 |
-
msgstr "
|
58 |
|
59 |
-
#: wp-to-twitter
|
60 |
-
msgid "
|
61 |
-
msgstr "
|
62 |
|
63 |
-
#: wp-to-twitter
|
64 |
-
msgid "
|
65 |
-
msgstr "
|
66 |
|
67 |
-
#: wp-to-twitter
|
68 |
-
msgid "
|
69 |
-
msgstr "
|
70 |
|
71 |
-
#: wp-to-twitter
|
72 |
-
msgid "
|
73 |
-
msgstr "
|
74 |
|
75 |
-
#: wp-to-twitter
|
76 |
-
msgid "
|
77 |
-
msgstr "
|
78 |
|
79 |
-
#: wp-to-twitter
|
80 |
-
msgid "
|
81 |
-
msgstr "
|
82 |
|
83 |
-
#: wp-to-twitter
|
84 |
-
msgid "
|
85 |
-
msgstr "
|
86 |
|
87 |
-
#: wp-to-twitter
|
88 |
-
msgid "
|
89 |
-
msgstr "
|
90 |
|
91 |
-
#: wp-to-twitter
|
92 |
-
msgid "
|
93 |
-
msgstr "
|
94 |
|
95 |
-
#: wp-to-twitter
|
96 |
-
msgid "
|
97 |
-
msgstr "
|
98 |
|
99 |
-
#: wp-to-twitter
|
100 |
-
msgid "
|
101 |
-
msgstr "
|
102 |
|
103 |
-
#: wp-to-twitter
|
104 |
-
msgid "
|
105 |
-
msgstr "
|
106 |
|
107 |
-
#: wp-to-twitter
|
108 |
-
msgid "
|
109 |
-
msgstr "
|
110 |
|
111 |
-
#: wp-to-twitter
|
112 |
-
msgid "
|
113 |
-
msgstr "
|
114 |
|
115 |
-
#: wp-to-twitter
|
116 |
-
|
117 |
-
|
118 |
-
msgstr "<li>Contacto correcto con Bit.ly API via Snoopy.</li>"
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
msgid "<li>Failed to contact the Bit.ly API via Snoopy.</li>"
|
123 |
-
msgstr "<li>No he podido contactar con Bit.ly API via Snoopy.</li>"
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
msgstr "<li>No puedo conectar con Bit.ly API sin una clave API válida.</li>"
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
msgstr "<li>Contacto correcto con Twitter via Snoopy.</li>"
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
msgstr "<li>No he podido contactar con la API de Twitter via Snoopy.</li>"
|
136 |
|
137 |
-
#:
|
138 |
-
msgid "
|
139 |
-
msgstr "
|
140 |
|
141 |
-
#:
|
142 |
-
msgid "
|
143 |
-
msgstr "
|
144 |
|
145 |
-
#:
|
146 |
-
msgid "<
|
147 |
-
msgstr "
|
148 |
|
149 |
-
#:
|
150 |
-
msgid "
|
151 |
-
msgstr "
|
152 |
|
153 |
-
#:
|
154 |
-
msgid "
|
155 |
-
msgstr "
|
156 |
|
157 |
-
#: wp-to-twitter-manager.php:
|
158 |
-
msgid "
|
159 |
-
msgstr "
|
160 |
|
161 |
-
#: wp-to-twitter-manager.php:
|
162 |
-
msgid "<li>
|
163 |
-
msgstr "
|
164 |
|
165 |
-
#: wp-to-twitter-manager.php:
|
166 |
-
msgid "<li>
|
167 |
-
msgstr "
|
168 |
|
169 |
-
#: wp-to-twitter-manager.php:
|
170 |
-
msgid "<li><strong>
|
171 |
-
msgstr "
|
172 |
|
173 |
-
#: wp-to-twitter-manager.php:
|
174 |
-
msgid "
|
175 |
-
msgstr "
|
176 |
|
177 |
-
#: wp-to-twitter-manager.php:
|
178 |
-
msgid "
|
179 |
-
msgstr "
|
180 |
|
181 |
-
#: wp-to-twitter-manager.php:
|
182 |
-
|
183 |
-
|
184 |
-
msgstr "Consiga soporte"
|
185 |
|
186 |
-
#: wp-to-twitter-manager.php:
|
187 |
-
msgid "
|
188 |
-
msgstr "
|
189 |
|
190 |
-
#: wp-to-twitter-manager.php:
|
191 |
-
msgid "
|
192 |
-
msgstr "
|
193 |
|
194 |
-
#: wp-to-twitter-manager.php:
|
195 |
-
msgid "
|
196 |
-
msgstr "
|
197 |
|
198 |
-
#: wp-to-twitter-manager.php:
|
199 |
-
msgid "
|
200 |
-
msgstr "
|
201 |
|
202 |
-
#: wp-to-twitter-manager.php:
|
203 |
-
msgid "
|
204 |
-
msgstr "
|
205 |
|
206 |
-
#: wp-to-twitter-manager.php:
|
207 |
-
msgid "
|
208 |
-
msgstr "
|
209 |
|
210 |
-
#: wp-to-twitter-manager.php:
|
211 |
-
msgid "
|
212 |
-
msgstr "
|
213 |
|
214 |
-
#: wp-to-twitter-
|
215 |
-
msgid "
|
216 |
-
msgstr "
|
217 |
|
218 |
-
#: wp-to-twitter-
|
219 |
-
msgid "
|
220 |
-
msgstr "
|
221 |
|
222 |
-
#: wp-to-twitter-
|
223 |
-
msgid "
|
224 |
-
msgstr "
|
225 |
|
226 |
-
#: wp-to-twitter-manager.php:
|
227 |
-
msgid "
|
228 |
-
msgstr "
|
229 |
|
230 |
-
#: wp-to-twitter-manager.php:
|
231 |
-
msgid "
|
232 |
-
msgstr "
|
233 |
|
234 |
-
#: wp-to-twitter-manager.php:
|
235 |
-
msgid "
|
236 |
-
msgstr "
|
237 |
|
238 |
-
#: wp-to-twitter-
|
239 |
-
msgid "
|
240 |
-
msgstr "
|
241 |
|
242 |
-
#: wp-to-twitter-
|
243 |
-
msgid "
|
244 |
-
msgstr "
|
245 |
|
246 |
-
#: wp-to-twitter-
|
247 |
-
msgid "
|
248 |
-
msgstr "
|
249 |
|
250 |
-
#: wp-to-twitter-
|
251 |
-
msgid "
|
252 |
-
msgstr "
|
253 |
|
254 |
-
#: wp-to-twitter-
|
255 |
-
msgid "
|
256 |
-
msgstr "
|
257 |
|
258 |
-
#: wp-to-twitter-
|
259 |
-
msgid "
|
260 |
-
msgstr "
|
261 |
|
262 |
-
#: wp-to-twitter-
|
263 |
-
msgid "
|
264 |
-
msgstr "
|
265 |
|
266 |
-
#: wp-to-twitter-
|
267 |
-
msgid "
|
268 |
-
msgstr "
|
269 |
|
270 |
-
#: wp-to-twitter-
|
271 |
-
msgid "
|
272 |
-
msgstr "
|
273 |
|
274 |
-
#: wp-to-twitter-
|
275 |
-
msgid "
|
276 |
-
msgstr "
|
277 |
|
278 |
-
#: wp-to-twitter-
|
279 |
-
msgid "
|
280 |
-
msgstr "
|
281 |
|
282 |
-
#: wp-to-twitter-
|
283 |
-
msgid "
|
284 |
-
msgstr "
|
285 |
|
286 |
-
#: wp-to-twitter-
|
287 |
-
msgid "
|
288 |
-
msgstr "
|
289 |
|
290 |
-
#: wp-to-twitter-
|
291 |
-
msgid "
|
292 |
-
msgstr "
|
293 |
|
294 |
-
#: wp-to-twitter-
|
295 |
-
msgid "
|
296 |
-
msgstr "
|
297 |
|
298 |
-
#: wp-to-twitter-
|
299 |
-
msgid "
|
300 |
-
msgstr "
|
301 |
|
302 |
-
#: wp-to-twitter-
|
303 |
-
msgid "
|
304 |
-
msgstr "
|
305 |
|
306 |
-
#: wp-to-twitter-
|
307 |
-
msgid "
|
308 |
-
msgstr "
|
309 |
|
310 |
-
#: wp-to-twitter-
|
311 |
-
msgid "
|
312 |
-
msgstr "
|
313 |
|
314 |
-
#: wp-to-twitter-
|
315 |
-
msgid "
|
316 |
-
msgstr "
|
317 |
|
318 |
-
#: wp-to-twitter-
|
319 |
-
msgid "
|
320 |
-
msgstr "
|
321 |
|
322 |
-
#: wp-to-twitter-manager.php:
|
323 |
-
msgid "
|
324 |
-
msgstr "
|
325 |
|
326 |
#: wp-to-twitter-manager.php:433
|
327 |
-
msgid "
|
328 |
-
msgstr "
|
329 |
-
|
330 |
-
#: wp-to-twitter-manager.php:438
|
331 |
-
msgid "Authors have individual Twitter accounts"
|
332 |
-
msgstr "Los autores tienen cuentas de Twitter individuales"
|
333 |
|
334 |
-
#: wp-to-twitter-manager.php:
|
335 |
-
msgid "
|
336 |
-
msgstr "
|
337 |
|
338 |
#: wp-to-twitter-manager.php:442
|
339 |
-
msgid "
|
340 |
-
msgstr "
|
341 |
-
|
342 |
-
#: wp-to-twitter-manager.php:445
|
343 |
-
msgid "Use <strong>Cli.gs</strong> for my URL shortener."
|
344 |
-
msgstr "Usar <strong>Cli.gs</strong> como acortador de URLs."
|
345 |
|
346 |
-
#: wp-to-twitter-manager.php:
|
347 |
-
msgid "
|
348 |
-
msgstr "
|
349 |
|
350 |
-
#: wp-to-twitter-manager.php:
|
351 |
-
msgid "
|
352 |
-
msgstr "
|
353 |
|
354 |
-
#: wp-to-twitter-manager.php:
|
355 |
msgid "Save WP->Twitter Options"
|
356 |
msgstr "Guardar configuración WP->Twitter "
|
357 |
|
358 |
-
#: wp-to-twitter-manager.php:
|
359 |
-
msgid "
|
360 |
-
msgstr "
|
361 |
|
362 |
-
#: wp-to-twitter-manager.php:
|
363 |
-
msgid "
|
364 |
-
msgstr "
|
365 |
|
366 |
-
#: wp-to-twitter-manager.php:
|
367 |
-
msgid "
|
368 |
-
msgstr "
|
369 |
|
370 |
-
#: wp-to-twitter-manager.php:
|
371 |
-
msgid "
|
372 |
-
msgstr "
|
373 |
|
374 |
-
#: wp-to-twitter-
|
375 |
-
msgid "
|
376 |
-
msgstr "
|
377 |
|
378 |
-
#: wp-to-twitter-
|
379 |
-
msgid "
|
380 |
-
msgstr "
|
381 |
|
382 |
-
#: wp-to-twitter-
|
383 |
-
msgid "Your
|
384 |
-
msgstr "
|
385 |
|
386 |
-
#: wp-to-twitter-
|
387 |
-
msgid "Your
|
388 |
-
msgstr "
|
389 |
|
390 |
-
#: wp-to-twitter-
|
391 |
-
msgid "
|
392 |
-
msgstr "
|
|
|
|
|
|
|
|
|
393 |
|
394 |
-
#: wp-to-twitter-
|
395 |
msgid "Your Bit.ly account details"
|
396 |
msgstr "Detalles de su cuenta Bit.ly"
|
397 |
|
398 |
-
#: wp-to-twitter-
|
399 |
msgid "Your Bit.ly username:"
|
400 |
msgstr "Su nombre de usuario de Bit.ly:"
|
401 |
|
402 |
-
#: wp-to-twitter-
|
403 |
msgid "Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
404 |
msgstr "Su clave Bit.ly <abbr title='application programming interface'>API</abbr>:"
|
405 |
|
406 |
-
#: wp-to-twitter-
|
407 |
msgid "Save Bit.ly API Key"
|
408 |
msgstr "Guardar clave Bit.ly"
|
409 |
|
410 |
-
#: wp-to-twitter-
|
411 |
msgid "Clear Bit.ly API Key"
|
412 |
msgstr "Borrar clave Bit.ly"
|
413 |
|
414 |
-
#: wp-to-twitter-
|
415 |
msgid "A Bit.ly API key and username is required to shorten URLs via the Bit.ly API and WP to Twitter."
|
416 |
msgstr "Se necesita un usuario y una clave API de Bit.ly para acortar URLs con la API de Bit.ly y WP to Twitter."
|
417 |
|
418 |
-
#: wp-to-twitter-
|
419 |
-
msgid "
|
420 |
-
msgstr "
|
|
|
|
|
|
|
|
|
421 |
|
422 |
-
#: wp-to-twitter-
|
423 |
-
msgid "
|
424 |
-
msgstr "
|
|
|
|
|
|
|
|
|
425 |
|
426 |
-
#: wp-to-twitter-
|
427 |
-
msgid "
|
428 |
-
msgstr "
|
429 |
|
430 |
-
#: wp-to-twitter-
|
431 |
-
msgid "
|
432 |
-
msgstr "
|
433 |
|
434 |
-
#: wp-to-twitter.php:
|
435 |
-
msgid "
|
436 |
-
msgstr "
|
437 |
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
msgid "WP to Twitter"
|
442 |
-
msgstr "WP to Twitter"
|
443 |
|
444 |
-
#: wp-to-twitter.php:
|
445 |
-
msgid "
|
446 |
-
msgstr "
|
447 |
|
448 |
-
#: wp-to-twitter.php:
|
449 |
-
msgid "
|
450 |
-
msgstr "
|
451 |
|
452 |
-
#: wp-to-twitter.php:
|
453 |
-
msgid "
|
454 |
-
msgstr "
|
455 |
|
456 |
-
#: wp-to-twitter.php:
|
457 |
-
msgid "
|
458 |
-
msgstr "
|
459 |
|
460 |
-
#: wp-to-twitter.php:
|
461 |
-
msgid "WP to Twitter
|
462 |
-
msgstr "
|
463 |
|
464 |
-
#: wp-to-twitter.php:
|
465 |
-
msgid "
|
466 |
-
msgstr "
|
467 |
|
468 |
-
#: wp-to-twitter.php:
|
469 |
-
msgid "
|
470 |
-
msgstr "
|
471 |
|
472 |
-
#: wp-to-twitter.php:
|
473 |
-
msgid "
|
474 |
-
msgstr "
|
475 |
|
476 |
-
#: wp-to-twitter.php:
|
477 |
-
msgid "
|
478 |
-
msgstr "
|
479 |
|
480 |
-
#: wp-to-twitter.php:
|
481 |
-
msgid "
|
482 |
-
msgstr "
|
483 |
|
484 |
-
#: wp-to-twitter.php:
|
485 |
-
msgid "
|
486 |
-
msgstr "
|
487 |
|
488 |
-
#: wp-to-twitter.php:
|
489 |
-
msgid "
|
490 |
-
msgstr "
|
|
|
|
|
|
|
|
|
491 |
|
492 |
-
#: wp-to-twitter.php:
|
493 |
-
msgid "
|
494 |
-
msgstr "
|
495 |
|
496 |
-
#: wp-to-twitter.php:
|
497 |
-
msgid "
|
498 |
-
msgstr "
|
499 |
|
500 |
-
#: wp-to-twitter.php:
|
501 |
-
msgid "
|
502 |
-
msgstr "
|
503 |
|
504 |
-
|
505 |
-
msgid "
|
506 |
-
msgstr "
|
507 |
|
508 |
-
|
509 |
-
msgid "
|
510 |
-
msgstr "
|
511 |
|
512 |
-
|
513 |
-
msgid "
|
514 |
-
msgstr "
|
515 |
|
516 |
-
|
517 |
-
msgid "
|
518 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
|
|
|
|
|
|
1 |
+
# Translation of WP to Twitter in Spanish (Spain)
|
2 |
+
# This file is distributed under the same license as the WP to Twitter package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"PO-Revision-Date: 2013-07-11 20:17:05+0000\n"
|
|
|
|
|
|
|
|
|
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
10 |
+
"X-Generator: GlotPress/0.1\n"
|
11 |
+
"Project-Id-Version: WP to Twitter\n"
|
12 |
+
|
13 |
+
#: wp-to-twitter-manager.php:178
|
14 |
+
msgid "Error:"
|
15 |
+
msgstr "Error:"
|
16 |
+
|
17 |
+
#: wp-to-twitter-manager.php:643
|
18 |
+
msgid "No Analytics"
|
19 |
+
msgstr "Sin Analytics"
|
20 |
+
|
21 |
+
#: wp-to-twitter-manager.php:792
|
22 |
+
msgid "Allow users to post to their own Twitter accounts"
|
23 |
+
msgstr "Permitir a usuarios publicar en sus cuentas de Twitter propias"
|
24 |
+
|
25 |
+
#: wp-to-twitter-manager.php:793
|
26 |
+
msgid "Set a timer to send your Tweet minutes or hours after you publish"
|
27 |
+
msgstr "Establecer un temporizador para enviar su Tweet minutos u horas después de publicar"
|
28 |
+
|
29 |
+
#: wp-to-twitter-manager.php:794
|
30 |
+
msgid "Automatically re-send Tweets after publishing"
|
31 |
+
msgstr "Re-enviar Tweets automáticamente tras publicar"
|
32 |
+
|
33 |
+
#: wp-to-twitter-manager.php:795
|
34 |
+
msgid "Send Tweets for approved comments"
|
35 |
+
msgstr "Enviar Tweets para comentarios aprobados"
|
36 |
+
|
37 |
+
#: wp-to-twitter.php:62
|
38 |
+
msgid "The current version of WP Tweets PRO is <strong>%s</strong>. <a href=\"http://www.joedolson.com/articles/account/\">Upgrade for best compatibility!</a>"
|
39 |
+
msgstr "La versión actual de WP Tweets PRO es <strong>%s</strong>. <a href=\"http://www.joedolson.com/articles/account/\">Actualice para mejor compatibilidad!</a>"
|
40 |
+
|
41 |
+
#: wp-to-twitter.php:84
|
42 |
+
msgid "Tweeting of comments has been moved to <a href=\"%1$s\">WP Tweets PRO</a>. You will need to upgrade in order to Tweet comments. <a href=\"%2$s\">Dismiss</a>"
|
43 |
+
msgstr "Los Tweets de comentarios han sido trasladados a <a href=\"%1$s\">WP Tweets PRO</a>. Necesita actualizar para Twitear comentarios. <a href=\"%2$s\">Descartar</a>"
|
44 |
+
|
45 |
+
#: wp-to-twitter.php:990
|
46 |
+
msgid "Tweeting %s edits is disabled."
|
47 |
+
msgstr "Tweetear ediciones de %s está desactivado."
|
48 |
+
|
49 |
+
#: wp-to-twitter.php:1004
|
50 |
+
msgid "Upgrade to WP Tweets Pro!"
|
51 |
+
msgstr "Actualiza a WP Tweets Pro!"
|
52 |
+
|
53 |
+
#: wp-to-twitter.php:1410
|
54 |
+
msgid "I hope you've enjoyed <strong>WP to Twitter</strong>! Take a look at <a href='%s'>upgrading to WP Tweets PRO</a> for advanced Tweeting with WordPress! <a href='%s'>Dismiss</a>"
|
55 |
+
msgstr "Espero haya disfrutado <strong>WP to Twitter</strong>! De una mirada a <a href='%s'>actualizando a WP Tweets PRO</a> para un Tweeteo avanzado con WordPress! <a href='%s'>Descartar</a>"
|
56 |
+
|
57 |
+
msgid "Posts a Tweet when you update your WordPress blog or post to your blogroll, using your URL shortening service. Rich in features for customizing and promoting your Tweets."
|
58 |
+
msgstr "Publica un Tweet cuando usted actualiza su blog Wordpress o publica en su blogroll, usando su servicio de URL abreviadas. Rico en características para personalizar y promover sus Tweets."
|
59 |
+
|
60 |
+
#: wp-to-twitter-shorteners.php:375
|
61 |
+
msgid "Your jotURL account details"
|
62 |
+
msgstr "Detalles de su cuenta jotURL"
|
63 |
+
|
64 |
+
#: wp-to-twitter-shorteners.php:379
|
65 |
+
msgid "Your jotURL public <abbr title='application programming interface'>API</abbr> key:"
|
66 |
+
msgstr "La llave pública de su <abbr title='application programming interface'>API</abbr> jotURL:"
|
67 |
+
|
68 |
+
#: wp-to-twitter-shorteners.php:380
|
69 |
+
msgid "Your jotURL private <abbr title='application programming interface'>API</abbr> key:"
|
70 |
+
msgstr "La llave privada de su <abbr title='application programming interface'>API</abbr> jotURL:"
|
71 |
+
|
72 |
+
#: wp-to-twitter-shorteners.php:381
|
73 |
+
msgid "Parameters to add to the long URL (before shortening):"
|
74 |
+
msgstr "Parámetros para agregar a la URL larga (antes de abreviar):"
|
75 |
+
|
76 |
+
#: wp-to-twitter-shorteners.php:381
|
77 |
+
msgid "Parameters to add to the short URL (after shortening):"
|
78 |
+
msgstr "Parámetros para agregar a la URL larga (despues de abreviar):"
|
79 |
+
|
80 |
+
#: wp-to-twitter-shorteners.php:382
|
81 |
+
msgid "View your jotURL public and private API key"
|
82 |
+
msgstr "Ver sus llaves pública y privada de la API de jotURL"
|
83 |
+
|
84 |
+
#: wp-to-twitter-shorteners.php:385
|
85 |
+
msgid "Save jotURL settings"
|
86 |
+
msgstr "Guardar configuración de jotURL"
|
87 |
+
|
88 |
+
#: wp-to-twitter-shorteners.php:385
|
89 |
+
msgid "Clear jotURL settings"
|
90 |
+
msgstr "Borrar configuración de jotURL"
|
91 |
+
|
92 |
+
#: wp-to-twitter-shorteners.php:386
|
93 |
+
msgid "A jotURL public and private API key is required to shorten URLs via the jotURL API and WP to Twitter."
|
94 |
+
msgstr "Una llave pública y privada de la API de jotURL es requerida para abreviar vía API de jotURL y WP to Twitter."
|
95 |
+
|
96 |
+
#: wp-to-twitter-shorteners.php:481
|
97 |
+
msgid "jotURL private API Key Updated. "
|
98 |
+
msgstr "Llave privada de API jotURL Actualizada."
|
99 |
+
|
100 |
+
#: wp-to-twitter-shorteners.php:484
|
101 |
+
msgid "jotURL private API Key deleted. You cannot use the jotURL API without a private API key. "
|
102 |
+
msgstr "Llave privada de API jotURL borrada. No puede usar la API jotURL sin una llave privada de API."
|
103 |
+
|
104 |
+
#: wp-to-twitter-shorteners.php:486
|
105 |
+
msgid "jotURL private API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! A private API key is required to use the jotURL URL shortening service. "
|
106 |
+
msgstr "Llave privada de API jotURL no agregada - <a href='https://www.joturl.com/reserved/api.html'>obtenga una aquí</a>! Una llave privada de API es requerida para usar el servicio de abreviación de URL de jotURL."
|
107 |
+
|
108 |
+
#: wp-to-twitter-shorteners.php:490
|
109 |
+
msgid "jotURL public API Key Updated. "
|
110 |
+
msgstr "Llave pública de API jotURL Actualizada."
|
111 |
+
|
112 |
+
#: wp-to-twitter-shorteners.php:493
|
113 |
+
msgid "jotURL public API Key deleted. You cannot use the jotURL API without providing your public API Key. "
|
114 |
+
msgstr "Llave pública de API jotURL borrada. No puede usar la API jotURL sin proporcionar su llave pública de API."
|
115 |
+
|
116 |
+
#: wp-to-twitter-shorteners.php:495
|
117 |
+
msgid "jotURL public API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! "
|
118 |
+
msgstr "Llave pública de API jotURL no agregada - <a href='https://www.joturl.com/reserved/api.html'>obtenga una aquí</a>! "
|
119 |
+
|
120 |
+
#: wp-to-twitter-shorteners.php:501
|
121 |
+
msgid "Long URL parameters added. "
|
122 |
+
msgstr "Parámetros de URL larga añadidos."
|
123 |
+
|
124 |
+
#: wp-to-twitter-shorteners.php:504
|
125 |
+
msgid "Long URL parameters deleted. "
|
126 |
+
msgstr "Parámetros de URL larga borrados."
|
127 |
+
|
128 |
+
#: wp-to-twitter-shorteners.php:510
|
129 |
+
msgid "Short URL parameters added. "
|
130 |
+
msgstr "Parámetros de URL abreviada añadidos."
|
131 |
+
|
132 |
+
#: wp-to-twitter-shorteners.php:513
|
133 |
+
msgid "Short URL parameters deleted. "
|
134 |
+
msgstr "Parámetros de URL abreviada borrados."
|
135 |
+
|
136 |
+
#: wp-to-twitter-shorteners.php:527
|
137 |
+
msgid "You must add your jotURL public and private API key in order to shorten URLs with jotURL."
|
138 |
+
msgstr "Usted debe agregar sus llaves pública u privada de la API de jotURL para abreviar URLs con jotURL"
|
139 |
+
|
140 |
+
#: wp-to-twitter-manager.php:530
|
141 |
+
msgid "Tags"
|
142 |
+
msgstr "Etiquetas"
|
143 |
+
|
144 |
+
#: wp-to-twitter-manager.php:546
|
145 |
+
msgid "Template Tag Settings"
|
146 |
+
msgstr "Configuración de Plantilla de Etiquetas"
|
147 |
+
|
148 |
+
#: wp-to-twitter-manager.php:548
|
149 |
+
msgid "Extracted from the post. If you use the 'Excerpt' field, it will be used instead."
|
150 |
+
msgstr "Extraído de la publicación. Si usted usa el campo 'Extracto', este será usado en cambio."
|
151 |
+
|
152 |
+
#: wp-to-twitter-manager.php:591
|
153 |
+
msgid "Template tag priority order"
|
154 |
+
msgstr "Orden de prioridad de plantilla de etiquetas"
|
155 |
+
|
156 |
+
#: wp-to-twitter-manager.php:592
|
157 |
+
msgid "The order in which items will be abbreviated or removed from your Tweet if the Tweet is too long to send to Twitter."
|
158 |
+
msgstr "Orden en el cual los items serán abreviados o removidos de su Tweet si este es muy largo para enviar a Twitter."
|
159 |
+
|
160 |
+
#: wp-to-twitter-manager.php:647
|
161 |
+
msgid "Author Settings"
|
162 |
+
msgstr "Configuración de Autor"
|
163 |
+
|
164 |
+
#: wp-to-twitter-manager.php:652
|
165 |
+
msgid "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."
|
166 |
+
msgstr "Los autores puede agregar su nombre de usuario a su perfil. Con la versión gratuita de WP to Twitter, agrega una @referencia al autor. La @referencia es colocada usando el shortcode <code>#account#</code>, el cual eligirá la cuenta principal si la cuenta de usuario no está configurada."
|
167 |
+
|
168 |
+
#: wp-to-twitter-manager.php:656
|
169 |
+
msgid "Permissions"
|
170 |
+
msgstr "Permisos"
|
171 |
+
|
172 |
+
#: wp-to-twitter-manager.php:691
|
173 |
+
msgid "Error Messages and Debugging"
|
174 |
+
msgstr "Mensajes de Error y Depuración"
|
175 |
+
|
176 |
+
#: wp-to-twitter-manager.php:812
|
177 |
+
msgid "<code>#cat_desc#</code>: custom value from the category description field"
|
178 |
+
msgstr "<code>#cat_desc#</code>: valor personalizado del campo descripción de categoría"
|
179 |
+
|
180 |
+
#: wp-to-twitter-manager.php:819
|
181 |
+
msgid "<code>#@#</code>: the twitter @reference for the author or blank, if not set"
|
182 |
+
msgstr "<code>#@#</code>: La @referencia de twitter para el autor o en blanco si no está configurado"
|
183 |
+
|
184 |
+
#: wp-to-twitter-oauth.php:184
|
185 |
+
msgid "Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> queries</a>."
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: wp-to-twitter-oauth.php:280
|
189 |
+
msgid "<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>"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: wp-to-twitter-oauth.php:306 wp-to-twitter-oauth.php:312
|
193 |
+
msgid "Twitter's server time: "
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: wp-to-twitter.php:71
|
197 |
+
msgid "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>"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: wp-to-twitter.php:332
|
201 |
+
msgid "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."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: wp-to-twitter.php:1333
|
205 |
+
msgid "Upgrade"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: wp-to-twitter-manager.php:535
|
209 |
+
msgid "Use tag slug as hashtag value"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: wp-to-twitter.php:1069
|
213 |
+
msgid "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>."
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: wp-to-twitter-manager.php:177
|
217 |
+
msgid "WP to Twitter failed to connect with Twitter. Try <a href=\"#wpt_http\">switching to an HTTP connection</a>."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: wp-to-twitter-shorteners.php:545
|
221 |
+
msgid "Choose a short URL service (account settings below)"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: wp-to-twitter-shorteners.php:551
|
225 |
+
msgid "YOURLS (on this server)"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: wp-to-twitter-shorteners.php:552
|
229 |
+
msgid "YOURLS (on a remote server)"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: wpt-functions.php:264
|
233 |
+
msgid "Thank you for supporting the continuing development of this plug-in! I'll get back to you as soon as I can. Please ensure that you can receive email at <code>%s</code>."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: wpt-functions.php:266
|
237 |
+
msgid "Thanks for using WP to Twitter. Please ensure that you can receive email at <code>%s</code>."
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: wpt-functions.php:286
|
241 |
+
msgid "Reply to:"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: wp-to-twitter-manager.php:672
|
245 |
+
msgid "The lowest user group that can add their Twitter information"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: wp-to-twitter-manager.php:677
|
249 |
+
msgid "The lowest user group that can see the Custom Tweet options when posting"
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: wp-to-twitter-manager.php:682
|
253 |
+
msgid "The lowest user group that can toggle the Tweet/Don't Tweet option"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: wp-to-twitter-manager.php:687
|
257 |
+
msgid "The lowest user group that can send Twitter updates"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: wp-to-twitter-manager.php:816
|
261 |
+
msgid "<code>#author#</code>: the post author (@reference if available, otherwise display name)"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: wp-to-twitter-manager.php:817
|
265 |
+
msgid "<code>#displayname#</code>: post author's display name"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: wp-to-twitter.php:289
|
269 |
+
msgid "This tweet was blank and could not be sent to Twitter."
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: wp-to-twitter.php:335
|
273 |
+
msgid "404 Not Found: The URI requested is invalid or the resource requested does not exist."
|
274 |
+
msgstr ""
|
275 |
+
|
276 |
+
#: wp-to-twitter.php:338
|
277 |
+
msgid "406 Not Acceptable: Invalid Format Specified."
|
278 |
+
msgstr ""
|
279 |
+
|
280 |
+
#: wp-to-twitter.php:341
|
281 |
+
msgid "429 Too Many Requests: You have exceeded your rate limits."
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: wp-to-twitter.php:353
|
285 |
+
msgid "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."
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: wp-to-twitter.php:1012
|
289 |
+
msgid "Your prepended Tweet text; not part of your template."
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: wp-to-twitter.php:1015
|
293 |
+
msgid "Your appended Tweet text; not part of your template."
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: wp-to-twitter.php:1118
|
297 |
+
msgid "Your role does not have the ability to Post Tweets from this site."
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
+
#: wp-to-twitter.php:1231
|
301 |
+
msgid "Hide account name in Tweets"
|
302 |
+
msgstr ""
|
303 |
+
|
304 |
+
#: wp-to-twitter.php:1232
|
305 |
+
msgid "Do not display my account in the #account# template tag."
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: wpt-functions.php:289
|
309 |
+
msgid "I have read <a href=\"%1$s\">the FAQ for this plug-in</a> <span>(required)</span>"
|
310 |
+
msgstr ""
|
311 |
+
|
312 |
+
#: wpt-functions.php:292
|
313 |
+
msgid "I have <a href=\"%1$s\">made a donation to help support this plug-in</a>"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: wpt-functions.php:295
|
317 |
+
msgid "Support Request:"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: wp-to-twitter-manager.php:485
|
321 |
+
msgid "Settings for type \"%1$s\""
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: wp-to-twitter-manager.php:488
|
325 |
+
msgid "Update when %1$s %2$s is published"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: wp-to-twitter-manager.php:488
|
329 |
+
msgid "Text for new %1$s updates"
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: wp-to-twitter-manager.php:492
|
333 |
+
msgid "Update when %1$s %2$s is edited"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: wp-to-twitter-manager.php:492
|
337 |
+
msgid "Text for %1$s editing updates"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: wp-to-twitter-oauth.php:217
|
341 |
+
msgid "Your server timezone (should be UTC,GMT,Europe/London or equivalent):"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: wp-to-twitter-shorteners.php:555
|
345 |
+
msgid "Use Twitter Friendly Links."
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: wp-to-twitter-shorteners.php:329
|
349 |
+
msgid "View your Bit.ly username and API key"
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: wp-to-twitter-shorteners.php:391
|
353 |
+
msgid "Your shortener does not require any account settings."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: wp-to-twitter.php:316
|
357 |
+
msgid "Your Twitter application does not have read and write permissions. Go to <a href=\"%s\">your Twitter apps</a> to modify these settings."
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: wp-to-twitter.php:1089
|
361 |
+
msgid "Failed Tweets"
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: wp-to-twitter.php:1104
|
365 |
+
msgid "No failed tweets on this post."
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: wp-to-twitter-manager.php:789
|
369 |
+
msgid "Upgrade to <strong>WP Tweets PRO</strong> for more options!"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: wp-to-twitter-manager.php:822
|
373 |
+
msgid "<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."
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: wp-to-twitter-oauth.php:284
|
377 |
+
msgid "WP to Twitter could not contact Twitter's remote server. Here is the error triggered: "
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: wp-to-twitter.php:274
|
381 |
+
msgid "This account is not authorized to post to Twitter."
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: wp-to-twitter.php:283
|
385 |
+
msgid "This tweet is identical to another Tweet recently sent to this account."
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: wp-to-twitter-shorteners.php:295
|
389 |
+
msgid "(optional)"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: wp-to-twitter-manager.php:603
|
393 |
+
msgid "Do not post Tweets by default (editing only)"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: wp-to-twitter-manager.php:814
|
397 |
+
msgid "<code>#modified#</code>: the post modified date"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: wp-to-twitter-oauth.php:282
|
401 |
+
msgid "Your time stamps are more than 5 minutes apart. Your server could lose its connection with Twitter."
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: wp-to-twitter-manager.php:650
|
405 |
+
msgid "Authors have individual Twitter accounts"
|
406 |
+
msgstr "Los autores tienen cuentas de Twitter individuales"
|
407 |
+
|
408 |
+
#: wp-to-twitter-manager.php:693
|
409 |
+
msgid "Disable global URL shortener error messages."
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: wp-to-twitter-manager.php:694
|
413 |
+
msgid "Disable global Twitter API error messages."
|
414 |
+
msgstr ""
|
415 |
+
|
416 |
+
#: wp-to-twitter-manager.php:696
|
417 |
+
msgid "Get Debugging Data for OAuth Connection"
|
418 |
+
msgstr ""
|
419 |
+
|
420 |
+
#: wp-to-twitter-manager.php:698
|
421 |
+
msgid "Switch to <code>http</code> connection. (Default is https)"
|
422 |
+
msgstr ""
|
423 |
+
|
424 |
+
#: wp-to-twitter-manager.php:700
|
425 |
+
msgid "I made a donation, so stop whinging at me, please."
|
426 |
+
msgstr ""
|
427 |
+
|
428 |
+
#: wp-to-twitter-manager.php:714
|
429 |
+
msgid "Limit Updating Categories"
|
430 |
+
msgstr ""
|
431 |
+
|
432 |
+
#: wp-to-twitter-manager.php:717
|
433 |
+
msgid "If no categories are checked, limiting by category will be ignored, and all categories will be Tweeted."
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
+
#: wp-to-twitter-manager.php:718
|
437 |
+
msgid "<em>Category limits are disabled.</em>"
|
438 |
+
msgstr ""
|
439 |
+
|
440 |
+
#: wp-to-twitter-manager.php:727
|
441 |
+
msgid "Get Plug-in Support"
|
442 |
+
msgstr ""
|
443 |
+
|
444 |
+
#: wp-to-twitter-manager.php:738
|
445 |
+
msgid "Check Support"
|
446 |
+
msgstr "Chequear soporte"
|
447 |
+
|
448 |
+
#: wp-to-twitter-manager.php:738
|
449 |
+
msgid "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."
|
450 |
+
msgstr ""
|
451 |
+
|
452 |
+
#: wp-to-twitter-manager.php:756
|
453 |
+
msgid "Support WP to Twitter"
|
454 |
+
msgstr ""
|
455 |
+
|
456 |
+
#: wp-to-twitter-manager.php:758
|
457 |
+
msgid "WP to Twitter Support"
|
458 |
+
msgstr ""
|
459 |
+
|
460 |
+
#: wp-to-twitter-manager.php:766 wp-to-twitter.php:1110 wp-to-twitter.php:1112
|
461 |
+
msgid "Get Support"
|
462 |
+
msgstr "Consiga soporte"
|
463 |
+
|
464 |
+
#: wp-to-twitter-manager.php:769
|
465 |
+
msgid "<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!"
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: wp-to-twitter-manager.php:787
|
469 |
+
msgid "Upgrade Now!"
|
470 |
+
msgstr ""
|
471 |
+
|
472 |
+
#: wp-to-twitter-manager.php:790
|
473 |
+
msgid "Extra features with the PRO upgrade:"
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
+
#: wp-to-twitter-manager.php:804
|
477 |
+
msgid "Shortcodes"
|
478 |
+
msgstr ""
|
479 |
+
|
480 |
+
#: wp-to-twitter-manager.php:806
|
481 |
+
msgid "Available in post update templates:"
|
482 |
+
msgstr ""
|
483 |
+
|
484 |
+
#: wp-to-twitter-manager.php:808
|
485 |
+
msgid "<code>#title#</code>: the title of your blog post"
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: wp-to-twitter-manager.php:809
|
489 |
+
msgid "<code>#blog#</code>: the title of your blog"
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: wp-to-twitter-manager.php:810
|
493 |
+
msgid "<code>#post#</code>: a short excerpt of the post content"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: wp-to-twitter-manager.php:811
|
497 |
+
msgid "<code>#category#</code>: the first selected category for the post"
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: wp-to-twitter-manager.php:813
|
501 |
+
msgid "<code>#date#</code>: the post date"
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: wp-to-twitter-manager.php:815
|
505 |
+
msgid "<code>#url#</code>: the post URL"
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: wp-to-twitter-manager.php:818
|
509 |
+
msgid "<code>#account#</code>: the twitter @reference for the account (or the author, if author settings are enabled and set.)"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: wp-to-twitter-manager.php:820
|
513 |
+
msgid "<code>#tags#</code>: your tags modified into hashtags. See options in the Advanced Settings section, below."
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: wp-to-twitter-manager.php:825
|
517 |
+
msgid "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>"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: wp-to-twitter-oauth.php:115
|
521 |
+
msgid "WP to Twitter was unable to establish a connection to Twitter."
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: wp-to-twitter-oauth.php:185
|
525 |
+
msgid "There was an error querying Twitter's servers"
|
526 |
+
msgstr ""
|
527 |
|
528 |
+
#: wp-to-twitter-oauth.php:209 wp-to-twitter-oauth.php:211
|
529 |
+
msgid "Connect to Twitter"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: wp-to-twitter-oauth.php:214
|
533 |
+
msgid "WP to Twitter Set-up"
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: wp-to-twitter-oauth.php:215 wp-to-twitter-oauth.php:306
|
537 |
+
#: wp-to-twitter-oauth.php:311
|
538 |
+
msgid "Your server time:"
|
539 |
+
msgstr ""
|
540 |
+
|
541 |
+
#: wp-to-twitter-oauth.php:215
|
542 |
+
msgid "Twitter's time:"
|
543 |
+
msgstr ""
|
544 |
+
|
545 |
+
#: wp-to-twitter-oauth.php:215
|
546 |
+
msgid "If these timestamps are not within 5 minutes of each other, your server will not connect to Twitter."
|
547 |
+
msgstr ""
|
548 |
+
|
549 |
+
#: wp-to-twitter-oauth.php:221
|
550 |
+
msgid "1. Register this site as an application on "
|
551 |
+
msgstr ""
|
552 |
+
|
553 |
+
#: wp-to-twitter-oauth.php:221
|
554 |
+
msgid "Twitter's application registration page"
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#: wp-to-twitter-oauth.php:223
|
558 |
+
msgid "If you're not currently logged in to Twitter, log-in to the account you want associated with this site"
|
559 |
+
msgstr ""
|
560 |
+
|
561 |
+
#: wp-to-twitter-oauth.php:224
|
562 |
+
msgid "Your Application's Name will show up after \"via\" in your twitter stream. Your application name cannot include the word \"Twitter.\""
|
563 |
+
msgstr ""
|
564 |
+
|
565 |
+
#: wp-to-twitter-oauth.php:225
|
566 |
+
msgid "Your Application Description can be anything."
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: wp-to-twitter-oauth.php:226
|
570 |
+
msgid "The WebSite and Callback URL should be "
|
571 |
+
msgstr ""
|
572 |
+
|
573 |
+
#: wp-to-twitter-oauth.php:228
|
574 |
+
msgid "Agree to the Developer Rules of the Road and continue."
|
575 |
+
msgstr ""
|
576 |
+
|
577 |
+
#: wp-to-twitter-oauth.php:229
|
578 |
+
msgid "2. Switch to the \"Settings\" tab in Twitter apps"
|
579 |
+
msgstr ""
|
580 |
+
|
581 |
+
#: wp-to-twitter-oauth.php:231
|
582 |
+
msgid "Select \"Read and Write\" for the Application Type"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: wp-to-twitter-oauth.php:232
|
586 |
+
msgid "Update the application settings"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: wp-to-twitter-oauth.php:233
|
590 |
+
msgid "Return to the Details tab and create your access token. Refresh page to view your access tokens."
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: wp-to-twitter-oauth.php:235
|
594 |
+
msgid "Once you have registered your site as an application, you will be provided with four keys."
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: wp-to-twitter-oauth.php:236
|
598 |
+
msgid "3. Copy and paste your consumer key and consumer secret into the fields below"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: wp-to-twitter-oauth.php:239
|
602 |
+
msgid "Twitter Consumer Key"
|
603 |
+
msgstr ""
|
604 |
|
605 |
+
#: wp-to-twitter-oauth.php:243
|
606 |
+
msgid "Twitter Consumer Secret"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: wp-to-twitter-oauth.php:247
|
610 |
+
msgid "4. Copy and paste your Access Token and Access Token Secret into the fields below"
|
611 |
+
msgstr ""
|
612 |
+
|
613 |
+
#: wp-to-twitter-oauth.php:248
|
614 |
+
msgid "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."
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: wp-to-twitter-oauth.php:251
|
618 |
+
msgid "Access Token"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: wp-to-twitter-oauth.php:255
|
622 |
+
msgid "Access Token Secret"
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: wp-to-twitter-oauth.php:274
|
626 |
+
msgid "Disconnect Your WordPress and Twitter Account"
|
627 |
+
msgstr ""
|
628 |
+
|
629 |
+
#: wp-to-twitter-oauth.php:278
|
630 |
+
msgid "Disconnect your WordPress and Twitter Account"
|
631 |
+
msgstr ""
|
632 |
+
|
633 |
+
#: wp-to-twitter-oauth.php:288
|
634 |
+
msgid "Disconnect from Twitter"
|
635 |
+
msgstr ""
|
636 |
+
|
637 |
+
#: wp-to-twitter-oauth.php:294
|
638 |
+
msgid "Twitter Username "
|
639 |
+
msgstr ""
|
640 |
+
|
641 |
+
#: wp-to-twitter-oauth.php:295
|
642 |
+
msgid "Consumer Key "
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: wp-to-twitter-oauth.php:296
|
646 |
+
msgid "Consumer Secret "
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: wp-to-twitter-oauth.php:297
|
650 |
+
msgid "Access Token "
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: wp-to-twitter-oauth.php:298
|
654 |
+
msgid "Access Token Secret "
|
655 |
+
msgstr ""
|
656 |
+
|
657 |
+
#: wp-to-twitter.php:43
|
658 |
+
msgid "WP to Twitter requires PHP version 5 or above. Please upgrade PHP to run WP to Twitter."
|
659 |
+
msgstr ""
|
660 |
+
|
661 |
+
#: wp-to-twitter-oauth.php:200
|
662 |
+
msgid "Twitter requires authentication by OAuth. You will need to <a href='%s'>update your settings</a> to complete installation of WP to Twitter."
|
663 |
+
msgstr ""
|
664 |
+
|
665 |
+
#: wp-to-twitter.php:321
|
666 |
+
msgid "200 OK: Success!"
|
667 |
+
msgstr ""
|
668 |
+
|
669 |
+
#: wp-to-twitter.php:325
|
670 |
+
msgid "400 Bad Request: The request was invalid. This is the status code returned during rate limiting."
|
671 |
+
msgstr ""
|
672 |
+
|
673 |
+
#: wp-to-twitter.php:328
|
674 |
+
msgid "401 Unauthorized: Authentication credentials were missing or incorrect."
|
675 |
+
msgstr ""
|
676 |
+
|
677 |
+
#: wp-to-twitter.php:344
|
678 |
+
msgid "500 Internal Server Error: Something is broken at Twitter."
|
679 |
+
msgstr ""
|
680 |
|
681 |
+
#: wp-to-twitter.php:350
|
682 |
+
msgid "503 Service Unavailable: The Twitter servers are up, but overloaded with requests - Please try again later."
|
683 |
+
msgstr ""
|
684 |
|
685 |
+
#: wp-to-twitter.php:347
|
686 |
+
msgid "502 Bad Gateway: Twitter is down or being upgraded."
|
687 |
+
msgstr ""
|
688 |
|
689 |
+
#: wp-to-twitter.php:389
|
690 |
+
msgid "No Twitter OAuth connection found."
|
691 |
+
msgstr ""
|
692 |
|
693 |
+
#: wp-to-twitter.php:1075
|
694 |
+
msgid "Previous Tweets"
|
695 |
+
msgstr ""
|
696 |
|
697 |
+
#: wp-to-twitter.php:1007
|
698 |
+
msgid "Custom Twitter Post"
|
699 |
+
msgstr ""
|
700 |
|
701 |
+
#: wp-to-twitter.php:1031
|
702 |
+
msgid "Your template:"
|
703 |
+
msgstr ""
|
704 |
|
705 |
+
#: wp-to-twitter.php:1036
|
706 |
+
msgid "YOURLS Custom Keyword"
|
707 |
+
msgstr ""
|
708 |
|
709 |
+
#: wp-to-twitter.php:1110
|
710 |
+
msgid "Upgrade to WP Tweets Pro"
|
711 |
+
msgstr ""
|
712 |
|
713 |
+
#: wp-to-twitter.php:1048
|
714 |
+
msgid "Don't Tweet this post."
|
715 |
+
msgstr "No Tweetear esta entrada."
|
716 |
|
717 |
+
#: wp-to-twitter.php:1048
|
718 |
+
msgid "Tweet this post."
|
719 |
+
msgstr ""
|
720 |
|
721 |
+
#: wp-to-twitter.php:1060
|
722 |
+
msgid "Access to customizing WP to Twitter values is not allowed for your user role."
|
723 |
+
msgstr ""
|
724 |
|
725 |
+
#: wp-to-twitter.php:1150
|
726 |
+
msgid "Characters left: "
|
727 |
+
msgstr ""
|
728 |
|
729 |
+
#: wp-to-twitter.php:1217
|
730 |
+
msgid "WP Tweets User Settings"
|
731 |
+
msgstr ""
|
732 |
|
733 |
+
#: wp-to-twitter.php:1221
|
734 |
+
msgid "Use My Twitter Username"
|
735 |
+
msgstr ""
|
736 |
|
737 |
+
#: wp-to-twitter.php:1222
|
738 |
+
msgid "Tweet my posts with an @ reference to my username."
|
739 |
+
msgstr ""
|
740 |
|
741 |
+
#: wp-to-twitter.php:1223
|
742 |
+
msgid "Tweet my posts with an @ reference to both my username and to the main site username."
|
743 |
+
msgstr ""
|
744 |
|
745 |
+
#: wp-to-twitter.php:1227
|
746 |
+
msgid "Your Twitter Username"
|
747 |
+
msgstr "Su nombre de usuario de Twitter"
|
748 |
|
749 |
+
#: wp-to-twitter.php:1228
|
750 |
+
msgid "Enter your own Twitter username."
|
751 |
+
msgstr "Introduzca su nombre de usuario de Twitter"
|
752 |
|
753 |
+
#: wp-to-twitter.php:1285
|
754 |
+
msgid "Check off categories to tweet"
|
755 |
+
msgstr ""
|
756 |
|
757 |
+
#: wp-to-twitter.php:1289
|
758 |
+
msgid "Do not tweet posts in checked categories (Reverses default behavior)"
|
759 |
+
msgstr ""
|
760 |
|
761 |
+
#: wp-to-twitter.php:1306
|
762 |
+
msgid "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."
|
763 |
+
msgstr ""
|
764 |
|
765 |
+
#: wp-to-twitter.php:1309
|
766 |
+
msgid "Set Categories"
|
767 |
+
msgstr ""
|
768 |
|
769 |
+
#: wp-to-twitter.php:1332
|
770 |
+
msgid "Settings"
|
771 |
+
msgstr "Configuración"
|
772 |
|
773 |
+
#: wp-to-twitter.php:1370
|
774 |
+
msgid "<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href=\"%1$s\">changelog</a> before upgrading."
|
775 |
+
msgstr ""
|
|
|
776 |
|
777 |
+
msgid "WP to Twitter"
|
778 |
+
msgstr "WP to Twitter"
|
|
|
|
|
779 |
|
780 |
+
msgid "http://www.joedolson.com/articles/wp-to-twitter/"
|
781 |
+
msgstr "http://www.joedolson.com/articles/wp-to-twitter/"
|
|
|
782 |
|
783 |
+
msgid "Joseph Dolson"
|
784 |
+
msgstr "Joseph Dolson"
|
|
|
785 |
|
786 |
+
msgid "http://www.joedolson.com/"
|
787 |
+
msgstr "http://www.joedolson.com/"
|
|
|
788 |
|
789 |
+
#: wpt-functions.php:258
|
790 |
+
msgid "Please read the FAQ and other Help documents before making a support request."
|
791 |
+
msgstr ""
|
792 |
|
793 |
+
#: wpt-functions.php:260
|
794 |
+
msgid "Please describe your problem. I'm not psychic."
|
795 |
+
msgstr ""
|
796 |
|
797 |
+
#: wpt-functions.php:281
|
798 |
+
msgid "<strong>Please note</strong>: I do keep records of those who have donated, but if your donation came from somebody other than your account at this web site, you must note this in your message."
|
799 |
+
msgstr ""
|
800 |
|
801 |
+
#: wpt-functions.php:298
|
802 |
+
msgid "Send Support Request"
|
803 |
+
msgstr ""
|
804 |
|
805 |
+
#: wpt-functions.php:301
|
806 |
+
msgid "The following additional information will be sent with your support request:"
|
807 |
+
msgstr ""
|
808 |
|
809 |
+
#: wp-to-twitter-manager.php:41
|
810 |
+
msgid "No error information is available for your shortener."
|
811 |
+
msgstr ""
|
812 |
|
813 |
+
#: wp-to-twitter-manager.php:43
|
814 |
+
msgid "<li class=\"error\"><strong>WP to Twitter was unable to contact your selected URL shortening service.</strong></li>"
|
815 |
+
msgstr ""
|
816 |
|
817 |
+
#: wp-to-twitter-manager.php:46
|
818 |
+
msgid "<li><strong>WP to Twitter successfully contacted your selected URL shortening service.</strong> The following link should point to your blog homepage:"
|
819 |
+
msgstr ""
|
820 |
|
821 |
+
#: wp-to-twitter-manager.php:54
|
822 |
+
msgid "<li><strong>WP to Twitter successfully submitted a status update to Twitter.</strong></li>"
|
823 |
+
msgstr ""
|
824 |
|
825 |
+
#: wp-to-twitter-manager.php:57
|
826 |
+
msgid "<li class=\"error\"><strong>WP to Twitter failed to submit an update to Twitter.</strong></li>"
|
827 |
+
msgstr ""
|
828 |
|
829 |
+
#: wp-to-twitter-manager.php:61
|
830 |
+
msgid "You have not connected WordPress to Twitter."
|
831 |
+
msgstr ""
|
832 |
|
833 |
+
#: wp-to-twitter-manager.php:65
|
834 |
+
msgid "<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>"
|
835 |
+
msgstr ""
|
|
|
836 |
|
837 |
+
#: wp-to-twitter-manager.php:69
|
838 |
+
msgid "<li><strong>Your server should run WP to Twitter successfully.</strong></li>"
|
839 |
+
msgstr "<li><strong>Su servidor debe parece WP to Twitter correctamente.</strong></li>"
|
840 |
|
841 |
+
#: wp-to-twitter-manager.php:87
|
842 |
+
msgid "WP to Twitter Errors Cleared"
|
843 |
+
msgstr "Errores de WP to Twitter eliminados"
|
844 |
|
845 |
+
#: wp-to-twitter-manager.php:170
|
846 |
+
msgid "WP to Twitter is now connected with Twitter."
|
847 |
+
msgstr ""
|
848 |
|
849 |
+
#: wp-to-twitter-manager.php:185
|
850 |
+
msgid "OAuth Authentication Data Cleared."
|
851 |
+
msgstr ""
|
852 |
|
853 |
+
#: wp-to-twitter-manager.php:192
|
854 |
+
msgid "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."
|
855 |
+
msgstr ""
|
856 |
|
857 |
+
#: wp-to-twitter-manager.php:199
|
858 |
+
msgid "OAuth Authentication response not understood."
|
859 |
+
msgstr ""
|
860 |
|
861 |
+
#: wp-to-twitter-manager.php:376
|
862 |
+
msgid "WP to Twitter Advanced Options Updated"
|
863 |
+
msgstr ""
|
864 |
|
865 |
+
#: wp-to-twitter-shorteners.php:523
|
866 |
+
msgid "You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly."
|
867 |
+
msgstr "Debe introducir su login y clave API de Bit.ly para acortar URLs con Bit.ly."
|
868 |
|
869 |
+
#: wp-to-twitter-shorteners.php:531
|
870 |
+
msgid "You must add your YOURLS remote URL, login, and password in order to shorten URLs with a remote installation of YOURLS."
|
871 |
+
msgstr ""
|
872 |
|
873 |
+
#: wp-to-twitter-shorteners.php:535
|
874 |
+
msgid "You must add your YOURLS server path in order to shorten URLs with a remote installation of YOURLS."
|
875 |
+
msgstr ""
|
876 |
|
877 |
+
#: wp-to-twitter-manager.php:394
|
878 |
+
msgid "WP to Twitter Options Updated"
|
879 |
+
msgstr "Opciones de WP to Twitter actualizadas"
|
880 |
|
881 |
+
#: wp-to-twitter-manager.php:403
|
882 |
+
msgid "Category limits updated."
|
883 |
+
msgstr ""
|
884 |
|
885 |
+
#: wp-to-twitter-manager.php:407
|
886 |
+
msgid "Category limits unset."
|
887 |
+
msgstr ""
|
888 |
|
889 |
+
#: wp-to-twitter-shorteners.php:403
|
890 |
+
msgid "YOURLS password updated. "
|
891 |
+
msgstr ""
|
892 |
|
893 |
+
#: wp-to-twitter-shorteners.php:406
|
894 |
+
msgid "YOURLS password deleted. You will be unable to use your remote YOURLS account to create short URLS."
|
895 |
+
msgstr ""
|
896 |
|
897 |
+
#: wp-to-twitter-shorteners.php:408
|
898 |
+
msgid "Failed to save your YOURLS password! "
|
899 |
+
msgstr ""
|
900 |
|
901 |
+
#: wp-to-twitter-shorteners.php:412
|
902 |
+
msgid "YOURLS username added. "
|
903 |
+
msgstr ""
|
904 |
|
905 |
+
#: wp-to-twitter-shorteners.php:416
|
906 |
+
msgid "YOURLS API url added. "
|
907 |
+
msgstr ""
|
908 |
|
909 |
+
#: wp-to-twitter-shorteners.php:419
|
910 |
+
msgid "YOURLS API url removed. "
|
911 |
+
msgstr ""
|
912 |
|
913 |
+
#: wp-to-twitter-shorteners.php:424
|
914 |
+
msgid "YOURLS local server path added. "
|
915 |
+
msgstr ""
|
916 |
|
917 |
+
#: wp-to-twitter-shorteners.php:426
|
918 |
+
msgid "The path to your YOURLS installation is not correct. "
|
919 |
+
msgstr ""
|
920 |
|
921 |
+
#: wp-to-twitter-shorteners.php:430
|
922 |
+
msgid "YOURLS local server path removed. "
|
923 |
+
msgstr ""
|
924 |
|
925 |
+
#: wp-to-twitter-shorteners.php:435
|
926 |
+
msgid "YOURLS will use Post ID for short URL slug."
|
927 |
+
msgstr ""
|
928 |
|
929 |
+
#: wp-to-twitter-shorteners.php:437
|
930 |
+
msgid "YOURLS will use your custom keyword for short URL slug."
|
931 |
+
msgstr ""
|
932 |
|
933 |
+
#: wp-to-twitter-shorteners.php:441
|
934 |
+
msgid "YOURLS will not use Post ID for the short URL slug."
|
935 |
+
msgstr ""
|
936 |
|
937 |
+
#: wp-to-twitter-shorteners.php:449
|
938 |
+
msgid "Su.pr API Key and Username Updated"
|
939 |
+
msgstr ""
|
940 |
|
941 |
+
#: wp-to-twitter-shorteners.php:453
|
942 |
+
msgid "Su.pr API Key and username deleted. Su.pr URLs created by WP to Twitter will no longer be associated with your account. "
|
943 |
+
msgstr ""
|
944 |
|
945 |
+
#: wp-to-twitter-shorteners.php:455
|
946 |
+
msgid "Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! "
|
947 |
+
msgstr ""
|
948 |
|
949 |
+
#: wp-to-twitter-shorteners.php:461
|
950 |
+
msgid "Bit.ly API Key Updated."
|
951 |
+
msgstr "Bit.ly: clave de API actualizada."
|
952 |
|
953 |
+
#: wp-to-twitter-shorteners.php:464
|
954 |
+
msgid "Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
955 |
+
msgstr "Clave API Bit.ly eliminada. You cannot use the Bit.ly API without an API key. "
|
956 |
|
957 |
+
#: wp-to-twitter-shorteners.php:466
|
958 |
+
msgid "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."
|
959 |
+
msgstr "Clave de API de Bit.ly no añadida - ¡<a href='http://bit.ly/account/'>consiga una</a>! Se necesita una clave de API para usar el servicio de acortar URLs."
|
960 |
|
961 |
+
#: wp-to-twitter-shorteners.php:470
|
962 |
+
msgid " Bit.ly User Login Updated."
|
963 |
+
msgstr "Bit.ly: usuario actualizado."
|
964 |
|
965 |
+
#: wp-to-twitter-shorteners.php:473
|
966 |
+
msgid "Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. "
|
967 |
+
msgstr "Nombre de usuario de Bit.ly borrado. No puede usar el servicio Bit.ly sin proporcionar un nombre de usuario."
|
968 |
|
969 |
+
#: wp-to-twitter-shorteners.php:475
|
970 |
+
msgid "Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
971 |
+
msgstr "Nombre de usuario de Bit.ly no añadido - ¡<a href='http://bit.ly/account/'>consiga uno</a>! "
|
972 |
|
973 |
+
#: wp-to-twitter-manager.php:427
|
974 |
+
msgid "<p>One or more of your last posts has failed to send a status update to Twitter. The Tweet has been saved, and you can re-Tweet it at your leisure.</p>"
|
975 |
+
msgstr ""
|
976 |
|
977 |
#: wp-to-twitter-manager.php:433
|
978 |
+
msgid "Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. "
|
979 |
+
msgstr "Lo siento, no he podido contactar con los servidores de Twitter para notificar su nuevo enlace. Tendrá que Tweetearlo manualmente."
|
|
|
|
|
|
|
|
|
980 |
|
981 |
+
#: wp-to-twitter-manager.php:436
|
982 |
+
msgid "<p>The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet. Check with your URL shortening provider to see if there are any known issues.</p>"
|
983 |
+
msgstr ""
|
984 |
|
985 |
#: wp-to-twitter-manager.php:442
|
986 |
+
msgid "Clear 'WP to Twitter' Error Messages"
|
987 |
+
msgstr "Borrar los errores de WP to Twitter"
|
|
|
|
|
|
|
|
|
988 |
|
989 |
+
#: wp-to-twitter-manager.php:448
|
990 |
+
msgid "WP to Twitter Options"
|
991 |
+
msgstr "Opciones de WP to Twitter"
|
992 |
|
993 |
+
#: wp-to-twitter-manager.php:461
|
994 |
+
msgid "Basic Settings"
|
995 |
+
msgstr ""
|
996 |
|
997 |
+
#: wp-to-twitter-manager.php:467 wp-to-twitter-manager.php:511
|
998 |
msgid "Save WP->Twitter Options"
|
999 |
msgstr "Guardar configuración WP->Twitter "
|
1000 |
|
1001 |
+
#: wp-to-twitter-manager.php:500
|
1002 |
+
msgid "Settings for Links"
|
1003 |
+
msgstr ""
|
1004 |
|
1005 |
+
#: wp-to-twitter-manager.php:503
|
1006 |
+
msgid "Update Twitter when you post a Blogroll link"
|
1007 |
+
msgstr "Actualice Twitter cuando publique un enlace de Blogroll"
|
1008 |
|
1009 |
+
#: wp-to-twitter-manager.php:504
|
1010 |
+
msgid "Text for new link updates:"
|
1011 |
+
msgstr "Texto para nuevos enlaces:"
|
1012 |
|
1013 |
+
#: wp-to-twitter-manager.php:504
|
1014 |
+
msgid "Available shortcodes: <code>#url#</code>, <code>#title#</code>, and <code>#description#</code>."
|
1015 |
+
msgstr "Códigos permitidos: <code>#url#</code>, <code>#title#</code>, and <code>#description#</code>."
|
1016 |
|
1017 |
+
#: wp-to-twitter-shorteners.php:547
|
1018 |
+
msgid "Don't shorten URLs."
|
1019 |
+
msgstr "No acortar URLs."
|
1020 |
|
1021 |
+
#: wp-to-twitter-shorteners.php:291
|
1022 |
+
msgid "<abbr title=\"Uniform Resource Locator\">URL</abbr> Shortener Account Settings"
|
1023 |
+
msgstr ""
|
1024 |
|
1025 |
+
#: wp-to-twitter-shorteners.php:295
|
1026 |
+
msgid "Your Su.pr account details"
|
1027 |
+
msgstr ""
|
1028 |
|
1029 |
+
#: wp-to-twitter-shorteners.php:300
|
1030 |
+
msgid "Your Su.pr Username:"
|
1031 |
+
msgstr ""
|
1032 |
|
1033 |
+
#: wp-to-twitter-shorteners.php:304
|
1034 |
+
msgid "Your Su.pr <abbr title='application programming interface'>API</abbr> Key:"
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: wp-to-twitter-shorteners.php:311
|
1038 |
+
msgid "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."
|
1039 |
+
msgstr ""
|
1040 |
|
1041 |
+
#: wp-to-twitter-shorteners.php:317
|
1042 |
msgid "Your Bit.ly account details"
|
1043 |
msgstr "Detalles de su cuenta Bit.ly"
|
1044 |
|
1045 |
+
#: wp-to-twitter-shorteners.php:322
|
1046 |
msgid "Your Bit.ly username:"
|
1047 |
msgstr "Su nombre de usuario de Bit.ly:"
|
1048 |
|
1049 |
+
#: wp-to-twitter-shorteners.php:326
|
1050 |
msgid "Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
1051 |
msgstr "Su clave Bit.ly <abbr title='application programming interface'>API</abbr>:"
|
1052 |
|
1053 |
+
#: wp-to-twitter-shorteners.php:334
|
1054 |
msgid "Save Bit.ly API Key"
|
1055 |
msgstr "Guardar clave Bit.ly"
|
1056 |
|
1057 |
+
#: wp-to-twitter-shorteners.php:334
|
1058 |
msgid "Clear Bit.ly API Key"
|
1059 |
msgstr "Borrar clave Bit.ly"
|
1060 |
|
1061 |
+
#: wp-to-twitter-shorteners.php:334
|
1062 |
msgid "A Bit.ly API key and username is required to shorten URLs via the Bit.ly API and WP to Twitter."
|
1063 |
msgstr "Se necesita un usuario y una clave API de Bit.ly para acortar URLs con la API de Bit.ly y WP to Twitter."
|
1064 |
|
1065 |
+
#: wp-to-twitter-shorteners.php:340
|
1066 |
+
msgid "Your YOURLS account details"
|
1067 |
+
msgstr ""
|
1068 |
+
|
1069 |
+
#: wp-to-twitter-shorteners.php:345
|
1070 |
+
msgid "Path to your YOURLS config file (Local installations)"
|
1071 |
+
msgstr ""
|
1072 |
|
1073 |
+
#: wp-to-twitter-shorteners.php:346 wp-to-twitter-shorteners.php:350
|
1074 |
+
msgid "Example:"
|
1075 |
+
msgstr ""
|
1076 |
+
|
1077 |
+
#: wp-to-twitter-shorteners.php:349
|
1078 |
+
msgid "URI to the YOURLS API (Remote installations)"
|
1079 |
+
msgstr ""
|
1080 |
|
1081 |
+
#: wp-to-twitter-shorteners.php:353
|
1082 |
+
msgid "Your YOURLS username:"
|
1083 |
+
msgstr ""
|
1084 |
|
1085 |
+
#: wp-to-twitter-shorteners.php:357
|
1086 |
+
msgid "Your YOURLS password:"
|
1087 |
+
msgstr ""
|
1088 |
|
1089 |
+
#: wp-to-twitter-shorteners.php:357
|
1090 |
+
msgid "<em>Saved</em>"
|
1091 |
+
msgstr ""
|
1092 |
|
1093 |
+
#: wp-to-twitter-shorteners.php:361
|
1094 |
+
msgid "Post ID for YOURLS url slug."
|
1095 |
+
msgstr ""
|
|
|
|
|
1096 |
|
1097 |
+
#: wp-to-twitter-shorteners.php:362
|
1098 |
+
msgid "Custom keyword for YOURLS url slug."
|
1099 |
+
msgstr ""
|
1100 |
|
1101 |
+
#: wp-to-twitter-shorteners.php:363
|
1102 |
+
msgid "Default: sequential URL numbering."
|
1103 |
+
msgstr ""
|
1104 |
|
1105 |
+
#: wp-to-twitter-shorteners.php:369
|
1106 |
+
msgid "Save YOURLS Account Info"
|
1107 |
+
msgstr ""
|
1108 |
|
1109 |
+
#: wp-to-twitter-shorteners.php:369
|
1110 |
+
msgid "Clear YOURLS password"
|
1111 |
+
msgstr ""
|
1112 |
|
1113 |
+
#: wp-to-twitter-shorteners.php:369
|
1114 |
+
msgid "A YOURLS password and username is required to shorten URLs via the remote YOURLS API and WP to Twitter."
|
1115 |
+
msgstr ""
|
1116 |
|
1117 |
+
#: wp-to-twitter-manager.php:522
|
1118 |
+
msgid "Advanced Settings"
|
1119 |
+
msgstr ""
|
1120 |
|
1121 |
+
#: wp-to-twitter-manager.php:527 wp-to-twitter-manager.php:706
|
1122 |
+
msgid "Save Advanced WP->Twitter Options"
|
1123 |
+
msgstr ""
|
1124 |
|
1125 |
+
#: wp-to-twitter-manager.php:532
|
1126 |
+
msgid "Strip nonalphanumeric characters from tags"
|
1127 |
+
msgstr ""
|
1128 |
|
1129 |
+
#: wp-to-twitter-manager.php:538
|
1130 |
+
msgid "Spaces in tags replaced with:"
|
1131 |
+
msgstr ""
|
1132 |
|
1133 |
+
#: wp-to-twitter-manager.php:541
|
1134 |
+
msgid "Maximum number of tags to include:"
|
1135 |
+
msgstr "Número máximo de tags a incluir:"
|
1136 |
|
1137 |
+
#: wp-to-twitter-manager.php:542
|
1138 |
+
msgid "Maximum length in characters for included tags:"
|
1139 |
+
msgstr "Máximo número de caracteres para los tags incluidos:"
|
1140 |
|
1141 |
+
#: wp-to-twitter-manager.php:548
|
1142 |
+
msgid "Length of post excerpt (in characters):"
|
1143 |
+
msgstr "Longitud del extracto de entrada (en caracteres):"
|
1144 |
+
|
1145 |
+
#: wp-to-twitter-manager.php:551
|
1146 |
+
msgid "WP to Twitter Date Formatting:"
|
1147 |
+
msgstr ""
|
1148 |
|
1149 |
+
#: wp-to-twitter-manager.php:551
|
1150 |
+
msgid "Default is from your general settings. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Date Formatting Documentation</a>."
|
1151 |
+
msgstr ""
|
1152 |
|
1153 |
+
#: wp-to-twitter-manager.php:555
|
1154 |
+
msgid "Custom text before all Tweets:"
|
1155 |
+
msgstr ""
|
1156 |
|
1157 |
+
#: wp-to-twitter-manager.php:558
|
1158 |
+
msgid "Custom text after all Tweets:"
|
1159 |
+
msgstr ""
|
1160 |
|
1161 |
+
#: wp-to-twitter-manager.php:561
|
1162 |
+
msgid "Custom field for an alternate URL to be shortened and Tweeted:"
|
1163 |
+
msgstr "Campo personalizado para una acortar y Tweetear una URL alternativa:"
|
1164 |
|
1165 |
+
#: wp-to-twitter-manager.php:598
|
1166 |
+
msgid "Special Cases when WordPress should send a Tweet"
|
1167 |
+
msgstr "Casos especiales en los que Wordpress debe enviar un Tweet"
|
1168 |
|
1169 |
+
#: wp-to-twitter-manager.php:601
|
1170 |
+
msgid "Do not post Tweets by default"
|
1171 |
+
msgstr ""
|
1172 |
|
1173 |
+
#: wp-to-twitter-manager.php:607
|
1174 |
+
msgid "Allow status updates from Quick Edit"
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
+
#: wp-to-twitter-manager.php:612
|
1178 |
+
msgid "Delaying tweets with WP Tweets PRO moves Tweeting to an publishing-independent action."
|
1179 |
+
msgstr ""
|
1180 |
+
|
1181 |
+
#: wp-to-twitter-manager.php:619
|
1182 |
+
msgid "Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"
|
1183 |
+
msgstr "Enviar las actualizaciones de Twitter en publicación remota (Post by Email o cliente XMLRPC)"
|
1184 |
+
|
1185 |
+
#: wp-to-twitter-manager.php:624
|
1186 |
+
msgid "Google Analytics Settings"
|
1187 |
+
msgstr ""
|
1188 |
+
|
1189 |
+
#: wp-to-twitter-manager.php:625
|
1190 |
+
msgid "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."
|
1191 |
+
msgstr ""
|
1192 |
+
|
1193 |
+
#: wp-to-twitter-manager.php:628
|
1194 |
+
msgid "Use a Static Identifier with WP-to-Twitter"
|
1195 |
+
msgstr ""
|
1196 |
+
|
1197 |
+
#: wp-to-twitter-manager.php:629
|
1198 |
+
msgid "Static Campaign identifier for Google Analytics:"
|
1199 |
+
msgstr ""
|
1200 |
+
|
1201 |
+
#: wp-to-twitter-manager.php:633
|
1202 |
+
msgid "Use a dynamic identifier with Google Analytics and WP-to-Twitter"
|
1203 |
+
msgstr ""
|
1204 |
+
|
1205 |
+
#: wp-to-twitter-manager.php:634
|
1206 |
+
msgid "What dynamic identifier would you like to use?"
|
1207 |
+
msgstr ""
|
1208 |
+
|
1209 |
+
#: wp-to-twitter-manager.php:636
|
1210 |
+
msgid "Category"
|
1211 |
+
msgstr ""
|
1212 |
+
|
1213 |
+
#: wp-to-twitter-manager.php:637
|
1214 |
+
msgid "Post ID"
|
1215 |
+
msgstr ""
|
1216 |
+
|
1217 |
+
#: wp-to-twitter-manager.php:638
|
1218 |
+
msgid "Post Title"
|
1219 |
+
msgstr ""
|
1220 |
|
1221 |
+
#: wp-to-twitter-manager.php:639
|
1222 |
+
msgid "Author"
|
1223 |
+
msgstr ""
|
lang/wp-to-twitter-it_IT.mo
CHANGED
Binary file
|
lang/wp-to-twitter-it_IT.po
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# This file is distributed under the same license as the WP to Twitter package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"PO-Revision-Date: 2013-
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -10,744 +10,847 @@ msgstr ""
|
|
10 |
"X-Generator: GlotPress/0.1\n"
|
11 |
"Project-Id-Version: WP to Twitter\n"
|
12 |
|
13 |
-
#: wp-to-twitter-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
msgid "Your jotURL account details"
|
15 |
-
msgstr "
|
16 |
|
17 |
-
#: wp-to-twitter-shorteners.php:
|
18 |
msgid "Your jotURL public <abbr title='application programming interface'>API</abbr> key:"
|
19 |
msgstr "La tua chiave pubblica per le <abbr title='application programming interface'>API</abbr> di jotURL:"
|
20 |
|
21 |
-
#: wp-to-twitter-shorteners.php:
|
22 |
msgid "Your jotURL private <abbr title='application programming interface'>API</abbr> key:"
|
23 |
msgstr "La tua chiave privata per le <abbr title='application programming interface'>API</abbr> di jotURL:"
|
24 |
|
25 |
-
#: wp-to-twitter-shorteners.php:
|
26 |
msgid "Parameters to add to the long URL (before shortening):"
|
27 |
msgstr "Parametri da aggiungere alla URL lunga (prima di accorciarla):"
|
28 |
|
29 |
-
#: wp-to-twitter-shorteners.php:
|
30 |
msgid "Parameters to add to the short URL (after shortening):"
|
31 |
msgstr "Parametri da aggiungere alla URL breve (dopo averla accorciata):"
|
32 |
|
33 |
-
#: wp-to-twitter-shorteners.php:
|
34 |
msgid "View your jotURL public and private API key"
|
35 |
msgstr "Visualizza la tua chiave pubblica e privata per le API di jotURL"
|
36 |
|
37 |
-
#: wp-to-twitter-shorteners.php:
|
38 |
msgid "Save jotURL settings"
|
39 |
msgstr "Salva le impostazioni per jotURL"
|
40 |
|
41 |
-
#: wp-to-twitter-shorteners.php:
|
42 |
msgid "Clear jotURL settings"
|
43 |
msgstr "Cancella le impostazioni di jotURL"
|
44 |
|
45 |
-
#: wp-to-twitter-shorteners.php:
|
46 |
msgid "A jotURL public and private API key is required to shorten URLs via the jotURL API and WP to Twitter."
|
47 |
msgstr "Una chiave pubblica e privata per le API di jotURL è richiesta per accorciare le URL tramite le API di jotURL e WP to Twitter."
|
48 |
|
49 |
-
#: wp-to-twitter-shorteners.php:
|
50 |
msgid "jotURL private API Key Updated. "
|
51 |
msgstr "La tua chiave privata per le API di jotURL è stata aggiornata."
|
52 |
|
53 |
-
#: wp-to-twitter-shorteners.php:
|
54 |
msgid "jotURL private API Key deleted. You cannot use the jotURL API without a private API key. "
|
55 |
msgstr "Chiave privata per le API di jotURL cancellata. Non puoi usare le API di jotURL senza una chiave privata."
|
56 |
|
57 |
-
#: wp-to-twitter-shorteners.php:
|
58 |
msgid "jotURL private API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! A private API key is required to use the jotURL URL shortening service. "
|
59 |
msgstr "Chiave privata per le API di jotURL non aggiunta - <a href='https://www.joturl.com/reserved/api.html'>recuperane una qua</a>! Una chiave privata è richiesta per usare il servizio di accorciamento URL di jotURL."
|
60 |
|
61 |
-
#: wp-to-twitter-shorteners.php:
|
62 |
msgid "jotURL public API Key Updated. "
|
63 |
msgstr "Chiave pubblica per le API di jotURL aggiornata."
|
64 |
|
65 |
-
#: wp-to-twitter-shorteners.php:
|
66 |
msgid "jotURL public API Key deleted. You cannot use the jotURL API without providing your public API Key. "
|
67 |
msgstr "Chiave pubblica per le API di jotURL cancellata. Non puoi usare le API di jotURL senza fornire la tua chiave pubblica per le API."
|
68 |
|
69 |
-
#: wp-to-twitter-shorteners.php:
|
70 |
msgid "jotURL public API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! "
|
71 |
msgstr "Chiave pubblica per le API di jorURL non aggiunta - <a href='https://www.joturl.com/reserved/api.html'>recuperane una qua</a>! "
|
72 |
|
73 |
-
#: wp-to-twitter-shorteners.php:
|
74 |
msgid "Long URL parameters added. "
|
75 |
msgstr "Parametri aggiunti per l'URL lungo."
|
76 |
|
77 |
-
#: wp-to-twitter-shorteners.php:
|
78 |
msgid "Long URL parameters deleted. "
|
79 |
msgstr "Parametri cancellati per l'URL lungo."
|
80 |
|
81 |
-
#: wp-to-twitter-shorteners.php:
|
82 |
msgid "Short URL parameters added. "
|
83 |
msgstr "Parametri aggiunti per l'URL breve."
|
84 |
|
85 |
-
#: wp-to-twitter-shorteners.php:
|
86 |
msgid "Short URL parameters deleted. "
|
87 |
msgstr "Parametri cancellati per l'URL breve."
|
88 |
|
89 |
-
#: wp-to-twitter-shorteners.php:
|
90 |
msgid "You must add your jotURL public and private API key in order to shorten URLs with jotURL."
|
91 |
msgstr "Devi aggiungere la tua chiave pubblica e privata per le API di jotURL per accorciare le URL tramite il servizio di jotURL."
|
92 |
|
93 |
-
#: wp-to-twitter-manager.php:
|
94 |
msgid "Tags"
|
95 |
msgstr "Tag"
|
96 |
|
97 |
-
#: wp-to-twitter-manager.php:
|
98 |
msgid "Template Tag Settings"
|
99 |
msgstr "Impostazioni Template Tag"
|
100 |
|
101 |
-
#: wp-to-twitter-manager.php:
|
102 |
msgid "Extracted from the post. If you use the 'Excerpt' field, it will be used instead."
|
103 |
msgstr "Estratto dall'articolo. Sarà utilizzato in alternativa se si utilizza il campo 'Riassunto'."
|
104 |
|
105 |
-
#: wp-to-twitter-manager.php:
|
106 |
msgid "Template tag priority order"
|
107 |
msgstr "Ordine di priorità dei Template Tag"
|
108 |
|
109 |
-
#: wp-to-twitter-manager.php:
|
110 |
msgid "The order in which items will be abbreviated or removed from your Tweet if the Tweet is too long to send to Twitter."
|
111 |
msgstr "L'ordine in cui gli elementi saranno abbreviati o rimossi dal tuo Tweet se quest'ultimo è troppo lungo per essere inviata a Twitter."
|
112 |
|
113 |
-
#: wp-to-twitter-manager.php:
|
114 |
msgid "Author Settings"
|
115 |
msgstr "Impostazioni autore"
|
116 |
|
117 |
-
#: wp-to-twitter-manager.php:
|
118 |
msgid "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."
|
119 |
msgstr "Gli autori possono indicare il loro nome utente nel proprio profilo. La versione free di WP to Twitter aggiunge un @reference all'autore. @reference può essere inserito con lo shortcode <code>#account#</code> che preleverà il nome dell'account principale se l'account utente non è configurato."
|
120 |
|
121 |
-
#: wp-to-twitter-manager.php:
|
122 |
msgid "Permissions"
|
123 |
msgstr "Permessi"
|
124 |
|
125 |
-
#: wp-to-twitter-manager.php:
|
126 |
msgid "Error Messages and Debugging"
|
127 |
msgstr "Messaggi di errore e di Debug"
|
128 |
|
129 |
-
#: wp-to-twitter-manager.php:
|
130 |
msgid "<code>#cat_desc#</code>: custom value from the category description field"
|
131 |
msgstr "<code>#cat_desc#</code>: valore personalizzato per il campo di descrizione della categoria"
|
132 |
|
133 |
-
#: wp-to-twitter-manager.php:
|
134 |
msgid "<code>#@#</code>: the twitter @reference for the author or blank, if not set"
|
135 |
msgstr "<code>#@#</code>: @reference di Twitter per l'autore o vuoto se non settato"
|
136 |
|
137 |
-
#: wp-to-twitter-oauth.php:
|
138 |
msgid "Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> queries</a>."
|
139 |
msgstr "Problemi di connessione? Prova ad usare <a href='#wpt_http'>il protocollo <code>http</code></a>."
|
140 |
|
141 |
-
#: wp-to-twitter-oauth.php:
|
142 |
msgid "<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>"
|
143 |
msgstr "<strong>Suggerimento per la risoluzione dei problemi:</strong> Sei connesso ma ricevi un messaggio di errore che dice che le tue credenziali di accesso sono mancanti o incorrette? Controlla che il token di accesso abbia permessi di lettura/scrittura. Se non è così devi creare un nuovo token. <a href=\"http://www.joedolson.com/articles/wp-to-twitter/support-2/#q1\">Leggi le FAQ</a>"
|
144 |
|
145 |
-
#: wp-to-twitter-oauth.php:
|
146 |
msgid "Twitter's server time: "
|
147 |
msgstr "Ora del server di Twitter"
|
148 |
|
149 |
-
#: wp-to-twitter.php:
|
150 |
msgid "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>"
|
151 |
msgstr "WP to Twitter richiede WordPress 3.1.4 o una versione più recente <a href=\"http://codex.wordpress.org/Upgrading_WordPress\">Aggiorna WordPress per usare tutte le funzionalità di WP to Twitter!</a>"
|
152 |
|
153 |
-
#: wp-to-twitter.php:
|
154 |
msgid "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."
|
155 |
msgstr "403 Proibito: La richiesta è corretta ma è stata rifiutata da Twitter. Motivazioni: troppi Twewt in un breve lasso di tempo o il medesimo Tweet è stato inviato 2 volte. Questo non è un errore del plugin WP to Twitter."
|
156 |
|
157 |
-
#: wp-to-twitter.php:
|
158 |
msgid "Upgrade"
|
159 |
msgstr "Passa alla versione PRO"
|
160 |
|
161 |
-
#: wp-to-twitter-manager.php:
|
162 |
msgid "Use tag slug as hashtag value"
|
163 |
msgstr "Usa il tag slug come valore hashtag"
|
164 |
|
165 |
-
#: wp-to-twitter.php:
|
166 |
-
msgid "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>."
|
167 |
-
msgstr "I Tweet sono possono contenere al massimo 140 caratteri; Twitter considera gli URL come lunghi 20 o 21 caratteri. Template tag: <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>, o <code>#blog#</code>."
|
168 |
-
|
169 |
-
#: wp-to-twitter-manager.php:176
|
170 |
msgid "WP to Twitter failed to connect with Twitter. Try <a href=\"#wpt_http\">switching to an HTTP connection</a>."
|
171 |
msgstr "WP to Twitter ha fallito nel connettersi a Twitter. Prova <a href=\"#wpt_http\">a passare ad una connessione di tipo HTTP</a>."
|
172 |
|
173 |
-
#: wp-to-twitter-shorteners.php:
|
174 |
msgid "Choose a short URL service (account settings below)"
|
175 |
msgstr "Scegli un servizio di accorciamento delle URL (impostazioni dell'account di seguito)"
|
176 |
|
177 |
-
#: wp-to-twitter-shorteners.php:
|
178 |
msgid "YOURLS (on this server)"
|
179 |
msgstr "YOURLS (su questo server)"
|
180 |
|
181 |
-
#: wp-to-twitter-shorteners.php:
|
182 |
msgid "YOURLS (on a remote server)"
|
183 |
msgstr "YOURLS (sul server remoto)"
|
184 |
|
185 |
-
#:
|
186 |
-
msgid "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."
|
187 |
-
msgstr "In aggiunta ai template tag standard, si può usare <code>#commenter#</code> per inserire il nome del commentatore nel Tweet. <em>Usa a tuo rischio</em>, dal momento che questo consente a tutti coloro che commentano il tuo articolo di postare un Tweet sul tuo stream di Twitter."
|
188 |
-
|
189 |
-
#: wp-to-twitter.php:60
|
190 |
-
msgid "The current version of WP Tweets PRO is <strong>%s</strong>. Upgrade for best compatibility!"
|
191 |
-
msgstr "La versione attuale di WP Tweets PRO è <strong>%s</strong>. Aggiorna per avere una migliore compatibilità!"
|
192 |
-
|
193 |
-
#: wpt-functions.php:239
|
194 |
msgid "Thank you for supporting the continuing development of this plug-in! I'll get back to you as soon as I can. Please ensure that you can receive email at <code>%s</code>."
|
195 |
msgstr "Grazie per supportare il proseguimento dello sviluppo di questo plug-in! Mi farò vivo appena possibile. Per favore, assicurati che tu possa ricevere le email a <code>%s</code>."
|
196 |
|
197 |
-
#: wpt-functions.php:
|
198 |
msgid "Thanks for using WP to Twitter. Please ensure that you can receive email at <code>%s</code>."
|
199 |
msgstr "Grazie per l'uso di WP to Twitter. Per favore assicurati di poter ricevere email a <code>%s</code>."
|
200 |
|
201 |
-
#: wpt-functions.php:
|
202 |
msgid "Reply to:"
|
203 |
msgstr "Rispondi a:"
|
204 |
|
205 |
-
#: wp-to-twitter-manager.php:
|
206 |
msgid "The lowest user group that can add their Twitter information"
|
207 |
msgstr "Il gruppo di livello più basso che può aggiungere le proprie informazioni di Twitter"
|
208 |
|
209 |
-
#: wp-to-twitter-manager.php:
|
210 |
msgid "The lowest user group that can see the Custom Tweet options when posting"
|
211 |
msgstr "Il gruppo di livello più basso che può vedere l'opzione Tweet personalizzato quando scrive un articolo"
|
212 |
|
213 |
-
#: wp-to-twitter-manager.php:
|
214 |
msgid "The lowest user group that can toggle the Tweet/Don't Tweet option"
|
215 |
msgstr "Il gruppo di livello più basso che può attivare o disattivare l'opzione Inviare/Non inviare Tweet"
|
216 |
|
217 |
-
#: wp-to-twitter-manager.php:
|
218 |
msgid "The lowest user group that can send Twitter updates"
|
219 |
msgstr "Il gruppo di livello più basso che può inviare aggiornamenti su Twitter"
|
220 |
|
221 |
-
#: wp-to-twitter-manager.php:
|
222 |
msgid "<code>#author#</code>: the post author (@reference if available, otherwise display name)"
|
223 |
msgstr "<code>#author#</code>: l'autore dell'articolo (@account se disponibile, il nome da visualizzare altrimenti)"
|
224 |
|
225 |
-
#: wp-to-twitter-manager.php:
|
226 |
msgid "<code>#displayname#</code>: post author's display name"
|
227 |
msgstr "<code>#displayname#</code>: Il nome da visualizzare per l'autore dell'articolo"
|
228 |
|
229 |
-
#: wp-to-twitter.php:
|
230 |
msgid "This tweet was blank and could not be sent to Twitter."
|
231 |
msgstr "Questo tweet è vuoto e non può essere inviato a Twitter."
|
232 |
|
233 |
-
#: wp-to-twitter.php:
|
234 |
msgid "404 Not Found: The URI requested is invalid or the resource requested does not exist."
|
235 |
msgstr "404 Not Found: L'URI richiesto non è valido o la risorsa richiesta non esiste."
|
236 |
|
237 |
-
#: wp-to-twitter.php:
|
238 |
msgid "406 Not Acceptable: Invalid Format Specified."
|
239 |
msgstr "406 Not Acceptable: Il formato specificato non è valido."
|
240 |
|
241 |
-
#: wp-to-twitter.php:
|
242 |
msgid "429 Too Many Requests: You have exceeded your rate limits."
|
243 |
msgstr "429 Too Many Requests: Hai raggiunto la tua quota limite."
|
244 |
|
245 |
-
#: wp-to-twitter.php:
|
246 |
msgid "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."
|
247 |
msgstr "504 Gateway Timeout: I server di Twitter funzionano ma la richiesta non è stata soddisfatta a causa di qualche errore. Per favore, riprova in seguito."
|
248 |
|
249 |
-
#: wp-to-twitter.php:
|
250 |
msgid "Your prepended Tweet text; not part of your template."
|
251 |
msgstr "Testo inserito all'inizio dei tuoi Tweet (non fa parte dei tuo modello)."
|
252 |
|
253 |
-
#: wp-to-twitter.php:
|
254 |
msgid "Your appended Tweet text; not part of your template."
|
255 |
msgstr "Testo inserito alla fine dei tuoi Tweet (non fa parte dei tuo modello)."
|
256 |
|
257 |
-
#: wp-to-twitter.php:
|
258 |
msgid "Your role does not have the ability to Post Tweets from this site."
|
259 |
msgstr "Il tuo ruolo non permette di inviare Tweet da questo sito."
|
260 |
|
261 |
-
#: wp-to-twitter.php:
|
262 |
msgid "Hide account name in Tweets"
|
263 |
msgstr "Nascondi il nome dell'account nei Tweet"
|
264 |
|
265 |
-
#: wp-to-twitter.php:
|
266 |
msgid "Do not display my account in the #account# template tag."
|
267 |
msgstr "Non visualizzare il mio account nel template #account#."
|
268 |
|
269 |
-
#: wpt-functions.php:
|
270 |
msgid "I have read <a href=\"%1$s\">the FAQ for this plug-in</a> <span>(required)</span>"
|
271 |
msgstr "Io ho letto <a href=\"%1$s\">le FAQ di questo plug-in</a> <span>(obbligatorio)</span>"
|
272 |
|
273 |
-
#: wpt-functions.php:
|
274 |
msgid "I have <a href=\"%1$s\">made a donation to help support this plug-in</a>"
|
275 |
msgstr "Io ho <a href=\"%1$s\"> fatto una donazione per supportare questo plugin</a>"
|
276 |
|
277 |
-
#: wpt-functions.php:
|
278 |
msgid "Support Request:"
|
279 |
msgstr "Richiesta di supporto:"
|
280 |
|
281 |
-
#: wp-to-twitter-manager.php:
|
282 |
msgid "Settings for type \"%1$s\""
|
283 |
msgstr "Impostazioni per il tipo \"%1$s\""
|
284 |
|
285 |
-
#: wp-to-twitter-manager.php:
|
286 |
msgid "Update when %1$s %2$s is published"
|
287 |
msgstr "Aggiorna quando %1$s %2$s è pubblicato"
|
288 |
|
289 |
-
#: wp-to-twitter-manager.php:
|
290 |
msgid "Text for new %1$s updates"
|
291 |
msgstr "Testo per nuovo %1$s aggiornato"
|
292 |
|
293 |
-
#: wp-to-twitter-manager.php:
|
294 |
msgid "Update when %1$s %2$s is edited"
|
295 |
msgstr "Aggiorna quando %1$s %2$s è modificato"
|
296 |
|
297 |
-
#: wp-to-twitter-manager.php:
|
298 |
msgid "Text for %1$s editing updates"
|
299 |
msgstr "Testo per %1$s aggiornato"
|
300 |
|
301 |
-
#: wp-to-twitter-oauth.php:
|
302 |
msgid "Your server timezone (should be UTC,GMT,Europe/London or equivalent):"
|
303 |
msgstr "Il fuso orario del tuo server (dovrebbe essere UTC,GMT,Europe/London o equivalente):"
|
304 |
|
305 |
-
#: wp-to-twitter-shorteners.php:
|
306 |
msgid "Use Twitter Friendly Links."
|
307 |
msgstr "Utilizza Link in formato gradito a Twitter."
|
308 |
|
309 |
-
#: wp-to-twitter-shorteners.php:
|
310 |
msgid "View your Bit.ly username and API key"
|
311 |
msgstr "Visualizza il tuo username di Bit.ly e la API key"
|
312 |
|
313 |
-
#: wp-to-twitter-shorteners.php:
|
314 |
msgid "Your shortener does not require any account settings."
|
315 |
msgstr "Il tuo accorciatore di URL non richiede alcuna impostazione."
|
316 |
|
317 |
-
#: wp-to-twitter.php:
|
318 |
msgid "Your Twitter application does not have read and write permissions. Go to <a href=\"%s\">your Twitter apps</a> to modify these settings."
|
319 |
msgstr "La tua applicazione Twitter non ha i permessi di lettura e scrittura. Vai alle <a href=\"%s\">tue applicazioni Twitter</a> per modificare queste impostazioni."
|
320 |
|
321 |
-
#: wp-to-twitter.php:
|
322 |
msgid "Failed Tweets"
|
323 |
msgstr "Tweet falliti"
|
324 |
|
325 |
-
#: wp-to-twitter.php:
|
326 |
msgid "No failed tweets on this post."
|
327 |
msgstr "Non ci sono tweet falliti in questo articolo."
|
328 |
|
329 |
-
#: wp-to-twitter-manager.php:
|
330 |
msgid "Upgrade to <strong>WP Tweets PRO</strong> for more options!"
|
331 |
msgstr "Aggiorna a <strong>WP Tweets PRO</strong> per avere più opzioni!"
|
332 |
|
333 |
-
#: wp-to-twitter-manager.php:
|
334 |
msgid "<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."
|
335 |
msgstr "<code>#reference#</code>: Usato solo nel co-tweeting. @riferisce all'account principale quando è inviato all'account dell'autore, @riferisce all'account dell'autore per i post all'account principale."
|
336 |
|
337 |
-
#: wp-to-twitter-oauth.php:
|
338 |
msgid "WP to Twitter could not contact Twitter's remote server. Here is the error triggered: "
|
339 |
msgstr "WP to Twitter non è riuscito a contattare i server di Twitter. Questo è l'errore ottenuto:"
|
340 |
|
341 |
-
#: wp-to-twitter.php:
|
342 |
msgid "This account is not authorized to post to Twitter."
|
343 |
msgstr "Questo account non è autorizzato per inviare messaggi su Twitter."
|
344 |
|
345 |
-
#: wp-to-twitter.php:
|
346 |
msgid "This tweet is identical to another Tweet recently sent to this account."
|
347 |
msgstr "Questo tweet è identico ad un altro tweet recentemente inviato a questo account."
|
348 |
|
349 |
-
#: wp-to-twitter.php:
|
350 |
-
msgid "WP to Twitter can do more for you! Take a look at WP Tweets Pro!"
|
351 |
-
msgstr "WP to Twitter può fare molto altro per te! Dai uno sguardo a WP Tweets Pro!"
|
352 |
-
|
353 |
-
#: wp-to-twitter-shorteners.php:295
|
354 |
msgid "(optional)"
|
355 |
msgstr "(facoltativo)"
|
356 |
|
357 |
-
#: wp-to-twitter-manager.php:
|
358 |
msgid "Do not post Tweets by default (editing only)"
|
359 |
msgstr "Di default non inviare i Tweet (solo modifica)"
|
360 |
|
361 |
-
#: wp-to-twitter-manager.php:
|
362 |
msgid "<code>#modified#</code>: the post modified date"
|
363 |
msgstr "<code>#modified#</code>: la data di modifica del post"
|
364 |
|
365 |
-
#: wp-to-twitter-oauth.php:
|
366 |
msgid "Your time stamps are more than 5 minutes apart. Your server could lose its connection with Twitter."
|
367 |
msgstr "Il tuo orario ha più di 5 minuti di differenza con Twitter e pertanto il tuo server potrebbe perdere la connessione con i loro."
|
368 |
|
369 |
-
#: wp-to-twitter-manager.php:
|
370 |
msgid "Authors have individual Twitter accounts"
|
371 |
msgstr "Gli autori hanno degli account personali su Twitter"
|
372 |
|
373 |
-
#: wp-to-twitter-manager.php:
|
374 |
msgid "Disable global URL shortener error messages."
|
375 |
msgstr "Disattiva i messaggi di errore globali generati accorciando la URL."
|
376 |
|
377 |
-
#: wp-to-twitter-manager.php:
|
378 |
msgid "Disable global Twitter API error messages."
|
379 |
msgstr "Disattiva i messaggi di errore globali API Twitter."
|
380 |
|
381 |
-
#: wp-to-twitter-manager.php:
|
382 |
msgid "Get Debugging Data for OAuth Connection"
|
383 |
msgstr "Ottieni i dati di Debugging per la connessione OAuth"
|
384 |
|
385 |
-
#: wp-to-twitter-manager.php:
|
386 |
msgid "Switch to <code>http</code> connection. (Default is https)"
|
387 |
msgstr "Passa alla connessione <code>http</code>. (Quella di default è https)"
|
388 |
|
389 |
-
#: wp-to-twitter-manager.php:
|
390 |
msgid "I made a donation, so stop whinging at me, please."
|
391 |
msgstr "Ho effettuato una donazione."
|
392 |
|
393 |
-
#: wp-to-twitter-manager.php:
|
394 |
msgid "Limit Updating Categories"
|
395 |
msgstr "Limite aggiornamento categorie"
|
396 |
|
397 |
-
#: wp-to-twitter-manager.php:
|
398 |
msgid "If no categories are checked, limiting by category will be ignored, and all categories will be Tweeted."
|
399 |
msgstr "Se non ci sono categorie selezionate il blocco di alcune sarà ignorato e tutte le categorie verranno prese in considerazione per i Tweet."
|
400 |
|
401 |
-
#: wp-to-twitter-manager.php:
|
402 |
msgid "<em>Category limits are disabled.</em>"
|
403 |
msgstr "<em>Le limitazioni alle categorie non sono attive.</em>"
|
404 |
|
405 |
-
#: wp-to-twitter-manager.php:
|
406 |
msgid "Get Plug-in Support"
|
407 |
msgstr "Ottieni supporto per il plugin"
|
408 |
|
409 |
-
#: wp-to-twitter-manager.php:
|
410 |
msgid "Check Support"
|
411 |
msgstr "Verifica assistenza"
|
412 |
|
413 |
-
#: wp-to-twitter-manager.php:
|
414 |
msgid "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."
|
415 |
msgstr "Utilizzare nel caso in cui il tuo server supporti le query di <a href=\"http://www.joedolson.com/articles/wp-to-twitter/\">WP to Twitter</a> per Twitter e per le API di accorciamento URL. Questo test invierà a Twitter un aggiornamento dello stato e accorcerà la URL utilizzando il metodo da te selezionato."
|
416 |
|
417 |
-
#: wp-to-twitter-manager.php:
|
418 |
msgid "Support WP to Twitter"
|
419 |
msgstr "Supporta WP to Twitter"
|
420 |
|
421 |
-
#: wp-to-twitter-manager.php:
|
422 |
msgid "WP to Twitter Support"
|
423 |
msgstr "Assistenza WP to Twitter"
|
424 |
|
425 |
-
#: wp-to-twitter-manager.php:
|
426 |
msgid "Get Support"
|
427 |
msgstr "Ottieni assistenza"
|
428 |
|
429 |
-
#: wp-to-twitter-manager.php:
|
430 |
msgid "<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!"
|
431 |
msgstr "<a href=\"http://www.joedolson.com/donate.php\">Fai una donazione oggi!</a> Ogni donazione conta - dona $2, $10, o $100 e aiutami a mantenere attivo questo plug-in!"
|
432 |
|
433 |
-
#: wp-to-twitter-manager.php:
|
434 |
msgid "Upgrade Now!"
|
435 |
msgstr "Aggiorna ora!"
|
436 |
|
437 |
-
#: wp-to-twitter-manager.php:
|
438 |
msgid "Extra features with the PRO upgrade:"
|
439 |
msgstr "Funzionalità extra che avrai con WP Tweets PRO:"
|
440 |
|
441 |
-
#: wp-to-twitter-manager.php:
|
442 |
-
msgid "Users can post to their own Twitter accounts"
|
443 |
-
msgstr "Gli utenti possono inviare i post al loro account Twitter"
|
444 |
-
|
445 |
-
#: wp-to-twitter-manager.php:787
|
446 |
-
msgid "Set a timer to send your Tweet minutes or hours after you publish the post"
|
447 |
-
msgstr "Imposta un timer per inviare i tuoi Tweet dopo minuti oppure ore dalla pubblicazione del post"
|
448 |
-
|
449 |
-
#: wp-to-twitter-manager.php:788
|
450 |
-
msgid "Automatically re-send Tweets at an assigned time after publishing"
|
451 |
-
msgstr "Invia nuovamente i Tweet dopo un certo periodo dopo la pubblicazione"
|
452 |
-
|
453 |
-
#: wp-to-twitter-manager.php:797
|
454 |
msgid "Shortcodes"
|
455 |
msgstr "Codici brevi"
|
456 |
|
457 |
-
#: wp-to-twitter-manager.php:
|
458 |
msgid "Available in post update templates:"
|
459 |
msgstr "Disponibili nei template di aggiornamento del post:"
|
460 |
|
461 |
-
#: wp-to-twitter-manager.php:
|
462 |
msgid "<code>#title#</code>: the title of your blog post"
|
463 |
msgstr "<code>#title#</code>: il titolo del tuo post"
|
464 |
|
465 |
-
#: wp-to-twitter-manager.php:
|
466 |
msgid "<code>#blog#</code>: the title of your blog"
|
467 |
msgstr "<code>#blog#</code>: il titolo del tuo blog"
|
468 |
|
469 |
-
#: wp-to-twitter-manager.php:
|
470 |
msgid "<code>#post#</code>: a short excerpt of the post content"
|
471 |
msgstr "<code>#post#</code>: un breve riassunto dei contenuti del post"
|
472 |
|
473 |
-
#: wp-to-twitter-manager.php:
|
474 |
msgid "<code>#category#</code>: the first selected category for the post"
|
475 |
msgstr "<code>#category#</code>: la prima categoria selezionata per il post"
|
476 |
|
477 |
-
#: wp-to-twitter-manager.php:
|
478 |
msgid "<code>#date#</code>: the post date"
|
479 |
msgstr "<code>#date#</code>: la data del post"
|
480 |
|
481 |
-
#: wp-to-twitter-manager.php:
|
482 |
msgid "<code>#url#</code>: the post URL"
|
483 |
msgstr "<code>#url#</code>: l'URL del post"
|
484 |
|
485 |
-
#: wp-to-twitter-manager.php:
|
486 |
msgid "<code>#account#</code>: the twitter @reference for the account (or the author, if author settings are enabled and set.)"
|
487 |
msgstr "<code>#account#</code>: il riferimento Twitter @ per l'account (o per l'autore, previa attivazione ed impostazione.)"
|
488 |
|
489 |
-
#: wp-to-twitter-manager.php:
|
490 |
msgid "<code>#tags#</code>: your tags modified into hashtags. See options in the Advanced Settings section, below."
|
491 |
msgstr "<code>#tags#</code>: i tuoi tag modificati in hashtag. Vedi le opzioni nelle Impostazioni Avanzate più in basso."
|
492 |
|
493 |
-
#: wp-to-twitter-manager.php:
|
494 |
msgid "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>"
|
495 |
msgstr "Hai la possibilità di potere creare degli shortcode personalizzati grazie ai campi personalizzati di WordPress. Utilizza le doppie parentesi quadre per avvolgere il nome del tuo campo personalizzato per aggiungere il valore di quel dato campo al tuo stato di aggiornamento. Esempio: <code>[[custom_field]]</code></p>"
|
496 |
|
497 |
-
#: wp-to-twitter-oauth.php:
|
498 |
msgid "WP to Twitter was unable to establish a connection to Twitter."
|
499 |
msgstr "WP to Twitter non è riuscito a stabilire una connessione con Twitter."
|
500 |
|
501 |
-
#: wp-to-twitter-oauth.php:
|
502 |
msgid "There was an error querying Twitter's servers"
|
503 |
msgstr "C'è stato un errore nell'interrogare i server di Twitter"
|
504 |
|
505 |
-
#: wp-to-twitter-oauth.php:
|
506 |
msgid "Connect to Twitter"
|
507 |
msgstr "Collegati a Twitter"
|
508 |
|
509 |
-
#: wp-to-twitter-oauth.php:
|
510 |
msgid "WP to Twitter Set-up"
|
511 |
msgstr "Impostazioni WP to Twitter"
|
512 |
|
513 |
-
#: wp-to-twitter-oauth.php:
|
514 |
-
#: wp-to-twitter-oauth.php:
|
515 |
msgid "Your server time:"
|
516 |
msgstr "Ora del tuo server:"
|
517 |
|
518 |
-
#: wp-to-twitter-oauth.php:
|
519 |
msgid "Twitter's time:"
|
520 |
msgstr "Orario di Twitter:"
|
521 |
|
522 |
-
#: wp-to-twitter-oauth.php:
|
523 |
msgid "If these timestamps are not within 5 minutes of each other, your server will not connect to Twitter."
|
524 |
msgstr "Se questi orari non sono distanti al più 5 minuti l'uno dall'altro, il tuo server non sarà in grado di connettersi a Twitter."
|
525 |
|
526 |
-
#: wp-to-twitter-oauth.php:
|
527 |
msgid "1. Register this site as an application on "
|
528 |
msgstr "1. Registra questo sito come una applicazione sulla "
|
529 |
|
530 |
-
#: wp-to-twitter-oauth.php:
|
531 |
msgid "Twitter's application registration page"
|
532 |
msgstr "pagina di registrazione applicazione Twitter"
|
533 |
|
534 |
-
#: wp-to-twitter-oauth.php:
|
535 |
msgid "If you're not currently logged in to Twitter, log-in to the account you want associated with this site"
|
536 |
msgstr "Se non sei ancora loggato in Twitter, effettua il login nell'account che vuoi associare al sito"
|
537 |
|
538 |
-
#: wp-to-twitter-oauth.php:
|
539 |
-
msgid "Your Application's Name will show up after \"via\" in your twitter stream. Your application name cannot include the word \"Twitter.\""
|
540 |
-
msgstr "Il nome della tua applicazione (Application's Name) verrà mostrato dopo \"via\" nei tuoi tweet. Il nome della tua applicazione non può includere la parola \"Twitter\"."
|
541 |
-
|
542 |
-
#: wp-to-twitter-oauth.php:217
|
543 |
msgid "Your Application Description can be anything."
|
544 |
msgstr "La descrizione dell'applicazione (Application Description) può essere qualsiasi cosa."
|
545 |
|
546 |
-
#: wp-to-twitter-oauth.php:
|
547 |
msgid "The WebSite and Callback URL should be "
|
548 |
msgstr "Il sito web ed il Callback URL dovrebbere essere "
|
549 |
|
550 |
-
#: wp-to-twitter-oauth.php:
|
551 |
msgid "Agree to the Developer Rules of the Road and continue."
|
552 |
msgstr "Acconsenti a Developer Rules of the Road e prosegui."
|
553 |
|
554 |
-
#: wp-to-twitter-oauth.php:
|
555 |
msgid "2. Switch to the \"Settings\" tab in Twitter apps"
|
556 |
msgstr "2. Passa alla scheda \"Impostazioni\" (\"Settings\") nelle app di Twitter"
|
557 |
|
558 |
-
#: wp-to-twitter-oauth.php:
|
559 |
msgid "Select \"Read and Write\" for the Application Type"
|
560 |
msgstr "Seleziona \"Read and Write\" per il tipo di applicazione"
|
561 |
|
562 |
-
#: wp-to-twitter-oauth.php:
|
563 |
msgid "Update the application settings"
|
564 |
msgstr "Aggiorna impostazioni applicazione"
|
565 |
|
566 |
-
#: wp-to-twitter-oauth.php:
|
567 |
-
msgid "Return to the Details tab and create your access token. Refresh page to view your access tokens."
|
568 |
-
msgstr "Ritorna alla scheda \"Dettagli\" (\"Details\") e crea il tuo token di accesso. Aggiorna la pagina per vedere i tuoi token di accesso."
|
569 |
-
|
570 |
-
#: wp-to-twitter-oauth.php:227
|
571 |
msgid "Once you have registered your site as an application, you will be provided with four keys."
|
572 |
msgstr "Una volta registrato il tuo sito come applicazione, ti saranno fornite quattro chiavi."
|
573 |
|
574 |
-
#: wp-to-twitter-oauth.php:
|
575 |
msgid "3. Copy and paste your consumer key and consumer secret into the fields below"
|
576 |
-
msgstr "
|
577 |
|
578 |
-
#: wp-to-twitter-oauth.php:
|
579 |
msgid "Twitter Consumer Key"
|
580 |
msgstr "Twitter Consumer Key"
|
581 |
|
582 |
-
#: wp-to-twitter-oauth.php:
|
583 |
msgid "Twitter Consumer Secret"
|
584 |
msgstr "Twitter Consumer Secret"
|
585 |
|
586 |
-
#: wp-to-twitter-oauth.php:
|
587 |
msgid "4. Copy and paste your Access Token and Access Token Secret into the fields below"
|
588 |
-
msgstr "
|
589 |
|
590 |
-
#: wp-to-twitter-oauth.php:
|
591 |
msgid "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."
|
592 |
msgstr "Se il livello di accesso per il tuo token di accesso non è \"<em>Lettura e Scrittura</em>\", devi ritornare al passo 2 e generare un nuovo token di accesso."
|
593 |
|
594 |
-
#: wp-to-twitter-oauth.php:
|
595 |
msgid "Access Token"
|
596 |
msgstr "Token d'accesso"
|
597 |
|
598 |
-
#: wp-to-twitter-oauth.php:
|
599 |
msgid "Access Token Secret"
|
600 |
msgstr "Token d'accesso - Secret"
|
601 |
|
602 |
-
#: wp-to-twitter-oauth.php:
|
603 |
msgid "Disconnect Your WordPress and Twitter Account"
|
604 |
msgstr "Scollega il tuo account WordPress e Twitter"
|
605 |
|
606 |
-
#: wp-to-twitter-oauth.php:
|
607 |
msgid "Disconnect your WordPress and Twitter Account"
|
608 |
msgstr "Disconnetti il tuo account WordPress e Twitter"
|
609 |
|
610 |
-
#: wp-to-twitter-oauth.php:
|
611 |
msgid "Disconnect from Twitter"
|
612 |
msgstr "Disconnettiti da Twitter"
|
613 |
|
614 |
-
#: wp-to-twitter-oauth.php:
|
615 |
msgid "Twitter Username "
|
616 |
msgstr "Nome utente Twitter"
|
617 |
|
618 |
-
#: wp-to-twitter-oauth.php:
|
619 |
msgid "Consumer Key "
|
620 |
msgstr "Consumer Key "
|
621 |
|
622 |
-
#: wp-to-twitter-oauth.php:
|
623 |
msgid "Consumer Secret "
|
624 |
msgstr "Consumer Secret "
|
625 |
|
626 |
-
#: wp-to-twitter-oauth.php:
|
627 |
msgid "Access Token "
|
628 |
msgstr "Token d'accesso"
|
629 |
|
630 |
-
#: wp-to-twitter-oauth.php:
|
631 |
msgid "Access Token Secret "
|
632 |
msgstr "Token d'accesso - Secret"
|
633 |
|
634 |
-
#: wp-to-twitter.php:
|
635 |
msgid "WP to Twitter requires PHP version 5 or above. Please upgrade PHP to run WP to Twitter."
|
636 |
msgstr "WP to Twitter richiede una versione pari a o maggiore di PHP 5. Per favore aggiorna la tua versione di PHP per poter utilizzare WP to Twitter."
|
637 |
|
638 |
-
#: wp-to-twitter-oauth.php:
|
639 |
msgid "Twitter requires authentication by OAuth. You will need to <a href='%s'>update your settings</a> to complete installation of WP to Twitter."
|
640 |
msgstr "Twitter necessita una autentificazione via OAuth. Aggiorna le tue <a href='%s'>impostazioni</a> per completare l'installazione di WP to Twitter."
|
641 |
|
642 |
-
#: wp-to-twitter.php:
|
643 |
msgid "200 OK: Success!"
|
644 |
msgstr "200 OK: Successo!"
|
645 |
|
646 |
-
#: wp-to-twitter.php:
|
647 |
msgid "400 Bad Request: The request was invalid. This is the status code returned during rate limiting."
|
648 |
msgstr "400 Bad Request: La richiesta non é valida. L'utilizzo di questo codice é relativo al limite delle chiamate."
|
649 |
|
650 |
-
#: wp-to-twitter.php:
|
651 |
msgid "401 Unauthorized: Authentication credentials were missing or incorrect."
|
652 |
msgstr "401 Unauthorized: quando mancano oppure sono inesatte le credenziali per l'autentificazione."
|
653 |
|
654 |
-
#: wp-to-twitter.php:
|
655 |
msgid "500 Internal Server Error: Something is broken at Twitter."
|
656 |
msgstr "500 Internal Server Error: problemi interni a Twitter."
|
657 |
|
658 |
-
#: wp-to-twitter.php:
|
659 |
msgid "503 Service Unavailable: The Twitter servers are up, but overloaded with requests - Please try again later."
|
660 |
msgstr "503 Service Unavailable: i server di Twitter funzionano, ma sono sommersi di richieste. Prova più tardi."
|
661 |
|
662 |
-
#: wp-to-twitter.php:
|
663 |
msgid "502 Bad Gateway: Twitter is down or being upgraded."
|
664 |
msgstr "502 Bad Gateway: Twitter é down oppure sotto aggiornamento."
|
665 |
|
666 |
-
#: wp-to-twitter.php:
|
667 |
msgid "No Twitter OAuth connection found."
|
668 |
msgstr "Non è stata trovata la connessione a Twitter OAuth."
|
669 |
|
670 |
-
#: wp-to-twitter.php:
|
671 |
msgid "Previous Tweets"
|
672 |
msgstr "Tweet precedenti"
|
673 |
|
674 |
-
#: wp-to-twitter.php:
|
675 |
msgid "Custom Twitter Post"
|
676 |
msgstr "Messaggio personalizzato Twitter"
|
677 |
|
678 |
-
#: wp-to-twitter.php:
|
679 |
msgid "Your template:"
|
680 |
msgstr "Il tuo template:"
|
681 |
|
682 |
-
#: wp-to-twitter.php:
|
683 |
msgid "YOURLS Custom Keyword"
|
684 |
msgstr "YOURLS - Custom Keyword"
|
685 |
|
686 |
-
#: wp-to-twitter.php:
|
687 |
msgid "Upgrade to WP Tweets Pro"
|
688 |
msgstr "Aggiorna a WP Tweets Pro"
|
689 |
|
690 |
-
#: wp-to-twitter.php:
|
691 |
msgid "Don't Tweet this post."
|
692 |
msgstr "Non segnalare a Twitter questo articolo."
|
693 |
|
694 |
-
#: wp-to-twitter.php:
|
695 |
msgid "Tweet this post."
|
696 |
msgstr "Segnala a Twitter questo articolo."
|
697 |
|
698 |
-
#: wp-to-twitter.php:
|
699 |
msgid "Access to customizing WP to Twitter values is not allowed for your user role."
|
700 |
msgstr "L'accesso alla personalizzazione dei valori per WP to Twitter non è permessa ad utenti col tuo ruolo."
|
701 |
|
702 |
-
#: wp-to-twitter.php:
|
703 |
msgid "Characters left: "
|
704 |
msgstr "Caratteri mancanti:"
|
705 |
|
706 |
-
#: wp-to-twitter.php:
|
707 |
msgid "WP Tweets User Settings"
|
708 |
msgstr "Impostazioni utente di WP Tweets"
|
709 |
|
710 |
-
#: wp-to-twitter.php:
|
711 |
msgid "Use My Twitter Username"
|
712 |
msgstr "Utilizza il mio nome utente Twitter"
|
713 |
|
714 |
-
#: wp-to-twitter.php:
|
715 |
msgid "Tweet my posts with an @ reference to my username."
|
716 |
msgstr "Segnala i miei articoli con un riferimento @ correlato al mio nome utente."
|
717 |
|
718 |
-
#: wp-to-twitter.php:
|
719 |
msgid "Tweet my posts with an @ reference to both my username and to the main site username."
|
720 |
msgstr "Segnala i miei articoli con un riferimento @ correlato tanto al mio nome utente per il sito principale quanto al mio nome utente."
|
721 |
|
722 |
-
#: wp-to-twitter.php:
|
723 |
msgid "Your Twitter Username"
|
724 |
msgstr "Nome utente Twitter"
|
725 |
|
726 |
-
#: wp-to-twitter.php:
|
727 |
msgid "Enter your own Twitter username."
|
728 |
msgstr "Inserisci il tuo nome utente Twitter"
|
729 |
|
730 |
-
#: wp-to-twitter.php:
|
731 |
msgid "Check off categories to tweet"
|
732 |
msgstr "Togli la spunta alle categorie per le quali inviare i tweet"
|
733 |
|
734 |
-
#: wp-to-twitter.php:
|
735 |
msgid "Do not tweet posts in checked categories (Reverses default behavior)"
|
736 |
msgstr "Non inviare i tweet per le categorie selezionate (Inverte il comportamento di default)"
|
737 |
|
738 |
-
#: wp-to-twitter.php:
|
739 |
msgid "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."
|
740 |
msgstr "I limiti sono esclusivi. Se un post è in una categoria che dovrebbe essere inviata ed una che non lo dovrebbe, il Tweet non verrà inviato."
|
741 |
|
742 |
-
#: wp-to-twitter.php:
|
743 |
msgid "Set Categories"
|
744 |
msgstr "Imposta le categorie"
|
745 |
|
746 |
-
#: wp-to-twitter.php:
|
747 |
msgid "Settings"
|
748 |
msgstr "Impostazioni"
|
749 |
|
750 |
-
#: wp-to-twitter.php:
|
751 |
msgid "<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href=\"%1$s\">changelog</a> before upgrading."
|
752 |
msgstr "<br /><strong>Nota:</strong> Leggi il <a class=\"thickbox\" href=\"%1$s\">changelog</a> prima di aggiornare."
|
753 |
|
@@ -757,459 +860,444 @@ msgstr "WP to Twitter"
|
|
757 |
msgid "http://www.joedolson.com/articles/wp-to-twitter/"
|
758 |
msgstr "http://www.joedolson.com/articles/wp-to-twitter/"
|
759 |
|
760 |
-
msgid "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."
|
761 |
-
msgstr "Invia un Tweet quanto aggiorni il tuo blog WordPress o il tuo blogroll usando il servizio di accorciamento URL di tua scelta. Ricco di funzioni per la personalizzazione e la promozione dei tuoi Tweet."
|
762 |
-
|
763 |
msgid "Joseph Dolson"
|
764 |
msgstr "Joseph Dolson"
|
765 |
|
766 |
msgid "http://www.joedolson.com/"
|
767 |
msgstr "http://www.joedolson.com/"
|
768 |
|
769 |
-
#: wpt-functions.php:
|
770 |
msgid "Please read the FAQ and other Help documents before making a support request."
|
771 |
msgstr "Leggi le FAQ e le documentazioni di aiuto prima di inviare una richiesta di supporto."
|
772 |
|
773 |
-
#: wpt-functions.php:
|
774 |
msgid "Please describe your problem. I'm not psychic."
|
775 |
msgstr "Descrivi il tuo problema. Grazie."
|
776 |
|
777 |
-
#: wpt-functions.php:
|
778 |
msgid "<strong>Please note</strong>: I do keep records of those who have donated, but if your donation came from somebody other than your account at this web site, you must note this in your message."
|
779 |
msgstr "<strong>Nota</strong>: sebbene conservi un elenco dei donatori e la tua donazione provenisse da un nome differente da quello indicato nel tuo account, ti invito a indicarlo nel tuo messaggio."
|
780 |
|
781 |
-
#: wpt-functions.php:
|
782 |
msgid "Send Support Request"
|
783 |
msgstr "Invia richiesta supporto"
|
784 |
|
785 |
-
#: wpt-functions.php:
|
786 |
msgid "The following additional information will be sent with your support request:"
|
787 |
msgstr "Le seguenti informazioni saranno inviate insieme alla tua richiesta:"
|
788 |
|
789 |
-
#: wp-to-twitter-manager.php:
|
790 |
msgid "No error information is available for your shortener."
|
791 |
msgstr "Nessuna informazione di errore disponibile per il servizio di accorciamento URL da te scelto."
|
792 |
|
793 |
-
#: wp-to-twitter-manager.php:
|
794 |
msgid "<li class=\"error\"><strong>WP to Twitter was unable to contact your selected URL shortening service.</strong></li>"
|
795 |
msgstr "<li class=\"error\"><strong>WP to Twitter non é stato in grado di contattare il servizio per gli URL brevi da te selezionato.</strong></li>"
|
796 |
|
797 |
-
#: wp-to-twitter-manager.php:
|
798 |
msgid "<li><strong>WP to Twitter successfully contacted your selected URL shortening service.</strong> The following link should point to your blog homepage:"
|
799 |
msgstr "<li><strong>WP to Twitter ha contattato con successo il servizio per gli URL brevi da te selezionato.</strong> Il seguente link dovrebbe puntare alla homepage del tuo blog:"
|
800 |
|
801 |
-
#: wp-to-twitter-manager.php:
|
802 |
msgid "<li><strong>WP to Twitter successfully submitted a status update to Twitter.</strong></li>"
|
803 |
msgstr "<li><strong>WP to Twitter ha inviato con successo l'aggiornamento dello stato a Twitter.</strong></li>"
|
804 |
|
805 |
-
#: wp-to-twitter-manager.php:
|
806 |
msgid "<li class=\"error\"><strong>WP to Twitter failed to submit an update to Twitter.</strong></li>"
|
807 |
msgstr "<li class=\"error\"><strong>WP to Twitter non é stato in grado di inviare l'aggiornamento a Twitter.</strong></li>"
|
808 |
|
809 |
-
#: wp-to-twitter-manager.php:
|
810 |
msgid "You have not connected WordPress to Twitter."
|
811 |
msgstr "Non hai connesso WordPress a Twitter."
|
812 |
|
813 |
-
#: wp-to-twitter-manager.php:
|
814 |
msgid "<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>"
|
815 |
msgstr "<li class=\"error\"><strong>Pare che il tuo server non supporti le funzioni richieste affinché WP to Twitter possa funzionare correttamente.</strong> Puoi comunque provare ugualmente - queste verifiche non sono perfette - garantisco i risultati.</li>"
|
816 |
|
817 |
-
#: wp-to-twitter-manager.php:
|
818 |
msgid "<li><strong>Your server should run WP to Twitter successfully.</strong></li>"
|
819 |
msgstr "<li><strong>WP to Twitter funziona correttamente per il tuo server.</strong></li>"
|
820 |
|
821 |
-
#: wp-to-twitter-manager.php:
|
822 |
msgid "WP to Twitter Errors Cleared"
|
823 |
msgstr "Gli errori WP to Twitter sono stati azzerati"
|
824 |
|
825 |
-
#: wp-to-twitter-manager.php:
|
826 |
msgid "WP to Twitter is now connected with Twitter."
|
827 |
msgstr "WP to Twitter é ora connesso a Twitter."
|
828 |
|
829 |
-
#: wp-to-twitter-manager.php:
|
830 |
msgid "OAuth Authentication Data Cleared."
|
831 |
msgstr "I dati della autentificazione OAuth sono stati svuotati."
|
832 |
|
833 |
-
#: wp-to-twitter-manager.php:
|
834 |
msgid "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."
|
835 |
msgstr "Autentificazione OAuth fallita. L'ora del tuo sever non é sicronizzata con i server di Twitter. Comunica il problema al tuo fornitore di hosting."
|
836 |
|
837 |
-
#: wp-to-twitter-manager.php:
|
838 |
msgid "OAuth Authentication response not understood."
|
839 |
msgstr "Risposta Autentificazione OAuth non valida."
|
840 |
|
841 |
-
#: wp-to-twitter-manager.php:
|
842 |
msgid "WP to Twitter Advanced Options Updated"
|
843 |
msgstr "Le opzioni avanzate di WP to Twitter sono state aggiornate"
|
844 |
|
845 |
-
#: wp-to-twitter-shorteners.php:
|
846 |
msgid "You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly."
|
847 |
msgstr "E' necessario che tu inserisca i dati per il login e la chiave API di Bit.ly in modo da potere accorciare le URL con Bit.ly."
|
848 |
|
849 |
-
#: wp-to-twitter-shorteners.php:
|
850 |
msgid "You must add your YOURLS remote URL, login, and password in order to shorten URLs with a remote installation of YOURLS."
|
851 |
msgstr "E' necessario che tu inserisca il tuo URL remoto a YOURLS, il login e la password in modo da potere accorciare le URL attraverso la tua installazione remota di YOURLS."
|
852 |
|
853 |
-
#: wp-to-twitter-shorteners.php:
|
854 |
msgid "You must add your YOURLS server path in order to shorten URLs with a remote installation of YOURLS."
|
855 |
msgstr "E' necessario che tu inserisca il percorso al server del tuo YOURLS in modo da potere accorciare le URL attraverso la tua installazione remota di YOURLS."
|
856 |
|
857 |
-
#: wp-to-twitter-manager.php:
|
858 |
msgid "WP to Twitter Options Updated"
|
859 |
msgstr "Le opzioni di WP to Twitter sono state aggiornate"
|
860 |
|
861 |
-
#: wp-to-twitter-manager.php:
|
862 |
msgid "Category limits updated."
|
863 |
msgstr "I limiti per la categoria sono stati aggiornati."
|
864 |
|
865 |
-
#: wp-to-twitter-manager.php:
|
866 |
msgid "Category limits unset."
|
867 |
msgstr "Le limitazioni alle categorie non sono state impostate."
|
868 |
|
869 |
-
#: wp-to-twitter-shorteners.php:
|
870 |
msgid "YOURLS password updated. "
|
871 |
msgstr "La password di YOURLS é stata aggiornata."
|
872 |
|
873 |
-
#: wp-to-twitter-shorteners.php:
|
874 |
msgid "YOURLS password deleted. You will be unable to use your remote YOURLS account to create short URLS."
|
875 |
msgstr "La tua password di YOURLS é stata cancellata. Non potrai utilizzare il tuo account remoto YOURLS per la creazione di URL brevi."
|
876 |
|
877 |
-
#: wp-to-twitter-shorteners.php:
|
878 |
msgid "Failed to save your YOURLS password! "
|
879 |
msgstr "Non é stato possibile salvare la tua password di YOURLS!"
|
880 |
|
881 |
-
#: wp-to-twitter-shorteners.php:
|
882 |
msgid "YOURLS username added. "
|
883 |
msgstr "Il nome utente YOURLS é stato aggiunto."
|
884 |
|
885 |
-
#: wp-to-twitter-shorteners.php:
|
886 |
msgid "YOURLS API url added. "
|
887 |
msgstr "L'url alla API YOURLS é stato aggiunto. "
|
888 |
|
889 |
-
#: wp-to-twitter-shorteners.php:
|
890 |
msgid "YOURLS API url removed. "
|
891 |
msgstr "L'url alla API YOURLS é stato rimosso. "
|
892 |
|
893 |
-
#: wp-to-twitter-shorteners.php:
|
894 |
msgid "YOURLS local server path added. "
|
895 |
msgstr "Il percorso al server locale di YOURLS é stato aggiunto. "
|
896 |
|
897 |
-
#: wp-to-twitter-shorteners.php:
|
898 |
msgid "The path to your YOURLS installation is not correct. "
|
899 |
msgstr "Il percorso alla tua installazione di YOURLS non é corretto. "
|
900 |
|
901 |
-
#: wp-to-twitter-shorteners.php:
|
902 |
msgid "YOURLS local server path removed. "
|
903 |
msgstr "Il percorso al server locale di YOURLS é stato rimosso. "
|
904 |
|
905 |
-
#: wp-to-twitter-shorteners.php:
|
906 |
msgid "YOURLS will use Post ID for short URL slug."
|
907 |
msgstr "YOURLS utilizzerà Post ID per lo slug degli URL brevi."
|
908 |
|
909 |
-
#: wp-to-twitter-shorteners.php:
|
910 |
msgid "YOURLS will use your custom keyword for short URL slug."
|
911 |
msgstr "YOURLS utilizzerà la tua keyword personalizzata per lo slug degli URL brevi."
|
912 |
|
913 |
-
#: wp-to-twitter-shorteners.php:
|
914 |
msgid "YOURLS will not use Post ID for the short URL slug."
|
915 |
msgstr "YOURLS non utilizzerà Post ID per lo slug degli URL brevi."
|
916 |
|
917 |
-
#: wp-to-twitter-shorteners.php:
|
918 |
msgid "Su.pr API Key and Username Updated"
|
919 |
msgstr "La chiave API ed il nome utente di Su.pr sono stati aggiornati"
|
920 |
|
921 |
-
#: wp-to-twitter-shorteners.php:
|
922 |
msgid "Su.pr API Key and username deleted. Su.pr URLs created by WP to Twitter will no longer be associated with your account. "
|
923 |
msgstr "La chiave API ed il nome utente di Su.pr sono stati cancellati. Gli URL di Su.pr creati da WP to Twitter non saranno più associati al tuo account. "
|
924 |
|
925 |
-
#: wp-to-twitter-shorteners.php:
|
926 |
msgid "Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! "
|
927 |
msgstr "Non é stata inserita la chiave API di Su.pr - <a href='http://su.pr/'>vai qui</a>! "
|
928 |
|
929 |
-
#: wp-to-twitter-shorteners.php:
|
930 |
msgid "Bit.ly API Key Updated."
|
931 |
msgstr "La chiave API di Bit.ly é stata aggiornata."
|
932 |
|
933 |
-
#: wp-to-twitter-shorteners.php:
|
934 |
msgid "Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
935 |
msgstr "La chiave API di Bit.ly é stata cancellata. Non puoi utilizzare la API di Bit.ly senza la chiave API. "
|
936 |
|
937 |
-
#: wp-to-twitter-shorteners.php:
|
938 |
msgid "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."
|
939 |
msgstr "La chiave API di Bit.ly non é stata aggiunta - <a href='http://bit.ly/account/'>vai qui</a>! E' necessaria una chiave API affinché il servizio di URL brevi Bit.ly di possa funzionare."
|
940 |
|
941 |
-
#: wp-to-twitter-shorteners.php:
|
942 |
msgid " Bit.ly User Login Updated."
|
943 |
msgstr " Il login utente per Bit.ly é stato aggiornato."
|
944 |
|
945 |
-
#: wp-to-twitter-shorteners.php:
|
946 |
msgid "Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. "
|
947 |
msgstr "Sono stati cancellati i dati per il login utente Bit.ly. Non puoi utilizzare la API di Bit.ly senza fornire il tuo nome utente. "
|
948 |
|
949 |
-
#: wp-to-twitter-shorteners.php:
|
950 |
msgid "Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
951 |
msgstr "Non sono stati inseriti i dati per il login a Bit.ly - <a href='http://bit.ly/account/'>vai qui</a>! "
|
952 |
|
953 |
-
#: wp-to-twitter-manager.php:
|
954 |
msgid "<p>One or more of your last posts has failed to send a status update to Twitter. The Tweet has been saved, and you can re-Tweet it at your leisure.</p>"
|
955 |
msgstr "<p>Uno o più dei tuoi ultimi post ha fallito nell'inviare la richiesta di aggiornamento di stato a Twitter. Il Tweet comunque è stato salvato e puoi inviarlo nuovamente quando ti è più comodo.</p>"
|
956 |
|
957 |
-
#: wp-to-twitter-manager.php:
|
958 |
msgid "Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. "
|
959 |
msgstr "Non é stato possibile contattare i server di Twitter per comunicare il tuo <strong>nuovo link</strong>. Prova a compiere manualmente l'operazione."
|
960 |
|
961 |
-
#: wp-to-twitter-manager.php:
|
962 |
msgid "<p>The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet. Check with your URL shortening provider to see if there are any known issues.</p>"
|
963 |
msgstr "<p>La richiesta alle API per il servizio di accorciamento delle URL è fallita e quindi la tua URL non è stata accorciata. La URL lunga è stata usata per il tuo Tweet. Contatta il tuo servizio di accorciamento URL per verificare se ci sono problemi.</p>"
|
964 |
|
965 |
-
#: wp-to-twitter-manager.php:
|
966 |
msgid "Clear 'WP to Twitter' Error Messages"
|
967 |
msgstr "Svuota i messaggiodi errore 'WP to Twitter'"
|
968 |
|
969 |
-
#: wp-to-twitter-manager.php:
|
970 |
msgid "WP to Twitter Options"
|
971 |
msgstr "Opzioni WP to Twitter"
|
972 |
|
973 |
-
#: wp-to-twitter-manager.php:
|
974 |
msgid "Basic Settings"
|
975 |
msgstr "Impostazioni di base"
|
976 |
|
977 |
-
#: wp-to-twitter-manager.php:
|
978 |
msgid "Save WP->Twitter Options"
|
979 |
msgstr "Salva le opzioni WP->Twitter"
|
980 |
|
981 |
-
#: wp-to-twitter-manager.php:
|
982 |
-
msgid "Settings for Comments"
|
983 |
-
msgstr "Impostazioni commenti"
|
984 |
-
|
985 |
-
#: wp-to-twitter-manager.php:490
|
986 |
-
msgid "Update Twitter when new comments are posted"
|
987 |
-
msgstr "Aggiorna Twitter quando vengono inviati nuovi commenti"
|
988 |
-
|
989 |
-
#: wp-to-twitter-manager.php:491
|
990 |
-
msgid "Text for new comments:"
|
991 |
-
msgstr "Testo per nuovi commenti:"
|
992 |
-
|
993 |
-
#: wp-to-twitter-manager.php:496
|
994 |
msgid "Settings for Links"
|
995 |
msgstr "Impostazioni link"
|
996 |
|
997 |
-
#: wp-to-twitter-manager.php:
|
998 |
msgid "Update Twitter when you post a Blogroll link"
|
999 |
msgstr "Aggiorna Twitter quando viene aggiunto un nuovo link al blogroll"
|
1000 |
|
1001 |
-
#: wp-to-twitter-manager.php:
|
1002 |
msgid "Text for new link updates:"
|
1003 |
msgstr "Testo per gli aggiornamenti di un nuovo link:"
|
1004 |
|
1005 |
-
#: wp-to-twitter-manager.php:
|
1006 |
msgid "Available shortcodes: <code>#url#</code>, <code>#title#</code>, and <code>#description#</code>."
|
1007 |
msgstr "Shortcode disponibili: <code>#url#</code>, <code>#title#</code> e <code>#description#</code>."
|
1008 |
|
1009 |
-
#: wp-to-twitter-shorteners.php:
|
1010 |
msgid "Don't shorten URLs."
|
1011 |
msgstr "Non usare gli URL brevi"
|
1012 |
|
1013 |
-
#: wp-to-twitter-shorteners.php:
|
1014 |
msgid "<abbr title=\"Uniform Resource Locator\">URL</abbr> Shortener Account Settings"
|
1015 |
msgstr "Impostazione account per il servizio di accorciamento di <abbr title=\"Uniform Resource Locator\">URL</abbr>"
|
1016 |
|
1017 |
-
#: wp-to-twitter-shorteners.php:
|
1018 |
msgid "Your Su.pr account details"
|
1019 |
msgstr "Dati account Su.pr"
|
1020 |
|
1021 |
-
#: wp-to-twitter-shorteners.php:
|
1022 |
msgid "Your Su.pr Username:"
|
1023 |
msgstr "Nome utente Su.pr:"
|
1024 |
|
1025 |
-
#: wp-to-twitter-shorteners.php:
|
1026 |
msgid "Your Su.pr <abbr title='application programming interface'>API</abbr> Key:"
|
1027 |
msgstr "La tua chiave <abbr title='application programming interface'>API</abbr> di Su.pr:"
|
1028 |
|
1029 |
-
#: wp-to-twitter-shorteners.php:
|
1030 |
msgid "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."
|
1031 |
msgstr "Non hai ancora un account oppure una chiave API Su.pr? <a href='http://su.pr/'>Vai qui</a>!<br />E' necessaria una chiave API in modo tale da potere associare gli URL da te creati con il tuo account di Su.pr."
|
1032 |
|
1033 |
-
#: wp-to-twitter-shorteners.php:
|
1034 |
msgid "Your Bit.ly account details"
|
1035 |
msgstr "Dati account Bit.ly"
|
1036 |
|
1037 |
-
#: wp-to-twitter-shorteners.php:
|
1038 |
msgid "Your Bit.ly username:"
|
1039 |
msgstr "Nome utente Bit.ly:"
|
1040 |
|
1041 |
-
#: wp-to-twitter-shorteners.php:
|
1042 |
msgid "Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
1043 |
msgstr "La tua chiave <abbr title='application programming interface'>API</abbr> di Bit.ly:"
|
1044 |
|
1045 |
-
#: wp-to-twitter-shorteners.php:
|
1046 |
msgid "Save Bit.ly API Key"
|
1047 |
msgstr "Salva la chiave API di Bit.ly"
|
1048 |
|
1049 |
-
#: wp-to-twitter-shorteners.php:
|
1050 |
msgid "Clear Bit.ly API Key"
|
1051 |
msgstr "Svuota la chiave API di Bit.ly"
|
1052 |
|
1053 |
-
#: wp-to-twitter-shorteners.php:
|
1054 |
msgid "A Bit.ly API key and username is required to shorten URLs via the Bit.ly API and WP to Twitter."
|
1055 |
msgstr "E' necessario il nome utente e la chiave API di Bit.ly per potere rendere brevi gli URL via la API di Bit.ly e WP to Twitter."
|
1056 |
|
1057 |
-
#: wp-to-twitter-shorteners.php:
|
1058 |
msgid "Your YOURLS account details"
|
1059 |
msgstr "I dettagli del tuo account YOURLS"
|
1060 |
|
1061 |
-
#: wp-to-twitter-shorteners.php:
|
1062 |
msgid "Path to your YOURLS config file (Local installations)"
|
1063 |
msgstr "Percorso al file di configurazione YOURLS (installazioni locali)"
|
1064 |
|
1065 |
-
#: wp-to-twitter-shorteners.php:
|
1066 |
msgid "Example:"
|
1067 |
msgstr "Esempio:"
|
1068 |
|
1069 |
-
#: wp-to-twitter-shorteners.php:
|
1070 |
msgid "URI to the YOURLS API (Remote installations)"
|
1071 |
msgstr "URI alla API di YOURLS (installazioni remote)"
|
1072 |
|
1073 |
-
#: wp-to-twitter-shorteners.php:
|
1074 |
msgid "Your YOURLS username:"
|
1075 |
msgstr "Nome utente YOURLS:"
|
1076 |
|
1077 |
-
#: wp-to-twitter-shorteners.php:
|
1078 |
msgid "Your YOURLS password:"
|
1079 |
msgstr "Password YOURLS:"
|
1080 |
|
1081 |
-
#: wp-to-twitter-shorteners.php:
|
1082 |
msgid "<em>Saved</em>"
|
1083 |
msgstr "<em>Salvato</em>"
|
1084 |
|
1085 |
-
#: wp-to-twitter-shorteners.php:
|
1086 |
msgid "Post ID for YOURLS url slug."
|
1087 |
msgstr "ID post per lo slug degli url di YOURLS."
|
1088 |
|
1089 |
-
#: wp-to-twitter-shorteners.php:
|
1090 |
msgid "Custom keyword for YOURLS url slug."
|
1091 |
msgstr "Keyword personalizzata per lo slug degli url di YOURLS."
|
1092 |
|
1093 |
-
#: wp-to-twitter-shorteners.php:
|
1094 |
msgid "Default: sequential URL numbering."
|
1095 |
msgstr "Predefinito: numerazione sequenziale URL."
|
1096 |
|
1097 |
-
#: wp-to-twitter-shorteners.php:
|
1098 |
msgid "Save YOURLS Account Info"
|
1099 |
msgstr "Salva le info account di YOURLS"
|
1100 |
|
1101 |
-
#: wp-to-twitter-shorteners.php:
|
1102 |
msgid "Clear YOURLS password"
|
1103 |
msgstr "Svuota la password di YOURLS"
|
1104 |
|
1105 |
-
#: wp-to-twitter-shorteners.php:
|
1106 |
msgid "A YOURLS password and username is required to shorten URLs via the remote YOURLS API and WP to Twitter."
|
1107 |
msgstr "Nome utente e password sono necessari per accorciare le URL attraverso le API di YOURLS e di WP to Twitter."
|
1108 |
|
1109 |
-
#: wp-to-twitter-manager.php:
|
1110 |
msgid "Advanced Settings"
|
1111 |
msgstr "Impostazioni avanzate"
|
1112 |
|
1113 |
-
#: wp-to-twitter-manager.php:
|
1114 |
msgid "Save Advanced WP->Twitter Options"
|
1115 |
msgstr "Salva avanzate WP->Opzioni Twitter"
|
1116 |
|
1117 |
-
#: wp-to-twitter-manager.php:
|
1118 |
msgid "Strip nonalphanumeric characters from tags"
|
1119 |
msgstr "Rimuovi i caratteri non alfanumerici dai tag"
|
1120 |
|
1121 |
-
#: wp-to-twitter-manager.php:
|
1122 |
msgid "Spaces in tags replaced with:"
|
1123 |
msgstr "Sostituisci gli spazi trai tag con:"
|
1124 |
|
1125 |
-
#: wp-to-twitter-manager.php:
|
1126 |
msgid "Maximum number of tags to include:"
|
1127 |
msgstr "Numero massimo di tag da includere:"
|
1128 |
|
1129 |
-
#: wp-to-twitter-manager.php:
|
1130 |
msgid "Maximum length in characters for included tags:"
|
1131 |
msgstr "Lunghezza massima in caratteri per i tag inclusi:"
|
1132 |
|
1133 |
-
#: wp-to-twitter-manager.php:
|
1134 |
msgid "Length of post excerpt (in characters):"
|
1135 |
msgstr "Lunghezza riassunto messaggi (in caratteri)"
|
1136 |
|
1137 |
-
#: wp-to-twitter-manager.php:
|
1138 |
msgid "WP to Twitter Date Formatting:"
|
1139 |
msgstr "Formattazione data WP to Twitter:"
|
1140 |
|
1141 |
-
#: wp-to-twitter-manager.php:
|
1142 |
msgid "Default is from your general settings. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Date Formatting Documentation</a>."
|
1143 |
msgstr "Predefinito dalle impostazioni generali. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Info formattazione data</a>."
|
1144 |
|
1145 |
-
#: wp-to-twitter-manager.php:
|
1146 |
msgid "Custom text before all Tweets:"
|
1147 |
msgstr "Testo personalizzato prima di tutti i messaggi:"
|
1148 |
|
1149 |
-
#: wp-to-twitter-manager.php:
|
1150 |
msgid "Custom text after all Tweets:"
|
1151 |
msgstr "Testo personalizzato dopo tutti i messaggi:"
|
1152 |
|
1153 |
-
#: wp-to-twitter-manager.php:
|
1154 |
msgid "Custom field for an alternate URL to be shortened and Tweeted:"
|
1155 |
msgstr "Campo personalizzato per inserire una URL alternativa da accorciare e inviare a Twitter:"
|
1156 |
|
1157 |
-
#: wp-to-twitter-manager.php:
|
1158 |
msgid "Special Cases when WordPress should send a Tweet"
|
1159 |
msgstr "Casi particolari nei quali WordPress dovrebbe inviare un messaggio"
|
1160 |
|
1161 |
-
#: wp-to-twitter-manager.php:
|
1162 |
msgid "Do not post Tweets by default"
|
1163 |
msgstr "Di default non inviare i Tweet"
|
1164 |
|
1165 |
-
#: wp-to-twitter-manager.php:
|
1166 |
msgid "Allow status updates from Quick Edit"
|
1167 |
msgstr "Permetti aggiornamenti stato via Quick Edit"
|
1168 |
|
1169 |
-
#: wp-to-twitter-manager.php:
|
1170 |
msgid "Delaying tweets with WP Tweets PRO moves Tweeting to an publishing-independent action."
|
1171 |
msgstr "Ritardare i tweet con WP Tweets PRO sposta i Tweet verso un'azione di pubblicazione indipendente."
|
1172 |
|
1173 |
-
#: wp-to-twitter-manager.php:
|
1174 |
msgid "Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"
|
1175 |
msgstr "Invio degli aggiornamenti di Twitter via punti di pubblicazione remoti (Email o client XMLRPC)"
|
1176 |
|
1177 |
-
#: wp-to-twitter-manager.php:
|
1178 |
msgid "Google Analytics Settings"
|
1179 |
msgstr "Impostazioni Google Analytics"
|
1180 |
|
1181 |
-
#: wp-to-twitter-manager.php:
|
1182 |
msgid "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."
|
1183 |
msgstr "Puoi tracciare la risposta da Twitter utilizzando Google Analytics definendo qui l'identificatore. Puoi definire un identificatore statico oppure uno dinamico. Gli identificatori statici non mutano da post a post mentre quelli dinamici derivano dalle informazioni di maggior rilievo appartenenti a quel post specifico. Gli identificatori dinamici ti permetteranno di analizzare le tue statistiche attraverso una variabile aggiuntiva."
|
1184 |
|
1185 |
-
#: wp-to-twitter-manager.php:
|
1186 |
msgid "Use a Static Identifier with WP-to-Twitter"
|
1187 |
msgstr "Utilizza un identificatore statico per WP-to-Twitter"
|
1188 |
|
1189 |
-
#: wp-to-twitter-manager.php:
|
1190 |
msgid "Static Campaign identifier for Google Analytics:"
|
1191 |
msgstr "Identificatore statico Google Analytics:"
|
1192 |
|
1193 |
-
#: wp-to-twitter-manager.php:
|
1194 |
msgid "Use a dynamic identifier with Google Analytics and WP-to-Twitter"
|
1195 |
msgstr "Utilizza un identificatore dinamico per Google Analytics e WP-to-Twitter"
|
1196 |
|
1197 |
-
#: wp-to-twitter-manager.php:
|
1198 |
msgid "What dynamic identifier would you like to use?"
|
1199 |
msgstr "Quale identificatore dinamico desideri utilizzare?"
|
1200 |
|
1201 |
-
#: wp-to-twitter-manager.php:
|
1202 |
msgid "Category"
|
1203 |
msgstr "Categoria"
|
1204 |
|
1205 |
-
#: wp-to-twitter-manager.php:
|
1206 |
msgid "Post ID"
|
1207 |
msgstr "ID post"
|
1208 |
|
1209 |
-
#: wp-to-twitter-manager.php:
|
1210 |
msgid "Post Title"
|
1211 |
msgstr "Titolo post"
|
1212 |
|
1213 |
-
#: wp-to-twitter-manager.php:
|
1214 |
msgid "Author"
|
1215 |
msgstr "Autore"
|
2 |
# This file is distributed under the same license as the WP to Twitter package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"PO-Revision-Date: 2013-08-07 15:26:04+0000\n"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
"X-Generator: GlotPress/0.1\n"
|
11 |
"Project-Id-Version: WP to Twitter\n"
|
12 |
|
13 |
+
#: wp-to-twitter-oauth.php:224
|
14 |
+
msgid "Your application name cannot include the word \"Twitter.\""
|
15 |
+
msgstr "Il nome della tua applicazione non può contenere \"Twitter\"."
|
16 |
+
|
17 |
+
#: wp-to-twitter-oauth.php:229
|
18 |
+
msgid "<em>Do NOT create your access token yet.</em>"
|
19 |
+
msgstr "<em>NON creare ancora il tuo token di accesso.</em>"
|
20 |
+
|
21 |
+
#: wp-to-twitter-oauth.php:233
|
22 |
+
msgid "Return to the Details tab and create your access token."
|
23 |
+
msgstr "Vai alla scheda Dettagli e crea il tuo token di accesso."
|
24 |
+
|
25 |
+
#: wp-to-twitter.php:326
|
26 |
+
msgid "304 Not Modified: There was no new data to return"
|
27 |
+
msgstr "304 Non Modificato: nessun nuovo dato da restituire"
|
28 |
+
|
29 |
+
#: wp-to-twitter.php:345
|
30 |
+
msgid "422 Unprocessable Entity: The image uploaded could not be processed.."
|
31 |
+
msgstr "422 Entità Non Processabile: l'immagine inviata non può essere analizzata."
|
32 |
+
|
33 |
+
#: wp-to-twitter.php:1076
|
34 |
+
msgid "WP Tweets PRO 1.5.2 allows you to select Twitter accounts. <a href=\"%s\">Log in and download now!</a>"
|
35 |
+
msgstr "WP Tweets PRO 1.5.2 ti consente di selezionare i tuoi account Twitter. <a href=\"%s\">Accedi e scarica ora!</a>"
|
36 |
+
|
37 |
+
#: wp-to-twitter.php:1078
|
38 |
+
msgid "Upgrade to WP Tweets PRO to select Twitter accounts! <a href=\"%s\">Upgrade now!</a>"
|
39 |
+
msgstr "Aggiorna a WP Tweets PRO per selezionare i tuoi account Twitter! <a href=\"%s\">Aggiorna ora!</a>"
|
40 |
+
|
41 |
+
#: wp-to-twitter.php:1109
|
42 |
+
msgid "Tweets must be less than 140 characters; Twitter counts URLs as 22 or 23 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>."
|
43 |
+
msgstr "I tweet devono contenere al massimo 140 caratteri; Twitter conteggia le URL come 22 o 23 caratteri. Tag: <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>, oppure <code>#blog#</code>."
|
44 |
+
|
45 |
+
#: wp-to-twitter.php:1499
|
46 |
+
msgid "Tweet Status"
|
47 |
+
msgstr "Stato del tweet"
|
48 |
+
|
49 |
+
#: wpt-feed.php:149
|
50 |
+
msgid "Twitter returned an invalid response. It is probably down."
|
51 |
+
msgstr "Twitter ha restituito una risposta non valida. Probabilmente è fuori servizio."
|
52 |
+
|
53 |
+
#: wpt-widget.php:50
|
54 |
+
msgid "Display a list of your latest tweets."
|
55 |
+
msgstr "Mostra una lista dei tuoi ultimi tweet."
|
56 |
+
|
57 |
+
#: wpt-widget.php:59
|
58 |
+
msgid "WP to Twitter - Latest Tweets"
|
59 |
+
msgstr "WP to Twitter - Ultimi tweet"
|
60 |
+
|
61 |
+
#: wpt-widget.php:121
|
62 |
+
msgid "<a href=\"%3$s\">about %1$s ago</a> via %2$s"
|
63 |
+
msgstr "<a href=\"%3$s\">circa %1$s fa</a> attraverso %2$s"
|
64 |
+
|
65 |
+
#: wpt-widget.php:123
|
66 |
+
msgid "<a href=\"%2$s\">about %1$s ago</a>"
|
67 |
+
msgstr "<a href=\"%2$s\">circa %1$s fa</a>"
|
68 |
+
|
69 |
+
#: wpt-widget.php:179
|
70 |
+
msgid "Title"
|
71 |
+
msgstr "Titolo"
|
72 |
+
|
73 |
+
#: wpt-widget.php:184
|
74 |
+
msgid "Twitter Username"
|
75 |
+
msgstr "Nome utente di Twitter"
|
76 |
+
|
77 |
+
#: wpt-widget.php:189
|
78 |
+
msgid "Number of Tweets to Show"
|
79 |
+
msgstr "Numero di tweet da visualizzare"
|
80 |
+
|
81 |
+
#: wpt-widget.php:195
|
82 |
+
msgid "Hide @ Replies"
|
83 |
+
msgstr "Nascondi risposte @"
|
84 |
+
|
85 |
+
#: wpt-widget.php:200
|
86 |
+
msgid "Include Retweets"
|
87 |
+
msgstr "Includi i retweet"
|
88 |
+
|
89 |
+
#: wpt-widget.php:205
|
90 |
+
msgid "Parse links"
|
91 |
+
msgstr "Analizza link"
|
92 |
+
|
93 |
+
#: wpt-widget.php:210
|
94 |
+
msgid "Parse @mentions"
|
95 |
+
msgstr "Analizza @mentions"
|
96 |
+
|
97 |
+
#: wpt-widget.php:215
|
98 |
+
msgid "Parse #hashtags"
|
99 |
+
msgstr "Analizza #hashtags"
|
100 |
+
|
101 |
+
#: wpt-widget.php:220
|
102 |
+
msgid "Include Reply/Retweet/Favorite Links"
|
103 |
+
msgstr "Includi Risposte/Retweet/Link preferiti"
|
104 |
+
|
105 |
+
#: wpt-widget.php:225
|
106 |
+
msgid "Include Tweet source"
|
107 |
+
msgstr "Includi sorgente tweet"
|
108 |
+
|
109 |
+
#: wp-to-twitter-manager.php:178
|
110 |
+
msgid "Error:"
|
111 |
+
msgstr "Errore:"
|
112 |
+
|
113 |
+
#: wp-to-twitter-manager.php:643
|
114 |
+
msgid "No Analytics"
|
115 |
+
msgstr "Nessun Analytics"
|
116 |
+
|
117 |
+
#: wp-to-twitter-manager.php:792
|
118 |
+
msgid "Allow users to post to their own Twitter accounts"
|
119 |
+
msgstr "Consenti agli utenti di postare nei rispetti account Twitter"
|
120 |
+
|
121 |
+
#: wp-to-twitter-manager.php:793
|
122 |
+
msgid "Set a timer to send your Tweet minutes or hours after you publish"
|
123 |
+
msgstr "Imposta una temporizzazione per inviare i tuoi tweet minuti o ore dopo la pubblicazione"
|
124 |
+
|
125 |
+
#: wp-to-twitter-manager.php:794
|
126 |
+
msgid "Automatically re-send Tweets after publishing"
|
127 |
+
msgstr "Re-invia automaticamente i tweet dopo la pubblicazione"
|
128 |
+
|
129 |
+
#: wp-to-twitter-manager.php:795
|
130 |
+
msgid "Send Tweets for approved comments"
|
131 |
+
msgstr "Invia tweet per i commenti approvati"
|
132 |
+
|
133 |
+
#: wp-to-twitter.php:64
|
134 |
+
msgid "The current version of WP Tweets PRO is <strong>%s</strong>. <a href=\"http://www.joedolson.com/articles/account/\">Upgrade for best compatibility!</a>"
|
135 |
+
msgstr "La versione attuale di WP Tweets PRO è <strong>%s</strong>. <a href=\"http://www.joedolson.com/articles/account/\">Aggiorna per avere la migliore compatibilità!</a>"
|
136 |
+
|
137 |
+
#: wp-to-twitter.php:86
|
138 |
+
msgid "Tweeting of comments has been moved to <a href=\"%1$s\">WP Tweets PRO</a>. You will need to upgrade in order to Tweet comments. <a href=\"%2$s\">Dismiss</a>"
|
139 |
+
msgstr "Il tweet dei commenti è ora disponibile solo per <a href=\"%1$s\">WP Tweets PRO</a>. Devi effettuare l'aggiornamento per tweettare i commenti. <a href=\"%2$s\">Rinuncia</a>"
|
140 |
+
|
141 |
+
#: wp-to-twitter.php:1010
|
142 |
+
msgid "Tweeting %s edits is disabled."
|
143 |
+
msgstr "Il tweet delle modifiche al %s è disabilitato,"
|
144 |
+
|
145 |
+
#: wp-to-twitter.php:1454
|
146 |
+
msgid "I hope you've enjoyed <strong>WP to Twitter</strong>! Take a look at <a href='%s'>upgrading to WP Tweets PRO</a> for advanced Tweeting with WordPress! <a href='%s'>Dismiss</a>"
|
147 |
+
msgstr "Spero che <strong>WP to Twitter</strong> ti sia piaciuto! Dai un'occhiata a <a href='%s'>upgrading to WP Tweets PRO</a> per tweettare in modo avanzato con WordPress! <a href='%s'>Rinuncia</a>"
|
148 |
+
|
149 |
+
msgid "Posts a Tweet when you update your WordPress blog or post to your blogroll, using your URL shortening service. Rich in features for customizing and promoting your Tweets."
|
150 |
+
msgstr "Invia un Tweet quando aggiorni il tuo blog WordPress o pubblichi sul tuo blogroll, usando il tuo servizio di accorciamento URL. Ricco di funzionalità per la personalizzazione e promozione dei tuoi tweet."
|
151 |
+
|
152 |
+
#: wp-to-twitter-shorteners.php:378
|
153 |
msgid "Your jotURL account details"
|
154 |
+
msgstr "Dati del tuo account jotURL"
|
155 |
|
156 |
+
#: wp-to-twitter-shorteners.php:382
|
157 |
msgid "Your jotURL public <abbr title='application programming interface'>API</abbr> key:"
|
158 |
msgstr "La tua chiave pubblica per le <abbr title='application programming interface'>API</abbr> di jotURL:"
|
159 |
|
160 |
+
#: wp-to-twitter-shorteners.php:383
|
161 |
msgid "Your jotURL private <abbr title='application programming interface'>API</abbr> key:"
|
162 |
msgstr "La tua chiave privata per le <abbr title='application programming interface'>API</abbr> di jotURL:"
|
163 |
|
164 |
+
#: wp-to-twitter-shorteners.php:384
|
165 |
msgid "Parameters to add to the long URL (before shortening):"
|
166 |
msgstr "Parametri da aggiungere alla URL lunga (prima di accorciarla):"
|
167 |
|
168 |
+
#: wp-to-twitter-shorteners.php:384
|
169 |
msgid "Parameters to add to the short URL (after shortening):"
|
170 |
msgstr "Parametri da aggiungere alla URL breve (dopo averla accorciata):"
|
171 |
|
172 |
+
#: wp-to-twitter-shorteners.php:385
|
173 |
msgid "View your jotURL public and private API key"
|
174 |
msgstr "Visualizza la tua chiave pubblica e privata per le API di jotURL"
|
175 |
|
176 |
+
#: wp-to-twitter-shorteners.php:388
|
177 |
msgid "Save jotURL settings"
|
178 |
msgstr "Salva le impostazioni per jotURL"
|
179 |
|
180 |
+
#: wp-to-twitter-shorteners.php:388
|
181 |
msgid "Clear jotURL settings"
|
182 |
msgstr "Cancella le impostazioni di jotURL"
|
183 |
|
184 |
+
#: wp-to-twitter-shorteners.php:389
|
185 |
msgid "A jotURL public and private API key is required to shorten URLs via the jotURL API and WP to Twitter."
|
186 |
msgstr "Una chiave pubblica e privata per le API di jotURL è richiesta per accorciare le URL tramite le API di jotURL e WP to Twitter."
|
187 |
|
188 |
+
#: wp-to-twitter-shorteners.php:484
|
189 |
msgid "jotURL private API Key Updated. "
|
190 |
msgstr "La tua chiave privata per le API di jotURL è stata aggiornata."
|
191 |
|
192 |
+
#: wp-to-twitter-shorteners.php:487
|
193 |
msgid "jotURL private API Key deleted. You cannot use the jotURL API without a private API key. "
|
194 |
msgstr "Chiave privata per le API di jotURL cancellata. Non puoi usare le API di jotURL senza una chiave privata."
|
195 |
|
196 |
+
#: wp-to-twitter-shorteners.php:489
|
197 |
msgid "jotURL private API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! A private API key is required to use the jotURL URL shortening service. "
|
198 |
msgstr "Chiave privata per le API di jotURL non aggiunta - <a href='https://www.joturl.com/reserved/api.html'>recuperane una qua</a>! Una chiave privata è richiesta per usare il servizio di accorciamento URL di jotURL."
|
199 |
|
200 |
+
#: wp-to-twitter-shorteners.php:493
|
201 |
msgid "jotURL public API Key Updated. "
|
202 |
msgstr "Chiave pubblica per le API di jotURL aggiornata."
|
203 |
|
204 |
+
#: wp-to-twitter-shorteners.php:496
|
205 |
msgid "jotURL public API Key deleted. You cannot use the jotURL API without providing your public API Key. "
|
206 |
msgstr "Chiave pubblica per le API di jotURL cancellata. Non puoi usare le API di jotURL senza fornire la tua chiave pubblica per le API."
|
207 |
|
208 |
+
#: wp-to-twitter-shorteners.php:498
|
209 |
msgid "jotURL public API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! "
|
210 |
msgstr "Chiave pubblica per le API di jorURL non aggiunta - <a href='https://www.joturl.com/reserved/api.html'>recuperane una qua</a>! "
|
211 |
|
212 |
+
#: wp-to-twitter-shorteners.php:504
|
213 |
msgid "Long URL parameters added. "
|
214 |
msgstr "Parametri aggiunti per l'URL lungo."
|
215 |
|
216 |
+
#: wp-to-twitter-shorteners.php:507
|
217 |
msgid "Long URL parameters deleted. "
|
218 |
msgstr "Parametri cancellati per l'URL lungo."
|
219 |
|
220 |
+
#: wp-to-twitter-shorteners.php:513
|
221 |
msgid "Short URL parameters added. "
|
222 |
msgstr "Parametri aggiunti per l'URL breve."
|
223 |
|
224 |
+
#: wp-to-twitter-shorteners.php:516
|
225 |
msgid "Short URL parameters deleted. "
|
226 |
msgstr "Parametri cancellati per l'URL breve."
|
227 |
|
228 |
+
#: wp-to-twitter-shorteners.php:530
|
229 |
msgid "You must add your jotURL public and private API key in order to shorten URLs with jotURL."
|
230 |
msgstr "Devi aggiungere la tua chiave pubblica e privata per le API di jotURL per accorciare le URL tramite il servizio di jotURL."
|
231 |
|
232 |
+
#: wp-to-twitter-manager.php:530
|
233 |
msgid "Tags"
|
234 |
msgstr "Tag"
|
235 |
|
236 |
+
#: wp-to-twitter-manager.php:546
|
237 |
msgid "Template Tag Settings"
|
238 |
msgstr "Impostazioni Template Tag"
|
239 |
|
240 |
+
#: wp-to-twitter-manager.php:548
|
241 |
msgid "Extracted from the post. If you use the 'Excerpt' field, it will be used instead."
|
242 |
msgstr "Estratto dall'articolo. Sarà utilizzato in alternativa se si utilizza il campo 'Riassunto'."
|
243 |
|
244 |
+
#: wp-to-twitter-manager.php:591
|
245 |
msgid "Template tag priority order"
|
246 |
msgstr "Ordine di priorità dei Template Tag"
|
247 |
|
248 |
+
#: wp-to-twitter-manager.php:592
|
249 |
msgid "The order in which items will be abbreviated or removed from your Tweet if the Tweet is too long to send to Twitter."
|
250 |
msgstr "L'ordine in cui gli elementi saranno abbreviati o rimossi dal tuo Tweet se quest'ultimo è troppo lungo per essere inviata a Twitter."
|
251 |
|
252 |
+
#: wp-to-twitter-manager.php:647
|
253 |
msgid "Author Settings"
|
254 |
msgstr "Impostazioni autore"
|
255 |
|
256 |
+
#: wp-to-twitter-manager.php:652
|
257 |
msgid "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."
|
258 |
msgstr "Gli autori possono indicare il loro nome utente nel proprio profilo. La versione free di WP to Twitter aggiunge un @reference all'autore. @reference può essere inserito con lo shortcode <code>#account#</code> che preleverà il nome dell'account principale se l'account utente non è configurato."
|
259 |
|
260 |
+
#: wp-to-twitter-manager.php:656
|
261 |
msgid "Permissions"
|
262 |
msgstr "Permessi"
|
263 |
|
264 |
+
#: wp-to-twitter-manager.php:691
|
265 |
msgid "Error Messages and Debugging"
|
266 |
msgstr "Messaggi di errore e di Debug"
|
267 |
|
268 |
+
#: wp-to-twitter-manager.php:812
|
269 |
msgid "<code>#cat_desc#</code>: custom value from the category description field"
|
270 |
msgstr "<code>#cat_desc#</code>: valore personalizzato per il campo di descrizione della categoria"
|
271 |
|
272 |
+
#: wp-to-twitter-manager.php:819
|
273 |
msgid "<code>#@#</code>: the twitter @reference for the author or blank, if not set"
|
274 |
msgstr "<code>#@#</code>: @reference di Twitter per l'autore o vuoto se non settato"
|
275 |
|
276 |
+
#: wp-to-twitter-oauth.php:184
|
277 |
msgid "Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> queries</a>."
|
278 |
msgstr "Problemi di connessione? Prova ad usare <a href='#wpt_http'>il protocollo <code>http</code></a>."
|
279 |
|
280 |
+
#: wp-to-twitter-oauth.php:280
|
281 |
msgid "<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>"
|
282 |
msgstr "<strong>Suggerimento per la risoluzione dei problemi:</strong> Sei connesso ma ricevi un messaggio di errore che dice che le tue credenziali di accesso sono mancanti o incorrette? Controlla che il token di accesso abbia permessi di lettura/scrittura. Se non è così devi creare un nuovo token. <a href=\"http://www.joedolson.com/articles/wp-to-twitter/support-2/#q1\">Leggi le FAQ</a>"
|
283 |
|
284 |
+
#: wp-to-twitter-oauth.php:306 wp-to-twitter-oauth.php:312
|
285 |
msgid "Twitter's server time: "
|
286 |
msgstr "Ora del server di Twitter"
|
287 |
|
288 |
+
#: wp-to-twitter.php:73
|
289 |
msgid "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>"
|
290 |
msgstr "WP to Twitter richiede WordPress 3.1.4 o una versione più recente <a href=\"http://codex.wordpress.org/Upgrading_WordPress\">Aggiorna WordPress per usare tutte le funzionalità di WP to Twitter!</a>"
|
291 |
|
292 |
+
#: wp-to-twitter.php:336
|
293 |
msgid "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."
|
294 |
msgstr "403 Proibito: La richiesta è corretta ma è stata rifiutata da Twitter. Motivazioni: troppi Twewt in un breve lasso di tempo o il medesimo Tweet è stato inviato 2 volte. Questo non è un errore del plugin WP to Twitter."
|
295 |
|
296 |
+
#: wp-to-twitter.php:1377
|
297 |
msgid "Upgrade"
|
298 |
msgstr "Passa alla versione PRO"
|
299 |
|
300 |
+
#: wp-to-twitter-manager.php:535
|
301 |
msgid "Use tag slug as hashtag value"
|
302 |
msgstr "Usa il tag slug come valore hashtag"
|
303 |
|
304 |
+
#: wp-to-twitter-manager.php:177
|
|
|
|
|
|
|
|
|
305 |
msgid "WP to Twitter failed to connect with Twitter. Try <a href=\"#wpt_http\">switching to an HTTP connection</a>."
|
306 |
msgstr "WP to Twitter ha fallito nel connettersi a Twitter. Prova <a href=\"#wpt_http\">a passare ad una connessione di tipo HTTP</a>."
|
307 |
|
308 |
+
#: wp-to-twitter-shorteners.php:548
|
309 |
msgid "Choose a short URL service (account settings below)"
|
310 |
msgstr "Scegli un servizio di accorciamento delle URL (impostazioni dell'account di seguito)"
|
311 |
|
312 |
+
#: wp-to-twitter-shorteners.php:554
|
313 |
msgid "YOURLS (on this server)"
|
314 |
msgstr "YOURLS (su questo server)"
|
315 |
|
316 |
+
#: wp-to-twitter-shorteners.php:555
|
317 |
msgid "YOURLS (on a remote server)"
|
318 |
msgstr "YOURLS (sul server remoto)"
|
319 |
|
320 |
+
#: wpt-functions.php:264
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
msgid "Thank you for supporting the continuing development of this plug-in! I'll get back to you as soon as I can. Please ensure that you can receive email at <code>%s</code>."
|
322 |
msgstr "Grazie per supportare il proseguimento dello sviluppo di questo plug-in! Mi farò vivo appena possibile. Per favore, assicurati che tu possa ricevere le email a <code>%s</code>."
|
323 |
|
324 |
+
#: wpt-functions.php:266
|
325 |
msgid "Thanks for using WP to Twitter. Please ensure that you can receive email at <code>%s</code>."
|
326 |
msgstr "Grazie per l'uso di WP to Twitter. Per favore assicurati di poter ricevere email a <code>%s</code>."
|
327 |
|
328 |
+
#: wpt-functions.php:285
|
329 |
msgid "Reply to:"
|
330 |
msgstr "Rispondi a:"
|
331 |
|
332 |
+
#: wp-to-twitter-manager.php:672
|
333 |
msgid "The lowest user group that can add their Twitter information"
|
334 |
msgstr "Il gruppo di livello più basso che può aggiungere le proprie informazioni di Twitter"
|
335 |
|
336 |
+
#: wp-to-twitter-manager.php:677
|
337 |
msgid "The lowest user group that can see the Custom Tweet options when posting"
|
338 |
msgstr "Il gruppo di livello più basso che può vedere l'opzione Tweet personalizzato quando scrive un articolo"
|
339 |
|
340 |
+
#: wp-to-twitter-manager.php:682
|
341 |
msgid "The lowest user group that can toggle the Tweet/Don't Tweet option"
|
342 |
msgstr "Il gruppo di livello più basso che può attivare o disattivare l'opzione Inviare/Non inviare Tweet"
|
343 |
|
344 |
+
#: wp-to-twitter-manager.php:687
|
345 |
msgid "The lowest user group that can send Twitter updates"
|
346 |
msgstr "Il gruppo di livello più basso che può inviare aggiornamenti su Twitter"
|
347 |
|
348 |
+
#: wp-to-twitter-manager.php:816
|
349 |
msgid "<code>#author#</code>: the post author (@reference if available, otherwise display name)"
|
350 |
msgstr "<code>#author#</code>: l'autore dell'articolo (@account se disponibile, il nome da visualizzare altrimenti)"
|
351 |
|
352 |
+
#: wp-to-twitter-manager.php:817
|
353 |
msgid "<code>#displayname#</code>: post author's display name"
|
354 |
msgstr "<code>#displayname#</code>: Il nome da visualizzare per l'autore dell'articolo"
|
355 |
|
356 |
+
#: wp-to-twitter.php:291
|
357 |
msgid "This tweet was blank and could not be sent to Twitter."
|
358 |
msgstr "Questo tweet è vuoto e non può essere inviato a Twitter."
|
359 |
|
360 |
+
#: wp-to-twitter.php:339
|
361 |
msgid "404 Not Found: The URI requested is invalid or the resource requested does not exist."
|
362 |
msgstr "404 Not Found: L'URI richiesto non è valido o la risorsa richiesta non esiste."
|
363 |
|
364 |
+
#: wp-to-twitter.php:342
|
365 |
msgid "406 Not Acceptable: Invalid Format Specified."
|
366 |
msgstr "406 Not Acceptable: Il formato specificato non è valido."
|
367 |
|
368 |
+
#: wp-to-twitter.php:348
|
369 |
msgid "429 Too Many Requests: You have exceeded your rate limits."
|
370 |
msgstr "429 Too Many Requests: Hai raggiunto la tua quota limite."
|
371 |
|
372 |
+
#: wp-to-twitter.php:360
|
373 |
msgid "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."
|
374 |
msgstr "504 Gateway Timeout: I server di Twitter funzionano ma la richiesta non è stata soddisfatta a causa di qualche errore. Per favore, riprova in seguito."
|
375 |
|
376 |
+
#: wp-to-twitter.php:1028
|
377 |
msgid "Your prepended Tweet text; not part of your template."
|
378 |
msgstr "Testo inserito all'inizio dei tuoi Tweet (non fa parte dei tuo modello)."
|
379 |
|
380 |
+
#: wp-to-twitter.php:1031
|
381 |
msgid "Your appended Tweet text; not part of your template."
|
382 |
msgstr "Testo inserito alla fine dei tuoi Tweet (non fa parte dei tuo modello)."
|
383 |
|
384 |
+
#: wp-to-twitter.php:1130
|
385 |
msgid "Your role does not have the ability to Post Tweets from this site."
|
386 |
msgstr "Il tuo ruolo non permette di inviare Tweet da questo sito."
|
387 |
|
388 |
+
#: wp-to-twitter.php:1275
|
389 |
msgid "Hide account name in Tweets"
|
390 |
msgstr "Nascondi il nome dell'account nei Tweet"
|
391 |
|
392 |
+
#: wp-to-twitter.php:1276
|
393 |
msgid "Do not display my account in the #account# template tag."
|
394 |
msgstr "Non visualizzare il mio account nel template #account#."
|
395 |
|
396 |
+
#: wpt-functions.php:288
|
397 |
msgid "I have read <a href=\"%1$s\">the FAQ for this plug-in</a> <span>(required)</span>"
|
398 |
msgstr "Io ho letto <a href=\"%1$s\">le FAQ di questo plug-in</a> <span>(obbligatorio)</span>"
|
399 |
|
400 |
+
#: wpt-functions.php:291
|
401 |
msgid "I have <a href=\"%1$s\">made a donation to help support this plug-in</a>"
|
402 |
msgstr "Io ho <a href=\"%1$s\"> fatto una donazione per supportare questo plugin</a>"
|
403 |
|
404 |
+
#: wpt-functions.php:294
|
405 |
msgid "Support Request:"
|
406 |
msgstr "Richiesta di supporto:"
|
407 |
|
408 |
+
#: wp-to-twitter-manager.php:485
|
409 |
msgid "Settings for type \"%1$s\""
|
410 |
msgstr "Impostazioni per il tipo \"%1$s\""
|
411 |
|
412 |
+
#: wp-to-twitter-manager.php:488
|
413 |
msgid "Update when %1$s %2$s is published"
|
414 |
msgstr "Aggiorna quando %1$s %2$s è pubblicato"
|
415 |
|
416 |
+
#: wp-to-twitter-manager.php:488
|
417 |
msgid "Text for new %1$s updates"
|
418 |
msgstr "Testo per nuovo %1$s aggiornato"
|
419 |
|
420 |
+
#: wp-to-twitter-manager.php:492
|
421 |
msgid "Update when %1$s %2$s is edited"
|
422 |
msgstr "Aggiorna quando %1$s %2$s è modificato"
|
423 |
|
424 |
+
#: wp-to-twitter-manager.php:492
|
425 |
msgid "Text for %1$s editing updates"
|
426 |
msgstr "Testo per %1$s aggiornato"
|
427 |
|
428 |
+
#: wp-to-twitter-oauth.php:217
|
429 |
msgid "Your server timezone (should be UTC,GMT,Europe/London or equivalent):"
|
430 |
msgstr "Il fuso orario del tuo server (dovrebbe essere UTC,GMT,Europe/London o equivalente):"
|
431 |
|
432 |
+
#: wp-to-twitter-shorteners.php:558
|
433 |
msgid "Use Twitter Friendly Links."
|
434 |
msgstr "Utilizza Link in formato gradito a Twitter."
|
435 |
|
436 |
+
#: wp-to-twitter-shorteners.php:332
|
437 |
msgid "View your Bit.ly username and API key"
|
438 |
msgstr "Visualizza il tuo username di Bit.ly e la API key"
|
439 |
|
440 |
+
#: wp-to-twitter-shorteners.php:394
|
441 |
msgid "Your shortener does not require any account settings."
|
442 |
msgstr "Il tuo accorciatore di URL non richiede alcuna impostazione."
|
443 |
|
444 |
+
#: wp-to-twitter.php:317
|
445 |
msgid "Your Twitter application does not have read and write permissions. Go to <a href=\"%s\">your Twitter apps</a> to modify these settings."
|
446 |
msgstr "La tua applicazione Twitter non ha i permessi di lettura e scrittura. Vai alle <a href=\"%s\">tue applicazioni Twitter</a> per modificare queste impostazioni."
|
447 |
|
448 |
+
#: wp-to-twitter.php:1152
|
449 |
msgid "Failed Tweets"
|
450 |
msgstr "Tweet falliti"
|
451 |
|
452 |
+
#: wp-to-twitter.php:1167
|
453 |
msgid "No failed tweets on this post."
|
454 |
msgstr "Non ci sono tweet falliti in questo articolo."
|
455 |
|
456 |
+
#: wp-to-twitter-manager.php:789
|
457 |
msgid "Upgrade to <strong>WP Tweets PRO</strong> for more options!"
|
458 |
msgstr "Aggiorna a <strong>WP Tweets PRO</strong> per avere più opzioni!"
|
459 |
|
460 |
+
#: wp-to-twitter-manager.php:822
|
461 |
msgid "<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."
|
462 |
msgstr "<code>#reference#</code>: Usato solo nel co-tweeting. @riferisce all'account principale quando è inviato all'account dell'autore, @riferisce all'account dell'autore per i post all'account principale."
|
463 |
|
464 |
+
#: wp-to-twitter-oauth.php:284
|
465 |
msgid "WP to Twitter could not contact Twitter's remote server. Here is the error triggered: "
|
466 |
msgstr "WP to Twitter non è riuscito a contattare i server di Twitter. Questo è l'errore ottenuto:"
|
467 |
|
468 |
+
#: wp-to-twitter.php:276
|
469 |
msgid "This account is not authorized to post to Twitter."
|
470 |
msgstr "Questo account non è autorizzato per inviare messaggi su Twitter."
|
471 |
|
472 |
+
#: wp-to-twitter.php:285
|
473 |
msgid "This tweet is identical to another Tweet recently sent to this account."
|
474 |
msgstr "Questo tweet è identico ad un altro tweet recentemente inviato a questo account."
|
475 |
|
476 |
+
#: wp-to-twitter-shorteners.php:298
|
|
|
|
|
|
|
|
|
477 |
msgid "(optional)"
|
478 |
msgstr "(facoltativo)"
|
479 |
|
480 |
+
#: wp-to-twitter-manager.php:603
|
481 |
msgid "Do not post Tweets by default (editing only)"
|
482 |
msgstr "Di default non inviare i Tweet (solo modifica)"
|
483 |
|
484 |
+
#: wp-to-twitter-manager.php:814
|
485 |
msgid "<code>#modified#</code>: the post modified date"
|
486 |
msgstr "<code>#modified#</code>: la data di modifica del post"
|
487 |
|
488 |
+
#: wp-to-twitter-oauth.php:282
|
489 |
msgid "Your time stamps are more than 5 minutes apart. Your server could lose its connection with Twitter."
|
490 |
msgstr "Il tuo orario ha più di 5 minuti di differenza con Twitter e pertanto il tuo server potrebbe perdere la connessione con i loro."
|
491 |
|
492 |
+
#: wp-to-twitter-manager.php:650
|
493 |
msgid "Authors have individual Twitter accounts"
|
494 |
msgstr "Gli autori hanno degli account personali su Twitter"
|
495 |
|
496 |
+
#: wp-to-twitter-manager.php:693
|
497 |
msgid "Disable global URL shortener error messages."
|
498 |
msgstr "Disattiva i messaggi di errore globali generati accorciando la URL."
|
499 |
|
500 |
+
#: wp-to-twitter-manager.php:694
|
501 |
msgid "Disable global Twitter API error messages."
|
502 |
msgstr "Disattiva i messaggi di errore globali API Twitter."
|
503 |
|
504 |
+
#: wp-to-twitter-manager.php:696
|
505 |
msgid "Get Debugging Data for OAuth Connection"
|
506 |
msgstr "Ottieni i dati di Debugging per la connessione OAuth"
|
507 |
|
508 |
+
#: wp-to-twitter-manager.php:698
|
509 |
msgid "Switch to <code>http</code> connection. (Default is https)"
|
510 |
msgstr "Passa alla connessione <code>http</code>. (Quella di default è https)"
|
511 |
|
512 |
+
#: wp-to-twitter-manager.php:700
|
513 |
msgid "I made a donation, so stop whinging at me, please."
|
514 |
msgstr "Ho effettuato una donazione."
|
515 |
|
516 |
+
#: wp-to-twitter-manager.php:714
|
517 |
msgid "Limit Updating Categories"
|
518 |
msgstr "Limite aggiornamento categorie"
|
519 |
|
520 |
+
#: wp-to-twitter-manager.php:717
|
521 |
msgid "If no categories are checked, limiting by category will be ignored, and all categories will be Tweeted."
|
522 |
msgstr "Se non ci sono categorie selezionate il blocco di alcune sarà ignorato e tutte le categorie verranno prese in considerazione per i Tweet."
|
523 |
|
524 |
+
#: wp-to-twitter-manager.php:718
|
525 |
msgid "<em>Category limits are disabled.</em>"
|
526 |
msgstr "<em>Le limitazioni alle categorie non sono attive.</em>"
|
527 |
|
528 |
+
#: wp-to-twitter-manager.php:727
|
529 |
msgid "Get Plug-in Support"
|
530 |
msgstr "Ottieni supporto per il plugin"
|
531 |
|
532 |
+
#: wp-to-twitter-manager.php:738
|
533 |
msgid "Check Support"
|
534 |
msgstr "Verifica assistenza"
|
535 |
|
536 |
+
#: wp-to-twitter-manager.php:738
|
537 |
msgid "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."
|
538 |
msgstr "Utilizzare nel caso in cui il tuo server supporti le query di <a href=\"http://www.joedolson.com/articles/wp-to-twitter/\">WP to Twitter</a> per Twitter e per le API di accorciamento URL. Questo test invierà a Twitter un aggiornamento dello stato e accorcerà la URL utilizzando il metodo da te selezionato."
|
539 |
|
540 |
+
#: wp-to-twitter-manager.php:756
|
541 |
msgid "Support WP to Twitter"
|
542 |
msgstr "Supporta WP to Twitter"
|
543 |
|
544 |
+
#: wp-to-twitter-manager.php:758
|
545 |
msgid "WP to Twitter Support"
|
546 |
msgstr "Assistenza WP to Twitter"
|
547 |
|
548 |
+
#: wp-to-twitter-manager.php:766 wp-to-twitter.php:1119 wp-to-twitter.php:1121
|
549 |
msgid "Get Support"
|
550 |
msgstr "Ottieni assistenza"
|
551 |
|
552 |
+
#: wp-to-twitter-manager.php:769
|
553 |
msgid "<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!"
|
554 |
msgstr "<a href=\"http://www.joedolson.com/donate.php\">Fai una donazione oggi!</a> Ogni donazione conta - dona $2, $10, o $100 e aiutami a mantenere attivo questo plug-in!"
|
555 |
|
556 |
+
#: wp-to-twitter-manager.php:787
|
557 |
msgid "Upgrade Now!"
|
558 |
msgstr "Aggiorna ora!"
|
559 |
|
560 |
+
#: wp-to-twitter-manager.php:790
|
561 |
msgid "Extra features with the PRO upgrade:"
|
562 |
msgstr "Funzionalità extra che avrai con WP Tweets PRO:"
|
563 |
|
564 |
+
#: wp-to-twitter-manager.php:804
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
msgid "Shortcodes"
|
566 |
msgstr "Codici brevi"
|
567 |
|
568 |
+
#: wp-to-twitter-manager.php:806
|
569 |
msgid "Available in post update templates:"
|
570 |
msgstr "Disponibili nei template di aggiornamento del post:"
|
571 |
|
572 |
+
#: wp-to-twitter-manager.php:808
|
573 |
msgid "<code>#title#</code>: the title of your blog post"
|
574 |
msgstr "<code>#title#</code>: il titolo del tuo post"
|
575 |
|
576 |
+
#: wp-to-twitter-manager.php:809
|
577 |
msgid "<code>#blog#</code>: the title of your blog"
|
578 |
msgstr "<code>#blog#</code>: il titolo del tuo blog"
|
579 |
|
580 |
+
#: wp-to-twitter-manager.php:810
|
581 |
msgid "<code>#post#</code>: a short excerpt of the post content"
|
582 |
msgstr "<code>#post#</code>: un breve riassunto dei contenuti del post"
|
583 |
|
584 |
+
#: wp-to-twitter-manager.php:811
|
585 |
msgid "<code>#category#</code>: the first selected category for the post"
|
586 |
msgstr "<code>#category#</code>: la prima categoria selezionata per il post"
|
587 |
|
588 |
+
#: wp-to-twitter-manager.php:813
|
589 |
msgid "<code>#date#</code>: the post date"
|
590 |
msgstr "<code>#date#</code>: la data del post"
|
591 |
|
592 |
+
#: wp-to-twitter-manager.php:815
|
593 |
msgid "<code>#url#</code>: the post URL"
|
594 |
msgstr "<code>#url#</code>: l'URL del post"
|
595 |
|
596 |
+
#: wp-to-twitter-manager.php:818
|
597 |
msgid "<code>#account#</code>: the twitter @reference for the account (or the author, if author settings are enabled and set.)"
|
598 |
msgstr "<code>#account#</code>: il riferimento Twitter @ per l'account (o per l'autore, previa attivazione ed impostazione.)"
|
599 |
|
600 |
+
#: wp-to-twitter-manager.php:820
|
601 |
msgid "<code>#tags#</code>: your tags modified into hashtags. See options in the Advanced Settings section, below."
|
602 |
msgstr "<code>#tags#</code>: i tuoi tag modificati in hashtag. Vedi le opzioni nelle Impostazioni Avanzate più in basso."
|
603 |
|
604 |
+
#: wp-to-twitter-manager.php:825
|
605 |
msgid "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>"
|
606 |
msgstr "Hai la possibilità di potere creare degli shortcode personalizzati grazie ai campi personalizzati di WordPress. Utilizza le doppie parentesi quadre per avvolgere il nome del tuo campo personalizzato per aggiungere il valore di quel dato campo al tuo stato di aggiornamento. Esempio: <code>[[custom_field]]</code></p>"
|
607 |
|
608 |
+
#: wp-to-twitter-oauth.php:115
|
609 |
msgid "WP to Twitter was unable to establish a connection to Twitter."
|
610 |
msgstr "WP to Twitter non è riuscito a stabilire una connessione con Twitter."
|
611 |
|
612 |
+
#: wp-to-twitter-oauth.php:185
|
613 |
msgid "There was an error querying Twitter's servers"
|
614 |
msgstr "C'è stato un errore nell'interrogare i server di Twitter"
|
615 |
|
616 |
+
#: wp-to-twitter-oauth.php:209 wp-to-twitter-oauth.php:211
|
617 |
msgid "Connect to Twitter"
|
618 |
msgstr "Collegati a Twitter"
|
619 |
|
620 |
+
#: wp-to-twitter-oauth.php:214
|
621 |
msgid "WP to Twitter Set-up"
|
622 |
msgstr "Impostazioni WP to Twitter"
|
623 |
|
624 |
+
#: wp-to-twitter-oauth.php:215 wp-to-twitter-oauth.php:306
|
625 |
+
#: wp-to-twitter-oauth.php:311
|
626 |
msgid "Your server time:"
|
627 |
msgstr "Ora del tuo server:"
|
628 |
|
629 |
+
#: wp-to-twitter-oauth.php:215
|
630 |
msgid "Twitter's time:"
|
631 |
msgstr "Orario di Twitter:"
|
632 |
|
633 |
+
#: wp-to-twitter-oauth.php:215
|
634 |
msgid "If these timestamps are not within 5 minutes of each other, your server will not connect to Twitter."
|
635 |
msgstr "Se questi orari non sono distanti al più 5 minuti l'uno dall'altro, il tuo server non sarà in grado di connettersi a Twitter."
|
636 |
|
637 |
+
#: wp-to-twitter-oauth.php:221
|
638 |
msgid "1. Register this site as an application on "
|
639 |
msgstr "1. Registra questo sito come una applicazione sulla "
|
640 |
|
641 |
+
#: wp-to-twitter-oauth.php:221
|
642 |
msgid "Twitter's application registration page"
|
643 |
msgstr "pagina di registrazione applicazione Twitter"
|
644 |
|
645 |
+
#: wp-to-twitter-oauth.php:223
|
646 |
msgid "If you're not currently logged in to Twitter, log-in to the account you want associated with this site"
|
647 |
msgstr "Se non sei ancora loggato in Twitter, effettua il login nell'account che vuoi associare al sito"
|
648 |
|
649 |
+
#: wp-to-twitter-oauth.php:225
|
|
|
|
|
|
|
|
|
650 |
msgid "Your Application Description can be anything."
|
651 |
msgstr "La descrizione dell'applicazione (Application Description) può essere qualsiasi cosa."
|
652 |
|
653 |
+
#: wp-to-twitter-oauth.php:226
|
654 |
msgid "The WebSite and Callback URL should be "
|
655 |
msgstr "Il sito web ed il Callback URL dovrebbere essere "
|
656 |
|
657 |
+
#: wp-to-twitter-oauth.php:228
|
658 |
msgid "Agree to the Developer Rules of the Road and continue."
|
659 |
msgstr "Acconsenti a Developer Rules of the Road e prosegui."
|
660 |
|
661 |
+
#: wp-to-twitter-oauth.php:229
|
662 |
msgid "2. Switch to the \"Settings\" tab in Twitter apps"
|
663 |
msgstr "2. Passa alla scheda \"Impostazioni\" (\"Settings\") nelle app di Twitter"
|
664 |
|
665 |
+
#: wp-to-twitter-oauth.php:231
|
666 |
msgid "Select \"Read and Write\" for the Application Type"
|
667 |
msgstr "Seleziona \"Read and Write\" per il tipo di applicazione"
|
668 |
|
669 |
+
#: wp-to-twitter-oauth.php:232
|
670 |
msgid "Update the application settings"
|
671 |
msgstr "Aggiorna impostazioni applicazione"
|
672 |
|
673 |
+
#: wp-to-twitter-oauth.php:235
|
|
|
|
|
|
|
|
|
674 |
msgid "Once you have registered your site as an application, you will be provided with four keys."
|
675 |
msgstr "Una volta registrato il tuo sito come applicazione, ti saranno fornite quattro chiavi."
|
676 |
|
677 |
+
#: wp-to-twitter-oauth.php:236
|
678 |
msgid "3. Copy and paste your consumer key and consumer secret into the fields below"
|
679 |
+
msgstr "3. Copia ed incolla nei campi qui sotto la tua consumer key ed il consumer secret"
|
680 |
|
681 |
+
#: wp-to-twitter-oauth.php:239
|
682 |
msgid "Twitter Consumer Key"
|
683 |
msgstr "Twitter Consumer Key"
|
684 |
|
685 |
+
#: wp-to-twitter-oauth.php:243
|
686 |
msgid "Twitter Consumer Secret"
|
687 |
msgstr "Twitter Consumer Secret"
|
688 |
|
689 |
+
#: wp-to-twitter-oauth.php:247
|
690 |
msgid "4. Copy and paste your Access Token and Access Token Secret into the fields below"
|
691 |
+
msgstr "4. Copia ed incolla nei campi qui sotto il tuo token di accesso e secret"
|
692 |
|
693 |
+
#: wp-to-twitter-oauth.php:248
|
694 |
msgid "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."
|
695 |
msgstr "Se il livello di accesso per il tuo token di accesso non è \"<em>Lettura e Scrittura</em>\", devi ritornare al passo 2 e generare un nuovo token di accesso."
|
696 |
|
697 |
+
#: wp-to-twitter-oauth.php:251
|
698 |
msgid "Access Token"
|
699 |
msgstr "Token d'accesso"
|
700 |
|
701 |
+
#: wp-to-twitter-oauth.php:255
|
702 |
msgid "Access Token Secret"
|
703 |
msgstr "Token d'accesso - Secret"
|
704 |
|
705 |
+
#: wp-to-twitter-oauth.php:274
|
706 |
msgid "Disconnect Your WordPress and Twitter Account"
|
707 |
msgstr "Scollega il tuo account WordPress e Twitter"
|
708 |
|
709 |
+
#: wp-to-twitter-oauth.php:278
|
710 |
msgid "Disconnect your WordPress and Twitter Account"
|
711 |
msgstr "Disconnetti il tuo account WordPress e Twitter"
|
712 |
|
713 |
+
#: wp-to-twitter-oauth.php:288
|
714 |
msgid "Disconnect from Twitter"
|
715 |
msgstr "Disconnettiti da Twitter"
|
716 |
|
717 |
+
#: wp-to-twitter-oauth.php:294
|
718 |
msgid "Twitter Username "
|
719 |
msgstr "Nome utente Twitter"
|
720 |
|
721 |
+
#: wp-to-twitter-oauth.php:295
|
722 |
msgid "Consumer Key "
|
723 |
msgstr "Consumer Key "
|
724 |
|
725 |
+
#: wp-to-twitter-oauth.php:296
|
726 |
msgid "Consumer Secret "
|
727 |
msgstr "Consumer Secret "
|
728 |
|
729 |
+
#: wp-to-twitter-oauth.php:297
|
730 |
msgid "Access Token "
|
731 |
msgstr "Token d'accesso"
|
732 |
|
733 |
+
#: wp-to-twitter-oauth.php:298
|
734 |
msgid "Access Token Secret "
|
735 |
msgstr "Token d'accesso - Secret"
|
736 |
|
737 |
+
#: wp-to-twitter.php:43
|
738 |
msgid "WP to Twitter requires PHP version 5 or above. Please upgrade PHP to run WP to Twitter."
|
739 |
msgstr "WP to Twitter richiede una versione pari a o maggiore di PHP 5. Per favore aggiorna la tua versione di PHP per poter utilizzare WP to Twitter."
|
740 |
|
741 |
+
#: wp-to-twitter-oauth.php:200
|
742 |
msgid "Twitter requires authentication by OAuth. You will need to <a href='%s'>update your settings</a> to complete installation of WP to Twitter."
|
743 |
msgstr "Twitter necessita una autentificazione via OAuth. Aggiorna le tue <a href='%s'>impostazioni</a> per completare l'installazione di WP to Twitter."
|
744 |
|
745 |
+
#: wp-to-twitter.php:322
|
746 |
msgid "200 OK: Success!"
|
747 |
msgstr "200 OK: Successo!"
|
748 |
|
749 |
+
#: wp-to-twitter.php:329
|
750 |
msgid "400 Bad Request: The request was invalid. This is the status code returned during rate limiting."
|
751 |
msgstr "400 Bad Request: La richiesta non é valida. L'utilizzo di questo codice é relativo al limite delle chiamate."
|
752 |
|
753 |
+
#: wp-to-twitter.php:332
|
754 |
msgid "401 Unauthorized: Authentication credentials were missing or incorrect."
|
755 |
msgstr "401 Unauthorized: quando mancano oppure sono inesatte le credenziali per l'autentificazione."
|
756 |
|
757 |
+
#: wp-to-twitter.php:351
|
758 |
msgid "500 Internal Server Error: Something is broken at Twitter."
|
759 |
msgstr "500 Internal Server Error: problemi interni a Twitter."
|
760 |
|
761 |
+
#: wp-to-twitter.php:357
|
762 |
msgid "503 Service Unavailable: The Twitter servers are up, but overloaded with requests - Please try again later."
|
763 |
msgstr "503 Service Unavailable: i server di Twitter funzionano, ma sono sommersi di richieste. Prova più tardi."
|
764 |
|
765 |
+
#: wp-to-twitter.php:354
|
766 |
msgid "502 Bad Gateway: Twitter is down or being upgraded."
|
767 |
msgstr "502 Bad Gateway: Twitter é down oppure sotto aggiornamento."
|
768 |
|
769 |
+
#: wp-to-twitter.php:397
|
770 |
msgid "No Twitter OAuth connection found."
|
771 |
msgstr "Non è stata trovata la connessione a Twitter OAuth."
|
772 |
|
773 |
+
#: wp-to-twitter.php:1138
|
774 |
msgid "Previous Tweets"
|
775 |
msgstr "Tweet precedenti"
|
776 |
|
777 |
+
#: wp-to-twitter.php:1023
|
778 |
msgid "Custom Twitter Post"
|
779 |
msgstr "Messaggio personalizzato Twitter"
|
780 |
|
781 |
+
#: wp-to-twitter.php:1034
|
782 |
msgid "Your template:"
|
783 |
msgstr "Il tuo template:"
|
784 |
|
785 |
+
#: wp-to-twitter.php:1038
|
786 |
msgid "YOURLS Custom Keyword"
|
787 |
msgstr "YOURLS - Custom Keyword"
|
788 |
|
789 |
+
#: wp-to-twitter.php:1119
|
790 |
msgid "Upgrade to WP Tweets Pro"
|
791 |
msgstr "Aggiorna a WP Tweets Pro"
|
792 |
|
793 |
+
#: wp-to-twitter.php:1049
|
794 |
msgid "Don't Tweet this post."
|
795 |
msgstr "Non segnalare a Twitter questo articolo."
|
796 |
|
797 |
+
#: wp-to-twitter.php:1049
|
798 |
msgid "Tweet this post."
|
799 |
msgstr "Segnala a Twitter questo articolo."
|
800 |
|
801 |
+
#: wp-to-twitter.php:1097
|
802 |
msgid "Access to customizing WP to Twitter values is not allowed for your user role."
|
803 |
msgstr "L'accesso alla personalizzazione dei valori per WP to Twitter non è permessa ad utenti col tuo ruolo."
|
804 |
|
805 |
+
#: wp-to-twitter.php:1196
|
806 |
msgid "Characters left: "
|
807 |
msgstr "Caratteri mancanti:"
|
808 |
|
809 |
+
#: wp-to-twitter.php:1261
|
810 |
msgid "WP Tweets User Settings"
|
811 |
msgstr "Impostazioni utente di WP Tweets"
|
812 |
|
813 |
+
#: wp-to-twitter.php:1265
|
814 |
msgid "Use My Twitter Username"
|
815 |
msgstr "Utilizza il mio nome utente Twitter"
|
816 |
|
817 |
+
#: wp-to-twitter.php:1266
|
818 |
msgid "Tweet my posts with an @ reference to my username."
|
819 |
msgstr "Segnala i miei articoli con un riferimento @ correlato al mio nome utente."
|
820 |
|
821 |
+
#: wp-to-twitter.php:1267
|
822 |
msgid "Tweet my posts with an @ reference to both my username and to the main site username."
|
823 |
msgstr "Segnala i miei articoli con un riferimento @ correlato tanto al mio nome utente per il sito principale quanto al mio nome utente."
|
824 |
|
825 |
+
#: wp-to-twitter.php:1271
|
826 |
msgid "Your Twitter Username"
|
827 |
msgstr "Nome utente Twitter"
|
828 |
|
829 |
+
#: wp-to-twitter.php:1272
|
830 |
msgid "Enter your own Twitter username."
|
831 |
msgstr "Inserisci il tuo nome utente Twitter"
|
832 |
|
833 |
+
#: wp-to-twitter.php:1329
|
834 |
msgid "Check off categories to tweet"
|
835 |
msgstr "Togli la spunta alle categorie per le quali inviare i tweet"
|
836 |
|
837 |
+
#: wp-to-twitter.php:1333
|
838 |
msgid "Do not tweet posts in checked categories (Reverses default behavior)"
|
839 |
msgstr "Non inviare i tweet per le categorie selezionate (Inverte il comportamento di default)"
|
840 |
|
841 |
+
#: wp-to-twitter.php:1350
|
842 |
msgid "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."
|
843 |
msgstr "I limiti sono esclusivi. Se un post è in una categoria che dovrebbe essere inviata ed una che non lo dovrebbe, il Tweet non verrà inviato."
|
844 |
|
845 |
+
#: wp-to-twitter.php:1353
|
846 |
msgid "Set Categories"
|
847 |
msgstr "Imposta le categorie"
|
848 |
|
849 |
+
#: wp-to-twitter.php:1376
|
850 |
msgid "Settings"
|
851 |
msgstr "Impostazioni"
|
852 |
|
853 |
+
#: wp-to-twitter.php:1414
|
854 |
msgid "<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href=\"%1$s\">changelog</a> before upgrading."
|
855 |
msgstr "<br /><strong>Nota:</strong> Leggi il <a class=\"thickbox\" href=\"%1$s\">changelog</a> prima di aggiornare."
|
856 |
|
860 |
msgid "http://www.joedolson.com/articles/wp-to-twitter/"
|
861 |
msgstr "http://www.joedolson.com/articles/wp-to-twitter/"
|
862 |
|
|
|
|
|
|
|
863 |
msgid "Joseph Dolson"
|
864 |
msgstr "Joseph Dolson"
|
865 |
|
866 |
msgid "http://www.joedolson.com/"
|
867 |
msgstr "http://www.joedolson.com/"
|
868 |
|
869 |
+
#: wpt-functions.php:258
|
870 |
msgid "Please read the FAQ and other Help documents before making a support request."
|
871 |
msgstr "Leggi le FAQ e le documentazioni di aiuto prima di inviare una richiesta di supporto."
|
872 |
|
873 |
+
#: wpt-functions.php:260
|
874 |
msgid "Please describe your problem. I'm not psychic."
|
875 |
msgstr "Descrivi il tuo problema. Grazie."
|
876 |
|
877 |
+
#: wpt-functions.php:280
|
878 |
msgid "<strong>Please note</strong>: I do keep records of those who have donated, but if your donation came from somebody other than your account at this web site, you must note this in your message."
|
879 |
msgstr "<strong>Nota</strong>: sebbene conservi un elenco dei donatori e la tua donazione provenisse da un nome differente da quello indicato nel tuo account, ti invito a indicarlo nel tuo messaggio."
|
880 |
|
881 |
+
#: wpt-functions.php:297
|
882 |
msgid "Send Support Request"
|
883 |
msgstr "Invia richiesta supporto"
|
884 |
|
885 |
+
#: wpt-functions.php:300
|
886 |
msgid "The following additional information will be sent with your support request:"
|
887 |
msgstr "Le seguenti informazioni saranno inviate insieme alla tua richiesta:"
|
888 |
|
889 |
+
#: wp-to-twitter-manager.php:41
|
890 |
msgid "No error information is available for your shortener."
|
891 |
msgstr "Nessuna informazione di errore disponibile per il servizio di accorciamento URL da te scelto."
|
892 |
|
893 |
+
#: wp-to-twitter-manager.php:43
|
894 |
msgid "<li class=\"error\"><strong>WP to Twitter was unable to contact your selected URL shortening service.</strong></li>"
|
895 |
msgstr "<li class=\"error\"><strong>WP to Twitter non é stato in grado di contattare il servizio per gli URL brevi da te selezionato.</strong></li>"
|
896 |
|
897 |
+
#: wp-to-twitter-manager.php:46
|
898 |
msgid "<li><strong>WP to Twitter successfully contacted your selected URL shortening service.</strong> The following link should point to your blog homepage:"
|
899 |
msgstr "<li><strong>WP to Twitter ha contattato con successo il servizio per gli URL brevi da te selezionato.</strong> Il seguente link dovrebbe puntare alla homepage del tuo blog:"
|
900 |
|
901 |
+
#: wp-to-twitter-manager.php:54
|
902 |
msgid "<li><strong>WP to Twitter successfully submitted a status update to Twitter.</strong></li>"
|
903 |
msgstr "<li><strong>WP to Twitter ha inviato con successo l'aggiornamento dello stato a Twitter.</strong></li>"
|
904 |
|
905 |
+
#: wp-to-twitter-manager.php:57
|
906 |
msgid "<li class=\"error\"><strong>WP to Twitter failed to submit an update to Twitter.</strong></li>"
|
907 |
msgstr "<li class=\"error\"><strong>WP to Twitter non é stato in grado di inviare l'aggiornamento a Twitter.</strong></li>"
|
908 |
|
909 |
+
#: wp-to-twitter-manager.php:61
|
910 |
msgid "You have not connected WordPress to Twitter."
|
911 |
msgstr "Non hai connesso WordPress a Twitter."
|
912 |
|
913 |
+
#: wp-to-twitter-manager.php:65
|
914 |
msgid "<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>"
|
915 |
msgstr "<li class=\"error\"><strong>Pare che il tuo server non supporti le funzioni richieste affinché WP to Twitter possa funzionare correttamente.</strong> Puoi comunque provare ugualmente - queste verifiche non sono perfette - garantisco i risultati.</li>"
|
916 |
|
917 |
+
#: wp-to-twitter-manager.php:69
|
918 |
msgid "<li><strong>Your server should run WP to Twitter successfully.</strong></li>"
|
919 |
msgstr "<li><strong>WP to Twitter funziona correttamente per il tuo server.</strong></li>"
|
920 |
|
921 |
+
#: wp-to-twitter-manager.php:87
|
922 |
msgid "WP to Twitter Errors Cleared"
|
923 |
msgstr "Gli errori WP to Twitter sono stati azzerati"
|
924 |
|
925 |
+
#: wp-to-twitter-manager.php:170
|
926 |
msgid "WP to Twitter is now connected with Twitter."
|
927 |
msgstr "WP to Twitter é ora connesso a Twitter."
|
928 |
|
929 |
+
#: wp-to-twitter-manager.php:185
|
930 |
msgid "OAuth Authentication Data Cleared."
|
931 |
msgstr "I dati della autentificazione OAuth sono stati svuotati."
|
932 |
|
933 |
+
#: wp-to-twitter-manager.php:192
|
934 |
msgid "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."
|
935 |
msgstr "Autentificazione OAuth fallita. L'ora del tuo sever non é sicronizzata con i server di Twitter. Comunica il problema al tuo fornitore di hosting."
|
936 |
|
937 |
+
#: wp-to-twitter-manager.php:199
|
938 |
msgid "OAuth Authentication response not understood."
|
939 |
msgstr "Risposta Autentificazione OAuth non valida."
|
940 |
|
941 |
+
#: wp-to-twitter-manager.php:376
|
942 |
msgid "WP to Twitter Advanced Options Updated"
|
943 |
msgstr "Le opzioni avanzate di WP to Twitter sono state aggiornate"
|
944 |
|
945 |
+
#: wp-to-twitter-shorteners.php:526
|
946 |
msgid "You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly."
|
947 |
msgstr "E' necessario che tu inserisca i dati per il login e la chiave API di Bit.ly in modo da potere accorciare le URL con Bit.ly."
|
948 |
|
949 |
+
#: wp-to-twitter-shorteners.php:534
|
950 |
msgid "You must add your YOURLS remote URL, login, and password in order to shorten URLs with a remote installation of YOURLS."
|
951 |
msgstr "E' necessario che tu inserisca il tuo URL remoto a YOURLS, il login e la password in modo da potere accorciare le URL attraverso la tua installazione remota di YOURLS."
|
952 |
|
953 |
+
#: wp-to-twitter-shorteners.php:538
|
954 |
msgid "You must add your YOURLS server path in order to shorten URLs with a remote installation of YOURLS."
|
955 |
msgstr "E' necessario che tu inserisca il percorso al server del tuo YOURLS in modo da potere accorciare le URL attraverso la tua installazione remota di YOURLS."
|
956 |
|
957 |
+
#: wp-to-twitter-manager.php:394
|
958 |
msgid "WP to Twitter Options Updated"
|
959 |
msgstr "Le opzioni di WP to Twitter sono state aggiornate"
|
960 |
|
961 |
+
#: wp-to-twitter-manager.php:403
|
962 |
msgid "Category limits updated."
|
963 |
msgstr "I limiti per la categoria sono stati aggiornati."
|
964 |
|
965 |
+
#: wp-to-twitter-manager.php:407
|
966 |
msgid "Category limits unset."
|
967 |
msgstr "Le limitazioni alle categorie non sono state impostate."
|
968 |
|
969 |
+
#: wp-to-twitter-shorteners.php:406
|
970 |
msgid "YOURLS password updated. "
|
971 |
msgstr "La password di YOURLS é stata aggiornata."
|
972 |
|
973 |
+
#: wp-to-twitter-shorteners.php:409
|
974 |
msgid "YOURLS password deleted. You will be unable to use your remote YOURLS account to create short URLS."
|
975 |
msgstr "La tua password di YOURLS é stata cancellata. Non potrai utilizzare il tuo account remoto YOURLS per la creazione di URL brevi."
|
976 |
|
977 |
+
#: wp-to-twitter-shorteners.php:411
|
978 |
msgid "Failed to save your YOURLS password! "
|
979 |
msgstr "Non é stato possibile salvare la tua password di YOURLS!"
|
980 |
|
981 |
+
#: wp-to-twitter-shorteners.php:415
|
982 |
msgid "YOURLS username added. "
|
983 |
msgstr "Il nome utente YOURLS é stato aggiunto."
|
984 |
|
985 |
+
#: wp-to-twitter-shorteners.php:419
|
986 |
msgid "YOURLS API url added. "
|
987 |
msgstr "L'url alla API YOURLS é stato aggiunto. "
|
988 |
|
989 |
+
#: wp-to-twitter-shorteners.php:422
|
990 |
msgid "YOURLS API url removed. "
|
991 |
msgstr "L'url alla API YOURLS é stato rimosso. "
|
992 |
|
993 |
+
#: wp-to-twitter-shorteners.php:427
|
994 |
msgid "YOURLS local server path added. "
|
995 |
msgstr "Il percorso al server locale di YOURLS é stato aggiunto. "
|
996 |
|
997 |
+
#: wp-to-twitter-shorteners.php:429
|
998 |
msgid "The path to your YOURLS installation is not correct. "
|
999 |
msgstr "Il percorso alla tua installazione di YOURLS non é corretto. "
|
1000 |
|
1001 |
+
#: wp-to-twitter-shorteners.php:433
|
1002 |
msgid "YOURLS local server path removed. "
|
1003 |
msgstr "Il percorso al server locale di YOURLS é stato rimosso. "
|
1004 |
|
1005 |
+
#: wp-to-twitter-shorteners.php:438
|
1006 |
msgid "YOURLS will use Post ID for short URL slug."
|
1007 |
msgstr "YOURLS utilizzerà Post ID per lo slug degli URL brevi."
|
1008 |
|
1009 |
+
#: wp-to-twitter-shorteners.php:440
|
1010 |
msgid "YOURLS will use your custom keyword for short URL slug."
|
1011 |
msgstr "YOURLS utilizzerà la tua keyword personalizzata per lo slug degli URL brevi."
|
1012 |
|
1013 |
+
#: wp-to-twitter-shorteners.php:444
|
1014 |
msgid "YOURLS will not use Post ID for the short URL slug."
|
1015 |
msgstr "YOURLS non utilizzerà Post ID per lo slug degli URL brevi."
|
1016 |
|
1017 |
+
#: wp-to-twitter-shorteners.php:452
|
1018 |
msgid "Su.pr API Key and Username Updated"
|
1019 |
msgstr "La chiave API ed il nome utente di Su.pr sono stati aggiornati"
|
1020 |
|
1021 |
+
#: wp-to-twitter-shorteners.php:456
|
1022 |
msgid "Su.pr API Key and username deleted. Su.pr URLs created by WP to Twitter will no longer be associated with your account. "
|
1023 |
msgstr "La chiave API ed il nome utente di Su.pr sono stati cancellati. Gli URL di Su.pr creati da WP to Twitter non saranno più associati al tuo account. "
|
1024 |
|
1025 |
+
#: wp-to-twitter-shorteners.php:458
|
1026 |
msgid "Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! "
|
1027 |
msgstr "Non é stata inserita la chiave API di Su.pr - <a href='http://su.pr/'>vai qui</a>! "
|
1028 |
|
1029 |
+
#: wp-to-twitter-shorteners.php:464
|
1030 |
msgid "Bit.ly API Key Updated."
|
1031 |
msgstr "La chiave API di Bit.ly é stata aggiornata."
|
1032 |
|
1033 |
+
#: wp-to-twitter-shorteners.php:467
|
1034 |
msgid "Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
1035 |
msgstr "La chiave API di Bit.ly é stata cancellata. Non puoi utilizzare la API di Bit.ly senza la chiave API. "
|
1036 |
|
1037 |
+
#: wp-to-twitter-shorteners.php:469
|
1038 |
msgid "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."
|
1039 |
msgstr "La chiave API di Bit.ly non é stata aggiunta - <a href='http://bit.ly/account/'>vai qui</a>! E' necessaria una chiave API affinché il servizio di URL brevi Bit.ly di possa funzionare."
|
1040 |
|
1041 |
+
#: wp-to-twitter-shorteners.php:473
|
1042 |
msgid " Bit.ly User Login Updated."
|
1043 |
msgstr " Il login utente per Bit.ly é stato aggiornato."
|
1044 |
|
1045 |
+
#: wp-to-twitter-shorteners.php:476
|
1046 |
msgid "Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. "
|
1047 |
msgstr "Sono stati cancellati i dati per il login utente Bit.ly. Non puoi utilizzare la API di Bit.ly senza fornire il tuo nome utente. "
|
1048 |
|
1049 |
+
#: wp-to-twitter-shorteners.php:478
|
1050 |
msgid "Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
1051 |
msgstr "Non sono stati inseriti i dati per il login a Bit.ly - <a href='http://bit.ly/account/'>vai qui</a>! "
|
1052 |
|
1053 |
+
#: wp-to-twitter-manager.php:427
|
1054 |
msgid "<p>One or more of your last posts has failed to send a status update to Twitter. The Tweet has been saved, and you can re-Tweet it at your leisure.</p>"
|
1055 |
msgstr "<p>Uno o più dei tuoi ultimi post ha fallito nell'inviare la richiesta di aggiornamento di stato a Twitter. Il Tweet comunque è stato salvato e puoi inviarlo nuovamente quando ti è più comodo.</p>"
|
1056 |
|
1057 |
+
#: wp-to-twitter-manager.php:433
|
1058 |
msgid "Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. "
|
1059 |
msgstr "Non é stato possibile contattare i server di Twitter per comunicare il tuo <strong>nuovo link</strong>. Prova a compiere manualmente l'operazione."
|
1060 |
|
1061 |
+
#: wp-to-twitter-manager.php:436
|
1062 |
msgid "<p>The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet. Check with your URL shortening provider to see if there are any known issues.</p>"
|
1063 |
msgstr "<p>La richiesta alle API per il servizio di accorciamento delle URL è fallita e quindi la tua URL non è stata accorciata. La URL lunga è stata usata per il tuo Tweet. Contatta il tuo servizio di accorciamento URL per verificare se ci sono problemi.</p>"
|
1064 |
|
1065 |
+
#: wp-to-twitter-manager.php:442
|
1066 |
msgid "Clear 'WP to Twitter' Error Messages"
|
1067 |
msgstr "Svuota i messaggiodi errore 'WP to Twitter'"
|
1068 |
|
1069 |
+
#: wp-to-twitter-manager.php:448
|
1070 |
msgid "WP to Twitter Options"
|
1071 |
msgstr "Opzioni WP to Twitter"
|
1072 |
|
1073 |
+
#: wp-to-twitter-manager.php:461
|
1074 |
msgid "Basic Settings"
|
1075 |
msgstr "Impostazioni di base"
|
1076 |
|
1077 |
+
#: wp-to-twitter-manager.php:467 wp-to-twitter-manager.php:511
|
1078 |
msgid "Save WP->Twitter Options"
|
1079 |
msgstr "Salva le opzioni WP->Twitter"
|
1080 |
|
1081 |
+
#: wp-to-twitter-manager.php:500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1082 |
msgid "Settings for Links"
|
1083 |
msgstr "Impostazioni link"
|
1084 |
|
1085 |
+
#: wp-to-twitter-manager.php:503
|
1086 |
msgid "Update Twitter when you post a Blogroll link"
|
1087 |
msgstr "Aggiorna Twitter quando viene aggiunto un nuovo link al blogroll"
|
1088 |
|
1089 |
+
#: wp-to-twitter-manager.php:504
|
1090 |
msgid "Text for new link updates:"
|
1091 |
msgstr "Testo per gli aggiornamenti di un nuovo link:"
|
1092 |
|
1093 |
+
#: wp-to-twitter-manager.php:504
|
1094 |
msgid "Available shortcodes: <code>#url#</code>, <code>#title#</code>, and <code>#description#</code>."
|
1095 |
msgstr "Shortcode disponibili: <code>#url#</code>, <code>#title#</code> e <code>#description#</code>."
|
1096 |
|
1097 |
+
#: wp-to-twitter-shorteners.php:550
|
1098 |
msgid "Don't shorten URLs."
|
1099 |
msgstr "Non usare gli URL brevi"
|
1100 |
|
1101 |
+
#: wp-to-twitter-shorteners.php:294
|
1102 |
msgid "<abbr title=\"Uniform Resource Locator\">URL</abbr> Shortener Account Settings"
|
1103 |
msgstr "Impostazione account per il servizio di accorciamento di <abbr title=\"Uniform Resource Locator\">URL</abbr>"
|
1104 |
|
1105 |
+
#: wp-to-twitter-shorteners.php:298
|
1106 |
msgid "Your Su.pr account details"
|
1107 |
msgstr "Dati account Su.pr"
|
1108 |
|
1109 |
+
#: wp-to-twitter-shorteners.php:303
|
1110 |
msgid "Your Su.pr Username:"
|
1111 |
msgstr "Nome utente Su.pr:"
|
1112 |
|
1113 |
+
#: wp-to-twitter-shorteners.php:307
|
1114 |
msgid "Your Su.pr <abbr title='application programming interface'>API</abbr> Key:"
|
1115 |
msgstr "La tua chiave <abbr title='application programming interface'>API</abbr> di Su.pr:"
|
1116 |
|
1117 |
+
#: wp-to-twitter-shorteners.php:314
|
1118 |
msgid "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."
|
1119 |
msgstr "Non hai ancora un account oppure una chiave API Su.pr? <a href='http://su.pr/'>Vai qui</a>!<br />E' necessaria una chiave API in modo tale da potere associare gli URL da te creati con il tuo account di Su.pr."
|
1120 |
|
1121 |
+
#: wp-to-twitter-shorteners.php:320
|
1122 |
msgid "Your Bit.ly account details"
|
1123 |
msgstr "Dati account Bit.ly"
|
1124 |
|
1125 |
+
#: wp-to-twitter-shorteners.php:325
|
1126 |
msgid "Your Bit.ly username:"
|
1127 |
msgstr "Nome utente Bit.ly:"
|
1128 |
|
1129 |
+
#: wp-to-twitter-shorteners.php:329
|
1130 |
msgid "Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
1131 |
msgstr "La tua chiave <abbr title='application programming interface'>API</abbr> di Bit.ly:"
|
1132 |
|
1133 |
+
#: wp-to-twitter-shorteners.php:337
|
1134 |
msgid "Save Bit.ly API Key"
|
1135 |
msgstr "Salva la chiave API di Bit.ly"
|
1136 |
|
1137 |
+
#: wp-to-twitter-shorteners.php:337
|
1138 |
msgid "Clear Bit.ly API Key"
|
1139 |
msgstr "Svuota la chiave API di Bit.ly"
|
1140 |
|
1141 |
+
#: wp-to-twitter-shorteners.php:337
|
1142 |
msgid "A Bit.ly API key and username is required to shorten URLs via the Bit.ly API and WP to Twitter."
|
1143 |
msgstr "E' necessario il nome utente e la chiave API di Bit.ly per potere rendere brevi gli URL via la API di Bit.ly e WP to Twitter."
|
1144 |
|
1145 |
+
#: wp-to-twitter-shorteners.php:343
|
1146 |
msgid "Your YOURLS account details"
|
1147 |
msgstr "I dettagli del tuo account YOURLS"
|
1148 |
|
1149 |
+
#: wp-to-twitter-shorteners.php:348
|
1150 |
msgid "Path to your YOURLS config file (Local installations)"
|
1151 |
msgstr "Percorso al file di configurazione YOURLS (installazioni locali)"
|
1152 |
|
1153 |
+
#: wp-to-twitter-shorteners.php:349 wp-to-twitter-shorteners.php:353
|
1154 |
msgid "Example:"
|
1155 |
msgstr "Esempio:"
|
1156 |
|
1157 |
+
#: wp-to-twitter-shorteners.php:352
|
1158 |
msgid "URI to the YOURLS API (Remote installations)"
|
1159 |
msgstr "URI alla API di YOURLS (installazioni remote)"
|
1160 |
|
1161 |
+
#: wp-to-twitter-shorteners.php:356
|
1162 |
msgid "Your YOURLS username:"
|
1163 |
msgstr "Nome utente YOURLS:"
|
1164 |
|
1165 |
+
#: wp-to-twitter-shorteners.php:360
|
1166 |
msgid "Your YOURLS password:"
|
1167 |
msgstr "Password YOURLS:"
|
1168 |
|
1169 |
+
#: wp-to-twitter-shorteners.php:360
|
1170 |
msgid "<em>Saved</em>"
|
1171 |
msgstr "<em>Salvato</em>"
|
1172 |
|
1173 |
+
#: wp-to-twitter-shorteners.php:364
|
1174 |
msgid "Post ID for YOURLS url slug."
|
1175 |
msgstr "ID post per lo slug degli url di YOURLS."
|
1176 |
|
1177 |
+
#: wp-to-twitter-shorteners.php:365
|
1178 |
msgid "Custom keyword for YOURLS url slug."
|
1179 |
msgstr "Keyword personalizzata per lo slug degli url di YOURLS."
|
1180 |
|
1181 |
+
#: wp-to-twitter-shorteners.php:366
|
1182 |
msgid "Default: sequential URL numbering."
|
1183 |
msgstr "Predefinito: numerazione sequenziale URL."
|
1184 |
|
1185 |
+
#: wp-to-twitter-shorteners.php:372
|
1186 |
msgid "Save YOURLS Account Info"
|
1187 |
msgstr "Salva le info account di YOURLS"
|
1188 |
|
1189 |
+
#: wp-to-twitter-shorteners.php:372
|
1190 |
msgid "Clear YOURLS password"
|
1191 |
msgstr "Svuota la password di YOURLS"
|
1192 |
|
1193 |
+
#: wp-to-twitter-shorteners.php:372
|
1194 |
msgid "A YOURLS password and username is required to shorten URLs via the remote YOURLS API and WP to Twitter."
|
1195 |
msgstr "Nome utente e password sono necessari per accorciare le URL attraverso le API di YOURLS e di WP to Twitter."
|
1196 |
|
1197 |
+
#: wp-to-twitter-manager.php:522
|
1198 |
msgid "Advanced Settings"
|
1199 |
msgstr "Impostazioni avanzate"
|
1200 |
|
1201 |
+
#: wp-to-twitter-manager.php:527 wp-to-twitter-manager.php:706
|
1202 |
msgid "Save Advanced WP->Twitter Options"
|
1203 |
msgstr "Salva avanzate WP->Opzioni Twitter"
|
1204 |
|
1205 |
+
#: wp-to-twitter-manager.php:532
|
1206 |
msgid "Strip nonalphanumeric characters from tags"
|
1207 |
msgstr "Rimuovi i caratteri non alfanumerici dai tag"
|
1208 |
|
1209 |
+
#: wp-to-twitter-manager.php:538
|
1210 |
msgid "Spaces in tags replaced with:"
|
1211 |
msgstr "Sostituisci gli spazi trai tag con:"
|
1212 |
|
1213 |
+
#: wp-to-twitter-manager.php:541
|
1214 |
msgid "Maximum number of tags to include:"
|
1215 |
msgstr "Numero massimo di tag da includere:"
|
1216 |
|
1217 |
+
#: wp-to-twitter-manager.php:542
|
1218 |
msgid "Maximum length in characters for included tags:"
|
1219 |
msgstr "Lunghezza massima in caratteri per i tag inclusi:"
|
1220 |
|
1221 |
+
#: wp-to-twitter-manager.php:548
|
1222 |
msgid "Length of post excerpt (in characters):"
|
1223 |
msgstr "Lunghezza riassunto messaggi (in caratteri)"
|
1224 |
|
1225 |
+
#: wp-to-twitter-manager.php:551
|
1226 |
msgid "WP to Twitter Date Formatting:"
|
1227 |
msgstr "Formattazione data WP to Twitter:"
|
1228 |
|
1229 |
+
#: wp-to-twitter-manager.php:551
|
1230 |
msgid "Default is from your general settings. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Date Formatting Documentation</a>."
|
1231 |
msgstr "Predefinito dalle impostazioni generali. <a href='http://codex.wordpress.org/Formatting_Date_and_Time'>Info formattazione data</a>."
|
1232 |
|
1233 |
+
#: wp-to-twitter-manager.php:555
|
1234 |
msgid "Custom text before all Tweets:"
|
1235 |
msgstr "Testo personalizzato prima di tutti i messaggi:"
|
1236 |
|
1237 |
+
#: wp-to-twitter-manager.php:558
|
1238 |
msgid "Custom text after all Tweets:"
|
1239 |
msgstr "Testo personalizzato dopo tutti i messaggi:"
|
1240 |
|
1241 |
+
#: wp-to-twitter-manager.php:561
|
1242 |
msgid "Custom field for an alternate URL to be shortened and Tweeted:"
|
1243 |
msgstr "Campo personalizzato per inserire una URL alternativa da accorciare e inviare a Twitter:"
|
1244 |
|
1245 |
+
#: wp-to-twitter-manager.php:598
|
1246 |
msgid "Special Cases when WordPress should send a Tweet"
|
1247 |
msgstr "Casi particolari nei quali WordPress dovrebbe inviare un messaggio"
|
1248 |
|
1249 |
+
#: wp-to-twitter-manager.php:601
|
1250 |
msgid "Do not post Tweets by default"
|
1251 |
msgstr "Di default non inviare i Tweet"
|
1252 |
|
1253 |
+
#: wp-to-twitter-manager.php:607
|
1254 |
msgid "Allow status updates from Quick Edit"
|
1255 |
msgstr "Permetti aggiornamenti stato via Quick Edit"
|
1256 |
|
1257 |
+
#: wp-to-twitter-manager.php:612
|
1258 |
msgid "Delaying tweets with WP Tweets PRO moves Tweeting to an publishing-independent action."
|
1259 |
msgstr "Ritardare i tweet con WP Tweets PRO sposta i Tweet verso un'azione di pubblicazione indipendente."
|
1260 |
|
1261 |
+
#: wp-to-twitter-manager.php:619
|
1262 |
msgid "Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)"
|
1263 |
msgstr "Invio degli aggiornamenti di Twitter via punti di pubblicazione remoti (Email o client XMLRPC)"
|
1264 |
|
1265 |
+
#: wp-to-twitter-manager.php:624
|
1266 |
msgid "Google Analytics Settings"
|
1267 |
msgstr "Impostazioni Google Analytics"
|
1268 |
|
1269 |
+
#: wp-to-twitter-manager.php:625
|
1270 |
msgid "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."
|
1271 |
msgstr "Puoi tracciare la risposta da Twitter utilizzando Google Analytics definendo qui l'identificatore. Puoi definire un identificatore statico oppure uno dinamico. Gli identificatori statici non mutano da post a post mentre quelli dinamici derivano dalle informazioni di maggior rilievo appartenenti a quel post specifico. Gli identificatori dinamici ti permetteranno di analizzare le tue statistiche attraverso una variabile aggiuntiva."
|
1272 |
|
1273 |
+
#: wp-to-twitter-manager.php:628
|
1274 |
msgid "Use a Static Identifier with WP-to-Twitter"
|
1275 |
msgstr "Utilizza un identificatore statico per WP-to-Twitter"
|
1276 |
|
1277 |
+
#: wp-to-twitter-manager.php:629
|
1278 |
msgid "Static Campaign identifier for Google Analytics:"
|
1279 |
msgstr "Identificatore statico Google Analytics:"
|
1280 |
|
1281 |
+
#: wp-to-twitter-manager.php:633
|
1282 |
msgid "Use a dynamic identifier with Google Analytics and WP-to-Twitter"
|
1283 |
msgstr "Utilizza un identificatore dinamico per Google Analytics e WP-to-Twitter"
|
1284 |
|
1285 |
+
#: wp-to-twitter-manager.php:634
|
1286 |
msgid "What dynamic identifier would you like to use?"
|
1287 |
msgstr "Quale identificatore dinamico desideri utilizzare?"
|
1288 |
|
1289 |
+
#: wp-to-twitter-manager.php:636
|
1290 |
msgid "Category"
|
1291 |
msgstr "Categoria"
|
1292 |
|
1293 |
+
#: wp-to-twitter-manager.php:637
|
1294 |
msgid "Post ID"
|
1295 |
msgstr "ID post"
|
1296 |
|
1297 |
+
#: wp-to-twitter-manager.php:638
|
1298 |
msgid "Post Title"
|
1299 |
msgstr "Titolo post"
|
1300 |
|
1301 |
+
#: wp-to-twitter-manager.php:639
|
1302 |
msgid "Author"
|
1303 |
msgstr "Autore"
|
lang/wp-to-twitter.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the WP to Twitter package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP to Twitter 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -433,7 +433,7 @@ msgstr ""
|
|
433 |
msgid "WP to Twitter Support"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: wp-to-twitter-manager.php:766 wp-to-twitter.php:
|
437 |
msgid "Get Support"
|
438 |
msgstr ""
|
439 |
|
@@ -617,9 +617,7 @@ msgid ""
|
|
617 |
msgstr ""
|
618 |
|
619 |
#: wp-to-twitter-oauth.php:224
|
620 |
-
msgid ""
|
621 |
-
"Your Application's Name will show up after \"via\" in your twitter stream. "
|
622 |
-
"Your application name cannot include the word \"Twitter.\""
|
623 |
msgstr ""
|
624 |
|
625 |
#: wp-to-twitter-oauth.php:225
|
@@ -638,6 +636,10 @@ msgstr ""
|
|
638 |
msgid "2. Switch to the \"Settings\" tab in Twitter apps"
|
639 |
msgstr ""
|
640 |
|
|
|
|
|
|
|
|
|
641 |
#: wp-to-twitter-oauth.php:231
|
642 |
msgid "Select \"Read and Write\" for the Application Type"
|
643 |
msgstr ""
|
@@ -647,9 +649,7 @@ msgid "Update the application settings"
|
|
647 |
msgstr ""
|
648 |
|
649 |
#: wp-to-twitter-oauth.php:233
|
650 |
-
msgid ""
|
651 |
-
"Return to the Details tab and create your access token. Refresh page to view "
|
652 |
-
"your access tokens."
|
653 |
msgstr ""
|
654 |
|
655 |
#: wp-to-twitter-oauth.php:235
|
@@ -748,351 +748,351 @@ msgstr ""
|
|
748 |
msgid "Twitter's server time: "
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: wp-to-twitter-shorteners.php:
|
752 |
msgid ""
|
753 |
"<abbr title=\"Uniform Resource Locator\">URL</abbr> Shortener Account "
|
754 |
"Settings"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: wp-to-twitter-shorteners.php:
|
758 |
msgid "Your Su.pr account details"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: wp-to-twitter-shorteners.php:
|
762 |
msgid "(optional)"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: wp-to-twitter-shorteners.php:
|
766 |
msgid "Your Su.pr Username:"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: wp-to-twitter-shorteners.php:
|
770 |
msgid ""
|
771 |
"Your Su.pr <abbr title='application programming interface'>API</abbr> Key:"
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: wp-to-twitter-shorteners.php:
|
775 |
msgid ""
|
776 |
"Don't have a Su.pr account or API key? <a href='http://su.pr/'>Get one here</"
|
777 |
"a>!<br />You'll need an API key in order to associate the URLs you create "
|
778 |
"with your Su.pr account."
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: wp-to-twitter-shorteners.php:
|
782 |
msgid "Your Bit.ly account details"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: wp-to-twitter-shorteners.php:
|
786 |
msgid "Your Bit.ly username:"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: wp-to-twitter-shorteners.php:
|
790 |
msgid ""
|
791 |
"Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: wp-to-twitter-shorteners.php:
|
795 |
msgid "View your Bit.ly username and API key"
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: wp-to-twitter-shorteners.php:
|
799 |
msgid "Save Bit.ly API Key"
|
800 |
msgstr ""
|
801 |
|
802 |
-
#: wp-to-twitter-shorteners.php:
|
803 |
msgid "Clear Bit.ly API Key"
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: wp-to-twitter-shorteners.php:
|
807 |
msgid ""
|
808 |
"A Bit.ly API key and username is required to shorten URLs via the Bit.ly API "
|
809 |
"and WP to Twitter."
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: wp-to-twitter-shorteners.php:
|
813 |
msgid "Your YOURLS account details"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: wp-to-twitter-shorteners.php:
|
817 |
msgid "Path to your YOURLS config file (Local installations)"
|
818 |
msgstr ""
|
819 |
|
820 |
-
#: wp-to-twitter-shorteners.php:
|
821 |
msgid "Example:"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: wp-to-twitter-shorteners.php:
|
825 |
msgid "URI to the YOURLS API (Remote installations)"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: wp-to-twitter-shorteners.php:
|
829 |
msgid "Your YOURLS username:"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: wp-to-twitter-shorteners.php:
|
833 |
msgid "Your YOURLS password:"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: wp-to-twitter-shorteners.php:
|
837 |
msgid "<em>Saved</em>"
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: wp-to-twitter-shorteners.php:
|
841 |
msgid "Post ID for YOURLS url slug."
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: wp-to-twitter-shorteners.php:
|
845 |
msgid "Custom keyword for YOURLS url slug."
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: wp-to-twitter-shorteners.php:
|
849 |
msgid "Default: sequential URL numbering."
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: wp-to-twitter-shorteners.php:
|
853 |
msgid "Save YOURLS Account Info"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: wp-to-twitter-shorteners.php:
|
857 |
msgid "Clear YOURLS password"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: wp-to-twitter-shorteners.php:
|
861 |
msgid ""
|
862 |
"A YOURLS password and username is required to shorten URLs via the remote "
|
863 |
"YOURLS API and WP to Twitter."
|
864 |
msgstr ""
|
865 |
|
866 |
-
#: wp-to-twitter-shorteners.php:
|
867 |
msgid "Your jotURL account details"
|
868 |
msgstr ""
|
869 |
|
870 |
-
#: wp-to-twitter-shorteners.php:
|
871 |
msgid ""
|
872 |
"Your jotURL public <abbr title='application programming interface'>API</"
|
873 |
"abbr> key:"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: wp-to-twitter-shorteners.php:
|
877 |
msgid ""
|
878 |
"Your jotURL private <abbr title='application programming interface'>API</"
|
879 |
"abbr> key:"
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: wp-to-twitter-shorteners.php:
|
883 |
msgid "Parameters to add to the long URL (before shortening):"
|
884 |
msgstr ""
|
885 |
|
886 |
-
#: wp-to-twitter-shorteners.php:
|
887 |
msgid "Parameters to add to the short URL (after shortening):"
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: wp-to-twitter-shorteners.php:
|
891 |
msgid "View your jotURL public and private API key"
|
892 |
msgstr ""
|
893 |
|
894 |
-
#: wp-to-twitter-shorteners.php:
|
895 |
msgid "Save jotURL settings"
|
896 |
msgstr ""
|
897 |
|
898 |
-
#: wp-to-twitter-shorteners.php:
|
899 |
msgid "Clear jotURL settings"
|
900 |
msgstr ""
|
901 |
|
902 |
-
#: wp-to-twitter-shorteners.php:
|
903 |
msgid ""
|
904 |
"A jotURL public and private API key is required to shorten URLs via the "
|
905 |
"jotURL API and WP to Twitter."
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: wp-to-twitter-shorteners.php:
|
909 |
msgid "Your shortener does not require any account settings."
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: wp-to-twitter-shorteners.php:
|
913 |
msgid "YOURLS password updated. "
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: wp-to-twitter-shorteners.php:
|
917 |
msgid ""
|
918 |
"YOURLS password deleted. You will be unable to use your remote YOURLS "
|
919 |
"account to create short URLS."
|
920 |
msgstr ""
|
921 |
|
922 |
-
#: wp-to-twitter-shorteners.php:
|
923 |
msgid "Failed to save your YOURLS password! "
|
924 |
msgstr ""
|
925 |
|
926 |
-
#: wp-to-twitter-shorteners.php:
|
927 |
msgid "YOURLS username added. "
|
928 |
msgstr ""
|
929 |
|
930 |
-
#: wp-to-twitter-shorteners.php:
|
931 |
msgid "YOURLS API url added. "
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: wp-to-twitter-shorteners.php:
|
935 |
msgid "YOURLS API url removed. "
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: wp-to-twitter-shorteners.php:
|
939 |
msgid "YOURLS local server path added. "
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: wp-to-twitter-shorteners.php:
|
943 |
msgid "The path to your YOURLS installation is not correct. "
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: wp-to-twitter-shorteners.php:
|
947 |
msgid "YOURLS local server path removed. "
|
948 |
msgstr ""
|
949 |
|
950 |
-
#: wp-to-twitter-shorteners.php:
|
951 |
msgid "YOURLS will use Post ID for short URL slug."
|
952 |
msgstr ""
|
953 |
|
954 |
-
#: wp-to-twitter-shorteners.php:
|
955 |
msgid "YOURLS will use your custom keyword for short URL slug."
|
956 |
msgstr ""
|
957 |
|
958 |
-
#: wp-to-twitter-shorteners.php:
|
959 |
msgid "YOURLS will not use Post ID for the short URL slug."
|
960 |
msgstr ""
|
961 |
|
962 |
-
#: wp-to-twitter-shorteners.php:
|
963 |
msgid "Su.pr API Key and Username Updated"
|
964 |
msgstr ""
|
965 |
|
966 |
-
#: wp-to-twitter-shorteners.php:
|
967 |
msgid ""
|
968 |
"Su.pr API Key and username deleted. Su.pr URLs created by WP to Twitter will "
|
969 |
"no longer be associated with your account. "
|
970 |
msgstr ""
|
971 |
|
972 |
-
#: wp-to-twitter-shorteners.php:
|
973 |
msgid "Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! "
|
974 |
msgstr ""
|
975 |
|
976 |
-
#: wp-to-twitter-shorteners.php:
|
977 |
msgid "Bit.ly API Key Updated."
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: wp-to-twitter-shorteners.php:
|
981 |
msgid ""
|
982 |
"Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
983 |
msgstr ""
|
984 |
|
985 |
-
#: wp-to-twitter-shorteners.php:
|
986 |
msgid ""
|
987 |
"Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</"
|
988 |
"a>! An API key is required to use the Bit.ly URL shortening service."
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: wp-to-twitter-shorteners.php:
|
992 |
msgid " Bit.ly User Login Updated."
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: wp-to-twitter-shorteners.php:
|
996 |
msgid ""
|
997 |
"Bit.ly User Login deleted. You cannot use the Bit.ly API without providing "
|
998 |
"your username. "
|
999 |
msgstr ""
|
1000 |
|
1001 |
-
#: wp-to-twitter-shorteners.php:
|
1002 |
msgid ""
|
1003 |
"Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: wp-to-twitter-shorteners.php:
|
1007 |
msgid "jotURL private API Key Updated. "
|
1008 |
msgstr ""
|
1009 |
|
1010 |
-
#: wp-to-twitter-shorteners.php:
|
1011 |
msgid ""
|
1012 |
"jotURL private API Key deleted. You cannot use the jotURL API without a "
|
1013 |
"private API key. "
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: wp-to-twitter-shorteners.php:
|
1017 |
msgid ""
|
1018 |
"jotURL private API Key not added - <a href='https://www.joturl.com/reserved/"
|
1019 |
"api.html'>get one here</a>! A private API key is required to use the jotURL "
|
1020 |
"URL shortening service. "
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: wp-to-twitter-shorteners.php:
|
1024 |
msgid "jotURL public API Key Updated. "
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#: wp-to-twitter-shorteners.php:
|
1028 |
msgid ""
|
1029 |
"jotURL public API Key deleted. You cannot use the jotURL API without "
|
1030 |
"providing your public API Key. "
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: wp-to-twitter-shorteners.php:
|
1034 |
msgid ""
|
1035 |
"jotURL public API Key not added - <a href='https://www.joturl.com/reserved/"
|
1036 |
"api.html'>get one here</a>! "
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: wp-to-twitter-shorteners.php:
|
1040 |
msgid "Long URL parameters added. "
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: wp-to-twitter-shorteners.php:
|
1044 |
msgid "Long URL parameters deleted. "
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: wp-to-twitter-shorteners.php:
|
1048 |
msgid "Short URL parameters added. "
|
1049 |
msgstr ""
|
1050 |
|
1051 |
-
#: wp-to-twitter-shorteners.php:
|
1052 |
msgid "Short URL parameters deleted. "
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: wp-to-twitter-shorteners.php:
|
1056 |
msgid ""
|
1057 |
"You must add your Bit.ly login and API key in order to shorten URLs with Bit."
|
1058 |
"ly."
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: wp-to-twitter-shorteners.php:
|
1062 |
msgid ""
|
1063 |
"You must add your jotURL public and private API key in order to shorten URLs "
|
1064 |
"with jotURL."
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: wp-to-twitter-shorteners.php:
|
1068 |
msgid ""
|
1069 |
"You must add your YOURLS remote URL, login, and password in order to shorten "
|
1070 |
"URLs with a remote installation of YOURLS."
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: wp-to-twitter-shorteners.php:
|
1074 |
msgid ""
|
1075 |
"You must add your YOURLS server path in order to shorten URLs with a remote "
|
1076 |
"installation of YOURLS."
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: wp-to-twitter-shorteners.php:
|
1080 |
msgid "Choose a short URL service (account settings below)"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
-
#: wp-to-twitter-shorteners.php:
|
1084 |
msgid "Don't shorten URLs."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#: wp-to-twitter-shorteners.php:
|
1088 |
msgid "YOURLS (on this server)"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#: wp-to-twitter-shorteners.php:
|
1092 |
msgid "YOURLS (on a remote server)"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: wp-to-twitter-shorteners.php:
|
1096 |
msgid "Use Twitter Friendly Links."
|
1097 |
msgstr ""
|
1098 |
|
@@ -1102,251 +1102,275 @@ msgid ""
|
|
1102 |
"to Twitter."
|
1103 |
msgstr ""
|
1104 |
|
1105 |
-
#: wp-to-twitter.php:
|
1106 |
msgid ""
|
1107 |
"The current version of WP Tweets PRO is <strong>%s</strong>. <a href="
|
1108 |
"\"http://www.joedolson.com/articles/account/\">Upgrade for best "
|
1109 |
"compatibility!</a>"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
-
#: wp-to-twitter.php:
|
1113 |
msgid ""
|
1114 |
"WP to Twitter requires WordPress 3.1.4 or a more recent version <a href="
|
1115 |
"\"http://codex.wordpress.org/Upgrading_WordPress\">Please update WordPress "
|
1116 |
"to continue using WP to Twitter with all features!</a>"
|
1117 |
msgstr ""
|
1118 |
|
1119 |
-
#: wp-to-twitter.php:
|
1120 |
msgid ""
|
1121 |
"Tweeting of comments has been moved to <a href=\"%1$s\">WP Tweets PRO</a>. "
|
1122 |
"You will need to upgrade in order to Tweet comments. <a href=\"%2$s"
|
1123 |
"\">Dismiss</a>"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
-
#: wp-to-twitter.php:
|
1127 |
msgid "This account is not authorized to post to Twitter."
|
1128 |
msgstr ""
|
1129 |
|
1130 |
-
#: wp-to-twitter.php:
|
1131 |
msgid "This tweet is identical to another Tweet recently sent to this account."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: wp-to-twitter.php:
|
1135 |
msgid "This tweet was blank and could not be sent to Twitter."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: wp-to-twitter.php:
|
1139 |
msgid ""
|
1140 |
"Your Twitter application does not have read and write permissions. Go to <a "
|
1141 |
"href=\"%s\">your Twitter apps</a> to modify these settings."
|
1142 |
msgstr ""
|
1143 |
|
1144 |
-
#: wp-to-twitter.php:
|
1145 |
msgid "200 OK: Success!"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
-
#: wp-to-twitter.php:
|
|
|
|
|
|
|
|
|
1149 |
msgid ""
|
1150 |
"400 Bad Request: The request was invalid. This is the status code returned "
|
1151 |
"during rate limiting."
|
1152 |
msgstr ""
|
1153 |
|
1154 |
-
#: wp-to-twitter.php:
|
1155 |
msgid "401 Unauthorized: Authentication credentials were missing or incorrect."
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: wp-to-twitter.php:
|
1159 |
msgid ""
|
1160 |
"403 Forbidden: The request is understood, but it has been refused by "
|
1161 |
"Twitter. Reasons: Too many Tweets in a short time or the same Tweet was "
|
1162 |
"submitted twice, among others. Not an error from WP to Twitter."
|
1163 |
msgstr ""
|
1164 |
|
1165 |
-
#: wp-to-twitter.php:
|
1166 |
msgid ""
|
1167 |
"404 Not Found: The URI requested is invalid or the resource requested does "
|
1168 |
"not exist."
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: wp-to-twitter.php:
|
1172 |
msgid "406 Not Acceptable: Invalid Format Specified."
|
1173 |
msgstr ""
|
1174 |
|
1175 |
-
#: wp-to-twitter.php:
|
|
|
|
|
|
|
|
|
1176 |
msgid "429 Too Many Requests: You have exceeded your rate limits."
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: wp-to-twitter.php:
|
1180 |
msgid "500 Internal Server Error: Something is broken at Twitter."
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: wp-to-twitter.php:
|
1184 |
msgid "502 Bad Gateway: Twitter is down or being upgraded."
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: wp-to-twitter.php:
|
1188 |
msgid ""
|
1189 |
"503 Service Unavailable: The Twitter servers are up, but overloaded with "
|
1190 |
"requests - Please try again later."
|
1191 |
msgstr ""
|
1192 |
|
1193 |
-
#: wp-to-twitter.php:
|
1194 |
msgid ""
|
1195 |
"504 Gateway Timeout: The Twitter servers are up, but the request couldn't be "
|
1196 |
"serviced due to some failure within our stack. Try again later."
|
1197 |
msgstr ""
|
1198 |
|
1199 |
-
#: wp-to-twitter.php:
|
1200 |
msgid "No Twitter OAuth connection found."
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: wp-to-twitter.php:
|
1204 |
msgid "Tweeting %s edits is disabled."
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: wp-to-twitter.php:
|
1208 |
-
msgid "Upgrade to WP Tweets Pro!"
|
1209 |
-
msgstr ""
|
1210 |
-
|
1211 |
-
#: wp-to-twitter.php:1007
|
1212 |
msgid "Custom Twitter Post"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
-
#: wp-to-twitter.php:
|
1216 |
msgid "Your prepended Tweet text; not part of your template."
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: wp-to-twitter.php:
|
1220 |
msgid "Your appended Tweet text; not part of your template."
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#: wp-to-twitter.php:
|
1224 |
msgid "Your template:"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#: wp-to-twitter.php:
|
1228 |
msgid "YOURLS Custom Keyword"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
-
#: wp-to-twitter.php:
|
1232 |
msgid "Don't Tweet this post."
|
1233 |
msgstr ""
|
1234 |
|
1235 |
-
#: wp-to-twitter.php:
|
1236 |
msgid "Tweet this post."
|
1237 |
msgstr ""
|
1238 |
|
1239 |
-
#: wp-to-twitter.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1240 |
msgid ""
|
1241 |
"Access to customizing WP to Twitter values is not allowed for your user role."
|
1242 |
msgstr ""
|
1243 |
|
1244 |
-
#: wp-to-twitter.php:
|
1245 |
msgid ""
|
1246 |
-
"Tweets
|
1247 |
-
"characters. Template
|
1248 |
"<code>#post#</code>, <code>#category#</code>, <code>#date#</code>, "
|
1249 |
"<code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, "
|
1250 |
"<code>#tags#</code>, or <code>#blog#</code>."
|
1251 |
msgstr ""
|
1252 |
|
1253 |
-
#: wp-to-twitter.php:
|
1254 |
-
msgid "
|
1255 |
msgstr ""
|
1256 |
|
1257 |
-
#: wp-to-twitter.php:
|
1258 |
-
msgid "
|
1259 |
msgstr ""
|
1260 |
|
1261 |
-
#: wp-to-twitter.php:
|
1262 |
-
msgid "
|
1263 |
msgstr ""
|
1264 |
|
1265 |
-
#: wp-to-twitter.php:
|
1266 |
-
msgid "
|
1267 |
msgstr ""
|
1268 |
|
1269 |
-
#: wp-to-twitter.php:
|
1270 |
-
msgid "
|
1271 |
msgstr ""
|
1272 |
|
1273 |
-
#: wp-to-twitter.php:
|
1274 |
msgid "Characters left: "
|
1275 |
msgstr ""
|
1276 |
|
1277 |
-
#: wp-to-twitter.php:
|
1278 |
msgid "WP Tweets User Settings"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
-
#: wp-to-twitter.php:
|
1282 |
msgid "Use My Twitter Username"
|
1283 |
msgstr ""
|
1284 |
|
1285 |
-
#: wp-to-twitter.php:
|
1286 |
msgid "Tweet my posts with an @ reference to my username."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
-
#: wp-to-twitter.php:
|
1290 |
msgid ""
|
1291 |
"Tweet my posts with an @ reference to both my username and to the main site "
|
1292 |
"username."
|
1293 |
msgstr ""
|
1294 |
|
1295 |
-
#: wp-to-twitter.php:
|
1296 |
msgid "Your Twitter Username"
|
1297 |
msgstr ""
|
1298 |
|
1299 |
-
#: wp-to-twitter.php:
|
1300 |
msgid "Enter your own Twitter username."
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: wp-to-twitter.php:
|
1304 |
msgid "Hide account name in Tweets"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: wp-to-twitter.php:
|
1308 |
msgid "Do not display my account in the #account# template tag."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
-
#: wp-to-twitter.php:
|
1312 |
msgid "Check off categories to tweet"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#: wp-to-twitter.php:
|
1316 |
msgid "Do not tweet posts in checked categories (Reverses default behavior)"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: wp-to-twitter.php:
|
1320 |
msgid ""
|
1321 |
"Limits are exclusive. If a post is in one category which should be posted "
|
1322 |
"and one category that should not, it will not be posted."
|
1323 |
msgstr ""
|
1324 |
|
1325 |
-
#: wp-to-twitter.php:
|
1326 |
msgid "Set Categories"
|
1327 |
msgstr ""
|
1328 |
|
1329 |
-
#: wp-to-twitter.php:
|
1330 |
msgid "Settings"
|
1331 |
msgstr ""
|
1332 |
|
1333 |
-
#: wp-to-twitter.php:
|
1334 |
msgid "Upgrade"
|
1335 |
msgstr ""
|
1336 |
|
1337 |
-
#: wp-to-twitter.php:
|
1338 |
msgid ""
|
1339 |
"<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href="
|
1340 |
"\"%1$s\">changelog</a> before upgrading."
|
1341 |
msgstr ""
|
1342 |
|
1343 |
-
#: wp-to-twitter.php:
|
1344 |
msgid ""
|
1345 |
"I hope you've enjoyed <strong>WP to Twitter</strong>! Take a look at <a "
|
1346 |
"href='%s'>upgrading to WP Tweets PRO</a> for advanced Tweeting with "
|
1347 |
"WordPress! <a href='%s'>Dismiss</a>"
|
1348 |
msgstr ""
|
1349 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1350 |
#: wpt-functions.php:258
|
1351 |
msgid ""
|
1352 |
"Please read the FAQ and other Help documents before making a support request."
|
@@ -1369,41 +1393,97 @@ msgid ""
|
|
1369 |
"<code>%s</code>."
|
1370 |
msgstr ""
|
1371 |
|
1372 |
-
#: wpt-functions.php:
|
1373 |
msgid ""
|
1374 |
"<strong>Please note</strong>: I do keep records of those who have donated, "
|
1375 |
"but if your donation came from somebody other than your account at this web "
|
1376 |
"site, you must note this in your message."
|
1377 |
msgstr ""
|
1378 |
|
1379 |
-
#: wpt-functions.php:
|
1380 |
msgid "Reply to:"
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: wpt-functions.php:
|
1384 |
msgid ""
|
1385 |
"I have read <a href=\"%1$s\">the FAQ for this plug-in</a> <span>(required)</"
|
1386 |
"span>"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
-
#: wpt-functions.php:
|
1390 |
msgid ""
|
1391 |
"I have <a href=\"%1$s\">made a donation to help support this plug-in</a>"
|
1392 |
msgstr ""
|
1393 |
|
1394 |
-
#: wpt-functions.php:
|
1395 |
msgid "Support Request:"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
-
#: wpt-functions.php:
|
1399 |
msgid "Send Support Request"
|
1400 |
msgstr ""
|
1401 |
|
1402 |
-
#: wpt-functions.php:
|
1403 |
msgid ""
|
1404 |
"The following additional information will be sent with your support request:"
|
1405 |
msgstr ""
|
1406 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1407 |
#. Plugin Name of the plugin/theme
|
1408 |
msgid "WP to Twitter"
|
1409 |
msgstr ""
|
2 |
# This file is distributed under the same license as the WP to Twitter package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP to Twitter 2.7.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-to-twitter\n"
|
7 |
+
"POT-Creation-Date: 2013-07-18 15:24:37+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
433 |
msgid "WP to Twitter Support"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: wp-to-twitter-manager.php:766 wp-to-twitter.php:1119 wp-to-twitter.php:1121
|
437 |
msgid "Get Support"
|
438 |
msgstr ""
|
439 |
|
617 |
msgstr ""
|
618 |
|
619 |
#: wp-to-twitter-oauth.php:224
|
620 |
+
msgid "Your application name cannot include the word \"Twitter.\""
|
|
|
|
|
621 |
msgstr ""
|
622 |
|
623 |
#: wp-to-twitter-oauth.php:225
|
636 |
msgid "2. Switch to the \"Settings\" tab in Twitter apps"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: wp-to-twitter-oauth.php:229
|
640 |
+
msgid "<em>Do NOT create your access token yet.</em>"
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
#: wp-to-twitter-oauth.php:231
|
644 |
msgid "Select \"Read and Write\" for the Application Type"
|
645 |
msgstr ""
|
649 |
msgstr ""
|
650 |
|
651 |
#: wp-to-twitter-oauth.php:233
|
652 |
+
msgid "Return to the Details tab and create your access token."
|
|
|
|
|
653 |
msgstr ""
|
654 |
|
655 |
#: wp-to-twitter-oauth.php:235
|
748 |
msgid "Twitter's server time: "
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: wp-to-twitter-shorteners.php:294
|
752 |
msgid ""
|
753 |
"<abbr title=\"Uniform Resource Locator\">URL</abbr> Shortener Account "
|
754 |
"Settings"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: wp-to-twitter-shorteners.php:298
|
758 |
msgid "Your Su.pr account details"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: wp-to-twitter-shorteners.php:298
|
762 |
msgid "(optional)"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: wp-to-twitter-shorteners.php:303
|
766 |
msgid "Your Su.pr Username:"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: wp-to-twitter-shorteners.php:307
|
770 |
msgid ""
|
771 |
"Your Su.pr <abbr title='application programming interface'>API</abbr> Key:"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: wp-to-twitter-shorteners.php:314
|
775 |
msgid ""
|
776 |
"Don't have a Su.pr account or API key? <a href='http://su.pr/'>Get one here</"
|
777 |
"a>!<br />You'll need an API key in order to associate the URLs you create "
|
778 |
"with your Su.pr account."
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: wp-to-twitter-shorteners.php:320
|
782 |
msgid "Your Bit.ly account details"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: wp-to-twitter-shorteners.php:325
|
786 |
msgid "Your Bit.ly username:"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: wp-to-twitter-shorteners.php:329
|
790 |
msgid ""
|
791 |
"Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:"
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: wp-to-twitter-shorteners.php:332
|
795 |
msgid "View your Bit.ly username and API key"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: wp-to-twitter-shorteners.php:337
|
799 |
msgid "Save Bit.ly API Key"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: wp-to-twitter-shorteners.php:337
|
803 |
msgid "Clear Bit.ly API Key"
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: wp-to-twitter-shorteners.php:337
|
807 |
msgid ""
|
808 |
"A Bit.ly API key and username is required to shorten URLs via the Bit.ly API "
|
809 |
"and WP to Twitter."
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: wp-to-twitter-shorteners.php:343
|
813 |
msgid "Your YOURLS account details"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: wp-to-twitter-shorteners.php:348
|
817 |
msgid "Path to your YOURLS config file (Local installations)"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: wp-to-twitter-shorteners.php:349 wp-to-twitter-shorteners.php:353
|
821 |
msgid "Example:"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: wp-to-twitter-shorteners.php:352
|
825 |
msgid "URI to the YOURLS API (Remote installations)"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: wp-to-twitter-shorteners.php:356
|
829 |
msgid "Your YOURLS username:"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: wp-to-twitter-shorteners.php:360
|
833 |
msgid "Your YOURLS password:"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: wp-to-twitter-shorteners.php:360
|
837 |
msgid "<em>Saved</em>"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: wp-to-twitter-shorteners.php:364
|
841 |
msgid "Post ID for YOURLS url slug."
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: wp-to-twitter-shorteners.php:365
|
845 |
msgid "Custom keyword for YOURLS url slug."
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: wp-to-twitter-shorteners.php:366
|
849 |
msgid "Default: sequential URL numbering."
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: wp-to-twitter-shorteners.php:372
|
853 |
msgid "Save YOURLS Account Info"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: wp-to-twitter-shorteners.php:372
|
857 |
msgid "Clear YOURLS password"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: wp-to-twitter-shorteners.php:372
|
861 |
msgid ""
|
862 |
"A YOURLS password and username is required to shorten URLs via the remote "
|
863 |
"YOURLS API and WP to Twitter."
|
864 |
msgstr ""
|
865 |
|
866 |
+
#: wp-to-twitter-shorteners.php:378
|
867 |
msgid "Your jotURL account details"
|
868 |
msgstr ""
|
869 |
|
870 |
+
#: wp-to-twitter-shorteners.php:382
|
871 |
msgid ""
|
872 |
"Your jotURL public <abbr title='application programming interface'>API</"
|
873 |
"abbr> key:"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: wp-to-twitter-shorteners.php:383
|
877 |
msgid ""
|
878 |
"Your jotURL private <abbr title='application programming interface'>API</"
|
879 |
"abbr> key:"
|
880 |
msgstr ""
|
881 |
|
882 |
+
#: wp-to-twitter-shorteners.php:384
|
883 |
msgid "Parameters to add to the long URL (before shortening):"
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: wp-to-twitter-shorteners.php:384
|
887 |
msgid "Parameters to add to the short URL (after shortening):"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: wp-to-twitter-shorteners.php:385
|
891 |
msgid "View your jotURL public and private API key"
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: wp-to-twitter-shorteners.php:388
|
895 |
msgid "Save jotURL settings"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: wp-to-twitter-shorteners.php:388
|
899 |
msgid "Clear jotURL settings"
|
900 |
msgstr ""
|
901 |
|
902 |
+
#: wp-to-twitter-shorteners.php:389
|
903 |
msgid ""
|
904 |
"A jotURL public and private API key is required to shorten URLs via the "
|
905 |
"jotURL API and WP to Twitter."
|
906 |
msgstr ""
|
907 |
|
908 |
+
#: wp-to-twitter-shorteners.php:394
|
909 |
msgid "Your shortener does not require any account settings."
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: wp-to-twitter-shorteners.php:406
|
913 |
msgid "YOURLS password updated. "
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: wp-to-twitter-shorteners.php:409
|
917 |
msgid ""
|
918 |
"YOURLS password deleted. You will be unable to use your remote YOURLS "
|
919 |
"account to create short URLS."
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: wp-to-twitter-shorteners.php:411
|
923 |
msgid "Failed to save your YOURLS password! "
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: wp-to-twitter-shorteners.php:415
|
927 |
msgid "YOURLS username added. "
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: wp-to-twitter-shorteners.php:419
|
931 |
msgid "YOURLS API url added. "
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: wp-to-twitter-shorteners.php:422
|
935 |
msgid "YOURLS API url removed. "
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: wp-to-twitter-shorteners.php:427
|
939 |
msgid "YOURLS local server path added. "
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: wp-to-twitter-shorteners.php:429
|
943 |
msgid "The path to your YOURLS installation is not correct. "
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: wp-to-twitter-shorteners.php:433
|
947 |
msgid "YOURLS local server path removed. "
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: wp-to-twitter-shorteners.php:438
|
951 |
msgid "YOURLS will use Post ID for short URL slug."
|
952 |
msgstr ""
|
953 |
|
954 |
+
#: wp-to-twitter-shorteners.php:440
|
955 |
msgid "YOURLS will use your custom keyword for short URL slug."
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: wp-to-twitter-shorteners.php:444
|
959 |
msgid "YOURLS will not use Post ID for the short URL slug."
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: wp-to-twitter-shorteners.php:452
|
963 |
msgid "Su.pr API Key and Username Updated"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: wp-to-twitter-shorteners.php:456
|
967 |
msgid ""
|
968 |
"Su.pr API Key and username deleted. Su.pr URLs created by WP to Twitter will "
|
969 |
"no longer be associated with your account. "
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: wp-to-twitter-shorteners.php:458
|
973 |
msgid "Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! "
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: wp-to-twitter-shorteners.php:464
|
977 |
msgid "Bit.ly API Key Updated."
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: wp-to-twitter-shorteners.php:467
|
981 |
msgid ""
|
982 |
"Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. "
|
983 |
msgstr ""
|
984 |
|
985 |
+
#: wp-to-twitter-shorteners.php:469
|
986 |
msgid ""
|
987 |
"Bit.ly API Key not added - <a href='http://bit.ly/account/'>get one here</"
|
988 |
"a>! An API key is required to use the Bit.ly URL shortening service."
|
989 |
msgstr ""
|
990 |
|
991 |
+
#: wp-to-twitter-shorteners.php:473
|
992 |
msgid " Bit.ly User Login Updated."
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: wp-to-twitter-shorteners.php:476
|
996 |
msgid ""
|
997 |
"Bit.ly User Login deleted. You cannot use the Bit.ly API without providing "
|
998 |
"your username. "
|
999 |
msgstr ""
|
1000 |
|
1001 |
+
#: wp-to-twitter-shorteners.php:478
|
1002 |
msgid ""
|
1003 |
"Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! "
|
1004 |
msgstr ""
|
1005 |
|
1006 |
+
#: wp-to-twitter-shorteners.php:484
|
1007 |
msgid "jotURL private API Key Updated. "
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: wp-to-twitter-shorteners.php:487
|
1011 |
msgid ""
|
1012 |
"jotURL private API Key deleted. You cannot use the jotURL API without a "
|
1013 |
"private API key. "
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: wp-to-twitter-shorteners.php:489
|
1017 |
msgid ""
|
1018 |
"jotURL private API Key not added - <a href='https://www.joturl.com/reserved/"
|
1019 |
"api.html'>get one here</a>! A private API key is required to use the jotURL "
|
1020 |
"URL shortening service. "
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: wp-to-twitter-shorteners.php:493
|
1024 |
msgid "jotURL public API Key Updated. "
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: wp-to-twitter-shorteners.php:496
|
1028 |
msgid ""
|
1029 |
"jotURL public API Key deleted. You cannot use the jotURL API without "
|
1030 |
"providing your public API Key. "
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: wp-to-twitter-shorteners.php:498
|
1034 |
msgid ""
|
1035 |
"jotURL public API Key not added - <a href='https://www.joturl.com/reserved/"
|
1036 |
"api.html'>get one here</a>! "
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: wp-to-twitter-shorteners.php:504
|
1040 |
msgid "Long URL parameters added. "
|
1041 |
msgstr ""
|
1042 |
|
1043 |
+
#: wp-to-twitter-shorteners.php:507
|
1044 |
msgid "Long URL parameters deleted. "
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: wp-to-twitter-shorteners.php:513
|
1048 |
msgid "Short URL parameters added. "
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: wp-to-twitter-shorteners.php:516
|
1052 |
msgid "Short URL parameters deleted. "
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: wp-to-twitter-shorteners.php:526
|
1056 |
msgid ""
|
1057 |
"You must add your Bit.ly login and API key in order to shorten URLs with Bit."
|
1058 |
"ly."
|
1059 |
msgstr ""
|
1060 |
|
1061 |
+
#: wp-to-twitter-shorteners.php:530
|
1062 |
msgid ""
|
1063 |
"You must add your jotURL public and private API key in order to shorten URLs "
|
1064 |
"with jotURL."
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: wp-to-twitter-shorteners.php:534
|
1068 |
msgid ""
|
1069 |
"You must add your YOURLS remote URL, login, and password in order to shorten "
|
1070 |
"URLs with a remote installation of YOURLS."
|
1071 |
msgstr ""
|
1072 |
|
1073 |
+
#: wp-to-twitter-shorteners.php:538
|
1074 |
msgid ""
|
1075 |
"You must add your YOURLS server path in order to shorten URLs with a remote "
|
1076 |
"installation of YOURLS."
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: wp-to-twitter-shorteners.php:548
|
1080 |
msgid "Choose a short URL service (account settings below)"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: wp-to-twitter-shorteners.php:550
|
1084 |
msgid "Don't shorten URLs."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: wp-to-twitter-shorteners.php:554
|
1088 |
msgid "YOURLS (on this server)"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: wp-to-twitter-shorteners.php:555
|
1092 |
msgid "YOURLS (on a remote server)"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: wp-to-twitter-shorteners.php:558
|
1096 |
msgid "Use Twitter Friendly Links."
|
1097 |
msgstr ""
|
1098 |
|
1102 |
"to Twitter."
|
1103 |
msgstr ""
|
1104 |
|
1105 |
+
#: wp-to-twitter.php:64
|
1106 |
msgid ""
|
1107 |
"The current version of WP Tweets PRO is <strong>%s</strong>. <a href="
|
1108 |
"\"http://www.joedolson.com/articles/account/\">Upgrade for best "
|
1109 |
"compatibility!</a>"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: wp-to-twitter.php:73
|
1113 |
msgid ""
|
1114 |
"WP to Twitter requires WordPress 3.1.4 or a more recent version <a href="
|
1115 |
"\"http://codex.wordpress.org/Upgrading_WordPress\">Please update WordPress "
|
1116 |
"to continue using WP to Twitter with all features!</a>"
|
1117 |
msgstr ""
|
1118 |
|
1119 |
+
#: wp-to-twitter.php:86
|
1120 |
msgid ""
|
1121 |
"Tweeting of comments has been moved to <a href=\"%1$s\">WP Tweets PRO</a>. "
|
1122 |
"You will need to upgrade in order to Tweet comments. <a href=\"%2$s"
|
1123 |
"\">Dismiss</a>"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: wp-to-twitter.php:276
|
1127 |
msgid "This account is not authorized to post to Twitter."
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: wp-to-twitter.php:285
|
1131 |
msgid "This tweet is identical to another Tweet recently sent to this account."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: wp-to-twitter.php:291
|
1135 |
msgid "This tweet was blank and could not be sent to Twitter."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: wp-to-twitter.php:317
|
1139 |
msgid ""
|
1140 |
"Your Twitter application does not have read and write permissions. Go to <a "
|
1141 |
"href=\"%s\">your Twitter apps</a> to modify these settings."
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: wp-to-twitter.php:322
|
1145 |
msgid "200 OK: Success!"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: wp-to-twitter.php:326
|
1149 |
+
msgid "304 Not Modified: There was no new data to return"
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: wp-to-twitter.php:329
|
1153 |
msgid ""
|
1154 |
"400 Bad Request: The request was invalid. This is the status code returned "
|
1155 |
"during rate limiting."
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: wp-to-twitter.php:332
|
1159 |
msgid "401 Unauthorized: Authentication credentials were missing or incorrect."
|
1160 |
msgstr ""
|
1161 |
|
1162 |
+
#: wp-to-twitter.php:336
|
1163 |
msgid ""
|
1164 |
"403 Forbidden: The request is understood, but it has been refused by "
|
1165 |
"Twitter. Reasons: Too many Tweets in a short time or the same Tweet was "
|
1166 |
"submitted twice, among others. Not an error from WP to Twitter."
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: wp-to-twitter.php:339
|
1170 |
msgid ""
|
1171 |
"404 Not Found: The URI requested is invalid or the resource requested does "
|
1172 |
"not exist."
|
1173 |
msgstr ""
|
1174 |
|
1175 |
+
#: wp-to-twitter.php:342
|
1176 |
msgid "406 Not Acceptable: Invalid Format Specified."
|
1177 |
msgstr ""
|
1178 |
|
1179 |
+
#: wp-to-twitter.php:345
|
1180 |
+
msgid "422 Unprocessable Entity: The image uploaded could not be processed.."
|
1181 |
+
msgstr ""
|
1182 |
+
|
1183 |
+
#: wp-to-twitter.php:348
|
1184 |
msgid "429 Too Many Requests: You have exceeded your rate limits."
|
1185 |
msgstr ""
|
1186 |
|
1187 |
+
#: wp-to-twitter.php:351
|
1188 |
msgid "500 Internal Server Error: Something is broken at Twitter."
|
1189 |
msgstr ""
|
1190 |
|
1191 |
+
#: wp-to-twitter.php:354
|
1192 |
msgid "502 Bad Gateway: Twitter is down or being upgraded."
|
1193 |
msgstr ""
|
1194 |
|
1195 |
+
#: wp-to-twitter.php:357
|
1196 |
msgid ""
|
1197 |
"503 Service Unavailable: The Twitter servers are up, but overloaded with "
|
1198 |
"requests - Please try again later."
|
1199 |
msgstr ""
|
1200 |
|
1201 |
+
#: wp-to-twitter.php:360
|
1202 |
msgid ""
|
1203 |
"504 Gateway Timeout: The Twitter servers are up, but the request couldn't be "
|
1204 |
"serviced due to some failure within our stack. Try again later."
|
1205 |
msgstr ""
|
1206 |
|
1207 |
+
#: wp-to-twitter.php:397
|
1208 |
msgid "No Twitter OAuth connection found."
|
1209 |
msgstr ""
|
1210 |
|
1211 |
+
#: wp-to-twitter.php:1010
|
1212 |
msgid "Tweeting %s edits is disabled."
|
1213 |
msgstr ""
|
1214 |
|
1215 |
+
#: wp-to-twitter.php:1023
|
|
|
|
|
|
|
|
|
1216 |
msgid "Custom Twitter Post"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: wp-to-twitter.php:1028
|
1220 |
msgid "Your prepended Tweet text; not part of your template."
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: wp-to-twitter.php:1031
|
1224 |
msgid "Your appended Tweet text; not part of your template."
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: wp-to-twitter.php:1034
|
1228 |
msgid "Your template:"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: wp-to-twitter.php:1038
|
1232 |
msgid "YOURLS Custom Keyword"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: wp-to-twitter.php:1049
|
1236 |
msgid "Don't Tweet this post."
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: wp-to-twitter.php:1049
|
1240 |
msgid "Tweet this post."
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: wp-to-twitter.php:1076
|
1244 |
+
msgid ""
|
1245 |
+
"WP Tweets PRO 1.5.2 allows you to select Twitter accounts. <a href=\"%s"
|
1246 |
+
"\">Log in and download now!</a>"
|
1247 |
+
msgstr ""
|
1248 |
+
|
1249 |
+
#: wp-to-twitter.php:1078
|
1250 |
+
msgid ""
|
1251 |
+
"Upgrade to WP Tweets PRO to select Twitter accounts! <a href=\"%s\">Upgrade "
|
1252 |
+
"now!</a>"
|
1253 |
+
msgstr ""
|
1254 |
+
|
1255 |
+
#: wp-to-twitter.php:1097
|
1256 |
msgid ""
|
1257 |
"Access to customizing WP to Twitter values is not allowed for your user role."
|
1258 |
msgstr ""
|
1259 |
|
1260 |
+
#: wp-to-twitter.php:1109
|
1261 |
msgid ""
|
1262 |
+
"Tweets must be less than 140 characters; Twitter counts URLs as 22 or 23 "
|
1263 |
+
"characters. Template Tags: <code>#url#</code>, <code>#title#</code>, "
|
1264 |
"<code>#post#</code>, <code>#category#</code>, <code>#date#</code>, "
|
1265 |
"<code>#modified#</code>, <code>#author#</code>, <code>#account#</code>, "
|
1266 |
"<code>#tags#</code>, or <code>#blog#</code>."
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: wp-to-twitter.php:1119
|
1270 |
+
msgid "Upgrade to WP Tweets Pro"
|
1271 |
msgstr ""
|
1272 |
|
1273 |
+
#: wp-to-twitter.php:1130
|
1274 |
+
msgid "Your role does not have the ability to Post Tweets from this site."
|
1275 |
msgstr ""
|
1276 |
|
1277 |
+
#: wp-to-twitter.php:1138
|
1278 |
+
msgid "Previous Tweets"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
+
#: wp-to-twitter.php:1152
|
1282 |
+
msgid "Failed Tweets"
|
1283 |
msgstr ""
|
1284 |
|
1285 |
+
#: wp-to-twitter.php:1167
|
1286 |
+
msgid "No failed tweets on this post."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: wp-to-twitter.php:1196
|
1290 |
msgid "Characters left: "
|
1291 |
msgstr ""
|
1292 |
|
1293 |
+
#: wp-to-twitter.php:1261
|
1294 |
msgid "WP Tweets User Settings"
|
1295 |
msgstr ""
|
1296 |
|
1297 |
+
#: wp-to-twitter.php:1265
|
1298 |
msgid "Use My Twitter Username"
|
1299 |
msgstr ""
|
1300 |
|
1301 |
+
#: wp-to-twitter.php:1266
|
1302 |
msgid "Tweet my posts with an @ reference to my username."
|
1303 |
msgstr ""
|
1304 |
|
1305 |
+
#: wp-to-twitter.php:1267
|
1306 |
msgid ""
|
1307 |
"Tweet my posts with an @ reference to both my username and to the main site "
|
1308 |
"username."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
+
#: wp-to-twitter.php:1271
|
1312 |
msgid "Your Twitter Username"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
+
#: wp-to-twitter.php:1272
|
1316 |
msgid "Enter your own Twitter username."
|
1317 |
msgstr ""
|
1318 |
|
1319 |
+
#: wp-to-twitter.php:1275
|
1320 |
msgid "Hide account name in Tweets"
|
1321 |
msgstr ""
|
1322 |
|
1323 |
+
#: wp-to-twitter.php:1276
|
1324 |
msgid "Do not display my account in the #account# template tag."
|
1325 |
msgstr ""
|
1326 |
|
1327 |
+
#: wp-to-twitter.php:1329
|
1328 |
msgid "Check off categories to tweet"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: wp-to-twitter.php:1333
|
1332 |
msgid "Do not tweet posts in checked categories (Reverses default behavior)"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
+
#: wp-to-twitter.php:1350
|
1336 |
msgid ""
|
1337 |
"Limits are exclusive. If a post is in one category which should be posted "
|
1338 |
"and one category that should not, it will not be posted."
|
1339 |
msgstr ""
|
1340 |
|
1341 |
+
#: wp-to-twitter.php:1353
|
1342 |
msgid "Set Categories"
|
1343 |
msgstr ""
|
1344 |
|
1345 |
+
#: wp-to-twitter.php:1376
|
1346 |
msgid "Settings"
|
1347 |
msgstr ""
|
1348 |
|
1349 |
+
#: wp-to-twitter.php:1377
|
1350 |
msgid "Upgrade"
|
1351 |
msgstr ""
|
1352 |
|
1353 |
+
#: wp-to-twitter.php:1414
|
1354 |
msgid ""
|
1355 |
"<br /><strong>Note:</strong> Please review the <a class=\"thickbox\" href="
|
1356 |
"\"%1$s\">changelog</a> before upgrading."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: wp-to-twitter.php:1454
|
1360 |
msgid ""
|
1361 |
"I hope you've enjoyed <strong>WP to Twitter</strong>! Take a look at <a "
|
1362 |
"href='%s'>upgrading to WP Tweets PRO</a> for advanced Tweeting with "
|
1363 |
"WordPress! <a href='%s'>Dismiss</a>"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
+
#: wp-to-twitter.php:1499
|
1367 |
+
msgid "Tweet Status"
|
1368 |
+
msgstr ""
|
1369 |
+
|
1370 |
+
#: wpt-feed.php:149
|
1371 |
+
msgid "Twitter returned an invalid response. It is probably down."
|
1372 |
+
msgstr ""
|
1373 |
+
|
1374 |
#: wpt-functions.php:258
|
1375 |
msgid ""
|
1376 |
"Please read the FAQ and other Help documents before making a support request."
|
1393 |
"<code>%s</code>."
|
1394 |
msgstr ""
|
1395 |
|
1396 |
+
#: wpt-functions.php:280
|
1397 |
msgid ""
|
1398 |
"<strong>Please note</strong>: I do keep records of those who have donated, "
|
1399 |
"but if your donation came from somebody other than your account at this web "
|
1400 |
"site, you must note this in your message."
|
1401 |
msgstr ""
|
1402 |
|
1403 |
+
#: wpt-functions.php:285
|
1404 |
msgid "Reply to:"
|
1405 |
msgstr ""
|
1406 |
|
1407 |
+
#: wpt-functions.php:288
|
1408 |
msgid ""
|
1409 |
"I have read <a href=\"%1$s\">the FAQ for this plug-in</a> <span>(required)</"
|
1410 |
"span>"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: wpt-functions.php:291
|
1414 |
msgid ""
|
1415 |
"I have <a href=\"%1$s\">made a donation to help support this plug-in</a>"
|
1416 |
msgstr ""
|
1417 |
|
1418 |
+
#: wpt-functions.php:294
|
1419 |
msgid "Support Request:"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
+
#: wpt-functions.php:297
|
1423 |
msgid "Send Support Request"
|
1424 |
msgstr ""
|
1425 |
|
1426 |
+
#: wpt-functions.php:300
|
1427 |
msgid ""
|
1428 |
"The following additional information will be sent with your support request:"
|
1429 |
msgstr ""
|
1430 |
|
1431 |
+
#: wpt-widget.php:50
|
1432 |
+
msgid "Display a list of your latest tweets."
|
1433 |
+
msgstr ""
|
1434 |
+
|
1435 |
+
#: wpt-widget.php:59
|
1436 |
+
msgid "WP to Twitter - Latest Tweets"
|
1437 |
+
msgstr ""
|
1438 |
+
|
1439 |
+
#: wpt-widget.php:121
|
1440 |
+
msgid "<a href=\"%3$s\">about %1$s ago</a> via %2$s"
|
1441 |
+
msgstr ""
|
1442 |
+
|
1443 |
+
#: wpt-widget.php:123
|
1444 |
+
msgid "<a href=\"%2$s\">about %1$s ago</a>"
|
1445 |
+
msgstr ""
|
1446 |
+
|
1447 |
+
#: wpt-widget.php:179
|
1448 |
+
msgid "Title"
|
1449 |
+
msgstr ""
|
1450 |
+
|
1451 |
+
#: wpt-widget.php:184
|
1452 |
+
msgid "Twitter Username"
|
1453 |
+
msgstr ""
|
1454 |
+
|
1455 |
+
#: wpt-widget.php:189
|
1456 |
+
msgid "Number of Tweets to Show"
|
1457 |
+
msgstr ""
|
1458 |
+
|
1459 |
+
#: wpt-widget.php:195
|
1460 |
+
msgid "Hide @ Replies"
|
1461 |
+
msgstr ""
|
1462 |
+
|
1463 |
+
#: wpt-widget.php:200
|
1464 |
+
msgid "Include Retweets"
|
1465 |
+
msgstr ""
|
1466 |
+
|
1467 |
+
#: wpt-widget.php:205
|
1468 |
+
msgid "Parse links"
|
1469 |
+
msgstr ""
|
1470 |
+
|
1471 |
+
#: wpt-widget.php:210
|
1472 |
+
msgid "Parse @mentions"
|
1473 |
+
msgstr ""
|
1474 |
+
|
1475 |
+
#: wpt-widget.php:215
|
1476 |
+
msgid "Parse #hashtags"
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: wpt-widget.php:220
|
1480 |
+
msgid "Include Reply/Retweet/Favorite Links"
|
1481 |
+
msgstr ""
|
1482 |
+
|
1483 |
+
#: wpt-widget.php:225
|
1484 |
+
msgid "Include Tweet source"
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
#. Plugin Name of the plugin/theme
|
1488 |
msgid "WP to Twitter"
|
1489 |
msgstr ""
|
post-styles.css
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wp2t .jtw{ position: relative; padding-bottom: 1.4em;}
|
2 |
+
#wp2t .jtw textarea {font-size: 1.2em;}
|
3 |
+
#wp2t .counter{
|
4 |
+
position:absolute;right:4%;bottom:0;
|
5 |
+
font-size:1.3em;font-weight:700;color:#666;
|
6 |
+
}
|
7 |
+
#wp2t .warning{color:#700;}
|
8 |
+
#wp2t .exceeded{color:#e00;}
|
9 |
+
#wp2t code span { border-bottom: 1px dashed!important; cursor: pointer; }
|
10 |
+
#wp2t strong:first-child { border: 1px dashed; display: block; width: 25%; float: right; padding: 10px; background: #ffd; font-size: 1.2em; line-height: 1.4; text-align:center; border-radius: 6px; }
|
11 |
+
#wp2t .jtw { margin-right: 33%; width: 66.666666%; }
|
12 |
+
#wp2t .disabled { font-weight: 700; background: #ffc; padding: 5px; font-size: 1.2em; }
|
13 |
+
#side-sortables #wp2t .jtw {margin: 0;width: 100%; }
|
14 |
+
#side-sortables #wp2t .jtw textarea { height: 120px; }
|
15 |
+
#side-sortables #wp2t strong:first-child { width: 92%; float: none; margin: 0 auto 5px; padding: 0 0 5px; }
|
16 |
+
#wp2t .wpt_auth_users { margin: 0; padding: 0; }
|
17 |
+
#wp2t .wpt_auth_users select { width: 100%; max-height: 21em; }
|
18 |
+
#side-sortables #wp2t .wpt_auth_users select { width: 98%; max-height: 120px; }
|
19 |
+
.wpt-options { -moz-column-count: 3; -webkit-column-count: 3; column-count: 3; }
|
20 |
+
#side-sortables .wpt-options { -moz-column-count: 1; -webkit-column-count: 1; column-count: 1; }
|
21 |
+
.wptab { border-radius: 0 0 4px 4px; border: 1px solid #ddd; background: #fdfdfd; padding: 10px; margin: 0 2px; -moz-column-break-inside: avoid; -webkit-column-break-inside: avoid; column-break-inside: avoid; }
|
22 |
+
.wptab { min-height: 22em; }
|
23 |
+
#wp2t .tabs { display: none; }
|
24 |
+
#wp2t .disabled { color: #888; border: 1px solid #ddd; background: #eee; border-bottom: none; padding: 2px; border-radius: 4px 4px 0 0; }
|
25 |
+
#side-sortables #wp2t .tabs { display: block; }
|
26 |
+
#side-sortables .wptab { min-height: 16em; padding: 5px; margin: 2px 0; }
|
27 |
+
.free .wptab p { font-size: 1.3em; line-height: 1.5; }
|
28 |
+
#notes p { font-size: 1.3em; line-height: 1.5; }
|
29 |
+
|
30 |
+
.wpt-support { clear: both; }
|
31 |
+
.wpt-options .tabs { margin: 0; padding: 0 2px; position: relative; top: 3px; }
|
32 |
+
.wpt-options .tabs li { display: inline; margin: 0 auto; line-height: 1; }
|
33 |
+
.wpt-options .tabs a { display: inline-block; padding: 4px; border-radius: 4px 4px 0 0; border: 1px solid #ccc; background: #f3f3f3; }
|
34 |
+
.wpt-options .tabs a.active { border-bottom: 1px solid #fefefe; background: #fefefe; }
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: joedolson
|
3 |
Donate link: http://www.joedolson.com/donate.php
|
4 |
Tags: twitter, microblogging, su.pr, bitly, yourls, redirect, shortener, post, links
|
5 |
-
Requires at least: 3.1
|
6 |
-
Tested up to: 3.
|
7 |
License: GPLv2 or later
|
8 |
Stable tag: trunk
|
9 |
|
@@ -11,7 +11,7 @@ Auto-posts a Twitter update when you update your WordPress blog or blogroll, wit
|
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
WP 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 |
|
16 |
Upgrade to [WP Tweets Pro](http://www.joedolson.com/articles/wp-tweets-pro/)
|
17 |
|
@@ -51,6 +51,35 @@ Contributions by [Thor Erik](http://www.thorerik.net), Bill Berry and [Andrea Ba
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
= 2.6.9 =
|
55 |
|
56 |
* Error with post_with_media check. All apologies.
|
@@ -840,10 +869,11 @@ Writing and maintaining a plug-in is a lot of work. You can help me by providing
|
|
840 |
|
841 |
== Screenshots ==
|
842 |
|
843 |
-
1. WP to Twitter
|
844 |
2. WP to Twitter custom Tweet settings.
|
845 |
-
3. WP
|
|
|
846 |
|
847 |
== Upgrade Notice ==
|
848 |
|
849 |
-
* 2.
|
2 |
Contributors: joedolson
|
3 |
Donate link: http://www.joedolson.com/donate.php
|
4 |
Tags: twitter, microblogging, su.pr, bitly, yourls, redirect, shortener, post, links
|
5 |
+
Requires at least: 3.2.1
|
6 |
+
Tested up to: 3.6
|
7 |
License: GPLv2 or later
|
8 |
Stable tag: trunk
|
9 |
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
WP to Twitter automatically posts Tweets from WordPress to Twitter using your URL shortening service to provide a link back to your post from Twitter. You can also use WP to Twitter to display a feed of recent Tweets using widgets.
|
15 |
|
16 |
Upgrade to [WP Tweets Pro](http://www.joedolson.com/articles/wp-tweets-pro/)
|
17 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 2.7.3 =
|
55 |
+
|
56 |
+
* Don't display promotional notice if donation option checked.
|
57 |
+
* WP Tweets PRO: fix for broken prepend text.
|
58 |
+
* WP Tweets PRO: Improved truncating if image uploads enabled.
|
59 |
+
* Updated translation: Italian
|
60 |
+
|
61 |
+
= 2.7.2 =
|
62 |
+
|
63 |
+
* Bug fix: Twitter Feed CSS enqueued on all pages, instead of just when activated.
|
64 |
+
* Bug fix: test parameters in tmhOAuth caused plug-in conflict.
|
65 |
+
* Bug fix: Major issue with WP Tweets PRO if no individual accounts were authorized with Twitter.
|
66 |
+
|
67 |
+
= 2.7.1 =
|
68 |
+
|
69 |
+
* Cleared un-noticed PHP warnings.
|
70 |
+
* Updated .pot language files.
|
71 |
+
|
72 |
+
= 2.7.0 =
|
73 |
+
|
74 |
+
* Bug fix to character counter to adapt to updated t.co lengths.
|
75 |
+
* Bug fix to test URL to return unencoded URL.
|
76 |
+
* Bug fix: could not save setting to use dynamic campaign ID with Google Analytics
|
77 |
+
* Bug fix: Could not re-order template tag truncation order.
|
78 |
+
* Bug fix: Corrected encoding of category names and descriptions.
|
79 |
+
* Bug fix: Better handling of wp_get_shortlink for custom post types. (Custom post types don't support wp_get_shortlink)
|
80 |
+
* Adds a Twitter Feed widget.
|
81 |
+
* Deprecated support for WP 3.1.4.
|
82 |
+
|
83 |
= 2.6.9 =
|
84 |
|
85 |
* Error with post_with_media check. All apologies.
|
869 |
|
870 |
== Screenshots ==
|
871 |
|
872 |
+
1. WP to Twitter OAuth settings.
|
873 |
2. WP to Twitter custom Tweet settings.
|
874 |
+
3. WP Tweets PRO settings.
|
875 |
+
4. Twitter Feed
|
876 |
|
877 |
== Upgrade Notice ==
|
878 |
|
879 |
+
* 2.7.0 UI Redesign. Added Twitter Feed widget. Bug fixes.
|
screenshot-1.png
DELETED
Binary file
|
screenshot-2.png
DELETED
Binary file
|
screenshot-3.png
DELETED
Binary file
|
spritev2.png
ADDED
Binary file
|
styles.css
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wp-to-twitter #message {margin: 10px 0;padding: 5px;}
|
2 |
+
#wp-to-twitter .jd-settings {clear: both;}
|
3 |
+
#wp-to-twitter form .error p {background: none;border: none;}
|
4 |
+
legend {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; text-align: center;}
|
6 |
+
#wp-to-twitter .resources form {margin: 0;}
|
7 |
+
.settings {margin: 25px 0;background: #fff;padding: 10px;border: 1px solid #000;}
|
8 |
+
#wp-to-twitter ul {list-style-type: disc;margin-left: 2em;font-size: 1em;}
|
9 |
+
#wp-to-twitter li {line-height: 1.2;}
|
10 |
+
#wp-to-twitter .inside em {color: #f33;}
|
11 |
+
#wp-to-twitter .button-side { position: absolute; top: 0; right: 10px;}
|
12 |
+
#wp-to-twitter .tokens label { width: 13em; display: block; float: left; margin-top:5px;}
|
13 |
+
#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; }
|
14 |
+
#wp-to-twitter .categories li { list-style-type: none; margin: 3px 0; padding: 0;}
|
15 |
+
#wp-to-twitter .inside .wpt_types { float: left; width: 47%; }
|
16 |
+
#wp-to-twitter .inside .clear { display: block; clear: both; }
|
17 |
+
#wp-to-twitter .inside .comments { clear: both;}
|
18 |
+
#wp-to-twitter .postbox { margin: 10px 10px 0 0; }
|
19 |
+
#wp-to-twitter .meta-box-sortables { min-height: 0; }
|
20 |
+
#wp-to-twitter .wpt-template, #wp-to-twitter .support-request { width: 95%; }
|
21 |
+
.wp-tweets-notes { float: right; width: 30%; min-width: 140px; max-width: 240px; margin-left: 10px; }
|
22 |
+
#wp-to-twitter .indent { margin-left: 30px; }
|
23 |
+
#wp-to-twitter .flattr { float: right; }
|
24 |
+
.wpt_image { padding-left: 20px; background: url(image.png) left 50% no-repeat; display: block; }
|
tmhOAuth/tmhOAuth.php
CHANGED
@@ -606,8 +606,6 @@ class tmhOAuth {
|
|
606 |
* @return int the http response code for the request. 0 is returned if a connection could not be made
|
607 |
*/
|
608 |
private function curlit() {
|
609 |
-
$params = array( 'Just testing' );
|
610 |
-
|
611 |
$this->response['raw'] = '';
|
612 |
|
613 |
// method handling
|
606 |
* @return int the http response code for the request. 0 is returned if a connection could not be made
|
607 |
*/
|
608 |
private function curlit() {
|
|
|
|
|
609 |
$this->response['raw'] = '';
|
610 |
|
611 |
// method handling
|
twitter-bird-light-bgs.png
ADDED
Binary file
|
twitter-feed.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wpt-left { float: left; margin-right: 10px; }
|
2 |
+
.wpt-right { float: right; margin-left: 10px; }
|
3 |
+
.wpt-twitter-name { font-size: 120%; line-height: 1; }
|
4 |
+
.wpt-tweet-time { font-size: 90%; }
|
5 |
+
.wpt-intents-border { border-top: 1px solid; opacity: .3; margin: 5px 0; }
|
6 |
+
.wpt-intents { padding: 0 0 5px; text-align: center; }
|
7 |
+
.wpt-intents a span { width: 16px; height: 16px; display: inline-block; margin-right: 3px; position: relative; top: 2px; }
|
8 |
+
.wpt-intents .wpt-reply span { background: url(spritev2.png) 0px; }
|
9 |
+
.wpt-intents .wpt-retweet span { background: url(spritev2.png) -80px; }
|
10 |
+
.wpt-intents .wpt-favorite span { background: url(spritev2.png) -32px; }
|
11 |
+
.wpt-intents .wpt-reply:hover span, .wpt-intents .wpt-reply:focus span { background-position: -16px; }
|
12 |
+
.wpt-intents .wpt-retweet:hover span, .wpt-intents .wpt-retweet:focus span { background-position: -96px; }
|
13 |
+
.wpt-intents .wpt-favorite:hover span, .wpt-intents .wpt-favorite:focus span { background-position: -48px; }
|
14 |
+
.retweeted .wpt-intents .wpt-retweet span { background-position: -112px; }
|
15 |
+
.favorited .wpt-intents .wpt-favorite span { background-position: -64px; }
|
uninstall.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) && !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
3 |
+
exit();
|
4 |
+
} else {
|
5 |
+
delete_option( 'wpt_post_types' );
|
6 |
+
delete_option( 'jd_twit_remote' );
|
7 |
+
delete_option( 'jd_post_excerpt' );
|
8 |
+
|
9 |
+
delete_option( 'comment-published-update');
|
10 |
+
delete_option( 'comment-published-text');
|
11 |
+
|
12 |
+
// Su.pr API
|
13 |
+
delete_option( 'suprapi' );
|
14 |
+
|
15 |
+
// Error checking
|
16 |
+
delete_option( 'jd-functions-checked' );
|
17 |
+
delete_option( 'wp_twitter_failure' );
|
18 |
+
delete_option( 'wp_supr_failure' );
|
19 |
+
delete_option( 'wp_url_failure' );
|
20 |
+
delete_option( 'wp_bitly_failure' );
|
21 |
+
delete_option( 'wpt_curl_error' );
|
22 |
+
|
23 |
+
// Blogroll options
|
24 |
+
delete_option( 'jd-use-link-title' );
|
25 |
+
delete_option( 'jd-use-link-description' );
|
26 |
+
delete_option( 'newlink-published-text' );
|
27 |
+
delete_option( 'jd_twit_blogroll' );
|
28 |
+
|
29 |
+
// Default publishing options.
|
30 |
+
delete_option( 'jd_tweet_default' );
|
31 |
+
delete_option( 'jd_tweet_default_edit' );
|
32 |
+
delete_option( 'wpt_inline_edits' );
|
33 |
+
|
34 |
+
// Note that default options are set.
|
35 |
+
delete_option( 'twitterInitialised' );
|
36 |
+
delete_option( 'wp_twitter_failure' );
|
37 |
+
delete_option( 'twitterlogin' );
|
38 |
+
delete_option( 'twitterpw' );
|
39 |
+
delete_option( 'twitterlogin_encrypted' );
|
40 |
+
delete_option( 'suprapi' );
|
41 |
+
delete_option( 'jd_twit_quickpress' );
|
42 |
+
delete_option( 'jd-use-supr' );
|
43 |
+
delete_option( 'jd-use-none' );
|
44 |
+
delete_option( 'jd-use-wp' );
|
45 |
+
|
46 |
+
// Special Options
|
47 |
+
delete_option( 'jd_twit_prepend' );
|
48 |
+
delete_option( 'jd_twit_append' );
|
49 |
+
delete_option( 'jd_twit_remote' );
|
50 |
+
delete_option( 'twitter-analytics-campaign' );
|
51 |
+
delete_option( 'use-twitter-analytics' );
|
52 |
+
delete_option( 'jd_twit_custom_url' );
|
53 |
+
delete_option( 'jd_shortener' );
|
54 |
+
delete_option( 'jd_strip_nonan' );
|
55 |
+
|
56 |
+
delete_option( 'jd_individual_twitter_users' );
|
57 |
+
delete_option( 'use_tags_as_hashtags' );
|
58 |
+
delete_option('jd_max_tags');
|
59 |
+
delete_option('jd_max_characters');
|
60 |
+
// Bitly Settings
|
61 |
+
delete_option( 'bitlylogin' );
|
62 |
+
delete_option( 'jd-use-bitly' );
|
63 |
+
delete_option( 'bitlyapi' );
|
64 |
+
|
65 |
+
// twitter compatible api
|
66 |
+
delete_option( 'jd_api_post_status' );
|
67 |
+
delete_option('app_consumer_key');
|
68 |
+
delete_option('app_consumer_secret');
|
69 |
+
delete_option('oauth_token');
|
70 |
+
delete_option('oauth_token_secret');
|
71 |
+
|
72 |
+
//dymamic analytics
|
73 |
+
delete_option( 'jd_dynamic_analytics' );
|
74 |
+
delete_option( 'use_dynamic_analytics' );
|
75 |
+
//category limits
|
76 |
+
delete_option('limit_categories' );
|
77 |
+
delete_option('tweet_categories' );
|
78 |
+
//yourls installation
|
79 |
+
delete_option( 'yourlsapi' );
|
80 |
+
delete_option( 'yourlspath' );
|
81 |
+
delete_option( 'yourlsurl' );
|
82 |
+
delete_option( 'yourlslogin' );
|
83 |
+
delete_option( 'jd_replace_character' );
|
84 |
+
delete_option( 'jd_date_format' );
|
85 |
+
delete_option( 'jd_keyword_format' );
|
86 |
+
//Version
|
87 |
+
delete_option( 'wp_to_twitter_version' );
|
88 |
+
delete_option( 'wpt_authentication_missing' );
|
89 |
+
}
|
wp-to-twitter-manager.php
ADDED
@@ -0,0 +1,831 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
// FUNCTION to see if checkboxes should be checked
|
5 |
+
function jd_checkCheckbox( $theFieldname,$sub1=false,$sub2='' ) {
|
6 |
+
if ( $sub1 ) {
|
7 |
+
$setting = get_option($theFieldname);
|
8 |
+
if ( isset( $setting[$sub1] ) ) {
|
9 |
+
$value = ( $sub2 != '' )?$setting[$sub1][$sub2]:$setting[$sub1];
|
10 |
+
} else {
|
11 |
+
$value = 0;
|
12 |
+
}
|
13 |
+
if ( $value == 1 ) {
|
14 |
+
return 'checked="checked"';
|
15 |
+
}
|
16 |
+
}
|
17 |
+
if( get_option( $theFieldname ) == '1'){
|
18 |
+
return 'checked="checked"';
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
function jd_checkSelect( $theFieldname, $theValue, $type='select' ) {
|
23 |
+
if( get_option( $theFieldname ) == $theValue ) {
|
24 |
+
return ( $type == 'select' )?'selected="selected"':'checked="checked"';
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
function jd_check_functions() {
|
29 |
+
$message = "<div class='update'><ul>";
|
30 |
+
// grab or set necessary variables
|
31 |
+
$testurl = get_bloginfo( 'url' );
|
32 |
+
$shortener = get_option( 'jd_shortener' );
|
33 |
+
$title = urlencode( 'Your blog home' );
|
34 |
+
$shrink = apply_filters( 'wptt_shorten_link', $testurl, $title, false, true );
|
35 |
+
if ($shrink == FALSE) {
|
36 |
+
if ($shortener == 1) {
|
37 |
+
$error = htmlentities( get_option('wp_supr_error') );
|
38 |
+
} else if ( $shortener == 2 ) {
|
39 |
+
$error = htmlentities( get_option('wp_bitly_error') );
|
40 |
+
} else {
|
41 |
+
$error = __('No error information is available for your shortener.','wp-to-twitter');
|
42 |
+
}
|
43 |
+
$message .= __("<li class=\"error\"><strong>WP to Twitter was unable to contact your selected URL shortening service.</strong></li>",'wp-to-twitter');
|
44 |
+
$message .= "<li><code>$error</code></li>";
|
45 |
+
} else {
|
46 |
+
$message .= __("<li><strong>WP to Twitter successfully contacted your selected URL shortening service.</strong> The following link should point to your blog homepage:",'wp-to-twitter');
|
47 |
+
$message .= " <a href='$shrink'>$shrink</a></li>";
|
48 |
+
}
|
49 |
+
//check twitter credentials
|
50 |
+
if ( wtt_oauth_test() ) {
|
51 |
+
$rand = rand(1000000,9999999);
|
52 |
+
$testpost = jd_doTwitterAPIPost( "This is a test of WP->Twitter. $shrink ($rand)" );
|
53 |
+
if ($testpost) {
|
54 |
+
$message .= __("<li><strong>WP to Twitter successfully submitted a status update to Twitter.</strong></li>",'wp-to-twitter');
|
55 |
+
} else {
|
56 |
+
$error = get_option('jd_status_message');
|
57 |
+
$message .= __("<li class=\"error\"><strong>WP to Twitter failed to submit an update to Twitter.</strong></li>",'wp-to-twitter');
|
58 |
+
$message .= "<li class=\"error\">$error</li>";
|
59 |
+
}
|
60 |
+
} else {
|
61 |
+
$message .= "<strong>"._e('You have not connected WordPress to Twitter.','wp-to-twitter')."</strong> ";
|
62 |
+
}
|
63 |
+
// If everything's OK, there's no reason to do this again.
|
64 |
+
if ($testpost == FALSE && $shrink == FALSE ) {
|
65 |
+
$message .= __("<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>", 'wp-to-twitter');
|
66 |
+
} else {
|
67 |
+
}
|
68 |
+
if ( $testpost && $shrink ) {
|
69 |
+
$message .= __("<li><strong>Your server should run WP to Twitter successfully.</strong></li>", 'wp-to-twitter');
|
70 |
+
}
|
71 |
+
$message .= "</ul>
|
72 |
+
</div>";
|
73 |
+
return $message;
|
74 |
+
}
|
75 |
+
|
76 |
+
function wpt_update_settings() {
|
77 |
+
wpt_check_version();
|
78 |
+
if ( !empty($_POST) ) {
|
79 |
+
$nonce=$_REQUEST['_wpnonce'];
|
80 |
+
if (! wp_verify_nonce($nonce,'wp-to-twitter-nonce') ) die("Security check failed");
|
81 |
+
}
|
82 |
+
|
83 |
+
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'clear-error' ) {
|
84 |
+
update_option( 'wp_twitter_failure','0' );
|
85 |
+
update_option( 'wp_url_failure','0' );
|
86 |
+
update_option( 'jd_status_message','');
|
87 |
+
$message = __("WP to Twitter Errors Cleared", 'wp-to-twitter');
|
88 |
+
}
|
89 |
+
|
90 |
+
if ( isset($_POST['oauth_settings'] ) ) {
|
91 |
+
$oauth_message = jd_update_oauth_settings( false, $_POST );
|
92 |
+
}
|
93 |
+
|
94 |
+
$wp_twitter_error = FALSE;
|
95 |
+
$wp_supr_error = FALSE;
|
96 |
+
$wp_bitly_error = FALSE;
|
97 |
+
$message = "";
|
98 |
+
|
99 |
+
// SET DEFAULT OPTIONS
|
100 |
+
if ( get_option( 'twitterInitialised') != '1' ) {
|
101 |
+
$initial_settings = array(
|
102 |
+
'post'=> array(
|
103 |
+
'post-published-update'=>1,
|
104 |
+
'post-published-text'=>'New post: #title# #url#',
|
105 |
+
'post-edited-update'=>1,
|
106 |
+
'post-edited-text'=>'Post Edited: #title# #url#'
|
107 |
+
),
|
108 |
+
'page'=> array(
|
109 |
+
'post-published-update'=>0,
|
110 |
+
'post-published-text'=>'New page: #title# #url#',
|
111 |
+
'post-edited-update'=>0,
|
112 |
+
'post-edited-text'=>'Page edited: #title# #url#'
|
113 |
+
)
|
114 |
+
);
|
115 |
+
update_option( 'wpt_post_types', $initial_settings );
|
116 |
+
update_option( 'jd_twit_blogroll', '1');
|
117 |
+
update_option( 'newlink-published-text', 'New link: #title# #url#' );
|
118 |
+
update_option( 'limit_categories','0' );
|
119 |
+
update_option( 'jd_shortener', '1' );
|
120 |
+
update_option( 'jd_strip_nonan', '0' );
|
121 |
+
update_option('jd_max_tags',3);
|
122 |
+
update_option('jd_max_characters',15);
|
123 |
+
update_option('jd_replace_character','');
|
124 |
+
update_option('wtt_user_permissions','administrator');
|
125 |
+
$administrator = get_role('administrator');
|
126 |
+
$administrator->add_cap('wpt_twitter_oauth');
|
127 |
+
$administrator->add_cap('wpt_twitter_custom');
|
128 |
+
$administrator->add_cap('wpt_twitter_switch');
|
129 |
+
$administrator->add_cap('wpt_can_tweet');
|
130 |
+
$editor = get_role('editor');
|
131 |
+
if ( is_object( $editor ) ) { $editor->add_cap('wpt_can_tweet'); }
|
132 |
+
$author = get_role('author');
|
133 |
+
if ( is_object( $author ) ) { $author->add_cap('wpt_can_tweet'); }
|
134 |
+
$contributor = get_role('contributor');
|
135 |
+
if ( is_object( $contributor ) ) { $contributor->add_cap('wpt_can_tweet'); }
|
136 |
+
update_option('wpt_can_tweet','contributor');
|
137 |
+
update_option('wtt_show_custom_tweet','administrator');
|
138 |
+
|
139 |
+
update_option( 'jd_twit_remote', '0' );
|
140 |
+
update_option( 'jd_post_excerpt', 30 );
|
141 |
+
// Use Google Analytics with Twitter
|
142 |
+
update_option( 'twitter-analytics-campaign', 'twitter' );
|
143 |
+
update_option( 'use-twitter-analytics', '0' );
|
144 |
+
update_option( 'jd_dynamic_analytics','0' );
|
145 |
+
update_option( 'no-analytics', 1 );
|
146 |
+
update_option( 'use_dynamic_analytics','category' );
|
147 |
+
// Use custom external URLs to point elsewhere.
|
148 |
+
update_option( 'jd_twit_custom_url', 'external_link' );
|
149 |
+
// Error checking
|
150 |
+
update_option( 'wp_twitter_failure','0' );
|
151 |
+
update_option( 'wp_url_failure','0' );
|
152 |
+
// Default publishing options.
|
153 |
+
update_option( 'jd_tweet_default', '0' );
|
154 |
+
update_option( 'jd_tweet_default_edit','0' );
|
155 |
+
update_option( 'wpt_inline_edits', '0' );
|
156 |
+
// Note that default options are set.
|
157 |
+
update_option( 'twitterInitialised', '1' );
|
158 |
+
//YOURLS API
|
159 |
+
update_option( 'jd_keyword_format', '0' );
|
160 |
+
}
|
161 |
+
if ( get_option( 'twitterInitialised') == '1' && get_option( 'jd_post_excerpt' ) == "" ) {
|
162 |
+
update_option( 'jd_post_excerpt', 30 );
|
163 |
+
}
|
164 |
+
|
165 |
+
// notifications from oauth connection
|
166 |
+
if ( isset($_POST['oauth_settings'] ) ) {
|
167 |
+
if ( $oauth_message == "success" ) {
|
168 |
+
print('
|
169 |
+
<div id="message" class="updated fade">
|
170 |
+
<p>'.__('WP to Twitter is now connected with Twitter.', 'wp-to-twitter').'</p>
|
171 |
+
</div>
|
172 |
+
|
173 |
+
');
|
174 |
+
} else if ( $oauth_message == "failed" ) {
|
175 |
+
print('
|
176 |
+
<div id="message" class="updated fade">
|
177 |
+
<p>'.__('WP to Twitter failed to connect with Twitter. Try <a href="#wpt_http">switching to an HTTP connection</a>.', 'wp-to-twitter').'</p>
|
178 |
+
<p>'.__('Error:','wp-to-twitter').' '.get_option('wpt_error').'</p>
|
179 |
+
</div>
|
180 |
+
|
181 |
+
');
|
182 |
+
} else if ( $oauth_message == "cleared" ) {
|
183 |
+
print('
|
184 |
+
<div id="message" class="updated fade">
|
185 |
+
<p>'.__('OAuth Authentication Data Cleared.', 'wp-to-twitter').'</p>
|
186 |
+
</div>
|
187 |
+
|
188 |
+
');
|
189 |
+
} else if ( $oauth_message == 'nosync' ) {
|
190 |
+
print('
|
191 |
+
<div id="message" class="error fade">
|
192 |
+
<p>'.__('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.', 'wp-to-twitter').'</p>
|
193 |
+
</div>
|
194 |
+
|
195 |
+
');
|
196 |
+
} else {
|
197 |
+
print('
|
198 |
+
<div id="message" class="error fade">
|
199 |
+
<p>'.__('OAuth Authentication response not understood.', 'wp-to-twitter').'</p>
|
200 |
+
</div>
|
201 |
+
');
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
if ( isset( $_POST['submit-type'] ) && $_POST['submit-type'] == 'advanced' ) {
|
206 |
+
update_option( 'jd_tweet_default', ( isset( $_POST['jd_tweet_default'] ) )?$_POST['jd_tweet_default']:0 );
|
207 |
+
update_option( 'jd_tweet_default_edit', ( isset( $_POST['jd_tweet_default_edit'] ) )?$_POST['jd_tweet_default_edit']:0 );
|
208 |
+
update_option( 'wpt_inline_edits', ( isset( $_POST['wpt_inline_edits'] ) )?$_POST['wpt_inline_edits']:0 );
|
209 |
+
update_option( 'jd_twit_remote',( isset( $_POST['jd_twit_remote'] ) )?$_POST['jd_twit_remote']:0 );
|
210 |
+
update_option( 'jd_twit_custom_url', $_POST['jd_twit_custom_url'] );
|
211 |
+
update_option( 'jd_strip_nonan', ( isset( $_POST['jd_strip_nonan'] ) )?$_POST['jd_strip_nonan']:0 );
|
212 |
+
update_option( 'jd_twit_prepend', $_POST['jd_twit_prepend'] );
|
213 |
+
update_option( 'jd_twit_append', $_POST['jd_twit_append'] );
|
214 |
+
update_option( 'jd_post_excerpt', $_POST['jd_post_excerpt'] );
|
215 |
+
update_option( 'jd_max_tags',$_POST['jd_max_tags']);
|
216 |
+
update_option( 'wpt_tag_source', ( ( isset($_POST['wpt_tag_source']) && $_POST['wpt_tag_source'] == 'slug' )?'slug':'' ) );
|
217 |
+
update_option( 'jd_max_characters',$_POST['jd_max_characters']);
|
218 |
+
update_option( 'jd_replace_character',$_POST['jd_replace_character']);
|
219 |
+
update_option( 'jd_date_format',$_POST['jd_date_format'] );
|
220 |
+
update_option( 'jd_dynamic_analytics',$_POST['jd-dynamic-analytics'] );
|
221 |
+
|
222 |
+
$twitter_analytics = ( isset($_POST['twitter-analytics']) )?$_POST['twitter-analytics']:0;
|
223 |
+
if ( $twitter_analytics == 1 ) {
|
224 |
+
update_option( 'use_dynamic_analytics', 0 );
|
225 |
+
update_option( 'use-twitter-analytics', 1 );
|
226 |
+
update_option( 'no-analytics', 0 );
|
227 |
+
} else if ( $twitter_analytics == 2 ) {
|
228 |
+
update_option( 'use_dynamic_analytics', 1 );
|
229 |
+
update_option( 'use-twitter-analytics', 0 );
|
230 |
+
update_option( 'no-analytics', 0 );
|
231 |
+
} else {
|
232 |
+
update_option( 'use_dynamic_analytics', 0 );
|
233 |
+
update_option( 'use-twitter-analytics', 0 );
|
234 |
+
update_option( 'no-analytics', 1 );
|
235 |
+
}
|
236 |
+
|
237 |
+
update_option( 'twitter-analytics-campaign', $_POST['twitter-analytics-campaign'] );
|
238 |
+
update_option( 'jd_individual_twitter_users', ( isset( $_POST['jd_individual_twitter_users'] )? $_POST['jd_individual_twitter_users']:0 ) );
|
239 |
+
$wtt_user_permissions = $_POST['wtt_user_permissions'];
|
240 |
+
$prev = get_option('wtt_user_permissions');
|
241 |
+
if ( $wtt_user_permissions != $prev ) {
|
242 |
+
$subscriber = get_role('subscriber'); $subscriber->remove_cap('wpt_twitter_oauth');
|
243 |
+
$contributor = get_role('contributor'); $contributor->remove_cap('wpt_twitter_oauth');
|
244 |
+
$author = get_role('author'); $author->remove_cap('wpt_twitter_oauth');
|
245 |
+
$editor = get_role('editor'); $editor->remove_cap('wpt_twitter_oauth');
|
246 |
+
switch ( $wtt_user_permissions ) {
|
247 |
+
case 'subscriber':
|
248 |
+
if ( is_object( $subscriber ) ) {
|
249 |
+
$subscriber->add_cap('wpt_twitter_oauth'); $contributor->add_cap('wpt_twitter_oauth'); $author->add_cap('wpt_twitter_oauth'); $editor->add_cap('wpt_twitter_oauth'); break;
|
250 |
+
}
|
251 |
+
case 'contributor':
|
252 |
+
if ( is_object( $contributor ) ) {
|
253 |
+
$contributor->add_cap('wpt_twitter_oauth'); $author->add_cap('wpt_twitter_oauth'); $editor->add_cap('wpt_twitter_oauth'); break;
|
254 |
+
}
|
255 |
+
case 'author':
|
256 |
+
if ( is_object( $author ) ) {
|
257 |
+
$author->add_cap('wpt_twitter_oauth'); $editor->add_cap('wpt_twitter_oauth'); break;
|
258 |
+
}
|
259 |
+
case 'editor':
|
260 |
+
if ( is_object( $editor ) ) {
|
261 |
+
$editor->add_cap('wpt_twitter_oauth'); break;
|
262 |
+
}
|
263 |
+
default:
|
264 |
+
$role = get_role( $wtt_user_permissions );
|
265 |
+
$role->add_cap('wpt_twitter_oauth');
|
266 |
+
break;
|
267 |
+
}
|
268 |
+
}
|
269 |
+
update_option( 'wtt_user_permissions',$wtt_user_permissions);
|
270 |
+
|
271 |
+
$wtt_show_custom_tweet = $_POST['wtt_show_custom_tweet'];
|
272 |
+
$prev = get_option('wtt_show_custom_tweet');
|
273 |
+
if ( $wtt_show_custom_tweet != $prev ) {
|
274 |
+
$subscriber = get_role('subscriber'); $subscriber->remove_cap('wpt_twitter_custom');
|
275 |
+
$contributor = get_role('contributor'); $contributor->remove_cap('wpt_twitter_custom');
|
276 |
+
$author = get_role('author'); $author->remove_cap('wpt_twitter_custom');
|
277 |
+
$editor = get_role('editor'); $editor->remove_cap('wpt_twitter_custom');
|
278 |
+
switch ( $wtt_show_custom_tweet ) {
|
279 |
+
case 'subscriber':
|
280 |
+
if ( is_object( $subscriber ) ) {
|
281 |
+
$subscriber->add_cap('wpt_twitter_custom'); $contributor->add_cap('wpt_twitter_custom'); $author->add_cap('wpt_twitter_custom'); $editor->add_cap('wpt_twitter_custom'); break;
|
282 |
+
}
|
283 |
+
case 'contributor':
|
284 |
+
if ( is_object( $contributor ) ) {
|
285 |
+
$contributor->add_cap('wpt_twitter_custom'); $author->add_cap('wpt_twitter_custom'); $editor->add_cap('wpt_twitter_custom'); break;
|
286 |
+
}
|
287 |
+
case 'author':
|
288 |
+
if ( is_object( $author ) ) {
|
289 |
+
$author->add_cap('wpt_twitter_custom'); $editor->add_cap('wpt_twitter_custom'); break;
|
290 |
+
}
|
291 |
+
case 'editor':
|
292 |
+
if ( is_object( $editor ) ) {
|
293 |
+
$editor->add_cap('wpt_twitter_custom'); break;
|
294 |
+
}
|
295 |
+
default:
|
296 |
+
$role = get_role( $wtt_show_custom_tweet );
|
297 |
+
$role->add_cap('wpt_twitter_custom');
|
298 |
+
break;
|
299 |
+
}
|
300 |
+
}
|
301 |
+
update_option( 'wtt_show_custom_tweet',$wtt_show_custom_tweet);
|
302 |
+
|
303 |
+
$wpt_twitter_switch = $_POST['wpt_twitter_switch'];
|
304 |
+
$prev = get_option('wpt_twitter_switch');
|
305 |
+
if ( $wpt_twitter_switch != $prev ) {
|
306 |
+
$subscriber = get_role('subscriber'); $subscriber->remove_cap('wpt_twitter_switch');
|
307 |
+
$contributor = get_role('contributor'); $contributor->remove_cap('wpt_twitter_switch');
|
308 |
+
$author = get_role('author'); $author->remove_cap('wpt_twitter_switch');
|
309 |
+
$editor = get_role('editor'); $editor->remove_cap('wpt_twitter_switch');
|
310 |
+
switch ( $wpt_twitter_switch ) {
|
311 |
+
case 'subscriber':
|
312 |
+
if ( is_object( $subscriber ) ) {
|
313 |
+
$subscriber->add_cap('wpt_twitter_switch'); $contributor->add_cap('wpt_twitter_switch'); $author->add_cap('wpt_twitter_switch'); $editor->add_cap('wpt_twitter_switch'); break;
|
314 |
+
}
|
315 |
+
case 'contributor':
|
316 |
+
if ( is_object( $contributor ) ) {
|
317 |
+
$contributor->add_cap('wpt_twitter_switch'); $author->add_cap('wpt_twitter_switch'); $editor->add_cap('wpt_twitter_switch'); break;
|
318 |
+
}
|
319 |
+
case 'author':
|
320 |
+
if ( is_object( $author ) ) {
|
321 |
+
$author->add_cap('wpt_twitter_switch'); $editor->add_cap('wpt_twitter_switch'); break;
|
322 |
+
}
|
323 |
+
case 'editor':
|
324 |
+
if ( is_object( $editor ) ) {
|
325 |
+
$editor->add_cap('wpt_twitter_switch'); break;
|
326 |
+
}
|
327 |
+
default:
|
328 |
+
$role = get_role( $wpt_twitter_switch );
|
329 |
+
$role->add_cap('wpt_twitter_switch');
|
330 |
+
break;
|
331 |
+
}
|
332 |
+
}
|
333 |
+
update_option( 'wpt_twitter_switch',$wpt_twitter_switch);
|
334 |
+
|
335 |
+
$wpt_can_tweet = $_POST['wpt_can_tweet'];
|
336 |
+
$prev = get_option('wpt_can_tweet');
|
337 |
+
if ( $wpt_can_tweet != $prev ) {
|
338 |
+
$subscriber = get_role('subscriber'); $subscriber->remove_cap('wpt_can_tweet');
|
339 |
+
$contributor = get_role('contributor'); $contributor->remove_cap('wpt_can_tweet');
|
340 |
+
$author = get_role('author'); $author->remove_cap('wpt_can_tweet');
|
341 |
+
$editor = get_role('editor'); $editor->remove_cap('wpt_can_tweet');
|
342 |
+
switch ( $wpt_can_tweet ) {
|
343 |
+
case 'subscriber':
|
344 |
+
if ( is_object( $subscriber ) ) {
|
345 |
+
$subscriber->add_cap('wpt_can_tweet'); $contributor->add_cap('wpt_can_tweet'); $author->add_cap('wpt_can_tweet'); $editor->add_cap('wpt_can_tweet'); break;
|
346 |
+
}
|
347 |
+
case 'contributor':
|
348 |
+
if ( is_object( $contributor ) ) {
|
349 |
+
$contributor->add_cap('wpt_can_tweet'); $author->add_cap('wpt_can_tweet'); $editor->add_cap('wpt_can_tweet'); break;
|
350 |
+
}
|
351 |
+
case 'author':
|
352 |
+
if ( is_object( $author ) ) {
|
353 |
+
$author->add_cap('wpt_can_tweet'); $editor->add_cap('wpt_can_tweet'); break;
|
354 |
+
}
|
355 |
+
case 'editor':
|
356 |
+
if ( is_object( $editor ) ) {
|
357 |
+
$editor->add_cap('wpt_can_tweet'); break;
|
358 |
+
}
|
359 |
+
default:
|
360 |
+
$role = get_role( $wpt_can_tweet );
|
361 |
+
$role->add_cap('wpt_can_tweet');
|
362 |
+
break;
|
363 |
+
}
|
364 |
+
}
|
365 |
+
update_option( 'wpt_can_tweet',$wpt_can_tweet);
|
366 |
+
|
367 |
+
update_option( 'disable_url_failure' , ( isset( $_POST['disable_url_failure'] ) )?$_POST['disable_url_failure']:0 );
|
368 |
+
update_option( 'disable_twitter_failure' , ( isset( $_POST['disable_twitter_failure'] ) )?$_POST['disable_twitter_failure']:0 );
|
369 |
+
update_option( 'disable_oauth_notice' , ( isset( $_POST['disable_oauth_notice'] ) )?$_POST['disable_oauth_notice']:0 );
|
370 |
+
update_option( 'wp_debug_oauth' , ( isset( $_POST['wp_debug_oauth'] ) )?$_POST['wp_debug_oauth']:0 );
|
371 |
+
update_option( 'wpt_http' , ( isset( $_POST['wpt_http'] ) )?$_POST['wpt_http']:0 );
|
372 |
+
|
373 |
+
update_option( 'jd_donations' , ( isset( $_POST['jd_donations'] ) )?$_POST['jd_donations']:0 );
|
374 |
+
$wpt_truncation_order = $_POST['wpt_truncation_order'];
|
375 |
+
update_option( 'wpt_truncation_order', $wpt_truncation_order );
|
376 |
+
$message .= __( 'WP to Twitter Advanced Options Updated' , 'wp-to-twitter');
|
377 |
+
}
|
378 |
+
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'options' ) {
|
379 |
+
// UPDATE OPTIONS
|
380 |
+
$wpt_settings = get_option('wpt_post_types');
|
381 |
+
foreach($_POST['wpt_post_types'] as $key=>$value) {
|
382 |
+
$array = array(
|
383 |
+
'post-published-update'=>( isset( $value["post-published-update"] ) )?$value["post-published-update"]:"",
|
384 |
+
'post-published-text'=>$value["post-published-text"],
|
385 |
+
'post-edited-update'=>( isset( $value["post-edited-update"] ) )?$value["post-edited-update"]:"",
|
386 |
+
'post-edited-text'=>$value["post-edited-text"]
|
387 |
+
);
|
388 |
+
$wpt_settings[$key] = $array;
|
389 |
+
}
|
390 |
+
update_option( 'wpt_post_types', $wpt_settings );
|
391 |
+
update_option( 'newlink-published-text', $_POST['newlink-published-text'] );
|
392 |
+
update_option( 'jd_twit_blogroll',(isset($_POST['jd_twit_blogroll']) )?$_POST['jd_twit_blogroll']:"" );
|
393 |
+
$message = wpt_select_shortener( $_POST );
|
394 |
+
$message .= __( 'WP to Twitter Options Updated' , 'wp-to-twitter');
|
395 |
+
}
|
396 |
+
|
397 |
+
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'setcategories' ) {
|
398 |
+
if ( isset($_POST['jd_twit_cats']) ) { update_option('jd_twit_cats',1); } else { update_option('jd_twit_cats',0); }
|
399 |
+
if ( is_array($_POST['categories'])) {
|
400 |
+
$categories = $_POST['categories'];
|
401 |
+
update_option('limit_categories','1');
|
402 |
+
update_option('tweet_categories',$categories);
|
403 |
+
$message = __("Category limits updated.",'wp-to-twitter');
|
404 |
+
} else {
|
405 |
+
update_option('limit_categories','0');
|
406 |
+
update_option('tweet_categories','');
|
407 |
+
$message = __("Category limits unset.",'wp-to-twitter');
|
408 |
+
}
|
409 |
+
}
|
410 |
+
if ( isset($_POST['wpt_shortener_update']) && $_POST['wpt_shortener_update'] == 'true' ) {
|
411 |
+
$message = wpt_shortener_update( $_POST );
|
412 |
+
}
|
413 |
+
// Check whether the server has supported for needed functions.
|
414 |
+
if ( isset($_POST['submit-type']) && $_POST['submit-type'] == 'check-support' ) {
|
415 |
+
$message = jd_check_functions();
|
416 |
+
}
|
417 |
+
?>
|
418 |
+
<div class="wrap" id="wp-to-twitter">
|
419 |
+
<?php wpt_marginal_function(); ?>
|
420 |
+
<?php wpt_commments_removed(); ?>
|
421 |
+
<?php if ( $message ) { ?>
|
422 |
+
<div id="message" class="updated fade"><?php echo $message; ?></div>
|
423 |
+
<?php } ?>
|
424 |
+
<?php if ( get_option( 'wp_twitter_failure' ) != '0' || get_option( 'wp_url_failure' ) == '1' ) { ?>
|
425 |
+
<div class="error">
|
426 |
+
<?php if ( get_option( 'wp_twitter_failure' ) == '1' ) {
|
427 |
+
_e("<p>One or more of your last posts has failed to send a status update to Twitter. The Tweet has been saved, and you can re-Tweet it at your leisure.</p>", 'wp-to-twitter');
|
428 |
+
}
|
429 |
+
if ( get_option( 'jd_status_message' ) != '' ) {
|
430 |
+
echo "<p><strong>".get_option( 'jd_status_message' )."</strong></p>";
|
431 |
+
}
|
432 |
+
if ( get_option( 'wp_twitter_failure' ) == '2') {
|
433 |
+
echo "<p>".__("Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. ", 'wp-to-twitter')."</p>";
|
434 |
+
}
|
435 |
+
if ( get_option( 'wp_url_failure' ) == '1' ) {
|
436 |
+
_e("<p>The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet. Check with your URL shortening provider to see if there are any known issues.</p>", 'wp-to-twitter');
|
437 |
+
} ?>
|
438 |
+
<?php $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'); ?>
|
439 |
+
<form method="post" action="<?php echo $admin_url; ?>">
|
440 |
+
<div><input type="hidden" name="submit-type" value="clear-error" /></div>
|
441 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
442 |
+
<p><input type="submit" name="submit" value="<?php _e("Clear 'WP to Twitter' Error Messages", 'wp-to-twitter'); ?>" class="button-primary" /></p>
|
443 |
+
</form>
|
444 |
+
</div>
|
445 |
+
<?php
|
446 |
+
}
|
447 |
+
?>
|
448 |
+
<h2><?php _e("WP to Twitter Options", 'wp-to-twitter'); ?></h2>
|
449 |
+
<div id="wpt_settings_page" class="postbox-container" style="width: 70%">
|
450 |
+
|
451 |
+
<?php $wp_to_twitter_directory = get_bloginfo( 'wpurl' ) . '/' . WP_PLUGIN_DIR . '/' . dirname( plugin_basename(__FILE__) ); ?>
|
452 |
+
|
453 |
+
<div class="metabox-holder">
|
454 |
+
|
455 |
+
<?php if (function_exists('wtt_connect_oauth') ) { wtt_connect_oauth(); } ?>
|
456 |
+
|
457 |
+
<?php if (function_exists( 'wpt_pro_functions' ) ) { wpt_pro_functions(); } ?>
|
458 |
+
<div class="ui-sortable meta-box-sortables">
|
459 |
+
<div class="postbox">
|
460 |
+
|
461 |
+
<h3><?php _e('Basic Settings','wp-to-twitter'); ?></h3>
|
462 |
+
<div class="inside">
|
463 |
+
|
464 |
+
<form method="post" action="">
|
465 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
466 |
+
<div>
|
467 |
+
<input type="submit" name="submit" value="<?php _e("Save WP->Twitter Options", 'wp-to-twitter'); ?>" class="button-primary button-side" />
|
468 |
+
<?php echo apply_filters('wpt_pick_shortener',''); ?>
|
469 |
+
<?php
|
470 |
+
|
471 |
+
$post_types = get_post_types( array('public'=>true), 'names' );
|
472 |
+
$wpt_settings = get_option('wpt_post_types');
|
473 |
+
|
474 |
+
foreach( $post_types as $type ) {
|
475 |
+
if ( $type == 'attachment' || $type == 'nav_menu_item' || $type == 'revision' ) {
|
476 |
+
|
477 |
+
} else {
|
478 |
+
$vowels = array( 'a','e','i','o','u' );
|
479 |
+
foreach ( $vowels as $vowel ) {
|
480 |
+
if ( strpos($type, $vowel ) === 0 ) { $word = 'an'; break; } else { $word = 'a'; }
|
481 |
+
}
|
482 |
+
?>
|
483 |
+
<fieldset class='wpt_types'>
|
484 |
+
|
485 |
+
<legend><?php printf(__('Settings for type "%1$s"','wp-to-twitter'),$type); ?></legend>
|
486 |
+
<p>
|
487 |
+
<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')?> />
|
488 |
+
<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'] ) ); } ?>" />
|
489 |
+
</p>
|
490 |
+
<p>
|
491 |
+
<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')?> />
|
492 |
+
<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'] ) ); } ?>" />
|
493 |
+
</p>
|
494 |
+
</fieldset>
|
495 |
+
<?php
|
496 |
+
}
|
497 |
+
}
|
498 |
+
?>
|
499 |
+
<fieldset>
|
500 |
+
<legend><?php _e('Settings for Links','wp-to-twitter'); ?></legend>
|
501 |
+
<p>
|
502 |
+
<input type="checkbox" name="jd_twit_blogroll" id="jd_twit_blogroll" value="1" <?php echo jd_checkCheckbox('jd_twit_blogroll')?> />
|
503 |
+
<label for="jd_twit_blogroll"><strong><?php _e("Update Twitter when you post a Blogroll link", 'wp-to-twitter'); ?></strong></label><br />
|
504 |
+
<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>
|
505 |
+
</p>
|
506 |
+
</fieldset>
|
507 |
+
<br class='clear' />
|
508 |
+
<div>
|
509 |
+
<input type="hidden" name="submit-type" value="options" />
|
510 |
+
</div>
|
511 |
+
<input type="submit" name="submit" value="<?php _e("Save WP->Twitter Options", 'wp-to-twitter'); ?>" class="button-primary" />
|
512 |
+
</div>
|
513 |
+
</form>
|
514 |
+
</div>
|
515 |
+
</div>
|
516 |
+
</div>
|
517 |
+
|
518 |
+
<?php echo apply_filters( 'wpt_shortener_controls', '' ); ?>
|
519 |
+
|
520 |
+
<div class="ui-sortable meta-box-sortables">
|
521 |
+
<div class="postbox">
|
522 |
+
<h3><?php _e('Advanced Settings','wp-to-twitter'); ?></h3>
|
523 |
+
<div class="inside">
|
524 |
+
<form method="post" action="">
|
525 |
+
<div>
|
526 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
527 |
+
<input type="submit" name="submit" value="<?php _e("Save Advanced WP->Twitter Options", 'wp-to-twitter'); ?>" class="button-primary button-side" />
|
528 |
+
|
529 |
+
<fieldset>
|
530 |
+
<legend><?php _e('Tags','wp-to-twitter'); ?></legend>
|
531 |
+
<p>
|
532 |
+
<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>
|
533 |
+
</p>
|
534 |
+
<p>
|
535 |
+
<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 />
|
536 |
+
</p>
|
537 |
+
<p>
|
538 |
+
<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" />
|
539 |
+
</p>
|
540 |
+
<p>
|
541 |
+
<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" />
|
542 |
+
<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" />
|
543 |
+
</p>
|
544 |
+
</fieldset>
|
545 |
+
<fieldset>
|
546 |
+
<legend><?php _e('Template Tag Settings','wp-to-twitter'); ?></legend>
|
547 |
+
<p>
|
548 |
+
<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>)
|
549 |
+
</p>
|
550 |
+
<p>
|
551 |
+
<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>)
|
552 |
+
</p>
|
553 |
+
|
554 |
+
<p>
|
555 |
+
<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' ) ) ) ) ?>" />
|
556 |
+
</p>
|
557 |
+
<p>
|
558 |
+
<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' ) ) ) ) ?>" />
|
559 |
+
</p>
|
560 |
+
<p>
|
561 |
+
<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' ) ) ) ) ?>" />
|
562 |
+
</p>
|
563 |
+
</fieldset>
|
564 |
+
|
565 |
+
<?php
|
566 |
+
$inputs = '';
|
567 |
+
$default_order = array(
|
568 |
+
'excerpt'=>0,
|
569 |
+
'title'=>1,
|
570 |
+
'date'=>2,
|
571 |
+
'category'=>3,
|
572 |
+
'blogname'=>4,
|
573 |
+
'author'=>5,
|
574 |
+
'account'=>6,
|
575 |
+
'tags'=>7,
|
576 |
+
'modified'=>8,
|
577 |
+
'@'=>9,
|
578 |
+
'cat_desc'=>10
|
579 |
+
);
|
580 |
+
$preferred_order = get_option( 'wpt_truncation_order' );
|
581 |
+
if ( !$preferred_order ) $preferred_order = array();
|
582 |
+
$preferred_order = array_merge( $default_order, $preferred_order );
|
583 |
+
if ( is_array( $preferred_order ) ) { $default_order = $preferred_order; }
|
584 |
+
asort($default_order);
|
585 |
+
foreach ( $default_order as $k=>$v ) {
|
586 |
+
$label = ucfirst($k);
|
587 |
+
$inputs .= "<input type='text' size='2' value='$v' name='wpt_truncation_order[$k]' /> <label for='$k-$v'>$label</label><br />";
|
588 |
+
}
|
589 |
+
?>
|
590 |
+
<fieldset>
|
591 |
+
<legend><?php _e('Template tag priority order','wp-to-twitter'); ?></legend>
|
592 |
+
<p><?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>
|
593 |
+
<p>
|
594 |
+
<?php echo $inputs; ?>
|
595 |
+
</p>
|
596 |
+
</fieldset>
|
597 |
+
<fieldset>
|
598 |
+
<legend><?php _e( "Special Cases when WordPress should send a Tweet",'wp-to-twitter' ); ?></legend>
|
599 |
+
<p>
|
600 |
+
<input type="checkbox" name="jd_tweet_default" id="jd_tweet_default" value="1" <?php echo jd_checkCheckbox('jd_tweet_default')?> />
|
601 |
+
<label for="jd_tweet_default"><?php _e("Do not post Tweets by default", 'wp-to-twitter'); ?></label><br />
|
602 |
+
<input type="checkbox" name="jd_tweet_default_edit" id="jd_tweet_default_edit" value="1" <?php echo jd_checkCheckbox('jd_tweet_default_edit')?> />
|
603 |
+
<label for="jd_tweet_default_edit"><?php _e("Do not post Tweets by default (editing only)", 'wp-to-twitter'); ?></label><br />
|
604 |
+
</p>
|
605 |
+
<p>
|
606 |
+
<input type="checkbox" name="wpt_inline_edits" id="wpt_inline_edits" value="1" <?php echo jd_checkCheckbox('wpt_inline_edits')?> />
|
607 |
+
<label for="wpt_inline_edits"><?php _e("Allow status updates from Quick Edit", 'wp-to-twitter'); ?></label><br />
|
608 |
+
|
609 |
+
</p>
|
610 |
+
<?php if ( function_exists( 'wpt_pro_exists') && wpt_pro_exists() == true && get_option( 'wpt_delay_tweets' ) > 0 ) {
|
611 |
+
$r_disabled = " disabled='disabled'";
|
612 |
+
$r_message = "<em>".__('Delaying tweets with WP Tweets PRO moves Tweeting to an publishing-independent action.','wp-to-twitter' )."</em>";
|
613 |
+
} else {
|
614 |
+
$r_disabled = '';
|
615 |
+
$r_message = '';
|
616 |
+
} ?>
|
617 |
+
<p>
|
618 |
+
<input type="checkbox"<?php echo $r_disabled; ?> name="jd_twit_remote" id="jd_twit_remote" value="1" <?php echo jd_checkCheckbox('jd_twit_remote')?> />
|
619 |
+
<label for="jd_twit_remote"><?php _e("Send Twitter Updates on remote publication (Post by Email or XMLRPC Client)", 'wp-to-twitter'); ?></label><br />
|
620 |
+
<?php echo $r_message; ?>
|
621 |
+
</p>
|
622 |
+
</fieldset>
|
623 |
+
<fieldset>
|
624 |
+
<legend><?php _e( "Google Analytics Settings",'wp-to-twitter' ); ?></legend>
|
625 |
+
<p><?php _e("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.","wp-to-twitter"); ?></p>
|
626 |
+
<p>
|
627 |
+
<input type="radio" name="twitter-analytics" id="use-twitter-analytics" value="1" <?php echo jd_checkCheckbox('use-twitter-analytics')?> />
|
628 |
+
<label for="use-twitter-analytics"><?php _e("Use a Static Identifier with WP-to-Twitter", 'wp-to-twitter'); ?></label><br />
|
629 |
+
<label for="twitter-analytics-campaign"><?php _e("Static Campaign identifier for Google Analytics:", 'wp-to-twitter'); ?></label> <input type="text" name="twitter-analytics-campaign" id="twitter-analytics-campaign" size="40" maxlength="120" value="<?php echo ( esc_attr( get_option( 'twitter-analytics-campaign' ) ) ) ?>" /><br />
|
630 |
+
</p>
|
631 |
+
<p>
|
632 |
+
<input type="radio" name="twitter-analytics" id="use-dynamic-analytics" value="2" <?php echo jd_checkCheckbox('use_dynamic_analytics')?> />
|
633 |
+
<label for="use-dynamic-analytics"><?php _e("Use a dynamic identifier with Google Analytics and WP-to-Twitter", 'wp-to-twitter'); ?></label><br />
|
634 |
+
<label for="jd-dynamic-analytics"><?php _e("What dynamic identifier would you like to use?","wp-to-twitter"); ?></label>
|
635 |
+
<select name="jd-dynamic-analytics" id="jd-dynamic-analytics">
|
636 |
+
<option value="post_category"<?php echo jd_checkSelect( 'jd_dynamic_analytics','post_category'); ?>><?php _e("Category","wp-to-twitter"); ?></option>
|
637 |
+
<option value="post_ID"<?php echo jd_checkSelect( 'jd_dynamic_analytics','post_ID'); ?>><?php _e("Post ID","wp-to-twitter"); ?></option>
|
638 |
+
<option value="post_title"<?php echo jd_checkSelect( 'jd_dynamic_analytics','post_title'); ?>><?php _e("Post Title","wp-to-twitter"); ?></option>
|
639 |
+
<option value="post_author"<?php echo jd_checkSelect( 'jd_dynamic_analytics','post_author'); ?>><?php _e("Author","wp-to-twitter"); ?></option>
|
640 |
+
</select><br />
|
641 |
+
</p>
|
642 |
+
<p>
|
643 |
+
<input type="radio" name="twitter-analytics" id="no-analytics" value="3" <?php echo jd_checkCheckbox('no-analytics'); ?> /> <label for="no-analytics"><?php _e("No Analytics", 'wp-to-twitter'); ?></label>
|
644 |
+
</p>
|
645 |
+
</fieldset>
|
646 |
+
<fieldset id="indauthors">
|
647 |
+
<legend><?php _e('Author Settings','wp-to-twitter'); ?></legend>
|
648 |
+
<p>
|
649 |
+
<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')?> />
|
650 |
+
<label for="jd_individual_twitter_users"><?php _e("Authors have individual Twitter accounts", 'wp-to-twitter'); ?></label>
|
651 |
+
</p>
|
652 |
+
<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'); ?>
|
653 |
+
</p>
|
654 |
+
</fieldset>
|
655 |
+
<fieldset>
|
656 |
+
<legend><?php _e('Permissions','wp-to-twitter'); ?></legend>
|
657 |
+
<?php
|
658 |
+
global $wp_roles;
|
659 |
+
$roles = $wp_roles->get_names();
|
660 |
+
$roles = array_map( 'translate_user_role', $roles );
|
661 |
+
$options = $permissions = $switcher = $can_tweet = '';
|
662 |
+
foreach ( $roles as $role=>$rolename ) {
|
663 |
+
$permissions .= ($role !='subscriber')?"<option value='$role'".wtt_option_selected(get_option('wtt_user_permissions'),$role,'option').">$rolename</option>\n":'';
|
664 |
+
$options .= ($role !='subscriber')?"<option value='$role'".wtt_option_selected(get_option('wtt_show_custom_tweet'),$role,'option').">$rolename</option>\n":'';
|
665 |
+
$switcher .= ($role !='subscriber')?"<option value='$role'".wtt_option_selected(get_option('wpt_twitter_switch'),$role,'option').">$rolename</option>\n":'';
|
666 |
+
$can_tweet .= ($role !='subscriber')?"<option value='$role'".wtt_option_selected(get_option('wpt_can_tweet'),$role,'option').">$rolename</option>\n":'';
|
667 |
+
}
|
668 |
+
?>
|
669 |
+
<p>
|
670 |
+
<select id="wtt_user_permissions" name="wtt_user_permissions">
|
671 |
+
<?php echo $permissions; ?>
|
672 |
+
</select> <label for="wtt_user_permissions"><?php _e('The lowest user group that can add their Twitter information','wp-to-twitter'); ?></label>
|
673 |
+
</p>
|
674 |
+
<p>
|
675 |
+
<select id="wtt_show_custom_tweet" name="wtt_show_custom_tweet">
|
676 |
+
<?php echo $options; ?>
|
677 |
+
</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>
|
678 |
+
</p>
|
679 |
+
<p>
|
680 |
+
<select id="wpt_twitter_switch" name="wpt_twitter_switch">
|
681 |
+
<?php echo $switcher; ?>
|
682 |
+
</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>
|
683 |
+
</p>
|
684 |
+
<p>
|
685 |
+
<select id="wpt_can_tweet" name="wpt_can_tweet">
|
686 |
+
<?php echo $can_tweet; ?>
|
687 |
+
</select> <label for="wpt_can_tweet"><?php _e('The lowest user group that can send Twitter updates','wp-to-twitter'); ?></label>
|
688 |
+
</p>
|
689 |
+
</fieldset>
|
690 |
+
<fieldset>
|
691 |
+
<legend><?php _e('Error Messages and Debugging','wp-to-twitter'); ?></legend>
|
692 |
+
<ul>
|
693 |
+
<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>
|
694 |
+
<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>
|
695 |
+
<li><input type="checkbox" name="wp_debug_oauth" id="wp_debug_oauth" value="1" <?php echo jd_checkCheckbox('wp_debug_oauth')?> />
|
696 |
+
<label for="wp_debug_oauth"><?php _e("Get Debugging Data for OAuth Connection", 'wp-to-twitter'); ?></label></li>
|
697 |
+
<li><input type="checkbox" name="wpt_http" id="wpt_http" value="1" <?php echo jd_checkCheckbox('wpt_http')?> />
|
698 |
+
<label for="wpt_http"><?php _e("Switch to <code>http</code> connection. (Default is https)", 'wp-to-twitter'); ?></label></li>
|
699 |
+
<li><input type="checkbox" name="jd_donations" id="jd_donations" value="1" <?php echo jd_checkCheckbox('jd_donations')?> />
|
700 |
+
<label for="jd_donations"><strong><?php _e("I made a donation, so stop whinging at me, please.", 'wp-to-twitter'); ?></strong></label></li>
|
701 |
+
</ul>
|
702 |
+
</fieldset>
|
703 |
+
<div>
|
704 |
+
<input type="hidden" name="submit-type" value="advanced" />
|
705 |
+
</div>
|
706 |
+
<input type="submit" name="submit" value="<?php _e("Save Advanced WP->Twitter Options", 'wp-to-twitter'); ?>" class="button-primary" />
|
707 |
+
</div>
|
708 |
+
</form>
|
709 |
+
</div>
|
710 |
+
</div>
|
711 |
+
</div>
|
712 |
+
<div class="ui-sortable meta-box-sortables">
|
713 |
+
<div class="postbox categories">
|
714 |
+
<h3><?php _e('Limit Updating Categories','wp-to-twitter'); ?></h3>
|
715 |
+
<div class="inside">
|
716 |
+
<p>
|
717 |
+
<?php _e('If no categories are checked, limiting by category will be ignored, and all categories will be Tweeted.','wp-to-twitter'); ?>
|
718 |
+
<?php if ( get_option('limit_categories') == '0' ) { _e('<em>Category limits are disabled.</em>','wp-to-twitter'); } ?>
|
719 |
+
</p>
|
720 |
+
<?php jd_list_categories(); ?>
|
721 |
+
|
722 |
+
</div>
|
723 |
+
</div>
|
724 |
+
</div>
|
725 |
+
|
726 |
+
<div class="postbox" id="get-support">
|
727 |
+
<h3><?php _e('Get Plug-in Support','wp-to-twitter'); ?></h3>
|
728 |
+
<div class="inside">
|
729 |
+
<?php wpt_get_support_form(); ?>
|
730 |
+
</div>
|
731 |
+
</div>
|
732 |
+
|
733 |
+
<form method="post" action="">
|
734 |
+
<fieldset>
|
735 |
+
<input type="hidden" name="submit-type" value="check-support" />
|
736 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
737 |
+
<p>
|
738 |
+
<input type="submit" name="submit" value="<?php _e('Check Support','wp-to-twitter'); ?>" class="button-primary" /> <?php _e('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.','wp-to-twitter'); ?>
|
739 |
+
</p>
|
740 |
+
</fieldset>
|
741 |
+
</form>
|
742 |
+
</div>
|
743 |
+
</div>
|
744 |
+
<?php wpt_sidebar(); ?>
|
745 |
+
</div>
|
746 |
+
</div>
|
747 |
+
<?php global $wp_version; }
|
748 |
+
|
749 |
+
function wpt_sidebar() {
|
750 |
+
?>
|
751 |
+
<div class="postbox-container" style="width:20%">
|
752 |
+
<div class="metabox-holder">
|
753 |
+
<div class="ui-sortable meta-box-sortables">
|
754 |
+
<div class="postbox">
|
755 |
+
<?php if ( !function_exists( 'wpt_pro_exists' ) ) { ?>
|
756 |
+
<h3><strong><?php _e('Support WP to Twitter','wp-to-twitter'); ?></strong></h3>
|
757 |
+
<?php } else { ?>
|
758 |
+
<h3><strong><?php _e('WP to Twitter Support','wp-to-twitter'); ?></strong></h3>
|
759 |
+
<?php } ?>
|
760 |
+
<div class="inside resources">
|
761 |
+
<p>
|
762 |
+
<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>
|
763 |
+
<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>
|
764 |
+
</p>
|
765 |
+
<?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'); } ?>
|
766 |
+
<a href="<?php echo $support; ?>#get-support"><?php _e("Get Support",'wp-to-twitter'); ?></a>
|
767 |
+
<?php if ( get_option('jd_donations') != 1 && !function_exists( 'wpt_pro_exists' ) ) { ?>
|
768 |
+
<div>
|
769 |
+
<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>
|
770 |
+
<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>
|
771 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
772 |
+
<div>
|
773 |
+
<input type="hidden" name="cmd" value="_s-xclick" />
|
774 |
+
<input type="hidden" name="hosted_button_id" value="8490399" />
|
775 |
+
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="Donate" />
|
776 |
+
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
|
777 |
+
</div>
|
778 |
+
</form>
|
779 |
+
</div>
|
780 |
+
<?php } ?>
|
781 |
+
</div>
|
782 |
+
</div>
|
783 |
+
</div>
|
784 |
+
<?php if ( !function_exists( 'wpt_pro_exists' ) ) { ?>
|
785 |
+
<div class="ui-sortable meta-box-sortables">
|
786 |
+
<div class="postbox">
|
787 |
+
<h3><strong><?php _e('Upgrade Now!','wp-to-twitter'); ?></strong></h3>
|
788 |
+
<div class="inside purchase">
|
789 |
+
<strong><a href="http://www.joedolson.com/articles/wp-tweets-pro/"><?php _e('Upgrade to <strong>WP Tweets PRO</strong> for more options!','wp-to-twitter'); ?></a></strong>
|
790 |
+
<p><?php _e('Extra features with the PRO upgrade:','wp-to-twitter'); ?></p>
|
791 |
+
<ul>
|
792 |
+
<li><?php _e('Allow users to post to their own Twitter accounts','wp-to-twitter'); ?></li>
|
793 |
+
<li><?php _e('Set a timer to send your Tweet minutes or hours after you publish','wp-to-twitter'); ?></li>
|
794 |
+
<li><?php _e('Automatically re-send Tweets after publishing','wp-to-twitter'); ?></li>
|
795 |
+
<li><?php _e('Send Tweets for approved comments','wp-to-twitter'); ?></li>
|
796 |
+
</ul>
|
797 |
+
|
798 |
+
</div>
|
799 |
+
</div>
|
800 |
+
</div>
|
801 |
+
<?php } ?>
|
802 |
+
<div class="ui-sortable meta-box-sortables">
|
803 |
+
<div class="postbox">
|
804 |
+
<h3><?php _e('Shortcodes','wp-to-twitter'); ?></h3>
|
805 |
+
<div class="inside">
|
806 |
+
<p><?php _e("Available in post update templates:", 'wp-to-twitter'); ?></p>
|
807 |
+
<ul>
|
808 |
+
<li><?php _e("<code>#title#</code>: the title of your blog post", 'wp-to-twitter'); ?></li>
|
809 |
+
<li><?php _e("<code>#blog#</code>: the title of your blog", 'wp-to-twitter'); ?></li>
|
810 |
+
<li><?php _e("<code>#post#</code>: a short excerpt of the post content", 'wp-to-twitter'); ?></li>
|
811 |
+
<li><?php _e("<code>#category#</code>: the first selected category for the post", 'wp-to-twitter'); ?></li>
|
812 |
+
<li><?php _e("<code>#cat_desc#</code>: custom value from the category description field",'wp-to-twitter'); ?></li>
|
813 |
+
<li><?php _e("<code>#date#</code>: the post date", 'wp-to-twitter'); ?></li>
|
814 |
+
<li><?php _e("<code>#modified#</code>: the post modified date", 'wp-to-twitter'); ?></li>
|
815 |
+
<li><?php _e("<code>#url#</code>: the post URL", 'wp-to-twitter'); ?></li>
|
816 |
+
<li><?php _e("<code>#author#</code>: the post author (@reference if available, otherwise display name)",'wp-to-twitter'); ?></li>
|
817 |
+
<li><?php _e("<code>#displayname#</code>: post author's display name", 'wp-to-twitter'); ?></li>
|
818 |
+
<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>
|
819 |
+
<li><?php _e("<code>#@#</code>: the twitter @reference for the author or blank, if not set",'wp-to-twitter'); ?></li>
|
820 |
+
<li><?php _e("<code>#tags#</code>: your tags modified into hashtags. See options in the Advanced Settings section, below.",'wp-to-twitter'); ?></li>
|
821 |
+
<?php if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) { ?>
|
822 |
+
<li><?php _e("<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.",'wp-to-twitter'); ?></li>
|
823 |
+
<?php } ?>
|
824 |
+
</ul>
|
825 |
+
<p><?php _e("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>", 'wp-to-twitter'); ?>
|
826 |
+
</div>
|
827 |
+
</div>
|
828 |
+
</div>
|
829 |
+
</div>
|
830 |
+
<?php
|
831 |
+
}
|
wp-to-twitter-oauth.php
ADDED
@@ -0,0 +1,321 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
// function to test credentials
|
5 |
+
function wtt_oauth_test( $auth=false, $context='' ) {
|
6 |
+
if ( !$auth ) {
|
7 |
+
return ( wtt_oauth_credentials_to_hash() == get_option('wtt_oauth_hash') );
|
8 |
+
} else {
|
9 |
+
$return = ( wtt_oauth_credentials_to_hash( $auth ) == wpt_get_user_verification( $auth ) );
|
10 |
+
if ( !$return && $context != 'verify' ) {
|
11 |
+
return ( wtt_oauth_credentials_to_hash() == get_option('wtt_oauth_hash') );
|
12 |
+
} else {
|
13 |
+
return $return;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
function wpt_get_user_verification( $auth ) {
|
19 |
+
if ( get_option( 'jd_individual_twitter_users' ) != '1' ) {
|
20 |
+
return false;
|
21 |
+
} else {
|
22 |
+
$auth = get_user_meta( $auth,'wtt_oauth_hash',true );
|
23 |
+
return $auth;
|
24 |
+
}
|
25 |
+
return false;
|
26 |
+
}
|
27 |
+
|
28 |
+
// function to make connection
|
29 |
+
function wtt_oauth_connection( $auth=false ) {
|
30 |
+
if ( !$auth ) {
|
31 |
+
$ack = get_option('app_consumer_key');
|
32 |
+
$acs = get_option('app_consumer_secret');
|
33 |
+
$ot = get_option('oauth_token');
|
34 |
+
$ots = get_option('oauth_token_secret');
|
35 |
+
} else {
|
36 |
+
$ack = get_user_meta( $auth,'app_consumer_key',true);
|
37 |
+
$acs = get_user_meta( $auth,'app_consumer_secret',true);
|
38 |
+
$ot = get_user_meta( $auth,'oauth_token',true);
|
39 |
+
$ots = get_user_meta( $auth,'oauth_token_secret',true);
|
40 |
+
}
|
41 |
+
if ( !empty( $ack ) && !empty( $acs ) && !empty( $ot ) && !empty( $ots ) ) {
|
42 |
+
require_once( plugin_dir_path(__FILE__).'wpt_twitter_oauth.php' );
|
43 |
+
$connection = new jd_TwitterOAuth( $ack,$acs,$ot,$ots );
|
44 |
+
$connection->useragent = 'WP to Twitter http://www.joedolson.com/articles/wp-to-twitter';
|
45 |
+
return $connection;
|
46 |
+
} else {
|
47 |
+
return false;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
// convert credentials to md5 hash
|
51 |
+
function wtt_oauth_credentials_to_hash( $auth=false ) {
|
52 |
+
if ( !$auth ) {
|
53 |
+
$hash = md5(get_option('app_consumer_key').get_option('app_consumer_secret').get_option('oauth_token').get_option('oauth_token_secret'));
|
54 |
+
} else {
|
55 |
+
$hash = md5( get_user_meta( $auth,'app_consumer_key',true ). get_user_meta( $auth,'app_consumer_secret',true ). get_user_meta( $auth,'oauth_token',true ). get_user_meta( $auth,'oauth_token_secret',true ) );
|
56 |
+
}
|
57 |
+
return $hash;
|
58 |
+
}
|
59 |
+
// response to settings updates
|
60 |
+
function jd_update_oauth_settings( $auth=false, $post=false ) {
|
61 |
+
if ( isset($post['oauth_settings'] ) ) {
|
62 |
+
switch ( $post['oauth_settings'] ) {
|
63 |
+
case 'wtt_oauth_test':
|
64 |
+
if ( !wp_verify_nonce( $post['_wpnonce'], 'wp-to-twitter-nonce' ) && !$auth ) {
|
65 |
+
wp_die('Oops, please try again.');
|
66 |
+
}
|
67 |
+
$auth_test = false;
|
68 |
+
if ( !empty($post['wtt_app_consumer_key'])
|
69 |
+
&& !empty($post['wtt_app_consumer_secret'])
|
70 |
+
&& !empty($post['wtt_oauth_token'])
|
71 |
+
&& !empty($post['wtt_oauth_token_secret'])
|
72 |
+
) {
|
73 |
+
$ack = trim($post['wtt_app_consumer_key']);
|
74 |
+
$acs = trim($post['wtt_app_consumer_secret']);
|
75 |
+
$ot = trim($post['wtt_oauth_token']);
|
76 |
+
$ots =trim($post['wtt_oauth_token_secret']);
|
77 |
+
if ( !$auth ) {
|
78 |
+
update_option('app_consumer_key',$ack);
|
79 |
+
update_option('app_consumer_secret',$acs);
|
80 |
+
update_option('oauth_token',$ot);
|
81 |
+
update_option('oauth_token_secret',$ots);
|
82 |
+
} else {
|
83 |
+
update_user_meta( $auth,'app_consumer_key',$ack);
|
84 |
+
update_user_meta( $auth,'app_consumer_secret',$acs);
|
85 |
+
update_user_meta( $auth,'oauth_token',$ot);
|
86 |
+
update_user_meta( $auth,'oauth_token_secret',$ots);
|
87 |
+
}
|
88 |
+
$message = 'failed';
|
89 |
+
if ( $connection = wtt_oauth_connection( $auth ) ) {
|
90 |
+
$protocol = ( get_option( 'wpt_http' ) == '1' )?'http:':'https:';
|
91 |
+
$data = $connection->get($protocol.'//api.twitter.com/1.1/account/verify_credentials.json');
|
92 |
+
if ( $connection->http_code != '200' ) {
|
93 |
+
$data = json_decode( $data );
|
94 |
+
update_option( 'wpt_error', $data->errors[0]->message );
|
95 |
+
} else {
|
96 |
+
delete_option( 'wpt_error' );
|
97 |
+
}
|
98 |
+
if ($connection->http_code == '200') {
|
99 |
+
$error_information = '';
|
100 |
+
$decode = json_decode($data);
|
101 |
+
if ( !$auth ) {
|
102 |
+
update_option( 'wtt_twitter_username', stripslashes( $decode->screen_name ) );
|
103 |
+
} else {
|
104 |
+
update_user_meta( $auth,'wtt_twitter_username', stripslashes( $decode->screen_name ) );
|
105 |
+
}
|
106 |
+
$oauth_hash = wtt_oauth_credentials_to_hash( $auth );
|
107 |
+
if ( !$auth ) {
|
108 |
+
update_option( 'wtt_oauth_hash', $oauth_hash );
|
109 |
+
} else {
|
110 |
+
update_user_meta( $auth,'wtt_oauth_hash',$oauth_hash );
|
111 |
+
}
|
112 |
+
$message = 'success';
|
113 |
+
delete_option( 'wpt_curl_error' );
|
114 |
+
} else if ( $connection->http_code == 0 ) {
|
115 |
+
$error_information = __("WP to Twitter was unable to establish a connection to Twitter.",'wp-to-twitter');
|
116 |
+
update_option( 'wpt_curl_error',"$error_information" );
|
117 |
+
} else {
|
118 |
+
$error_information = array("http_code"=>$connection->http_code,"status"=>$connection->http_header['status']);
|
119 |
+
$error_code = __("Twitter response: http_code $error_information[http_code] - $error_information[status]",'wp-to-twitter');
|
120 |
+
update_option( 'wpt_curl_error',$error_code );
|
121 |
+
}
|
122 |
+
if ( get_option('wp_debug_oauth') == '1' ) {
|
123 |
+
echo "<pre><strong>Summary Connection Response:</strong><br />";
|
124 |
+
print_r($error_information);
|
125 |
+
echo "<br /><strong>Account Verification Data:</strong><br />";
|
126 |
+
print_r($data);
|
127 |
+
echo "<br /><strong>Full Connection Response:</strong><br />";
|
128 |
+
print_r($connection);
|
129 |
+
echo "</pre>";
|
130 |
+
}
|
131 |
+
}
|
132 |
+
} else {
|
133 |
+
$message = "nodata";
|
134 |
+
}
|
135 |
+
if ( $message == 'failed' && ( time() < strtotime( $connection->http_header['date'] )-300 || time() > strtotime( $connection->http_header['date'] )+300 ) ) {
|
136 |
+
$message = 'nosync';
|
137 |
+
}
|
138 |
+
return $message;
|
139 |
+
break;
|
140 |
+
case 'wtt_twitter_disconnect':
|
141 |
+
if ( !wp_verify_nonce($post['_wpnonce'], 'wp-to-twitter-nonce') && !$auth ) {
|
142 |
+
wp_die('Oops, please try again.');
|
143 |
+
}
|
144 |
+
if ( !$auth ) {
|
145 |
+
update_option( 'app_consumer_key', '' );
|
146 |
+
update_option( 'app_consumer_secret', '' );
|
147 |
+
update_option( 'oauth_token', '' );
|
148 |
+
update_option( 'oauth_token_secret', '' );
|
149 |
+
update_option( 'wtt_twitter_username', '' );
|
150 |
+
} else {
|
151 |
+
delete_user_meta( $auth, 'app_consumer_key' );
|
152 |
+
delete_user_meta( $auth, 'app_consumer_secret' );
|
153 |
+
delete_user_meta( $auth, 'oauth_token' );
|
154 |
+
delete_user_meta( $auth, 'oauth_token_secret' );
|
155 |
+
delete_user_meta( $auth, 'wtt_twitter_username' );
|
156 |
+
}
|
157 |
+
$message = "cleared";
|
158 |
+
return $message;
|
159 |
+
break;
|
160 |
+
}
|
161 |
+
return "Nothing";
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
// connect or disconnect form
|
166 |
+
function wtt_connect_oauth( $auth=false ) {
|
167 |
+
if ( !$auth ) {
|
168 |
+
echo '<div class="ui-sortable meta-box-sortables">';
|
169 |
+
echo '<div class="postbox">';
|
170 |
+
}
|
171 |
+
$server_time = date( DATE_COOKIE );
|
172 |
+
$protocol = ( get_option( 'wpt_http' ) == '1' )?'http:':'https:';
|
173 |
+
$response = wp_remote_get( "$protocol//api.twitter.com/1.1/" );
|
174 |
+
if ( is_wp_error( $response ) ) {
|
175 |
+
$warning = '';
|
176 |
+
$error = $response->errors;
|
177 |
+
if ( is_array( $error ) ) {
|
178 |
+
$warning = "<ul>";
|
179 |
+
foreach ( $error as $k=>$e ) {
|
180 |
+
foreach ( $e as $v ) {
|
181 |
+
$warning .= "<li>".$v."</li>";
|
182 |
+
}
|
183 |
+
}
|
184 |
+
$warning .= "</ul>";
|
185 |
+
}
|
186 |
+
$ssl = __("Connection Problems? Try <a href='#wpt_http'>switching to <code>http</code> queries</a>.",'wp-to-twitter');
|
187 |
+
$date = __("There was an error querying Twitter's servers",'wp-to-twitter');
|
188 |
+
$errors = "<p>".$ssl."</p>".$warning;
|
189 |
+
} else {
|
190 |
+
$date = date( DATE_COOKIE, strtotime($response['headers']['date']) );
|
191 |
+
$errors = '';
|
192 |
+
}
|
193 |
+
$class = ( $auth )?'wpt-profile':'wpt-settings';
|
194 |
+
$form = ( !$auth )?'<form action="" method="post">':'';
|
195 |
+
$nonce = ( !$auth )?wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false).'</form>':'';
|
196 |
+
|
197 |
+
if ( !wtt_oauth_test( $auth,'verify' ) ) {
|
198 |
+
|
199 |
+
// show notification to authenticate with OAuth. No longer global; settings only.
|
200 |
+
if ( !wpt_check_oauth() ) {
|
201 |
+
$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');
|
202 |
+
$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 );
|
203 |
+
echo "<div class='error'><p>$message</p></div>";
|
204 |
+
}
|
205 |
+
|
206 |
+
$ack = ( !$auth )?esc_attr( get_option('app_consumer_key') ):esc_attr( get_user_meta( $auth,'app_consumer_key', true ) );
|
207 |
+
$acs = ( !$auth )?esc_attr( get_option('app_consumer_secret') ):esc_attr( get_user_meta( $auth,'app_consumer_secret', true ) );
|
208 |
+
$ot = ( !$auth )?esc_attr( get_option('oauth_token') ):esc_attr( get_user_meta( $auth,'oauth_token', true ) );
|
209 |
+
$ots = ( !$auth )?esc_attr( get_option('oauth_token_secret') ):esc_attr( get_user_meta( $auth,'oauth_token_secret', true ) );
|
210 |
+
|
211 |
+
$submit = ( !$auth )?'<p class="submit"><input type="submit" name="submit" class="button-primary" value="'.__('Connect to Twitter', 'wp-to-twitter').'" /></p>':'';
|
212 |
+
print('
|
213 |
+
<h3>'.__('Connect to Twitter','wp-to-twitter').'</h3>
|
214 |
+
<div class="inside '.$class.'">
|
215 |
+
<div class="notes">
|
216 |
+
<h4>'.__('WP to Twitter Set-up','wp-to-twitter').'</h4>
|
217 |
+
<p>'.__('Your server time:','wp-to-twitter').' <code>'.$server_time.'</code> '.__("Twitter's time:").' <code>'.$date.'</code>. '.__( 'If these timestamps are not within 5 minutes of each other, your server will not connect to Twitter.','wp-to-twitter').'</p>
|
218 |
+
'.$errors.'
|
219 |
+
<p>'.__('Your server timezone (should be UTC,GMT,Europe/London or equivalent):','wp-to-twitter').' '.date_default_timezone_get().'</p>
|
220 |
+
</div>
|
221 |
+
'.$form.'
|
222 |
+
<fieldset class="options">
|
223 |
+
<h4>'.__('1. Register this site as an application on ', 'wp-to-twitter') . '<a href="http://dev.twitter.com/apps/new" target="_blank">'.__('Twitter\'s application registration page','wp-to-twitter').'</a></h4>
|
224 |
+
<ul>
|
225 |
+
<li>'.__('If you\'re not currently logged in to Twitter, log-in to the account you want associated with this site' , 'wp-to-twitter').'</li>
|
226 |
+
<li>'.__('Your application name cannot include the word "Twitter."' , 'wp-to-twitter').'</li>
|
227 |
+
<li>'.__('Your Application Description can be anything.','wp-to-twitter').'</li>
|
228 |
+
<li>'.__('The WebSite and Callback URL should be ' , 'wp-to-twitter').'<strong>'. get_bloginfo( 'url' ) .'</strong></li>
|
229 |
+
</ul>
|
230 |
+
<p><em>'.__('Agree to the Developer Rules of the Road and continue.','wp-to-twitter').'</em></p>
|
231 |
+
<h4>'.__('2. Switch to the "Settings" tab in Twitter apps','wp-to-twitter').'. '.__('<em>Do NOT create your access token yet.</em>','wp-to-twitter').'</h4>
|
232 |
+
<ul>
|
233 |
+
<li>'.__('Select "Read and Write" for the Application Type' , 'wp-to-twitter').'</li>
|
234 |
+
<li>'.__('Update the application settings' , 'wp-to-twitter').'</li>
|
235 |
+
<li>'.__('Return to the Details tab and create your access token.','wp-to-twitter').'</li>
|
236 |
+
</ul>
|
237 |
+
<p><em>'.__('Once you have registered your site as an application, you will be provided with four keys.' , 'wp-to-twitter').'</em></p>
|
238 |
+
<h4>'.__('3. Copy and paste your consumer key and consumer secret into the fields below' , 'wp-to-twitter').'</h4>
|
239 |
+
<div class="tokens">
|
240 |
+
<p>
|
241 |
+
<label for="wtt_app_consumer_key">'.__('Twitter Consumer Key', 'wp-to-twitter').'</label>
|
242 |
+
<input type="text" size="45" name="wtt_app_consumer_key" id="wtt_app_consumer_key" value="'.$ack.'" />
|
243 |
+
</p>
|
244 |
+
<p>
|
245 |
+
<label for="wtt_app_consumer_secret">'.__('Twitter Consumer Secret', 'wp-to-twitter').'</label>
|
246 |
+
<input type="text" size="45" name="wtt_app_consumer_secret" id="wtt_app_consumer_secret" value="'.$acs.'" />
|
247 |
+
</p>
|
248 |
+
</div>
|
249 |
+
<h4>'.__('4. Copy and paste your Access Token and Access Token Secret into the fields below','wp-to-twitter').'</h4>
|
250 |
+
<p>'.__('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.','wp-to-twitter').'</p>
|
251 |
+
<div class="tokens">
|
252 |
+
<p>
|
253 |
+
<label for="wtt_oauth_token">'.__('Access Token', 'wp-to-twitter').'</label>
|
254 |
+
<input type="text" size="45" name="wtt_oauth_token" id="wtt_oauth_token" value="'.$ot.'" />
|
255 |
+
</p>
|
256 |
+
<p>
|
257 |
+
<label for="wtt_oauth_token_secret">'.__('Access Token Secret', 'wp-to-twitter').'</label>
|
258 |
+
<input type="text" size="45" name="wtt_oauth_token_secret" id="wtt_oauth_token_secret" value="'.$ots.'" />
|
259 |
+
</p>
|
260 |
+
</div>
|
261 |
+
</fieldset>
|
262 |
+
'.$submit.'
|
263 |
+
<input type="hidden" name="oauth_settings" value="wtt_oauth_test" class="hidden" style="display: none;" />
|
264 |
+
'.$nonce.'
|
265 |
+
</div>
|
266 |
+
');
|
267 |
+
} else if ( wtt_oauth_test( $auth ) ) {
|
268 |
+
$ack = ( !$auth )?esc_attr( get_option('app_consumer_key') ):esc_attr( get_user_meta( $auth,'app_consumer_key', true ) );
|
269 |
+
$acs = ( !$auth )?esc_attr( get_option('app_consumer_secret') ):esc_attr( get_user_meta( $auth,'app_consumer_secret', true ) );
|
270 |
+
$ot = ( !$auth )?esc_attr( get_option('oauth_token') ):esc_attr( get_user_meta( $auth,'oauth_token', true ) );
|
271 |
+
$ots = ( !$auth )?esc_attr( get_option('oauth_token_secret') ):esc_attr( get_user_meta( $auth,'oauth_token_secret', true ) );
|
272 |
+
$uname = ( !$auth )?esc_attr( get_option('wtt_twitter_username') ):esc_attr( get_user_meta( $auth,'wtt_twitter_username', true ) );
|
273 |
+
$nonce = ( !$auth )?wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false).'</form>':'';
|
274 |
+
if ( !$auth ) {
|
275 |
+
$submit = '
|
276 |
+
<input type="submit" name="submit" class="button-primary" value="'.__('Disconnect Your WordPress and Twitter Account', 'wp-to-twitter').'" />
|
277 |
+
<input type="hidden" name="oauth_settings" value="wtt_twitter_disconnect" class="hidden" />
|
278 |
+
';
|
279 |
+
} else {
|
280 |
+
$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>';
|
281 |
+
}
|
282 |
+
$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>':'';
|
283 |
+
if ( !is_wp_error( $response ) ) {
|
284 |
+
$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>':'';
|
285 |
+
} else {
|
286 |
+
$diff = __( 'WP to Twitter could not contact Twitter\'s remote server. Here is the error triggered: ','wp-to-twitter' ).$errors;
|
287 |
+
}
|
288 |
+
|
289 |
+
print('
|
290 |
+
<h3>'.__('Disconnect from Twitter','wp-to-twitter').'</h3>
|
291 |
+
<div class="inside '.$class.'">
|
292 |
+
'.$form.'
|
293 |
+
<div id="wtt_authentication_display">
|
294 |
+
<fieldset class="options">
|
295 |
+
<ul>
|
296 |
+
<li><strong class="auth_label">'.__('Twitter Username ', 'wp-to-twitter').'</strong> <code class="auth_code">'.$uname.'</code></li>
|
297 |
+
<li><strong class="auth_label">'.__('Consumer Key ', 'wp-to-twitter').'</strong> <code class="auth_code">'.$ack.'</code></li>
|
298 |
+
<li><strong class="auth_label">'.__('Consumer Secret ', 'wp-to-twitter').'</strong> <code class="auth_code">'.$acs.'</code></li>
|
299 |
+
<li><strong class="auth_label">'.__('Access Token ', 'wp-to-twitter').'</strong> <code class="auth_code">'.$ot.'</code></li>
|
300 |
+
<li><strong class="auth_label">'.__('Access Token Secret ', 'wp-to-twitter').'</strong> <code class="auth_code">'.$ots.'</code></li>
|
301 |
+
</ul>
|
302 |
+
</fieldset>
|
303 |
+
<div>
|
304 |
+
'.$submit.'
|
305 |
+
</div>
|
306 |
+
</div>
|
307 |
+
'.$nonce.'
|
308 |
+
<p>'.__('Your server time:','wp-to-twitter').' <code>'.$server_time.'</code>.<br />'.__('Twitter\'s server time: ','wp-to-twitter').'<code>'.$date.'</code>.</p>
|
309 |
+
'.$errors.$diff.'</div>' );
|
310 |
+
// sent as debugging
|
311 |
+
global $wpt_server_string;
|
312 |
+
$wpt_server_string =
|
313 |
+
__('Your server time:','wp-to-twitter').' <code>'.$server_time.'</code>
|
314 |
+
'.__('Twitter\'s server time: ','wp-to-twitter').'<code>'.$date.'</code>
|
315 |
+
'.$errors.$diff;
|
316 |
+
}
|
317 |
+
if ( !$auth ) {
|
318 |
+
echo "</div>";
|
319 |
+
echo "</div>";
|
320 |
+
}
|
321 |
+
}
|
wp-to-twitter-shorteners.php
ADDED
@@ -0,0 +1,563 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//jd_shorten_link
|
3 |
+
//jd_expand_url
|
4 |
+
//jd_expand_yourl
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
6 |
+
|
7 |
+
if ( !function_exists( 'jd_shorten_link' ) ) { // prep work for future plug-in replacement.
|
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 |
+
if ($testmode == false ) {
|
17 |
+
if ( get_option('use-twitter-analytics') == 1 || get_option('use_dynamic_analytics') == 1 ) {
|
18 |
+
if ( get_option('use_dynamic_analytics') == '1' ) {
|
19 |
+
$campaign_type = get_option('jd_dynamic_analytics');
|
20 |
+
if ( $campaign_type == "post_category" && $testmode != 'link' ) {
|
21 |
+
$category = get_the_category( $post_ID );
|
22 |
+
$campaign = sanitize_title( $category[0]->cat_name );
|
23 |
+
} else if ( $campaign_type == "post_ID") {
|
24 |
+
$campaign = $post_ID;
|
25 |
+
} else if ( $campaign_type == "post_title" && $testmode != 'link' ) {
|
26 |
+
$post = get_post( $post_ID );
|
27 |
+
$campaign = sanitize_title( $post->post_title );
|
28 |
+
} else {
|
29 |
+
if ( $testmode != 'link' ) {
|
30 |
+
$post = get_post( $post_ID );
|
31 |
+
$post_author = $post->post_author;
|
32 |
+
$campaign = get_the_author_meta( 'user_login',$post_author );
|
33 |
+
} else {
|
34 |
+
$post_author = '';
|
35 |
+
$campaign = '';
|
36 |
+
}
|
37 |
+
}
|
38 |
+
} else {
|
39 |
+
$campaign = get_option('twitter-analytics-campaign');
|
40 |
+
}
|
41 |
+
if ( strpos( $url,"%3F" ) === FALSE && strpos( $url,"?" ) === FALSE ) {
|
42 |
+
$ct = "?";
|
43 |
+
} else {
|
44 |
+
$ct = "&";
|
45 |
+
}
|
46 |
+
$ga = "utm_campaign=$campaign&utm_medium=twitter&utm_source=twitter";
|
47 |
+
$url .= $ct .= $ga;
|
48 |
+
}
|
49 |
+
$url = urldecode(trim($url)); // prevent double-encoding
|
50 |
+
$encoded = urlencode($url);
|
51 |
+
} else {
|
52 |
+
$url = urldecode(trim($url)); // prevent double-encoding
|
53 |
+
$encoded = urlencode($url);
|
54 |
+
}
|
55 |
+
|
56 |
+
// custom word setting
|
57 |
+
$keyword_format = ( get_option( 'jd_keyword_format' ) == '1' )?$post_ID:false;
|
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 |
+
case 3:
|
64 |
+
$shrink = $url;
|
65 |
+
break;
|
66 |
+
case 4:
|
67 |
+
if ( function_exists('wp_get_shortlink') ) {
|
68 |
+
// wp_get_shortlink doesn't natively support custom post types; but don't return an error in that case.
|
69 |
+
$shrink = ( $post_ID != false )?wp_get_shortlink( $post_ID, 'post' ):$url;
|
70 |
+
}
|
71 |
+
if ( !$shrink ) { $shrink = $url; }
|
72 |
+
break;
|
73 |
+
case 2: // updated to v3 3/31/2010
|
74 |
+
$bitlyapi = trim ( get_option( 'bitlyapi' ) );
|
75 |
+
$bitlylogin = trim ( strtolower( get_option( 'bitlylogin' ) ) );
|
76 |
+
$decoded = jd_remote_json( "http://api.bitly.com/v3/shorten?longUrl=".$encoded."&login=".$bitlylogin."&apiKey=".$bitlyapi."&format=json" );
|
77 |
+
$error = '';
|
78 |
+
if ($decoded) {
|
79 |
+
if ($decoded['status_code'] != 200) {
|
80 |
+
$shrink = $decoded;
|
81 |
+
$error = $decoded['status_txt'];
|
82 |
+
} else {
|
83 |
+
$shrink = $decoded['data']['url'];
|
84 |
+
}
|
85 |
+
} else {
|
86 |
+
$shrink = false;
|
87 |
+
update_option( 'wp_bitly_error',"JSON result could not be decoded");
|
88 |
+
}
|
89 |
+
if ( !is_valid_url($shrink) ) { $shrink = false; update_option( 'wp_bitly_error',$error ); }
|
90 |
+
break;
|
91 |
+
case 5:
|
92 |
+
// local YOURLS installation
|
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 |
+
$yourlslogin = trim ( get_option( 'yourlslogin') );
|
122 |
+
$yourlsapi = stripcslashes( get_option( 'yourlsapi' ) );
|
123 |
+
$api_url = sprintf( get_option('yourlsurl') . '?username=%s&password=%s&url=%s&format=json&action=shorturl&keyword=%s',
|
124 |
+
$yourlslogin, $yourlsapi, $encoded, $keyword_format );
|
125 |
+
$json = jd_remote_json( $api_url, false );
|
126 |
+
if ($json) {
|
127 |
+
$shrink = $json->shorturl;
|
128 |
+
} else {
|
129 |
+
$shrink = false;
|
130 |
+
}
|
131 |
+
break;
|
132 |
+
case 7:
|
133 |
+
$suprapi = trim ( get_option( 'suprapi' ) );
|
134 |
+
$suprlogin = trim ( get_option( 'suprlogin' ) );
|
135 |
+
if ( $suprapi != '') {
|
136 |
+
$decoded = jd_remote_json( "http://su.pr/api/shorten?longUrl=".$encoded."&login=".$suprlogin."&apiKey=".$suprapi );
|
137 |
+
} else {
|
138 |
+
$decoded = jd_remote_json( "http://su.pr/api/shorten?longUrl=".$encoded );
|
139 |
+
}
|
140 |
+
update_option( 'wp_supr_error',"Su.pr API result: $decoded" );
|
141 |
+
if ($decoded['statusCode'] == 'OK') {
|
142 |
+
$page = str_replace("&","&", urldecode($url));
|
143 |
+
$shrink = $decoded['results'][$page]['shortUrl'];
|
144 |
+
$error = $decoded['errorMessage'];
|
145 |
+
} else {
|
146 |
+
$shrink = false;
|
147 |
+
$error = $decoded['errorMessage'];
|
148 |
+
update_option( 'wp_supr_error',"JSON result could not be decoded");
|
149 |
+
}
|
150 |
+
if ( !is_valid_url($shrink) ) { $shrink = false; update_option( 'wp_supr_error',$error ); }
|
151 |
+
break;
|
152 |
+
case 8:
|
153 |
+
// Goo.gl
|
154 |
+
$target = "https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyBSnqQOg3vX1gwR7y2l-40yEG9SZiaYPUQ";
|
155 |
+
$body = "{'longUrl':'$url'}";
|
156 |
+
//$body = json_encode($data);
|
157 |
+
$json = jd_fetch_url( $target, 'POST', $body, 'Content-Type: application/json' );
|
158 |
+
$decoded = json_decode($json);
|
159 |
+
//$url = $decoded['id'];
|
160 |
+
$shrink = $decoded->id;
|
161 |
+
if ( !is_valid_url($shrink) ) { $shrink = false; }
|
162 |
+
break;
|
163 |
+
case 9:
|
164 |
+
// Twitter Friendly Links
|
165 |
+
$shrink = $url;
|
166 |
+
if ( function_exists( 'twitter_link' ) ) { // use twitter_link if available
|
167 |
+
$shrink = twitter_link( $post_ID );
|
168 |
+
}
|
169 |
+
break;
|
170 |
+
case 10: // jotURL
|
171 |
+
//jotURL, added: 2013-04-10
|
172 |
+
$joturlapi = trim(get_option('joturlapi'));
|
173 |
+
$joturllogin = trim(get_option('joturllogin'));
|
174 |
+
$joturl_longurl_params = trim( get_option('joturl_longurl_params') );
|
175 |
+
if ($joturl_longurl_params != '') {
|
176 |
+
if (strpos($url, "%3F") === FALSE && strpos($url, "?") === FALSE) {
|
177 |
+
$ct = "?";
|
178 |
+
} else {
|
179 |
+
$ct = "&";
|
180 |
+
}
|
181 |
+
$url .= $ct . $joturl_longurl_params;
|
182 |
+
$encoded = urlencode(urldecode(trim($url))); // prevent double-encoding
|
183 |
+
}
|
184 |
+
//\jotURL
|
185 |
+
$decoded = jd_fetch_url("https://api.joturl.com/a/v1/shorten?url=" . $encoded . "&login=" . $joturllogin . "&key=" . $joturlapi . "&format=plain");
|
186 |
+
$error = '';
|
187 |
+
if ($decoded !== false) {
|
188 |
+
$shrink = $decoded;
|
189 |
+
//jotURL, added: 2013-04-10
|
190 |
+
$joturl_shorturl_params = trim( get_option('joturl_shorturl_params') );
|
191 |
+
if ($joturl_shorturl_params != '') {
|
192 |
+
if (strpos($shrink, "%3F") === FALSE && strpos($shrink, "?") === FALSE) {
|
193 |
+
$ct = "?";
|
194 |
+
} else {
|
195 |
+
$ct = "&";
|
196 |
+
}
|
197 |
+
$shrink .= $ct . $joturl_shorturl_params;
|
198 |
+
}
|
199 |
+
//\jotURL
|
200 |
+
} else {
|
201 |
+
$error = $decoded;
|
202 |
+
$shrink = false;
|
203 |
+
update_option('wp_joturl_error', "JSON result could not be decoded");
|
204 |
+
}
|
205 |
+
if (!is_valid_url($shrink)) {
|
206 |
+
$shrink = false;
|
207 |
+
update_option('wp_joturl_error', $error);
|
208 |
+
}
|
209 |
+
break;
|
210 |
+
}
|
211 |
+
if ( !$testmode ) {
|
212 |
+
if ( $shrink === false || ( filter_var($shrink, FILTER_VALIDATE_URL) === false ) ) {
|
213 |
+
update_option( 'wp_url_failure','1' );
|
214 |
+
$shrink = urldecode( $url );
|
215 |
+
} else {
|
216 |
+
update_option( 'wp_url_failure','0' );
|
217 |
+
}
|
218 |
+
}
|
219 |
+
wpt_store_url( $post_ID, $shrink );
|
220 |
+
return $shrink;
|
221 |
+
}
|
222 |
+
|
223 |
+
function wpt_store_url($post_ID, $url) {
|
224 |
+
if ( function_exists('jd_shorten_link') ) {
|
225 |
+
$shortener = get_option( 'jd_shortener' );
|
226 |
+
switch ($shortener) {
|
227 |
+
case 0: case 1: case 4: $ext = '_wp';break;
|
228 |
+
case 2: $ext = '_bitly';break;
|
229 |
+
case 3: $ext = '_url';break;
|
230 |
+
case 5: case 6: $ext = '_yourls';break;
|
231 |
+
case 7: $ext = '_supr'; break;
|
232 |
+
case 8: $ext = '_goo'; break;
|
233 |
+
case 9: $ext = '_tfl'; break;
|
234 |
+
case 10:$ext = '_joturl'; break;
|
235 |
+
default:$ext = '_ind';
|
236 |
+
}
|
237 |
+
if ( get_post_meta ( $post_ID, "_wp_jd$ext", TRUE ) != $url ) {
|
238 |
+
update_post_meta ( $post_ID, "_wp_jd$ext", $url );
|
239 |
+
}
|
240 |
+
switch ( $shortener ) {
|
241 |
+
case 0: case 1: case 2: case 7: case 8: $target = jd_expand_url( $url );break;
|
242 |
+
case 5: case 6: $target = jd_expand_yourl( $url, $shortener );break;
|
243 |
+
case 9: $target = $url;
|
244 |
+
default: $target = $url;
|
245 |
+
}
|
246 |
+
} else {
|
247 |
+
$target = $url;
|
248 |
+
}
|
249 |
+
update_post_meta( $post_ID, '_wp_jd_target', $target );
|
250 |
+
}
|
251 |
+
|
252 |
+
function jd_expand_url( $short_url ) {
|
253 |
+
$short_url = urlencode( $short_url );
|
254 |
+
$decoded = jd_remote_json("http://api.longurl.org/v2/expand?format=json&url=" . $short_url );
|
255 |
+
$url = $decoded['long-url'];
|
256 |
+
return $url;
|
257 |
+
//return $short_url;
|
258 |
+
}
|
259 |
+
function jd_expand_yourl( $short_url, $remote ) {
|
260 |
+
if ( $remote == 6 ) {
|
261 |
+
$short_url = urlencode( $short_url );
|
262 |
+
$yourl_api = get_option( 'yourlsurl' );
|
263 |
+
$user = get_option( 'yourlslogin' );
|
264 |
+
$pass = stripcslashes( get_option( 'yourlsapi' ) );
|
265 |
+
$decoded = jd_remote_json( $yourl_api . "?action=expand&shorturl=$short_url&format=json&username=$user&password=$pass" );
|
266 |
+
$url = $decoded['longurl'];
|
267 |
+
return $url;
|
268 |
+
} else {
|
269 |
+
global $yourls_reserved_URL;
|
270 |
+
define('YOURLS_INSTALLING', true); // Pretend we're installing YOURLS to bypass test for install or upgrade
|
271 |
+
define('YOURLS_FLOOD_DELAY_SECONDS', 0); // Disable flood check
|
272 |
+
if ( file_exists( dirname( get_option( 'yourlspath' ) ).'/load-yourls.php' ) ) { // YOURLS 1.4
|
273 |
+
global $ydb;
|
274 |
+
require_once( dirname( get_option( 'yourlspath' ) ).'/load-yourls.php' );
|
275 |
+
$yourls_result = yourls_api_expand( $short_url );
|
276 |
+
} else { // YOURLS 1.3
|
277 |
+
if ( file_exists( get_option( 'yourlspath' ) ) ) {
|
278 |
+
require_once( get_option( 'yourlspath' ) );
|
279 |
+
$yourls_db = new wpdb( YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_DB_HOST );
|
280 |
+
$yourls_result = yourls_api_expand( $short_url );
|
281 |
+
}
|
282 |
+
}
|
283 |
+
$url = $yourls_result['longurl'];
|
284 |
+
return $url;
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
add_filter( 'wpt_shortener_controls', 'wpt_shortener_controls' );
|
289 |
+
function wpt_shortener_controls() {
|
290 |
+
// for the moment, this just displays the fields. Eventually, a real filter.
|
291 |
+
?>
|
292 |
+
<div class="ui-sortable meta-box-sortables">
|
293 |
+
<div class="postbox">
|
294 |
+
<h3><?php _e('<abbr title="Uniform Resource Locator">URL</abbr> Shortener Account Settings','wp-to-twitter'); ?></h3>
|
295 |
+
<div class="inside">
|
296 |
+
<?php if ( get_option('jd_shortener') == 7 ) { ?>
|
297 |
+
<div class="panel">
|
298 |
+
<h4 class="supr"><span><?php _e("Your Su.pr account details", 'wp-to-twitter'); ?> <?php _e('(optional)','wp-to-twitter'); ?></span></h4>
|
299 |
+
<form method="post" action="">
|
300 |
+
<div><input type='hidden' name='wpt_shortener_update' value='true' /></div>
|
301 |
+
<div>
|
302 |
+
<p>
|
303 |
+
<label for="suprlogin"><?php _e("Your Su.pr Username:", 'wp-to-twitter'); ?></label>
|
304 |
+
<input type="text" name="suprlogin" id="suprlogin" size="40" value="<?php echo ( esc_attr( get_option( 'suprlogin' ) ) ) ?>" />
|
305 |
+
</p>
|
306 |
+
<p>
|
307 |
+
<label for="suprapi"><?php _e("Your Su.pr <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label>
|
308 |
+
<input type="text" name="suprapi" id="suprapi" size="40" value="<?php echo ( esc_attr( get_option( 'suprapi' ) ) ) ?>" />
|
309 |
+
</p>
|
310 |
+
<div>
|
311 |
+
<input type="hidden" name="submit-type" value="suprapi" />
|
312 |
+
</div>
|
313 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
314 |
+
<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" />» <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>
|
315 |
+
</div>
|
316 |
+
</form>
|
317 |
+
</div>
|
318 |
+
<?php } else if ( get_option('jd_shortener') == 2 ) { ?>
|
319 |
+
<div class="panel">
|
320 |
+
<h4 class="bitly"><span><?php _e("Your Bit.ly account details", 'wp-to-twitter'); ?></span></h4>
|
321 |
+
<form method="post" action="">
|
322 |
+
<div><input type='hidden' name='wpt_shortener_update' value='true' /></div>
|
323 |
+
<div>
|
324 |
+
<p>
|
325 |
+
<label for="bitlylogin"><?php _e("Your Bit.ly username:", 'wp-to-twitter'); ?></label>
|
326 |
+
<input type="text" name="bitlylogin" id="bitlylogin" value="<?php echo ( esc_attr( get_option( 'bitlylogin' ) ) ) ?>" />
|
327 |
+
</p>
|
328 |
+
<p>
|
329 |
+
<label for="bitlyapi"><?php _e("Your Bit.ly <abbr title='application programming interface'>API</abbr> Key:", 'wp-to-twitter'); ?></label>
|
330 |
+
<input type="text" name="bitlyapi" id="bitlyapi" size="40" value="<?php echo ( esc_attr( get_option( 'bitlyapi' ) ) ) ?>" />
|
331 |
+
</p>
|
332 |
+
<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>
|
333 |
+
<div>
|
334 |
+
<input type="hidden" name="submit-type" value="bitlyapi" />
|
335 |
+
</div>
|
336 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
337 |
+
<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>
|
338 |
+
</div>
|
339 |
+
</form>
|
340 |
+
</div>
|
341 |
+
<?php } else if ( get_option('jd_shortener') == 5 || get_option('jd_shortener') == 6 ) { ?>
|
342 |
+
<div class="panel">
|
343 |
+
<h4 class="yourls"><span><?php _e("Your YOURLS account details", 'wp-to-twitter'); ?></span></h4>
|
344 |
+
<form method="post" action="">
|
345 |
+
<div><input type='hidden' name='wpt_shortener_update' value='true' /></div>
|
346 |
+
<div>
|
347 |
+
<p>
|
348 |
+
<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' ) ) ); ?>"/>
|
349 |
+
<small><?php _e('Example:','wp-to-twitter'); ?> <code>/home/username/www/www/yourls/includes/config.php</code></small>
|
350 |
+
</p>
|
351 |
+
<p>
|
352 |
+
<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' ) ) ); ?>"/>
|
353 |
+
<small><?php _e('Example:','wp-to-twitter'); ?> <code>http://domain.com/yourls-api.php</code></small>
|
354 |
+
</p>
|
355 |
+
<p>
|
356 |
+
<label for="yourlslogin"><?php _e("Your YOURLS username:", 'wp-to-twitter'); ?></label>
|
357 |
+
<input type="text" name="yourlslogin" id="yourlslogin" size="30" value="<?php echo ( esc_attr( get_option( 'yourlslogin' ) ) ) ?>" />
|
358 |
+
</p>
|
359 |
+
<p>
|
360 |
+
<label for="yourlsapi"><?php _e("Your YOURLS password:", 'wp-to-twitter'); ?> <?php if ( get_option( 'yourlsapi' ) != '') { _e("<em>Saved</em>",'wp-to-twitter'); } ?></label>
|
361 |
+
<input type="password" name="yourlsapi" id="yourlsapi" size="30" value="" />
|
362 |
+
</p>
|
363 |
+
<p>
|
364 |
+
<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 />
|
365 |
+
<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 />
|
366 |
+
<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>
|
367 |
+
</p>
|
368 |
+
<div>
|
369 |
+
<input type="hidden" name="submit-type" value="yourlsapi" />
|
370 |
+
</div>
|
371 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
372 |
+
<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>
|
373 |
+
</div>
|
374 |
+
</form>
|
375 |
+
</div>
|
376 |
+
<?php } else if (get_option('jd_shortener') == 10) { ?>
|
377 |
+
<div class="panel">
|
378 |
+
<h4 class="joturl"><span><?php _e("Your jotURL account details", 'wp-to-twitter'); ?></span></h4>
|
379 |
+
<form method="post" action="">
|
380 |
+
<div><input type='hidden' name='wpt_shortener_update' value='true' /></div>
|
381 |
+
<div>
|
382 |
+
<p><label for="joturllogin"><?php _e("Your jotURL public <abbr title='application programming interface'>API</abbr> key:", 'wp-to-twitter'); ?></label> <input type="text" name="joturllogin" id="joturllogin" value="<?php echo (esc_attr(get_option('joturllogin')))?>" /></p>
|
383 |
+
<p><label for="joturlapi"><?php _e("Your jotURL private <abbr title='application programming interface'>API</abbr> key:", 'wp-to-twitter'); ?></label> <input type="text" name="joturlapi" id="joturlapi" size="40" value="<?php echo (esc_attr(get_option('joturlapi')))?>" /></p>
|
384 |
+
<p><label for="joturl_longurl_params"><?php _e("Parameters to add to the long URL (before shortening):", 'wp-to-twitter'); ?></label> <input type="text" name="joturl_longurl_params" id="joturl_longurl_params" size="40" value="<?php echo (esc_attr(get_option('joturl_longurl_params')))?>" /></p> <p><label for="joturl_shorturl_params"><?php _e("Parameters to add to the short URL (after shortening):", 'wp-to-twitter'); ?></label> <input type="text" name="joturl_shorturl_params" id="joturl_shorturl_params" size="40" value="<?php echo (esc_attr(get_option('joturl_shorturl_params')))?>" /></p>
|
385 |
+
<p><a href="https://www.joturl.com/reserved/api.html"><?php _e('View your jotURL public and private API key', 'wp-to-twitter'); ?></a></p>
|
386 |
+
<div><input type="hidden" name="submit-type" value="joturlapi" /></div>
|
387 |
+
<?php $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false) . wp_referer_field(false); echo "<div>$nonce</div>"; ?>
|
388 |
+
<p><input type="submit" name="submit" value="<?php _e('Save jotURL settings', 'wp-to-twitter'); ?>" class="button-primary" /> <input type="submit" name="clear" value="<?php _e('Clear jotURL settings', 'wp-to-twitter'); ?>" /> <br />
|
389 |
+
<small><?php _e("A jotURL public and private API key is required to shorten URLs via the jotURL API and WP to Twitter.", 'wp-to-twitter'); ?></small></p>
|
390 |
+
</div>
|
391 |
+
</form>
|
392 |
+
</div>
|
393 |
+
<?php } else { ?>
|
394 |
+
<?php _e('Your shortener does not require any account settings.','wp-to-twitter'); ?>
|
395 |
+
<?php } ?>
|
396 |
+
</div>
|
397 |
+
</div>
|
398 |
+
</div>
|
399 |
+
<?php
|
400 |
+
}
|
401 |
+
|
402 |
+
function wpt_shortener_update( $post ) {
|
403 |
+
if ( isset($post['submit-type']) && $post['submit-type'] == 'yourlsapi' ) {
|
404 |
+
if ( $post['yourlsapi'] != '' && isset( $post['submit'] ) ) {
|
405 |
+
update_option( 'yourlsapi', trim($post['yourlsapi']) );
|
406 |
+
$message = __("YOURLS password updated. ", 'wp-to-twitter');
|
407 |
+
} else if ( isset( $post['clear'] ) ) {
|
408 |
+
update_option( 'yourlsapi','' );
|
409 |
+
$message = __( "YOURLS password deleted. You will be unable to use your remote YOURLS account to create short URLS.", 'wp-to-twitter');
|
410 |
+
} else {
|
411 |
+
$message = __( "Failed to save your YOURLS password! ", 'wp-to-twitter' );
|
412 |
+
}
|
413 |
+
if ( $post['yourlslogin'] != '' ) {
|
414 |
+
update_option( 'yourlslogin', trim($post['yourlslogin']) );
|
415 |
+
$message .= __( "YOURLS username added. ",'wp-to-twitter' );
|
416 |
+
}
|
417 |
+
if ( $post['yourlsurl'] != '' ) {
|
418 |
+
update_option( 'yourlsurl', trim($post['yourlsurl']) );
|
419 |
+
$message .= __( "YOURLS API url added. ",'wp-to-twitter' );
|
420 |
+
} else {
|
421 |
+
update_option('yourlsurl','');
|
422 |
+
$message .= __( "YOURLS API url removed. ",'wp-to-twitter' );
|
423 |
+
}
|
424 |
+
if ( $post['yourlspath'] != '' ) {
|
425 |
+
update_option( 'yourlspath', trim($post['yourlspath']) );
|
426 |
+
if ( file_exists( $post['yourlspath'] ) ) {
|
427 |
+
$message .= __( "YOURLS local server path added. ",'wp-to-twitter');
|
428 |
+
} else {
|
429 |
+
$message .= __( "The path to your YOURLS installation is not correct. ",'wp-to-twitter' );
|
430 |
+
}
|
431 |
+
} else {
|
432 |
+
update_option( 'yourlspath','' );
|
433 |
+
$message .= __( "YOURLS local server path removed. ",'wp-to-twitter');
|
434 |
+
}
|
435 |
+
if ( $post['jd_keyword_format'] != '' ) {
|
436 |
+
update_option( 'jd_keyword_format', $post['jd_keyword_format'] );
|
437 |
+
if ( $post['jd_keyword_format'] == 1 ) {
|
438 |
+
$message .= __( "YOURLS will use Post ID for short URL slug.",'wp-to-twitter');
|
439 |
+
} else {
|
440 |
+
$message .= __( "YOURLS will use your custom keyword for short URL slug.",'wp-to-twitter');
|
441 |
+
}
|
442 |
+
} else {
|
443 |
+
update_option( 'jd_keyword_format','' );
|
444 |
+
$message .= __( "YOURLS will not use Post ID for the short URL slug.",'wp-to-twitter');
|
445 |
+
}
|
446 |
+
}
|
447 |
+
|
448 |
+
if ( isset($post['submit-type']) && $post['submit-type'] == 'suprapi' ) {
|
449 |
+
if ( $post['suprapi'] != '' && isset( $post['submit'] ) ) {
|
450 |
+
update_option( 'suprapi', trim($post['suprapi']) );
|
451 |
+
update_option( 'suprlogin', trim($post['suprlogin']) );
|
452 |
+
$message = __("Su.pr API Key and Username Updated", 'wp-to-twitter');
|
453 |
+
} else if ( isset( $post['clear'] ) ) {
|
454 |
+
update_option( 'suprapi','' );
|
455 |
+
update_option( 'suprlogin','' );
|
456 |
+
$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');
|
457 |
+
} else {
|
458 |
+
$message = __("Su.pr API Key not added - <a href='http://su.pr/'>get one here</a>! ", 'wp-to-twitter');
|
459 |
+
}
|
460 |
+
}
|
461 |
+
if ( isset($post['submit-type']) && $post['submit-type'] == 'bitlyapi' ) {
|
462 |
+
if ( $post['bitlyapi'] != '' && isset( $post['submit'] ) ) {
|
463 |
+
update_option( 'bitlyapi', trim($post['bitlyapi']) );
|
464 |
+
$message = __("Bit.ly API Key Updated.", 'wp-to-twitter');
|
465 |
+
} else if ( isset( $post['clear'] ) ) {
|
466 |
+
update_option( 'bitlyapi','' );
|
467 |
+
$message = __("Bit.ly API Key deleted. You cannot use the Bit.ly API without an API key. ", 'wp-to-twitter');
|
468 |
+
} else {
|
469 |
+
$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');
|
470 |
+
}
|
471 |
+
if ( $post['bitlylogin'] != '' && isset( $post['submit'] ) ) {
|
472 |
+
update_option( 'bitlylogin', trim($post['bitlylogin']) );
|
473 |
+
$message .= __(" Bit.ly User Login Updated.", 'wp-to-twitter');
|
474 |
+
} else if ( isset( $post['clear'] ) ) {
|
475 |
+
update_option( 'bitlylogin','' );
|
476 |
+
$message = __("Bit.ly User Login deleted. You cannot use the Bit.ly API without providing your username. ", 'wp-to-twitter');
|
477 |
+
} else {
|
478 |
+
$message = __("Bit.ly Login not added - <a href='http://bit.ly/account/'>get one here</a>! ", 'wp-to-twitter');
|
479 |
+
}
|
480 |
+
}
|
481 |
+
if (isset($post['submit-type']) && $post['submit-type'] == 'joturlapi') {
|
482 |
+
if ($post['joturlapi'] != '' && isset($post['submit'])) {
|
483 |
+
update_option('joturlapi', trim($post['joturlapi']));
|
484 |
+
$message = __("jotURL private API Key Updated. ", 'wp-to-twitter');
|
485 |
+
} else if (isset($post['clear'])) {
|
486 |
+
update_option('joturlapi', '');
|
487 |
+
$message = __("jotURL private API Key deleted. You cannot use the jotURL API without a private API key. ", 'wp-to-twitter');
|
488 |
+
} else {
|
489 |
+
$message = __("jotURL private API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! A private API key is required to use the jotURL URL shortening service. ", 'wp-to-twitter');
|
490 |
+
}
|
491 |
+
if ($post['joturllogin'] != '' && isset($post['submit'])) {
|
492 |
+
update_option('joturllogin', trim($post['joturllogin']));
|
493 |
+
$message .= __("jotURL public API Key Updated. ", 'wp-to-twitter');
|
494 |
+
} else if (isset($post['clear'])) {
|
495 |
+
update_option('joturllogin', '');
|
496 |
+
$message = __("jotURL public API Key deleted. You cannot use the jotURL API without providing your public API Key. ", 'wp-to-twitter');
|
497 |
+
} else {
|
498 |
+
$message = __("jotURL public API Key not added - <a href='https://www.joturl.com/reserved/api.html'>get one here</a>! ", 'wp-to-twitter');
|
499 |
+
}
|
500 |
+
if ($post['joturl_longurl_params'] != '' && isset($post['submit'])) {
|
501 |
+
$v = trim($post['joturl_longurl_params']);
|
502 |
+
if (substr($v, 0, 1) == '&' || substr($v, 0, 1) == '?') { $v = substr($v, 1); }
|
503 |
+
update_option('joturl_longurl_params', $v);
|
504 |
+
$message .= __("Long URL parameters added. ", 'wp-to-twitter');
|
505 |
+
} else if (isset($post['clear'])) {
|
506 |
+
update_option('joturl_longurl_params', '');
|
507 |
+
$message = __("Long URL parameters deleted. ", 'wp-to-twitter');
|
508 |
+
}
|
509 |
+
if ($post['joturl_shorturl_params'] != '' && isset($post['submit'])) {
|
510 |
+
$v = trim($post['joturl_shorturl_params']);
|
511 |
+
if (substr($v, 0, 1) == '&' || substr($v, 0, 1) == '?') {$v = substr($v, 1);}
|
512 |
+
update_option('joturl_shorturl_params', $v);
|
513 |
+
$message .= __("Short URL parameters added. ", 'wp-to-twitter');
|
514 |
+
} else if (isset($post['clear'])) {
|
515 |
+
update_option('joturl_shorturl_params', '');
|
516 |
+
$message = __("Short URL parameters deleted. ", 'wp-to-twitter');
|
517 |
+
}
|
518 |
+
}
|
519 |
+
return $message;
|
520 |
+
}
|
521 |
+
|
522 |
+
function wpt_select_shortener( $post ) {
|
523 |
+
update_option( 'jd_shortener', $post['jd_shortener'] );
|
524 |
+
if ( $post['jd_shortener'] == get_option('jd_shortener') ) return; // no message if no change.
|
525 |
+
if ( get_option( 'jd_shortener' ) == 2 && ( get_option( 'bitlylogin' ) == "" || get_option( 'bitlyapi' ) == "" ) ) {
|
526 |
+
$message .= __( 'You must add your Bit.ly login and API key in order to shorten URLs with Bit.ly.' , 'wp-to-twitter');
|
527 |
+
$message .= "<br />";
|
528 |
+
}
|
529 |
+
if (get_option('jd_shortener') == 10 && (get_option('joturllogin') == "" || get_option('joturlapi') == "")) {
|
530 |
+
$message .= __('You must add your jotURL public and private API key in order to shorten URLs with jotURL.', 'wp-to-twitter');
|
531 |
+
$message .= "<br />";
|
532 |
+
}
|
533 |
+
if ( get_option( 'jd_shortener' ) == 6 && ( get_option( 'yourlslogin' ) == "" || get_option( 'yourlsapi' ) == "" || get_option( 'yourlsurl' ) == "" ) ) {
|
534 |
+
$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');
|
535 |
+
$message .= "<br />";
|
536 |
+
}
|
537 |
+
if ( get_option( 'jd_shortener' ) == 5 && ( get_option( 'yourlspath' ) == "" ) ) {
|
538 |
+
$message .= __( 'You must add your YOURLS server path in order to shorten URLs with a remote installation of YOURLS.' , 'wp-to-twitter');
|
539 |
+
$message .= "<br />";
|
540 |
+
}
|
541 |
+
return $message;
|
542 |
+
}
|
543 |
+
|
544 |
+
add_filter( 'wpt_pick_shortener','wpt_pick_shortener');
|
545 |
+
function wpt_pick_shortener() {
|
546 |
+
?>
|
547 |
+
<p>
|
548 |
+
<label><?php _e("Choose a short URL service (account settings below)",'wp-to-twitter' ); ?></label>
|
549 |
+
<select name="jd_shortener" id="jd_shortener">
|
550 |
+
<option value="3" <?php echo jd_checkSelect('jd_shortener','3'); ?>><?php _e("Don't shorten URLs.", 'wp-to-twitter'); ?></option>
|
551 |
+
<option value="7" <?php echo jd_checkSelect('jd_shortener','7'); ?>>Su.pr</option>
|
552 |
+
<option value="2" <?php echo jd_checkSelect('jd_shortener','2'); ?>>Bit.ly</option>
|
553 |
+
<option value="8" <?php echo jd_checkSelect('jd_shortener','8'); ?>>Goo.gl</option>
|
554 |
+
<option value="5" <?php echo jd_checkSelect('jd_shortener','5'); ?>><?php _e("YOURLS (on this server)", 'wp-to-twitter'); ?></option>
|
555 |
+
<option value="6" <?php echo jd_checkSelect('jd_shortener','6'); ?>><?php _e("YOURLS (on a remote server)", 'wp-to-twitter'); ?></option>
|
556 |
+
<option value="4" <?php echo jd_checkSelect('jd_shortener','4'); ?>>WordPress</option>
|
557 |
+
<option value="10" <?php echo jd_checkSelect('jd_shortener', '10'); ?>>jotURL</option>
|
558 |
+
<?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 } ?>
|
559 |
+
</select>
|
560 |
+
</p>
|
561 |
+
<?php
|
562 |
+
}
|
563 |
+
}
|
wp-to-twitter.jpg
ADDED
Binary file
|
wp-to-twitter.php
ADDED
@@ -0,0 +1,1565 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WP to Twitter
|
4 |
+
Plugin URI: http://www.joedolson.com/articles/wp-to-twitter/
|
5 |
+
Description: Posts a Tweet when you update your WordPress blog or post to your blogroll, using your URL shortening service. Rich in features for customizing and promoting your Tweets.
|
6 |
+
Version: 2.7.3
|
7 |
+
Author: Joseph Dolson
|
8 |
+
Author URI: http://www.joedolson.com/
|
9 |
+
*/
|
10 |
+
/* Copyright 2008-2013 Joseph C Dolson (email : wp-to-twitter@joedolson.com)
|
11 |
+
|
12 |
+
This program is free software; you can redistribute it and/or modify
|
13 |
+
it under the terms of the GNU General Public License as published by
|
14 |
+
the Free Software Foundation; either version 2 of the License, or
|
15 |
+
(at your option) any later version.
|
16 |
+
|
17 |
+
This program is distributed in the hope that it will be useful,
|
18 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
+
GNU General Public License for more details.
|
21 |
+
|
22 |
+
You should have received a copy of the GNU General Public License
|
23 |
+
along with this program; if not, write to the Free Software
|
24 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
+
*/
|
26 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
27 |
+
|
28 |
+
if ('wp-to-twitter.php' == basename($_SERVER['SCRIPT_FILENAME'])) { die ('<h2>Direct File Access Prohibited</h2>');}
|
29 |
+
global $wp_version;
|
30 |
+
$wp_content_url = content_url();
|
31 |
+
$wp_content_dir = str_replace( '/plugins/wp-to-twitter','',plugin_dir_path( __FILE__ ) );
|
32 |
+
if ( defined('WP_CONTENT_URL') ) { $wp_content_url = constant('WP_CONTENT_URL');}
|
33 |
+
if ( defined('WP_CONTENT_DIR') ) { $wp_content_dir = constant('WP_CONTENT_DIR');}
|
34 |
+
|
35 |
+
define( 'WPT_DEBUG',false );
|
36 |
+
define( 'WPT_DEBUG_ADDRESS', 'debug@joedolson.com' );
|
37 |
+
// define( 'WPT_DEBUG_ADDRESS', 'debug@joedolson.com, yourname@youraddress.com' ); // for multiple recipients.
|
38 |
+
|
39 |
+
$wp_plugin_url = plugins_url();
|
40 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // required in order to access is_plugin_active()
|
41 |
+
|
42 |
+
if ( version_compare( phpversion(), '5.0', '<' ) ) {
|
43 |
+
$warning = __('WP to Twitter requires PHP version 5 or above. Please upgrade PHP to run WP to Twitter.','wp-to-twitter' );
|
44 |
+
add_action('admin_notices', create_function( '', "echo \"<div class='error'><p>$warning</p></div>\";" ) );
|
45 |
+
} else {
|
46 |
+
require_once( plugin_dir_path(__FILE__).'/wp-to-twitter-oauth.php' );
|
47 |
+
}
|
48 |
+
|
49 |
+
require_once( plugin_dir_path(__FILE__).'/wp-to-twitter-shorteners.php' );
|
50 |
+
require_once( plugin_dir_path(__FILE__).'/wp-to-twitter-manager.php' );
|
51 |
+
require_once( plugin_dir_path(__FILE__).'/wpt-functions.php' );
|
52 |
+
require_once( plugin_dir_path(__FILE__).'/wpt-feed.php' );
|
53 |
+
require_once( plugin_dir_path(__FILE__).'/wpt-widget.php' );
|
54 |
+
|
55 |
+
global $wpt_version,$jd_plugin_url;
|
56 |
+
$wpt_version = "2.7.3";
|
57 |
+
$plugin_dir = basename(dirname(__FILE__));
|
58 |
+
load_plugin_textdomain( 'wp-to-twitter', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
|
59 |
+
|
60 |
+
function wpt_pro_compatibility() {
|
61 |
+
global $wptp_version;
|
62 |
+
$current_wptp_version = '1.5.5';
|
63 |
+
if ( version_compare( $wptp_version, $current_wptp_version, '<' ) ) {
|
64 |
+
echo "<div class='error notice'><p class='upgrade'>".sprintf( __('The current version of WP Tweets PRO is <strong>%s</strong>. <a href="http://www.joedolson.com/articles/account/">Upgrade for best compatibility!</a>','wp-to-twitter'),$current_wptp_version )."</p></div>";
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
$jd_plugin_url = "http://www.joedolson.com/articles/wp-to-twitter/";
|
69 |
+
$jd_donate_url = "http://www.joedolson.com/articles/wp-tweets-pro/";
|
70 |
+
|
71 |
+
function wpt_marginal_function() {
|
72 |
+
global $wp_version;
|
73 |
+
$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');
|
74 |
+
if ( version_compare( $wp_version,"3.1.4","<" ) ) {
|
75 |
+
if ( is_admin() ) {
|
76 |
+
echo "<div class='error'><p>".($exit_msg)."</p></div>";
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
function wpt_commments_removed() {
|
82 |
+
if ( isset($_GET['dismiss']) ) {
|
83 |
+
update_option( 'wpt_dismissed', 'true' );
|
84 |
+
}
|
85 |
+
if ( get_option( 'comment-published-update' ) == 1 && !function_exists( 'wpt_pro_exists' ) && get_option( 'wpt_dismissed' ) != 'true' ) {
|
86 |
+
$update_notice = sprintf( __('Tweeting of comments has been moved to <a href="%1$s">WP Tweets PRO</a>. You will need to upgrade in order to Tweet comments. <a href="%2$s">Dismiss</a>'), 'http://www.joedolson.com/articles/wp-tweets-pro/', admin_url( "options-general.php?page=wp-to-twitter/wp-to-twitter.php&dismiss=true" ) );
|
87 |
+
if ( is_admin() ) {
|
88 |
+
echo "<div class='updated'><p>".($update_notice)."</p></div>";
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
// check for OAuth configuration
|
94 |
+
function wpt_check_oauth( $auth=false ) {
|
95 |
+
if ( !function_exists('wtt_oauth_test') ) {
|
96 |
+
$oauth = false;
|
97 |
+
} else {
|
98 |
+
$oauth = wtt_oauth_test( $auth );
|
99 |
+
}
|
100 |
+
return $oauth;
|
101 |
+
}
|
102 |
+
|
103 |
+
function wpt_check_version() {
|
104 |
+
global $wpt_version;
|
105 |
+
$prev_version = get_option( 'wp_to_twitter_version' );
|
106 |
+
if ( version_compare( $prev_version,$wpt_version,"<" ) ) {
|
107 |
+
wptotwitter_activate();
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
function wptotwitter_activate() {
|
112 |
+
global $wpt_version;
|
113 |
+
$prev_version = get_option( 'wp_to_twitter_version' );
|
114 |
+
// this is a switch to plan for future versions
|
115 |
+
$upgrade = version_compare( $prev_version,"2.2.9","<" );
|
116 |
+
if ($upgrade) {
|
117 |
+
delete_option( 'x-twitterlogin' );
|
118 |
+
delete_option( 'twitterlogin' );
|
119 |
+
delete_option( 'twitterpw' );
|
120 |
+
delete_option( 'jd-use-link-title' );
|
121 |
+
delete_option( 'jd-use-link-description' );
|
122 |
+
delete_option( 'jd_use_both_services' );
|
123 |
+
delete_option( 'jd-twitter-service-name' );
|
124 |
+
delete_option( 'jd_api_post_status' );
|
125 |
+
delete_option( 'jd-twitter-char-limit' );
|
126 |
+
delete_option( 'x-twitterpw' );
|
127 |
+
delete_option( 'x_jd_api_post_status' );
|
128 |
+
delete_option( 'cligsapi' );
|
129 |
+
delete_option( 'cligslogin' );
|
130 |
+
delete_option( 'wp_cligs_error' );
|
131 |
+
}
|
132 |
+
$upgrade = version_compare( $prev_version, "2.3.1","<" );
|
133 |
+
if ($upgrade) {
|
134 |
+
$array =
|
135 |
+
array(
|
136 |
+
'post'=> array(
|
137 |
+
'post-published-update'=>get_option('newpost-published-update'),
|
138 |
+
'post-published-text'=>get_option('newpost-published-text'),
|
139 |
+
'post-edited-update'=>get_option('oldpost-edited-update'),
|
140 |
+
'post-edited-text'=>get_option('oldpost-edited-text')
|
141 |
+
),
|
142 |
+
'page'=> array(
|
143 |
+
'post-published-update'=>get_option('jd_twit_pages'),
|
144 |
+
'post-published-text'=>get_option('newpage-published-text'),
|
145 |
+
'post-edited-update'=>get_option('jd_twit_edited_pages'),
|
146 |
+
'post-edited-text'=>get_option('oldpage-edited-text')
|
147 |
+
)
|
148 |
+
);
|
149 |
+
add_option( 'wpt_post_types', $array );
|
150 |
+
add_option( 'comment-published-update', 0 );
|
151 |
+
add_option( 'comment-published-text', 'New comment on #title# #url#' );
|
152 |
+
delete_option('newpost-published-update');
|
153 |
+
delete_option('newpost-published-text');
|
154 |
+
delete_option('oldpost-edited-update');
|
155 |
+
delete_option('oldpost-edited-text');
|
156 |
+
delete_option('newpage-published-text');
|
157 |
+
delete_option('oldpage-edited-text');
|
158 |
+
delete_option( 'newpost-published-showlink' );
|
159 |
+
delete_option( 'oldpost-edited-showlink' );
|
160 |
+
delete_option( 'jd_twit_pages' );
|
161 |
+
delete_option( 'jd_twit_edited_pages' );
|
162 |
+
delete_option( 'jd_twit_postie' );
|
163 |
+
}
|
164 |
+
$upgrade = version_compare( $prev_version, "2.3.3","<" );
|
165 |
+
if ( $upgrade ) {
|
166 |
+
delete_option( 'jd_twit_quickpress' );
|
167 |
+
}
|
168 |
+
$upgrade = version_compare( $prev_version, "2.3.4","<" );
|
169 |
+
if ( $upgrade ) {
|
170 |
+
add_option( 'wpt_inline_edits', '0' );
|
171 |
+
}
|
172 |
+
$upgrade = version_compare( $prev_version, "2.3.15","<" );
|
173 |
+
if ( $upgrade ) {
|
174 |
+
$use = get_option( 'use_tags_as_hashtags' );
|
175 |
+
if ( $use == 1 ) {
|
176 |
+
$wpt_settings = get_option( 'wpt_post_types' );
|
177 |
+
$post_types = get_post_types( '', 'names' );
|
178 |
+
foreach ( $post_types as $type ) {
|
179 |
+
if ( isset($wpt_settings[$type]) ) {
|
180 |
+
$t1 = $wpt_settings[$type]['post-published-text'].' #tags#';
|
181 |
+
$t2 = $wpt_settings[$type]['post-edited-text'].' #tags#';
|
182 |
+
$wpt_settings[$type]['post-published-text'] = $t1;
|
183 |
+
$wpt_settings[$type]['post-edited-text'] = $t2;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
update_option('wpt_post_types',$wpt_settings );
|
187 |
+
}
|
188 |
+
delete_option( 'use_tags_as_hashtags' );
|
189 |
+
}
|
190 |
+
$upgrade = version_compare( $prev_version, "2.4.0","<" );
|
191 |
+
if ( $upgrade ) {
|
192 |
+
$perms = get_option('wtt_user_permissions');
|
193 |
+
switch( $perms ) {
|
194 |
+
case 'read':$update = 'subscriber'; break;
|
195 |
+
case 'edit_posts':$update = 'contributor'; break;
|
196 |
+
case 'publish_posts':$update = 'author'; break;
|
197 |
+
case 'moderate_comments':$update = 'editor'; break;
|
198 |
+
case 'manage_options':$update = 'administrator'; break;
|
199 |
+
default:$update = 'administrator';
|
200 |
+
}
|
201 |
+
update_option( 'wtt_user_permissions',$update );
|
202 |
+
}
|
203 |
+
$upgrade = version_compare( $prev_version, "2.4.1","<" );
|
204 |
+
if ( $upgrade ) {
|
205 |
+
$subscriber = get_role('subscriber');
|
206 |
+
$contributor = get_role('contributor');
|
207 |
+
$author = get_role('author');
|
208 |
+
$editor = get_role('editor');
|
209 |
+
$administrator = get_role('administrator');
|
210 |
+
$administrator->add_cap('wpt_twitter_oauth');
|
211 |
+
$administrator->add_cap('wpt_twitter_custom');
|
212 |
+
$administrator->add_cap('wpt_twitter_switch'); // can toggle tweet/don't tweet
|
213 |
+
switch ( get_option('wtt_user_permissions') ) { // users that can add twitter information
|
214 |
+
case 'subscriber': $subscriber->add_cap('wpt_twitter_oauth'); $contributor->add_cap('wpt_twitter_oauth'); $author->add_cap('wpt_twitter_oauth'); $editor->add_cap('wpt_twitter_oauth'); break;
|
215 |
+
case 'contributor': $contributor->add_cap('wpt_twitter_oauth'); $author->add_cap('wpt_twitter_oauth'); $editor->add_cap('wpt_twitter_oauth'); break;
|
216 |
+
case 'author': $author->add_cap('wpt_twitter_oauth'); $editor->add_cap('wpt_twitter_oauth'); break;
|
217 |
+
case 'editor':$editor->add_cap('wpt_twitter_oauth'); break;
|
218 |
+
case 'administrator': break;
|
219 |
+
default:
|
220 |
+
$role = get_role( get_option('wtt_user_permissions') );
|
221 |
+
if ( is_object($role) ) {
|
222 |
+
$role->add_cap('wpt_twitter_oauth');
|
223 |
+
}
|
224 |
+
break;
|
225 |
+
}
|
226 |
+
switch ( get_option('wtt_show_custom_tweet') ) { // users that can compose a custom tweet
|
227 |
+
case 'subscriber': $subscriber->add_cap('wpt_twitter_custom'); $contributor->add_cap('wpt_twitter_custom'); $author->add_cap('wpt_twitter_custom'); $editor->add_cap('wpt_twitter_custom'); break;
|
228 |
+
case 'contributor': $contributor->add_cap('wpt_twitter_custom'); $author->add_cap('wpt_twitter_custom'); $editor->add_cap('wpt_twitter_custom'); break;
|
229 |
+
case 'author': $author->add_cap('wpt_twitter_custom'); $editor->add_cap('wpt_twitter_custom'); break;
|
230 |
+
case 'editor':$editor->add_cap('wpt_twitter_custom'); break;
|
231 |
+
case 'administrator': break;
|
232 |
+
default:
|
233 |
+
$role = get_role( get_option('wtt_show_custom_tweet') );
|
234 |
+
if ( is_object($role) ) {
|
235 |
+
$role->add_cap('wpt_twitter_custom');
|
236 |
+
}
|
237 |
+
break;
|
238 |
+
}
|
239 |
+
}
|
240 |
+
$upgrade = version_compare( $prev_version, "2.4.13","<" );
|
241 |
+
if ( $upgrade ) {
|
242 |
+
$administrator = get_role('administrator');
|
243 |
+
$administrator->add_cap('wpt_can_tweet');
|
244 |
+
$editor = get_role('editor');
|
245 |
+
if ( is_object( $editor ) ) { $editor->add_cap('wpt_can_tweet'); }
|
246 |
+
$author = get_role('author');
|
247 |
+
if ( is_object( $author ) ) { $author->add_cap('wpt_can_tweet'); }
|
248 |
+
$contributor = get_role('contributor');
|
249 |
+
if ( is_object( $contributor ) ) { $contributor->add_cap('wpt_can_tweet'); }
|
250 |
+
update_option('wpt_can_tweet','contributor');
|
251 |
+
}
|
252 |
+
update_option( 'wp_to_twitter_version',$wpt_version );
|
253 |
+
}
|
254 |
+
|
255 |
+
// Function checks for an alternate URL to be Tweeted. Contribution by Bill Berry.
|
256 |
+
function wpt_link( $post_ID ) {
|
257 |
+
$ex_link = false;
|
258 |
+
$wtb_extlink_custom_field = get_option('jd_twit_custom_url');
|
259 |
+
$permalink = get_permalink( $post_ID );
|
260 |
+
if ( $wtb_extlink_custom_field != '' ) {
|
261 |
+
$ex_link = get_post_meta($post_ID, $wtb_extlink_custom_field, true);
|
262 |
+
}
|
263 |
+
return ( $ex_link ) ? $ex_link : $permalink;
|
264 |
+
}
|
265 |
+
|
266 |
+
function wpt_saves_error( $id, $auth, $twit, $error, $http_code, $ts ) {
|
267 |
+
$http_code = (int) $http_code;
|
268 |
+
if ( $http_code != 200 ) {
|
269 |
+
add_post_meta( $id, '_wpt_failed', array( 'author'=>$auth, 'sentence'=>$twit, 'error'=>$error,'code'=>$http_code, 'timestamp'=>$ts ) );
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
// This function performs the API post to Twitter
|
274 |
+
function jd_doTwitterAPIPost( $twit, $auth=false, $id=false, $media=false ) {
|
275 |
+
if ( !wpt_check_oauth( $auth ) ) {
|
276 |
+
wpt_saves_error( $id, $auth, $twit, __('This account is not authorized to post to Twitter.','wp-tweets-pro'), '401', time() );
|
277 |
+
return true;
|
278 |
+
} // exit silently if not authorized
|
279 |
+
$check = ( !$auth )?get_option('jd_last_tweet'):get_user_meta( $auth, 'wpt_last_tweet', true ); // get user's last tweet
|
280 |
+
// prevent duplicate Tweets
|
281 |
+
if ( $check == $twit ) {
|
282 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
283 |
+
wp_mail( WPT_DEBUG_ADDRESS,"Matched twit check: tweet identical: #$id","$twit, $auth, $id" ); // DEBUG
|
284 |
+
}
|
285 |
+
wpt_saves_error( $id, $auth, $twit, __('This tweet is identical to another Tweet recently sent to this account.','wp-tweets-pro'), '403', time() );
|
286 |
+
return true;
|
287 |
+
} else if ( $twit == '' || !$twit ) {
|
288 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
289 |
+
wp_mail( WPT_DEBUG_ADDRESS,"Tweet check: empty sentence: #$id","$twit, $auth, $id" ); // DEBUG
|
290 |
+
}
|
291 |
+
wpt_saves_error( $id, $auth, $twit, __('This tweet was blank and could not be sent to Twitter.','wp-tweets-pro'), '403', time() );
|
292 |
+
return true;
|
293 |
+
} else {
|
294 |
+
$protocol = ( get_option( 'wpt_http' ) == '1' )?'http:':'https:';
|
295 |
+
if ( $media ) {
|
296 |
+
$jdwp_api_post_status = "$protocol//api.twitter.com/1.1/statuses/update_with_media.json";
|
297 |
+
} else {
|
298 |
+
$jdwp_api_post_status = "$protocol//api.twitter.com/1.1/statuses/update.json";
|
299 |
+
}
|
300 |
+
if ( wtt_oauth_test( $auth ) && ( $connection = wtt_oauth_connection( $auth ) ) ) {
|
301 |
+
if ( $media ) {
|
302 |
+
$connection->media( $jdwp_api_post_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true', 'id'=>$id, 'auth'=>$auth ) );
|
303 |
+
} else {
|
304 |
+
$connection->post( $jdwp_api_post_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true' ) );
|
305 |
+
}
|
306 |
+
$http_code = ($connection)?$connection->http_code:'failed';
|
307 |
+
} else if ( wtt_oauth_test( false ) && ( $connection = wtt_oauth_connection( false ) ) ) {
|
308 |
+
if ( $media ) {
|
309 |
+
$connection->media( $jdwp_api_post_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true', 'id'=>$id, 'auth'=>$auth ) );
|
310 |
+
} else {
|
311 |
+
$connection->post( $jdwp_api_post_status, array( 'status' => $twit, 'source' => 'wp-to-twitter', 'include_entities' => 'true' ) );
|
312 |
+
}
|
313 |
+
$http_code = ($connection)?$connection->http_code:'failed';
|
314 |
+
}
|
315 |
+
|
316 |
+
if ( $connection ) {
|
317 |
+
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 = ''; }
|
318 |
+
$return = false;
|
319 |
+
switch ($http_code) {
|
320 |
+
case '200':
|
321 |
+
$return = true;
|
322 |
+
$error = __("200 OK: Success!",'wp-to-twitter');
|
323 |
+
update_option('wpt_authentication_missing', false );
|
324 |
+
break;
|
325 |
+
case '304':
|
326 |
+
$error = __("304 Not Modified: There was no new data to return",'wp-to-twitter');
|
327 |
+
break;
|
328 |
+
case '400':
|
329 |
+
$error = __("400 Bad Request: The request was invalid. This is the status code returned during rate limiting.",'wp-to-twitter');
|
330 |
+
break;
|
331 |
+
case '401':
|
332 |
+
$error = __("401 Unauthorized: Authentication credentials were missing or incorrect.",'wp-to-twitter');
|
333 |
+
update_option( 'wpt_authentication_missing',"$auth");
|
334 |
+
break;
|
335 |
+
case '403':
|
336 |
+
$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');
|
337 |
+
break;
|
338 |
+
case '404':
|
339 |
+
$error = __("404 Not Found: The URI requested is invalid or the resource requested does not exist.",'wp-to-twitter');
|
340 |
+
break;
|
341 |
+
case '406':
|
342 |
+
$error = __("406 Not Acceptable: Invalid Format Specified.",'wp-to-twitter');
|
343 |
+
break;
|
344 |
+
case '422':
|
345 |
+
$error = __("422 Unprocessable Entity: The image uploaded could not be processed..",'wp-to-twitter');
|
346 |
+
break;
|
347 |
+
case '429':
|
348 |
+
$error = __("429 Too Many Requests: You have exceeded your rate limits.",'wp-to-twitter');
|
349 |
+
break;
|
350 |
+
case '500':
|
351 |
+
$error = __("500 Internal Server Error: Something is broken at Twitter.",'wp-to-twitter');
|
352 |
+
break;
|
353 |
+
case '502':
|
354 |
+
$error = __("502 Bad Gateway: Twitter is down or being upgraded.",'wp-to-twitter');
|
355 |
+
break;
|
356 |
+
case '503':
|
357 |
+
$error = __("503 Service Unavailable: The Twitter servers are up, but overloaded with requests - Please try again later.",'wp-to-twitter');
|
358 |
+
break;
|
359 |
+
case '504':
|
360 |
+
$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');
|
361 |
+
break;
|
362 |
+
default:
|
363 |
+
$error = __("<strong>Code $http_code</strong>: Twitter did not return a recognized response code.",'wp-to-twitter');
|
364 |
+
break;
|
365 |
+
}
|
366 |
+
$error .= ($supplement != '')?" $supplement":'';
|
367 |
+
// debugging
|
368 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
369 |
+
wp_mail( WPT_DEBUG_ADDRESS,"Twitter Response Code: #$id","$http_code, $error" ); // DEBUG
|
370 |
+
}
|
371 |
+
// end debugging
|
372 |
+
$update = ( !$auth )?update_option( 'jd_last_tweet',$twit ):update_user_meta( $auth, 'wpt_last_tweet',$twit );
|
373 |
+
wpt_saves_error( $id, $auth, $twit, $error, $http_code, time() );
|
374 |
+
if ( $http_code == '200' ) {
|
375 |
+
$jwt = get_post_meta( $id, '_jd_wp_twitter', true );
|
376 |
+
if ( !is_array( $jwt ) ){ $jwt=array(); }
|
377 |
+
$jwt[] = urldecode( $twit );
|
378 |
+
if ( empty($_POST) ) { $_POST = array(); }
|
379 |
+
$_POST['_jd_wp_twitter'] = $jwt;
|
380 |
+
update_post_meta( $id,'_jd_wp_twitter', $jwt );
|
381 |
+
if ( !function_exists( 'wpt_pro_exists' ) ) {
|
382 |
+
// schedule a one-time promotional box for 4 weeks after first successful Tweet. Experiment...
|
383 |
+
if ( get_option( 'wpt_promotion_scheduled' ) == false ) {
|
384 |
+
wp_schedule_single_event( time()+(60*60*24*7*4), 'wpt_schedule_promotion_action' );
|
385 |
+
update_option( 'wpt_promotion_scheduled', 1 );
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
if ( !$return ) {
|
390 |
+
update_option( 'jd_status_message',$error );
|
391 |
+
} else {
|
392 |
+
delete_option( 'jd_status_message' );
|
393 |
+
}
|
394 |
+
return $return;
|
395 |
+
} else {
|
396 |
+
return false;
|
397 |
+
update_option( 'jd_status_message',__('No Twitter OAuth connection found.','wp-to-twitter') );
|
398 |
+
}
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
function fake_normalize( $string ) {
|
403 |
+
if ( version_compare( PHP_VERSION, '5.0.0', '>=' ) && function_exists('normalizer_normalize') && 1==2 ) {
|
404 |
+
if ( normalizer_is_normalized( $string ) ) { return $string; }
|
405 |
+
return normalizer_normalize( $string );
|
406 |
+
} else {
|
407 |
+
return preg_replace( '~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|mp);~i', '$1', htmlentities( $string, ENT_NOQUOTES, 'UTF-8' ) );
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
function wpt_is_ssl( $url ) {
|
412 |
+
if ( stripos( $url, 'https' ) ) { return true; } else { return false; }
|
413 |
+
}
|
414 |
+
|
415 |
+
function jd_truncate_tweet( $sentence, $postinfo, $post_ID, $retweet=false, $ref=false ) {
|
416 |
+
// media file occupies 22 characters, need to account for in shortening.
|
417 |
+
$tweet_length = ( wpt_post_with_media( $post_ID ) ) ? 117 : 139;
|
418 |
+
$sentence = trim(custom_shortcodes( $sentence, $post_ID ));
|
419 |
+
$post = get_post( $post_ID );
|
420 |
+
|
421 |
+
if ( $postinfo['shortUrl'] != '' ) {
|
422 |
+
$shrink = $postinfo['shortUrl'];
|
423 |
+
} else {
|
424 |
+
$shrink = apply_filters( 'wptt_shorten_link', $postinfo['postLink'], $postinfo['postTitle'], $post_ID, false );
|
425 |
+
}
|
426 |
+
// generate all template variable values
|
427 |
+
$auth = $postinfo['authId'];
|
428 |
+
$title = trim( apply_filters( 'wpt_status', $postinfo['postTitle'], $post_ID, 'title' ) );
|
429 |
+
$blogname = trim($postinfo['blogTitle']);
|
430 |
+
$excerpt = trim( apply_filters( 'wpt_status', $postinfo['postExcerpt'], $post_ID, 'post' ) );
|
431 |
+
$thisposturl = trim($shrink);
|
432 |
+
$category = trim($postinfo['category']);
|
433 |
+
$cat_desc = trim($postinfo['cat_desc']);
|
434 |
+
$user_account = get_user_meta( $auth,'wtt_twitter_username', true ) ;
|
435 |
+
$tags = wpt_generate_hash_tags( $post_ID );
|
436 |
+
$account = get_option('wtt_twitter_username');
|
437 |
+
$date = trim($postinfo['postDate']);
|
438 |
+
$modified = trim($postinfo['postModified']);
|
439 |
+
if ( get_option( 'jd_individual_twitter_users' ) == 1 ) {
|
440 |
+
if ( $user_account == '' ) {
|
441 |
+
if ( get_user_meta( $auth, 'wp-to-twitter-enable-user',true ) == 'mainAtTwitter' ) {
|
442 |
+
$account = stripcslashes(get_user_meta( $auth, 'wp-to-twitter-user-username',true ));
|
443 |
+
} else if ( get_user_meta( $auth, 'wp-to-twitter-enable-user',true ) == 'mainAtTwitterPlus' ) {
|
444 |
+
$account = stripcslashes(get_user_meta( $auth, 'wp-to-twitter-user-username',true ) . ' @' . get_option( 'wtt_twitter_username' ));
|
445 |
+
}
|
446 |
+
} else {
|
447 |
+
$account = "$user_account";
|
448 |
+
}
|
449 |
+
}
|
450 |
+
$display_name = get_the_author_meta( 'display_name',$post->post_author );
|
451 |
+
// value of #author#
|
452 |
+
$author = ( $user_account != '' )?"@$user_account":$display_name;
|
453 |
+
// value of #account#
|
454 |
+
$account = ( $account != '' )?"@$account":'';
|
455 |
+
// value of #@#
|
456 |
+
$uaccount = ( $user_account != '' )?"@$user_account":"$account";
|
457 |
+
// clean up data if extra @ included //
|
458 |
+
$account = str_ireplace( '@@','@',$account );
|
459 |
+
$uaccount = str_ireplace( '@@', '@', $uaccount );
|
460 |
+
$author = str_ireplace( '@@', '@', $author );
|
461 |
+
if ( get_user_meta( $auth, 'wpt-remove', true ) == 'on' ) { $account = ''; }
|
462 |
+
if ( get_option( 'jd_twit_prepend' ) != "" && $sentence != '' ) {
|
463 |
+
$sentence = stripslashes(get_option( 'jd_twit_prepend' )) . " " . $sentence;
|
464 |
+
}
|
465 |
+
if ( get_option( 'jd_twit_append' ) != "" && $sentence != '' ) {
|
466 |
+
$sentence = $sentence . " " . stripslashes(get_option( 'jd_twit_append' ));
|
467 |
+
}
|
468 |
+
$encoding = get_option('blog_charset');
|
469 |
+
if ( $encoding == '' ) { $encoding = 'UTF-8'; }
|
470 |
+
|
471 |
+
if ( strpos( $sentence, '#url#' ) === false
|
472 |
+
&& strpos( $sentence, '#title#' ) === false
|
473 |
+
&& strpos( $sentence, '#blog#' ) === false
|
474 |
+
&& strpos( $sentence, '#post#' ) === false
|
475 |
+
&& strpos( $sentence, '#category#' ) === false
|
476 |
+
&& strpos( $sentence, '#date#' ) === false
|
477 |
+
&& strpos( $sentence, '#author#' ) === false
|
478 |
+
&& strpos( $sentence, '#displayname#' ) === false
|
479 |
+
&& strpos( $sentence, '#tags#' ) === false
|
480 |
+
&& strpos( $sentence, '#modified#' ) === false
|
481 |
+
&& strpos( $sentence, '#reference#' ) === false
|
482 |
+
&& strpos( $sentence, '#account#' ) === false
|
483 |
+
&& strpos( $sentence, '#@#' ) === false
|
484 |
+
&& strpos( $sentence, '#cat_desc' ) === false
|
485 |
+
) {
|
486 |
+
// there are no tags in this Tweet. Truncate and return.
|
487 |
+
$post_sentence = mb_substr( $sentence, 0, $tweet_length, $encoding );
|
488 |
+
return $post_sentence;
|
489 |
+
}
|
490 |
+
|
491 |
+
if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) {
|
492 |
+
$reference = ( $ref ) ? $account : '@' . get_option( 'wtt_twitter_username' );
|
493 |
+
}
|
494 |
+
// create full unconditional post sentence - prior to truncation
|
495 |
+
$post_sentence = str_ireplace( '#account#', $account, $sentence );
|
496 |
+
$post_sentence = str_ireplace( '#@#', $uaccount, $post_sentence );
|
497 |
+
if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) {
|
498 |
+
$post_sentence = str_ireplace( '#reference#', $reference, $post_sentence );
|
499 |
+
} else {
|
500 |
+
$post_sentence = str_ireplace( '#reference#', '', $post_sentence );
|
501 |
+
}
|
502 |
+
$post_sentence = str_ireplace( '#url#', $thisposturl, $post_sentence );
|
503 |
+
$post_sentence = str_ireplace( '#title#', $title, $post_sentence );
|
504 |
+
$post_sentence = str_ireplace( '#blog#',$blogname, $post_sentence );
|
505 |
+
$post_sentence = str_ireplace( '#post#',$excerpt, $post_sentence );
|
506 |
+
$post_sentence = str_ireplace( '#category#',$category, $post_sentence );
|
507 |
+
$post_sentence = str_ireplace( '#cat_desc#',$cat_desc, $post_sentence );
|
508 |
+
$post_sentence = str_ireplace( '#date#', $date, $post_sentence );
|
509 |
+
$post_sentence = str_ireplace( '#author#', $author, $post_sentence );
|
510 |
+
$post_sentence = str_ireplace( '#displayname#', $display_name, $post_sentence );
|
511 |
+
$post_sentence = str_ireplace( '#tags#', $tags, $post_sentence );
|
512 |
+
$post_sentence = str_ireplace( '#modified#', $modified, $post_sentence );
|
513 |
+
|
514 |
+
$url_strlen = mb_strlen( urldecode( fake_normalize( $thisposturl ) ), $encoding );
|
515 |
+
// check total length
|
516 |
+
$str_length = mb_strlen( urldecode( fake_normalize( $post_sentence ) ), $encoding );
|
517 |
+
if ( $str_length < $tweet_length+1 ) {
|
518 |
+
if ( mb_strlen( fake_normalize ( $post_sentence ) ) > $tweet_length+1 ) { $post_sentence = mb_substr( $post_sentence,0,$tweet_length,$encoding ); }
|
519 |
+
return $post_sentence;
|
520 |
+
} else {
|
521 |
+
// what is the excerpt supposed to be?
|
522 |
+
$length = get_option( 'jd_post_excerpt' );
|
523 |
+
// build an array of variable names and the number of characters in that variable.
|
524 |
+
$length_array = array();
|
525 |
+
$length_array['excerpt'] = mb_strlen(fake_normalize($excerpt),$encoding);
|
526 |
+
$length_array['title'] = mb_strlen(fake_normalize($title),$encoding);
|
527 |
+
$length_array['date'] = mb_strlen(fake_normalize($date),$encoding);
|
528 |
+
$length_array['category'] = mb_strlen(fake_normalize($category),$encoding);
|
529 |
+
$length_array['cat_desc'] = mb_strlen(fake_normalize($cat_desc),$encoding);
|
530 |
+
$length_array['@'] = mb_strlen(fake_normalize("$uaccount"),$encoding);
|
531 |
+
$length_array['blogname'] = mb_strlen(fake_normalize($blogname),$encoding);
|
532 |
+
$length_array['author'] = mb_strlen(fake_normalize($author),$encoding);
|
533 |
+
$length_array['account'] = mb_strlen(fake_normalize($account),$encoding);
|
534 |
+
if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) {
|
535 |
+
$length_array['reference'] = mb_strlen(fake_normalize($reference),$encoding);
|
536 |
+
}
|
537 |
+
$length_array['tags'] = mb_strlen(fake_normalize($tags),$encoding);
|
538 |
+
$length_array['modified'] = mb_strlen(fake_normalize($modified),$encoding);
|
539 |
+
// if the total length is too long, truncate items until the length is appropriate.
|
540 |
+
// Twitter's t.co shortener is mandatory. All URLS are max-character value set by Twitter.
|
541 |
+
$tco = ( wpt_is_ssl( $thisposturl ) )?23:22;
|
542 |
+
$order = get_option( 'wpt_truncation_order' );
|
543 |
+
if ( is_array( $order ) ) {
|
544 |
+
asort($order);
|
545 |
+
$preferred = array();
|
546 |
+
foreach ( $order as $k=>$v ) {
|
547 |
+
$preferred[$k] = $length_array[$k];
|
548 |
+
}
|
549 |
+
} else {
|
550 |
+
$preferred = $length_array;
|
551 |
+
}
|
552 |
+
$diff = ( ($url_strlen - $tco) > 0 )?$url_strlen-$tco:0;
|
553 |
+
if ( $str_length > ( $tweet_length+ 1 + $diff ) ) {
|
554 |
+
foreach($preferred AS $key=>$value) {
|
555 |
+
$str_length = mb_strlen( urldecode( fake_normalize( trim( $post_sentence ) ) ),$encoding );
|
556 |
+
if ( $str_length > ( $tweet_length + 1 + $diff ) ) {
|
557 |
+
$trim = $str_length - ( $tweet_length + 1 + $diff );
|
558 |
+
$old_value = ${$key};
|
559 |
+
// prevent URL from being modified
|
560 |
+
$post_sentence = str_ireplace( $thisposturl, '#url#', $post_sentence );
|
561 |
+
// modify the value and replace old with new
|
562 |
+
if ( $key == 'account' || $key == 'author' || $key == 'category' || $key == 'date' || $key == 'modified' || $key == 'reference' || $key == '@' ) {
|
563 |
+
// these elements make no sense if truncated, so remove them entirely.
|
564 |
+
$new_value = '';
|
565 |
+
} else if ( $key == 'tags' ) {
|
566 |
+
// remove any stray hash characters due to string truncation
|
567 |
+
if (mb_strlen($old_value)-$trim <= 2) {
|
568 |
+
$new_value = '';
|
569 |
+
} else {
|
570 |
+
$new_value = $old_value;
|
571 |
+
while ((mb_strlen($old_value)-$trim) < mb_strlen($new_value)) {
|
572 |
+
$new_value = trim(mb_substr($new_value,0,mb_strrpos($new_value,'#',$encoding)-1));
|
573 |
+
}
|
574 |
+
}
|
575 |
+
} else {
|
576 |
+
$new_value = mb_substr( $old_value,0,-( $trim ),$encoding );
|
577 |
+
}
|
578 |
+
$post_sentence = str_ireplace( $old_value,$new_value,$post_sentence );
|
579 |
+
// put URL back before checking length
|
580 |
+
$post_sentence = str_ireplace( '#url#', $thisposturl, $post_sentence );
|
581 |
+
} else {
|
582 |
+
if ( mb_strlen( fake_normalize ( $post_sentence ),$encoding ) > ( $tweet_length + 1 + $diff ) ) { $post_sentence = mb_substr( $post_sentence,0,( $tweet_length + $diff ),$encoding ); }
|
583 |
+
}
|
584 |
+
}
|
585 |
+
}
|
586 |
+
// this is needed in case a tweet needs to be truncated outright and the truncation values aren't in the above.
|
587 |
+
// 1) removes URL 2) checks length of remainder 3) Replaces URL
|
588 |
+
if ( mb_strlen( fake_normalize( $post_sentence ) ) > $tweet_length + 1 ) {
|
589 |
+
$temp_sentence = str_ireplace( $thisposturl, '#url#', $post_sentence );
|
590 |
+
if ( mb_strlen( fake_normalize( $temp_sentence ) ) > ( ( $tweet_length + 1 ) - $tco) && $temp_sentence != $post_sentence ) {
|
591 |
+
$post_sentence = trim(mb_substr( $temp_sentence,0,( ( $tweet_length + 1 ) -$tco),$encoding ));
|
592 |
+
// it's possible to trim off the #url# part in this process. If that happens, put it back.
|
593 |
+
$sub_sentence = (strpos($sentence, '#url#')===false )?$post_sentence:$post_sentence .' '. $thisposturl;
|
594 |
+
$post_sentence = ( strpos($post_sentence,'#url#') === false )?$sub_sentence:str_ireplace( '#url#',$thisposturl,$post_sentence );
|
595 |
+
} else {
|
596 |
+
return $post_sentence; // only longer if URL is included, therefore fine.
|
597 |
+
}
|
598 |
+
return $post_sentence; // has been shortened due to too much text.
|
599 |
+
} else {
|
600 |
+
return $post_sentence; // was never a problem, but got this far anyway.
|
601 |
+
}
|
602 |
+
}
|
603 |
+
return $post_sentence; // catch all, should never happen. But no reason not to include it.
|
604 |
+
}
|
605 |
+
|
606 |
+
function wpt_in_allowed_category( $array ) {
|
607 |
+
$allowed_categories = get_option( 'tweet_categories' );
|
608 |
+
if ( is_array( $array ) && is_array( $allowed_categories ) ) {
|
609 |
+
$common = @array_intersect( $array,$allowed_categories );
|
610 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
611 |
+
wp_mail(WPT_DEBUG_ADDRESS,'Category Limits Results: ---', print_r($common,1) );
|
612 |
+
}
|
613 |
+
if ( count( $common ) >= 1 ) {
|
614 |
+
return true;
|
615 |
+
} else {
|
616 |
+
return false;
|
617 |
+
}
|
618 |
+
} else {
|
619 |
+
return true;
|
620 |
+
}
|
621 |
+
}
|
622 |
+
|
623 |
+
function jd_post_info( $post_ID ) {
|
624 |
+
$encoding = get_option('blog_charset');
|
625 |
+
if ( $encoding == '' ) { $encoding = 'UTF-8'; }
|
626 |
+
$post = get_post( $post_ID );
|
627 |
+
$category_ids = false;
|
628 |
+
$values = array();
|
629 |
+
$values['id'] = $post_ID;
|
630 |
+
// get post author
|
631 |
+
$values['postinfo'] = $post;
|
632 |
+
$values['authId'] = $post->post_author;
|
633 |
+
$postdate = $post->post_date;
|
634 |
+
$altformat = "Y-m-d H:i:s";
|
635 |
+
$dateformat = (get_option('jd_date_format')=='')?get_option('date_format'):get_option('jd_date_format');
|
636 |
+
$thisdate = mysql2date( $dateformat,$postdate );
|
637 |
+
$altdate = mysql2date( $altformat, $postdate );
|
638 |
+
$values['_postDate'] = $altdate;
|
639 |
+
$values['postDate'] = $thisdate;
|
640 |
+
$moddate = $post->post_modified;
|
641 |
+
$values['_postModified'] = mysql2date( $altformat,$moddate );
|
642 |
+
$values['postModified'] = mysql2date( $dateformat,$moddate );
|
643 |
+
// get first category
|
644 |
+
$category = $cat_desc = null;
|
645 |
+
$categories = get_the_category( $post_ID );
|
646 |
+
if ( is_array( $categories ) ) {
|
647 |
+
if ( count($categories) > 0 ) {
|
648 |
+
$category = $categories[0]->cat_name;
|
649 |
+
$cat_desc = $categories[0]->description;
|
650 |
+
}
|
651 |
+
foreach ($categories AS $cat) {
|
652 |
+
$category_ids[] = $cat->term_id;
|
653 |
+
}
|
654 |
+
} else {
|
655 |
+
$category = '';
|
656 |
+
$cat_desc = '';
|
657 |
+
$category_ids = array();
|
658 |
+
}
|
659 |
+
$values['categoryIds'] = $category_ids;
|
660 |
+
$values['category'] = html_entity_decode( $category, ENT_COMPAT, $encoding );
|
661 |
+
$values['cat_desc'] = html_entity_decode( $cat_desc, ENT_COMPAT, $encoding );
|
662 |
+
$excerpt_length = get_option( 'jd_post_excerpt' );
|
663 |
+
$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 );
|
664 |
+
|
665 |
+
$values['postExcerpt'] = html_entity_decode( $post_excerpt, ENT_COMPAT, $encoding );
|
666 |
+
$thisposttitle = stripcslashes( strip_tags( $post->post_title ) );
|
667 |
+
if ($thisposttitle == "") {
|
668 |
+
$thisposttitle = stripcslashes( strip_tags( $_POST['title'] ) );
|
669 |
+
}
|
670 |
+
$values['postTitle'] = html_entity_decode( $thisposttitle, ENT_COMPAT, $encoding );
|
671 |
+
$values['postLink'] = wpt_link( $post_ID );
|
672 |
+
$values['blogTitle'] = get_bloginfo( 'name' );
|
673 |
+
$values['shortUrl'] = wpt_short_url( $post_ID );
|
674 |
+
$values['postStatus'] = $post->post_status;
|
675 |
+
$values['postType'] = $post->post_type;
|
676 |
+
$values = apply_filters( 'wpt_post_info',$values, $post_ID );
|
677 |
+
return $values;
|
678 |
+
}
|
679 |
+
|
680 |
+
function wpt_short_url( $post_id ) {
|
681 |
+
$jd_short = get_post_meta( $post_id, '_wp_jd_clig', true );
|
682 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_supr', true ); }
|
683 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_ind', true ); }
|
684 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_bitly', true );}
|
685 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_wp', true ); }
|
686 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_yourls', true );}
|
687 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_url', true );}
|
688 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_goo', true );}
|
689 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_joturl', true );}
|
690 |
+
if ( $jd_short == "" ) {$jd_short = get_post_meta( $post_id, '_wp_jd_target', true );}
|
691 |
+
return $jd_short;
|
692 |
+
}
|
693 |
+
|
694 |
+
function jd_get_post_meta( $post_ID, $value, $boolean ) {
|
695 |
+
$return = get_post_meta( $post_ID, "_$value", TRUE );
|
696 |
+
if (!$return) {
|
697 |
+
$return = get_post_meta( $post_ID, $value, TRUE );
|
698 |
+
}
|
699 |
+
return $return;
|
700 |
+
}
|
701 |
+
|
702 |
+
function wpt_post_with_media( $post_ID ) {
|
703 |
+
if ( !function_exists( 'wpt_pro_exists' ) || get_option( 'wpt_media') != '1' ) {
|
704 |
+
return false;
|
705 |
+
} else {
|
706 |
+
if ( has_post_thumbnail( $post_ID ) || wpt_post_attachment( $post_ID ) ) {
|
707 |
+
return true;
|
708 |
+
}
|
709 |
+
}
|
710 |
+
return false;
|
711 |
+
}
|
712 |
+
|
713 |
+
function jd_twit( $post_ID, $type='instant' ) {
|
714 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
715 |
+
wp_mail( WPT_DEBUG_ADDRESS, "0: jd_twit running #$post_ID","Post ID: $post_ID / $type" ); // DEBUG
|
716 |
+
}
|
717 |
+
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE || wp_is_post_revision($post_ID) ) { return $post_ID; }
|
718 |
+
wpt_check_version();
|
719 |
+
$jd_tweet_this = get_post_meta( $post_ID, '_jd_tweet_this', true );
|
720 |
+
$newpost = $oldpost = $is_inline_edit = false;
|
721 |
+
$sentence = '';
|
722 |
+
if ( get_option('wpt_inline_edits') != 1 ) {
|
723 |
+
if ( isset($_POST['_inline_edit']) || isset( $_REQUEST['bulk_edit'] ) ) { return; }
|
724 |
+
} else {
|
725 |
+
if ( isset($_POST['_inline_edit']) || isset( $_REQUEST['bulk_edit'] ) ) { $is_inline_edit = true; }
|
726 |
+
}
|
727 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
728 |
+
wp_mail( WPT_DEBUG_ADDRESS, "1: JD Tweet This Value: #$post_ID","Tweet this: $jd_tweet_this /". get_option('jd_tweet_default')." / $type" ); // DEBUG
|
729 |
+
}
|
730 |
+
if ( get_option('jd_tweet_default') == 0 ) {
|
731 |
+
$test = ( $jd_tweet_this != 'no')?true:false;
|
732 |
+
} else {
|
733 |
+
$test = ( $jd_tweet_this == 'yes')?true:false;
|
734 |
+
}
|
735 |
+
if ( $test ) { // test switch: depend on default settings.
|
736 |
+
$post_info = jd_post_info( $post_ID );
|
737 |
+
$media = wpt_post_with_media( $post_ID );
|
738 |
+
if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true ) {
|
739 |
+
$auth = ( get_option( 'wpt_cotweet_lock' ) == 'false' || !get_option('wpt_cotweet_lock') )?$post_info['authId']:get_option('wpt_cotweet_lock');
|
740 |
+
} else {
|
741 |
+
$auth = $post_info['authId'];
|
742 |
+
}
|
743 |
+
/* debug data */
|
744 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
745 |
+
wp_mail(WPT_DEBUG_ADDRESS, "2: POST Debug Data #$post_ID","Post_Info: ".print_r($post_info,1)."\n\nPOST: ".print_r($_POST, 1). " / $type" );
|
746 |
+
}
|
747 |
+
if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true && function_exists('wpt_filter_post_info') ) {
|
748 |
+
$filter = wpt_filter_post_info( $post_info );
|
749 |
+
if ( $filter == true ) {
|
750 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
751 |
+
wp_mail( WPT_DEBUG_ADDRESS, "3: Post filtered: #$post_ID",print_r($post_info,1)." / $type" );
|
752 |
+
}
|
753 |
+
return false;
|
754 |
+
}
|
755 |
+
}
|
756 |
+
$post_type = $post_info['postType'];
|
757 |
+
if ( $type == 'future' ) {
|
758 |
+
$new = 1; // if this is a future action, then it should be published regardless of relationship
|
759 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
760 |
+
wp_mail( WPT_DEBUG_ADDRESS, "4: Future post: #$post_ID",print_r($post_info,1)." / $type" );
|
761 |
+
}
|
762 |
+
} else {
|
763 |
+
// if the post modified date and the post date are the same, this is new.
|
764 |
+
// true if first date before or equal to last date
|
765 |
+
$new = wpt_date_compare( $post_info['_postModified'], $post_info['_postDate'] );
|
766 |
+
}
|
767 |
+
// if this post is not previously published but has been backdated:
|
768 |
+
// lit. if post date is edited, but save option is 'publish'
|
769 |
+
if ( $new == 0 && ( isset( $_POST['edit_date'] ) && $_POST['edit_date'] == 1 && !isset( $_POST['save'] ) ) ) { $new = 1; }
|
770 |
+
// can't catch posts that were set to a past date as a draft, then published.
|
771 |
+
$post_type_settings = get_option('wpt_post_types');
|
772 |
+
$post_types = array_keys($post_type_settings);
|
773 |
+
if ( in_array( $post_type, $post_types ) ) {
|
774 |
+
$template = '';
|
775 |
+
$cT = get_post_meta( $post_ID, '_jd_twitter', true );
|
776 |
+
if ( isset( $_POST['_jd_twitter'] ) && $_POST['_jd_twitter'] != '' ) { $cT = $_POST['_jd_twitter']; }
|
777 |
+
$customTweet = ( $cT != '' )?stripcslashes( trim( $cT ) ):'';
|
778 |
+
// if ops is set and equals 'publish', this is being edited. Otherwise, it's a new post.
|
779 |
+
if ( ( $new == 0 && $post_info['postStatus'] != 'future' ) || $is_inline_edit == true ) {
|
780 |
+
// if this is an old post and editing updates are enabled
|
781 |
+
if ( get_option( 'jd_tweet_default_edit' ) == 1 ) {
|
782 |
+
if ( $jd_tweet_this != 'yes' ) return;
|
783 |
+
}
|
784 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
785 |
+
wp_mail( WPT_DEBUG_ADDRESS, "4a: Processed as an Edit #$post_ID","Tweet this post: ".$post_info['postTitle']."\n".print_r($post_info,1)." / $type" ); // DEBUG
|
786 |
+
}
|
787 |
+
if ( $post_type_settings[$post_type]['post-edited-update'] == '1' ) {
|
788 |
+
$nptext = stripcslashes( $post_type_settings[$post_type]['post-edited-text'] );
|
789 |
+
$oldpost = true;
|
790 |
+
}
|
791 |
+
} else {
|
792 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
793 |
+
wp_mail( WPT_DEBUG_ADDRESS, "4b: Processed as a New Post #$post_ID","Tweet this: ".$post_info['postTitle']."\n".print_r($post_info,1)." / $type" ); // DEBUG
|
794 |
+
}
|
795 |
+
if ( $post_type_settings[$post_type]['post-published-update'] == '1' ) {
|
796 |
+
$nptext = stripcslashes( $post_type_settings[$post_type]['post-published-text'] );
|
797 |
+
$newpost = true;
|
798 |
+
}
|
799 |
+
}
|
800 |
+
// }
|
801 |
+
if ( $newpost || $oldpost ) {
|
802 |
+
$template = ( $customTweet != "" ) ? $customTweet : $nptext;
|
803 |
+
$sentence = jd_truncate_tweet( $template, $post_info, $post_ID );
|
804 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
805 |
+
wp_mail( WPT_DEBUG_ADDRESS, "5: Tweet Truncated #$post_ID","Truncated Tweet: $sentence / $type" ); // DEBUG
|
806 |
+
}
|
807 |
+
if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) {
|
808 |
+
$sentence2 = jd_truncate_tweet( $template, $post_info, $post_ID, false, $auth );
|
809 |
+
}
|
810 |
+
}
|
811 |
+
if ( $sentence != '' ) {
|
812 |
+
$post_type_cats = get_object_taxonomies( $post_type );
|
813 |
+
$continue = true;
|
814 |
+
if ( in_array( 'category', $post_type_cats ) ) {
|
815 |
+
// 'category' is assigned to this post type, so apply filters.
|
816 |
+
if ( get_option('jd_twit_cats') == '1' ) {
|
817 |
+
$continue = ( !wpt_in_allowed_category( $post_info['categoryIds'] ) )?true:false;
|
818 |
+
} else {
|
819 |
+
$continue = ( wpt_in_allowed_category( $post_info['categoryIds'] ) )?true:false;
|
820 |
+
}
|
821 |
+
}
|
822 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) && !$continue ) {
|
823 |
+
wp_mail( WPT_DEBUG_ADDRESS, "6: Category limits applied #$post_ID", print_r($post_info['categoryIds'],1)." / $type" );
|
824 |
+
}
|
825 |
+
$continue = ( get_option('limit_categories') == '0' )?true:$continue;
|
826 |
+
if ( $continue ) {
|
827 |
+
// WPT PRO //
|
828 |
+
if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true ) {
|
829 |
+
$wpt_selected_users = $post_info['wpt_authorized_users'];
|
830 |
+
/* set up basic author/main account values */
|
831 |
+
$auth_verified = wtt_oauth_test( $auth,'verify' );
|
832 |
+
if ( empty( $wpt_selected_users ) && get_option( 'jd_individual_twitter_users' ) == 1 ) {
|
833 |
+
$wpt_selected_users = ($auth_verified)? array( $auth ) : array( false );
|
834 |
+
}
|
835 |
+
|
836 |
+
if ( $post_info['wpt_cotweet'] == 1 || get_option( 'jd_individual_twitter_users' ) != 1 ) {
|
837 |
+
$wpt_selected_users[] = false;
|
838 |
+
}
|
839 |
+
|
840 |
+
if ( $post_info['wpt_delay_tweet'] == 0 || $post_info['wpt_delay_tweet'] == '' || $post_info['wpt_no_delay'] == 'on' ) {
|
841 |
+
foreach ( $wpt_selected_users as $acct ) {
|
842 |
+
if ( wtt_oauth_test( $acct, 'verify' ) ) {
|
843 |
+
$tweet = jd_doTwitterAPIPost( $sentence2, $acct, $post_ID, $media );
|
844 |
+
}
|
845 |
+
}
|
846 |
+
} else {
|
847 |
+
foreach ( $wpt_selected_users as $acct ) {
|
848 |
+
if ( $auth != $acct ) {
|
849 |
+
$offset = rand(60,480); // offset by 1-8 minutes for additional users
|
850 |
+
}
|
851 |
+
if ( wtt_oauth_test( $acct,'verify' ) ) {
|
852 |
+
$time = apply_filters( 'wpt_schedule_delay',( (int) $post_info['wpt_delay_tweet'] )*60, $acct );
|
853 |
+
wp_schedule_single_event( time()+$time+$offset, 'wpt_schedule_tweet_action', array( 'id'=>$acct, 'sentence'=>$sentence, 'rt'=>0, 'post_id'=>$post_ID ) );
|
854 |
+
$tweet = true; // if scheduled, return true.
|
855 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
856 |
+
wp_mail( WPT_DEBUG_ADDRESS, "7: JD Tweet Scheduled for Auth ID #$acct #$post_ID",print_r( array( 'id'=>$acct, 'sentence'=>$sentence, 'rt'=>0, 'post_id'=>$post_ID, 'timestamp'=>time()+$time+$offset, 'current_time'=>time(), 'timezone'=>get_option('gmt_offset') ),1)." / $type" ); // DEBUG
|
857 |
+
}
|
858 |
+
}
|
859 |
+
}
|
860 |
+
}
|
861 |
+
/* This cycle handles scheduling the automatic retweets */
|
862 |
+
if ( $post_info['wpt_retweet_after'] != 0 && $post_info['wpt_no_repost'] != 'on' ) {
|
863 |
+
$repeat = $post_info['wpt_retweet_repeat'];
|
864 |
+
$first = true;
|
865 |
+
foreach ( $wpt_selected_users as $acct ) {
|
866 |
+
if ( wtt_oauth_test( $acct,'verify' ) ) {
|
867 |
+
for ( $i=1;$i<=$repeat;$i++ ) {
|
868 |
+
switch( $i ) {
|
869 |
+
case 1:
|
870 |
+
$prepend = ( get_option('wpt_prepend') == 1 )?'':get_option('wpt_prepend_rt');
|
871 |
+
$append = ( get_option('wpt_prepend') != 1 )?'':get_option('wpt_prepend_rt');
|
872 |
+
break;
|
873 |
+
case 2:
|
874 |
+
$prepend = ( get_option('wpt_prepend') == 1 )?'':get_option('wpt_prepend_rt2');
|
875 |
+
$append = ( get_option('wpt_prepend') != 1 )?'':get_option('wpt_prepend_rt2');
|
876 |
+
break;
|
877 |
+
case 3:
|
878 |
+
$prepend = ( get_option('wpt_prepend') == 1 )?'':get_option('wpt_prepend_rt3');
|
879 |
+
$append = ( get_option('wpt_prepend') != 1 )?'':get_option('wpt_prepend_rt3');
|
880 |
+
break;
|
881 |
+
}
|
882 |
+
$retweet = jd_truncate_tweet( trim( $prepend.$template.$append ), $post_info, $post_ID, true, $acct );
|
883 |
+
// add original delay to schedule
|
884 |
+
$delay = ( isset($post_info['wpt_delay_tweet'] ) )?( (int) $post_info['wpt_delay_tweet'] )*60:0;
|
885 |
+
/* Don't delay the first Tweet of the group */
|
886 |
+
$offset = ( $first == true )?0:rand(60,240); // delay each co-tweet by 1-4 minutes
|
887 |
+
$time = apply_filters( 'wpt_schedule_retweet',($post_info['wpt_retweet_after'])*(60*60)*$i, $acct );
|
888 |
+
wp_schedule_single_event( time()+$time+$offset+$delay, 'wpt_schedule_tweet_action', array( 'id'=>$acct, 'sentence'=>$retweet, 'rt'=>$i, 'post_id'=>$post_ID ) );
|
889 |
+
$tweet = true;
|
890 |
+
if ( $i == 4 ) { break; }
|
891 |
+
}
|
892 |
+
}
|
893 |
+
$first = false;
|
894 |
+
}
|
895 |
+
}
|
896 |
+
} else {
|
897 |
+
$tweet = jd_doTwitterAPIPost( $sentence, false, $post_ID, $media );
|
898 |
+
}
|
899 |
+
// END WPT PRO //
|
900 |
+
if ( $tweet == false ) {
|
901 |
+
update_option( 'wp_twitter_failure','1' );
|
902 |
+
}
|
903 |
+
}
|
904 |
+
}
|
905 |
+
} else {
|
906 |
+
return $post_ID;
|
907 |
+
}
|
908 |
+
}
|
909 |
+
return $post_ID;
|
910 |
+
}
|
911 |
+
|
912 |
+
// Add Tweets on links in Blogroll
|
913 |
+
function jd_twit_link( $link_ID ) {
|
914 |
+
wpt_check_version();
|
915 |
+
global $wpt_version;
|
916 |
+
$thislinkprivate = $_POST['link_visible'];
|
917 |
+
if ($thislinkprivate != 'N') {
|
918 |
+
$thislinkname = stripcslashes( $_POST['link_name'] );
|
919 |
+
$thispostlink = $_POST['link_url'] ;
|
920 |
+
$thislinkdescription = stripcslashes( $_POST['link_description'] );
|
921 |
+
$sentence = stripcslashes( get_option( 'newlink-published-text' ) );
|
922 |
+
$sentence = str_ireplace("#title#",$thislinkname,$sentence);
|
923 |
+
$sentence = str_ireplace("#description#",$thislinkdescription,$sentence);
|
924 |
+
|
925 |
+
if (mb_strlen( $sentence ) > 118) {
|
926 |
+
$sentence = mb_substr($sentence,0,114) . '...';
|
927 |
+
}
|
928 |
+
$shrink = apply_filters( 'wptt_shorten_link', $thispostlink, $thislinkname, false, 'link' );
|
929 |
+
if ( stripos($sentence,"#url#") === FALSE ) {
|
930 |
+
$sentence = $sentence . " " . $shrink;
|
931 |
+
} else {
|
932 |
+
$sentence = str_ireplace("#url#",$shrink,$sentence);
|
933 |
+
}
|
934 |
+
if ( $sentence != '' ) {
|
935 |
+
$tweet = jd_doTwitterAPIPost( $sentence, false, $link_ID );
|
936 |
+
if ( $tweet == false ) { update_option('wp_twitter_failure','2'); }
|
937 |
+
}
|
938 |
+
return $link_ID;
|
939 |
+
} else {
|
940 |
+
return;
|
941 |
+
}
|
942 |
+
}
|
943 |
+
|
944 |
+
function wpt_generate_hash_tags( $post_ID ) {
|
945 |
+
$hashtags = '';
|
946 |
+
$term_meta = 1;
|
947 |
+
$max_tags = get_option( 'jd_max_tags' );
|
948 |
+
$max_characters = get_option( 'jd_max_characters' );
|
949 |
+
$max_characters = ( $max_characters == 0 || $max_characters == "" )?100:$max_characters + 1;
|
950 |
+
if ($max_tags == 0 || $max_tags == "") { $max_tags = 100; }
|
951 |
+
$tags = get_the_tags( $post_ID );
|
952 |
+
if ( $tags > 0 ) {
|
953 |
+
$i = 1;
|
954 |
+
foreach ( $tags as $value ) {
|
955 |
+
if ( function_exists( 'wpt_pro_exists' ) ) {
|
956 |
+
$t_id = $value->term_id;
|
957 |
+
$term_meta = get_option( "wpt_taxonomy_$t_id" );
|
958 |
+
}
|
959 |
+
if ( get_option('wpt_tag_source') == 'slug' ) {
|
960 |
+
$tag = $value->slug;
|
961 |
+
} else {
|
962 |
+
$tag = $value->name;
|
963 |
+
}
|
964 |
+
$strip = get_option( 'jd_strip_nonan' );
|
965 |
+
$search = "/[^\p{L}\p{N}\s]/u";
|
966 |
+
$replace = get_option( 'jd_replace_character' );
|
967 |
+
$replace = ( $replace == "[ ]" || $replace == "" )?"":$replace;
|
968 |
+
$tag = str_ireplace( " ",$replace,trim( $tag ) );
|
969 |
+
if ($strip == '1') { $tag = preg_replace( $search, $replace, $tag ); }
|
970 |
+
switch ( $term_meta ) {
|
971 |
+
case 1 : $newtag = "#$tag"; break;
|
972 |
+
case 2 : $newtag = "$$tag"; break;
|
973 |
+
case 3 : $newtag = ''; break;
|
974 |
+
default: $newtag = "#$tag";
|
975 |
+
}
|
976 |
+
if ( mb_strlen( $newtag ) > 2 && (mb_strlen( $newtag ) <= $max_characters) && ($i <= $max_tags) ) {
|
977 |
+
$hashtags .= "$newtag ";
|
978 |
+
$i++;
|
979 |
+
}
|
980 |
+
}
|
981 |
+
}
|
982 |
+
$hashtags = trim( $hashtags );
|
983 |
+
if ( mb_strlen( $hashtags ) <= 1 ) { $hashtags = ""; }
|
984 |
+
return $hashtags;
|
985 |
+
}
|
986 |
+
|
987 |
+
add_action('admin_menu','jd_add_twitter_outer_box');
|
988 |
+
|
989 |
+
function jd_add_twitter_outer_box() {
|
990 |
+
wpt_check_version();
|
991 |
+
// add Twitter panel to post types where it's enabled.
|
992 |
+
$wpt_post_types = get_option('wpt_post_types');
|
993 |
+
if ( function_exists( 'add_meta_box' )) {
|
994 |
+
if ( is_array( $wpt_post_types ) ) {
|
995 |
+
foreach ($wpt_post_types as $key=>$value) {
|
996 |
+
if ( $value['post-published-update'] == 1 || $value['post-edited-update'] == 1 ) {
|
997 |
+
add_meta_box( 'wp2t','WP to Twitter', 'jd_add_twitter_inner_box', $key, 'side' );
|
998 |
+
}
|
999 |
+
}
|
1000 |
+
}
|
1001 |
+
}
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
function jd_add_twitter_inner_box( $post ) {
|
1005 |
+
if ( current_user_can('wpt_can_tweet') ) {
|
1006 |
+
$is_pro = ( function_exists( 'wpt_pro_exists' ) )?'pro':'free';
|
1007 |
+
echo "<div class='wp-to-twitter $is_pro'>";
|
1008 |
+
global $jd_plugin_url, $jd_donate_url;
|
1009 |
+
$tweet_status = '';
|
1010 |
+
$options = get_option('wpt_post_types');
|
1011 |
+
if ( is_object( $post ) ) {
|
1012 |
+
$type = $post->post_type;
|
1013 |
+
$status = $post->post_status;
|
1014 |
+
$post_id = $post->ID;
|
1015 |
+
}
|
1016 |
+
$previous_tweets = get_post_meta ( $post_id, '_jd_wp_twitter', true );
|
1017 |
+
$failed_tweets = get_post_meta( $post_id, '_wpt_failed' );
|
1018 |
+
$tweet = esc_attr( stripcslashes( get_post_meta($post_id, '_jd_twitter', true ) ) );
|
1019 |
+
$tweet = apply_filters( 'wpt_user_text', $tweet, $status );
|
1020 |
+
$jd_template = ( $status == 'publish' )?$options[$type]['post-edited-text']:$options[$type]['post-published-text'];
|
1021 |
+
$jd_tweet_this = get_post_meta( $post_id, '_jd_tweet_this', true );
|
1022 |
+
if ( !$jd_tweet_this ) {
|
1023 |
+
$jd_tweet_this = (get_option( 'jd_tweet_default' ) == '1' )?'no':'yes';
|
1024 |
+
}
|
1025 |
+
if ( $status == 'publish' && $options[$type]['post-edited-update'] != 1 ) {
|
1026 |
+
$tweet_status = sprintf(__('Tweeting %s edits is disabled.','wp-to-twitter'), $type );
|
1027 |
+
}
|
1028 |
+
// set tweet this to no if that is the default
|
1029 |
+
if ( isset( $_GET['action'] ) && $_GET['action'] == 'edit' && get_option( 'jd_tweet_default_edit' ) == '1' ) { $jd_tweet_this = 'no'; }
|
1030 |
+
|
1031 |
+
if ( current_user_can('update_core') && function_exists( 'wpt_pro_exists' ) ) {
|
1032 |
+
wpt_pro_compatibility();
|
1033 |
+
}
|
1034 |
+
if ( $tweet_status != '' ) { ?>
|
1035 |
+
<p class='disabled'><?php echo $tweet_status; ?></p>
|
1036 |
+
<?php }
|
1037 |
+
if ( current_user_can( 'wpt_twitter_custom' ) || current_user_can('update_core') ) { ?>
|
1038 |
+
<p class='jtw'>
|
1039 |
+
<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( $tweet ); ?></textarea>
|
1040 |
+
</p>
|
1041 |
+
<?php
|
1042 |
+
$jd_expanded = $jd_template;
|
1043 |
+
if ( get_option( 'jd_twit_prepend' ) != "" ) {
|
1044 |
+
$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;
|
1045 |
+
}
|
1046 |
+
if ( get_option( 'jd_twit_append' ) != "" ) {
|
1047 |
+
$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>";
|
1048 |
+
}
|
1049 |
+
?>
|
1050 |
+
<p class='template'><?php _e('Your template:','wp-to-twitter'); ?> <code><?php echo stripcslashes( $jd_expanded ); ?></code></p>
|
1051 |
+
<?php
|
1052 |
+
if ( get_option('jd_keyword_format') == 2 ) {
|
1053 |
+
$custom_keyword = get_post_meta( $post_id, '_yourls_keyword', true );
|
1054 |
+
echo "<label for='yourls_keyword'>".__('YOURLS Custom Keyword','wp-to-twitter')."</label> <input type='text' name='_yourls_keyword' id='yourls_keyword' value='$custom_keyword' />";
|
1055 |
+
}
|
1056 |
+
} else { ?>
|
1057 |
+
<input type="hidden" name='_jd_twitter' value='<?php echo esc_attr($tweet); ?>' />
|
1058 |
+
<?php
|
1059 |
+
}
|
1060 |
+
if ( current_user_can( 'wpt_twitter_switch' ) || current_user_can('update_core') ) {
|
1061 |
+
// "no" means 'Don't Tweet' (is checked)
|
1062 |
+
$nochecked = ( $jd_tweet_this == 'no' )?' checked="checked"':'';
|
1063 |
+
$yeschecked = ( $jd_tweet_this == 'yes' )?' checked="checked"':'';
|
1064 |
+
?>
|
1065 |
+
<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>
|
1066 |
+
<?php
|
1067 |
+
} else {
|
1068 |
+
?>
|
1069 |
+
<input type='hidden' name='_jd_tweet_this' value='<?php echo $jd_tweet_this; ?>' />
|
1070 |
+
<?php
|
1071 |
+
}
|
1072 |
+
?>
|
1073 |
+
<div class='wpt-options'>
|
1074 |
+
<ul class='tabs'>
|
1075 |
+
<li><a href='#authors' class="active">Tweet to</a></li>
|
1076 |
+
<li><a href='#custom'>Options</a></li>
|
1077 |
+
<li><a href='#notes'>Notes</a></li>
|
1078 |
+
</ul>
|
1079 |
+
<?php
|
1080 |
+
/* WPT PRO OPTIONS */
|
1081 |
+
if ( current_user_can( 'edit_others_posts' ) ) {
|
1082 |
+
if ( get_option( 'jd_individual_twitter_users' ) == 1 ) {
|
1083 |
+
$selected = ( get_post_meta( $post_id, '_wpt_authorized_users', true ) )?get_post_meta( $post_id, '_wpt_authorized_users', true ):array();
|
1084 |
+
if ( function_exists( 'wpt_authorized_users' ) ) {
|
1085 |
+
echo "<div class='wptab' id='authors'>";
|
1086 |
+
echo wpt_authorized_users( $selected );
|
1087 |
+
do_action( 'wpt_authors_tab', $post_id, $selected );
|
1088 |
+
echo "</div>";
|
1089 |
+
} else {
|
1090 |
+
echo "<div class='wptab' id='authors'><p>";
|
1091 |
+
if ( function_exists( 'wpt_pro_exists' ) ) {
|
1092 |
+
printf( __( 'WP Tweets PRO 1.5.2 allows you to select Twitter accounts. <a href="%s">Log in and download now!</a>', 'wp-to-twitter' ), 'http://www.joedolson.com/articles/account/' );
|
1093 |
+
} else {
|
1094 |
+
printf( __( 'Upgrade to WP Tweets PRO to select Twitter accounts! <a href="%s">Upgrade now!</a>', 'wp-to-twitter' ), 'http://www.joedolson.com/articles/wp-tweets-pro/' );
|
1095 |
+
}
|
1096 |
+
echo "</p></div>";
|
1097 |
+
}
|
1098 |
+
}
|
1099 |
+
}
|
1100 |
+
?>
|
1101 |
+
<div class='wptab' id='custom'><?php
|
1102 |
+
if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true && ( current_user_can( 'wpt_twitter_custom' ) || current_user_can( 'update_core' ) ) ) {
|
1103 |
+
wpt_schedule_values( $post_id );
|
1104 |
+
do_action( 'wpt_custom_tab', $post_id, 'visible' );
|
1105 |
+
} else {
|
1106 |
+
printf( "<p>".__( 'Upgrade to WP Tweets PRO to configure options! <a href="%s">Upgrade now!</a>'."</p>", 'wp-to-twitter' ), 'http://www.joedolson.com/articles/wp-tweets-pro/' );
|
1107 |
+
}
|
1108 |
+
?></div>
|
1109 |
+
<?php
|
1110 |
+
/* WPT PRO */
|
1111 |
+
if ( !current_user_can( 'wpt_twitter_custom' ) && !current_user_can( 'update_core' ) ) { ?>
|
1112 |
+
<div class='wptab' id='custom'>
|
1113 |
+
<p><?php _e('Access to customizing WP to Twitter values is not allowed for your user role.','wp-to-twitter'); ?></p>
|
1114 |
+
<?php
|
1115 |
+
if ( function_exists('wpt_pro_exists') && wpt_pro_exists() == true ) {
|
1116 |
+
wpt_schedule_values( $post_id, 'hidden' );
|
1117 |
+
do_action( 'wpt_custom_tab', $post_id, 'hidden' );
|
1118 |
+
} ?>
|
1119 |
+
</div>
|
1120 |
+
<?php
|
1121 |
+
}
|
1122 |
+
if ( current_user_can( 'wpt_twitter_custom' ) || current_user_can( 'update_core' ) ) { ?>
|
1123 |
+
<div class='wptab' id='notes'>
|
1124 |
+
<p>
|
1125 |
+
<?php _e("Tweets must be less than 140 characters; Twitter counts URLs as 22 or 23 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');
|
1126 |
+
do_action( 'wpt_notes_tab', $post_id );
|
1127 |
+
?>
|
1128 |
+
</p>
|
1129 |
+
</div>
|
1130 |
+
<?php
|
1131 |
+
} ?>
|
1132 |
+
</div>
|
1133 |
+
<p class="wpt-support">
|
1134 |
+
<?php if ( !function_exists( 'wpt_pro_exists' ) ) { ?>
|
1135 |
+
<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> • <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> »
|
1136 |
+
<?php } else { ?>
|
1137 |
+
<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> »
|
1138 |
+
<?php } ?>
|
1139 |
+
</p>
|
1140 |
+
<?php
|
1141 |
+
wpt_show_tweets( $previous_tweets, $failed_tweets );
|
1142 |
+
?>
|
1143 |
+
</div>
|
1144 |
+
<?php
|
1145 |
+
} else { // permissions: this user isn't allowed to Tweet;
|
1146 |
+
_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
|
1147 |
+
}
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
function wpt_show_tweets( $previous_tweets, $failed_tweets ) {
|
1151 |
+
if ( !is_array( $previous_tweets ) && $previous_tweets != '' ) { $previous_tweets = array( 0=>$previous_tweets ); }
|
1152 |
+
if ( ! empty( $previous_tweets ) || ! empty( $failed_tweets ) ) { ?>
|
1153 |
+
<hr>
|
1154 |
+
<p class='error'><em><?php _e('Previous Tweets','wp-to-twitter'); ?>:</em></p>
|
1155 |
+
<ul>
|
1156 |
+
<?php
|
1157 |
+
$hidden_fields = '';
|
1158 |
+
if ( is_array( $previous_tweets ) ) {
|
1159 |
+
foreach ( $previous_tweets as $previous_tweet ) {
|
1160 |
+
if ( $previous_tweet != '' ) {
|
1161 |
+
$hidden_fields .= "<input type='hidden' name='_jd_wp_twitter[]' value='".esc_attr($previous_tweet)."' />";
|
1162 |
+
echo "<li>$previous_tweet <a href='http://twitter.com/intent/tweet?text=".urlencode($previous_tweet)."'>Retweet this</a></li>";
|
1163 |
+
}
|
1164 |
+
}
|
1165 |
+
}
|
1166 |
+
?>
|
1167 |
+
</ul>
|
1168 |
+
<p class='error'><em><?php _e('Failed Tweets','wp-to-twitter'); ?>:</em></p>
|
1169 |
+
<ul>
|
1170 |
+
<?php
|
1171 |
+
$list = false;
|
1172 |
+
if ( is_array( $failed_tweets ) ) {
|
1173 |
+
foreach ( $failed_tweets as $failed_tweet ) {
|
1174 |
+
if ( !empty($failed_tweet) ) {
|
1175 |
+
$ft = $failed_tweet['sentence'];
|
1176 |
+
$reason = $failed_tweet['code'];
|
1177 |
+
$error = $failed_tweet['error'];
|
1178 |
+
$list = true;
|
1179 |
+
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>";
|
1180 |
+
}
|
1181 |
+
}
|
1182 |
+
}
|
1183 |
+
if ( !$list ) { echo "<li>".__('No failed tweets on this post.','wp-to-twitter')."</li>"; }
|
1184 |
+
?>
|
1185 |
+
</ul>
|
1186 |
+
<?php
|
1187 |
+
echo "<div>".$hidden_fields."</div>";
|
1188 |
+
}
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
function wpt_admin_scripts( $hook ) {
|
1192 |
+
global $current_screen;
|
1193 |
+
if ( $current_screen->base == 'post' || $current_screen->id == 'wp-tweets-pro_page_wp-to-twitter-schedule' ) {
|
1194 |
+
wp_enqueue_script( 'charCount', plugins_url( 'wp-to-twitter/js/jquery.charcount.js'), array('jquery') );
|
1195 |
+
}
|
1196 |
+
}
|
1197 |
+
add_action( 'admin_enqueue_scripts', 'wpt_admin_scripts', 10, 1 );
|
1198 |
+
|
1199 |
+
function wpt_admin_script( $hook ) {
|
1200 |
+
global $current_screen;
|
1201 |
+
if ( $current_screen->base == 'post' || $current_screen->id == 'wp-tweets-pro_page_wp-to-twitter-schedule' ) {
|
1202 |
+
wp_register_style( 'wpt-post-styles', plugins_url('post-styles.css',__FILE__) );
|
1203 |
+
wp_enqueue_style('wpt-post-styles');
|
1204 |
+
if ( $current_screen->base == 'post' ) {
|
1205 |
+
$allowed = 140 - mb_strlen( get_option('jd_twit_prepend').get_option('jd_twit_append') );
|
1206 |
+
} else {
|
1207 |
+
$allowed = ( wpt_is_ssl( home_url() ) )?137:138;
|
1208 |
+
}
|
1209 |
+
echo "
|
1210 |
+
<script type='text/javascript'>
|
1211 |
+
jQuery(document).ready(function(\$){
|
1212 |
+
\$('#jtw').charCount( { allowed: $allowed, counterText: '".__('Characters left: ','wp-to-twitter')."' } );
|
1213 |
+
});
|
1214 |
+
jQuery(document).ready(function(\$){
|
1215 |
+
\$('#side-sortables .tabs a[href=\"#authors\"]').addClass('active');
|
1216 |
+
\$('#side-sortables .wptab').not('#authors').hide();
|
1217 |
+
\$('#side-sortables .tabs a').on('click',function(e) {
|
1218 |
+
e.preventDefault();
|
1219 |
+
\$('#side-sortables .tabs a').removeClass('active');
|
1220 |
+
\$(this).addClass('active');
|
1221 |
+
var target = $(this).attr('href');
|
1222 |
+
\$('#side-sortables .wptab').not(target).hide();
|
1223 |
+
\$(target).show();
|
1224 |
+
});
|
1225 |
+
});
|
1226 |
+
</script>
|
1227 |
+
<style type='text/css'>
|
1228 |
+
#wp2t h3 span { padding-left: 30px; background: url(".plugins_url('wp-to-twitter/twitter-bird-light-bgs.png').") left 50% no-repeat; }
|
1229 |
+
</style>";
|
1230 |
+
}
|
1231 |
+
}
|
1232 |
+
add_action( 'admin_head', 'wpt_admin_script' );
|
1233 |
+
|
1234 |
+
// Post the Custom Tweet into the post meta table
|
1235 |
+
function post_jd_twitter( $id ) {
|
1236 |
+
if ( empty($_POST) || ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) || wp_is_post_revision($id) || isset($_POST['_inline_edit']) ) { return $id; }
|
1237 |
+
if ( isset( $_POST['_yourls_keyword'] ) ) {
|
1238 |
+
$yourls = $_POST[ '_yourls_keyword' ];
|
1239 |
+
update_post_meta( $id, '_yourls_keyword', $yourls );
|
1240 |
+
}
|
1241 |
+
if ( isset( $_POST[ '_jd_twitter' ] ) && $_POST['_jd_twitter'] != '' ) {
|
1242 |
+
$jd_twitter = $_POST[ '_jd_twitter' ];
|
1243 |
+
update_post_meta( $id, '_jd_twitter', $jd_twitter );
|
1244 |
+
}
|
1245 |
+
if ( isset( $_POST[ '_jd_wp_twitter' ] ) && $_POST['_jd_wp_twitter'] != '' ) {
|
1246 |
+
$jd_wp_twitter = $_POST[ '_jd_wp_twitter' ];
|
1247 |
+
update_post_meta( $id, '_jd_wp_twitter', $jd_wp_twitter );
|
1248 |
+
}
|
1249 |
+
if ( isset( $_POST[ '_jd_tweet_this' ] ) ) {
|
1250 |
+
$jd_tweet_this = ( $_POST[ '_jd_tweet_this' ] == 'no')?'no':'yes';
|
1251 |
+
update_post_meta( $id, '_jd_tweet_this', $jd_tweet_this );
|
1252 |
+
} else {
|
1253 |
+
if ( isset($_POST['_wpnonce'] ) ) {
|
1254 |
+
$jd_tweet_default = ( get_option( 'jd_tweet_default' ) == 1 )?'no':'yes';
|
1255 |
+
update_post_meta( $id, '_jd_tweet_this', $jd_tweet_default );
|
1256 |
+
}
|
1257 |
+
}
|
1258 |
+
// WPT PRO //
|
1259 |
+
apply_filters( 'wpt_insert_post', $_POST, $id );
|
1260 |
+
// WPT PRO //
|
1261 |
+
|
1262 |
+
if ( WPT_DEBUG && function_exists( 'wpt_pro_exists' ) ) {
|
1263 |
+
wp_mail( WPT_DEBUG_ADDRESS,"Post Meta Inserted: #$id",print_r($_POST,1) ); // DEBUG
|
1264 |
+
}
|
1265 |
+
}
|
1266 |
+
|
1267 |
+
function jd_twitter_profile() {
|
1268 |
+
global $user_ID;
|
1269 |
+
get_currentuserinfo();
|
1270 |
+
if ( current_user_can( 'wpt_twitter_oauth' ) || current_user_can('update_core') ) {
|
1271 |
+
$user_edit = ( isset($_GET['user_id']) )?(int) $_GET['user_id']:$user_ID;
|
1272 |
+
|
1273 |
+
$is_enabled = get_user_meta( $user_edit, 'wp-to-twitter-enable-user',true );
|
1274 |
+
$twitter_username = get_user_meta( $user_edit, 'wp-to-twitter-user-username',true );
|
1275 |
+
$wpt_remove = get_user_meta( $user_edit, 'wpt-remove', true );
|
1276 |
+
?>
|
1277 |
+
<h3><?php _e('WP Tweets User Settings', 'wp-to-twitter'); ?></h3>
|
1278 |
+
<?php if ( function_exists('wpt_connect_oauth_message') ) { wpt_connect_oauth_message( $user_edit ); } ?>
|
1279 |
+
<table class="form-table">
|
1280 |
+
<tr>
|
1281 |
+
<th scope="row"><?php _e("Use My Twitter Username", 'wp-to-twitter'); ?></th>
|
1282 |
+
<td><input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-3" value="mainAtTwitter"<?php if ($is_enabled == "mainAtTwitter") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e("Tweet my posts with an @ reference to my username.", 'wp-to-twitter'); ?></label><br />
|
1283 |
+
<input type="radio" name="wp-to-twitter-enable-user" id="wp-to-twitter-enable-user-4" value="mainAtTwitterPlus"<?php if ($is_enabled == "mainAtTwitterPlus") { echo " checked='checked'"; } ?> /> <label for="wp-to-twitter-enable-user-3"><?php _e("Tweet my posts with an @ reference to both my username and to the main site username.", 'wp-to-twitter'); ?></label>
|
1284 |
+
</td>
|
1285 |
+
</tr>
|
1286 |
+
<tr>
|
1287 |
+
<th scope="row"><label for="wp-to-twitter-user-username"><?php _e("Your Twitter Username", 'wp-to-twitter'); ?></label></th>
|
1288 |
+
<td><input type="text" name="wp-to-twitter-user-username" id="wp-to-twitter-user-username" value="<?php echo esc_attr( $twitter_username ); ?>" /> <?php _e('Enter your own Twitter username.', 'wp-to-twitter'); ?></td>
|
1289 |
+
</tr>
|
1290 |
+
<tr>
|
1291 |
+
<th scope="row"><label for="wpt-remove"><?php _e("Hide account name in Tweets", 'wp-to-twitter'); ?></label></th>
|
1292 |
+
<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>
|
1293 |
+
</tr>
|
1294 |
+
<?php if ( !function_exists('wpt_pro_exists') ) { add_filter( 'wpt_twitter_user_fields',create_function('','return;') ); } ?>
|
1295 |
+
<?php echo apply_filters('wpt_twitter_user_fields',$user_edit ); ?>
|
1296 |
+
</table>
|
1297 |
+
<?php
|
1298 |
+
if ( function_exists('wpt_schedule_tweet') ) {
|
1299 |
+
if ( function_exists('wtt_connect_oauth') ) { wtt_connect_oauth( $user_edit ); }
|
1300 |
+
}
|
1301 |
+
}
|
1302 |
+
}
|
1303 |
+
|
1304 |
+
function custom_shortcodes( $sentence, $post_ID ) {
|
1305 |
+
$pattern = '/([([\[\]?)([A-Za-z0-9-_])*(\]\]]?)+/';
|
1306 |
+
$params = array(0=>"[[",1=>"]]");
|
1307 |
+
preg_match_all($pattern,$sentence, $matches);
|
1308 |
+
if ($matches && is_array($matches[0])) {
|
1309 |
+
foreach ($matches[0] as $value) {
|
1310 |
+
$shortcode = "$value";
|
1311 |
+
$field = str_replace($params, "", $shortcode);
|
1312 |
+
$custom = apply_filters( 'wpt_custom_shortcode',strip_tags(get_post_meta( $post_ID, $field, TRUE )), $post_ID, $field );
|
1313 |
+
$sentence = str_replace( $shortcode, $custom, $sentence );
|
1314 |
+
}
|
1315 |
+
return $sentence;
|
1316 |
+
} else {
|
1317 |
+
return $sentence;
|
1318 |
+
}
|
1319 |
+
}
|
1320 |
+
|
1321 |
+
function jd_twitter_save_profile(){
|
1322 |
+
global $user_ID;
|
1323 |
+
get_currentuserinfo();
|
1324 |
+
if ( isset($_POST['user_id']) ) {
|
1325 |
+
$edit_id = (int) $_POST['user_id'];
|
1326 |
+
} else {
|
1327 |
+
$edit_id = $user_ID;
|
1328 |
+
}
|
1329 |
+
$enable = ( isset($_POST['wp-to-twitter-enable-user']) )?$_POST['wp-to-twitter-enable-user']:'';
|
1330 |
+
$username = ( isset($_POST['wp-to-twitter-user-username']) )?$_POST['wp-to-twitter-user-username']:'';
|
1331 |
+
$wpt_remove = ( isset($_POST['wpt-remove']) )?'on':'';
|
1332 |
+
update_user_meta($edit_id ,'wp-to-twitter-enable-user' , $enable );
|
1333 |
+
update_user_meta($edit_id ,'wp-to-twitter-user-username' , $username );
|
1334 |
+
update_user_meta($edit_id ,'wpt-remove' , $wpt_remove );
|
1335 |
+
//WPT PRO
|
1336 |
+
apply_filters( 'wpt_save_user', $edit_id, $_POST );
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
function jd_list_categories() {
|
1340 |
+
$selected = "";
|
1341 |
+
$categories = get_categories('hide_empty=0');
|
1342 |
+
$nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false).wp_referer_field(false);
|
1343 |
+
$input = "<form action=\"\" method=\"post\">
|
1344 |
+
<div>$nonce</div>
|
1345 |
+
<fieldset><legend>".__('Check off categories to tweet','wp-to-twitter')."</legend>";
|
1346 |
+
$input .= '
|
1347 |
+
<p>
|
1348 |
+
<input type="checkbox" name="jd_twit_cats" id="jd_twit_cats" value="1"'.jd_checkCheckbox('jd_twit_cats').' />
|
1349 |
+
<label for="jd_twit_cats">'.__("Do not tweet posts in checked categories (Reverses default behavior)", 'wp-to-twitter').'</label>
|
1350 |
+
</p>';
|
1351 |
+
$input .= "
|
1352 |
+
<ul>\n";
|
1353 |
+
$tweet_categories = get_option( 'tweet_categories' );
|
1354 |
+
foreach ($categories AS $cat) {
|
1355 |
+
if (is_array($tweet_categories)) {
|
1356 |
+
if ( in_array( $cat->term_id,$tweet_categories ) ) {
|
1357 |
+
$selected = " checked=\"checked\"";
|
1358 |
+
} else {
|
1359 |
+
$selected = "";
|
1360 |
+
}
|
1361 |
+
}
|
1362 |
+
$input .= ' <li><input'.$selected.' type="checkbox" name="categories[]" value="'.$cat->term_id.'" id="'.$cat->category_nicename.'" /> <label for="'.$cat->category_nicename.'">'.$cat->name."</label></li>\n";
|
1363 |
+
}
|
1364 |
+
$input .= " </ul>
|
1365 |
+
</fieldset>
|
1366 |
+
<p>".__('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.','wp-to-twitter')."</p>
|
1367 |
+
<div>
|
1368 |
+
<input type=\"hidden\" name=\"submit-type\" value=\"setcategories\" />
|
1369 |
+
<input type=\"submit\" name=\"submit\" class=\"button-primary\" value=\"".__('Set Categories','wp-to-twitter')."\" />
|
1370 |
+
</div>
|
1371 |
+
</form>";
|
1372 |
+
echo $input;
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
// Add the administrative settings to the "Settings" menu.
|
1376 |
+
function jd_addTwitterAdminPages() {
|
1377 |
+
if ( function_exists( 'add_options_page' ) && !function_exists( 'wpt_pro_functions') ) {
|
1378 |
+
$plugin_page = add_options_page( 'WP to Twitter', 'WP to Twitter', 'manage_options', __FILE__, 'wpt_update_settings' );
|
1379 |
+
}
|
1380 |
+
}
|
1381 |
+
add_action( 'admin_head', 'jd_addTwitterAdminStyles' );
|
1382 |
+
function jd_addTwitterAdminStyles() {
|
1383 |
+
if ( isset($_GET['page']) && ( $_GET['page'] == "wp-to-twitter" || $_GET['page'] == "wp-to-twitter/wp-to-twitter.php" || $_GET['page'] == "wp-tweets-pro" || $_GET['page'] == "wp-to-twitter-schedule" || $_GET['page'] == "wp-to-twitter-tweets" || $_GET['page'] == "wp-to-twitter-errors" ) ) {
|
1384 |
+
echo '<link type="text/css" rel="stylesheet" href="'.plugins_url('/wp-to-twitter/styles.css').'" />';
|
1385 |
+
}
|
1386 |
+
}
|
1387 |
+
|
1388 |
+
function jd_plugin_action($links, $file) {
|
1389 |
+
if ( $file == plugin_basename(dirname(__FILE__).'/wp-to-twitter.php') ) {
|
1390 |
+
$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');
|
1391 |
+
global $jd_donate_url;
|
1392 |
+
$links[] = "<a href='$admin_url'>" . __('Settings', 'wp-to-twitter', 'wp-to-twitter') . "</a>";
|
1393 |
+
if ( ! function_exists( 'wpt_pro_exists' ) ) { $links[] = "<a href='$jd_donate_url'>" . __('Upgrade', 'wp-to-twitter', 'wp-to-twitter') . "</a>"; }
|
1394 |
+
}
|
1395 |
+
return $links;
|
1396 |
+
}
|
1397 |
+
//Add Plugin Actions to WordPress
|
1398 |
+
add_filter('plugin_action_links', 'jd_plugin_action', -10, 2);
|
1399 |
+
|
1400 |
+
if ( get_option( 'jd_individual_twitter_users')=='1') {
|
1401 |
+
add_action( 'show_user_profile', 'jd_twitter_profile' );
|
1402 |
+
add_action( 'edit_user_profile', 'jd_twitter_profile' );
|
1403 |
+
add_action( 'profile_update', 'jd_twitter_save_profile');
|
1404 |
+
}
|
1405 |
+
|
1406 |
+
$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');
|
1407 |
+
|
1408 |
+
if ( get_option( 'disable_url_failure' ) != '1' ) {
|
1409 |
+
if ( get_option( 'wp_url_failure' ) == '1' && !( isset($_POST['submit-type']) && $_POST['submit-type'] == 'clear-error' ) ) {
|
1410 |
+
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>';" ) );
|
1411 |
+
}
|
1412 |
+
}
|
1413 |
+
if ( get_option( 'disable_twitter_failure' ) != '1' ) {
|
1414 |
+
if ( get_option( 'wp_twitter_failure' ) == '1' && !( isset($_POST['submit-type']) && $_POST['submit-type'] == 'clear-error' ) ) {
|
1415 |
+
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>';" ) );
|
1416 |
+
}
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
add_action( 'in_plugin_update_message-wp-to-twitter/wp-to-twitter.php', 'wpt_plugin_update_message' );
|
1420 |
+
function wpt_plugin_update_message() {
|
1421 |
+
global $wpt_version;
|
1422 |
+
$note = '';
|
1423 |
+
define('WPT_PLUGIN_README_URL', 'http://svn.wp-plugins.org/wp-to-twitter/trunk/readme.txt');
|
1424 |
+
$response = wp_remote_get( WPT_PLUGIN_README_URL, array ('user-agent' => 'WordPress/WP to Twitter' . $wpt_version . '; ' . get_bloginfo( 'url' ) ) );
|
1425 |
+
if ( ! is_wp_error( $response ) || is_array( $response ) ) {
|
1426 |
+
$data = $response['body'];
|
1427 |
+
$bits=explode('== Upgrade Notice ==',$data);
|
1428 |
+
$note = '<div id="wpt-upgrade"><p><strong style="color:#c22;">Upgrade Notes:</strong> '.nl2br(trim($bits[1])).'</p></div>';
|
1429 |
+
} else {
|
1430 |
+
printf(__('<br /><strong>Note:</strong> Please review the <a class="thickbox" href="%1$s">changelog</a> before upgrading.','wp-to-twitter'),'plugin-install.php?tab=plugin-information&plugin=wp-to-twitter&TB_iframe=true&width=640&height=594');
|
1431 |
+
}
|
1432 |
+
echo $note;
|
1433 |
+
}
|
1434 |
+
|
1435 |
+
if ( get_option( 'jd_twit_blogroll' ) == '1' ) {
|
1436 |
+
add_action( 'add_link', 'jd_twit_link' );
|
1437 |
+
}
|
1438 |
+
|
1439 |
+
$post_type_settings = get_option('wpt_post_types');
|
1440 |
+
if ( is_array( $post_type_settings ) ) {
|
1441 |
+
$post_types = array_keys($post_type_settings);
|
1442 |
+
foreach ($post_types as $value ) {
|
1443 |
+
// in theory, publish_future_ only runs on scheduled, publish_ runs on all.
|
1444 |
+
if ( version_compare( $wp_version,"3.3.3","<" ) ) { // I've only tested through 3.3.3, but those versions work without this action.
|
1445 |
+
add_action( 'publish_future_'.$value, 'wpt_twit_future', 16 );
|
1446 |
+
}
|
1447 |
+
add_action( 'publish_'.$value, 'post_jd_twitter', 10 );
|
1448 |
+
add_action( 'publish_'.$value, 'wpt_twit_instant', 16 );
|
1449 |
+
}
|
1450 |
+
}
|
1451 |
+
add_action( 'wpt_schedule_promotion_action', 'wpt_schedule_promotion' );
|
1452 |
+
function wpt_schedule_promotion() {
|
1453 |
+
if ( !function_exists( 'wpt_pro_exists' ) && get_option( 'wpt_promotion_scheduled' ) == 1 ) {
|
1454 |
+
update_option( 'wpt_promotion_scheduled', 2 );
|
1455 |
+
}
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
function wpt_dismiss_promotion() {
|
1459 |
+
if ( isset($_GET['dismiss']) && $_GET['dismiss'] == 'promotion' ) {
|
1460 |
+
update_option( 'wpt_promotion_scheduled', 3 );
|
1461 |
+
}
|
1462 |
+
}
|
1463 |
+
wpt_dismiss_promotion();
|
1464 |
+
|
1465 |
+
add_action( 'admin_notices', 'wpt_promotion_notice' );
|
1466 |
+
function wpt_promotion_notice() {
|
1467 |
+
if ( current_user_can( 'activate_plugins' ) && get_option( 'wpt_promotion_scheduled' ) == 2 && get_option( 'jd_donations' ) != 1 ) {
|
1468 |
+
$upgrade = "http://www.joedolson.com/articles/wp-tweets-pro/";
|
1469 |
+
$dismiss = admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php&dismiss=promotion');
|
1470 |
+
echo "<div class='updated fade'><p>".sprintf( __("I hope you've enjoyed <strong>WP to Twitter</strong>! Take a look at <a href='%s'>upgrading to WP Tweets PRO</a> for advanced Tweeting with WordPress! <a href='%s'>Dismiss</a>",'wp-to-twitter'), $upgrade, $dismiss )."</p></div>";
|
1471 |
+
}
|
1472 |
+
}
|
1473 |
+
|
1474 |
+
function wpt_twit_future( $id ) {
|
1475 |
+
set_transient( '_wpt_twit_future', $id, 10 );
|
1476 |
+
// instant action has already run for this post. // prevent running actions twice (need both for older WP)
|
1477 |
+
if ( get_transient ( '_wpt_twit_instant' ) && get_transient( '_wpt_twit_instant' ) == $id ) {
|
1478 |
+
delete_transient( '_wpt_twit_instant' );
|
1479 |
+
return;
|
1480 |
+
}
|
1481 |
+
jd_twit( $id, 'future' );
|
1482 |
+
}
|
1483 |
+
function wpt_twit_instant( $id ) {
|
1484 |
+
set_transient( '_wpt_twit_instant', $id, 10 );
|
1485 |
+
// future action has already run for this post.
|
1486 |
+
if ( get_transient ( '_wpt_twit_future' ) && get_transient( '_wpt_twit_future' ) == $id ) {
|
1487 |
+
delete_transient( '_wpt_twit_future' );
|
1488 |
+
return;
|
1489 |
+
}
|
1490 |
+
jd_twit( $id, 'instant' );
|
1491 |
+
}
|
1492 |
+
function wpt_twit_xmlrpc( $id ) {
|
1493 |
+
jd_twit( $id, 'xmlrpc' );
|
1494 |
+
}
|
1495 |
+
|
1496 |
+
add_action( 'save_post', 'post_jd_twitter', 10 ); // Now things will happen twice. Hmmm...guess that's OK.
|
1497 |
+
|
1498 |
+
if ( get_option( 'jd_twit_remote' ) == '1' || ( function_exists( 'wpt_pro_exists') && wpt_pro_exists() == true && get_option( 'wpt_delay_tweets' ) > 0 ) ) {
|
1499 |
+
add_action( 'xmlrpc_publish_post', 'wpt_twit_xmlrpc' );
|
1500 |
+
add_action( 'publish_phone', 'wpt_twit_xmlrpc' ); // to add later
|
1501 |
+
}
|
1502 |
+
|
1503 |
+
add_action( 'admin_menu', 'jd_addTwitterAdminPages' );
|
1504 |
+
|
1505 |
+
/* Enqueue styles for Twitter feed */
|
1506 |
+
add_action('wp_enqueue_scripts', 'wpt_stylesheet');
|
1507 |
+
function wpt_stylesheet() {
|
1508 |
+
$file = plugins_url( 'twitter-feed.css',__FILE__);
|
1509 |
+
wp_register_style( 'wpt-twitter-feed', $file );
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
// Add notes about Tweet status to posts admin
|
1513 |
+
function wpt_column($cols) {
|
1514 |
+
$cols['wpt'] = __('Tweet Status','wp-to-twitter');
|
1515 |
+
return $cols;
|
1516 |
+
}
|
1517 |
+
|
1518 |
+
// Echo the ID for the new column
|
1519 |
+
function wpt_value($column_name, $id) {
|
1520 |
+
if ($column_name == 'wpt') {
|
1521 |
+
$marked = ucfirst( ( get_post_meta($id,'_jd_tweet_this',true) ) );
|
1522 |
+
echo $marked;
|
1523 |
+
}
|
1524 |
+
}
|
1525 |
+
|
1526 |
+
function wpt_return_value($value, $column_name, $id) {
|
1527 |
+
if ( $column_name == 'wpt' ) {
|
1528 |
+
$value = $id;
|
1529 |
+
}
|
1530 |
+
return $value;
|
1531 |
+
}
|
1532 |
+
|
1533 |
+
// Output CSS for width of new column
|
1534 |
+
function wpt_css() {
|
1535 |
+
?>
|
1536 |
+
<style type="text/css">
|
1537 |
+
th#wpt { width: 60px; }
|
1538 |
+
.wpt {text-align:center;}
|
1539 |
+
.wpt_twitter .authorized { color: green; }
|
1540 |
+
</style>
|
1541 |
+
<?php
|
1542 |
+
}
|
1543 |
+
|
1544 |
+
// Actions/Filters for various tables and the css output
|
1545 |
+
function wpt_add() {
|
1546 |
+
$post_type_settings = get_option('wpt_post_types');
|
1547 |
+
$post_types = array_keys($post_type_settings);
|
1548 |
+
|
1549 |
+
add_action('admin_head', 'wpt_css');
|
1550 |
+
if ( !$post_types || in_array( 'post', $post_types ) ) {
|
1551 |
+
add_filter('manage_posts_columns', 'wpt_column');
|
1552 |
+
add_action('manage_posts_custom_column', 'wpt_value', 10, 2);
|
1553 |
+
}
|
1554 |
+
if ( !$post_types || in_array( 'page', $post_types ) ) {
|
1555 |
+
add_filter('manage_pages_columns', 'wpt_column');
|
1556 |
+
add_action('manage_pages_custom_column', 'wpt_value', 10, 2);
|
1557 |
+
}
|
1558 |
+
foreach ( $post_types as $types ) {
|
1559 |
+
add_action("manage_${types}_columns", 'wpt_column');
|
1560 |
+
add_filter("manage_${types}_custom_column", 'wpt_value', 10, 2);
|
1561 |
+
}
|
1562 |
+
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
add_action('admin_init', 'wpt_add');
|
wpt-feed.php
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Version 2.0.3, Twitter Feed for Developers by Storm Consultancy (Liam Gladdy)
|
4 |
+
* The base class for the storm twitter feed for developers.
|
5 |
+
* This class provides all the things needed for the wordpress plugin, but in theory means you don't need to use it with wordpress.
|
6 |
+
* What could go wrong?
|
7 |
+
*/
|
8 |
+
|
9 |
+
// based on StormTwitter; significantly modified
|
10 |
+
|
11 |
+
require_once( 'wpt_twitter_oauth.php' );
|
12 |
+
|
13 |
+
class StormTwitter {
|
14 |
+
|
15 |
+
private $defaults = array(
|
16 |
+
'directory' => '',
|
17 |
+
'key' => '',
|
18 |
+
'secret' => '',
|
19 |
+
'token' => '',
|
20 |
+
'token_secret' => '',
|
21 |
+
'screenname' => '',
|
22 |
+
'cache_expire' => 3600
|
23 |
+
);
|
24 |
+
|
25 |
+
public $st_last_error = false;
|
26 |
+
|
27 |
+
function __construct($args = array()) {
|
28 |
+
$this->defaults = array_merge($this->defaults, $args);
|
29 |
+
}
|
30 |
+
|
31 |
+
function __toString() {
|
32 |
+
return print_r($this->defaults, true);
|
33 |
+
}
|
34 |
+
|
35 |
+
//I'd prefer to put username before count, but for backwards compatibility it's not really viable. :(
|
36 |
+
function getTweets($count = 20,$screenname = false,$options = false) {
|
37 |
+
if ($count > 20) $count = 20;
|
38 |
+
if ($count < 1) $count = 1;
|
39 |
+
|
40 |
+
$default_options = array('trim_user'=>true, 'exclude_replies'=>true, 'include_rts'=>false);
|
41 |
+
|
42 |
+
if ($options === false || !is_array($options)) {
|
43 |
+
$options = $default_options;
|
44 |
+
} else {
|
45 |
+
$options = array_merge($default_options, $options);
|
46 |
+
}
|
47 |
+
|
48 |
+
if ($screenname === false) $screenname = $this->defaults['screenname'];
|
49 |
+
|
50 |
+
$result = $this->checkValidCache($screenname,$options);
|
51 |
+
|
52 |
+
if ($result !== false) {
|
53 |
+
return $this->cropTweets($result,$count);
|
54 |
+
}
|
55 |
+
|
56 |
+
//If we're here, we need to load.
|
57 |
+
$result = $this->oauthGetTweets($screenname,$options);
|
58 |
+
|
59 |
+
if ( is_object($result) && isset($result->error) ) {
|
60 |
+
$last_error = $result->error;
|
61 |
+
return array('error'=>'Twitter said: '.$last_error);
|
62 |
+
} else {
|
63 |
+
return $this->cropTweets($result,$count);
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
private function cropTweets($result,$count) {
|
69 |
+
if ( is_array( $result ) ) {
|
70 |
+
return array_slice($result, 0, $count);
|
71 |
+
} else {
|
72 |
+
return array();
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
private function getCacheLocation() {
|
77 |
+
return $this->defaults['directory'].'.tweetcache';
|
78 |
+
}
|
79 |
+
|
80 |
+
private function getOptionsHash($options) {
|
81 |
+
$hash = md5(serialize($options));
|
82 |
+
return $hash;
|
83 |
+
}
|
84 |
+
|
85 |
+
private function checkValidCache($screenname,$options) {
|
86 |
+
$file = $this->getCacheLocation();
|
87 |
+
if (is_file($file)) {
|
88 |
+
$cache = file_get_contents($file);
|
89 |
+
$cache = @json_decode($cache,true);
|
90 |
+
|
91 |
+
if (!isset($cache)) {
|
92 |
+
unlink($file);
|
93 |
+
return false;
|
94 |
+
}
|
95 |
+
|
96 |
+
$cachename = $screenname."-".$this->getOptionsHash($options);
|
97 |
+
|
98 |
+
//Check if we have a cache for the user.
|
99 |
+
if (!isset($cache[$cachename])) return false;
|
100 |
+
|
101 |
+
if (!isset($cache[$cachename]['time']) || !isset($cache[$cachename]['tweets'])) {
|
102 |
+
unset($cache[$cachename]);
|
103 |
+
file_put_contents($file,json_encode($cache));
|
104 |
+
return false;
|
105 |
+
}
|
106 |
+
|
107 |
+
if ($cache[$cachename]['time'] < (time() - $this->defaults['cache_expire'])) {
|
108 |
+
$result = $this->oauthGetTweets($screenname,$options);
|
109 |
+
if (!isset($result->error)) {
|
110 |
+
return $result;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
return $cache[$cachename]['tweets'];
|
114 |
+
} else {
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
private function oauthGetTweets($screenname,$options) {
|
120 |
+
$key = $this->defaults['key'];
|
121 |
+
$secret = $this->defaults['secret'];
|
122 |
+
$token = $this->defaults['token'];
|
123 |
+
$token_secret = $this->defaults['token_secret'];
|
124 |
+
$cachename = $screenname."-".$this->getOptionsHash($options);
|
125 |
+
|
126 |
+
$options = array_merge($options, array('screen_name' => $screenname, 'count' => 20));
|
127 |
+
|
128 |
+
if (empty($key)) return array('error'=>'Missing Consumer Key - Check Settings');
|
129 |
+
if (empty($secret)) return array('error'=>'Missing Consumer Secret - Check Settings');
|
130 |
+
if (empty($token)) return array('error'=>'Missing Access Token - Check Settings');
|
131 |
+
if (empty($token_secret)) return array('error'=>'Missing Access Token Secret - Check Settings');
|
132 |
+
if (empty($screenname)) return array('error'=>'Missing Twitter Feed Screen Name - Check Settings');
|
133 |
+
|
134 |
+
$connection = new jd_TwitterOAuth($key, $secret, $token, $token_secret);
|
135 |
+
$protocol = ( get_option( 'wpt_http' ) == '1' )?'http:':'https:';
|
136 |
+
$result = $connection->get($protocol.'//api.twitter.com/1.1/statuses/user_timeline.json', $options);
|
137 |
+
$result = json_decode( $result );
|
138 |
+
if ( is_file($this->getCacheLocation()) ) {
|
139 |
+
$cache = json_decode(file_get_contents($this->getCacheLocation()),true);
|
140 |
+
}
|
141 |
+
|
142 |
+
if ( !isset($result->error) ) {
|
143 |
+
$cache[$cachename]['time'] = time();
|
144 |
+
$cache[$cachename]['tweets'] = $result;
|
145 |
+
$file = $this->getCacheLocation();
|
146 |
+
file_put_contents($file,json_encode($cache));
|
147 |
+
} else {
|
148 |
+
if (is_array($results) && isset($result['errors'][0]) && isset($result['errors'][0]['message'])) {
|
149 |
+
$last_error = '['.date('r').'] Twitter error: '.$result['errors'][0]['message'];
|
150 |
+
$this->st_last_error = $last_error;
|
151 |
+
} else {
|
152 |
+
$last_error = '['.date('r').']'.__( 'Twitter returned an invalid response. It is probably down.','wp-to-twitter' );
|
153 |
+
$this->st_last_error = $last_error;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
return $result;
|
157 |
+
|
158 |
+
}
|
159 |
+
}
|
wpt-functions.php
ADDED
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// This file contains secondary functions supporting WP to Twitter
|
3 |
+
// These functions don't perform any WP to Twitter actions, but are sometimes called for when
|
4 |
+
// support for primary functions is lacking.
|
5 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
6 |
+
|
7 |
+
if ( version_compare( $wp_version,"2.9.3",">" )) {
|
8 |
+
if (!class_exists('WP_Http')) {
|
9 |
+
require_once( ABSPATH.WPINC.'/class-http.php' );
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
function jd_remote_json( $url, $array=true ) {
|
14 |
+
$input = jd_fetch_url( $url );
|
15 |
+
$obj = json_decode($input, $array );
|
16 |
+
try {
|
17 |
+
if (is_null($array)) {
|
18 |
+
switch ( json_last_error() ) {
|
19 |
+
case JSON_ERROR_DEPTH :
|
20 |
+
$msg = ' - Maximum stack depth exceeded';
|
21 |
+
break;
|
22 |
+
case JSON_ERROR_STATE_MISMATCH :
|
23 |
+
$msg = ' - Underflow or the modes mismatch';
|
24 |
+
break;
|
25 |
+
case JSON_ERROR_CTRL_CHAR :
|
26 |
+
$msg = ' - Unexpected control character found';
|
27 |
+
break;
|
28 |
+
case JSON_ERROR_SYNTAX :
|
29 |
+
$msg = ' - Syntax error, malformed JSON';
|
30 |
+
break;
|
31 |
+
case JSON_ERROR_UTF8 :
|
32 |
+
$msg = ' - Malformed UTF-8 characters, possibly incorrectly encoded';
|
33 |
+
break;
|
34 |
+
default :
|
35 |
+
$msg = ' - Unknown error';
|
36 |
+
break;
|
37 |
+
}
|
38 |
+
throw new Exception($msg);
|
39 |
+
}
|
40 |
+
} catch (Exception $e) {
|
41 |
+
return $e -> getMessage();
|
42 |
+
}
|
43 |
+
return $obj;
|
44 |
+
// TODO: some error handling ?
|
45 |
+
}
|
46 |
+
|
47 |
+
function is_valid_url( $url ) {
|
48 |
+
if (is_string($url)) {
|
49 |
+
$url = urldecode($url);
|
50 |
+
return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
|
51 |
+
} else {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
// Fetch a remote page. Input url, return content
|
56 |
+
function jd_fetch_url( $url, $method='GET', $body='', $headers='', $return='body' ) {
|
57 |
+
$request = new WP_Http;
|
58 |
+
$result = $request->request( $url , array( 'method'=>$method, 'body'=>$body, 'headers'=>$headers, 'sslverify'=>false, 'user-agent'=>'WP to Twitter http://www.joedolson.com/articles/wp-to-twitter/' ) );
|
59 |
+
// Success?
|
60 |
+
if ( !is_wp_error($result) && isset($result['body']) ) {
|
61 |
+
if ( $result['response']['code'] == 200 ) {
|
62 |
+
if ($return == 'body') {
|
63 |
+
return $result['body'];
|
64 |
+
} else {
|
65 |
+
return $result;
|
66 |
+
}
|
67 |
+
} else {
|
68 |
+
return $result['response']['code'];
|
69 |
+
}
|
70 |
+
// Failure (server problem...)
|
71 |
+
} else {
|
72 |
+
return false;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
if (!function_exists('mb_strlen')) {
|
77 |
+
function mb_strlen($data) {
|
78 |
+
return strlen($data);
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
if (!function_exists('mb_substr')) {
|
83 |
+
function mb_substr($data,$start,$length = null, $encoding = null) {
|
84 |
+
return substr($data,$start,$length);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
// filter_var substitution for PHP <5.2
|
89 |
+
if ( !function_exists( 'filter_var' ) ) {
|
90 |
+
function filter_var( $url ) {
|
91 |
+
// this does not emulate filter_var; merely the usage of filter_var in WP to Twitter.
|
92 |
+
return ( stripos( $url, 'https:' ) !== false || stripos( $url, 'http:' ) !== false )?true:false;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
// str_ireplace substitution for PHP4
|
97 |
+
if ( !function_exists( 'str_ireplace' ) ) {
|
98 |
+
function str_ireplace( $needle, $str, $haystack ) {
|
99 |
+
$needle = preg_quote( $needle, '/' );
|
100 |
+
return preg_replace( "/$needle/i", $str, $haystack );
|
101 |
+
}
|
102 |
+
}
|
103 |
+
// str_split substitution for PHP4
|
104 |
+
if( !function_exists( 'str_split' ) ) {
|
105 |
+
function str_split( $string,$string_length=1 ) {
|
106 |
+
if( strlen( $string )>$string_length || !$string_length ) {
|
107 |
+
do {
|
108 |
+
$c = strlen($string);
|
109 |
+
$parts[] = substr($string,0,$string_length);
|
110 |
+
$string = substr($string,$string_length);
|
111 |
+
} while($string !== false);
|
112 |
+
} else {
|
113 |
+
$parts = array($string);
|
114 |
+
}
|
115 |
+
return $parts;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
// mb_substr_replace substition for PHP4
|
119 |
+
if ( !function_exists( 'mb_substr_replace' ) ) {
|
120 |
+
function mb_substr_replace( $string, $replacement, $start, $length = null, $encoding = null ) {
|
121 |
+
if ( extension_loaded( 'mbstring' ) === true ) {
|
122 |
+
$string_length = (is_null($encoding) === true) ? mb_strlen($string) : mb_strlen($string, $encoding);
|
123 |
+
if ( $start < 0 ) {
|
124 |
+
$start = max(0, $string_length + $start);
|
125 |
+
} else if ( $start > $string_length ) {
|
126 |
+
$start = $string_length;
|
127 |
+
}
|
128 |
+
if ( $length < 0 ) {
|
129 |
+
$length = max( 0, $string_length - $start + $length );
|
130 |
+
} else if ( ( is_null( $length ) === true ) || ( $length > $string_length ) ) {
|
131 |
+
$length = $string_length;
|
132 |
+
}
|
133 |
+
if ( ( $start + $length ) > $string_length) {
|
134 |
+
$length = $string_length - $start;
|
135 |
+
}
|
136 |
+
if ( is_null( $encoding ) === true) {
|
137 |
+
return mb_substr( $string, 0, $start ) . $replacement . mb_substr( $string, $start + $length, $string_length - $start - $length );
|
138 |
+
}
|
139 |
+
return mb_substr( $string, 0, $start, $encoding ) . $replacement . mb_substr( $string, $start + $length, $string_length - $start - $length, $encoding );
|
140 |
+
}
|
141 |
+
return ( is_null( $length ) === true ) ? substr_replace( $string, $replacement, $start ) : substr_replace( $string, $replacement, $start, $length );
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
function wtt_option_selected($field,$value,$type='checkbox') {
|
146 |
+
switch ($type) {
|
147 |
+
case 'radio':
|
148 |
+
case 'checkbox':
|
149 |
+
$result = ' checked="checked"';
|
150 |
+
break;
|
151 |
+
case 'option':
|
152 |
+
$result = ' selected="selected"';
|
153 |
+
break;
|
154 |
+
}
|
155 |
+
if ($field == $value) {
|
156 |
+
$output = $result;
|
157 |
+
} else {
|
158 |
+
$output = '';
|
159 |
+
}
|
160 |
+
return $output;
|
161 |
+
}
|
162 |
+
|
163 |
+
function wpt_date_compare($early,$late) {
|
164 |
+
$firstdate = strtotime($early);
|
165 |
+
$lastdate = strtotime($late);
|
166 |
+
if ($firstdate <= $lastdate ) { // if post_modified is before or equal to post_date
|
167 |
+
return 1;
|
168 |
+
} else {
|
169 |
+
return 0;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Gets the first attachment for the supplied post.
|
175 |
+
*
|
176 |
+
* @param type $post_ID The post ID
|
177 |
+
* @return An Attachment ID.
|
178 |
+
*/
|
179 |
+
function wpt_post_attachment($post_ID) {
|
180 |
+
if ( has_post_thumbnail( $post_ID ) ) {
|
181 |
+
$attachment = get_post_thumbnail_id( $post_ID );
|
182 |
+
return $attachment;
|
183 |
+
} else {
|
184 |
+
$args = array( 'post_type' => 'attachment', 'numberposts' => 1, 'post_status' => 'published', 'post_parent' => $post_ID, 'post_mime_type'=>'image' );
|
185 |
+
$attachments = get_posts($args);
|
186 |
+
if ($attachments) {
|
187 |
+
return $attachments[0]->ID; //Return the first attachment.
|
188 |
+
} else {
|
189 |
+
return null;
|
190 |
+
}
|
191 |
+
}
|
192 |
+
return null;
|
193 |
+
}
|
194 |
+
|
195 |
+
function wpt_get_support_form() {
|
196 |
+
global $current_user, $wpt_version;
|
197 |
+
get_currentuserinfo();
|
198 |
+
$request = '';
|
199 |
+
// send fields for WP to Twitter
|
200 |
+
$license = ( get_option('wpt_license_key') != '' )?get_option('wpt_license_key'):'none';
|
201 |
+
$license = "License Key: ".$license;
|
202 |
+
|
203 |
+
$version = $wpt_version;
|
204 |
+
$wtt_twitter_username = get_option('wtt_twitter_username');
|
205 |
+
// send fields for all plugins
|
206 |
+
$wp_version = get_bloginfo('version');
|
207 |
+
$home_url = home_url();
|
208 |
+
$wp_url = site_url();
|
209 |
+
$language = get_bloginfo('language');
|
210 |
+
$charset = get_bloginfo('charset');
|
211 |
+
// server
|
212 |
+
$php_version = phpversion();
|
213 |
+
|
214 |
+
// theme data
|
215 |
+
if ( function_exists( 'wp_get_theme' ) ) {
|
216 |
+
$theme = wp_get_theme();
|
217 |
+
$theme_name = $theme->Name;
|
218 |
+
$theme_uri = $theme->ThemeURI;
|
219 |
+
$theme_parent = $theme->Template;
|
220 |
+
$theme_version = $theme->Version;
|
221 |
+
} else {
|
222 |
+
$theme_path = get_stylesheet_directory().'/style.css';
|
223 |
+
$theme = get_theme_data($theme_path);
|
224 |
+
$theme_name = $theme['Name'];
|
225 |
+
$theme_uri = $theme['ThemeURI'];
|
226 |
+
$theme_parent = $theme['Template'];
|
227 |
+
$theme_version = $theme['Version'];
|
228 |
+
}
|
229 |
+
// plugin data
|
230 |
+
$plugins = get_plugins();
|
231 |
+
$plugins_string = '';
|
232 |
+
foreach( array_keys($plugins) as $key ) {
|
233 |
+
if ( is_plugin_active( $key ) ) {
|
234 |
+
$plugin =& $plugins[$key];
|
235 |
+
$plugin_name = $plugin['Name'];
|
236 |
+
$plugin_uri = $plugin['PluginURI'];
|
237 |
+
$plugin_version = $plugin['Version'];
|
238 |
+
$plugins_string .= "$plugin_name: $plugin_version; $plugin_uri\n";
|
239 |
+
}
|
240 |
+
}
|
241 |
+
global $wpt_server_string;
|
242 |
+
$wpt_server_string = trim(strip_tags( $wpt_server_string ) );
|
243 |
+
$data = "
|
244 |
+
================ Installation Data ====================
|
245 |
+
==WP to Twitter==
|
246 |
+
Version: $version
|
247 |
+
Twitter username: http://twitter.com/$wtt_twitter_username
|
248 |
+
$license
|
249 |
+
$wpt_server_string
|
250 |
+
|
251 |
+
==WordPress:==
|
252 |
+
Version: $wp_version
|
253 |
+
URL: $home_url
|
254 |
+
Install: $wp_url
|
255 |
+
Language: $language
|
256 |
+
Charset: $charset
|
257 |
+
Admin Email: $current_user->user_email
|
258 |
+
|
259 |
+
==Extra info:==
|
260 |
+
PHP Version: $php_version
|
261 |
+
Server Software: $_SERVER[SERVER_SOFTWARE]
|
262 |
+
User Agent: $_SERVER[HTTP_USER_AGENT]
|
263 |
+
|
264 |
+
==Theme:==
|
265 |
+
Name: $theme_name
|
266 |
+
URI: $theme_uri
|
267 |
+
Parent: $theme_parent
|
268 |
+
Version: $theme_version
|
269 |
+
|
270 |
+
==Active Plugins:==
|
271 |
+
$plugins_string
|
272 |
+
";
|
273 |
+
if ( isset($_POST['wpt_support']) ) {
|
274 |
+
$nonce=$_REQUEST['_wpnonce'];
|
275 |
+
if (! wp_verify_nonce($nonce,'wp-to-twitter-nonce') ) die("Security check failed");
|
276 |
+
$request = ( !empty($_POST['support_request']) )?stripslashes($_POST['support_request']):false;
|
277 |
+
$has_donated = ( $_POST['has_donated'] == 'on')?"Donor":"No donation";
|
278 |
+
$has_read_faq = ( $_POST['has_read_faq'] == 'on')?"Read FAQ":false;
|
279 |
+
if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true ) { $pro = " PRO"; } else { $pro = ''; }
|
280 |
+
$subject = "WP to Twitter$pro support request. $has_donated";
|
281 |
+
$message = $request ."\n\n". $data;
|
282 |
+
$from = "From: \"$current_user->display_name\" <$current_user->user_email>\r\n";
|
283 |
+
|
284 |
+
if ( !$has_read_faq ) {
|
285 |
+
echo "<div class='message error'><p>".__('Please read the FAQ and other Help documents before making a support request.','wp-to-twitter')."</p></div>";
|
286 |
+
} else if ( !$request ) {
|
287 |
+
echo "<div class='message error'><p>".__('Please describe your problem. I\'m not psychic.','wp-to-twitter')."</p></div>";
|
288 |
+
} else {
|
289 |
+
wp_mail( "plugins@joedolson.com",$subject,$message,$from );
|
290 |
+
if ( $has_donated == 'Donor' || $has_purchased == 'Purchaser' ) {
|
291 |
+
echo "<div class='message updated'><p>".sprintf(__('Thank you for supporting the continuing development of this plug-in! I\'ll get back to you as soon as I can. Please ensure that you can receive email at <code>%s</code>.','wp-to-twitter'),$current_user->user_email)."</p></div>";
|
292 |
+
} else {
|
293 |
+
echo "<div class='message updated'><p>".sprintf(__("Thanks for using WP to Twitter. Please ensure that you can receive email at <code>%s</code>.",'wp-to-twitter'),$current_user->user_email)."</p></div>";
|
294 |
+
}
|
295 |
+
}
|
296 |
+
}
|
297 |
+
if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true ) { $checked="checked='checked'"; } else { $checked=''; }
|
298 |
+
$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');
|
299 |
+
echo "
|
300 |
+
<form method='post' action='$admin_url'>
|
301 |
+
<div><input type='hidden' name='_wpnonce' value='".wp_create_nonce('wp-to-twitter-nonce')."' /></div>
|
302 |
+
<div>";
|
303 |
+
if ( function_exists( 'wpt_pro_exists' ) && wpt_pro_exists() == true ) {
|
304 |
+
} else {
|
305 |
+
echo "
|
306 |
+
<p>".
|
307 |
+
__('<strong>Please note</strong>: I do keep records of those who have donated, but if your donation came from somebody other than your account at this web site, you must note this in your message.','wp-to-twitter')
|
308 |
+
."</p>";
|
309 |
+
}
|
310 |
+
echo "
|
311 |
+
<p>
|
312 |
+
<code>".__('Reply to:','wp-to-twitter')." \"$current_user->display_name\" <$current_user->user_email></code>
|
313 |
+
</p>
|
314 |
+
<p>
|
315 |
+
<input type='checkbox' name='has_read_faq' id='has_read_faq' value='on' /> <label for='has_read_faq'>".sprintf(__('I have read <a href="%1$s">the FAQ for this plug-in</a> <span>(required)</span>','wp-to-twitter'),'http://www.joedolson.com/articles/wp-to-twitter/support-2/')."
|
316 |
+
</p>
|
317 |
+
<p>
|
318 |
+
<input type='checkbox' name='has_donated' id='has_donated' value='on' $checked /> <label for='has_donated'>".sprintf(__('I have <a href="%1$s">made a donation to help support this plug-in</a>','wp-to-twitter'),'http://www.joedolson.com/donate.php')."</label>
|
319 |
+
</p>
|
320 |
+
<p>
|
321 |
+
<label for='support_request'>".__('Support Request:','wp-to-twitter')."</label><br /><textarea class='support-request' name='support_request' id='support_request' cols='80' rows='10'>".stripslashes($request)."</textarea>
|
322 |
+
</p>
|
323 |
+
<p>
|
324 |
+
<input type='submit' value='".__('Send Support Request','wp-to-twitter')."' name='wpt_support' class='button-primary' />
|
325 |
+
</p>
|
326 |
+
<p>".
|
327 |
+
__('The following additional information will be sent with your support request:','wp-to-twitter')
|
328 |
+
."</p>
|
329 |
+
<div class='mc_support'>
|
330 |
+
".wpautop($data)."
|
331 |
+
</div>
|
332 |
+
</div>
|
333 |
+
</form>";
|
334 |
+
}
|
wpt-widget.php
ADDED
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* wpt Latest Tweets widget class.
|
4 |
+
*/
|
5 |
+
|
6 |
+
function wpt_get_user( $twitter_ID=false ) {
|
7 |
+
if ( !$twitter_ID ) return;
|
8 |
+
$options = array('screen_name' => $twitter_ID );
|
9 |
+
$key = get_option('app_consumer_key');
|
10 |
+
$secret = get_option('app_consumer_secret');
|
11 |
+
$token = get_option('oauth_token');
|
12 |
+
$token_secret = get_option('oauth_token_secret');
|
13 |
+
$connection = new jd_TwitterOAuth($key, $secret, $token, $token_secret);
|
14 |
+
$protocol = ( get_option( 'wpt_http' ) == '1' )?'http:':'https:';
|
15 |
+
$result = $connection->get($protocol."//api.twitter.com/1.1/users/show.json?screen_name=$twitter_ID", $options);
|
16 |
+
return json_decode($result);
|
17 |
+
}
|
18 |
+
|
19 |
+
class WPT_Latest_Tweets_Widget extends WP_Widget {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Holds widget settings defaults, populated in constructor.
|
23 |
+
*
|
24 |
+
* @var array
|
25 |
+
*/
|
26 |
+
protected $defaults;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructor. Set the default widget options and create widget.
|
30 |
+
*
|
31 |
+
* @since 0.1.8
|
32 |
+
*/
|
33 |
+
function __construct() {
|
34 |
+
|
35 |
+
$this->defaults = array(
|
36 |
+
'title' => '',
|
37 |
+
'twitter_id' => '',
|
38 |
+
'twitter_num' => '',
|
39 |
+
'twitter_duration' => '',
|
40 |
+
'twitter_hide_replies' => 0,
|
41 |
+
'link_links'=>'',
|
42 |
+
'link_mentions'=>'',
|
43 |
+
'link_hashtags'=>'',
|
44 |
+
'intents'=>'',
|
45 |
+
'source'=>''
|
46 |
+
);
|
47 |
+
|
48 |
+
$widget_ops = array(
|
49 |
+
'classname' => 'wpt-latest-tweets',
|
50 |
+
'description' => __( 'Display a list of your latest tweets.', 'wp-to-twitter' ),
|
51 |
+
);
|
52 |
+
|
53 |
+
$control_ops = array(
|
54 |
+
'id_base' => 'wpt-latest-tweets',
|
55 |
+
'width' => 200,
|
56 |
+
'height' => 250,
|
57 |
+
);
|
58 |
+
|
59 |
+
$this->WP_Widget( 'wpt-latest-tweets', __( 'WP to Twitter - Latest Tweets', 'wp-to-twitter' ), $widget_ops, $control_ops );
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Echo the widget content.
|
65 |
+
*
|
66 |
+
* @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
|
67 |
+
* @param array $instance The settings for the particular instance of the widget
|
68 |
+
*/
|
69 |
+
|
70 |
+
function widget( $args, $instance ) {
|
71 |
+
extract( $args );
|
72 |
+
wp_enqueue_script( 'twitter-platform', "https://platform.twitter.com/widgets.js" );
|
73 |
+
wp_enqueue_style( 'wpt-twitter-feed' );
|
74 |
+
/** Merge with defaults */
|
75 |
+
$instance = wp_parse_args( (array) $instance, $this->defaults );
|
76 |
+
echo $before_widget;
|
77 |
+
if ( $instance['title'] ) {
|
78 |
+
echo $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title;
|
79 |
+
}
|
80 |
+
echo '<div class="wpt-header">';
|
81 |
+
$user = wpt_get_user( $instance['twitter_id'] );
|
82 |
+
$avatar = $user->profile_image_url_https;
|
83 |
+
$name = $user->name;
|
84 |
+
$verified = $user->verified;
|
85 |
+
$img_alignment = ( is_rtl() )?'wpt-right':'wpt-left';
|
86 |
+
$follow_alignment = ( is_rtl() )?'wpt-left':'wpt-right';
|
87 |
+
$follow_url = esc_url( 'https://twitter.com/'.$instance['twitter_id'] );
|
88 |
+
$follow_button = apply_filters ( 'wpt_follow_button', "<a href='$follow_url' class='twitter-follow-button $follow_alignment' data-width='30px' data-show-screen-name='false' data-size='large' data-show-count='false' data-lang='en'>Follow @$instance[twitter_id]</a>" );
|
89 |
+
echo "<p>
|
90 |
+
$follow_button
|
91 |
+
<img src='$avatar' alt='' class='wpt-twitter-avatar $img_alignment' />
|
92 |
+
<span class='wpt-twitter-name'>$name</span><br />
|
93 |
+
<span class='wpt-twitter-id'><a href='$follow_url'>@$instance[twitter_id]</a></span>
|
94 |
+
</p>";
|
95 |
+
echo '</div>';
|
96 |
+
echo '<ul>' . "\n";
|
97 |
+
|
98 |
+
$options['exclude_replies'] = $instance['twitter_hide_replies'];
|
99 |
+
$options['include_rts'] = $instance['twitter_include_rts'];
|
100 |
+
$opts['links'] = $instance['link_links'];
|
101 |
+
$opts['mentions'] = $instance['link_mentions'];
|
102 |
+
$opts['hashtags'] = $instance['link_hashtags'];
|
103 |
+
$rawtweets = WPT_getTweets($instance['twitter_num'], $instance['twitter_id'], $options);
|
104 |
+
|
105 |
+
if ( isset( $rawtweets['error'] ) ) {
|
106 |
+
echo "<li>".$rawtweets['error']."</li>";
|
107 |
+
} else {
|
108 |
+
/** Build the tweets array */
|
109 |
+
$tweets = array();
|
110 |
+
foreach ( $rawtweets as $tweet ) {
|
111 |
+
|
112 |
+
if ( is_object( $tweet ) ) {
|
113 |
+
$tweet = json_decode( json_encode( $tweet ), true );
|
114 |
+
}
|
115 |
+
if ( $instance['source'] ) {
|
116 |
+
$source = $tweet['source'];
|
117 |
+
$timetweet = sprintf( __( '<a href="%3$s">about %1$s ago</a> via %2$s', 'wp-to-twitter' ), human_time_diff( strtotime( $tweet['created_at'] ) ), $source, "http://twitter.com/$instance[twitter_id]/status/$tweet[id_str]" );
|
118 |
+
} else {
|
119 |
+
$timetweet = sprintf( __( '<a href="%2$s">about %1$s ago</a>', 'wp-to-twitter' ), human_time_diff( strtotime( $tweet['created_at'] ) ), "http://twitter.com/$instance[twitter_id]/status/$tweet[id_str]" );
|
120 |
+
}
|
121 |
+
$tweet_classes = wpt_generate_classes( $tweet );
|
122 |
+
|
123 |
+
$intents = ( $instance['intents'] )?"<div class='wpt-intents-border'></div><div class='wpt-intents'><a class='wpt-reply' href='https://twitter.com/intent/tweet?in_reply_to=$tweet[id_str]'><span></span>Reply</a> <a class='wpt-retweet' href='https://twitter.com/intent/retweet?tweet_id=$tweet[id_str]'><span></span>Retweet</a> <a class='wpt-favorite' href='https://twitter.com/intent/favorite?tweet_id=$tweet[id_str]'><span></span>Favorite</a></div>":'';
|
124 |
+
/** Add tweet to array */
|
125 |
+
$tweets[] = '<li class="'.$tweet_classes.'">' . WPT_tweet_linkify( $tweet['text'], $opts ) . "<br /><span class='wpt-tweet-time'>$timetweet</span> $intents</li>\n";
|
126 |
+
}
|
127 |
+
}
|
128 |
+
if ( is_array( $tweets ) ) {
|
129 |
+
foreach( $tweets as $tweet ) {
|
130 |
+
echo $tweet;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
echo '</ul>' . "\n";
|
134 |
+
echo $after_widget;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Update a particular instance.
|
139 |
+
*
|
140 |
+
* This function should check that $new_instance is set correctly.
|
141 |
+
* The newly calculated value of $instance should be returned.
|
142 |
+
* If "false" is returned, the instance won't be saved/updated.
|
143 |
+
*
|
144 |
+
* @since 0.1
|
145 |
+
*
|
146 |
+
* @param array $new_instance New settings for this instance as input by the user via form()
|
147 |
+
* @param array $old_instance Old settings for this instance
|
148 |
+
* @return array Settings to save or bool false to cancel saving
|
149 |
+
*/
|
150 |
+
function update( $new_instance, $old_instance ) {
|
151 |
+
/** Force the transient to refresh */
|
152 |
+
delete_transient( 'wpt_tdf_cache_expire' );
|
153 |
+
$new_instance['title'] = strip_tags( $new_instance['title'] );
|
154 |
+
return $new_instance;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Echo the settings update form.
|
159 |
+
*
|
160 |
+
* @param array $instance Current settings
|
161 |
+
*/
|
162 |
+
function form( $instance ) {
|
163 |
+
|
164 |
+
/** Merge with defaults */
|
165 |
+
$instance = wp_parse_args( (array) $instance, $this->defaults );
|
166 |
+
|
167 |
+
?>
|
168 |
+
<p>
|
169 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'wp-to-twitter' ); ?>:</label>
|
170 |
+
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" class="widefat" />
|
171 |
+
</p>
|
172 |
+
|
173 |
+
<p>
|
174 |
+
<label for="<?php echo $this->get_field_id( 'twitter_id' ); ?>"><?php _e( 'Twitter Username', 'wp-to-twitter' ); ?>:</label>
|
175 |
+
<input type="text" id="<?php echo $this->get_field_id( 'twitter_id' ); ?>" name="<?php echo $this->get_field_name( 'twitter_id' ); ?>" value="<?php echo esc_attr( $instance['twitter_id'] ); ?>" class="widefat" />
|
176 |
+
</p>
|
177 |
+
|
178 |
+
<p>
|
179 |
+
<label for="<?php echo $this->get_field_id( 'twitter_num' ); ?>"><?php _e( 'Number of Tweets to Show', 'wp-to-twitter' ); ?>:</label>
|
180 |
+
<input type="text" id="<?php echo $this->get_field_id( 'twitter_num' ); ?>" name="<?php echo $this->get_field_name( 'twitter_num' ); ?>" value="<?php echo esc_attr( $instance['twitter_num'] ); ?>" size="3" />
|
181 |
+
</p>
|
182 |
+
|
183 |
+
<p>
|
184 |
+
<input id="<?php echo $this->get_field_id( 'twitter_hide_replies' ); ?>" type="checkbox" name="<?php echo $this->get_field_name( 'twitter_hide_replies' ); ?>" value="1" <?php checked( $instance['twitter_hide_replies'] ); ?>/>
|
185 |
+
<label for="<?php echo $this->get_field_id( 'twitter_hide_replies' ); ?>"><?php _e( 'Hide @ Replies', 'wp-to-twitter' ); ?></label>
|
186 |
+
</p>
|
187 |
+
|
188 |
+
<p>
|
189 |
+
<input id="<?php echo $this->get_field_id( 'twitter_include_rts' ); ?>" type="checkbox" name="<?php echo $this->get_field_name( 'twitter_include_rts' ); ?>" value="1" <?php checked( $instance['twitter_include_rts'] ); ?>/>
|
190 |
+
<label for="<?php echo $this->get_field_id( 'twitter_include_rts' ); ?>"><?php _e( 'Include Retweets', 'wp-to-twitter' ); ?></label>
|
191 |
+
</p>
|
192 |
+
|
193 |
+
<p>
|
194 |
+
<input id="<?php echo $this->get_field_id( 'link_links' ); ?>" type="checkbox" name="<?php echo $this->get_field_name( 'link_links' ); ?>" value="1" <?php checked( $instance['link_links'] ); ?>/>
|
195 |
+
<label for="<?php echo $this->get_field_id( 'link_links' ); ?>"><?php _e( 'Parse links', 'wp-to-twitter' ); ?></label>
|
196 |
+
</p>
|
197 |
+
|
198 |
+
<p>
|
199 |
+
<input id="<?php echo $this->get_field_id( 'link_mentions' ); ?>" type="checkbox" name="<?php echo $this->get_field_name( 'link_mentions' ); ?>" value="1" <?php checked( $instance['link_mentions'] ); ?>/>
|
200 |
+
<label for="<?php echo $this->get_field_id( 'link_mentions' ); ?>"><?php _e( 'Parse @mentions', 'wp-to-twitter' ); ?></label>
|
201 |
+
</p>
|
202 |
+
|
203 |
+
<p>
|
204 |
+
<input id="<?php echo $this->get_field_id( 'link_hashtags' ); ?>" type="checkbox" name="<?php echo $this->get_field_name( 'link_hashtags' ); ?>" value="1" <?php checked( $instance['link_hashtags'] ); ?>/>
|
205 |
+
<label for="<?php echo $this->get_field_id( 'link_hashtags' ); ?>"><?php _e( 'Parse #hashtags', 'wp-to-twitter' ); ?></label>
|
206 |
+
</p>
|
207 |
+
|
208 |
+
<p>
|
209 |
+
<input id="<?php echo $this->get_field_id( 'intents' ); ?>" type="checkbox" name="<?php echo $this->get_field_name( 'intents' ); ?>" value="1" <?php checked( $instance['intents'] ); ?>/>
|
210 |
+
<label for="<?php echo $this->get_field_id( 'intents' ); ?>"><?php _e( 'Include Reply/Retweet/Favorite Links', 'wp-to-twitter' ); ?></label>
|
211 |
+
</p>
|
212 |
+
|
213 |
+
<p>
|
214 |
+
<input id="<?php echo $this->get_field_id( 'source' ); ?>" type="checkbox" name="<?php echo $this->get_field_name( 'source' ); ?>" value="1" <?php checked( $instance['source'] ); ?>/>
|
215 |
+
<label for="<?php echo $this->get_field_id( 'source' ); ?>"><?php _e( 'Include Tweet source', 'wp-to-twitter' ); ?></label>
|
216 |
+
</p>
|
217 |
+
|
218 |
+
<?php
|
219 |
+
|
220 |
+
}
|
221 |
+
|
222 |
+
}
|
223 |
+
|
224 |
+
add_action( 'widgets_init', create_function( '', "register_widget('WPT_Latest_Tweets_Widget');" ) );
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Adds links to the contents of a tweet.
|
228 |
+
* Forked form genesis_tweet_linkify, removed the taraget = _blank
|
229 |
+
*
|
230 |
+
* Takes the content of a tweet, detects @replies, #hashtags, and
|
231 |
+
* http:// links, and links them appropriately.
|
232 |
+
*
|
233 |
+
* @since 0.1
|
234 |
+
*
|
235 |
+
* @link http://www.snipe.net/2009/09/php-twitter-clickable-links/
|
236 |
+
*
|
237 |
+
* @param string $text A string representing the content of a tweet
|
238 |
+
*
|
239 |
+
* @return string Linkified tweet content
|
240 |
+
*/
|
241 |
+
function WPT_tweet_linkify( $text, $opts ) {
|
242 |
+
$text = ( $opts['links'] == true )?preg_replace( "#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#", '\\1<a href="\\2" rel="nofollow">\\2</a>', $text ):$text;
|
243 |
+
$text = ( $opts['links'] == true )?preg_replace( "#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", '\\1<a href="http://\\2" rel="nofollow">\\2</a>', $text ):$text;
|
244 |
+
$text = ( $opts['mentions'] == true )?preg_replace( '/@(\w+)/', '<a href="http://www.twitter.com/\\1" rel="nofollow">@\\1</a>', $text ):$text;
|
245 |
+
$text = ( $opts['hashtags'] == true )?preg_replace( '/#(\w+)/', '<a href="http://search.twitter.com/search?q=\\1" rel="nofollow">#\\1</a>', $text ):$text;
|
246 |
+
return $text;
|
247 |
+
}
|
248 |
+
|
249 |
+
/* implement getTweets */
|
250 |
+
function WPT_getTweets($count = 20, $username = false, $options = false) {
|
251 |
+
|
252 |
+
$config['key'] = get_option('app_consumer_key');
|
253 |
+
$config['secret'] = get_option('app_consumer_secret');
|
254 |
+
$config['token'] = get_option('oauth_token');
|
255 |
+
$config['token_secret'] = get_option('oauth_token_secret');
|
256 |
+
$config['screenname'] = get_option('wtt_twitter_username');
|
257 |
+
$config['cache_expire'] = intval( apply_filters( 'wpt_cache_expire', 3600 ) );
|
258 |
+
if ($config['cache_expire'] < 1) $config['cache_expire'] = 3600;
|
259 |
+
$config['directory'] = plugin_dir_path(__FILE__);
|
260 |
+
|
261 |
+
$obj = new StormTwitter($config);
|
262 |
+
$res = $obj->getTweets($count, $username, $options);
|
263 |
+
update_option('wpt_tdf_last_error',$obj->st_last_error);
|
264 |
+
return $res;
|
265 |
+
|
266 |
+
}
|
267 |
+
|
268 |
+
function wpt_generate_classes( $tweet ) {
|
269 |
+
// take Tweet array and parse selected options into classes.
|
270 |
+
$classes[] = ( $tweet['favorited'] )?'favorited':'';
|
271 |
+
$clasees[] = ( $tweet['retweeted'] )?'retweeted':'';
|
272 |
+
$classes[] = ( $tweet['possibly_sensitive'] )?'sensitive':'';
|
273 |
+
$classes[] = 'lang-'.$tweet['lang'];
|
274 |
+
$class = trim( implode( ' ', $classes ) );
|
275 |
+
return $class;
|
276 |
+
}
|
wpt_twitter_oauth.php
ADDED
@@ -0,0 +1,255 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Abraham Williams (abraham@abrah.am) http://abrah.am
|
4 |
+
*
|
5 |
+
* The first PHP Library to support WPOAuth for Twitter's REST API.
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
|
9 |
+
/* Load WPOAuth lib. You can find it at http://WPOAuth.net */
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
+
|
12 |
+
require_once('WP_OAuth.php');
|
13 |
+
|
14 |
+
if (!class_exists('jd_TwitterOAuth')) {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Twitter WPOAuth class
|
18 |
+
*/
|
19 |
+
class jd_TwitterOAuth {
|
20 |
+
/* Contains the last HTTP status code returned */
|
21 |
+
public $http_code;
|
22 |
+
/* Contains the last API call. */
|
23 |
+
public $url;
|
24 |
+
/* Set up the API root URL. */
|
25 |
+
public $host = "http://api.twitter.com/1.1/";
|
26 |
+
/* Set timeout default. */
|
27 |
+
public $format = 'json';
|
28 |
+
/* Decode returned json data. */
|
29 |
+
public $decode_json = false;
|
30 |
+
/* Contains the last API call */
|
31 |
+
private $last_api_call;
|
32 |
+
/* containe the header */
|
33 |
+
public $http_header;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Set API URLS
|
37 |
+
*/
|
38 |
+
function accessTokenURL() { return "http://api.twitter.com/oauth/access_token"; }
|
39 |
+
function authenticateURL() { return "http://api.twitter.com/oauth/authenticate"; }
|
40 |
+
function authorizeURL() { return "http://api.twitter.com/oauth/authorize"; }
|
41 |
+
function requestTokenURL() { return "http://api.twitter.com/oauth/request_token"; }
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Debug helpers
|
45 |
+
*/
|
46 |
+
function lastStatusCode() { return $this->http_code; }
|
47 |
+
function lastAPICall() { return $this->last_api_call; }
|
48 |
+
|
49 |
+
/**
|
50 |
+
* construct TwitterWPOAuth object
|
51 |
+
*/
|
52 |
+
function __construct($consumer_key, $consumer_secret, $WPOAuth_token = NULL, $WPOAuth_token_secret = NULL) {
|
53 |
+
$this->sha1_method = new WPOAuthSignatureMethod_HMAC_SHA1();
|
54 |
+
$this->consumer = new WPOAuthConsumer($consumer_key, $consumer_secret);
|
55 |
+
if (!empty($WPOAuth_token) && !empty($WPOAuth_token_secret)) {
|
56 |
+
$this->token = new WPOAuthConsumer($WPOAuth_token, $WPOAuth_token_secret);
|
57 |
+
} else {
|
58 |
+
$this->token = NULL;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Get a request_token from Twitter
|
65 |
+
*
|
66 |
+
* @returns a key/value array containing WPOAuth_token and WPOAuth_token_secret
|
67 |
+
*/
|
68 |
+
function getRequestToken() {
|
69 |
+
$r = $this->WPOAuthRequest($this->requestTokenURL());
|
70 |
+
$token = $this->WPOAuthParseResponse($r);
|
71 |
+
$this->token = new WPOAuthConsumer($token['WPOAuth_token'], $token['WPOAuth_token_secret']);
|
72 |
+
return $token;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Parse a URL-encoded WPOAuth response
|
77 |
+
*
|
78 |
+
* @return a key/value array
|
79 |
+
*/
|
80 |
+
function WPOAuthParseResponse($responseString) {
|
81 |
+
$r = array();
|
82 |
+
foreach (explode('&', $responseString) as $param) {
|
83 |
+
$pair = explode('=', $param, 2);
|
84 |
+
if (count($pair) != 2) continue;
|
85 |
+
$r[urldecode($pair[0])] = urldecode($pair[1]);
|
86 |
+
}
|
87 |
+
return $r;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get the authorize URL
|
92 |
+
*
|
93 |
+
* @returns a string
|
94 |
+
*/
|
95 |
+
function getAuthorizeURL($token) {
|
96 |
+
if (is_array($token)) $token = $token['WPOAuth_token'];
|
97 |
+
return $this->authorizeURL() . '?WPOAuth_token=' . $token;
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Get the authenticate URL
|
103 |
+
*
|
104 |
+
* @returns a string
|
105 |
+
*/
|
106 |
+
function getAuthenticateURL($token) {
|
107 |
+
if (is_array($token)) $token = $token['WPOAuth_token'];
|
108 |
+
return $this->authenticateURL() . '?WPOAuth_token=' . $token;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Exchange the request token and secret for an access token and
|
113 |
+
* secret, to sign API calls.
|
114 |
+
*
|
115 |
+
* @returns array("WPOAuth_token" => the access token,
|
116 |
+
* "WPOAuth_token_secret" => the access secret)
|
117 |
+
*/
|
118 |
+
function getAccessToken($token = NULL) {
|
119 |
+
$r = $this->WPOAuthRequest($this->accessTokenURL());
|
120 |
+
$token = $this->WPOAuthParseResponse($r);
|
121 |
+
$this->token = new WPOAuthConsumer($token['WPOAuth_token'], $token['WPOAuth_token_secret']);
|
122 |
+
return $token;
|
123 |
+
}
|
124 |
+
/**
|
125 |
+
* Wrapper for POST requests
|
126 |
+
*/
|
127 |
+
function post($url, $parameters = array()) {
|
128 |
+
$response = $this->WPOAuthRequest( $url,$parameters,'POST' );
|
129 |
+
if ($this->format === 'json' && $this->decode_json) {
|
130 |
+
return json_decode($response);
|
131 |
+
}
|
132 |
+
return $response;
|
133 |
+
}
|
134 |
+
/**
|
135 |
+
* Wrapper for MEDIA requests
|
136 |
+
*/
|
137 |
+
function media($url, $parameters = array()) {
|
138 |
+
$response = $this->WPOAuthRequest( $url,$parameters,'MEDIA' );
|
139 |
+
if ($this->format === 'json' && $this->decode_json) {
|
140 |
+
return json_decode($response);
|
141 |
+
}
|
142 |
+
return $response;
|
143 |
+
}
|
144 |
+
/**
|
145 |
+
* Wrapper for GET requests
|
146 |
+
*/
|
147 |
+
function get($url, $parameters = array()) {
|
148 |
+
$response = $this->WPOAuthRequest( $url,$parameters,'GET' );
|
149 |
+
if ($this->format === 'json' && $this->decode_json) {
|
150 |
+
return json_decode($response);
|
151 |
+
}
|
152 |
+
return $response;
|
153 |
+
}
|
154 |
+
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Handles a status update that includes an image.
|
158 |
+
* @param type $url
|
159 |
+
* @param type $args
|
160 |
+
* @return boolean
|
161 |
+
*/
|
162 |
+
function handleMediaRequest($url, $args = array()) {
|
163 |
+
// JCD TEST THIS
|
164 |
+
/* Load tmhOAuth for Media uploads only when needed: https://github.com/themattharris/tmhOAuth */
|
165 |
+
if ( !class_exists( 'tmhOAuth' ) ) {
|
166 |
+
require_once('tmhOAuth/tmhOAuth.php');
|
167 |
+
require_once('tmhOAuth/tmhUtilities.php');
|
168 |
+
}
|
169 |
+
$auth = $args['auth'];
|
170 |
+
if ( !$auth ) {
|
171 |
+
$ack = get_option('app_consumer_key');
|
172 |
+
$acs = get_option('app_consumer_secret');
|
173 |
+
$ot = get_option('oauth_token');
|
174 |
+
$ots = get_option('oauth_token_secret');
|
175 |
+
} else {
|
176 |
+
$ack = get_user_meta( $auth,'app_consumer_key',true);
|
177 |
+
$acs = get_user_meta( $auth,'app_consumer_secret',true);
|
178 |
+
$ot = get_user_meta( $auth,'oauth_token',true);
|
179 |
+
$ots = get_user_meta( $auth,'oauth_token_secret',true);
|
180 |
+
}
|
181 |
+
$connect = array( 'consumer_key'=>$ack, 'consumer_secret'=>$acs, 'user_token'=>$ot, 'user_secret'=>$ots );
|
182 |
+
$tmhOAuth = new tmhOAuth( $connect );
|
183 |
+
$attachment = wpt_post_attachment($args['id']);
|
184 |
+
|
185 |
+
if ($attachment == null) return false;
|
186 |
+
$img_medium = wp_get_attachment_image_src($attachment,'medium');
|
187 |
+
// when performing as a scheduled action, need to include file.php
|
188 |
+
if ( !function_exists( 'get_home_path' ) ) {
|
189 |
+
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
190 |
+
}
|
191 |
+
// get_home_path() and make link relative both return slashed, so we have an extra.
|
192 |
+
$subject = get_home_path() . wp_make_link_relative($img_medium[0]);
|
193 |
+
$image = str_replace( '//', '/', $subject );
|
194 |
+
|
195 |
+
$code = $tmhOAuth->request(
|
196 |
+
'POST',
|
197 |
+
$url,
|
198 |
+
array(
|
199 |
+
'media[]' => "@{$image};type=image/jpeg;filename={$image}",
|
200 |
+
'status' => $args['status'],
|
201 |
+
),
|
202 |
+
true, // use auth
|
203 |
+
true // multipart
|
204 |
+
);
|
205 |
+
|
206 |
+
$response = $tmhOAuth->response['response'];
|
207 |
+
if ( is_wp_error( $response ) ) return false;
|
208 |
+
|
209 |
+
$this->http_code = $code;
|
210 |
+
$this->last_api_call = $url;
|
211 |
+
$this->format = 'json';
|
212 |
+
$this->http_header = $response;
|
213 |
+
return $response;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Format and sign an WPOAuth / API request
|
218 |
+
*/
|
219 |
+
function WPOAuthRequest($url, $args = array(), $method = NULL) {
|
220 |
+
|
221 |
+
//Handle media requests using tmhOAuth library.
|
222 |
+
if ($method == 'MEDIA') {
|
223 |
+
return $this->handleMediaRequest($url,$args);
|
224 |
+
}
|
225 |
+
|
226 |
+
if (empty($method)) $method = empty($args) ? "GET" : "POST";
|
227 |
+
$req = WPOAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $args);
|
228 |
+
$req->sign_request($this->sha1_method, $this->consumer, $this->token);
|
229 |
+
|
230 |
+
$response = false;
|
231 |
+
$url = null;
|
232 |
+
|
233 |
+
switch ($method) {
|
234 |
+
case 'GET':
|
235 |
+
$url = $req->to_url();
|
236 |
+
$response = wp_remote_get( $url );
|
237 |
+
break;
|
238 |
+
case 'POST':
|
239 |
+
$url = $req->get_normalized_http_url();
|
240 |
+
$args = wp_parse_args($req->to_postdata());
|
241 |
+
$response = wp_remote_post( $url, array('body'=>$args,'timeout' => 30));
|
242 |
+
break;
|
243 |
+
}
|
244 |
+
|
245 |
+
if ( is_wp_error( $response ) ) return false;
|
246 |
+
|
247 |
+
$this->http_code = $response['response']['code'];
|
248 |
+
$this->last_api_call = $url;
|
249 |
+
$this->format = 'json';
|
250 |
+
$this->http_header = $response['headers'];
|
251 |
+
|
252 |
+
return $response['body'];
|
253 |
+
}
|
254 |
+
}
|
255 |
+
}
|