1 |
commit: ad3f35663e4e2b80a92166b590d3e2052b5aab91 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 24 00:02:23 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 24 00:02:50 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=ad3f3566 |
7 |
|
8 |
Update plugin jetpack to 4.2.2 |
9 |
|
10 |
plugins/jetpack/3rd-party/3rd-party.php | 4 +- |
11 |
plugins/jetpack/3rd-party/bitly.php | 4 +- |
12 |
plugins/jetpack/3rd-party/polldaddy.php | 7 + |
13 |
plugins/jetpack/3rd-party/vaultpress.php | 13 - |
14 |
plugins/jetpack/_inc/jquery.jetpack-sync.js | 68 -- |
15 |
plugins/jetpack/_inc/lib/tonesque.php | 22 +- |
16 |
plugins/jetpack/changelog.txt | 89 +- |
17 |
plugins/jetpack/class.jetpack-admin.php | 3 +- |
18 |
.../class.jetpack-bbpress-json-api-compat.php | 10 - |
19 |
plugins/jetpack/class.jetpack-cli.php | 8 +- |
20 |
plugins/jetpack/class.jetpack-client-server.php | 34 +- |
21 |
plugins/jetpack/class.jetpack-debugger.php | 102 +- |
22 |
plugins/jetpack/class.jetpack-heartbeat.php | 4 + |
23 |
.../jetpack/class.jetpack-modules-list-table.php | 3 + |
24 |
plugins/jetpack/class.jetpack-options.php | 32 +- |
25 |
plugins/jetpack/class.jetpack-signature.php | 6 +- |
26 |
plugins/jetpack/class.jetpack-sync.php | 1104 -------------------- |
27 |
plugins/jetpack/class.jetpack-twitter-cards.php | 2 +- |
28 |
plugins/jetpack/class.jetpack-user-agent.php | 90 +- |
29 |
plugins/jetpack/class.jetpack-xmlrpc-server.php | 54 +- |
30 |
plugins/jetpack/class.jetpack.php | 760 ++++---------- |
31 |
plugins/jetpack/css/jetpack-admin.css.map | 2 +- |
32 |
plugins/jetpack/css/jetpack-rtl.css | 2 +- |
33 |
plugins/jetpack/css/jetpack.css | 2 +- |
34 |
plugins/jetpack/functions.opengraph.php | 4 +- |
35 |
plugins/jetpack/jetpack.php | 9 +- |
36 |
plugins/jetpack/json-endpoints.php | 127 ++- |
37 |
.../class.wpcom-json-api-comment-endpoint.php | 2 + |
38 |
.../class.wpcom-json-api-get-site-endpoint.php | 5 +- |
39 |
.../class.wpcom-json-api-post-endpoint.php | 1 - |
40 |
...class.wpcom-json-api-site-settings-endpoint.php | 4 +- |
41 |
...lass.wpcom-json-api-update-comment-endpoint.php | 2 +- |
42 |
.../class.jetpack-json-api-plugins-endpoint.php | 3 +- |
43 |
...s.jetpack-json-api-plugins-install-endpoint.php | 3 +- |
44 |
.../class.jetpack-json-api-sync-endpoint.php | 179 +++- |
45 |
.../jetpack/json-api-jetpack-endpoints.php | 118 +++ |
46 |
plugins/jetpack/modules/after-the-deadline.php | 2 +- |
47 |
.../jetpack/modules/carousel/jetpack-carousel.js | 8 + |
48 |
.../jetpack/modules/carousel/jetpack-carousel.php | 26 +- |
49 |
plugins/jetpack/modules/comments.php | 9 - |
50 |
.../modules/contact-form/grunion-contact-form.php | 44 +- |
51 |
.../modules/custom-css/csstidy/class.csstidy.php | 2 +- |
52 |
.../custom-css/csstidy/class.csstidy_optimise.php | 2 +- |
53 |
.../custom-css/csstidy/class.csstidy_print.php | 2 +- |
54 |
.../modules/custom-css/csstidy/data-wp.inc.php | 1 + |
55 |
plugins/jetpack/modules/custom-css/custom-css.php | 11 +- |
56 |
.../modules/custom-post-types/portfolios.php | 14 +- |
57 |
.../modules/custom-post-types/testimonial.php | 2 +- |
58 |
plugins/jetpack/modules/enhanced-distribution.php | 24 +- |
59 |
plugins/jetpack/modules/gravatar-hovercards.php | 2 +- |
60 |
plugins/jetpack/modules/infinite-scroll.php | 2 +- |
61 |
.../jetpack/modules/infinite-scroll/infinity.js | 12 +- |
62 |
.../jetpack/modules/infinite-scroll/infinity.php | 25 +- |
63 |
.../infinite-scroll/themes/twentyeleven.php | 6 +- |
64 |
.../infinite-scroll/themes/twentyfifteen.php | 6 +- |
65 |
.../infinite-scroll/themes/twentyfourteen.php | 4 +- |
66 |
.../infinite-scroll/themes/twentysixteen.php | 6 +- |
67 |
.../modules/infinite-scroll/themes/twentyten.php | 6 +- |
68 |
.../infinite-scroll/themes/twentythirteen.php | 4 +- |
69 |
.../infinite-scroll/themes/twentytwelve.php | 6 +- |
70 |
plugins/jetpack/modules/json-api.php | 5 +- |
71 |
plugins/jetpack/modules/likes.php | 144 +-- |
72 |
plugins/jetpack/modules/manage.php | 13 - |
73 |
plugins/jetpack/modules/manage/confirm-admin.php | 5 + |
74 |
plugins/jetpack/modules/markdown/easy-markdown.php | 6 +- |
75 |
plugins/jetpack/modules/minileven.php | 6 +- |
76 |
plugins/jetpack/modules/minileven/minileven.php | 2 +- |
77 |
.../minileven/theme/pub/minileven/footer.php | 2 +- |
78 |
plugins/jetpack/modules/monitor.php | 3 - |
79 |
plugins/jetpack/modules/notes.php | 23 - |
80 |
plugins/jetpack/modules/post-by-email.php | 7 - |
81 |
plugins/jetpack/modules/protect.php | 10 +- |
82 |
plugins/jetpack/modules/publicize.php | 33 - |
83 |
.../modules/publicize/publicize-jetpack.php | 38 +- |
84 |
plugins/jetpack/modules/publicize/publicize.php | 6 +- |
85 |
plugins/jetpack/modules/related-posts.php | 16 - |
86 |
.../related-posts/jetpack-related-posts.php | 4 +- |
87 |
plugins/jetpack/modules/sharedaddy/sharedaddy.php | 2 +- |
88 |
.../jetpack/modules/sharedaddy/sharing-sources.php | 22 +- |
89 |
plugins/jetpack/modules/sharedaddy/sharing.css | 3 +- |
90 |
plugins/jetpack/modules/sharedaddy/sharing.js | 6 +- |
91 |
plugins/jetpack/modules/shortcodes.php | 7 +- |
92 |
plugins/jetpack/modules/shortcodes/cartodb.php | 21 +- |
93 |
plugins/jetpack/modules/shortcodes/dailymotion.php | 114 +- |
94 |
plugins/jetpack/modules/shortcodes/slideshow.php | 2 +- |
95 |
plugins/jetpack/modules/shortcodes/soundcloud.php | 2 +- |
96 |
plugins/jetpack/modules/shortcodes/vimeo.php | 8 +- |
97 |
plugins/jetpack/modules/shortcodes/wufoo.php | 2 +- |
98 |
plugins/jetpack/modules/shortcodes/youtube.php | 23 +- |
99 |
plugins/jetpack/modules/site-icon.php | 2 - |
100 |
.../modules/site-icon/jetpack-site-icon.php | 2 +- |
101 |
plugins/jetpack/modules/sitemaps/sitemap-xsl.php | 32 +- |
102 |
plugins/jetpack/modules/sso.php | 8 +- |
103 |
.../jetpack/modules/sso/jetpack-sso-login-rtl.css | 6 + |
104 |
.../modules/sso/jetpack-sso-login-rtl.min.css | 2 +- |
105 |
plugins/jetpack/modules/sso/jetpack-sso-login.css | 6 + |
106 |
plugins/jetpack/modules/sso/jetpack-sso-login.js | 2 +- |
107 |
.../jetpack/modules/sso/jetpack-sso-login.min.css | 2 +- |
108 |
plugins/jetpack/modules/stats.php | 23 - |
109 |
plugins/jetpack/modules/subscriptions.php | 18 - |
110 |
.../modules/theme-tools/random-redirect.php | 6 +- |
111 |
.../modules/theme-tools/site-breadcrumbs.php | 70 +- |
112 |
.../modules/tiled-gallery/tiled-gallery.php | 2 +- |
113 |
.../verification-tools/blog-verification-tools.php | 2 +- |
114 |
.../modules/videopress/js/videopress-admin.js | 2 +- |
115 |
plugins/jetpack/modules/widgets/contact-info.php | 72 +- |
116 |
.../widgets/contact-info/contact-info-admin.js | 8 + |
117 |
.../widgets/contact-info/contact-info-map.css | 15 +- |
118 |
.../widgets/contact-info/contact-info-map.js | 41 - |
119 |
.../jetpack/modules/widgets/gravatar-profile.php | 2 +- |
120 |
.../jetpack/modules/widgets/social-media-icons.php | 2 +- |
121 |
plugins/jetpack/modules/widgets/top-posts.php | 2 +- |
122 |
.../jetpack/modules/widgets/top-posts/style.css | 2 +- |
123 |
.../jetpack/modules/widgets/twitter-timeline.php | 2 +- |
124 |
plugins/jetpack/readme.txt | 76 +- |
125 |
plugins/jetpack/sal/class.json-api-links.php | 8 +- |
126 |
plugins/jetpack/sal/class.json-api-post-base.php | 1 - |
127 |
plugins/jetpack/sal/class.json-api-site-base.php | 2 +- |
128 |
.../sal/class.json-api-site-jetpack-base.php | 39 +- |
129 |
.../jetpack/sal/class.json-api-site-jetpack.php | 33 +- |
130 |
.../jetpack/sync/class.jetpack-sync-actions.php | 285 +++++ |
131 |
.../jetpack/sync/class.jetpack-sync-defaults.php | 276 +++++ |
132 |
.../jetpack/sync/class.jetpack-sync-functions.php | 157 +++ |
133 |
.../sync/class.jetpack-sync-json-deflate-codec.php | 58 + |
134 |
.../jetpack/sync/class.jetpack-sync-listener.php | 207 ++++ |
135 |
.../sync/class.jetpack-sync-module-attachments.php | 28 + |
136 |
.../sync/class.jetpack-sync-module-callables.php | 148 +++ |
137 |
.../sync/class.jetpack-sync-module-comments.php | 131 +++ |
138 |
.../sync/class.jetpack-sync-module-constants.php | 124 +++ |
139 |
.../sync/class.jetpack-sync-module-full-sync.php | 289 +++++ |
140 |
.../sync/class.jetpack-sync-module-meta.php | 38 + |
141 |
.../class.jetpack-sync-module-network-options.php | 112 ++ |
142 |
.../sync/class.jetpack-sync-module-options.php | 141 +++ |
143 |
.../sync/class.jetpack-sync-module-plugins.php | 14 + |
144 |
.../sync/class.jetpack-sync-module-posts.php | 135 +++ |
145 |
.../sync/class.jetpack-sync-module-protect.php | 16 + |
146 |
.../sync/class.jetpack-sync-module-stats.php | 28 + |
147 |
.../sync/class.jetpack-sync-module-terms.php | 112 ++ |
148 |
.../sync/class.jetpack-sync-module-themes.php | 71 ++ |
149 |
.../sync/class.jetpack-sync-module-updates.php | 85 ++ |
150 |
.../sync/class.jetpack-sync-module-users.php | 217 ++++ |
151 |
plugins/jetpack/sync/class.jetpack-sync-module.php | 107 ++ |
152 |
.../jetpack/sync/class.jetpack-sync-modules.php | 90 ++ |
153 |
plugins/jetpack/sync/class.jetpack-sync-queue.php | 419 ++++++++ |
154 |
plugins/jetpack/sync/class.jetpack-sync-sender.php | 321 ++++++ |
155 |
plugins/jetpack/sync/class.jetpack-sync-server.php | 106 ++ |
156 |
.../jetpack/sync/class.jetpack-sync-settings.php | 130 +++ |
157 |
plugins/jetpack/sync/class.jetpack-sync-users.php | 81 ++ |
158 |
.../sync/class.jetpack-sync-wp-replicastore.php | 702 +++++++++++++ |
159 |
.../jetpack/sync/interface.jetpack-sync-codec.php | 14 + |
160 |
.../sync/interface.jetpack-sync-replicastore.php | 129 +++ |
161 |
plugins/jetpack/uninstall.php | 10 +- |
162 |
plugins/jetpack/views/admin/my-jetpack-page.php | 1 + |
163 |
153 files changed, 6405 insertions(+), 2510 deletions(-) |
164 |
|
165 |
diff --git a/plugins/jetpack/3rd-party/3rd-party.php b/plugins/jetpack/3rd-party/3rd-party.php |
166 |
index 2bab75b..117f573 100644 |
167 |
--- a/plugins/jetpack/3rd-party/3rd-party.php |
168 |
+++ b/plugins/jetpack/3rd-party/3rd-party.php |
169 |
@@ -10,4 +10,6 @@ require_once( JETPACK__PLUGIN_DIR . '3rd-party/wpml.php' ); |
170 |
require_once( JETPACK__PLUGIN_DIR . '3rd-party/bitly.php' ); |
171 |
require_once( JETPACK__PLUGIN_DIR . '3rd-party/bbpress.php' ); |
172 |
require_once( JETPACK__PLUGIN_DIR . '3rd-party/woocommerce.php' ); |
173 |
-require_once( JETPACK__PLUGIN_DIR . '3rd-party/vaultpress.php' ); |
174 |
+ |
175 |
+// We can't load this conditionally since polldaddy add the call in class constuctor. |
176 |
+require_once( JETPACK__PLUGIN_DIR . '3rd-party/polldaddy.php' ); |
177 |
|
178 |
diff --git a/plugins/jetpack/3rd-party/bitly.php b/plugins/jetpack/3rd-party/bitly.php |
179 |
index eeca3b7..d9b744a 100644 |
180 |
--- a/plugins/jetpack/3rd-party/bitly.php |
181 |
+++ b/plugins/jetpack/3rd-party/bitly.php |
182 |
@@ -2,7 +2,7 @@ |
183 |
|
184 |
/* |
185 |
* Fixes issues with the Official Bitly for WordPress |
186 |
- * http://wordpress.org/plugins/bitly/ |
187 |
+ * https://wordpress.org/plugins/bitly/ |
188 |
*/ |
189 |
if( class_exists( 'Bitly' ) ) { |
190 |
|
191 |
@@ -10,7 +10,7 @@ if( class_exists( 'Bitly' ) ) { |
192 |
if ( method_exists( $GLOBALS['bitly'], 'og_tags' ) ) { |
193 |
remove_action( 'wp_head', array( $GLOBALS['bitly'], 'og_tags' ) ); |
194 |
} |
195 |
- |
196 |
+ |
197 |
add_action( 'wp_head', 'jetpack_bitly_og_tag', 100 ); |
198 |
} |
199 |
|
200 |
|
201 |
diff --git a/plugins/jetpack/3rd-party/polldaddy.php b/plugins/jetpack/3rd-party/polldaddy.php |
202 |
new file mode 100644 |
203 |
index 0000000..ec48482 |
204 |
--- /dev/null |
205 |
+++ b/plugins/jetpack/3rd-party/polldaddy.php |
206 |
@@ -0,0 +1,7 @@ |
207 |
+<?php |
208 |
+ |
209 |
+class Jetpack_Sync { |
210 |
+ static function sync_options() { |
211 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2', 'jetpack_options_whitelist filter' ); |
212 |
+ } |
213 |
+} |
214 |
|
215 |
diff --git a/plugins/jetpack/3rd-party/vaultpress.php b/plugins/jetpack/3rd-party/vaultpress.php |
216 |
deleted file mode 100644 |
217 |
index d2c1374..0000000 |
218 |
--- a/plugins/jetpack/3rd-party/vaultpress.php |
219 |
+++ /dev/null |
220 |
@@ -1,13 +0,0 @@ |
221 |
-<?php |
222 |
- |
223 |
-/** |
224 |
- * For backward compatibility with VaultPress 1.8.3 to play nicely with Jetpack 4.1 |
225 |
- */ |
226 |
-add_action( 'init', 'jetpack_vaultpress_sync_options' ); |
227 |
-function jetpack_vaultpress_sync_options() { |
228 |
- if ( ! class_exists( 'VaultPress' ) ) { |
229 |
- return; |
230 |
- } |
231 |
- $vaultpress = VaultPress::init(); |
232 |
- Jetpack_Sync::sync_options( __FILE__, $vaultpress->auto_register_option, $vaultpress->option_name ); |
233 |
-} |
234 |
|
235 |
diff --git a/plugins/jetpack/_inc/jquery.jetpack-sync.js b/plugins/jetpack/_inc/jquery.jetpack-sync.js |
236 |
deleted file mode 100644 |
237 |
index 2bbaa7d..0000000 |
238 |
--- a/plugins/jetpack/_inc/jquery.jetpack-sync.js |
239 |
+++ /dev/null |
240 |
@@ -1,68 +0,0 @@ |
241 |
-/* global ajaxurl */ |
242 |
-jQuery( document ).ready( function($) { |
243 |
- var update = function( cooldown ) { |
244 |
- var self = $( '.jetpack_sync_reindex_control' ), |
245 |
- data; |
246 |
- |
247 |
- self |
248 |
- .find( '.jetpack_sync_reindex_control_action' ) |
249 |
- .attr( 'disabled', true ); |
250 |
- |
251 |
- self |
252 |
- .find( '.jetpack_sync_reindex_control_status' ) |
253 |
- .html( '…' ); |
254 |
- |
255 |
- if ( 'DONE' === self.data( 'status' ) ) { |
256 |
- data = { action:'jetpack-sync-reindex-trigger' }; |
257 |
- } else { |
258 |
- data = { action:'jetpack-sync-reindex-status' }; |
259 |
- } |
260 |
- |
261 |
- $.getJSON( |
262 |
- ajaxurl, |
263 |
- data, |
264 |
- function( response ) { |
265 |
- var self = $( '.jetpack_sync_reindex_control' ), |
266 |
- strings, |
267 |
- status; |
268 |
- |
269 |
- if ( 0 === self.length ) { |
270 |
- return; |
271 |
- } |
272 |
- |
273 |
- strings = self.data( 'strings' ); |
274 |
- status = strings[response.status].status; |
275 |
- |
276 |
- if ( 'INDEXING' === response.status ) { |
277 |
- status += ' (' + Math.floor( 100 * response.posts.imported / response.posts.total ) + '%)'; |
278 |
- } |
279 |
- |
280 |
- self |
281 |
- .data( 'status', response.status ); |
282 |
- |
283 |
- self |
284 |
- .find( '.jetpack_sync_reindex_control_action' ) |
285 |
- .val( strings[response.status].action ); |
286 |
- |
287 |
- self |
288 |
- .find( '.jetpack_sync_reindex_control_status' ) |
289 |
- .text( status ); |
290 |
- |
291 |
- setTimeout( function() { |
292 |
- $( '.jetpack_sync_reindex_control' ) |
293 |
- .find( '.jetpack_sync_reindex_control_action' ) |
294 |
- .attr( 'disabled', false ); |
295 |
- }, cooldown ); |
296 |
- } |
297 |
- ); |
298 |
- }; |
299 |
- |
300 |
- $( '.jetpack_sync_reindex_control' ) |
301 |
- .find( '.jetpack_sync_reindex_control_action' ) |
302 |
- .live( 'click', function( event ) { |
303 |
- event.preventDefault(); |
304 |
- update( 5000 ); |
305 |
- } ); |
306 |
- |
307 |
- update( 1000 ); |
308 |
-} ); |
309 |
|
310 |
diff --git a/plugins/jetpack/_inc/lib/tonesque.php b/plugins/jetpack/_inc/lib/tonesque.php |
311 |
index 8f867a1..157f65c 100644 |
312 |
--- a/plugins/jetpack/_inc/lib/tonesque.php |
313 |
+++ b/plugins/jetpack/_inc/lib/tonesque.php |
314 |
@@ -37,27 +37,7 @@ class Tonesque { |
315 |
} |
316 |
|
317 |
public static function imagecreatefromurl( $image_url ) { |
318 |
- // Grab the extension |
319 |
- $file = strtolower( pathinfo( $image_url, PATHINFO_EXTENSION ) ); |
320 |
- $file = explode( '?', $file ); |
321 |
- $file = $file[ 0 ]; |
322 |
- |
323 |
- switch ( $file ) { |
324 |
- case 'gif' : |
325 |
- $image_obj = imagecreatefromgif( $image_url ); |
326 |
- break; |
327 |
- case 'png' : |
328 |
- $image_obj = imagecreatefrompng( $image_url ); |
329 |
- break; |
330 |
- case 'jpg' : |
331 |
- case 'jpeg' : |
332 |
- $image_obj = imagecreatefromjpeg( $image_url ); |
333 |
- break; |
334 |
- default: |
335 |
- return false; |
336 |
- } |
337 |
- |
338 |
- return $image_obj; |
339 |
+ return imagecreatefromstring( file_get_contents( $image_url ) ); |
340 |
} |
341 |
|
342 |
/** |
343 |
|
344 |
diff --git a/plugins/jetpack/changelog.txt b/plugins/jetpack/changelog.txt |
345 |
index de01d3b..ddad956 100644 |
346 |
--- a/plugins/jetpack/changelog.txt |
347 |
+++ b/plugins/jetpack/changelog.txt |
348 |
@@ -1,5 +1,82 @@ |
349 |
== Changelog == |
350 |
|
351 |
+= 4.2.2 = |
352 |
+ |
353 |
+* Release date: August 19th, 2016 |
354 |
+ |
355 |
+**Bug Fixes:** |
356 |
+ |
357 |
+* We fixed the code which displays the Facebook share count to accomodate Facebook's new data structure. |
358 |
+* We fixed an issue which caused PHP notices to get logged for users of the Twenty Fourteen theme. |
359 |
+* We fixed an issue with the Minileven mobile theme which was preventing it from loading. |
360 |
+* Improved Sync performance. |
361 |
+* Increase security by sanitizing a URL used in the SSO process. |
362 |
+ |
363 |
+= 4.2.1 = |
364 |
+ |
365 |
+* Release date: August 17th, 2016 |
366 |
+ |
367 |
+**Bug Fixes:** |
368 |
+ |
369 |
+* We fixed a conflict between Jetpack and W3 Total Cache. |
370 |
+* We fixed some issues with Publicize and Custom Post Types. |
371 |
+* Very large Multisite networks with lots of users can now be synchronized with WordPress.com. |
372 |
+* We improved the synchronization process between your site and WordPress.com. |
373 |
+ |
374 |
+= 4.2 = |
375 |
+ |
376 |
+* Release date: August 10th, 2016 |
377 |
+ |
378 |
+**Performance Enhancements:** |
379 |
+ |
380 |
+* We’ve improved Jetpack’s performance by making calls to the database more efficient; essentially, Jetpack is doing less on each page load, making things faster. #4281, #4316 |
381 |
+* We’ve ensured that every feature uses information that is up to date by completely refactoring the way information was synchronized between your site and WordPress.com. |
382 |
+* We've improved the way Jetpack queries for information about features, which results in less overall queries. |
383 |
+ |
384 |
+**Exciting Feature and UI Improvements:** |
385 |
+ |
386 |
+* We now track your visitor views of Carousel images in stats. |
387 |
+* You can now customize advanced typographic settings like ligatures in the Custom CSS editor with new support for the `font-feature-settings` property. |
388 |
+* We’ve improved the experience when you don’t actually have enough posts to Infinitely Scroll. |
389 |
+* Our Contact Info Widget allows you to enter a Google Maps API Key which is now required by Google if you want to display a map. |
390 |
+ |
391 |
+**Security:** |
392 |
+ |
393 |
+* We’re continuing our efforts to harden Jetpack security, by implementing the `hash_equals()` function to avoid timing attacks when comparing strings. We also improved security on CSVs exported from your contact form. |
394 |
+ |
395 |
+**Slightly Less Exciting Feature Improvements:** |
396 |
+ |
397 |
+* The Cartodb shortcode has been changed to match the new product name, Carto. |
398 |
+* The YouTube shortcode now uses the content width defined by the theme when available, even if an embed size was defined in an old version of WordPress. |
399 |
+* Breadcrumbs now support hierarchical post types and taxonomies. |
400 |
+* We’ve added the Portfolio Post Type to the WordPress.com REST API whitelist. |
401 |
+* There are a few new parameters for the Dailymotion shortcode. |
402 |
+ |
403 |
+**Improved Compatibility:** |
404 |
+ |
405 |
+* We now work well with WP Stagecoach staging sites, so you should not see any future impact on production sites. |
406 |
+* We had some PHP notices popping up in the WooCommerce plugin wizard screen, these are gone. |
407 |
+ |
408 |
+**Bug Fixes:** |
409 |
+ |
410 |
+* We stopped loading compatibility stylesheets on the default theme's singular views for Infinite Scroll. |
411 |
+* Debug tests forwarded through the contact form in the Jetpack Debug menu are now successfully sent to the support team. |
412 |
+* We’ve removed the PHP notices you might have seen when moderating comments. |
413 |
+* There are no longer PHP notices cropping up when publishing via Cron. |
414 |
+* We’ve fixed the official Sharing buttons so they now line up just right. |
415 |
+* The PHP warnings of Sitemaps stylesheets have been eliminated. |
416 |
+* We’ve done away with the warnings that appeared when Tonesque processes a file which claims to be one filetype, but is actually another. |
417 |
+* We’ve exterminated PHP notices that appeared when using Random Redirect, as well as when the author wasn't set. |
418 |
+ |
419 |
+= 4.1.1 = |
420 |
+ |
421 |
+* Release date: July 7th, 2016 |
422 |
+ |
423 |
+**Bug Fixes:** |
424 |
+ |
425 |
+* SSO: Use high-resolution Gravatar images on the log-in form on Retina devices. |
426 |
+* Publicize: improve reliability of Publicize when publishing new posts. |
427 |
+ |
428 |
= 4.1 = |
429 |
|
430 |
* Release date: July 6th, 2016 |
431 |
@@ -103,7 +180,7 @@ Bug Fixes: |
432 |
* We accidentally removed the ability for Open Graph to select images from slideshows, it’s up and running again. |
433 |
* There was an issue where Open Graph meta tags weren’t being set when your homepage is a “Static Front Page”, it’s working again. |
434 |
* In rare cases when developers were customizing Photon they were seeing a PHP notice when arguments were passed as a string rather than an array. This has been fixed. |
435 |
-* We’ve fixed an issue where Protect’s backup math form wasn’t showing on custom frontend login forms. |
436 |
+* We’ve fixed an issue where Protect’s backup math form wasn’t showing on custom front end login forms. |
437 |
* When setting up WooCommerce you might have seen a Related Posts notice which didn’t belong. We’ve eliminated them. |
438 |
* If you’ve been using our sharing tool with unofficial sharing buttons you might have noticed your sharing numbers were missing. They’re now back. |
439 |
* In unique situations where special characters were used in sitemap stylesheets an error would occur; that has been remedied. |
440 |
@@ -1282,7 +1359,7 @@ Release Post: http://wp.me/p1moTy-oR |
441 |
* Bug Fix: Contact Form - RTL styles |
442 |
* Bug Fix: Contact Form - Better handle MP6 icons |
443 |
* Bug Fix: Custom CSS - array_shift() took a variable by reference, so avoid passing it the result of a function |
444 |
-* Bug Fix: Custom CSS - Allow case-insensitive CSS properties (<a href="http://wordpress.org/support/topic/two-issues-with-jetpack-css-module?replies=9">ref</a>) |
445 |
+* Bug Fix: Custom CSS - Allow case-insensitive CSS properties (<a href="https://wordpress.org/support/topic/two-issues-with-jetpack-css-module?replies=9">ref</a>) |
446 |
* Bug Fix: Infinite Scroll - Maintain main query's `post__not_in` values when querying posts for IS |
447 |
* Bug Fix: Infinite Scroll - Ensure that IS's `pre_get_posts` method isn't applied in the admin. Also fixes an incorrect use of `add_filter()` where `add_action()` was meant. Fixes #1696-plugins |
448 |
* Bug Fix: Infinite Scroll - CSS update - IS footer was too large in Firefox |
449 |
@@ -1475,7 +1552,7 @@ Release Post: http://wp.me/p1moTy-lT |
450 |
Release Date: December 14, 2012 |
451 |
Release Post: http://wp.me/p1moTy-lJ |
452 |
|
453 |
-* Enhancement: Infinite Scroll: support [VideoPress](http://wordpress.org/extend/plugins/video/) plugin. |
454 |
+* Enhancement: Infinite Scroll: support [VideoPress](https://wordpress.org/plugins/video/) plugin. |
455 |
* Enhancement: Photon: Apply to all images retrieved from the Media Library. |
456 |
* Enhancement: Photon: Retina image support. |
457 |
* Enhancement: Custom CSS: Refined editor interface. |
458 |
@@ -1495,7 +1572,7 @@ Release Post: http://wp.me/p1moTy-lu |
459 |
Release Date: November 21, 2012 |
460 |
Release Post: http://wp.me/p1moTy-lc |
461 |
|
462 |
-* Enhancement: Photon: Support for the [Lazy Load](http://wordpress.org/extend/plugins/lazy-load/) plugin. |
463 |
+* Enhancement: Photon: Support for the [Lazy Load](https://wordpress.org/plugins/lazy-load/) plugin. |
464 |
* Bug Fix: Photon: Fix warped images with un- or under-specified dimensions. |
465 |
* Bug Fix: Photon: Fix warped images with pre-photonized URLs; don't try to photonize them twice. |
466 |
* Bug Fix: Infinite Scroll: Check a child theme's parent theme for infinite scroll support. |
467 |
@@ -1552,7 +1629,7 @@ Release Post: http://wp.me/p1moTy-hC |
468 |
* Enhancement: Contact Form: Overhaul of the contact form code to fix incompatibilites with other plugins. |
469 |
* Bug Fix: Only allow users with manage_options permission to enable/disable modules |
470 |
* Bug Fix: Custom CSS: allow '/' in media query units; e.g. (-o-min-device-pixel-ratio: 3/2) |
471 |
-* Bug Fix: Custom CSS: leave comments alone in CSS when editing but minify on the frontend |
472 |
+* Bug Fix: Custom CSS: leave comments alone in CSS when editing but minify on the front end |
473 |
* Bug Fix: Sharing: Keep "more" pane open so Google+ Button isn't obscured |
474 |
* Bug Fix: Carousel: Make sure the original size is used, even when it is exceedingly large. |
475 |
* Bug Fix: Exclude iPad from Twitter on iPhone mobile browsing |
476 |
@@ -1788,7 +1865,7 @@ Release Post: http://wp.me/p1moTy-8x |
477 |
* Enhancement: Stats: More responsive stats dashboard. |
478 |
* Enhancement: Shortcodes: Google Maps, VideoPress |
479 |
* Enhancement: Sharing: Google+, LinkedIn |
480 |
-* Enhancement: Enhanced Distribution: Added Jetpack blogs to http://en.wordpress.com/firehose/ |
481 |
+* Enhancement: Enhanced Distribution: Added Jetpack blogs to https://en.wordpress.com/firehose/ |
482 |
* Bug Fix: Spelling and Grammar: WordPress 3.3 compatibility. |
483 |
* Bug Fix: Translatable module names/descriptinos. |
484 |
* Bug Fix: Correctly detect host's ability to make outgoing HTTPS requests. |
485 |
|
486 |
diff --git a/plugins/jetpack/class.jetpack-admin.php b/plugins/jetpack/class.jetpack-admin.php |
487 |
index 6e46ee3..81a792c 100644 |
488 |
--- a/plugins/jetpack/class.jetpack-admin.php |
489 |
+++ b/plugins/jetpack/class.jetpack-admin.php |
490 |
@@ -36,14 +36,13 @@ class Jetpack_Admin { |
491 |
if ( isset( $_POST['jetpack-set-master-user'] ) ) { |
492 |
add_action( 'init', array( $this->my_jetpack_page, 'jetpack_my_jetpack_change_user' ) ); |
493 |
} |
494 |
- |
495 |
+ |
496 |
// Add hooks for admin menus |
497 |
add_action( 'admin_menu', array( $this->landing_page, 'add_actions' ), 998 ); |
498 |
add_action( 'jetpack_admin_menu', array( $this, 'admin_menu_debugger' ) ); |
499 |
add_action( 'jetpack_admin_menu', array( $this->settings_page, 'add_actions' ) ); |
500 |
add_action( 'jetpack_admin_menu', array( $this->my_jetpack_page, 'add_actions' ) ); |
501 |
|
502 |
- |
503 |
// Add redirect to current page for activation/deactivation of modules |
504 |
add_action( 'jetpack_pre_activate_module', array( $this, 'fix_redirect' ), 10, 2 ); |
505 |
add_action( 'jetpack_pre_deactivate_module', array( $this, 'fix_redirect' ) ); |
506 |
|
507 |
diff --git a/plugins/jetpack/class.jetpack-bbpress-json-api-compat.php b/plugins/jetpack/class.jetpack-bbpress-json-api-compat.php |
508 |
index 3c7935d..0038874 100644 |
509 |
--- a/plugins/jetpack/class.jetpack-bbpress-json-api-compat.php |
510 |
+++ b/plugins/jetpack/class.jetpack-bbpress-json-api-compat.php |
511 |
@@ -21,11 +21,6 @@ class bbPress_Jetpack_REST_API { |
512 |
} |
513 |
|
514 |
function allow_bbpress_post_types( $allowed_post_types ) { |
515 |
- |
516 |
- // only run for REST API requests |
517 |
- if ( ! defined( 'REST_API_REQUEST' ) || ! REST_API_REQUEST ) |
518 |
- return $allowed_post_types; |
519 |
- |
520 |
$allowed_post_types[] = 'forum'; |
521 |
$allowed_post_types[] = 'topic'; |
522 |
$allowed_post_types[] = 'reply'; |
523 |
@@ -33,11 +28,6 @@ class bbPress_Jetpack_REST_API { |
524 |
} |
525 |
|
526 |
function allow_bbpress_public_metadata( $allowed_meta_keys ) { |
527 |
- |
528 |
- // only run for REST API requests |
529 |
- if ( ! defined( 'REST_API_REQUEST' ) || ! REST_API_REQUEST ) |
530 |
- return $allowed_meta_keys; |
531 |
- |
532 |
$allowed_meta_keys[] = '_bbp_forum_id'; |
533 |
$allowed_meta_keys[] = '_bbp_topic_id'; |
534 |
$allowed_meta_keys[] = '_bbp_status'; |
535 |
|
536 |
diff --git a/plugins/jetpack/class.jetpack-cli.php b/plugins/jetpack/class.jetpack-cli.php |
537 |
index 3824411..6f3fb45 100644 |
538 |
--- a/plugins/jetpack/class.jetpack-cli.php |
539 |
+++ b/plugins/jetpack/class.jetpack-cli.php |
540 |
@@ -215,7 +215,7 @@ class Jetpack_CLI extends WP_CLI_Command { |
541 |
_e( "Resetting default modules...\n", "jetpack" ); |
542 |
usleep( 500000 ); // Take a breath |
543 |
$default_modules = Jetpack::get_default_modules(); |
544 |
- Jetpack_Options::update_option( 'active_modules', $default_modules ); |
545 |
+ Jetpack::update_active_modules( $default_modules ); |
546 |
WP_CLI::success( __( 'Modules reset to default.', 'jetpack' ) ); |
547 |
|
548 |
// Jumpstart option is special |
549 |
@@ -224,7 +224,7 @@ class Jetpack_CLI extends WP_CLI_Command { |
550 |
break; |
551 |
case 'modules': |
552 |
$default_modules = Jetpack::get_default_modules(); |
553 |
- Jetpack_Options::update_option( 'active_modules', $default_modules ); |
554 |
+ Jetpack::update_active_modules( $default_modules ); |
555 |
WP_CLI::success( __( 'Modules reset to default.', 'jetpack' ) ); |
556 |
break; |
557 |
case 'prompt': |
558 |
@@ -306,7 +306,7 @@ class Jetpack_CLI extends WP_CLI_Command { |
559 |
break; |
560 |
case 'activate_all': |
561 |
$modules = Jetpack::get_available_modules(); |
562 |
- Jetpack_Options::update_option( 'active_modules', $modules ); |
563 |
+ Jetpack::update_active_modules( $modules ); |
564 |
WP_CLI::success( __( 'All modules activated!', 'jetpack' ) ); |
565 |
break; |
566 |
case 'deactivate': |
567 |
@@ -316,7 +316,7 @@ class Jetpack_CLI extends WP_CLI_Command { |
568 |
WP_CLI::success( sprintf( __( '%s has been deactivated.', 'jetpack' ), $module['name'] ) ); |
569 |
break; |
570 |
case 'deactivate_all': |
571 |
- Jetpack_Options::update_option( 'active_modules', '' ); |
572 |
+ Jetpack::delete_active_modules(); |
573 |
WP_CLI::success( __( 'All modules deactivated!', 'jetpack' ) ); |
574 |
break; |
575 |
case 'toggle': |
576 |
|
577 |
diff --git a/plugins/jetpack/class.jetpack-client-server.php b/plugins/jetpack/class.jetpack-client-server.php |
578 |
index 02ea5f6..b71c33a 100644 |
579 |
--- a/plugins/jetpack/class.jetpack-client-server.php |
580 |
+++ b/plugins/jetpack/class.jetpack-client-server.php |
581 |
@@ -12,8 +12,7 @@ class Jetpack_Client_Server { |
582 |
function client_authorize() { |
583 |
$data = stripslashes_deep( $_GET ); |
584 |
$data['auth_type'] = 'client'; |
585 |
- $jetpack = $this->get_jetpack(); |
586 |
- $role = $jetpack->translate_current_user_to_role(); |
587 |
+ $role = Jetpack::translate_current_user_to_role(); |
588 |
$redirect = isset( $data['redirect'] ) ? esc_url_raw( (string) $data['redirect'] ) : ''; |
589 |
|
590 |
$this->check_admin_referer( "jetpack-authorize_{$role}_{$redirect}" ); |
591 |
@@ -29,6 +28,15 @@ class Jetpack_Client_Server { |
592 |
$this->wp_safe_redirect( Jetpack::admin_url() ); |
593 |
} |
594 |
|
595 |
+ /** |
596 |
+ * Fires after the Jetpack client is authorized to communicate with WordPress.com. |
597 |
+ * |
598 |
+ * @since 4.2.0 |
599 |
+ * |
600 |
+ * @param int Jetpack Blog ID. |
601 |
+ */ |
602 |
+ do_action( 'jetpack_client_authorized', Jetpack_Options::get_option( 'id' ) ); |
603 |
+ |
604 |
$this->do_exit(); |
605 |
} |
606 |
|
607 |
@@ -48,7 +56,7 @@ class Jetpack_Client_Server { |
608 |
update_option( 'jetpack_unique_connection', $jetpack_unique_connection ); |
609 |
|
610 |
//track unique connection |
611 |
- $jetpack = Jetpack::init(); |
612 |
+ $jetpack = $this->get_jetpack();; |
613 |
|
614 |
$jetpack->stat( 'connections', 'unique-connection' ); |
615 |
$jetpack->do_stats( 'server_side' ); |
616 |
@@ -58,14 +66,13 @@ class Jetpack_Client_Server { |
617 |
$jetpack_unique_connection['connected'] += 1; |
618 |
Jetpack_Options::update_option( 'unique_connection', $jetpack_unique_connection ); |
619 |
|
620 |
- $jetpack = $this->get_jetpack(); |
621 |
- $role = $jetpack->translate_current_user_to_role(); |
622 |
+ $role = Jetpack::translate_current_user_to_role(); |
623 |
|
624 |
if ( ! $role ) { |
625 |
return new Jetpack_Error( 'no_role', 'Invalid request.', 400 ); |
626 |
} |
627 |
|
628 |
- $cap = $jetpack->translate_role_to_cap( $role ); |
629 |
+ $cap = Jetpack::translate_role_to_cap( $role ); |
630 |
if ( ! $cap ) { |
631 |
return new Jetpack_Error( 'no_cap', 'Invalid request.', 400 ); |
632 |
} |
633 |
@@ -116,17 +123,13 @@ class Jetpack_Client_Server { |
634 |
|
635 |
$redirect_on_activation_error = ( 'client' === $data['auth_type'] ) ? true : false; |
636 |
if ( $active_modules = Jetpack_Options::get_option( 'active_modules' ) ) { |
637 |
- Jetpack_Options::delete_option( 'active_modules' ); |
638 |
+ Jetpack::delete_active_modules(); |
639 |
|
640 |
Jetpack::activate_default_modules( 999, 1, $active_modules, $redirect_on_activation_error ); |
641 |
} else { |
642 |
Jetpack::activate_default_modules( false, false, array(), $redirect_on_activation_error ); |
643 |
} |
644 |
- |
645 |
- // Sync all registers options and constants |
646 |
- /** This action is documented in class.jetpack.php */ |
647 |
- do_action( 'jetpack_sync_all_registered_options' ); |
648 |
- |
649 |
+ |
650 |
// Start nonce cleaner |
651 |
wp_clear_scheduled_hook( 'jetpack_clean_nonces' ); |
652 |
wp_schedule_event( time(), 'hourly', 'jetpack_clean_nonces' ); |
653 |
@@ -158,8 +161,7 @@ class Jetpack_Client_Server { |
654 |
* @return object|WP_Error |
655 |
*/ |
656 |
function get_token( $data ) { |
657 |
- $jetpack = $this->get_jetpack(); |
658 |
- $role = $jetpack->translate_current_user_to_role(); |
659 |
+ $role = Jetpack::translate_current_user_to_role(); |
660 |
|
661 |
if ( ! $role ) { |
662 |
return new Jetpack_Error( 'role', __( 'An administrator for this blog must set up the Jetpack connection.', 'jetpack' ) ); |
663 |
@@ -236,11 +238,11 @@ class Jetpack_Client_Server { |
664 |
return new Jetpack_Error( 'scope', 'Malformed Scope', $code ); |
665 |
} |
666 |
|
667 |
- if ( $jetpack->sign_role( $role ) !== $json->scope ) { |
668 |
+ if ( Jetpack::sign_role( $role ) !== $json->scope ) { |
669 |
return new Jetpack_Error( 'scope', 'Invalid Scope', $code ); |
670 |
} |
671 |
|
672 |
- if ( ! $cap = $jetpack->translate_role_to_cap( $role ) ) { |
673 |
+ if ( ! $cap = Jetpack::translate_role_to_cap( $role ) ) { |
674 |
return new Jetpack_Error( 'scope', 'No Cap', $code ); |
675 |
} |
676 |
|
677 |
|
678 |
diff --git a/plugins/jetpack/class.jetpack-debugger.php b/plugins/jetpack/class.jetpack-debugger.php |
679 |
index aabbff3..b336def 100644 |
680 |
--- a/plugins/jetpack/class.jetpack-debugger.php |
681 |
+++ b/plugins/jetpack/class.jetpack-debugger.php |
682 |
@@ -18,6 +18,27 @@ class Jetpack_Debugger { |
683 |
} |
684 |
} |
685 |
|
686 |
+ static function seconds_to_time( $seconds ) { |
687 |
+ $units = array( |
688 |
+ "week" => 7*24*3600, |
689 |
+ "day" => 24*3600, |
690 |
+ "hour" => 3600, |
691 |
+ "minute" => 60, |
692 |
+ "second" => 1, |
693 |
+ ); |
694 |
+ // specifically handle zero |
695 |
+ if ( $seconds == 0 ) return "0 seconds"; |
696 |
+ $human_readable = ""; |
697 |
+ foreach ( $units as $name => $divisor ) { |
698 |
+ if ( $quot = intval( $seconds / $divisor) ) { |
699 |
+ $human_readable .= "$quot $name"; |
700 |
+ $human_readable .= ( abs( $quot ) > 1 ? "s" : "" ) . ", "; |
701 |
+ $seconds -= $quot * $divisor; |
702 |
+ } |
703 |
+ } |
704 |
+ return substr( $human_readable, 0, -2 ); |
705 |
+ } |
706 |
+ |
707 |
public static function jetpack_increase_timeout() { |
708 |
return 30; // seconds |
709 |
} |
710 |
@@ -60,6 +81,40 @@ class Jetpack_Debugger { |
711 |
$debug_info .= "\r\n" . esc_html( "SITE_URL: " . site_url() ); |
712 |
$debug_info .= "\r\n" . esc_html( "HOME_URL: " . home_url() ); |
713 |
|
714 |
+ $debug_info .= "\r\n"; |
715 |
+ require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-modules.php'; |
716 |
+ $sync_module = Jetpack_Sync_Modules::get_module( 'full-sync' ); |
717 |
+ $sync_statuses = $sync_module->get_status(); |
718 |
+ $human_readable_sync_status = array(); |
719 |
+ foreach( $sync_statuses as $sync_status => $sync_status_value ) { |
720 |
+ $human_readable_sync_status[ $sync_status ] = |
721 |
+ in_array( $sync_status, array( 'started', 'queue_finished', 'sent_started', 'finished' ) ) |
722 |
+ ? date( 'r', $sync_status_value ) : $sync_status_value ; |
723 |
+ } |
724 |
+ |
725 |
+ $debug_info .= "\r\n". sprintf( esc_html__( 'Jetpack Sync Full Status: `%1$s`', 'jetpack' ), print_r( $human_readable_sync_status, 1 ) ); |
726 |
+ |
727 |
+ $next_schedules = wp_next_scheduled( 'jetpack_sync_full' ); |
728 |
+ if( $next_schedules ) { |
729 |
+ $debug_info .= "\r\n". sprintf( esc_html__( 'Next Jetpack Full Sync Schedule: `%1$s`', 'jetpack' ), date( 'r', $next_schedules ) ); |
730 |
+ } else { |
731 |
+ $debug_info .= "\r\n". esc_html__( "Next Jetpack Full Sync Schedule: Not Scheduled", 'jetpack' ); |
732 |
+ } |
733 |
+ |
734 |
+ require_once JETPACK__PLUGIN_DIR. 'sync/class.jetpack-sync-sender.php'; |
735 |
+ |
736 |
+ $queue = Jetpack_Sync_Sender::get_instance()->get_sync_queue(); |
737 |
+ |
738 |
+ $debug_info .= "\r\n". sprintf( esc_html__( 'Sync Queue size: %1$s', 'jetpack' ), $queue->size() ); |
739 |
+ $debug_info .= "\r\n". sprintf( esc_html__( 'Sync Queue lag: %1$s', 'jetpack' ), self::seconds_to_time( $queue->lag() ) ); |
740 |
+ |
741 |
+ $full_sync_queue = Jetpack_Sync_Sender::get_instance()->get_full_sync_queue(); |
742 |
+ |
743 |
+ $debug_info .= "\r\n". sprintf( esc_html__( 'Full Sync Queue size: %1$s', 'jetpack' ), $full_sync_queue->size() ); |
744 |
+ $debug_info .= "\r\n". sprintf( esc_html__( 'Full Sync Queue lag: %1$s', 'jetpack' ), self::seconds_to_time( $full_sync_queue->lag() ) ); |
745 |
+ |
746 |
+ $debug_info .= "\r\n"; |
747 |
+ |
748 |
foreach ( array ( |
749 |
'HTTP_HOST', |
750 |
'SERVER_PORT', |
751 |
@@ -172,7 +227,7 @@ class Jetpack_Debugger { |
752 |
<h3><?php esc_html_e( 'Trouble with Jetpack?', 'jetpack' ); ?></h3> |
753 |
<h4><?php esc_html_e( 'It may be caused by one of these issues, which you can diagnose yourself:', 'jetpack' ); ?></h4> |
754 |
<ol> |
755 |
- <li><b><em><?php esc_html_e( 'A known issue.', 'jetpack' ); ?></em></b> <?php echo sprintf( __( 'Some themes and plugins have <a href="%1$s" target="_blank">known conflicts</a> with Jetpack – check the <a href="%2$s" target="_blank">list</a>. (You can also browse the <a href="%3$s" target="_blank">Jetpack support pages</a> or <a href="%4$s" target="_blank">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), 'http://jetpack.com/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.com/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.com/support/', 'http://wordpress.org/support/plugin/jetpack' ); ?></li> |
756 |
+ <li><b><em><?php esc_html_e( 'A known issue.', 'jetpack' ); ?></em></b> <?php echo sprintf( __( 'Some themes and plugins have <a href="%1$s" target="_blank">known conflicts</a> with Jetpack – check the <a href="%2$s" target="_blank">list</a>. (You can also browse the <a href="%3$s" target="_blank">Jetpack support pages</a> or <a href="%4$s" target="_blank">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), 'http://jetpack.com/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.com/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.com/support/', 'https://wordpress.org/support/plugin/jetpack' ); ?></li> |
757 |
<li><b><em><?php esc_html_e( 'An incompatible plugin.', 'jetpack' ); ?></em></b> <?php esc_html_e( "Find out by disabling all plugins except Jetpack. If the problem persists, it's not a plugin issue. If the problem is solved, turn your plugins on one by one until the problem pops up again – there's the culprit! Let us know, and we'll try to help.", 'jetpack' ); ?></li> |
758 |
<li> |
759 |
<b><em><?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?></em></b> |
760 |
@@ -203,11 +258,6 @@ class Jetpack_Debugger { |
761 |
<div id="connected-user-details"> |
762 |
<p><?php printf( __( 'The primary connection is owned by <strong>%s</strong>\'s WordPress.com account.', 'jetpack' ), esc_html( Jetpack::get_master_user_email() ) ); ?></p> |
763 |
</div> |
764 |
- <hr /> |
765 |
- <div id="sync-related-posts"> |
766 |
- <p><?php echo esc_html__( 'Some features of Jetpack use the WordPress.com infrastructure and require that your public content be mirrored there. If you see intermittent issues only affecting certain posts, please try requesting a reindex of your posts.', 'jetpack' ); ?></p> |
767 |
- <?php echo Jetpack::init()->sync->reindex_ui() ?> |
768 |
- </div> |
769 |
<?php endif; ?> |
770 |
</div> |
771 |
<div id="contact-message" <?php if( ! isset( $_GET['contact'] ) ) {?> style="display:none" <?php } ?>> |
772 |
@@ -236,7 +286,7 @@ class Jetpack_Debugger { |
773 |
?> |
774 |
<div class="formbox"> |
775 |
<label for="message" class="h"><?php esc_html_e( 'Please describe the problem you are having.', 'jetpack' ); ?></label> |
776 |
- <textarea name="message" cols="40" rows="7" id="did"></textarea> |
777 |
+ <textarea name="message" cols="40" rows="7" id="did"><?php echo ( isset( $_GET['note'] ) ? esc_textarea( $_GET['note'] ) : '' ); ?></textarea> |
778 |
</div> |
779 |
|
780 |
<div id="name_div" class="formbox"> |
781 |
@@ -264,7 +314,7 @@ class Jetpack_Debugger { |
782 |
|
783 |
<div id="blog_div" class="formbox"> |
784 |
<div id="submit_div" class="contact-support"> |
785 |
- <input type="submit" name="submit" value="<?php esc_html_e( 'Submit »', 'jetpack' ); ?>"> |
786 |
+ <input type="submit" name="submit" class="button button-primary button-large" value="<?php esc_html_e( 'Submit »', 'jetpack' ); ?>"> |
787 |
</div> |
788 |
</div> |
789 |
<div style="clear: both;"></div> |
790 |
@@ -274,7 +324,7 @@ class Jetpack_Debugger { |
791 |
<div id="toggle_debug_info"><a href="#"><?php _e( 'View Advanced Debug Results', 'jetpack' ); ?></a></div> |
792 |
<div id="debug_info_div" style="display:none"> |
793 |
<h4><?php esc_html_e( 'Debug Info', 'jetpack' ); ?></h4> |
794 |
- <div id="debug_info"><?php echo wpautop( esc_html( $debug_info ) ); ?></div> |
795 |
+ <div id="debug_info"><pre><?php echo esc_html( $debug_info ) ; ?></pre></div> |
796 |
</div> |
797 |
</div> |
798 |
<?php |
799 |
@@ -326,13 +376,11 @@ class Jetpack_Debugger { |
800 |
|
801 |
form#contactme { |
802 |
border: 1px solid #dfdfdf; |
803 |
- background: #eaf3fa; |
804 |
+ background: #FFF; |
805 |
padding: 20px; |
806 |
margin: 10px; |
807 |
- background-color: #eaf3fa; |
808 |
- border-radius: 5px; |
809 |
+ background-color: #F3F6F8; |
810 |
font-size: 15px; |
811 |
- font-family: "Open Sans", "Helvetica Neue", sans-serif; |
812 |
} |
813 |
|
814 |
form#contactme label.h { |
815 |
@@ -349,31 +397,17 @@ class Jetpack_Debugger { |
816 |
|
817 |
.formbox input[type="text"], .formbox input[type="email"], .formbox input[type="url"], .formbox textarea, #debug_info_div { |
818 |
border: 1px solid #e5e5e5; |
819 |
- border-radius: 11px; |
820 |
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); |
821 |
color: #666; |
822 |
font-size: 14px; |
823 |
padding: 10px; |
824 |
width: 97%; |
825 |
} |
826 |
- .formbox .contact-support input[type="submit"] { |
827 |
- float: right; |
828 |
- margin: 0 !important; |
829 |
- border-radius: 20px !important; |
830 |
- cursor: pointer; |
831 |
- font-size: 13pt !important; |
832 |
- height: auto !important; |
833 |
- margin: 0 0 2em 10px !important; |
834 |
- padding: 8px 16px !important; |
835 |
- background-color: #ddd; |
836 |
- border: 1px solid rgba(0,0,0,0.05); |
837 |
- border-top-color: rgba(255,255,255,0.1); |
838 |
- border-bottom-color: rgba(0,0,0,0.15); |
839 |
- color: #333; |
840 |
- font-weight: 400; |
841 |
- display: inline-block; |
842 |
- text-align: center; |
843 |
- text-decoration: none; |
844 |
+ #debug_info_div { |
845 |
+ border-radius: 0; |
846 |
+ margin-top: 16px; |
847 |
+ background: #FFF; |
848 |
+ padding: 16px; |
849 |
} |
850 |
|
851 |
.formbox span.errormsg { |
852 |
@@ -397,7 +431,7 @@ class Jetpack_Debugger { |
853 |
} |
854 |
|
855 |
#debug_info_div, #toggle_debug_info, #debug_info_div p { |
856 |
- font-size: smaller; |
857 |
+ font-size: 12px; |
858 |
} |
859 |
|
860 |
</style> |
861 |
@@ -444,7 +478,7 @@ class Jetpack_Debugger { |
862 |
if ( validation_error ) { |
863 |
return false; |
864 |
} |
865 |
- message.val( message.val() + "\r\n\r\n----------------------------------------------\r\n\r\nDEBUG INFO:\r\n" + $('#debug_info').val() ); |
866 |
+ message.val( message.val() + "\r\n\r\n----------------------------------------------\r\n\r\nDEBUG INFO:\r\n" + $('#debug_form_info').val() ); |
867 |
return true; |
868 |
}); |
869 |
|
870 |
|
871 |
diff --git a/plugins/jetpack/class.jetpack-heartbeat.php b/plugins/jetpack/class.jetpack-heartbeat.php |
872 |
index 2c1fa4f..2df8c8d 100644 |
873 |
--- a/plugins/jetpack/class.jetpack-heartbeat.php |
874 |
+++ b/plugins/jetpack/class.jetpack-heartbeat.php |
875 |
@@ -139,6 +139,10 @@ class Jetpack_Heartbeat { |
876 |
$return["{$prefix}module-{$slug}"] = Jetpack::is_module_active( $slug ) ? 'on' : 'off'; |
877 |
} |
878 |
|
879 |
+ require_once dirname(__FILE__).'/sync/class.jetpack-sync-wp-replicastore.php'; |
880 |
+ $store = new Jetpack_Sync_WP_Replicastore(); |
881 |
+ $return["{$prefix}sync-checksum"] = json_encode( $store->checksum_all() ); |
882 |
+ |
883 |
return $return; |
884 |
} |
885 |
|
886 |
|
887 |
diff --git a/plugins/jetpack/class.jetpack-modules-list-table.php b/plugins/jetpack/class.jetpack-modules-list-table.php |
888 |
index ee8d7d1..c99f3bf 100644 |
889 |
--- a/plugins/jetpack/class.jetpack-modules-list-table.php |
890 |
+++ b/plugins/jetpack/class.jetpack-modules-list-table.php |
891 |
@@ -150,6 +150,9 @@ class Jetpack_Modules_List_Table extends WP_List_Table { |
892 |
continue; |
893 |
} |
894 |
$key = sanitize_title( $title ); |
895 |
+ if ( 'centralized-management' === $key && Jetpack::is_module_active( 'manage' ) ) { |
896 |
+ continue; |
897 |
+ } |
898 |
$display_title = esc_html( wptexturize( $title ) ); |
899 |
$url = esc_url( add_query_arg( 'module_tag', urlencode( $title ) ) ); |
900 |
$current = ''; |
901 |
|
902 |
diff --git a/plugins/jetpack/class.jetpack-options.php b/plugins/jetpack/class.jetpack-options.php |
903 |
index 120063d..76e440d 100644 |
904 |
--- a/plugins/jetpack/class.jetpack-options.php |
905 |
+++ b/plugins/jetpack/class.jetpack-options.php |
906 |
@@ -23,7 +23,6 @@ class Jetpack_Options { |
907 |
'wpcc_options', |
908 |
'relatedposts', |
909 |
'file_data', |
910 |
- 'security_report', |
911 |
'autoupdate_plugins', // (array) An array of plugin ids ( eg. jetpack/jetpack ) that should be autoupdated |
912 |
'autoupdate_themes', // (array) An array of theme ids ( eg. twentyfourteen ) that should be autoupdated |
913 |
'autoupdate_core', // (bool) Whether or not to autoupdate core |
914 |
@@ -63,8 +62,6 @@ class Jetpack_Options { |
915 |
'identity_crisis_whitelist', // (array) An array of options, each having an array of the values whitelisted for it. |
916 |
'gplus_authors', // (array) The Google+ authorship information for connected users. |
917 |
'last_heartbeat', // (int) The timestamp of the last heartbeat that fired. |
918 |
- 'last_security_report', // (int) The timestamp of the last security report that was run. |
919 |
- 'sync_bulk_reindexing', // (bool) If a bulk reindex is currently underway. |
920 |
'jumpstart', // (string) A flag for whether or not to show the Jump Start. Accepts: new_connection, jumpstart_activated, jetpack_action_taken, jumpstart_dismissed. |
921 |
'hide_jitm' // (array) A list of just in time messages that we should not show because they have been dismissed by the user |
922 |
); |
923 |
@@ -121,6 +118,26 @@ class Jetpack_Options { |
924 |
return $default; |
925 |
} |
926 |
|
927 |
+ /** |
928 |
+ * Returns the requested option, and ensures it's autoloaded in the future. |
929 |
+ * This does _not_ adjust the prefix in any way (does not prefix jetpack_%) |
930 |
+ * |
931 |
+ * @param string $name Option name |
932 |
+ * @param mixed $default (optional) |
933 |
+ * |
934 |
+ * @return mixed|void |
935 |
+ */ |
936 |
+ public static function get_option_and_ensure_autoload( $name, $default ) { |
937 |
+ $value = get_option( $name ); |
938 |
+ |
939 |
+ if ( $value === false && $default !== false ) { |
940 |
+ update_option( $name, $default ); |
941 |
+ $value = $default; |
942 |
+ } |
943 |
+ |
944 |
+ return $value; |
945 |
+ } |
946 |
+ |
947 |
private static function update_grouped_option( $group, $name, $value ) { |
948 |
$options = get_option( self::$grouped_options[ $group ] ); |
949 |
if ( ! is_array( $options ) ) { |
950 |
@@ -149,14 +166,7 @@ class Jetpack_Options { |
951 |
*/ |
952 |
do_action( 'pre_update_jetpack_option_' . $name, $name, $value ); |
953 |
if ( self::is_valid( $name, 'non_compact' ) ) { |
954 |
- /** |
955 |
- * Allowing update_option to change autoload status only shipped in WordPress v4.2 |
956 |
- * @link https://github.com/WordPress/WordPress/commit/305cf8b95 |
957 |
- */ |
958 |
- if ( version_compare( $GLOBALS['wp_version'], '4.2', '>=' ) ) { |
959 |
- return update_option( "jetpack_$name", $value, $autoload ); |
960 |
- } |
961 |
- return update_option( "jetpack_$name", $value ); |
962 |
+ return update_option( "jetpack_$name", $value, $autoload ); |
963 |
} |
964 |
|
965 |
foreach ( array_keys( self::$grouped_options ) as $group ) { |
966 |
|
967 |
diff --git a/plugins/jetpack/class.jetpack-signature.php b/plugins/jetpack/class.jetpack-signature.php |
968 |
index 45c74a1..d8940aa 100644 |
969 |
--- a/plugins/jetpack/class.jetpack-signature.php |
970 |
+++ b/plugins/jetpack/class.jetpack-signature.php |
971 |
@@ -43,14 +43,14 @@ class Jetpack_Signature { |
972 |
// with SSL termination proxies (self-served, Cloudflare, etc.) don't need to fiddle with |
973 |
// the JETPACK_SIGNATURE__HTTPS_PORT constant. The code also implies we can't talk to a |
974 |
// site at https://example.com:80/ (which would be a strange configuration). |
975 |
- // JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the backend webserver's port |
976 |
+ // JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the back end webserver's port |
977 |
// if the site is behind a proxy running on port 443 without |
978 |
- // X-Forwarded-Port and the backend's port is *not* 80. It's better, |
979 |
+ // X-Forwarded-Port and the back end's port is *not* 80. It's better, |
980 |
// though, to configure the proxy to send X-Forwarded-Port. |
981 |
$port = in_array( $host_port, array( 443, 80, JETPACK_SIGNATURE__HTTPS_PORT ) ) ? '' : $host_port; |
982 |
} else { |
983 |
// 80: Standard Port |
984 |
- // JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the backend webserver's port |
985 |
+ // JETPACK_SIGNATURE__HTTPS_PORT: Set this constant in wp-config.php to the back end webserver's port |
986 |
// if the site is behind a proxy running on port 80 without |
987 |
// X-Forwarded-Port. It's better, though, to configure the proxy to |
988 |
// send X-Forwarded-Port. |
989 |
|
990 |
diff --git a/plugins/jetpack/class.jetpack-sync.php b/plugins/jetpack/class.jetpack-sync.php |
991 |
deleted file mode 100644 |
992 |
index 99b1000..0000000 |
993 |
--- a/plugins/jetpack/class.jetpack-sync.php |
994 |
+++ /dev/null |
995 |
@@ -1,1104 +0,0 @@ |
996 |
-<?php |
997 |
- |
998 |
-/** |
999 |
- * Request that a piece of data on this WordPress install be synced back to the |
1000 |
- * Jetpack server for remote processing/notifications/etc |
1001 |
- */ |
1002 |
-class Jetpack_Sync { |
1003 |
- // What modules want to sync what content |
1004 |
- public $sync_conditions = array( 'posts' => array(), 'comments' => array() ); |
1005 |
- |
1006 |
- // We keep track of all the options registered for sync so that we can sync them all if needed |
1007 |
- public $sync_options = array(); |
1008 |
- |
1009 |
- public $sync_constants = array(); |
1010 |
- |
1011 |
- // Keep trac of status transitions, which we wouldn't always know about on the Jetpack Servers but are important when deciding what to do with the sync. |
1012 |
- public $post_transitions = array(); |
1013 |
- public $comment_transitions = array(); |
1014 |
- |
1015 |
- // Objects to sync |
1016 |
- public $sync = array(); |
1017 |
- |
1018 |
- function __construct() { |
1019 |
- // WP Cron action. Only used on upgrade |
1020 |
- add_action( 'jetpack_sync_all_registered_options', array( $this, 'sync_all_registered_options' ) ); |
1021 |
- add_action( 'jetpack_heartbeat', array( $this, 'sync_all_registered_options' ) ); |
1022 |
- |
1023 |
- // Sync constants on heartbeat and plugin upgrade and connects |
1024 |
- add_action( 'init', array( $this, 'register_constants_as_options' ) ); |
1025 |
- add_action( 'jetpack_sync_all_registered_options', array( $this, 'sync_all_constants' ) ); |
1026 |
- add_action( 'jetpack_heartbeat', array( $this, 'sync_all_constants' ) ); |
1027 |
- |
1028 |
- add_action( 'jetpack_activate_module', array( $this, 'sync_module_constants' ), 10, 1 ); |
1029 |
- } |
1030 |
- |
1031 |
-/* Static Methods for Modules */ |
1032 |
- |
1033 |
- /** |
1034 |
- * @param string $file __FILE__ |
1035 |
- * @param array settings: |
1036 |
- * post_types => array( post_type slugs ): The post types to sync. Default: post, page |
1037 |
- * post_stati => array( post_status slugs ): The post stati to sync. Default: publish |
1038 |
- */ |
1039 |
- static function sync_posts( $file, array $settings = null ) { |
1040 |
- if ( is_network_admin() ) return; |
1041 |
- $jetpack = Jetpack::init(); |
1042 |
- $args = func_get_args(); |
1043 |
- return call_user_func_array( array( $jetpack->sync, 'posts' ), $args ); |
1044 |
- } |
1045 |
- |
1046 |
- /** |
1047 |
- * @param string $file __FILE__ |
1048 |
- * @param array settings: |
1049 |
- * post_types => array( post_type slugs ): The post types to sync. Default: post, page |
1050 |
- * post_stati => array( post_status slugs ): The post stati to sync. Default: publish |
1051 |
- * comment_types => array( comment_type slugs ): The comment types to sync. Default: '', comment, trackback, pingback |
1052 |
- * comment_stati => array( comment_status slugs ): The comment stati to sync. Default: approved |
1053 |
- */ |
1054 |
- static function sync_comments( $file, array $settings = null ) { |
1055 |
- if ( is_network_admin() ) return; |
1056 |
- $jetpack = Jetpack::init(); |
1057 |
- $args = func_get_args(); |
1058 |
- return call_user_func_array( array( $jetpack->sync, 'comments' ), $args ); |
1059 |
- } |
1060 |
- |
1061 |
- /** |
1062 |
- * @param string $file __FILE__ |
1063 |
- * @param string $option, Option name to sync |
1064 |
- * @param string $option ... |
1065 |
- */ |
1066 |
- static function sync_options( $file, $option /*, $option, ... */ ) { |
1067 |
- if ( is_network_admin() ) return; |
1068 |
- $jetpack = Jetpack::init(); |
1069 |
- $args = func_get_args(); |
1070 |
- return call_user_func_array( array( $jetpack->sync, 'options' ), $args ); |
1071 |
- } |
1072 |
- /** |
1073 |
- * @param string $file __FILE__ |
1074 |
- * @param string $option, Option name to sync |
1075 |
- * @param string $option ... |
1076 |
- */ |
1077 |
- static function sync_constant( $file, $constant ) { |
1078 |
- if ( is_network_admin() ) return; |
1079 |
- $jetpack = Jetpack::init(); |
1080 |
- $args = func_get_args(); |
1081 |
- return call_user_func_array( array( $jetpack->sync, 'constant' ), $args ); |
1082 |
- } |
1083 |
- |
1084 |
-/* Internal Methods */ |
1085 |
- |
1086 |
- /** |
1087 |
- * Create a sync object/request |
1088 |
- * |
1089 |
- * @param string $object Type of object to sync -- [ post | comment | option ] |
1090 |
- * @param int $id Unique identifier |
1091 |
- * @param array $settings |
1092 |
- */ |
1093 |
- function register( $object, $id = false, array $settings = null ) { |
1094 |
- // Since we've registered something for sync, hook it up to execute on shutdown if we haven't already |
1095 |
- if ( !$this->sync ) { |
1096 |
- if ( function_exists( 'ignore_user_abort' ) ) { |
1097 |
- ignore_user_abort( true ); |
1098 |
- } |
1099 |
- add_action( 'shutdown', array( $this, 'sync' ), 9 ); // Right before async XML-RPC |
1100 |
- } |
1101 |
- |
1102 |
- $defaults = array( |
1103 |
- 'on_behalf_of' => array(), // What modules want this data |
1104 |
- ); |
1105 |
- $settings = wp_parse_args( $settings, $defaults ); |
1106 |
- |
1107 |
- if ( !isset( $this->sync[$object] ) ) { |
1108 |
- $this->sync[$object] = array(); |
1109 |
- } |
1110 |
- |
1111 |
- // Store the settings for this object |
1112 |
- if ( |
1113 |
- // First time for this object |
1114 |
- !isset( $this->sync[$object][$id] ) |
1115 |
- ) { |
1116 |
- // Easy: store the current settings |
1117 |
- $this->sync[$object][$id] = $settings; |
1118 |
- } else { |
1119 |
- // Not as easy: we have to manually merge the settings from previous runs for this object with the settings for this run |
1120 |
- |
1121 |
- $this->sync[$object][$id]['on_behalf_of'] = array_unique( array_merge( $this->sync[$object][$id]['on_behalf_of'], $settings['on_behalf_of'] ) ); |
1122 |
- } |
1123 |
- |
1124 |
- $delete_prefix = 'delete_'; |
1125 |
- if ( 0 === strpos( $object, $delete_prefix ) ) { |
1126 |
- $unset_object = substr( $object, strlen( $delete_prefix ) ); |
1127 |
- } else { |
1128 |
- $unset_object = "{$delete_prefix}{$object}"; |
1129 |
- } |
1130 |
- |
1131 |
- // Ensure post ... delete_post yields a delete operation |
1132 |
- // Ensure delete_post ... post yields a sync post operation |
1133 |
- // Ensure update_option() ... delete_option() ends up as a delete |
1134 |
- // Ensure delete_option() ... update_option() ends up as an update |
1135 |
- // Etc. |
1136 |
- unset( $this->sync[$unset_object][$id] ); |
1137 |
- |
1138 |
- return true; |
1139 |
- } |
1140 |
- |
1141 |
- function get_common_sync_data() { |
1142 |
- $available_modules = Jetpack::get_available_modules(); |
1143 |
- $active_modules = Jetpack::get_active_modules(); |
1144 |
- $modules = array(); |
1145 |
- foreach ( $available_modules as $available_module ) { |
1146 |
- $modules[$available_module] = in_array( $available_module, $active_modules ); |
1147 |
- } |
1148 |
- $modules['vaultpress'] = class_exists( 'VaultPress' ) || function_exists( 'vaultpress_contact_service' ); |
1149 |
- |
1150 |
- $sync_data = array( |
1151 |
- 'modules' => $modules, |
1152 |
- 'version' => JETPACK__VERSION, |
1153 |
- 'is_multisite' => is_multisite(), |
1154 |
- ); |
1155 |
- |
1156 |
- return $sync_data; |
1157 |
- } |
1158 |
- |
1159 |
- /** |
1160 |
- * Set up all the data and queue it for the outgoing XML-RPC request |
1161 |
- */ |
1162 |
- function sync() { |
1163 |
- if ( !$this->sync ) { |
1164 |
- return false; |
1165 |
- } |
1166 |
- |
1167 |
- // Don't sync anything from a staging site. |
1168 |
- if ( Jetpack::is_development_mode() || Jetpack::is_staging_site() ) { |
1169 |
- return false; |
1170 |
- } |
1171 |
- |
1172 |
- $sync_data = $this->get_common_sync_data(); |
1173 |
- |
1174 |
- $wp_importing = defined( 'WP_IMPORTING' ) && WP_IMPORTING; |
1175 |
- |
1176 |
- foreach ( $this->sync as $sync_operation_type => $sync_operations ) { |
1177 |
- switch ( $sync_operation_type ) { |
1178 |
- case 'post': |
1179 |
- if ( $wp_importing ) { |
1180 |
- break; |
1181 |
- } |
1182 |
- |
1183 |
- $global_post = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null; |
1184 |
- $GLOBALS['post'] = null; |
1185 |
- foreach ( $sync_operations as $post_id => $settings ) { |
1186 |
- $sync_data['post'][$post_id] = $this->get_post( $post_id ); |
1187 |
- if ( isset( $this->post_transitions[$post_id] ) ) { |
1188 |
- $sync_data['post'][$post_id]['transitions'] = $this->post_transitions[$post_id]; |
1189 |
- } else { |
1190 |
- $sync_data['post'][$post_id]['transitions'] = array( false, false ); |
1191 |
- } |
1192 |
- $sync_data['post'][$post_id]['on_behalf_of'] = $settings['on_behalf_of']; |
1193 |
- } |
1194 |
- $GLOBALS['post'] = $global_post; |
1195 |
- unset( $global_post ); |
1196 |
- break; |
1197 |
- case 'comment': |
1198 |
- if ( $wp_importing ) { |
1199 |
- break; |
1200 |
- } |
1201 |
- |
1202 |
- $global_comment = isset( $GLOBALS['comment'] ) ? $GLOBALS['comment'] : null; |
1203 |
- unset( $GLOBALS['comment'] ); |
1204 |
- foreach ( $sync_operations as $comment_id => $settings ) { |
1205 |
- $sync_data['comment'][$comment_id] = $this->get_comment( $comment_id ); |
1206 |
- if ( isset( $this->comment_transitions[$comment_id] ) ) { |
1207 |
- $sync_data['comment'][$comment_id]['transitions'] = $this->comment_transitions[$comment_id]; |
1208 |
- } else { |
1209 |
- $sync_data['comment'][$comment_id]['transitions'] = array( false, false ); |
1210 |
- } |
1211 |
- $sync_data['comment'][$comment_id]['on_behalf_of'] = $settings['on_behalf_of']; |
1212 |
- } |
1213 |
- $GLOBALS['comment'] = $global_comment; |
1214 |
- unset( $global_comment ); |
1215 |
- break; |
1216 |
- case 'option' : |
1217 |
- foreach ( $sync_operations as $option => $settings ) { |
1218 |
- $sync_data['option'][ $option ] = array( 'value' => get_option( $option ) ); |
1219 |
- } |
1220 |
- break; |
1221 |
- |
1222 |
- case 'constant' : |
1223 |
- foreach( $sync_operations as $constant => $settings ) { |
1224 |
- $sync_data['constant'][ $constant ] = array( 'value' => $this->get_constant( $constant ) ); |
1225 |
- } |
1226 |
- break; |
1227 |
- |
1228 |
- case 'delete_post': |
1229 |
- case 'delete_comment': |
1230 |
- foreach ( $sync_operations as $object_id => $settings ) { |
1231 |
- $sync_data[$sync_operation_type][$object_id] = array( 'on_behalf_of' => $settings['on_behalf_of'] ); |
1232 |
- } |
1233 |
- break; |
1234 |
- case 'delete_option' : |
1235 |
- foreach ( $sync_operations as $object_id => $settings ) { |
1236 |
- $sync_data[$sync_operation_type][$object_id] = true; |
1237 |
- } |
1238 |
- break; |
1239 |
- } |
1240 |
- } |
1241 |
- Jetpack::xmlrpc_async_call( 'jetpack.syncContent', $sync_data ); |
1242 |
- } |
1243 |
- |
1244 |
- /** |
1245 |
- * Format and return content data from a direct xmlrpc request for it. |
1246 |
- * |
1247 |
- * @param array $content_ids: array( 'posts' => array of ids, 'comments' => array of ids, 'options' => array of options ) |
1248 |
- */ |
1249 |
- function get_content( $content_ids ) { |
1250 |
- $sync_data = $this->get_common_sync_data(); |
1251 |
- |
1252 |
- if ( isset( $content_ids['posts'] ) ) { |
1253 |
- foreach ( $content_ids['posts'] as $id ) { |
1254 |
- $sync_data['post'][$id] = $this->get_post( $id ); |
1255 |
- } |
1256 |
- } |
1257 |
- |
1258 |
- if ( isset( $content_ids['comments'] ) ) { |
1259 |
- foreach ( $content_ids['comments'] as $id ) { |
1260 |
- $sync_data['comment'][$id] = $this->get_post( $id ); |
1261 |
- } |
1262 |
- } |
1263 |
- |
1264 |
- if ( isset( $content_ids['options'] ) ) { |
1265 |
- foreach ( $content_ids['options'] as $option ) { |
1266 |
- $sync_data['option'][$option] = array( 'value' => get_option( $option ) ); |
1267 |
- } |
1268 |
- } |
1269 |
- |
1270 |
- return $sync_data; |
1271 |
- } |
1272 |
- |
1273 |
- /** |
1274 |
- * Helper method for registering a post for sync |
1275 |
- * |
1276 |
- * @param int $id wp_posts.ID |
1277 |
- * @param array $settings Sync data |
1278 |
- */ |
1279 |
- function register_post( $id, array $settings = null ) { |
1280 |
- $id = (int) $id; |
1281 |
- if ( !$id ) { |
1282 |
- return false; |
1283 |
- } |
1284 |
- |
1285 |
- $post = get_post( $id ); |
1286 |
- if ( !$post ) { |
1287 |
- return false; |
1288 |
- } |
1289 |
- |
1290 |
- $settings = wp_parse_args( $settings, array( |
1291 |
- 'on_behalf_of' => array(), |
1292 |
- ) ); |
1293 |
- |
1294 |
- return $this->register( 'post', $id, $settings ); |
1295 |
- } |
1296 |
- |
1297 |
- /** |
1298 |
- * Helper method for registering a comment for sync |
1299 |
- * |
1300 |
- * @param int $id wp_comments.comment_ID |
1301 |
- * @param array $settings Sync data |
1302 |
- */ |
1303 |
- function register_comment( $id, array $settings = null ) { |
1304 |
- $id = (int) $id; |
1305 |
- if ( !$id ) { |
1306 |
- return false; |
1307 |
- } |
1308 |
- |
1309 |
- $comment = get_comment( $id ); |
1310 |
- if ( !$comment || empty( $comment->comment_post_ID ) ) { |
1311 |
- return false; |
1312 |
- } |
1313 |
- |
1314 |
- $post = get_post( $comment->comment_post_ID ); |
1315 |
- if ( !$post ) { |
1316 |
- return false; |
1317 |
- } |
1318 |
- |
1319 |
- $settings = wp_parse_args( $settings, array( |
1320 |
- 'on_behalf_of' => array(), |
1321 |
- ) ); |
1322 |
- |
1323 |
- return $this->register( 'comment', $id, $settings ); |
1324 |
- } |
1325 |
- |
1326 |
-/* Posts Sync */ |
1327 |
- |
1328 |
- function posts( $file, array $settings = null ) { |
1329 |
- $module_slug = Jetpack::get_module_slug( $file ); |
1330 |
- |
1331 |
- $defaults = array( |
1332 |
- 'post_types' => array( 'post', 'page' ), |
1333 |
- 'post_stati' => array( 'publish' ), |
1334 |
- ); |
1335 |
- |
1336 |
- $this->sync_conditions['posts'][$module_slug] = wp_parse_args( $settings, $defaults ); |
1337 |
- |
1338 |
- add_action( 'transition_post_status', array( $this, 'transition_post_status_action' ), 10, 3 ); |
1339 |
- add_action( 'delete_post', array( $this, 'delete_post_action' ) ); |
1340 |
- } |
1341 |
- |
1342 |
- function delete_post_action( $post_id ) { |
1343 |
- $post = get_post( $post_id ); |
1344 |
- if ( !$post ) { |
1345 |
- return $this->register( 'delete_post', (int) $post_id ); |
1346 |
- } |
1347 |
- |
1348 |
- $this->transition_post_status_action( 'delete', $post->post_status, $post ); |
1349 |
- } |
1350 |
- |
1351 |
- function transition_post_status_action( $new_status, $old_status, $post ) { |
1352 |
- $sync = $this->get_post_sync_operation( $new_status, $old_status, $post, $this->sync_conditions['posts'] ); |
1353 |
- if ( !$sync ) { |
1354 |
- // No module wants to sync this post |
1355 |
- return false; |
1356 |
- } |
1357 |
- |
1358 |
- // Track post transitions |
1359 |
- if ( isset( $this->post_transitions[$post->ID] ) ) { |
1360 |
- // status changed more than once - keep tha most recent $new_status |
1361 |
- $this->post_transitions[$post->ID][0] = $new_status; |
1362 |
- } else { |
1363 |
- $this->post_transitions[$post->ID] = array( $new_status, $old_status ); |
1364 |
- } |
1365 |
- |
1366 |
- $operation = $sync['operation']; |
1367 |
- unset( $sync['operation'] ); |
1368 |
- |
1369 |
- switch ( $operation ) { |
1370 |
- case 'delete' : |
1371 |
- return $this->register( 'delete_post', (int) $post->ID, $sync ); |
1372 |
- case 'submit' : |
1373 |
- return $this->register_post( (int) $post->ID, $sync ); |
1374 |
- } |
1375 |
- } |
1376 |
- |
1377 |
- function get_post_sync_operation( $new_status, $old_status, $post, $module_conditions ) { |
1378 |
- $delete_on_behalf_of = array(); |
1379 |
- $submit_on_behalf_of = array(); |
1380 |
- $delete_stati = array( 'delete' ); |
1381 |
- $cache_cleared = false; |
1382 |
- |
1383 |
- foreach ( $module_conditions as $module => $conditions ) { |
1384 |
- if ( !in_array( $post->post_type, $conditions['post_types'] ) ) { |
1385 |
- continue; |
1386 |
- } |
1387 |
- |
1388 |
- $deleted_post = in_array( $new_status, $delete_stati ); |
1389 |
- |
1390 |
- if ( $deleted_post ) { |
1391 |
- $delete_on_behalf_of[] = $module; |
1392 |
- } else { |
1393 |
- if ( ! $cache_cleared ) { |
1394 |
- // inefficient to clear cache more than once |
1395 |
- clean_post_cache( $post->ID ); |
1396 |
- $cache_cleared = true; |
1397 |
- } |
1398 |
- $new_status = get_post_status( $post->ID ); // Inherited status is resolved here |
1399 |
- } |
1400 |
- |
1401 |
- $old_status_in_stati = in_array( $old_status, $conditions['post_stati'] ); |
1402 |
- $new_status_in_stati = in_array( $new_status, $conditions['post_stati'] ); |
1403 |
- |
1404 |
- if ( $old_status_in_stati && !$new_status_in_stati ) { |
1405 |
- // Jetpack no longer needs the post |
1406 |
- if ( !$deleted_post ) { |
1407 |
- $delete_on_behalf_of[] = $module; |
1408 |
- } // else, we've already flagged it above |
1409 |
- continue; |
1410 |
- } |
1411 |
- |
1412 |
- if ( !$new_status_in_stati ) { |
1413 |
- continue; |
1414 |
- } |
1415 |
- |
1416 |
- // At this point, we know we want to sync the post, not delete it |
1417 |
- $submit_on_behalf_of[] = $module; |
1418 |
- } |
1419 |
- |
1420 |
- if ( !empty( $submit_on_behalf_of ) ) { |
1421 |
- return array( 'operation' => 'submit', 'on_behalf_of' => $submit_on_behalf_of ); |
1422 |
- } |
1423 |
- |
1424 |
- if ( !empty( $delete_on_behalf_of ) ) { |
1425 |
- return array( 'operation' => 'delete', 'on_behalf_of' => $delete_on_behalf_of ); |
1426 |
- } |
1427 |
- |
1428 |
- return false; |
1429 |
- } |
1430 |
- |
1431 |
- /** |
1432 |
- * Get a post and associated data in the standard JP format. |
1433 |
- * Cannot be called statically |
1434 |
- * |
1435 |
- * @param int $id Post ID |
1436 |
- * @return Array containing full post details |
1437 |
- */ |
1438 |
- function get_post( $id ) { |
1439 |
- $post_obj = get_post( $id ); |
1440 |
- if ( !$post_obj ) |
1441 |
- return false; |
1442 |
- |
1443 |
- if ( is_callable( $post_obj, 'to_array' ) ) { |
1444 |
- // WP >= 3.5 |
1445 |
- $post = $post_obj->to_array(); |
1446 |
- } else { |
1447 |
- // WP < 3.5 |
1448 |
- $post = get_object_vars( $post_obj ); |
1449 |
- } |
1450 |
- |
1451 |
- if ( 0 < strlen( $post['post_password'] ) ) { |
1452 |
- $post['post_password'] = 'auto-' . wp_generate_password( 10, false ); // We don't want the real password. Just pass something random. |
1453 |
- } |
1454 |
- |
1455 |
- // local optimizations |
1456 |
- unset( |
1457 |
- $post['filter'], |
1458 |
- $post['ancestors'], |
1459 |
- $post['post_content_filtered'], |
1460 |
- $post['to_ping'], |
1461 |
- $post['pinged'] |
1462 |
- ); |
1463 |
- |
1464 |
- if ( $this->is_post_public( $post ) ) { |
1465 |
- $post['post_is_public'] = Jetpack_Options::get_option( 'public' ); |
1466 |
- } else { |
1467 |
- //obscure content |
1468 |
- $post['post_content'] = ''; |
1469 |
- $post['post_excerpt'] = ''; |
1470 |
- $post['post_is_public'] = false; |
1471 |
- } |
1472 |
- $post_type_obj = get_post_type_object( $post['post_type'] ); |
1473 |
- $post['post_is_excluded_from_search'] = $post_type_obj->exclude_from_search; |
1474 |
- |
1475 |
- $post['tax'] = array(); |
1476 |
- $taxonomies = get_object_taxonomies( $post_obj ); |
1477 |
- foreach ( $taxonomies as $taxonomy ) { |
1478 |
- $terms = get_object_term_cache( $post_obj->ID, $taxonomy ); |
1479 |
- if ( empty( $terms ) ) |
1480 |
- $terms = wp_get_object_terms( $post_obj->ID, $taxonomy ); |
1481 |
- $term_names = array(); |
1482 |
- foreach ( $terms as $term ) { |
1483 |
- $term_names[] = $term->name; |
1484 |
- } |
1485 |
- $post['tax'][$taxonomy] = $term_names; |
1486 |
- } |
1487 |
- |
1488 |
- $meta = get_post_meta( $post_obj->ID, false ); |
1489 |
- $post['meta'] = array(); |
1490 |
- foreach ( $meta as $key => $value ) { |
1491 |
- $post['meta'][$key] = array_map( 'maybe_unserialize', $value ); |
1492 |
- } |
1493 |
- |
1494 |
- $post['extra'] = array( |
1495 |
- 'author' => get_the_author_meta( 'display_name', $post_obj->post_author ), |
1496 |
- 'author_email' => get_the_author_meta( 'email', $post_obj->post_author ), |
1497 |
- 'dont_email_post_to_subs' => get_post_meta( $post_obj->ID, '_jetpack_dont_email_post_to_subs', true ), |
1498 |
- ); |
1499 |
- |
1500 |
- if ( $fid = get_post_thumbnail_id( $id ) ) { |
1501 |
- $feature = wp_get_attachment_image_src( $fid, 'large' ); |
1502 |
- if ( ! empty( $feature[0] ) ) { |
1503 |
- $post['extra']['featured_image'] = $feature[0]; |
1504 |
- } |
1505 |
- |
1506 |
- $attachment = get_post( $fid ); |
1507 |
- if ( ! empty( $attachment ) ) { |
1508 |
- $metadata = wp_get_attachment_metadata( $fid ); |
1509 |
- |
1510 |
- $post['extra']['post_thumbnail'] = array( |
1511 |
- 'ID' => (int) $fid, |
1512 |
- 'URL' => (string) wp_get_attachment_url( $fid ), |
1513 |
- 'guid' => (string) $attachment->guid, |
1514 |
- 'mime_type' => (string) $attachment->post_mime_type, |
1515 |
- 'width' => (int) isset( $metadata['width'] ) ? $metadata['width'] : 0, |
1516 |
- 'height' => (int) isset( $metadata['height'] ) ? $metadata['height'] : 0, |
1517 |
- ); |
1518 |
- |
1519 |
- if ( isset( $metadata['duration'] ) ) { |
1520 |
- $post['extra']['post_thumbnail'] = (int) $metadata['duration']; |
1521 |
- } |
1522 |
- |
1523 |
- /** |
1524 |
- * Filters the Post Thumbnail information returned for a specific post. |
1525 |
- * |
1526 |
- * @since 3.3.0 |
1527 |
- * |
1528 |
- * @param array $post['extra']['post_thumbnail'] { |
1529 |
- * Array of details about the Post Thumbnail. |
1530 |
- * @param int ID Post Thumbnail ID. |
1531 |
- * @param string URL Post thumbnail URL. |
1532 |
- * @param string guid Post thumbnail guid. |
1533 |
- * @param string mime_type Post thumbnail mime type. |
1534 |
- * @param int width Post thumbnail width. |
1535 |
- * @param int height Post thumbnail height. |
1536 |
- * } |
1537 |
- */ |
1538 |
- $post['extra']['post_thumbnail'] = (object) apply_filters( 'get_attachment', $post['extra']['post_thumbnail'] ); |
1539 |
- } |
1540 |
- } |
1541 |
- |
1542 |
- $post['permalink'] = get_permalink( $post_obj->ID ); |
1543 |
- $post['shortlink'] = wp_get_shortlink( $post_obj->ID ); |
1544 |
- /** |
1545 |
- * Allow modules to send extra info on the sync post process. |
1546 |
- * |
1547 |
- * @since 2.8.0 |
1548 |
- * |
1549 |
- * @param array $args Array of custom data to attach to a post. |
1550 |
- * @param Object $post_obj Object returned by get_post() for a given post ID. |
1551 |
- */ |
1552 |
- $post['module_custom_data'] = apply_filters( 'jetpack_sync_post_module_custom_data', array(), $post_obj ); |
1553 |
- return $post; |
1554 |
- } |
1555 |
- |
1556 |
- /** |
1557 |
- * Decide whether a post/page/attachment is visible to the public. |
1558 |
- * |
1559 |
- * @param array $post |
1560 |
- * @return bool |
1561 |
- */ |
1562 |
- function is_post_public( $post ) { |
1563 |
- if ( !is_array( $post ) ) { |
1564 |
- $post = (array) $post; |
1565 |
- } |
1566 |
- |
1567 |
- if ( 0 < strlen( $post['post_password'] ) ) |
1568 |
- return false; |
1569 |
- if ( ! in_array( $post['post_type'], get_post_types( array( 'public' => true ) ) ) ) |
1570 |
- return false; |
1571 |
- $post_status = get_post_status( $post['ID'] ); // Inherited status is resolved here. |
1572 |
- if ( ! in_array( $post_status, get_post_stati( array( 'public' => true ) ) ) ) |
1573 |
- return false; |
1574 |
- return true; |
1575 |
- } |
1576 |
- |
1577 |
-/* Comments Sync */ |
1578 |
- |
1579 |
- function comments( $file, array $settings = null ) { |
1580 |
- $module_slug = Jetpack::get_module_slug( $file ); |
1581 |
- |
1582 |
- $defaults = array( |
1583 |
- 'post_types' => array( 'post', 'page' ), // For what post types will we sync comments? |
1584 |
- 'post_stati' => array( 'publish' ), // For what post stati will we sync comments? |
1585 |
- 'comment_types' => array( '', 'comment', 'trackback', 'pingback' ), // What comment types will we sync? |
1586 |
- 'comment_stati' => array( 'approved' ), // What comment stati will we sync? |
1587 |
- ); |
1588 |
- |
1589 |
- $settings = wp_parse_args( $settings, $defaults ); |
1590 |
- |
1591 |
- $this->sync_conditions['comments'][$module_slug] = $settings; |
1592 |
- |
1593 |
- add_action( 'wp_insert_comment', array( $this, 'wp_insert_comment_action' ), 10, 2 ); |
1594 |
- add_action( 'transition_comment_status', array( $this, 'transition_comment_status_action' ), 10, 3 ); |
1595 |
- add_action( 'edit_comment', array( $this, 'edit_comment_action' ) ); |
1596 |
- } |
1597 |
- |
1598 |
- /* |
1599 |
- * This is really annoying. If you edit a comment, but don't change the status, WordPress doesn't fire the transition_comment_status hook. |
1600 |
- * That means we have to catch these comments on the edit_comment hook, but ignore comments on that hook when the transition_comment_status does fire. |
1601 |
- */ |
1602 |
- function edit_comment_action( $comment_id ) { |
1603 |
- $comment = get_comment( $comment_id ); |
1604 |
- $new_status = $this->translate_comment_status( $comment->comment_approved ); |
1605 |
- add_action( "comment_{$new_status}_{$comment->comment_type}", array( $this, 'transition_comment_status_for_comments_whose_status_does_not_change' ), 10, 2 ); |
1606 |
- } |
1607 |
- |
1608 |
- function wp_insert_comment_action( $comment_id, $comment ) { |
1609 |
- $this->transition_comment_status_action( $comment->comment_approved, 'new', $comment ); |
1610 |
- } |
1611 |
- |
1612 |
- function transition_comment_status_for_comments_whose_status_does_not_change( $comment_id, $comment ) { |
1613 |
- if ( isset( $this->comment_transitions[$comment_id] ) ) { |
1614 |
- return $this->transition_comment_status_action( $comment->comment_approved, $this->comment_transitions[$comment_id][1], $comment ); |
1615 |
- } |
1616 |
- |
1617 |
- return $this->transition_comment_status_action( $comment->comment_approved, $comment->comment_approved, $comment ); |
1618 |
- } |
1619 |
- |
1620 |
- function translate_comment_status( $status ) { |
1621 |
- switch ( (string) $status ) { |
1622 |
- case '0' : |
1623 |
- case 'hold' : |
1624 |
- return 'unapproved'; |
1625 |
- case '1' : |
1626 |
- case 'approve' : |
1627 |
- return 'approved'; |
1628 |
- } |
1629 |
- |
1630 |
- return $status; |
1631 |
- } |
1632 |
- |
1633 |
- function transition_comment_status_action( $new_status, $old_status, $comment ) { |
1634 |
- $post = get_post( $comment->comment_post_ID ); |
1635 |
- if ( !$post ) { |
1636 |
- return false; |
1637 |
- } |
1638 |
- |
1639 |
- foreach ( array( 'new_status', 'old_status' ) as $_status ) { |
1640 |
- $$_status = $this->translate_comment_status( $$_status ); |
1641 |
- } |
1642 |
- |
1643 |
- // Track comment transitions |
1644 |
- if ( isset( $this->comment_transitions[$comment->comment_ID] ) ) { |
1645 |
- // status changed more than once - keep tha most recent $new_status |
1646 |
- $this->comment_transitions[$comment->comment_ID][0] = $new_status; |
1647 |
- } else { |
1648 |
- $this->comment_transitions[$comment->comment_ID] = array( $new_status, $old_status ); |
1649 |
- } |
1650 |
- |
1651 |
- $post_sync = $this->get_post_sync_operation( $post->post_status, '_jetpack_test_sync', $post, $this->sync_conditions['comments'] ); |
1652 |
- |
1653 |
- if ( !$post_sync ) { |
1654 |
- // No module wants to sync this comment because its post doesn't match any sync conditions |
1655 |
- return false; |
1656 |
- } |
1657 |
- |
1658 |
- if ( 'delete' == $post_sync['operation'] ) { |
1659 |
- // Had we been looking at post sync operations (instead of comment sync operations), |
1660 |
- // this comment's post would have been deleted. Don't sync the comment. |
1661 |
- return false; |
1662 |
- } |
1663 |
- |
1664 |
- $delete_on_behalf_of = array(); |
1665 |
- $submit_on_behalf_of = array(); |
1666 |
- $delete_stati = array( 'delete' ); |
1667 |
- |
1668 |
- foreach ( $this->sync_conditions['comments'] as $module => $conditions ) { |
1669 |
- if ( !in_array( $comment->comment_type, $conditions['comment_types'] ) ) { |
1670 |
- continue; |
1671 |
- } |
1672 |
- |
1673 |
- $deleted_comment = in_array( $new_status, $delete_stati ); |
1674 |
- |
1675 |
- if ( $deleted_comment ) { |
1676 |
- $delete_on_behalf_of[] = $module; |
1677 |
- } |
1678 |
- |
1679 |
- $old_status_in_stati = in_array( $old_status, $conditions['comment_stati'] ); |
1680 |
- $new_status_in_stati = in_array( $new_status, $conditions['comment_stati'] ); |
1681 |
- |
1682 |
- if ( $old_status_in_stati && !$new_status_in_stati ) { |
1683 |
- // Jetpack no longer needs the comment |
1684 |
- if ( !$deleted_comment ) { |
1685 |
- $delete_on_behalf_of[] = $module; |
1686 |
- } // else, we've already flagged it above |
1687 |
- continue; |
1688 |
- } |
1689 |
- |
1690 |
- if ( !$new_status_in_stati ) { |
1691 |
- continue; |
1692 |
- } |
1693 |
- |
1694 |
- // At this point, we know we want to sync the comment, not delete it |
1695 |
- $submit_on_behalf_of[] = $module; |
1696 |
- } |
1697 |
- |
1698 |
- if ( ! empty( $submit_on_behalf_of ) ) { |
1699 |
- $this->register_post( $comment->comment_post_ID, array( 'on_behalf_of' => $submit_on_behalf_of ) ); |
1700 |
- return $this->register_comment( $comment->comment_ID, array( 'on_behalf_of' => $submit_on_behalf_of ) ); |
1701 |
- } |
1702 |
- |
1703 |
- if ( !empty( $delete_on_behalf_of ) ) { |
1704 |
- return $this->register( 'delete_comment', $comment->comment_ID, array( 'on_behalf_of' => $delete_on_behalf_of ) ); |
1705 |
- } |
1706 |
- |
1707 |
- return false; |
1708 |
- } |
1709 |
- |
1710 |
- /** |
1711 |
- * Get a comment and associated data in the standard JP format. |
1712 |
- * Cannot be called statically |
1713 |
- * |
1714 |
- * @param int $id Comment ID |
1715 |
- * @return Array containing full comment details |
1716 |
- */ |
1717 |
- function get_comment( $id ) { |
1718 |
- $comment_obj = get_comment( $id ); |
1719 |
- if ( !$comment_obj ) |
1720 |
- return false; |
1721 |
- $comment = get_object_vars( $comment_obj ); |
1722 |
- |
1723 |
- $meta = get_comment_meta( $id, false ); |
1724 |
- $comment['meta'] = array(); |
1725 |
- foreach ( $meta as $key => $value ) { |
1726 |
- $comment['meta'][$key] = array_map( 'maybe_unserialize', $value ); |
1727 |
- } |
1728 |
- |
1729 |
- return $comment; |
1730 |
- } |
1731 |
- |
1732 |
-/* Options Sync */ |
1733 |
- |
1734 |
- /* Ah... so much simpler than Posts and Comments :) */ |
1735 |
- function options( $file, $option /*, $option, ... */ ) { |
1736 |
- $options = func_get_args(); |
1737 |
- $file = array_shift( $options ); |
1738 |
- |
1739 |
- $module_slug = Jetpack::get_module_slug( $file ); |
1740 |
- |
1741 |
- if ( !isset( $this->sync_options[$module_slug] ) ) { |
1742 |
- $this->sync_options[$module_slug] = array(); |
1743 |
- } |
1744 |
- |
1745 |
- foreach ( $options as $option ) { |
1746 |
- $this->sync_options[$module_slug][] = $option; |
1747 |
- add_action( "delete_option_{$option}", array( $this, 'deleted_option_action' ) ); |
1748 |
- add_action( "update_option_{$option}", array( $this, 'updated_option_action' ) ); |
1749 |
- add_action( "add_option_{$option}", array( $this, 'added_option_action' ) ); |
1750 |
- } |
1751 |
- |
1752 |
- $this->sync_options[$module_slug] = array_unique( $this->sync_options[$module_slug] ); |
1753 |
- } |
1754 |
- |
1755 |
- function deleted_option_action( $option ) { |
1756 |
- $this->register( 'delete_option', $option ); |
1757 |
- } |
1758 |
- |
1759 |
- function updated_option_action() { |
1760 |
- // The value of $option isn't passed to the filter |
1761 |
- // Calculate it |
1762 |
- $option = current_filter(); |
1763 |
- $prefix = 'update_option_'; |
1764 |
- if ( 0 !== strpos( $option, $prefix ) ) { |
1765 |
- return; |
1766 |
- } |
1767 |
- $option = substr( $option, strlen( $prefix ) ); |
1768 |
- |
1769 |
- $this->added_option_action( $option ); |
1770 |
- } |
1771 |
- |
1772 |
- function added_option_action( $option ) { |
1773 |
- $this->register( 'option', $option ); |
1774 |
- } |
1775 |
- |
1776 |
- function sync_all_module_options( $module_slug ) { |
1777 |
- if ( empty( $this->sync_options[$module_slug] ) ) { |
1778 |
- return; |
1779 |
- } |
1780 |
- |
1781 |
- foreach ( $this->sync_options[$module_slug] as $option ) { |
1782 |
- $this->added_option_action( $option ); |
1783 |
- } |
1784 |
- } |
1785 |
- |
1786 |
- function sync_all_registered_options() { |
1787 |
- if ( 'jetpack_sync_all_registered_options' == current_filter() ) { |
1788 |
- add_action( 'shutdown', array( $this, 'register_all_options' ), 8 ); |
1789 |
- } else { |
1790 |
- wp_schedule_single_event( time(), 'jetpack_sync_all_registered_options', array( $this->sync_options ) ); |
1791 |
- } |
1792 |
- } |
1793 |
- |
1794 |
- /** |
1795 |
- * All the options that are defined in modules as well as class.jetpack.php will get synced. |
1796 |
- * Registers all options to be synced. |
1797 |
- */ |
1798 |
- function register_all_options() { |
1799 |
- $all_registered_options = array_unique( call_user_func_array( 'array_merge', $this->sync_options ) ); |
1800 |
- foreach ( $all_registered_options as $option ) { |
1801 |
- $this->added_option_action( $option ); |
1802 |
- } |
1803 |
- } |
1804 |
- |
1805 |
-/* Constants Sync */ |
1806 |
- |
1807 |
- function get_all_constants() { |
1808 |
- return array( |
1809 |
- 'EMPTY_TRASH_DAYS', |
1810 |
- 'WP_POST_REVISIONS', |
1811 |
- 'AUTOMATIC_UPDATER_DISABLED', |
1812 |
- 'ABSPATH', |
1813 |
- 'WP_CONTENT_DIR', |
1814 |
- 'FS_METHOD', |
1815 |
- 'DISALLOW_FILE_EDIT', |
1816 |
- 'DISALLOW_FILE_MODS', |
1817 |
- 'WP_AUTO_UPDATE_CORE', |
1818 |
- 'WP_HTTP_BLOCK_EXTERNAL', |
1819 |
- 'WP_ACCESSIBLE_HOSTS', |
1820 |
- ); |
1821 |
- } |
1822 |
- /** |
1823 |
- * This lets us get the constant value like get_option( 'jetpack_constant_CONSTANT' ); |
1824 |
- * Not the best way to get the constant value but necessery in some cases like in the API. |
1825 |
- */ |
1826 |
- function register_constants_as_options() { |
1827 |
- foreach( $this->get_all_constants() as $constant ) { |
1828 |
- add_filter( 'pre_option_jetpack_constant_'. $constant, array( $this, 'get_default_constant' ) ); |
1829 |
- } |
1830 |
- } |
1831 |
- |
1832 |
- function sync_all_constants() { |
1833 |
- // add the constant to sync. |
1834 |
- foreach( $this->get_all_constants() as $constant ) { |
1835 |
- $this->register_constant( $constant ); |
1836 |
- } |
1837 |
- add_action( 'shutdown', array( $this, 'register_all_module_constants' ), 8 ); |
1838 |
- } |
1839 |
- |
1840 |
- /** |
1841 |
- * Returns default values of Constants |
1842 |
- */ |
1843 |
- function default_constant( $constant ) { |
1844 |
- switch( $constant ) { |
1845 |
- case 'WP_AUTO_UPDATE_CORE': |
1846 |
- return 'minor'; |
1847 |
- break; |
1848 |
- |
1849 |
- default: |
1850 |
- return null; |
1851 |
- break; |
1852 |
- } |
1853 |
- } |
1854 |
- |
1855 |
- function register_all_module_constants() { |
1856 |
- // also add the contstants from each module to be synced. |
1857 |
- foreach( $this->sync_constants as $module ) { |
1858 |
- foreach( $module as $constant ) { |
1859 |
- $this->register_constant( $constant ); |
1860 |
- } |
1861 |
- } |
1862 |
- } |
1863 |
- |
1864 |
- /** |
1865 |
- * Sync constants required by the module that was just activated. |
1866 |
- * If you add Jetpack_Sync::sync_constant( __FILE__, 'HELLO_WORLD' ); |
1867 |
- * to the module it will start syncing the constant after the constant has been updated. |
1868 |
- * |
1869 |
- * This function gets called on module activation. |
1870 |
- */ |
1871 |
- function sync_module_constants( $module ) { |
1872 |
- |
1873 |
- if ( isset( $this->sync_constants[ $module ] ) && is_array( $this->sync_constants[ $module ] ) ) { |
1874 |
- // also add the contstants from each module to be synced. |
1875 |
- foreach( $this->sync_constants[ $module ] as $constant ) { |
1876 |
- $this->register_constant( $constant ); |
1877 |
- } |
1878 |
- } |
1879 |
- } |
1880 |
- |
1881 |
- public function reindex_needed() { |
1882 |
- return ( $this->_get_post_count_local() != $this->_get_post_count_cloud() ); |
1883 |
- } |
1884 |
- |
1885 |
- public function reindex_trigger() { |
1886 |
- $response = array( 'status' => 'ERROR' ); |
1887 |
- |
1888 |
- // Force a privacy check |
1889 |
- Jetpack::check_privacy( JETPACK__PLUGIN_FILE ); |
1890 |
- |
1891 |
- Jetpack::load_xml_rpc_client(); |
1892 |
- $client = new Jetpack_IXR_Client( array( |
1893 |
- 'user_id' => JETPACK_MASTER_USER, |
1894 |
- ) ); |
1895 |
- |
1896 |
- $client->query( 'jetpack.reindexTrigger' ); |
1897 |
- |
1898 |
- if ( !$client->isError() ) { |
1899 |
- $response = $client->getResponse(); |
1900 |
- Jetpack_Options::update_option( 'sync_bulk_reindexing', true ); |
1901 |
- } |
1902 |
- |
1903 |
- return $response; |
1904 |
- } |
1905 |
- |
1906 |
- public function reindex_status() { |
1907 |
- $response = array( 'status' => 'ERROR' ); |
1908 |
- |
1909 |
- // Assume reindexing is done if it was not triggered in the first place |
1910 |
- if ( false === Jetpack_Options::get_option( 'sync_bulk_reindexing' ) ) { |
1911 |
- return array( 'status' => 'DONE' ); |
1912 |
- } |
1913 |
- |
1914 |
- Jetpack::load_xml_rpc_client(); |
1915 |
- $client = new Jetpack_IXR_Client( array( |
1916 |
- 'user_id' => JETPACK_MASTER_USER, |
1917 |
- ) ); |
1918 |
- |
1919 |
- $client->query( 'jetpack.reindexStatus' ); |
1920 |
- |
1921 |
- if ( !$client->isError() ) { |
1922 |
- $response = $client->getResponse(); |
1923 |
- if ( 'DONE' == $response['status'] ) { |
1924 |
- Jetpack_Options::delete_option( 'sync_bulk_reindexing' ); |
1925 |
- } |
1926 |
- } |
1927 |
- |
1928 |
- return $response; |
1929 |
- } |
1930 |
- |
1931 |
- public function reindex_ui() { |
1932 |
- $strings = json_encode( array( |
1933 |
- 'WAITING' => array( |
1934 |
- 'action' => __( 'Refresh Status', 'jetpack' ), |
1935 |
- 'status' => __( 'Indexing request queued and waiting…', 'jetpack' ), |
1936 |
- ), |
1937 |
- 'INDEXING' => array( |
1938 |
- 'action' => __( 'Refresh Status', 'jetpack' ), |
1939 |
- 'status' => __( 'Indexing posts', 'jetpack' ), |
1940 |
- ), |
1941 |
- 'DONE' => array( |
1942 |
- 'action' => __( 'Reindex Posts', 'jetpack' ), |
1943 |
- 'status' => __( 'Posts indexed.', 'jetpack' ), |
1944 |
- ), |
1945 |
- 'ERROR' => array( |
1946 |
- 'action' => __( 'Refresh Status', 'jetpack' ), |
1947 |
- 'status' => __( 'Status unknown.', 'jetpack' ), |
1948 |
- ), |
1949 |
- 'ERROR:LARGE' => array( |
1950 |
- 'action' => __( 'Refresh Status', 'jetpack' ), |
1951 |
- 'status' => __( 'This site is too large, please contact Jetpack support to sync.', 'jetpack' ), |
1952 |
- ), |
1953 |
- ) ); |
1954 |
- |
1955 |
- wp_enqueue_script( |
1956 |
- 'jetpack_sync_reindex_control', |
1957 |
- plugins_url( '_inc/jquery.jetpack-sync.js', JETPACK__PLUGIN_FILE ), |
1958 |
- array( 'jquery' ), |
1959 |
- JETPACK__VERSION |
1960 |
- ); |
1961 |
- |
1962 |
- $template = <<<EOT |
1963 |
- <p class="jetpack_sync_reindex_control" id="jetpack_sync_reindex_control" data-strings="%s"> |
1964 |
- <input type="submit" class="jetpack_sync_reindex_control_action button" value="%s" disabled /> |
1965 |
- <span class="jetpack_sync_reindex_control_status">…</span> |
1966 |
- </p> |
1967 |
-EOT; |
1968 |
- |
1969 |
- return sprintf( |
1970 |
- $template, |
1971 |
- esc_attr( $strings ), |
1972 |
- esc_attr__( 'Refresh Status', 'jetpack' ) |
1973 |
- ); |
1974 |
- } |
1975 |
- |
1976 |
- private function _get_post_count_local() { |
1977 |
- global $wpdb; |
1978 |
- return (int) $wpdb->get_var( |
1979 |
- "SELECT count(*) |
1980 |
- FROM {$wpdb->posts} |
1981 |
- WHERE post_status = 'publish' AND post_password = ''" |
1982 |
- ); |
1983 |
- } |
1984 |
- |
1985 |
- private function _get_post_count_cloud() { |
1986 |
- $blog_id = Jetpack::init()->get_option( 'id' ); |
1987 |
- |
1988 |
- $body = array( |
1989 |
- 'size' => 1, |
1990 |
- ); |
1991 |
- |
1992 |
- $response = wp_remote_post( |
1993 |
- "https://public-api.wordpress.com/rest/v1/sites/$blog_id/search", |
1994 |
- array( |
1995 |
- 'timeout' => 10, |
1996 |
- 'user-agent' => 'jetpack_related_posts', |
1997 |
- 'sslverify' => true, |
1998 |
- 'body' => $body, |
1999 |
- ) |
2000 |
- ); |
2001 |
- |
2002 |
- if ( is_wp_error( $response ) ) { |
2003 |
- return 0; |
2004 |
- } |
2005 |
- |
2006 |
- $results = json_decode( wp_remote_retrieve_body( $response ), true ); |
2007 |
- |
2008 |
- return isset( $results['results'] ) && isset( $results['results']['total'] ) ? (int) $results['results']['total'] : 0; |
2009 |
- } |
2010 |
- |
2011 |
- /** |
2012 |
- * Sometimes we need to fake options to be able to sync data with .com |
2013 |
- * This is a helper function. That will make it easier to do just that. |
2014 |
- * |
2015 |
- * It will make sure that the options are synced when do_action( 'jetpack_sync_all_registered_options' ); |
2016 |
- * |
2017 |
- * Which should happen everytime we update Jetpack to a new version or daily by Jetpack_Heartbeat. |
2018 |
- * |
2019 |
- * $callback is a function that is passed into a filter that returns the value of the option. |
2020 |
- * This value should never be false. Since we want to short circuit the get_option function |
2021 |
- * to return the value of the our callback. |
2022 |
- * |
2023 |
- * You can also trigger an update when a something else changes by calling the |
2024 |
- * do_action( 'add_option_jetpack_' . $option, 'jetpack_'.$option, $callback_function ); |
2025 |
- * on the action that should that would trigger the update. |
2026 |
- * |
2027 |
- * |
2028 |
- * @param string $option Option will always be prefixed with Jetpack and be saved on .com side |
2029 |
- * @param string or array $callback |
2030 |
- */ |
2031 |
- function mock_option( $option , $callback ) { |
2032 |
- add_filter( 'pre_option_jetpack_'. $option, $callback ); |
2033 |
- // This shouldn't happen but if it does we return the same as before. |
2034 |
- add_filter( 'option_jetpack_'. $option, $callback ); |
2035 |
- // Instead of passing a file we just pass in a string. |
2036 |
- $this->options( 'mock-option' , 'jetpack_' . $option ); |
2037 |
- |
2038 |
- } |
2039 |
- /** |
2040 |
- * Sometimes you need to sync constants to .com |
2041 |
- * Using the function will allow you to do just that. |
2042 |
- * |
2043 |
- * @param 'string' $constant Constants defined in code. |
2044 |
- * |
2045 |
- */ |
2046 |
- function register_constant( $constant ) { |
2047 |
- $this->register( 'constant', $constant ); |
2048 |
- } |
2049 |
- |
2050 |
- function get_default_constant() { |
2051 |
- $filter = current_filter(); |
2052 |
- // We don't know what the constant is so we get it from the current filter. |
2053 |
- if ( 'pre_option_jetpack_constant_' === substr( $filter, 0, 28 ) ) { |
2054 |
- $constant = substr( $filter, 28 ); |
2055 |
- if ( defined( $constant ) ) { |
2056 |
- // If constant is set to false we will not shortcut the get_option function and will return the default value. |
2057 |
- // Hance we set it to null. Which in most cases would produce the same result. |
2058 |
- return false === constant( $constant ) ? null : constant( $constant ); |
2059 |
- } |
2060 |
- return $this->default_constant( $constant ); |
2061 |
- } |
2062 |
- } |
2063 |
- /** |
2064 |
- * Simular to $this->options() function. |
2065 |
- * Add the constant to be synced to .com when we activate the module. |
2066 |
- * As well as on heartbeat and plugin upgrade and connection to .com. |
2067 |
- * |
2068 |
- * @param string $file |
2069 |
- * @param string $constant |
2070 |
- */ |
2071 |
- function constant( $file, $constant ) { |
2072 |
- $constants = func_get_args(); |
2073 |
- $file = array_shift( $constants ); |
2074 |
- |
2075 |
- $module_slug = Jetpack::get_module_slug( $file ); |
2076 |
- |
2077 |
- if ( ! isset( $this->sync_constants[ $module_slug ] ) ) { |
2078 |
- $this->sync_constants[ $module_slug ] = array(); |
2079 |
- } |
2080 |
- |
2081 |
- foreach ( $constants as $constant ) { |
2082 |
- $this->sync_constants[ $module_slug ][] = $constant; |
2083 |
- } |
2084 |
- } |
2085 |
- |
2086 |
- /** |
2087 |
- * Helper function to return the constants value. |
2088 |
- * |
2089 |
- * @param string $constant |
2090 |
- * @return value of the constant or null if the constant is set to false or doesn't exits. |
2091 |
- */ |
2092 |
- static function get_constant( $constant ) { |
2093 |
- if ( defined( $constant ) ) { |
2094 |
- return constant( $constant ); |
2095 |
- } |
2096 |
- |
2097 |
- return null; |
2098 |
- } |
2099 |
-} |
2100 |
|
2101 |
diff --git a/plugins/jetpack/class.jetpack-twitter-cards.php b/plugins/jetpack/class.jetpack-twitter-cards.php |
2102 |
index 3e99ba1..e309617 100644 |
2103 |
--- a/plugins/jetpack/class.jetpack-twitter-cards.php |
2104 |
+++ b/plugins/jetpack/class.jetpack-twitter-cards.php |
2105 |
@@ -178,7 +178,7 @@ class Jetpack_Twitter_Cards { |
2106 |
} |
2107 |
|
2108 |
static function site_tag() { |
2109 |
- $site_tag = get_option( 'jetpack-twitter-cards-site-tag' ); |
2110 |
+ $site_tag = Jetpack_Options::get_option_and_ensure_autoload( 'jetpack-twitter-cards-site-tag', '' ); |
2111 |
if ( empty( $site_tag ) ) { |
2112 |
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
2113 |
return 'wordpressdotcom'; |
2114 |
|
2115 |
diff --git a/plugins/jetpack/class.jetpack-user-agent.php b/plugins/jetpack/class.jetpack-user-agent.php |
2116 |
index 64aea25..490d85e 100644 |
2117 |
--- a/plugins/jetpack/class.jetpack-user-agent.php |
2118 |
+++ b/plugins/jetpack/class.jetpack-user-agent.php |
2119 |
@@ -1,47 +1,89 @@ |
2120 |
<?php |
2121 |
|
2122 |
+/** |
2123 |
+ * Determine if the current User Agent matches the passed $kind |
2124 |
+ * |
2125 |
+ * @param string $kind Category of mobile device to check for. |
2126 |
+ * Either: any, dumb, smart. |
2127 |
+ * @param bool $return_matched_agent Boolean indicating if the UA should be returned |
2128 |
+ * |
2129 |
+ * @return bool|string Boolean indicating if current UA matches $kind. If |
2130 |
+ * $return_matched_agent is true, returns the UA string |
2131 |
+ */ |
2132 |
function jetpack_is_mobile( $kind = 'any', $return_matched_agent = false ) { |
2133 |
- static $kinds = array( 'smart' => false, 'dumb' => false, 'any' => false ); |
2134 |
- static $first_run = true; |
2135 |
+ static $kinds = array( 'smart' => false, 'dumb' => false, 'any' => false ); |
2136 |
+ static $first_run = true; |
2137 |
static $matched_agent = ''; |
2138 |
|
2139 |
+ // If an invalid kind is passed in, reset it to default. |
2140 |
+ if ( ! isset( $kinds[ $kind ] ) ) { |
2141 |
+ $kind = 'any'; |
2142 |
+ } |
2143 |
+ |
2144 |
+ if ( function_exists( 'apply_filters' ) ) { |
2145 |
+ /** |
2146 |
+ * Filter the value of jetpack_is_mobile before it is calculated. |
2147 |
+ * |
2148 |
+ * Passing a truthy value to the filter will short-circuit determining the |
2149 |
+ * mobile type, returning the passed value instead. |
2150 |
+ * |
2151 |
+ * @since 4.2.0 |
2152 |
+ * |
2153 |
+ * @param bool|string $matches Boolean if current UA matches $kind or not. If |
2154 |
+ * $return_matched_agent is true, should return the UA string |
2155 |
+ * @param string $kind Category of mobile device being checked |
2156 |
+ * @param bool $return_matched_agent Boolean indicating if the UA should be returned |
2157 |
+ */ |
2158 |
+ $pre = apply_filters( 'pre_jetpack_is_mobile', null, $kind, $return_matched_agent ); |
2159 |
+ |
2160 |
+ if ( null !== $pre ) { |
2161 |
+ return $pre; |
2162 |
+ } |
2163 |
+ } |
2164 |
+ |
2165 |
$ua_info = new Jetpack_User_Agent_Info(); |
2166 |
|
2167 |
- if ( empty( $_SERVER['HTTP_USER_AGENT'] ) || strpos( strtolower( $_SERVER['HTTP_USER_AGENT'] ), 'ipad' ) ) |
2168 |
+ if ( empty( $_SERVER['HTTP_USER_AGENT'] ) || strpos( strtolower( $_SERVER['HTTP_USER_AGENT'] ), 'ipad' ) ) { |
2169 |
return false; |
2170 |
+ } |
2171 |
|
2172 |
// Remove Samsung Galaxy tablets (SCH-I800) from being mobile devices |
2173 |
- if ( strpos( strtolower( $_SERVER['HTTP_USER_AGENT'] ) , 'sch-i800') ) |
2174 |
+ if ( strpos( strtolower( $_SERVER['HTTP_USER_AGENT'] ) , 'sch-i800') ) { |
2175 |
return false; |
2176 |
+ } |
2177 |
|
2178 |
- if( $ua_info->is_android_tablet() && $ua_info->is_kindle_touch() === false ) |
2179 |
+ if( $ua_info->is_android_tablet() && $ua_info->is_kindle_touch() === false ) { |
2180 |
return false; |
2181 |
+ } |
2182 |
|
2183 |
- if( $ua_info->is_blackberry_tablet() ) |
2184 |
+ if( $ua_info->is_blackberry_tablet() ) { |
2185 |
return false; |
2186 |
+ } |
2187 |
|
2188 |
if ( $first_run ) { |
2189 |
$first_run = false; |
2190 |
|
2191 |
//checks for iPhoneTier devices & RichCSS devices |
2192 |
if ( $ua_info->isTierIphone() || $ua_info->isTierRichCSS() ) { |
2193 |
- $kinds['smart'] = true; |
2194 |
- $matched_agent = $ua_info->matched_agent; |
2195 |
+ $kinds['smart'] = true; |
2196 |
+ $matched_agent = $ua_info->matched_agent; |
2197 |
} |
2198 |
|
2199 |
- if ( !$kinds['smart'] ) { |
2200 |
+ if ( ! $kinds['smart'] ) { |
2201 |
// if smart, we are not dumb so no need to check |
2202 |
$dumb_agents = $ua_info->dumb_agents; |
2203 |
- $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
2204 |
+ $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
2205 |
+ |
2206 |
foreach ( $dumb_agents as $dumb_agent ) { |
2207 |
if ( false !== strpos( $agent, $dumb_agent ) ) { |
2208 |
$kinds['dumb'] = true; |
2209 |
$matched_agent = $dumb_agent; |
2210 |
+ |
2211 |
break; |
2212 |
} |
2213 |
} |
2214 |
|
2215 |
- if ( !$kinds['dumb'] ) { |
2216 |
+ if ( ! $kinds['dumb'] ) { |
2217 |
if ( isset( $_SERVER['HTTP_X_WAP_PROFILE'] ) ) { |
2218 |
$kinds['dumb'] = true; |
2219 |
$matched_agent = 'http_x_wap_profile'; |
2220 |
@@ -52,14 +94,32 @@ function jetpack_is_mobile( $kind = 'any', $return_matched_agent = false ) { |
2221 |
} |
2222 |
} |
2223 |
|
2224 |
- if ( $kinds['dumb'] || $kinds['smart'] ) |
2225 |
+ if ( $kinds['dumb'] || $kinds['smart'] ) { |
2226 |
$kinds['any'] = true; |
2227 |
+ } |
2228 |
} |
2229 |
|
2230 |
- if ( $return_matched_agent ) |
2231 |
- return $matched_agent; |
2232 |
+ $value = $kinds[ $kind ]; |
2233 |
+ |
2234 |
+ if ( $return_matched_agent ) { |
2235 |
+ $value = $matched_agent; |
2236 |
+ } |
2237 |
+ |
2238 |
+ if ( function_exists( 'apply_filters' ) ) { |
2239 |
+ /** |
2240 |
+ * Filter the value of jetpack_is_mobile |
2241 |
+ * |
2242 |
+ * @since 4.2.0 |
2243 |
+ * |
2244 |
+ * @param bool|string $matches Boolean if current UA matches $kind or not. If |
2245 |
+ * $return_matched_agent is true, should return the UA string |
2246 |
+ * @param string $kind Category of mobile device being checked |
2247 |
+ * @param bool $return_matched_agent Boolean indicating if the UA should be returned |
2248 |
+ */ |
2249 |
+ $value = apply_filters( 'jetpack_is_mobile', $value, $kind, $return_matched_agent ); |
2250 |
+ } |
2251 |
|
2252 |
- return $kinds[$kind]; |
2253 |
+ return $value; |
2254 |
} |
2255 |
|
2256 |
class Jetpack_User_Agent_Info { |
2257 |
|
2258 |
diff --git a/plugins/jetpack/class.jetpack-xmlrpc-server.php b/plugins/jetpack/class.jetpack-xmlrpc-server.php |
2259 |
index 9ecad85..9f3ba88 100644 |
2260 |
--- a/plugins/jetpack/class.jetpack-xmlrpc-server.php |
2261 |
+++ b/plugins/jetpack/class.jetpack-xmlrpc-server.php |
2262 |
@@ -28,10 +28,6 @@ class Jetpack_XMLRPC_Server { |
2263 |
'jetpack.testAPIUserCode' => array( $this, 'test_api_user_code' ), |
2264 |
'jetpack.featuresAvailable' => array( $this, 'features_available' ), |
2265 |
'jetpack.featuresEnabled' => array( $this, 'features_enabled' ), |
2266 |
- 'jetpack.getPost' => array( $this, 'get_post' ), |
2267 |
- 'jetpack.getPosts' => array( $this, 'get_posts' ), |
2268 |
- 'jetpack.getComment' => array( $this, 'get_comment' ), |
2269 |
- 'jetpack.getComments' => array( $this, 'get_comments' ), |
2270 |
'jetpack.disconnectBlog' => array( $this, 'disconnect_blog' ), |
2271 |
'jetpack.unlinkUser' => array( $this, 'unlink_user' ), |
2272 |
) ); |
2273 |
@@ -301,7 +297,7 @@ class Jetpack_XMLRPC_Server { |
2274 |
'code' => (string) $api_user_code, |
2275 |
) ), $jetpack_token->secret ); |
2276 |
|
2277 |
- if ( $hmac !== $verify ) { |
2278 |
+ if ( ! hash_equals( $hmac, $verify ) ) { |
2279 |
return false; |
2280 |
} |
2281 |
|
2282 |
@@ -359,54 +355,6 @@ class Jetpack_XMLRPC_Server { |
2283 |
return $modules; |
2284 |
} |
2285 |
|
2286 |
- function get_post( $id ) { |
2287 |
- if ( !$id = (int) $id ) { |
2288 |
- return false; |
2289 |
- } |
2290 |
- |
2291 |
- $jetpack = Jetpack::init(); |
2292 |
- |
2293 |
- $post = $jetpack->sync->get_post( $id ); |
2294 |
- return $post; |
2295 |
- } |
2296 |
- |
2297 |
- function get_posts( $args ) { |
2298 |
- list( $post_ids ) = $args; |
2299 |
- $post_ids = array_map( 'intval', (array) $post_ids ); |
2300 |
- $jp = Jetpack::init(); |
2301 |
- $sync_data = $jp->sync->get_content( array( 'posts' => $post_ids ) ); |
2302 |
- |
2303 |
- return $sync_data; |
2304 |
- } |
2305 |
- |
2306 |
- function get_comment( $id ) { |
2307 |
- if ( !$id = (int) $id ) { |
2308 |
- return false; |
2309 |
- } |
2310 |
- |
2311 |
- $jetpack = Jetpack::init(); |
2312 |
- |
2313 |
- $comment = $jetpack->sync->get_comment( $id ); |
2314 |
- if ( !is_array( $comment ) ) |
2315 |
- return false; |
2316 |
- |
2317 |
- $post = $jetpack->sync->get_post( $comment['comment_post_ID'] ); |
2318 |
- if ( !$post ) { |
2319 |
- return false; |
2320 |
- } |
2321 |
- |
2322 |
- return $comment; |
2323 |
- } |
2324 |
- |
2325 |
- function get_comments( $args ) { |
2326 |
- list( $comment_ids ) = $args; |
2327 |
- $comment_ids = array_map( 'intval', (array) $comment_ids ); |
2328 |
- $jp = Jetpack::init(); |
2329 |
- $sync_data = $jp->sync->get_content( array( 'comments' => $comment_ids ) ); |
2330 |
- |
2331 |
- return $sync_data; |
2332 |
- } |
2333 |
- |
2334 |
function update_attachment_parent( $args ) { |
2335 |
$attachment_id = (int) $args[0]; |
2336 |
$parent_id = (int) $args[1]; |
2337 |
|
2338 |
diff --git a/plugins/jetpack/class.jetpack.php b/plugins/jetpack/class.jetpack.php |
2339 |
index 19ad263..c93bfab 100644 |
2340 |
--- a/plugins/jetpack/class.jetpack.php |
2341 |
+++ b/plugins/jetpack/class.jetpack.php |
2342 |
@@ -71,7 +71,7 @@ class Jetpack { |
2343 |
'latex' => array( 'wp-latex/wp-latex.php', 'WP LaTeX' ) |
2344 |
); |
2345 |
|
2346 |
- public $capability_translations = array( |
2347 |
+ static $capability_translations = array( |
2348 |
'administrator' => 'manage_options', |
2349 |
'editor' => 'edit_others_posts', |
2350 |
'author' => 'publish_posts', |
2351 |
@@ -196,6 +196,8 @@ class Jetpack { |
2352 |
'add-meta-tags/add-meta-tags.php', // Add Meta Tags |
2353 |
'autodescription/autodescription.php', // The SEO Framework |
2354 |
'easy-facebook-share-thumbnails/esft.php', // Easy Facebook Share Thumbnail |
2355 |
+ 'heateor-open-graph-meta-tags/heateor-open-graph-meta-tags.php', |
2356 |
+ // Open Graph Meta Tags by Heateor |
2357 |
'facebook/facebook.php', // Facebook (official plugin) |
2358 |
'facebook-awd/AWD_facebook.php', // Facebook AWD All in one |
2359 |
'facebook-featured-image-and-open-graph-meta-tags/fb-featured-image.php', |
2360 |
@@ -279,13 +281,6 @@ class Jetpack { |
2361 |
public $stats = array(); |
2362 |
|
2363 |
/** |
2364 |
- * Allows us to build a temporary security report |
2365 |
- * |
2366 |
- * @var array |
2367 |
- */ |
2368 |
- static $security_report = array(); |
2369 |
- |
2370 |
- /** |
2371 |
* Jetpack_Sync object |
2372 |
*/ |
2373 |
public $sync; |
2374 |
@@ -316,7 +311,6 @@ class Jetpack { |
2375 |
self::$instance = new Jetpack; |
2376 |
|
2377 |
self::$instance->plugin_upgrade(); |
2378 |
- |
2379 |
} |
2380 |
|
2381 |
return self::$instance; |
2382 |
@@ -334,30 +328,83 @@ class Jetpack { |
2383 |
$unfiltered_modules = Jetpack::get_active_modules(); |
2384 |
$modules = array_filter( $unfiltered_modules, array( 'Jetpack', 'is_module' ) ); |
2385 |
if ( array_diff( $unfiltered_modules, $modules ) ) { |
2386 |
- Jetpack_Options::update_option( 'active_modules', $modules ); |
2387 |
+ Jetpack::update_active_modules( $modules ); |
2388 |
} |
2389 |
|
2390 |
- add_action( 'init', array( __CLASS__, 'activate_new_modules' ) ); |
2391 |
- /** |
2392 |
- * Fires when synchronizing all registered options and constants. |
2393 |
- * |
2394 |
- * @since 3.3.0 |
2395 |
- */ |
2396 |
- do_action( 'jetpack_sync_all_registered_options' ); |
2397 |
+ // Reset cached module data |
2398 |
+ Jetpack_Options::delete_option( 'file_data' ); |
2399 |
|
2400 |
+ add_action( 'init', array( __CLASS__, 'activate_new_modules' ) ); |
2401 |
Jetpack::maybe_set_version_option(); |
2402 |
} |
2403 |
} |
2404 |
} |
2405 |
|
2406 |
static function activate_manage( ) { |
2407 |
- |
2408 |
if ( did_action( 'init' ) || current_filter() == 'init' ) { |
2409 |
self::activate_module( 'manage', false, false ); |
2410 |
} else if ( ! has_action( 'init' , array( __CLASS__, 'activate_manage' ) ) ) { |
2411 |
add_action( 'init', array( __CLASS__, 'activate_manage' ) ); |
2412 |
} |
2413 |
+ } |
2414 |
+ |
2415 |
+ static function update_active_modules( $modules ) { |
2416 |
+ $current_modules = Jetpack_Options::get_option( 'active_modules', array() ); |
2417 |
+ |
2418 |
+ $success = Jetpack_Options::update_option( 'active_modules', array_unique( $modules ) ); |
2419 |
+ |
2420 |
+ if ( is_array( $modules ) && is_array( $current_modules ) ) { |
2421 |
+ $new_active_modules = array_diff( $modules, $current_modules ); |
2422 |
+ foreach( $new_active_modules as $module ) { |
2423 |
+ /** |
2424 |
+ * Fires when a specific module is activated. |
2425 |
+ * |
2426 |
+ * @since 1.9.0 |
2427 |
+ * |
2428 |
+ * @param string $module Module slug. |
2429 |
+ * @param boolean $success whether the module was activated. @since 4.2 |
2430 |
+ */ |
2431 |
+ do_action( 'jetpack_activate_module', $module, $success ); |
2432 |
+ |
2433 |
+ /** |
2434 |
+ * Fires when a module is activated. |
2435 |
+ * The dynamic part of the filter, $module, is the module slug. |
2436 |
+ * |
2437 |
+ * @since 1.9.0 |
2438 |
+ * |
2439 |
+ * @param string $module Module slug. |
2440 |
+ */ |
2441 |
+ do_action( "jetpack_activate_module_$module", $module ); |
2442 |
+ } |
2443 |
+ |
2444 |
+ $new_deactive_modules = array_diff( $current_modules, $modules ); |
2445 |
+ foreach( $new_deactive_modules as $module ) { |
2446 |
+ /** |
2447 |
+ * Fired after a module has been deactivated. |
2448 |
+ * |
2449 |
+ * @since 4.2.0 |
2450 |
+ * |
2451 |
+ * @param string $module Module slug. |
2452 |
+ * @param boolean $success whether the module was deactivated. |
2453 |
+ */ |
2454 |
+ do_action( 'jetpack_deactivate_module', $module, $success ); |
2455 |
+ /** |
2456 |
+ * Fires when a module is deactivated. |
2457 |
+ * The dynamic part of the filter, $module, is the module slug. |
2458 |
+ * |
2459 |
+ * @since 1.9.0 |
2460 |
+ * |
2461 |
+ * @param string $module Module slug. |
2462 |
+ */ |
2463 |
+ do_action( "jetpack_deactivate_module_$module", $module ); |
2464 |
+ } |
2465 |
+ } |
2466 |
+ |
2467 |
+ return $success; |
2468 |
+ } |
2469 |
|
2470 |
+ static function delete_active_modules() { |
2471 |
+ self::update_active_modules( array() ); |
2472 |
} |
2473 |
|
2474 |
/** |
2475 |
@@ -369,19 +416,6 @@ class Jetpack { |
2476 |
*/ |
2477 |
add_action( 'init', array( $this, 'deprecated_hooks' ) ); |
2478 |
|
2479 |
- /** |
2480 |
- * We need sync object even in Multisite mode |
2481 |
- */ |
2482 |
- $this->sync = new Jetpack_Sync; |
2483 |
- |
2484 |
- /** |
2485 |
- * Trigger a wp_version sync when updating WP versions |
2486 |
- **/ |
2487 |
- add_action( 'upgrader_process_complete', array( 'Jetpack', 'update_get_wp_version' ), 10, 2 ); |
2488 |
- $this->sync->mock_option( 'wp_version', array( 'Jetpack', 'get_wp_version' ) ); |
2489 |
- |
2490 |
- add_action( 'init', array( $this, 'sync_update_data') ); |
2491 |
- add_action( 'init', array( $this, 'sync_theme_data' ) ); |
2492 |
|
2493 |
/* |
2494 |
* Load things that should only be in Network Admin. |
2495 |
@@ -392,85 +426,8 @@ class Jetpack { |
2496 |
*/ |
2497 |
if( is_multisite() ) { |
2498 |
Jetpack_Network::init(); |
2499 |
- |
2500 |
- // Only sync this info if we are on a multi site |
2501 |
- // @since 3.7 |
2502 |
- $this->sync->mock_option( 'network_name', array( 'Jetpack', 'network_name' ) ); |
2503 |
- $this->sync->mock_option( 'network_allow_new_registrations', array( 'Jetpack', 'network_allow_new_registrations' ) ); |
2504 |
- $this->sync->mock_option( 'network_add_new_users', array( 'Jetpack', 'network_add_new_users' ) ); |
2505 |
- $this->sync->mock_option( 'network_site_upload_space', array( 'Jetpack', 'network_site_upload_space' ) ); |
2506 |
- $this->sync->mock_option( 'network_upload_file_types', array( 'Jetpack', 'network_upload_file_types' ) ); |
2507 |
- $this->sync->mock_option( 'network_enable_administration_menus', array( 'Jetpack', 'network_enable_administration_menus' ) ); |
2508 |
- |
2509 |
- if( is_network_admin() ) { |
2510 |
- // Sync network site data if it is updated or not. |
2511 |
- add_action( 'update_wpmu_options', array( $this, 'update_jetpack_network_settings' ) ); |
2512 |
- return; // End here to prevent single site actions from firing |
2513 |
- } |
2514 |
- } |
2515 |
- |
2516 |
- |
2517 |
- $theme_slug = get_option( 'stylesheet' ); |
2518 |
- |
2519 |
- |
2520 |
- // Modules should do Jetpack_Sync::sync_options( __FILE__, $option, ... ); instead |
2521 |
- // We access the "internal" method here only because the Jetpack object isn't instantiated yet |
2522 |
- $this->sync->options( |
2523 |
- JETPACK__PLUGIN_DIR . 'jetpack.php', |
2524 |
- 'home', |
2525 |
- 'siteurl', |
2526 |
- 'blogname', |
2527 |
- 'gmt_offset', |
2528 |
- 'timezone_string', |
2529 |
- 'security_report', |
2530 |
- 'stylesheet', |
2531 |
- "theme_mods_{$theme_slug}", |
2532 |
- 'jetpack_sync_non_public_post_stati', |
2533 |
- 'jetpack_options', |
2534 |
- 'site_icon', // (int) - ID of core's Site Icon attachment ID |
2535 |
- 'default_post_format', |
2536 |
- 'default_category', |
2537 |
- 'large_size_w', |
2538 |
- 'large_size_h', |
2539 |
- 'thumbnail_size_w', |
2540 |
- 'thumbnail_size_h', |
2541 |
- 'medium_size_w', |
2542 |
- 'medium_size_h', |
2543 |
- 'thumbnail_crop', |
2544 |
- 'image_default_link_type' |
2545 |
- ); |
2546 |
- |
2547 |
- foreach( Jetpack_Options::get_option_names( 'non-compact' ) as $option ) { |
2548 |
- $this->sync->options( __FILE__, 'jetpack_' . $option ); |
2549 |
} |
2550 |
|
2551 |
- /** |
2552 |
- * Sometimes you want to sync data to .com without adding options to .org sites. |
2553 |
- * The mock option allows you to do just that. |
2554 |
- */ |
2555 |
- $this->sync->mock_option( 'is_main_network', array( $this, 'is_main_network_option' ) ); |
2556 |
- $this->sync->mock_option( 'is_multi_site', array( $this, 'is_multisite' ) ); |
2557 |
- $this->sync->mock_option( 'main_network_site', array( $this, 'jetpack_main_network_site_option' ) ); |
2558 |
- $this->sync->mock_option( 'single_user_site', array( 'Jetpack', 'is_single_user_site' ) ); |
2559 |
- $this->sync->mock_option( 'stat_data', array( $this, 'get_stat_data' ) ); |
2560 |
- |
2561 |
- $this->sync->mock_option( 'has_file_system_write_access', array( 'Jetpack', 'file_system_write_access' ) ); |
2562 |
- $this->sync->mock_option( 'is_version_controlled', array( 'Jetpack', 'is_version_controlled' ) ); |
2563 |
- $this->sync->mock_option( 'max_upload_size', 'wp_max_upload_size' ); |
2564 |
- $this->sync->mock_option( 'content_width', array( 'Jetpack', 'get_content_width' ) ); |
2565 |
- |
2566 |
- /** |
2567 |
- * Trigger an update to the main_network_site when we update the blogname of a site. |
2568 |
- * |
2569 |
- */ |
2570 |
- add_action( 'update_option_siteurl', array( $this, 'update_jetpack_main_network_site_option' ) ); |
2571 |
- |
2572 |
- add_action( 'update_option', array( $this, 'log_settings_change' ), 10, 3 ); |
2573 |
- |
2574 |
- // Update the settings everytime the we register a new user to the site or we delete a user. |
2575 |
- add_action( 'user_register', array( $this, 'is_single_user_site_invalidate' ) ); |
2576 |
- add_action( 'deleted_user', array( $this, 'is_single_user_site_invalidate' ) ); |
2577 |
- |
2578 |
// Unlink user before deleting the user from .com |
2579 |
add_action( 'deleted_user', array( $this, 'unlink_user' ), 10, 1 ); |
2580 |
add_action( 'remove_user_from_blog', array( $this, 'unlink_user' ), 10, 1 ); |
2581 |
@@ -533,9 +490,6 @@ class Jetpack { |
2582 |
// Filter the dashboard meta box order to swap the new one in in place of the old one. |
2583 |
add_filter( 'get_user_option_meta-box-order_dashboard', array( $this, 'get_user_option_meta_box_order_dashboard' ) ); |
2584 |
|
2585 |
- add_action( 'wp_ajax_jetpack-sync-reindex-trigger', array( $this, 'sync_reindex_trigger' ) ); |
2586 |
- add_action( 'wp_ajax_jetpack-sync-reindex-status', array( $this, 'sync_reindex_status' ) ); |
2587 |
- |
2588 |
// returns HTTPS support status |
2589 |
add_action( 'wp_ajax_jetpack-recheck-ssl', array( $this, 'ajax_recheck_ssl' ) ); |
2590 |
|
2591 |
@@ -562,12 +516,12 @@ class Jetpack { |
2592 |
add_action( 'customize_controls_enqueue_scripts', array( $this, 'devicepx' ) ); |
2593 |
add_action( 'admin_enqueue_scripts', array( $this, 'devicepx' ) ); |
2594 |
|
2595 |
- add_action( 'jetpack_activate_module', array( $this, 'activate_module_actions' ) ); |
2596 |
- |
2597 |
add_action( 'plugins_loaded', array( $this, 'extra_oembed_providers' ), 100 ); |
2598 |
|
2599 |
add_action( 'jetpack_notices', array( $this, 'show_development_mode_notice' ) ); |
2600 |
|
2601 |
+ add_action( 'jetpack_notices', array( $this, 'show_sync_lag_notice' ) ); |
2602 |
+ |
2603 |
/** |
2604 |
* These actions run checks to load additional files. |
2605 |
* They check for external files or plugins, so they need to run as late as possible. |
2606 |
@@ -598,33 +552,6 @@ class Jetpack { |
2607 |
add_action( 'wp_print_footer_scripts', array( $this, 'implode_frontend_css' ), -1 ); // Run first to trigger before `print_late_styles` |
2608 |
} |
2609 |
|
2610 |
- // Sync Core Icon: Detect changes in Core's Site Icon and make it syncable. |
2611 |
- add_action( 'add_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) ); |
2612 |
- add_action( 'update_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) ); |
2613 |
- add_action( 'delete_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) ); |
2614 |
- add_action( 'jetpack_heartbeat', array( $this, 'jetpack_sync_core_icon' ) ); |
2615 |
- |
2616 |
- } |
2617 |
- |
2618 |
- /* |
2619 |
- * Make sure any site icon added to core can get |
2620 |
- * synced back to dotcom, so we can display it there. |
2621 |
- */ |
2622 |
- function jetpack_sync_core_icon() { |
2623 |
- if ( function_exists( 'get_site_icon_url' ) ) { |
2624 |
- $url = get_site_icon_url(); |
2625 |
- } else { |
2626 |
- return; |
2627 |
- } |
2628 |
- |
2629 |
- require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
2630 |
- // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
2631 |
- if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
2632 |
- // This is the option that is synced with dotcom |
2633 |
- Jetpack_Options::update_option( 'site_icon_url', $url ); |
2634 |
- } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
2635 |
- Jetpack_Options::delete_option( 'site_icon_url' ); |
2636 |
- } |
2637 |
} |
2638 |
|
2639 |
function jetpack_admin_ajax_tracks_callback() { |
2640 |
@@ -930,13 +857,7 @@ class Jetpack { |
2641 |
// Don't let anyone authenticate |
2642 |
$_COOKIE = array(); |
2643 |
remove_all_filters( 'authenticate' ); |
2644 |
- |
2645 |
- /** |
2646 |
- * For the moment, remove Limit Login Attempts if its xmlrpc for Jetpack. |
2647 |
- * If Limit Login Attempts is installed as a mu-plugin, it can occasionally |
2648 |
- * generate false-positives. |
2649 |
- */ |
2650 |
- remove_filter( 'wp_login_failed', 'limit_login_failed' ); |
2651 |
+ remove_all_actions( 'wp_login_failed' ); |
2652 |
|
2653 |
if ( Jetpack::is_active() ) { |
2654 |
// Allow Jetpack authentication |
2655 |
@@ -1003,7 +924,7 @@ class Jetpack { |
2656 |
jetpack_register_genericons(); |
2657 |
|
2658 |
/** |
2659 |
- * Register the social logos |
2660 |
+ * Register the social logos |
2661 |
*/ |
2662 |
require_once( JETPACK__PLUGIN_DIR . '_inc/social-logos.php' ); |
2663 |
jetpack_register_social_logos(); |
2664 |
@@ -1200,51 +1121,15 @@ class Jetpack { |
2665 |
* @return null |
2666 |
*/ |
2667 |
function update_jetpack_main_network_site_option() { |
2668 |
- // do_action( 'add_option_$option', '$option', '$value-of-the-option' ); |
2669 |
- /** |
2670 |
- * Fires when the site URL is updated. |
2671 |
- * Determines if the site is the main site of a Mulitiste network. |
2672 |
- * |
2673 |
- * @since 3.3.0 |
2674 |
- * |
2675 |
- * @param string jetpack_main_network_site. |
2676 |
- * @param string network_site_url() Site URL for the "main" site of the current Multisite network. |
2677 |
- */ |
2678 |
- do_action( 'add_option_jetpack_main_network_site', 'jetpack_main_network_site', network_site_url() ); |
2679 |
- /** |
2680 |
- * Fires when the site URL is updated. |
2681 |
- * Determines if the is part of a multi network. |
2682 |
- * |
2683 |
- * @since 3.3.0 |
2684 |
- * |
2685 |
- * @param string jetpack_is_main_network. |
2686 |
- * @param bool Jetpack::is_multi_network() Is the site part of a multi network. |
2687 |
- */ |
2688 |
- do_action( 'add_option_jetpack_is_main_network', 'jetpack_is_main_network', (string) (bool) Jetpack::is_multi_network() ); |
2689 |
- /** |
2690 |
- * Fires when the site URL is updated. |
2691 |
- * Determines if the site is part of a multisite network. |
2692 |
- * |
2693 |
- * @since 3.4.0 |
2694 |
- * |
2695 |
- * @param string jetpack_is_multi_site. |
2696 |
- * @param bool is_multisite() Is the site part of a mutlisite network. |
2697 |
- */ |
2698 |
- do_action( 'add_option_jetpack_is_multi_site', 'jetpack_is_multi_site', (string) (bool) is_multisite() ); |
2699 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2' ); |
2700 |
} |
2701 |
/** |
2702 |
* Triggered after a user updates the network settings via Network Settings Admin Page |
2703 |
* |
2704 |
*/ |
2705 |
function update_jetpack_network_settings() { |
2706 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2' ); |
2707 |
// Only sync this info for the main network site. |
2708 |
- do_action( 'add_option_jetpack_network_name', 'jetpack_network_name', Jetpack::network_name() ); |
2709 |
- do_action( 'add_option_jetpack_network_allow_new_registrations', 'jetpack_network_allow_new_registrations', Jetpack::network_allow_new_registrations() ); |
2710 |
- do_action( 'add_option_jetpack_network_add_new_users', 'jetpack_network_add_new_users', Jetpack::network_add_new_users() ); |
2711 |
- do_action( 'add_option_jetpack_network_site_upload_space', 'jetpack_network_site_upload_space', Jetpack::network_site_upload_space() ); |
2712 |
- do_action( 'add_option_jetpack_network_upload_file_types', 'jetpack_network_upload_file_types', Jetpack::network_upload_file_types() ); |
2713 |
- do_action( 'add_option_jetpack_network_enable_administration_menus', 'jetpack_network_enable_administration_menus', Jetpack::network_enable_administration_menus() ); |
2714 |
- |
2715 |
} |
2716 |
|
2717 |
/** |
2718 |
@@ -1253,13 +1138,9 @@ class Jetpack { |
2719 |
* @return bool |
2720 |
*/ |
2721 |
public static function is_single_user_site() { |
2722 |
- |
2723 |
- $user_query = new WP_User_Query( array( |
2724 |
- 'blog_id' => get_current_blog_id(), |
2725 |
- 'fields' => 'ID', |
2726 |
- 'number' => 2 |
2727 |
- ) ); |
2728 |
- return 1 === (int) $user_query->get_total(); |
2729 |
+ global $wpdb; |
2730 |
+ $some_users = $wpdb->get_var( "select count(*) from (select user_id from $wpdb->usermeta where meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) as someusers" ); |
2731 |
+ return 1 === (int) $some_users; |
2732 |
} |
2733 |
|
2734 |
/** |
2735 |
@@ -1292,17 +1173,8 @@ class Jetpack { |
2736 |
* @return string ( '1' | '0' ) |
2737 |
**/ |
2738 |
public static function is_version_controlled() { |
2739 |
- |
2740 |
- if ( !class_exists( 'WP_Automatic_Updater' ) ) { |
2741 |
- require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); |
2742 |
- } |
2743 |
- $updater = new WP_Automatic_Updater(); |
2744 |
- $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); |
2745 |
- // transients should not be empty |
2746 |
- if ( empty( $is_version_controlled ) ) { |
2747 |
- $is_version_controlled = '0'; |
2748 |
- } |
2749 |
- return $is_version_controlled; |
2750 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2', 'Jetpack_Sync_Functions::is_version_controlled' ); |
2751 |
+ return (string) (int) Jetpack_Sync_Functions::is_version_controlled(); |
2752 |
} |
2753 |
|
2754 |
/** |
2755 |
@@ -1310,59 +1182,10 @@ class Jetpack { |
2756 |
* @return string ( '1' | '0' ) |
2757 |
*/ |
2758 |
public static function featured_images_enabled() { |
2759 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2' ); |
2760 |
return current_theme_supports( 'post-thumbnails' ) ? '1' : '0'; |
2761 |
} |
2762 |
|
2763 |
- /* |
2764 |
- * Sync back wp_version |
2765 |
- */ |
2766 |
- public static function get_wp_version() { |
2767 |
- global $wp_version; |
2768 |
- return $wp_version; |
2769 |
- } |
2770 |
- |
2771 |
- /** |
2772 |
- * Keeps wp_version in sync with .com when WordPress core updates |
2773 |
- **/ |
2774 |
- public static function update_get_wp_version( $update, $meta_data ) { |
2775 |
- if ( 'update' === $meta_data['action'] && 'core' === $meta_data['type'] ) { |
2776 |
- /** This action is documented in wp-includes/option.php */ |
2777 |
- /** |
2778 |
- * This triggers the sync for the jetpack version |
2779 |
- * See Jetpack_Sync options method for more info. |
2780 |
- */ |
2781 |
- do_action( 'add_option_jetpack_wp_version', 'jetpack_wp_version', (string) Jetpack::get_wp_version() ); |
2782 |
- } |
2783 |
- } |
2784 |
- |
2785 |
- /** |
2786 |
- * Triggers a sync of update counts and update details |
2787 |
- */ |
2788 |
- function sync_update_data() { |
2789 |
- // Anytime WordPress saves update data, we'll want to sync update data |
2790 |
- add_action( 'set_site_transient_update_plugins', array( 'Jetpack', 'refresh_update_data' ) ); |
2791 |
- add_action( 'set_site_transient_update_themes', array( 'Jetpack', 'refresh_update_data' ) ); |
2792 |
- add_action( 'set_site_transient_update_core', array( 'Jetpack', 'refresh_update_data' ) ); |
2793 |
- // Anytime a connection to jetpack is made, sync the update data |
2794 |
- add_action( 'jetpack_site_registered', array( 'Jetpack', 'refresh_update_data' ) ); |
2795 |
- // Anytime the Jetpack Version changes, sync the the update data |
2796 |
- add_action( 'updating_jetpack_version', array( 'Jetpack', 'refresh_update_data' ) ); |
2797 |
- |
2798 |
- if ( current_user_can( 'update_core' ) && current_user_can( 'update_plugins' ) && current_user_can( 'update_themes' ) ) { |
2799 |
- $this->sync->mock_option( 'updates', array( 'Jetpack', 'get_updates' ) ); |
2800 |
- } |
2801 |
- |
2802 |
- $this->sync->mock_option( 'update_details', array( 'Jetpack', 'get_update_details' ) ); |
2803 |
- } |
2804 |
- |
2805 |
- /** |
2806 |
- * Triggers a sync of information specific to the current theme. |
2807 |
- */ |
2808 |
- function sync_theme_data() { |
2809 |
- add_action( 'switch_theme', array( 'Jetpack', 'refresh_theme_data' ) ); |
2810 |
- $this->sync->mock_option( 'featured_images_enabled', array( 'Jetpack', 'featured_images_enabled' ) ); |
2811 |
- } |
2812 |
- |
2813 |
/** |
2814 |
* jetpack_updates is saved in the following schema: |
2815 |
* |
2816 |
@@ -1404,58 +1227,12 @@ class Jetpack { |
2817 |
} |
2818 |
|
2819 |
public static function refresh_update_data() { |
2820 |
- if ( current_user_can( 'update_core' ) && current_user_can( 'update_plugins' ) && current_user_can( 'update_themes' ) ) { |
2821 |
- /** |
2822 |
- * Fires whenever the amount of updates needed for a site changes. |
2823 |
- * Syncs an array that includes the number of theme, plugin, and core updates available, as well as the latest core version available. |
2824 |
- * |
2825 |
- * @since 3.7.0 |
2826 |
- * |
2827 |
- * @param string jetpack_updates |
2828 |
- * @param array Update counts calculated by Jetpack::get_updates |
2829 |
- */ |
2830 |
- do_action( 'add_option_jetpack_updates', 'jetpack_updates', Jetpack::get_updates() ); |
2831 |
- } |
2832 |
- /** |
2833 |
- * Fires whenever the amount of updates needed for a site changes. |
2834 |
- * Syncs an array of core, theme, and plugin data, and which of each is out of date |
2835 |
- * |
2836 |
- * @since 3.7.0 |
2837 |
- * |
2838 |
- * @param string jetpack_update_details |
2839 |
- * @param array Update details calculated by Jetpack::get_update_details |
2840 |
- */ |
2841 |
- do_action( 'add_option_jetpack_update_details', 'jetpack_update_details', Jetpack::get_update_details() ); |
2842 |
- } |
2843 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2' ); |
2844 |
|
2845 |
- public static function refresh_theme_data() { |
2846 |
- /** |
2847 |
- * Fires whenever a theme change is made. |
2848 |
- * |
2849 |
- * @since 3.8.1 |
2850 |
- * |
2851 |
- * @param string featured_images_enabled |
2852 |
- * @param boolean Whether featured images are enabled or not |
2853 |
- */ |
2854 |
- do_action( 'add_option_jetpack_featured_images_enabled', 'jetpack_featured_images_enabled', Jetpack::featured_images_enabled() ); |
2855 |
} |
2856 |
|
2857 |
- /** |
2858 |
- * Invalides the transient as well as triggers the update of the mock option. |
2859 |
- * |
2860 |
- * @return null |
2861 |
- */ |
2862 |
- function is_single_user_site_invalidate() { |
2863 |
- /** |
2864 |
- * Fires when a user is added or removed from a site. |
2865 |
- * Determines if the site is a single user site. |
2866 |
- * |
2867 |
- * @since 3.4.0 |
2868 |
- * |
2869 |
- * @param string jetpack_single_user_site. |
2870 |
- * @param bool Jetpack::is_single_user_site() Is the current site a single user site. |
2871 |
- */ |
2872 |
- do_action( 'update_option_jetpack_single_user_site', 'jetpack_single_user_site', (bool) Jetpack::is_single_user_site() ); |
2873 |
+ public static function refresh_theme_data() { |
2874 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2' ); |
2875 |
} |
2876 |
|
2877 |
/** |
2878 |
@@ -1537,6 +1314,25 @@ class Jetpack { |
2879 |
} |
2880 |
} |
2881 |
|
2882 |
+ public static function show_sync_lag_notice() { |
2883 |
+ if ( ! Jetpack::is_active() && Jetpack::is_staging_site() && Jetpack::is_development_mode() ) { |
2884 |
+ return; |
2885 |
+ } |
2886 |
+ |
2887 |
+ require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-listener.php'; |
2888 |
+ $listener = Jetpack_Sync_Listener::get_instance(); |
2889 |
+ $queue = $listener->get_sync_queue(); |
2890 |
+ |
2891 |
+ if ( ! $listener->can_add_to_queue( $queue ) ) { // Display notice if the lag is large then 24 hours. |
2892 |
+ $contact_url = admin_url( "admin.php?page=jetpack-debugger&contact=1¬e=Jetpack is not able to talk to WordPress.com." ); |
2893 |
+ $notice = sprintf( |
2894 |
+ __( 'Oh no! Jetpack is unable to communicate with WordPress.com. This affects a number of features you may be using. Please check your server logs for errors and <a href="%s">contact Jetpack support</a>.', 'jetpack' ), |
2895 |
+ esc_url( $contact_url ) |
2896 |
+ ); |
2897 |
+ echo '<div class="error" style="border-color: #dc3232;"><p>' . $notice . '</p></div>'; |
2898 |
+ } |
2899 |
+ } |
2900 |
+ |
2901 |
/** |
2902 |
* Whether Jetpack's version maps to a public release, or a development version. |
2903 |
*/ |
2904 |
@@ -1552,6 +1348,7 @@ class Jetpack { |
2905 |
if ( ! $user_id ) { |
2906 |
return false; |
2907 |
} |
2908 |
+ |
2909 |
return (bool) Jetpack_Data::get_access_token( $user_id ); |
2910 |
} |
2911 |
|
2912 |
@@ -1623,47 +1420,8 @@ class Jetpack { |
2913 |
* Synchronize connected user role changes |
2914 |
*/ |
2915 |
function user_role_change( $user_id ) { |
2916 |
- if ( Jetpack::is_active() && Jetpack::is_user_connected( $user_id ) ) { |
2917 |
- $current_user_id = get_current_user_id(); |
2918 |
- wp_set_current_user( $user_id ); |
2919 |
- $role = $this->translate_current_user_to_role(); |
2920 |
- $signed_role = $this->sign_role( $role ); |
2921 |
- wp_set_current_user( $current_user_id ); |
2922 |
- |
2923 |
- $master_token = Jetpack_Data::get_access_token( JETPACK_MASTER_USER ); |
2924 |
- $master_user_id = absint( $master_token->external_user_id ); |
2925 |
- |
2926 |
- if ( ! $master_user_id ) |
2927 |
- return; // this shouldn't happen |
2928 |
- |
2929 |
- Jetpack::xmlrpc_async_call( 'jetpack.updateRole', $user_id, $signed_role ); |
2930 |
- //@todo retry on failure |
2931 |
- |
2932 |
- //try to choose a new master if we're demoting the current one |
2933 |
- if ( $user_id == $master_user_id && 'administrator' != $role ) { |
2934 |
- $query = new WP_User_Query( |
2935 |
- array( |
2936 |
- 'fields' => array( 'id' ), |
2937 |
- 'role' => 'administrator', |
2938 |
- 'orderby' => 'id', |
2939 |
- 'exclude' => array( $master_user_id ), |
2940 |
- ) |
2941 |
- ); |
2942 |
- $new_master = false; |
2943 |
- foreach ( $query->results as $result ) { |
2944 |
- $uid = absint( $result->id ); |
2945 |
- if ( $uid && Jetpack::is_user_connected( $uid ) ) { |
2946 |
- $new_master = $uid; |
2947 |
- break; |
2948 |
- } |
2949 |
- } |
2950 |
- |
2951 |
- if ( $new_master ) { |
2952 |
- Jetpack_Options::update_option( 'master_user', $new_master ); |
2953 |
- } |
2954 |
- // else disconnect..? |
2955 |
- } |
2956 |
- } |
2957 |
+ _deprecated_function( __METHOD__, 'jetpack-4.2', 'Jetpack_Sync_Users::user_role_change()' ); |
2958 |
+ Jetpack_Sync_Users::user_role_change( $user_id ); |
2959 |
} |
2960 |
|
2961 |
/** |
2962 |
@@ -1729,7 +1487,7 @@ class Jetpack { |
2963 |
|
2964 |
if ( ! @include( Jetpack::get_module_path( $module ) ) ) { |
2965 |
unset( $modules[ $index ] ); |
2966 |
- Jetpack_Options::update_option( 'active_modules', array_values( $modules ) ); |
2967 |
+ self::update_active_modules( array_values( $modules ) ); |
2968 |
continue; |
2969 |
} |
2970 |
|
2971 |
@@ -1810,7 +1568,8 @@ class Jetpack { |
2972 |
if ( ! function_exists( 'get_plugins' ) ) { |
2973 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
2974 |
} |
2975 |
- $all_plugins = get_plugins(); |
2976 |
+ /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ |
2977 |
+ $all_plugins = apply_filters( 'all_plugins', get_plugins() ); |
2978 |
$active_plugins = Jetpack::get_active_plugins(); |
2979 |
|
2980 |
$plugins = array(); |
2981 |
@@ -1936,53 +1695,6 @@ class Jetpack { |
2982 |
} |
2983 |
} |
2984 |
|
2985 |
- |
2986 |
- |
2987 |
- |
2988 |
- /* |
2989 |
- * |
2990 |
- * Jetpack Security Reports |
2991 |
- * |
2992 |
- * Allowed types: login_form, backup, file_scanning, spam |
2993 |
- * |
2994 |
- * Args for login_form and spam: 'blocked'=>(int)(optional), 'status'=>(string)(ok, warning, error), 'message'=>(optional, disregarded if status is ok, allowed tags: a, em, strong) |
2995 |
- * |
2996 |
- * Args for backup and file_scanning: 'last'=>(timestamp)(optional), 'next'=>(timestamp)(optional), 'status'=>(string)(ok, warning, error), 'message'=>(optional, disregarded if status is ok, allowed tags: a, em, strong) |
2997 |
- * |
2998 |
- * |
2999 |
- * Example code to submit a security report: |
3000 |
- * |
3001 |
- * function akismet_submit_jetpack_security_report() { |
3002 |
- * Jetpack::submit_security_report( 'spam', __FILE__, $args = array( 'blocked' => 138284, status => 'ok' ) ); |
3003 |
- * } |
3004 |
- * add_action( 'jetpack_security_report', 'akismet_submit_jetpack_security_report' ); |
3005 |
- * |
3006 |
- */ |
3007 |
- |
3008 |
- |
3009 |
- /** |
3010 |
- * Calls for security report submissions. |
3011 |
- * |
3012 |
- * @return null |
3013 |
- */ |
3014 |
- public static function perform_security_reporting() { |
3015 |
- $no_check_needed = get_site_transient( 'security_report_performed_recently' ); |
3016 |
- |
3017 |
- if ( $no_check_needed ) { |
3018 |
- return; |
3019 |
- } |
3020 |
- |
3021 |
- /** |
3022 |
- * Fires before a security report is created. |
3023 |
- * |
3024 |
- * @since 3.4.0 |
3025 |
- */ |
3026 |
- do_action( 'jetpack_security_report' ); |
3027 |
- |
3028 |
- Jetpack_Options::update_option( 'security_report', self::$security_report ); |
3029 |
- set_site_transient( 'security_report_performed_recently', 1, 15 * MINUTE_IN_SECONDS ); |
3030 |
- } |
3031 |
- |
3032 |
/** |
3033 |
* Allows plugins to submit security reports. |
3034 |
* |
3035 |
@@ -1991,79 +1703,9 @@ class Jetpack { |
3036 |
* @param array $args See definitions above |
3037 |
*/ |
3038 |
public static function submit_security_report( $type = '', $plugin_file = '', $args = array() ) { |
3039 |
- |
3040 |
- if( !doing_action( 'jetpack_security_report' ) ) { |
3041 |
- return new WP_Error( 'not_collecting_report', 'Not currently collecting security reports. Please use the jetpack_security_report hook.' ); |
3042 |
- } |
3043 |
- |
3044 |
- if( !is_string( $type ) || !is_string( $plugin_file ) ) { |
3045 |
- return new WP_Error( 'invalid_security_report', 'Invalid Security Report' ); |
3046 |
- } |
3047 |
- |
3048 |
- if( !function_exists( 'get_plugin_data' ) ) { |
3049 |
- include( ABSPATH . 'wp-admin/includes/plugin.php' ); |
3050 |
- } |
3051 |
- |
3052 |
- //Get rid of any non-allowed args |
3053 |
- $args = array_intersect_key( $args, array_flip( array( 'blocked', 'last', 'next', 'status', 'message' ) ) ); |
3054 |
- |
3055 |
- $plugin = get_plugin_data( $plugin_file ); |
3056 |
- |
3057 |
- if ( !$plugin['Name'] ) { |
3058 |
- return new WP_Error( 'security_report_missing_plugin_name', 'Invalid Plugin File Provided' ); |
3059 |
- } |
3060 |
- |
3061 |
- // Sanitize everything to make sure we're not syncing something wonky |
3062 |
- $type = sanitize_key( $type ); |
3063 |
- |
3064 |
- $args['plugin'] = $plugin; |
3065 |
- |
3066 |
- // Cast blocked, last and next as integers. |
3067 |
- // Last and next should be in unix timestamp format |
3068 |
- if ( isset( $args['blocked'] ) ) { |
3069 |
- $args['blocked'] = (int) $args['blocked']; |
3070 |
- } |
3071 |
- if ( isset( $args['last'] ) ) { |
3072 |
- $args['last'] = (int) $args['last']; |
3073 |
- } |
3074 |
- if ( isset( $args['next'] ) ) { |
3075 |
- $args['next'] = (int) $args['next']; |
3076 |
- } |
3077 |
- if ( !in_array( $args['status'], array( 'ok', 'warning', 'error' ) ) ) { |
3078 |
- $args['status'] = 'ok'; |
3079 |
- } |
3080 |
- if ( isset( $args['message'] ) ) { |
3081 |
- |
3082 |
- if( $args['status'] == 'ok' ) { |
3083 |
- unset( $args['message'] ); |
3084 |
- } |
3085 |
- |
3086 |
- $allowed_html = array( |
3087 |
- 'a' => array( |
3088 |
- 'href' => array(), |
3089 |
- 'title' => array() |
3090 |
- ), |
3091 |
- 'em' => array(), |
3092 |
- 'strong' => array(), |
3093 |
- ); |
3094 |
- |
3095 |
- $args['message'] = wp_kses( $args['message'], $allowed_html ); |
3096 |
- } |
3097 |
- |
3098 |
- $plugin_name = $plugin[ 'Name' ]; |
3099 |
- |
3100 |
- self::$security_report[ $type ][ $plugin_name ] = $args; |
3101 |
- } |
3102 |
- |
3103 |
- /** |
3104 |
- * Collects a new report if needed, then returns it. |
3105 |
- */ |
3106 |
- public function get_security_report() { |
3107 |
- self::perform_security_reporting(); |
3108 |
- return Jetpack_Options::get_option( 'security_report' ); |
3109 |
+ _deprecated_function( __FUNCTION__, 'jetpack-4.2', null ); |
3110 |
} |
3111 |
|
3112 |
- |
3113 |
/* Jetpack Options API */ |
3114 |
|
3115 |
public static function get_option_names( $type = 'compact' ) { |
3116 |
@@ -2539,23 +2181,14 @@ class Jetpack { |
3117 |
public static function get_file_data( $file, $headers ) { |
3118 |
//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
3119 |
$file_name = basename( $file ); |
3120 |
- $file_data_option = Jetpack_Options::get_option( 'file_data', array() ); |
3121 |
- $key = md5( $file_name . serialize( $headers ) ); |
3122 |
- $refresh_cache = is_admin() && isset( $_GET['page'] ) && 'jetpack' === substr( $_GET['page'], 0, 7 ); |
3123 |
+ $file_data = Jetpack_Options::get_option( 'file_data', array() ); |
3124 |
|
3125 |
- // If we don't need to refresh the cache, and already have the value, short-circuit! |
3126 |
- if ( ! $refresh_cache && isset( $file_data_option[ JETPACK__VERSION ][ $key ] ) ) { |
3127 |
- return $file_data_option[ JETPACK__VERSION ][ $key ]; |
3128 |
+ if ( ! array_key_exists( $file_name, $file_data ) ) { |
3129 |
+ $file_data[ $file_name ] = get_file_data( $file, $headers ); |
3130 |
+ Jetpack_Options::update_option( 'file_data', $file_data ); |
3131 |
} |
3132 |
|
3133 |
- $data = get_file_data( $file, $headers ); |
3134 |
- |
3135 |
- // Strip out any old Jetpack versions that are cluttering the option. |
3136 |
- $file_data_option = array_intersect_key( (array) $file_data_option, array( JETPACK__VERSION => null ) ); |
3137 |
- $file_data_option[ JETPACK__VERSION ][ $key ] = $data; |
3138 |
- Jetpack_Options::update_option( 'file_data', $file_data_option ); |
3139 |
- |
3140 |
- return $data; |
3141 |
+ return $file_data[ $file_name ]; |
3142 |
} |
3143 |
|
3144 |
/** |
3145 |
@@ -2717,7 +2350,7 @@ class Jetpack { |
3146 |
foreach ( $modules as $module ) { |
3147 |
if ( did_action( "jetpack_module_loaded_$module" ) ) { |
3148 |
$active[] = $module; |
3149 |
- Jetpack_Options::update_option( 'active_modules', array_unique( $active ) ); |
3150 |
+ self::update_active_modules( $active ); |
3151 |
continue; |
3152 |
} |
3153 |
|
3154 |
@@ -2749,14 +2382,7 @@ class Jetpack { |
3155 |
Jetpack::state( 'module', $module ); |
3156 |
ob_start(); |
3157 |
require $file; |
3158 |
- /** |
3159 |
- * Fires when a specific module is activated. |
3160 |
- * |
3161 |
- * @since 1.9.0 |
3162 |
- * |
3163 |
- * @param string $module Module slug. |
3164 |
- */ |
3165 |
- do_action( 'jetpack_activate_module', $module ); |
3166 |
+ |
3167 |
$active[] = $module; |
3168 |
$state = in_array( $module, $other_modules ) ? 'reactivated_modules' : 'activated_modules'; |
3169 |
if ( $active_state = Jetpack::state( $state ) ) { |
3170 |
@@ -2766,7 +2392,8 @@ class Jetpack { |
3171 |
} |
3172 |
$active_state[] = $module; |
3173 |
Jetpack::state( $state, implode( ',', $active_state ) ); |
3174 |
- Jetpack_Options::update_option( 'active_modules', array_unique( $active ) ); |
3175 |
+ Jetpack::update_active_modules( $active ); |
3176 |
+ |
3177 |
ob_end_clean(); |
3178 |
} |
3179 |
Jetpack::state( 'error', false ); |
3180 |
@@ -2841,10 +2468,10 @@ class Jetpack { |
3181 |
Jetpack::catch_errors( true ); |
3182 |
ob_start(); |
3183 |
require Jetpack::get_module_path( $module ); |
3184 |
- /** This action is documented in class.jetpack.php */ |
3185 |
- do_action( 'jetpack_activate_module', $module ); |
3186 |
+ |
3187 |
$active[] = $module; |
3188 |
- Jetpack_Options::update_option( 'active_modules', array_unique( $active ) ); |
3189 |
+ Jetpack::update_active_modules( $active ); |
3190 |
+ |
3191 |
Jetpack::state( 'error', false ); // the override |
3192 |
Jetpack::state( 'message', 'module_activated' ); |
3193 |
Jetpack::state( 'module', $module ); |
3194 |
@@ -2871,17 +2498,7 @@ class Jetpack { |
3195 |
} |
3196 |
|
3197 |
function activate_module_actions( $module ) { |
3198 |
- /** |
3199 |
- * Fires when a module is activated. |
3200 |
- * The dynamic part of the filter, $module, is the module slug. |
3201 |
- * |
3202 |
- * @since 1.9.0 |
3203 |
- * |
3204 |
- * @param string $module Module slug. |
3205 |
- */ |
3206 |
- do_action( "jetpack_activate_module_$module", $module ); |
3207 |
- |
3208 |
- $this->sync->sync_all_module_options( $module ); |
3209 |
+ _deprecated_function( __METHOD__, 'jeptack-4.2' ); |
3210 |
} |
3211 |
|
3212 |
public static function deactivate_module( $module ) { |
3213 |
@@ -2899,16 +2516,6 @@ class Jetpack { |
3214 |
$active = Jetpack::get_active_modules(); |
3215 |
$new = array_filter( array_diff( $active, (array) $module ) ); |
3216 |
|
3217 |
- /** |
3218 |
- * Fires when a module is deactivated. |
3219 |
- * The dynamic part of the filter, $module, is the module slug. |
3220 |
- * |
3221 |
- * @since 1.9.0 |
3222 |
- * |
3223 |
- * @param string $module Module slug. |
3224 |
- */ |
3225 |
- do_action( "jetpack_deactivate_module_$module", $module ); |
3226 |
- |
3227 |
// A flag for Jump Start so it's not shown again. |
3228 |
if ( 'new_connection' === Jetpack_Options::get_option( 'jumpstart' ) ) { |
3229 |
Jetpack_Options::update_option( 'jumpstart', 'jetpack_action_taken' ); |
3230 |
@@ -2919,7 +2526,7 @@ class Jetpack { |
3231 |
$jetpack->do_stats( 'server_side' ); |
3232 |
} |
3233 |
|
3234 |
- return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
3235 |
+ return self::update_active_modules( $new ); |
3236 |
} |
3237 |
|
3238 |
public static function enable_module_configurable( $module ) { |
3239 |
@@ -3108,6 +2715,10 @@ p { |
3240 |
|
3241 |
Jetpack_Options::update_option( 'unique_connection', $jetpack_unique_connection ); |
3242 |
|
3243 |
+ // Delete all the sync related data. Since it could be taking up space. |
3244 |
+ require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-sender.php'; |
3245 |
+ Jetpack_Sync_Sender::get_instance()->uninstall(); |
3246 |
+ |
3247 |
// Disable the Heartbeat cron |
3248 |
Jetpack_Heartbeat::init()->deactivate(); |
3249 |
} |
3250 |
@@ -3281,17 +2892,23 @@ p { |
3251 |
/** |
3252 |
* Return stat data for WPCOM sync |
3253 |
*/ |
3254 |
- function get_stat_data() { |
3255 |
+ public static function get_stat_data( $encode = true ) { |
3256 |
$heartbeat_data = Jetpack_Heartbeat::generate_stats_array(); |
3257 |
- $additional_data = $this->get_additional_stat_data(); |
3258 |
+ $additional_data = self::get_additional_stat_data(); |
3259 |
+ |
3260 |
+ $merged_data = array_merge( $heartbeat_data, $additional_data ); |
3261 |
|
3262 |
- return json_encode( array_merge( $heartbeat_data, $additional_data ) ); |
3263 |
+ if ( $encode ) { |
3264 |
+ return json_encode( $merged_data ); |
3265 |
+ } |
3266 |
+ |
3267 |
+ return $merged_data; |
3268 |
} |
3269 |
|
3270 |
/** |
3271 |
* Get additional stat data to sync to WPCOM |
3272 |
*/ |
3273 |
- function get_additional_stat_data( $prefix = '' ) { |
3274 |
+ public static function get_additional_stat_data( $prefix = '' ) { |
3275 |
$return["{$prefix}themes"] = Jetpack::get_parsed_theme_data(); |
3276 |
$return["{$prefix}plugins-extra"] = Jetpack::get_parsed_plugin_data(); |
3277 |
$return["{$prefix}users"] = count_users(); |
3278 |
@@ -3308,7 +2925,7 @@ p { |
3279 |
// If the plugin is not connected, display a connect message. |
3280 |
if ( |
3281 |
// the plugin was auto-activated and needs its candy |
3282 |
- Jetpack_Options::get_option( 'do_activate' ) |
3283 |
+ Jetpack_Options::get_option_and_ensure_autoload( 'do_activate', '0' ) |
3284 |
|| |
3285 |
// the plugin is active, but was never activated. Probably came from a site-wide network activation |
3286 |
! Jetpack_Options::get_option( 'activated' ) |
3287 |
@@ -3353,9 +2970,6 @@ p { |
3288 |
if ( Jetpack::is_active() || Jetpack::is_development_mode() ) { |
3289 |
// Artificially throw errors in certain whitelisted cases during plugin activation |
3290 |
add_action( 'activate_plugin', array( $this, 'throw_error_on_activate_plugin' ) ); |
3291 |
- |
3292 |
- // Kick off synchronization of user role when it changes |
3293 |
- add_action( 'set_user_role', array( $this, 'user_role_change' ) ); |
3294 |
} |
3295 |
|
3296 |
// Jetpack Manage Activation Screen from .com |
3297 |
@@ -4557,8 +4171,8 @@ p { |
3298 |
return $url; |
3299 |
} |
3300 |
|
3301 |
- function translate_current_user_to_role() { |
3302 |
- foreach ( $this->capability_translations as $role => $cap ) { |
3303 |
+ static function translate_current_user_to_role() { |
3304 |
+ foreach ( self::$capability_translations as $role => $cap ) { |
3305 |
if ( current_user_can( $role ) || current_user_can( $cap ) ) { |
3306 |
return $role; |
3307 |
} |
3308 |
@@ -4567,15 +4181,15 @@ p { |
3309 |
return false; |
3310 |
} |
3311 |
|
3312 |
- function translate_role_to_cap( $role ) { |
3313 |
- if ( ! isset( $this->capability_translations[$role] ) ) { |
3314 |
+ static function translate_role_to_cap( $role ) { |
3315 |
+ if ( ! isset( self::$capability_translations[$role] ) ) { |
3316 |
return false; |
3317 |
} |
3318 |
|
3319 |
- return $this->capability_translations[$role]; |
3320 |
+ return self::$capability_translations[$role]; |
3321 |
} |
3322 |
|
3323 |
- function sign_role( $role ) { |
3324 |
+ static function sign_role( $role ) { |
3325 |
if ( ! $user_id = (int) get_current_user_id() ) { |
3326 |
return false; |
3327 |
} |
3328 |
@@ -4613,8 +4227,8 @@ p { |
3329 |
$gp_locale = GP_Locales::by_field( 'wp_locale', get_locale() ); |
3330 |
} |
3331 |
|
3332 |
- $role = $this->translate_current_user_to_role(); |
3333 |
- $signed_role = $this->sign_role( $role ); |
3334 |
+ $role = self::translate_current_user_to_role(); |
3335 |
+ $signed_role = self::sign_role( $role ); |
3336 |
|
3337 |
$user = wp_get_current_user(); |
3338 |
|
3339 |
@@ -4626,7 +4240,7 @@ p { |
3340 |
|
3341 |
$secrets = Jetpack::init()->generate_secrets( 'authorize' ); |
3342 |
@list( $secret ) = explode( ':', $secrets ); |
3343 |
- |
3344 |
+ |
3345 |
$site_icon = ( function_exists( 'has_site_icon') && has_site_icon() ) |
3346 |
? get_site_icon_url() |
3347 |
: false; |
3348 |
@@ -4891,24 +4505,6 @@ p { |
3349 |
return ( $a['sort'] < $b['sort'] ) ? -1 : 1; |
3350 |
} |
3351 |
|
3352 |
- function sync_reindex_trigger() { |
3353 |
- if ( $this->current_user_is_connection_owner() && current_user_can( 'manage_options' ) ) { |
3354 |
- echo json_encode( $this->sync->reindex_trigger() ); |
3355 |
- } else { |
3356 |
- echo '{"status":"ERROR"}'; |
3357 |
- } |
3358 |
- exit; |
3359 |
- } |
3360 |
- |
3361 |
- function sync_reindex_status(){ |
3362 |
- if ( $this->current_user_is_connection_owner() && current_user_can( 'manage_options' ) ) { |
3363 |
- echo json_encode( $this->sync->reindex_status() ); |
3364 |
- } else { |
3365 |
- echo '{"status":"ERROR"}'; |
3366 |
- } |
3367 |
- exit; |
3368 |
- } |
3369 |
- |
3370 |
function ajax_recheck_ssl() { |
3371 |
check_ajax_referer( 'recheck-ssl', 'ajax-nonce' ); |
3372 |
$result = Jetpack::permit_ssl( true ); |
3373 |
@@ -5018,7 +4614,7 @@ p { |
3374 |
<span id="jetpack-recheck-ssl-output"><?php echo get_transient( 'jetpack_https_test_message' ); ?></span> |
3375 |
</p> |
3376 |
<p> |
3377 |
- <?php printf( __( 'For more help, try our <a href="%1$s">connection debugger</a> or <a href="%2$s" target="_blank">troubleshooting tips</a>.', 'jetpack' ), |
3378 |
+ <?php printf( __( 'For more help, try our <a href="%1$s">connection debugger</a> or <a href="%2$s" target="_blank">troubleshooting tips</a>.', 'jetpack' ), |
3379 |
esc_url( Jetpack::admin_url( array( 'page' => 'jetpack-debugger' ) ) ), |
3380 |
esc_url( 'https://jetpack.com/support/getting-started-with-jetpack/troubleshooting-tips/' ) ); ?> |
3381 |
</p> |
3382 |
@@ -5246,6 +4842,12 @@ p { |
3383 |
list( $version ) = explode( ':', Jetpack_Options::get_option( 'version' ) ); |
3384 |
if ( JETPACK__VERSION != $version ) { |
3385 |
Jetpack_Options::update_option( 'version', JETPACK__VERSION . ':' . time() ); |
3386 |
+ |
3387 |
+ if ( version_compare( JETPACK__VERSION, $version, '>' ) ) { |
3388 |
+ /** This action is documented in class.jetpack.php */ |
3389 |
+ do_action( 'updating_jetpack_version', JETPACK__VERSION, $version ); |
3390 |
+ } |
3391 |
+ |
3392 |
return true; |
3393 |
} |
3394 |
return false; |
3395 |
@@ -6044,8 +5646,6 @@ p { |
3396 |
|
3397 |
if ( is_array( $identity_options ) ) { |
3398 |
foreach( $identity_options as $identity_option ) { |
3399 |
- Jetpack_Sync::sync_options( __FILE__, $identity_option ); |
3400 |
- |
3401 |
/** |
3402 |
* Fires when a shadow site option is updated. |
3403 |
* These options are updated via the Identity Crisis UI. |
3404 |
@@ -6165,13 +5765,13 @@ p { |
3405 |
* Written so that we don't have re-check $key and $value params every time |
3406 |
* we want to check if this site is whitelisted, for example in footer.php |
3407 |
* |
3408 |
- * @return bool True = already whitelsisted False = not whitelisted |
3409 |
+ * @return bool True = already whitelisted False = not whitelisted |
3410 |
*/ |
3411 |
public static function is_staging_site() { |
3412 |
$is_staging = false; |
3413 |
|
3414 |
$current_whitelist = Jetpack_Options::get_option( 'identity_crisis_whitelist' ); |
3415 |
- if ( $current_whitelist ) { |
3416 |
+ if ( $current_whitelist && ! get_transient( 'jetpack_checked_is_staging' ) ) { |
3417 |
$options_to_check = Jetpack::identity_crisis_options_to_check(); |
3418 |
$cloud_options = Jetpack::init()->get_cloud_site_options( $options_to_check ); |
3419 |
|
3420 |
@@ -6181,15 +5781,18 @@ p { |
3421 |
break; |
3422 |
} |
3423 |
} |
3424 |
+ // set a flag so we don't check again for an hour |
3425 |
+ set_transient( 'jetpack_checked_is_staging', 1, HOUR_IN_SECONDS ); |
3426 |
} |
3427 |
$known_staging = array( |
3428 |
'urls' => array( |
3429 |
- '#\.staging\.wpengine\.com$#i', |
3430 |
+ '#\.staging\.wpengine\.com$#i', // WP Engine |
3431 |
), |
3432 |
'constants' => array( |
3433 |
- 'IS_WPE_SNAPSHOT', |
3434 |
- 'KINSTA_DEV_ENV', |
3435 |
- 'JETPACK_STAGING_MODE', |
3436 |
+ 'IS_WPE_SNAPSHOT', // WP Engine |
3437 |
+ 'KINSTA_DEV_ENV', // Kinsta.com |
3438 |
+ 'WPSTAGECOACH_STAGING', // WP Stagecoach |
3439 |
+ 'JETPACK_STAGING_MODE', // Generic |
3440 |
) |
3441 |
); |
3442 |
/** |
3443 |
@@ -6431,21 +6034,6 @@ p { |
3444 |
} |
3445 |
|
3446 |
/** |
3447 |
- * Sends a ping to the Jetpack servers to toggle on/off remote portions |
3448 |
- * required by some modules. |
3449 |
- * |
3450 |
- * @param string $module_slug |
3451 |
- */ |
3452 |
- public function toggle_module_on_wpcom( $module_slug ) { |
3453 |
- Jetpack::init()->sync->register( 'noop' ); |
3454 |
- |
3455 |
- if ( false !== strpos( current_filter(), 'jetpack_activate_module_' ) ) { |
3456 |
- self::check_privacy( $module_slug ); |
3457 |
- } |
3458 |
- |
3459 |
- } |
3460 |
- |
3461 |
- /** |
3462 |
* Throws warnings for deprecated hooks to be removed from Jetpack |
3463 |
*/ |
3464 |
public function deprecated_hooks() { |
3465 |
@@ -6458,11 +6046,25 @@ p { |
3466 |
* If there is no replacement us null for replacement_name |
3467 |
*/ |
3468 |
$deprecated_list = array( |
3469 |
- 'jetpack_bail_on_shortcode' => 'jetpack_shortcodes_to_include', |
3470 |
- 'wpl_sharing_2014_1' => null, |
3471 |
- 'jetpack-tools-to-include' => 'jetpack_tools_to_include', |
3472 |
- 'jetpack_identity_crisis_options_to_check' => null, |
3473 |
- 'audio_player_default_colors' => null, |
3474 |
+ 'jetpack_bail_on_shortcode' => 'jetpack_shortcodes_to_include', |
3475 |
+ 'wpl_sharing_2014_1' => null, |
3476 |
+ 'jetpack-tools-to-include' => 'jetpack_tools_to_include', |
3477 |
+ 'jetpack_identity_crisis_options_to_check' => null, |
3478 |
+ 'update_option_jetpack_single_user_site' => null, |
3479 |
+ 'audio_player_default_colors' => null, |
3480 |
+ 'add_option_jetpack_featured_images_enabled' => null, |
3481 |
+ 'add_option_jetpack_update_details' => null, |
3482 |
+ 'add_option_jetpack_updates' => null, |
3483 |
+ 'add_option_jetpack_network_name' => null, |
3484 |
+ 'add_option_jetpack_network_allow_new_registrations' => null, |
3485 |
+ 'add_option_jetpack_network_add_new_users' => null, |
3486 |
+ 'add_option_jetpack_network_site_upload_space' => null, |
3487 |
+ 'add_option_jetpack_network_upload_file_types' => null, |
3488 |
+ 'add_option_jetpack_network_enable_administration_menus' => null, |
3489 |
+ 'add_option_jetpack_is_multi_site' => null, |
3490 |
+ 'add_option_jetpack_is_main_network' => null, |
3491 |
+ 'add_option_jetpack_main_network_site' => null, |
3492 |
+ 'jetpack_sync_all_registered_options' => null, |
3493 |
); |
3494 |
|
3495 |
// This is a silly loop depth. Better way? |
3496 |
@@ -6556,7 +6158,7 @@ p { |
3497 |
} |
3498 |
|
3499 |
/** |
3500 |
- * This methods removes all of the registered css files on the frontend |
3501 |
+ * This methods removes all of the registered css files on the front end |
3502 |
* from Jetpack in favor of using a single file. In effect "imploding" |
3503 |
* all the files into one file. |
3504 |
* |
3505 |
@@ -7068,7 +6670,7 @@ p { |
3506 |
*/ |
3507 |
function jetpack_user_col_style() { |
3508 |
global $current_screen; |
3509 |
- if ( 'users' == $current_screen->base ) { ?> |
3510 |
+ if ( ! empty( $current_screen->base ) && 'users' == $current_screen->base ) { ?> |
3511 |
<style> |
3512 |
.fixed .column-user_jetpack { |
3513 |
width: 21px; |
3514 |
|
3515 |
diff --git a/plugins/jetpack/css/jetpack-admin.css.map b/plugins/jetpack/css/jetpack-admin.css.map |
3516 |
index 0bfa8cc..bce42ec 100644 |
3517 |
--- a/plugins/jetpack/css/jetpack-admin.css.map |
3518 |
+++ b/plugins/jetpack/css/jetpack-admin.css.map |
3519 |
@@ -1 +1 @@ |
3520 |
-{"version":3,"sources":["../scss/_utilities/_grid.scss","jetpack-admin.css","../scss/_utilities/mixins/_breakpoint.scss","../scss/atoms/typography/_typography.scss","../scss/atoms/_media.scss","../scss/atoms/_animations.scss","../scss/pages/_protect.scss"],"names":[],"mappings":"AAKA;;;GCFE;ADKD;EAEC,aAAA;EACA,gBAAA;ECJD;ADOA;EACC,cAAA;ECLA,gBAAA;EACD;ADQD;EACC,aAAA;ECNA;;AAED;EACE,iBAAA;EACA,aAAA;EDSF,aAAA;EACC,oBAAA;ECPA;;AAED;EDMC;IAAU,iBAAA;ICHR;;EDIF;IAAU,kBAAA;ICAR;;EDCF;IAAU,YAAA;ICGR;;EDFF;IAAU,kBAAA;ICMR;;EDLF;IAAU,kBAAA;ICSR;;EDRF;IAAU,YAAA;ICYR;;EDXF;IAAU,kBAAA;ICeR;;EDdF;IAAU,kBAAA;ICkBR;;EDjBF;IAAU,YAAA;ICqBR;;EDpBF;IAAU,kBAAA;ICwBR;;EDvBF;IAAU,kBAAA;IC2BR;;EC1BA;IFKF,aAAA;ICyBE;EACF;AACD;ED1BC;IAAU,iBAAA;IC6BR;;ED5BF;IAAU,kBAAA;ICgCR;;ED/BF;IAAU,YAAA;ICmCR;;EDlCF;IAAU,kBAAA;ICsCR;;EDrCF;IAAU,kBAAA;ICyCR;;EDxCF;IAAU,YAAA;IC4CR;;ED3CF;IAAU,kBAAA;IC+CR;;ED9CF;IAAU,kBAAA;ICkDR;;EDjDF;IAAU,YAAA;ICqDR;;EDpDF;IAAU,kBAAA;ICwDR;;EDvDF;IAAU,kBAAA;IC2DR;;EC3EA;IFsBF,aAAA;ICyDE;EA |
3521 |
CF;AACD;ED1DC;IAAU,iBAAA;IC6DR;;ED5DF;IAAU,kBAAA;ICgER;;ED/DF;IAAU,YAAA;ICmER;;EDlEF;IAAU,kBAAA;ICsER;;EDrEF;IAAU,kBAAA;ICyER;;EDxEF;IAAU,YAAA;IC4ER;;ED3EF;IAAU,kBAAA;IC+ER;;ED9EF;IAAU,kBAAA;ICkFR;;EDjFF;IAAW,YAAA;ICqFT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ElC,oBAAA;IA6EI,WAAU;IA7gBd;;EAghBE;IAtJF,cAAA;IA1EC;EAmOA;AA3ED;EA1EA;IA4EC,aAAA;IA6EG,YAAW;IA3Ef,oBAAA;IA1EA;EA4EC;IA6EG,aAAY;IA3EhB,aAAA;IA6EG;EACF;AACD;EACE;IAtJF,sBAAA;IA1EA;;EAoOE;IA3EF,8BAAA;IA1EA;EAwJC;AACD;EA3EA;IA3SA,mBAAA;IAAA;ECvpGG;IDs8GF,gBAAA;IACD;EA6EC;AACD;EA3EC;IA6EG,iBAAgB;IA3EpB;;EA1EA;IAyJI,gBAAe;IA3EnB;;EA8EE;IAvJA,kBAAA;IACD;;EA0JC;IACE,mBAAkB;IAlOrB,sBAAA;IAoOE;;EAED;IAvJA,UAAA;IAyJC;EACF;AACD;EACE,aAxJD;EAyJC,gBA5EC;EA6EF;AACD;EACE,aAxJD;EAyJA","file":"jetpack-admin.css"} |
3550 |
\ No newline at end of file |
3551 |
+{"version":3,"sources":["../scss/_utilities/_grid.scss","jetpack-admin.css","../scss/_utilities/mixins/_breakpoint.scss","../scss/atoms/typography/_typography.scss","../scss/atoms/_media.scss","../scss/atoms/_animations.scss"],"names":[],"mappings":"AAKA;;;GCFE;ADKD;EAEC,aAAA;EACA,gBAAA;ECJD;ADOA;EACC,cAAA;ECLA,gBAAA;EACD;ADQD;EACC,aAAA;ECNA;;AAED;EACE,iBAAA;EACA,aAAA;EDSF,aAAA;EACC,oBAAA;ECPA;;AAED;EDMC;IAAU,iBAAA;ICHR;;EDIF;IAAU,kBAAA;ICAR;;EDCF;IAAU,YAAA;ICGR;;EDFF;IAAU,kBAAA;ICMR;;EDLF;IAAU,kBAAA;ICSR;;EDRF;IAAU,YAAA;ICYR;;EDXF;IAAU,kBAAA;ICeR;;EDdF;IAAU,kBAAA;ICkBR;;EDjBF;IAAU,YAAA;ICqBR;;EDpBF;IAAU,kBAAA;ICwBR;;EDvBF;IAAU,kBAAA;IC2BR;;EC1BA;IFKF,aAAA;ICy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etpack-rtl.css b/plugins/jetpack/css/jetpack-rtl.css |
3584 |
index 43d89ff..914152a 100644 |
3585 |
--- a/plugins/jetpack/css/jetpack-rtl.css |
3586 |
+++ b/plugins/jetpack/css/jetpack-rtl.css |
3587 |
@@ -1,4 +1,4 @@ |
3588 |
/*! |
3589 |
* Do not modify this file directly. It is concatenated from individual module CSS files. |
3590 |
*/ |
3591 |
-.jp-carousel-wrap *{line-height:inherit}.jp-carousel-overlay{background:#000}div.jp-carousel-fadeaway{position:fixed;bottom:0;z-index:2147483647;width:100%;height:15px}.jp-carousel-next-button span,.jp-carousel-previous-button span{background:url(../modules/carousel/images/arrows.png) center center/200px 126px no-repeat}.jp-carousel-msg{font-family:"Open Sans",sans-serif;font-style:normal;display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:center;margin:25px 2px 0 20px;background-color:#fff;border-right:4px solid #ffba00;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.jp-carousel-next-button span,.jp-carousel-previous-button span{background-image:url(../modules/carousel/images/arrows-2x.png)}}.jp-carousel-wrap{font-family:"Helvetica Neue",sans-serif!important}.jp |
3592 |
-carousel-info{position:absolute;bottom:0;text-align:right!important;-webkit-font-smoothing:subpixel-antialiased!important}.jp-carousel-info ::selection{background:#68c9e8;color:#fff}.jp-carousel-info ::-moz-selection{background:#68c9e8;color:#fff}.jp-carousel-photo-info{position:relative;right:25%;width:50%}.jp-carousel-transitions .jp-carousel-photo-info{transition:400ms ease-out}.jp-carousel-info h2{background:none!important;border:none!important;color:#999;display:block!important;font:400 13px/1.25em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;margin:7px 0 0!important;padding:10px 0 0!important;overflow:hidden;text-align:right;text-shadow:none!important;text-transform:none!important;-webkit-font-smoothing:subpixel-antialiased}.jp-carousel-next-button,.jp-carousel-previous-button{text-indent:-9999px;overflow:hidden;cursor:pointer}.jp-carousel-next-button span,.jp-carousel-previous-button span{position:absolute;top:0;bottom:0;width:82px;zoom:1;filter:alpha(opa |
3593 |
city=20);opacity:.2}.jp-carousel-transitions .jp-carousel-next-button span,.jp-carousel-transitions .jp-carousel-previous-button span{transition:500ms opacity ease-out}.jp-carousel-next-button:hover span,.jp-carousel-previous-button:hover span{filter:alpha(opacity=60);opacity:.6}.jp-carousel-next-button span{background-position:-110px center;left:0}.jp-carousel-previous-button span{background-position:-10px center;right:0}.jp-carousel-buttons{margin:-18px -20px 15px;padding:8px 10px;border-bottom:1px solid #222;background:#222;text-align:center}div.jp-carousel-buttons a{border:none!important;color:#999;font:400 11px/1.2em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;padding:5px 0 5px 2px;text-decoration:none!important;text-shadow:none!important;vertical-align:middle;-webkit-font-smoothing:subpixel-antialiased}div.jp-carousel-buttons a:hover{color:#68c9e8;border:none!important}.jp-carousel-transitions div.jp-carousel-buttons a:hover{transition:none!important}.jp-c |
3594 |
arousel-next-button,.jp-carousel-previous-button,.jp-carousel-slide,.jp-carousel-slide img{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.jp-carousel-slide{position:fixed;width:0;bottom:0;background-color:#000;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}.jp-carousel-slide.selected{position:absolute!important;filter:alpha(opacity=100);opacity:1}.jp-carousel-slide{filter:alpha(opacity=25);opacity:.25}.jp-carousel-slide img{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;background:none!important;border:none!important;padding:0!important;box-shadow:0 2px 8px rgba(0,0,0,.1);zoom:1}.jp-carousel-transitions .jp-carousel-slide{transition:opacity 400ms linear}.jp-carousel-close-hint{color:#999;cursor:default;letter-spacing:0!important;padding:.35em 0 0;position:absolute;text-ali |
3595 |
gn:right;width:90%}.jp-carousel-transitions .jp-carousel-close-hint{transition:color 200ms linear}.jp-carousel-close-hint span{cursor:pointer;background-color:#000;background-color:rgba(0,0,0,.8);display:block;height:22px;font:400 24px/1 "Helvetica Neue",sans-serif!important;line-height:22px;margin:0 .4em 0 0;text-align:center;vertical-align:middle;width:22px;border-radius:4px}.jp-carousel-transitions .jp-carousel-close-hint span{transition:border-color 200ms linear}.jp-carousel-close-hint:hover{cursor:default;color:#fff}.jp-carousel-close-hint:hover span{border-color:#fff}a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background:url(../modules/carousel/images/carousel-sprite.png?5) 0 0/16px 200px no-repeat}div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{margin:0 0 0 14px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030; |
3596 |
padding-left:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;margin:0 -12px 0 2px!important}div.jp-carousel-buttons a.jp-carousel-reblog,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{background-position:6px -36px;padding-left:auto!important;padding-right:26px!important;color:#999}div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -156px;padding-right:19px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{cursor:default}div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:6px -56px;color:#68c9e8}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:ur |
3597 |
l(../modules/carousel/images/carousel-sprite-2x.png?5)}}div#carousel-reblog-box{background:#222;padding:3px 0 0;display:none;margin:5px auto 0;border-radius:2px;box-shadow:0 0 20px rgba(0,0,0,.9);height:74px;width:565px}#carousel-reblog-box textarea{background:#999;font:13px/1.4 "Helvetica Neue",sans-serif!important;color:#444;padding:3px 6px;width:370px;height:48px;float:right;margin:6px 9px 0;border:1px solid #666;box-shadow:inset -2px 2px 2px rgba(0,0,0,.2);border-radius:2px}#carousel-reblog-box textarea:focus{background:#ccc;color:#222}#carousel-reblog-box label{color:#aaa;font-size:11px;padding-left:2px;padding-right:2px;display:inline;font-weight:400}#carousel-reblog-box select{width:110px;padding:0;font-size:12px;font-family:"Helvetica Neue",sans-serif!important;background:#333;color:#eee;border:1px solid #444;margin-top:5px}#carousel-reblog-box .submit,#wrapper #carousel-reblog-box p.response{float:right;width:154px;padding-top:0;padding-right:1px;overflow:hidden;height:34px |
3598 |
;margin:3px 2px 0 0!important}#wrapper #carousel-reblog-box p.response{font-size:13px;clear:none;padding-right:2px;height:34px;color:#aaa}#carousel-reblog-box input#carousel-reblog-submit,#jp-carousel-comment-form-button-submit{font:13px/24px "Helvetica Neue",sans-serif!important;margin-top:8px;padding:0 10px!important;border-radius:1em;height:24px;color:#333;cursor:pointer;font-weight:400;background:#aaa;border:1px solid #444}#carousel-reblog-box input#carousel-reblog-submit:hover,#jp-carousel-comment-form-button-submit:hover{background:#ccc}#carousel-reblog-box .canceltext{color:#aaa;font-size:11px;line-height:24px}#carousel-reblog-box .canceltext a{color:#fff}.jp-carousel-titleanddesc{border-top:1px solid #222;color:#999;font-size:15px;padding-top:24px;margin-bottom:20px;font-weight:400}.jp-carousel-titleanddesc-title{font:300 1.5em/1.1 "Helvetica Neue",sans-serif!important;text-transform:none!important;color:#fff;margin:0 0 15px;padding:0}.jp-carousel-titleanddesc-desc p{color:# |
3599 |
999;line-height:1.4;margin-bottom:.75em}.jp-carousel-comments p a,.jp-carousel-info h2 a,.jp-carousel-titleanddesc p a{color:#fff!important;border:none!important;text-decoration:underline!important;font-weight:400!important;font-style:normal!important}.jp-carousel-titleanddesc p b,.jp-carousel-titleanddesc p strong{font-weight:700;color:#999}.jp-carousel-titleanddesc p em,.jp-carousel-titleanddesc p i{font-style:italic;color:#999}.jp-carousel-comments p a:hover,.jp-carousel-info h2 a:hover,.jp-carousel-titleanddesc p a:hover{color:#68c9e8!important}.jp-carousel-titleanddesc p:empty{display:none}.jp-carousel-left-column-wrapper h1:after,.jp-carousel-left-column-wrapper h1:before,.jp-carousel-photo-info h1:after,.jp-carousel-photo-info h1:before{content:none!important}.jp-carousel-image-meta{background:#111;border:1px solid #222;color:#fff;font:12px/1.4 "Helvetica Neue",sans-serif!important;overflow:hidden;padding:18px 20px;width:209px!important}.jp-carousel-image-meta h5,.jp-carousel |
3600 |
-image-meta li{font-family:"Helvetica Neue",sans-serif!important;position:inherit!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;background:none!important;border:none!important;font-weight:400!important;line-height:1.3em!important}.jp-carousel-image-meta ul{margin:0!important;padding:0!important;list-style:none!important}.jp-carousel-image-meta li{width:48%!important;float:right!important;margin:0 0 15px 2%!important;color:#fff!important;font-size:13px!important}.jp-carousel-image-meta h5{color:#999!important;text-transform:uppercase!important;font-size:10px!important;margin:0 0 2px!important;letter-spacing:.1em!important}a.jp-carousel-image-download{padding-right:23px;display:inline-block;clear:both;color:#999;line-height:1;font-weight:400;font-size:13px;text-decoration:none;background-position:0 -82px}a.jp-carousel-image-download span.photo-size{font-size:11px;border-radius:1em;margin-right:2px;display:inline-block}a.jp-carousel-image-d |
3601 |
ownload span.photo-size-times{padding:0 2px 0 1px}a.jp-carousel-image-download:hover{background-position:0 -122px;color:#68c9e8;border:none!important}.jp-carousel-image-map{position:relative;margin:-20px -20px 20px;border-bottom:1px solid rgba(255,255,255,.17);height:154px}.jp-carousel-image-map img.gmap-main{border-top-right-radius:6px;border-left:1px solid rgba(255,255,255,.17)}.jp-carousel-image-map div.gmap-topright{width:94px;height:154px;position:absolute;top:0;left:0}.jp-carousel-image-map div.imgclip{overflow:hidden;border-top-left-radius:6px}.jp-carousel-image-map div.gmap-topright img{margin-right:-40px}.jp-carousel-image-map img.gmap-bottomright{position:absolute;top:96px;left:0}.jp-carousel-comments{font:15px/1.7 "Helvetica Neue",sans-serif!important;font-weight:400;background:none}.jp-carousel-comments p a:active,.jp-carousel-comments p a:focus,.jp-carousel-comments p a:hover{color:#68c9e8!important}.jp-carousel-comment{background:none;color:#999;margin-bottom:20px;clea |
3602 |
r:right;overflow:auto;width:100%}.jp-carousel-comment p{color:#999!important}.jp-carousel-comment .comment-author{font-size:13px;font-weight:400;padding:0;width:auto;display:inline;float:none;border:none;margin:0}.jp-carousel-comment .comment-author a{color:#fff}.jp-carousel-comment .comment-gravatar{float:right}.jp-carousel-comment .comment-content{border:none;margin-right:85px;padding:0}.jp-carousel-comment .avatar{margin:0 0 0 20px;border-radius:4px;border:none!important;padding:0!important;background-color:transparent!important}.jp-carousel-comment .comment-date{color:#999;margin-top:4px;font-size:11px;display:inline;float:left}#jp-carousel-comment-form{margin:0 0 10px!important;float:right;width:100%}textarea#jp-carousel-comment-form-comment-field{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:15px/1.4 "Helvetica Neue",sans-serif!important;width:100%;padding:10px 10px 5px;margin:0;float:none;height:147px;box-shadow:inset -2px 2px 2px rgba(0,0,0,.2);border |
3603 |
-radius:3px;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}textarea#jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#555}textarea#jp-carousel-comment-form-comment-field:focus{background:#ccc;color:#222}textarea#jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#aaa}#jp-carousel-comment-form-spinner{color:#fff;margin:22px 10px 0 0;display:block;width:20px;height:20px;float:right}#jp-carousel-comment-form-submit-and-info-wrapper{display:none;overflow:hidden;width:100%}#jp-carousel-comment-form-commenting-as input{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:13px/1.4 "Helvetica Neue",sans-serif!important;padding:3px 6px;float:right;box-shadow:inset -2px 2px 2px rgba(0,0,0,.2);border-radius:2px;width:285px}#jp-carousel-comment-form-commenting-as input:focus{background:#ccc;color:#222}#jp-carousel-comment-form-commenting-as p{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:22px 0 |
3604 |
0;float:right}#jp-carousel-comment-form-commenting-as fieldset{float:right;border:none;margin:20px 0 0;padding:0;clear:both}#jp-carousel-comment-form-commenting-as label{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:0 0 3px 20px;float:right;width:100px}#jp-carousel-comment-form-button-submit{margin-top:20px;float:left}#jp-carousel-comment-form-container,#js-carousel-comment-form-container{margin-bottom:15px;overflow:auto;width:100%}#jp-carousel-comment-post-results{display:none;overflow:auto;width:100%}#jp-carousel-comment-post-results span{display:block;text-align:center;margin-top:20px;width:100%;overflow:auto;padding:1em 0;-moz-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.7);border-radius:2px;font:13px/1.4 "Helvetica Neue",sans-serif!important;border:1px solid rgba(255,255,255,.17);box-shadow:inset 0 0 5px 5px rgba(0,0,0,1)}.jp-carousel-comment-post-error{color:#DF4926}#jp-carousel-comments-closed{display:none;color:#999}#jp-carousel-commen |
3605 |
ts-loading{font:400 15px/1.7 "Helvetica Neue",sans-serif!important;display:none;color:#999;text-align:right;margin-bottom:20px}.jp-carousel-light .jp-carousel-overlay{background:#fff}.jp-carousel-light .jp-carousel-next-button:hover span,.jp-carousel-light .jp-carousel-previous-button:hover span{opacity:.8}.jp-carousel-light .jp-carousel-close-hint:hover,.jp-carousel-light .jp-carousel-titleanddesc div{color:#000!important}.jp-carousel-light .jp-carousel-comment .comment-author a,.jp-carousel-light .jp-carousel-comments p a,.jp-carousel-light .jp-carousel-info h2 a,.jp-carousel-light .jp-carousel-titleanddesc p a{color:#1e8cbe!important}.jp-carousel-light .jp-carousel-comment .comment-author a:hover,.jp-carousel-light .jp-carousel-comments p a:hover,.jp-carousel-light .jp-carousel-info h2 a:hover,.jp-carousel-light .jp-carousel-titleanddesc p a:hover{color:#f1831e!important}.jp-carousel-light .jp-carousel-comment,.jp-carousel-light .jp-carousel-comment p,.jp-carousel-light .jp-carou |
3606 |
sel-info h2,.jp-carousel-light .jp-carousel-titleanddesc,.jp-carousel-light .jp-carousel-titleanddesc p,.jp-carousel-light .jp-carousel-titleanddesc p b,.jp-carousel-light .jp-carousel-titleanddesc p em,.jp-carousel-light .jp-carousel-titleanddesc p i,.jp-carousel-light .jp-carousel-titleanddesc p strong,.jp-carousel-light div.jp-carousel-buttons a{color:#666}.jp-carousel-light .jp-carousel-buttons{border-bottom-color:#f0f0f0;background:#f5f5f5}.jp-carousel-light div.jp-carousel-buttons a:hover{text-decoration:none;color:#f1831e}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:4px -56px;padding-right:24px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#2ea2cc;color:#fff}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -176px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-rebl |
3607 |
og.reblogged{background-position:5px -36px}.jp-carousel-light div#carousel-reblog-box{background:#eee;box-shadow:0 2px 10px rgba(0,0,0,.1);border:1px solid #ddd}.jp-carousel-light #carousel-reblog-box textarea{color:#666;border:1px solid #cfcfcf;background:#fff}.jp-carousel-light #carousel-reblog-box .canceltext{color:#888}.jp-carousel-light #carousel-reblog-box .canceltext a{color:#666}.jp-carousel-light #carousel-reblog-box select{background:#eee;color:#333;border:1px solid #aaa}#jp-carousel-comment-form-button-submit,.jp-carousel-light #carousel-reblog-box input#carousel-reblog-submit{color:#333;background:#fff;border:1px solid #aaa}.jp-carousel-light .jp-carousel-image-meta{background:#fafafa;border:1px solid #eee;border-top-color:#f5f5f5;border-right-color:#f5f5f5;color:#333}.jp-carousel-light .jp-carousel-image-meta li{color:#000!important}.jp-carousel-light .jp-carousel-close-hint{color:#ccc}.jp-carousel-light .jp-carousel-close-hint span{background-color:#fff;border-color:#c |
3608 |
cc}.jp-carousel-light #jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#aaa}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus{color:#333}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#ddd}.jp-carousel-light a.jp-carousel-image-download{background-position:0 -122px}.jp-carousel-light a.jp-carousel-image-download:hover{background-position:0 -122px;color:#f1831e}.jp-carousel-light textarea#jp-carousel-comment-form-comment-field{background:#fbfbfb;color:#333;border:1px solid #dfdfdf;box-shadow:inset -2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input{background:#fbfbfb;border:1px solid #dfdfdf;color:#333;box-shadow:inset -2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input:focus{background:#fbfbfb;color:#333}.jp-carousel-light #jp-carousel-comment-post-results span{background:#f7f7f7;border:1px solid #dfdfdf;box-shado |
3609 |
w:inset 0 0 5px rgba(0,0,0,.05)}.jp-carousel-light .jp-carousel-slide{background-color:#fff}.jp-carousel-light .jp-carousel-titleanddesc{border-top:1px solid #eee}@media only screen and (max-width:760px){.jp-carousel-info{margin:0 10px!important}.jp-carousel-buttons,.jp-carousel-next-button,.jp-carousel-previous-button{display:none!important}.jp-carousel-image-meta{float:none!important;width:100%!important;-moz-box-sizing:border-box;box-sizing:border-box}.jp-carousel-close-hint{font-weight:800!important;font-size:26px!important;position:fixed!important;top:-10px}.jp-carousel-slide img{filter:alpha(opacity=100);opacity:1}.jp-carousel-wrap{background-color:#000}.jp-carousel-fadeaway{display:none}#jp-carousel-comment-form-container{display:none!important}.jp-carousel-titleanddesc{padding-top:0!important;border:none!important}.jp-carousel-titleanddesc-title{font-size:1em!important}.jp-carousel-left-column-wrapper{padding:0;width:100%!important}.jp-carousel-photo-info{right:0!important;w |
3610 |
idth:100%!important}}.contact-form .clear-form{clear:both}.contact-form input[type=email],.contact-form input[type=text]{width:300px;max-width:98%;margin-bottom:13px}.contact-form select{margin-bottom:13px}.contact-form textarea{height:200px;width:80%;float:none;margin-bottom:13px}.contact-form input[type=checkbox],.contact-form input[type=radio]{float:none;margin-bottom:13px}.contact-form label{margin-bottom:3px;float:none;font-weight:700;display:block}.contact-form label.checkbox,.contact-form label.radio{margin-bottom:3px;float:none;font-weight:700;display:inline-block}.contact-form label span{color:#AAA;margin-right:4px;font-weight:400}.contact-form-submission{margin-bottom:4em;padding:1.5em 1em}.contact-form-submission p{margin:0 auto}.form-errors .form-error-message{color:red}.textwidget .contact-form input[type=email],.textwidget .contact-form input[type=text],.textwidget .contact-form textarea{width:250px;max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}#jetpa |
3611 |
ck-check-feedback-spam{margin:1px 0 0 8px}.jetpack-check-feedback-spam-spinner{display:inline-block;margin-top:7px}.infinite-loader{color:#000;display:block;height:28px;text-indent:-9999px}#infinite-handle span{background:#333;border-radius:1px;color:#eee;cursor:pointer;font-size:13px;padding:6px 16px}#infinite-handle span button,#infinite-handle span button:focus,#infinite-handle span button:hover{display:inline;position:static;padding:0;margin:0;border:none;line-height:inherit;background:0 0;color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;font-family:inherit}#infinite-handle span button::-moz-focus-inner{margin:0;padding:0;border:none}@media (max-width:800px){#infinite-handle span:before{display:none}#infinite-handle span{display:block}}#infinite-footer{position:fixed;bottom:-50px;right:0;width:100%}#infinite-footer a{text-decoration:none}#infinite-footer .blog-credits a:hover,#infinite-footer .blog-info a:hover{color:#444;text-decoration:underline}#infinite-foo |
3612 |
ter .container{background:rgba(255,255,255,.8);border-color:#ccc;border-color:rgba(0,0,0,.1);border-style:solid;border-width:1px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 auto;overflow:hidden;padding:1px 20px;width:780px}#infinite-footer .blog-credits,#infinite-footer .blog-info{-moz-box-sizing:border-box;box-sizing:border-box;line-height:25px}#infinite-footer .blog-info{float:right;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap;width:40%}#infinite-footer .blog-credits{font-weight:400;float:left;width:60%}#infinite-footer .blog-info a{color:#111;font-size:14px;font-weight:700}#infinite-footer .blog-credits{color:#888;font-size:12px;text-align:left}#infinite-footer .blog-credits a{color:#666}.infinity-end.neverending #infinite-footer{display:none}@media (max-width:640px){#infinite-footer .container{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}#infinite-footer .blog-info{width:30%}#infinite-footer .blog-credits{width:70%}# |
3613 |
infinite-footer .blog-credits,#infinite-footer .blog-info a{font-size:10px}}@media (max-width:640px){#infinite-footer{position:static}}#wpadminbar li#wp-admin-bar-admin-bar-likes-widget{width:61px;overflow:hidden}#wpadminbar iframe.admin-bar-likes-widget{width:61px;height:28px;min-height:28px;border-width:0;position:absolute;top:0}div.jetpack-likes-widget-wrapper{width:100%;min-height:50px;position:relative}div.jetpack-likes-widget-wrapper .sd-link-color{font-size:12px}div.jetpack-likes-widget-wrapper.slim-likes-widget{width:1px;min-height:0}#likes-other-gravatars{display:none;position:absolute;padding:10px 10px 12px;background-color:#2e4453;border-width:0;box-shadow:0 0 10px #2e4453;box-shadow:0 0 10px rgba(46,68,83,.6);min-width:130px;z-index:1000}#likes-other-gravatars *{line-height:normal}#likes-other-gravatars .likes-text{color:#fff;font-size:12px;padding-bottom:8px}#likes-other-gravatars li,#likes-other-gravatars ul{margin:0;padding:0;text-indent:0;list-style-type:none}#likes- |
3614 |
other-gravatars li::before{content:""}#likes-other-gravatars ul.wpl-avatars{overflow:auto;display:block;max-height:190px}#likes-other-gravatars ul.wpl-avatars li{width:32px;height:32px;float:right;margin:0 0 5px 5px}#likes-other-gravatars ul.wpl-avatars li a{margin:0 0 0 2px;border-bottom:none!important;display:block}#likes-other-gravatars ul.wpl-avatars li a img{background:0 0;border:none;margin:0!important;padding:0!important;position:static}div.sd-box{border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.13)}.comment-likes-widget,.entry-content .post-likes-widget,.post-likes-widget{margin:0;border-width:0;display:block}.post-likes-widget-placeholder{margin:0;border-width:0;position:relative}.post-likes-widget-placeholder .button{display:none}.post-likes-widget-placeholder .loading{color:#999;font-size:12px}.slim-likes-widget .post-likes-widget{width:auto;float:none}div.sharedaddy.sd-like-enabled .sd-like h3{display:none}div.sharedaddy.sd-like-enabled .sd-like .post-likes-wid |
3615 |
get{width:100%;float:none;position:absolute;top:0}.comment-likes-widget{width:100%}.pd-rating{display:block!important}.sd-gplus .sd-title{display:none}#jp-relatedposts{display:none;padding-top:1em;margin:1em 0;position:relative;clear:both}.jp-relatedposts:after{content:'';display:block;clear:both}#jp-relatedposts h3.jp-relatedposts-headline{margin:0 0 1em;display:inline-block;float:right;font-size:9pt;font-weight:700;font-family:inherit}#jp-relatedposts h3.jp-relatedposts-headline em:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.2);margin-bottom:1em}#jp-relatedposts h3.jp-relatedposts-headline em{font-style:normal;font-weight:700}#jp-relatedposts .jp-relatedposts-items{clear:right}#jp-relatedposts .jp-relatedposts-items-visual{margin-left:-20px}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{float:right;width:33%;margin:0 0 1em;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:bord |
3616 |
er-box}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post{padding-left:20px;filter:alpha(opacity=80);-moz-opacity:.8;opacity:.8}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+4),#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+4){clear:both}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover{filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items p,#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:14px;line-height:20px;margin:0}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs{position:relative}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay{position:absolute;top:0;bottom:0;right:0;left:0;display:block;border |
3617 |
-bottom:0}#jp-relatedposts .jp-relatedposts-items p{margin-bottom:0}#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a{font-size:inherit;font-weight:400;text-decoration:none;filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span{display:block;max-width:90%;overflow:hidden;text-overflow:ellipsis}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post span{max-width:100%}#jp-relatedposts .jp-relatedposts-items |
3618 |
.jp-relatedposts-post .jp-relatedposts-post-context,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{opacity:.6}#jp-relatedposts .jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt,.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{display:none}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt{overflow:hidden}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs span{margin-bottom:1em}@media only screen and (max-width:640px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:50%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n){clear:right}#jp-relatedposts .jp-relatedposts-items-visual{margin-left:20px}}@media only screen and (max-width:320px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:100%;clear:both;margin:0 0 1em}}#jp-post-flair{pa |
3619 |
dding-top:.5em}#content div.sharedaddy,#main div.sharedaddy,div.sharedaddy{clear:both}div.sharedaddy h3.sd-title{margin:0 0 1em;display:inline-block;line-height:1.2;font-size:9pt;font-weight:700}div.sharedaddy h3.sd-title:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;margin-bottom:1em}body.highlander-light h3.sd-title:before{border-top:1px solid rgba(0,0,0,.2)}body.highlander-dark h3.sd-title:before{border-top:1px solid rgba(255,255,255,.4)}.sd-content ul{padding:0!important;margin:0 0 .7em!important;list-style:none!important}.sd-content ul li{display:inline-block}.sd-block.sd-gplus{margin:0 0 .5em}.sd-gplus .sd-content{font-size:12px}#sharing_email .sharing_send,.sd-content ul li .option a.share-ustom,.sd-content ul li a.sd-button,.sd-content ul li.advanced a.share-more,.sd-content ul li.preview-item div.option.option-smart-off a,.sd-social-icon .sd-content ul li a.sd-button,.sd-social-icon-text .sd-content ul li a.sd-button,.sd-social-official |
3620 |
.sd-content>ul>li .digg_button >a,.sd-social-official .sd-content>ul>li>a.sd-button,.sd-social-text .sd-content ul li a.sd-button{text-decoration:none!important;display:inline-block;margin:0 0 5px 5px;font-size:12px;font-family:"Open Sans",sans-serif;font-weight:400;border-radius:3px;color:#777!important;background:#f8f8f8;border:1px solid #ccc;box-shadow:0 1px 0 rgba(0,0,0,.08);text-shadow:none;line-height:23px;padding:1px 5px 0 8px}.sd-content ul li .option a.share-ustom span,.sd-content ul li a.sd-button>span,.sd-content ul li.advanced a.share-more span,.sd-content ul li.preview-item div.option.option-smart-off a span,.sd-social-icon-text .sd-content ul li a.sd-button>span,.sd-social-official .sd-content>ul>li .digg_button >a span,.sd-social-official .sd-content>ul>li>a.sd-button span,.sd-social-text .sd-content ul li a.sd-button span{line-height:23px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a,.sd-social-official .sd-content .sharing-hidden .inne |
3621 |
r>ul>li>a.sd-button,.sd-social-official .sd-content>ul>li .digg_button>a,.sd-social-official .sd-content>ul>li>a.sd-button{line-height:17px;box-shadow:none;vertical-align:top}.sd-social-official .sd-content ul li a.sd-button>span{line-height:17px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a:before,.sd-social-official .sd-content .sharing-hidden .inner>ul>li>a.sd-button:before,.sd-social-official .sd-content>ul>li .digg_button>a:before,.sd-social-official .sd-content>ul>li>a.sd-button:before{margin-bottom:-1px}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon .sd-content ul li a.sd-button:hover,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:hover,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li .digg_button>a:hover,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-official .sd-content>ul>li>a.sd-button:hover |
3622 |
,.sd-social-text .sd-content ul li a.sd-button:active,.sd-social-text .sd-content ul li a.sd-button:hover{color:#555;background:#fafafa;border:1px solid #999}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-text .sd-content ul li a.sd-button:active{box-shadow:inset 0 1px 0 rgba(0,0,0,.16)}.sd-content ul li a.sd-button:before{display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font:400 18px/1 social-logos;vertical-align:top;text-align:center}.sd-social-icon-text ul li a.sd-button:before{position:relative;top:2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-content ul li a.sd-button:before{position:relative;top:2px}}.sd-social-official ul li a.sd-button:before{position:relative;top:-2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social |
3623 |
-official ul li a.sd-button:before{top:0}}.sd-content ul li{margin:0!important;padding:0}.sd-content ul li.preview-item a.sd-button span,.sd-social-icon-text .sd-content ul li a span,.sd-social-official .sd-content ul li a.sd-button span{margin-right:3px}.sd-content ul li.preview-item.no-icon a.sd-button span{margin-right:0}.sd-content ul li.no-icon a:before,.sd-social-text .sd-content ul li a:before{display:none}body .sd-content ul li.share-custom.no-icon a span,body .sd-social-text .sd-content ul li.share-custom a span{background-image:none;background-position:-500px -500px!important;background-repeat:no-repeat!important;padding-right:0;height:0;line-height:inherit}.sd-social-icon .sd-content ul li a.share-more{position:relative;top:-4px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social-icon .sd-content ul li a.share-more{top:2px}}@-moz-document url-prefix(){.sd-social-icon .sd-content ul li a.share-more{top:2px}}.sd-social-icon .sd-content ul li a.share-more span{ma |
3624 |
rgin-right:3px}.sd-content ul li.share-print div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-print a:before,.sd-social-icon-text .sd-content li.share-print a:before,.sd-social-official .sd-content li.share-print a:before,.sd-social-text .sd-content ul li.share-print a:before{content:'\f469'}.sd-content ul li.share-email div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-email a:before,.sd-social-icon-text .sd-content li.share-email a:before,.sd-social-official .sd-content li.share-email a:before,.sd-social-text .sd-content ul li.share-email a:before{content:'\f410'}.sd-content ul li.share-linkedin div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-linkedin a:before,.sd-social-icon-text .sd-content li.share-linkedin a:before,.sd-social-text .sd-content ul li.share-linkedin a:before{content:'\f207'}.sd-content ul li.share-twitter div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share |
3625 |
-twitter a:before,.sd-social-icon-text .sd-content li.share-twitter a:before,.sd-social-text .sd-content ul li.share-twitter a:before{content:'\f202'}.sd-content ul li.share-reddit div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-reddit a:before,.sd-social-icon-text .sd-content li.share-reddit a:before,.sd-social-text .sd-content ul li.share-reddit a:before{content:'\f222'}.sd-content ul li.share-tumblr div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-tumblr a:before,.sd-social-icon-text .sd-content li.share-tumblr a:before,.sd-social-text .sd-content ul li.share-tumblr a:before{content:'\f607'}.sd-content ul li.share-pocket div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-pocket a:before,.sd-social-icon-text .sd-content li.share-pocket a:before,.sd-social-text .sd-content ul li.share-pocket a:before{content:'\f224'}.sd-content ul li.share-pinterest div.option.option-smart-off a:before,.sd-social-ico |
3626 |
n .sd-content ul li.share-pinterest a:before,.sd-social-icon-text .sd-content li.share-pinterest a:before,.sd-social-text .sd-content ul li.share-pinterest a:before{content:'\f210'}.sd-content ul li.share-google-plus-1 div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-google-plus-1 a:before,.sd-social-icon-text .sd-content li.share-google-plus-1 a:before,.sd-social-text .sd-content ul li.share-google-plus-1 a:before{content:'\f218'}.sd-content ul li.share-facebook div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-facebook a:before,.sd-social-icon-text .sd-content li.share-facebook a:before,.sd-social-text .sd-content ul li.share-facebook a:before{content:'\f203'}.sd-content ul li.share-press-this div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-press-this a:before,.sd-social-icon-text .sd-content li.share-press-this a:before,.sd-social-official .sd-content li.share-press-this a:before,.sd-social-text . |
3627 |
sd-content ul li.share-press-this a:before{content:'\f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.sd-content ul li.share-telegram div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-telegram a:before,.sd-social-icon-text .sd-content li.share-telegram a:before,.sd-social-official .sd-content li.share-telegram a:before,.sd-social-text .sd-content ul li.share-telegram a:before{content:'\f606'}.sd-social-official .sd-content li.share-telegram a:before{color:#08c}.sd-content ul li.share-skype div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-skype a:before,.sd-social-icon-text .sd-content li.share-skype a:before,.sd-social-text .sd-content ul li.share-skype a:before{content:'\f220'}.sd-content ul li.advanced a.share-more:before,.sd-social-icon .sd-content ul a.share-more:before,.sd-social-icon-text .sd-content a.share-more:before,.sd-social-official .sd-content a.share-more:before,.sd-social-text .sd |
3628 |
-content ul a.share-more:before{content:'\f415'}.sd-social-official .sd-content a.share-more:before{color:#2ba1cb}.sd-content ul li.share-jetpack-whatsapp div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-jetpack-whatsapp a:before,.sd-social-icon-text .sd-content li.share-jetpack-whatsapp a:before,.sd-social-official .sd-content li.share-jetpack-whatsapp a:before,.sd-social-text .sd-content ul li.share-jetpack-whatsapp a:before{content:'\f608'}.sd-social-official .sd-content li.share-jetpack-whatsapp a:before{color:#43d854}.sd-social-icon .sd-content ul li[class*=share-].share-jetpack-whatsapp a.sd-button{background:#43d854;color:#fff!important}.sd-social .sd-button .share-count{background:#2ea2cc;color:#fff;border-radius:10px;display:inline-block;text-align:center;font-size:10px;padding:1px 3px;line-height:1}.sd-social-official .sd-content ul,.sd-social-official .sd-content ul li{line-height:25px!important}.sd-social-official .sd-content>ul>li>a.sd-button |
3629 |
span{line-height:1}.sd-social-official .sd-content ul:after{content:".";display:block;height:0;clear:both;visibility:hidden}.sd-social-official .sd-content li.share-press-this a{margin:0 0 5px}.sd-social-official .sd-content ul>li{display:block;float:right;margin:0 0 5px 10px!important;height:25px}.sd-social-official .fb-share-button>span{vertical-align:top!important}.sd-social-official .sd-content .pocket_button iframe{width:98px}.googleplus1_button .g-plus{vertical-align:top!important}.reddit_button iframe{margin-top:1px}.googleplus1_button iframe,.linkedin_button>span,.pinterest_button,.pocket_button iframe,.twitter_button{margin:0!important}.sd-social-official .sd-content .share-skype{width:55px}body .sd-social-official li a.share-more,body .sd-social-official li.share-custom a,body .sd-social-official li.share-digg a,body .sd-social-official li.share-email a,body .sd-social-official li.share-press-this a,body .sd-social-official li.share-print{position:relative;top:0}body .sd- |
3630 |
social-icon .sd-content li.share-custom>a{padding:2px 3px 0;position:relative;top:4px}body .sd-content ul li.share-custom a.share-icon span,body .sd-social-icon .sd-content li.share-custom a span,body .sd-social-icon-text .sd-content li.share-custom a span,body .sd-social-official .sd-content li.share-custom a span,body .sd-social-text .sd-content li.share-custom a span{background-size:16px 16px;background-repeat:no-repeat;margin-right:0;padding:0 19px 0 0;display:inline-block;height:16px;line-height:16px}body .sd-social-icon .sd-content li.share-custom a span{width:0;padding-right:16px!important}.sharing-hidden .inner{position:absolute;z-index:2;border:1px solid #ccc;padding:10px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);border-radius:2px;margin-top:5px;max-width:400px}.sharing-hidden .inner ul{margin:0!important}.sd-social-official .sd-content .sharing-hidden ul>li.share-end{clear:both;margin:0!important;height:0!important}.sharing-hidden .inner:after,.sharing-hidden .i |
3631 |
nner:before{position:absolute;z-index:1;top:-8px;right:20px;width:0;height:0;border-right:6px solid transparent;border-left:6px solid transparent;border-bottom:8px solid #ccc;content:"";display:block}.sharing-hidden .inner:after{z-index:2;top:-7px;border-right:6px solid transparent;border-left:6px solid transparent;border-bottom:8px solid #fff}.sharing-hidden ul{margin:0}.sd-social-icon .sd-content ul li[class*=share-] a,.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a{border-radius:50%;-webkit-border-radius:50%;border:0;box-shadow:none;padding:7px;position:relative;top:-2px;line-height:1;width:auto;height:auto;margin-bottom:0}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button>span,.sd-social-icon .sd-content ul li[class*=share-] div.option a span{line-height:1}.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a:hover{border:none;opacity: |
3632 |
.6}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button:before{top:1px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button.share-custom{padding:8px 8px 6px;top:5px}.sd-social-icon .sd-content ul li a.sd-button.share-more{margin-right:10px}.sd-social-icon .sd-content ul li:first-child a.sd-button.share-more{margin-right:0}.sd-social-icon .sd-button span.share-count{position:absolute;bottom:0;left:0;border-radius:0;background:#555;font-size:9px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button{background:#e9e9e9;margin-top:2px;text-indent:0}.sd-social-icon .sd-content ul li[class*=share-].share-tumblr a.sd-button{background:#2c4762;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-facebook a.sd-button{background:#3b5998;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-twitter a.sd-button{background:#00acee;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pinterest a.sd-button{ba |
3633 |
ckground:#ca1f27;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-digg a.sd-button{color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-press-this a.sd-button{background:#1e8cbe;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-telegram a.sd-button{background:#08c;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-linkedin a.sd-button{background:#0077b5;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-google-plus-1 a.sd-button{background:#dd4b39;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pocket a.sd-button{background:#ee4056;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-reddit a.sd-button{background:#cee3f8;color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-skype a.sd-button{background:#00AFF0;color:#fff!important}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);po |
3634 |
sition:absolute!important;height:1px;width:1px;overflow:hidden}.sharing-screen-reader-text:active,.sharing-screen-reader-text:focus,.sharing-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#sharing_email{width:342px;position:absolute;z-index:1001;border:1px solid #ccc;padding:15px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);text-align:right}div.sharedaddy.sharedaddy-dark #sharing_email{border-color:#fff}#sharing_email .errors{color:#fff;background-color:#771a09;font-size:12px;padding:5px 8px;line-height:1;margin:10px 0 0}#sharing_email label{font-size:12px;color:#333;font-weight:700;display:block;padding:0 0 4px;text-align:right;text-shadow:none}#sharing_email form{margin:0}#sharing_email input[type=email],#sharing_email i |
3635 |
nput[type=text]{width:100%;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;border:1px solid #ccc;margin-bottom:1em;background:#fff;font-size:12px;color:#333;max-width:none;padding:1px 3px}#jetpack-source_f_name{display:none!important;position:absolute!important;right:-9000px}#sharing_email .sharing_cancel{padding:0 1em 0 0;font-size:12px;text-shadow:none}#sharing_email .recaptcha{width:312px;height:123px;margin:0 0 1em}.slideshow-window{background-color:#222;border:20px solid #222;border-radius:10px;height:0;margin-bottom:20px;overflow:hidden;padding-top:30px!important;padding-bottom:56.25%!important;position:relative;z-index:1}.slideshow-window.slideshow-white{background-color:#fff;border-color:#fff}.slideshow-window,.slideshow-window *{-moz-box-sizing:content-box;box-sizing:content-box}.slideshow-loading{height:100%;text-align:center;margin:auto}body div.slideshow-window * img{background-color:transparent!important;background-image:none!important;bor |
3636 |
der-width:0!important;display:block;margin:0 auto;max-width:100%;max-height:100%;padding:0!important;position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.slideshow-loading img{vertical-align:middle}.slideshow-slide{display:none;height:100%!important;right:0;margin:auto;position:absolute;text-align:center;top:0;width:100%!important}.slideshow-slide img{vertical-align:middle}.slideshow-line-height-hack{overflow:hidden;width:0;font-size:0}.slideshow-slide-caption{font-size:13px;font-family:"Helvetica Neue",sans-serif;color:#f7f7f7;text-shadow:#222 -1px 1px 2px;line-height:25px;height:25px;position:absolute;bottom:5px;right:0;z-index:100;width:100%;text-align:center}.slideshow-controls{z-index:1000;position:absolute;bottom:30px;margin:auto;text-align:center;width:100%;-ms-filter:"alpha(Opacity=50)";opacity:.5;direction:rtl;transition:300ms opacity ease-out}.slideshow-window:hover .slideshow-controls{-ms-filter:"alpha(Opa |
3637 |
city=100)";opacity:1}body div div.slideshow-controls a,body div div.slideshow-controls a:hover{border:2px solid rgba(255,255,255,.1)!important;background-color:#000!important;background-color:rgba(0,0,0,.6)!important;background-image:url(../modules/shortcodes/img/slideshow-controls.png)!important;background-repeat:no-repeat;background-size:142px 16px!important;background-position:-34px 8px!important;color:#222!important;margin:0 5px!important;padding:0!important;display:inline-block!important;zoom:1;height:32px!important;width:32px!important;line-height:32px!important;text-align:center!important;-khtml-border-radius:10em!important;border-radius:10em!important;transition:300ms border-color ease-out}@media only screen and (-webkit-min-device-pixel-ratio:1.5){body div div.slideshow-controls a,body div div.slideshow-controls a:hover{background-image:url(../modules/shortcodes/img/slideshow-controls-2x.png)!important}}body div div.slideshow-controls a:hover{border-color:rgba(255,255,255,1 |
3638 |
)!important}body div div.slideshow-controls a:first-child{background-position:-76px 8px!important}body div div.slideshow-controls a:last-child{background-position:-117px 8px!important}body div div.slideshow-controls a.running,body div div.slideshow-controls a:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.paused{background-position:9px 8px!important}.slideshow-controls a img{border:50px dotted #f0f}body.presentation-wrapper-fullscreen-parent,html.presentation-wrapper-fullscreen-parent{overflow:hidden!important}.presentation-wrapper-fullscreen-parent #wpadminbar{display:none}.presentation-wrapper-fullscreen,.presentation-wrapper-fullscreen-parent{min-width:100%!important;min-height:100%!important;position:absolute!important;top:0!important;left:0!important;bottom:0!important;right:0!important;margin:0!important;padding:0!important;z-index:10000!important}.presentation-wrapper-fullscreen{background-color:gray;border:none!important}.presentation- |
3639 |
wrapper-fullscreen .nav-arrow-left,.presentation-wrapper-fullscreen .nav-arrow-right{z-index:20001}.presentation-wrapper-fullscreen .nav-fullscreen-button{z-index:20002}.presentation-wrapper{margin:20px auto;border:1px solid #e5e5e5;overflow:hidden;line-height:normal}.presentation{position:relative;margin:0;overflow:hidden;outline:0}.presentation,.presentation .step{background-repeat:no-repeat;background-position:center;background-size:100% 100%}.presentation .step.fade:not(.active){opacity:0}.presentation .slide-content{padding:30px}.presentation .nav-arrow-left,.presentation .nav-arrow-right,.presentation .nav-fullscreen-button{position:absolute;width:34px;background-repeat:no-repeat;z-index:2;opacity:0;transition:opacity .25s}.presentation .nav-arrow-left,.presentation .nav-arrow-right{height:100%;background-image:url(../modules/shortcodes/images/slide-nav.png);background-size:450% 61px}.presentation .nav-arrow-left{right:0;background-position:4px 50%}.presentation .nav-arrow-rig |
3640 |
ht{left:0;background-position:-120px 50%}.presentation .nav-fullscreen-button{width:32px;height:32px;margin:4px;bottom:0;left:0;z-index:3;background-image:url(../modules/shortcodes/images/expand.png);background-size:100% 100%}.presentation:hover .nav-arrow-left,.presentation:hover .nav-arrow-right{opacity:1}.presentation:hover .nav-fullscreen-button{opacity:.8}.presentation-wrapper-fullscreen .nav-fullscreen-button{background-image:url(../modules/shortcodes/images/collapse.png)}.presentation .autoplay-overlay{height:15%;width:80%;margin:30% 10%;position:relative;z-index:100;display:table;border-radius:50px;background-color:#e5e5e5;background-color:rgba(0,0,0,.75);transition:opacity .5s}.presentation .autoplay-overlay .overlay-msg{position:relative;display:table-cell;text-align:center;vertical-align:middle;color:#fff}.presentation .will-fade{opacity:0}.presentation .do-fade{opacity:1;transition:opacity .5s}#subscribe-email input{width:95%}.comment-subscription-form .subscribe-label{d |
3641 |
isplay:inline!important}.jetpack-video-wrapper{margin-bottom:1.6em}.jetpack-video-wrapper>.wp-video,.jetpack-video-wrapper>embed,.jetpack-video-wrapper>iframe,.jetpack-video-wrapper>object{margin-bottom:0}.jetpack-social-navigation ul{display:block;margin:0 0 1.5em;padding:0}.jetpack-social-navigation li{display:inline-block;margin:0;line-height:1}.jetpack-social-navigation a{border:0;height:1em;text-decoration:none;width:1em}.jetpack-social-navigation a:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:Genericons;font-size:1em;font-style:normal;font-weight:400;height:1em;line-height:1;speak:none;text-decoration:inherit;vertical-align:top;width:1em;content:"\f415"}.jetpack-social-navigation a[href*="codepen.io"]:before{content:"\f216"}.jetpack-social-navigation a[href*="digg.com"]:before{content:"\f221"}.jetpack-social-navigation a[href*="dribbble.com"]:before{content:"\f201"}.jetpack-social-navigation a[href*="dropbox.com"] |
3642 |
:before{content:"\f225"}.jetpack-social-navigation a[href*="mailto:"]:before{content:"\f410"}.jetpack-social-navigation a[href*="facebook.com"]:before{content:"\f203"}.jetpack-social-navigation a[href*="flickr.com"]:before{content:"\f211"}.jetpack-social-navigation a[href*="foursquare.com"]:before{content:"\f226"}.jetpack-social-navigation a[href*="github.com"]:before{content:"\f200"}.jetpack-social-navigation a[href*="plus.google.com"]:before{content:"\f206"}.jetpack-social-navigation a[href*="instagram.com"]:before{content:"\f215"}.jetpack-social-navigation a[href*="linkedin.com"]:before{content:"\f208"}.jetpack-social-navigation a[href*="path.com"]:before{content:"\f219"}.jetpack-social-navigation a[href*="pinterest.com"]:before{content:"\f210"}.jetpack-social-navigation a[href*="getpocket.com"]:before{content:"\f224"}.jetpack-social-navigation a[href*="polldaddy.com"]:before{content:"\f217"}.jetpack-social-navigation a[href*="reddit.com"]:before{content:"\f222"}.jetpack-social-n |
3643 |
avigation a[href$="/feed/"]:before{content:"\f413"}.jetpack-social-navigation a[href*="skype:"]:before{content:"\f220"}.jetpack-social-navigation a[href*="spotify.com"]:before{content:"\f515"}.jetpack-social-navigation a[href*="stumbleupon.com"]:before{content:"\f223"}.jetpack-social-navigation a[href*="tumblr.com"]:before{content:"\f214"}.jetpack-social-navigation a[href*="twitch.tv"]:before{content:"\f516"}.jetpack-social-navigation a[href*="twitter.com"]:before{content:"\f202"}.jetpack-social-navigation a[href*="vimeo.com"]:before{content:"\f212"}.jetpack-social-navigation a[href*="vine.co"]:before{content:"\f517"}.jetpack-social-navigation a[href*="wordpress.com"]:before,.jetpack-social-navigation a[href*="wordpress.org"]:before{content:"\f205"}.jetpack-social-navigation a[href*="youtube.com"]:before{content:"\f213"}.tiled-gallery{clear:both;margin:0 0 20px;overflow:hidden}.tiled-gallery img{margin:2px!important}.tiled-gallery .gallery-group{float:right;position:relative}.tiled- |
3644 |
gallery .tiled-gallery-item{float:right;margin:0;position:relative;width:inherit}.tiled-gallery .gallery-row{overflow:hidden}.tiled-gallery .tiled-gallery-item a{background:0 0;border:none;color:inherit;margin:0;padding:0;text-decoration:none;width:auto}.tiled-gallery .tiled-gallery-item img,.tiled-gallery .tiled-gallery-item img:hover{background:0 0;border:none;box-shadow:none;max-width:100%;padding:0;vertical-align:middle}.tiled-gallery-caption{background:#eee;background:rgba(255,255,255,.8);color:#333;font-size:13px;font-weight:400;overflow:hidden;padding:10px 0;position:absolute;bottom:0;text-indent:10px;text-overflow:ellipsis;width:100%;white-space:nowrap}.tiled-gallery .tiled-gallery-item-small .tiled-gallery-caption{font-size:11px}.widget-gallery .tiled-gallery-unresized{visibility:hidden;height:0;overflow:hidden}.tiled-gallery .tiled-gallery-item img.grayscale{position:absolute;right:0;top:0}.tiled-gallery .tiled-gallery-item img.grayscale:hover{opacity:0}.tiled-gallery.type |
3645 |
-circle .tiled-gallery-item img{border-radius:50%!important}.tiled-gallery.type-circle .tiled-gallery-caption{display:none;opacity:0}.jetpack-display-remote-posts{margin:5px 0 20px}.jetpack-display-remote-posts h4{font-size:90%;margin:5px 0;padding:0}.jetpack-display-remote-posts h4 a{text-decoration:none}.jetpack-display-remote-posts p{margin:0!important;padding:0;line-height:1.4em!important;font-size:90%}.jetpack-display-remote-posts img{max-width:100%}.widget-grofile h4{margin:1em 0 .5em}.widget-grofile ul.grofile-urls{margin-right:0;overflow:hidden}.widget-grofile ul.grofile-accounts li{list-style:none;display:inline}.widget-grofile ul.grofile-accounts li::before{content:""!important}.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite.png);background-repeat:no-repeat;width:16px;height:16px;float:right;margin-left:8px;margin-bottom:8px}.rtl .widget-grofile .grofile-accounts-logo{margin-right:8px;margin-left:0}.grofile-thumbnail{wi |
3646 |
dth:500px;max-width:100%}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite-2x.png);background-size:16px 784px}}div[class^=gr_custom_container]{border:1px solid gray;border-radius:10px;padding:10px 5px;background-color:#FFF;color:#000}div[class^=gr_custom_container] a{color:#000}h2[class^=gr_custom_header]{display:none}div[class^=gr_custom_each_container]{width:100%;clear:both;margin-bottom:10px;overflow:auto;padding-bottom:4px;border-bottom:1px solid #aaa}div[class^=gr_custom_book_container]{float:left;overflow:hidden;height:60px;margin-right:4px;width:39px}div[class^=gr_custom_author]{font-size:10px}div[class^=gr_custom_tags]{font-size:10px;color:gray}div[class^=gr_custom_rating]{display:none}.widget_wpcom_social_media_icons_widget |
3647 |
ul{list-style-type:none;margin-right:0}.widget_wpcom_social_media_icons_widget li{border:0;display:inline;margin-left:.5em}.widget_wpcom_social_media_icons_widget li a{border:0;text-decoration:none}.widget_wpcom_social_media_icons_widget .genericon{font-family:Genericons}.widget_wpcom_social_media_icons_widget .screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hidden}.widget_wpcom_social_media_icons_widget .screen-reader-text:active,.widget_wpcom_social_media_icons_widget .screen-reader-text:focus,.widget_wpcom_social_media_icons_widget .screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-size:.875rem;font-weight:700;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.widgets-grid-layout{width:100%}.widgets-grid-layout:after,.widgets-grid-lay |
3648 |
out:before{content:" ";display:table}.widgets-grid-layout:after{clear:both}.widget-grid-view-image{float:right;max-width:50%}.widget-grid-view-image a{display:block;margin:0 0 4px 2px}.widget-grid-view-image:image:nth-child(even){float:left}.widget-grid-view-image:nth-child(even) a{margin:0 2px 4px 0}.widgets-grid-layout .widget-grid-view-image img{max-width:100%;height:auto}.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:0 0;clear:none;float:right;margin:0 0 -3px -5px;padding:0 0 6px 8px;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:0 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widgets-list-layout{padding:0;margin:0;list-style-type:none}.widgets-list-layout li:after,.widgets-list-layout li:before{content:"";display:table}.widgets-list-layout li:after{clear:both}.widgets-list-layout li{zoom:1;margin-bottom:1em;list-s |
3649 |
tyle-type:none!important}.widgets-list-layout .widgets-list-layout-blavatar{float:right;width:21.276596%;max-width:40px;height:auto}.widgets-list-layout-links{float:left;width:73.404255%}.widgets-list-layout span{opacity:.5}.widgets-list-layout span:hover{opacity:.8} |
3650 |
\ No newline at end of file |
3651 |
+.jp-carousel-wrap *{line-height:inherit}.jp-carousel-overlay{background:#000}div.jp-carousel-fadeaway{position:fixed;bottom:0;z-index:2147483647;width:100%;height:15px}.jp-carousel-next-button span,.jp-carousel-previous-button span{background:url(../modules/carousel/images/arrows.png) center center/200px 126px no-repeat}.jp-carousel-msg{font-family:"Open Sans",sans-serif;font-style:normal;display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:center;margin:25px 2px 0 20px;background-color:#fff;border-right:4px solid #ffba00;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.jp-carousel-next-button span,.jp-carousel-previous-button span{background-image:url(../modules/carousel/images/arrows-2x.png)}}.jp-carousel-wrap{font-family:"Helvetica Neue",sans-serif!important}.jp |
3652 |
-carousel-info{position:absolute;bottom:0;text-align:right!important;-webkit-font-smoothing:subpixel-antialiased!important}.jp-carousel-info ::selection{background:#68c9e8;color:#fff}.jp-carousel-info ::-moz-selection{background:#68c9e8;color:#fff}.jp-carousel-photo-info{position:relative;right:25%;width:50%}.jp-carousel-transitions .jp-carousel-photo-info{transition:400ms ease-out}.jp-carousel-info h2{background:none!important;border:none!important;color:#999;display:block!important;font:400 13px/1.25em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;margin:7px 0 0!important;padding:10px 0 0!important;overflow:hidden;text-align:right;text-shadow:none!important;text-transform:none!important;-webkit-font-smoothing:subpixel-antialiased}.jp-carousel-next-button,.jp-carousel-previous-button{text-indent:-9999px;overflow:hidden;cursor:pointer}.jp-carousel-next-button span,.jp-carousel-previous-button span{position:absolute;top:0;bottom:0;width:82px;zoom:1;filter:alpha(opa |
3653 |
city=20);opacity:.2}.jp-carousel-transitions .jp-carousel-next-button span,.jp-carousel-transitions .jp-carousel-previous-button span{transition:500ms opacity ease-out}.jp-carousel-next-button:hover span,.jp-carousel-previous-button:hover span{filter:alpha(opacity=60);opacity:.6}.jp-carousel-next-button span{background-position:-110px center;left:0}.jp-carousel-previous-button span{background-position:-10px center;right:0}.jp-carousel-buttons{margin:-18px -20px 15px;padding:8px 10px;border-bottom:1px solid #222;background:#222;text-align:center}div.jp-carousel-buttons a{border:none!important;color:#999;font:400 11px/1.2em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;padding:5px 0 5px 2px;text-decoration:none!important;text-shadow:none!important;vertical-align:middle;-webkit-font-smoothing:subpixel-antialiased}div.jp-carousel-buttons a:hover{color:#68c9e8;border:none!important}.jp-carousel-transitions div.jp-carousel-buttons a:hover{transition:none!important}.jp-c |
3654 |
arousel-next-button,.jp-carousel-previous-button,.jp-carousel-slide,.jp-carousel-slide img{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.jp-carousel-slide{position:fixed;width:0;bottom:0;background-color:#000;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}.jp-carousel-slide.selected{position:absolute!important;filter:alpha(opacity=100);opacity:1}.jp-carousel-slide{filter:alpha(opacity=25);opacity:.25}.jp-carousel-slide img{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;background:none!important;border:none!important;padding:0!important;box-shadow:0 2px 8px rgba(0,0,0,.1);zoom:1}.jp-carousel-transitions .jp-carousel-slide{transition:opacity 400ms linear}.jp-carousel-close-hint{color:#999;cursor:default;letter-spacing:0!important;padding:.35em 0 0;position:absolute;text-ali |
3655 |
gn:right;width:90%}.jp-carousel-transitions .jp-carousel-close-hint{transition:color 200ms linear}.jp-carousel-close-hint span{cursor:pointer;background-color:#000;background-color:rgba(0,0,0,.8);display:block;height:22px;font:400 24px/1 "Helvetica Neue",sans-serif!important;line-height:22px;margin:0 .4em 0 0;text-align:center;vertical-align:middle;width:22px;border-radius:4px}.jp-carousel-transitions .jp-carousel-close-hint span{transition:border-color 200ms linear}.jp-carousel-close-hint:hover{cursor:default;color:#fff}.jp-carousel-close-hint:hover span{border-color:#fff}a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background:url(../modules/carousel/images/carousel-sprite.png?5) 0 0/16px 200px no-repeat}div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{margin:0 0 0 14px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030; |
3656 |
padding-left:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;margin:0 -12px 0 2px!important}div.jp-carousel-buttons a.jp-carousel-reblog,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{background-position:6px -36px;padding-left:auto!important;padding-right:26px!important;color:#999}div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -156px;padding-right:19px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{cursor:default}div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:6px -56px;color:#68c9e8}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:ur |
3657 |
l(../modules/carousel/images/carousel-sprite-2x.png?5)}}div#carousel-reblog-box{background:#222;padding:3px 0 0;display:none;margin:5px auto 0;border-radius:2px;box-shadow:0 0 20px rgba(0,0,0,.9);height:74px;width:565px}#carousel-reblog-box textarea{background:#999;font:13px/1.4 "Helvetica Neue",sans-serif!important;color:#444;padding:3px 6px;width:370px;height:48px;float:right;margin:6px 9px 0;border:1px solid #666;box-shadow:inset -2px 2px 2px rgba(0,0,0,.2);border-radius:2px}#carousel-reblog-box textarea:focus{background:#ccc;color:#222}#carousel-reblog-box label{color:#aaa;font-size:11px;padding-left:2px;padding-right:2px;display:inline;font-weight:400}#carousel-reblog-box select{width:110px;padding:0;font-size:12px;font-family:"Helvetica Neue",sans-serif!important;background:#333;color:#eee;border:1px solid #444;margin-top:5px}#carousel-reblog-box .submit,#wrapper #carousel-reblog-box p.response{float:right;width:154px;padding-top:0;padding-right:1px;overflow:hidden;height:34px |
3658 |
;margin:3px 2px 0 0!important}#wrapper #carousel-reblog-box p.response{font-size:13px;clear:none;padding-right:2px;height:34px;color:#aaa}#carousel-reblog-box input#carousel-reblog-submit,#jp-carousel-comment-form-button-submit{font:13px/24px "Helvetica Neue",sans-serif!important;margin-top:8px;padding:0 10px!important;border-radius:1em;height:24px;color:#333;cursor:pointer;font-weight:400;background:#aaa;border:1px solid #444}#carousel-reblog-box input#carousel-reblog-submit:hover,#jp-carousel-comment-form-button-submit:hover{background:#ccc}#carousel-reblog-box .canceltext{color:#aaa;font-size:11px;line-height:24px}#carousel-reblog-box .canceltext a{color:#fff}.jp-carousel-titleanddesc{border-top:1px solid #222;color:#999;font-size:15px;padding-top:24px;margin-bottom:20px;font-weight:400}.jp-carousel-titleanddesc-title{font:300 1.5em/1.1 "Helvetica Neue",sans-serif!important;text-transform:none!important;color:#fff;margin:0 0 15px;padding:0}.jp-carousel-titleanddesc-desc p{color:# |
3659 |
999;line-height:1.4;margin-bottom:.75em}.jp-carousel-comments p a,.jp-carousel-info h2 a,.jp-carousel-titleanddesc p a{color:#fff!important;border:none!important;text-decoration:underline!important;font-weight:400!important;font-style:normal!important}.jp-carousel-titleanddesc p b,.jp-carousel-titleanddesc p strong{font-weight:700;color:#999}.jp-carousel-titleanddesc p em,.jp-carousel-titleanddesc p i{font-style:italic;color:#999}.jp-carousel-comments p a:hover,.jp-carousel-info h2 a:hover,.jp-carousel-titleanddesc p a:hover{color:#68c9e8!important}.jp-carousel-titleanddesc p:empty{display:none}.jp-carousel-left-column-wrapper h1:after,.jp-carousel-left-column-wrapper h1:before,.jp-carousel-photo-info h1:after,.jp-carousel-photo-info h1:before{content:none!important}.jp-carousel-image-meta{background:#111;border:1px solid #222;color:#fff;font:12px/1.4 "Helvetica Neue",sans-serif!important;overflow:hidden;padding:18px 20px;width:209px!important}.jp-carousel-image-meta h5,.jp-carousel |
3660 |
-image-meta li{font-family:"Helvetica Neue",sans-serif!important;position:inherit!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;background:none!important;border:none!important;font-weight:400!important;line-height:1.3em!important}.jp-carousel-image-meta ul{margin:0!important;padding:0!important;list-style:none!important}.jp-carousel-image-meta li{width:48%!important;float:right!important;margin:0 0 15px 2%!important;color:#fff!important;font-size:13px!important}.jp-carousel-image-meta h5{color:#999!important;text-transform:uppercase!important;font-size:10px!important;margin:0 0 2px!important;letter-spacing:.1em!important}a.jp-carousel-image-download{padding-right:23px;display:inline-block;clear:both;color:#999;line-height:1;font-weight:400;font-size:13px;text-decoration:none;background-position:0 -82px}a.jp-carousel-image-download span.photo-size{font-size:11px;border-radius:1em;margin-right:2px;display:inline-block}a.jp-carousel-image-d |
3661 |
ownload span.photo-size-times{padding:0 2px 0 1px}a.jp-carousel-image-download:hover{background-position:0 -122px;color:#68c9e8;border:none!important}.jp-carousel-image-map{position:relative;margin:-20px -20px 20px;border-bottom:1px solid rgba(255,255,255,.17);height:154px}.jp-carousel-image-map img.gmap-main{border-top-right-radius:6px;border-left:1px solid rgba(255,255,255,.17)}.jp-carousel-image-map div.gmap-topright{width:94px;height:154px;position:absolute;top:0;left:0}.jp-carousel-image-map div.imgclip{overflow:hidden;border-top-left-radius:6px}.jp-carousel-image-map div.gmap-topright img{margin-right:-40px}.jp-carousel-image-map img.gmap-bottomright{position:absolute;top:96px;left:0}.jp-carousel-comments{font:15px/1.7 "Helvetica Neue",sans-serif!important;font-weight:400;background:none}.jp-carousel-comments p a:active,.jp-carousel-comments p a:focus,.jp-carousel-comments p a:hover{color:#68c9e8!important}.jp-carousel-comment{background:none;color:#999;margin-bottom:20px;clea |
3662 |
r:right;overflow:auto;width:100%}.jp-carousel-comment p{color:#999!important}.jp-carousel-comment .comment-author{font-size:13px;font-weight:400;padding:0;width:auto;display:inline;float:none;border:none;margin:0}.jp-carousel-comment .comment-author a{color:#fff}.jp-carousel-comment .comment-gravatar{float:right}.jp-carousel-comment .comment-content{border:none;margin-right:85px;padding:0}.jp-carousel-comment .avatar{margin:0 0 0 20px;border-radius:4px;border:none!important;padding:0!important;background-color:transparent!important}.jp-carousel-comment .comment-date{color:#999;margin-top:4px;font-size:11px;display:inline;float:left}#jp-carousel-comment-form{margin:0 0 10px!important;float:right;width:100%}textarea#jp-carousel-comment-form-comment-field{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:15px/1.4 "Helvetica Neue",sans-serif!important;width:100%;padding:10px 10px 5px;margin:0;float:none;height:147px;box-shadow:inset -2px 2px 2px rgba(0,0,0,.2);border |
3663 |
-radius:3px;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}textarea#jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#555}textarea#jp-carousel-comment-form-comment-field:focus{background:#ccc;color:#222}textarea#jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#aaa}#jp-carousel-comment-form-spinner{color:#fff;margin:22px 10px 0 0;display:block;width:20px;height:20px;float:right}#jp-carousel-comment-form-submit-and-info-wrapper{display:none;overflow:hidden;width:100%}#jp-carousel-comment-form-commenting-as input{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:13px/1.4 "Helvetica Neue",sans-serif!important;padding:3px 6px;float:right;box-shadow:inset -2px 2px 2px rgba(0,0,0,.2);border-radius:2px;width:285px}#jp-carousel-comment-form-commenting-as input:focus{background:#ccc;color:#222}#jp-carousel-comment-form-commenting-as p{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:22px 0 |
3664 |
0;float:right}#jp-carousel-comment-form-commenting-as fieldset{float:right;border:none;margin:20px 0 0;padding:0;clear:both}#jp-carousel-comment-form-commenting-as label{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:0 0 3px 20px;float:right;width:100px}#jp-carousel-comment-form-button-submit{margin-top:20px;float:left}#jp-carousel-comment-form-container,#js-carousel-comment-form-container{margin-bottom:15px;overflow:auto;width:100%}#jp-carousel-comment-post-results{display:none;overflow:auto;width:100%}#jp-carousel-comment-post-results span{display:block;text-align:center;margin-top:20px;width:100%;overflow:auto;padding:1em 0;-moz-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.7);border-radius:2px;font:13px/1.4 "Helvetica Neue",sans-serif!important;border:1px solid rgba(255,255,255,.17);box-shadow:inset 0 0 5px 5px rgba(0,0,0,1)}.jp-carousel-comment-post-error{color:#DF4926}#jp-carousel-comments-closed{display:none;color:#999}#jp-carousel-commen |
3665 |
ts-loading{font:400 15px/1.7 "Helvetica Neue",sans-serif!important;display:none;color:#999;text-align:right;margin-bottom:20px}.jp-carousel-light .jp-carousel-overlay{background:#fff}.jp-carousel-light .jp-carousel-next-button:hover span,.jp-carousel-light .jp-carousel-previous-button:hover span{opacity:.8}.jp-carousel-light .jp-carousel-close-hint:hover,.jp-carousel-light .jp-carousel-titleanddesc div{color:#000!important}.jp-carousel-light .jp-carousel-comment .comment-author a,.jp-carousel-light .jp-carousel-comments p a,.jp-carousel-light .jp-carousel-info h2 a,.jp-carousel-light .jp-carousel-titleanddesc p a{color:#1e8cbe!important}.jp-carousel-light .jp-carousel-comment .comment-author a:hover,.jp-carousel-light .jp-carousel-comments p a:hover,.jp-carousel-light .jp-carousel-info h2 a:hover,.jp-carousel-light .jp-carousel-titleanddesc p a:hover{color:#f1831e!important}.jp-carousel-light .jp-carousel-comment,.jp-carousel-light .jp-carousel-comment p,.jp-carousel-light .jp-carou |
3666 |
sel-info h2,.jp-carousel-light .jp-carousel-titleanddesc,.jp-carousel-light .jp-carousel-titleanddesc p,.jp-carousel-light .jp-carousel-titleanddesc p b,.jp-carousel-light .jp-carousel-titleanddesc p em,.jp-carousel-light .jp-carousel-titleanddesc p i,.jp-carousel-light .jp-carousel-titleanddesc p strong,.jp-carousel-light div.jp-carousel-buttons a{color:#666}.jp-carousel-light .jp-carousel-buttons{border-bottom-color:#f0f0f0;background:#f5f5f5}.jp-carousel-light div.jp-carousel-buttons a:hover{text-decoration:none;color:#f1831e}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:4px -56px;padding-right:24px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#2ea2cc;color:#fff}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -176px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-rebl |
3667 |
og.reblogged{background-position:5px -36px}.jp-carousel-light div#carousel-reblog-box{background:#eee;box-shadow:0 2px 10px rgba(0,0,0,.1);border:1px solid #ddd}.jp-carousel-light #carousel-reblog-box textarea{color:#666;border:1px solid #cfcfcf;background:#fff}.jp-carousel-light #carousel-reblog-box .canceltext{color:#888}.jp-carousel-light #carousel-reblog-box .canceltext a{color:#666}.jp-carousel-light #carousel-reblog-box select{background:#eee;color:#333;border:1px solid #aaa}#jp-carousel-comment-form-button-submit,.jp-carousel-light #carousel-reblog-box input#carousel-reblog-submit{color:#333;background:#fff;border:1px solid #aaa}.jp-carousel-light .jp-carousel-image-meta{background:#fafafa;border:1px solid #eee;border-top-color:#f5f5f5;border-right-color:#f5f5f5;color:#333}.jp-carousel-light .jp-carousel-image-meta li{color:#000!important}.jp-carousel-light .jp-carousel-close-hint{color:#ccc}.jp-carousel-light .jp-carousel-close-hint span{background-color:#fff;border-color:#c |
3668 |
cc}.jp-carousel-light #jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#aaa}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus{color:#333}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#ddd}.jp-carousel-light a.jp-carousel-image-download{background-position:0 -122px}.jp-carousel-light a.jp-carousel-image-download:hover{background-position:0 -122px;color:#f1831e}.jp-carousel-light textarea#jp-carousel-comment-form-comment-field{background:#fbfbfb;color:#333;border:1px solid #dfdfdf;box-shadow:inset -2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input{background:#fbfbfb;border:1px solid #dfdfdf;color:#333;box-shadow:inset -2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input:focus{background:#fbfbfb;color:#333}.jp-carousel-light #jp-carousel-comment-post-results span{background:#f7f7f7;border:1px solid #dfdfdf;box-shado |
3669 |
w:inset 0 0 5px rgba(0,0,0,.05)}.jp-carousel-light .jp-carousel-slide{background-color:#fff}.jp-carousel-light .jp-carousel-titleanddesc{border-top:1px solid #eee}@media only screen and (max-width:760px){.jp-carousel-info{margin:0 10px!important}.jp-carousel-buttons,.jp-carousel-next-button,.jp-carousel-previous-button{display:none!important}.jp-carousel-image-meta{float:none!important;width:100%!important;-moz-box-sizing:border-box;box-sizing:border-box}.jp-carousel-close-hint{font-weight:800!important;font-size:26px!important;position:fixed!important;top:-10px}.jp-carousel-slide img{filter:alpha(opacity=100);opacity:1}.jp-carousel-wrap{background-color:#000}.jp-carousel-fadeaway{display:none}#jp-carousel-comment-form-container{display:none!important}.jp-carousel-titleanddesc{padding-top:0!important;border:none!important}.jp-carousel-titleanddesc-title{font-size:1em!important}.jp-carousel-left-column-wrapper{padding:0;width:100%!important}.jp-carousel-photo-info{right:0!important;w |
3670 |
idth:100%!important}}.contact-form .clear-form{clear:both}.contact-form input[type=email],.contact-form input[type=text]{width:300px;max-width:98%;margin-bottom:13px}.contact-form select{margin-bottom:13px}.contact-form textarea{height:200px;width:80%;float:none;margin-bottom:13px}.contact-form input[type=checkbox],.contact-form input[type=radio]{float:none;margin-bottom:13px}.contact-form label{margin-bottom:3px;float:none;font-weight:700;display:block}.contact-form label.checkbox,.contact-form label.radio{margin-bottom:3px;float:none;font-weight:700;display:inline-block}.contact-form label span{color:#AAA;margin-right:4px;font-weight:400}.contact-form-submission{margin-bottom:4em;padding:1.5em 1em}.contact-form-submission p{margin:0 auto}.form-errors .form-error-message{color:red}.textwidget .contact-form input[type=email],.textwidget .contact-form input[type=text],.textwidget .contact-form textarea{width:250px;max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}#jetpa |
3671 |
ck-check-feedback-spam{margin:1px 0 0 8px}.jetpack-check-feedback-spam-spinner{display:inline-block;margin-top:7px}.infinite-loader{color:#000;display:block;height:28px;text-indent:-9999px}#infinite-handle span{background:#333;border-radius:1px;color:#eee;cursor:pointer;font-size:13px;padding:6px 16px}#infinite-handle span button,#infinite-handle span button:focus,#infinite-handle span button:hover{display:inline;position:static;padding:0;margin:0;border:none;line-height:inherit;background:0 0;color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;font-family:inherit}#infinite-handle span button::-moz-focus-inner{margin:0;padding:0;border:none}@media (max-width:800px){#infinite-handle span:before{display:none}#infinite-handle span{display:block}}#infinite-footer{position:fixed;bottom:-50px;right:0;width:100%}#infinite-footer a{text-decoration:none}#infinite-footer .blog-credits a:hover,#infinite-footer .blog-info a:hover{color:#444;text-decoration:underline}#infinite-foo |
3672 |
ter .container{background:rgba(255,255,255,.8);border-color:#ccc;border-color:rgba(0,0,0,.1);border-style:solid;border-width:1px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 auto;overflow:hidden;padding:1px 20px;width:780px}#infinite-footer .blog-credits,#infinite-footer .blog-info{-moz-box-sizing:border-box;box-sizing:border-box;line-height:25px}#infinite-footer .blog-info{float:right;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap;width:40%}#infinite-footer .blog-credits{font-weight:400;float:left;width:60%}#infinite-footer .blog-info a{color:#111;font-size:14px;font-weight:700}#infinite-footer .blog-credits{color:#888;font-size:12px;text-align:left}#infinite-footer .blog-credits a{color:#666}.infinity-end.neverending #infinite-footer{display:none}@media (max-width:640px){#infinite-footer .container{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}#infinite-footer .blog-info{width:30%}#infinite-footer .blog-credits{width:70%}# |
3673 |
infinite-footer .blog-credits,#infinite-footer .blog-info a{font-size:10px}}@media (max-width:640px){#infinite-footer{position:static}}#wpadminbar li#wp-admin-bar-admin-bar-likes-widget{width:61px;overflow:hidden}#wpadminbar iframe.admin-bar-likes-widget{width:61px;height:28px;min-height:28px;border-width:0;position:absolute;top:0}div.jetpack-likes-widget-wrapper{width:100%;min-height:50px;position:relative}div.jetpack-likes-widget-wrapper .sd-link-color{font-size:12px}div.jetpack-likes-widget-wrapper.slim-likes-widget{width:1px;min-height:0}#likes-other-gravatars{display:none;position:absolute;padding:10px 10px 12px;background-color:#2e4453;border-width:0;box-shadow:0 0 10px #2e4453;box-shadow:0 0 10px rgba(46,68,83,.6);min-width:130px;z-index:1000}#likes-other-gravatars *{line-height:normal}#likes-other-gravatars .likes-text{color:#fff;font-size:12px;padding-bottom:8px}#likes-other-gravatars li,#likes-other-gravatars ul{margin:0;padding:0;text-indent:0;list-style-type:none}#likes- |
3674 |
other-gravatars li::before{content:""}#likes-other-gravatars ul.wpl-avatars{overflow:auto;display:block;max-height:190px}#likes-other-gravatars ul.wpl-avatars li{width:32px;height:32px;float:right;margin:0 0 5px 5px}#likes-other-gravatars ul.wpl-avatars li a{margin:0 0 0 2px;border-bottom:none!important;display:block}#likes-other-gravatars ul.wpl-avatars li a img{background:0 0;border:none;margin:0!important;padding:0!important;position:static}div.sd-box{border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.13)}.comment-likes-widget,.entry-content .post-likes-widget,.post-likes-widget{margin:0;border-width:0;display:block}.post-likes-widget-placeholder{margin:0;border-width:0;position:relative}.post-likes-widget-placeholder .button{display:none}.post-likes-widget-placeholder .loading{color:#999;font-size:12px}.slim-likes-widget .post-likes-widget{width:auto;float:none}div.sharedaddy.sd-like-enabled .sd-like h3{display:none}div.sharedaddy.sd-like-enabled .sd-like .post-likes-wid |
3675 |
get{width:100%;float:none;position:absolute;top:0}.comment-likes-widget{width:100%}.pd-rating{display:block!important}.sd-gplus .sd-title{display:none}#jp-relatedposts{display:none;padding-top:1em;margin:1em 0;position:relative;clear:both}.jp-relatedposts:after{content:'';display:block;clear:both}#jp-relatedposts h3.jp-relatedposts-headline{margin:0 0 1em;display:inline-block;float:right;font-size:9pt;font-weight:700;font-family:inherit}#jp-relatedposts h3.jp-relatedposts-headline em:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.2);margin-bottom:1em}#jp-relatedposts h3.jp-relatedposts-headline em{font-style:normal;font-weight:700}#jp-relatedposts .jp-relatedposts-items{clear:right}#jp-relatedposts .jp-relatedposts-items-visual{margin-left:-20px}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{float:right;width:33%;margin:0 0 1em;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:bord |
3676 |
er-box}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post{padding-left:20px;filter:alpha(opacity=80);-moz-opacity:.8;opacity:.8}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+4),#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+4){clear:both}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover{filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items p,#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:14px;line-height:20px;margin:0}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs{position:relative}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay{position:absolute;top:0;bottom:0;right:0;left:0;display:block;border |
3677 |
-bottom:0}#jp-relatedposts .jp-relatedposts-items p{margin-bottom:0}#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a{font-size:inherit;font-weight:400;text-decoration:none;filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span{display:block;max-width:90%;overflow:hidden;text-overflow:ellipsis}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post span{max-width:100%}#jp-relatedposts .jp-relatedposts-items |
3678 |
.jp-relatedposts-post .jp-relatedposts-post-context,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{opacity:.6}#jp-relatedposts .jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt,.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{display:none}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt{overflow:hidden}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs span{margin-bottom:1em}@media only screen and (max-width:640px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:50%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n){clear:right}#jp-relatedposts .jp-relatedposts-items-visual{margin-left:20px}}@media only screen and (max-width:320px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:100%;clear:both;margin:0 0 1em}}#jp-post-flair{pa |
3679 |
dding-top:.5em}#content div.sharedaddy,#main div.sharedaddy,div.sharedaddy{clear:both}div.sharedaddy h3.sd-title{margin:0 0 1em;display:inline-block;line-height:1.2;font-size:9pt;font-weight:700}div.sharedaddy h3.sd-title:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;margin-bottom:1em}body.highlander-light h3.sd-title:before{border-top:1px solid rgba(0,0,0,.2)}body.highlander-dark h3.sd-title:before{border-top:1px solid rgba(255,255,255,.4)}.sd-content ul{padding:0!important;margin:0 0 .7em!important;list-style:none!important}.sd-content ul li{display:inline-block}.sd-block.sd-gplus{margin:0 0 .5em}.sd-gplus .sd-content{font-size:12px}#sharing_email .sharing_send,.sd-content ul li .option a.share-ustom,.sd-content ul li a.sd-button,.sd-content ul li.advanced a.share-more,.sd-content ul li.preview-item div.option.option-smart-off a,.sd-social-icon .sd-content ul li a.sd-button,.sd-social-icon-text .sd-content ul li a.sd-button,.sd-social-official |
3680 |
.sd-content>ul>li .digg_button >a,.sd-social-official .sd-content>ul>li>a.sd-button,.sd-social-text .sd-content ul li a.sd-button{text-decoration:none!important;display:inline-block;font-size:12px;font-family:"Open Sans",sans-serif;font-weight:400;border-radius:3px;color:#777!important;background:#f8f8f8;border:1px solid #ccc;box-shadow:0 1px 0 rgba(0,0,0,.08);text-shadow:none;line-height:23px;padding:1px 5px 0 8px}.sd-content ul li .option a.share-ustom span,.sd-content ul li a.sd-button>span,.sd-content ul li.advanced a.share-more span,.sd-content ul li.preview-item div.option.option-smart-off a span,.sd-social-icon-text .sd-content ul li a.sd-button>span,.sd-social-official .sd-content>ul>li .digg_button >a span,.sd-social-official .sd-content>ul>li>a.sd-button span,.sd-social-text .sd-content ul li a.sd-button span{line-height:23px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a,.sd-social-official .sd-content .sharing-hidden .inner>ul>li>a.sd-button |
3681 |
,.sd-social-official .sd-content>ul>li .digg_button>a,.sd-social-official .sd-content>ul>li>a.sd-button{line-height:17px;box-shadow:none;vertical-align:top}.sd-social-official .sd-content ul li a.sd-button>span{line-height:17px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a:before,.sd-social-official .sd-content .sharing-hidden .inner>ul>li>a.sd-button:before,.sd-social-official .sd-content>ul>li .digg_button>a:before,.sd-social-official .sd-content>ul>li>a.sd-button:before{margin-bottom:-1px}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon .sd-content ul li a.sd-button:hover,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:hover,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li .digg_button>a:hover,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-official .sd-content>ul>li>a.sd-button:hover,.sd-social-text .s |
3682 |
d-content ul li a.sd-button:active,.sd-social-text .sd-content ul li a.sd-button:hover{color:#555;background:#fafafa;border:1px solid #999}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-text .sd-content ul li a.sd-button:active{box-shadow:inset 0 1px 0 rgba(0,0,0,.16)}.sd-content ul li a.sd-button:before{display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font:400 18px/1 social-logos;vertical-align:top;text-align:center}.sd-social-icon-text ul li a.sd-button:before{position:relative;top:2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-content ul li a.sd-button:before{position:relative;top:2px}}.sd-social-official ul li a.sd-button:before{position:relative;top:-2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social-official ul li a.s |
3683 |
d-button:before{top:0}}.sd-content ul li{margin:0 0 5px 5px;padding:0}.sd-content ul li.preview-item a.sd-button span,.sd-social-icon-text .sd-content ul li a span,.sd-social-official .sd-content ul li a.sd-button span{margin-right:3px}.sd-content ul li.preview-item.no-icon a.sd-button span{margin-right:0}.sd-content ul li.no-icon a:before,.sd-social-text .sd-content ul li a:before{display:none}body .sd-content ul li.share-custom.no-icon a span,body .sd-social-text .sd-content ul li.share-custom a span{background-image:none;background-position:-500px -500px!important;background-repeat:no-repeat!important;padding-right:0;height:0;line-height:inherit}.sd-social-icon .sd-content ul li a.share-more{position:relative;top:-4px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social-icon .sd-content ul li a.share-more{top:2px}}@-moz-document url-prefix(){.sd-social-icon .sd-content ul li a.share-more{top:2px}}.sd-social-icon .sd-content ul li a.share-more span{margin-right:3px}.sd- |
3684 |
content ul li.share-print div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-print a:before,.sd-social-icon-text .sd-content li.share-print a:before,.sd-social-official .sd-content li.share-print a:before,.sd-social-text .sd-content ul li.share-print a:before{content:'\f469'}.sd-content ul li.share-email div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-email a:before,.sd-social-icon-text .sd-content li.share-email a:before,.sd-social-official .sd-content li.share-email a:before,.sd-social-text .sd-content ul li.share-email a:before{content:'\f410'}.sd-content ul li.share-linkedin div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-linkedin a:before,.sd-social-icon-text .sd-content li.share-linkedin a:before,.sd-social-text .sd-content ul li.share-linkedin a:before{content:'\f207'}.sd-content ul li.share-twitter div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-twitter a:before,. |
3685 |
sd-social-icon-text .sd-content li.share-twitter a:before,.sd-social-text .sd-content ul li.share-twitter a:before{content:'\f202'}.sd-content ul li.share-reddit div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-reddit a:before,.sd-social-icon-text .sd-content li.share-reddit a:before,.sd-social-text .sd-content ul li.share-reddit a:before{content:'\f222'}.sd-content ul li.share-tumblr div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-tumblr a:before,.sd-social-icon-text .sd-content li.share-tumblr a:before,.sd-social-text .sd-content ul li.share-tumblr a:before{content:'\f607'}.sd-content ul li.share-pocket div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-pocket a:before,.sd-social-icon-text .sd-content li.share-pocket a:before,.sd-social-text .sd-content ul li.share-pocket a:before{content:'\f224'}.sd-content ul li.share-pinterest div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li |
3686 |
.share-pinterest a:before,.sd-social-icon-text .sd-content li.share-pinterest a:before,.sd-social-text .sd-content ul li.share-pinterest a:before{content:'\f210'}.sd-content ul li.share-google-plus-1 div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-google-plus-1 a:before,.sd-social-icon-text .sd-content li.share-google-plus-1 a:before,.sd-social-text .sd-content ul li.share-google-plus-1 a:before{content:'\f218'}.sd-content ul li.share-facebook div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-facebook a:before,.sd-social-icon-text .sd-content li.share-facebook a:before,.sd-social-text .sd-content ul li.share-facebook a:before{content:'\f203'}.sd-content ul li.share-press-this div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-press-this a:before,.sd-social-icon-text .sd-content li.share-press-this a:before,.sd-social-official .sd-content li.share-press-this a:before,.sd-social-text .sd-content ul li.sh |
3687 |
are-press-this a:before{content:'\f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.sd-content ul li.share-telegram div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-telegram a:before,.sd-social-icon-text .sd-content li.share-telegram a:before,.sd-social-official .sd-content li.share-telegram a:before,.sd-social-text .sd-content ul li.share-telegram a:before{content:'\f606'}.sd-social-official .sd-content li.share-telegram a:before{color:#08c}.sd-content ul li.share-skype div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-skype a:before,.sd-social-icon-text .sd-content li.share-skype a:before,.sd-social-text .sd-content ul li.share-skype a:before{content:'\f220'}.sd-content ul li.advanced a.share-more:before,.sd-social-icon .sd-content ul a.share-more:before,.sd-social-icon-text .sd-content a.share-more:before,.sd-social-official .sd-content a.share-more:before,.sd-social-text .sd-content ul a.share |
3688 |
-more:before{content:'\f415'}.sd-social-official .sd-content a.share-more:before{color:#2ba1cb}.sd-content ul li.share-jetpack-whatsapp div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-jetpack-whatsapp a:before,.sd-social-icon-text .sd-content li.share-jetpack-whatsapp a:before,.sd-social-official .sd-content li.share-jetpack-whatsapp a:before,.sd-social-text .sd-content ul li.share-jetpack-whatsapp a:before{content:'\f608'}.sd-social-official .sd-content li.share-jetpack-whatsapp a:before{color:#43d854}.sd-social-icon .sd-content ul li[class*=share-].share-jetpack-whatsapp a.sd-button{background:#43d854;color:#fff!important}.sd-social .sd-button .share-count{background:#2ea2cc;color:#fff;border-radius:10px;display:inline-block;text-align:center;font-size:10px;padding:1px 3px;line-height:1}.sd-social-official .sd-content ul,.sd-social-official .sd-content ul li{line-height:25px!important}.sd-social-official .sd-content>ul>li>a.sd-button span{line-height:1 |
3689 |
}.sd-social-official .sd-content ul:after{content:".";display:block;height:0;clear:both;visibility:hidden}.sd-social-official .sd-content li.share-press-this a{margin:0 0 5px}.sd-social-official .sd-content ul>li{display:block;float:right;margin:0 0 5px 10px!important;height:25px}.sd-social-official .fb-share-button>span{vertical-align:top!important}.sd-social-official .sd-content .pocket_button iframe{width:98px}.googleplus1_button .g-plus{vertical-align:top!important}.reddit_button iframe{margin-top:1px}.googleplus1_button iframe,.linkedin_button>span,.pinterest_button,.pocket_button iframe,.twitter_button{margin:0!important}.sd-social-official .sd-content .share-skype{width:55px}body .sd-social-official li a.share-more,body .sd-social-official li.share-custom a,body .sd-social-official li.share-digg a,body .sd-social-official li.share-email a,body .sd-social-official li.share-press-this a,body .sd-social-official li.share-print{position:relative;top:0}body .sd-social-icon .sd-con |
3690 |
tent li.share-custom>a{padding:2px 3px 0;position:relative;top:4px}body .sd-content ul li.share-custom a.share-icon span,body .sd-social-icon .sd-content li.share-custom a span,body .sd-social-icon-text .sd-content li.share-custom a span,body .sd-social-official .sd-content li.share-custom a span,body .sd-social-text .sd-content li.share-custom a span{background-size:16px 16px;background-repeat:no-repeat;margin-right:0;padding:0 19px 0 0;display:inline-block;height:16px;line-height:16px}body .sd-social-icon .sd-content li.share-custom a span{width:0;padding-right:16px!important}.sharing-hidden .inner{position:absolute;z-index:2;border:1px solid #ccc;padding:10px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);border-radius:2px;margin-top:5px;max-width:400px}.sharing-hidden .inner ul{margin:0!important}.sd-social-official .sd-content .sharing-hidden ul>li.share-end{clear:both;margin:0!important;height:0!important}.sharing-hidden .inner:after,.sharing-hidden .inner:before{positio |
3691 |
n:absolute;z-index:1;top:-8px;right:20px;width:0;height:0;border-right:6px solid transparent;border-left:6px solid transparent;border-bottom:8px solid #ccc;content:"";display:block}.sharing-hidden .inner:after{z-index:2;top:-7px;border-right:6px solid transparent;border-left:6px solid transparent;border-bottom:8px solid #fff}.sharing-hidden ul{margin:0}.sd-social-icon .sd-content ul li[class*=share-] a,.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a{border-radius:50%;-webkit-border-radius:50%;border:0;box-shadow:none;padding:7px;position:relative;top:-2px;line-height:1;width:auto;height:auto;margin-bottom:0}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button>span,.sd-social-icon .sd-content ul li[class*=share-] div.option a span{line-height:1}.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a:hover{border:none;opacity:.6}.sd-social-icon |
3692 |
.sd-content ul li[class*=share-] a.sd-button:before{top:1px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button.share-custom{padding:8px 8px 6px;top:5px}.sd-social-icon .sd-content ul li a.sd-button.share-more{margin-right:10px}.sd-social-icon .sd-content ul li:first-child a.sd-button.share-more{margin-right:0}.sd-social-icon .sd-button span.share-count{position:absolute;bottom:0;left:0;border-radius:0;background:#555;font-size:9px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button{background:#e9e9e9;margin-top:2px;text-indent:0}.sd-social-icon .sd-content ul li[class*=share-].share-tumblr a.sd-button{background:#2c4762;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-facebook a.sd-button{background:#3b5998;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-twitter a.sd-button{background:#00acee;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pinterest a.sd-button{background:#ca1f27;co |
3693 |
lor:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-digg a.sd-button{color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-press-this a.sd-button{background:#1e8cbe;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-telegram a.sd-button{background:#08c;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-linkedin a.sd-button{background:#0077b5;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-google-plus-1 a.sd-button{background:#dd4b39;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pocket a.sd-button{background:#ee4056;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-reddit a.sd-button{background:#cee3f8;color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-skype a.sd-button{background:#00AFF0;color:#fff!important}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!imp |
3694 |
ortant;height:1px;width:1px;overflow:hidden}.sharing-screen-reader-text:active,.sharing-screen-reader-text:focus,.sharing-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#sharing_email{width:342px;position:absolute;z-index:1001;border:1px solid #ccc;padding:15px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);text-align:right}div.sharedaddy.sharedaddy-dark #sharing_email{border-color:#fff}#sharing_email .errors{color:#fff;background-color:#771a09;font-size:12px;padding:5px 8px;line-height:1;margin:10px 0 0}#sharing_email label{font-size:12px;color:#333;font-weight:700;display:block;padding:0 0 4px;text-align:right;text-shadow:none}#sharing_email form{margin:0}#sharing_email input[type=email],#sharing_email input[type=text]{wid |
3695 |
th:100%;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;border:1px solid #ccc;margin-bottom:1em;background:#fff;font-size:12px;color:#333;max-width:none;padding:1px 3px}#jetpack-source_f_name{display:none!important;position:absolute!important;right:-9000px}#sharing_email .sharing_cancel{padding:0 1em 0 0;font-size:12px;text-shadow:none}#sharing_email .recaptcha{width:312px;height:123px;margin:0 0 1em}.slideshow-window{background-color:#222;border:20px solid #222;border-radius:10px;height:0;margin-bottom:20px;overflow:hidden;padding-top:30px!important;padding-bottom:56.25%!important;position:relative;z-index:1}.slideshow-window.slideshow-white{background-color:#fff;border-color:#fff}.slideshow-window,.slideshow-window *{-moz-box-sizing:content-box;box-sizing:content-box}.slideshow-loading{height:100%;text-align:center;margin:auto}body div.slideshow-window * img{background-color:transparent!important;background-image:none!important;border-width:0!importa |
3696 |
nt;display:block;margin:0 auto;max-width:100%;max-height:100%;padding:0!important;position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.slideshow-loading img{vertical-align:middle}.slideshow-slide{display:none;height:100%!important;right:0;margin:auto;position:absolute;text-align:center;top:0;width:100%!important}.slideshow-slide img{vertical-align:middle}.slideshow-line-height-hack{overflow:hidden;width:0;font-size:0}.slideshow-slide-caption{font-size:13px;font-family:"Helvetica Neue",sans-serif;color:#f7f7f7;text-shadow:#222 -1px 1px 2px;line-height:25px;height:25px;position:absolute;bottom:5px;right:0;z-index:100;width:100%;text-align:center}.slideshow-controls{z-index:1000;position:absolute;bottom:30px;margin:auto;text-align:center;width:100%;-ms-filter:"alpha(Opacity=50)";opacity:.5;direction:rtl;transition:300ms opacity ease-out}.slideshow-window:hover .slideshow-controls{-ms-filter:"alpha(Opacity=100)";opacity: |
3697 |
1}body div div.slideshow-controls a,body div div.slideshow-controls a:hover{border:2px solid rgba(255,255,255,.1)!important;background-color:#000!important;background-color:rgba(0,0,0,.6)!important;background-image:url(../modules/shortcodes/img/slideshow-controls.png)!important;background-repeat:no-repeat;background-size:142px 16px!important;background-position:-34px 8px!important;color:#222!important;margin:0 5px!important;padding:0!important;display:inline-block!important;zoom:1;height:32px!important;width:32px!important;line-height:32px!important;text-align:center!important;-khtml-border-radius:10em!important;border-radius:10em!important;transition:300ms border-color ease-out}@media only screen and (-webkit-min-device-pixel-ratio:1.5){body div div.slideshow-controls a,body div div.slideshow-controls a:hover{background-image:url(../modules/shortcodes/img/slideshow-controls-2x.png)!important}}body div div.slideshow-controls a:hover{border-color:rgba(255,255,255,1)!important}body di |
3698 |
v div.slideshow-controls a:first-child{background-position:-76px 8px!important}body div div.slideshow-controls a:last-child{background-position:-117px 8px!important}body div div.slideshow-controls a.running,body div div.slideshow-controls a:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.paused{background-position:9px 8px!important}.slideshow-controls a img{border:50px dotted #f0f}body.presentation-wrapper-fullscreen-parent,html.presentation-wrapper-fullscreen-parent{overflow:hidden!important}.presentation-wrapper-fullscreen-parent #wpadminbar{display:none}.presentation-wrapper-fullscreen,.presentation-wrapper-fullscreen-parent{min-width:100%!important;min-height:100%!important;position:absolute!important;top:0!important;left:0!important;bottom:0!important;right:0!important;margin:0!important;padding:0!important;z-index:10000!important}.presentation-wrapper-fullscreen{background-color:gray;border:none!important}.presentation-wrapper-fullscreen |
3699 |
.nav-arrow-left,.presentation-wrapper-fullscreen .nav-arrow-right{z-index:20001}.presentation-wrapper-fullscreen .nav-fullscreen-button{z-index:20002}.presentation-wrapper{margin:20px auto;border:1px solid #e5e5e5;overflow:hidden;line-height:normal}.presentation{position:relative;margin:0;overflow:hidden;outline:0}.presentation,.presentation .step{background-repeat:no-repeat;background-position:center;background-size:100% 100%}.presentation .step.fade:not(.active){opacity:0}.presentation .slide-content{padding:30px}.presentation .nav-arrow-left,.presentation .nav-arrow-right,.presentation .nav-fullscreen-button{position:absolute;width:34px;background-repeat:no-repeat;z-index:2;opacity:0;transition:opacity .25s}.presentation .nav-arrow-left,.presentation .nav-arrow-right{height:100%;background-image:url(../modules/shortcodes/images/slide-nav.png);background-size:450% 61px}.presentation .nav-arrow-left{right:0;background-position:4px 50%}.presentation .nav-arrow-right{left:0;backgroun |
3700 |
d-position:-120px 50%}.presentation .nav-fullscreen-button{width:32px;height:32px;margin:4px;bottom:0;left:0;z-index:3;background-image:url(../modules/shortcodes/images/expand.png);background-size:100% 100%}.presentation:hover .nav-arrow-left,.presentation:hover .nav-arrow-right{opacity:1}.presentation:hover .nav-fullscreen-button{opacity:.8}.presentation-wrapper-fullscreen .nav-fullscreen-button{background-image:url(../modules/shortcodes/images/collapse.png)}.presentation .autoplay-overlay{height:15%;width:80%;margin:30% 10%;position:relative;z-index:100;display:table;border-radius:50px;background-color:#e5e5e5;background-color:rgba(0,0,0,.75);transition:opacity .5s}.presentation .autoplay-overlay .overlay-msg{position:relative;display:table-cell;text-align:center;vertical-align:middle;color:#fff}.presentation .will-fade{opacity:0}.presentation .do-fade{opacity:1;transition:opacity .5s}#subscribe-email input{width:95%}.comment-subscription-form .subscribe-label{display:inline!impor |
3701 |
tant}.jetpack-video-wrapper{margin-bottom:1.6em}.jetpack-video-wrapper>.wp-video,.jetpack-video-wrapper>embed,.jetpack-video-wrapper>iframe,.jetpack-video-wrapper>object{margin-bottom:0}.jetpack-social-navigation ul{display:block;margin:0 0 1.5em;padding:0}.jetpack-social-navigation li{display:inline-block;margin:0;line-height:1}.jetpack-social-navigation a{border:0;height:1em;text-decoration:none;width:1em}.jetpack-social-navigation a:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:Genericons;font-size:1em;font-style:normal;font-weight:400;height:1em;line-height:1;speak:none;text-decoration:inherit;vertical-align:top;width:1em;content:"\f415"}.jetpack-social-navigation a[href*="codepen.io"]:before{content:"\f216"}.jetpack-social-navigation a[href*="digg.com"]:before{content:"\f221"}.jetpack-social-navigation a[href*="dribbble.com"]:before{content:"\f201"}.jetpack-social-navigation a[href*="dropbox.com"]:before{content:"\f |
3702 |
225"}.jetpack-social-navigation a[href*="mailto:"]:before{content:"\f410"}.jetpack-social-navigation a[href*="facebook.com"]:before{content:"\f203"}.jetpack-social-navigation a[href*="flickr.com"]:before{content:"\f211"}.jetpack-social-navigation a[href*="foursquare.com"]:before{content:"\f226"}.jetpack-social-navigation a[href*="github.com"]:before{content:"\f200"}.jetpack-social-navigation a[href*="plus.google.com"]:before{content:"\f206"}.jetpack-social-navigation a[href*="instagram.com"]:before{content:"\f215"}.jetpack-social-navigation a[href*="linkedin.com"]:before{content:"\f208"}.jetpack-social-navigation a[href*="path.com"]:before{content:"\f219"}.jetpack-social-navigation a[href*="pinterest.com"]:before{content:"\f210"}.jetpack-social-navigation a[href*="getpocket.com"]:before{content:"\f224"}.jetpack-social-navigation a[href*="polldaddy.com"]:before{content:"\f217"}.jetpack-social-navigation a[href*="reddit.com"]:before{content:"\f222"}.jetpack-social-navigation a[href$=" |
3703 |
/feed/"]:before{content:"\f413"}.jetpack-social-navigation a[href*="skype:"]:before{content:"\f220"}.jetpack-social-navigation a[href*="spotify.com"]:before{content:"\f515"}.jetpack-social-navigation a[href*="stumbleupon.com"]:before{content:"\f223"}.jetpack-social-navigation a[href*="tumblr.com"]:before{content:"\f214"}.jetpack-social-navigation a[href*="twitch.tv"]:before{content:"\f516"}.jetpack-social-navigation a[href*="twitter.com"]:before{content:"\f202"}.jetpack-social-navigation a[href*="vimeo.com"]:before{content:"\f212"}.jetpack-social-navigation a[href*="vine.co"]:before{content:"\f517"}.jetpack-social-navigation a[href*="wordpress.com"]:before,.jetpack-social-navigation a[href*="wordpress.org"]:before{content:"\f205"}.jetpack-social-navigation a[href*="youtube.com"]:before{content:"\f213"}.tiled-gallery{clear:both;margin:0 0 20px;overflow:hidden}.tiled-gallery img{margin:2px!important}.tiled-gallery .gallery-group{float:right;position:relative}.tiled-gallery .tiled-gall |
3704 |
ery-item{float:right;margin:0;position:relative;width:inherit}.tiled-gallery .gallery-row{overflow:hidden}.tiled-gallery .tiled-gallery-item a{background:0 0;border:none;color:inherit;margin:0;padding:0;text-decoration:none;width:auto}.tiled-gallery .tiled-gallery-item img,.tiled-gallery .tiled-gallery-item img:hover{background:0 0;border:none;box-shadow:none;max-width:100%;padding:0;vertical-align:middle}.tiled-gallery-caption{background:#eee;background:rgba(255,255,255,.8);color:#333;font-size:13px;font-weight:400;overflow:hidden;padding:10px 0;position:absolute;bottom:0;text-indent:10px;text-overflow:ellipsis;width:100%;white-space:nowrap}.tiled-gallery .tiled-gallery-item-small .tiled-gallery-caption{font-size:11px}.widget-gallery .tiled-gallery-unresized{visibility:hidden;height:0;overflow:hidden}.tiled-gallery .tiled-gallery-item img.grayscale{position:absolute;right:0;top:0}.tiled-gallery .tiled-gallery-item img.grayscale:hover{opacity:0}.tiled-gallery.type-circle .tiled-gall |
3705 |
ery-item img{border-radius:50%!important}.tiled-gallery.type-circle .tiled-gallery-caption{display:none;opacity:0}.jetpack-display-remote-posts{margin:5px 0 20px}.jetpack-display-remote-posts h4{font-size:90%;margin:5px 0;padding:0}.jetpack-display-remote-posts h4 a{text-decoration:none}.jetpack-display-remote-posts p{margin:0!important;padding:0;line-height:1.4em!important;font-size:90%}.jetpack-display-remote-posts img{max-width:100%}.widget-grofile h4{margin:1em 0 .5em}.widget-grofile ul.grofile-urls{margin-right:0;overflow:hidden}.widget-grofile ul.grofile-accounts li{list-style:none;display:inline}.widget-grofile ul.grofile-accounts li::before{content:""!important}.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite.png);background-repeat:no-repeat;width:16px;height:16px;float:right;margin-left:8px;margin-bottom:8px}.rtl .widget-grofile .grofile-accounts-logo{margin-right:8px;margin-left:0}.grofile-thumbnail{width:500px;max-width |
3706 |
:100%}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite-2x.png);background-size:16px 784px}}div[class^=gr_custom_container]{border:1px solid gray;border-radius:10px;padding:10px 5px;background-color:#FFF;color:#000}div[class^=gr_custom_container] a{color:#000}h2[class^=gr_custom_header]{display:none}div[class^=gr_custom_each_container]{width:100%;clear:both;margin-bottom:10px;overflow:auto;padding-bottom:4px;border-bottom:1px solid #aaa}div[class^=gr_custom_book_container]{float:left;overflow:hidden;height:60px;margin-right:4px;width:39px}div[class^=gr_custom_author]{font-size:10px}div[class^=gr_custom_tags]{font-size:10px;color:gray}div[class^=gr_custom_rating]{display:none}.widget_wpcom_social_media_icons_widget ul{list-style-type |
3707 |
:none;margin-right:0}.widget_wpcom_social_media_icons_widget li{border:0;display:inline;margin-left:.5em}.widget_wpcom_social_media_icons_widget li a{border:0;text-decoration:none}.widget_wpcom_social_media_icons_widget .genericon{font-family:Genericons}.widget_wpcom_social_media_icons_widget .screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hidden}.widget_wpcom_social_media_icons_widget .screen-reader-text:active,.widget_wpcom_social_media_icons_widget .screen-reader-text:focus,.widget_wpcom_social_media_icons_widget .screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-size:.875rem;font-weight:700;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.widgets-grid-layout{width:100%}.widgets-grid-layout:after,.widgets-grid-layout:before{content: |
3708 |
" ";display:table}.widgets-grid-layout:after{clear:both}.widget-grid-view-image{float:right;max-width:50%}.widget-grid-view-image a{display:block;margin:0 0 4px 2px}.widget-grid-view-image:nth-child(even){float:left}.widget-grid-view-image:nth-child(even) a{margin:0 2px 4px 0}.widgets-grid-layout .widget-grid-view-image img{max-width:100%;height:auto}.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:0 0;clear:none;float:right;margin:0 0 -3px -5px;padding:0 0 6px 8px;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:0 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widgets-list-layout{padding:0;margin:0;list-style-type:none}.widgets-list-layout li:after,.widgets-list-layout li:before{content:"";display:table}.widgets-list-layout li:after{clear:both}.widgets-list-layout li{zoom:1;margin-bottom:1em;list-style-type:none!important} |
3709 |
.widgets-list-layout .widgets-list-layout-blavatar{float:right;width:21.276596%;max-width:40px;height:auto}.widgets-list-layout-links{float:left;width:73.404255%}.widgets-list-layout span{opacity:.5}.widgets-list-layout span:hover{opacity:.8} |
3710 |
\ No newline at end of file |
3711 |
|
3712 |
diff --git a/plugins/jetpack/css/jetpack.css b/plugins/jetpack/css/jetpack.css |
3713 |
index 449a42c..41bd073 100644 |
3714 |
--- a/plugins/jetpack/css/jetpack.css |
3715 |
+++ b/plugins/jetpack/css/jetpack.css |
3716 |
@@ -1,4 +1,4 @@ |
3717 |
/*! |
3718 |
* Do not modify this file directly. It is concatenated from individual module CSS files. |
3719 |
*/ |
3720 |
-.jp-carousel-wrap *{line-height:inherit}.jp-carousel-overlay{background:#000}div.jp-carousel-fadeaway{position:fixed;bottom:0;z-index:2147483647;width:100%;height:15px}.jp-carousel-next-button span,.jp-carousel-previous-button span{background:url(../modules/carousel/images/arrows.png) center center/200px 126px no-repeat}.jp-carousel-msg{font-family:"Open Sans",sans-serif;font-style:normal;display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:center;margin:25px 20px 0 2px;background-color:#fff;border-left:4px solid #ffba00;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.jp-carousel-next-button span,.jp-carousel-previous-button span{background-image:url(../modules/carousel/images/arrows-2x.png)}}.jp-carousel-wrap{font-family:"Helvetica Neue",sans-serif!important}.jp- |
3721 |
carousel-info{position:absolute;bottom:0;text-align:left!important;-webkit-font-smoothing:subpixel-antialiased!important}.jp-carousel-info ::selection{background:#68c9e8;color:#fff}.jp-carousel-info ::-moz-selection{background:#68c9e8;color:#fff}.jp-carousel-photo-info{position:relative;left:25%;width:50%}.jp-carousel-transitions .jp-carousel-photo-info{transition:400ms ease-out}.jp-carousel-info h2{background:none!important;border:none!important;color:#999;display:block!important;font:400 13px/1.25em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;margin:7px 0 0!important;padding:10px 0 0!important;overflow:hidden;text-align:left;text-shadow:none!important;text-transform:none!important;-webkit-font-smoothing:subpixel-antialiased}.jp-carousel-next-button,.jp-carousel-previous-button{text-indent:-9999px;overflow:hidden;cursor:pointer}.jp-carousel-next-button span,.jp-carousel-previous-button span{position:absolute;top:0;bottom:0;width:82px;zoom:1;filter:alpha(opacity |
3722 |
=20);opacity:.2}.jp-carousel-transitions .jp-carousel-next-button span,.jp-carousel-transitions .jp-carousel-previous-button span{transition:500ms opacity ease-out}.jp-carousel-next-button:hover span,.jp-carousel-previous-button:hover span{filter:alpha(opacity=60);opacity:.6}.jp-carousel-next-button span{background-position:-110px center;right:0}.jp-carousel-previous-button span{background-position:-10px center;left:0}.jp-carousel-buttons{margin:-18px -20px 15px;padding:8px 10px;border-bottom:1px solid #222;background:#222;text-align:center}div.jp-carousel-buttons a{border:none!important;color:#999;font:400 11px/1.2em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;padding:5px 2px 5px 0;text-decoration:none!important;text-shadow:none!important;vertical-align:middle;-webkit-font-smoothing:subpixel-antialiased}div.jp-carousel-buttons a:hover{color:#68c9e8;border:none!important}.jp-carousel-transitions div.jp-carousel-buttons a:hover{transition:none!important}.jp-carou |
3723 |
sel-next-button,.jp-carousel-previous-button,.jp-carousel-slide,.jp-carousel-slide img{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.jp-carousel-slide{position:fixed;width:0;bottom:0;background-color:#000;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}.jp-carousel-slide.selected{position:absolute!important;filter:alpha(opacity=100);opacity:1}.jp-carousel-slide{filter:alpha(opacity=25);opacity:.25}.jp-carousel-slide img{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;background:none!important;border:none!important;padding:0!important;box-shadow:0 2px 8px rgba(0,0,0,.1);zoom:1}.jp-carousel-transitions .jp-carousel-slide{transition:opacity 400ms linear}.jp-carousel-close-hint{color:#999;cursor:default;letter-spacing:0!important;padding:.35em 0 0;position:absolute;text-align:l |
3724 |
eft;width:90%}.jp-carousel-transitions .jp-carousel-close-hint{transition:color 200ms linear}.jp-carousel-close-hint span{cursor:pointer;background-color:#000;background-color:rgba(0,0,0,.8);display:block;height:22px;font:400 24px/1 "Helvetica Neue",sans-serif!important;line-height:22px;margin:0 0 0 .4em;text-align:center;vertical-align:middle;width:22px;border-radius:4px}.jp-carousel-transitions .jp-carousel-close-hint span{transition:border-color 200ms linear}.jp-carousel-close-hint:hover{cursor:default;color:#fff}.jp-carousel-close-hint:hover span{border-color:#fff}a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background:url(../modules/carousel/images/carousel-sprite.png?5) 0 0/16px 200px no-repeat}div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{margin:0 14px 0 0!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;paddi |
3725 |
ng-right:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;margin:0 2px 0 -12px!important}div.jp-carousel-buttons a.jp-carousel-reblog,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{background-position:6px -36px;padding-right:auto!important;padding-left:26px!important;color:#999}div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -156px;padding-left:19px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{cursor:default}div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:6px -56px;color:#68c9e8}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../ |
3726 |
modules/carousel/images/carousel-sprite-2x.png?5)}}div#carousel-reblog-box{background:#222;padding:3px 0 0;display:none;margin:5px auto 0;border-radius:2px;box-shadow:0 0 20px rgba(0,0,0,.9);height:74px;width:565px}#carousel-reblog-box textarea{background:#999;font:13px/1.4 "Helvetica Neue",sans-serif!important;color:#444;padding:3px 6px;width:370px;height:48px;float:left;margin:6px 9px 0;border:1px solid #666;box-shadow:inset 2px 2px 2px rgba(0,0,0,.2);border-radius:2px}#carousel-reblog-box textarea:focus{background:#ccc;color:#222}#carousel-reblog-box label{color:#aaa;font-size:11px;padding-right:2px;padding-left:2px;display:inline;font-weight:400}#carousel-reblog-box select{width:110px;padding:0;font-size:12px;font-family:"Helvetica Neue",sans-serif!important;background:#333;color:#eee;border:1px solid #444;margin-top:5px}#carousel-reblog-box .submit,#wrapper #carousel-reblog-box p.response{float:left;width:154px;padding-top:0;padding-left:1px;overflow:hidden;height:34px;margin:3 |
3727 |
px 0 0 2px!important}#wrapper #carousel-reblog-box p.response{font-size:13px;clear:none;padding-left:2px;height:34px;color:#aaa}#carousel-reblog-box input#carousel-reblog-submit,#jp-carousel-comment-form-button-submit{font:13px/24px "Helvetica Neue",sans-serif!important;margin-top:8px;padding:0 10px!important;border-radius:1em;height:24px;color:#333;cursor:pointer;font-weight:400;background:#aaa;border:1px solid #444}#carousel-reblog-box input#carousel-reblog-submit:hover,#jp-carousel-comment-form-button-submit:hover{background:#ccc}#carousel-reblog-box .canceltext{color:#aaa;font-size:11px;line-height:24px}#carousel-reblog-box .canceltext a{color:#fff}.jp-carousel-titleanddesc{border-top:1px solid #222;color:#999;font-size:15px;padding-top:24px;margin-bottom:20px;font-weight:400}.jp-carousel-titleanddesc-title{font:300 1.5em/1.1 "Helvetica Neue",sans-serif!important;text-transform:none!important;color:#fff;margin:0 0 15px;padding:0}.jp-carousel-titleanddesc-desc p{color:#999;line-h |
3728 |
eight:1.4;margin-bottom:.75em}.jp-carousel-comments p a,.jp-carousel-info h2 a,.jp-carousel-titleanddesc p a{color:#fff!important;border:none!important;text-decoration:underline!important;font-weight:400!important;font-style:normal!important}.jp-carousel-titleanddesc p b,.jp-carousel-titleanddesc p strong{font-weight:700;color:#999}.jp-carousel-titleanddesc p em,.jp-carousel-titleanddesc p i{font-style:italic;color:#999}.jp-carousel-comments p a:hover,.jp-carousel-info h2 a:hover,.jp-carousel-titleanddesc p a:hover{color:#68c9e8!important}.jp-carousel-titleanddesc p:empty{display:none}.jp-carousel-left-column-wrapper h1:after,.jp-carousel-left-column-wrapper h1:before,.jp-carousel-photo-info h1:after,.jp-carousel-photo-info h1:before{content:none!important}.jp-carousel-image-meta{background:#111;border:1px solid #222;color:#fff;font:12px/1.4 "Helvetica Neue",sans-serif!important;overflow:hidden;padding:18px 20px;width:209px!important}.jp-carousel-image-meta h5,.jp-carousel-image-met |
3729 |
a li{font-family:"Helvetica Neue",sans-serif!important;position:inherit!important;top:auto!important;right:auto!important;left:auto!important;bottom:auto!important;background:none!important;border:none!important;font-weight:400!important;line-height:1.3em!important}.jp-carousel-image-meta ul{margin:0!important;padding:0!important;list-style:none!important}.jp-carousel-image-meta li{width:48%!important;float:left!important;margin:0 2% 15px 0!important;color:#fff!important;font-size:13px!important}.jp-carousel-image-meta h5{color:#999!important;text-transform:uppercase!important;font-size:10px!important;margin:0 0 2px!important;letter-spacing:.1em!important}a.jp-carousel-image-download{padding-left:23px;display:inline-block;clear:both;color:#999;line-height:1;font-weight:400;font-size:13px;text-decoration:none;background-position:0 -82px}a.jp-carousel-image-download span.photo-size{font-size:11px;border-radius:1em;margin-left:2px;display:inline-block}a.jp-carousel-image-download span. |
3730 |
photo-size-times{padding:0 1px 0 2px}a.jp-carousel-image-download:hover{background-position:0 -122px;color:#68c9e8;border:none!important}.jp-carousel-image-map{position:relative;margin:-20px -20px 20px;border-bottom:1px solid rgba(255,255,255,.17);height:154px}.jp-carousel-image-map img.gmap-main{border-top-left-radius:6px;border-right:1px solid rgba(255,255,255,.17)}.jp-carousel-image-map div.gmap-topright{width:94px;height:154px;position:absolute;top:0;right:0}.jp-carousel-image-map div.imgclip{overflow:hidden;border-top-right-radius:6px}.jp-carousel-image-map div.gmap-topright img{margin-left:-40px}.jp-carousel-image-map img.gmap-bottomright{position:absolute;top:96px;right:0}.jp-carousel-comments{font:15px/1.7 "Helvetica Neue",sans-serif!important;font-weight:400;background:none}.jp-carousel-comments p a:active,.jp-carousel-comments p a:focus,.jp-carousel-comments p a:hover{color:#68c9e8!important}.jp-carousel-comment{background:none;color:#999;margin-bottom:20px;clear:left;over |
3731 |
flow:auto;width:100%}.jp-carousel-comment p{color:#999!important}.jp-carousel-comment .comment-author{font-size:13px;font-weight:400;padding:0;width:auto;display:inline;float:none;border:none;margin:0}.jp-carousel-comment .comment-author a{color:#fff}.jp-carousel-comment .comment-gravatar{float:left}.jp-carousel-comment .comment-content{border:none;margin-left:85px;padding:0}.jp-carousel-comment .avatar{margin:0 20px 0 0;border-radius:4px;border:none!important;padding:0!important;background-color:transparent!important}.jp-carousel-comment .comment-date{color:#999;margin-top:4px;font-size:11px;display:inline;float:right}#jp-carousel-comment-form{margin:0 0 10px!important;float:left;width:100%}textarea#jp-carousel-comment-form-comment-field{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:15px/1.4 "Helvetica Neue",sans-serif!important;width:100%;padding:10px 10px 5px;margin:0;float:none;height:147px;box-shadow:inset 2px 2px 2px rgba(0,0,0,.2);border-radius:3px;ove |
3732 |
rflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}textarea#jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#555}textarea#jp-carousel-comment-form-comment-field:focus{background:#ccc;color:#222}textarea#jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#aaa}#jp-carousel-comment-form-spinner{color:#fff;margin:22px 0 0 10px;display:block;width:20px;height:20px;float:left}#jp-carousel-comment-form-submit-and-info-wrapper{display:none;overflow:hidden;width:100%}#jp-carousel-comment-form-commenting-as input{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:13px/1.4 "Helvetica Neue",sans-serif!important;padding:3px 6px;float:left;box-shadow:inset 2px 2px 2px rgba(0,0,0,.2);border-radius:2px;width:285px}#jp-carousel-comment-form-commenting-as input:focus{background:#ccc;color:#222}#jp-carousel-comment-form-commenting-as p{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:22px 0 0;float:left}#jp- |
3733 |
carousel-comment-form-commenting-as fieldset{float:left;border:none;margin:20px 0 0;padding:0;clear:both}#jp-carousel-comment-form-commenting-as label{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:0 20px 3px 0;float:left;width:100px}#jp-carousel-comment-form-button-submit{margin-top:20px;float:right}#jp-carousel-comment-form-container,#js-carousel-comment-form-container{margin-bottom:15px;overflow:auto;width:100%}#jp-carousel-comment-post-results{display:none;overflow:auto;width:100%}#jp-carousel-comment-post-results span{display:block;text-align:center;margin-top:20px;width:100%;overflow:auto;padding:1em 0;-moz-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.7);border-radius:2px;font:13px/1.4 "Helvetica Neue",sans-serif!important;border:1px solid rgba(255,255,255,.17);box-shadow:inset 0 0 5px 5px rgba(0,0,0,1)}.jp-carousel-comment-post-error{color:#DF4926}#jp-carousel-comments-closed{display:none;color:#999}#jp-carousel-comments-loading{font:400 |
3734 |
15px/1.7 "Helvetica Neue",sans-serif!important;display:none;color:#999;text-align:left;margin-bottom:20px}.jp-carousel-light .jp-carousel-overlay{background:#fff}.jp-carousel-light .jp-carousel-next-button:hover span,.jp-carousel-light .jp-carousel-previous-button:hover span{opacity:.8}.jp-carousel-light .jp-carousel-close-hint:hover,.jp-carousel-light .jp-carousel-titleanddesc div{color:#000!important}.jp-carousel-light .jp-carousel-comment .comment-author a,.jp-carousel-light .jp-carousel-comments p a,.jp-carousel-light .jp-carousel-info h2 a,.jp-carousel-light .jp-carousel-titleanddesc p a{color:#1e8cbe!important}.jp-carousel-light .jp-carousel-comment .comment-author a:hover,.jp-carousel-light .jp-carousel-comments p a:hover,.jp-carousel-light .jp-carousel-info h2 a:hover,.jp-carousel-light .jp-carousel-titleanddesc p a:hover{color:#f1831e!important}.jp-carousel-light .jp-carousel-comment,.jp-carousel-light .jp-carousel-comment p,.jp-carousel-light .jp-carousel-info h2,.jp-carou |
3735 |
sel-light .jp-carousel-titleanddesc,.jp-carousel-light .jp-carousel-titleanddesc p,.jp-carousel-light .jp-carousel-titleanddesc p b,.jp-carousel-light .jp-carousel-titleanddesc p em,.jp-carousel-light .jp-carousel-titleanddesc p i,.jp-carousel-light .jp-carousel-titleanddesc p strong,.jp-carousel-light div.jp-carousel-buttons a{color:#666}.jp-carousel-light .jp-carousel-buttons{border-bottom-color:#f0f0f0;background:#f5f5f5}.jp-carousel-light div.jp-carousel-buttons a:hover{text-decoration:none;color:#f1831e}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:4px -56px;padding-left:24px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#2ea2cc;color:#fff}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -176px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{backgroun |
3736 |
d-position:5px -36px}.jp-carousel-light div#carousel-reblog-box{background:#eee;box-shadow:0 2px 10px rgba(0,0,0,.1);border:1px solid #ddd}.jp-carousel-light #carousel-reblog-box textarea{color:#666;border:1px solid #cfcfcf;background:#fff}.jp-carousel-light #carousel-reblog-box .canceltext{color:#888}.jp-carousel-light #carousel-reblog-box .canceltext a{color:#666}.jp-carousel-light #carousel-reblog-box select{background:#eee;color:#333;border:1px solid #aaa}#jp-carousel-comment-form-button-submit,.jp-carousel-light #carousel-reblog-box input#carousel-reblog-submit{color:#333;background:#fff;border:1px solid #aaa}.jp-carousel-light .jp-carousel-image-meta{background:#fafafa;border:1px solid #eee;border-top-color:#f5f5f5;border-left-color:#f5f5f5;color:#333}.jp-carousel-light .jp-carousel-image-meta li{color:#000!important}.jp-carousel-light .jp-carousel-close-hint{color:#ccc}.jp-carousel-light .jp-carousel-close-hint span{background-color:#fff;border-color:#ccc}.jp-carousel-light # |
3737 |
jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#aaa}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus{color:#333}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#ddd}.jp-carousel-light a.jp-carousel-image-download{background-position:0 -122px}.jp-carousel-light a.jp-carousel-image-download:hover{background-position:0 -122px;color:#f1831e}.jp-carousel-light textarea#jp-carousel-comment-form-comment-field{background:#fbfbfb;color:#333;border:1px solid #dfdfdf;box-shadow:inset 2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input{background:#fbfbfb;border:1px solid #dfdfdf;color:#333;box-shadow:inset 2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input:focus{background:#fbfbfb;color:#333}.jp-carousel-light #jp-carousel-comment-post-results span{background:#f7f7f7;border:1px solid #dfdfdf;box-shadow:inset 0 0 5px rgba(0,0, |
3738 |
0,.05)}.jp-carousel-light .jp-carousel-slide{background-color:#fff}.jp-carousel-light .jp-carousel-titleanddesc{border-top:1px solid #eee}@media only screen and (max-width:760px){.jp-carousel-info{margin:0 10px!important}.jp-carousel-buttons,.jp-carousel-next-button,.jp-carousel-previous-button{display:none!important}.jp-carousel-image-meta{float:none!important;width:100%!important;-moz-box-sizing:border-box;box-sizing:border-box}.jp-carousel-close-hint{font-weight:800!important;font-size:26px!important;position:fixed!important;top:-10px}.jp-carousel-slide img{filter:alpha(opacity=100);opacity:1}.jp-carousel-wrap{background-color:#000}.jp-carousel-fadeaway{display:none}#jp-carousel-comment-form-container{display:none!important}.jp-carousel-titleanddesc{padding-top:0!important;border:none!important}.jp-carousel-titleanddesc-title{font-size:1em!important}.jp-carousel-left-column-wrapper{padding:0;width:100%!important}.jp-carousel-photo-info{left:0!important;width:100%!important}}.cont |
3739 |
act-form .clear-form{clear:both}.contact-form input[type=email],.contact-form input[type=text]{width:300px;max-width:98%;margin-bottom:13px}.contact-form select{margin-bottom:13px}.contact-form textarea{height:200px;width:80%;float:none;margin-bottom:13px}.contact-form input[type=checkbox],.contact-form input[type=radio]{float:none;margin-bottom:13px}.contact-form label{margin-bottom:3px;float:none;font-weight:700;display:block}.contact-form label.checkbox,.contact-form label.radio{margin-bottom:3px;float:none;font-weight:700;display:inline-block}.contact-form label span{color:#AAA;margin-left:4px;font-weight:400}.contact-form-submission{margin-bottom:4em;padding:1.5em 1em}.contact-form-submission p{margin:0 auto}.form-errors .form-error-message{color:red}.textwidget .contact-form input[type=email],.textwidget .contact-form input[type=text],.textwidget .contact-form textarea{width:250px;max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}#jetpack-check-feedback-spam{marg |
3740 |
in:1px 8px 0 0}.jetpack-check-feedback-spam-spinner{display:inline-block;margin-top:7px}.infinite-loader{color:#000;display:block;height:28px;text-indent:-9999px}#infinite-handle span{background:#333;border-radius:1px;color:#eee;cursor:pointer;font-size:13px;padding:6px 16px}#infinite-handle span button,#infinite-handle span button:focus,#infinite-handle span button:hover{display:inline;position:static;padding:0;margin:0;border:none;line-height:inherit;background:0 0;color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;font-family:inherit}#infinite-handle span button::-moz-focus-inner{margin:0;padding:0;border:none}@media (max-width:800px){#infinite-handle span:before{display:none}#infinite-handle span{display:block}}#infinite-footer{position:fixed;bottom:-50px;left:0;width:100%}#infinite-footer a{text-decoration:none}#infinite-footer .blog-credits a:hover,#infinite-footer .blog-info a:hover{color:#444;text-decoration:underline}#infinite-footer .container{background:rg |
3741 |
ba(255,255,255,.8);border-color:#ccc;border-color:rgba(0,0,0,.1);border-style:solid;border-width:1px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 auto;overflow:hidden;padding:1px 20px;width:780px}#infinite-footer .blog-credits,#infinite-footer .blog-info{-moz-box-sizing:border-box;box-sizing:border-box;line-height:25px}#infinite-footer .blog-info{float:left;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:40%}#infinite-footer .blog-credits{font-weight:400;float:right;width:60%}#infinite-footer .blog-info a{color:#111;font-size:14px;font-weight:700}#infinite-footer .blog-credits{color:#888;font-size:12px;text-align:right}#infinite-footer .blog-credits a{color:#666}.infinity-end.neverending #infinite-footer{display:none}@media (max-width:640px){#infinite-footer .container{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}#infinite-footer .blog-info{width:30%}#infinite-footer .blog-credits{width:70%}#infinite-footer .blog-credit |
3742 |
s,#infinite-footer .blog-info a{font-size:10px}}@media (max-width:640px){#infinite-footer{position:static}}#wpadminbar li#wp-admin-bar-admin-bar-likes-widget{width:61px;overflow:hidden}#wpadminbar iframe.admin-bar-likes-widget{width:61px;height:28px;min-height:28px;border-width:0;position:absolute;top:0}div.jetpack-likes-widget-wrapper{width:100%;min-height:50px;position:relative}div.jetpack-likes-widget-wrapper .sd-link-color{font-size:12px}div.jetpack-likes-widget-wrapper.slim-likes-widget{width:1px;min-height:0}#likes-other-gravatars{display:none;position:absolute;padding:10px 10px 12px;background-color:#2e4453;border-width:0;box-shadow:0 0 10px #2e4453;box-shadow:0 0 10px rgba(46,68,83,.6);min-width:130px;z-index:1000}#likes-other-gravatars *{line-height:normal}#likes-other-gravatars .likes-text{color:#fff;font-size:12px;padding-bottom:8px}#likes-other-gravatars li,#likes-other-gravatars ul{margin:0;padding:0;text-indent:0;list-style-type:none}#likes-other-gravatars li::before{c |
3743 |
ontent:""}#likes-other-gravatars ul.wpl-avatars{overflow:auto;display:block;max-height:190px}#likes-other-gravatars ul.wpl-avatars li{width:32px;height:32px;float:left;margin:0 5px 5px 0}#likes-other-gravatars ul.wpl-avatars li a{margin:0 2px 0 0;border-bottom:none!important;display:block}#likes-other-gravatars ul.wpl-avatars li a img{background:0 0;border:none;margin:0!important;padding:0!important;position:static}div.sd-box{border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.13)}.comment-likes-widget,.entry-content .post-likes-widget,.post-likes-widget{margin:0;border-width:0;display:block}.post-likes-widget-placeholder{margin:0;border-width:0;position:relative}.post-likes-widget-placeholder .button{display:none}.post-likes-widget-placeholder .loading{color:#999;font-size:12px}.slim-likes-widget .post-likes-widget{width:auto;float:none}div.sharedaddy.sd-like-enabled .sd-like h3{display:none}div.sharedaddy.sd-like-enabled .sd-like .post-likes-widget{width:100%;float:none;pos |
3744 |
ition:absolute;top:0}.comment-likes-widget{width:100%}.pd-rating{display:block!important}.sd-gplus .sd-title{display:none}#jp-relatedposts{display:none;padding-top:1em;margin:1em 0;position:relative;clear:both}.jp-relatedposts:after{content:'';display:block;clear:both}#jp-relatedposts h3.jp-relatedposts-headline{margin:0 0 1em;display:inline-block;float:left;font-size:9pt;font-weight:700;font-family:inherit}#jp-relatedposts h3.jp-relatedposts-headline em:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.2);margin-bottom:1em}#jp-relatedposts h3.jp-relatedposts-headline em{font-style:normal;font-weight:700}#jp-relatedposts .jp-relatedposts-items{clear:left}#jp-relatedposts .jp-relatedposts-items-visual{margin-right:-20px}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{float:left;width:33%;margin:0 0 1em;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}#jp-relatedposts .jp-rel |
3745 |
atedposts-items-visual .jp-relatedposts-post{padding-right:20px;filter:alpha(opacity=80);-moz-opacity:.8;opacity:.8}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+4),#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+4){clear:both}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover{filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items p,#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:14px;line-height:20px;margin:0}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs{position:relative}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay{position:absolute;top:0;bottom:0;left:0;right:0;display:block;border-bottom:0}#jp-relatedposts .jp |
3746 |
-relatedposts-items p{margin-bottom:0}#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a{font-size:inherit;font-weight:400;text-decoration:none;filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span{display:block;max-width:90%;overflow:hidden;text-overflow:ellipsis}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post span{max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-rela |
3747 |
tedposts-post-context,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{opacity:.6}#jp-relatedposts .jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt,.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{display:none}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt{overflow:hidden}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs span{margin-bottom:1em}@media only screen and (max-width:640px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:50%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n){clear:left}#jp-relatedposts .jp-relatedposts-items-visual{margin-right:20px}}@media only screen and (max-width:320px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:100%;clear:both;margin:0 0 1em}}#jp-post-flair{padding-top:.5em}#content div.sh |
3748 |
aredaddy,#main div.sharedaddy,div.sharedaddy{clear:both}div.sharedaddy h3.sd-title{margin:0 0 1em;display:inline-block;line-height:1.2;font-size:9pt;font-weight:700}div.sharedaddy h3.sd-title:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;margin-bottom:1em}body.highlander-light h3.sd-title:before{border-top:1px solid rgba(0,0,0,.2)}body.highlander-dark h3.sd-title:before{border-top:1px solid rgba(255,255,255,.4)}.sd-content ul{padding:0!important;margin:0 0 .7em!important;list-style:none!important}.sd-content ul li{display:inline-block}.sd-block.sd-gplus{margin:0 0 .5em}.sd-gplus .sd-content{font-size:12px}#sharing_email .sharing_send,.sd-content ul li .option a.share-ustom,.sd-content ul li a.sd-button,.sd-content ul li.advanced a.share-more,.sd-content ul li.preview-item div.option.option-smart-off a,.sd-social-icon .sd-content ul li a.sd-button,.sd-social-icon-text .sd-content ul li a.sd-button,.sd-social-official .sd-content>ul>li .digg_butto |
3749 |
n >a,.sd-social-official .sd-content>ul>li>a.sd-button,.sd-social-text .sd-content ul li a.sd-button{text-decoration:none!important;display:inline-block;margin:0 5px 5px 0;font-size:12px;font-family:"Open Sans",sans-serif;font-weight:400;border-radius:3px;color:#777!important;background:#f8f8f8;border:1px solid #ccc;box-shadow:0 1px 0 rgba(0,0,0,.08);text-shadow:none;line-height:23px;padding:1px 8px 0 5px}.sd-content ul li .option a.share-ustom span,.sd-content ul li a.sd-button>span,.sd-content ul li.advanced a.share-more span,.sd-content ul li.preview-item div.option.option-smart-off a span,.sd-social-icon-text .sd-content ul li a.sd-button>span,.sd-social-official .sd-content>ul>li .digg_button >a span,.sd-social-official .sd-content>ul>li>a.sd-button span,.sd-social-text .sd-content ul li a.sd-button span{line-height:23px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a,.sd-social-official .sd-content .sharing-hidden .inner>ul>li>a.sd-button,.sd-social |
3750 |
-official .sd-content>ul>li .digg_button>a,.sd-social-official .sd-content>ul>li>a.sd-button{line-height:17px;box-shadow:none;vertical-align:top}.sd-social-official .sd-content ul li a.sd-button>span{line-height:17px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a:before,.sd-social-official .sd-content .sharing-hidden .inner>ul>li>a.sd-button:before,.sd-social-official .sd-content>ul>li .digg_button>a:before,.sd-social-official .sd-content>ul>li>a.sd-button:before{margin-bottom:-1px}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon .sd-content ul li a.sd-button:hover,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:hover,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li .digg_button>a:hover,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-official .sd-content>ul>li>a.sd-button:hover,.sd-social-text .sd-content u |
3751 |
l li a.sd-button:active,.sd-social-text .sd-content ul li a.sd-button:hover{color:#555;background:#fafafa;border:1px solid #999}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-text .sd-content ul li a.sd-button:active{box-shadow:inset 0 1px 0 rgba(0,0,0,.16)}.sd-content ul li a.sd-button:before{display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font:400 18px/1 social-logos;vertical-align:top;text-align:center}.sd-social-icon-text ul li a.sd-button:before{position:relative;top:2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-content ul li a.sd-button:before{position:relative;top:2px}}.sd-social-official ul li a.sd-button:before{position:relative;top:-2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social-official ul li a.sd-button:be |
3752 |
fore{top:0}}.sd-content ul li{margin:0!important;padding:0}.sd-content ul li.preview-item a.sd-button span,.sd-social-icon-text .sd-content ul li a span,.sd-social-official .sd-content ul li a.sd-button span{margin-left:3px}.sd-content ul li.preview-item.no-icon a.sd-button span{margin-left:0}.sd-content ul li.no-icon a:before,.sd-social-text .sd-content ul li a:before{display:none}body .sd-content ul li.share-custom.no-icon a span,body .sd-social-text .sd-content ul li.share-custom a span{background-image:none;background-position:-500px -500px!important;background-repeat:no-repeat!important;padding-left:0;height:0;line-height:inherit}.sd-social-icon .sd-content ul li a.share-more{position:relative;top:-4px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social-icon .sd-content ul li a.share-more{top:2px}}@-moz-document url-prefix(){.sd-social-icon .sd-content ul li a.share-more{top:2px}}.sd-social-icon .sd-content ul li a.share-more span{margin-left:3px}.sd-content ul li.s |
3753 |
hare-print div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-print a:before,.sd-social-icon-text .sd-content li.share-print a:before,.sd-social-official .sd-content li.share-print a:before,.sd-social-text .sd-content ul li.share-print a:before{content:'\f469'}.sd-content ul li.share-email div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-email a:before,.sd-social-icon-text .sd-content li.share-email a:before,.sd-social-official .sd-content li.share-email a:before,.sd-social-text .sd-content ul li.share-email a:before{content:'\f410'}.sd-content ul li.share-linkedin div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-linkedin a:before,.sd-social-icon-text .sd-content li.share-linkedin a:before,.sd-social-text .sd-content ul li.share-linkedin a:before{content:'\f207'}.sd-content ul li.share-twitter div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-twitter a:before,.sd-social-icon- |
3754 |
text .sd-content li.share-twitter a:before,.sd-social-text .sd-content ul li.share-twitter a:before{content:'\f202'}.sd-content ul li.share-reddit div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-reddit a:before,.sd-social-icon-text .sd-content li.share-reddit a:before,.sd-social-text .sd-content ul li.share-reddit a:before{content:'\f222'}.sd-content ul li.share-tumblr div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-tumblr a:before,.sd-social-icon-text .sd-content li.share-tumblr a:before,.sd-social-text .sd-content ul li.share-tumblr a:before{content:'\f607'}.sd-content ul li.share-pocket div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-pocket a:before,.sd-social-icon-text .sd-content li.share-pocket a:before,.sd-social-text .sd-content ul li.share-pocket a:before{content:'\f224'}.sd-content ul li.share-pinterest div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-pinteres |
3755 |
t a:before,.sd-social-icon-text .sd-content li.share-pinterest a:before,.sd-social-text .sd-content ul li.share-pinterest a:before{content:'\f210'}.sd-content ul li.share-google-plus-1 div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-google-plus-1 a:before,.sd-social-icon-text .sd-content li.share-google-plus-1 a:before,.sd-social-text .sd-content ul li.share-google-plus-1 a:before{content:'\f218'}.sd-content ul li.share-facebook div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-facebook a:before,.sd-social-icon-text .sd-content li.share-facebook a:before,.sd-social-text .sd-content ul li.share-facebook a:before{content:'\f203'}.sd-content ul li.share-press-this div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-press-this a:before,.sd-social-icon-text .sd-content li.share-press-this a:before,.sd-social-official .sd-content li.share-press-this a:before,.sd-social-text .sd-content ul li.share-press-this |
3756 |
a:before{content:'\f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.sd-content ul li.share-telegram div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-telegram a:before,.sd-social-icon-text .sd-content li.share-telegram a:before,.sd-social-official .sd-content li.share-telegram a:before,.sd-social-text .sd-content ul li.share-telegram a:before{content:'\f606'}.sd-social-official .sd-content li.share-telegram a:before{color:#08c}.sd-content ul li.share-skype div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-skype a:before,.sd-social-icon-text .sd-content li.share-skype a:before,.sd-social-text .sd-content ul li.share-skype a:before{content:'\f220'}.sd-content ul li.advanced a.share-more:before,.sd-social-icon .sd-content ul a.share-more:before,.sd-social-icon-text .sd-content a.share-more:before,.sd-social-official .sd-content a.share-more:before,.sd-social-text .sd-content ul a.share-more:before{co |
3757 |
ntent:'\f415'}.sd-social-official .sd-content a.share-more:before{color:#2ba1cb}.sd-content ul li.share-jetpack-whatsapp div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-jetpack-whatsapp a:before,.sd-social-icon-text .sd-content li.share-jetpack-whatsapp a:before,.sd-social-official .sd-content li.share-jetpack-whatsapp a:before,.sd-social-text .sd-content ul li.share-jetpack-whatsapp a:before{content:'\f608'}.sd-social-official .sd-content li.share-jetpack-whatsapp a:before{color:#43d854}.sd-social-icon .sd-content ul li[class*=share-].share-jetpack-whatsapp a.sd-button{background:#43d854;color:#fff!important}.sd-social .sd-button .share-count{background:#2ea2cc;color:#fff;border-radius:10px;display:inline-block;text-align:center;font-size:10px;padding:1px 3px;line-height:1}.sd-social-official .sd-content ul,.sd-social-official .sd-content ul li{line-height:25px!important}.sd-social-official .sd-content>ul>li>a.sd-button span{line-height:1}.sd-social-off |
3758 |
icial .sd-content ul:after{content:".";display:block;height:0;clear:both;visibility:hidden}.sd-social-official .sd-content li.share-press-this a{margin:0 0 5px}.sd-social-official .sd-content ul>li{display:block;float:left;margin:0 10px 5px 0!important;height:25px}.sd-social-official .fb-share-button>span{vertical-align:top!important}.sd-social-official .sd-content .pocket_button iframe{width:98px}.googleplus1_button .g-plus{vertical-align:top!important}.reddit_button iframe{margin-top:1px}.googleplus1_button iframe,.linkedin_button>span,.pinterest_button,.pocket_button iframe,.twitter_button{margin:0!important}.sd-social-official .sd-content .share-skype{width:55px}body .sd-social-official li a.share-more,body .sd-social-official li.share-custom a,body .sd-social-official li.share-digg a,body .sd-social-official li.share-email a,body .sd-social-official li.share-press-this a,body .sd-social-official li.share-print{position:relative;top:0}body .sd-social-icon .sd-content li.share-cu |
3759 |
stom>a{padding:2px 3px 0;position:relative;top:4px}body .sd-content ul li.share-custom a.share-icon span,body .sd-social-icon .sd-content li.share-custom a span,body .sd-social-icon-text .sd-content li.share-custom a span,body .sd-social-official .sd-content li.share-custom a span,body .sd-social-text .sd-content li.share-custom a span{background-size:16px 16px;background-repeat:no-repeat;margin-left:0;padding:0 0 0 19px;display:inline-block;height:16px;line-height:16px}body .sd-social-icon .sd-content li.share-custom a span{width:0;padding-left:16px!important}.sharing-hidden .inner{position:absolute;z-index:2;border:1px solid #ccc;padding:10px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);border-radius:2px;margin-top:5px;max-width:400px}.sharing-hidden .inner ul{margin:0!important}.sd-social-official .sd-content .sharing-hidden ul>li.share-end{clear:both;margin:0!important;height:0!important}.sharing-hidden .inner:after,.sharing-hidden .inner:before{position:absolute;z-index |
3760 |
:1;top:-8px;left:20px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #ccc;content:"";display:block}.sharing-hidden .inner:after{z-index:2;top:-7px;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #fff}.sharing-hidden ul{margin:0}.sd-social-icon .sd-content ul li[class*=share-] a,.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a{border-radius:50%;-webkit-border-radius:50%;border:0;box-shadow:none;padding:7px;position:relative;top:-2px;line-height:1;width:auto;height:auto;margin-bottom:0}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button>span,.sd-social-icon .sd-content ul li[class*=share-] div.option a span{line-height:1}.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a:hover{border:none;opacity:.6}.sd-social-icon .sd-content ul li[c |
3761 |
lass*=share-] a.sd-button:before{top:1px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button.share-custom{padding:8px 8px 6px;top:5px}.sd-social-icon .sd-content ul li a.sd-button.share-more{margin-left:10px}.sd-social-icon .sd-content ul li:first-child a.sd-button.share-more{margin-left:0}.sd-social-icon .sd-button span.share-count{position:absolute;bottom:0;right:0;border-radius:0;background:#555;font-size:9px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button{background:#e9e9e9;margin-top:2px;text-indent:0}.sd-social-icon .sd-content ul li[class*=share-].share-tumblr a.sd-button{background:#2c4762;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-facebook a.sd-button{background:#3b5998;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-twitter a.sd-button{background:#00acee;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pinterest a.sd-button{background:#ca1f27;color:#fff!important}. |
3762 |
sd-social-icon .sd-content ul li[class*=share-].share-digg a.sd-button{color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-press-this a.sd-button{background:#1e8cbe;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-telegram a.sd-button{background:#08c;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-linkedin a.sd-button{background:#0077b5;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-google-plus-1 a.sd-button{background:#dd4b39;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pocket a.sd-button{background:#ee4056;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-reddit a.sd-button{background:#cee3f8;color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-skype a.sd-button{background:#00AFF0;color:#fff!important}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;wi |
3763 |
dth:1px;overflow:hidden}.sharing-screen-reader-text:active,.sharing-screen-reader-text:focus,.sharing-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#sharing_email{width:342px;position:absolute;z-index:1001;border:1px solid #ccc;padding:15px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);text-align:left}div.sharedaddy.sharedaddy-dark #sharing_email{border-color:#fff}#sharing_email .errors{color:#fff;background-color:#771a09;font-size:12px;padding:5px 8px;line-height:1;margin:10px 0 0}#sharing_email label{font-size:12px;color:#333;font-weight:700;display:block;padding:0 0 4px;text-align:left;text-shadow:none}#sharing_email form{margin:0}#sharing_email input[type=email],#sharing_email input[type=text]{width:100%;box-sizing:bord |
3764 |
er-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;border:1px solid #ccc;margin-bottom:1em;background:#fff;font-size:12px;color:#333;max-width:none;padding:1px 3px}#jetpack-source_f_name{display:none!important;position:absolute!important;left:-9000px}#sharing_email .sharing_cancel{padding:0 0 0 1em;font-size:12px;text-shadow:none}#sharing_email .recaptcha{width:312px;height:123px;margin:0 0 1em}.slideshow-window{background-color:#222;border:20px solid #222;border-radius:10px;height:0;margin-bottom:20px;overflow:hidden;padding-top:30px!important;padding-bottom:56.25%!important;position:relative;z-index:1}.slideshow-window.slideshow-white{background-color:#fff;border-color:#fff}.slideshow-window,.slideshow-window *{-moz-box-sizing:content-box;box-sizing:content-box}.slideshow-loading{height:100%;text-align:center;margin:auto}body div.slideshow-window * img{background-color:transparent!important;background-image:none!important;border-width:0!important;display:block;margin: |
3765 |
0 auto;max-width:100%;max-height:100%;padding:0!important;position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.slideshow-loading img{vertical-align:middle}.slideshow-slide{display:none;height:100%!important;left:0;margin:auto;position:absolute;text-align:center;top:0;width:100%!important}.slideshow-slide img{vertical-align:middle}.slideshow-line-height-hack{overflow:hidden;width:0;font-size:0}.slideshow-slide-caption{font-size:13px;font-family:"Helvetica Neue",sans-serif;color:#f7f7f7;text-shadow:#222 1px 1px 2px;line-height:25px;height:25px;position:absolute;bottom:5px;left:0;z-index:100;width:100%;text-align:center}.slideshow-controls{z-index:1000;position:absolute;bottom:30px;margin:auto;text-align:center;width:100%;-ms-filter:"alpha(Opacity=50)";opacity:.5;direction:ltr;transition:300ms opacity ease-out}.slideshow-window:hover .slideshow-controls{-ms-filter:"alpha(Opacity=100)";opacity:1}body div div.slideshow-co |
3766 |
ntrols a,body div div.slideshow-controls a:hover{border:2px solid rgba(255,255,255,.1)!important;background-color:#000!important;background-color:rgba(0,0,0,.6)!important;background-image:url(../modules/shortcodes/img/slideshow-controls.png)!important;background-repeat:no-repeat;background-size:142px 16px!important;background-position:-34px 8px!important;color:#222!important;margin:0 5px!important;padding:0!important;display:inline-block!important;zoom:1;height:32px!important;width:32px!important;line-height:32px!important;text-align:center!important;-khtml-border-radius:10em!important;border-radius:10em!important;transition:300ms border-color ease-out}@media only screen and (-webkit-min-device-pixel-ratio:1.5){body div div.slideshow-controls a,body div div.slideshow-controls a:hover{background-image:url(../modules/shortcodes/img/slideshow-controls-2x.png)!important}}body div div.slideshow-controls a:hover{border-color:rgba(255,255,255,1)!important}body div div.slideshow-controls a: |
3767 |
first-child{background-position:-76px 8px!important}body div div.slideshow-controls a:last-child{background-position:-117px 8px!important}body div div.slideshow-controls a.running,body div div.slideshow-controls a:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.paused{background-position:9px 8px!important}.slideshow-controls a img{border:50px dotted #f0f}body.presentation-wrapper-fullscreen-parent,html.presentation-wrapper-fullscreen-parent{overflow:hidden!important}.presentation-wrapper-fullscreen-parent #wpadminbar{display:none}.presentation-wrapper-fullscreen,.presentation-wrapper-fullscreen-parent{min-width:100%!important;min-height:100%!important;position:absolute!important;top:0!important;right:0!important;bottom:0!important;left:0!important;margin:0!important;padding:0!important;z-index:10000!important}.presentation-wrapper-fullscreen{background-color:gray;border:none!important}.presentation-wrapper-fullscreen .nav-arrow-left,.presentati |
3768 |
on-wrapper-fullscreen .nav-arrow-right{z-index:20001}.presentation-wrapper-fullscreen .nav-fullscreen-button{z-index:20002}.presentation-wrapper{margin:20px auto;border:1px solid #e5e5e5;overflow:hidden;line-height:normal}.presentation{position:relative;margin:0;overflow:hidden;outline:0}.presentation,.presentation .step{background-repeat:no-repeat;background-position:center;background-size:100% 100%}.presentation .step.fade:not(.active){opacity:0}.presentation .slide-content{padding:30px}.presentation .nav-arrow-left,.presentation .nav-arrow-right,.presentation .nav-fullscreen-button{position:absolute;width:34px;background-repeat:no-repeat;z-index:2;opacity:0;transition:opacity .25s}.presentation .nav-arrow-left,.presentation .nav-arrow-right{height:100%;background-image:url(../modules/shortcodes/images/slide-nav.png);background-size:450% 61px}.presentation .nav-arrow-left{left:0;background-position:4px 50%}.presentation .nav-arrow-right{right:0;background-position:-120px 50%}.pres |
3769 |
entation .nav-fullscreen-button{width:32px;height:32px;margin:4px;bottom:0;right:0;z-index:3;background-image:url(../modules/shortcodes/images/expand.png);background-size:100% 100%}.presentation:hover .nav-arrow-left,.presentation:hover .nav-arrow-right{opacity:1}.presentation:hover .nav-fullscreen-button{opacity:.8}.presentation-wrapper-fullscreen .nav-fullscreen-button{background-image:url(../modules/shortcodes/images/collapse.png)}.presentation .autoplay-overlay{height:15%;width:80%;margin:30% 10%;position:relative;z-index:100;display:table;border-radius:50px;background-color:#e5e5e5;background-color:rgba(0,0,0,.75);transition:opacity .5s}.presentation .autoplay-overlay .overlay-msg{position:relative;display:table-cell;text-align:center;vertical-align:middle;color:#fff}.presentation .will-fade{opacity:0}.presentation .do-fade{opacity:1;transition:opacity .5s}#subscribe-email input{width:95%}.comment-subscription-form .subscribe-label{display:inline!important}.jetpack-video-wrappe |
3770 |
r{margin-bottom:1.6em}.jetpack-video-wrapper>.wp-video,.jetpack-video-wrapper>embed,.jetpack-video-wrapper>iframe,.jetpack-video-wrapper>object{margin-bottom:0}.jetpack-social-navigation ul{display:block;margin:0 0 1.5em;padding:0}.jetpack-social-navigation li{display:inline-block;margin:0;line-height:1}.jetpack-social-navigation a{border:0;height:1em;text-decoration:none;width:1em}.jetpack-social-navigation a:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:Genericons;font-size:1em;font-style:normal;font-weight:400;height:1em;line-height:1;speak:none;text-decoration:inherit;vertical-align:top;width:1em;content:"\f415"}.jetpack-social-navigation a[href*="codepen.io"]:before{content:"\f216"}.jetpack-social-navigation a[href*="digg.com"]:before{content:"\f221"}.jetpack-social-navigation a[href*="dribbble.com"]:before{content:"\f201"}.jetpack-social-navigation a[href*="dropbox.com"]:before{content:"\f225"}.jetpack-social-navig |
3771 |
ation a[href*="mailto:"]:before{content:"\f410"}.jetpack-social-navigation a[href*="facebook.com"]:before{content:"\f203"}.jetpack-social-navigation a[href*="flickr.com"]:before{content:"\f211"}.jetpack-social-navigation a[href*="foursquare.com"]:before{content:"\f226"}.jetpack-social-navigation a[href*="github.com"]:before{content:"\f200"}.jetpack-social-navigation a[href*="plus.google.com"]:before{content:"\f206"}.jetpack-social-navigation a[href*="instagram.com"]:before{content:"\f215"}.jetpack-social-navigation a[href*="linkedin.com"]:before{content:"\f208"}.jetpack-social-navigation a[href*="path.com"]:before{content:"\f219"}.jetpack-social-navigation a[href*="pinterest.com"]:before{content:"\f210"}.jetpack-social-navigation a[href*="getpocket.com"]:before{content:"\f224"}.jetpack-social-navigation a[href*="polldaddy.com"]:before{content:"\f217"}.jetpack-social-navigation a[href*="reddit.com"]:before{content:"\f222"}.jetpack-social-navigation a[href$="/feed/"]:before{content:"\ |
3772 |
f413"}.jetpack-social-navigation a[href*="skype:"]:before{content:"\f220"}.jetpack-social-navigation a[href*="spotify.com"]:before{content:"\f515"}.jetpack-social-navigation a[href*="stumbleupon.com"]:before{content:"\f223"}.jetpack-social-navigation a[href*="tumblr.com"]:before{content:"\f214"}.jetpack-social-navigation a[href*="twitch.tv"]:before{content:"\f516"}.jetpack-social-navigation a[href*="twitter.com"]:before{content:"\f202"}.jetpack-social-navigation a[href*="vimeo.com"]:before{content:"\f212"}.jetpack-social-navigation a[href*="vine.co"]:before{content:"\f517"}.jetpack-social-navigation a[href*="wordpress.com"]:before,.jetpack-social-navigation a[href*="wordpress.org"]:before{content:"\f205"}.jetpack-social-navigation a[href*="youtube.com"]:before{content:"\f213"}.tiled-gallery{clear:both;margin:0 0 20px;overflow:hidden}.tiled-gallery img{margin:2px!important}.tiled-gallery .gallery-group{float:left;position:relative}.tiled-gallery .tiled-gallery-item{float:left;margin: |
3773 |
0;position:relative;width:inherit}.tiled-gallery .gallery-row{overflow:hidden}.tiled-gallery .tiled-gallery-item a{background:0 0;border:none;color:inherit;margin:0;padding:0;text-decoration:none;width:auto}.tiled-gallery .tiled-gallery-item img,.tiled-gallery .tiled-gallery-item img:hover{background:0 0;border:none;box-shadow:none;max-width:100%;padding:0;vertical-align:middle}.tiled-gallery-caption{background:#eee;background:rgba(255,255,255,.8);color:#333;font-size:13px;font-weight:400;overflow:hidden;padding:10px 0;position:absolute;bottom:0;text-indent:10px;text-overflow:ellipsis;width:100%;white-space:nowrap}.tiled-gallery .tiled-gallery-item-small .tiled-gallery-caption{font-size:11px}.widget-gallery .tiled-gallery-unresized{visibility:hidden;height:0;overflow:hidden}.tiled-gallery .tiled-gallery-item img.grayscale{position:absolute;left:0;top:0}.tiled-gallery .tiled-gallery-item img.grayscale:hover{opacity:0}.tiled-gallery.type-circle .tiled-gallery-item img{border-radius:50 |
3774 |
%!important}.tiled-gallery.type-circle .tiled-gallery-caption{display:none;opacity:0}.jetpack-display-remote-posts{margin:5px 0 20px}.jetpack-display-remote-posts h4{font-size:90%;margin:5px 0;padding:0}.jetpack-display-remote-posts h4 a{text-decoration:none}.jetpack-display-remote-posts p{margin:0!important;padding:0;line-height:1.4em!important;font-size:90%}.jetpack-display-remote-posts img{max-width:100%}.widget-grofile h4{margin:1em 0 .5em}.widget-grofile ul.grofile-urls{margin-left:0;overflow:hidden}.widget-grofile ul.grofile-accounts li{list-style:none;display:inline}.widget-grofile ul.grofile-accounts li::before{content:""!important}.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite.png);background-repeat:no-repeat;width:16px;height:16px;float:left;margin-right:8px;margin-bottom:8px}.rtl .widget-grofile .grofile-accounts-logo{margin-left:8px;margin-right:0}.grofile-thumbnail{width:500px;max-width:100%}@media only screen and ( |
3775 |
-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite-2x.png);background-size:16px 784px}}div[class^=gr_custom_container]{border:1px solid gray;border-radius:10px;padding:10px 5px;background-color:#FFF;color:#000}div[class^=gr_custom_container] a{color:#000}h2[class^=gr_custom_header]{display:none}div[class^=gr_custom_each_container]{width:100%;clear:both;margin-bottom:10px;overflow:auto;padding-bottom:4px;border-bottom:1px solid #aaa}div[class^=gr_custom_book_container]{float:right;overflow:hidden;height:60px;margin-left:4px;width:39px}div[class^=gr_custom_author]{font-size:10px}div[class^=gr_custom_tags]{font-size:10px;color:gray}div[class^=gr_custom_rating]{display:none}.widget_wpcom_social_media_icons_widget ul{list-style-type:none;margin-left:0}.widget_wp |
3776 |
com_social_media_icons_widget li{border:0;display:inline;margin-right:.5em}.widget_wpcom_social_media_icons_widget li a{border:0;text-decoration:none}.widget_wpcom_social_media_icons_widget .genericon{font-family:Genericons}.widget_wpcom_social_media_icons_widget .screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hidden}.widget_wpcom_social_media_icons_widget .screen-reader-text:active,.widget_wpcom_social_media_icons_widget .screen-reader-text:focus,.widget_wpcom_social_media_icons_widget .screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.widgets-grid-layout{width:100%}.widgets-grid-layout:after,.widgets-grid-layout:before{content:" ";display:table}.widgets-grid |
3777 |
-layout:after{clear:both}.widget-grid-view-image{float:left;max-width:50%}.widget-grid-view-image a{display:block;margin:0 2px 4px 0}.widget-grid-view-image:image:nth-child(even){float:right}.widget-grid-view-image:nth-child(even) a{margin:0 0 4px 2px}.widgets-grid-layout .widget-grid-view-image img{max-width:100%;height:auto}.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:0 0;clear:none;float:left;margin:0 -5px -3px 0;padding:0 8px 6px 0;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:0 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widgets-list-layout{padding:0;margin:0;list-style-type:none}.widgets-list-layout li:after,.widgets-list-layout li:before{content:"";display:table}.widgets-list-layout li:after{clear:both}.widgets-list-layout li{zoom:1;margin-bottom:1em;list-style-type:none!important}.widgets-list-layout .widg |
3778 |
ets-list-layout-blavatar{float:left;width:21.276596%;max-width:40px;height:auto}.widgets-list-layout-links{float:right;width:73.404255%}.widgets-list-layout span{opacity:.5}.widgets-list-layout span:hover{opacity:.8} |
3779 |
\ No newline at end of file |
3780 |
+.jp-carousel-wrap *{line-height:inherit}.jp-carousel-overlay{background:#000}div.jp-carousel-fadeaway{position:fixed;bottom:0;z-index:2147483647;width:100%;height:15px}.jp-carousel-next-button span,.jp-carousel-previous-button span{background:url(../modules/carousel/images/arrows.png) center center/200px 126px no-repeat}.jp-carousel-msg{font-family:"Open Sans",sans-serif;font-style:normal;display:inline-block;line-height:19px;padding:11px 15px;font-size:14px;text-align:center;margin:25px 20px 0 2px;background-color:#fff;border-left:4px solid #ffba00;box-shadow:0 1px 1px 0 rgba(0,0,0,.1)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.jp-carousel-next-button span,.jp-carousel-previous-button span{background-image:url(../modules/carousel/images/arrows-2x.png)}}.jp-carousel-wrap{font-family:"Helvetica Neue",sans-serif!important}.jp- |
3781 |
carousel-info{position:absolute;bottom:0;text-align:left!important;-webkit-font-smoothing:subpixel-antialiased!important}.jp-carousel-info ::selection{background:#68c9e8;color:#fff}.jp-carousel-info ::-moz-selection{background:#68c9e8;color:#fff}.jp-carousel-photo-info{position:relative;left:25%;width:50%}.jp-carousel-transitions .jp-carousel-photo-info{transition:400ms ease-out}.jp-carousel-info h2{background:none!important;border:none!important;color:#999;display:block!important;font:400 13px/1.25em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;margin:7px 0 0!important;padding:10px 0 0!important;overflow:hidden;text-align:left;text-shadow:none!important;text-transform:none!important;-webkit-font-smoothing:subpixel-antialiased}.jp-carousel-next-button,.jp-carousel-previous-button{text-indent:-9999px;overflow:hidden;cursor:pointer}.jp-carousel-next-button span,.jp-carousel-previous-button span{position:absolute;top:0;bottom:0;width:82px;zoom:1;filter:alpha(opacity |
3782 |
=20);opacity:.2}.jp-carousel-transitions .jp-carousel-next-button span,.jp-carousel-transitions .jp-carousel-previous-button span{transition:500ms opacity ease-out}.jp-carousel-next-button:hover span,.jp-carousel-previous-button:hover span{filter:alpha(opacity=60);opacity:.6}.jp-carousel-next-button span{background-position:-110px center;right:0}.jp-carousel-previous-button span{background-position:-10px center;left:0}.jp-carousel-buttons{margin:-18px -20px 15px;padding:8px 10px;border-bottom:1px solid #222;background:#222;text-align:center}div.jp-carousel-buttons a{border:none!important;color:#999;font:400 11px/1.2em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;padding:5px 2px 5px 0;text-decoration:none!important;text-shadow:none!important;vertical-align:middle;-webkit-font-smoothing:subpixel-antialiased}div.jp-carousel-buttons a:hover{color:#68c9e8;border:none!important}.jp-carousel-transitions div.jp-carousel-buttons a:hover{transition:none!important}.jp-carou |
3783 |
sel-next-button,.jp-carousel-previous-button,.jp-carousel-slide,.jp-carousel-slide img{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.jp-carousel-slide{position:fixed;width:0;bottom:0;background-color:#000;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}.jp-carousel-slide.selected{position:absolute!important;filter:alpha(opacity=100);opacity:1}.jp-carousel-slide{filter:alpha(opacity=25);opacity:.25}.jp-carousel-slide img{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;background:none!important;border:none!important;padding:0!important;box-shadow:0 2px 8px rgba(0,0,0,.1);zoom:1}.jp-carousel-transitions .jp-carousel-slide{transition:opacity 400ms linear}.jp-carousel-close-hint{color:#999;cursor:default;letter-spacing:0!important;padding:.35em 0 0;position:absolute;text-align:l |
3784 |
eft;width:90%}.jp-carousel-transitions .jp-carousel-close-hint{transition:color 200ms linear}.jp-carousel-close-hint span{cursor:pointer;background-color:#000;background-color:rgba(0,0,0,.8);display:block;height:22px;font:400 24px/1 "Helvetica Neue",sans-serif!important;line-height:22px;margin:0 0 0 .4em;text-align:center;vertical-align:middle;width:22px;border-radius:4px}.jp-carousel-transitions .jp-carousel-close-hint span{transition:border-color 200ms linear}.jp-carousel-close-hint:hover{cursor:default;color:#fff}.jp-carousel-close-hint:hover span{border-color:#fff}a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background:url(../modules/carousel/images/carousel-sprite.png?5) 0 0/16px 200px no-repeat}div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{margin:0 14px 0 0!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;paddi |
3785 |
ng-right:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;margin:0 2px 0 -12px!important}div.jp-carousel-buttons a.jp-carousel-reblog,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{background-position:6px -36px;padding-right:auto!important;padding-left:26px!important;color:#999}div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -156px;padding-left:19px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{cursor:default}div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:6px -56px;color:#68c9e8}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../ |
3786 |
modules/carousel/images/carousel-sprite-2x.png?5)}}div#carousel-reblog-box{background:#222;padding:3px 0 0;display:none;margin:5px auto 0;border-radius:2px;box-shadow:0 0 20px rgba(0,0,0,.9);height:74px;width:565px}#carousel-reblog-box textarea{background:#999;font:13px/1.4 "Helvetica Neue",sans-serif!important;color:#444;padding:3px 6px;width:370px;height:48px;float:left;margin:6px 9px 0;border:1px solid #666;box-shadow:inset 2px 2px 2px rgba(0,0,0,.2);border-radius:2px}#carousel-reblog-box textarea:focus{background:#ccc;color:#222}#carousel-reblog-box label{color:#aaa;font-size:11px;padding-right:2px;padding-left:2px;display:inline;font-weight:400}#carousel-reblog-box select{width:110px;padding:0;font-size:12px;font-family:"Helvetica Neue",sans-serif!important;background:#333;color:#eee;border:1px solid #444;margin-top:5px}#carousel-reblog-box .submit,#wrapper #carousel-reblog-box p.response{float:left;width:154px;padding-top:0;padding-left:1px;overflow:hidden;height:34px;margin:3 |
3787 |
px 0 0 2px!important}#wrapper #carousel-reblog-box p.response{font-size:13px;clear:none;padding-left:2px;height:34px;color:#aaa}#carousel-reblog-box input#carousel-reblog-submit,#jp-carousel-comment-form-button-submit{font:13px/24px "Helvetica Neue",sans-serif!important;margin-top:8px;padding:0 10px!important;border-radius:1em;height:24px;color:#333;cursor:pointer;font-weight:400;background:#aaa;border:1px solid #444}#carousel-reblog-box input#carousel-reblog-submit:hover,#jp-carousel-comment-form-button-submit:hover{background:#ccc}#carousel-reblog-box .canceltext{color:#aaa;font-size:11px;line-height:24px}#carousel-reblog-box .canceltext a{color:#fff}.jp-carousel-titleanddesc{border-top:1px solid #222;color:#999;font-size:15px;padding-top:24px;margin-bottom:20px;font-weight:400}.jp-carousel-titleanddesc-title{font:300 1.5em/1.1 "Helvetica Neue",sans-serif!important;text-transform:none!important;color:#fff;margin:0 0 15px;padding:0}.jp-carousel-titleanddesc-desc p{color:#999;line-h |
3788 |
eight:1.4;margin-bottom:.75em}.jp-carousel-comments p a,.jp-carousel-info h2 a,.jp-carousel-titleanddesc p a{color:#fff!important;border:none!important;text-decoration:underline!important;font-weight:400!important;font-style:normal!important}.jp-carousel-titleanddesc p b,.jp-carousel-titleanddesc p strong{font-weight:700;color:#999}.jp-carousel-titleanddesc p em,.jp-carousel-titleanddesc p i{font-style:italic;color:#999}.jp-carousel-comments p a:hover,.jp-carousel-info h2 a:hover,.jp-carousel-titleanddesc p a:hover{color:#68c9e8!important}.jp-carousel-titleanddesc p:empty{display:none}.jp-carousel-left-column-wrapper h1:after,.jp-carousel-left-column-wrapper h1:before,.jp-carousel-photo-info h1:after,.jp-carousel-photo-info h1:before{content:none!important}.jp-carousel-image-meta{background:#111;border:1px solid #222;color:#fff;font:12px/1.4 "Helvetica Neue",sans-serif!important;overflow:hidden;padding:18px 20px;width:209px!important}.jp-carousel-image-meta h5,.jp-carousel-image-met |
3789 |
a li{font-family:"Helvetica Neue",sans-serif!important;position:inherit!important;top:auto!important;right:auto!important;left:auto!important;bottom:auto!important;background:none!important;border:none!important;font-weight:400!important;line-height:1.3em!important}.jp-carousel-image-meta ul{margin:0!important;padding:0!important;list-style:none!important}.jp-carousel-image-meta li{width:48%!important;float:left!important;margin:0 2% 15px 0!important;color:#fff!important;font-size:13px!important}.jp-carousel-image-meta h5{color:#999!important;text-transform:uppercase!important;font-size:10px!important;margin:0 0 2px!important;letter-spacing:.1em!important}a.jp-carousel-image-download{padding-left:23px;display:inline-block;clear:both;color:#999;line-height:1;font-weight:400;font-size:13px;text-decoration:none;background-position:0 -82px}a.jp-carousel-image-download span.photo-size{font-size:11px;border-radius:1em;margin-left:2px;display:inline-block}a.jp-carousel-image-download span. |
3790 |
photo-size-times{padding:0 1px 0 2px}a.jp-carousel-image-download:hover{background-position:0 -122px;color:#68c9e8;border:none!important}.jp-carousel-image-map{position:relative;margin:-20px -20px 20px;border-bottom:1px solid rgba(255,255,255,.17);height:154px}.jp-carousel-image-map img.gmap-main{border-top-left-radius:6px;border-right:1px solid rgba(255,255,255,.17)}.jp-carousel-image-map div.gmap-topright{width:94px;height:154px;position:absolute;top:0;right:0}.jp-carousel-image-map div.imgclip{overflow:hidden;border-top-right-radius:6px}.jp-carousel-image-map div.gmap-topright img{margin-left:-40px}.jp-carousel-image-map img.gmap-bottomright{position:absolute;top:96px;right:0}.jp-carousel-comments{font:15px/1.7 "Helvetica Neue",sans-serif!important;font-weight:400;background:none}.jp-carousel-comments p a:active,.jp-carousel-comments p a:focus,.jp-carousel-comments p a:hover{color:#68c9e8!important}.jp-carousel-comment{background:none;color:#999;margin-bottom:20px;clear:left;over |
3791 |
flow:auto;width:100%}.jp-carousel-comment p{color:#999!important}.jp-carousel-comment .comment-author{font-size:13px;font-weight:400;padding:0;width:auto;display:inline;float:none;border:none;margin:0}.jp-carousel-comment .comment-author a{color:#fff}.jp-carousel-comment .comment-gravatar{float:left}.jp-carousel-comment .comment-content{border:none;margin-left:85px;padding:0}.jp-carousel-comment .avatar{margin:0 20px 0 0;border-radius:4px;border:none!important;padding:0!important;background-color:transparent!important}.jp-carousel-comment .comment-date{color:#999;margin-top:4px;font-size:11px;display:inline;float:right}#jp-carousel-comment-form{margin:0 0 10px!important;float:left;width:100%}textarea#jp-carousel-comment-form-comment-field{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:15px/1.4 "Helvetica Neue",sans-serif!important;width:100%;padding:10px 10px 5px;margin:0;float:none;height:147px;box-shadow:inset 2px 2px 2px rgba(0,0,0,.2);border-radius:3px;ove |
3792 |
rflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}textarea#jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#555}textarea#jp-carousel-comment-form-comment-field:focus{background:#ccc;color:#222}textarea#jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#aaa}#jp-carousel-comment-form-spinner{color:#fff;margin:22px 0 0 10px;display:block;width:20px;height:20px;float:left}#jp-carousel-comment-form-submit-and-info-wrapper{display:none;overflow:hidden;width:100%}#jp-carousel-comment-form-commenting-as input{background:rgba(34,34,34,.9);border:1px solid #3a3a3a;color:#aaa;font:13px/1.4 "Helvetica Neue",sans-serif!important;padding:3px 6px;float:left;box-shadow:inset 2px 2px 2px rgba(0,0,0,.2);border-radius:2px;width:285px}#jp-carousel-comment-form-commenting-as input:focus{background:#ccc;color:#222}#jp-carousel-comment-form-commenting-as p{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:22px 0 0;float:left}#jp- |
3793 |
carousel-comment-form-commenting-as fieldset{float:left;border:none;margin:20px 0 0;padding:0;clear:both}#jp-carousel-comment-form-commenting-as label{font:400 13px/1.7 "Helvetica Neue",sans-serif!important;margin:0 20px 3px 0;float:left;width:100px}#jp-carousel-comment-form-button-submit{margin-top:20px;float:right}#jp-carousel-comment-form-container,#js-carousel-comment-form-container{margin-bottom:15px;overflow:auto;width:100%}#jp-carousel-comment-post-results{display:none;overflow:auto;width:100%}#jp-carousel-comment-post-results span{display:block;text-align:center;margin-top:20px;width:100%;overflow:auto;padding:1em 0;-moz-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.7);border-radius:2px;font:13px/1.4 "Helvetica Neue",sans-serif!important;border:1px solid rgba(255,255,255,.17);box-shadow:inset 0 0 5px 5px rgba(0,0,0,1)}.jp-carousel-comment-post-error{color:#DF4926}#jp-carousel-comments-closed{display:none;color:#999}#jp-carousel-comments-loading{font:400 |
3794 |
15px/1.7 "Helvetica Neue",sans-serif!important;display:none;color:#999;text-align:left;margin-bottom:20px}.jp-carousel-light .jp-carousel-overlay{background:#fff}.jp-carousel-light .jp-carousel-next-button:hover span,.jp-carousel-light .jp-carousel-previous-button:hover span{opacity:.8}.jp-carousel-light .jp-carousel-close-hint:hover,.jp-carousel-light .jp-carousel-titleanddesc div{color:#000!important}.jp-carousel-light .jp-carousel-comment .comment-author a,.jp-carousel-light .jp-carousel-comments p a,.jp-carousel-light .jp-carousel-info h2 a,.jp-carousel-light .jp-carousel-titleanddesc p a{color:#1e8cbe!important}.jp-carousel-light .jp-carousel-comment .comment-author a:hover,.jp-carousel-light .jp-carousel-comments p a:hover,.jp-carousel-light .jp-carousel-info h2 a:hover,.jp-carousel-light .jp-carousel-titleanddesc p a:hover{color:#f1831e!important}.jp-carousel-light .jp-carousel-comment,.jp-carousel-light .jp-carousel-comment p,.jp-carousel-light .jp-carousel-info h2,.jp-carou |
3795 |
sel-light .jp-carousel-titleanddesc,.jp-carousel-light .jp-carousel-titleanddesc p,.jp-carousel-light .jp-carousel-titleanddesc p b,.jp-carousel-light .jp-carousel-titleanddesc p em,.jp-carousel-light .jp-carousel-titleanddesc p i,.jp-carousel-light .jp-carousel-titleanddesc p strong,.jp-carousel-light div.jp-carousel-buttons a{color:#666}.jp-carousel-light .jp-carousel-buttons{border-bottom-color:#f0f0f0;background:#f5f5f5}.jp-carousel-light div.jp-carousel-buttons a:hover{text-decoration:none;color:#f1831e}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:4px -56px;padding-left:24px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#2ea2cc;color:#fff}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:0 -176px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{backgroun |
3796 |
d-position:5px -36px}.jp-carousel-light div#carousel-reblog-box{background:#eee;box-shadow:0 2px 10px rgba(0,0,0,.1);border:1px solid #ddd}.jp-carousel-light #carousel-reblog-box textarea{color:#666;border:1px solid #cfcfcf;background:#fff}.jp-carousel-light #carousel-reblog-box .canceltext{color:#888}.jp-carousel-light #carousel-reblog-box .canceltext a{color:#666}.jp-carousel-light #carousel-reblog-box select{background:#eee;color:#333;border:1px solid #aaa}#jp-carousel-comment-form-button-submit,.jp-carousel-light #carousel-reblog-box input#carousel-reblog-submit{color:#333;background:#fff;border:1px solid #aaa}.jp-carousel-light .jp-carousel-image-meta{background:#fafafa;border:1px solid #eee;border-top-color:#f5f5f5;border-left-color:#f5f5f5;color:#333}.jp-carousel-light .jp-carousel-image-meta li{color:#000!important}.jp-carousel-light .jp-carousel-close-hint{color:#ccc}.jp-carousel-light .jp-carousel-close-hint span{background-color:#fff;border-color:#ccc}.jp-carousel-light # |
3797 |
jp-carousel-comment-form-comment-field::-webkit-input-placeholder{color:#aaa}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus{color:#333}.jp-carousel-light #jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder{color:#ddd}.jp-carousel-light a.jp-carousel-image-download{background-position:0 -122px}.jp-carousel-light a.jp-carousel-image-download:hover{background-position:0 -122px;color:#f1831e}.jp-carousel-light textarea#jp-carousel-comment-form-comment-field{background:#fbfbfb;color:#333;border:1px solid #dfdfdf;box-shadow:inset 2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input{background:#fbfbfb;border:1px solid #dfdfdf;color:#333;box-shadow:inset 2px 2px 2px rgba(0,0,0,.1)}.jp-carousel-light #jp-carousel-comment-form-commenting-as input:focus{background:#fbfbfb;color:#333}.jp-carousel-light #jp-carousel-comment-post-results span{background:#f7f7f7;border:1px solid #dfdfdf;box-shadow:inset 0 0 5px rgba(0,0, |
3798 |
0,.05)}.jp-carousel-light .jp-carousel-slide{background-color:#fff}.jp-carousel-light .jp-carousel-titleanddesc{border-top:1px solid #eee}@media only screen and (max-width:760px){.jp-carousel-info{margin:0 10px!important}.jp-carousel-buttons,.jp-carousel-next-button,.jp-carousel-previous-button{display:none!important}.jp-carousel-image-meta{float:none!important;width:100%!important;-moz-box-sizing:border-box;box-sizing:border-box}.jp-carousel-close-hint{font-weight:800!important;font-size:26px!important;position:fixed!important;top:-10px}.jp-carousel-slide img{filter:alpha(opacity=100);opacity:1}.jp-carousel-wrap{background-color:#000}.jp-carousel-fadeaway{display:none}#jp-carousel-comment-form-container{display:none!important}.jp-carousel-titleanddesc{padding-top:0!important;border:none!important}.jp-carousel-titleanddesc-title{font-size:1em!important}.jp-carousel-left-column-wrapper{padding:0;width:100%!important}.jp-carousel-photo-info{left:0!important;width:100%!important}}.cont |
3799 |
act-form .clear-form{clear:both}.contact-form input[type=email],.contact-form input[type=text]{width:300px;max-width:98%;margin-bottom:13px}.contact-form select{margin-bottom:13px}.contact-form textarea{height:200px;width:80%;float:none;margin-bottom:13px}.contact-form input[type=checkbox],.contact-form input[type=radio]{float:none;margin-bottom:13px}.contact-form label{margin-bottom:3px;float:none;font-weight:700;display:block}.contact-form label.checkbox,.contact-form label.radio{margin-bottom:3px;float:none;font-weight:700;display:inline-block}.contact-form label span{color:#AAA;margin-left:4px;font-weight:400}.contact-form-submission{margin-bottom:4em;padding:1.5em 1em}.contact-form-submission p{margin:0 auto}.form-errors .form-error-message{color:red}.textwidget .contact-form input[type=email],.textwidget .contact-form input[type=text],.textwidget .contact-form textarea{width:250px;max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}#jetpack-check-feedback-spam{marg |
3800 |
in:1px 8px 0 0}.jetpack-check-feedback-spam-spinner{display:inline-block;margin-top:7px}.infinite-loader{color:#000;display:block;height:28px;text-indent:-9999px}#infinite-handle span{background:#333;border-radius:1px;color:#eee;cursor:pointer;font-size:13px;padding:6px 16px}#infinite-handle span button,#infinite-handle span button:focus,#infinite-handle span button:hover{display:inline;position:static;padding:0;margin:0;border:none;line-height:inherit;background:0 0;color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;font-family:inherit}#infinite-handle span button::-moz-focus-inner{margin:0;padding:0;border:none}@media (max-width:800px){#infinite-handle span:before{display:none}#infinite-handle span{display:block}}#infinite-footer{position:fixed;bottom:-50px;left:0;width:100%}#infinite-footer a{text-decoration:none}#infinite-footer .blog-credits a:hover,#infinite-footer .blog-info a:hover{color:#444;text-decoration:underline}#infinite-footer .container{background:rg |
3801 |
ba(255,255,255,.8);border-color:#ccc;border-color:rgba(0,0,0,.1);border-style:solid;border-width:1px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 auto;overflow:hidden;padding:1px 20px;width:780px}#infinite-footer .blog-credits,#infinite-footer .blog-info{-moz-box-sizing:border-box;box-sizing:border-box;line-height:25px}#infinite-footer .blog-info{float:left;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:40%}#infinite-footer .blog-credits{font-weight:400;float:right;width:60%}#infinite-footer .blog-info a{color:#111;font-size:14px;font-weight:700}#infinite-footer .blog-credits{color:#888;font-size:12px;text-align:right}#infinite-footer .blog-credits a{color:#666}.infinity-end.neverending #infinite-footer{display:none}@media (max-width:640px){#infinite-footer .container{-moz-box-sizing:border-box;box-sizing:border-box;width:100%}#infinite-footer .blog-info{width:30%}#infinite-footer .blog-credits{width:70%}#infinite-footer .blog-credit |
3802 |
s,#infinite-footer .blog-info a{font-size:10px}}@media (max-width:640px){#infinite-footer{position:static}}#wpadminbar li#wp-admin-bar-admin-bar-likes-widget{width:61px;overflow:hidden}#wpadminbar iframe.admin-bar-likes-widget{width:61px;height:28px;min-height:28px;border-width:0;position:absolute;top:0}div.jetpack-likes-widget-wrapper{width:100%;min-height:50px;position:relative}div.jetpack-likes-widget-wrapper .sd-link-color{font-size:12px}div.jetpack-likes-widget-wrapper.slim-likes-widget{width:1px;min-height:0}#likes-other-gravatars{display:none;position:absolute;padding:10px 10px 12px;background-color:#2e4453;border-width:0;box-shadow:0 0 10px #2e4453;box-shadow:0 0 10px rgba(46,68,83,.6);min-width:130px;z-index:1000}#likes-other-gravatars *{line-height:normal}#likes-other-gravatars .likes-text{color:#fff;font-size:12px;padding-bottom:8px}#likes-other-gravatars li,#likes-other-gravatars ul{margin:0;padding:0;text-indent:0;list-style-type:none}#likes-other-gravatars li::before{c |
3803 |
ontent:""}#likes-other-gravatars ul.wpl-avatars{overflow:auto;display:block;max-height:190px}#likes-other-gravatars ul.wpl-avatars li{width:32px;height:32px;float:left;margin:0 5px 5px 0}#likes-other-gravatars ul.wpl-avatars li a{margin:0 2px 0 0;border-bottom:none!important;display:block}#likes-other-gravatars ul.wpl-avatars li a img{background:0 0;border:none;margin:0!important;padding:0!important;position:static}div.sd-box{border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.13)}.comment-likes-widget,.entry-content .post-likes-widget,.post-likes-widget{margin:0;border-width:0;display:block}.post-likes-widget-placeholder{margin:0;border-width:0;position:relative}.post-likes-widget-placeholder .button{display:none}.post-likes-widget-placeholder .loading{color:#999;font-size:12px}.slim-likes-widget .post-likes-widget{width:auto;float:none}div.sharedaddy.sd-like-enabled .sd-like h3{display:none}div.sharedaddy.sd-like-enabled .sd-like .post-likes-widget{width:100%;float:none;pos |
3804 |
ition:absolute;top:0}.comment-likes-widget{width:100%}.pd-rating{display:block!important}.sd-gplus .sd-title{display:none}#jp-relatedposts{display:none;padding-top:1em;margin:1em 0;position:relative;clear:both}.jp-relatedposts:after{content:'';display:block;clear:both}#jp-relatedposts h3.jp-relatedposts-headline{margin:0 0 1em;display:inline-block;float:left;font-size:9pt;font-weight:700;font-family:inherit}#jp-relatedposts h3.jp-relatedposts-headline em:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.2);margin-bottom:1em}#jp-relatedposts h3.jp-relatedposts-headline em{font-style:normal;font-weight:700}#jp-relatedposts .jp-relatedposts-items{clear:left}#jp-relatedposts .jp-relatedposts-items-visual{margin-right:-20px}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{float:left;width:33%;margin:0 0 1em;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}#jp-relatedposts .jp-rel |
3805 |
atedposts-items-visual .jp-relatedposts-post{padding-right:20px;filter:alpha(opacity=80);-moz-opacity:.8;opacity:.8}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+4),#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+4){clear:both}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover{filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items p,#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:14px;line-height:20px;margin:0}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs{position:relative}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay{position:absolute;top:0;bottom:0;left:0;right:0;display:block;border-bottom:0}#jp-relatedposts .jp |
3806 |
-relatedposts-items p{margin-bottom:0}#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a{font-size:inherit;font-weight:400;text-decoration:none;filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span{display:block;max-width:90%;overflow:hidden;text-overflow:ellipsis}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post span{max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-rela |
3807 |
tedposts-post-context,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{opacity:.6}#jp-relatedposts .jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt,.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{display:none}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt{overflow:hidden}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs span{margin-bottom:1em}@media only screen and (max-width:640px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:50%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n){clear:left}#jp-relatedposts .jp-relatedposts-items-visual{margin-right:20px}}@media only screen and (max-width:320px){#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post{width:100%;clear:both;margin:0 0 1em}}#jp-post-flair{padding-top:.5em}#content div.sh |
3808 |
aredaddy,#main div.sharedaddy,div.sharedaddy{clear:both}div.sharedaddy h3.sd-title{margin:0 0 1em;display:inline-block;line-height:1.2;font-size:9pt;font-weight:700}div.sharedaddy h3.sd-title:before{content:"";display:block;width:100%;min-width:30px;border-top:1px solid #ddd;margin-bottom:1em}body.highlander-light h3.sd-title:before{border-top:1px solid rgba(0,0,0,.2)}body.highlander-dark h3.sd-title:before{border-top:1px solid rgba(255,255,255,.4)}.sd-content ul{padding:0!important;margin:0 0 .7em!important;list-style:none!important}.sd-content ul li{display:inline-block}.sd-block.sd-gplus{margin:0 0 .5em}.sd-gplus .sd-content{font-size:12px}#sharing_email .sharing_send,.sd-content ul li .option a.share-ustom,.sd-content ul li a.sd-button,.sd-content ul li.advanced a.share-more,.sd-content ul li.preview-item div.option.option-smart-off a,.sd-social-icon .sd-content ul li a.sd-button,.sd-social-icon-text .sd-content ul li a.sd-button,.sd-social-official .sd-content>ul>li .digg_butto |
3809 |
n >a,.sd-social-official .sd-content>ul>li>a.sd-button,.sd-social-text .sd-content ul li a.sd-button{text-decoration:none!important;display:inline-block;font-size:12px;font-family:"Open Sans",sans-serif;font-weight:400;border-radius:3px;color:#777!important;background:#f8f8f8;border:1px solid #ccc;box-shadow:0 1px 0 rgba(0,0,0,.08);text-shadow:none;line-height:23px;padding:1px 8px 0 5px}.sd-content ul li .option a.share-ustom span,.sd-content ul li a.sd-button>span,.sd-content ul li.advanced a.share-more span,.sd-content ul li.preview-item div.option.option-smart-off a span,.sd-social-icon-text .sd-content ul li a.sd-button>span,.sd-social-official .sd-content>ul>li .digg_button >a span,.sd-social-official .sd-content>ul>li>a.sd-button span,.sd-social-text .sd-content ul li a.sd-button span{line-height:23px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a,.sd-social-official .sd-content .sharing-hidden .inner>ul>li>a.sd-button,.sd-social-official .sd-conte |
3810 |
nt>ul>li .digg_button>a,.sd-social-official .sd-content>ul>li>a.sd-button{line-height:17px;box-shadow:none;vertical-align:top}.sd-social-official .sd-content ul li a.sd-button>span{line-height:17px}.sd-social-official .sd-content .sharing-hidden .inner>ul>li .digg_button>a:before,.sd-social-official .sd-content .sharing-hidden .inner>ul>li>a.sd-button:before,.sd-social-official .sd-content>ul>li .digg_button>a:before,.sd-social-official .sd-content>ul>li>a.sd-button:before{margin-bottom:-1px}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon .sd-content ul li a.sd-button:hover,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:hover,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li .digg_button>a:hover,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-official .sd-content>ul>li>a.sd-button:hover,.sd-social-text .sd-content ul li a.sd-button:ac |
3811 |
tive,.sd-social-text .sd-content ul li a.sd-button:hover{color:#555;background:#fafafa;border:1px solid #999}.sd-social-icon .sd-content ul li a.sd-button:active,.sd-social-icon-text .sd-content ul li a.sd-button:active,.sd-social-official .sd-content>ul>li .digg_button>a:active,.sd-social-official .sd-content>ul>li>a.sd-button:active,.sd-social-text .sd-content ul li a.sd-button:active{box-shadow:inset 0 1px 0 rgba(0,0,0,.16)}.sd-content ul li a.sd-button:before{display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font:400 18px/1 social-logos;vertical-align:top;text-align:center}.sd-social-icon-text ul li a.sd-button:before{position:relative;top:2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-content ul li a.sd-button:before{position:relative;top:2px}}.sd-social-official ul li a.sd-button:before{position:relative;top:-2px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social-official ul li a.sd-button:before{top:0}}.sd-con |
3812 |
tent ul li{margin:0 5px 5px 0;padding:0}.sd-content ul li.preview-item a.sd-button span,.sd-social-icon-text .sd-content ul li a span,.sd-social-official .sd-content ul li a.sd-button span{margin-left:3px}.sd-content ul li.preview-item.no-icon a.sd-button span{margin-left:0}.sd-content ul li.no-icon a:before,.sd-social-text .sd-content ul li a:before{display:none}body .sd-content ul li.share-custom.no-icon a span,body .sd-social-text .sd-content ul li.share-custom a span{background-image:none;background-position:-500px -500px!important;background-repeat:no-repeat!important;padding-left:0;height:0;line-height:inherit}.sd-social-icon .sd-content ul li a.share-more{position:relative;top:-4px}@media screen and (-webkit-min-device-pixel-ratio:0){.sd-social-icon .sd-content ul li a.share-more{top:2px}}@-moz-document url-prefix(){.sd-social-icon .sd-content ul li a.share-more{top:2px}}.sd-social-icon .sd-content ul li a.share-more span{margin-left:3px}.sd-content ul li.share-print div.opti |
3813 |
on.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-print a:before,.sd-social-icon-text .sd-content li.share-print a:before,.sd-social-official .sd-content li.share-print a:before,.sd-social-text .sd-content ul li.share-print a:before{content:'\f469'}.sd-content ul li.share-email div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-email a:before,.sd-social-icon-text .sd-content li.share-email a:before,.sd-social-official .sd-content li.share-email a:before,.sd-social-text .sd-content ul li.share-email a:before{content:'\f410'}.sd-content ul li.share-linkedin div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-linkedin a:before,.sd-social-icon-text .sd-content li.share-linkedin a:before,.sd-social-text .sd-content ul li.share-linkedin a:before{content:'\f207'}.sd-content ul li.share-twitter div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-twitter a:before,.sd-social-icon-text .sd-content li |
3814 |
.share-twitter a:before,.sd-social-text .sd-content ul li.share-twitter a:before{content:'\f202'}.sd-content ul li.share-reddit div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-reddit a:before,.sd-social-icon-text .sd-content li.share-reddit a:before,.sd-social-text .sd-content ul li.share-reddit a:before{content:'\f222'}.sd-content ul li.share-tumblr div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-tumblr a:before,.sd-social-icon-text .sd-content li.share-tumblr a:before,.sd-social-text .sd-content ul li.share-tumblr a:before{content:'\f607'}.sd-content ul li.share-pocket div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-pocket a:before,.sd-social-icon-text .sd-content li.share-pocket a:before,.sd-social-text .sd-content ul li.share-pocket a:before{content:'\f224'}.sd-content ul li.share-pinterest div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-pinterest a:before,.sd-soci |
3815 |
al-icon-text .sd-content li.share-pinterest a:before,.sd-social-text .sd-content ul li.share-pinterest a:before{content:'\f210'}.sd-content ul li.share-google-plus-1 div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-google-plus-1 a:before,.sd-social-icon-text .sd-content li.share-google-plus-1 a:before,.sd-social-text .sd-content ul li.share-google-plus-1 a:before{content:'\f218'}.sd-content ul li.share-facebook div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-facebook a:before,.sd-social-icon-text .sd-content li.share-facebook a:before,.sd-social-text .sd-content ul li.share-facebook a:before{content:'\f203'}.sd-content ul li.share-press-this div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-press-this a:before,.sd-social-icon-text .sd-content li.share-press-this a:before,.sd-social-official .sd-content li.share-press-this a:before,.sd-social-text .sd-content ul li.share-press-this a:before{content:'\ |
3816 |
f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.sd-content ul li.share-telegram div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-telegram a:before,.sd-social-icon-text .sd-content li.share-telegram a:before,.sd-social-official .sd-content li.share-telegram a:before,.sd-social-text .sd-content ul li.share-telegram a:before{content:'\f606'}.sd-social-official .sd-content li.share-telegram a:before{color:#08c}.sd-content ul li.share-skype div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-skype a:before,.sd-social-icon-text .sd-content li.share-skype a:before,.sd-social-text .sd-content ul li.share-skype a:before{content:'\f220'}.sd-content ul li.advanced a.share-more:before,.sd-social-icon .sd-content ul a.share-more:before,.sd-social-icon-text .sd-content a.share-more:before,.sd-social-official .sd-content a.share-more:before,.sd-social-text .sd-content ul a.share-more:before{content:'\f415'}.sd-s |
3817 |
ocial-official .sd-content a.share-more:before{color:#2ba1cb}.sd-content ul li.share-jetpack-whatsapp div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-jetpack-whatsapp a:before,.sd-social-icon-text .sd-content li.share-jetpack-whatsapp a:before,.sd-social-official .sd-content li.share-jetpack-whatsapp a:before,.sd-social-text .sd-content ul li.share-jetpack-whatsapp a:before{content:'\f608'}.sd-social-official .sd-content li.share-jetpack-whatsapp a:before{color:#43d854}.sd-social-icon .sd-content ul li[class*=share-].share-jetpack-whatsapp a.sd-button{background:#43d854;color:#fff!important}.sd-social .sd-button .share-count{background:#2ea2cc;color:#fff;border-radius:10px;display:inline-block;text-align:center;font-size:10px;padding:1px 3px;line-height:1}.sd-social-official .sd-content ul,.sd-social-official .sd-content ul li{line-height:25px!important}.sd-social-official .sd-content>ul>li>a.sd-button span{line-height:1}.sd-social-official .sd-content u |
3818 |
l:after{content:".";display:block;height:0;clear:both;visibility:hidden}.sd-social-official .sd-content li.share-press-this a{margin:0 0 5px}.sd-social-official .sd-content ul>li{display:block;float:left;margin:0 10px 5px 0!important;height:25px}.sd-social-official .fb-share-button>span{vertical-align:top!important}.sd-social-official .sd-content .pocket_button iframe{width:98px}.googleplus1_button .g-plus{vertical-align:top!important}.reddit_button iframe{margin-top:1px}.googleplus1_button iframe,.linkedin_button>span,.pinterest_button,.pocket_button iframe,.twitter_button{margin:0!important}.sd-social-official .sd-content .share-skype{width:55px}body .sd-social-official li a.share-more,body .sd-social-official li.share-custom a,body .sd-social-official li.share-digg a,body .sd-social-official li.share-email a,body .sd-social-official li.share-press-this a,body .sd-social-official li.share-print{position:relative;top:0}body .sd-social-icon .sd-content li.share-custom>a{padding:2px |
3819 |
3px 0;position:relative;top:4px}body .sd-content ul li.share-custom a.share-icon span,body .sd-social-icon .sd-content li.share-custom a span,body .sd-social-icon-text .sd-content li.share-custom a span,body .sd-social-official .sd-content li.share-custom a span,body .sd-social-text .sd-content li.share-custom a span{background-size:16px 16px;background-repeat:no-repeat;margin-left:0;padding:0 0 0 19px;display:inline-block;height:16px;line-height:16px}body .sd-social-icon .sd-content li.share-custom a span{width:0;padding-left:16px!important}.sharing-hidden .inner{position:absolute;z-index:2;border:1px solid #ccc;padding:10px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);border-radius:2px;margin-top:5px;max-width:400px}.sharing-hidden .inner ul{margin:0!important}.sd-social-official .sd-content .sharing-hidden ul>li.share-end{clear:both;margin:0!important;height:0!important}.sharing-hidden .inner:after,.sharing-hidden .inner:before{position:absolute;z-index:1;top:-8px;left:20 |
3820 |
px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #ccc;content:"";display:block}.sharing-hidden .inner:after{z-index:2;top:-7px;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #fff}.sharing-hidden ul{margin:0}.sd-social-icon .sd-content ul li[class*=share-] a,.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a{border-radius:50%;-webkit-border-radius:50%;border:0;box-shadow:none;padding:7px;position:relative;top:-2px;line-height:1;width:auto;height:auto;margin-bottom:0}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button>span,.sd-social-icon .sd-content ul li[class*=share-] div.option a span{line-height:1}.sd-social-icon .sd-content ul li[class*=share-] a:hover,.sd-social-icon .sd-content ul li[class*=share-] div.option a:hover{border:none;opacity:.6}.sd-social-icon .sd-content ul li[class*=share-] a.sd- |
3821 |
button:before{top:1px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button.share-custom{padding:8px 8px 6px;top:5px}.sd-social-icon .sd-content ul li a.sd-button.share-more{margin-left:10px}.sd-social-icon .sd-content ul li:first-child a.sd-button.share-more{margin-left:0}.sd-social-icon .sd-button span.share-count{position:absolute;bottom:0;right:0;border-radius:0;background:#555;font-size:9px}.sd-social-icon .sd-content ul li[class*=share-] a.sd-button{background:#e9e9e9;margin-top:2px;text-indent:0}.sd-social-icon .sd-content ul li[class*=share-].share-tumblr a.sd-button{background:#2c4762;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-facebook a.sd-button{background:#3b5998;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-twitter a.sd-button{background:#00acee;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pinterest a.sd-button{background:#ca1f27;color:#fff!important}.sd-social-icon .sd- |
3822 |
content ul li[class*=share-].share-digg a.sd-button{color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-press-this a.sd-button{background:#1e8cbe;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-telegram a.sd-button{background:#08c;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-linkedin a.sd-button{background:#0077b5;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-google-plus-1 a.sd-button{background:#dd4b39;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-pocket a.sd-button{background:#ee4056;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-reddit a.sd-button{background:#cee3f8;color:#555!important}.sd-social-icon .sd-content ul li[class*=share-].share-skype a.sd-button{background:#00AFF0;color:#fff!important}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hi |
3823 |
dden}.sharing-screen-reader-text:active,.sharing-screen-reader-text:focus,.sharing-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#sharing_email{width:342px;position:absolute;z-index:1001;border:1px solid #ccc;padding:15px;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.2);text-align:left}div.sharedaddy.sharedaddy-dark #sharing_email{border-color:#fff}#sharing_email .errors{color:#fff;background-color:#771a09;font-size:12px;padding:5px 8px;line-height:1;margin:10px 0 0}#sharing_email label{font-size:12px;color:#333;font-weight:700;display:block;padding:0 0 4px;text-align:left;text-shadow:none}#sharing_email form{margin:0}#sharing_email input[type=email],#sharing_email input[type=text]{width:100%;box-sizing:border-box;-moz-box-siz |
3824 |
ing:border-box;-webkit-box-sizing:border-box;border:1px solid #ccc;margin-bottom:1em;background:#fff;font-size:12px;color:#333;max-width:none;padding:1px 3px}#jetpack-source_f_name{display:none!important;position:absolute!important;left:-9000px}#sharing_email .sharing_cancel{padding:0 0 0 1em;font-size:12px;text-shadow:none}#sharing_email .recaptcha{width:312px;height:123px;margin:0 0 1em}.slideshow-window{background-color:#222;border:20px solid #222;border-radius:10px;height:0;margin-bottom:20px;overflow:hidden;padding-top:30px!important;padding-bottom:56.25%!important;position:relative;z-index:1}.slideshow-window.slideshow-white{background-color:#fff;border-color:#fff}.slideshow-window,.slideshow-window *{-moz-box-sizing:content-box;box-sizing:content-box}.slideshow-loading{height:100%;text-align:center;margin:auto}body div.slideshow-window * img{background-color:transparent!important;background-image:none!important;border-width:0!important;display:block;margin:0 auto;max-width:10 |
3825 |
0%;max-height:100%;padding:0!important;position:relative;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);top:50%}.slideshow-loading img{vertical-align:middle}.slideshow-slide{display:none;height:100%!important;left:0;margin:auto;position:absolute;text-align:center;top:0;width:100%!important}.slideshow-slide img{vertical-align:middle}.slideshow-line-height-hack{overflow:hidden;width:0;font-size:0}.slideshow-slide-caption{font-size:13px;font-family:"Helvetica Neue",sans-serif;color:#f7f7f7;text-shadow:#222 1px 1px 2px;line-height:25px;height:25px;position:absolute;bottom:5px;left:0;z-index:100;width:100%;text-align:center}.slideshow-controls{z-index:1000;position:absolute;bottom:30px;margin:auto;text-align:center;width:100%;-ms-filter:"alpha(Opacity=50)";opacity:.5;direction:ltr;transition:300ms opacity ease-out}.slideshow-window:hover .slideshow-controls{-ms-filter:"alpha(Opacity=100)";opacity:1}body div div.slideshow-controls a,body div d |
3826 |
iv.slideshow-controls a:hover{border:2px solid rgba(255,255,255,.1)!important;background-color:#000!important;background-color:rgba(0,0,0,.6)!important;background-image:url(../modules/shortcodes/img/slideshow-controls.png)!important;background-repeat:no-repeat;background-size:142px 16px!important;background-position:-34px 8px!important;color:#222!important;margin:0 5px!important;padding:0!important;display:inline-block!important;zoom:1;height:32px!important;width:32px!important;line-height:32px!important;text-align:center!important;-khtml-border-radius:10em!important;border-radius:10em!important;transition:300ms border-color ease-out}@media only screen and (-webkit-min-device-pixel-ratio:1.5){body div div.slideshow-controls a,body div div.slideshow-controls a:hover{background-image:url(../modules/shortcodes/img/slideshow-controls-2x.png)!important}}body div div.slideshow-controls a:hover{border-color:rgba(255,255,255,1)!important}body div div.slideshow-controls a:first-child{backgro |
3827 |
und-position:-76px 8px!important}body div div.slideshow-controls a:last-child{background-position:-117px 8px!important}body div div.slideshow-controls a.running,body div div.slideshow-controls a:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.paused{background-position:9px 8px!important}.slideshow-controls a img{border:50px dotted #f0f}body.presentation-wrapper-fullscreen-parent,html.presentation-wrapper-fullscreen-parent{overflow:hidden!important}.presentation-wrapper-fullscreen-parent #wpadminbar{display:none}.presentation-wrapper-fullscreen,.presentation-wrapper-fullscreen-parent{min-width:100%!important;min-height:100%!important;position:absolute!important;top:0!important;right:0!important;bottom:0!important;left:0!important;margin:0!important;padding:0!important;z-index:10000!important}.presentation-wrapper-fullscreen{background-color:gray;border:none!important}.presentation-wrapper-fullscreen .nav-arrow-left,.presentation-wrapper-fullscre |
3828 |
en .nav-arrow-right{z-index:20001}.presentation-wrapper-fullscreen .nav-fullscreen-button{z-index:20002}.presentation-wrapper{margin:20px auto;border:1px solid #e5e5e5;overflow:hidden;line-height:normal}.presentation{position:relative;margin:0;overflow:hidden;outline:0}.presentation,.presentation .step{background-repeat:no-repeat;background-position:center;background-size:100% 100%}.presentation .step.fade:not(.active){opacity:0}.presentation .slide-content{padding:30px}.presentation .nav-arrow-left,.presentation .nav-arrow-right,.presentation .nav-fullscreen-button{position:absolute;width:34px;background-repeat:no-repeat;z-index:2;opacity:0;transition:opacity .25s}.presentation .nav-arrow-left,.presentation .nav-arrow-right{height:100%;background-image:url(../modules/shortcodes/images/slide-nav.png);background-size:450% 61px}.presentation .nav-arrow-left{left:0;background-position:4px 50%}.presentation .nav-arrow-right{right:0;background-position:-120px 50%}.presentation .nav-fulls |
3829 |
creen-button{width:32px;height:32px;margin:4px;bottom:0;right:0;z-index:3;background-image:url(../modules/shortcodes/images/expand.png);background-size:100% 100%}.presentation:hover .nav-arrow-left,.presentation:hover .nav-arrow-right{opacity:1}.presentation:hover .nav-fullscreen-button{opacity:.8}.presentation-wrapper-fullscreen .nav-fullscreen-button{background-image:url(../modules/shortcodes/images/collapse.png)}.presentation .autoplay-overlay{height:15%;width:80%;margin:30% 10%;position:relative;z-index:100;display:table;border-radius:50px;background-color:#e5e5e5;background-color:rgba(0,0,0,.75);transition:opacity .5s}.presentation .autoplay-overlay .overlay-msg{position:relative;display:table-cell;text-align:center;vertical-align:middle;color:#fff}.presentation .will-fade{opacity:0}.presentation .do-fade{opacity:1;transition:opacity .5s}#subscribe-email input{width:95%}.comment-subscription-form .subscribe-label{display:inline!important}.jetpack-video-wrapper{margin-bottom:1.6 |
3830 |
em}.jetpack-video-wrapper>.wp-video,.jetpack-video-wrapper>embed,.jetpack-video-wrapper>iframe,.jetpack-video-wrapper>object{margin-bottom:0}.jetpack-social-navigation ul{display:block;margin:0 0 1.5em;padding:0}.jetpack-social-navigation li{display:inline-block;margin:0;line-height:1}.jetpack-social-navigation a{border:0;height:1em;text-decoration:none;width:1em}.jetpack-social-navigation a:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:Genericons;font-size:1em;font-style:normal;font-weight:400;height:1em;line-height:1;speak:none;text-decoration:inherit;vertical-align:top;width:1em;content:"\f415"}.jetpack-social-navigation a[href*="codepen.io"]:before{content:"\f216"}.jetpack-social-navigation a[href*="digg.com"]:before{content:"\f221"}.jetpack-social-navigation a[href*="dribbble.com"]:before{content:"\f201"}.jetpack-social-navigation a[href*="dropbox.com"]:before{content:"\f225"}.jetpack-social-navigation a[href*="mail |
3831 |
to:"]:before{content:"\f410"}.jetpack-social-navigation a[href*="facebook.com"]:before{content:"\f203"}.jetpack-social-navigation a[href*="flickr.com"]:before{content:"\f211"}.jetpack-social-navigation a[href*="foursquare.com"]:before{content:"\f226"}.jetpack-social-navigation a[href*="github.com"]:before{content:"\f200"}.jetpack-social-navigation a[href*="plus.google.com"]:before{content:"\f206"}.jetpack-social-navigation a[href*="instagram.com"]:before{content:"\f215"}.jetpack-social-navigation a[href*="linkedin.com"]:before{content:"\f208"}.jetpack-social-navigation a[href*="path.com"]:before{content:"\f219"}.jetpack-social-navigation a[href*="pinterest.com"]:before{content:"\f210"}.jetpack-social-navigation a[href*="getpocket.com"]:before{content:"\f224"}.jetpack-social-navigation a[href*="polldaddy.com"]:before{content:"\f217"}.jetpack-social-navigation a[href*="reddit.com"]:before{content:"\f222"}.jetpack-social-navigation a[href$="/feed/"]:before{content:"\f413"}.jetpack-soci |
3832 |
al-navigation a[href*="skype:"]:before{content:"\f220"}.jetpack-social-navigation a[href*="spotify.com"]:before{content:"\f515"}.jetpack-social-navigation a[href*="stumbleupon.com"]:before{content:"\f223"}.jetpack-social-navigation a[href*="tumblr.com"]:before{content:"\f214"}.jetpack-social-navigation a[href*="twitch.tv"]:before{content:"\f516"}.jetpack-social-navigation a[href*="twitter.com"]:before{content:"\f202"}.jetpack-social-navigation a[href*="vimeo.com"]:before{content:"\f212"}.jetpack-social-navigation a[href*="vine.co"]:before{content:"\f517"}.jetpack-social-navigation a[href*="wordpress.com"]:before,.jetpack-social-navigation a[href*="wordpress.org"]:before{content:"\f205"}.jetpack-social-navigation a[href*="youtube.com"]:before{content:"\f213"}.tiled-gallery{clear:both;margin:0 0 20px;overflow:hidden}.tiled-gallery img{margin:2px!important}.tiled-gallery .gallery-group{float:left;position:relative}.tiled-gallery .tiled-gallery-item{float:left;margin:0;position:relative |
3833 |
;width:inherit}.tiled-gallery .gallery-row{overflow:hidden}.tiled-gallery .tiled-gallery-item a{background:0 0;border:none;color:inherit;margin:0;padding:0;text-decoration:none;width:auto}.tiled-gallery .tiled-gallery-item img,.tiled-gallery .tiled-gallery-item img:hover{background:0 0;border:none;box-shadow:none;max-width:100%;padding:0;vertical-align:middle}.tiled-gallery-caption{background:#eee;background:rgba(255,255,255,.8);color:#333;font-size:13px;font-weight:400;overflow:hidden;padding:10px 0;position:absolute;bottom:0;text-indent:10px;text-overflow:ellipsis;width:100%;white-space:nowrap}.tiled-gallery .tiled-gallery-item-small .tiled-gallery-caption{font-size:11px}.widget-gallery .tiled-gallery-unresized{visibility:hidden;height:0;overflow:hidden}.tiled-gallery .tiled-gallery-item img.grayscale{position:absolute;left:0;top:0}.tiled-gallery .tiled-gallery-item img.grayscale:hover{opacity:0}.tiled-gallery.type-circle .tiled-gallery-item img{border-radius:50%!important}.tiled- |
3834 |
gallery.type-circle .tiled-gallery-caption{display:none;opacity:0}.jetpack-display-remote-posts{margin:5px 0 20px}.jetpack-display-remote-posts h4{font-size:90%;margin:5px 0;padding:0}.jetpack-display-remote-posts h4 a{text-decoration:none}.jetpack-display-remote-posts p{margin:0!important;padding:0;line-height:1.4em!important;font-size:90%}.jetpack-display-remote-posts img{max-width:100%}.widget-grofile h4{margin:1em 0 .5em}.widget-grofile ul.grofile-urls{margin-left:0;overflow:hidden}.widget-grofile ul.grofile-accounts li{list-style:none;display:inline}.widget-grofile ul.grofile-accounts li::before{content:""!important}.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite.png);background-repeat:no-repeat;width:16px;height:16px;float:left;margin-right:8px;margin-bottom:8px}.rtl .widget-grofile .grofile-accounts-logo{margin-left:8px;margin-right:0}.grofile-thumbnail{width:500px;max-width:100%}@media only screen and (-webkit-min-device- |
3835 |
pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.widget-grofile .grofile-accounts-logo{background-image:url(//0.gravatar.com/images/grav-share-sprite-2x.png);background-size:16px 784px}}div[class^=gr_custom_container]{border:1px solid gray;border-radius:10px;padding:10px 5px;background-color:#FFF;color:#000}div[class^=gr_custom_container] a{color:#000}h2[class^=gr_custom_header]{display:none}div[class^=gr_custom_each_container]{width:100%;clear:both;margin-bottom:10px;overflow:auto;padding-bottom:4px;border-bottom:1px solid #aaa}div[class^=gr_custom_book_container]{float:right;overflow:hidden;height:60px;margin-left:4px;width:39px}div[class^=gr_custom_author]{font-size:10px}div[class^=gr_custom_tags]{font-size:10px;color:gray}div[class^=gr_custom_rating]{display:none}.widget_wpcom_social_media_icons_widget ul{list-style-type:none;margin-left:0}.widget_wpcom_social_media_ic |
3836 |
ons_widget li{border:0;display:inline;margin-right:.5em}.widget_wpcom_social_media_icons_widget li a{border:0;text-decoration:none}.widget_wpcom_social_media_icons_widget .genericon{font-family:Genericons}.widget_wpcom_social_media_icons_widget .screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hidden}.widget_wpcom_social_media_icons_widget .screen-reader-text:active,.widget_wpcom_social_media_icons_widget .screen-reader-text:focus,.widget_wpcom_social_media_icons_widget .screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.widgets-grid-layout{width:100%}.widgets-grid-layout:after,.widgets-grid-layout:before{content:" ";display:table}.widgets-grid-layout:after{clear |
3837 |
:both}.widget-grid-view-image{float:left;max-width:50%}.widget-grid-view-image a{display:block;margin:0 2px 4px 0}.widget-grid-view-image:nth-child(even){float:right}.widget-grid-view-image:nth-child(even) a{margin:0 0 4px 2px}.widgets-grid-layout .widget-grid-view-image img{max-width:100%;height:auto}.widgets-multi-column-grid ul{overflow:hidden;padding:0;margin:0;list-style-type:none}.widgets-multi-column-grid ul li{background:0 0;clear:none;float:left;margin:0 -5px -3px 0;padding:0 8px 6px 0;border:none;list-style-type:none!important}.widgets-multi-column-grid ul li a{background:0 0;margin:0;padding:0;border:0}.widgets-multi-column-grid .avatar{vertical-align:middle}.widgets-list-layout{padding:0;margin:0;list-style-type:none}.widgets-list-layout li:after,.widgets-list-layout li:before{content:"";display:table}.widgets-list-layout li:after{clear:both}.widgets-list-layout li{zoom:1;margin-bottom:1em;list-style-type:none!important}.widgets-list-layout .widgets-list-layout-blavatar{ |
3838 |
float:left;width:21.276596%;max-width:40px;height:auto}.widgets-list-layout-links{float:right;width:73.404255%}.widgets-list-layout span{opacity:.5}.widgets-list-layout span:hover{opacity:.8} |
3839 |
\ No newline at end of file |
3840 |
|
3841 |
diff --git a/plugins/jetpack/functions.opengraph.php b/plugins/jetpack/functions.opengraph.php |
3842 |
index 9ad7d1b..750b93f 100644 |
3843 |
--- a/plugins/jetpack/functions.opengraph.php |
3844 |
+++ b/plugins/jetpack/functions.opengraph.php |
3845 |
@@ -55,7 +55,7 @@ function jetpack_og_tags() { |
3846 |
$description_length = 197; |
3847 |
|
3848 |
if ( is_home() || is_front_page() ) { |
3849 |
- $site_type = get_option( 'open_graph_protocol_site_type' ); |
3850 |
+ $site_type = Jetpack_Options::get_option_and_ensure_autoload( 'open_graph_protocol_site_type', '' ); |
3851 |
$tags['og:type'] = ! empty( $site_type ) ? $site_type : 'website'; |
3852 |
$tags['og:title'] = get_bloginfo( 'name' ); |
3853 |
$tags['og:description'] = get_bloginfo( 'description' ); |
3854 |
@@ -67,7 +67,7 @@ function jetpack_og_tags() { |
3855 |
$tags['og:url'] = home_url( '/' ); |
3856 |
|
3857 |
// Associate a blog's root path with one or more Facebook accounts |
3858 |
- $facebook_admins = get_option( 'facebook_admins' ); |
3859 |
+ $facebook_admins = Jetpack_Options::get_option_and_ensure_autoload( 'facebook_admins', array() ); |
3860 |
if ( ! empty( $facebook_admins ) ) |
3861 |
$tags['fb:admins'] = $facebook_admins; |
3862 |
|
3863 |
|
3864 |
diff --git a/plugins/jetpack/jetpack.php b/plugins/jetpack/jetpack.php |
3865 |
index f01791d..9584b30 100644 |
3866 |
--- a/plugins/jetpack/jetpack.php |
3867 |
+++ b/plugins/jetpack/jetpack.php |
3868 |
@@ -5,16 +5,16 @@ |
3869 |
* Plugin URI: http://jetpack.com |
3870 |
* Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users. |
3871 |
* Author: Automattic |
3872 |
- * Version: 4.1.1 |
3873 |
+ * Version: 4.2.2 |
3874 |
* Author URI: http://jetpack.com |
3875 |
* License: GPL2+ |
3876 |
* Text Domain: jetpack |
3877 |
* Domain Path: /languages/ |
3878 |
*/ |
3879 |
|
3880 |
-define( 'JETPACK__MINIMUM_WP_VERSION', '4.4' ); |
3881 |
+define( 'JETPACK__MINIMUM_WP_VERSION', '4.5' ); |
3882 |
|
3883 |
-define( 'JETPACK__VERSION', '4.1.1' ); |
3884 |
+define( 'JETPACK__VERSION', '4.2.2' ); |
3885 |
define( 'JETPACK_MASTER_USER', true ); |
3886 |
define( 'JETPACK__API_VERSION', 1 ); |
3887 |
define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); |
3888 |
@@ -43,13 +43,12 @@ function jetpack_require_lib_dir() { |
3889 |
add_filter( 'jetpack_require_lib_dir', 'jetpack_require_lib_dir' ); |
3890 |
|
3891 |
// @todo: Abstract out the admin functions, and only include them if is_admin() |
3892 |
-// @todo: Only include things like class.jetpack-sync.php if we're connected. |
3893 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack.php' ); |
3894 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-network.php' ); |
3895 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-client.php' ); |
3896 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-data.php' ); |
3897 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-client-server.php' ); |
3898 |
-require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-sync.php' ); |
3899 |
+require_once( JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-actions.php' ); |
3900 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-options.php' ); |
3901 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-user-agent.php' ); |
3902 |
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-post-images.php' ); |
3903 |
|
3904 |
diff --git a/plugins/jetpack/json-endpoints.php b/plugins/jetpack/json-endpoints.php |
3905 |
index a8ea54a..8ed84eb 100644 |
3906 |
--- a/plugins/jetpack/json-endpoints.php |
3907 |
+++ b/plugins/jetpack/json-endpoints.php |
3908 |
@@ -85,6 +85,8 @@ require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-customcss.php' |
3909 |
// v1.2 |
3910 |
// ********** |
3911 |
require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-post-v1-2-endpoint.php' ); |
3912 |
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-site-settings-v1-2-endpoint.php' ); |
3913 |
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-get-site-v1-2-endpoint.php' ); |
3914 |
|
3915 |
// Jetpack Only Endpoints |
3916 |
$json_jetpack_endpoints_dir = dirname( __FILE__ ) . '/json-endpoints/jetpack/'; |
3917 |
@@ -116,6 +118,27 @@ new WPCOM_JSON_API_GET_Site_Endpoint( array( |
3918 |
'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/', |
3919 |
) ); |
3920 |
|
3921 |
+new WPCOM_JSON_API_GET_Site_V1_2_Endpoint( array( |
3922 |
+ 'description' => 'Get information about a site.', |
3923 |
+ 'group' => 'sites', |
3924 |
+ 'stat' => 'sites:X', |
3925 |
+ 'allowed_if_flagged' => true, |
3926 |
+ 'method' => 'GET', |
3927 |
+ 'min_version' => '1.2', |
3928 |
+ 'path' => '/sites/%s', |
3929 |
+ 'path_labels' => array( |
3930 |
+ '$site' => '(int|string) Site ID or domain', |
3931 |
+ ), |
3932 |
+ |
3933 |
+ 'query_parameters' => array( |
3934 |
+ 'context' => false, |
3935 |
+ ), |
3936 |
+ |
3937 |
+ 'response_format' => WPCOM_JSON_API_GET_Site_V1_2_Endpoint::$site_format, |
3938 |
+ |
3939 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/en.blog.wordpress.com/', |
3940 |
+) ); |
3941 |
+ |
3942 |
new WPCOM_JSON_API_GET_Post_Counts_V1_1_Endpoint( array( |
3943 |
'description' => 'Get number of posts in the post type groups by post status', |
3944 |
'group' => 'sites', |
3945 |
@@ -2385,6 +2408,26 @@ new WPCOM_JSON_API_Site_Settings_Endpoint( array( |
3946 |
'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/settings?pretty=1', |
3947 |
) ); |
3948 |
|
3949 |
+new WPCOM_JSON_API_Site_Settings_V1_2_Endpoint( array( |
3950 |
+ 'description' => 'Get detailed settings information about a site.', |
3951 |
+ 'group' => '__do_not_document', |
3952 |
+ 'stat' => 'sites:X', |
3953 |
+ 'min_version' => '1.2', |
3954 |
+ 'method' => 'GET', |
3955 |
+ 'path' => '/sites/%s/settings', |
3956 |
+ 'path_labels' => array( |
3957 |
+ '$site' => '(int|string) Site ID or domain', |
3958 |
+ ), |
3959 |
+ |
3960 |
+ 'query_parameters' => array( |
3961 |
+ 'context' => false, |
3962 |
+ ), |
3963 |
+ |
3964 |
+ 'response_format' => WPCOM_JSON_API_Site_Settings_Endpoint::$site_format, |
3965 |
+ |
3966 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/en.blog.wordpress.com/settings?pretty=1', |
3967 |
+) ); |
3968 |
+ |
3969 |
new WPCOM_JSON_API_Site_Settings_Endpoint( array( |
3970 |
'description' => 'Update settings for a site.', |
3971 |
'group' => '__do_not_document', |
3972 |
@@ -2397,6 +2440,80 @@ new WPCOM_JSON_API_Site_Settings_Endpoint( array( |
3973 |
), |
3974 |
|
3975 |
'request_format' => array( |
3976 |
+ 'blogname' => '(string) Blog name', |
3977 |
+ 'blogdescription' => '(string) Blog description', |
3978 |
+ 'default_pingback_flag' => '(bool) Notify blogs linked from article?', |
3979 |
+ 'default_ping_status' => '(bool) Allow link notifications from other blogs?', |
3980 |
+ 'default_comment_status' => '(bool) Allow comments on new articles?', |
3981 |
+ 'blog_public' => '(string) Site visibility; -1: private, 0: discourage search engines, 1: allow search engines', |
3982 |
+ 'jetpack_sync_non_public_post_stati' => '(bool) allow sync of post and pages with non-public posts stati', |
3983 |
+ 'jetpack_relatedposts_enabled' => '(bool) Enable related posts?', |
3984 |
+ 'jetpack_relatedposts_show_headline' => '(bool) Show headline in related posts?', |
3985 |
+ 'jetpack_relatedposts_show_thumbnails' => '(bool) Show thumbnails in related posts?', |
3986 |
+ 'jetpack_protect_whitelist' => '(array) List of IP addresses to whitelist', |
3987 |
+ 'infinite_scroll' => '(bool) Support infinite scroll of posts?', |
3988 |
+ 'default_category' => '(int) Default post category', |
3989 |
+ 'default_post_format' => '(string) Default post format', |
3990 |
+ 'require_name_email' => '(bool) Require comment authors to fill out name and email?', |
3991 |
+ 'comment_registration' => '(bool) Require users to be registered and logged in to comment?', |
3992 |
+ 'close_comments_for_old_posts' => '(bool) Automatically close comments on old posts?', |
3993 |
+ 'close_comments_days_old' => '(int) Age at which to close comments', |
3994 |
+ 'thread_comments' => '(bool) Enable threaded comments?', |
3995 |
+ 'thread_comments_depth' => '(int) Depth to thread comments', |
3996 |
+ 'page_comments' => '(bool) Break comments into pages?', |
3997 |
+ 'comments_per_page' => '(int) Number of comments to display per page', |
3998 |
+ 'default_comments_page' => '(string) newest|oldest Which page of comments to display first', |
3999 |
+ 'comment_order' => '(string) asc|desc Order to display comments within page', |
4000 |
+ 'comments_notify' => '(bool) Email me when someone comments?', |
4001 |
+ 'moderation_notify' => '(bool) Email me when a comment is helf for moderation?', |
4002 |
+ 'social_notifications_like' => '(bool) Email me when someone likes my post?', |
4003 |
+ 'social_notifications_reblog' => '(bool) Email me when someone reblogs my post?', |
4004 |
+ 'social_notifications_subscribe' => '(bool) Email me when someone follows my blog?', |
4005 |
+ 'comment_moderation' => '(bool) Moderate comments for manual approval?', |
4006 |
+ 'comment_whitelist' => '(bool) Moderate comments unless author has a previously-approved comment?', |
4007 |
+ 'comment_max_links' => '(int) Moderate comments that contain X or more links', |
4008 |
+ 'moderation_keys' => '(string) Words or phrases that trigger comment moderation, one per line', |
4009 |
+ 'blacklist_keys' => '(string) Words or phrases that mark comment spam, one per line', |
4010 |
+ 'lang_id' => '(int) ID for language blog is written in', |
4011 |
+ 'wga' => '(array) Google Analytics Settings', |
4012 |
+ 'disabled_likes' => '(bool) Are likes globally disabled (they can still be turned on per post)?', |
4013 |
+ 'disabled_reblogs' => '(bool) Are reblogs disabled on posts?', |
4014 |
+ 'jetpack_comment_likes_enabled' => '(bool) Are comment likes enabled for all comments?', |
4015 |
+ 'sharing_button_style' => '(string) Style to use for sharing buttons (icon-text, icon, text, or official)', |
4016 |
+ 'sharing_label' => '(string) Label to use for sharing buttons, e.g. "Share this:"', |
4017 |
+ 'sharing_show' => '(string|array:string) Post type or array of types where sharing buttons are to be displayed', |
4018 |
+ 'sharing_open_links' => '(string) Link target for sharing buttons (same or new)', |
4019 |
+ 'twitter_via' => '(string) Twitter username to include in tweets when people share using the Twitter button', |
4020 |
+ 'jetpack-twitter-cards-site-tag' => '(string) The Twitter username of the owner of the site\'s domain.', |
4021 |
+ 'eventbrite_api_token' => '(int) The Keyring token ID for an Eventbrite token to associate with the site', |
4022 |
+ 'holidaysnow' => '(bool) Enable snowfall on front end of site?', |
4023 |
+ 'timezone_string' => '(string) PHP-compatible timezone string like \'UTC-5\'', |
4024 |
+ 'gmt_offset' => '(int) Site offset from UTC in hours', |
4025 |
+ 'jetpack_testimonial' => '(bool) Whether testimonial custom post type is enabled for the site', |
4026 |
+ 'jetpack_testimonial_posts_per_page' => '(int) Number of testimonials to show per page', |
4027 |
+ 'jetpack_portfolio' => '(bool) Whether portfolio custom post type is enabled for the site', |
4028 |
+ 'jetpack_portfolio_posts_per_page' => '(int) Number of portfolio projects to show per page', |
4029 |
+ ), |
4030 |
+ |
4031 |
+ 'response_format' => array( |
4032 |
+ 'updated' => '(array)' |
4033 |
+ ), |
4034 |
+ |
4035 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/settings?pretty=1', |
4036 |
+) ); |
4037 |
+ |
4038 |
+new WPCOM_JSON_API_Site_Settings_V1_2_Endpoint( array( |
4039 |
+ 'description' => 'Update settings for a site.', |
4040 |
+ 'group' => '__do_not_document', |
4041 |
+ 'stat' => 'sites:X', |
4042 |
+ 'min_version' => '1.2', |
4043 |
+ 'method' => 'POST', |
4044 |
+ 'path' => '/sites/%s/settings', |
4045 |
+ 'path_labels' => array( |
4046 |
+ '$site' => '(int|string) Site ID or domain', |
4047 |
+ ), |
4048 |
+ |
4049 |
+ 'request_format' => array( |
4050 |
'blogname' => '(string) Blog name', |
4051 |
'blogdescription' => '(string) Blog description', |
4052 |
'default_pingback_flag' => '(bool) Notify blogs linked from article?', |
4053 |
@@ -2432,6 +2549,7 @@ new WPCOM_JSON_API_Site_Settings_Endpoint( array( |
4054 |
'moderation_keys' => '(string) Words or phrases that trigger comment moderation, one per line', |
4055 |
'blacklist_keys' => '(string) Words or phrases that mark comment spam, one per line', |
4056 |
'lang_id' => '(int) ID for language blog is written in', |
4057 |
+ 'locale' => '(string) locale code for language blog is written in', |
4058 |
'wga' => '(array) Google Analytics Settings', |
4059 |
'disabled_likes' => '(bool) Are likes globally disabled (they can still be turned on per post)?', |
4060 |
'disabled_reblogs' => '(bool) Are reblogs disabled on posts?', |
4061 |
@@ -2443,14 +2561,19 @@ new WPCOM_JSON_API_Site_Settings_Endpoint( array( |
4062 |
'twitter_via' => '(string) Twitter username to include in tweets when people share using the Twitter button', |
4063 |
'jetpack-twitter-cards-site-tag' => '(string) The Twitter username of the owner of the site\'s domain.', |
4064 |
'eventbrite_api_token' => '(int) The Keyring token ID for an Eventbrite token to associate with the site', |
4065 |
- 'holidaysnow' => '(bool) Enable snowfall on frontend of site?' |
4066 |
+ 'holidaysnow' => '(bool) Enable snowfall on front end of site?', |
4067 |
+ 'timezone_string' => '(string) PHP-compatible timezone string like \'UTC-5\'', |
4068 |
+ 'gmt_offset' => '(int) Site offset from UTC in hours', |
4069 |
+ 'seo_meta_description' => '(string) The seo meta description for the site.', |
4070 |
+ 'advanced_seo_title_formats' => '(array) SEO meta title formats. Allowed keys: front_page, posts, pages, groups, archives', |
4071 |
+ 'verification_services_codes' => '(array) Website verification codes. Allowed keys: google, pinterest, bing, yandex', |
4072 |
), |
4073 |
|
4074 |
'response_format' => array( |
4075 |
'updated' => '(array)' |
4076 |
), |
4077 |
|
4078 |
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/settings?pretty=1', |
4079 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/en.blog.wordpress.com/settings?pretty=1', |
4080 |
) ); |
4081 |
|
4082 |
/** |
4083 |
|
4084 |
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-comment-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-comment-endpoint.php |
4085 |
index d8de129..b89a235 100644 |
4086 |
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-comment-endpoint.php |
4087 |
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-comment-endpoint.php |
4088 |
@@ -81,6 +81,8 @@ abstract class WPCOM_JSON_API_Comment_Endpoint extends WPCOM_JSON_API_Endpoint { |
4089 |
&& |
4090 |
isset( $this->api->token_details['user'] ) |
4091 |
&& |
4092 |
+ isset( $this->api->token_details['user']['user_email'] ) |
4093 |
+ && |
4094 |
$this->api->token_details['user']['user_email'] === $comment->comment_author_email |
4095 |
&& |
4096 |
$this->api->token_details['user']['display_name'] === $comment->comment_author |
4097 |
|
4098 |
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php |
4099 |
index 95a42b4..3e55a60 100644 |
4100 |
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php |
4101 |
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php |
4102 |
@@ -171,7 +171,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint { |
4103 |
array_intersect( $default_fields, $this->fields_to_include ) : |
4104 |
$default_fields; |
4105 |
|
4106 |
- if ( ! is_user_member_of_blog( get_current_user(), $blog_id ) ) { |
4107 |
+ if ( ! is_user_member_of_blog( get_current_user_id(), get_current_blog_id() ) ) { |
4108 |
$response_keys = array_intersect( $response_keys, self::$no_member_fields ); |
4109 |
} |
4110 |
|
4111 |
@@ -459,7 +459,8 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint { |
4112 |
$response->{ $key } = $value; |
4113 |
} |
4114 |
|
4115 |
- if ( is_user_member_of_blog( get_current_user(), $response->ID ) ) { |
4116 |
+ $token_details = (object) $this->api->token_details; |
4117 |
+ if ( is_user_member_of_blog( get_current_user_id(), get_current_blog_id() ) || 'blog' === $token_details->access ) { |
4118 |
$wpcom_member_response = $this->render_response_keys( self::$jetpack_response_field_member_additions ); |
4119 |
|
4120 |
foreach( $wpcom_member_response as $key => $value ) { |
4121 |
|
4122 |
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-endpoint.php |
4123 |
index d28d969..24cbaee 100644 |
4124 |
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-endpoint.php |
4125 |
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-endpoint.php |
4126 |
@@ -630,7 +630,6 @@ abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint { |
4127 |
$result['duration'] = (int) $metadata['duration']; |
4128 |
} |
4129 |
|
4130 |
- /** This filter is documented in class.jetpack-sync.php */ |
4131 |
return (object) apply_filters( 'get_attachment', $result ); |
4132 |
} |
4133 |
|
4134 |
|
4135 |
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php |
4136 |
index efcc84d..c588d60 100644 |
4137 |
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php |
4138 |
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php |
4139 |
@@ -158,8 +158,8 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint { |
4140 |
'jetpack_sync_non_public_post_stati' => (bool) Jetpack_Options::get_option( 'sync_non_public_post_stati' ), |
4141 |
'jetpack_relatedposts_allowed' => (bool) $this->jetpack_relatedposts_supported(), |
4142 |
'jetpack_relatedposts_enabled' => (bool) $jetpack_relatedposts_options[ 'enabled' ], |
4143 |
- 'jetpack_relatedposts_show_headline' => (bool) $jetpack_relatedposts_options[ 'show_headline' ], |
4144 |
- 'jetpack_relatedposts_show_thumbnails' => (bool) $jetpack_relatedposts_options[ 'show_thumbnails' ], |
4145 |
+ 'jetpack_relatedposts_show_headline' => (bool) isset( $jetpack_relatedposts_options[ 'show_headline' ] ) ? $jetpack_relatedposts_options[ 'show_headline' ] : false, |
4146 |
+ 'jetpack_relatedposts_show_thumbnails' => (bool) isset( $jetpack_relatedposts_options[ 'show_thumbnails' ] ) ? $jetpack_relatedposts_options[ 'show_thumbnails' ] : false, |
4147 |
'default_category' => (int) get_option('default_category'), |
4148 |
'post_categories' => (array) $post_categories, |
4149 |
'default_post_format' => get_option( 'default_post_format' ), |
4150 |
|
4151 |
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-comment-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-comment-endpoint.php |
4152 |
index 517e671..cd91213 100644 |
4153 |
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-comment-endpoint.php |
4154 |
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-comment-endpoint.php |
4155 |
@@ -168,7 +168,7 @@ class WPCOM_JSON_API_Update_Comment_Endpoint extends WPCOM_JSON_API_Comment_Endp |
4156 |
} |
4157 |
|
4158 |
$comment_status = wp_get_comment_status( $comment->comment_ID ); |
4159 |
- if ( $comment_status !== $update['status'] && !current_user_can( 'moderate_comments' ) ) { |
4160 |
+ if ( $comment_status !== $update['comment_status'] && !current_user_can( 'moderate_comments' ) ) { |
4161 |
return new WP_Error( 'unauthorized', 'User cannot moderate comments', 403 ); |
4162 |
} |
4163 |
|
4164 |
|
4165 |
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php |
4166 |
index 1b54647..659ab23 100644 |
4167 |
--- a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php |
4168 |
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php |
4169 |
@@ -120,7 +120,8 @@ abstract class Jetpack_JSON_API_Plugins_Endpoint extends Jetpack_JSON_API_Endpoi |
4170 |
|
4171 |
protected function get_plugins() { |
4172 |
$plugins = array(); |
4173 |
- $installed_plugins = get_plugins(); |
4174 |
+ /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ |
4175 |
+ $installed_plugins = apply_filters( 'all_plugins', get_plugins() ); |
4176 |
foreach( $this->plugins as $plugin ) { |
4177 |
if ( ! isset( $installed_plugins[ $plugin ] ) ) |
4178 |
continue; |
4179 |
|
4180 |
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-install-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-install-endpoint.php |
4181 |
index 110c257..328919f 100644 |
4182 |
--- a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-install-endpoint.php |
4183 |
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-install-endpoint.php |
4184 |
@@ -72,7 +72,8 @@ class Jetpack_JSON_API_Plugins_Install_Endpoint extends Jetpack_JSON_API_Plugins |
4185 |
} |
4186 |
|
4187 |
protected static function get_plugin_id_by_slug( $slug ) { |
4188 |
- $plugins = get_plugins(); |
4189 |
+ /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ |
4190 |
+ $plugins = apply_filters( 'all_plugins', get_plugins() ); |
4191 |
if ( ! is_array( $plugins ) ) { |
4192 |
return false; |
4193 |
} |
4194 |
|
4195 |
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php |
4196 |
index f2a98fb..d26ce64 100644 |
4197 |
--- a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php |
4198 |
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php |
4199 |
@@ -1,14 +1,183 @@ |
4200 |
<?php |
4201 |
|
4202 |
+// POST /sites/%s/sync |
4203 |
class Jetpack_JSON_API_Sync_Endpoint extends Jetpack_JSON_API_Endpoint { |
4204 |
- // POST /sites/%s/sync |
4205 |
protected $needed_capabilities = 'manage_options'; |
4206 |
|
4207 |
+ protected function validate_call( $_blog_id, $capability, $check_manage_active = true ) { |
4208 |
+ parent::validate_call( $_blog_id, $capability, false ); |
4209 |
+ } |
4210 |
+ |
4211 |
+ protected function result() { |
4212 |
+ $args = $this->input(); |
4213 |
+ |
4214 |
+ $modules = null; |
4215 |
+ |
4216 |
+ // convert list of modules in comma-delimited format into an array |
4217 |
+ // of "$modulename => true" |
4218 |
+ if ( isset( $args['modules'] ) && ! empty( $args['modules'] ) ) { |
4219 |
+ $modules = array_map( '__return_true', array_flip( array_map( 'trim', explode( ',', $args['modules'] ) ) ) ); |
4220 |
+ } |
4221 |
+ |
4222 |
+ foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
4223 |
+ if ( 'users' === $module_name && isset( $args[ $module_name ] ) && 'initial' === $args[ $module_name ] ) { |
4224 |
+ $modules[ 'users' ] = 'initial'; |
4225 |
+ } elseif ( isset( $args[ $module_name ] ) ) { |
4226 |
+ $ids = explode( ',', $args[ $module_name ] ); |
4227 |
+ if ( count( $ids ) > 0 ) { |
4228 |
+ $modules[ $module_name ] = $ids; |
4229 |
+ } |
4230 |
+ } |
4231 |
+ } |
4232 |
+ |
4233 |
+ if ( empty( $modules ) ) { |
4234 |
+ $modules = null; |
4235 |
+ } |
4236 |
+ |
4237 |
+ return array( 'scheduled' => Jetpack_Sync_Actions::schedule_full_sync( $modules ) ); |
4238 |
+ } |
4239 |
+} |
4240 |
+ |
4241 |
+// GET /sites/%s/sync/status |
4242 |
+class Jetpack_JSON_API_Sync_Status_Endpoint extends Jetpack_JSON_API_Sync_Endpoint { |
4243 |
+ protected function result() { |
4244 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-modules.php'; |
4245 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-sender.php'; |
4246 |
+ |
4247 |
+ $sync_module = Jetpack_Sync_Modules::get_module( 'full-sync' ); |
4248 |
+ $sender = Jetpack_Sync_Sender::get_instance(); |
4249 |
+ $queue = $sender->get_sync_queue(); |
4250 |
+ $full_queue = $sender->get_full_sync_queue(); |
4251 |
+ |
4252 |
+ return array_merge( |
4253 |
+ $sync_module->get_status(), |
4254 |
+ array( |
4255 |
+ 'is_scheduled' => Jetpack_Sync_Actions::is_scheduled_full_sync(), |
4256 |
+ 'queue_size' => $queue->size(), |
4257 |
+ 'queue_lag' => $queue->lag(), |
4258 |
+ 'full_queue_size' => $full_queue->size(), |
4259 |
+ 'full_queue_lag' => $full_queue->lag() |
4260 |
+ ) |
4261 |
+ ); |
4262 |
+ } |
4263 |
+} |
4264 |
+ |
4265 |
+// GET /sites/%s/data-check |
4266 |
+class Jetpack_JSON_API_Sync_Check_Endpoint extends Jetpack_JSON_API_Sync_Endpoint { |
4267 |
protected function result() { |
4268 |
- Jetpack::init(); |
4269 |
- /** This action is documented in class.jetpack.php */ |
4270 |
- do_action( 'jetpack_sync_all_registered_options' ); |
4271 |
- $result['scheduled'] = true; |
4272 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-sender.php'; |
4273 |
+ |
4274 |
+ $sender = Jetpack_Sync_Sender::get_instance(); |
4275 |
+ $sync_queue = $sender->get_sync_queue(); |
4276 |
+ |
4277 |
+ // lock sending from the queue while we compare checksums with the server |
4278 |
+ $result = $sync_queue->lock( 30 ); // tries to acquire the lock for up to 30 seconds |
4279 |
+ |
4280 |
+ if ( ! $result ) { |
4281 |
+ $sync_queue->unlock(); |
4282 |
+ |
4283 |
+ return new WP_Error( 'unknown_error', 'Unknown error trying to lock the sync queue' ); |
4284 |
+ } |
4285 |
+ |
4286 |
+ if ( is_wp_error( $result ) ) { |
4287 |
+ $sync_queue->unlock(); |
4288 |
+ |
4289 |
+ return $result; |
4290 |
+ } |
4291 |
+ |
4292 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-wp-replicastore.php'; |
4293 |
+ |
4294 |
+ $store = new Jetpack_Sync_WP_Replicastore(); |
4295 |
+ |
4296 |
+ $result = $store->checksum_all(); |
4297 |
+ |
4298 |
+ $sync_queue->unlock(); |
4299 |
+ |
4300 |
return $result; |
4301 |
+ |
4302 |
+ } |
4303 |
+} |
4304 |
+ |
4305 |
+// GET /sites/%s/data-histogram |
4306 |
+class Jetpack_JSON_API_Sync_Histogram_Endpoint extends Jetpack_JSON_API_Sync_Endpoint { |
4307 |
+ protected function result() { |
4308 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-sender.php'; |
4309 |
+ |
4310 |
+ $sender = Jetpack_Sync_Sender::get_instance(); |
4311 |
+ $sync_queue = $sender->get_sync_queue(); |
4312 |
+ |
4313 |
+ // lock sending from the queue while we compare checksums with the server |
4314 |
+ $result = $sync_queue->lock( 30 ); // tries to acquire the lock for up to 30 seconds |
4315 |
+ |
4316 |
+ if ( ! $result ) { |
4317 |
+ $sync_queue->unlock(); |
4318 |
+ |
4319 |
+ return new WP_Error( 'unknown_error', 'Unknown error trying to lock the sync queue' ); |
4320 |
+ } |
4321 |
+ |
4322 |
+ if ( is_wp_error( $result ) ) { |
4323 |
+ $sync_queue->unlock(); |
4324 |
+ |
4325 |
+ return $result; |
4326 |
+ } |
4327 |
+ |
4328 |
+ $args = $this->query_args(); |
4329 |
+ |
4330 |
+ if ( isset( $args['columns'] ) ) { |
4331 |
+ $columns = array_map( 'trim', explode( ',', $args['columns'] ) ); |
4332 |
+ } else { |
4333 |
+ $columns = null; // go with defaults |
4334 |
+ } |
4335 |
+ |
4336 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-wp-replicastore.php'; |
4337 |
+ |
4338 |
+ $store = new Jetpack_Sync_WP_Replicastore(); |
4339 |
+ |
4340 |
+ $result = $store->checksum_histogram( $args['object_type'], $args['buckets'], $args['start_id'], $args['end_id'], $columns ); |
4341 |
+ |
4342 |
+ $sync_queue->unlock(); |
4343 |
+ |
4344 |
+ return $result; |
4345 |
+ |
4346 |
+ } |
4347 |
+} |
4348 |
+ |
4349 |
+// POST /sites/%s/sync/settings |
4350 |
+class Jetpack_JSON_API_Sync_Modify_Settings_Endpoint extends Jetpack_JSON_API_Sync_Endpoint { |
4351 |
+ protected function result() { |
4352 |
+ $args = $this->input(); |
4353 |
+ |
4354 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-settings.php'; |
4355 |
+ |
4356 |
+ $sync_settings = Jetpack_Sync_Settings::get_settings(); |
4357 |
+ |
4358 |
+ foreach ( $args as $key => $value ) { |
4359 |
+ if ( $value !== false ) { |
4360 |
+ if ( is_numeric( $value ) ) { |
4361 |
+ $value = (int) $value; |
4362 |
+ } |
4363 |
+ |
4364 |
+ // special case for sending empty arrays - a string with value 'empty' |
4365 |
+ if ( $value === 'empty' ) { |
4366 |
+ $value = array(); |
4367 |
+ } |
4368 |
+ |
4369 |
+ $sync_settings[ $key ] = $value; |
4370 |
+ } |
4371 |
+ } |
4372 |
+ |
4373 |
+ Jetpack_Sync_Settings::update_settings( $sync_settings ); |
4374 |
+ |
4375 |
+ // re-fetch so we see what's really being stored |
4376 |
+ return Jetpack_Sync_Settings::get_settings(); |
4377 |
+ } |
4378 |
+} |
4379 |
+ |
4380 |
+// GET /sites/%s/sync/settings |
4381 |
+class Jetpack_JSON_API_Sync_Get_Settings_Endpoint extends Jetpack_JSON_API_Sync_Endpoint { |
4382 |
+ protected function result() { |
4383 |
+ require_once dirname( __FILE__ ) . '/../../sync/class.jetpack-sync-settings.php'; |
4384 |
+ |
4385 |
+ return Jetpack_Sync_Settings::get_settings(); |
4386 |
} |
4387 |
} |
4388 |
|
4389 |
diff --git a/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php b/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php |
4390 |
index 2424d07..027b730 100644 |
4391 |
--- a/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php |
4392 |
+++ b/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php |
4393 |
@@ -565,6 +565,7 @@ new Jetpack_JSON_API_Core_Endpoint( array( |
4394 |
|
4395 |
require_once( $json_jetpack_endpoints_dir . 'class.jetpack-json-api-sync-endpoint.php' ); |
4396 |
|
4397 |
+// POST /sites/%s/sync |
4398 |
new Jetpack_JSON_API_Sync_Endpoint( array( |
4399 |
'description' => 'Force sync of all options and constants', |
4400 |
'method' => 'POST', |
4401 |
@@ -573,12 +574,129 @@ new Jetpack_JSON_API_Sync_Endpoint( array( |
4402 |
'path_labels' => array( |
4403 |
'$site' => '(int|string) The site ID, The site domain' |
4404 |
), |
4405 |
+ 'request_format' => array( |
4406 |
+ 'modules' => '(string) Comma-delimited set of sync modules to use (default: all of them)', |
4407 |
+ 'posts' => '(string) Comma-delimited list of post IDs to sync', |
4408 |
+ 'comments' => '(string) Comma-delimited list of comment IDs to sync', |
4409 |
+ 'users' => '(string) Comma-delimited list of user IDs to sync', |
4410 |
+ ), |
4411 |
'response_format' => array( |
4412 |
'scheduled' => '(bool) Whether or not the synchronisation was scheduled' |
4413 |
), |
4414 |
'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/sync' |
4415 |
) ); |
4416 |
|
4417 |
+// GET /sites/%s/sync/status |
4418 |
+new Jetpack_JSON_API_Sync_Status_Endpoint( array( |
4419 |
+ 'description' => 'Status of the current full sync or the previous full sync', |
4420 |
+ 'method' => 'GET', |
4421 |
+ 'path' => '/sites/%s/sync/status', |
4422 |
+ 'stat' => 'sync-status', |
4423 |
+ 'path_labels' => array( |
4424 |
+ '$site' => '(int|string) The site ID, The site domain' |
4425 |
+ ), |
4426 |
+ 'response_format' => array( |
4427 |
+ 'started' => '(int|null) The unix timestamp when the last sync started', |
4428 |
+ 'queue_finished' => '(int|null) The unix timestamp when the enqueuing was done for the last sync', |
4429 |
+ 'sent_started' => '(int|null) The unix timestamp when the last sent process started', |
4430 |
+ 'finished' => '(int|null) The unix timestamp when the last sync finished', |
4431 |
+ 'total' => '(array) Count of actions that could be sent', |
4432 |
+ 'queue' => '(array) Count of actions that have been added to the queue', |
4433 |
+ 'sent' => '(array) Count of actions that have been sent', |
4434 |
+ 'config' => '(array) Configuration of the last full sync', |
4435 |
+ 'queue_size' => '(int) Number of items in the sync queue', |
4436 |
+ 'queue_lag' => '(float) Time delay of the oldest item in the sync queue', |
4437 |
+ 'full_queue_size' => '(int) Number of items in the full sync queue', |
4438 |
+ 'full_queue_lag' => '(float) Time delay of the oldest item in the full sync queue', |
4439 |
+ 'is_scheduled' => '(bool) Is a full sync scheduled via cron?' |
4440 |
+ ), |
4441 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/sync/status' |
4442 |
+) ); |
4443 |
+ |
4444 |
+ |
4445 |
+// GET /sites/%s/data-checksums |
4446 |
+new Jetpack_JSON_API_Sync_Check_Endpoint( array( |
4447 |
+ 'description' => 'Check that cacheable data on the site is in sync with wordpress.com', |
4448 |
+ 'group' => '__do_not_document', |
4449 |
+ 'method' => 'GET', |
4450 |
+ 'path' => '/sites/%s/data-checksums', |
4451 |
+ 'stat' => 'data-checksums', |
4452 |
+ 'path_labels' => array( |
4453 |
+ '$site' => '(int|string) The site ID, The site domain' |
4454 |
+ ), |
4455 |
+ 'response_format' => array( |
4456 |
+ 'posts' => '(string) Posts checksum', |
4457 |
+ 'comments' => '(string) Comments checksum', |
4458 |
+ ), |
4459 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/data-checksums' |
4460 |
+) ); |
4461 |
+ |
4462 |
+// GET /sites/%s/data-histogram |
4463 |
+new Jetpack_JSON_API_Sync_Histogram_Endpoint( array( |
4464 |
+ 'description' => 'Get a histogram of checksums for certain synced data', |
4465 |
+ 'group' => '__do_not_document', |
4466 |
+ 'method' => 'GET', |
4467 |
+ 'path' => '/sites/%s/data-histogram', |
4468 |
+ 'stat' => 'data-histogram', |
4469 |
+ 'path_labels' => array( |
4470 |
+ '$site' => '(int|string) The site ID, The site domain' |
4471 |
+ ), |
4472 |
+ 'query_parameters' => array( |
4473 |
+ 'object_type' => '(string=posts) The type of object to checksum - posts, comments or options', |
4474 |
+ 'buckets' => '(int=10) The number of buckets for the checksums', |
4475 |
+ 'start_id' => '(int=0) Starting ID for the range', |
4476 |
+ 'end_id' => '(int=null) Ending ID for the range', |
4477 |
+ 'columns' => '(string) Columns to checksum', |
4478 |
+ ), |
4479 |
+ 'response_format' => array( |
4480 |
+ 'histogram' => '(array) Associative array of histograms by ID range, e.g. "500-999" => "abcd1234"' |
4481 |
+ ), |
4482 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/data-histogram' |
4483 |
+) ); |
4484 |
+ |
4485 |
+$sync_settings_response = array( |
4486 |
+ 'dequeue_max_bytes' => '(int|bool=false) Maximum bytes to read from queue in a single request', |
4487 |
+ 'sync_wait_time' => '(int|bool=false) Wait time between requests in seconds if sync threshold exceeded', |
4488 |
+ 'sync_wait_threshold' => '(int|bool=false) If a request to WPCOM exceeds this duration, wait sync_wait_time seconds before sending again', |
4489 |
+ 'upload_max_bytes' => '(int|bool=false) Maximum bytes to send in a single request', |
4490 |
+ 'upload_max_rows' => '(int|bool=false) Maximum rows to send in a single request', |
4491 |
+ 'max_queue_size' => '(int|bool=false) Maximum queue size that that the queue is allowed to expand to in DB rows to prevent the DB from filling up. Needs to also meet the max_queue_lag limit.', |
4492 |
+ 'max_queue_lag' => '(int|bool=false) Maximum queue lag in seconds used to prevent the DB from filling up. Needs to also meet the max_queue_size limit.', |
4493 |
+ 'queue_max_writes_sec' => '(int|bool=false) Maximum writes per second to allow to the queue during full sync.', |
4494 |
+ 'post_types_blacklist' => '(array|string|bool=false) List of post types to exclude from sync. Send "empty" to unset.', |
4495 |
+ 'meta_blacklist' => '(array|string|bool=false) List of meta keys to exclude from sync. Send "empty" to unset.', |
4496 |
+ 'disable' => '(int|bool=false) Set to 1 or true to disable sync entirely.', |
4497 |
+); |
4498 |
+ |
4499 |
+// GET /sites/%s/sync/settings |
4500 |
+new Jetpack_JSON_API_Sync_Get_Settings_Endpoint( array( |
4501 |
+ 'description' => 'Update sync settings', |
4502 |
+ 'method' => 'GET', |
4503 |
+ 'group' => '__do_not_document', |
4504 |
+ 'path' => '/sites/%s/sync/settings', |
4505 |
+ 'stat' => 'write-sync-settings', |
4506 |
+ 'path_labels' => array( |
4507 |
+ '$site' => '(int|string) The site ID, The site domain' |
4508 |
+ ), |
4509 |
+ 'response_format' => $sync_settings_response, |
4510 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/sync/settings' |
4511 |
+) ); |
4512 |
+ |
4513 |
+// POST /sites/%s/sync/settings |
4514 |
+new Jetpack_JSON_API_Sync_Modify_Settings_Endpoint( array( |
4515 |
+ 'description' => 'Update sync settings', |
4516 |
+ 'method' => 'POST', |
4517 |
+ 'group' => '__do_not_document', |
4518 |
+ 'path' => '/sites/%s/sync/settings', |
4519 |
+ 'stat' => 'write-sync-settings', |
4520 |
+ 'path_labels' => array( |
4521 |
+ '$site' => '(int|string) The site ID, The site domain' |
4522 |
+ ), |
4523 |
+ 'request_format' => $sync_settings_response, |
4524 |
+ 'response_format' => $sync_settings_response, |
4525 |
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/sync/settings' |
4526 |
+) ); |
4527 |
+ |
4528 |
require_once( $json_jetpack_endpoints_dir . 'class.jetpack-json-api-log-endpoint.php' ); |
4529 |
|
4530 |
new Jetpack_JSON_API_Jetpack_Log_Endpoint( array( |
4531 |
|
4532 |
diff --git a/plugins/jetpack/modules/after-the-deadline.php b/plugins/jetpack/modules/after-the-deadline.php |
4533 |
index 967a9ce..c3326e4 100644 |
4534 |
--- a/plugins/jetpack/modules/after-the-deadline.php |
4535 |
+++ b/plugins/jetpack/modules/after-the-deadline.php |
4536 |
@@ -130,7 +130,7 @@ function register_AtD_button( $buttons ) { |
4537 |
function add_AtD_tinymce_plugin( $plugin_array ) { |
4538 |
$plugin = ATD_TINYMCE_4 ? 'plugin' : 'editor_plugin'; |
4539 |
|
4540 |
- $plugin_array['AtD'] = plugins_url( 'after-the-deadline/tinymce/' . $plugin . '.js?v=' . ATD_VERSION, __FILE__ ); |
4541 |
+ $plugin_array['AtD'] = add_query_arg( 'v', ATD_VERSION, plugins_url( 'after-the-deadline/tinymce/' . $plugin . '.js', __FILE__ ) ); |
4542 |
return $plugin_array; |
4543 |
} |
4544 |
|
4545 |
|
4546 |
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.js b/plugins/jetpack/modules/carousel/jetpack-carousel.js |
4547 |
index 4601a1b..b4841cd 100644 |
4548 |
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.js |
4549 |
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.js |
4550 |
@@ -692,6 +692,14 @@ jQuery(document).ready(function($) { |
4551 |
caption.fadeOut( 'fast' ).empty(); |
4552 |
} |
4553 |
|
4554 |
+ // Record pageview in WP Stats, for each new image loaded full-screen. |
4555 |
+ if ( jetpackCarouselStrings.stats ) { |
4556 |
+ new Image().src = document.location.protocol + |
4557 |
+ '//pixel.wp.com/g.gif?' + |
4558 |
+ jetpackCarouselStrings.stats + |
4559 |
+ '&post=' + encodeURIComponent( attachmentId ) + |
4560 |
+ '&rand=' + Math.random(); |
4561 |
+ } |
4562 |
|
4563 |
// Load the images for the next and previous slides. |
4564 |
$( next ).add( previous ).each( function() { |
4565 |
|
4566 |
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.php b/plugins/jetpack/modules/carousel/jetpack-carousel.php |
4567 |
index b3d5302..3c128c2 100644 |
4568 |
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.php |
4569 |
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.php |
4570 |
@@ -82,7 +82,7 @@ class Jetpack_Carousel { |
4571 |
* |
4572 |
* @since 1.6.0 |
4573 |
* |
4574 |
- * @param bool false Should Carousel be disabled? Default to fase. |
4575 |
+ * @param bool false Should Carousel be disabled? Default to false. |
4576 |
*/ |
4577 |
return apply_filters( 'jp_carousel_maybe_disable', false ); |
4578 |
} |
4579 |
@@ -166,9 +166,9 @@ class Jetpack_Carousel { |
4580 |
'lang' => strtolower( substr( get_locale(), 0, 2 ) ), |
4581 |
'ajaxurl' => set_url_scheme( admin_url( 'admin-ajax.php' ) ), |
4582 |
'nonce' => wp_create_nonce( 'carousel_nonce' ), |
4583 |
- 'display_exif' => $this->test_1or0_option( get_option( 'carousel_display_exif' ), true ), |
4584 |
- 'display_geo' => $this->test_1or0_option( get_option( 'carousel_display_geo' ), true ), |
4585 |
- 'background_color' => $this->carousel_background_color_sanitize( get_option( 'carousel_background_color' ) ), |
4586 |
+ 'display_exif' => $this->test_1or0_option( Jetpack_Options::get_option_and_ensure_autoload( 'carousel_display_exif', true ) ), |
4587 |
+ 'display_geo' => $this->test_1or0_option( Jetpack_Options::get_option_and_ensure_autoload( 'carousel_display_geo', true ) ), |
4588 |
+ 'background_color' => $this->carousel_background_color_sanitize( Jetpack_Options::get_option_and_ensure_autoload( 'carousel_background_color', '' ) ), |
4589 |
'comment' => __( 'Comment', 'jetpack' ), |
4590 |
'post_comment' => __( 'Post Comment', 'jetpack' ), |
4591 |
'write_comment' => __( 'Write a Comment...', 'jetpack' ), |
4592 |
@@ -212,6 +212,24 @@ class Jetpack_Carousel { |
4593 |
} |
4594 |
|
4595 |
/** |
4596 |
+ * Handle WP stats for images in full-screen. |
4597 |
+ * Build string with tracking info. |
4598 |
+ */ |
4599 |
+ if ( in_array( 'stats', Jetpack::get_active_modules() ) && ! Jetpack::is_development_mode() ) { |
4600 |
+ $localize_strings['stats'] = 'blog=' . Jetpack_Options::get_option( 'id' ) . '&host=' . parse_url( get_option( 'home' ), PHP_URL_HOST ) . '&v=ext&j=' . JETPACK__API_VERSION . ':' . JETPACK__VERSION; |
4601 |
+ |
4602 |
+ // Set the stats as empty if user is logged in but logged-in users shouldn't be tracked. |
4603 |
+ if ( is_user_logged_in() && function_exists( 'stats_get_options' ) ) { |
4604 |
+ $stats_options = stats_get_options(); |
4605 |
+ $track_loggedin_users = isset( $stats_options['reg_users'] ) ? (bool) $stats_options['reg_users'] : false; |
4606 |
+ |
4607 |
+ if ( ! $track_loggedin_users ) { |
4608 |
+ $localize_strings['stats'] = ''; |
4609 |
+ } |
4610 |
+ } |
4611 |
+ } |
4612 |
+ |
4613 |
+ /** |
4614 |
* Filter the strings passed to the Carousel's js file. |
4615 |
* |
4616 |
* @module carousel |
4617 |
|
4618 |
diff --git a/plugins/jetpack/modules/comments.php b/plugins/jetpack/modules/comments.php |
4619 |
index c845677..a5acfb6 100644 |
4620 |
--- a/plugins/jetpack/modules/comments.php |
4621 |
+++ b/plugins/jetpack/modules/comments.php |
4622 |
@@ -17,15 +17,6 @@ if ( is_admin() ) { |
4623 |
require dirname( __FILE__ ) . '/comments/admin.php'; |
4624 |
} |
4625 |
|
4626 |
-Jetpack_Sync::sync_options( __FILE__, |
4627 |
- 'comment_registration', |
4628 |
- 'require_name_email', |
4629 |
- 'show_avatars', |
4630 |
- 'avatar_default', |
4631 |
- 'highlander_comment_form_prompt', |
4632 |
- 'jetpack_comment_form_color_scheme' |
4633 |
-); |
4634 |
- |
4635 |
function jetpack_comments_load() { |
4636 |
Jetpack::enable_module_configurable( __FILE__ ); |
4637 |
Jetpack::module_configuration_load( __FILE__, 'jetpack_comments_configuration_load' ); |
4638 |
|
4639 |
diff --git a/plugins/jetpack/modules/contact-form/grunion-contact-form.php b/plugins/jetpack/modules/contact-form/grunion-contact-form.php |
4640 |
index cda94cc..6eba2e7 100644 |
4641 |
--- a/plugins/jetpack/modules/contact-form/grunion-contact-form.php |
4642 |
+++ b/plugins/jetpack/modules/contact-form/grunion-contact-form.php |
4643 |
@@ -195,20 +195,24 @@ class Grunion_Contact_Form_Plugin { |
4644 |
* Display the count of new feedback entries received. It's reset when user visits the Feedback screen. |
4645 |
* |
4646 |
* @since 4.1.0 |
4647 |
+ * |
4648 |
+ * @param object $screen Information about the current screen. |
4649 |
*/ |
4650 |
function unread_count( $screen ) { |
4651 |
if ( isset( $screen->post_type ) && 'feedback' == $screen->post_type ) { |
4652 |
update_option( 'feedback_unread_count', 0 ); |
4653 |
} else { |
4654 |
global $menu; |
4655 |
- foreach ( $menu as $index => $menu_item ) { |
4656 |
- if ( 'edit.php?post_type=feedback' == $menu_item[2] ) { |
4657 |
- $unread = get_option( 'feedback_unread_count', 0 ); |
4658 |
- if ( $unread > 0 ) { |
4659 |
- $unread_count = current_user_can( 'publish_pages' ) ? " <span class='feedback-unread count-{$unread} awaiting-mod'><span class='feedback-unread-count'>" . number_format_i18n( $unread ) . "</span></span>" : ''; |
4660 |
- $menu[ $index ][0] .= $unread_count; |
4661 |
+ if ( isset( $menu ) && is_array( $menu ) && ! empty( $menu ) ) { |
4662 |
+ foreach ( $menu as $index => $menu_item ) { |
4663 |
+ if ( 'edit.php?post_type=feedback' == $menu_item[2] ) { |
4664 |
+ $unread = get_option( 'feedback_unread_count', 0 ); |
4665 |
+ if ( $unread > 0 ) { |
4666 |
+ $unread_count = current_user_can( 'publish_pages' ) ? " <span class='feedback-unread count-{$unread} awaiting-mod'><span class='feedback-unread-count'>" . number_format_i18n( $unread ) . "</span></span>" : ''; |
4667 |
+ $menu[ $index ][0] .= $unread_count; |
4668 |
+ } |
4669 |
+ break; |
4670 |
} |
4671 |
- break; |
4672 |
} |
4673 |
} |
4674 |
} |
4675 |
@@ -863,7 +867,7 @@ class Grunion_Contact_Form_Plugin { |
4676 |
* Put all the fields in `$current_row` array. |
4677 |
*/ |
4678 |
foreach ( $fields as $single_field_name ) { |
4679 |
- $current_row[] = $data[ $single_field_name ][ $i ]; |
4680 |
+ $current_row[] = $this->esc_csv( $data[ $single_field_name ][ $i ] ); |
4681 |
} |
4682 |
|
4683 |
/** |
4684 |
@@ -876,6 +880,30 @@ class Grunion_Contact_Form_Plugin { |
4685 |
} |
4686 |
|
4687 |
/** |
4688 |
+ * Escape a string to be used in a CSV context |
4689 |
+ * |
4690 |
+ * Malicious input can inject formulas into CSV files, opening up the possibility for phishing attacks and |
4691 |
+ * disclosure of sensitive information. |
4692 |
+ * |
4693 |
+ * Additionally, Excel exposes the ability to launch arbitrary commands through the DDE protocol. |
4694 |
+ * |
4695 |
+ * @see http://www.contextis.com/resources/blog/comma-separated-vulnerabilities/ |
4696 |
+ * |
4697 |
+ * @param string $field |
4698 |
+ * |
4699 |
+ * @return string |
4700 |
+ */ |
4701 |
+ function esc_csv( $field ) { |
4702 |
+ $active_content_triggers = array( '=', '+', '-', '@' ); |
4703 |
+ |
4704 |
+ if ( in_array( mb_substr( $field, 0, 1 ), $active_content_triggers, true ) ) { |
4705 |
+ $field = "'" . $field; |
4706 |
+ } |
4707 |
+ |
4708 |
+ return $field; |
4709 |
+ } |
4710 |
+ |
4711 |
+ /** |
4712 |
* Returns a string of HTML <option> items from an array of posts |
4713 |
* |
4714 |
* @return string a string of HTML <option> items |
4715 |
|
4716 |
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php |
4717 |
index 59e3355..b9e933a 100644 |
4718 |
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php |
4719 |
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php |
4720 |
@@ -246,7 +246,7 @@ class csstidy { |
4721 |
* @access private |
4722 |
* @version 1.3 |
4723 |
*/ |
4724 |
- function csstidy() { |
4725 |
+ function __construct() { |
4726 |
$this->settings['remove_bslash'] = true; |
4727 |
$this->settings['compress_colors'] = true; |
4728 |
$this->settings['compress_font-weight'] = true; |
4729 |
|
4730 |
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php |
4731 |
index 2ed9f80..b2e8eb9 100644 |
4732 |
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php |
4733 |
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php |
4734 |
@@ -47,7 +47,7 @@ class csstidy_optimise { |
4735 |
* @access private |
4736 |
* @version 1.0 |
4737 |
*/ |
4738 |
- function csstidy_optimise(&$css) { |
4739 |
+ function __construct(&$css) { |
4740 |
$this->parser = & $css; |
4741 |
$this->css = & $css->css; |
4742 |
$this->sub_value = & $css->sub_value; |
4743 |
|
4744 |
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php |
4745 |
index 080a368..21f438c 100644 |
4746 |
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php |
4747 |
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php |
4748 |
@@ -66,7 +66,7 @@ class csstidy_print { |
4749 |
* @access private |
4750 |
* @version 1.0 |
4751 |
*/ |
4752 |
- function csstidy_print(&$css) { |
4753 |
+ function __construct(&$css) { |
4754 |
$this->parser = & $css; |
4755 |
$this->css = & $css->css; |
4756 |
$this->template = & $css->template; |
4757 |
|
4758 |
diff --git a/plugins/jetpack/modules/custom-css/csstidy/data-wp.inc.php b/plugins/jetpack/modules/custom-css/csstidy/data-wp.inc.php |
4759 |
index c6427bb..b10d461 100644 |
4760 |
--- a/plugins/jetpack/modules/custom-css/csstidy/data-wp.inc.php |
4761 |
+++ b/plugins/jetpack/modules/custom-css/csstidy/data-wp.inc.php |
4762 |
@@ -87,4 +87,5 @@ $GLOBALS['csstidy']['all_properties']['object-position'] = 'CSS3.0'; |
4763 |
$GLOBALS['csstidy']['all_properties']['text-overflow'] = 'CSS3.0'; |
4764 |
$GLOBALS['csstidy']['all_properties']['zoom'] = 'CSS3.0'; |
4765 |
$GLOBALS['csstidy']['all_properties']['pointer-events'] = 'CSS3.0'; |
4766 |
+$GLOBALS['csstidy']['all_properties']['font-feature-settings'] = 'CSS3.0'; |
4767 |
|
4768 |
|
4769 |
diff --git a/plugins/jetpack/modules/custom-css/custom-css.php b/plugins/jetpack/modules/custom-css/custom-css.php |
4770 |
index 88aea4f..e3fe598 100644 |
4771 |
--- a/plugins/jetpack/modules/custom-css/custom-css.php |
4772 |
+++ b/plugins/jetpack/modules/custom-css/custom-css.php |
4773 |
@@ -522,7 +522,7 @@ class Jetpack_Custom_CSS { |
4774 |
return (bool) ( $custom_css_add === 'no' ); |
4775 |
} |
4776 |
|
4777 |
- return (bool) ( get_option( 'safecss_add' ) == 'no' ); |
4778 |
+ return (bool) ( Jetpack_Options::get_option_and_ensure_autoload( 'safecss_add', '' ) == 'no' ); |
4779 |
} |
4780 |
} |
4781 |
} |
4782 |
@@ -721,7 +721,7 @@ class Jetpack_Custom_CSS { |
4783 |
$option = Jetpack_Custom_CSS::is_preview() ? 'safecss_preview' : 'safecss'; |
4784 |
|
4785 |
if ( 'safecss' == $option ) { |
4786 |
- if ( get_option( 'safecss_revision_migrated' ) ) { |
4787 |
+ if ( Jetpack_Options::get_option_and_ensure_autoload( 'safecss_revision_migrated', '0' ) ) { |
4788 |
$safecss_post = Jetpack_Custom_CSS::get_post(); |
4789 |
|
4790 |
if ( ! empty( $safecss_post['post_content'] ) ) { |
4791 |
@@ -737,7 +737,7 @@ class Jetpack_Custom_CSS { |
4792 |
|
4793 |
// Fix for un-migrated Custom CSS |
4794 |
if ( empty( $safecss_post ) ) { |
4795 |
- $_css = get_option( 'safecss' ); |
4796 |
+ $_css = Jetpack_Options::get_option_and_ensure_autoload( 'safecss', '' ); |
4797 |
if ( !empty( $_css ) ) { |
4798 |
$css = $_css; |
4799 |
} |
4800 |
@@ -997,7 +997,7 @@ class Jetpack_Custom_CSS { |
4801 |
* @param string $str Intro text appearing above the Custom CSS editor. |
4802 |
*/ |
4803 |
echo apply_filters( 'safecss_intro_text', __( 'New to CSS? Start with a <a href="http://www.htmldog.com/guides/cssbeginner/" target="_blank">beginner tutorial</a>. Questions? |
4804 |
- Ask in the <a href="http://wordpress.org/support/forum/themes-and-templates" target="_blank">Themes and Templates forum</a>.', 'jetpack' ) ); |
4805 |
+ Ask in the <a href="https://wordpress.org/support/forum/themes-and-templates" target="_blank">Themes and Templates forum</a>.', 'jetpack' ) ); |
4806 |
?></p> |
4807 |
<p class="css-support"><?php echo __( 'Note: Custom CSS will be reset when changing themes.', 'jetpack' ); ?></p> |
4808 |
|
4809 |
@@ -1812,9 +1812,6 @@ function safecss_class() { |
4810 |
require_once( dirname( __FILE__ ) . '/csstidy/class.csstidy.php' ); |
4811 |
|
4812 |
class safecss extends csstidy_optimise { |
4813 |
- function __construct( &$css ) { |
4814 |
- return $this->csstidy_optimise( $css ); |
4815 |
- } |
4816 |
|
4817 |
function postparse() { |
4818 |
|
4819 |
|
4820 |
diff --git a/plugins/jetpack/modules/custom-post-types/portfolios.php b/plugins/jetpack/modules/custom-post-types/portfolios.php |
4821 |
index 920fcbd..8e0078b 100644 |
4822 |
--- a/plugins/jetpack/modules/custom-post-types/portfolios.php |
4823 |
+++ b/plugins/jetpack/modules/custom-post-types/portfolios.php |
4824 |
@@ -35,7 +35,10 @@ class Jetpack_Portfolio { |
4825 |
// Make sure the post types are loaded for imports |
4826 |
add_action( 'import_start', array( $this, 'register_post_types' ) ); |
4827 |
|
4828 |
- $setting = get_option( self::OPTION_NAME, '0' ); |
4829 |
+ // Add to REST API post type whitelist |
4830 |
+ add_filter( 'rest_api_allowed_post_types', array( $this, 'allow_portfolio_rest_api_type' ) ); |
4831 |
+ |
4832 |
+ $setting = Jetpack_Options::get_option_and_ensure_autoload( self::OPTION_NAME, '0' ); |
4833 |
|
4834 |
// Bail early if Portfolio option is not set and the theme doesn't declare support |
4835 |
if ( empty( $setting ) && ! $this->site_supports_custom_post_type() ) { |
4836 |
@@ -471,6 +474,15 @@ class Jetpack_Portfolio { |
4837 |
} |
4838 |
|
4839 |
/** |
4840 |
+ * Add to REST API post type whitelist |
4841 |
+ */ |
4842 |
+ function allow_portfolio_rest_api_type( $post_types ) { |
4843 |
+ $post_types[] = self::CUSTOM_POST_TYPE; |
4844 |
+ |
4845 |
+ return $post_types; |
4846 |
+ } |
4847 |
+ |
4848 |
+ /** |
4849 |
* Our [portfolio] shortcode. |
4850 |
* Prints Portfolio data styled to look good on *any* theme. |
4851 |
* |
4852 |
|
4853 |
diff --git a/plugins/jetpack/modules/custom-post-types/testimonial.php b/plugins/jetpack/modules/custom-post-types/testimonial.php |
4854 |
index 9b0e0c3..b6b1af1 100644 |
4855 |
--- a/plugins/jetpack/modules/custom-post-types/testimonial.php |
4856 |
+++ b/plugins/jetpack/modules/custom-post-types/testimonial.php |
4857 |
@@ -47,7 +47,7 @@ class Jetpack_Testimonial { |
4858 |
// Check on theme switch if theme supports CPT and setting is disabled |
4859 |
add_action( 'after_switch_theme', array( $this, 'activation_post_type_support' ) ); |
4860 |
|
4861 |
- $setting = get_option( self::OPTION_NAME, '0' ); |
4862 |
+ $setting = Jetpack_Options::get_option_and_ensure_autoload( self::OPTION_NAME, '0' ); |
4863 |
|
4864 |
// Bail early if Testimonial option is not set and the theme doesn't declare support |
4865 |
if ( empty( $setting ) && ! $this->site_supports_custom_post_type() ) { |
4866 |
|
4867 |
diff --git a/plugins/jetpack/modules/enhanced-distribution.php b/plugins/jetpack/modules/enhanced-distribution.php |
4868 |
index dd2fdab..754b90e 100644 |
4869 |
--- a/plugins/jetpack/modules/enhanced-distribution.php |
4870 |
+++ b/plugins/jetpack/modules/enhanced-distribution.php |
4871 |
@@ -11,9 +11,6 @@ |
4872 |
* Additional Search Queries: google, seo, firehose, search, broadcast, broadcasting |
4873 |
*/ |
4874 |
|
4875 |
-Jetpack_Sync::sync_posts( __FILE__ ); |
4876 |
-Jetpack_Sync::sync_comments( __FILE__ ); |
4877 |
- |
4878 |
function jetpack_enhanced_distribution_activate() { |
4879 |
Jetpack::check_privacy( __FILE__ ); |
4880 |
} |
4881 |
@@ -53,3 +50,24 @@ if ( isset( $_GET['get_freshly_pressed_data'] ) ) { |
4882 |
} |
4883 |
} |
4884 |
} |
4885 |
+ |
4886 |
+add_action( 'rss_head', 'jetpack_enhanced_distribution_feed_id' ); |
4887 |
+add_action( 'rss_item', 'jetpack_enhanced_distribution_post_id' ); |
4888 |
+add_action( 'rss2_head', 'jetpack_enhanced_distribution_feed_id' ); |
4889 |
+add_action( 'rss2_item', 'jetpack_enhanced_distribution_post_id' ); |
4890 |
+ |
4891 |
+function jetpack_enhanced_distribution_feed_id(){ |
4892 |
+ (int) $id = Jetpack_Options::get_option( 'id' ); |
4893 |
+ if ( $id > 0 ) { |
4894 |
+ $output = sprintf( '<site xmlns="com-wordpress:feed-additions:1">%d</site>', $id ); |
4895 |
+ echo $output; |
4896 |
+ } |
4897 |
+} |
4898 |
+ |
4899 |
+function jetpack_enhanced_distribution_post_id(){ |
4900 |
+ $id = get_the_ID(); |
4901 |
+ if ( $id ) { |
4902 |
+ $output = sprintf( '<post-id xmlns="com-wordpress:feed-additions:1">%d</post-id>', $id ); |
4903 |
+ echo $output; |
4904 |
+ } |
4905 |
+} |
4906 |
|
4907 |
diff --git a/plugins/jetpack/modules/gravatar-hovercards.php b/plugins/jetpack/modules/gravatar-hovercards.php |
4908 |
index d96fcba..77d4688 100644 |
4909 |
--- a/plugins/jetpack/modules/gravatar-hovercards.php |
4910 |
+++ b/plugins/jetpack/modules/gravatar-hovercards.php |
4911 |
@@ -181,7 +181,7 @@ function grofiles_attach_cards() { |
4912 |
} |
4913 |
|
4914 |
// Is the display of Gravatar Hovercards disabled? |
4915 |
- if ( 'disabled' == get_option( 'gravatar_disable_hovercards' ) ) { |
4916 |
+ if ( 'disabled' == Jetpack_Options::get_option_and_ensure_autoload( 'gravatar_disable_hovercards', '0' ) ) { |
4917 |
return; |
4918 |
} |
4919 |
|
4920 |
|
4921 |
diff --git a/plugins/jetpack/modules/infinite-scroll.php b/plugins/jetpack/modules/infinite-scroll.php |
4922 |
index 20d326e..8aacd4c 100644 |
4923 |
--- a/plugins/jetpack/modules/infinite-scroll.php |
4924 |
+++ b/plugins/jetpack/modules/infinite-scroll.php |
4925 |
@@ -171,7 +171,7 @@ class Jetpack_Infinite_Scroll_Extras { |
4926 |
} |
4927 |
|
4928 |
// Check if Google Analytics tracking is requested |
4929 |
- $settings['google_analytics'] = (bool) get_option( $this->option_name_google_analytics ); |
4930 |
+ $settings['google_analytics'] = (bool) Jetpack_Options::get_option_and_ensure_autoload( $this->option_name_google_analytics, 0 ); |
4931 |
|
4932 |
return $settings; |
4933 |
} |
4934 |
|
4935 |
diff --git a/plugins/jetpack/modules/infinite-scroll/infinity.js b/plugins/jetpack/modules/infinite-scroll/infinity.js |
4936 |
index d2827a3..1100124 100644 |
4937 |
--- a/plugins/jetpack/modules/infinite-scroll/infinity.js |
4938 |
+++ b/plugins/jetpack/modules/infinite-scroll/infinity.js |
4939 |
@@ -252,15 +252,8 @@ Scroller.prototype.refresh = function() { |
4940 |
return; |
4941 |
} |
4942 |
|
4943 |
- // If there are no remaining posts... |
4944 |
- if ( response.type == 'empty' ) { |
4945 |
- // Disable the scroller. |
4946 |
- self.disabled = true; |
4947 |
- // Update body classes, allowing the footer to return to static positioning |
4948 |
- self.body.addClass( 'infinity-end' ).removeClass( 'infinity-success' ); |
4949 |
- |
4950 |
// If we've succeeded... |
4951 |
- } else if ( response.type == 'success' ) { |
4952 |
+ if ( response.type == 'success' ) { |
4953 |
// If additional scripts are required by the incoming set of posts, parse them |
4954 |
if ( response.scripts ) { |
4955 |
$( response.scripts ).each( function() { |
4956 |
@@ -356,6 +349,9 @@ Scroller.prototype.refresh = function() { |
4957 |
self.body.trigger( 'infinite-scroll-posts-more' ); |
4958 |
} |
4959 |
} |
4960 |
+ } else if ( response.lastbatch ) { |
4961 |
+ self.disabled = true; |
4962 |
+ self.body.addClass( 'infinity-end' ).removeClass( 'infinity-success' ); |
4963 |
} |
4964 |
|
4965 |
// Update currentday to the latest value returned from the server |
4966 |
|
4967 |
diff --git a/plugins/jetpack/modules/infinite-scroll/infinity.php b/plugins/jetpack/modules/infinite-scroll/infinity.php |
4968 |
index 0aba8d2..c4810fb 100644 |
4969 |
--- a/plugins/jetpack/modules/infinite-scroll/infinity.php |
4970 |
+++ b/plugins/jetpack/modules/infinite-scroll/infinity.php |
4971 |
@@ -255,7 +255,7 @@ class The_Neverending_Home_Page { |
4972 |
self::$settings = apply_filters( 'infinite_scroll_settings', $settings ); |
4973 |
} |
4974 |
|
4975 |
- /** This filter is documented in modules/infinite-scroll/infinity.php */ |
4976 |
+ /** This filter is already documented in modules/infinite-scroll/infinity.php */ |
4977 |
return (object) apply_filters( 'infinite_scroll_settings', self::$settings ); |
4978 |
} |
4979 |
|
4980 |
@@ -300,7 +300,12 @@ class The_Neverending_Home_Page { |
4981 |
* Is this guaranteed to be the last batch of posts? |
4982 |
*/ |
4983 |
static function is_last_batch() { |
4984 |
- return (bool) ( count( self::wp_query()->posts ) < self::get_settings()->posts_per_page ); |
4985 |
+ $post_type = get_post_type(); |
4986 |
+ $entries = wp_count_posts( empty( $post_type ) ? 'post' : $post_type )->publish; |
4987 |
+ if ( self::wp_query()->get( 'paged' ) && self::wp_query()->get( 'paged' ) > 1 ) { |
4988 |
+ $entries -= self::get_settings()->posts_per_page * self::wp_query()->get( 'paged' ); |
4989 |
+ } |
4990 |
+ return $entries <= self::get_settings()->posts_per_page; |
4991 |
} |
4992 |
|
4993 |
/** |
4994 |
@@ -369,18 +374,25 @@ class The_Neverending_Home_Page { |
4995 |
if ( empty( $id ) ) |
4996 |
return; |
4997 |
|
4998 |
+ // Add our scripts. |
4999 |
+ wp_register_script( 'the-neverending-homepage', plugins_url( 'infinity.js', __FILE__ ), array( 'jquery' ), '4.0.0', true ); |
5000 |
+ |
5001 |
+ // Add our default styles. |
5002 |
+ wp_register_style( 'the-neverending-homepage', plugins_url( 'infinity.css', __FILE__ ), array(), '20140422' ); |
5003 |
+ |
5004 |
// Make sure there are enough posts for IS |
5005 |
- if ( 'click' == self::get_settings()->type && self::is_last_batch() ) |
5006 |
+ if ( self::is_last_batch() ) { |
5007 |
return; |
5008 |
+ } |
5009 |
|
5010 |
// Add a class to the body. |
5011 |
add_filter( 'body_class', array( $this, 'body_class' ) ); |
5012 |
|
5013 |
// Add our scripts. |
5014 |
- wp_enqueue_script( 'the-neverending-homepage', plugins_url( 'infinity.js', __FILE__ ), array( 'jquery' ), '4.0.0', true ); |
5015 |
+ wp_enqueue_script( 'the-neverending-homepage' ); |
5016 |
|
5017 |
// Add our default styles. |
5018 |
- wp_enqueue_style( 'the-neverending-homepage', plugins_url( 'infinity.css', __FILE__ ), array(), '20140422' ); |
5019 |
+ wp_enqueue_style( 'the-neverending-homepage' ); |
5020 |
|
5021 |
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_spinner_scripts' ) ); |
5022 |
|
5023 |
@@ -735,6 +747,7 @@ class The_Neverending_Home_Page { |
5024 |
} |
5025 |
} |
5026 |
} |
5027 |
+ |
5028 |
unset( $post_type ); |
5029 |
|
5030 |
// Base JS settings |
5031 |
@@ -1429,7 +1442,7 @@ class The_Neverending_Home_Page { |
5032 |
*/ |
5033 |
private function default_footer() { |
5034 |
$credits = sprintf( |
5035 |
- '<a href="http://wordpress.org/" target="_blank" rel="generator">%1$s</a> ', |
5036 |
+ '<a href="https://wordpress.org/" target="_blank" rel="generator">%1$s</a> ', |
5037 |
__( 'Proudly powered by WordPress', 'jetpack' ) |
5038 |
); |
5039 |
$credits .= sprintf( |
5040 |
|
5041 |
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentyeleven.php b/plugins/jetpack/modules/infinite-scroll/themes/twentyeleven.php |
5042 |
index ff6f787..d7f21e3 100644 |
5043 |
--- a/plugins/jetpack/modules/infinite-scroll/themes/twentyeleven.php |
5044 |
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentyeleven.php |
5045 |
@@ -20,8 +20,10 @@ add_action( 'init', 'twenty_eleven_infinite_scroll_init' ); |
5046 |
* Enqueue CSS stylesheet with theme styles for infinity. |
5047 |
*/ |
5048 |
function twenty_eleven_infinite_scroll_enqueue_styles() { |
5049 |
- // Add theme specific styles. |
5050 |
- wp_enqueue_style( 'infinity-twentyeleven', plugins_url( 'twentyeleven.css', __FILE__ ), array( 'the-neverending-homepage' ), '20121002' ); |
5051 |
+ if ( wp_script_is( 'the-neverending-homepage' ) ) { |
5052 |
+ // Add theme specific styles. |
5053 |
+ wp_enqueue_style( 'infinity-twentyeleven', plugins_url( 'twentyeleven.css', __FILE__ ), array( 'the-neverending-homepage' ), '20121002' ); |
5054 |
+ } |
5055 |
} |
5056 |
add_action( 'wp_enqueue_scripts', 'twenty_eleven_infinite_scroll_enqueue_styles', 25 ); |
5057 |
|
5058 |
|
5059 |
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentyfifteen.php b/plugins/jetpack/modules/infinite-scroll/themes/twentyfifteen.php |
5060 |
index e47a7c2..a94108f 100644 |
5061 |
--- a/plugins/jetpack/modules/infinite-scroll/themes/twentyfifteen.php |
5062 |
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentyfifteen.php |
5063 |
@@ -20,7 +20,9 @@ add_action( 'after_setup_theme', 'twentyfifteen_infinite_scroll_init' ); |
5064 |
* Enqueue CSS stylesheet with theme styles for Infinite Scroll. |
5065 |
*/ |
5066 |
function twentyfifteen_infinite_scroll_enqueue_styles() { |
5067 |
- wp_enqueue_style( 'infinity-twentyfifteen', plugins_url( 'twentyfifteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20141022' ); |
5068 |
- wp_style_add_data( 'infinity-twentyfifteen', 'rtl', 'replace' ); |
5069 |
+ if ( wp_script_is( 'the-neverending-homepage' ) ) { |
5070 |
+ wp_enqueue_style( 'infinity-twentyfifteen', plugins_url( 'twentyfifteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20141022' ); |
5071 |
+ wp_style_add_data( 'infinity-twentyfifteen', 'rtl', 'replace' ); |
5072 |
+ } |
5073 |
} |
5074 |
add_action( 'wp_enqueue_scripts', 'twentyfifteen_infinite_scroll_enqueue_styles', 25 ); |
5075 |
|
5076 |
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentyfourteen.php b/plugins/jetpack/modules/infinite-scroll/themes/twentyfourteen.php |
5077 |
index f6ddc70..22ae384 100644 |
5078 |
--- a/plugins/jetpack/modules/infinite-scroll/themes/twentyfourteen.php |
5079 |
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentyfourteen.php |
5080 |
@@ -42,6 +42,8 @@ if ( function_exists( 'jetpack_is_mobile' ) ) { |
5081 |
* Enqueue CSS stylesheet with theme styles for Infinite Scroll. |
5082 |
*/ |
5083 |
function twentyfourteen_infinite_scroll_enqueue_styles() { |
5084 |
- wp_enqueue_style( 'infinity-twentyfourteen', plugins_url( 'twentyfourteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20131118' ); |
5085 |
+ if ( wp_script_is( 'the-neverending-homepage' ) ) { |
5086 |
+ wp_enqueue_style( 'infinity-twentyfourteen', plugins_url( 'twentyfourteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20131118' ); |
5087 |
+ } |
5088 |
} |
5089 |
add_action( 'wp_enqueue_scripts', 'twentyfourteen_infinite_scroll_enqueue_styles', 25 ); |
5090 |
\ No newline at end of file |
5091 |
|
5092 |
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php |
5093 |
index 99af00e..723d3ce 100644 |
5094 |
--- a/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php |
5095 |
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php |
5096 |
@@ -35,7 +35,9 @@ function twentysixteen_infinite_scroll_render() { |
5097 |
* Enqueue CSS stylesheet with theme styles for Infinite Scroll. |
5098 |
*/ |
5099 |
function twentysixteen_infinite_scroll_enqueue_styles() { |
5100 |
- wp_enqueue_style( 'infinity-twentysixteen', plugins_url( 'twentysixteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20151102' ); |
5101 |
- wp_style_add_data( 'infinity-twentysixteen', 'rtl', 'replace' ); |
5102 |
+ if ( wp_script_is( 'the-neverending-homepage' ) ) { |
5103 |
+ wp_enqueue_style( 'infinity-twentysixteen', plugins_url( 'twentysixteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20151102' ); |
5104 |
+ wp_style_add_data( 'infinity-twentysixteen', 'rtl', 'replace' ); |
5105 |
+ } |
5106 |
} |
5107 |
add_action( 'wp_enqueue_scripts', 'twentysixteen_infinite_scroll_enqueue_styles', 25 ); |
5108 |
|
5109 |
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentyten.php b/plugins/jetpack/modules/infinite-scroll/themes/twentyten.php |
5110 |
index 094cef9..a087238 100644 |
5111 |
--- a/plugins/jetpack/modules/infinite-scroll/themes/twentyten.php |
5112 |
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentyten.php |
5113 |
@@ -31,8 +31,10 @@ function twenty_ten_infinite_scroll_render() { |
5114 |
* Enqueue CSS stylesheet with theme styles for infinity. |
5115 |
*/ |
5116 |
function twenty_ten_infinite_scroll_enqueue_styles() { |
5117 |
- // Add theme specific styles. |
5118 |
- wp_enqueue_style( 'infinity-twentyten', plugins_url( 'twentyten.css', __FILE__ ), array( 'the-neverending-homepage' ), '20121002' ); |
5119 |
+ if ( wp_script_is( 'the-neverending-homepage' ) ) { |
5120 |
+ // Add theme specific styles. |
5121 |
+ wp_enqueue_style( 'infinity-twentyten', plugins_url( 'twentyten.css', __FILE__ ), array( 'the-neverending-homepage' ), '20121002' ); |
5122 |
+ } |
5123 |
} |
5124 |
add_action( 'wp_enqueue_scripts', 'twenty_ten_infinite_scroll_enqueue_styles', 25 ); |
5125 |
|
5126 |
|
5127 |
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentythirteen.php b/plugins/jetpack/modules/infinite-scroll/themes/twentythirteen.php |
5128 |
index dbc18c7..85490b4 100644 |
5129 |
--- a/plugins/jetpack/modules/infinite-scroll/themes/twentythirteen.php |
5130 |
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentythirteen.php |
5131 |
@@ -21,6 +21,8 @@ add_action( 'after_setup_theme', 'twentythirteen_infinite_scroll_init' ); |
5132 |
* Enqueue CSS stylesheet with theme styles for Infinite Scroll. |
5133 |
*/ |
5134 |
function twentythirteen_infinite_scroll_enqueue_styles() { |
5135 |
- wp_enqueue_style( 'infinity-twentythirteen', plugins_url( 'twentythirteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20130409' ); |
5136 |
+ if ( wp_script_is( 'the-neverending-homepage' ) ) { |
5137 |
+ wp_enqueue_style( 'infinity-twentythirteen', plugins_url( 'twentythirteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20130409' ); |
5138 |
+ } |
5139 |
} |
5140 |
add_action( 'wp_enqueue_scripts', 'twentythirteen_infinite_scroll_enqueue_styles', 25 ); |
5141 |
\ No newline at end of file |
5142 |
|
5143 |
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentytwelve.php b/plugins/jetpack/modules/infinite-scroll/themes/twentytwelve.php |
5144 |
index f8b7701..02e802e 100644 |
5145 |
--- a/plugins/jetpack/modules/infinite-scroll/themes/twentytwelve.php |
5146 |
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentytwelve.php |
5147 |
@@ -20,8 +20,10 @@ add_action( 'after_setup_theme', 'twenty_twelve_infinite_scroll_init' ); |
5148 |
* Enqueue CSS stylesheet with theme styles for infinity. |
5149 |
*/ |
5150 |
function twenty_twelve_infinite_scroll_enqueue_styles() { |
5151 |
- // Add theme specific styles. |
5152 |
- wp_enqueue_style( 'infinity-twentytwelve', plugins_url( 'twentytwelve.css', __FILE__ ), array( 'the-neverending-homepage' ), '20120817' ); |
5153 |
+ if ( wp_script_is( 'the-neverending-homepage' ) ) { |
5154 |
+ // Add theme specific styles. |
5155 |
+ wp_enqueue_style( 'infinity-twentytwelve', plugins_url( 'twentytwelve.css', __FILE__ ), array( 'the-neverending-homepage' ), '20120817' ); |
5156 |
+ } |
5157 |
} |
5158 |
add_action( 'wp_enqueue_scripts', 'twenty_twelve_infinite_scroll_enqueue_styles', 25 ); |
5159 |
|
5160 |
|
5161 |
diff --git a/plugins/jetpack/modules/json-api.php b/plugins/jetpack/modules/json-api.php |
5162 |
index aff55d0..069c97c 100644 |
5163 |
--- a/plugins/jetpack/modules/json-api.php |
5164 |
+++ b/plugins/jetpack/modules/json-api.php |
5165 |
@@ -8,7 +8,4 @@ |
5166 |
* Auto Activate: Public |
5167 |
* Module Tags: Writing, Developers |
5168 |
* Additional Search Queries: api, rest, develop, developers, json, klout, oauth |
5169 |
- */ |
5170 |
- |
5171 |
-add_action( 'jetpack_activate_module_json-api', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); |
5172 |
-add_action( 'jetpack_deactivate_module_json-api', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); |
5173 |
+ */ |
5174 |
\ No newline at end of file |
5175 |
|
5176 |
diff --git a/plugins/jetpack/modules/likes.php b/plugins/jetpack/modules/likes.php |
5177 |
index 33dacce..1d1ad82 100644 |
5178 |
--- a/plugins/jetpack/modules/likes.php |
5179 |
+++ b/plugins/jetpack/modules/likes.php |
5180 |
@@ -38,9 +38,6 @@ class Jetpack_Likes { |
5181 |
add_action( 'admin_init', array( $this, 'admin_init' ) ); |
5182 |
|
5183 |
if ( $this->in_jetpack ) { |
5184 |
- add_action( 'jetpack_activate_module_likes', array( $this, 'maybe_sync_content' ) ); |
5185 |
- add_action( 'jetpack_activate_module_likes', array( $this, 'module_toggle' ) ); |
5186 |
- add_action( 'jetpack_deactivate_module_likes', array( $this, 'module_toggle' ) ); |
5187 |
add_action( 'jetpack_activate_module_likes', array( $this, 'set_social_notifications_like' ) ); |
5188 |
add_action( 'jetpack_deactivate_module_likes', array( $this, 'delete_social_notifications_like' ) ); |
5189 |
|
5190 |
@@ -70,9 +67,6 @@ class Jetpack_Likes { |
5191 |
add_filter( 'sharing_meta_box_title', array( $this, 'add_likes_to_sharing_meta_box_title' ) ); |
5192 |
add_action( 'start_sharing_meta_box_content', array( $this, 'meta_box_content' ) ); |
5193 |
} |
5194 |
- |
5195 |
- Jetpack_Sync::sync_options( __FILE__, 'social_notifications_like' ); |
5196 |
- |
5197 |
} else { // wpcom |
5198 |
add_action( 'wpmu_new_blog', array( $this, 'enable_comment_likes' ), 10, 1 ); |
5199 |
add_action( 'admin_init', array( $this, 'add_meta_box' ) ); |
5200 |
@@ -92,17 +86,6 @@ class Jetpack_Likes { |
5201 |
add_action( 'sharing_admin_update', array( $this, 'admin_settings_callback' ), 20 ); |
5202 |
} |
5203 |
|
5204 |
- function maybe_sync_content() { |
5205 |
- if ( Jetpack::init()->sync->reindex_needed() ) { |
5206 |
- Jetpack::init()->sync->reindex_trigger(); |
5207 |
- } |
5208 |
- } |
5209 |
- |
5210 |
- function module_toggle() { |
5211 |
- $jetpack = Jetpack::init(); |
5212 |
- $jetpack->sync->register( 'noop' ); |
5213 |
- } |
5214 |
- |
5215 |
/** |
5216 |
* Set the social_notifications_like option to `on` when the Likes module is activated. |
5217 |
* |
5218 |
@@ -140,14 +123,14 @@ class Jetpack_Likes { |
5219 |
// Do we really need `admin_styles`? With the new admin UI, it's breaking some bits. |
5220 |
// Jetpack::init()->admin_styles(); |
5221 |
} |
5222 |
+ |
5223 |
/** |
5224 |
- * Load style on the front end. |
5225 |
+ * Load scripts and styles for front end. |
5226 |
* @return null |
5227 |
*/ |
5228 |
function load_styles_register_scripts() { |
5229 |
- |
5230 |
- wp_enqueue_style( 'jetpack_likes', plugins_url( 'likes/style.css', __FILE__ ), array(), JETPACK__VERSION ); |
5231 |
- if( $this->in_jetpack ) { |
5232 |
+ if ( $this->in_jetpack ) { |
5233 |
+ wp_enqueue_style( 'jetpack_likes', plugins_url( 'likes/style.css', __FILE__ ), array(), JETPACK__VERSION ); |
5234 |
$this->register_scripts(); |
5235 |
} |
5236 |
} |
5237 |
@@ -164,9 +147,8 @@ class Jetpack_Likes { |
5238 |
|
5239 |
/** |
5240 |
* Replaces the "Sharing" title for the post screen metabox with "Likes and Shares" |
5241 |
- * @param string $title The current title of the metabox, not needed/used. |
5242 |
*/ |
5243 |
- function add_likes_to_sharing_meta_box_title( $title ) { |
5244 |
+ function add_likes_to_sharing_meta_box_title() { |
5245 |
return __( 'Likes and Shares', 'jetpack' ); |
5246 |
} |
5247 |
|
5248 |
@@ -233,7 +215,6 @@ class Jetpack_Likes { |
5249 |
// site like setting. |
5250 |
if ( ( $this->is_enabled_sitewide() && empty( $_POST['wpl_enable_post_likes'] ) ) || ( ! $this->is_enabled_sitewide() && !empty( $_POST['wpl_enable_post_likes'] ) ) ) { |
5251 |
update_post_meta( $post_id, 'switch_like_status', 1 ); |
5252 |
- //$g_gif = file_get_contents( 'http://pixel.wp.com/g.gif?v=wpcom-no-pv&x_likes=switched_post_like_status' ); @todo stat |
5253 |
} else { |
5254 |
delete_post_meta( $post_id, 'switch_like_status' ); |
5255 |
} |
5256 |
@@ -635,16 +616,6 @@ class Jetpack_Likes { |
5257 |
add_action( 'manage_pages_custom_column', array( $this, 'likes_edit_column' ), 10, 2 ); |
5258 |
add_action( 'admin_print_styles-edit.php', array( $this, 'load_admin_css' ) ); |
5259 |
add_action( "admin_print_scripts-edit.php", array( $this, 'enqueue_admin_scripts' ) ); |
5260 |
- |
5261 |
- |
5262 |
- if ( $this->in_jetpack ) { |
5263 |
- $post_stati = get_post_stati( array( 'public' => true ) ); // All public post stati |
5264 |
- $post_stati[] = 'private'; // Content from private stati will be redacted |
5265 |
- Jetpack_Sync::sync_posts( __FILE__, array( |
5266 |
- 'post_types' => get_post_types( array( 'public' => true ) ), |
5267 |
- 'post_stati' => $post_stati, |
5268 |
- ) ); |
5269 |
- } |
5270 |
} |
5271 |
|
5272 |
function action_init() { |
5273 |
@@ -674,6 +645,7 @@ class Jetpack_Likes { |
5274 |
wp_enqueue_script( 'postmessage', '/wp-content/js/postmessage.js', array( 'jquery' ), JETPACK__VERSION, false ); |
5275 |
wp_enqueue_script( 'jquery_inview', '/wp-content/js/jquery/jquery.inview.js', array( 'jquery' ), JETPACK__VERSION, false ); |
5276 |
wp_enqueue_script( 'jetpack_resize', '/wp-content/js/jquery/jquery.jetpack-resize.js', array( 'jquery' ), JETPACK__VERSION, false ); |
5277 |
+ wp_enqueue_script( 'jetpack_likes_queuehandler', plugins_url( 'queuehandler.js' , __FILE__ ), array( 'jquery', 'postmessage', 'jetpack_resize', 'jquery_inview' ), JETPACK__VERSION, true ); |
5278 |
wp_enqueue_style( 'jetpack_likes', plugins_url( 'jetpack-likes.css', __FILE__ ), array(), JETPACK__VERSION ); |
5279 |
} |
5280 |
} |
5281 |
@@ -682,7 +654,6 @@ class Jetpack_Likes { |
5282 |
* Register scripts |
5283 |
*/ |
5284 |
function register_scripts() { |
5285 |
- // Lets register all the sciprts |
5286 |
wp_register_script( 'postmessage', plugins_url( '_inc/postmessage.js', dirname(__FILE__) ), array( 'jquery' ), JETPACK__VERSION, false ); |
5287 |
wp_register_script( 'jquery_inview', plugins_url( '_inc/jquery.inview.js', dirname(__FILE__) ), array( 'jquery' ), JETPACK__VERSION, false ); |
5288 |
wp_register_script( 'jetpack_resize', plugins_url( '_inc/jquery.jetpack-resize.js' , dirname(__FILE__) ), array( 'jquery' ), JETPACK__VERSION, false ); |
5289 |
@@ -693,66 +664,42 @@ class Jetpack_Likes { |
5290 |
* Load the CSS needed for the wp-admin area. |
5291 |
*/ |
5292 |
function load_admin_css() { |
5293 |
- ?> |
5294 |
- <?php if ( version_compare( $GLOBALS['wp_version'], '4.3-alpha', '>=' ) ) : ?> |
5295 |
- <style type="text/css"> |
5296 |
- .vers img { display: none; } |
5297 |
- .metabox-prefs .vers img { display: inline; } |
5298 |
- .fixed .column-likes { width: 5.5em; padding: 8px 0; text-align: left; } |
5299 |
- .fixed .column-stats { width: 5em; } |
5300 |
- .fixed .column-likes .post-com-count { |
5301 |
- -webkit-box-sizing: border-box; |
5302 |
- -moz-box-sizing: border-box; |
5303 |
- box-sizing: border-box; |
5304 |
- display: inline-block; |
5305 |
- padding: 0 8px; |
5306 |
- height: 2em; |
5307 |
- margin-top: 5px; |
5308 |
- -webkit-border-radius: 5px; |
5309 |
- border-radius: 5px; |
5310 |
- background-color: #72777C; |
5311 |
- color: #FFF; |
5312 |
- font-size: 11px; |
5313 |
- line-height: 21px; |
5314 |
- } |
5315 |
- .fixed .column-likes .post-com-count::after { border: none !important; } |
5316 |
- .fixed .column-likes .post-com-count:hover { background-color: #0073AA; } |
5317 |
- .fixed .column-likes .vers:before { |
5318 |
- font: normal 20px/1 dashicons; |
5319 |
- content: '\f155'; |
5320 |
- speak: none; |
5321 |
- -webkit-font-smoothing: antialiased; |
5322 |
- -moz-osx-font-smoothing: grayscale; |
5323 |
- } |
5324 |
- @media screen and (max-width: 782px) { |
5325 |
- .fixed .column-likes { |
5326 |
- display: none; |
5327 |
- } |
5328 |
- } |
5329 |
- </style> |
5330 |
- <?php else : // @todo Remove when 4.3 is minimum ?> |
5331 |
- <style type="text/css"> |
5332 |
- .fixed .column-likes { width: 5em; padding-top: 8px; text-align: center !important; } |
5333 |
- .fixed .column-stats { width: 5em; } |
5334 |
- .fixed .column-likes .post-com-count { background-image: none; } |
5335 |
- .fixed .column-likes .post-com-count::after { border: none !important; } |
5336 |
- .fixed .column-likes .comment-count { background-color: #bbb; } |
5337 |
- .fixed .column-likes .comment-count:hover { background-color: #2ea2cc; } |
5338 |
- .fixed .column-likes .vers img { display: none; } |
5339 |
- .fixed .column-likes .vers:before { |
5340 |
- font: normal 20px/1 dashicons; |
5341 |
- content: '\f155'; |
5342 |
- speak: none; |
5343 |
- -webkit-font-smoothing: antialiased; |
5344 |
- -moz-osx-font-smoothing: grayscale; |
5345 |
- } |
5346 |
- @media screen and (max-width: 782px) { |
5347 |
- .fixed .column-likes { |
5348 |
- display: none; |
5349 |
- } |
5350 |
+ ?> |
5351 |
+ <style type="text/css"> |
5352 |
+ .vers img { display: none; } |
5353 |
+ .metabox-prefs .vers img { display: inline; } |
5354 |
+ .fixed .column-likes { width: 5.5em; padding: 8px 0; text-align: left; } |
5355 |
+ .fixed .column-stats { width: 5em; } |
5356 |
+ .fixed .column-likes .post-com-count { |
5357 |
+ -webkit-box-sizing: border-box; |
5358 |
+ -moz-box-sizing: border-box; |
5359 |
+ box-sizing: border-box; |
5360 |
+ display: inline-block; |
5361 |
+ padding: 0 8px; |
5362 |
+ height: 2em; |
5363 |
+ margin-top: 5px; |
5364 |
+ -webkit-border-radius: 5px; |
5365 |
+ border-radius: 5px; |
5366 |
+ background-color: #72777C; |
5367 |
+ color: #FFF; |
5368 |
+ font-size: 11px; |
5369 |
+ line-height: 21px; |
5370 |
+ } |
5371 |
+ .fixed .column-likes .post-com-count::after { border: none !important; } |
5372 |
+ .fixed .column-likes .post-com-count:hover { background-color: #0073AA; } |
5373 |
+ .fixed .column-likes .vers:before { |
5374 |
+ font: normal 20px/1 dashicons; |
5375 |
+ content: '\f155'; |
5376 |
+ speak: none; |
5377 |
+ -webkit-font-smoothing: antialiased; |
5378 |
+ -moz-osx-font-smoothing: grayscale; |
5379 |
+ } |
5380 |
+ @media screen and (max-width: 782px) { |
5381 |
+ .fixed .column-likes { |
5382 |
+ display: none; |
5383 |
} |
5384 |
- </style> |
5385 |
- <?php endif; ?> |
5386 |
+ } |
5387 |
+ </style> |
5388 |
<?php |
5389 |
} |
5390 |
|
5391 |
@@ -841,11 +788,11 @@ class Jetpack_Likes { |
5392 |
$wrapper = sprintf( 'like-post-wrapper-%1$d-%2$d-%3$s', $blog_id, $post->ID, $uniqid ); |
5393 |
|
5394 |
$html = "<div class='sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded' id='$wrapper' data-src='$src' data-name='$name'><h3 class='sd-title'>" . esc_html__( 'Like this:', 'jetpack' ) . '</h3>'; |
5395 |
- $html .= "<div class='likes-widget-placeholder post-likes-widget-placeholder' style='height:55px'><span class='button'><span>" . esc_html__( 'Like', 'jetpack' ) . '</span></span> <span class="loading">' . esc_html__( 'Loading...', 'jetpack' ) . '</span></div>'; |
5396 |
+ $html .= "<div class='likes-widget-placeholder post-likes-widget-placeholder' style='height: 55px;'><span class='button'><span>" . esc_html__( 'Like', 'jetpack' ) . '</span></span> <span class="loading">' . esc_html__( 'Loading...', 'jetpack' ) . '</span></div>'; |
5397 |
$html .= "<span class='sd-text-color'></span><a class='sd-link-color'></a>"; |
5398 |
$html .= '</div>'; |
5399 |
|
5400 |
- // Lets make sure that the script is enqued |
5401 |
+ // Let's make sure that the script is enqueued |
5402 |
wp_enqueue_script( 'jetpack_likes_queuehandler' ); |
5403 |
|
5404 |
return $content . $html; |
5405 |
@@ -1020,8 +967,8 @@ class Jetpack_Likes { |
5406 |
* similar logic and filters apply here, too. |
5407 |
*/ |
5408 |
function is_likes_visible() { |
5409 |
+ global $post, $wp_current_filter; // Used to apply 'sharing_show' filter |
5410 |
|
5411 |
- global $post, $wp_current_filter; // Used to apply 'sharing_show' filter |
5412 |
// @todo: Remove this block when 4.5 is the minimum |
5413 |
global $wp_version; |
5414 |
$comment_popup = false; |
5415 |
@@ -1122,7 +1069,7 @@ class Jetpack_Likes { |
5416 |
* |
5417 |
* @param bool $option Are Likes enabled sitewide. |
5418 |
*/ |
5419 |
- return (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) ); |
5420 |
+ return (bool) apply_filters( 'wpl_is_enabled_sitewide', ! Jetpack_Options::get_option_and_ensure_autoload( 'disabled_likes', 0 ) ); |
5421 |
} |
5422 |
|
5423 |
/** |
5424 |
@@ -1145,7 +1092,6 @@ class Jetpack_Likes { |
5425 |
|
5426 |
/** |
5427 |
* Returns if comment likes are enabled. Defaults to 'off' |
5428 |
- * @todo decide what the default should be |
5429 |
* @return boolean true if we should show comment likes, false if not |
5430 |
*/ |
5431 |
function is_comments_enabled() { |
5432 |
|
5433 |
diff --git a/plugins/jetpack/modules/manage.php b/plugins/jetpack/modules/manage.php |
5434 |
index e084e9d..efc8141 100644 |
5435 |
--- a/plugins/jetpack/modules/manage.php |
5436 |
+++ b/plugins/jetpack/modules/manage.php |
5437 |
@@ -12,9 +12,6 @@ |
5438 |
* Feature: Recommended |
5439 |
* Additional Search Queries: manage, management, remote |
5440 |
*/ |
5441 |
- |
5442 |
-add_action( 'jetpack_activate_module_manage', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); |
5443 |
-add_action( 'jetpack_deactivate_module_manage', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); |
5444 |
add_action( 'customize_register', 'add_wpcom_to_allowed_redirect_hosts' ); |
5445 |
|
5446 |
// Add wordpress.com to the safe redirect whitelist if the Manage module is enabled |
5447 |
@@ -34,16 +31,6 @@ function allow_wpcom_domain( $domains ) { |
5448 |
return array_unique( $domains ); |
5449 |
} |
5450 |
|
5451 |
-// Re add sync for non public posts when the optin is selected in Calypso. |
5452 |
-// This will only work if you have manage enabled as well. |
5453 |
-if ( Jetpack_Options::get_option( 'sync_non_public_post_stati' ) ) { |
5454 |
- $sync_options = array( |
5455 |
- 'post_types' => get_post_types( array( 'public' => true ) ), |
5456 |
- 'post_stati' => get_post_stati(), |
5457 |
- ); |
5458 |
- Jetpack_Sync::sync_posts( __FILE__, $sync_options ); |
5459 |
-} |
5460 |
- |
5461 |
Jetpack::module_configuration_screen( 'manage', 'jetpack_manage_config_screen' ); |
5462 |
function jetpack_manage_config_screen() { |
5463 |
include ( JETPACK__PLUGIN_DIR . 'modules/manage/confirm-admin.php' ); |
5464 |
|
5465 |
diff --git a/plugins/jetpack/modules/manage/confirm-admin.php b/plugins/jetpack/modules/manage/confirm-admin.php |
5466 |
index ed7e2e9..c8f105f 100644 |
5467 |
--- a/plugins/jetpack/modules/manage/confirm-admin.php |
5468 |
+++ b/plugins/jetpack/modules/manage/confirm-admin.php |
5469 |
@@ -22,6 +22,11 @@ switch( $section ) { |
5470 |
$link_title = __( 'Manage Your Plugins', 'jetpack' ); |
5471 |
break; |
5472 |
|
5473 |
+ case 'plugins-setup': |
5474 |
+ $link = 'https://wordpress.com/plugins/setup/' . $normalized_site_url; |
5475 |
+ $link_title = __( 'Back to Plan Setup', 'jetpack' ); |
5476 |
+ break; |
5477 |
+ |
5478 |
case 'themes': |
5479 |
$link = 'https://wordpress.com/design/' . $normalized_site_url; |
5480 |
$link_title = __( 'Manage Your Themes', 'jetpack' ); |
5481 |
|
5482 |
diff --git a/plugins/jetpack/modules/markdown/easy-markdown.php b/plugins/jetpack/modules/markdown/easy-markdown.php |
5483 |
index 43b41c2..f3870ce 100644 |
5484 |
--- a/plugins/jetpack/modules/markdown/easy-markdown.php |
5485 |
+++ b/plugins/jetpack/modules/markdown/easy-markdown.php |
5486 |
@@ -16,7 +16,7 @@ Author URI: http://automattic.com/ |
5487 |
* http://www.opensource.org/licenses/gpl-license.php |
5488 |
* |
5489 |
* This is an add-on for WordPress |
5490 |
- * http://wordpress.org/ |
5491 |
+ * https://wordpress.org/ |
5492 |
* |
5493 |
* ********************************************************************** |
5494 |
* This program is free software; you can redistribute it and/or modify |
5495 |
@@ -311,7 +311,7 @@ class WPCom_Markdown { |
5496 |
* @return boolean |
5497 |
*/ |
5498 |
public function is_posting_enabled() { |
5499 |
- return (bool) get_option( self::POST_OPTION, '' ); |
5500 |
+ return (bool) Jetpack_Options::get_option_and_ensure_autoload( self::POST_OPTION, '' ); |
5501 |
} |
5502 |
|
5503 |
/** |
5504 |
@@ -319,7 +319,7 @@ class WPCom_Markdown { |
5505 |
* @return boolean |
5506 |
*/ |
5507 |
public function is_commenting_enabled() { |
5508 |
- return (bool) get_option( self::COMMENT_OPTION, '' ); |
5509 |
+ return (bool) Jetpack_Options::get_option_and_ensure_autoload( self::COMMENT_OPTION, '' ); |
5510 |
} |
5511 |
|
5512 |
/** |
5513 |
|
5514 |
diff --git a/plugins/jetpack/modules/minileven.php b/plugins/jetpack/modules/minileven.php |
5515 |
index 674e7cf..9788fd5 100644 |
5516 |
--- a/plugins/jetpack/modules/minileven.php |
5517 |
+++ b/plugins/jetpack/modules/minileven.php |
5518 |
@@ -16,7 +16,7 @@ |
5519 |
function jetpack_load_minileven() { |
5520 |
include dirname( __FILE__ ) . "/minileven/minileven.php"; |
5521 |
|
5522 |
- if ( get_option( 'wp_mobile_app_promos' ) != '1' ) |
5523 |
+ if ( Jetpack_Options::get_option_and_ensure_autoload( 'wp_mobile_app_promos', '0' ) != '1' ) |
5524 |
remove_action( 'wp_mobile_theme_footer', 'jetpack_mobile_app_promo' ); |
5525 |
} |
5526 |
|
5527 |
@@ -129,6 +129,8 @@ function minileven_enabled( $wp_mobile_disable_option ) { |
5528 |
return true; |
5529 |
} |
5530 |
|
5531 |
-add_filter( 'option_wp_mobile_disable', 'minileven_enabled' ); |
5532 |
+if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
5533 |
+ add_filter( 'option_wp_mobile_disable', 'minileven_enabled' ); |
5534 |
+} |
5535 |
|
5536 |
jetpack_load_minileven(); |
5537 |
|
5538 |
diff --git a/plugins/jetpack/modules/minileven/minileven.php b/plugins/jetpack/modules/minileven/minileven.php |
5539 |
index 1655947..8b609d9 100644 |
5540 |
--- a/plugins/jetpack/modules/minileven/minileven.php |
5541 |
+++ b/plugins/jetpack/modules/minileven/minileven.php |
5542 |
@@ -34,7 +34,7 @@ function jetpack_check_mobile() { |
5543 |
return false; |
5544 |
if ( jetpack_mobile_exclude() ) |
5545 |
return false; |
5546 |
- if ( 1 == get_option('wp_mobile_disable') ) |
5547 |
+ if ( 1 == Jetpack_Options::get_option_and_ensure_autoload( 'wp_mobile_disable', '0' ) ) |
5548 |
return false; |
5549 |
if ( isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'true' ) |
5550 |
return true; |
5551 |
|
5552 |
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php |
5553 |
index 762fd73..c25fa83 100644 |
5554 |
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php |
5555 |
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php |
5556 |
@@ -56,7 +56,7 @@ |
5557 |
do_action( 'minileven_credits' ); |
5558 |
?> |
5559 |
|
5560 |
- <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'jetpack' ) ); ?>" target="_blank" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'jetpack' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'jetpack' ), 'WordPress' ); ?></a> |
5561 |
+ <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'jetpack' ) ); ?>" target="_blank" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'jetpack' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'jetpack' ), 'WordPress' ); ?></a> |
5562 |
</div> |
5563 |
</footer><!-- #colophon --> |
5564 |
|
5565 |
|
5566 |
diff --git a/plugins/jetpack/modules/monitor.php b/plugins/jetpack/modules/monitor.php |
5567 |
index 93a93f1..79a9d15 100644 |
5568 |
--- a/plugins/jetpack/modules/monitor.php |
5569 |
+++ b/plugins/jetpack/modules/monitor.php |
5570 |
@@ -12,9 +12,6 @@ |
5571 |
* Additional Search Queries: monitor, uptime, downtime, monitoring |
5572 |
*/ |
5573 |
|
5574 |
-add_action( 'jetpack_activate_module_monitor', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); |
5575 |
-add_action( 'jetpack_deactivate_module_monitor', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); |
5576 |
- |
5577 |
class Jetpack_Monitor { |
5578 |
|
5579 |
public $module = 'monitor'; |
5580 |
|
5581 |
diff --git a/plugins/jetpack/modules/notes.php b/plugins/jetpack/modules/notes.php |
5582 |
index d37e5de..af403de 100644 |
5583 |
--- a/plugins/jetpack/modules/notes.php |
5584 |
+++ b/plugins/jetpack/modules/notes.php |
5585 |
@@ -12,19 +12,6 @@ |
5586 |
|
5587 |
if ( !defined( 'JETPACK_NOTES__CACHE_BUSTER' ) ) define( 'JETPACK_NOTES__CACHE_BUSTER', JETPACK__VERSION . '-' . gmdate( 'oW' ) ); |
5588 |
|
5589 |
-Jetpack_Sync::sync_options( __FILE__, |
5590 |
- 'home', |
5591 |
- 'blogname', |
5592 |
- 'siteurl', |
5593 |
- 'permalink_structure', |
5594 |
- 'category_base', |
5595 |
- 'tag_base', |
5596 |
- 'comment_moderation', |
5597 |
- 'default_comment_status', |
5598 |
- 'thread_comments', |
5599 |
- 'thread_comments_depth' |
5600 |
-); |
5601 |
- |
5602 |
class Jetpack_Notifications { |
5603 |
public $jetpack = false; |
5604 |
|
5605 |
@@ -101,16 +88,6 @@ class Jetpack_Notifications { |
5606 |
} |
5607 |
} |
5608 |
|
5609 |
- Jetpack_Sync::sync_posts( __FILE__, array( |
5610 |
- 'post_types' => $filt_post_types, |
5611 |
- 'post_stati' => array( 'publish' ), |
5612 |
- ) ); |
5613 |
- Jetpack_Sync::sync_comments( __FILE__, array( |
5614 |
- 'post_types' => $filt_post_types, |
5615 |
- 'post_stati' => array( 'publish' ), |
5616 |
- 'comment_stati' => array( 'approve', 'approved', '1', 'hold', 'unapproved', 'unapprove', '0', 'spam', 'trash' ), |
5617 |
- ) ); |
5618 |
- |
5619 |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) |
5620 |
return; |
5621 |
|
5622 |
|
5623 |
diff --git a/plugins/jetpack/modules/post-by-email.php b/plugins/jetpack/modules/post-by-email.php |
5624 |
index 6a7bae2..17aa532 100644 |
5625 |
--- a/plugins/jetpack/modules/post-by-email.php |
5626 |
+++ b/plugins/jetpack/modules/post-by-email.php |
5627 |
@@ -12,8 +12,6 @@ |
5628 |
*/ |
5629 |
|
5630 |
add_action( 'jetpack_modules_loaded', array( 'Jetpack_Post_By_Email', 'init' ) ); |
5631 |
-add_action( 'jetpack_activate_module_post-by-email', array( 'Jetpack_Post_By_Email', 'module_toggle' ) ); |
5632 |
-add_action( 'jetpack_deactivate_module_post-by-email', array( 'Jetpack_Post_By_Email', 'module_toggle' ) ); |
5633 |
|
5634 |
Jetpack::enable_module_configurable( __FILE__ ); |
5635 |
Jetpack::module_configuration_load( __FILE__, array( 'Jetpack_Post_By_Email', 'configuration_redirect' ) ); |
5636 |
@@ -33,11 +31,6 @@ class Jetpack_Post_By_Email { |
5637 |
add_action( 'init', array( &$this, 'action_init' ) ); |
5638 |
} |
5639 |
|
5640 |
- static function module_toggle() { |
5641 |
- $jetpack = Jetpack::init(); |
5642 |
- $jetpack->sync->register( 'noop' ); |
5643 |
- } |
5644 |
- |
5645 |
static function configuration_redirect() { |
5646 |
wp_safe_redirect( get_edit_profile_url( get_current_user_id() ) . '#post-by-email' ); |
5647 |
exit; |
5648 |
|
5649 |
diff --git a/plugins/jetpack/modules/protect.php b/plugins/jetpack/modules/protect.php |
5650 |
index 4829e01..0745d45 100644 |
5651 |
--- a/plugins/jetpack/modules/protect.php |
5652 |
+++ b/plugins/jetpack/modules/protect.php |
5653 |
@@ -49,9 +49,8 @@ class Jetpack_Protect_Module { |
5654 |
private function __construct() { |
5655 |
add_action( 'jetpack_activate_module_protect', array ( $this, 'on_activation' ) ); |
5656 |
add_action( 'jetpack_deactivate_module_protect', array ( $this, 'on_deactivation' ) ); |
5657 |
- add_action( 'init', array ( $this, 'maybe_get_protect_key' ) ); |
5658 |
add_action( 'jetpack_modules_loaded', array ( $this, 'modules_loaded' ) ); |
5659 |
- add_action( 'init', array ( $this, 'check_use_math' ) ); |
5660 |
+ add_action( 'login_init', array ( $this, 'check_use_math' ) ); |
5661 |
add_filter( 'authenticate', array ( $this, 'check_preauth' ), 10, 3 ); |
5662 |
add_action( 'wp_login', array ( $this, 'log_successful_login' ), 10, 2 ); |
5663 |
add_action( 'wp_login_failed', array ( $this, 'log_failed_attempt' ) ); |
5664 |
@@ -91,9 +90,12 @@ class Jetpack_Protect_Module { |
5665 |
|
5666 |
public function maybe_get_protect_key() { |
5667 |
if ( get_site_option( 'jetpack_protect_activating', false ) && ! get_site_option( 'jetpack_protect_key', false ) ) { |
5668 |
- $this->get_protect_key(); |
5669 |
+ $key = $this->get_protect_key(); |
5670 |
delete_site_option( 'jetpack_protect_activating' ); |
5671 |
+ return $key; |
5672 |
} |
5673 |
+ |
5674 |
+ return get_site_option( 'jetpack_protect_key' ); |
5675 |
} |
5676 |
|
5677 |
/** |
5678 |
@@ -649,7 +651,7 @@ class Jetpack_Protect_Module { |
5679 |
function protect_call( $action = 'check_ip', $request = array () ) { |
5680 |
global $wp_version, $wpdb, $current_user; |
5681 |
|
5682 |
- $api_key = get_site_option( 'jetpack_protect_key' ); |
5683 |
+ $api_key = $this->maybe_get_protect_key(); |
5684 |
|
5685 |
$user_agent = "WordPress/{$wp_version} | Jetpack/" . constant( 'JETPACK__VERSION' ); |
5686 |
|
5687 |
|
5688 |
diff --git a/plugins/jetpack/modules/publicize.php b/plugins/jetpack/modules/publicize.php |
5689 |
index 9709e30..674708d 100644 |
5690 |
--- a/plugins/jetpack/modules/publicize.php |
5691 |
+++ b/plugins/jetpack/modules/publicize.php |
5692 |
@@ -24,7 +24,6 @@ class Jetpack_Publicize { |
5693 |
if ( $this->in_jetpack && method_exists( 'Jetpack', 'module_configuration_load' ) ) { |
5694 |
Jetpack::enable_module_configurable( __FILE__ ); |
5695 |
Jetpack::module_configuration_load( __FILE__, array( $this, 'jetpack_configuration_load' ) ); |
5696 |
- add_action( 'init', array( $this, 'sync_posts_init' ), 999 ); |
5697 |
} |
5698 |
|
5699 |
require_once dirname( __FILE__ ) . '/publicize/publicize.php'; |
5700 |
@@ -42,9 +41,6 @@ class Jetpack_Publicize { |
5701 |
|
5702 |
// Jetpack specific checks / hooks |
5703 |
if ( $this->in_jetpack) { |
5704 |
- add_action( 'jetpack_activate_module_publicize', array( $this, 'module_state_toggle' ) ); |
5705 |
- add_action( 'jetpack_deactivate_module_publicize', array( $this, 'module_state_toggle' ) ); |
5706 |
- add_filter( 'jetpack_sync_post_module_custom_data', array( $this, 'sync_post_module_custom_data' ), 10, 2 ); |
5707 |
// if sharedaddy isn't active, the sharing menu hasn't been added yet |
5708 |
$active = Jetpack::get_active_modules(); |
5709 |
if ( in_array( 'publicize', $active ) && !in_array( 'sharedaddy', $active ) ) |
5710 |
@@ -52,35 +48,6 @@ class Jetpack_Publicize { |
5711 |
} |
5712 |
} |
5713 |
|
5714 |
- function sync_posts_init() { |
5715 |
- $post_types = array( 'post', 'page' ); |
5716 |
- $all_post_types = get_post_types(); |
5717 |
- foreach ( $all_post_types as $post_type ) { |
5718 |
- // sync Custom Post Types that support publicize |
5719 |
- if ( post_type_supports( $post_type, 'publicize' ) ) { |
5720 |
- $post_types[] = $post_type; |
5721 |
- } |
5722 |
- } |
5723 |
- Jetpack_Sync::sync_posts( __FILE__, array( |
5724 |
- 'post_types' => $post_types, |
5725 |
- ) ); |
5726 |
- } |
5727 |
- |
5728 |
- function sync_post_module_custom_data( $custom_data, $post ) { |
5729 |
- if ( post_type_supports( get_post_type( $post ), 'publicize' ) ) { |
5730 |
- $custom_data['cpt_publicizeable'] = true; |
5731 |
- } |
5732 |
- return $custom_data; |
5733 |
- } |
5734 |
- |
5735 |
- function module_state_toggle() { |
5736 |
- // extra check that we are on the JP blog, just incase |
5737 |
- if ( class_exists( 'Jetpack' ) && $this->in_jetpack ) { |
5738 |
- $jetpack = Jetpack::init(); |
5739 |
- $jetpack->sync->register( 'noop' ); |
5740 |
- } |
5741 |
- } |
5742 |
- |
5743 |
function jetpack_configuration_load() { |
5744 |
wp_safe_redirect( menu_page_url( 'sharing', false ) ); |
5745 |
exit; |
5746 |
|
5747 |
diff --git a/plugins/jetpack/modules/publicize/publicize-jetpack.php b/plugins/jetpack/modules/publicize/publicize-jetpack.php |
5748 |
index f21ca16..ab37143 100644 |
5749 |
--- a/plugins/jetpack/modules/publicize/publicize-jetpack.php |
5750 |
+++ b/plugins/jetpack/modules/publicize/publicize-jetpack.php |
5751 |
@@ -27,7 +27,7 @@ class Publicize extends Publicize_Base { |
5752 |
|
5753 |
add_filter( 'publicize_checkbox_default', array( $this, 'publicize_checkbox_default' ), 10, 4 ); |
5754 |
|
5755 |
- add_action( 'transition_post_status', array( $this, 'save_publicized' ), 10, 3 ); |
5756 |
+ add_action( 'wp_insert_post', array( $this, 'save_publicized' ), 11, 3 ); |
5757 |
|
5758 |
add_filter( 'jetpack_twitter_cards_site_tag', array( $this, 'enhaced_twitter_cards_site_tag' ) ); |
5759 |
|
5760 |
@@ -359,7 +359,25 @@ class Publicize extends Publicize_Base { |
5761 |
} |
5762 |
|
5763 |
function flag_post_for_publicize( $new_status, $old_status, $post ) { |
5764 |
- // Stub only. Doesn't need to do anything on Jetpack Client |
5765 |
+ if ( 'publish' == $new_status && 'publish' != $old_status ) { |
5766 |
+ /** |
5767 |
+ * Determines whether a post being published gets publicized. |
5768 |
+ * |
5769 |
+ * Side-note: Possibly our most alliterative filter name. |
5770 |
+ * |
5771 |
+ * @module publicize |
5772 |
+ * |
5773 |
+ * @since 4.1.0 |
5774 |
+ * |
5775 |
+ * @param bool $should_publicize Should the post be publicized? Default to true. |
5776 |
+ * @param WP_POST $post Current Post object. |
5777 |
+ */ |
5778 |
+ $should_publicize = apply_filters( 'publicize_should_publicize_published_post', true, $post ); |
5779 |
+ |
5780 |
+ if ( $should_publicize ) { |
5781 |
+ update_post_meta( $post->ID, $this->PENDING, true ); |
5782 |
+ } |
5783 |
+ } |
5784 |
} |
5785 |
|
5786 |
function test_connection( $service_name, $connection ) { |
5787 |
@@ -405,9 +423,21 @@ class Publicize extends Publicize_Base { |
5788 |
* Save a flag locally to indicate that this post has already been Publicized via the selected |
5789 |
* connections. |
5790 |
*/ |
5791 |
- function save_publicized( $new_status, $old_status, $post ) { |
5792 |
+ function save_publicized( $post_ID, $post, $update ) { |
5793 |
// Only do this when a post transitions to being published |
5794 |
- if ( 'publish' == $new_status && 'publish' != $old_status ) { |
5795 |
+ if ( get_post_meta( $post->ID, $this->PENDING ) ) { |
5796 |
+ $connected_services = Jetpack_Options::get_option( 'publicize_connections' ); |
5797 |
+ if ( ! empty( $connected_services ) ) { |
5798 |
+ /** |
5799 |
+ * Fires when a post is saved that has is marked as pending publicizing |
5800 |
+ * |
5801 |
+ * @since 4.1.0 |
5802 |
+ * |
5803 |
+ * @param int The post ID |
5804 |
+ */ |
5805 |
+ do_action( 'jetpack_publicize_post', $post->ID ); |
5806 |
+ } |
5807 |
+ delete_post_meta( $post->ID, $this->PENDING ); |
5808 |
update_post_meta( $post->ID, $this->POST_DONE . 'all', true ); |
5809 |
} |
5810 |
} |
5811 |
|
5812 |
diff --git a/plugins/jetpack/modules/publicize/publicize.php b/plugins/jetpack/modules/publicize/publicize.php |
5813 |
index f78bdd9..6b558f2 100644 |
5814 |
--- a/plugins/jetpack/modules/publicize/publicize.php |
5815 |
+++ b/plugins/jetpack/modules/publicize/publicize.php |
5816 |
@@ -326,7 +326,11 @@ abstract class Publicize_Base { |
5817 |
} |
5818 |
|
5819 |
// Did this request happen via wp-admin? |
5820 |
- $from_web = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST[$this->ADMIN_PAGE] ); |
5821 |
+ $from_web = isset( $_SERVER['REQUEST_METHOD'] ) |
5822 |
+ && |
5823 |
+ 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) |
5824 |
+ && |
5825 |
+ isset( $_POST[$this->ADMIN_PAGE] ); |
5826 |
|
5827 |
if ( ( $from_web || defined( 'POST_BY_EMAIL' ) ) && isset( $_POST['wpas_title'] ) ) { |
5828 |
if ( empty( $_POST['wpas_title'] ) ) { |
5829 |
|
5830 |
diff --git a/plugins/jetpack/modules/related-posts.php b/plugins/jetpack/modules/related-posts.php |
5831 |
index ac6ccbf..8df4b32 100644 |
5832 |
--- a/plugins/jetpack/modules/related-posts.php |
5833 |
+++ b/plugins/jetpack/modules/related-posts.php |
5834 |
@@ -38,19 +38,6 @@ class Jetpack_RelatedPosts_Module { |
5835 |
*/ |
5836 |
private function __construct() { |
5837 |
add_action( 'jetpack_module_loaded_related-posts', array( $this, 'action_on_load' ) ); |
5838 |
- add_action( 'jetpack_activate_module_related-posts', array( $this, 'action_on_activate' ) ); |
5839 |
- } |
5840 |
- |
5841 |
- /** |
5842 |
- * This action triggers when module is activated. |
5843 |
- * |
5844 |
- * @uses Jetpack::init, Jetpack_Sync::reindex_needed, Jetpack_Sync::reindex_trigger |
5845 |
- * @return null |
5846 |
- */ |
5847 |
- public function action_on_activate() { |
5848 |
- if ( Jetpack::init()->sync->reindex_needed() ) { |
5849 |
- Jetpack::init()->sync->reindex_trigger(); |
5850 |
- } |
5851 |
} |
5852 |
|
5853 |
/** |
5854 |
@@ -67,9 +54,6 @@ class Jetpack_RelatedPosts_Module { |
5855 |
// Enable "Configure" button on module card |
5856 |
Jetpack::enable_module_configurable( __FILE__ ); |
5857 |
Jetpack::module_configuration_load( __FILE__, array( $this, 'module_configuration_load' ) ); |
5858 |
- |
5859 |
- // Sync new posts |
5860 |
- Jetpack_Sync::sync_posts( __FILE__ ); |
5861 |
} |
5862 |
} |
5863 |
|
5864 |
|
5865 |
diff --git a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php |
5866 |
index 5a5d1ae..f8eaff2 100644 |
5867 |
--- a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php |
5868 |
+++ b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php |
5869 |
@@ -105,7 +105,7 @@ class Jetpack_RelatedPosts { |
5870 |
} |
5871 |
|
5872 |
/** |
5873 |
- * Load related posts assets if it's a elegiable frontend page or execute search and return JSON if it's an endpoint request. |
5874 |
+ * Load related posts assets if it's a elegiable front end page or execute search and return JSON if it's an endpoint request. |
5875 |
* |
5876 |
* @global $_GET |
5877 |
* @action wp |
5878 |
@@ -231,7 +231,7 @@ EOT; |
5879 |
*/ |
5880 |
public function get_options() { |
5881 |
if ( null === $this->_options ) { |
5882 |
- $this->_options = Jetpack_Options::get_option( 'relatedposts' ); |
5883 |
+ $this->_options = Jetpack_Options::get_option( 'relatedposts', array() ); |
5884 |
if ( ! is_array( $this->_options ) ) |
5885 |
$this->_options = array(); |
5886 |
if ( ! isset( $this->_options['enabled'] ) ) |
5887 |
|
5888 |
diff --git a/plugins/jetpack/modules/sharedaddy/sharedaddy.php b/plugins/jetpack/modules/sharedaddy/sharedaddy.php |
5889 |
index ffd7bbc..18c04d3 100644 |
5890 |
--- a/plugins/jetpack/modules/sharedaddy/sharedaddy.php |
5891 |
+++ b/plugins/jetpack/modules/sharedaddy/sharedaddy.php |
5892 |
@@ -200,7 +200,7 @@ function sharing_restrict_to_single( $services ) { |
5893 |
} |
5894 |
|
5895 |
function sharing_init() { |
5896 |
- if ( get_option( 'sharedaddy_disable_resources' ) ) { |
5897 |
+ if ( Jetpack_Options::get_option_and_ensure_autoload( 'sharedaddy_disable_resources', '0' ) ) { |
5898 |
add_filter( 'sharing_js', 'sharing_disable_js' ); |
5899 |
remove_action( 'wp_head', 'sharing_add_header', 1 ); |
5900 |
} |
5901 |
|
5902 |
diff --git a/plugins/jetpack/modules/sharedaddy/sharing-sources.php b/plugins/jetpack/modules/sharedaddy/sharing-sources.php |
5903 |
index 1fc6cef..4e6f421 100644 |
5904 |
--- a/plugins/jetpack/modules/sharedaddy/sharing-sources.php |
5905 |
+++ b/plugins/jetpack/modules/sharedaddy/sharing-sources.php |
5906 |
@@ -329,15 +329,13 @@ abstract class Sharing_Source { |
5907 |
$opts = implode( ',', $opts ); |
5908 |
?> |
5909 |
<script type="text/javascript"> |
5910 |
- var windowOpen; |
5911 |
- jQuery(document).on( 'ready post-load', function(){ |
5912 |
- jQuery( 'a.share-<?php echo $name; ?>' ).on( 'click', function() { |
5913 |
- if ( 'undefined' !== typeof windowOpen ){ // If there's another sharing window open, close it. |
5914 |
- windowOpen.close(); |
5915 |
- } |
5916 |
- windowOpen = window.open( jQuery(this).attr( 'href' ), 'wpcom<?php echo $name; ?>', '<?php echo $opts; ?>' ); |
5917 |
- return false; |
5918 |
- }); |
5919 |
+ var windowOpen; |
5920 |
+ jQuery(document.body).on('click', 'a.share-<?php echo $name; ?>', function() { |
5921 |
+ if ( 'undefined' !== typeof windowOpen ){ // If there's another sharing window open, close it. |
5922 |
+ windowOpen.close(); |
5923 |
+ } |
5924 |
+ windowOpen = window.open( jQuery(this).attr( 'href' ), 'wpcom<?php echo $name; ?>', '<?php echo $opts; ?>' ); |
5925 |
+ return false; |
5926 |
}); |
5927 |
</script> |
5928 |
<?php |
5929 |
@@ -1518,7 +1516,7 @@ class Share_Pinterest extends Sharing_Source { |
5930 |
</script> |
5931 |
<?php elseif ( 'buttonPin' != $this->get_widget_type() ) : ?> |
5932 |
<script type="text/javascript"> |
5933 |
- jQuery(document).on('ready', function(){ |
5934 |
+ jQuery(document).ready( function(){ |
5935 |
jQuery('body').on('click', 'a.share-pinterest', function(e){ |
5936 |
e.preventDefault(); |
5937 |
// Load Pinterest Bookmarklet code |
5938 |
@@ -1590,7 +1588,7 @@ class Share_Pocket extends Sharing_Source { |
5939 |
function jetpack_sharing_pocket_init() { |
5940 |
jQuery.getScript( 'https://widgets.getpocket.com/v1/j/btn.js?v=1' ); |
5941 |
} |
5942 |
- jQuery( document ).on( 'ready', jetpack_sharing_pocket_init ); |
5943 |
+ jQuery( document ).ready( jetpack_sharing_pocket_init ); |
5944 |
jQuery( document.body ).on( 'post-load', jetpack_sharing_pocket_init ); |
5945 |
</script> |
5946 |
<?php |
5947 |
@@ -1641,7 +1639,7 @@ class Jetpack_Share_WhatsApp extends Sharing_Source { |
5948 |
} |
5949 |
|
5950 |
public function get_display( $post ) { |
5951 |
- return $this->get_link( 'whatsapp://send?text=' . rawurlencode( $this->get_share_title( $post->ID ) ) . ' ' . rawurlencode( get_permalink( $post->ID ) ), _x( 'WhatsApp', 'share to', 'jetpack' ), __( 'Click to share on WhatsApp', 'jetpack' ) ); |
5952 |
+ return $this->get_link( 'whatsapp://send?text=' . rawurlencode( $this->get_share_title( $post->ID ) ) . ' ' . rawurlencode( $this->get_share_url( $post->ID ) ), _x( 'WhatsApp', 'share to', 'jetpack' ), __( 'Click to share on WhatsApp', 'jetpack' ) ); |
5953 |
} |
5954 |
} |
5955 |
|
5956 |
|
5957 |
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.css b/plugins/jetpack/modules/sharedaddy/sharing.css |
5958 |
index 0684548..ab8f659 100644 |
5959 |
--- a/plugins/jetpack/modules/sharedaddy/sharing.css |
5960 |
+++ b/plugins/jetpack/modules/sharedaddy/sharing.css |
5961 |
@@ -77,7 +77,6 @@ body.highlander-dark h3.sd-title:before { |
5962 |
.sd-social-official .sd-content>ul>li .digg_button >a { /* official Digg button no longer works, needs cleaning */ |
5963 |
text-decoration: none !important; |
5964 |
display: inline-block; |
5965 |
- margin: 0 5px 5px 0; |
5966 |
font-size: 12px; |
5967 |
font-family: "Open Sans", sans-serif; |
5968 |
font-weight: normal; |
5969 |
@@ -182,7 +181,7 @@ body.highlander-dark h3.sd-title:before { |
5970 |
} |
5971 |
|
5972 |
.sd-content ul li { |
5973 |
- margin: 0 !important; |
5974 |
+ margin: 0 5px 5px 0; |
5975 |
padding: 0; |
5976 |
} |
5977 |
|
5978 |
|
5979 |
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.js b/plugins/jetpack/modules/sharedaddy/sharing.js |
5980 |
index ac287a2..34913e8 100644 |
5981 |
--- a/plugins/jetpack/modules/sharedaddy/sharing.js |
5982 |
+++ b/plugins/jetpack/modules/sharedaddy/sharing.js |
5983 |
@@ -72,7 +72,7 @@ if ( sharing_js_options && sharing_js_options.counts ) { |
5984 |
} |
5985 |
|
5986 |
for ( url in data ) { |
5987 |
- if ( ! data.hasOwnProperty( url ) || ! data[ url ].shares ) { |
5988 |
+ if ( ! data.hasOwnProperty( url ) || ! data[ url ].share.share_count ) { |
5989 |
continue; |
5990 |
} |
5991 |
|
5992 |
@@ -82,7 +82,7 @@ if ( sharing_js_options && sharing_js_options.counts ) { |
5993 |
continue; |
5994 |
} |
5995 |
|
5996 |
- WPCOMSharing.inject_share_count( 'sharing-facebook-' + WPCOM_sharing_counts[ permalink ], data[ url ].shares ); |
5997 |
+ WPCOMSharing.inject_share_count( 'sharing-facebook-' + WPCOM_sharing_counts[ permalink ], data[ url ].share.share_count ); |
5998 |
} |
5999 |
}, |
6000 |
update_linkedin_count : function( data ) { |
6001 |
@@ -129,7 +129,7 @@ var updateLinkedInCount = function( data ) { |
6002 |
} ); |
6003 |
|
6004 |
$body = $( document.body ).on( 'post-load', WPCOMSharing_do ); |
6005 |
- $( document ).on( 'ready', function() { |
6006 |
+ $( document ).ready( function() { |
6007 |
$sharing_email = $( '#sharing_email' ); |
6008 |
$body.append( $sharing_email ); |
6009 |
WPCOMSharing_do(); |
6010 |
|
6011 |
diff --git a/plugins/jetpack/modules/shortcodes.php b/plugins/jetpack/modules/shortcodes.php |
6012 |
index f218199..1a12604 100644 |
6013 |
--- a/plugins/jetpack/modules/shortcodes.php |
6014 |
+++ b/plugins/jetpack/modules/shortcodes.php |
6015 |
@@ -39,12 +39,12 @@ function shortcode_new_to_old_params( $params, $old_format_support = false ) { |
6016 |
} |
6017 |
|
6018 |
function jetpack_load_shortcodes() { |
6019 |
- global $wp_version; |
6020 |
- |
6021 |
$shortcode_includes = array(); |
6022 |
|
6023 |
foreach ( Jetpack::glob_php( dirname( __FILE__ ) . '/shortcodes' ) as $file ) { |
6024 |
- $shortcode_includes[] = $file; |
6025 |
+ $filename = substr( basename( $file ), 0, -4 ); |
6026 |
+ |
6027 |
+ $shortcode_includes[ $filename ] = $file; |
6028 |
} |
6029 |
|
6030 |
/** |
6031 |
@@ -53,6 +53,7 @@ function jetpack_load_shortcodes() { |
6032 |
* @module shortcodes |
6033 |
* |
6034 |
* @since 2.2.1 |
6035 |
+ * @since 4.2.0 Added filename without extension as array key. |
6036 |
* |
6037 |
* @param array $shortcode_includes An array of which shortcodes to include. |
6038 |
*/ |
6039 |
|
6040 |
diff --git a/plugins/jetpack/modules/shortcodes/cartodb.php b/plugins/jetpack/modules/shortcodes/cartodb.php |
6041 |
index 7429283..6f9e4f5 100644 |
6042 |
--- a/plugins/jetpack/modules/shortcodes/cartodb.php |
6043 |
+++ b/plugins/jetpack/modules/shortcodes/cartodb.php |
6044 |
@@ -2,17 +2,20 @@ |
6045 |
|
6046 |
|
6047 |
/* |
6048 |
- * CartoDB |
6049 |
+ * Carto (formerly CartoDB) |
6050 |
* |
6051 |
- * example URL: http://osm2.cartodb.com/viz/08aef918-94da-11e4-ad83-0e0c41326911/public_map |
6052 |
+ * example URL: http://osm2.carto.com/viz/08aef918-94da-11e4-ad83-0e0c41326911/public_map |
6053 |
* |
6054 |
* possible patterns: |
6055 |
- * [username].cartodb.com/viz/[map-id]/public_map |
6056 |
- * [username].cartodb.com/viz/[map-id]/embed_map |
6057 |
- * [username].cartodb.com/viz/[map-id]/map |
6058 |
- * [organization].cartodb.com/u/[username]/viz/[map-id]/public_map |
6059 |
- * [organization].cartodb.com/u/[username]/viz/[map-id]/embed_map |
6060 |
- * [organization].cartodb.com/u/[username]/viz/[map-id]/map |
6061 |
+ * [username].carto.com/viz/[map-id]/public_map |
6062 |
+ * [username].carto.com/viz/[map-id]/embed_map |
6063 |
+ * [username].carto.com/viz/[map-id]/map |
6064 |
+ * [organization].carto.com/u/[username]/viz/[map-id]/public_map |
6065 |
+ * [organization].carto.com/u/[username]/viz/[map-id]/embed_map |
6066 |
+ * [organization].carto.com/u/[username]/viz/[map-id]/map |
6067 |
+ * |
6068 |
+ * On July 8th, 2016 CartoDB changed its primary domain from cartodb.com to carto.com |
6069 |
+ * So this shortcode still supports the cartodb.com domain for oembeds. |
6070 |
*/ |
6071 |
|
6072 |
-wp_oembed_add_provider( '#https?://(?:www\.)?[^/^\.]+\.cartodb\.com/\S+#i', 'https://services.cartodb.com/oembed', true ); |
6073 |
\ No newline at end of file |
6074 |
+wp_oembed_add_provider( '#https?://(?:www\.)?[^/^\.]+\.carto(db)?\.com/\S+#i', 'https://services.carto.com/oembed', true ); |
6075 |
\ No newline at end of file |
6076 |
|
6077 |
diff --git a/plugins/jetpack/modules/shortcodes/dailymotion.php b/plugins/jetpack/modules/shortcodes/dailymotion.php |
6078 |
index bd4612e..9a904dc 100644 |
6079 |
--- a/plugins/jetpack/modules/shortcodes/dailymotion.php |
6080 |
+++ b/plugins/jetpack/modules/shortcodes/dailymotion.php |
6081 |
@@ -75,6 +75,11 @@ add_filter( 'pre_kses', 'dailymotion_embed_to_shortcode' ); |
6082 |
* |
6083 |
* The new style is now: |
6084 |
* [dailymotion id=x8oma9 title=2 user=3 video=4] |
6085 |
+ * |
6086 |
+ * Supported parameters for player customization: width, height, |
6087 |
+ * autoplay, endscreen-enable, mute, sharing-enabled, start, subtitles-default, |
6088 |
+ * ui-highlight, ui-logo, ui-start-screen-info, ui-theme |
6089 |
+ * see https://developer.dailymotion.com/player#player-parameters |
6090 |
* @todo: Update code to sniff for iframe embeds and convert those to shortcodes. |
6091 |
* |
6092 |
* @param array $atts |
6093 |
@@ -93,40 +98,115 @@ function dailymotion_shortcode( $atts ) { |
6094 |
$params = shortcode_new_to_old_params( $atts ); |
6095 |
parse_str( $params, $atts_new ); |
6096 |
|
6097 |
- foreach( $atts_new as $k => $v ) { |
6098 |
+ foreach ( $atts_new as $k => $v ) { |
6099 |
$atts[ $k ] = $v; |
6100 |
} |
6101 |
} |
6102 |
|
6103 |
- if ( isset( $atts['id'] ) ) { |
6104 |
- $id = $atts['id']; |
6105 |
+ $atts = shortcode_atts( |
6106 |
+ array( |
6107 |
+ 'id' => '', // string |
6108 |
+ 'width' => '', // int |
6109 |
+ 'height' => '', // int |
6110 |
+ 'title' => '', // string |
6111 |
+ 'user' => '', // string |
6112 |
+ 'video' => '', // string |
6113 |
+ 'autoplay' => 0, // int |
6114 |
+ 'endscreen-enable' => 1, // int |
6115 |
+ 'mute' => 0, // int |
6116 |
+ 'sharing-enable' => 1, // int |
6117 |
+ 'start' => '', // int |
6118 |
+ 'subtitles-default' => '', // string |
6119 |
+ 'ui-highlight' => '', // string |
6120 |
+ 'ui-logo' => 1, // int |
6121 |
+ 'ui-start-screen-info' => 0, // int |
6122 |
+ 'ui-theme' => '', // string |
6123 |
+ ), $atts, 'dailymotion' |
6124 |
+ ); |
6125 |
+ |
6126 |
+ if ( isset( $atts['id'] ) && ! empty( $atts['id'] ) ) { |
6127 |
+ $id = urlencode( $atts['id'] ); |
6128 |
} else { |
6129 |
return '<!--Dailymotion error: bad or missing ID-->'; |
6130 |
} |
6131 |
|
6132 |
- if ( ! empty( $content_width ) ) { |
6133 |
- $width = min( 425, intval( $content_width ) ); |
6134 |
- } else { |
6135 |
- $width = 425; |
6136 |
+ /*set width and height using provided parameters if any */ |
6137 |
+ $width = isset( $atts['width'] ) ? intval( $atts['width'] ) : 0 ; |
6138 |
+ $height = isset( $atts['height'] ) ? intval( $atts['height'] ) : 0 ; |
6139 |
+ |
6140 |
+ if ( ! $width && ! $height ) { |
6141 |
+ if ( ! empty( $content_width ) ) { |
6142 |
+ $width = absint( $content_width ); |
6143 |
+ } else { |
6144 |
+ $width = 425; |
6145 |
+ } |
6146 |
+ $height = $width / 425 * 334; |
6147 |
+ } elseif ( ! $height ) { |
6148 |
+ $height = $width / 425 * 334; |
6149 |
+ } elseif ( ! $width ) { |
6150 |
+ $width = $height / 334 * 425; |
6151 |
+ } |
6152 |
+ |
6153 |
+ /** |
6154 |
+ * Let's add parameters if needed. |
6155 |
+ * |
6156 |
+ * @see https://developer.dailymotion.com/player |
6157 |
+ */ |
6158 |
+ $player_params = array(); |
6159 |
+ |
6160 |
+ if ( isset( $atts['autoplay'] ) && '1' === $atts['autoplay'] ) { |
6161 |
+ $player_params['autoplay'] = '1'; |
6162 |
+ } |
6163 |
+ if ( isset( $atts['endscreen-enable'] ) && '0' === $atts['endscreen-enable'] ) { |
6164 |
+ $player_params['endscreen-enable'] = '0'; |
6165 |
+ } |
6166 |
+ if ( isset( $atts['mute'] ) && '1' === $atts['mute'] ) { |
6167 |
+ $player_params['mute'] = '1'; |
6168 |
} |
6169 |
+ if ( isset( $atts['sharing-enable'] ) && '0' === $atts['sharing-enable'] ) { |
6170 |
+ $player_params['sharing-enable'] = '0'; |
6171 |
+ } |
6172 |
+ if ( isset( $atts['start'] ) && ! empty( $atts['start'] ) ) { |
6173 |
+ $player_params['start'] = abs( intval( $atts['start'] ) ); |
6174 |
+ } |
6175 |
+ if ( isset( $atts['subtitles-default'] ) && ! empty( $atts['subtitles-default'] ) ) { |
6176 |
+ $player_params['subtitles-default'] = esc_attr( $atts['subtitles-default'] ); |
6177 |
+ } |
6178 |
+ if ( isset( $atts['ui-highlight'] ) && ! empty( $atts['ui-highlight'] ) ) { |
6179 |
+ $player_params['ui-highlight'] = esc_attr( $atts['ui-highlight'] ); |
6180 |
+ } |
6181 |
+ if ( isset( $atts['ui-logo'] ) && '0' === $atts['ui-logo'] ) { |
6182 |
+ $player_params['ui-logo'] = '0'; |
6183 |
+ } |
6184 |
+ if ( isset( $atts['ui-start-screen-info'] ) && '0' === $atts['ui-start-screen-info'] ) { |
6185 |
+ $player_params['ui-start-screen-info'] = '0'; |
6186 |
+ } |
6187 |
+ if ( isset( $atts['ui-theme'] ) && in_array( strtolower( $atts['ui-theme'] ), array( 'dark', 'light' ) ) ) { |
6188 |
+ $player_params['ui-theme'] = esc_attr( $atts['ui-theme'] ); |
6189 |
+ } |
6190 |
+ |
6191 |
+ // Add those parameters to the Video URL. |
6192 |
+ $video_url = add_query_arg( |
6193 |
+ $player_params, |
6194 |
+ 'https://www.dailymotion.com/embed/video/' . $id |
6195 |
+ ); |
6196 |
|
6197 |
- $height = ( 425 == $width ) ? 334 : ( $width / 425 ) * 334; |
6198 |
- $id = urlencode( $id ); |
6199 |
+ $output = ''; |
6200 |
|
6201 |
if ( preg_match( '/^[A-Za-z0-9]+$/', $id ) ) { |
6202 |
- $output = '<iframe width="' . $width . '" height="' . $height . '" src="' . esc_url( '//www.dailymotion.com/embed/video/' . $id ) . '" frameborder="0"></iframe>'; |
6203 |
- $after = ''; |
6204 |
+ $output .= '<iframe width="' . esc_attr( $width ) . '" height="' . esc_attr( $height ) . '" src="' . esc_url( $video_url ) . '" style="border:0;" allowfullscreen></iframe>'; |
6205 |
|
6206 |
if ( array_key_exists( 'video', $atts ) && $video = preg_replace( '/[^-a-z0-9_]/i', '', $atts['video'] ) && array_key_exists( 'title', $atts ) && $title = wp_kses( $atts['title'], array() ) ) { |
6207 |
- $after .= '<br /><strong><a href="' . esc_url( 'http://www.dailymotion.com/video/' . $video ) . '" target="_blank">' . esc_html( $title ) . '</a></strong>'; |
6208 |
+ $output .= '<br /><strong><a href="' . esc_url( 'http://www.dailymotion.com/video/' . $video ) . '" target="_blank">' . esc_html( $title ) . '</a></strong>'; |
6209 |
} |
6210 |
|
6211 |
if ( array_key_exists( 'user', $atts ) && $user = preg_replace( '/[^-a-z0-9_]/i', '', $atts['user'] ) ) { |
6212 |
- $after .= '<br /><em>Uploaded by <a href="' . esc_url( 'http://www.dailymotion.com/' . $user ) . '" target="_blank">' . esc_html( $user ) . '</a></em>'; |
6213 |
+ /* translators: %s is a Dailymotion user name */ |
6214 |
+ $output .= '<br /><em>' . wp_kses( sprintf( __( 'Uploaded by %s', 'jetpack' ), '<a href="' . esc_url( 'http://www.dailymotion.com/' . $user ) . '" target="_blank">' . esc_html( $user ) . '</a>' ), array( 'a' => array( 'href' => true, 'target' => true ) ) ) . '</em>'; |
6215 |
} |
6216 |
} |
6217 |
|
6218 |
- return $output . $after; |
6219 |
+ return $output; |
6220 |
} |
6221 |
|
6222 |
add_shortcode( 'dailymotion', 'dailymotion_shortcode' ); |
6223 |
@@ -143,13 +223,13 @@ function dailymotion_channel_shortcode( $atts ) { |
6224 |
|
6225 |
switch( $atts['type'] ) { |
6226 |
case 'grid': |
6227 |
- return '<iframe width="300px" height="264px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=grid' ) . '"></iframe>'; |
6228 |
+ return '<iframe width="300px" height="264px" scrolling="no" style="border:0;" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=grid' ) . '"></iframe>'; |
6229 |
break; |
6230 |
case 'carousel': |
6231 |
- return '<iframe width="300px" height="360px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=carousel' ) . '"></iframe>'; |
6232 |
+ return '<iframe width="300px" height="360px" scrolling="no" style="border:0;" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=carousel' ) . '"></iframe>'; |
6233 |
break; |
6234 |
default: |
6235 |
- return '<iframe width="300px" height="78px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username ) . '"></iframe>'; |
6236 |
+ return '<iframe width="300px" height="78px" scrolling="no" style="border:0;" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username ) . '"></iframe>'; |
6237 |
} |
6238 |
} |
6239 |
|
6240 |
|
6241 |
diff --git a/plugins/jetpack/modules/shortcodes/slideshow.php b/plugins/jetpack/modules/shortcodes/slideshow.php |
6242 |
index 0ff568d..949af18 100644 |
6243 |
--- a/plugins/jetpack/modules/shortcodes/slideshow.php |
6244 |
+++ b/plugins/jetpack/modules/shortcodes/slideshow.php |
6245 |
@@ -122,7 +122,7 @@ class Jetpack_Slideshow_Shortcode { |
6246 |
'trans' => 'fade', |
6247 |
'order' => 'ASC', |
6248 |
'orderby' => 'menu_order ID', |
6249 |
- 'id' => $post->ID, |
6250 |
+ 'id' => isset( $post->ID ) ? $post->ID : null, |
6251 |
'include' => '', |
6252 |
'exclude' => '', |
6253 |
'autostart' => true, |
6254 |
|
6255 |
diff --git a/plugins/jetpack/modules/shortcodes/soundcloud.php b/plugins/jetpack/modules/shortcodes/soundcloud.php |
6256 |
index 3295bf0..6e0b2cb 100644 |
6257 |
--- a/plugins/jetpack/modules/shortcodes/soundcloud.php |
6258 |
+++ b/plugins/jetpack/modules/shortcodes/soundcloud.php |
6259 |
@@ -1,7 +1,7 @@ |
6260 |
<?php |
6261 |
/* |
6262 |
Plugin Name: SoundCloud Shortcode |
6263 |
-Plugin URI: http://wordpress.org/extend/plugins/soundcloud-shortcode/ |
6264 |
+Plugin URI: https://wordpress.org/extend/plugins/soundcloud-shortcode/ |
6265 |
Description: Converts SoundCloud WordPress shortcodes to a SoundCloud widget. Example: [soundcloud]http://soundcloud.com/forss/flickermood[/soundcloud] |
6266 |
Version: 2.3 |
6267 |
Author: SoundCloud Inc., simplified for Jetpack by Automattic, Inc. |
6268 |
|
6269 |
diff --git a/plugins/jetpack/modules/shortcodes/vimeo.php b/plugins/jetpack/modules/shortcodes/vimeo.php |
6270 |
index 3d585a0..0a99d5f 100644 |
6271 |
--- a/plugins/jetpack/modules/shortcodes/vimeo.php |
6272 |
+++ b/plugins/jetpack/modules/shortcodes/vimeo.php |
6273 |
@@ -293,10 +293,8 @@ function vimeo_link_callback( $matches ) { |
6274 |
} |
6275 |
|
6276 |
/** This filter is documented in modules/shortcodes/youtube.php */ |
6277 |
-if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) { |
6278 |
+if ( ! is_admin() && apply_filters( 'jetpack_comments_allow_oembed', true ) ) { |
6279 |
// We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out. |
6280 |
- if ( ! is_admin() ) { |
6281 |
- // Higher priority because we need it before auto-link and autop get to it |
6282 |
- add_filter( 'comment_text', 'vimeo_link', 1 ); |
6283 |
- } |
6284 |
+ // Higher priority because we need it before auto-link and autop get to it |
6285 |
+ add_filter( 'comment_text', 'vimeo_link', 1 ); |
6286 |
} |
6287 |
|
6288 |
diff --git a/plugins/jetpack/modules/shortcodes/wufoo.php b/plugins/jetpack/modules/shortcodes/wufoo.php |
6289 |
index 3dd88a0..6638f70 100644 |
6290 |
--- a/plugins/jetpack/modules/shortcodes/wufoo.php |
6291 |
+++ b/plugins/jetpack/modules/shortcodes/wufoo.php |
6292 |
@@ -4,7 +4,7 @@ Plugin Name: Wufoo Shortcode Plugin |
6293 |
Description: Enables shortcode to embed Wufoo forms. Usage: [wufoo username="chriscoyier" formhash="x7w3w3" autoresize="true" height="458" header="show" ssl="true"] |
6294 |
Author: Chris Coyier / Wufoo, evansolomon |
6295 |
|
6296 |
-Based on http://wordpress.org/extend/plugins/wufoo-shortcode/ |
6297 |
+Based on https://wordpress.org/extend/plugins/wufoo-shortcode/ |
6298 |
http://wufoo.com/docs/code-manager/wordpress-shortcode-plugin/ |
6299 |
*/ |
6300 |
|
6301 |
|
6302 |
diff --git a/plugins/jetpack/modules/shortcodes/youtube.php b/plugins/jetpack/modules/shortcodes/youtube.php |
6303 |
index d5db874..d227fa1 100644 |
6304 |
--- a/plugins/jetpack/modules/shortcodes/youtube.php |
6305 |
+++ b/plugins/jetpack/modules/shortcodes/youtube.php |
6306 |
@@ -177,14 +177,17 @@ function youtube_id( $url ) { |
6307 |
$input_w = ( isset( $qargs['w'] ) && intval( $qargs['w'] ) ) ? intval( $qargs['w'] ) : 0; |
6308 |
$input_h = ( isset( $qargs['h'] ) && intval( $qargs['h'] ) ) ? intval( $qargs['h'] ) : 0; |
6309 |
|
6310 |
- $default_width = get_option('embed_size_w'); |
6311 |
+ // If we have $content_width, use it. |
6312 |
+ if ( ! empty( $content_width ) ) { |
6313 |
+ $default_width = $content_width; |
6314 |
+ } else { |
6315 |
+ // Otherwise get default width from the old, now deprecated embed_size_w option. |
6316 |
+ $default_width = get_option('embed_size_w'); |
6317 |
+ } |
6318 |
|
6319 |
+ // If we don't know those 2 values use a hardcoded width.h |
6320 |
if ( empty( $default_width ) ) { |
6321 |
- if ( ! empty( $content_width ) ) { |
6322 |
- $default_width = $content_width; |
6323 |
- } else { |
6324 |
- $default_width = 640; |
6325 |
- } |
6326 |
+ $default_width = 640; |
6327 |
} |
6328 |
|
6329 |
if ( $input_w > 0 && $input_h > 0 ) { |
6330 |
@@ -363,12 +366,10 @@ add_action( 'init', 'wpcom_youtube_embed_crazy_url_init' ); |
6331 |
* |
6332 |
* @param int get_option('embed_autourls') Option to automatically embed all plain text URLs. |
6333 |
*/ |
6334 |
-if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) { |
6335 |
+if ( ! is_admin() && apply_filters( 'jetpack_comments_allow_oembed', true ) ) { |
6336 |
// We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out. |
6337 |
- if ( ! is_admin() ) { |
6338 |
- // Higher priority because we need it before auto-link and autop get to it |
6339 |
- add_filter( 'comment_text', 'youtube_link', 1 ); |
6340 |
- } |
6341 |
+ // Higher priority because we need it before auto-link and autop get to it |
6342 |
+ add_filter( 'comment_text', 'youtube_link', 1 ); |
6343 |
} |
6344 |
|
6345 |
/** |
6346 |
|
6347 |
diff --git a/plugins/jetpack/modules/site-icon.php b/plugins/jetpack/modules/site-icon.php |
6348 |
index 72cf69f..d9f0f47 100644 |
6349 |
--- a/plugins/jetpack/modules/site-icon.php |
6350 |
+++ b/plugins/jetpack/modules/site-icon.php |
6351 |
@@ -13,5 +13,3 @@ |
6352 |
|
6353 |
include dirname( __FILE__ ) . '/site-icon/jetpack-site-icon.php'; |
6354 |
include dirname( __FILE__ ) . '/site-icon/site-icon-functions.php'; |
6355 |
- |
6356 |
-Jetpack_Sync::sync_options( __FILE__, 'jetpack_site_icon_url' ); |
6357 |
|
6358 |
diff --git a/plugins/jetpack/modules/site-icon/jetpack-site-icon.php b/plugins/jetpack/modules/site-icon/jetpack-site-icon.php |
6359 |
index db5626f..afc91b0 100644 |
6360 |
--- a/plugins/jetpack/modules/site-icon/jetpack-site-icon.php |
6361 |
+++ b/plugins/jetpack/modules/site-icon/jetpack-site-icon.php |
6362 |
@@ -71,7 +71,7 @@ class Jetpack_Site_Icon { |
6363 |
|
6364 |
add_action( 'admin_print_styles-options-general.php', array( $this, 'add_general_options_styles' ) ); |
6365 |
|
6366 |
- // Add the favicon to the front end and backend if Core's site icon not used. |
6367 |
+ // Add the favicon to the front end and back end if Core's site icon not used. |
6368 |
/** |
6369 |
* As of WP 4.3 and JP 3.6, both are outputting the same icons so no need to fire these. |
6370 |
* This is a temporary solution until Jetpack's module primary function is deprecated. |
6371 |
|
6372 |
diff --git a/plugins/jetpack/modules/sitemaps/sitemap-xsl.php b/plugins/jetpack/modules/sitemaps/sitemap-xsl.php |
6373 |
index 906f11f..eceb38c 100644 |
6374 |
--- a/plugins/jetpack/modules/sitemaps/sitemap-xsl.php |
6375 |
+++ b/plugins/jetpack/modules/sitemaps/sitemap-xsl.php |
6376 |
@@ -90,8 +90,36 @@ $xsl = '<?xml version="1.0" encoding="UTF-8"?> |
6377 |
<body> |
6378 |
<div id="description"> |
6379 |
<h1>' . esc_html( ent2ncr( __( 'XML Sitemap', 'jetpack' ) ) ) . '</h1> |
6380 |
- <p>' . wp_kses( sprintf( ent2ncr( __( 'This is an XML Sitemap generated by <a href="%s" target="_blank">Jetpack</a>, meant to be consumed by search engines like <a href="%s" target="_blank">Google</a> or <a href="%s" target="_blank">Bing</a>.', 'jetpack' ), 'http://jetpack.com/', 'https://www.google.com', 'https://www.bing.com/' ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) ) . '</p> |
6381 |
- <p>' . wp_kses( sprintf( ent2ncr( __( 'You can find more information on XML sitemaps at <a href="%s" target="_blank">sitemaps.org</a>', 'jetpack' ), 'http://sitemaps.org' ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) ) . '</p> |
6382 |
+ <p>' . wp_kses( |
6383 |
+ ent2ncr( |
6384 |
+ sprintf( |
6385 |
+ __( 'This is an XML Sitemap generated by <a href="%s" target="_blank">Jetpack</a>, meant to be consumed by search engines like <a href="%s" target="_blank">Google</a> or <a href="%s" target="_blank">Bing</a>.', 'jetpack' ), |
6386 |
+ 'http://jetpack.com/', |
6387 |
+ 'https://www.google.com', |
6388 |
+ 'https://www.bing.com/' |
6389 |
+ ) |
6390 |
+ ), |
6391 |
+ array( |
6392 |
+ 'a' => array( |
6393 |
+ 'href' => true, |
6394 |
+ 'title' => true |
6395 |
+ ) |
6396 |
+ ) |
6397 |
+ ) . '</p> |
6398 |
+ <p>' . wp_kses( |
6399 |
+ ent2ncr( |
6400 |
+ sprintf( |
6401 |
+ __( 'You can find more information on XML sitemaps at <a href="%s" target="_blank">sitemaps.org</a>', 'jetpack' ), |
6402 |
+ 'http://sitemaps.org' |
6403 |
+ ) |
6404 |
+ ), |
6405 |
+ array( |
6406 |
+ 'a' => array( |
6407 |
+ 'href' => true, |
6408 |
+ 'title' => true |
6409 |
+ ) |
6410 |
+ ) |
6411 |
+ ) . '</p> |
6412 |
</div> |
6413 |
<div id="content"> |
6414 |
<table> |
6415 |
|
6416 |
diff --git a/plugins/jetpack/modules/sso.php b/plugins/jetpack/modules/sso.php |
6417 |
index 81b8f88..5b9c34c 100644 |
6418 |
--- a/plugins/jetpack/modules/sso.php |
6419 |
+++ b/plugins/jetpack/modules/sso.php |
6420 |
@@ -532,13 +532,13 @@ class Jetpack_SSO { |
6421 |
<span><?php esc_html_e( 'Or', 'jetpack' ); ?></span> |
6422 |
</div> |
6423 |
|
6424 |
- <a href="<?php echo add_query_arg( 'jetpack-sso-show-default-form', '1' ); ?>" class="jetpack-sso-toggle wpcom"> |
6425 |
+ <a href="<?php echo esc_url( add_query_arg( 'jetpack-sso-show-default-form', '1' ) ); ?>" class="jetpack-sso-toggle wpcom"> |
6426 |
<?php |
6427 |
esc_html_e( 'Log in with username and password', 'jetpack' ) |
6428 |
?> |
6429 |
</a> |
6430 |
|
6431 |
- <a href="<?php echo add_query_arg( 'jetpack-sso-show-default-form', '0' ); ?>" class="jetpack-sso-toggle default"> |
6432 |
+ <a href="<?php echo esc_url( add_query_arg( 'jetpack-sso-show-default-form', '0' ) ); ?>" class="jetpack-sso-toggle default"> |
6433 |
<?php |
6434 |
esc_html_e( 'Log in with WordPress.com', 'jetpack' ) |
6435 |
?> |
6436 |
@@ -795,7 +795,7 @@ class Jetpack_SSO { |
6437 |
JetpackTracking::record_user_event( 'sso_user_logged_in', array( |
6438 |
'user_found_with' => $user_found_with, |
6439 |
'user_connected' => (bool) $is_user_connected, |
6440 |
- 'user_role' => Jetpack::init()->translate_current_user_to_role() |
6441 |
+ 'user_role' => Jetpack::translate_current_user_to_role() |
6442 |
) ); |
6443 |
|
6444 |
if ( ! $is_user_connected ) { |
6445 |
@@ -1010,7 +1010,7 @@ class Jetpack_SSO { |
6446 |
$error = sprintf( |
6447 |
wp_kses( |
6448 |
__( |
6449 |
- 'Two-Step Authentication is required to access this site. Please visit your <a href="%1$s" target="_blank">Security Settings</a> to configure <a href="%2$S" target="_blank">Two-step Authentication</a> for your account.', |
6450 |
+ 'Two-Step Authentication is required to access this site. Please visit your <a href="%1$s" target="_blank">Security Settings</a> to configure <a href="%2$s" target="_blank">Two-step Authentication</a> for your account.', |
6451 |
'jetpack' |
6452 |
), |
6453 |
array( 'a' => array( 'href' => array() ) ) |
6454 |
|
6455 |
diff --git a/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.css b/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.css |
6456 |
index 48cc5e4..23993a3 100644 |
6457 |
--- a/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.css |
6458 |
+++ b/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.css |
6459 |
@@ -177,3 +177,9 @@ |
6460 |
.jetpack-sso-form-display #backtoblog { |
6461 |
margin: 24px 0 0; |
6462 |
} |
6463 |
+ |
6464 |
+.jetpack-sso-clear:after { |
6465 |
+ content: ""; |
6466 |
+ display: table; |
6467 |
+ clear: both; |
6468 |
+} |
6469 |
|
6470 |
diff --git a/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.min.css b/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.min.css |
6471 |
index 0445451..77c6aa0 100644 |
6472 |
--- a/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.min.css |
6473 |
+++ b/plugins/jetpack/modules/sso/jetpack-sso-login-rtl.min.css |
6474 |
@@ -1 +1 @@ |
6475 |
-#loginform{position:relative!important;padding-bottom:92px}.jetpack-sso .message{margin-top:20px}.jetpack-sso #login .message:first-child,.jetpack-sso #login h1+.message{margin-top:0}.jetpack-sso-repositioned #loginform{padding-bottom:26px}#loginform #jetpack-sso-wrap,#loginform #jetpack-sso-wrap *{box-sizing:border-box}#jetpack-sso-wrap__action,#jetpack-sso-wrap__user{display:none}.jetpack-sso-form-display #jetpack-sso-wrap__action,.jetpack-sso-form-display #jetpack-sso-wrap__user{display:block}#jetpack-sso-wrap{position:absolute;bottom:20px;padding:0 24px;margin-right:-24px;margin-left:-24px;width:100%}.jetpack-sso-repositioned #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:16px;margin-right:0;margin-left:0}.jetpack-sso-form-display #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:0;margin-right:0;margin-left:0}#loginform #jetpack-sso-wrap p{color:#777;margin-bottom:16px}#jetpack-sso-wrap a{display:block;width:100%;text-align:center;text-d |
6476 |
ecoration:none}#jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:none}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:block}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.default,.jetpack-sso-form-display #loginform>div,.jetpack-sso-form-display #loginform>p{display:none}.jetpack-sso-form-display #loginform #jetpack-sso-wrap{display:block}.jetpack-sso-form-display #loginform{padding:26px 24px}.jetpack-sso-or{margin-bottom:16px;position:relative;text-align:center}.jetpack-sso-or:before{background:#E5E5E5;content:'';height:1px;position:absolute;right:0;top:50%;width:100%}.jetpack-sso-or span{background:#fff;color:#777;position:relative;padding:0 8px;text-transform:uppercase}.jetpack-sso.button{height:36px;line-height:34px;float:none;margin-bottom:16px;position:relative;width:100%}.jetpack-sso.button>span{position:relative;padding-right:30px}.jetpack-sso.button .genericon-wordpress{position:absolute;right:0;top:-3px;font-size:24px}@media |
6477 |
screen and (max-width:782px){.jetpack-sso.button{line-height:22px}}#jetpack-sso-wrap__user img{border-radius:50%;display:block;margin:0 auto 16px}#jetpack-sso-wrap__user h2{font-size:21px;font-weight:300;margin-bottom:16px;text-align:center}#jetpack-sso-wrap__user h2 span{font-weight:700}.jetpack-sso-wrap__reauth{margin-bottom:16px}.jetpack-sso-form-display #nav{display:none}.jetpack-sso-form-display #backtoblog{margin:24px 0 0} |
6478 |
\ No newline at end of file |
6479 |
+#loginform{position:relative!important;padding-bottom:92px}.jetpack-sso .message{margin-top:20px}.jetpack-sso #login .message:first-child,.jetpack-sso #login h1+.message{margin-top:0}.jetpack-sso-repositioned #loginform{padding-bottom:26px}#loginform #jetpack-sso-wrap,#loginform #jetpack-sso-wrap *{box-sizing:border-box}#jetpack-sso-wrap__action,#jetpack-sso-wrap__user{display:none}.jetpack-sso-form-display #jetpack-sso-wrap__action,.jetpack-sso-form-display #jetpack-sso-wrap__user{display:block}#jetpack-sso-wrap{position:absolute;bottom:20px;padding:0 24px;margin-right:-24px;margin-left:-24px;width:100%}.jetpack-sso-repositioned #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:16px;margin-right:0;margin-left:0}.jetpack-sso-form-display #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:0;margin-right:0;margin-left:0}#loginform #jetpack-sso-wrap p{color:#777;margin-bottom:16px}#jetpack-sso-wrap a{display:block;width:100%;text-align:center;text-d |
6480 |
ecoration:none}#jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:none}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:block}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.default,.jetpack-sso-form-display #loginform>div,.jetpack-sso-form-display #loginform>p{display:none}.jetpack-sso-form-display #loginform #jetpack-sso-wrap{display:block}.jetpack-sso-form-display #loginform{padding:26px 24px}.jetpack-sso-or{margin-bottom:16px;position:relative;text-align:center}.jetpack-sso-or:before{background:#E5E5E5;content:'';height:1px;position:absolute;right:0;top:50%;width:100%}.jetpack-sso-or span{background:#fff;color:#777;position:relative;padding:0 8px;text-transform:uppercase}.jetpack-sso.button{height:36px;line-height:34px;float:none;margin-bottom:16px;position:relative;width:100%}.jetpack-sso.button>span{position:relative;padding-right:30px}.jetpack-sso.button .genericon-wordpress{position:absolute;right:0;top:-3px;font-size:24px}@media |
6481 |
screen and (max-width:782px){.jetpack-sso.button{line-height:22px}}#jetpack-sso-wrap__user img{border-radius:50%;display:block;margin:0 auto 16px}#jetpack-sso-wrap__user h2{font-size:21px;font-weight:300;margin-bottom:16px;text-align:center}#jetpack-sso-wrap__user h2 span{font-weight:700}.jetpack-sso-wrap__reauth{margin-bottom:16px}.jetpack-sso-form-display #nav{display:none}.jetpack-sso-form-display #backtoblog{margin:24px 0 0}.jetpack-sso-clear:after{content:"";display:table;clear:both} |
6482 |
\ No newline at end of file |
6483 |
|
6484 |
diff --git a/plugins/jetpack/modules/sso/jetpack-sso-login.css b/plugins/jetpack/modules/sso/jetpack-sso-login.css |
6485 |
index f1da883..e79cf1f 100644 |
6486 |
--- a/plugins/jetpack/modules/sso/jetpack-sso-login.css |
6487 |
+++ b/plugins/jetpack/modules/sso/jetpack-sso-login.css |
6488 |
@@ -177,3 +177,9 @@ |
6489 |
.jetpack-sso-form-display #backtoblog { |
6490 |
margin: 24px 0 0; |
6491 |
} |
6492 |
+ |
6493 |
+.jetpack-sso-clear:after { |
6494 |
+ content: ""; |
6495 |
+ display: table; |
6496 |
+ clear: both; |
6497 |
+} |
6498 |
|
6499 |
diff --git a/plugins/jetpack/modules/sso/jetpack-sso-login.js b/plugins/jetpack/modules/sso/jetpack-sso-login.js |
6500 |
index 9de8c2b..53d1a0e 100644 |
6501 |
--- a/plugins/jetpack/modules/sso/jetpack-sso-login.js |
6502 |
+++ b/plugins/jetpack/modules/sso/jetpack-sso-login.js |
6503 |
@@ -6,7 +6,7 @@ jQuery( document ).ready( function( $ ) { |
6504 |
userLogin = $( '#user_login' ), |
6505 |
ssoWrap = $( '#jetpack-sso-wrap' ), |
6506 |
loginForm = $( '#loginform' ), |
6507 |
- overflow = $( '<div style="overflow: auto;"></div>' ); |
6508 |
+ overflow = $( '<div class="jetpack-sso-clear"></div>' ); |
6509 |
|
6510 |
// The overflow div is a poor man's clearfloat. We reposition the remember me |
6511 |
// checkbox and the submit button within that to clear the float on the |
6512 |
|
6513 |
diff --git a/plugins/jetpack/modules/sso/jetpack-sso-login.min.css b/plugins/jetpack/modules/sso/jetpack-sso-login.min.css |
6514 |
index 311ade5..c82862e 100644 |
6515 |
--- a/plugins/jetpack/modules/sso/jetpack-sso-login.min.css |
6516 |
+++ b/plugins/jetpack/modules/sso/jetpack-sso-login.min.css |
6517 |
@@ -1 +1 @@ |
6518 |
-#loginform{position:relative!important;padding-bottom:92px}.jetpack-sso .message{margin-top:20px}.jetpack-sso #login .message:first-child,.jetpack-sso #login h1+.message{margin-top:0}.jetpack-sso-repositioned #loginform{padding-bottom:26px}#loginform #jetpack-sso-wrap,#loginform #jetpack-sso-wrap *{box-sizing:border-box}#jetpack-sso-wrap__action,#jetpack-sso-wrap__user{display:none}.jetpack-sso-form-display #jetpack-sso-wrap__action,.jetpack-sso-form-display #jetpack-sso-wrap__user{display:block}#jetpack-sso-wrap{position:absolute;bottom:20px;padding:0 24px;margin-left:-24px;margin-right:-24px;width:100%}.jetpack-sso-repositioned #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:16px;margin-left:0;margin-right:0}.jetpack-sso-form-display #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:0;margin-left:0;margin-right:0}#loginform #jetpack-sso-wrap p{color:#777;margin-bottom:16px}#jetpack-sso-wrap a{display:block;width:100%;text-align:center;text-d |
6519 |
ecoration:none}#jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:none}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:block}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.default,.jetpack-sso-form-display #loginform>div,.jetpack-sso-form-display #loginform>p{display:none}.jetpack-sso-form-display #loginform #jetpack-sso-wrap{display:block}.jetpack-sso-form-display #loginform{padding:26px 24px}.jetpack-sso-or{margin-bottom:16px;position:relative;text-align:center}.jetpack-sso-or:before{background:#E5E5E5;content:'';height:1px;position:absolute;left:0;top:50%;width:100%}.jetpack-sso-or span{background:#fff;color:#777;position:relative;padding:0 8px;text-transform:uppercase}.jetpack-sso.button{height:36px;line-height:34px;float:none;margin-bottom:16px;position:relative;width:100%}.jetpack-sso.button>span{position:relative;padding-left:30px}.jetpack-sso.button .genericon-wordpress{position:absolute;left:0;top:-3px;font-size:24px}@media sc |
6520 |
reen and (max-width:782px){.jetpack-sso.button{line-height:22px}}#jetpack-sso-wrap__user img{border-radius:50%;display:block;margin:0 auto 16px}#jetpack-sso-wrap__user h2{font-size:21px;font-weight:300;margin-bottom:16px;text-align:center}#jetpack-sso-wrap__user h2 span{font-weight:700}.jetpack-sso-wrap__reauth{margin-bottom:16px}.jetpack-sso-form-display #nav{display:none}.jetpack-sso-form-display #backtoblog{margin:24px 0 0} |
6521 |
\ No newline at end of file |
6522 |
+#loginform{position:relative!important;padding-bottom:92px}.jetpack-sso .message{margin-top:20px}.jetpack-sso #login .message:first-child,.jetpack-sso #login h1+.message{margin-top:0}.jetpack-sso-repositioned #loginform{padding-bottom:26px}#loginform #jetpack-sso-wrap,#loginform #jetpack-sso-wrap *{box-sizing:border-box}#jetpack-sso-wrap__action,#jetpack-sso-wrap__user{display:none}.jetpack-sso-form-display #jetpack-sso-wrap__action,.jetpack-sso-form-display #jetpack-sso-wrap__user{display:block}#jetpack-sso-wrap{position:absolute;bottom:20px;padding:0 24px;margin-left:-24px;margin-right:-24px;width:100%}.jetpack-sso-repositioned #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:16px;margin-left:0;margin-right:0}.jetpack-sso-form-display #jetpack-sso-wrap{position:relative;bottom:auto;padding:0;margin-top:0;margin-left:0;margin-right:0}#loginform #jetpack-sso-wrap p{color:#777;margin-bottom:16px}#jetpack-sso-wrap a{display:block;width:100%;text-align:center;text-d |
6523 |
ecoration:none}#jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:none}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.wpcom{display:block}.jetpack-sso-form-display #jetpack-sso-wrap .jetpack-sso-toggle.default,.jetpack-sso-form-display #loginform>div,.jetpack-sso-form-display #loginform>p{display:none}.jetpack-sso-form-display #loginform #jetpack-sso-wrap{display:block}.jetpack-sso-form-display #loginform{padding:26px 24px}.jetpack-sso-or{margin-bottom:16px;position:relative;text-align:center}.jetpack-sso-or:before{background:#E5E5E5;content:'';height:1px;position:absolute;left:0;top:50%;width:100%}.jetpack-sso-or span{background:#fff;color:#777;position:relative;padding:0 8px;text-transform:uppercase}.jetpack-sso.button{height:36px;line-height:34px;float:none;margin-bottom:16px;position:relative;width:100%}.jetpack-sso.button>span{position:relative;padding-left:30px}.jetpack-sso.button .genericon-wordpress{position:absolute;left:0;top:-3px;font-size:24px}@media sc |
6524 |
reen and (max-width:782px){.jetpack-sso.button{line-height:22px}}#jetpack-sso-wrap__user img{border-radius:50%;display:block;margin:0 auto 16px}#jetpack-sso-wrap__user h2{font-size:21px;font-weight:300;margin-bottom:16px;text-align:center}#jetpack-sso-wrap__user h2 span{font-weight:700}.jetpack-sso-wrap__reauth{margin-bottom:16px}.jetpack-sso-form-display #nav{display:none}.jetpack-sso-form-display #backtoblog{margin:24px 0 0}.jetpack-sso-clear:after{content:"";display:table;clear:both} |
6525 |
\ No newline at end of file |
6526 |
|
6527 |
diff --git a/plugins/jetpack/modules/stats.php b/plugins/jetpack/modules/stats.php |
6528 |
index 2040b68..79ac290 100644 |
6529 |
--- a/plugins/jetpack/modules/stats.php |
6530 |
+++ b/plugins/jetpack/modules/stats.php |
6531 |
@@ -21,21 +21,6 @@ defined( 'STATS_DASHBOARD_SERVER' ) or define( 'STATS_DASHBOARD_SERVER', 'dashbo |
6532 |
|
6533 |
add_action( 'jetpack_modules_loaded', 'stats_load' ); |
6534 |
|
6535 |
-// Tell HQ about changed settings |
6536 |
-Jetpack_Sync::sync_options( __FILE__, |
6537 |
- 'stats_options', |
6538 |
- 'home', |
6539 |
- 'siteurl', |
6540 |
- 'blogname', |
6541 |
- 'blogdescription', |
6542 |
- 'gmt_offset', |
6543 |
- 'timezone_string', |
6544 |
- 'page_on_front', |
6545 |
- 'permalink_structure', |
6546 |
- 'category_base', |
6547 |
- 'tag_base' |
6548 |
-); |
6549 |
- |
6550 |
function stats_load() { |
6551 |
global $wp_roles; |
6552 |
|
6553 |
@@ -44,14 +29,6 @@ function stats_load() { |
6554 |
Jetpack::module_configuration_head( __FILE__, 'stats_configuration_head' ); |
6555 |
Jetpack::module_configuration_screen( __FILE__, 'stats_configuration_screen' ); |
6556 |
|
6557 |
- // Tell HQ about changed posts |
6558 |
- $post_stati = get_post_stati( array( 'public' => true ) ); // All public post stati |
6559 |
- $post_stati[] = 'private'; // Content from private stati will be redacted |
6560 |
- Jetpack_Sync::sync_posts( __FILE__, array( |
6561 |
- 'post_types' => get_post_types( array( 'public' => true ) ), // All public post types |
6562 |
- 'post_stati' => $post_stati, |
6563 |
- ) ); |
6564 |
- |
6565 |
// Generate the tracking code after wp() has queried for posts. |
6566 |
add_action( 'template_redirect', 'stats_template_redirect', 1 ); |
6567 |
|
6568 |
|
6569 |
diff --git a/plugins/jetpack/modules/subscriptions.php b/plugins/jetpack/modules/subscriptions.php |
6570 |
index d34c871..0c614fb 100644 |
6571 |
--- a/plugins/jetpack/modules/subscriptions.php |
6572 |
+++ b/plugins/jetpack/modules/subscriptions.php |
6573 |
@@ -15,24 +15,6 @@ |
6574 |
|
6575 |
add_action( 'jetpack_modules_loaded', 'jetpack_subscriptions_load' ); |
6576 |
|
6577 |
-Jetpack_Sync::sync_options( |
6578 |
- __FILE__, |
6579 |
- 'home', |
6580 |
- 'blogname', |
6581 |
- 'siteurl', |
6582 |
- 'page_on_front', |
6583 |
- 'permalink_structure', |
6584 |
- 'category_base', |
6585 |
- 'rss_use_excerpt', |
6586 |
- 'subscription_options', |
6587 |
- 'stb_enabled', |
6588 |
- 'stc_enabled', |
6589 |
- 'tag_base' |
6590 |
-); |
6591 |
- |
6592 |
-Jetpack_Sync::sync_posts( __FILE__ ); |
6593 |
-Jetpack_Sync::sync_comments( __FILE__ ); |
6594 |
- |
6595 |
function jetpack_subscriptions_load() { |
6596 |
Jetpack::enable_module_configurable( __FILE__ ); |
6597 |
Jetpack::module_configuration_load( __FILE__, 'jetpack_subscriptions_configuration_load' ); |
6598 |
|
6599 |
diff --git a/plugins/jetpack/modules/theme-tools/random-redirect.php b/plugins/jetpack/modules/theme-tools/random-redirect.php |
6600 |
index a4f29d8..2e58bee 100644 |
6601 |
--- a/plugins/jetpack/modules/theme-tools/random-redirect.php |
6602 |
+++ b/plugins/jetpack/modules/theme-tools/random-redirect.php |
6603 |
@@ -1,7 +1,7 @@ |
6604 |
<?php |
6605 |
/* |
6606 |
Plugin Name: Random Redirect |
6607 |
-Plugin URI: http://wordpress.org/extend/plugins/random-redirect/ |
6608 |
+Plugin URI: https://wordpress.org/extend/plugins/random-redirect/ |
6609 |
Description: Allows you to create a link to yourblog.example.com/?random which will redirect someone to a random post on your blog, in a StumbleUpon-like fashion. |
6610 |
Version: 1.2-wpcom |
6611 |
Author: Matt Mullenweg |
6612 |
@@ -31,6 +31,8 @@ function jetpack_matt_random_redirect() { |
6613 |
if ( is_author() ) { |
6614 |
$random_author_name = get_the_author_meta( 'user_login' ); |
6615 |
$random_author_query = 'AND user_login = "' . $random_author_name . '"'; |
6616 |
+ } else { |
6617 |
+ $random_author_query = ''; |
6618 |
} |
6619 |
|
6620 |
// Acceptable URL formats: /[...]/?random=[post type], /?random, /&random, /&random=1 |
6621 |
@@ -65,7 +67,7 @@ function jetpack_matt_random_redirect() { |
6622 |
} else { |
6623 |
$random_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_password = '' AND post_status = 'publish' %s ORDER BY RAND() LIMIT 1", $post_type, $random_author_query ) ); |
6624 |
} |
6625 |
- |
6626 |
+ |
6627 |
$permalink = get_permalink( $random_id ); |
6628 |
wp_safe_redirect( $permalink ); |
6629 |
exit; |
6630 |
|
6631 |
diff --git a/plugins/jetpack/modules/theme-tools/site-breadcrumbs.php b/plugins/jetpack/modules/theme-tools/site-breadcrumbs.php |
6632 |
index 3b783ee..7919d5d 100644 |
6633 |
--- a/plugins/jetpack/modules/theme-tools/site-breadcrumbs.php |
6634 |
+++ b/plugins/jetpack/modules/theme-tools/site-breadcrumbs.php |
6635 |
@@ -2,7 +2,7 @@ |
6636 |
/** |
6637 |
* Plugin Name: Site Breadcrumbs |
6638 |
* Plugin URI: http://wordpress.com |
6639 |
- * Description: Quickly add breadcrumbs to the single view of a hierarchical post type |
6640 |
+ * Description: Quickly add breadcrumbs to the single view of a hierarchical post type or a hierarchical taxonomy. |
6641 |
* Author: Automattic |
6642 |
* Version: 1.0 |
6643 |
* Author URI: http://wordpress.com |
6644 |
@@ -10,28 +10,70 @@ |
6645 |
*/ |
6646 |
|
6647 |
function jetpack_breadcrumbs() { |
6648 |
- if ( ! is_page() || is_front_page() ) { |
6649 |
+ $taxonomy = is_category() ? 'category' : get_query_var( 'taxonomy' ); |
6650 |
+ $is_taxonomy_hierarchical = is_taxonomy_hierarchical( $taxonomy ); |
6651 |
+ |
6652 |
+ $post_type = is_page() ? 'page' : get_query_var( 'post_type' ); |
6653 |
+ $is_post_type_hierarchical = is_post_type_hierarchical( $post_type ); |
6654 |
+ |
6655 |
+ if ( ! ( $is_post_type_hierarchical || $is_taxonomy_hierarchical ) || is_front_page() ) { |
6656 |
return; |
6657 |
} |
6658 |
|
6659 |
- global $post; |
6660 |
+ $breadcrumb = ''; |
6661 |
|
6662 |
- $ancestors = array_reverse( get_post_ancestors( $post->ID ) ); |
6663 |
+ if ( $is_post_type_hierarchical ) { |
6664 |
+ $post_id = get_queried_object_id(); |
6665 |
+ $ancestors = array_reverse( get_post_ancestors( $post_id ) ); |
6666 |
+ if ( $ancestors ) { |
6667 |
+ foreach ( $ancestors as $ancestor ) { |
6668 |
+ $breadcrumb .= '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="' . esc_url( get_permalink( $ancestor ) ) . '" itemprop="item"><span itemprop="name">' . esc_html( get_the_title( $ancestor ) ) . '</span></a></span>'; |
6669 |
+ } |
6670 |
+ } |
6671 |
+ $breadcrumb .= '<span class="current-page" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">' . esc_html( get_the_title( $post_id ) ) . '</span></span>'; |
6672 |
+ } elseif ( $is_taxonomy_hierarchical ) { |
6673 |
+ $current = get_term( get_queried_object_id(), $taxonomy ); |
6674 |
|
6675 |
- $before = '<nav class="entry-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">'; |
6676 |
- $after = '</nav>'; |
6677 |
+ if ( is_wp_error( $current ) ) { |
6678 |
+ return; |
6679 |
+ } |
6680 |
|
6681 |
- $home = '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="' . esc_url( home_url( "/" ) ) . '" class="home-link" itemprop="item" rel="home"><span itemprop="name">' . __( 'Home', 'jetpack' ) . '</span></a></span>'; |
6682 |
+ if ( $current->parent ) { |
6683 |
+ $breadcrumb = jetpack_get_term_parents( $current->parent, $taxonomy ); |
6684 |
+ } |
6685 |
|
6686 |
- $breadcrumb = ''; |
6687 |
+ $breadcrumb .= '<span class="current-category" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">' . esc_html( $current->name ) . '</span></span>'; |
6688 |
+ } |
6689 |
|
6690 |
- if ( $ancestors ) { |
6691 |
- foreach ( $ancestors as $ancestor ) { |
6692 |
- $breadcrumb .= '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="' . esc_url( get_permalink( $ancestor ) ) . '" itemprop="item"><span itemprop="name">' . esc_html( get_the_title( $ancestor ) ) . '</span></a></span>'; |
6693 |
- } |
6694 |
+ $home = '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="' . esc_url( home_url( '/' ) ) . '" class="home-link" itemprop="item" rel="home"><span itemprop="name">' . esc_html__( 'Home', 'jetpack' ) . '</span></a></span>'; |
6695 |
+ |
6696 |
+ echo '<nav class="entry-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">' . $home . $breadcrumb . '</nav>'; |
6697 |
+} |
6698 |
+ |
6699 |
+/** |
6700 |
+ * Return the parents for a given taxonomy term ID. |
6701 |
+ * |
6702 |
+ * @param int $term Taxonomy term whose parents will be returned. |
6703 |
+ * @param string $taxonomy Taxonomy name that the term belongs to. |
6704 |
+ * @param array $visited Terms already added to prevent duplicates. |
6705 |
+ * |
6706 |
+ * @return string A list of links to the term parents. |
6707 |
+ */ |
6708 |
+function jetpack_get_term_parents( $term, $taxonomy, $visited = array() ) { |
6709 |
+ $parent = get_term( $term, $taxonomy ); |
6710 |
+ |
6711 |
+ if ( is_wp_error( $parent ) ) { |
6712 |
+ return $parent; |
6713 |
+ } |
6714 |
+ |
6715 |
+ $chain = ''; |
6716 |
+ |
6717 |
+ if ( $parent->parent && ( $parent->parent != $parent->term_id ) && ! in_array( $parent->parent, $visited ) ) { |
6718 |
+ $visited[] = $parent->parent; |
6719 |
+ $chain .= jetpack_get_term_parents( $parent->parent, $taxonomy, $visited ); |
6720 |
} |
6721 |
|
6722 |
- $breadcrumb .= '<span class="current-page" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">' . esc_html( get_the_title( $post->ID ) ) . '</span></span>'; |
6723 |
+ $chain .= '<a href="' . esc_url( get_category_link( $parent->term_id ) ) . '">' . $parent->name . '</a>'; |
6724 |
|
6725 |
- echo $before . $home . $breadcrumb . $after; |
6726 |
+ return $chain; |
6727 |
} |
6728 |
|
6729 |
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php b/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php |
6730 |
index 3d89a07..0cc0b9c 100644 |
6731 |
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php |
6732 |
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php |
6733 |
@@ -20,7 +20,7 @@ class Jetpack_Tiled_Gallery { |
6734 |
|
6735 |
public function tiles_enabled() { |
6736 |
// Check the setting status |
6737 |
- return '' != get_option( 'tiled_galleries' ); |
6738 |
+ return '' != Jetpack_Options::get_option_and_ensure_autoload( 'tiled_galleries', '' ); |
6739 |
} |
6740 |
|
6741 |
public function set_atts( $atts ) { |
6742 |
|
6743 |
diff --git a/plugins/jetpack/modules/verification-tools/blog-verification-tools.php b/plugins/jetpack/modules/verification-tools/blog-verification-tools.php |
6744 |
index 7320a8b..e69e248 100644 |
6745 |
--- a/plugins/jetpack/modules/verification-tools/blog-verification-tools.php |
6746 |
+++ b/plugins/jetpack/modules/verification-tools/blog-verification-tools.php |
6747 |
@@ -31,7 +31,7 @@ function jetpack_verification_options_init() { |
6748 |
add_action( 'admin_init', 'jetpack_verification_options_init' ); |
6749 |
|
6750 |
function jetpack_verification_print_meta() { |
6751 |
- $verification_services_codes = get_option( 'verification_services_codes' ); |
6752 |
+ $verification_services_codes = Jetpack_Options::get_option_and_ensure_autoload( 'verification_services_codes', '0' ); |
6753 |
if ( is_array( $verification_services_codes ) ) { |
6754 |
$ver_output = "<!-- Jetpack Site Verification Tags -->\n"; |
6755 |
foreach ( jetpack_verification_services() as $name => $service ) { |
6756 |
|
6757 |
diff --git a/plugins/jetpack/modules/videopress/js/videopress-admin.js b/plugins/jetpack/modules/videopress/js/videopress-admin.js |
6758 |
index 5daac4f..76f2627 100644 |
6759 |
--- a/plugins/jetpack/modules/videopress/js/videopress-admin.js |
6760 |
+++ b/plugins/jetpack/modules/videopress/js/videopress-admin.js |
6761 |
@@ -465,7 +465,7 @@ |
6762 |
var VideoPressModal = new VideoPressModalView(); |
6763 |
|
6764 |
// Configuration screen behavior |
6765 |
- $(document).on( 'ready', function() { |
6766 |
+ $(document).ready( function() { |
6767 |
var $form = $( '#videopress-settings' ); |
6768 |
|
6769 |
// Not on a configuration screen |
6770 |
|
6771 |
diff --git a/plugins/jetpack/modules/widgets/contact-info.php b/plugins/jetpack/modules/widgets/contact-info.php |
6772 |
index 552f9b9..fd5bef6 100644 |
6773 |
--- a/plugins/jetpack/modules/widgets/contact-info.php |
6774 |
+++ b/plugins/jetpack/modules/widgets/contact-info.php |
6775 |
@@ -42,26 +42,10 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6776 |
* Enqueue scripts and styles. |
6777 |
*/ |
6778 |
public function enqueue_scripts() { |
6779 |
- $google_url = 'https://maps.googleapis.com/maps/api/js'; |
6780 |
- /** |
6781 |
- * Set a Google Maps API Key. |
6782 |
- * |
6783 |
- * @since 4.1.0 |
6784 |
- * |
6785 |
- * @param string $key Google Maps API Key |
6786 |
- */ |
6787 |
- $key = apply_filters( 'jetpack_google_maps_api_key', null ); |
6788 |
- |
6789 |
- if ( ! empty( $key ) ) { |
6790 |
- $google_url = add_query_arg( 'key', $key, $google_url ); |
6791 |
- } |
6792 |
- |
6793 |
- wp_enqueue_script( 'jquery' ); |
6794 |
- wp_enqueue_script( 'google-maps', esc_url( $google_url, null, null ) ); |
6795 |
- wp_enqueue_script( 'contact-info-map-js', plugins_url( 'contact-info/contact-info-map.js', __FILE__ ), array( 'jquery', 'google-maps' ), 20150127 ); |
6796 |
- wp_enqueue_style( 'contact-info-map-css', plugins_url( 'contact-info/contact-info-map.css', __FILE__ ), null, 20150127 ); |
6797 |
+ wp_enqueue_style( 'contact-info-map-css', plugins_url( 'contact-info/contact-info-map.css', __FILE__ ), null, 20160623 ); |
6798 |
} |
6799 |
|
6800 |
+ |
6801 |
/** |
6802 |
* Return an associative array of default values |
6803 |
* |
6804 |
@@ -75,7 +59,8 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6805 |
'address' => __( "3999 Mission Boulevard,\nSan Diego CA 92109", 'jetpack' ), |
6806 |
'phone' => _x( '1-202-555-1212', 'Example of a phone number', 'jetpack' ), |
6807 |
'hours' => __( "Lunch: 11am - 2pm \nDinner: M-Th 5pm - 11pm, Fri-Sat:5pm - 1am", 'jetpack' ), |
6808 |
- 'showmap' => 1, |
6809 |
+ 'showmap' => 0, |
6810 |
+ 'apikey' => null, |
6811 |
'lat' => null, |
6812 |
'lon' => null |
6813 |
); |
6814 |
@@ -111,12 +96,17 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6815 |
|
6816 |
$showmap = $instance['showmap']; |
6817 |
|
6818 |
+ /** This action is documented in modules/widgets/contact-info.php */ |
6819 |
if ( $showmap && $this->has_good_map( $instance ) ) { |
6820 |
- |
6821 |
- $lat = $instance['lat']; |
6822 |
- $lon = $instance['lon']; |
6823 |
- |
6824 |
- echo $this->build_map( $lat, $lon ); |
6825 |
+ /** |
6826 |
+ * Set a Google Maps API Key. |
6827 |
+ * |
6828 |
+ * @since 4.1.0 |
6829 |
+ * |
6830 |
+ * @param string $api_key Google Maps API Key |
6831 |
+ */ |
6832 |
+ $api_key = apply_filters( 'jetpack_google_maps_api_key', $instance['apikey'] ); |
6833 |
+ echo $this->build_map( $instance['address'], $api_key ); |
6834 |
} |
6835 |
|
6836 |
$map_link = $this->build_map_link( $instance['address'] ); |
6837 |
@@ -173,6 +163,7 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6838 |
$instance['address'] = wp_kses( $new_instance['address'], array() ); |
6839 |
$instance['phone'] = wp_kses( $new_instance['phone'], array() ); |
6840 |
$instance['hours'] = wp_kses( $new_instance['hours'], array() ); |
6841 |
+ $instance['apikey'] = wp_kses( isset( $new_instance['apikey'] ) ? $new_instance['apikey'] : $old_instance['apikey'], array() ); |
6842 |
$instance['lat'] = isset( $old_instance['lat'] ) ? floatval( $old_instance['lat'] ) : 0; |
6843 |
$instance['lon'] = isset( $old_instance['lon'] ) ? floatval( $old_instance['lon'] ) : 0; |
6844 |
|
6845 |
@@ -186,7 +177,7 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6846 |
$address = $this->urlencode_address( $instance['address'] ); |
6847 |
$path = "http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=" . $address; |
6848 |
/** This action is documented in modules/widgets/contact-info.php */ |
6849 |
- $key = apply_filters( 'jetpack_google_maps_api_key', null ); |
6850 |
+ $key = apply_filters( 'jetpack_google_maps_api_key', $instance['apikey'] ); |
6851 |
|
6852 |
if ( ! empty( $key ) ) { |
6853 |
$path = add_query_arg( 'key', $key, $path ); |
6854 |
@@ -239,6 +230,8 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6855 |
*/ |
6856 |
function form( $instance ) { |
6857 |
$instance = wp_parse_args( $instance, $this->defaults() ); |
6858 |
+ wp_enqueue_script( 'contact-info-admin', plugins_url( 'contact-info/contact-info-admin.js', __FILE__ ), array( 'jquery' ), 20160727 ); |
6859 |
+ |
6860 |
?> |
6861 |
<p> |
6862 |
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:', 'jetpack' ); ?></label> |
6863 |
@@ -251,7 +244,7 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6864 |
<?php |
6865 |
if ( $this->has_good_map( $instance ) ) { |
6866 |
?> |
6867 |
- <input class="" id="<?php echo esc_attr( $this->get_field_id( 'showmap' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'showmap' ) ); ?>" value="1" type="checkbox" <?php checked( $instance['showmap'], 1 ); ?> /> |
6868 |
+ <input class="jp-contact-info-showmap" id="<?php echo esc_attr( $this->get_field_id( 'showmap' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'showmap' ) ); ?>" value="1" type="checkbox" <?php checked( $instance['showmap'], 1 ); ?> /> |
6869 |
<label for="<?php echo esc_attr( $this->get_field_id( 'showmap' ) ); ?>"><?php esc_html_e( 'Show map', 'jetpack' ); ?></label> |
6870 |
<?php |
6871 |
} |
6872 |
@@ -263,6 +256,16 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6873 |
} |
6874 |
?> |
6875 |
</p> |
6876 |
+ |
6877 |
+ <p class="jp-contact-info-apikey" style="<?php echo $instance['showmap'] ? '' : 'display: none;'; ?>"> |
6878 |
+ <label for="<?php echo esc_attr( $this->get_field_id( 'apikey' ) ); ?>"> |
6879 |
+ <?php _e( 'Google Maps API Key', 'jetpack' ); ?> |
6880 |
+ <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'apikey' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'apikey' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['apikey'] ); ?>" /> |
6881 |
+ <br /> |
6882 |
+ <small><?php printf( wp_kses( __( 'Google now requires an API key to use their maps on your site. <a href="%s">See our documentation</a> for instructions on acquiring a key.' ), array( 'a' => array( 'href' => true ) ) ), 'https://jetpack.com/support/extra-sidebar-widgets/contact-info-widget/' ); ?></small> |
6883 |
+ </label> |
6884 |
+ </p> |
6885 |
+ |
6886 |
<p> |
6887 |
<label for="<?php echo esc_attr( $this->get_field_id( 'phone' ) ); ?>"><?php esc_html_e( 'Phone:', 'jetpack' ); ?></label> |
6888 |
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'phone' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'phone' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['phone'] ); ?>" /> |
6889 |
@@ -298,19 +301,14 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) { |
6890 |
* |
6891 |
* @return string HTML of the map |
6892 |
*/ |
6893 |
- function build_map( $lat, $lon ) { |
6894 |
+ function build_map( $address, $api_key = null ) { |
6895 |
$this->enqueue_scripts(); |
6896 |
+ $src = add_query_arg( 'q', urlencode( $address ), 'https://www.google.com/maps/embed/v1/place' ); |
6897 |
+ if ( ! empty( $api_key ) ) { |
6898 |
+ $src = add_query_arg( 'key', $api_key, $src ); |
6899 |
+ } |
6900 |
|
6901 |
- $lat = esc_attr( $lat ); |
6902 |
- $lon = esc_attr( $lon ); |
6903 |
- $html = <<<EOT |
6904 |
- <div class="contact-map"> |
6905 |
- <input type="hidden" class="contact-info-map-lat" value="$lat" /> |
6906 |
- <input type="hidden" class="contact-info-map-lon" value="$lon" /> |
6907 |
- <div class="contact-info-map-canvas"></div></div> |
6908 |
-EOT; |
6909 |
- |
6910 |
- return $html; |
6911 |
+ return '<iframe width="600" height="216" frameborder="0" src="' . esc_url( $src ) . '" class="contact-map"></iframe>'; |
6912 |
} |
6913 |
|
6914 |
/** |
6915 |
|
6916 |
diff --git a/plugins/jetpack/modules/widgets/contact-info/contact-info-admin.js b/plugins/jetpack/modules/widgets/contact-info/contact-info-admin.js |
6917 |
new file mode 100644 |
6918 |
index 0000000..e38f0da |
6919 |
--- /dev/null |
6920 |
+++ b/plugins/jetpack/modules/widgets/contact-info/contact-info-admin.js |
6921 |
@@ -0,0 +1,8 @@ |
6922 |
+(function( $ ) { |
6923 |
+ $( document ).on( 'change', '.jp-contact-info-showmap', function() { |
6924 |
+ var $checkbox = $( this ), |
6925 |
+ isChecked = $checkbox.is( ':checked' ); |
6926 |
+ |
6927 |
+ $checkbox.closest( '.widget' ).find( '.jp-contact-info-apikey' ).toggle( isChecked ); |
6928 |
+ }); |
6929 |
+})( window.jQuery ); |
6930 |
|
6931 |
diff --git a/plugins/jetpack/modules/widgets/contact-info/contact-info-map.css b/plugins/jetpack/modules/widgets/contact-info/contact-info-map.css |
6932 |
index 47629e9..7aa9e69 100644 |
6933 |
--- a/plugins/jetpack/modules/widgets/contact-info/contact-info-map.css |
6934 |
+++ b/plugins/jetpack/modules/widgets/contact-info/contact-info-map.css |
6935 |
@@ -1,11 +1,4 @@ |
6936 |
-.contact-info-map-canvas { |
6937 |
- height: 216px; |
6938 |
- margin: 0; |
6939 |
- padding: 0; |
6940 |
- overflow: hidden; |
6941 |
-} |
6942 |
- |
6943 |
-/* Prevent Google maps controls from being hidden */ |
6944 |
-.gmnoprint img { |
6945 |
- max-width: none !important; |
6946 |
-} |
6947 |
+.contact-map { |
6948 |
+ max-width: 100%; |
6949 |
+ border: 0; |
6950 |
+} |
6951 |
\ No newline at end of file |
6952 |
|
6953 |
diff --git a/plugins/jetpack/modules/widgets/contact-info/contact-info-map.js b/plugins/jetpack/modules/widgets/contact-info/contact-info-map.js |
6954 |
deleted file mode 100644 |
6955 |
index c703622..0000000 |
6956 |
--- a/plugins/jetpack/modules/widgets/contact-info/contact-info-map.js |
6957 |
+++ /dev/null |
6958 |
@@ -1,41 +0,0 @@ |
6959 |
-/* global google */ |
6960 |
-/* jshint unused:false */ |
6961 |
-jQuery( function( $ ) { |
6962 |
- |
6963 |
- function setupContactMaps( rootElement ) { |
6964 |
- rootElement = $( rootElement || document.body ); |
6965 |
- |
6966 |
- rootElement.find( 'div.contact-map' ).each( function() { |
6967 |
- |
6968 |
- // get lat and lon from hidden input values |
6969 |
- var lat = jQuery(this).find('.contact-info-map-lat').val(), |
6970 |
- lon = jQuery(this).find('.contact-info-map-lon').val(), |
6971 |
- lat_lon = new google.maps.LatLng( lat, lon ), |
6972 |
- mapOptions = { |
6973 |
- zoom: 16, |
6974 |
- center: lat_lon, |
6975 |
- mapTypeId: google.maps.MapTypeId.ROADMAP |
6976 |
- }, |
6977 |
- map = new google.maps.Map(jQuery(this).find('.contact-info-map-canvas')[0], mapOptions), |
6978 |
- marker = new google.maps.Marker({ |
6979 |
- map: map, |
6980 |
- position: lat_lon |
6981 |
- }); |
6982 |
- |
6983 |
- google.maps.event.addListenerOnce(map, 'mouseover', function() { |
6984 |
- google.maps.event.trigger(map, 'resize'); |
6985 |
- }); |
6986 |
- |
6987 |
- }); |
6988 |
- } |
6989 |
- |
6990 |
- setupContactMaps(); |
6991 |
- |
6992 |
- if ( 'undefined' !== typeof wp && wp.customize && wp.customize.selectiveRefresh ) { |
6993 |
- wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) { |
6994 |
- if ( wp.isJetpackWidgetPlaced( placement, 'widget_contact_info' ) ) { |
6995 |
- setupContactMaps( placement.container ); |
6996 |
- } |
6997 |
- } ); |
6998 |
- } |
6999 |
-} ); |
7000 |
|
7001 |
diff --git a/plugins/jetpack/modules/widgets/gravatar-profile.php b/plugins/jetpack/modules/widgets/gravatar-profile.php |
7002 |
index 00e701e..a82865e 100644 |
7003 |
--- a/plugins/jetpack/modules/widgets/gravatar-profile.php |
7004 |
+++ b/plugins/jetpack/modules/widgets/gravatar-profile.php |
7005 |
@@ -115,7 +115,7 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget { |
7006 |
<?php |
7007 |
|
7008 |
/** |
7009 |
- * Fires when an item is displayed on the frontend. |
7010 |
+ * Fires when an item is displayed on the front end. |
7011 |
* |
7012 |
* Can be used to track stats about the number of displays for a specific item |
7013 |
* |
7014 |
|
7015 |
diff --git a/plugins/jetpack/modules/widgets/social-media-icons.php b/plugins/jetpack/modules/widgets/social-media-icons.php |
7016 |
index f46ef29..fe836d6 100644 |
7017 |
--- a/plugins/jetpack/modules/widgets/social-media-icons.php |
7018 |
+++ b/plugins/jetpack/modules/widgets/social-media-icons.php |
7019 |
@@ -170,7 +170,7 @@ class WPCOM_social_media_icons_widget extends WP_Widget { |
7020 |
echo apply_filters( 'jetpack_social_media_icons_widget_output', $html ); |
7021 |
} |
7022 |
|
7023 |
- // backend |
7024 |
+ // back end |
7025 |
public function form( $instance ) { |
7026 |
$instance = wp_parse_args( (array) $instance, $this->defaults ); |
7027 |
?> |
7028 |
|
7029 |
diff --git a/plugins/jetpack/modules/widgets/top-posts.php b/plugins/jetpack/modules/widgets/top-posts.php |
7030 |
index 0756a19..fa1222f 100644 |
7031 |
--- a/plugins/jetpack/modules/widgets/top-posts.php |
7032 |
+++ b/plugins/jetpack/modules/widgets/top-posts.php |
7033 |
@@ -246,7 +246,7 @@ class Jetpack_Top_Posts_Widget extends WP_Widget { |
7034 |
$get_image_options = array( |
7035 |
'fallback_to_avatars' => true, |
7036 |
/** This filter is documented in modules/stats.php */ |
7037 |
- 'gravatar_default' => apply_filters( 'jetpack_static_url', set_url_scheme( 'http://en.wordpress.com/i/logo/white-gray-80.png' ) ), |
7038 |
+ 'gravatar_default' => apply_filters( 'jetpack_static_url', set_url_scheme( 'https://en.wordpress.com/i/logo/white-gray-80.png' ) ), |
7039 |
); |
7040 |
if ( 'grid' == $display ) { |
7041 |
$get_image_options['avatar_size'] = 200; |
7042 |
|
7043 |
diff --git a/plugins/jetpack/modules/widgets/top-posts/style.css b/plugins/jetpack/modules/widgets/top-posts/style.css |
7044 |
index c301ee1..ceeae12 100644 |
7045 |
--- a/plugins/jetpack/modules/widgets/top-posts/style.css |
7046 |
+++ b/plugins/jetpack/modules/widgets/top-posts/style.css |
7047 |
@@ -28,7 +28,7 @@ |
7048 |
margin: 0 2px 4px 0; |
7049 |
} |
7050 |
|
7051 |
-.widget-grid-view-image:image:nth-child(even) { |
7052 |
+.widget-grid-view-image:nth-child(even) { |
7053 |
float: right; |
7054 |
} |
7055 |
|
7056 |
|
7057 |
diff --git a/plugins/jetpack/modules/widgets/twitter-timeline.php b/plugins/jetpack/modules/widgets/twitter-timeline.php |
7058 |
index ef9ed60..4cb663d 100644 |
7059 |
--- a/plugins/jetpack/modules/widgets/twitter-timeline.php |
7060 |
+++ b/plugins/jetpack/modules/widgets/twitter-timeline.php |
7061 |
@@ -2,7 +2,7 @@ |
7062 |
|
7063 |
/* |
7064 |
* Based on Evolution Twitter Timeline |
7065 |
- * (http://wordpress.org/extend/plugins/evolution-twitter-timeline/) |
7066 |
+ * (https://wordpress.org/extend/plugins/evolution-twitter-timeline/) |
7067 |
* For details on Twitter Timelines see: |
7068 |
* - https://twitter.com/settings/widgets |
7069 |
* - https://dev.twitter.com/docs/embedded-timelines |
7070 |
|
7071 |
diff --git a/plugins/jetpack/readme.txt b/plugins/jetpack/readme.txt |
7072 |
index b5e6c2d..ef0d79e 100644 |
7073 |
--- a/plugins/jetpack/readme.txt |
7074 |
+++ b/plugins/jetpack/readme.txt |
7075 |
@@ -1,9 +1,9 @@ |
7076 |
=== Jetpack by WordPress.com === |
7077 |
Contributors: automattic, adamkheckler, aduth, akirk, allendav, alternatekev, andy, annezazu, apeatling, azaozz, batmoo, barry, beaulebens, blobaugh, cainm, cena, cfinke, chaselivingston, chellycat, csonnek, danielbachhuber, davoraltman, daniloercoli, designsimply, dllh, drawmyface, dsmart, dzver, ebinnion, eliorivero, enej, eoigal, ethitter, gcorne, georgestephanis, gibrown, goldsounds, hew, hugobaeta, hypertextranch, iammattthomas, iandunn, jacobshere, jblz, jeherve, jenhooks, jenia, jgs, jkudish, jmdodd, Joen, johnjamesjacoby, jshreve, koke, kraftbj, lamdayap, lancewillett, lschuyler, macmanx, martinremy, matt, matveb, mattwiebe, maverick3x6, mcsf, mdawaffe, michael-arestad, migueluy, mikeyarce, mkaz, nancythanki, nickmomrik, obenland, pento, professor44, rachelsquirrel, rdcoll, ryancowles, richardmuscat, richardmtl, roccotripaldi, samhotchkiss, scarstocea, sdquirk, stefmattana, stephdau, tmoorewp, Viper007Bond, westi, yoavf, zinigor |
7078 |
Tags: WordPress.com, jet pack, comments, contact, gallery, performance, sharing, security, shortcodes, stats, subscriptions, widgets |
7079 |
-Stable tag: 4.1.1 |
7080 |
-Requires at least: 4.4 |
7081 |
-Tested up to: 4.5.3 |
7082 |
+Stable tag: 4.2.2 |
7083 |
+Requires at least: 4.5 |
7084 |
+Tested up to: 4.6 |
7085 |
|
7086 |
Increase your traffic, view your stats, speed up your site, and protect yourself from hackers with Jetpack. |
7087 |
|
7088 |
@@ -75,6 +75,74 @@ There are opportunities for developers at all levels to contribute. [Learn more |
7089 |
|
7090 |
== Changelog == |
7091 |
|
7092 |
+= 4.2.2 = |
7093 |
+ |
7094 |
+* Release date: August 19th, 2016 |
7095 |
+ |
7096 |
+**Bug Fixes:** |
7097 |
+ |
7098 |
+* We fixed the code which displays the Facebook share count to accomodate Facebook's new data structure. |
7099 |
+* We fixed an issue which caused PHP notices to get logged for users of the Twenty Fourteen theme. |
7100 |
+* We fixed an issue with the Minileven mobile theme which was preventing it from loading. |
7101 |
+* Improved Sync performance. |
7102 |
+* Increase security by sanitizing a URL used in the SSO process. |
7103 |
+ |
7104 |
+= 4.2.1 = |
7105 |
+ |
7106 |
+* Release date: August 17th, 2016 |
7107 |
+ |
7108 |
+**Bug Fixes:** |
7109 |
+ |
7110 |
+* We fixed a conflict between Jetpack and W3 Total Cache. |
7111 |
+* We fixed some issues with Publicize and Custom Post Types. |
7112 |
+* Very large Multisite networks with lots of users can now be synchronized with WordPress.com. |
7113 |
+* We improved the synchronization process between your site and WordPress.com. |
7114 |
+ |
7115 |
+= 4.2 = |
7116 |
+ |
7117 |
+* Release date: August 10th, 2016 |
7118 |
+ |
7119 |
+**Performance Enhancements:** |
7120 |
+ |
7121 |
+* We’ve improved Jetpack’s performance by making calls to the database more efficient; essentially, Jetpack is doing less on each page load, making things faster. #4281, #4316 |
7122 |
+* We’ve ensured that every feature uses information that is up to date by completely refactoring the way information was synchronized between your site and WordPress.com. |
7123 |
+* We've improved the way Jetpack queries for information about features, which results in less overall queries. |
7124 |
+ |
7125 |
+**Exciting Feature and UI Improvements:** |
7126 |
+ |
7127 |
+* We now track your visitor views of Carousel images in stats. |
7128 |
+* You can now customize advanced typographic settings like ligatures in the Custom CSS editor with new support for the `font-feature-settings` property. |
7129 |
+* We’ve improved the experience when you don’t actually have enough posts to Infinitely Scroll. |
7130 |
+* Our Contact Info Widget allows you to enter a Google Maps API Key which is now required by Google if you want to display a map. |
7131 |
+ |
7132 |
+**Security:** |
7133 |
+ |
7134 |
+* We’re continuing our efforts to harden Jetpack security, by implementing the `hash_equals()` function to avoid timing attacks when comparing strings. We also improved security on CSVs exported from your contact form. |
7135 |
+ |
7136 |
+**Slightly Less Exciting Feature Improvements:** |
7137 |
+ |
7138 |
+* The Cartodb shortcode has been changed to match the new product name, Carto. |
7139 |
+* The YouTube shortcode now uses the content width defined by the theme when available, even if an embed size was defined in an old version of WordPress. |
7140 |
+* Breadcrumbs now support hierarchical post types and taxonomies. |
7141 |
+* We’ve added the Portfolio Post Type to the WordPress.com REST API whitelist. |
7142 |
+* There are a few new parameters for the Dailymotion shortcode. |
7143 |
+ |
7144 |
+**Improved Compatibility:** |
7145 |
+ |
7146 |
+* We now work well with WP Stagecoach staging sites, so you should not see any future impact on production sites. |
7147 |
+* We had some PHP notices popping up in the WooCommerce plugin wizard screen, these are gone. |
7148 |
+ |
7149 |
+**Bug Fixes:** |
7150 |
+ |
7151 |
+* We stopped loading compatibility stylesheets on the default theme's singular views for Infinite Scroll. |
7152 |
+* Debug tests forwarded through the contact form in the Jetpack Debug menu are now successfully sent to the support team. |
7153 |
+* We’ve removed the PHP notices you might have seen when moderating comments. |
7154 |
+* There are no longer PHP notices cropping up when publishing via Cron. |
7155 |
+* We’ve fixed the official Sharing buttons so they now line up just right. |
7156 |
+* The PHP warnings of Sitemaps stylesheets have been eliminated. |
7157 |
+* We’ve done away with the warnings that appeared when Tonesque processes a file which claims to be one filetype, but is actually another. |
7158 |
+* We’ve exterminated PHP notices that appeared when using Random Redirect, as well as when the author wasn't set. |
7159 |
+ |
7160 |
= 4.1.1 = |
7161 |
|
7162 |
* Release date: July 7th, 2016 |
7163 |
@@ -187,7 +255,7 @@ Bug Fixes: |
7164 |
* We accidentally removed the ability for Open Graph to select images from slideshows, it’s up and running again. |
7165 |
* There was an issue where Open Graph meta tags weren’t being set when your homepage is a “Static Front Page”, it’s working again. |
7166 |
* In rare cases when developers were customizing Photon they were seeing a PHP notice when arguments were passed as a string rather than an array. This has been fixed. |
7167 |
-* We’ve fixed an issue where Protect’s backup math form wasn’t showing on custom frontend login forms. |
7168 |
+* We’ve fixed an issue where Protect’s backup math form wasn’t showing on custom front end login forms. |
7169 |
* When setting up WooCommerce you might have seen a Related Posts notice which didn’t belong. We’ve eliminated them. |
7170 |
* If you’ve been using our sharing tool with unofficial sharing buttons you might have noticed your sharing numbers were missing. They’re now back. |
7171 |
* In unique situations where special characters were used in sitemap stylesheets an error would occur; that has been remedied. |
7172 |
|
7173 |
diff --git a/plugins/jetpack/sal/class.json-api-links.php b/plugins/jetpack/sal/class.json-api-links.php |
7174 |
index b527856..39c7106 100644 |
7175 |
--- a/plugins/jetpack/sal/class.json-api-links.php |
7176 |
+++ b/plugins/jetpack/sal/class.json-api-links.php |
7177 |
@@ -7,11 +7,11 @@ class WPCOM_JSON_API_Links { |
7178 |
private static $instance; |
7179 |
|
7180 |
public static function getInstance() { |
7181 |
- if (null === static::$instance) { |
7182 |
- static::$instance = new static(); |
7183 |
+ if ( null === self::$instance ) { |
7184 |
+ self::$instance = new self(); |
7185 |
} |
7186 |
- |
7187 |
- return static::$instance; |
7188 |
+ |
7189 |
+ return self::$instance; |
7190 |
} |
7191 |
|
7192 |
// protect these methods for singleton |
7193 |
|
7194 |
diff --git a/plugins/jetpack/sal/class.json-api-post-base.php b/plugins/jetpack/sal/class.json-api-post-base.php |
7195 |
index 8a422e1..42bbc3c 100644 |
7196 |
--- a/plugins/jetpack/sal/class.json-api-post-base.php |
7197 |
+++ b/plugins/jetpack/sal/class.json-api-post-base.php |
7198 |
@@ -289,7 +289,6 @@ abstract class SAL_Post { |
7199 |
$result['duration'] = (int) $metadata['duration']; |
7200 |
} |
7201 |
|
7202 |
- /** This filter is documented in class.jetpack-sync.php */ |
7203 |
return (object) apply_filters( 'get_attachment', $result ); |
7204 |
} |
7205 |
|
7206 |
|
7207 |
diff --git a/plugins/jetpack/sal/class.json-api-site-base.php b/plugins/jetpack/sal/class.json-api-site-base.php |
7208 |
index c4f6afc..0b58d8b 100644 |
7209 |
--- a/plugins/jetpack/sal/class.json-api-site-base.php |
7210 |
+++ b/plugins/jetpack/sal/class.json-api-site-base.php |
7211 |
@@ -395,7 +395,7 @@ abstract class SAL_Site { |
7212 |
} |
7213 |
|
7214 |
function get_unmapped_url() { |
7215 |
- return get_site_url( $this->blog_id ); |
7216 |
+ return get_site_url( get_current_blog_id() ); |
7217 |
} |
7218 |
|
7219 |
function get_theme_slug() { |
7220 |
|
7221 |
diff --git a/plugins/jetpack/sal/class.json-api-site-jetpack-base.php b/plugins/jetpack/sal/class.json-api-site-jetpack-base.php |
7222 |
index fdeec82..10de82a 100644 |
7223 |
--- a/plugins/jetpack/sal/class.json-api-site-jetpack-base.php |
7224 |
+++ b/plugins/jetpack/sal/class.json-api-site-jetpack-base.php |
7225 |
@@ -10,12 +10,24 @@ abstract class Abstract_Jetpack_Site extends SAL_Site { |
7226 |
|
7227 |
abstract protected function get_theme_support( $feature_name ); |
7228 |
|
7229 |
- abstract protected function get_mock_option( $name ); |
7230 |
- |
7231 |
abstract protected function get_jetpack_version(); |
7232 |
|
7233 |
abstract protected function get_updates(); |
7234 |
|
7235 |
+ abstract protected function main_network_site(); |
7236 |
+ |
7237 |
+ abstract protected function wp_version(); |
7238 |
+ |
7239 |
+ abstract protected function max_upload_size(); |
7240 |
+ |
7241 |
+ abstract protected function is_main_network(); |
7242 |
+ |
7243 |
+ abstract protected function is_multi_site(); |
7244 |
+ |
7245 |
+ abstract protected function is_version_controlled(); |
7246 |
+ |
7247 |
+ abstract protected function file_system_write_access(); |
7248 |
+ |
7249 |
function before_render() { |
7250 |
} |
7251 |
|
7252 |
@@ -35,9 +47,10 @@ abstract class Abstract_Jetpack_Site extends SAL_Site { |
7253 |
} |
7254 |
|
7255 |
function after_render_options( &$options ) { |
7256 |
+ |
7257 |
$options['jetpack_version'] = $this->get_jetpack_version(); |
7258 |
|
7259 |
- if ( $main_network_site = $this->get_mock_option( 'main_network_site' ) ) { |
7260 |
+ if ( $main_network_site = $this->main_network_site() ) { |
7261 |
$options['main_network_site'] = (string) rtrim( $main_network_site, '/' ); |
7262 |
} |
7263 |
|
7264 |
@@ -45,22 +58,22 @@ abstract class Abstract_Jetpack_Site extends SAL_Site { |
7265 |
$options['active_modules'] = (array) array_values( $active_modules ); |
7266 |
} |
7267 |
|
7268 |
- $options['software_version'] = (string) $this->get_mock_option( 'wp_version' ); |
7269 |
- $options['max_upload_size'] = $this->get_mock_option( 'max_upload_size', false ); |
7270 |
+ $options['software_version'] = (string) $this->wp_version(); |
7271 |
+ $options['max_upload_size'] = $this->max_upload_size(); |
7272 |
|
7273 |
// Sites have to prove that they are not main_network site. |
7274 |
// If the sync happends right then we should be able to see that we are not dealing with a network site |
7275 |
- $options['is_multi_network'] = (bool) $this->get_mock_option( 'is_main_network', true ); |
7276 |
- $options['is_multi_site'] = (bool) $this->get_mock_option( 'is_multi_site', true ); |
7277 |
+ $options['is_multi_network'] = (bool) $this->is_main_network(); |
7278 |
+ $options['is_multi_site'] = (bool) $this->is_multi_site(); |
7279 |
|
7280 |
$file_mod_disabled_reasons = array_keys( array_filter( array( |
7281 |
'automatic_updater_disabled' => (bool) $this->get_constant( 'AUTOMATIC_UPDATER_DISABLED' ), |
7282 |
// WP AUTO UPDATE CORE defaults to minor, '1' if true and '0' if set to false. |
7283 |
- 'wp_auto_update_core_disabled' => ! ( (bool) $this->get_constant( 'WP_AUTO_UPDATE_CORE' ) ), |
7284 |
- 'is_version_controlled' => (bool) $this->get_mock_option( 'is_version_controlled' ), |
7285 |
+ 'wp_auto_update_core_disabled' => ! ( (bool) $this->get_constant( 'WP_AUTO_UPDATE_CORE' ) ), |
7286 |
+ 'is_version_controlled' => (bool) $this->is_version_controlled(), |
7287 |
// By default we assume that site does have system write access if the value is not set yet. |
7288 |
- 'has_no_file_system_write_access' => ! (bool) ( $this->get_mock_option( 'has_file_system_write_access' ) ), |
7289 |
- 'disallow_file_mods' => (bool) $this->get_constant( 'DISALLOW_FILE_MODS' ), |
7290 |
+ 'has_no_file_system_write_access' => ! (bool) $this->file_system_write_access(), |
7291 |
+ 'disallow_file_mods' => (bool) $this->get_constant( 'DISALLOW_FILE_MODS' ), |
7292 |
) ) ); |
7293 |
|
7294 |
$options['file_mod_disabled'] = empty( $file_mod_disabled_reasons ) ? false : $file_mod_disabled_reasons; |
7295 |
@@ -79,11 +92,11 @@ abstract class Abstract_Jetpack_Site extends SAL_Site { |
7296 |
} |
7297 |
|
7298 |
function is_multisite() { |
7299 |
- return (bool) $this->get_mock_option( 'is_multi_site' ); |
7300 |
+ return (bool) is_multisite(); |
7301 |
} |
7302 |
|
7303 |
function is_single_user_site() { |
7304 |
- return (bool) $this->get_mock_option( 'single_user_site' ); |
7305 |
+ return (bool) Jetpack::is_single_user_site(); |
7306 |
} |
7307 |
|
7308 |
function featured_images_enabled() { |
7309 |
|
7310 |
diff --git a/plugins/jetpack/sal/class.json-api-site-jetpack.php b/plugins/jetpack/sal/class.json-api-site-jetpack.php |
7311 |
index 32dd7a3..99a3fa9 100644 |
7312 |
--- a/plugins/jetpack/sal/class.json-api-site-jetpack.php |
7313 |
+++ b/plugins/jetpack/sal/class.json-api-site-jetpack.php |
7314 |
@@ -6,10 +6,6 @@ require_once dirname( __FILE__ ) . '/class.json-api-post-jetpack.php'; |
7315 |
// this code runs on Jetpack (.org) sites |
7316 |
class Jetpack_Site extends Abstract_Jetpack_Site { |
7317 |
|
7318 |
- protected function get_mock_option( $name ) { |
7319 |
- return get_option( 'jetpack_'.$name ); |
7320 |
- } |
7321 |
- |
7322 |
protected function get_constant( $name ) { |
7323 |
if ( defined( $name) ) { |
7324 |
return constant( $name ); |
7325 |
@@ -17,6 +13,35 @@ class Jetpack_Site extends Abstract_Jetpack_Site { |
7326 |
return null; |
7327 |
} |
7328 |
|
7329 |
+ protected function main_network_site() { |
7330 |
+ return network_site_url(); |
7331 |
+ } |
7332 |
+ |
7333 |
+ protected function wp_version() { |
7334 |
+ global $wp_version; |
7335 |
+ return $wp_version; |
7336 |
+ } |
7337 |
+ |
7338 |
+ protected function max_upload_size() { |
7339 |
+ return wp_max_upload_size(); |
7340 |
+ } |
7341 |
+ |
7342 |
+ protected function is_main_network() { |
7343 |
+ return Jetpack::is_multi_network(); |
7344 |
+ } |
7345 |
+ |
7346 |
+ protected function is_multi_site() { |
7347 |
+ return is_multisite(); |
7348 |
+ } |
7349 |
+ |
7350 |
+ protected function is_version_controlled() { |
7351 |
+ return Jetpack_Sync_Functions::is_version_controlled(); |
7352 |
+ } |
7353 |
+ |
7354 |
+ protected function file_system_write_access() { |
7355 |
+ return Jetpack_Sync_Functions::file_system_write_access(); |
7356 |
+ } |
7357 |
+ |
7358 |
protected function current_theme_supports( $feature_name ) { |
7359 |
return current_theme_supports( $feature_name ); |
7360 |
} |
7361 |
|
7362 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-actions.php b/plugins/jetpack/sync/class.jetpack-sync-actions.php |
7363 |
new file mode 100644 |
7364 |
index 0000000..65eff32 |
7365 |
--- /dev/null |
7366 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-actions.php |
7367 |
@@ -0,0 +1,285 @@ |
7368 |
+<?php |
7369 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-settings.php'; |
7370 |
+ |
7371 |
+/** |
7372 |
+ * The role of this class is to hook the Sync subsystem into WordPress - when to listen for actions, |
7373 |
+ * when to send, when to perform a full sync, etc. |
7374 |
+ * |
7375 |
+ * It also binds the action to send data to WPCOM to Jetpack's XMLRPC client object. |
7376 |
+ */ |
7377 |
+class Jetpack_Sync_Actions { |
7378 |
+ static $sender = null; |
7379 |
+ static $listener = null; |
7380 |
+ const INITIAL_SYNC_MULTISITE_INTERVAL = 10; |
7381 |
+ |
7382 |
+ static function init() { |
7383 |
+ |
7384 |
+ // Add a custom "every minute" cron schedule |
7385 |
+ add_filter( 'cron_schedules', array( __CLASS__, 'minute_cron_schedule' ) ); |
7386 |
+ |
7387 |
+ // On jetpack authorization, schedule a full sync |
7388 |
+ add_action( 'jetpack_client_authorized', array( __CLASS__, 'schedule_full_sync' ) ); |
7389 |
+ |
7390 |
+ // When imports are finished, schedule a full sync |
7391 |
+ add_action( 'import_end', array( __CLASS__, 'schedule_full_sync' ) ); |
7392 |
+ |
7393 |
+ // When importing via cron, do not sync |
7394 |
+ add_action( 'wp_cron_importer_hook', array( __CLASS__, 'set_is_importing_true' ), 1 ); |
7395 |
+ |
7396 |
+ // Sync connected user role changes to .com |
7397 |
+ require_once dirname( __FILE__ ) . '/class.jetpack-sync-users.php'; |
7398 |
+ |
7399 |
+ // everything below this point should only happen if we're a valid sync site |
7400 |
+ if ( ! self::sync_allowed() ) { |
7401 |
+ return; |
7402 |
+ } |
7403 |
+ |
7404 |
+ // publicize filter to prevent publicizing blacklisted post types |
7405 |
+ add_filter( 'publicize_should_publicize_published_post', array( __CLASS__, 'prevent_publicize_blacklisted_posts' ), 10, 2 ); |
7406 |
+ |
7407 |
+ // cron hooks |
7408 |
+ add_action( 'jetpack_sync_full', array( __CLASS__, 'do_full_sync' ), 10, 1 ); |
7409 |
+ add_action( 'jetpack_sync_cron', array( __CLASS__, 'do_cron_sync' ) ); |
7410 |
+ |
7411 |
+ if ( ! wp_next_scheduled( 'jetpack_sync_cron' ) ) { |
7412 |
+ // Schedule a job to send pending queue items once a minute |
7413 |
+ wp_schedule_event( time(), '1min', 'jetpack_sync_cron' ); |
7414 |
+ } |
7415 |
+ |
7416 |
+ /** |
7417 |
+ * Fires on every request before default loading sync listener code. |
7418 |
+ * Return false to not load sync listener code that monitors common |
7419 |
+ * WP actions to be serialized. |
7420 |
+ * |
7421 |
+ * By default this returns true for non-GET-requests, or requests where the |
7422 |
+ * user is logged-in. |
7423 |
+ * |
7424 |
+ * @since 4.2.0 |
7425 |
+ * |
7426 |
+ * @param bool should we load sync listener code for this request |
7427 |
+ */ |
7428 |
+ if ( apply_filters( 'jetpack_sync_listener_should_load', |
7429 |
+ ( |
7430 |
+ 'GET' !== $_SERVER['REQUEST_METHOD'] |
7431 |
+ || |
7432 |
+ is_user_logged_in() |
7433 |
+ || |
7434 |
+ defined( 'PHPUNIT_JETPACK_TESTSUITE' ) |
7435 |
+ ) |
7436 |
+ ) ) { |
7437 |
+ self::initialize_listener(); |
7438 |
+ } |
7439 |
+ |
7440 |
+ /** |
7441 |
+ * Fires on every request before default loading sync sender code. |
7442 |
+ * Return false to not load sync sender code that serializes pending |
7443 |
+ * data and sends it to WPCOM for processing. |
7444 |
+ * |
7445 |
+ * By default this returns true for POST requests, admin requests, or requests |
7446 |
+ * by users who can manage_options. |
7447 |
+ * |
7448 |
+ * @since 4.2.0 |
7449 |
+ * |
7450 |
+ * @param bool should we load sync sender code for this request |
7451 |
+ */ |
7452 |
+ if ( apply_filters( 'jetpack_sync_sender_should_load', |
7453 |
+ ( |
7454 |
+ 'POST' === $_SERVER['REQUEST_METHOD'] |
7455 |
+ || |
7456 |
+ current_user_can( 'manage_options' ) |
7457 |
+ || |
7458 |
+ is_admin() |
7459 |
+ || |
7460 |
+ defined( 'PHPUNIT_JETPACK_TESTSUITE' ) |
7461 |
+ ) |
7462 |
+ ) ) { |
7463 |
+ self::initialize_sender(); |
7464 |
+ add_action( 'shutdown', array( self::$sender, 'do_sync' ) ); |
7465 |
+ } |
7466 |
+ |
7467 |
+ } |
7468 |
+ |
7469 |
+ static function sync_allowed() { |
7470 |
+ return ( ! Jetpack_Sync_Settings::get_setting( 'disable' ) && Jetpack::is_active() && ! ( Jetpack::is_development_mode() || Jetpack::is_staging_site() ) ) |
7471 |
+ || defined( 'PHPUNIT_JETPACK_TESTSUITE' ); |
7472 |
+ } |
7473 |
+ |
7474 |
+ static function prevent_publicize_blacklisted_posts( $should_publicize, $post ) { |
7475 |
+ if ( in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) ) ) { |
7476 |
+ return false; |
7477 |
+ } |
7478 |
+ |
7479 |
+ return $should_publicize; |
7480 |
+ } |
7481 |
+ |
7482 |
+ static function set_is_importing_true() { |
7483 |
+ Jetpack_Sync_Settings::set_importing( true ); |
7484 |
+ } |
7485 |
+ |
7486 |
+ static function send_data( $data, $codec_name, $sent_timestamp, $queue_id ) { |
7487 |
+ Jetpack::load_xml_rpc_client(); |
7488 |
+ |
7489 |
+ $url = add_query_arg( array( |
7490 |
+ 'sync' => '1', // add an extra parameter to the URL so we can tell it's a sync action |
7491 |
+ 'codec' => $codec_name, // send the name of the codec used to encode the data |
7492 |
+ 'timestamp' => $sent_timestamp, // send current server time so we can compensate for clock differences |
7493 |
+ 'queue' => $queue_id, // sync or full_sync |
7494 |
+ ), Jetpack::xmlrpc_api_url() ); |
7495 |
+ |
7496 |
+ $rpc = new Jetpack_IXR_Client( array( |
7497 |
+ 'url' => $url, |
7498 |
+ 'user_id' => JETPACK_MASTER_USER, |
7499 |
+ 'timeout' => 30, |
7500 |
+ ) ); |
7501 |
+ |
7502 |
+ $result = $rpc->query( 'jetpack.syncActions', $data ); |
7503 |
+ |
7504 |
+ if ( ! $result ) { |
7505 |
+ return $rpc->get_jetpack_error(); |
7506 |
+ } |
7507 |
+ |
7508 |
+ return $rpc->getResponse(); |
7509 |
+ } |
7510 |
+ |
7511 |
+ static function schedule_initial_sync() { |
7512 |
+ // we need this function call here because we have to run this function |
7513 |
+ // reeeeally early in init, before WP_CRON_LOCK_TIMEOUT is defined. |
7514 |
+ wp_functionality_constants(); |
7515 |
+ |
7516 |
+ if ( is_multisite() ) { |
7517 |
+ // stagger initial syncs for multisite blogs so they don't all pile on top of each other |
7518 |
+ $time_offset = ( rand() / getrandmax() ) * self::INITIAL_SYNC_MULTISITE_INTERVAL * get_blog_count(); |
7519 |
+ } else { |
7520 |
+ $time_offset = 1; |
7521 |
+ } |
7522 |
+ |
7523 |
+ self::schedule_full_sync( |
7524 |
+ array( |
7525 |
+ 'options' => true, |
7526 |
+ 'network_options' => true, |
7527 |
+ 'functions' => true, |
7528 |
+ 'constants' => true, |
7529 |
+ 'users' => 'initial' |
7530 |
+ ), |
7531 |
+ $time_offset |
7532 |
+ ); |
7533 |
+ } |
7534 |
+ |
7535 |
+ static function schedule_full_sync( $modules = null, $time_offset = 1 ) { |
7536 |
+ if ( ! self::sync_allowed() ) { |
7537 |
+ return false; |
7538 |
+ } |
7539 |
+ |
7540 |
+ if ( self::is_scheduled_full_sync() ) { |
7541 |
+ self::unschedule_all_full_syncs(); |
7542 |
+ } |
7543 |
+ |
7544 |
+ if ( $modules ) { |
7545 |
+ wp_schedule_single_event( time() + $time_offset, 'jetpack_sync_full', array( $modules ) ); |
7546 |
+ } else { |
7547 |
+ wp_schedule_single_event( time() + $time_offset, 'jetpack_sync_full' ); |
7548 |
+ } |
7549 |
+ |
7550 |
+ if ( $time_offset === 1 ) { |
7551 |
+ spawn_cron(); |
7552 |
+ } |
7553 |
+ |
7554 |
+ return true; |
7555 |
+ } |
7556 |
+ |
7557 |
+ static function unschedule_all_full_syncs() { |
7558 |
+ foreach ( _get_cron_array() as $timestamp => $cron ) { |
7559 |
+ if ( ! empty( $cron['jetpack_sync_full'] ) ) { |
7560 |
+ foreach( $cron['jetpack_sync_full'] as $key => $config ) { |
7561 |
+ wp_unschedule_event( $timestamp, 'jetpack_sync_full', $config['args'] ); |
7562 |
+ } |
7563 |
+ } |
7564 |
+ } |
7565 |
+ } |
7566 |
+ |
7567 |
+ static function is_scheduled_full_sync( $modules = null ) { |
7568 |
+ if ( is_null( $modules ) ) { |
7569 |
+ $crons = _get_cron_array(); |
7570 |
+ |
7571 |
+ foreach ( $crons as $timestamp => $cron ) { |
7572 |
+ if ( ! empty( $cron['jetpack_sync_full'] ) ) { |
7573 |
+ return true; |
7574 |
+ } |
7575 |
+ } |
7576 |
+ return false; |
7577 |
+ } |
7578 |
+ |
7579 |
+ return wp_next_scheduled( 'jetpack_sync_full', array( $modules ) ); |
7580 |
+ } |
7581 |
+ |
7582 |
+ static function do_full_sync( $modules = null ) { |
7583 |
+ if ( ! self::sync_allowed() ) { |
7584 |
+ return; |
7585 |
+ } |
7586 |
+ |
7587 |
+ self::initialize_listener(); |
7588 |
+ Jetpack_Sync_Modules::get_module( 'full-sync' )->start( $modules ); |
7589 |
+ self::do_cron_sync(); // immediately run a cron sync, which sends pending data |
7590 |
+ } |
7591 |
+ |
7592 |
+ static function minute_cron_schedule( $schedules ) { |
7593 |
+ if( ! isset( $schedules["1min"] ) ) { |
7594 |
+ $schedules["1min"] = array( |
7595 |
+ 'interval' => 60, |
7596 |
+ 'display' => __( 'Every minute' ) |
7597 |
+ ); |
7598 |
+ } |
7599 |
+ return $schedules; |
7600 |
+ } |
7601 |
+ |
7602 |
+ // try to send actions until we run out of things to send, |
7603 |
+ // or have to wait more than 15s before sending again, |
7604 |
+ // or we hit a lock or some other sending issue |
7605 |
+ static function do_cron_sync() { |
7606 |
+ if ( ! self::sync_allowed() ) { |
7607 |
+ return; |
7608 |
+ } |
7609 |
+ |
7610 |
+ self::initialize_sender(); |
7611 |
+ |
7612 |
+ // remove shutdown hook - no need to sync twice |
7613 |
+ if ( has_action( 'shutdown', array( self::$sender, 'do_sync' ) ) ) { |
7614 |
+ remove_action( 'shutdown', array( self::$sender, 'do_sync' ) ); |
7615 |
+ } |
7616 |
+ |
7617 |
+ do { |
7618 |
+ $next_sync_time = self::$sender->get_next_sync_time(); |
7619 |
+ |
7620 |
+ if ( $next_sync_time ) { |
7621 |
+ $delay = $next_sync_time - time() + 1; |
7622 |
+ if ( $delay > 15 ) { |
7623 |
+ break; |
7624 |
+ } elseif ( $delay > 0 ) { |
7625 |
+ sleep( $delay ); |
7626 |
+ } |
7627 |
+ } |
7628 |
+ |
7629 |
+ $result = self::$sender->do_sync(); |
7630 |
+ } while ( $result ); |
7631 |
+ } |
7632 |
+ |
7633 |
+ static function initialize_listener() { |
7634 |
+ require_once dirname( __FILE__ ) . '/class.jetpack-sync-listener.php'; |
7635 |
+ self::$listener = Jetpack_Sync_Listener::get_instance(); |
7636 |
+ } |
7637 |
+ |
7638 |
+ static function initialize_sender() { |
7639 |
+ require_once dirname( __FILE__ ) . '/class.jetpack-sync-sender.php'; |
7640 |
+ self::$sender = Jetpack_Sync_Sender::get_instance(); |
7641 |
+ |
7642 |
+ // bind the sending process |
7643 |
+ add_filter( 'jetpack_sync_send_data', array( __CLASS__, 'send_data' ), 10, 4 ); |
7644 |
+ } |
7645 |
+} |
7646 |
+ |
7647 |
+// Allow other plugins to add filters before we initialize the actions. |
7648 |
+// Load the listeners if before modules get loaded so that we can capture version changes etc. |
7649 |
+add_action( 'init', array( 'Jetpack_Sync_Actions', 'init' ), 90 ); |
7650 |
+ |
7651 |
+// We need to define this here so that it's hooked before `updating_jetpack_version` is called |
7652 |
+add_action( 'updating_jetpack_version', array( 'Jetpack_Sync_Actions', 'schedule_initial_sync' ), 10 ); |
7653 |
|
7654 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-defaults.php b/plugins/jetpack/sync/class.jetpack-sync-defaults.php |
7655 |
new file mode 100644 |
7656 |
index 0000000..f08a826 |
7657 |
--- /dev/null |
7658 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-defaults.php |
7659 |
@@ -0,0 +1,276 @@ |
7660 |
+<?php |
7661 |
+require_once( JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-helpers.php' ); |
7662 |
+ |
7663 |
+/** |
7664 |
+ * Just some defaults that we share with the server |
7665 |
+ */ |
7666 |
+class Jetpack_Sync_Defaults { |
7667 |
+ static $default_options_whitelist = array( |
7668 |
+ 'stylesheet', |
7669 |
+ 'blogname', |
7670 |
+ 'home', |
7671 |
+ 'siteurl', |
7672 |
+ 'blogdescription', |
7673 |
+ 'blog_charset', |
7674 |
+ 'permalink_structure', |
7675 |
+ 'category_base', |
7676 |
+ 'tag_base', |
7677 |
+ 'comment_moderation', |
7678 |
+ 'default_comment_status', |
7679 |
+ 'jetpack_site_icon_url', |
7680 |
+ 'page_on_front', |
7681 |
+ 'rss_use_excerpt', |
7682 |
+ 'subscription_options', |
7683 |
+ 'stb_enabled', |
7684 |
+ 'stc_enabled', |
7685 |
+ 'comment_registration', |
7686 |
+ 'show_avatars', |
7687 |
+ 'avatar_default', |
7688 |
+ 'avatar_rating', |
7689 |
+ 'highlander_comment_form_prompt', |
7690 |
+ 'jetpack_comment_form_color_scheme', |
7691 |
+ 'stats_options', |
7692 |
+ 'gmt_offset', |
7693 |
+ 'timezone_string', |
7694 |
+ 'jetpack_sync_non_public_post_stati', |
7695 |
+ 'jetpack_options', |
7696 |
+ 'site_icon', // (int) - ID of core's Site Icon attachment ID |
7697 |
+ 'default_post_format', |
7698 |
+ 'default_category', |
7699 |
+ 'large_size_w', |
7700 |
+ 'large_size_h', |
7701 |
+ 'thumbnail_size_w', |
7702 |
+ 'thumbnail_size_h', |
7703 |
+ 'medium_size_w', |
7704 |
+ 'medium_size_h', |
7705 |
+ 'thumbnail_crop', |
7706 |
+ 'image_default_link_type', |
7707 |
+ 'site_logo', |
7708 |
+ 'sharing-options', |
7709 |
+ 'sharing-services', |
7710 |
+ 'post_count', |
7711 |
+ 'default_ping_status', |
7712 |
+ 'sticky_posts', |
7713 |
+ 'blog_public', |
7714 |
+ 'default_pingback_flag', |
7715 |
+ 'require_name_email', |
7716 |
+ 'close_comments_for_old_posts', |
7717 |
+ 'close_comments_days_old', |
7718 |
+ 'thread_comments', |
7719 |
+ 'thread_comments_depth', |
7720 |
+ 'page_comments', |
7721 |
+ 'comments_per_page', |
7722 |
+ 'default_comments_page', |
7723 |
+ 'comment_order', |
7724 |
+ 'comments_notify', |
7725 |
+ 'moderation_notify', |
7726 |
+ 'social_notifications_like', |
7727 |
+ 'social_notifications_reblog', |
7728 |
+ 'social_notifications_subscribe', |
7729 |
+ 'comment_whitelist', |
7730 |
+ 'comment_max_links', |
7731 |
+ 'moderation_keys', |
7732 |
+ 'lang_id', |
7733 |
+ 'wga', |
7734 |
+ 'disabled_likes', |
7735 |
+ 'disabled_reblogs', |
7736 |
+ 'jetpack_comment_likes_enabled', |
7737 |
+ 'twitter_via', |
7738 |
+ 'jetpack-twitter-cards-site-tag', |
7739 |
+ 'wpcom_publish_posts_with_markdown', |
7740 |
+ 'wpcom_publish_comments_with_markdown', |
7741 |
+ 'jetpack_activated', |
7742 |
+ 'jetpack_available_modules', |
7743 |
+ 'jetpack_autoupdate_plugins', |
7744 |
+ 'jetpack_autoupdate_themes', |
7745 |
+ 'jetpack_autoupdate_core', |
7746 |
+ 'carousel_background_color', |
7747 |
+ 'carousel_display_exif', |
7748 |
+ 'jetpack_portfolio', |
7749 |
+ 'jetpack_portfolio_posts_per_page', |
7750 |
+ 'jetpack_testimonial', |
7751 |
+ 'jetpack_testimonial_posts_per_page', |
7752 |
+ 'tiled_galleries', |
7753 |
+ 'gravatar_disable_hovercards', |
7754 |
+ 'infinite_scroll', |
7755 |
+ 'infinite_scroll_google_analytics', |
7756 |
+ 'wp_mobile_excerpt', |
7757 |
+ 'wp_mobile_featured_images', |
7758 |
+ 'wp_mobile_app_promos', |
7759 |
+ 'monitor_receive_notifications', |
7760 |
+ 'post_by_email_address', |
7761 |
+ 'jetpack_protect_key', |
7762 |
+ 'jetpack_protect_global_whitelist', |
7763 |
+ 'sharing_services', |
7764 |
+ 'jetpack_sso_require_two_step', |
7765 |
+ 'jetpack_relatedposts', |
7766 |
+ 'verification_services_codes', |
7767 |
+ 'users_can_register', |
7768 |
+ 'active_plugins', |
7769 |
+ 'uninstall_plugins', |
7770 |
+ ); |
7771 |
+ |
7772 |
+ static $default_constants_whitelist = array( |
7773 |
+ 'EMPTY_TRASH_DAYS', |
7774 |
+ 'WP_POST_REVISIONS', |
7775 |
+ 'AUTOMATIC_UPDATER_DISABLED', |
7776 |
+ 'ABSPATH', |
7777 |
+ 'WP_CONTENT_DIR', |
7778 |
+ 'FS_METHOD', |
7779 |
+ 'DISALLOW_FILE_EDIT', |
7780 |
+ 'DISALLOW_FILE_MODS', |
7781 |
+ 'WP_AUTO_UPDATE_CORE', |
7782 |
+ 'WP_HTTP_BLOCK_EXTERNAL', |
7783 |
+ 'WP_ACCESSIBLE_HOSTS', |
7784 |
+ 'JETPACK__VERSION', |
7785 |
+ 'IS_PRESSABLE', |
7786 |
+ ); |
7787 |
+ |
7788 |
+ static $default_callable_whitelist = array( |
7789 |
+ 'wp_max_upload_size' => 'wp_max_upload_size', |
7790 |
+ 'is_main_network' => array( 'Jetpack', 'is_multi_network' ), |
7791 |
+ 'is_multi_site' => 'is_multisite', |
7792 |
+ 'main_network_site' => array( 'Jetpack_Sync_Functions', 'main_network_site_url' ), |
7793 |
+ 'site_url' => array( 'Jetpack_Sync_Functions', 'site_url' ), |
7794 |
+ 'home_url' => array( 'Jetpack_Sync_Functions', 'home_url' ), |
7795 |
+ 'single_user_site' => array( 'Jetpack', 'is_single_user_site' ), |
7796 |
+ 'updates' => array( 'Jetpack', 'get_updates' ), |
7797 |
+ 'has_file_system_write_access' => array( 'Jetpack_Sync_Functions', 'file_system_write_access' ), |
7798 |
+ 'is_version_controlled' => array( 'Jetpack_Sync_Functions', 'is_version_controlled' ), |
7799 |
+ 'taxonomies' => array( 'Jetpack_Sync_Functions', 'get_taxonomies' ), |
7800 |
+ 'post_types' => array( 'Jetpack_Sync_Functions', 'get_post_types' ), |
7801 |
+ 'post_type_features' => array( 'Jetpack_Sync_Functions', 'get_post_type_features' ), |
7802 |
+ 'rest_api_allowed_post_types' => array( 'Jetpack_Sync_Functions', 'rest_api_allowed_post_types' ), |
7803 |
+ 'rest_api_allowed_public_metadata' => array( 'Jetpack_Sync_Functions', 'rest_api_allowed_public_metadata' ), |
7804 |
+ 'sso_is_two_step_required' => array( 'Jetpack_SSO_Helpers', 'is_two_step_required' ), |
7805 |
+ 'sso_should_hide_login_form' => array( 'Jetpack_SSO_Helpers', 'should_hide_login_form' ), |
7806 |
+ 'sso_match_by_email' => array( 'Jetpack_SSO_Helpers', 'match_by_email' ), |
7807 |
+ 'sso_new_user_override' => array( 'Jetpack_SSO_Helpers', 'new_user_override' ), |
7808 |
+ 'sso_bypass_default_login_form' => array( 'Jetpack_SSO_Helpers', 'bypass_login_forward_wpcom' ), |
7809 |
+ 'wp_version' => array( 'Jetpack_Sync_Functions', 'wp_version' ), |
7810 |
+ 'get_plugins' => array( 'Jetpack_Sync_Functions', 'get_plugins' ), |
7811 |
+ 'active_modules' => array( 'Jetpack', 'get_active_modules' ), |
7812 |
+ ); |
7813 |
+ |
7814 |
+ static $blacklisted_post_types = array( |
7815 |
+ 'ai1ec_event', |
7816 |
+ 'snitch', |
7817 |
+ ); |
7818 |
+ |
7819 |
+ static $default_post_checksum_columns = array( |
7820 |
+ 'ID', |
7821 |
+ 'post_modified', |
7822 |
+ ); |
7823 |
+ |
7824 |
+ static $default_comment_checksum_columns = array( |
7825 |
+ 'comment_ID', |
7826 |
+ 'comment_content', |
7827 |
+ ); |
7828 |
+ |
7829 |
+ static $default_option_checksum_columns = array( |
7830 |
+ 'option_name', |
7831 |
+ 'option_value', |
7832 |
+ ); |
7833 |
+ |
7834 |
+ static $default_multisite_callable_whitelist = array( |
7835 |
+ 'network_name' => array( 'Jetpack', 'network_name' ), |
7836 |
+ 'network_allow_new_registrations' => array( 'Jetpack', 'network_allow_new_registrations' ), |
7837 |
+ 'network_add_new_users' => array( 'Jetpack', 'network_add_new_users' ), |
7838 |
+ 'network_site_upload_space' => array( 'Jetpack', 'network_site_upload_space' ), |
7839 |
+ 'network_upload_file_types' => array( 'Jetpack', 'network_upload_file_types' ), |
7840 |
+ 'network_enable_administration_menus' => array( 'Jetpack', 'network_enable_administration_menus' ), |
7841 |
+ ); |
7842 |
+ |
7843 |
+ |
7844 |
+ static $default_whitelist_meta_keys = array( |
7845 |
+ '_wp_attachment_metadata', |
7846 |
+ '_thumbnail_id', |
7847 |
+ '_wpas_mess', |
7848 |
+ '_wpas_skip_', |
7849 |
+ '_g_feedback_shortcode', |
7850 |
+ '_feedback_extra_fields', |
7851 |
+ '_feedback_akismet_values', |
7852 |
+ '_publicize_facebook_user', |
7853 |
+ '_wp_attachment_image_alt', |
7854 |
+ '_jetpack_post_thumbnail', |
7855 |
+ '_thumbnail_id', |
7856 |
+ '_wp_attachment_metadata', |
7857 |
+ '_wp_page_template', |
7858 |
+ '_publicize_twitter_user', |
7859 |
+ '_wp_trash_meta_comments_status', |
7860 |
+ ); |
7861 |
+ |
7862 |
+ static $default_blacklist_meta_keys = array( |
7863 |
+ 'post_views_count', |
7864 |
+ 'Views', |
7865 |
+ 'tve_leads_impressions', |
7866 |
+ 'views', |
7867 |
+ 'scc_share_count_crawldate', |
7868 |
+ 'wprss_last_update', |
7869 |
+ 'wprss_feed_is_updating', |
7870 |
+ 'snapFB', |
7871 |
+ 'syndication_item_hash', |
7872 |
+ 'phonenumber_spellings', |
7873 |
+ 'tmac_last_id', |
7874 |
+ 'opanda_imperessions', |
7875 |
+ 'administer_stats', |
7876 |
+ 'spec_ads_views', |
7877 |
+ 'snp_views', |
7878 |
+ 'mip_post_views_count', |
7879 |
+ 'esml_socialcount_LAST_UPDATED', |
7880 |
+ 'wprss_last_update_items', |
7881 |
+ ); |
7882 |
+ |
7883 |
+ // TODO: move this to server? - these are theme support values |
7884 |
+ // that should be synced as jetpack_current_theme_supports_foo option values |
7885 |
+ static $default_theme_support_whitelist = array( |
7886 |
+ 'post-thumbnails', |
7887 |
+ 'post-formats', |
7888 |
+ 'custom-header', |
7889 |
+ 'custom-background', |
7890 |
+ 'custom-logo', |
7891 |
+ 'menus', |
7892 |
+ 'automatic-feed-links', |
7893 |
+ 'editor-style', |
7894 |
+ 'widgets', |
7895 |
+ 'html5', |
7896 |
+ 'title-tag', |
7897 |
+ 'jetpack-social-menu', |
7898 |
+ 'jetpack-responsive-videos', |
7899 |
+ 'infinite-scroll', |
7900 |
+ 'site-logo', |
7901 |
+ ); |
7902 |
+ |
7903 |
+ static function is_whitelisted_option( $option ) { |
7904 |
+ foreach ( self::$default_options_whitelist as $whitelisted_option ) { |
7905 |
+ if ( $whitelisted_option[0] === '/' && preg_match( $whitelisted_option, $option ) ) { |
7906 |
+ return true; |
7907 |
+ } elseif ( $whitelisted_option === $option ) { |
7908 |
+ return true; |
7909 |
+ } |
7910 |
+ } |
7911 |
+ |
7912 |
+ return false; |
7913 |
+ } |
7914 |
+ |
7915 |
+ static $default_network_options_whitelist = array( |
7916 |
+ 'site_name', |
7917 |
+ 'jetpack_protect_key', |
7918 |
+ 'jetpack_protect_global_whitelist', |
7919 |
+ 'active_sitewide_plugins', |
7920 |
+ ); |
7921 |
+ static $default_taxonomy_whitelist = array(); |
7922 |
+ static $default_dequeue_max_bytes = 500000; // very conservative value, 1/2 MB |
7923 |
+ static $default_upload_max_bytes = 600000; // a little bigger than the upload limit to account for serialization |
7924 |
+ static $default_upload_max_rows = 500; |
7925 |
+ static $default_sync_wait_time = 10; // seconds, between syncs |
7926 |
+ static $default_sync_wait_threshold = 5; // only wait before next send if the current send took more than X seconds |
7927 |
+ static $default_max_queue_size = 1000; |
7928 |
+ static $default_max_queue_lag = 900; // 15 minutes |
7929 |
+ static $default_queue_max_writes_sec = 100; // 100 rows a second |
7930 |
+ static $default_post_types_blacklist = array(); |
7931 |
+ static $default_meta_blacklist = array(); |
7932 |
+ static $default_disable = 0; // completely disable sending data to wpcom |
7933 |
+ static $default_sync_callables_wait_time = MINUTE_IN_SECONDS; // seconds before sending callables again |
7934 |
+ static $default_sync_constants_wait_time = HOUR_IN_SECONDS; // seconds before sending constants again |
7935 |
+} |
7936 |
|
7937 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-functions.php b/plugins/jetpack/sync/class.jetpack-sync-functions.php |
7938 |
new file mode 100644 |
7939 |
index 0000000..9ce70f7 |
7940 |
--- /dev/null |
7941 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-functions.php |
7942 |
@@ -0,0 +1,157 @@ |
7943 |
+<?php |
7944 |
+ |
7945 |
+/* |
7946 |
+ * Utility functions to generate data synced to wpcom |
7947 |
+ */ |
7948 |
+ |
7949 |
+class Jetpack_Sync_Functions { |
7950 |
+ |
7951 |
+ public static function get_modules() { |
7952 |
+ require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php' ); |
7953 |
+ |
7954 |
+ return Jetpack_Admin::init()->get_modules(); |
7955 |
+ } |
7956 |
+ |
7957 |
+ public static function get_taxonomies() { |
7958 |
+ global $wp_taxonomies; |
7959 |
+ |
7960 |
+ return $wp_taxonomies; |
7961 |
+ } |
7962 |
+ |
7963 |
+ public static function get_post_types() { |
7964 |
+ global $wp_post_types; |
7965 |
+ |
7966 |
+ return $wp_post_types; |
7967 |
+ } |
7968 |
+ |
7969 |
+ public static function get_post_type_features() { |
7970 |
+ global $_wp_post_type_features; |
7971 |
+ |
7972 |
+ return $_wp_post_type_features; |
7973 |
+ } |
7974 |
+ |
7975 |
+ public static function rest_api_allowed_post_types() { |
7976 |
+ /** This filter is already documented in class.json-api-endpoints.php */ |
7977 |
+ return apply_filters( 'rest_api_allowed_post_types', array( 'post', 'page', 'revision' ) ); |
7978 |
+ } |
7979 |
+ |
7980 |
+ public static function rest_api_allowed_public_metadata() { |
7981 |
+ /** This filter is documented in json-endpoints/class.wpcom-json-api-post-endpoint.php */ |
7982 |
+ return apply_filters( 'rest_api_allowed_public_metadata', array() ); |
7983 |
+ } |
7984 |
+ |
7985 |
+ /** |
7986 |
+ * Finds out if a site is using a version control system. |
7987 |
+ * @return bool |
7988 |
+ **/ |
7989 |
+ public static function is_version_controlled() { |
7990 |
+ |
7991 |
+ if ( ! class_exists( 'WP_Automatic_Updater' ) ) { |
7992 |
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); |
7993 |
+ } |
7994 |
+ $updater = new WP_Automatic_Updater(); |
7995 |
+ |
7996 |
+ return (bool) strval( $updater->is_vcs_checkout( $context = ABSPATH ) ); |
7997 |
+ } |
7998 |
+ |
7999 |
+ /** |
8000 |
+ * Returns true if the site has file write access false otherwise. |
8001 |
+ * @return bool |
8002 |
+ **/ |
8003 |
+ public static function file_system_write_access() { |
8004 |
+ if ( ! function_exists( 'get_filesystem_method' ) ) { |
8005 |
+ require_once( ABSPATH . 'wp-admin/includes/file.php' ); |
8006 |
+ } |
8007 |
+ |
8008 |
+ require_once( ABSPATH . 'wp-admin/includes/template.php' ); |
8009 |
+ |
8010 |
+ $filesystem_method = get_filesystem_method(); |
8011 |
+ if ( 'direct' === $filesystem_method ) { |
8012 |
+ return true; |
8013 |
+ } |
8014 |
+ |
8015 |
+ ob_start(); |
8016 |
+ $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() ); |
8017 |
+ ob_end_clean(); |
8018 |
+ if ( $filesystem_credentials_are_stored ) { |
8019 |
+ return true; |
8020 |
+ } |
8021 |
+ |
8022 |
+ return false; |
8023 |
+ } |
8024 |
+ |
8025 |
+ public static function home_url() { |
8026 |
+ return self::preserve_scheme( 'home', 'home_url', true ); |
8027 |
+ } |
8028 |
+ |
8029 |
+ public static function site_url() { |
8030 |
+ return self::preserve_scheme( 'siteurl', 'site_url', true ); |
8031 |
+ } |
8032 |
+ |
8033 |
+ public static function main_network_site_url() { |
8034 |
+ return self::preserve_scheme( 'siteurl', 'network_site_url', false ); |
8035 |
+ } |
8036 |
+ |
8037 |
+ public static function preserve_scheme( $option, $url_function, $normalize_www = false ) { |
8038 |
+ $previous_https_value = isset( $_SERVER['HTTPS'] ) ? $_SERVER['HTTPS'] : null; |
8039 |
+ $_SERVER['HTTPS'] = 'off'; |
8040 |
+ $url = call_user_func( $url_function ); |
8041 |
+ $option_url = get_option( $option ); |
8042 |
+ if ( $previous_https_value ) { |
8043 |
+ $_SERVER['HTTPS'] = $previous_https_value; |
8044 |
+ } else { |
8045 |
+ unset( $_SERVER['HTTPS'] ); |
8046 |
+ } |
8047 |
+ |
8048 |
+ if ( $option_url === $url ) { |
8049 |
+ return $url; |
8050 |
+ } |
8051 |
+ |
8052 |
+ // turn them both into parsed format |
8053 |
+ $option_url = parse_url( $option_url ); |
8054 |
+ $url = parse_url( $url ); |
8055 |
+ |
8056 |
+ if ( $normalize_www ) { |
8057 |
+ if ( $url['host'] === "www.{$option_url[ 'host' ]}" ) { |
8058 |
+ // remove www if not present in option URL |
8059 |
+ $url['host'] = $option_url['host']; |
8060 |
+ } |
8061 |
+ if ( $option_url['host'] === "www.{$url[ 'host' ]}" ) { |
8062 |
+ // add www if present in option URL |
8063 |
+ $url['host'] = $option_url['host']; |
8064 |
+ } |
8065 |
+ } |
8066 |
+ |
8067 |
+ if ( $url['host'] === $option_url['host'] ) { |
8068 |
+ $url['scheme'] = $option_url['scheme']; |
8069 |
+ // return set_url_scheme( $current_url, $option_url['scheme'] ); |
8070 |
+ } |
8071 |
+ |
8072 |
+ $normalized_url = "{$url['scheme']}://{$url['host']}"; |
8073 |
+ |
8074 |
+ if ( isset( $url['path'] ) ) { |
8075 |
+ $normalized_url .= "{$url['path']}"; |
8076 |
+ } |
8077 |
+ |
8078 |
+ if ( isset( $url['query'] ) ) { |
8079 |
+ $normalized_url .= "?{$url['query']}"; |
8080 |
+ } |
8081 |
+ |
8082 |
+ return $normalized_url; |
8083 |
+ } |
8084 |
+ |
8085 |
+ public static function get_plugins() { |
8086 |
+ if ( ! function_exists( 'get_plugins' ) ) { |
8087 |
+ require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
8088 |
+ } |
8089 |
+ |
8090 |
+ /** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */ |
8091 |
+ return apply_filters( 'all_plugins', get_plugins() ); |
8092 |
+ } |
8093 |
+ |
8094 |
+ public static function wp_version() { |
8095 |
+ global $wp_version; |
8096 |
+ |
8097 |
+ return $wp_version; |
8098 |
+ } |
8099 |
+} |
8100 |
|
8101 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-json-deflate-codec.php b/plugins/jetpack/sync/class.jetpack-sync-json-deflate-codec.php |
8102 |
new file mode 100644 |
8103 |
index 0000000..6ec966e |
8104 |
--- /dev/null |
8105 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-json-deflate-codec.php |
8106 |
@@ -0,0 +1,58 @@ |
8107 |
+<?php |
8108 |
+ |
8109 |
+require_once dirname( __FILE__ ) . '/interface.jetpack-sync-codec.php'; |
8110 |
+ |
8111 |
+/** |
8112 |
+ * An implementation of iJetpack_Sync_Codec that uses gzip's DEFLATE |
8113 |
+ * algorithm to compress objects serialized using json_encode |
8114 |
+ */ |
8115 |
+class Jetpack_Sync_JSON_Deflate_Codec implements iJetpack_Sync_Codec { |
8116 |
+ const CODEC_NAME = 'deflate-json'; |
8117 |
+ |
8118 |
+ public function name() { |
8119 |
+ return self::CODEC_NAME; |
8120 |
+ } |
8121 |
+ |
8122 |
+ public function encode( $object ) { |
8123 |
+ return base64_encode( gzdeflate( $this->json_serialize( unserialize( serialize( $object ) ) ) ) ); |
8124 |
+ } |
8125 |
+ |
8126 |
+ public function decode( $input ) { |
8127 |
+ return $this->json_unserialize( gzinflate( base64_decode( $input ) ) ); |
8128 |
+ } |
8129 |
+ |
8130 |
+ // @see https://gist.github.com/muhqu/820694 |
8131 |
+ private function json_serialize( $any ) { |
8132 |
+ return json_encode( $this->json_wrap( $any ) ); |
8133 |
+ } |
8134 |
+ |
8135 |
+ private function json_unserialize( $str ) { |
8136 |
+ return $this->json_unwrap( json_decode( $str ) ); |
8137 |
+ } |
8138 |
+ |
8139 |
+ private function json_wrap( $any, $skip_assoc = false ) { |
8140 |
+ if ( ! $skip_assoc && is_array( $any ) && is_string( key( $any ) ) ) { |
8141 |
+ return (object) array( '_PHP_ASSOC' => $this->json_wrap( $any, true ) ); |
8142 |
+ } |
8143 |
+ if ( is_array( $any ) || is_object( $any ) ) { |
8144 |
+ foreach ( $any as &$v ) { |
8145 |
+ $v = $this->json_wrap( $v ); |
8146 |
+ } |
8147 |
+ } |
8148 |
+ |
8149 |
+ return $any; |
8150 |
+ } |
8151 |
+ |
8152 |
+ private function json_unwrap( $any, $skip_assoc = false ) { |
8153 |
+ if ( ! $skip_assoc && is_object( $any ) && isset( $any->_PHP_ASSOC ) && count( (array) $any ) == 1 ) { |
8154 |
+ return (array) $this->json_unwrap( $any->_PHP_ASSOC ); |
8155 |
+ } |
8156 |
+ if ( is_array( $any ) || is_object( $any ) ) { |
8157 |
+ foreach ( $any as &$v ) { |
8158 |
+ $v = $this->json_unwrap( $v ); |
8159 |
+ } |
8160 |
+ } |
8161 |
+ |
8162 |
+ return $any; |
8163 |
+ } |
8164 |
+} |
8165 |
|
8166 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-listener.php b/plugins/jetpack/sync/class.jetpack-sync-listener.php |
8167 |
new file mode 100644 |
8168 |
index 0000000..1362084 |
8169 |
--- /dev/null |
8170 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-listener.php |
8171 |
@@ -0,0 +1,207 @@ |
8172 |
+<?php |
8173 |
+ |
8174 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-settings.php'; |
8175 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-queue.php'; |
8176 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-modules.php'; |
8177 |
+ |
8178 |
+/** |
8179 |
+ * This class monitors actions and logs them to the queue to be sent |
8180 |
+ */ |
8181 |
+class Jetpack_Sync_Listener { |
8182 |
+ const QUEUE_STATE_CHECK_TRANSIENT = 'jetpack_sync_last_checked_queue_state'; |
8183 |
+ const QUEUE_STATE_CHECK_TIMEOUT = 300; // 5 minutes |
8184 |
+ |
8185 |
+ private $sync_queue; |
8186 |
+ private $full_sync_queue; |
8187 |
+ private $sync_queue_size_limit; |
8188 |
+ private $sync_queue_lag_limit; |
8189 |
+ |
8190 |
+ // singleton functions |
8191 |
+ private static $instance; |
8192 |
+ |
8193 |
+ public static function get_instance() { |
8194 |
+ if ( null === self::$instance ) { |
8195 |
+ self::$instance = new self(); |
8196 |
+ } |
8197 |
+ |
8198 |
+ return self::$instance; |
8199 |
+ } |
8200 |
+ |
8201 |
+ // this is necessary because you can't use "new" when you declare instance properties >:( |
8202 |
+ protected function __construct() { |
8203 |
+ $this->set_defaults(); |
8204 |
+ $this->init(); |
8205 |
+ } |
8206 |
+ |
8207 |
+ private function init() { |
8208 |
+ |
8209 |
+ $handler = array( $this, 'action_handler' ); |
8210 |
+ $full_sync_handler = array( $this, 'full_sync_action_handler' ); |
8211 |
+ |
8212 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
8213 |
+ $module->init_listeners( $handler ); |
8214 |
+ $module->init_full_sync_listeners( $full_sync_handler ); |
8215 |
+ } |
8216 |
+ |
8217 |
+ // Module Activation |
8218 |
+ add_action( 'jetpack_activate_module', $handler ); |
8219 |
+ add_action( 'jetpack_deactivate_module', $handler ); |
8220 |
+ |
8221 |
+ // Send periodic checksum |
8222 |
+ add_action( 'jetpack_sync_checksum', $handler ); |
8223 |
+ } |
8224 |
+ |
8225 |
+ function get_sync_queue() { |
8226 |
+ return $this->sync_queue; |
8227 |
+ } |
8228 |
+ |
8229 |
+ function get_full_sync_queue() { |
8230 |
+ return $this->full_sync_queue; |
8231 |
+ } |
8232 |
+ |
8233 |
+ function set_queue_size_limit( $limit ) { |
8234 |
+ $this->sync_queue_size_limit = $limit; |
8235 |
+ } |
8236 |
+ |
8237 |
+ function get_queue_size_limit() { |
8238 |
+ return $this->sync_queue_size_limit; |
8239 |
+ } |
8240 |
+ |
8241 |
+ function set_queue_lag_limit( $age ) { |
8242 |
+ $this->sync_queue_lag_limit = $age; |
8243 |
+ } |
8244 |
+ |
8245 |
+ function get_queue_lag_limit() { |
8246 |
+ return $this->sync_queue_lag_limit; |
8247 |
+ } |
8248 |
+ |
8249 |
+ function force_recheck_queue_limit() { |
8250 |
+ delete_transient( self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $this->sync_queue->id ); |
8251 |
+ delete_transient( self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $this->full_sync_queue->id ); |
8252 |
+ } |
8253 |
+ |
8254 |
+ // prevent adding items to the queue if it hasn't sent an item for 15 mins |
8255 |
+ // AND the queue is over 1000 items long (by default) |
8256 |
+ function can_add_to_queue( $queue ) { |
8257 |
+ if ( Jetpack_Sync_Settings::get_setting( 'disable' ) ) { |
8258 |
+ return false; |
8259 |
+ } |
8260 |
+ |
8261 |
+ $state_transient_name = self::QUEUE_STATE_CHECK_TRANSIENT . '_' . $queue->id; |
8262 |
+ |
8263 |
+ $queue_state = get_transient( $state_transient_name ); |
8264 |
+ |
8265 |
+ if ( false === $queue_state ) { |
8266 |
+ $queue_state = array( $queue->size(), $queue->lag() ); |
8267 |
+ set_transient( $state_transient_name, $queue_state, self::QUEUE_STATE_CHECK_TIMEOUT ); |
8268 |
+ } |
8269 |
+ |
8270 |
+ list( $queue_size, $queue_age ) = $queue_state; |
8271 |
+ |
8272 |
+ return ( $queue_age < $this->sync_queue_lag_limit ) |
8273 |
+ || |
8274 |
+ ( ( $queue_size + 1 ) < $this->sync_queue_size_limit ); |
8275 |
+ } |
8276 |
+ |
8277 |
+ function full_sync_action_handler() { |
8278 |
+ $args = func_get_args(); |
8279 |
+ $this->enqueue_action( current_filter(), $args, $this->full_sync_queue ); |
8280 |
+ } |
8281 |
+ |
8282 |
+ function action_handler() { |
8283 |
+ $args = func_get_args(); |
8284 |
+ $this->enqueue_action( current_filter(), $args, $this->sync_queue ); |
8285 |
+ } |
8286 |
+ |
8287 |
+ // add many actions to the queue directly, without invoking them |
8288 |
+ function bulk_enqueue_full_sync_actions( $action_name, $args_array ) { |
8289 |
+ $queue = $this->get_full_sync_queue(); |
8290 |
+ |
8291 |
+ // periodically check the size of the queue, and disable adding to it if |
8292 |
+ // it exceeds some limit AND the oldest item exceeds the age limit (i.e. sending has stopped) |
8293 |
+ if ( ! $this->can_add_to_queue( $queue ) ) { |
8294 |
+ return; |
8295 |
+ } |
8296 |
+ |
8297 |
+ // if we add any items to the queue, we should try to ensure that our script |
8298 |
+ // can't be killed before they are sent |
8299 |
+ if ( function_exists( 'ignore_user_abort' ) ) { |
8300 |
+ ignore_user_abort( true ); |
8301 |
+ } |
8302 |
+ |
8303 |
+ $data_to_enqueue = array(); |
8304 |
+ $user_id = get_current_user_id(); |
8305 |
+ $currtime = microtime( true ); |
8306 |
+ $is_importing = Jetpack_Sync_Settings::is_importing(); |
8307 |
+ |
8308 |
+ foreach( $args_array as $args ) { |
8309 |
+ |
8310 |
+ /** |
8311 |
+ * Modify or reject the data within an action before it is enqueued locally. |
8312 |
+ * |
8313 |
+ * @since 4.2.0 |
8314 |
+ * |
8315 |
+ * @param array The action parameters |
8316 |
+ */ |
8317 |
+ $args = apply_filters( "jetpack_sync_before_enqueue_$action_name", $args ); |
8318 |
+ |
8319 |
+ // allow listeners to abort |
8320 |
+ if ( $args === false ) { |
8321 |
+ continue; |
8322 |
+ } |
8323 |
+ |
8324 |
+ $data_to_enqueue[] = array( |
8325 |
+ $action_name, |
8326 |
+ array( $args ), |
8327 |
+ $user_id, |
8328 |
+ $currtime, |
8329 |
+ $is_importing, |
8330 |
+ ); |
8331 |
+ } |
8332 |
+ |
8333 |
+ $queue->add_all( $data_to_enqueue ); |
8334 |
+ } |
8335 |
+ |
8336 |
+ function enqueue_action( $current_filter, $args, $queue ) { |
8337 |
+ /** |
8338 |
+ * Modify or reject the data within an action before it is enqueued locally. |
8339 |
+ * |
8340 |
+ * @since 4.2.0 |
8341 |
+ * |
8342 |
+ * @param array The action parameters |
8343 |
+ */ |
8344 |
+ $args = apply_filters( "jetpack_sync_before_enqueue_$current_filter", $args ); |
8345 |
+ |
8346 |
+ // allow listeners to abort |
8347 |
+ if ( $args === false ) { |
8348 |
+ return; |
8349 |
+ } |
8350 |
+ |
8351 |
+ // periodically check the size of the queue, and disable adding to it if |
8352 |
+ // it exceeds some limit AND the oldest item exceeds the age limit (i.e. sending has stopped) |
8353 |
+ if ( ! $this->can_add_to_queue( $queue ) ) { |
8354 |
+ return; |
8355 |
+ } |
8356 |
+ |
8357 |
+ // if we add any items to the queue, we should try to ensure that our script |
8358 |
+ // can't be killed before they are sent |
8359 |
+ if ( function_exists( 'ignore_user_abort' ) ) { |
8360 |
+ ignore_user_abort( true ); |
8361 |
+ } |
8362 |
+ |
8363 |
+ $queue->add( array( |
8364 |
+ $current_filter, |
8365 |
+ $args, |
8366 |
+ get_current_user_id(), |
8367 |
+ microtime( true ), |
8368 |
+ Jetpack_Sync_Settings::is_importing() |
8369 |
+ ) ); |
8370 |
+ } |
8371 |
+ |
8372 |
+ function set_defaults() { |
8373 |
+ $this->sync_queue = new Jetpack_Sync_Queue( 'sync' ); |
8374 |
+ $this->full_sync_queue = new Jetpack_Sync_Queue( 'full_sync' ); |
8375 |
+ $this->set_queue_size_limit( Jetpack_Sync_Settings::get_setting( 'max_queue_size' ) ); |
8376 |
+ $this->set_queue_lag_limit( Jetpack_Sync_Settings::get_setting( 'max_queue_lag' ) ); |
8377 |
+ } |
8378 |
+} |
8379 |
|
8380 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-attachments.php b/plugins/jetpack/sync/class.jetpack-sync-module-attachments.php |
8381 |
new file mode 100644 |
8382 |
index 0000000..4cee033 |
8383 |
--- /dev/null |
8384 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-attachments.php |
8385 |
@@ -0,0 +1,28 @@ |
8386 |
+<?php |
8387 |
+ |
8388 |
+class Jetpack_Sync_Module_Attachments extends Jetpack_Sync_Module { |
8389 |
+ function name() { |
8390 |
+ return 'attachments'; |
8391 |
+ } |
8392 |
+ |
8393 |
+ public function init_listeners( $callable ) { |
8394 |
+ add_action( 'edit_attachment', array( $this, 'send_attachment_info' ) ); |
8395 |
+ // Once we don't have to support 4.3 we can start using add_action( 'attachment_updated', $handler, 10, 3 ); instead |
8396 |
+ add_action( 'add_attachment', array( $this, 'send_attachment_info' ) ); |
8397 |
+ add_action( 'jetpack_sync_save_add_attachment', $callable, 10, 2 ); |
8398 |
+ } |
8399 |
+ |
8400 |
+ function send_attachment_info( $attachment_id ) { |
8401 |
+ $attachment = get_post( $attachment_id ); |
8402 |
+ |
8403 |
+ /** |
8404 |
+ * Fires when the client needs to sync an attachment for a post |
8405 |
+ * |
8406 |
+ * @since 4.2.0 |
8407 |
+ * |
8408 |
+ * @param int The attachment ID |
8409 |
+ * @param object The attachment |
8410 |
+ */ |
8411 |
+ do_action( 'jetpack_sync_save_add_attachment', $attachment_id, $attachment ); |
8412 |
+ } |
8413 |
+} |
8414 |
|
8415 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-callables.php b/plugins/jetpack/sync/class.jetpack-sync-module-callables.php |
8416 |
new file mode 100644 |
8417 |
index 0000000..d2d8bc5 |
8418 |
--- /dev/null |
8419 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-callables.php |
8420 |
@@ -0,0 +1,148 @@ |
8421 |
+<?php |
8422 |
+ |
8423 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-functions.php'; |
8424 |
+ |
8425 |
+class Jetpack_Sync_Module_Callables extends Jetpack_Sync_Module { |
8426 |
+ const CALLABLES_CHECKSUM_OPTION_NAME = 'jetpack_callables_sync_checksum'; |
8427 |
+ const CALLABLES_AWAIT_TRANSIENT_NAME = 'jetpack_sync_callables_await'; |
8428 |
+ |
8429 |
+ private $callable_whitelist; |
8430 |
+ |
8431 |
+ public function name() { |
8432 |
+ return 'functions'; |
8433 |
+ } |
8434 |
+ |
8435 |
+ public function set_defaults() { |
8436 |
+ if ( is_multisite() ) { |
8437 |
+ $this->callable_whitelist = array_merge( Jetpack_Sync_Defaults::$default_callable_whitelist, Jetpack_Sync_Defaults::$default_multisite_callable_whitelist ); |
8438 |
+ } else { |
8439 |
+ $this->callable_whitelist = Jetpack_Sync_Defaults::$default_callable_whitelist; |
8440 |
+ } |
8441 |
+ } |
8442 |
+ |
8443 |
+ public function init_listeners( $callable ) { |
8444 |
+ add_action( 'jetpack_sync_callable', $callable, 10, 2 ); |
8445 |
+ |
8446 |
+ // always send change to active modules right away |
8447 |
+ add_action( 'update_option_jetpack_active_modules', array( $this, 'unlock_sync_callable' ) ); |
8448 |
+ |
8449 |
+ // get_plugins and wp_version |
8450 |
+ // gets fired when new code gets installed, updates etc. |
8451 |
+ add_action( 'upgrader_process_complete', array( $this, 'unlock_sync_callable' ) ); |
8452 |
+ } |
8453 |
+ |
8454 |
+ public function init_full_sync_listeners( $callable ) { |
8455 |
+ add_action( 'jetpack_full_sync_callables', $callable ); |
8456 |
+ } |
8457 |
+ |
8458 |
+ public function init_before_send() { |
8459 |
+ add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_sync_callables' ) ); |
8460 |
+ |
8461 |
+ // full sync |
8462 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_callables', array( $this, 'expand_callables' ) ); |
8463 |
+ } |
8464 |
+ |
8465 |
+ public function reset_data() { |
8466 |
+ delete_option( self::CALLABLES_CHECKSUM_OPTION_NAME ); |
8467 |
+ delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ); |
8468 |
+ } |
8469 |
+ |
8470 |
+ function set_callable_whitelist( $callables ) { |
8471 |
+ $this->callable_whitelist = $callables; |
8472 |
+ } |
8473 |
+ |
8474 |
+ function get_callable_whitelist() { |
8475 |
+ return $this->callable_whitelist; |
8476 |
+ } |
8477 |
+ |
8478 |
+ public function get_all_callables() { |
8479 |
+ // get_all_callables should run as the master user always. |
8480 |
+ $current_user_id = get_current_user_id(); |
8481 |
+ wp_set_current_user( Jetpack_Options::get_option( 'master_user' ) ); |
8482 |
+ $callables = array_combine( |
8483 |
+ array_keys( $this->callable_whitelist ), |
8484 |
+ array_map( array( $this, 'get_callable' ), array_values( $this->callable_whitelist ) ) |
8485 |
+ ); |
8486 |
+ wp_set_current_user( $current_user_id ); |
8487 |
+ |
8488 |
+ return $callables; |
8489 |
+ } |
8490 |
+ |
8491 |
+ private function get_callable( $callable ) { |
8492 |
+ return call_user_func( $callable ); |
8493 |
+ } |
8494 |
+ |
8495 |
+ public function enqueue_full_sync_actions( $config ) { |
8496 |
+ /** |
8497 |
+ * Tells the client to sync all callables to the server |
8498 |
+ * |
8499 |
+ * @since 4.2.0 |
8500 |
+ * |
8501 |
+ * @param boolean Whether to expand callables (should always be true) |
8502 |
+ */ |
8503 |
+ do_action( 'jetpack_full_sync_callables', true ); |
8504 |
+ |
8505 |
+ return 1; // The number of actions enqueued |
8506 |
+ } |
8507 |
+ |
8508 |
+ public function estimate_full_sync_actions( $config ) { |
8509 |
+ return 1; |
8510 |
+ } |
8511 |
+ |
8512 |
+ public function get_full_sync_actions() { |
8513 |
+ return array( 'jetpack_full_sync_callables' ); |
8514 |
+ } |
8515 |
+ |
8516 |
+ public function unlock_sync_callable() { |
8517 |
+ delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ); |
8518 |
+ } |
8519 |
+ |
8520 |
+ public function maybe_sync_callables() { |
8521 |
+ if ( ! is_admin() || Jetpack_Sync_Settings::is_doing_cron() ) { |
8522 |
+ return; |
8523 |
+ } |
8524 |
+ |
8525 |
+ if ( get_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ) ) { |
8526 |
+ return; |
8527 |
+ } |
8528 |
+ |
8529 |
+ set_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME, microtime( true ), Jetpack_Sync_Defaults::$default_sync_callables_wait_time ); |
8530 |
+ |
8531 |
+ $callables = $this->get_all_callables(); |
8532 |
+ |
8533 |
+ if ( empty( $callables ) ) { |
8534 |
+ return; |
8535 |
+ } |
8536 |
+ |
8537 |
+ $callable_checksums = (array) get_option( self::CALLABLES_CHECKSUM_OPTION_NAME, array() ); |
8538 |
+ |
8539 |
+ // only send the callables that have changed |
8540 |
+ foreach ( $callables as $name => $value ) { |
8541 |
+ $checksum = $this->get_check_sum( $value ); |
8542 |
+ // explicitly not using Identical comparison as get_option returns a string |
8543 |
+ if ( ! $this->still_valid_checksum( $callable_checksums, $name, $checksum ) && ! is_null( $value ) ) { |
8544 |
+ /** |
8545 |
+ * Tells the client to sync a callable (aka function) to the server |
8546 |
+ * |
8547 |
+ * @since 4.2.0 |
8548 |
+ * |
8549 |
+ * @param string The name of the callable |
8550 |
+ * @param mixed The value of the callable |
8551 |
+ */ |
8552 |
+ do_action( 'jetpack_sync_callable', $name, $value ); |
8553 |
+ $callable_checksums[ $name ] = $checksum; |
8554 |
+ } else { |
8555 |
+ $callable_checksums[ $name ] = $checksum; |
8556 |
+ } |
8557 |
+ } |
8558 |
+ update_option( self::CALLABLES_CHECKSUM_OPTION_NAME, $callable_checksums ); |
8559 |
+ } |
8560 |
+ |
8561 |
+ public function expand_callables( $args ) { |
8562 |
+ if ( $args[0] ) { |
8563 |
+ return $this->get_all_callables(); |
8564 |
+ } |
8565 |
+ |
8566 |
+ return $args; |
8567 |
+ } |
8568 |
+} |
8569 |
|
8570 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-comments.php b/plugins/jetpack/sync/class.jetpack-sync-module-comments.php |
8571 |
new file mode 100644 |
8572 |
index 0000000..3c93a8d |
8573 |
--- /dev/null |
8574 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-comments.php |
8575 |
@@ -0,0 +1,131 @@ |
8576 |
+<?php |
8577 |
+ |
8578 |
+class Jetpack_Sync_Module_Comments extends Jetpack_Sync_Module { |
8579 |
+ |
8580 |
+ public function name() { |
8581 |
+ return 'comments'; |
8582 |
+ } |
8583 |
+ |
8584 |
+ public function init_listeners( $callable ) { |
8585 |
+ add_action( 'wp_insert_comment', $callable, 10, 2 ); |
8586 |
+ add_action( 'deleted_comment', $callable ); |
8587 |
+ add_action( 'trashed_comment', $callable ); |
8588 |
+ add_action( 'spammed_comment', $callable ); |
8589 |
+ add_action( 'trashed_post_comments', $callable, 10, 2 ); |
8590 |
+ add_action( 'untrash_post_comments', $callable ); |
8591 |
+ |
8592 |
+ // even though it's messy, we implement these hooks because |
8593 |
+ // the edit_comment hook doesn't include the data |
8594 |
+ // so this saves us a DB read for every comment event |
8595 |
+ foreach ( array( '', 'trackback', 'pingback' ) as $comment_type ) { |
8596 |
+ foreach ( array( 'unapproved', 'approved' ) as $comment_status ) { |
8597 |
+ $comment_action_name = "comment_{$comment_status}_{$comment_type}"; |
8598 |
+ add_action( $comment_action_name, $callable, 10, 2 ); |
8599 |
+ } |
8600 |
+ } |
8601 |
+ } |
8602 |
+ |
8603 |
+ public function init_full_sync_listeners( $callable ) { |
8604 |
+ add_action( 'jetpack_full_sync_comments', $callable ); // also send comments meta |
8605 |
+ } |
8606 |
+ |
8607 |
+ public function init_before_send() { |
8608 |
+ add_filter( 'jetpack_sync_before_send_wp_insert_comment', array( $this, 'expand_wp_insert_comment' ) ); |
8609 |
+ |
8610 |
+ foreach ( array( '', 'trackback', 'pingback' ) as $comment_type ) { |
8611 |
+ foreach ( array( 'unapproved', 'approved' ) as $comment_status ) { |
8612 |
+ $comment_action_name = "comment_{$comment_status}_{$comment_type}"; |
8613 |
+ add_filter( 'jetpack_sync_before_send_' . $comment_action_name, array( |
8614 |
+ $this, |
8615 |
+ 'expand_wp_insert_comment', |
8616 |
+ ) ); |
8617 |
+ } |
8618 |
+ } |
8619 |
+ |
8620 |
+ // full sync |
8621 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_comments', array( $this, 'expand_comment_ids' ) ); |
8622 |
+ } |
8623 |
+ |
8624 |
+ public function enqueue_full_sync_actions( $config ) { |
8625 |
+ global $wpdb; |
8626 |
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_comments', $wpdb->comments, 'comment_ID', $this->get_where_sql( $config ) ); |
8627 |
+ } |
8628 |
+ |
8629 |
+ public function estimate_full_sync_actions( $config ) { |
8630 |
+ global $wpdb; |
8631 |
+ |
8632 |
+ $query = "SELECT count(*) FROM $wpdb->comments"; |
8633 |
+ |
8634 |
+ if ( $where_sql = $this->get_where_sql( $config ) ) { |
8635 |
+ $query .= ' WHERE ' . $where_sql; |
8636 |
+ } |
8637 |
+ |
8638 |
+ $count = $wpdb->get_var( $query ); |
8639 |
+ |
8640 |
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
8641 |
+ } |
8642 |
+ |
8643 |
+ private function get_where_sql( $config ) { |
8644 |
+ if ( is_array( $config ) ) { |
8645 |
+ return 'comment_ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
8646 |
+ } |
8647 |
+ |
8648 |
+ return null; |
8649 |
+ } |
8650 |
+ |
8651 |
+ public function get_full_sync_actions() { |
8652 |
+ return array( 'jetpack_full_sync_comments' ); |
8653 |
+ } |
8654 |
+ |
8655 |
+ public function count_full_sync_actions( $action_names ) { |
8656 |
+ return $this->count_actions( $action_names, array( 'jetpack_full_sync_comments' ) ); |
8657 |
+ } |
8658 |
+ |
8659 |
+ function expand_wp_comment_status_change( $args ) { |
8660 |
+ return array( $args[0], $this->filter_comment( $args[1] ) ); |
8661 |
+ } |
8662 |
+ |
8663 |
+ function expand_wp_insert_comment( $args ) { |
8664 |
+ return array( $args[0], $this->filter_comment( $args[1] ) ); |
8665 |
+ } |
8666 |
+ |
8667 |
+ function filter_comment( $comment ) { |
8668 |
+ /** |
8669 |
+ * Filters whether to prevent sending comment data to .com |
8670 |
+ * |
8671 |
+ * Passing true to the filter will prevent the comment data from being sent |
8672 |
+ * to the WordPress.com. |
8673 |
+ * Instead we pass data that will still enable us to do a checksum against the |
8674 |
+ * Jetpacks data but will prevent us from displaying the data on in the API as well as |
8675 |
+ * other services. |
8676 |
+ * @since 4.2.0 |
8677 |
+ * |
8678 |
+ * @param boolean false prevent post data from bing synced to WordPress.com |
8679 |
+ * @param mixed $comment WP_COMMENT object |
8680 |
+ */ |
8681 |
+ if ( apply_filters( 'jetpack_sync_prevent_sending_comment_data', false, $comment ) ) { |
8682 |
+ $blocked_comment = new stdClass(); |
8683 |
+ $blocked_comment->comment_ID = $comment->comment_ID; |
8684 |
+ $blocked_comment->comment_date = $comment->comment_date; |
8685 |
+ $blocked_comment->comment_date_gmt = $comment->comment_date_gmt; |
8686 |
+ $blocked_comment->comment_approved = 'jetpack_sync_blocked'; |
8687 |
+ |
8688 |
+ return $blocked_comment; |
8689 |
+ } |
8690 |
+ |
8691 |
+ return $comment; |
8692 |
+ } |
8693 |
+ |
8694 |
+ public function expand_comment_ids( $args ) { |
8695 |
+ $comment_ids = $args[0]; |
8696 |
+ $comments = get_comments( array( |
8697 |
+ 'include_unapproved' => true, |
8698 |
+ 'comment__in' => $comment_ids, |
8699 |
+ ) ); |
8700 |
+ |
8701 |
+ return array( |
8702 |
+ $comments, |
8703 |
+ $this->get_metadata( $comment_ids, 'comment' ), |
8704 |
+ ); |
8705 |
+ } |
8706 |
+} |
8707 |
|
8708 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-constants.php b/plugins/jetpack/sync/class.jetpack-sync-module-constants.php |
8709 |
new file mode 100644 |
8710 |
index 0000000..4ad9baf |
8711 |
--- /dev/null |
8712 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-constants.php |
8713 |
@@ -0,0 +1,124 @@ |
8714 |
+<?php |
8715 |
+ |
8716 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-defaults.php'; |
8717 |
+ |
8718 |
+class Jetpack_Sync_Module_Constants extends Jetpack_Sync_Module { |
8719 |
+ const CONSTANTS_CHECKSUM_OPTION_NAME = 'jetpack_constants_sync_checksum'; |
8720 |
+ const CONSTANTS_AWAIT_TRANSIENT_NAME = 'jetpack_sync_constants_await'; |
8721 |
+ |
8722 |
+ public function name() { |
8723 |
+ return 'constants'; |
8724 |
+ } |
8725 |
+ |
8726 |
+ private $constants_whitelist; |
8727 |
+ |
8728 |
+ public function set_defaults() { |
8729 |
+ $this->constants_whitelist = Jetpack_Sync_Defaults::$default_constants_whitelist; |
8730 |
+ } |
8731 |
+ |
8732 |
+ public function init_listeners( $callable ) { |
8733 |
+ add_action( 'jetpack_sync_constant', $callable, 10, 2 ); |
8734 |
+ } |
8735 |
+ |
8736 |
+ public function init_full_sync_listeners( $callable ) { |
8737 |
+ add_action( 'jetpack_full_sync_constants', $callable ); |
8738 |
+ } |
8739 |
+ |
8740 |
+ public function init_before_send() { |
8741 |
+ add_action( 'jetpack_sync_before_send_queue_sync', array( $this, 'maybe_sync_constants' ) ); |
8742 |
+ |
8743 |
+ // full sync |
8744 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_constants', array( $this, 'expand_constants' ) ); |
8745 |
+ } |
8746 |
+ |
8747 |
+ public function reset_data() { |
8748 |
+ delete_option( self::CONSTANTS_CHECKSUM_OPTION_NAME ); |
8749 |
+ delete_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME ); |
8750 |
+ } |
8751 |
+ |
8752 |
+ function set_constants_whitelist( $constants ) { |
8753 |
+ $this->constants_whitelist = $constants; |
8754 |
+ } |
8755 |
+ |
8756 |
+ function get_constants_whitelist() { |
8757 |
+ return $this->constants_whitelist; |
8758 |
+ } |
8759 |
+ |
8760 |
+ function enqueue_full_sync_actions( $config ) { |
8761 |
+ /** |
8762 |
+ * Tells the client to sync all constants to the server |
8763 |
+ * |
8764 |
+ * @since 4.2.0 |
8765 |
+ * |
8766 |
+ * @param boolean Whether to expand constants (should always be true) |
8767 |
+ */ |
8768 |
+ do_action( 'jetpack_full_sync_constants', true ); |
8769 |
+ |
8770 |
+ return 1; |
8771 |
+ } |
8772 |
+ |
8773 |
+ function estimate_full_sync_actions( $config ) { |
8774 |
+ return 1; |
8775 |
+ } |
8776 |
+ |
8777 |
+ function get_full_sync_actions() { |
8778 |
+ return array( 'jetpack_full_sync_constants' ); |
8779 |
+ } |
8780 |
+ |
8781 |
+ function maybe_sync_constants() { |
8782 |
+ if ( get_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME ) ) { |
8783 |
+ return; |
8784 |
+ } |
8785 |
+ |
8786 |
+ set_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME, microtime( true ), Jetpack_Sync_Defaults::$default_sync_constants_wait_time ); |
8787 |
+ |
8788 |
+ $constants = $this->get_all_constants(); |
8789 |
+ if ( empty( $constants ) ) { |
8790 |
+ return; |
8791 |
+ } |
8792 |
+ |
8793 |
+ $constants_checksums = (array) get_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, array() ); |
8794 |
+ |
8795 |
+ foreach ( $constants as $name => $value ) { |
8796 |
+ $checksum = $this->get_check_sum( $value ); |
8797 |
+ // explicitly not using Identical comparison as get_option returns a string |
8798 |
+ if ( ! $this->still_valid_checksum( $constants_checksums, $name, $checksum ) && ! is_null( $value ) ) { |
8799 |
+ /** |
8800 |
+ * Tells the client to sync a constant to the server |
8801 |
+ * |
8802 |
+ * @since 4.2.0 |
8803 |
+ * |
8804 |
+ * @param string The name of the constant |
8805 |
+ * @param mixed The value of the constant |
8806 |
+ */ |
8807 |
+ do_action( 'jetpack_sync_constant', $name, $value ); |
8808 |
+ $constants_checksums[ $name ] = $checksum; |
8809 |
+ } else { |
8810 |
+ $constants_checksums[ $name ] = $checksum; |
8811 |
+ } |
8812 |
+ } |
8813 |
+ update_option( self::CONSTANTS_CHECKSUM_OPTION_NAME, $constants_checksums ); |
8814 |
+ } |
8815 |
+ |
8816 |
+ // public so that we don't have to store an option for each constant |
8817 |
+ function get_all_constants() { |
8818 |
+ return array_combine( |
8819 |
+ $this->constants_whitelist, |
8820 |
+ array_map( array( $this, 'get_constant' ), $this->constants_whitelist ) |
8821 |
+ ); |
8822 |
+ } |
8823 |
+ |
8824 |
+ private function get_constant( $constant ) { |
8825 |
+ return ( defined( $constant ) ) ? |
8826 |
+ constant( $constant ) |
8827 |
+ : null; |
8828 |
+ } |
8829 |
+ |
8830 |
+ public function expand_constants( $args ) { |
8831 |
+ if ( $args[0] ) { |
8832 |
+ return $this->get_all_constants(); |
8833 |
+ } |
8834 |
+ |
8835 |
+ return $args; |
8836 |
+ } |
8837 |
+} |
8838 |
|
8839 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-full-sync.php b/plugins/jetpack/sync/class.jetpack-sync-module-full-sync.php |
8840 |
new file mode 100644 |
8841 |
index 0000000..1f196d1 |
8842 |
--- /dev/null |
8843 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-full-sync.php |
8844 |
@@ -0,0 +1,289 @@ |
8845 |
+<?php |
8846 |
+ |
8847 |
+/** |
8848 |
+ * This class does a full resync of the database by |
8849 |
+ * enqueuing an outbound action for every single object |
8850 |
+ * that we care about. |
8851 |
+ * |
8852 |
+ * This class, and its related class Jetpack_Sync_Module, contain a few non-obvious optimisations that should be explained: |
8853 |
+ * - we fire an action called jetpack_full_sync_start so that WPCOM can erase the contents of the cached database |
8854 |
+ * - for each object type, we page through the object IDs and enqueue them by firing some monitored actions |
8855 |
+ * - we load the full objects for those IDs in chunks of Jetpack_Sync_Module::ARRAY_CHUNK_SIZE (to reduce the number of MySQL calls) |
8856 |
+ * - we fire a trigger for the entire array which the Jetpack_Sync_Listener then serializes and queues. |
8857 |
+ */ |
8858 |
+ |
8859 |
+require_once 'class.jetpack-sync-wp-replicastore.php'; |
8860 |
+ |
8861 |
+class Jetpack_Sync_Module_Full_Sync extends Jetpack_Sync_Module { |
8862 |
+ const STATUS_OPTION_PREFIX = 'jetpack_sync_full_'; |
8863 |
+ const FULL_SYNC_TIMEOUT = 3600; |
8864 |
+ |
8865 |
+ private $items_added_since_last_pause; |
8866 |
+ private $last_pause_time; |
8867 |
+ private $queue_rate_limit; |
8868 |
+ |
8869 |
+ public function name() { |
8870 |
+ return 'full-sync'; |
8871 |
+ } |
8872 |
+ |
8873 |
+ function init_full_sync_listeners( $callable ) { |
8874 |
+ // synthetic actions for full sync |
8875 |
+ add_action( 'jetpack_full_sync_start', $callable ); |
8876 |
+ add_action( 'jetpack_full_sync_end', $callable ); |
8877 |
+ add_action( 'jetpack_full_sync_cancelled', $callable ); |
8878 |
+ } |
8879 |
+ |
8880 |
+ function init_before_send() { |
8881 |
+ // this is triggered after actions have been processed on the server |
8882 |
+ add_action( 'jetpack_sync_processed_actions', array( $this, 'update_sent_progress_action' ) ); |
8883 |
+ } |
8884 |
+ |
8885 |
+ function start( $modules = null ) { |
8886 |
+ $was_already_running = $this->is_started() && ! $this->is_finished(); |
8887 |
+ |
8888 |
+ // remove all evidence of previous full sync items and status |
8889 |
+ $this->reset_data(); |
8890 |
+ |
8891 |
+ $this->enable_queue_rate_limit(); |
8892 |
+ |
8893 |
+ if ( $was_already_running ) { |
8894 |
+ /** |
8895 |
+ * Fires when a full sync is cancelled. |
8896 |
+ * |
8897 |
+ * @since 4.2.0 |
8898 |
+ */ |
8899 |
+ do_action( 'jetpack_full_sync_cancelled' ); |
8900 |
+ } |
8901 |
+ |
8902 |
+ /** |
8903 |
+ * Fires when a full sync begins. This action is serialized |
8904 |
+ * and sent to the server so that it knows a full sync is coming. |
8905 |
+ * |
8906 |
+ * @since 4.2.0 |
8907 |
+ */ |
8908 |
+ do_action( 'jetpack_full_sync_start', $modules ); |
8909 |
+ $this->update_status_option( 'started', time() ); |
8910 |
+ |
8911 |
+ // configure modules |
8912 |
+ if ( ! is_array( $modules ) ) { |
8913 |
+ $modules = array(); |
8914 |
+ } |
8915 |
+ |
8916 |
+ if ( isset( $modules['users'] ) && 'initial' === $modules['users'] ) { |
8917 |
+ $user_module = Jetpack_Sync_Modules::get_module( 'users' ); |
8918 |
+ $modules['users'] = $user_module->get_initial_sync_user_config(); |
8919 |
+ } |
8920 |
+ |
8921 |
+ // by default, all modules are fully enabled |
8922 |
+ if ( count( $modules ) === 0 ) { |
8923 |
+ $default_module_config = true; |
8924 |
+ } else { |
8925 |
+ $default_module_config = false; |
8926 |
+ } |
8927 |
+ |
8928 |
+ // set default configuration, calculate totals, and save configuration if totals > 0 |
8929 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
8930 |
+ $module_name = $module->name(); |
8931 |
+ if ( ! isset( $modules[ $module_name ] ) ) { |
8932 |
+ $modules[ $module_name ] = $default_module_config; |
8933 |
+ } |
8934 |
+ |
8935 |
+ // check if this module is enabled |
8936 |
+ if ( ! ( $module_config = $modules[ $module_name ] ) ) { |
8937 |
+ continue; |
8938 |
+ } |
8939 |
+ |
8940 |
+ $total_items = $module->estimate_full_sync_actions( $module_config ); |
8941 |
+ |
8942 |
+ if ( ! is_null( $total_items ) && $total_items > 0 ) { |
8943 |
+ $this->update_status_option( "{$module_name}_total", $total_items ); |
8944 |
+ $this->update_status_option( "{$module_name}_config", $module_config ); |
8945 |
+ } |
8946 |
+ } |
8947 |
+ |
8948 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
8949 |
+ $module_name = $module->name(); |
8950 |
+ $module_config = $modules[ $module_name ]; |
8951 |
+ |
8952 |
+ // check if this module is enabled |
8953 |
+ if ( ! $module_config ) { |
8954 |
+ continue; |
8955 |
+ } |
8956 |
+ |
8957 |
+ $items_enqueued = $module->enqueue_full_sync_actions( $module_config ); |
8958 |
+ |
8959 |
+ if ( ! is_null( $items_enqueued ) && $items_enqueued > 0 ) { |
8960 |
+ $this->update_status_option( "{$module_name}_queued", $items_enqueued ); |
8961 |
+ } |
8962 |
+ } |
8963 |
+ |
8964 |
+ $this->update_status_option( 'queue_finished', time() ); |
8965 |
+ |
8966 |
+ $store = new Jetpack_Sync_WP_Replicastore(); |
8967 |
+ |
8968 |
+ /** |
8969 |
+ * Fires when a full sync ends. This action is serialized |
8970 |
+ * and sent to the server with checksums so that we can confirm the |
8971 |
+ * sync was successful. |
8972 |
+ * |
8973 |
+ * @since 4.2.0 |
8974 |
+ */ |
8975 |
+ do_action( 'jetpack_full_sync_end', $store->checksum_all() ); |
8976 |
+ |
8977 |
+ $this->disable_queue_rate_limit(); |
8978 |
+ |
8979 |
+ return true; |
8980 |
+ } |
8981 |
+ |
8982 |
+ function update_sent_progress_action( $actions ) { |
8983 |
+ |
8984 |
+ // quick way to map to first items with an array of arrays |
8985 |
+ $actions_with_counts = array_count_values( array_map( 'reset', $actions ) ); |
8986 |
+ |
8987 |
+ if ( ! $this->is_started() || $this->is_finished() ) { |
8988 |
+ return; |
8989 |
+ } |
8990 |
+ |
8991 |
+ if ( isset( $actions_with_counts['jetpack_full_sync_start'] ) ) { |
8992 |
+ $this->update_status_option( 'sent_started', time() ); |
8993 |
+ } |
8994 |
+ |
8995 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
8996 |
+ $module_actions = $module->get_full_sync_actions(); |
8997 |
+ $status_option_name = "{$module->name()}_sent"; |
8998 |
+ $items_sent = $this->get_status_option( $status_option_name, 0 ); |
8999 |
+ |
9000 |
+ foreach ( $module_actions as $module_action ) { |
9001 |
+ if ( isset( $actions_with_counts[ $module_action ] ) ) { |
9002 |
+ $items_sent += $actions_with_counts[ $module_action ]; |
9003 |
+ } |
9004 |
+ } |
9005 |
+ |
9006 |
+ if ( $items_sent > 0 ) { |
9007 |
+ $this->update_status_option( $status_option_name, $items_sent ); |
9008 |
+ } |
9009 |
+ } |
9010 |
+ |
9011 |
+ if ( isset( $actions_with_counts['jetpack_full_sync_end'] ) ) { |
9012 |
+ $this->update_status_option( 'finished', time() ); |
9013 |
+ } |
9014 |
+ } |
9015 |
+ |
9016 |
+ public function is_started() { |
9017 |
+ return !! $this->get_status_option( 'started' ); |
9018 |
+ } |
9019 |
+ |
9020 |
+ public function is_finished() { |
9021 |
+ return !! $this->get_status_option( 'finished' ); |
9022 |
+ } |
9023 |
+ |
9024 |
+ public function get_status() { |
9025 |
+ $status = array( |
9026 |
+ 'started' => $this->get_status_option( 'started' ), |
9027 |
+ 'queue_finished' => $this->get_status_option( 'queue_finished' ), |
9028 |
+ 'sent_started' => $this->get_status_option( 'sent_started' ), |
9029 |
+ 'finished' => $this->get_status_option( 'finished' ), |
9030 |
+ 'sent' => array(), |
9031 |
+ 'queue' => array(), |
9032 |
+ 'config' => array(), |
9033 |
+ 'total' => array(), |
9034 |
+ ); |
9035 |
+ |
9036 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
9037 |
+ $name = $module->name(); |
9038 |
+ |
9039 |
+ if ( $total = $this->get_status_option( "{$name}_total" ) ) { |
9040 |
+ $status[ 'total' ][ $name ] = $total; |
9041 |
+ } |
9042 |
+ |
9043 |
+ if ( $queued = $this->get_status_option( "{$name}_queued" ) ) { |
9044 |
+ $status[ 'queue' ][ $name ] = $queued; |
9045 |
+ } |
9046 |
+ |
9047 |
+ if ( $sent = $this->get_status_option( "{$name}_sent" ) ) { |
9048 |
+ $status[ 'sent' ][ $name ] = $sent; |
9049 |
+ } |
9050 |
+ |
9051 |
+ if ( $config = $this->get_status_option( "{$name}_config" ) ) { |
9052 |
+ $status[ 'config' ][ $name ] = $config; |
9053 |
+ } |
9054 |
+ } |
9055 |
+ |
9056 |
+ return $status; |
9057 |
+ } |
9058 |
+ |
9059 |
+ public function clear_status() { |
9060 |
+ $prefix = self::STATUS_OPTION_PREFIX; |
9061 |
+ delete_option( "{$prefix}_started" ); |
9062 |
+ delete_option( "{$prefix}_queue_finished" ); |
9063 |
+ delete_option( "{$prefix}_sent_started" ); |
9064 |
+ delete_option( "{$prefix}_finished" ); |
9065 |
+ |
9066 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
9067 |
+ delete_option( "{$prefix}_{$module->name()}_total" ); |
9068 |
+ delete_option( "{$prefix}_{$module->name()}_queued" ); |
9069 |
+ delete_option( "{$prefix}_{$module->name()}_sent" ); |
9070 |
+ delete_option( "{$prefix}_{$module->name()}_config" ); |
9071 |
+ } |
9072 |
+ } |
9073 |
+ |
9074 |
+ public function reset_data() { |
9075 |
+ $this->clear_status(); |
9076 |
+ require_once dirname( __FILE__ ) . '/class.jetpack-sync-listener.php'; |
9077 |
+ $listener = Jetpack_Sync_Listener::get_instance(); |
9078 |
+ $listener->get_full_sync_queue()->reset(); |
9079 |
+ } |
9080 |
+ |
9081 |
+ private function get_status_option( $option, $default = null ) { |
9082 |
+ $prefix = self::STATUS_OPTION_PREFIX; |
9083 |
+ |
9084 |
+ $value = get_option( "{$prefix}_{$option}", $default ); |
9085 |
+ |
9086 |
+ if ( ! $value ) { |
9087 |
+ // don't cast to int if we didn't find a value - we want to preserve null or false as sentinals |
9088 |
+ return $default; |
9089 |
+ } |
9090 |
+ |
9091 |
+ return is_numeric( $value ) ? intval( $value ) : $value; |
9092 |
+ } |
9093 |
+ |
9094 |
+ private function update_status_option( $name, $value ) { |
9095 |
+ $prefix = self::STATUS_OPTION_PREFIX; |
9096 |
+ update_option( "{$prefix}_{$name}", $value, false ); |
9097 |
+ } |
9098 |
+ |
9099 |
+ private function enable_queue_rate_limit() { |
9100 |
+ $this->queue_rate_limit = Jetpack_Sync_Settings::get_setting( 'queue_max_writes_sec' ); |
9101 |
+ $this->items_added_since_last_pause = 0; |
9102 |
+ $this->last_pause_time = microtime( true ); |
9103 |
+ |
9104 |
+ add_action( 'jpsq_item_added', array( $this, 'queue_item_added' ) ); |
9105 |
+ add_action( 'jpsq_items_added', array( $this, 'queue_items_added' ) ); |
9106 |
+ } |
9107 |
+ |
9108 |
+ private function disable_queue_rate_limit() { |
9109 |
+ remove_action( 'jpsq_item_added', array( $this, 'queue_item_added' ) ); |
9110 |
+ remove_action( 'jpsq_items_added', array( $this, 'queue_items_added' ) ); |
9111 |
+ } |
9112 |
+ |
9113 |
+ public function queue_item_added() { |
9114 |
+ $this->queue_items_added( 1 ); |
9115 |
+ } |
9116 |
+ |
9117 |
+ public function queue_items_added( $item_count ) { |
9118 |
+ // jpsq_item_added and jpsq_items_added both exec 1 db query, |
9119 |
+ // so we ignore $item_count and treat it as always 1 |
9120 |
+ $this->items_added_since_last_pause += 1; |
9121 |
+ |
9122 |
+ if ( $this->items_added_since_last_pause > $this->queue_rate_limit ) { |
9123 |
+ // sleep for the rest of the second |
9124 |
+ $sleep_til = $this->last_pause_time + 1.0; |
9125 |
+ $sleep_duration = $sleep_til - microtime( true ); |
9126 |
+ if ( $sleep_duration > 0.0 ) { |
9127 |
+ usleep( $sleep_duration * 1000000 ); |
9128 |
+ $this->last_pause_time = microtime( true ); |
9129 |
+ } |
9130 |
+ $this->items_added_since_last_pause = 0; |
9131 |
+ } |
9132 |
+ } |
9133 |
+} |
9134 |
|
9135 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-meta.php b/plugins/jetpack/sync/class.jetpack-sync-module-meta.php |
9136 |
new file mode 100644 |
9137 |
index 0000000..5fff16a |
9138 |
--- /dev/null |
9139 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-meta.php |
9140 |
@@ -0,0 +1,38 @@ |
9141 |
+<?php |
9142 |
+ |
9143 |
+class Jetpack_Sync_Module_Meta extends Jetpack_Sync_Module { |
9144 |
+ private $meta_types = array( 'post', 'comment' ); |
9145 |
+ |
9146 |
+ public function name() { |
9147 |
+ return 'meta'; |
9148 |
+ } |
9149 |
+ |
9150 |
+ public function init_listeners( $callable ) { |
9151 |
+ $whitelist_handler = array( $this, 'filter_meta' ); |
9152 |
+ |
9153 |
+ foreach ( $this->meta_types as $meta_type ) { |
9154 |
+ add_action( "added_{$meta_type}_meta", $callable, 10, 4 ); |
9155 |
+ add_action( "updated_{$meta_type}_meta", $callable, 10, 4 ); |
9156 |
+ add_action( "deleted_{$meta_type}_meta", $callable, 10, 4 ); |
9157 |
+ |
9158 |
+ add_filter( "jetpack_sync_before_enqueue_added_{$meta_type}_meta", $whitelist_handler ); |
9159 |
+ add_filter( "jetpack_sync_before_enqueue_updated_{$meta_type}_meta", $whitelist_handler ); |
9160 |
+ add_filter( "jetpack_sync_before_enqueue_deleted_{$meta_type}_meta", $whitelist_handler ); |
9161 |
+ } |
9162 |
+ } |
9163 |
+ |
9164 |
+ function filter_meta( $args ) { |
9165 |
+ if ( '_' === $args[2][0] && |
9166 |
+ ! in_array( $args[2], Jetpack_Sync_Defaults::$default_whitelist_meta_keys ) && |
9167 |
+ ! wp_startswith( $args[2], '_wpas_skip_' ) |
9168 |
+ ) { |
9169 |
+ return false; |
9170 |
+ } |
9171 |
+ |
9172 |
+ if ( in_array( $args[2], Jetpack_Sync_Settings::get_setting( 'meta_blacklist' ) ) ) { |
9173 |
+ return false; |
9174 |
+ } |
9175 |
+ |
9176 |
+ return $args; |
9177 |
+ } |
9178 |
+} |
9179 |
|
9180 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-network-options.php b/plugins/jetpack/sync/class.jetpack-sync-module-network-options.php |
9181 |
new file mode 100644 |
9182 |
index 0000000..b677890 |
9183 |
--- /dev/null |
9184 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-network-options.php |
9185 |
@@ -0,0 +1,112 @@ |
9186 |
+<?php |
9187 |
+ |
9188 |
+class Jetpack_Sync_Module_Network_Options extends Jetpack_Sync_Module { |
9189 |
+ private $network_options_whitelist; |
9190 |
+ |
9191 |
+ public function name() { |
9192 |
+ return 'network_options'; |
9193 |
+ } |
9194 |
+ |
9195 |
+ public function init_listeners( $callable ) { |
9196 |
+ if ( ! is_multisite() ) { |
9197 |
+ return; |
9198 |
+ } |
9199 |
+ |
9200 |
+ // multi site network options |
9201 |
+ add_action( 'add_site_option', $callable, 10, 2 ); |
9202 |
+ add_action( 'update_site_option', $callable, 10, 3 ); |
9203 |
+ add_action( 'delete_site_option', $callable, 10, 1 ); |
9204 |
+ |
9205 |
+ $whitelist_network_option_handler = array( $this, 'whitelist_network_options' ); |
9206 |
+ add_filter( 'jetpack_sync_before_enqueue_delete_site_option', $whitelist_network_option_handler ); |
9207 |
+ add_filter( 'jetpack_sync_before_enqueue_add_site_option', $whitelist_network_option_handler ); |
9208 |
+ add_filter( 'jetpack_sync_before_enqueue_update_site_option', $whitelist_network_option_handler ); |
9209 |
+ } |
9210 |
+ |
9211 |
+ public function init_full_sync_listeners( $callable ) { |
9212 |
+ add_action( 'jetpack_full_sync_network_options', $callable ); |
9213 |
+ } |
9214 |
+ |
9215 |
+ public function init_before_send() { |
9216 |
+ if ( ! is_multisite() ) { |
9217 |
+ return; |
9218 |
+ } |
9219 |
+ |
9220 |
+ // full sync |
9221 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_network_options', array( |
9222 |
+ $this, |
9223 |
+ 'expand_network_options', |
9224 |
+ ) ); |
9225 |
+ } |
9226 |
+ |
9227 |
+ public function set_defaults() { |
9228 |
+ $this->network_options_whitelist = Jetpack_Sync_Defaults::$default_network_options_whitelist; |
9229 |
+ } |
9230 |
+ |
9231 |
+ function enqueue_full_sync_actions( $config ) { |
9232 |
+ if ( ! is_multisite() ) { |
9233 |
+ return 0; |
9234 |
+ } |
9235 |
+ |
9236 |
+ /** |
9237 |
+ * Tells the client to sync all options to the server |
9238 |
+ * |
9239 |
+ * @since 4.2.0 |
9240 |
+ * |
9241 |
+ * @param boolean Whether to expand options (should always be true) |
9242 |
+ */ |
9243 |
+ do_action( 'jetpack_full_sync_network_options', true ); |
9244 |
+ |
9245 |
+ return 1; // The number of actions enqueued |
9246 |
+ } |
9247 |
+ |
9248 |
+ function estimate_full_sync_actions( $config ) { |
9249 |
+ if ( ! is_multisite() ) { |
9250 |
+ return 0; |
9251 |
+ } |
9252 |
+ |
9253 |
+ return 1; |
9254 |
+ } |
9255 |
+ |
9256 |
+ function get_full_sync_actions() { |
9257 |
+ return array( 'jetpack_full_sync_network_options' ); |
9258 |
+ } |
9259 |
+ |
9260 |
+ function get_all_network_options() { |
9261 |
+ $options = array(); |
9262 |
+ foreach ( $this->network_options_whitelist as $option ) { |
9263 |
+ $options[ $option ] = get_site_option( $option ); |
9264 |
+ } |
9265 |
+ |
9266 |
+ return $options; |
9267 |
+ } |
9268 |
+ |
9269 |
+ function set_network_options_whitelist( $options ) { |
9270 |
+ $this->network_options_whitelist = $options; |
9271 |
+ } |
9272 |
+ |
9273 |
+ function get_network_options_whitelist() { |
9274 |
+ return $this->network_options_whitelist; |
9275 |
+ } |
9276 |
+ |
9277 |
+ // reject non-whitelisted network options |
9278 |
+ function whitelist_network_options( $args ) { |
9279 |
+ if ( ! $this->is_whitelisted_network_option( $args[0] ) ) { |
9280 |
+ return false; |
9281 |
+ } |
9282 |
+ |
9283 |
+ return $args; |
9284 |
+ } |
9285 |
+ |
9286 |
+ function is_whitelisted_network_option( $option ) { |
9287 |
+ return is_multisite() && in_array( $option, $this->network_options_whitelist ); |
9288 |
+ } |
9289 |
+ |
9290 |
+ public function expand_network_options( $args ) { |
9291 |
+ if ( $args[0] ) { |
9292 |
+ return $this->get_all_network_options(); |
9293 |
+ } |
9294 |
+ |
9295 |
+ return $args; |
9296 |
+ } |
9297 |
+} |
9298 |
|
9299 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-options.php b/plugins/jetpack/sync/class.jetpack-sync-module-options.php |
9300 |
new file mode 100644 |
9301 |
index 0000000..a708d49 |
9302 |
--- /dev/null |
9303 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-options.php |
9304 |
@@ -0,0 +1,141 @@ |
9305 |
+<?php |
9306 |
+ |
9307 |
+class Jetpack_Sync_Module_Options extends Jetpack_Sync_Module { |
9308 |
+ private $options_whitelist; |
9309 |
+ |
9310 |
+ public function name() { |
9311 |
+ return 'options'; |
9312 |
+ } |
9313 |
+ |
9314 |
+ public function init_listeners( $callable ) { |
9315 |
+ // options |
9316 |
+ add_action( 'added_option', $callable, 10, 2 ); |
9317 |
+ add_action( 'updated_option', $callable, 10, 3 ); |
9318 |
+ add_action( 'deleted_option', $callable, 10, 1 ); |
9319 |
+ |
9320 |
+ // Sync Core Icon: Detect changes in Core's Site Icon and make it syncable. |
9321 |
+ add_action( 'add_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) ); |
9322 |
+ add_action( 'update_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) ); |
9323 |
+ add_action( 'delete_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) ); |
9324 |
+ |
9325 |
+ $whitelist_option_handler = array( $this, 'whitelist_options' ); |
9326 |
+ add_filter( 'jetpack_sync_before_enqueue_deleted_option', $whitelist_option_handler ); |
9327 |
+ add_filter( 'jetpack_sync_before_enqueue_added_option', $whitelist_option_handler ); |
9328 |
+ add_filter( 'jetpack_sync_before_enqueue_updated_option', $whitelist_option_handler ); |
9329 |
+ } |
9330 |
+ |
9331 |
+ public function init_full_sync_listeners( $callable ) { |
9332 |
+ add_action( 'jetpack_full_sync_options', $callable ); |
9333 |
+ } |
9334 |
+ |
9335 |
+ public function init_before_send() { |
9336 |
+ // full sync |
9337 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_options', array( $this, 'expand_options' ) ); |
9338 |
+ } |
9339 |
+ |
9340 |
+ public function set_defaults() { |
9341 |
+ $this->update_options_whitelist(); |
9342 |
+ } |
9343 |
+ |
9344 |
+ function enqueue_full_sync_actions( $config ) { |
9345 |
+ /** |
9346 |
+ * Tells the client to sync all options to the server |
9347 |
+ * |
9348 |
+ * @since 4.2.0 |
9349 |
+ * |
9350 |
+ * @param boolean Whether to expand options (should always be true) |
9351 |
+ */ |
9352 |
+ do_action( 'jetpack_full_sync_options', true ); |
9353 |
+ |
9354 |
+ return 1; // The number of actions enqueued |
9355 |
+ } |
9356 |
+ |
9357 |
+ public function estimate_full_sync_actions( $config ) { |
9358 |
+ return 1; |
9359 |
+ } |
9360 |
+ |
9361 |
+ function get_full_sync_actions() { |
9362 |
+ return array( 'jetpack_full_sync_options' ); |
9363 |
+ } |
9364 |
+ |
9365 |
+ // Is public so that we don't have to store so much data all the options twice. |
9366 |
+ function get_all_options() { |
9367 |
+ $options = array(); |
9368 |
+ foreach ( $this->options_whitelist as $option ) { |
9369 |
+ $options[ $option ] = get_option( $option ); |
9370 |
+ } |
9371 |
+ |
9372 |
+ // add theme mods |
9373 |
+ $theme_mods_option = 'theme_mods_'.get_option( 'stylesheet' ); |
9374 |
+ $theme_mods_value = get_option( $theme_mods_option ); |
9375 |
+ $this->filter_theme_mods( $theme_mods_value ); |
9376 |
+ $options[ $theme_mods_option ] = $theme_mods_value; |
9377 |
+ |
9378 |
+ return $options; |
9379 |
+ } |
9380 |
+ |
9381 |
+ function update_options_whitelist() { |
9382 |
+ /** This filter is already documented in json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php */ |
9383 |
+ $this->options_whitelist = apply_filters( 'jetpack_options_whitelist', Jetpack_Sync_Defaults::$default_options_whitelist ); |
9384 |
+ } |
9385 |
+ |
9386 |
+ function set_options_whitelist( $options ) { |
9387 |
+ $this->options_whitelist = $options; |
9388 |
+ } |
9389 |
+ |
9390 |
+ function get_options_whitelist() { |
9391 |
+ return $this->options_whitelist; |
9392 |
+ } |
9393 |
+ |
9394 |
+ // reject non-whitelisted options |
9395 |
+ function whitelist_options( $args ) { |
9396 |
+ if ( ! $this->is_whitelisted_option( $args[0] ) ) { |
9397 |
+ return false; |
9398 |
+ } |
9399 |
+ |
9400 |
+ // filter our weird array( false ) value for theme_mods_* |
9401 |
+ if ( 'theme_mods_' === substr( $args[0], 0, 11 ) ) { |
9402 |
+ $this->filter_theme_mods( $args[1] ); |
9403 |
+ if ( isset( $args[2] ) ) { |
9404 |
+ $this->filter_theme_mods( $args[2] ); |
9405 |
+ } |
9406 |
+ } |
9407 |
+ |
9408 |
+ return $args; |
9409 |
+ } |
9410 |
+ |
9411 |
+ function is_whitelisted_option( $option ) { |
9412 |
+ return in_array( $option, $this->options_whitelist ) || 'theme_mods_' === substr( $option, 0, 11 ); |
9413 |
+ } |
9414 |
+ |
9415 |
+ private function filter_theme_mods( &$value ) { |
9416 |
+ if ( is_array( $value ) && isset( $value[0] ) ) { |
9417 |
+ unset( $value[0] ); |
9418 |
+ } |
9419 |
+ } |
9420 |
+ |
9421 |
+ function jetpack_sync_core_icon() { |
9422 |
+ if ( function_exists( 'get_site_icon_url' ) ) { |
9423 |
+ $url = get_site_icon_url(); |
9424 |
+ } else { |
9425 |
+ return; |
9426 |
+ } |
9427 |
+ |
9428 |
+ require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
9429 |
+ // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
9430 |
+ if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
9431 |
+ // This is the option that is synced with dotcom |
9432 |
+ Jetpack_Options::update_option( 'site_icon_url', $url ); |
9433 |
+ } else if ( empty( $url ) ) { |
9434 |
+ Jetpack_Options::delete_option( 'site_icon_url' ); |
9435 |
+ } |
9436 |
+ } |
9437 |
+ |
9438 |
+ public function expand_options( $args ) { |
9439 |
+ if ( $args[0] ) { |
9440 |
+ return $this->get_all_options(); |
9441 |
+ } |
9442 |
+ |
9443 |
+ return $args; |
9444 |
+ } |
9445 |
+} |
9446 |
|
9447 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-plugins.php b/plugins/jetpack/sync/class.jetpack-sync-module-plugins.php |
9448 |
new file mode 100644 |
9449 |
index 0000000..e2b3dd8 |
9450 |
--- /dev/null |
9451 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-plugins.php |
9452 |
@@ -0,0 +1,14 @@ |
9453 |
+<?php |
9454 |
+ |
9455 |
+class Jetpack_Sync_Module_Plugins extends Jetpack_Sync_Module { |
9456 |
+ |
9457 |
+ public function name() { |
9458 |
+ return 'plugins'; |
9459 |
+ } |
9460 |
+ |
9461 |
+ public function init_listeners( $callable ) { |
9462 |
+ add_action( 'deleted_plugin', $callable, 10, 2 ); |
9463 |
+ add_action( 'activated_plugin', $callable, 10, 2 ); |
9464 |
+ add_action( 'deactivated_plugin', $callable, 10, 2 ); |
9465 |
+ } |
9466 |
+} |
9467 |
|
9468 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-posts.php b/plugins/jetpack/sync/class.jetpack-sync-module-posts.php |
9469 |
new file mode 100644 |
9470 |
index 0000000..8e2bec2 |
9471 |
--- /dev/null |
9472 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-posts.php |
9473 |
@@ -0,0 +1,135 @@ |
9474 |
+<?php |
9475 |
+ |
9476 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-settings.php'; |
9477 |
+ |
9478 |
+class Jetpack_Sync_Module_Posts extends Jetpack_Sync_Module { |
9479 |
+ |
9480 |
+ public function name() { |
9481 |
+ return 'posts'; |
9482 |
+ } |
9483 |
+ |
9484 |
+ public function set_defaults() { |
9485 |
+ } |
9486 |
+ |
9487 |
+ public function init_listeners( $callable ) { |
9488 |
+ add_action( 'wp_insert_post', $callable, 10, 3 ); |
9489 |
+ add_action( 'deleted_post', $callable, 10 ); |
9490 |
+ add_action( 'jetpack_publicize_post', $callable ); |
9491 |
+ add_filter( 'jetpack_sync_before_enqueue_wp_insert_post', array( $this, 'filter_blacklisted_post_types' ) ); |
9492 |
+ } |
9493 |
+ |
9494 |
+ public function init_full_sync_listeners( $callable ) { |
9495 |
+ add_action( 'jetpack_full_sync_posts', $callable ); // also sends post meta |
9496 |
+ } |
9497 |
+ |
9498 |
+ public function init_before_send() { |
9499 |
+ add_filter( 'jetpack_sync_before_send_wp_insert_post', array( $this, 'expand_wp_insert_post' ) ); |
9500 |
+ |
9501 |
+ // full sync |
9502 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_posts', array( $this, 'expand_post_ids' ) ); |
9503 |
+ } |
9504 |
+ |
9505 |
+ public function enqueue_full_sync_actions( $config ) { |
9506 |
+ global $wpdb; |
9507 |
+ |
9508 |
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_posts', $wpdb->posts, 'ID', $this->get_where_sql( $config ) ); |
9509 |
+ } |
9510 |
+ |
9511 |
+ public function estimate_full_sync_actions( $config ) { |
9512 |
+ global $wpdb; |
9513 |
+ |
9514 |
+ $query = "SELECT count(*) FROM $wpdb->posts WHERE " . $this->get_where_sql( $config ); |
9515 |
+ $count = $wpdb->get_var( $query ); |
9516 |
+ |
9517 |
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
9518 |
+ } |
9519 |
+ |
9520 |
+ private function get_where_sql( $config ) { |
9521 |
+ $where_sql = Jetpack_Sync_Settings::get_blacklisted_post_types_sql(); |
9522 |
+ |
9523 |
+ // config is a list of post IDs to sync |
9524 |
+ if ( is_array( $config ) ) { |
9525 |
+ $where_sql .= ' AND ID IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
9526 |
+ } |
9527 |
+ |
9528 |
+ return $where_sql; |
9529 |
+ } |
9530 |
+ |
9531 |
+ function get_full_sync_actions() { |
9532 |
+ return array( 'jetpack_full_sync_posts' ); |
9533 |
+ } |
9534 |
+ |
9535 |
+ /** |
9536 |
+ * Process content before send |
9537 |
+ */ |
9538 |
+ |
9539 |
+ function expand_wp_insert_post( $args ) { |
9540 |
+ return array( $args[0], $this->filter_post_content_and_add_links( $args[1] ), $args[2] ); |
9541 |
+ } |
9542 |
+ |
9543 |
+ function filter_blacklisted_post_types( $args ) { |
9544 |
+ $post = $args[1]; |
9545 |
+ |
9546 |
+ if ( in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) ) ) { |
9547 |
+ return false; |
9548 |
+ } |
9549 |
+ |
9550 |
+ return $args; |
9551 |
+ } |
9552 |
+ |
9553 |
+ // Expands wp_insert_post to include filtered content |
9554 |
+ function filter_post_content_and_add_links( $post_object ) { |
9555 |
+ global $post; |
9556 |
+ $post = $post_object; |
9557 |
+ /** |
9558 |
+ * Filters whether to prevent sending post data to .com |
9559 |
+ * |
9560 |
+ * Passing true to the filter will prevent the post data from being sent |
9561 |
+ * to the WordPress.com. |
9562 |
+ * Instead we pass data that will still enable us to do a checksum against the |
9563 |
+ * Jetpacks data but will prevent us from displaying the data on in the API as well as |
9564 |
+ * other services. |
9565 |
+ * @since 4.2.0 |
9566 |
+ * |
9567 |
+ * @param boolean false prevent post data from being synced to WordPress.com |
9568 |
+ * @param mixed $post WP_POST object |
9569 |
+ */ |
9570 |
+ if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
9571 |
+ // We only send the bare necessary object to be able to create a checksum. |
9572 |
+ $blocked_post = new stdClass(); |
9573 |
+ $blocked_post->ID = $post->ID; |
9574 |
+ $blocked_post->post_modified = $post->post_modified; |
9575 |
+ $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
9576 |
+ $blocked_post->post_status = 'jetpack_sync_blocked'; |
9577 |
+ |
9578 |
+ return $blocked_post; |
9579 |
+ } |
9580 |
+ |
9581 |
+ if ( 0 < strlen( $post->post_password ) ) { |
9582 |
+ $post->post_password = 'auto-' . wp_generate_password( 10, false ); |
9583 |
+ } |
9584 |
+ /** This filter is already documented in core. wp-includes/post-template.php */ |
9585 |
+ $post->post_content_filtered = apply_filters( 'the_content', $post->post_content ); |
9586 |
+ $post->post_excerpt_filtered = apply_filters( 'the_content', $post->post_excerpt ); |
9587 |
+ $post->permalink = get_permalink( $post->ID ); |
9588 |
+ $post->shortlink = wp_get_shortlink( $post->ID ); |
9589 |
+ $post->dont_email_post_to_subs = Jetpack::is_module_active( 'subscriptions' ) ? |
9590 |
+ get_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', true ) : |
9591 |
+ true; // Don't email subscription if the subscription module is not active. |
9592 |
+ |
9593 |
+ return $post; |
9594 |
+ } |
9595 |
+ |
9596 |
+ public function expand_post_ids( $args ) { |
9597 |
+ $post_ids = $args[0]; |
9598 |
+ |
9599 |
+ $posts = array_filter( array_map( array( 'WP_Post', 'get_instance' ), $post_ids ) ); |
9600 |
+ $posts = array_map( array( $this, 'filter_post_content_and_add_links' ), $posts ); |
9601 |
+ |
9602 |
+ return array( |
9603 |
+ $posts, |
9604 |
+ $this->get_metadata( $post_ids, 'post' ), |
9605 |
+ $this->get_term_relationships( $post_ids ), |
9606 |
+ ); |
9607 |
+ } |
9608 |
+} |
9609 |
|
9610 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-protect.php b/plugins/jetpack/sync/class.jetpack-sync-module-protect.php |
9611 |
new file mode 100644 |
9612 |
index 0000000..4a07c6b |
9613 |
--- /dev/null |
9614 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-protect.php |
9615 |
@@ -0,0 +1,16 @@ |
9616 |
+<?php |
9617 |
+ |
9618 |
+/** |
9619 |
+ * logs bruteprotect failed logins via sync |
9620 |
+ */ |
9621 |
+class Jetpack_Sync_Module_Protect extends Jetpack_Sync_Module { |
9622 |
+ private $taxonomy_whitelist; |
9623 |
+ |
9624 |
+ function name() { |
9625 |
+ return 'protect'; |
9626 |
+ } |
9627 |
+ |
9628 |
+ function init_listeners( $callback ) { |
9629 |
+ add_action( 'jpp_log_failed_attempt', $callback ); |
9630 |
+ } |
9631 |
+} |
9632 |
|
9633 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-stats.php b/plugins/jetpack/sync/class.jetpack-sync-module-stats.php |
9634 |
new file mode 100644 |
9635 |
index 0000000..e7a3695 |
9636 |
--- /dev/null |
9637 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-stats.php |
9638 |
@@ -0,0 +1,28 @@ |
9639 |
+<?php |
9640 |
+ |
9641 |
+class Jetpack_Sync_Module_Stats extends Jetpack_Sync_Module { |
9642 |
+ |
9643 |
+ function name() { |
9644 |
+ return 'stats'; |
9645 |
+ } |
9646 |
+ |
9647 |
+ function init_listeners( $callback ) { |
9648 |
+ add_action( 'jetpack_heartbeat', array( $this, 'sync_site_stats' ), 20 ); |
9649 |
+ add_action( 'jetpack_sync_heartbeat_stats', $callback ); |
9650 |
+ } |
9651 |
+ /* |
9652 |
+ * This namespaces the action that we sync. |
9653 |
+ * So that we can differentiate it from future actions. |
9654 |
+ */ |
9655 |
+ public function sync_site_stats() { |
9656 |
+ do_action( 'jetpack_sync_heartbeat_stats' ); |
9657 |
+ } |
9658 |
+ |
9659 |
+ public function init_before_send() { |
9660 |
+ add_filter( 'jetpack_sync_before_send_jetpack_sync_heartbeat_stats', array( $this, 'add_stats' ) ); |
9661 |
+ } |
9662 |
+ |
9663 |
+ public function add_stats() { |
9664 |
+ return array( Jetpack::get_stat_data( false ) ); |
9665 |
+ } |
9666 |
+} |
9667 |
|
9668 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-terms.php b/plugins/jetpack/sync/class.jetpack-sync-module-terms.php |
9669 |
new file mode 100644 |
9670 |
index 0000000..427e13c |
9671 |
--- /dev/null |
9672 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-terms.php |
9673 |
@@ -0,0 +1,112 @@ |
9674 |
+<?php |
9675 |
+ |
9676 |
+class Jetpack_Sync_Module_Terms extends Jetpack_Sync_Module { |
9677 |
+ private $taxonomy_whitelist; |
9678 |
+ |
9679 |
+ function name() { |
9680 |
+ return 'terms'; |
9681 |
+ } |
9682 |
+ |
9683 |
+ function init_listeners( $callable ) { |
9684 |
+ add_action( 'created_term', array( $this, 'save_term_handler' ), 10, 3 ); |
9685 |
+ add_action( 'edited_term', array( $this, 'save_term_handler' ), 10, 3 ); |
9686 |
+ add_action( 'jetpack_sync_save_term', $callable, 10, 4 ); |
9687 |
+ add_action( 'delete_term', $callable, 10, 4 ); |
9688 |
+ add_action( 'set_object_terms', $callable, 10, 6 ); |
9689 |
+ add_action( 'deleted_term_relationships', $callable, 10, 2 ); |
9690 |
+ } |
9691 |
+ |
9692 |
+ public function init_full_sync_listeners( $callable ) { |
9693 |
+ add_action( 'jetpack_full_sync_terms', $callable, 10, 2 ); |
9694 |
+ } |
9695 |
+ |
9696 |
+ function init_before_send() { |
9697 |
+ // full sync |
9698 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_terms', array( $this, 'expand_term_ids' ) ); |
9699 |
+ } |
9700 |
+ |
9701 |
+ function enqueue_full_sync_actions( $config ) { |
9702 |
+ global $wpdb; |
9703 |
+ |
9704 |
+ $taxonomies = get_taxonomies(); |
9705 |
+ $total_chunks_counter = 0; |
9706 |
+ foreach ( $taxonomies as $taxonomy ) { |
9707 |
+ // I hope this is never bigger than RAM... |
9708 |
+ $term_ids = $wpdb->get_col( $wpdb->prepare( "SELECT term_id FROM $wpdb->term_taxonomy WHERE taxonomy = %s", $taxonomy ) ); // Should we set a limit here? |
9709 |
+ // Request posts in groups of N for efficiency |
9710 |
+ $chunked_term_ids = array_chunk( $term_ids, self::ARRAY_CHUNK_SIZE ); |
9711 |
+ |
9712 |
+ // Send each chunk as an array of objects |
9713 |
+ foreach ( $chunked_term_ids as $chunk ) { |
9714 |
+ do_action( 'jetpack_full_sync_terms', $chunk, $taxonomy ); |
9715 |
+ $total_chunks_counter ++; |
9716 |
+ } |
9717 |
+ } |
9718 |
+ |
9719 |
+ return $total_chunks_counter; |
9720 |
+ } |
9721 |
+ |
9722 |
+ function estimate_full_sync_actions( $config ) { |
9723 |
+ // TODO - make this (and method above) more efficient for large numbers of terms or taxonomies |
9724 |
+ global $wpdb; |
9725 |
+ |
9726 |
+ $taxonomies = get_taxonomies(); |
9727 |
+ $total_chunks_counter = 0; |
9728 |
+ foreach ( $taxonomies as $taxonomy ) { |
9729 |
+ $total_ids = $wpdb->get_var( $wpdb->prepare( "SELECT count(term_id) FROM $wpdb->term_taxonomy WHERE taxonomy = %s", $taxonomy ) ); |
9730 |
+ $total_chunks_counter += (int) ceil( $total_ids / self::ARRAY_CHUNK_SIZE ); |
9731 |
+ } |
9732 |
+ |
9733 |
+ return $total_chunks_counter; |
9734 |
+ } |
9735 |
+ |
9736 |
+ function get_full_sync_actions() { |
9737 |
+ return array( 'jetpack_full_sync_terms' ); |
9738 |
+ } |
9739 |
+ |
9740 |
+ function save_term_handler( $term_id, $tt_id, $taxonomy ) { |
9741 |
+ if ( class_exists( 'WP_Term' ) ) { |
9742 |
+ $term_object = WP_Term::get_instance( $term_id, $taxonomy ); |
9743 |
+ } else { |
9744 |
+ $term_object = get_term_by( 'id', $term_id, $taxonomy ); |
9745 |
+ } |
9746 |
+ |
9747 |
+ /** |
9748 |
+ * Fires when the client needs to sync a new term |
9749 |
+ * |
9750 |
+ * @since 4.2.0 |
9751 |
+ * |
9752 |
+ * @param object the Term object |
9753 |
+ */ |
9754 |
+ do_action( 'jetpack_sync_save_term', $term_object ); |
9755 |
+ } |
9756 |
+ |
9757 |
+ function set_taxonomy_whitelist( $taxonomies ) { |
9758 |
+ $this->taxonomy_whitelist = $taxonomies; |
9759 |
+ } |
9760 |
+ |
9761 |
+ function set_defaults() { |
9762 |
+ $this->taxonomy_whitelist = Jetpack_Sync_Defaults::$default_taxonomy_whitelist; |
9763 |
+ } |
9764 |
+ |
9765 |
+ public function expand_term_ids( $args ) { |
9766 |
+ global $wp_version; |
9767 |
+ $term_ids = $args[0]; |
9768 |
+ $taxonomy = $args[1]; |
9769 |
+ // version 4.5 or higher |
9770 |
+ if ( version_compare( $wp_version, 4.5, '>=' ) ) { |
9771 |
+ $terms = get_terms( array( |
9772 |
+ 'taxonomy' => $taxonomy, |
9773 |
+ 'hide_empty' => false, |
9774 |
+ 'include' => $term_ids, |
9775 |
+ ) ); |
9776 |
+ } else { |
9777 |
+ $terms = get_terms( $taxonomy, array( |
9778 |
+ 'hide_empty' => false, |
9779 |
+ 'include' => $term_ids, |
9780 |
+ ) ); |
9781 |
+ } |
9782 |
+ |
9783 |
+ return $terms; |
9784 |
+ } |
9785 |
+} |
9786 |
|
9787 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-themes.php b/plugins/jetpack/sync/class.jetpack-sync-module-themes.php |
9788 |
new file mode 100644 |
9789 |
index 0000000..16f0451 |
9790 |
--- /dev/null |
9791 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-themes.php |
9792 |
@@ -0,0 +1,71 @@ |
9793 |
+<?php |
9794 |
+ |
9795 |
+class Jetpack_Sync_Module_Themes extends Jetpack_Sync_Module { |
9796 |
+ function name() { |
9797 |
+ return 'themes'; |
9798 |
+ } |
9799 |
+ |
9800 |
+ public function init_listeners( $callable ) { |
9801 |
+ add_action( 'switch_theme', array( $this, 'sync_theme_support' ) ); |
9802 |
+ add_action( 'jetpack_sync_current_theme_support', $callable ); |
9803 |
+ } |
9804 |
+ |
9805 |
+ public function init_full_sync_listeners( $callable ) { |
9806 |
+ add_action( 'jetpack_full_sync_theme_data', $callable ); |
9807 |
+ } |
9808 |
+ |
9809 |
+ public function sync_theme_support() { |
9810 |
+ /** |
9811 |
+ * Fires when the client needs to sync theme support info |
9812 |
+ * Only sends theme support attributes whitelisted in Jetpack_Sync_Defaults::$default_theme_support_whitelist |
9813 |
+ * |
9814 |
+ * @since 4.2.0 |
9815 |
+ * |
9816 |
+ * @param object the theme support hash |
9817 |
+ */ |
9818 |
+ do_action( 'jetpack_sync_current_theme_support' , $this->get_theme_support_info() ); |
9819 |
+ } |
9820 |
+ |
9821 |
+ public function enqueue_full_sync_actions( $config ) { |
9822 |
+ /** |
9823 |
+ * Tells the client to sync all theme data to the server |
9824 |
+ * |
9825 |
+ * @since 4.2.0 |
9826 |
+ * |
9827 |
+ * @param boolean Whether to expand theme data (should always be true) |
9828 |
+ */ |
9829 |
+ do_action( 'jetpack_full_sync_theme_data', true ); |
9830 |
+ return 1; // The number of actions enqueued |
9831 |
+ } |
9832 |
+ |
9833 |
+ public function estimate_full_sync_actions( $config ) { |
9834 |
+ return 1; |
9835 |
+ } |
9836 |
+ |
9837 |
+ public function init_before_send() { |
9838 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_theme_data', array( $this, 'expand_theme_data' ) ); |
9839 |
+ } |
9840 |
+ |
9841 |
+ function get_full_sync_actions() { |
9842 |
+ return array( 'jetpack_full_sync_theme_data' ); |
9843 |
+ } |
9844 |
+ |
9845 |
+ function expand_theme_data() { |
9846 |
+ return array( $this->get_theme_support_info() ); |
9847 |
+ } |
9848 |
+ |
9849 |
+ private function get_theme_support_info() { |
9850 |
+ global $_wp_theme_features; |
9851 |
+ |
9852 |
+ $theme_support = array(); |
9853 |
+ |
9854 |
+ foreach ( Jetpack_Sync_Defaults::$default_theme_support_whitelist as $theme_feature ) { |
9855 |
+ $has_support = current_theme_supports( $theme_feature ); |
9856 |
+ if ( $has_support ) { |
9857 |
+ $theme_support[ $theme_feature ] = $_wp_theme_features[ $theme_feature ]; |
9858 |
+ } |
9859 |
+ } |
9860 |
+ |
9861 |
+ return $theme_support; |
9862 |
+ } |
9863 |
+} |
9864 |
|
9865 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-updates.php b/plugins/jetpack/sync/class.jetpack-sync-module-updates.php |
9866 |
new file mode 100644 |
9867 |
index 0000000..f3f2377 |
9868 |
--- /dev/null |
9869 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-updates.php |
9870 |
@@ -0,0 +1,85 @@ |
9871 |
+<?php |
9872 |
+ |
9873 |
+class Jetpack_Sync_Module_Updates extends Jetpack_Sync_Module { |
9874 |
+ function name() { |
9875 |
+ return 'updates'; |
9876 |
+ } |
9877 |
+ |
9878 |
+ public function init_listeners( $callable ) { |
9879 |
+ add_action( 'set_site_transient_update_plugins', $callable, 10, 1 ); |
9880 |
+ add_action( 'set_site_transient_update_themes', $callable, 10, 1 ); |
9881 |
+ add_action( 'set_site_transient_update_core', $callable, 10, 1 ); |
9882 |
+ |
9883 |
+ add_filter( 'jetpack_sync_before_enqueue_set_site_transient_update_plugins', array( |
9884 |
+ $this, |
9885 |
+ 'filter_update_keys', |
9886 |
+ ), 10, 2 ); |
9887 |
+ add_filter( 'jetpack_sync_before_enqueue_upgrader_process_complete', array( |
9888 |
+ $this, |
9889 |
+ 'filter_upgrader_process_complete', |
9890 |
+ ), 10, 2 ); |
9891 |
+ } |
9892 |
+ |
9893 |
+ public function init_full_sync_listeners( $callable ) { |
9894 |
+ add_action( 'jetpack_full_sync_updates', $callable ); |
9895 |
+ } |
9896 |
+ |
9897 |
+ public function init_before_send() { |
9898 |
+ // full sync |
9899 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_updates', array( $this, 'expand_updates' ) ); |
9900 |
+ } |
9901 |
+ |
9902 |
+ public function enqueue_full_sync_actions( $config ) { |
9903 |
+ /** |
9904 |
+ * Tells the client to sync all updates to the server |
9905 |
+ * |
9906 |
+ * @since 4.2.0 |
9907 |
+ * |
9908 |
+ * @param boolean Whether to expand updates (should always be true) |
9909 |
+ */ |
9910 |
+ do_action( 'jetpack_full_sync_updates', true ); |
9911 |
+ |
9912 |
+ return 1; // The number of actions enqueued |
9913 |
+ } |
9914 |
+ |
9915 |
+ public function estimate_full_sync_actions( $config ) { |
9916 |
+ return 1; |
9917 |
+ } |
9918 |
+ |
9919 |
+ function get_full_sync_actions() { |
9920 |
+ return array( 'jetpack_full_sync_updates' ); |
9921 |
+ } |
9922 |
+ |
9923 |
+ public function get_all_updates() { |
9924 |
+ return array( |
9925 |
+ 'core' => get_site_transient( 'update_core' ), |
9926 |
+ 'plugins' => get_site_transient( 'update_plugins' ), |
9927 |
+ 'themes' => get_site_transient( 'update_themes' ), |
9928 |
+ ); |
9929 |
+ } |
9930 |
+ |
9931 |
+ // removes unnecessary keys from synced updates data |
9932 |
+ function filter_update_keys( $args ) { |
9933 |
+ $updates = $args[0]; |
9934 |
+ |
9935 |
+ if ( isset( $updates->no_update ) ) { |
9936 |
+ unset( $updates->no_update ); |
9937 |
+ } |
9938 |
+ |
9939 |
+ return $args; |
9940 |
+ } |
9941 |
+ |
9942 |
+ function filter_upgrader_process_complete( $args ) { |
9943 |
+ array_shift( $args ); |
9944 |
+ |
9945 |
+ return $args; |
9946 |
+ } |
9947 |
+ |
9948 |
+ public function expand_updates( $args ) { |
9949 |
+ if ( $args[0] ) { |
9950 |
+ return $this->get_all_updates(); |
9951 |
+ } |
9952 |
+ |
9953 |
+ return $args; |
9954 |
+ } |
9955 |
+} |
9956 |
|
9957 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-users.php b/plugins/jetpack/sync/class.jetpack-sync-module-users.php |
9958 |
new file mode 100644 |
9959 |
index 0000000..2b6e1c0 |
9960 |
--- /dev/null |
9961 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module-users.php |
9962 |
@@ -0,0 +1,217 @@ |
9963 |
+<?php |
9964 |
+ |
9965 |
+class Jetpack_Sync_Module_Users extends Jetpack_Sync_Module { |
9966 |
+ const MAX_INITIAL_SYNC_USERS = 100; |
9967 |
+ |
9968 |
+ function name() { |
9969 |
+ return 'users'; |
9970 |
+ } |
9971 |
+ |
9972 |
+ public function init_listeners( $callable ) { |
9973 |
+ // users |
9974 |
+ add_action( 'user_register', array( $this, 'save_user_handler' ) ); |
9975 |
+ add_action( 'profile_update', array( $this, 'save_user_handler' ), 10, 2 ); |
9976 |
+ add_action( 'add_user_to_blog', array( $this, 'save_user_handler' ) ); |
9977 |
+ add_action( 'jetpack_sync_save_user', $callable, 10, 2 ); |
9978 |
+ |
9979 |
+ add_action( 'deleted_user', $callable, 10, 2 ); |
9980 |
+ add_action( 'remove_user_from_blog', $callable, 10, 2 ); |
9981 |
+ |
9982 |
+ // user roles |
9983 |
+ add_action( 'add_user_role', array( $this, 'save_user_role_handler' ), 10, 2 ); |
9984 |
+ add_action( 'set_user_role', array( $this, 'save_user_role_handler' ), 10, 3 ); |
9985 |
+ add_action( 'remove_user_role', array( $this, 'save_user_role_handler' ), 10, 2 ); |
9986 |
+ |
9987 |
+ // user capabilities |
9988 |
+ add_action( 'added_user_meta', array( $this, 'save_user_cap_handler' ), 10, 4 ); |
9989 |
+ add_action( 'updated_user_meta', array( $this, 'save_user_cap_handler' ), 10, 4 ); |
9990 |
+ add_action( 'deleted_user_meta', array( $this, 'save_user_cap_handler' ), 10, 4 ); |
9991 |
+ |
9992 |
+ // user authentication |
9993 |
+ add_action( 'wp_login', $callable, 10, 2 ); |
9994 |
+ add_action( 'wp_login_failed', $callable, 10, 2 ); |
9995 |
+ add_action( 'wp_logout', $callable, 10, 0 ); |
9996 |
+ } |
9997 |
+ |
9998 |
+ public function init_full_sync_listeners( $callable ) { |
9999 |
+ add_action( 'jetpack_full_sync_users', $callable ); |
10000 |
+ } |
10001 |
+ |
10002 |
+ public function init_before_send() { |
10003 |
+ add_filter( 'jetpack_sync_before_send_jetpack_sync_save_user', array( $this, 'expand_user' ) ); |
10004 |
+ add_filter( 'jetpack_sync_before_send_wp_login', array( $this, 'expand_login_username' ), 10, 1 ); |
10005 |
+ add_filter( 'jetpack_sync_before_send_wp_logout', array( $this, 'expand_logout_username' ), 10, 2 ); |
10006 |
+ |
10007 |
+ // full sync |
10008 |
+ add_filter( 'jetpack_sync_before_send_jetpack_full_sync_users', array( $this, 'expand_users' ) ); |
10009 |
+ } |
10010 |
+ |
10011 |
+ public function sanitize_user_and_expand( $user ) { |
10012 |
+ $user = $this->sanitize_user( $user ); |
10013 |
+ |
10014 |
+ return $this->add_to_user( $user ); |
10015 |
+ } |
10016 |
+ |
10017 |
+ public function sanitize_user( $user ) { |
10018 |
+ // this create a new user object and stops the passing of the object by reference. |
10019 |
+ $user = unserialize( serialize( $user ) ); |
10020 |
+ unset( $user->data->user_pass ); |
10021 |
+ |
10022 |
+ return $user; |
10023 |
+ } |
10024 |
+ |
10025 |
+ public function add_to_user( $user ) { |
10026 |
+ $user->allowed_mime_types = get_allowed_mime_types( $user ); |
10027 |
+ |
10028 |
+ return $user; |
10029 |
+ } |
10030 |
+ |
10031 |
+ public function expand_user( $args ) { |
10032 |
+ list( $user ) = $args; |
10033 |
+ |
10034 |
+ if ( $user ) { |
10035 |
+ return array( $this->add_to_user( $user ) ); |
10036 |
+ } |
10037 |
+ |
10038 |
+ return false; |
10039 |
+ } |
10040 |
+ |
10041 |
+ public function expand_login_username( $args ) { |
10042 |
+ list( $login, $user ) = $args; |
10043 |
+ $user = $this->sanitize_user( $user ); |
10044 |
+ |
10045 |
+ return array( $login, $user ); |
10046 |
+ } |
10047 |
+ |
10048 |
+ public function expand_logout_username( $args, $user_id ) { |
10049 |
+ $user = get_userdata( $user_id ); |
10050 |
+ $user = $this->sanitize_user( $user ); |
10051 |
+ $login = $user->data->user_login; |
10052 |
+ |
10053 |
+ return array( $login, $user ); |
10054 |
+ } |
10055 |
+ |
10056 |
+ function save_user_handler( $user_id, $old_user_data = null ) { |
10057 |
+ |
10058 |
+ // ensure we only sync users who are members of the current blog |
10059 |
+ if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { |
10060 |
+ return; |
10061 |
+ } |
10062 |
+ |
10063 |
+ $user = $this->sanitize_user( get_user_by( 'id', $user_id ) ); |
10064 |
+ |
10065 |
+ // Older versions of WP don't pass the old_user_data in ->data |
10066 |
+ if ( isset( $old_user_data->data ) ) { |
10067 |
+ $old_user = $old_user_data->data; |
10068 |
+ } else { |
10069 |
+ $old_user = $old_user_data; |
10070 |
+ } |
10071 |
+ |
10072 |
+ if ( $old_user !== null ) { |
10073 |
+ unset( $old_user->user_pass ); |
10074 |
+ if ( serialize( $old_user ) === serialize( $user->data ) ) { |
10075 |
+ return; |
10076 |
+ } |
10077 |
+ } |
10078 |
+ /** |
10079 |
+ * Fires when the client needs to sync an updated user |
10080 |
+ * |
10081 |
+ * @since 4.2.0 |
10082 |
+ * |
10083 |
+ * @param object The WP_User object |
10084 |
+ */ |
10085 |
+ do_action( 'jetpack_sync_save_user', $user ); |
10086 |
+ } |
10087 |
+ |
10088 |
+ function save_user_role_handler( $user_id, $role, $old_roles = null ) { |
10089 |
+ $user = $this->sanitize_user( get_user_by( 'id', $user_id ) ); |
10090 |
+ |
10091 |
+ /** |
10092 |
+ * Fires when the client needs to sync an updated user |
10093 |
+ * |
10094 |
+ * @since 4.2.0 |
10095 |
+ * |
10096 |
+ * @param object The WP_User object |
10097 |
+ */ |
10098 |
+ do_action( 'jetpack_sync_save_user', $user ); |
10099 |
+ } |
10100 |
+ |
10101 |
+ function save_user_cap_handler( $meta_id, $user_id, $meta_key, $capabilities ) { |
10102 |
+ |
10103 |
+ // if a user is currently being removed as a member of this blog, we don't fire the event |
10104 |
+ if ( current_filter() === 'deleted_user_meta' |
10105 |
+ && |
10106 |
+ preg_match( '/capabilities|user_level/', $meta_key ) |
10107 |
+ && |
10108 |
+ ! is_user_member_of_blog( $user_id, get_current_blog_id() ) |
10109 |
+ ) { |
10110 |
+ return; |
10111 |
+ } |
10112 |
+ |
10113 |
+ $user = get_user_by( 'id', $user_id ); |
10114 |
+ if ( $meta_key === $user->cap_key ) { |
10115 |
+ /** |
10116 |
+ * Fires when the client needs to sync an updated user |
10117 |
+ * |
10118 |
+ * @since 4.2.0 |
10119 |
+ * |
10120 |
+ * @param object The Sanitized WP_User object |
10121 |
+ */ |
10122 |
+ do_action( 'jetpack_sync_save_user', $this->sanitize_user( $user ) ); |
10123 |
+ } |
10124 |
+ } |
10125 |
+ |
10126 |
+ public function enqueue_full_sync_actions( $config ) { |
10127 |
+ global $wpdb; |
10128 |
+ return $this->enqueue_all_ids_as_action( 'jetpack_full_sync_users', $wpdb->usermeta, 'user_id', $this->get_where_sql( $config ) ); |
10129 |
+ } |
10130 |
+ |
10131 |
+ public function estimate_full_sync_actions( $config ) { |
10132 |
+ global $wpdb; |
10133 |
+ |
10134 |
+ $query = "SELECT count(*) FROM $wpdb->usermeta"; |
10135 |
+ |
10136 |
+ if ( $where_sql = $this->get_where_sql( $config ) ) { |
10137 |
+ $query .= ' WHERE ' . $where_sql; |
10138 |
+ } |
10139 |
+ |
10140 |
+ $count = $wpdb->get_var( $query ); |
10141 |
+ |
10142 |
+ return (int) ceil( $count / self::ARRAY_CHUNK_SIZE ); |
10143 |
+ } |
10144 |
+ |
10145 |
+ private function get_where_sql( $config ) { |
10146 |
+ global $wpdb; |
10147 |
+ |
10148 |
+ $query = "meta_key = '{$wpdb->prefix}capabilities'"; |
10149 |
+ |
10150 |
+ // config is a list of user IDs to sync |
10151 |
+ if ( is_array( $config ) ) { |
10152 |
+ $query .= ' AND user_id IN (' . implode( ',', array_map( 'intval', $config ) ) . ')'; |
10153 |
+ } |
10154 |
+ |
10155 |
+ return $query; |
10156 |
+ } |
10157 |
+ |
10158 |
+ function get_full_sync_actions() { |
10159 |
+ return array( 'jetpack_full_sync_users' ); |
10160 |
+ } |
10161 |
+ |
10162 |
+ function get_initial_sync_user_config() { |
10163 |
+ global $wpdb; |
10164 |
+ |
10165 |
+ $user_ids = $wpdb->get_col( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}user_level' AND meta_value > 0 LIMIT " . ( self::MAX_INITIAL_SYNC_USERS + 1 ) ); |
10166 |
+ |
10167 |
+ if ( count( $user_ids ) <= self::MAX_INITIAL_SYNC_USERS ) { |
10168 |
+ return $user_ids; |
10169 |
+ } else { |
10170 |
+ return false; |
10171 |
+ } |
10172 |
+ } |
10173 |
+ |
10174 |
+ public function expand_users( $args ) { |
10175 |
+ $user_ids = $args[0]; |
10176 |
+ |
10177 |
+ return array_map( array( $this, 'sanitize_user_and_expand' ), get_users( array( 'include' => $user_ids ) ) ); |
10178 |
+ } |
10179 |
+} |
10180 |
|
10181 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module.php b/plugins/jetpack/sync/class.jetpack-sync-module.php |
10182 |
new file mode 100644 |
10183 |
index 0000000..bfcada5 |
10184 |
--- /dev/null |
10185 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-module.php |
10186 |
@@ -0,0 +1,107 @@ |
10187 |
+<?php |
10188 |
+ |
10189 |
+/** |
10190 |
+ * Basic methods implemented by Jetpack Sync extensions |
10191 |
+ */ |
10192 |
+abstract class Jetpack_Sync_Module { |
10193 |
+ const ARRAY_CHUNK_SIZE = 10; |
10194 |
+ |
10195 |
+ abstract public function name(); |
10196 |
+ |
10197 |
+ // override these to set up listeners and set/reset data/defaults |
10198 |
+ public function init_listeners( $callable ) { |
10199 |
+ } |
10200 |
+ |
10201 |
+ public function init_full_sync_listeners( $callable ) { |
10202 |
+ } |
10203 |
+ |
10204 |
+ public function init_before_send() { |
10205 |
+ } |
10206 |
+ |
10207 |
+ public function set_defaults() { |
10208 |
+ } |
10209 |
+ |
10210 |
+ public function reset_data() { |
10211 |
+ } |
10212 |
+ |
10213 |
+ public function enqueue_full_sync_actions( $config ) { |
10214 |
+ // in subclasses, return the number of items enqueued |
10215 |
+ return 0; |
10216 |
+ } |
10217 |
+ |
10218 |
+ public function estimate_full_sync_actions( $config ) { |
10219 |
+ // in subclasses, return the number of items yet to be enqueued |
10220 |
+ return 0; |
10221 |
+ } |
10222 |
+ |
10223 |
+ public function get_full_sync_actions() { |
10224 |
+ return array(); |
10225 |
+ } |
10226 |
+ |
10227 |
+ protected function count_actions( $action_names, $actions_to_count ) { |
10228 |
+ return count( array_intersect( $action_names, $actions_to_count ) ); |
10229 |
+ } |
10230 |
+ |
10231 |
+ protected function get_check_sum( $values ) { |
10232 |
+ return crc32( json_encode( $values ) ); |
10233 |
+ } |
10234 |
+ |
10235 |
+ protected function still_valid_checksum( $sums_to_check, $name, $new_sum ) { |
10236 |
+ if ( isset( $sums_to_check[ $name ] ) && $sums_to_check[ $name ] === $new_sum ) { |
10237 |
+ return true; |
10238 |
+ } |
10239 |
+ |
10240 |
+ return false; |
10241 |
+ } |
10242 |
+ |
10243 |
+ protected function enqueue_all_ids_as_action( $action_name, $table_name, $id_field, $where_sql ) { |
10244 |
+ global $wpdb; |
10245 |
+ |
10246 |
+ if ( ! $where_sql ) { |
10247 |
+ $where_sql = '1 = 1'; |
10248 |
+ } |
10249 |
+ |
10250 |
+ $items_per_page = 1000; |
10251 |
+ $page = 1; |
10252 |
+ $chunk_count = 0; |
10253 |
+ $previous_id = 0; |
10254 |
+ $listener = Jetpack_Sync_Listener::get_instance(); |
10255 |
+ while ( $ids = $wpdb->get_col( "SELECT {$id_field} FROM {$table_name} WHERE {$where_sql} AND {$id_field} > {$previous_id} ORDER BY {$id_field} ASC LIMIT {$items_per_page}" ) ) { |
10256 |
+ // Request posts in groups of N for efficiency |
10257 |
+ $chunked_ids = array_chunk( $ids, self::ARRAY_CHUNK_SIZE ); |
10258 |
+ |
10259 |
+ $listener->bulk_enqueue_full_sync_actions( $action_name, $chunked_ids ); |
10260 |
+ |
10261 |
+ $chunk_count += count( $chunked_ids ); |
10262 |
+ $page += 1; |
10263 |
+ $previous_id = end( $ids ); |
10264 |
+ } |
10265 |
+ |
10266 |
+ return $chunk_count; |
10267 |
+ } |
10268 |
+ |
10269 |
+ protected function get_metadata( $ids, $meta_type ) { |
10270 |
+ global $wpdb; |
10271 |
+ $table = _get_meta_table( $meta_type ); |
10272 |
+ $id = $meta_type . '_id'; |
10273 |
+ if ( ! $table ) { |
10274 |
+ return array(); |
10275 |
+ } |
10276 |
+ |
10277 |
+ return array_map( |
10278 |
+ array( $this, 'unserialize_meta' ), |
10279 |
+ $wpdb->get_results( "SELECT $id, meta_key, meta_value, meta_id FROM $table WHERE $id IN ( " . implode( ',', wp_parse_id_list( $ids ) ) . ' )', OBJECT ) |
10280 |
+ ); |
10281 |
+ } |
10282 |
+ |
10283 |
+ protected function get_term_relationships( $ids ) { |
10284 |
+ global $wpdb; |
10285 |
+ |
10286 |
+ return $wpdb->get_results( "SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id IN ( " . implode( ',', wp_parse_id_list( $ids ) ) . ' )', OBJECT ); |
10287 |
+ } |
10288 |
+ |
10289 |
+ public function unserialize_meta( $meta ) { |
10290 |
+ $meta->meta_value = maybe_unserialize( $meta->meta_value ); |
10291 |
+ return $meta; |
10292 |
+ } |
10293 |
+} |
10294 |
|
10295 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-modules.php b/plugins/jetpack/sync/class.jetpack-sync-modules.php |
10296 |
new file mode 100644 |
10297 |
index 0000000..e197c20 |
10298 |
--- /dev/null |
10299 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-modules.php |
10300 |
@@ -0,0 +1,90 @@ |
10301 |
+<?php |
10302 |
+ |
10303 |
+/** |
10304 |
+ * simple wrapper that allows enumerating cached static instances |
10305 |
+ * of sync modules |
10306 |
+ */ |
10307 |
+ |
10308 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module.php'; |
10309 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-posts.php'; |
10310 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-comments.php'; |
10311 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-constants.php'; |
10312 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-callables.php'; |
10313 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-options.php'; |
10314 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-network-options.php'; |
10315 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-updates.php'; |
10316 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-users.php'; |
10317 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-themes.php'; |
10318 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-attachments.php'; |
10319 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-meta.php'; |
10320 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-terms.php'; |
10321 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-plugins.php'; |
10322 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-protect.php'; |
10323 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-module-full-sync.php'; |
10324 |
+ |
10325 |
+class Jetpack_Sync_Modules { |
10326 |
+ |
10327 |
+ private static $default_sync_modules = array( |
10328 |
+ 'Jetpack_Sync_Module_Constants', |
10329 |
+ 'Jetpack_Sync_Module_Callables', |
10330 |
+ 'Jetpack_Sync_Module_Options', |
10331 |
+ 'Jetpack_Sync_Module_Network_Options', |
10332 |
+ 'Jetpack_Sync_Module_Terms', |
10333 |
+ 'Jetpack_Sync_Module_Themes', |
10334 |
+ 'Jetpack_Sync_Module_Users', |
10335 |
+ 'Jetpack_Sync_Module_Posts', |
10336 |
+ 'Jetpack_Sync_Module_Comments', |
10337 |
+ 'Jetpack_Sync_Module_Updates', |
10338 |
+ 'Jetpack_Sync_Module_Attachments', |
10339 |
+ 'Jetpack_Sync_Module_Meta', |
10340 |
+ 'Jetpack_Sync_Module_Plugins', |
10341 |
+ 'Jetpack_Sync_Module_Protect', |
10342 |
+ 'Jetpack_Sync_Module_Full_Sync', |
10343 |
+ ); |
10344 |
+ |
10345 |
+ private static $initialized_modules = null; |
10346 |
+ |
10347 |
+ public static function get_modules() { |
10348 |
+ if ( null === self::$initialized_modules ) { |
10349 |
+ self::$initialized_modules = self::initialize_modules(); |
10350 |
+ } |
10351 |
+ |
10352 |
+ return self::$initialized_modules; |
10353 |
+ } |
10354 |
+ |
10355 |
+ public static function set_defaults() { |
10356 |
+ foreach ( self::get_modules() as $module ) { |
10357 |
+ $module->set_defaults(); |
10358 |
+ } |
10359 |
+ } |
10360 |
+ |
10361 |
+ public static function get_module( $module_name ) { |
10362 |
+ foreach ( self::get_modules() as $module ) { |
10363 |
+ if ( $module->name() === $module_name ) { |
10364 |
+ return $module; |
10365 |
+ } |
10366 |
+ } |
10367 |
+ |
10368 |
+ return false; |
10369 |
+ } |
10370 |
+ |
10371 |
+ static function initialize_modules() { |
10372 |
+ /** |
10373 |
+ * Filters the list of class names of sync modules. |
10374 |
+ * If you add to this list, make sure any classes implement the |
10375 |
+ * Jetpack_Sync_Module interface. |
10376 |
+ * |
10377 |
+ * @since 4.2.0 |
10378 |
+ */ |
10379 |
+ $modules = apply_filters( 'jetpack_sync_modules', self::$default_sync_modules ); |
10380 |
+ |
10381 |
+ return array_map( array( 'Jetpack_Sync_Modules', 'initialize_module' ), $modules ); |
10382 |
+ } |
10383 |
+ |
10384 |
+ static function initialize_module( $module_name ) { |
10385 |
+ $module = new $module_name; |
10386 |
+ $module->set_defaults(); |
10387 |
+ |
10388 |
+ return $module; |
10389 |
+ } |
10390 |
+} |
10391 |
|
10392 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-queue.php b/plugins/jetpack/sync/class.jetpack-sync-queue.php |
10393 |
new file mode 100644 |
10394 |
index 0000000..1f120bb |
10395 |
--- /dev/null |
10396 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-queue.php |
10397 |
@@ -0,0 +1,419 @@ |
10398 |
+<?php |
10399 |
+ |
10400 |
+/** |
10401 |
+ * A buffer of items from the queue that can be checked out |
10402 |
+ */ |
10403 |
+class Jetpack_Sync_Queue_Buffer { |
10404 |
+ public $id; |
10405 |
+ public $items_with_ids; |
10406 |
+ |
10407 |
+ public function __construct( $id, $items_with_ids ) { |
10408 |
+ $this->id = $id; |
10409 |
+ $this->items_with_ids = $items_with_ids; |
10410 |
+ } |
10411 |
+ |
10412 |
+ public function get_items() { |
10413 |
+ return array_combine( $this->get_item_ids(), $this->get_item_values() ); |
10414 |
+ } |
10415 |
+ |
10416 |
+ public function get_item_values() { |
10417 |
+ return Jetpack_Sync_Utils::get_item_values( $this->items_with_ids ); |
10418 |
+ } |
10419 |
+ |
10420 |
+ public function get_item_ids() { |
10421 |
+ return Jetpack_Sync_Utils::get_item_ids( $this->items_with_ids ); |
10422 |
+ } |
10423 |
+} |
10424 |
+ |
10425 |
+/** |
10426 |
+ * A persistent queue that can be flushed in increments of N items, |
10427 |
+ * and which blocks reads until checked-out buffers are checked in or |
10428 |
+ * closed. This uses raw SQL for two reasons: speed, and not triggering |
10429 |
+ * tons of added_option callbacks. |
10430 |
+ */ |
10431 |
+class Jetpack_Sync_Queue { |
10432 |
+ public $id; |
10433 |
+ private $row_iterator; |
10434 |
+ |
10435 |
+ function __construct( $id ) { |
10436 |
+ $this->id = str_replace( '-', '_', $id ); // necessary to ensure we don't have ID collisions in the SQL |
10437 |
+ $this->row_iterator = 0; |
10438 |
+ } |
10439 |
+ |
10440 |
+ function add( $item ) { |
10441 |
+ global $wpdb; |
10442 |
+ $added = false; |
10443 |
+ // this basically tries to add the option until enough time has elapsed that |
10444 |
+ // it has a unique (microtime-based) option key |
10445 |
+ while ( ! $added ) { |
10446 |
+ $rows_added = $wpdb->query( $wpdb->prepare( |
10447 |
+ "INSERT INTO $wpdb->options (option_name, option_value,autoload) VALUES (%s, %s,%s)", |
10448 |
+ $this->get_next_data_row_option_name(), |
10449 |
+ serialize( $item ), |
10450 |
+ 'no' |
10451 |
+ ) ); |
10452 |
+ $added = ( 0 !== $rows_added ); |
10453 |
+ } |
10454 |
+ |
10455 |
+ do_action( 'jpsq_item_added' ); |
10456 |
+ } |
10457 |
+ |
10458 |
+ // Attempts to insert all the items in a single SQL query. May be subject to query size limits! |
10459 |
+ function add_all( $items ) { |
10460 |
+ global $wpdb; |
10461 |
+ $base_option_name = $this->get_next_data_row_option_name(); |
10462 |
+ |
10463 |
+ $query = "INSERT INTO $wpdb->options (option_name, option_value,autoload) VALUES "; |
10464 |
+ |
10465 |
+ $rows = array(); |
10466 |
+ |
10467 |
+ for ( $i = 0; $i < count( $items ); $i += 1 ) { |
10468 |
+ $option_name = esc_sql( $base_option_name . '-' . $i ); |
10469 |
+ $option_value = esc_sql( serialize( $items[ $i ] ) ); |
10470 |
+ $rows[] = "('$option_name', '$option_value', 'no')"; |
10471 |
+ } |
10472 |
+ |
10473 |
+ $rows_added = $wpdb->query( $query . join( ',', $rows ) ); |
10474 |
+ |
10475 |
+ if ( count( $items ) === $rows_added ) { |
10476 |
+ return new WP_Error( 'row_count_mismatch', "The number of rows inserted didn't match the size of the input array" ); |
10477 |
+ } |
10478 |
+ |
10479 |
+ do_action( 'jpsq_items_added', $rows_added ); |
10480 |
+ } |
10481 |
+ |
10482 |
+ // Peek at the front-most item on the queue without checking it out |
10483 |
+ function peek( $count = 1 ) { |
10484 |
+ $items = $this->fetch_items( $count ); |
10485 |
+ if ( $items ) { |
10486 |
+ return Jetpack_Sync_Utils::get_item_values( $items ); |
10487 |
+ } |
10488 |
+ |
10489 |
+ return array(); |
10490 |
+ } |
10491 |
+ |
10492 |
+ // lag is the difference in time between the age of the oldest item |
10493 |
+ // (aka first or frontmost item) and the current time |
10494 |
+ function lag() { |
10495 |
+ return self::get_lag( $this->id ); |
10496 |
+ } |
10497 |
+ |
10498 |
+ static function get_lag( $id ) { |
10499 |
+ global $wpdb; |
10500 |
+ |
10501 |
+ $first_item_name = $wpdb->get_var( $wpdb->prepare( |
10502 |
+ "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT 1", |
10503 |
+ "jpsq_{$id}-%" |
10504 |
+ ) ); |
10505 |
+ |
10506 |
+ if ( ! $first_item_name ) { |
10507 |
+ return 0; |
10508 |
+ } |
10509 |
+ |
10510 |
+ // break apart the item name to get the timestamp |
10511 |
+ $matches = null; |
10512 |
+ if ( preg_match( '/^jpsq_' . $id . '-(\d+\.\d+)-/', $first_item_name, $matches ) ) { |
10513 |
+ return microtime( true ) - floatval( $matches[1] ); |
10514 |
+ } else { |
10515 |
+ return 0; |
10516 |
+ } |
10517 |
+ } |
10518 |
+ |
10519 |
+ function reset() { |
10520 |
+ global $wpdb; |
10521 |
+ $this->delete_checkout_id(); |
10522 |
+ $wpdb->query( $wpdb->prepare( |
10523 |
+ "DELETE FROM $wpdb->options WHERE option_name LIKE %s", "jpsq_{$this->id}-%" |
10524 |
+ ) ); |
10525 |
+ } |
10526 |
+ |
10527 |
+ function size() { |
10528 |
+ global $wpdb; |
10529 |
+ |
10530 |
+ return (int) $wpdb->get_var( $wpdb->prepare( |
10531 |
+ "SELECT count(*) FROM $wpdb->options WHERE option_name LIKE %s", "jpsq_{$this->id}-%" |
10532 |
+ ) ); |
10533 |
+ } |
10534 |
+ |
10535 |
+ // we use this peculiar implementation because it's much faster than count(*) |
10536 |
+ function has_any_items() { |
10537 |
+ global $wpdb; |
10538 |
+ $value = $wpdb->get_var( $wpdb->prepare( |
10539 |
+ "SELECT exists( SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s )", "jpsq_{$this->id}-%" |
10540 |
+ ) ); |
10541 |
+ |
10542 |
+ return ( $value === '1' ); |
10543 |
+ } |
10544 |
+ |
10545 |
+ function checkout( $buffer_size ) { |
10546 |
+ if ( $this->get_checkout_id() ) { |
10547 |
+ return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' ); |
10548 |
+ } |
10549 |
+ |
10550 |
+ $buffer_id = uniqid(); |
10551 |
+ |
10552 |
+ $result = $this->set_checkout_id( $buffer_id ); |
10553 |
+ |
10554 |
+ if ( ! $result || is_wp_error( $result ) ) { |
10555 |
+ return $result; |
10556 |
+ } |
10557 |
+ |
10558 |
+ $items = $this->fetch_items( $buffer_size ); |
10559 |
+ |
10560 |
+ if ( count( $items ) === 0 ) { |
10561 |
+ return false; |
10562 |
+ } |
10563 |
+ |
10564 |
+ $buffer = new Jetpack_Sync_Queue_Buffer( $buffer_id, array_slice( $items, 0, $buffer_size ) ); |
10565 |
+ |
10566 |
+ return $buffer; |
10567 |
+ } |
10568 |
+ |
10569 |
+ // this checks out rows until it either empties the queue or hits a certain memory limit |
10570 |
+ // it loads the sizes from the DB first so that it doesn't accidentally |
10571 |
+ // load more data into memory than it needs to. |
10572 |
+ // The only way it will load more items than $max_size is if a single queue item |
10573 |
+ // exceeds the memory limit, but in that case it will send that item by itself. |
10574 |
+ function checkout_with_memory_limit( $max_memory, $max_buffer_size = 500 ) { |
10575 |
+ if ( $this->get_checkout_id() ) { |
10576 |
+ return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' ); |
10577 |
+ } |
10578 |
+ |
10579 |
+ $buffer_id = uniqid(); |
10580 |
+ |
10581 |
+ $result = $this->set_checkout_id( $buffer_id ); |
10582 |
+ |
10583 |
+ if ( ! $result || is_wp_error( $result ) ) { |
10584 |
+ return $result; |
10585 |
+ } |
10586 |
+ |
10587 |
+ // get the map of buffer_id -> memory_size |
10588 |
+ global $wpdb; |
10589 |
+ |
10590 |
+ $items_with_size = $wpdb->get_results( |
10591 |
+ $wpdb->prepare( |
10592 |
+ "SELECT option_name AS id, LENGTH(option_value) AS value_size FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT %d", |
10593 |
+ "jpsq_{$this->id}-%", |
10594 |
+ $max_buffer_size |
10595 |
+ ), |
10596 |
+ OBJECT |
10597 |
+ ); |
10598 |
+ |
10599 |
+ $total_memory = 0; |
10600 |
+ $item_ids = array(); |
10601 |
+ |
10602 |
+ foreach ( $items_with_size as $item_with_size ) { |
10603 |
+ $total_memory += $item_with_size->value_size; |
10604 |
+ |
10605 |
+ // if this is the first item and it exceeds memory, allow loop to continue |
10606 |
+ // we will exit on the next iteration instead |
10607 |
+ if ( $total_memory > $max_memory && count( $item_ids ) > 0 ) { |
10608 |
+ break; |
10609 |
+ } |
10610 |
+ $item_ids[] = $item_with_size->id; |
10611 |
+ } |
10612 |
+ |
10613 |
+ $items = $this->fetch_items_by_id( $item_ids ); |
10614 |
+ |
10615 |
+ if ( count( $items ) === 0 ) { |
10616 |
+ $this->delete_checkout_id(); |
10617 |
+ |
10618 |
+ return false; |
10619 |
+ } |
10620 |
+ |
10621 |
+ $buffer = new Jetpack_Sync_Queue_Buffer( $buffer_id, $items ); |
10622 |
+ |
10623 |
+ return $buffer; |
10624 |
+ } |
10625 |
+ |
10626 |
+ function checkin( $buffer ) { |
10627 |
+ $is_valid = $this->validate_checkout( $buffer ); |
10628 |
+ |
10629 |
+ if ( is_wp_error( $is_valid ) ) { |
10630 |
+ return $is_valid; |
10631 |
+ } |
10632 |
+ |
10633 |
+ $this->delete_checkout_id(); |
10634 |
+ |
10635 |
+ return true; |
10636 |
+ } |
10637 |
+ |
10638 |
+ function close( $buffer, $ids_to_remove = null ) { |
10639 |
+ $is_valid = $this->validate_checkout( $buffer ); |
10640 |
+ |
10641 |
+ if ( is_wp_error( $is_valid ) ) { |
10642 |
+ return $is_valid; |
10643 |
+ } |
10644 |
+ |
10645 |
+ $this->delete_checkout_id(); |
10646 |
+ |
10647 |
+ // by default clear all items in the buffer |
10648 |
+ if ( is_null( $ids_to_remove ) ) { |
10649 |
+ $ids_to_remove = $buffer->get_item_ids(); |
10650 |
+ } |
10651 |
+ |
10652 |
+ global $wpdb; |
10653 |
+ |
10654 |
+ if ( count( $ids_to_remove ) > 0 ) { |
10655 |
+ $sql = "DELETE FROM $wpdb->options WHERE option_name IN (" . implode( ', ', array_fill( 0, count( $ids_to_remove ), '%s' ) ) . ')'; |
10656 |
+ $query = call_user_func_array( array( $wpdb, 'prepare' ), array_merge( array( $sql ), $ids_to_remove ) ); |
10657 |
+ $wpdb->query( $query ); |
10658 |
+ } |
10659 |
+ |
10660 |
+ return true; |
10661 |
+ } |
10662 |
+ |
10663 |
+ function flush_all() { |
10664 |
+ $items = Jetpack_Sync_Utils::get_item_values( $this->fetch_items() ); |
10665 |
+ $this->reset(); |
10666 |
+ |
10667 |
+ return $items; |
10668 |
+ } |
10669 |
+ |
10670 |
+ function get_all() { |
10671 |
+ return $this->fetch_items(); |
10672 |
+ } |
10673 |
+ |
10674 |
+ // use with caution, this could allow multiple processes to delete |
10675 |
+ // and send from the queue at the same time |
10676 |
+ function force_checkin() { |
10677 |
+ $this->delete_checkout_id(); |
10678 |
+ } |
10679 |
+ |
10680 |
+ // used to lock checkouts from the queue. |
10681 |
+ // tries to wait up to $timeout seconds for the queue to be empty |
10682 |
+ function lock( $timeout = 30 ) { |
10683 |
+ $tries = 0; |
10684 |
+ |
10685 |
+ while ( $this->has_any_items() && $tries < $timeout ) { |
10686 |
+ sleep( 1 ); |
10687 |
+ $tries += 1; |
10688 |
+ } |
10689 |
+ |
10690 |
+ if ( $tries === 30 ) { |
10691 |
+ return new WP_Error( 'lock_timeout', 'Timeout waiting for sync queue to empty' ); |
10692 |
+ } |
10693 |
+ |
10694 |
+ if ( $this->get_checkout_id() ) { |
10695 |
+ return new WP_Error( 'unclosed_buffer', 'There is an unclosed buffer' ); |
10696 |
+ } |
10697 |
+ |
10698 |
+ // hopefully this means we can acquire a checkout? |
10699 |
+ $result = $this->set_checkout_id( 'lock' ); |
10700 |
+ |
10701 |
+ if ( ! $result || is_wp_error( $result ) ) { |
10702 |
+ return $result; |
10703 |
+ } |
10704 |
+ |
10705 |
+ return true; |
10706 |
+ } |
10707 |
+ |
10708 |
+ function unlock() { |
10709 |
+ $this->delete_checkout_id(); |
10710 |
+ } |
10711 |
+ |
10712 |
+ private function get_checkout_id() { |
10713 |
+ return get_transient( $this->get_checkout_transient_name() ); |
10714 |
+ } |
10715 |
+ |
10716 |
+ private function set_checkout_id( $checkout_id ) { |
10717 |
+ return set_transient( $this->get_checkout_transient_name(), $checkout_id, 5 * 60 ); // 5 minute timeout |
10718 |
+ } |
10719 |
+ |
10720 |
+ private function delete_checkout_id() { |
10721 |
+ delete_transient( $this->get_checkout_transient_name() ); |
10722 |
+ } |
10723 |
+ |
10724 |
+ private function get_checkout_transient_name() { |
10725 |
+ return "jpsq_{$this->id}_checkout"; |
10726 |
+ } |
10727 |
+ |
10728 |
+ private function get_next_data_row_option_name() { |
10729 |
+ // this option is specifically chosen to, as much as possible, preserve time order |
10730 |
+ // and minimise the possibility of collisions between multiple processes working |
10731 |
+ // at the same time |
10732 |
+ // TODO: confirm we only need to support PHP 5.05+ (otherwise we'll need to emulate microtime as float, and avoid PHP_INT_MAX) |
10733 |
+ // @see: http://php.net/manual/en/function.microtime.php |
10734 |
+ $timestamp = sprintf( '%.6f', microtime( true ) ); |
10735 |
+ |
10736 |
+ // row iterator is used to avoid collisions where we're writing data waaay fast in a single process |
10737 |
+ if ( $this->row_iterator === PHP_INT_MAX ) { |
10738 |
+ $this->row_iterator = 0; |
10739 |
+ } else { |
10740 |
+ $this->row_iterator += 1; |
10741 |
+ } |
10742 |
+ |
10743 |
+ return 'jpsq_' . $this->id . '-' . $timestamp . '-' . getmypid() . '-' . $this->row_iterator; |
10744 |
+ } |
10745 |
+ |
10746 |
+ private function fetch_items( $limit = null ) { |
10747 |
+ global $wpdb; |
10748 |
+ |
10749 |
+ if ( $limit ) { |
10750 |
+ $query_sql = $wpdb->prepare( "SELECT option_name AS id, option_value AS value FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC LIMIT %d", "jpsq_{$this->id}-%", $limit ); |
10751 |
+ } else { |
10752 |
+ $query_sql = $wpdb->prepare( "SELECT option_name AS id, option_value AS value FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_name ASC", "jpsq_{$this->id}-%" ); |
10753 |
+ } |
10754 |
+ |
10755 |
+ $items = $wpdb->get_results( $query_sql, OBJECT ); |
10756 |
+ foreach ( $items as $item ) { |
10757 |
+ $item->value = maybe_unserialize( $item->value ); |
10758 |
+ } |
10759 |
+ |
10760 |
+ return $items; |
10761 |
+ } |
10762 |
+ |
10763 |
+ private function fetch_items_by_id( $item_ids ) { |
10764 |
+ global $wpdb; |
10765 |
+ |
10766 |
+ if ( count( $item_ids ) > 0 ) { |
10767 |
+ $sql = "SELECT option_name AS id, option_value AS value FROM $wpdb->options WHERE option_name IN (" . implode( ', ', array_fill( 0, count( $item_ids ), '%s' ) ) . ') ORDER BY option_name ASC'; |
10768 |
+ $query = call_user_func_array( array( $wpdb, 'prepare' ), array_merge( array( $sql ), $item_ids ) ); |
10769 |
+ $items = $wpdb->get_results( $query, OBJECT ); |
10770 |
+ foreach ( $items as $item ) { |
10771 |
+ $item->value = maybe_unserialize( $item->value ); |
10772 |
+ } |
10773 |
+ |
10774 |
+ return $items; |
10775 |
+ } else { |
10776 |
+ return array(); |
10777 |
+ } |
10778 |
+ } |
10779 |
+ |
10780 |
+ private function validate_checkout( $buffer ) { |
10781 |
+ if ( ! $buffer instanceof Jetpack_Sync_Queue_Buffer ) { |
10782 |
+ return new WP_Error( 'not_a_buffer', 'You must checkin an instance of Jetpack_Sync_Queue_Buffer' ); |
10783 |
+ } |
10784 |
+ |
10785 |
+ $checkout_id = $this->get_checkout_id(); |
10786 |
+ |
10787 |
+ if ( ! $checkout_id ) { |
10788 |
+ return new WP_Error( 'buffer_not_checked_out', 'There are no checked out buffers' ); |
10789 |
+ } |
10790 |
+ |
10791 |
+ if ( $checkout_id != $buffer->id ) { |
10792 |
+ return new WP_Error( 'buffer_mismatch', 'The buffer you checked in was not checked out' ); |
10793 |
+ } |
10794 |
+ |
10795 |
+ return true; |
10796 |
+ } |
10797 |
+} |
10798 |
+ |
10799 |
+class Jetpack_Sync_Utils { |
10800 |
+ |
10801 |
+ static function get_item_values( $items ) { |
10802 |
+ return array_map( array( __CLASS__, 'get_item_value' ), $items ); |
10803 |
+ } |
10804 |
+ |
10805 |
+ static function get_item_ids( $items ) { |
10806 |
+ return array_map( array( __CLASS__, 'get_item_id' ), $items ); |
10807 |
+ } |
10808 |
+ |
10809 |
+ static private function get_item_value( $item ) { |
10810 |
+ return $item->value; |
10811 |
+ } |
10812 |
+ |
10813 |
+ static private function get_item_id( $item ) { |
10814 |
+ return $item->id; |
10815 |
+ } |
10816 |
+} |
10817 |
|
10818 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-sender.php b/plugins/jetpack/sync/class.jetpack-sync-sender.php |
10819 |
new file mode 100644 |
10820 |
index 0000000..3793af1 |
10821 |
--- /dev/null |
10822 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-sender.php |
10823 |
@@ -0,0 +1,321 @@ |
10824 |
+<?php |
10825 |
+ |
10826 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-queue.php'; |
10827 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-defaults.php'; |
10828 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-json-deflate-codec.php'; |
10829 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-modules.php'; |
10830 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-settings.php'; |
10831 |
+ |
10832 |
+/** |
10833 |
+ * This class grabs pending actions from the queue and sends them |
10834 |
+ */ |
10835 |
+class Jetpack_Sync_Sender { |
10836 |
+ |
10837 |
+ const SYNC_THROTTLE_OPTION_NAME = 'jetpack_sync_min_wait'; |
10838 |
+ const NEXT_SYNC_TIME_OPTION_NAME = 'jetpack_next_sync_time'; |
10839 |
+ const WPCOM_ERROR_SYNC_DELAY = 60; |
10840 |
+ |
10841 |
+ private $dequeue_max_bytes; |
10842 |
+ private $upload_max_bytes; |
10843 |
+ private $upload_max_rows; |
10844 |
+ private $sync_wait_time; |
10845 |
+ private $sync_wait_threshold; |
10846 |
+ private $sync_queue; |
10847 |
+ private $full_sync_queue; |
10848 |
+ private $codec; |
10849 |
+ |
10850 |
+ // singleton functions |
10851 |
+ private static $instance; |
10852 |
+ |
10853 |
+ public static function get_instance() { |
10854 |
+ if ( null === self::$instance ) { |
10855 |
+ self::$instance = new self(); |
10856 |
+ } |
10857 |
+ |
10858 |
+ return self::$instance; |
10859 |
+ } |
10860 |
+ |
10861 |
+ // this is necessary because you can't use "new" when you declare instance properties >:( |
10862 |
+ protected function __construct() { |
10863 |
+ $this->set_defaults(); |
10864 |
+ $this->init(); |
10865 |
+ } |
10866 |
+ |
10867 |
+ private function init() { |
10868 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
10869 |
+ $module->init_before_send(); |
10870 |
+ } |
10871 |
+ } |
10872 |
+ |
10873 |
+ public function get_next_sync_time() { |
10874 |
+ return (double) get_option( self::NEXT_SYNC_TIME_OPTION_NAME, 0 ); |
10875 |
+ } |
10876 |
+ |
10877 |
+ public function set_next_sync_time( $time ) { |
10878 |
+ return update_option( self::NEXT_SYNC_TIME_OPTION_NAME, $time, true ); |
10879 |
+ } |
10880 |
+ |
10881 |
+ public function do_sync() { |
10882 |
+ // don't sync if importing |
10883 |
+ if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { |
10884 |
+ return false; |
10885 |
+ } |
10886 |
+ |
10887 |
+ // don't sync if we are throttled |
10888 |
+ if ( $this->get_next_sync_time() > microtime( true ) ) { |
10889 |
+ return false; |
10890 |
+ } |
10891 |
+ |
10892 |
+ $start_time = microtime( true ); |
10893 |
+ |
10894 |
+ $full_sync_result = $this->do_sync_for_queue( $this->full_sync_queue ); |
10895 |
+ $sync_result = $this->do_sync_for_queue( $this->sync_queue ); |
10896 |
+ |
10897 |
+ $exceeded_sync_wait_threshold = ( microtime( true ) - $start_time ) > (double) $this->get_sync_wait_threshold(); |
10898 |
+ |
10899 |
+ if ( is_wp_error( $full_sync_result ) || is_wp_error( $sync_result ) ) { |
10900 |
+ $this->set_next_sync_time( time() + self::WPCOM_ERROR_SYNC_DELAY ); |
10901 |
+ $full_sync_result = false; |
10902 |
+ $sync_result = false; |
10903 |
+ } elseif ( $exceeded_sync_wait_threshold ) { |
10904 |
+ // if we actually sent data and it took a while, wait before sending again |
10905 |
+ $this->set_next_sync_time( time() + $this->get_sync_wait_time() ); |
10906 |
+ } |
10907 |
+ |
10908 |
+ // we use OR here because if either one returns true then the caller should |
10909 |
+ // be allowed to call do_sync again, as there may be more items |
10910 |
+ return $full_sync_result || $sync_result; |
10911 |
+ } |
10912 |
+ |
10913 |
+ public function do_sync_for_queue( $queue ) { |
10914 |
+ |
10915 |
+ do_action( 'jetpack_sync_before_send_queue_' . $queue->id ); |
10916 |
+ |
10917 |
+ if ( $queue->size() === 0 ) { |
10918 |
+ return false; |
10919 |
+ } |
10920 |
+ |
10921 |
+ // now that we're sure we are about to sync, try to |
10922 |
+ // ignore user abort so we can avoid getting into a |
10923 |
+ // bad state |
10924 |
+ if ( function_exists( 'ignore_user_abort' ) ) { |
10925 |
+ ignore_user_abort( true ); |
10926 |
+ } |
10927 |
+ |
10928 |
+ $buffer = $queue->checkout_with_memory_limit( $this->dequeue_max_bytes, $this->upload_max_rows ); |
10929 |
+ |
10930 |
+ if ( ! $buffer ) { |
10931 |
+ // buffer has no items |
10932 |
+ return false; |
10933 |
+ } |
10934 |
+ |
10935 |
+ if ( is_wp_error( $buffer ) ) { |
10936 |
+ // another buffer is currently sending |
10937 |
+ return false; |
10938 |
+ } |
10939 |
+ |
10940 |
+ $upload_size = 0; |
10941 |
+ $items_to_send = array(); |
10942 |
+ $items = $buffer->get_items(); |
10943 |
+ |
10944 |
+ // set up current screen to avoid errors rendering content |
10945 |
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-screen.php'); |
10946 |
+ require_once(ABSPATH . 'wp-admin/includes/screen.php'); |
10947 |
+ set_current_screen( 'sync' ); |
10948 |
+ |
10949 |
+ $skipped_items_ids = array(); |
10950 |
+ |
10951 |
+ // we estimate the total encoded size as we go by encoding each item individually |
10952 |
+ // this is expensive, but the only way to really know :/ |
10953 |
+ foreach ( $items as $key => $item ) { |
10954 |
+ // Suspending cache addition help prevent overloading in memory cache of large sites. |
10955 |
+ wp_suspend_cache_addition( true ); |
10956 |
+ /** |
10957 |
+ * Modify the data within an action before it is serialized and sent to the server |
10958 |
+ * For example, during full sync this expands Post ID's into full Post objects, |
10959 |
+ * so that we don't have to serialize the whole object into the queue. |
10960 |
+ * |
10961 |
+ * @since 4.2.0 |
10962 |
+ * |
10963 |
+ * @param array The action parameters |
10964 |
+ * @param int The ID of the user who triggered the action |
10965 |
+ */ |
10966 |
+ $item[1] = apply_filters( 'jetpack_sync_before_send_' . $item[0], $item[1], $item[2] ); |
10967 |
+ wp_suspend_cache_addition( false ); |
10968 |
+ if ( $item[1] === false ) { |
10969 |
+ $skipped_items_ids[] = $key; |
10970 |
+ continue; |
10971 |
+ } |
10972 |
+ |
10973 |
+ $encoded_item = $this->codec->encode( $item ); |
10974 |
+ |
10975 |
+ $upload_size += strlen( $encoded_item ); |
10976 |
+ |
10977 |
+ if ( $upload_size > $this->upload_max_bytes && count( $items_to_send ) > 0 ) { |
10978 |
+ break; |
10979 |
+ } |
10980 |
+ |
10981 |
+ $items_to_send[ $key ] = $encoded_item; |
10982 |
+ } |
10983 |
+ |
10984 |
+ /** |
10985 |
+ * Fires when data is ready to send to the server. |
10986 |
+ * Return false or WP_Error to abort the sync (e.g. if there's an error) |
10987 |
+ * The items will be automatically re-sent later |
10988 |
+ * |
10989 |
+ * @since 4.2.0 |
10990 |
+ * |
10991 |
+ * @param array $data The action buffer |
10992 |
+ * @param string $codec The codec name used to encode the data |
10993 |
+ * @param double $time The current time |
10994 |
+ * @param string $queue The queue used to send ('sync' or 'full_sync') |
10995 |
+ */ |
10996 |
+ $processed_item_ids = apply_filters( 'jetpack_sync_send_data', $items_to_send, $this->codec->name(), microtime( true ), $queue->id ); |
10997 |
+ |
10998 |
+ if ( ! $processed_item_ids || is_wp_error( $processed_item_ids ) ) { |
10999 |
+ $checked_in_item_ids = $queue->checkin( $buffer ); |
11000 |
+ |
11001 |
+ if ( is_wp_error( $checked_in_item_ids ) ) { |
11002 |
+ error_log( 'Error checking in buffer: ' . $checked_in_item_ids->get_error_message() ); |
11003 |
+ $queue->force_checkin(); |
11004 |
+ } |
11005 |
+ |
11006 |
+ if ( is_wp_error( $processed_item_ids ) ) { |
11007 |
+ return $processed_item_ids; |
11008 |
+ } |
11009 |
+ |
11010 |
+ // returning a WP_Error is a sign to the caller that we should wait a while |
11011 |
+ // before syncing again |
11012 |
+ return new WP_Error( 'server_error' ); |
11013 |
+ |
11014 |
+ } else { |
11015 |
+ |
11016 |
+ // detect if the last item ID was an error |
11017 |
+ $had_wp_error = is_wp_error( end( $processed_item_ids ) ); |
11018 |
+ |
11019 |
+ if ( $had_wp_error ) { |
11020 |
+ $wp_error = array_pop( $processed_item_ids ); |
11021 |
+ } |
11022 |
+ |
11023 |
+ // also checkin any items that were skipped |
11024 |
+ if ( count( $skipped_items_ids ) > 0 ) { |
11025 |
+ $processed_item_ids = array_merge( $processed_item_ids, $skipped_items_ids ); |
11026 |
+ } |
11027 |
+ |
11028 |
+ $processed_items = array_intersect_key( $items, array_flip( $processed_item_ids ) ); |
11029 |
+ |
11030 |
+ /** |
11031 |
+ * Allows us to keep track of all the actions that have been sent. |
11032 |
+ * Allows us to calculate the progress of specific actions. |
11033 |
+ * |
11034 |
+ * @since 4.2.0 |
11035 |
+ * |
11036 |
+ * @param array $processed_actions The actions that we send successfully. |
11037 |
+ */ |
11038 |
+ do_action( 'jetpack_sync_processed_actions', $processed_items ); |
11039 |
+ |
11040 |
+ $queue->close( $buffer, $processed_item_ids ); |
11041 |
+ |
11042 |
+ // returning a WP_Error is a sign to the caller that we should wait a while |
11043 |
+ // before syncing again |
11044 |
+ if ( $had_wp_error ) { |
11045 |
+ return $wp_error; |
11046 |
+ } |
11047 |
+ } |
11048 |
+ |
11049 |
+ return true; |
11050 |
+ } |
11051 |
+ |
11052 |
+ function get_sync_queue() { |
11053 |
+ return $this->sync_queue; |
11054 |
+ } |
11055 |
+ |
11056 |
+ function get_full_sync_queue() { |
11057 |
+ return $this->full_sync_queue; |
11058 |
+ } |
11059 |
+ |
11060 |
+ function get_codec() { |
11061 |
+ return $this->codec; |
11062 |
+ } |
11063 |
+ |
11064 |
+ function send_checksum() { |
11065 |
+ require_once 'class.jetpack-sync-wp-replicastore.php'; |
11066 |
+ $store = new Jetpack_Sync_WP_Replicastore(); |
11067 |
+ do_action( 'jetpack_sync_checksum', $store->checksum_all() ); |
11068 |
+ } |
11069 |
+ |
11070 |
+ function reset_sync_queue() { |
11071 |
+ $this->sync_queue->reset(); |
11072 |
+ } |
11073 |
+ |
11074 |
+ function set_dequeue_max_bytes( $size ) { |
11075 |
+ $this->dequeue_max_bytes = $size; |
11076 |
+ } |
11077 |
+ |
11078 |
+ // in bytes |
11079 |
+ function set_upload_max_bytes( $max_bytes ) { |
11080 |
+ $this->upload_max_bytes = $max_bytes; |
11081 |
+ } |
11082 |
+ |
11083 |
+ // in rows |
11084 |
+ function set_upload_max_rows( $max_rows ) { |
11085 |
+ $this->upload_max_rows = $max_rows; |
11086 |
+ } |
11087 |
+ |
11088 |
+ // in seconds |
11089 |
+ function set_sync_wait_time( $seconds ) { |
11090 |
+ $this->sync_wait_time = $seconds; |
11091 |
+ } |
11092 |
+ |
11093 |
+ function get_sync_wait_time() { |
11094 |
+ return $this->sync_wait_time; |
11095 |
+ } |
11096 |
+ |
11097 |
+ // in seconds |
11098 |
+ function set_sync_wait_threshold( $seconds ) { |
11099 |
+ $this->sync_wait_threshold = $seconds; |
11100 |
+ } |
11101 |
+ |
11102 |
+ function get_sync_wait_threshold() { |
11103 |
+ return $this->sync_wait_threshold; |
11104 |
+ } |
11105 |
+ |
11106 |
+ function set_defaults() { |
11107 |
+ $this->sync_queue = new Jetpack_Sync_Queue( 'sync' ); |
11108 |
+ $this->full_sync_queue = new Jetpack_Sync_Queue( 'full_sync' ); |
11109 |
+ $this->codec = new Jetpack_Sync_JSON_Deflate_Codec(); |
11110 |
+ |
11111 |
+ // saved settings |
11112 |
+ Jetpack_Sync_Settings::set_importing( null ); |
11113 |
+ $settings = Jetpack_Sync_Settings::get_settings(); |
11114 |
+ $this->set_dequeue_max_bytes( $settings['dequeue_max_bytes'] ); |
11115 |
+ $this->set_upload_max_bytes( $settings['upload_max_bytes'] ); |
11116 |
+ $this->set_upload_max_rows( $settings['upload_max_rows'] ); |
11117 |
+ $this->set_sync_wait_time( $settings['sync_wait_time'] ); |
11118 |
+ $this->set_sync_wait_threshold( $settings['sync_wait_threshold'] ); |
11119 |
+ } |
11120 |
+ |
11121 |
+ function reset_data() { |
11122 |
+ $this->reset_sync_queue(); |
11123 |
+ |
11124 |
+ foreach ( Jetpack_Sync_Modules::get_modules() as $module ) { |
11125 |
+ $module->reset_data(); |
11126 |
+ } |
11127 |
+ |
11128 |
+ delete_option( self::SYNC_THROTTLE_OPTION_NAME ); |
11129 |
+ delete_option( self::NEXT_SYNC_TIME_OPTION_NAME ); |
11130 |
+ |
11131 |
+ Jetpack_Sync_Settings::reset_data(); |
11132 |
+ } |
11133 |
+ |
11134 |
+ function uninstall() { |
11135 |
+ // Lets delete all the other fun stuff like transient and option and the sync queue |
11136 |
+ $this->reset_data(); |
11137 |
+ |
11138 |
+ // delete the full sync status |
11139 |
+ delete_option( 'jetpack_full_sync_status' ); |
11140 |
+ |
11141 |
+ // clear the sync cron. |
11142 |
+ wp_clear_scheduled_hook( 'jetpack_sync_cron' ); |
11143 |
+ } |
11144 |
+} |
11145 |
|
11146 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-server.php b/plugins/jetpack/sync/class.jetpack-sync-server.php |
11147 |
new file mode 100644 |
11148 |
index 0000000..752aa66 |
11149 |
--- /dev/null |
11150 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-server.php |
11151 |
@@ -0,0 +1,106 @@ |
11152 |
+<?php |
11153 |
+ |
11154 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-json-deflate-codec.php'; |
11155 |
+ |
11156 |
+/** |
11157 |
+ * Simple version of a Jetpack Sync Server - just receives arrays of events and |
11158 |
+ * issues them locally with the 'jetpack_sync_remote_action' action. |
11159 |
+ */ |
11160 |
+class Jetpack_Sync_Server { |
11161 |
+ private $codec; |
11162 |
+ const MAX_TIME_PER_REQUEST_IN_SECONDS = 15; |
11163 |
+ const BLOG_LOCK_TRANSIENT_PREFIX = 'jp_sync_req_lock_'; |
11164 |
+ const BLOG_LOCK_TRANSIENT_EXPIRY = 60; // seconds |
11165 |
+ |
11166 |
+ // this is necessary because you can't use "new" when you declare instance properties >:( |
11167 |
+ function __construct() { |
11168 |
+ $this->codec = new Jetpack_Sync_JSON_Deflate_Codec(); |
11169 |
+ } |
11170 |
+ |
11171 |
+ function set_codec( iJetpack_Sync_Codec $codec ) { |
11172 |
+ $this->codec = $codec; |
11173 |
+ } |
11174 |
+ |
11175 |
+ function attempt_request_lock( $blog_id, $expiry = self::BLOG_LOCK_TRANSIENT_EXPIRY ) { |
11176 |
+ $transient_name = $this->get_concurrent_request_transient_name( $blog_id ); |
11177 |
+ $locked_time = get_site_transient( $transient_name ); |
11178 |
+ if ( $locked_time ) { |
11179 |
+ return false; |
11180 |
+ } |
11181 |
+ set_site_transient( $transient_name, microtime( true ), $expiry ); |
11182 |
+ |
11183 |
+ return true; |
11184 |
+ } |
11185 |
+ |
11186 |
+ private function get_concurrent_request_transient_name( $blog_id ) { |
11187 |
+ return self::BLOG_LOCK_TRANSIENT_PREFIX . $blog_id; |
11188 |
+ } |
11189 |
+ |
11190 |
+ function remove_request_lock( $blog_id ) { |
11191 |
+ delete_site_transient( $this->get_concurrent_request_transient_name( $blog_id ) ); |
11192 |
+ } |
11193 |
+ |
11194 |
+ function receive( $data, $token = null, $sent_timestamp = null, $queue_id = null ) { |
11195 |
+ $start_time = microtime( true ); |
11196 |
+ if ( ! is_array( $data ) ) { |
11197 |
+ return new WP_Error( 'action_decoder_error', 'Events must be an array' ); |
11198 |
+ } |
11199 |
+ |
11200 |
+ if ( $token && ! $this->attempt_request_lock( $token->blog_id ) ) { |
11201 |
+ /** |
11202 |
+ * Fires when the server receives two concurrent requests from the same blog |
11203 |
+ * |
11204 |
+ * @since 4.2.0 |
11205 |
+ * |
11206 |
+ * @param token The token object of the misbehaving site |
11207 |
+ */ |
11208 |
+ do_action( 'jetpack_sync_multi_request_fail', $token ); |
11209 |
+ |
11210 |
+ return new WP_Error( 'concurrent_request_error', 'There is another request running for the same blog ID' ); |
11211 |
+ } |
11212 |
+ |
11213 |
+ $events = wp_unslash( array_map( array( $this->codec, 'decode' ), $data ) ); |
11214 |
+ $events_processed = array(); |
11215 |
+ |
11216 |
+ /** |
11217 |
+ * Fires when an array of actions are received from a remote Jetpack site |
11218 |
+ * |
11219 |
+ * @since 4.2.0 |
11220 |
+ * |
11221 |
+ * @param array Array of actions received from the remote site |
11222 |
+ */ |
11223 |
+ do_action( 'jetpack_sync_remote_actions', $events, $token ); |
11224 |
+ |
11225 |
+ foreach ( $events as $key => $event ) { |
11226 |
+ list( $action_name, $args, $user_id, $timestamp, $silent ) = $event; |
11227 |
+ |
11228 |
+ /** |
11229 |
+ * Fires when an action is received from a remote Jetpack site |
11230 |
+ * |
11231 |
+ * @since 4.2.0 |
11232 |
+ * |
11233 |
+ * @param string $action_name The name of the action executed on the remote site |
11234 |
+ * @param array $args The arguments passed to the action |
11235 |
+ * @param int $user_id The external_user_id who did the action |
11236 |
+ * @param bool $silent Whether the item was created via import |
11237 |
+ * @param double $timestamp Timestamp (in seconds) when the action occurred |
11238 |
+ * @param double $sent_timestamp Timestamp (in seconds) when the action was transmitted |
11239 |
+ * @param string $queue_id ID of the queue from which the event was sent (sync or full_sync) |
11240 |
+ * @param array $token The auth token used to invoke the API |
11241 |
+ */ |
11242 |
+ do_action( 'jetpack_sync_remote_action', $action_name, $args, $user_id, $silent, $timestamp, $sent_timestamp, $queue_id, $token ); |
11243 |
+ |
11244 |
+ $events_processed[] = $key; |
11245 |
+ |
11246 |
+ if ( microtime( true ) - $start_time > self::MAX_TIME_PER_REQUEST_IN_SECONDS ) { |
11247 |
+ break; |
11248 |
+ } |
11249 |
+ } |
11250 |
+ |
11251 |
+ if ( $token ) { |
11252 |
+ $this->remove_request_lock( $token->blog_id ); |
11253 |
+ } |
11254 |
+ |
11255 |
+ return $events_processed; |
11256 |
+ } |
11257 |
+} |
11258 |
|
11259 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-settings.php b/plugins/jetpack/sync/class.jetpack-sync-settings.php |
11260 |
new file mode 100644 |
11261 |
index 0000000..5e5e39d |
11262 |
--- /dev/null |
11263 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-settings.php |
11264 |
@@ -0,0 +1,130 @@ |
11265 |
+<?php |
11266 |
+ |
11267 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-defaults.php'; |
11268 |
+ |
11269 |
+class Jetpack_Sync_Settings { |
11270 |
+ const SETTINGS_OPTION_PREFIX = 'jetpack_sync_settings_'; |
11271 |
+ |
11272 |
+ static $valid_settings = array( |
11273 |
+ 'dequeue_max_bytes' => true, |
11274 |
+ 'upload_max_bytes' => true, |
11275 |
+ 'upload_max_rows' => true, |
11276 |
+ 'sync_wait_time' => true, |
11277 |
+ 'sync_wait_threshold' => true, |
11278 |
+ 'max_queue_size' => true, |
11279 |
+ 'max_queue_lag' => true, |
11280 |
+ 'queue_max_writes_sec' => true, |
11281 |
+ 'post_types_blacklist' => true, |
11282 |
+ 'meta_blacklist' => true, |
11283 |
+ 'disable' => true, |
11284 |
+ ); |
11285 |
+ |
11286 |
+ static $is_importing; |
11287 |
+ static $is_doing_cron; |
11288 |
+ |
11289 |
+ static $settings_cache = array(); // some settings can be expensive to compute - let's cache them |
11290 |
+ |
11291 |
+ static function get_settings() { |
11292 |
+ $settings = array(); |
11293 |
+ foreach ( array_keys( self::$valid_settings ) as $setting ) { |
11294 |
+ $settings[ $setting ] = self::get_setting( $setting ); |
11295 |
+ } |
11296 |
+ |
11297 |
+ return $settings; |
11298 |
+ } |
11299 |
+ |
11300 |
+ // Fetches the setting. It saves it if the setting doesn't exist, so that it gets |
11301 |
+ // autoloaded on page load rather than re-queried every time. |
11302 |
+ static function get_setting( $setting ) { |
11303 |
+ if ( ! isset( self::$valid_settings[ $setting ] ) ) { |
11304 |
+ return false; |
11305 |
+ } |
11306 |
+ |
11307 |
+ if ( isset( self::$settings_cache[ $setting ] ) ) { |
11308 |
+ return self::$settings_cache[ $setting ]; |
11309 |
+ } |
11310 |
+ |
11311 |
+ $value = get_option( self::SETTINGS_OPTION_PREFIX . $setting ); |
11312 |
+ |
11313 |
+ if ( false === $value ) { |
11314 |
+ $default_name = "default_$setting"; // e.g. default_dequeue_max_bytes |
11315 |
+ $value = Jetpack_Sync_Defaults::$$default_name; |
11316 |
+ update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true ); |
11317 |
+ } |
11318 |
+ |
11319 |
+ if ( is_numeric( $value ) ) { |
11320 |
+ $value = intval( $value ); |
11321 |
+ } |
11322 |
+ |
11323 |
+ // specifically for the post_types blacklist, we want to include the hardcoded settings |
11324 |
+ if ( $setting === 'post_types_blacklist' ) { |
11325 |
+ $value = array_unique( array_merge( $value, Jetpack_Sync_Defaults::$blacklisted_post_types ) ); |
11326 |
+ } |
11327 |
+ |
11328 |
+ // ditto for meta blacklist |
11329 |
+ if ( $setting === 'meta_blacklist' ) { |
11330 |
+ $value = array_unique( array_merge( $value, Jetpack_Sync_Defaults::$default_blacklist_meta_keys ) ); |
11331 |
+ } |
11332 |
+ |
11333 |
+ self::$settings_cache[ $setting ] = $value; |
11334 |
+ |
11335 |
+ return $value; |
11336 |
+ } |
11337 |
+ |
11338 |
+ static function update_settings( $new_settings ) { |
11339 |
+ $validated_settings = array_intersect_key( $new_settings, self::$valid_settings ); |
11340 |
+ foreach ( $validated_settings as $setting => $value ) { |
11341 |
+ update_option( self::SETTINGS_OPTION_PREFIX . $setting, $value, true ); |
11342 |
+ unset( self::$settings_cache[ $setting ] ); |
11343 |
+ |
11344 |
+ // if we set the disabled option to true, clear the queues |
11345 |
+ if ( 'disable' === $setting && !! $value ) { |
11346 |
+ require_once dirname( __FILE__ ) . '/class.jetpack-sync-listener.php'; |
11347 |
+ $listener = Jetpack_Sync_Listener::get_instance(); |
11348 |
+ $listener->get_sync_queue()->reset(); |
11349 |
+ $listener->get_full_sync_queue()->reset(); |
11350 |
+ } |
11351 |
+ } |
11352 |
+ } |
11353 |
+ |
11354 |
+ // returns escapted SQL that can be injected into a WHERE clause |
11355 |
+ static function get_blacklisted_post_types_sql() { |
11356 |
+ return 'post_type NOT IN (\'' . join( '\', \'', array_map( 'esc_sql', self::get_setting( 'post_types_blacklist' ) ) ) . '\')'; |
11357 |
+ } |
11358 |
+ |
11359 |
+ static function reset_data() { |
11360 |
+ $valid_settings = self::$valid_settings; |
11361 |
+ self::$settings_cache = array(); |
11362 |
+ foreach ( $valid_settings as $option => $value ) { |
11363 |
+ delete_option( self::SETTINGS_OPTION_PREFIX . $option ); |
11364 |
+ } |
11365 |
+ self::set_importing( null ); |
11366 |
+ self::set_doing_cron( null ); |
11367 |
+ } |
11368 |
+ |
11369 |
+ static function set_importing( $is_importing ) { |
11370 |
+ // set to NULL to revert to WP_IMPORTING, the standard behaviour |
11371 |
+ self::$is_importing = $is_importing; |
11372 |
+ } |
11373 |
+ |
11374 |
+ static function is_importing() { |
11375 |
+ if ( ! is_null( self::$is_importing ) ) { |
11376 |
+ return self::$is_importing; |
11377 |
+ } |
11378 |
+ |
11379 |
+ return defined( 'WP_IMPORTING' ) && WP_IMPORTING; |
11380 |
+ } |
11381 |
+ |
11382 |
+ static function set_doing_cron( $is_doing_cron ) { |
11383 |
+ // set to NULL to revert to WP_IMPORTING, the standard behaviour |
11384 |
+ self::$is_doing_cron = $is_doing_cron; |
11385 |
+ } |
11386 |
+ |
11387 |
+ static function is_doing_cron() { |
11388 |
+ if ( ! is_null( self::$is_doing_cron ) ) { |
11389 |
+ return self::$is_doing_cron; |
11390 |
+ } |
11391 |
+ |
11392 |
+ return defined( 'DOING_CRON' ) && DOING_CRON; |
11393 |
+ } |
11394 |
+} |
11395 |
|
11396 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-users.php b/plugins/jetpack/sync/class.jetpack-sync-users.php |
11397 |
new file mode 100644 |
11398 |
index 0000000..69d4e3c |
11399 |
--- /dev/null |
11400 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-users.php |
11401 |
@@ -0,0 +1,81 @@ |
11402 |
+<?php |
11403 |
+ |
11404 |
+/** |
11405 |
+ * Class Jetpack_Sync_Users |
11406 |
+ * |
11407 |
+ * Responsible for syncing user data changes. |
11408 |
+ */ |
11409 |
+class Jetpack_Sync_Users { |
11410 |
+ static $user_roles = array(); |
11411 |
+ |
11412 |
+ static function init() { |
11413 |
+ if ( Jetpack::is_active() ) { |
11414 |
+ // Kick off synchronization of user role when it changes |
11415 |
+ add_action( 'set_user_role', array( __CLASS__, 'user_role_change' ) ); |
11416 |
+ } |
11417 |
+ } |
11418 |
+ |
11419 |
+ /** |
11420 |
+ * Synchronize connected user role changes |
11421 |
+ */ |
11422 |
+ static function user_role_change( $user_id ) { |
11423 |
+ if ( Jetpack::is_user_connected( $user_id ) ) { |
11424 |
+ self::update_role_on_com( $user_id ); |
11425 |
+ //try to choose a new master if we're demoting the current one |
11426 |
+ self::maybe_demote_master_user( $user_id ); |
11427 |
+ } |
11428 |
+ } |
11429 |
+ |
11430 |
+ static function get_role( $user_id ) { |
11431 |
+ if ( isset( $user_roles[ $user_id ] ) ) { |
11432 |
+ return $user_roles[ $user_id ]; |
11433 |
+ } |
11434 |
+ |
11435 |
+ $current_user_id = get_current_user_id(); |
11436 |
+ wp_set_current_user( $user_id ); |
11437 |
+ $role = Jetpack::translate_current_user_to_role(); |
11438 |
+ wp_set_current_user( $current_user_id ); |
11439 |
+ $user_roles[ $user_id ] = $role; |
11440 |
+ |
11441 |
+ return $role; |
11442 |
+ } |
11443 |
+ |
11444 |
+ static function get_signed_role( $user_id ) { |
11445 |
+ return Jetpack::sign_role( self::get_role( $user_id ) ); |
11446 |
+ } |
11447 |
+ |
11448 |
+ static function update_role_on_com( $user_id ) { |
11449 |
+ $signed_role = self::get_signed_role( $user_id ); |
11450 |
+ Jetpack::xmlrpc_async_call( 'jetpack.updateRole', $user_id, $signed_role ); |
11451 |
+ } |
11452 |
+ |
11453 |
+ static function maybe_demote_master_user( $user_id ) { |
11454 |
+ $master_user_id = Jetpack_Options::get_option( 'master_user' ); |
11455 |
+ $role = self::get_role( $user_id ); |
11456 |
+ if ( $user_id == $master_user_id && 'administrator' != $role ) { |
11457 |
+ $query = new WP_User_Query( |
11458 |
+ array( |
11459 |
+ 'fields' => array( 'id' ), |
11460 |
+ 'role' => 'administrator', |
11461 |
+ 'orderby' => 'id', |
11462 |
+ 'exclude' => array( $master_user_id ), |
11463 |
+ ) |
11464 |
+ ); |
11465 |
+ $new_master = false; |
11466 |
+ foreach ( $query->results as $result ) { |
11467 |
+ $found_user_id = absint( $result->id ); |
11468 |
+ if ( $found_user_id && Jetpack::is_user_connected( $found_user_id ) ) { |
11469 |
+ $new_master = $found_user_id; |
11470 |
+ break; |
11471 |
+ } |
11472 |
+ } |
11473 |
+ |
11474 |
+ if ( $new_master ) { |
11475 |
+ Jetpack_Options::update_option( 'master_user', $new_master ); |
11476 |
+ } |
11477 |
+ // else disconnect..? |
11478 |
+ } |
11479 |
+ } |
11480 |
+} |
11481 |
+ |
11482 |
+Jetpack_Sync_Users::init(); |
11483 |
|
11484 |
diff --git a/plugins/jetpack/sync/class.jetpack-sync-wp-replicastore.php b/plugins/jetpack/sync/class.jetpack-sync-wp-replicastore.php |
11485 |
new file mode 100644 |
11486 |
index 0000000..9b37887 |
11487 |
--- /dev/null |
11488 |
+++ b/plugins/jetpack/sync/class.jetpack-sync-wp-replicastore.php |
11489 |
@@ -0,0 +1,702 @@ |
11490 |
+<?php |
11491 |
+ |
11492 |
+require_once dirname( __FILE__ ) . '/interface.jetpack-sync-replicastore.php'; |
11493 |
+require_once dirname( __FILE__ ) . '/class.jetpack-sync-defaults.php'; |
11494 |
+ |
11495 |
+/** |
11496 |
+ * An implementation of iJetpack_Sync_Replicastore which returns data stored in a WordPress.org DB. |
11497 |
+ * This is useful to compare values in the local WP DB to values in the synced replica store |
11498 |
+ */ |
11499 |
+class Jetpack_Sync_WP_Replicastore implements iJetpack_Sync_Replicastore { |
11500 |
+ |
11501 |
+ |
11502 |
+ public function reset() { |
11503 |
+ global $wpdb; |
11504 |
+ |
11505 |
+ $wpdb->query( "DELETE FROM $wpdb->posts" ); |
11506 |
+ $wpdb->query( "DELETE FROM $wpdb->comments" ); |
11507 |
+ |
11508 |
+ // also need to delete terms from cache |
11509 |
+ $term_ids = $wpdb->get_col( "SELECT term_id FROM $wpdb->terms" ); |
11510 |
+ foreach ( $term_ids as $term_id ) { |
11511 |
+ wp_cache_delete( $term_id, 'terms' ); |
11512 |
+ } |
11513 |
+ |
11514 |
+ $wpdb->query( "DELETE FROM $wpdb->terms" ); |
11515 |
+ |
11516 |
+ $wpdb->query( "DELETE FROM $wpdb->term_taxonomy" ); |
11517 |
+ $wpdb->query( "DELETE FROM $wpdb->term_relationships" ); |
11518 |
+ |
11519 |
+ // callables and constants |
11520 |
+ $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'jetpack_%'" ); |
11521 |
+ $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key NOT LIKE '\_%'" ); |
11522 |
+ } |
11523 |
+ |
11524 |
+ function full_sync_start( $config ) { |
11525 |
+ $this->reset(); |
11526 |
+ } |
11527 |
+ |
11528 |
+ function full_sync_end( $checksum ) { |
11529 |
+ // noop right now |
11530 |
+ } |
11531 |
+ |
11532 |
+ public function post_count( $status = null, $min_id = null, $max_id = null ) { |
11533 |
+ global $wpdb; |
11534 |
+ |
11535 |
+ $where = ''; |
11536 |
+ |
11537 |
+ if ( $status ) { |
11538 |
+ $where = "post_status = '" . esc_sql( $status ) . "'"; |
11539 |
+ } else { |
11540 |
+ $where = '1=1'; |
11541 |
+ } |
11542 |
+ |
11543 |
+ if ( null != $min_id ) { |
11544 |
+ $where .= ' AND ID >= ' . intval( $min_id ); |
11545 |
+ } |
11546 |
+ |
11547 |
+ if ( null != $max_id ) { |
11548 |
+ $where .= ' AND ID <= ' . intval( $max_id ); |
11549 |
+ } |
11550 |
+ |
11551 |
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE $where" ); |
11552 |
+ } |
11553 |
+ |
11554 |
+ // TODO: actually use max_id/min_id |
11555 |
+ public function get_posts( $status = null, $min_id = null, $max_id = null ) { |
11556 |
+ $args = array( 'orderby' => 'ID', 'posts_per_page' => -1 ); |
11557 |
+ |
11558 |
+ if ( $status ) { |
11559 |
+ $args['post_status'] = $status; |
11560 |
+ } else { |
11561 |
+ $args['post_status'] = 'any'; |
11562 |
+ } |
11563 |
+ |
11564 |
+ return get_posts( $args ); |
11565 |
+ } |
11566 |
+ |
11567 |
+ public function get_post( $id ) { |
11568 |
+ return get_post( $id ); |
11569 |
+ } |
11570 |
+ |
11571 |
+ public function upsert_post( $post, $silent = false ) { |
11572 |
+ global $wpdb; |
11573 |
+ |
11574 |
+ // reject the post if it's not a WP_Post |
11575 |
+ if ( ! $post instanceof WP_Post ) { |
11576 |
+ return; |
11577 |
+ } |
11578 |
+ |
11579 |
+ $post = $post->to_array(); |
11580 |
+ |
11581 |
+ // reject posts without an ID |
11582 |
+ if ( ! isset( $post['ID'] ) ) { |
11583 |
+ return; |
11584 |
+ } |
11585 |
+ |
11586 |
+ $now = current_time( 'mysql' ); |
11587 |
+ $now_gmt = get_gmt_from_date( $now ); |
11588 |
+ |
11589 |
+ $defaults = array( |
11590 |
+ 'ID' => 0, |
11591 |
+ 'post_author' => '0', |
11592 |
+ 'post_content' => '', |
11593 |
+ 'post_content_filtered' => '', |
11594 |
+ 'post_title' => '', |
11595 |
+ 'post_name' => '', |
11596 |
+ 'post_excerpt' => '', |
11597 |
+ 'post_status' => 'draft', |
11598 |
+ 'post_type' => 'post', |
11599 |
+ 'comment_status' => 'closed', |
11600 |
+ 'comment_count' => '0', |
11601 |
+ 'ping_status' => '', |
11602 |
+ 'post_password' => '', |
11603 |
+ 'to_ping' => '', |
11604 |
+ 'pinged' => '', |
11605 |
+ 'post_parent' => 0, |
11606 |
+ 'menu_order' => 0, |
11607 |
+ 'guid' => '', |
11608 |
+ 'post_date' => $now, |
11609 |
+ 'post_date_gmt' => $now_gmt, |
11610 |
+ 'post_modified' => $now, |
11611 |
+ 'post_modified_gmt' => $now_gmt, |
11612 |
+ ); |
11613 |
+ |
11614 |
+ $post = array_intersect_key( $post, $defaults ); |
11615 |
+ |
11616 |
+ $post = sanitize_post( $post, 'db' ); |
11617 |
+ |
11618 |
+ unset( $post['filter'] ); |
11619 |
+ |
11620 |
+ $exists = $wpdb->get_var( $wpdb->prepare( "SELECT EXISTS( SELECT 1 FROM $wpdb->posts WHERE ID = %d )", $post['ID'] ) ); |
11621 |
+ |
11622 |
+ if ( $exists ) { |
11623 |
+ $wpdb->update( $wpdb->posts, $post, array( 'ID' => $post['ID'] ) ); |
11624 |
+ } else { |
11625 |
+ $wpdb->insert( $wpdb->posts, $post ); |
11626 |
+ } |
11627 |
+ |
11628 |
+ clean_post_cache( $post['ID'] ); |
11629 |
+ } |
11630 |
+ |
11631 |
+ public function delete_post( $post_id ) { |
11632 |
+ wp_delete_post( $post_id, true ); |
11633 |
+ } |
11634 |
+ |
11635 |
+ public function posts_checksum( $min_id = null, $max_id = null ) { |
11636 |
+ global $wpdb; |
11637 |
+ return $this->table_checksum( $wpdb->posts, Jetpack_Sync_Defaults::$default_post_checksum_columns , 'ID', Jetpack_Sync_Settings::get_blacklisted_post_types_sql(), $min_id, $max_id ); |
11638 |
+ } |
11639 |
+ |
11640 |
+ public function comment_count( $status = null, $min_id = null, $max_id = null ) { |
11641 |
+ global $wpdb; |
11642 |
+ |
11643 |
+ $comment_approved = $this->comment_status_to_approval_value( $status ); |
11644 |
+ |
11645 |
+ if ( $comment_approved !== false ) { |
11646 |
+ $where = "comment_approved = '" . esc_sql( $comment_approved ) . "'"; |
11647 |
+ } else { |
11648 |
+ $where = '1=1'; |
11649 |
+ } |
11650 |
+ |
11651 |
+ if ( $min_id != null ) { |
11652 |
+ $where .= ' AND comment_ID >= ' . intval( $min_id ); |
11653 |
+ } |
11654 |
+ |
11655 |
+ if ( $max_id != null ) { |
11656 |
+ $where .= ' AND comment_ID <= ' . intval( $max_id ); |
11657 |
+ } |
11658 |
+ |
11659 |
+ return $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE $where" ); |
11660 |
+ } |
11661 |
+ |
11662 |
+ private function comment_status_to_approval_value( $status ) { |
11663 |
+ switch ( $status ) { |
11664 |
+ case 'approve': |
11665 |
+ return '1'; |
11666 |
+ case 'hold': |
11667 |
+ return '0'; |
11668 |
+ case 'spam': |
11669 |
+ return 'spam'; |
11670 |
+ case 'trash': |
11671 |
+ return 'trash'; |
11672 |
+ case 'any': |
11673 |
+ return false; |
11674 |
+ case 'all': |
11675 |
+ return false; |
11676 |
+ default: |
11677 |
+ return false; |
11678 |
+ } |
11679 |
+ } |
11680 |
+ |
11681 |
+ // TODO: actually use max_id/min_id |
11682 |
+ public function get_comments( $status = null, $min_id = null, $max_id = null ) { |
11683 |
+ $args = array( 'orderby' => 'ID', 'status' => 'all' ); |
11684 |
+ |
11685 |
+ if ( $status ) { |
11686 |
+ $args['status'] = $status; |
11687 |
+ } |
11688 |
+ |
11689 |
+ return get_comments( $args ); |
11690 |
+ } |
11691 |
+ |
11692 |
+ public function get_comment( $id ) { |
11693 |
+ return WP_Comment::get_instance( $id ); |
11694 |
+ } |
11695 |
+ |
11696 |
+ public function upsert_comment( $comment ) { |
11697 |
+ global $wpdb, $wp_version; |
11698 |
+ |
11699 |
+ if ( version_compare( $wp_version, '4.4', '<' ) ) { |
11700 |
+ $comment = (array) $comment; |
11701 |
+ } else { |
11702 |
+ // WP 4.4 introduced the WP_Comment Class |
11703 |
+ $comment = $comment->to_array(); |
11704 |
+ } |
11705 |
+ |
11706 |
+ // filter by fields on comment table |
11707 |
+ $comment_fields_whitelist = array( |
11708 |
+ 'comment_ID', |
11709 |
+ 'comment_post_ID', |
11710 |
+ 'comment_author', |
11711 |
+ 'comment_author_email', |
11712 |
+ 'comment_author_url', |
11713 |
+ 'comment_author_IP', |
11714 |
+ 'comment_date', |
11715 |
+ 'comment_date_gmt', |
11716 |
+ 'comment_content', |
11717 |
+ 'comment_karma', |
11718 |
+ 'comment_approved', |
11719 |
+ 'comment_agent', |
11720 |
+ 'comment_type', |
11721 |
+ 'comment_parent', |
11722 |
+ 'user_id', |
11723 |
+ ); |
11724 |
+ |
11725 |
+ foreach ( $comment as $key => $value ) { |
11726 |
+ if ( ! in_array( $key, $comment_fields_whitelist ) ) { |
11727 |
+ unset( $comment[ $key ] ); |
11728 |
+ } |
11729 |
+ } |
11730 |
+ |
11731 |
+ $exists = $wpdb->get_var( |
11732 |
+ $wpdb->prepare( |
11733 |
+ "SELECT EXISTS( SELECT 1 FROM $wpdb->comments WHERE comment_ID = %d )", |
11734 |
+ $comment['comment_ID'] |
11735 |
+ ) |
11736 |
+ ); |
11737 |
+ |
11738 |
+ if ( $exists ) { |
11739 |
+ $wpdb->update( $wpdb->comments, $comment, array( 'comment_ID' => $comment['comment_ID'] ) ); |
11740 |
+ } else { |
11741 |
+ $wpdb->insert( $wpdb->comments, $comment ); |
11742 |
+ } |
11743 |
+ |
11744 |
+ wp_update_comment_count( $comment['comment_post_ID'] ); |
11745 |
+ } |
11746 |
+ |
11747 |
+ public function trash_comment( $comment_id ) { |
11748 |
+ wp_delete_comment( $comment_id ); |
11749 |
+ } |
11750 |
+ |
11751 |
+ public function delete_comment( $comment_id ) { |
11752 |
+ wp_delete_comment( $comment_id, true ); |
11753 |
+ } |
11754 |
+ |
11755 |
+ public function spam_comment( $comment_id ) { |
11756 |
+ wp_spam_comment( $comment_id ); |
11757 |
+ } |
11758 |
+ |
11759 |
+ public function trashed_post_comments( $post_id, $statuses ) { |
11760 |
+ wp_trash_post_comments( $post_id ); |
11761 |
+ } |
11762 |
+ |
11763 |
+ public function untrashed_post_comments( $post_id ) { |
11764 |
+ wp_untrash_post_comments( $post_id ); |
11765 |
+ } |
11766 |
+ |
11767 |
+ public function comments_checksum( $min_id = null, $max_id = null ) { |
11768 |
+ global $wpdb; |
11769 |
+ return $this->table_checksum( $wpdb->comments, Jetpack_Sync_Defaults::$default_comment_checksum_columns, 'comment_ID', "comment_approved <> 'spam'", $min_id, $max_id ); |
11770 |
+ } |
11771 |
+ |
11772 |
+ public function options_checksum() { |
11773 |
+ global $wpdb; |
11774 |
+ |
11775 |
+ $options_whitelist = "'" . implode( "', '", Jetpack_Sync_Defaults::$default_options_whitelist ) . "'"; |
11776 |
+ $where_sql = "option_name IN ( $options_whitelist )"; |
11777 |
+ |
11778 |
+ return $this->table_checksum( $wpdb->options, Jetpack_Sync_Defaults::$default_option_checksum_columns, null, $where_sql, null, null ); |
11779 |
+ } |
11780 |
+ |
11781 |
+ |
11782 |
+ public function update_option( $option, $value ) { |
11783 |
+ return update_option( $option, $value ); |
11784 |
+ } |
11785 |
+ |
11786 |
+ public function get_option( $option, $default = false ) { |
11787 |
+ return get_option( $option, $default ); |
11788 |
+ } |
11789 |
+ |
11790 |
+ public function delete_option( $option ) { |
11791 |
+ return delete_option( $option ); |
11792 |
+ } |
11793 |
+ |
11794 |
+ public function set_theme_support( $theme_support ) { |
11795 |
+ // noop |
11796 |
+ } |
11797 |
+ |
11798 |
+ public function current_theme_supports( $feature ) { |
11799 |
+ return current_theme_supports( $feature ); |
11800 |
+ } |
11801 |
+ |
11802 |
+ public function get_metadata( $type, $object_id, $meta_key = '', $single = false ) { |
11803 |
+ return get_metadata( $type, $object_id, $meta_key, $single ); |
11804 |
+ } |
11805 |
+ |
11806 |
+ /** |
11807 |
+ * |
11808 |
+ * Stores remote meta key/values alongside an ID mapping key |
11809 |
+ * |
11810 |
+ * @param $type |
11811 |
+ * @param $object_id |
11812 |
+ * @param $meta_key |
11813 |
+ * @param $meta_value |
11814 |
+ * @param $meta_id |
11815 |
+ * |
11816 |
+ * @return bool |
11817 |
+ */ |
11818 |
+ public function upsert_metadata( $type, $object_id, $meta_key, $meta_value, $meta_id ) { |
11819 |
+ |
11820 |
+ $table = _get_meta_table( $type ); |
11821 |
+ if ( ! $table ) { |
11822 |
+ return false; |
11823 |
+ } |
11824 |
+ |
11825 |
+ global $wpdb; |
11826 |
+ |
11827 |
+ $exists = $wpdb->get_var( $wpdb->prepare( |
11828 |
+ "SELECT EXISTS( SELECT 1 FROM $table WHERE meta_id = %d )", |
11829 |
+ $meta_id |
11830 |
+ ) ); |
11831 |
+ |
11832 |
+ if ( $exists ) { |
11833 |
+ $wpdb->update( $table, array( |
11834 |
+ 'meta_key' => $meta_key, |
11835 |
+ 'meta_value' => serialize( $meta_value ), |
11836 |
+ ), array( 'meta_id' => $meta_id ) ); |
11837 |
+ } else { |
11838 |
+ $object_id_field = $type . '_id'; |
11839 |
+ $wpdb->insert( $table, array( |
11840 |
+ 'meta_id' => $meta_id, |
11841 |
+ $object_id_field => $object_id, |
11842 |
+ 'meta_key' => $meta_key, |
11843 |
+ 'meta_value' => serialize( $meta_value ), |
11844 |
+ ) ); |
11845 |
+ } |
11846 |
+ |
11847 |
+ wp_cache_delete( $object_id, $type . '_meta' ); |
11848 |
+ |
11849 |
+ return true; |
11850 |
+ } |
11851 |
+ |
11852 |
+ public function delete_metadata( $type, $object_id, $meta_ids ) { |
11853 |
+ global $wpdb; |
11854 |
+ |
11855 |
+ $table = _get_meta_table( $type ); |
11856 |
+ if ( ! $table ) { |
11857 |
+ return false; |
11858 |
+ } |
11859 |
+ |
11860 |
+ foreach ( $meta_ids as $meta_id ) { |
11861 |
+ $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE meta_id = %d", $meta_id ) ); |
11862 |
+ } |
11863 |
+ |
11864 |
+ // if we don't have an object ID what do we do - invalidate ALL meta? |
11865 |
+ if ( $object_id ) { |
11866 |
+ wp_cache_delete( $object_id, $type . '_meta' ); |
11867 |
+ } |
11868 |
+ } |
11869 |
+ |
11870 |
+ // constants |
11871 |
+ public function get_constant( $constant ) { |
11872 |
+ $value = get_option( 'jetpack_constant_' . $constant ); |
11873 |
+ |
11874 |
+ if ( $value ) { |
11875 |
+ return $value; |
11876 |
+ } |
11877 |
+ |
11878 |
+ return null; |
11879 |
+ } |
11880 |
+ |
11881 |
+ public function set_constant( $constant, $value ) { |
11882 |
+ update_option( 'jetpack_constant_' . $constant, $value ); |
11883 |
+ } |
11884 |
+ |
11885 |
+ public function get_updates( $type ) { |
11886 |
+ $all_updates = get_option( 'jetpack_updates', array() ); |
11887 |
+ |
11888 |
+ if ( isset( $all_updates[ $type ] ) ) { |
11889 |
+ return $all_updates[ $type ]; |
11890 |
+ } else { |
11891 |
+ return null; |
11892 |
+ } |
11893 |
+ } |
11894 |
+ |
11895 |
+ public function set_updates( $type, $updates ) { |
11896 |
+ $all_updates = get_option( 'jetpack_updates', array() ); |
11897 |
+ $all_updates[ $type ] = $updates; |
11898 |
+ update_option( 'jetpack_updates', $all_updates ); |
11899 |
+ } |
11900 |
+ |
11901 |
+ // functions |
11902 |
+ public function get_callable( $name ) { |
11903 |
+ $value = get_option( 'jetpack_' . $name ); |
11904 |
+ |
11905 |
+ if ( $value ) { |
11906 |
+ return $value; |
11907 |
+ } |
11908 |
+ |
11909 |
+ return null; |
11910 |
+ } |
11911 |
+ |
11912 |
+ public function set_callable( $name, $value ) { |
11913 |
+ update_option( 'jetpack_' . $name, $value ); |
11914 |
+ } |
11915 |
+ |
11916 |
+ // network options |
11917 |
+ public function get_site_option( $option ) { |
11918 |
+ return get_option( 'jetpack_network_' . $option ); |
11919 |
+ } |
11920 |
+ |
11921 |
+ public function update_site_option( $option, $value ) { |
11922 |
+ return update_option( 'jetpack_network_' . $option, $value ); |
11923 |
+ } |
11924 |
+ |
11925 |
+ public function delete_site_option( $option ) { |
11926 |
+ return delete_option( 'jetpack_network_' . $option ); |
11927 |
+ } |
11928 |
+ |
11929 |
+ // terms |
11930 |
+ // terms |
11931 |
+ public function get_terms( $taxonomy ) { |
11932 |
+ return get_terms( $taxonomy ); |
11933 |
+ } |
11934 |
+ |
11935 |
+ public function get_term( $taxonomy, $term_id, $is_term_id = true ) { |
11936 |
+ $t = $this->ensure_taxonomy( $taxonomy ); |
11937 |
+ if ( ! $t || is_wp_error( $t ) ) { |
11938 |
+ return $t; |
11939 |
+ } |
11940 |
+ |
11941 |
+ return get_term( $term_id, $taxonomy ); |
11942 |
+ } |
11943 |
+ |
11944 |
+ private function ensure_taxonomy( $taxonomy ) { |
11945 |
+ if ( ! taxonomy_exists( $taxonomy ) ) { |
11946 |
+ // try re-registering synced taxonomies |
11947 |
+ $taxonomies = $this->get_callable( 'taxonomies' ); |
11948 |
+ if ( ! isset( $taxonomies[ $taxonomy ] ) ) { |
11949 |
+ // doesn't exist, or somehow hasn't been synced |
11950 |
+ return new WP_Error( 'invalid_taxonomy', "The taxonomy '$taxonomy' doesn't exist" ); |
11951 |
+ } |
11952 |
+ $t = $taxonomies[ $taxonomy ]; |
11953 |
+ |
11954 |
+ return register_taxonomy( |
11955 |
+ $taxonomy, |
11956 |
+ $t->object_type, |
11957 |
+ (array) $t |
11958 |
+ ); |
11959 |
+ } |
11960 |
+ |
11961 |
+ return true; |
11962 |
+ } |
11963 |
+ |
11964 |
+ public function get_the_terms( $object_id, $taxonomy ) { |
11965 |
+ return get_the_terms( $object_id, $taxonomy ); |
11966 |
+ } |
11967 |
+ |
11968 |
+ public function update_term( $term_object ) { |
11969 |
+ $taxonomy = $term_object->taxonomy; |
11970 |
+ global $wpdb; |
11971 |
+ $exists = $wpdb->get_var( $wpdb->prepare( |
11972 |
+ "SELECT EXISTS( SELECT 1 FROM $wpdb->terms WHERE term_id = %d )", |
11973 |
+ $term_object->term_id |
11974 |
+ ) ); |
11975 |
+ if ( ! $exists ) { |
11976 |
+ $term_object = sanitize_term( clone( $term_object ), $taxonomy, 'db' ); |
11977 |
+ $term = array( |
11978 |
+ 'term_id' => $term_object->term_id, |
11979 |
+ 'name' => $term_object->name, |
11980 |
+ 'slug' => $term_object->slug, |
11981 |
+ 'term_group' => $term_object->term_group, |
11982 |
+ ); |
11983 |
+ $term_taxonomy = array( |
11984 |
+ 'term_taxonomy_id' => $term_object->term_taxonomy_id, |
11985 |
+ 'term_id' => $term_object->term_id, |
11986 |
+ 'taxonomy' => $term_object->taxonomy, |
11987 |
+ 'description' => $term_object->description, |
11988 |
+ 'parent' => (int) $term_object->parent, |
11989 |
+ 'count' => (int) $term_object->count, |
11990 |
+ ); |
11991 |
+ $wpdb->insert( $wpdb->terms, $term ); |
11992 |
+ $wpdb->insert( $wpdb->term_taxonomy, $term_taxonomy ); |
11993 |
+ |
11994 |
+ return true; |
11995 |
+ } |
11996 |
+ |
11997 |
+ return wp_update_term( $term_object->term_id, $taxonomy, (array) $term_object ); |
11998 |
+ } |
11999 |
+ |
12000 |
+ public function delete_term( $term_id, $taxonomy ) { |
12001 |
+ return wp_delete_term( $term_id, $taxonomy ); |
12002 |
+ } |
12003 |
+ |
12004 |
+ public function update_object_terms( $object_id, $taxonomy, $terms, $append ) { |
12005 |
+ wp_set_object_terms( $object_id, $terms, $taxonomy, $append ); |
12006 |
+ } |
12007 |
+ |
12008 |
+ public function delete_object_terms( $object_id, $tt_ids ) { |
12009 |
+ global $wpdb; |
12010 |
+ |
12011 |
+ if ( is_array( $tt_ids ) && ! empty( $tt_ids ) ) { |
12012 |
+ $taxonomies = array(); |
12013 |
+ foreach ( $tt_ids as $tt_id ) { |
12014 |
+ $term = get_term_by( 'term_taxonomy_id', $tt_id ); |
12015 |
+ $taxonomies[ $term->taxonomy ][] = $tt_id; |
12016 |
+ } |
12017 |
+ $in_tt_ids = "'" . implode( "', '", $tt_ids ) . "'"; |
12018 |
+ |
12019 |
+ /** |
12020 |
+ * Fires immediately before an object-term relationship is deleted. |
12021 |
+ * |
12022 |
+ * @since 2.9.0 |
12023 |
+ * |
12024 |
+ * @param int $object_id Object ID. |
12025 |
+ * @param array $tt_ids An array of term taxonomy IDs. |
12026 |
+ */ |
12027 |
+ do_action( 'delete_term_relationships', $object_id, $tt_ids ); |
12028 |
+ $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) ); |
12029 |
+ foreach ( $taxonomies as $taxonomy => $taxonomy_tt_ids ) { |
12030 |
+ wp_cache_delete( $object_id, $taxonomy . '_relationships' ); |
12031 |
+ /** |
12032 |
+ * Fires immediately after an object-term relationship is deleted. |
12033 |
+ * |
12034 |
+ * @since 2.9.0 |
12035 |
+ * |
12036 |
+ * @param int $object_id Object ID. |
12037 |
+ * @param array $tt_ids An array of term taxonomy IDs. |
12038 |
+ */ |
12039 |
+ do_action( 'deleted_term_relationships', $object_id, $taxonomy_tt_ids ); |
12040 |
+ wp_update_term_count( $taxonomy_tt_ids, $taxonomy ); |
12041 |
+ } |
12042 |
+ |
12043 |
+ return (bool) $deleted; |
12044 |
+ } |
12045 |
+ |
12046 |
+ return false; |
12047 |
+ } |
12048 |
+ |
12049 |
+ // users |
12050 |
+ public function user_count() { |
12051 |
+ |
12052 |
+ } |
12053 |
+ |
12054 |
+ public function get_user( $user_id ) { |
12055 |
+ return WP_User::get_instance( $user_id ); |
12056 |
+ } |
12057 |
+ |
12058 |
+ public function upsert_user( $user ) { |
12059 |
+ $this->invalid_call(); |
12060 |
+ } |
12061 |
+ |
12062 |
+ public function delete_user( $user_id ) { |
12063 |
+ $this->invalid_call(); |
12064 |
+ } |
12065 |
+ |
12066 |
+ public function get_allowed_mime_types( $user_id ) { |
12067 |
+ |
12068 |
+ } |
12069 |
+ |
12070 |
+ public function checksum_all() { |
12071 |
+ return array( |
12072 |
+ 'posts' => $this->posts_checksum(), |
12073 |
+ 'comments' => $this->comments_checksum() |
12074 |
+ ); |
12075 |
+ } |
12076 |
+ |
12077 |
+ function checksum_histogram( $object_type, $buckets, $start_id = null, $end_id = null, $columns = null ) { |
12078 |
+ global $wpdb; |
12079 |
+ |
12080 |
+ $wpdb->queries = array(); |
12081 |
+ |
12082 |
+ switch( $object_type ) { |
12083 |
+ case "posts": |
12084 |
+ $object_count = $this->post_count( null, $start_id, $end_id ); |
12085 |
+ $object_table = $wpdb->posts; |
12086 |
+ $id_field = 'ID'; |
12087 |
+ if ( empty( $columns ) ) { |
12088 |
+ $columns = Jetpack_Sync_Defaults::$default_post_checksum_columns; |
12089 |
+ } |
12090 |
+ break; |
12091 |
+ case "comments": |
12092 |
+ $object_count = $this->comment_count( null, $start_id, $end_id ); |
12093 |
+ $object_table = $wpdb->comments; |
12094 |
+ $id_field = 'comment_ID'; |
12095 |
+ if ( empty( $columns ) ) { |
12096 |
+ $columns = Jetpack_Sync_Defaults::$default_comment_checksum_columns; |
12097 |
+ } |
12098 |
+ break; |
12099 |
+ default: |
12100 |
+ return false; |
12101 |
+ } |
12102 |
+ |
12103 |
+ $bucket_size = intval( ceil( $object_count / $buckets ) ); |
12104 |
+ $previous_max_id = 0; |
12105 |
+ $histogram = array(); |
12106 |
+ |
12107 |
+ $where = '1=1'; |
12108 |
+ |
12109 |
+ if ( $start_id ) { |
12110 |
+ $where .= " AND $id_field >= " . intval( $start_id ); |
12111 |
+ } |
12112 |
+ |
12113 |
+ if ( $end_id ) { |
12114 |
+ $where .= " AND $id_field <= " . intval( $end_id ); |
12115 |
+ } |
12116 |
+ |
12117 |
+ do { |
12118 |
+ list( $first_id, $last_id ) = $wpdb->get_row( |
12119 |
+ "SELECT MIN($id_field) as min_id, MAX($id_field) as max_id FROM ( SELECT $id_field FROM $object_table WHERE $where AND $id_field > $previous_max_id ORDER BY $id_field ASC LIMIT $bucket_size ) as ids", |
12120 |
+ ARRAY_N |
12121 |
+ ); |
12122 |
+ |
12123 |
+ // get the checksum value |
12124 |
+ $value = $this->table_checksum( $object_table, $columns, $id_field, '1=1', $first_id, $last_id ); |
12125 |
+ |
12126 |
+ if ( is_wp_error( $value ) ) { |
12127 |
+ return $value; |
12128 |
+ } |
12129 |
+ |
12130 |
+ if ( $first_id === null || $last_id === null ) { |
12131 |
+ break; |
12132 |
+ } elseif ( $first_id === $last_id ) { |
12133 |
+ $histogram[ $first_id ] = $value; |
12134 |
+ } else { |
12135 |
+ $histogram[ "{$first_id}-{$last_id}" ] = $value; |
12136 |
+ } |
12137 |
+ |
12138 |
+ $previous_max_id = $last_id; |
12139 |
+ } while ( true ); |
12140 |
+ |
12141 |
+ return $histogram; |
12142 |
+ } |
12143 |
+ |
12144 |
+ private function table_checksum( $table, $columns, $id_column, $where_sql = '1=1', $min_id = null, $max_id = null ) { |
12145 |
+ global $wpdb; |
12146 |
+ |
12147 |
+ // sanitize to just valid MySQL column names |
12148 |
+ $sanitized_columns = preg_grep ( '/^[0-9,a-z,A-Z$_]+$/i', $columns ); |
12149 |
+ $columns_sql = implode( ',', array_map( array( $this, 'strip_non_ascii_sql' ), $sanitized_columns ) ); |
12150 |
+ |
12151 |
+ if ( $min_id !== null ) { |
12152 |
+ $min_id = intval( $min_id ); |
12153 |
+ $where_sql .= " AND $id_column >= $min_id"; |
12154 |
+ } |
12155 |
+ |
12156 |
+ if ( $max_id !== null ) { |
12157 |
+ $max_id = intval( $max_id ); |
12158 |
+ $where_sql .= " AND $id_column <= $max_id"; |
12159 |
+ } |
12160 |
+ |
12161 |
+ $query = <<<ENDSQL |
12162 |
+ SELECT CONV(BIT_XOR(CRC32(CONCAT({$columns_sql}))), 10, 16) |
12163 |
+ FROM $table |
12164 |
+ WHERE $where_sql |
12165 |
+ENDSQL; |
12166 |
+ |
12167 |
+ $result = $wpdb->get_var( $query ); |
12168 |
+ |
12169 |
+ if ( $wpdb->last_error ) { |
12170 |
+ return new WP_Error( 'database_error', $wpdb->last_error ); |
12171 |
+ } |
12172 |
+ |
12173 |
+ return $result; |
12174 |
+ |
12175 |
+ } |
12176 |
+ |
12177 |
+ /** |
12178 |
+ * Wraps a column name in SQL which strips non-ASCII chars. |
12179 |
+ * This helps normalize data to avoid checksum differences caused by |
12180 |
+ * badly encoded data in the DB |
12181 |
+ */ |
12182 |
+ function strip_non_ascii_sql( $column_name ) { |
12183 |
+ return "REPLACE( CONVERT( $column_name USING ascii ), '?', '' )"; |
12184 |
+ } |
12185 |
+ |
12186 |
+ private function invalid_call() { |
12187 |
+ $backtrace = debug_backtrace(); |
12188 |
+ $caller = $backtrace[1]['function']; |
12189 |
+ throw new Exception( "This function $caller is not supported on the WP Replicastore" ); |
12190 |
+ } |
12191 |
+} |
12192 |
|
12193 |
diff --git a/plugins/jetpack/sync/interface.jetpack-sync-codec.php b/plugins/jetpack/sync/interface.jetpack-sync-codec.php |
12194 |
new file mode 100644 |
12195 |
index 0000000..1405d90 |
12196 |
--- /dev/null |
12197 |
+++ b/plugins/jetpack/sync/interface.jetpack-sync-codec.php |
12198 |
@@ -0,0 +1,14 @@ |
12199 |
+<?php |
12200 |
+ |
12201 |
+/** |
12202 |
+ * Very simple interface for encoding and decoding input |
12203 |
+ * This is used to provide compression and serialization to messages |
12204 |
+ **/ |
12205 |
+interface iJetpack_Sync_Codec { |
12206 |
+ // we send this with the payload so we can select the appropriate decoder at the other end |
12207 |
+ public function name(); |
12208 |
+ |
12209 |
+ public function encode( $object ); |
12210 |
+ |
12211 |
+ public function decode( $input ); |
12212 |
+} |
12213 |
|
12214 |
diff --git a/plugins/jetpack/sync/interface.jetpack-sync-replicastore.php b/plugins/jetpack/sync/interface.jetpack-sync-replicastore.php |
12215 |
new file mode 100644 |
12216 |
index 0000000..a114098 |
12217 |
--- /dev/null |
12218 |
+++ b/plugins/jetpack/sync/interface.jetpack-sync-replicastore.php |
12219 |
@@ -0,0 +1,129 @@ |
12220 |
+<?php |
12221 |
+/** |
12222 |
+ * Sync architecture prototype |
12223 |
+ * @author Dan Walmsley |
12224 |
+ * To run tests: phpunit --testsuite sync --filter New_Sync |
12225 |
+ */ |
12226 |
+ |
12227 |
+/** |
12228 |
+ * A high-level interface for objects that store synced WordPress data |
12229 |
+ * Useful for ensuring that different storage mechanisms implement the |
12230 |
+ * required semantics for storing all the data that we sync |
12231 |
+ */ |
12232 |
+interface iJetpack_Sync_Replicastore { |
12233 |
+ // remove all data |
12234 |
+ public function reset(); |
12235 |
+ |
12236 |
+ // trigger setup for sync start/end |
12237 |
+ public function full_sync_start( $config ); |
12238 |
+ |
12239 |
+ public function full_sync_end( $checksum ); |
12240 |
+ |
12241 |
+ // posts |
12242 |
+ public function post_count( $status = null, $min_id = null, $max_id = null ); |
12243 |
+ |
12244 |
+ public function get_posts( $status = null, $min_id = null, $max_id = null ); |
12245 |
+ |
12246 |
+ public function get_post( $id ); |
12247 |
+ |
12248 |
+ public function upsert_post( $post, $silent = false ); |
12249 |
+ |
12250 |
+ public function delete_post( $post_id ); |
12251 |
+ |
12252 |
+ public function posts_checksum( $min_id = null, $max_id = null ); |
12253 |
+ |
12254 |
+ // comments |
12255 |
+ public function comment_count( $status = null, $min_id = null, $max_id = null ); |
12256 |
+ |
12257 |
+ public function get_comments( $status = null, $min_id = null, $max_id = null ); |
12258 |
+ |
12259 |
+ public function get_comment( $id ); |
12260 |
+ |
12261 |
+ public function upsert_comment( $comment ); |
12262 |
+ |
12263 |
+ public function trash_comment( $comment_id ); |
12264 |
+ |
12265 |
+ public function spam_comment( $comment_id ); |
12266 |
+ |
12267 |
+ public function delete_comment( $comment_id ); |
12268 |
+ |
12269 |
+ public function trashed_post_comments( $post_id, $statuses ); |
12270 |
+ |
12271 |
+ public function untrashed_post_comments( $post_id ); |
12272 |
+ |
12273 |
+ public function comments_checksum( $min_id = null, $max_id = null ); |
12274 |
+ |
12275 |
+ // options |
12276 |
+ public function update_option( $option, $value ); |
12277 |
+ |
12278 |
+ public function get_option( $option, $default = false ); |
12279 |
+ |
12280 |
+ public function delete_option( $option ); |
12281 |
+ |
12282 |
+ // themes |
12283 |
+ public function set_theme_support( $theme_support ); |
12284 |
+ |
12285 |
+ public function current_theme_supports( $feature ); |
12286 |
+ |
12287 |
+ // meta |
12288 |
+ public function get_metadata( $type, $object_id, $meta_key = '', $single = false ); |
12289 |
+ |
12290 |
+ public function upsert_metadata( $type, $object_id, $meta_key, $meta_value, $meta_id ); |
12291 |
+ |
12292 |
+ public function delete_metadata( $type, $object_id, $meta_ids ); |
12293 |
+ |
12294 |
+ // constants |
12295 |
+ public function get_constant( $constant ); |
12296 |
+ |
12297 |
+ public function set_constant( $constant, $value ); |
12298 |
+ |
12299 |
+ // updates |
12300 |
+ public function get_updates( $type ); |
12301 |
+ |
12302 |
+ public function set_updates( $type, $updates ); |
12303 |
+ |
12304 |
+ // functions |
12305 |
+ public function get_callable( $callable ); |
12306 |
+ |
12307 |
+ public function set_callable( $callable, $value ); |
12308 |
+ |
12309 |
+ // network options |
12310 |
+ public function get_site_option( $option ); |
12311 |
+ |
12312 |
+ public function update_site_option( $option, $value ); |
12313 |
+ |
12314 |
+ public function delete_site_option( $option ); |
12315 |
+ |
12316 |
+ // terms |
12317 |
+ public function get_terms( $taxonomy ); |
12318 |
+ |
12319 |
+ public function get_term( $taxonomy, $term_id, $is_term_id = true ); |
12320 |
+ |
12321 |
+ public function update_term( $term_object ); |
12322 |
+ |
12323 |
+ public function delete_term( $term_id, $taxonomy ); |
12324 |
+ |
12325 |
+ public function get_the_terms( $object_id, $taxonomy ); |
12326 |
+ |
12327 |
+ public function update_object_terms( $object_id, $taxonomy, $terms, $append ); |
12328 |
+ |
12329 |
+ public function delete_object_terms( $object_id, $tt_ids ); |
12330 |
+ |
12331 |
+ // users |
12332 |
+ public function user_count(); |
12333 |
+ |
12334 |
+ public function get_user( $user_id ); |
12335 |
+ |
12336 |
+ public function upsert_user( $user ); |
12337 |
+ |
12338 |
+ public function delete_user( $user_id ); |
12339 |
+ |
12340 |
+ public function get_allowed_mime_types( $user_id ); |
12341 |
+ |
12342 |
+ |
12343 |
+ // full checksum |
12344 |
+ public function checksum_all(); |
12345 |
+ |
12346 |
+ // histogram |
12347 |
+ public function checksum_histogram( $object_type, $buckets, $start_id = null, $end_id = null ); |
12348 |
+} |
12349 |
|
12350 |
diff --git a/plugins/jetpack/uninstall.php b/plugins/jetpack/uninstall.php |
12351 |
index f285370..437e33e 100644 |
12352 |
--- a/plugins/jetpack/uninstall.php |
12353 |
+++ b/plugins/jetpack/uninstall.php |
12354 |
@@ -2,15 +2,17 @@ |
12355 |
|
12356 |
if ( |
12357 |
!defined( 'WP_UNINSTALL_PLUGIN' ) |
12358 |
-|| |
12359 |
+ || |
12360 |
!WP_UNINSTALL_PLUGIN |
12361 |
-|| |
12362 |
+ || |
12363 |
dirname( WP_UNINSTALL_PLUGIN ) != dirname( plugin_basename( __FILE__ ) ) |
12364 |
) { |
12365 |
status_header( 404 ); |
12366 |
exit; |
12367 |
} |
12368 |
|
12369 |
+define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); |
12370 |
+ |
12371 |
// Delete all compact options |
12372 |
delete_option( 'jetpack_options' ); |
12373 |
|
12374 |
@@ -24,3 +26,7 @@ delete_option( 'jetpack_do_activate' ); |
12375 |
delete_option( 'jetpack_was_activated' ); |
12376 |
delete_option( 'jetpack_auto_installed' ); |
12377 |
delete_transient( 'jetpack_register' ); |
12378 |
+ |
12379 |
+// Jetpack Sync |
12380 |
+require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-sender.php'; |
12381 |
+Jetpack_Sync_Sender::get_instance()->uninstall(); |
12382 |
\ No newline at end of file |
12383 |
|
12384 |
diff --git a/plugins/jetpack/views/admin/my-jetpack-page.php b/plugins/jetpack/views/admin/my-jetpack-page.php |
12385 |
index 9fac14b..61cb471 100644 |
12386 |
--- a/plugins/jetpack/views/admin/my-jetpack-page.php |
12387 |
+++ b/plugins/jetpack/views/admin/my-jetpack-page.php |
12388 |
@@ -106,6 +106,7 @@ |
12389 |
<?php |
12390 |
$all_users = get_users(); |
12391 |
|
12392 |
+ $user_options = ''; |
12393 |
foreach ( $all_users as $user ) { |
12394 |
if ( Jetpack::is_user_connected( $user->ID ) && $user->caps['administrator'] ) { |
12395 |
if ( $user->ID == Jetpack_Options::get_option( 'master_user' ) ) { |