summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack')
-rw-r--r--plugins/jetpack/3rd-party/3rd-party.php7
-rw-r--r--plugins/jetpack/3rd-party/bbpress.php28
-rw-r--r--plugins/jetpack/3rd-party/bitly.php16
-rw-r--r--plugins/jetpack/_inc/footer.php21
-rw-r--r--plugins/jetpack/_inc/gallery-settings.js4
-rw-r--r--plugins/jetpack/_inc/genericons/README.md134
-rw-r--r--plugins/jetpack/_inc/genericons/genericons/Genericons.eotbin22760 -> 22374 bytes
-rw-r--r--plugins/jetpack/_inc/genericons/genericons/Genericons.svg48
-rw-r--r--plugins/jetpack/_inc/genericons/genericons/Genericons.ttfbin22576 -> 22188 bytes
-rw-r--r--plugins/jetpack/_inc/genericons/genericons/Genericons.woffbin14360 -> 13988 bytes
-rw-r--r--plugins/jetpack/_inc/genericons/genericons/genericons.css68
-rw-r--r--plugins/jetpack/_inc/genericons/genericons/rtl/genericons-rtl.css70
-rw-r--r--plugins/jetpack/_inc/header.php22
-rw-r--r--plugins/jetpack/_inc/jetpack-jitm.js129
-rw-r--r--plugins/jetpack/_inc/jetpack-modules.js21
-rw-r--r--plugins/jetpack/_inc/jetpack.js4
-rw-r--r--plugins/jetpack/_inc/jp-my-jetpack.js86
-rw-r--r--plugins/jetpack/_inc/jp.js182
-rw-r--r--plugins/jetpack/_inc/lib/admin-pages/class.jetpack-landing-page.php35
-rw-r--r--plugins/jetpack/_inc/lib/admin-pages/class.jetpack-my-jetpack-page.php187
-rw-r--r--plugins/jetpack/_inc/lib/admin-pages/class.jetpack-settings-page.php2
-rw-r--r--plugins/jetpack/_inc/lib/markdown/extra.php106
-rw-r--r--plugins/jetpack/_inc/lib/markdown/gfm.php9
-rw-r--r--plugins/jetpack/_inc/lib/markdown/test.php33
-rw-r--r--plugins/jetpack/_inc/lib/tonesque.php2
-rw-r--r--plugins/jetpack/_inc/lib/tracks/class.tracks-client.php168
-rw-r--r--plugins/jetpack/_inc/lib/tracks/class.tracks-event.php149
-rw-r--r--plugins/jetpack/_inc/lib/tracks/client.php124
-rw-r--r--plugins/jetpack/changelog.txt1405
-rw-r--r--plugins/jetpack/class.jetpack-admin.php61
-rw-r--r--plugins/jetpack/class.jetpack-autoupdate.php278
-rw-r--r--plugins/jetpack/class.jetpack-cli.php456
-rw-r--r--plugins/jetpack/class.jetpack-client-server.php65
-rw-r--r--plugins/jetpack/class.jetpack-client.php65
-rw-r--r--plugins/jetpack/class.jetpack-data.php83
-rw-r--r--plugins/jetpack/class.jetpack-debugger.php70
-rw-r--r--plugins/jetpack/class.jetpack-heartbeat.php8
-rw-r--r--plugins/jetpack/class.jetpack-ixr-client.php16
-rw-r--r--plugins/jetpack/class.jetpack-jitm.php426
-rw-r--r--plugins/jetpack/class.jetpack-modules-list-table.php65
-rw-r--r--plugins/jetpack/class.jetpack-network-sites-list-table.php25
-rw-r--r--plugins/jetpack/class.jetpack-network.php482
-rw-r--r--plugins/jetpack/class.jetpack-options.php26
-rw-r--r--plugins/jetpack/class.jetpack-post-images.php102
-rw-r--r--plugins/jetpack/class.jetpack-signature.php6
-rw-r--r--plugins/jetpack/class.jetpack-sync.php113
-rw-r--r--plugins/jetpack/class.jetpack-tracks.php72
-rw-r--r--plugins/jetpack/class.jetpack-twitter-cards.php48
-rw-r--r--plugins/jetpack/class.jetpack-user-agent.php86
-rw-r--r--plugins/jetpack/class.jetpack-xmlrpc-server.php45
-rw-r--r--plugins/jetpack/class.jetpack.php2327
-rw-r--r--plugins/jetpack/class.json-api-endpoints.php539
-rw-r--r--plugins/jetpack/class.json-api.php88
-rw-r--r--plugins/jetpack/class.media-extractor.php2
-rw-r--r--plugins/jetpack/class.media-summary.php9
-rw-r--r--plugins/jetpack/class.photon.php264
-rw-r--r--plugins/jetpack/css/jetpack-admin-jitm-rtl.css150
-rw-r--r--plugins/jetpack/css/jetpack-admin-jitm-rtl.min.css3
-rw-r--r--plugins/jetpack/css/jetpack-admin-jitm.css147
-rw-r--r--plugins/jetpack/css/jetpack-admin-jitm.css.map1
-rw-r--r--plugins/jetpack/css/jetpack-admin-jitm.min.css3
-rw-r--r--plugins/jetpack/css/jetpack-admin-jitm.min.css.map1
-rw-r--r--plugins/jetpack/css/jetpack-admin-rtl.css781
-rw-r--r--plugins/jetpack/css/jetpack-admin-rtl.min.css2
-rw-r--r--plugins/jetpack/css/jetpack-admin.css779
-rw-r--r--plugins/jetpack/css/jetpack-admin.css.map2
-rw-r--r--plugins/jetpack/css/jetpack-admin.min.css2
-rw-r--r--plugins/jetpack/css/jetpack-admin.min.css.map2
-rw-r--r--plugins/jetpack/css/jetpack-banners-rtl.css147
-rw-r--r--plugins/jetpack/css/jetpack-banners-rtl.min.css2
-rw-r--r--plugins/jetpack/css/jetpack-banners.css145
-rw-r--r--plugins/jetpack/css/jetpack-banners.css.map2
-rw-r--r--plugins/jetpack/css/jetpack-banners.min.css2
-rw-r--r--plugins/jetpack/css/jetpack-banners.min.css.map2
-rw-r--r--plugins/jetpack/css/jetpack-rtl.css2
-rw-r--r--plugins/jetpack/css/jetpack.css2
-rw-r--r--plugins/jetpack/functions.compat.php5
-rw-r--r--plugins/jetpack/functions.gallery.php32
-rw-r--r--plugins/jetpack/functions.opengraph.php201
-rw-r--r--plugins/jetpack/functions.photon.php74
-rw-r--r--plugins/jetpack/images/custom-css.jpgbin10203 -> 9525 bytes
-rw-r--r--plugins/jetpack/images/custom-css@2x.jpgbin26272 -> 23050 bytes
-rw-r--r--plugins/jetpack/images/jetpack-icon.jpgbin0 -> 9872 bytes
-rw-r--r--plugins/jetpack/images/jetpack-logo.pngbin1058 -> 706 bytes
-rw-r--r--plugins/jetpack/images/rss/blue-large.pngbin1776 -> 1743 bytes
-rw-r--r--plugins/jetpack/images/rss/blue-medium.pngbin1195 -> 1175 bytes
-rw-r--r--plugins/jetpack/images/rss/green-large.pngbin1644 -> 1603 bytes
-rw-r--r--plugins/jetpack/images/rss/green-medium.pngbin1036 -> 1018 bytes
-rw-r--r--plugins/jetpack/images/rss/green-small.pngbin528 -> 523 bytes
-rw-r--r--plugins/jetpack/images/rss/orange-large.pngbin2545 -> 2495 bytes
-rw-r--r--plugins/jetpack/images/rss/orange-medium.pngbin1697 -> 1582 bytes
-rw-r--r--plugins/jetpack/images/rss/orange-small.pngbin672 -> 652 bytes
-rw-r--r--plugins/jetpack/images/rss/pink-large.pngbin3617 -> 3458 bytes
-rw-r--r--plugins/jetpack/images/rss/pink-medium.pngbin1553 -> 1509 bytes
-rw-r--r--plugins/jetpack/images/rss/pink-small.pngbin644 -> 630 bytes
-rw-r--r--plugins/jetpack/images/rss/purple-large.pngbin3755 -> 3615 bytes
-rw-r--r--plugins/jetpack/images/rss/purple-medium.pngbin1702 -> 1655 bytes
-rw-r--r--plugins/jetpack/images/rss/purple-small.pngbin651 -> 630 bytes
-rw-r--r--plugins/jetpack/images/rss/red-large.pngbin3595 -> 3388 bytes
-rw-r--r--plugins/jetpack/images/rss/red-medium.pngbin1558 -> 1536 bytes
-rw-r--r--plugins/jetpack/images/rss/red-small.pngbin609 -> 595 bytes
-rw-r--r--plugins/jetpack/images/rss/silver-large.pngbin2120 -> 1946 bytes
-rw-r--r--plugins/jetpack/images/rss/silver-medium.pngbin853 -> 811 bytes
-rw-r--r--plugins/jetpack/images/rss/silver-small.pngbin336 -> 331 bytes
-rw-r--r--plugins/jetpack/images/screenshots/beautifulmath.jpgbin0 -> 17159 bytes
-rw-r--r--plugins/jetpack/images/screenshots/beautifulmath.pngbin37171 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/carousel.jpgbin0 -> 42162 bytes
-rw-r--r--plugins/jetpack/images/screenshots/carousel.pngbin293351 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/comments.jpgbin0 -> 16219 bytes
-rw-r--r--plugins/jetpack/images/screenshots/comments.pngbin29695 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/contactform.jpgbin0 -> 25029 bytes
-rw-r--r--plugins/jetpack/images/screenshots/contactform.pngbin30026 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/custom-content-types.jpgbin0 -> 22052 bytes
-rw-r--r--plugins/jetpack/images/screenshots/custom-content-types.pngbin44387 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/custom-css.jpgbin0 -> 25432 bytes
-rw-r--r--plugins/jetpack/images/screenshots/custom-css.pngbin23291 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/google-plus.jpgbin0 -> 7103 bytes
-rw-r--r--plugins/jetpack/images/screenshots/google-plus.pngbin9805 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/hovercards.jpgbin0 -> 25367 bytes
-rw-r--r--plugins/jetpack/images/screenshots/hovercards.pngbin98590 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/likes.jpgbin0 -> 15437 bytes
-rw-r--r--plugins/jetpack/images/screenshots/likes.pngbin38360 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/manage-sm.pngbin18319 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/manage.jpgbin0 -> 23865 bytes
-rw-r--r--plugins/jetpack/images/screenshots/manage.pngbin53226 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/mobile-push-notifications.jpgbin28097 -> 28093 bytes
-rw-r--r--plugins/jetpack/images/screenshots/mobile-theme.jpgbin0 -> 22313 bytes
-rw-r--r--plugins/jetpack/images/screenshots/mobile-theme.pngbin36665 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/notes.jpgbin0 -> 20665 bytes
-rw-r--r--plugins/jetpack/images/screenshots/notes.pngbin21825 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/post-by-email.jpgbin0 -> 19119 bytes
-rw-r--r--plugins/jetpack/images/screenshots/post-by-email.pngbin23968 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/publicize.jpgbin0 -> 15343 bytes
-rw-r--r--plugins/jetpack/images/screenshots/publicize.pngbin68018 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/related-posts.jpgbin0 -> 11382 bytes
-rw-r--r--plugins/jetpack/images/screenshots/related-posts.pngbin41760 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/sharing.jpgbin0 -> 15781 bytes
-rw-r--r--plugins/jetpack/images/screenshots/sharing.pngbin34165 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/shortcodes.jpgbin0 -> 28818 bytes
-rw-r--r--plugins/jetpack/images/screenshots/shortcodes.pngbin32383 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/shortlinks.jpgbin0 -> 21286 bytes
-rw-r--r--plugins/jetpack/images/screenshots/shortlinks.pngbin49341 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/site-icon.pngbin37215 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/spelling.jpgbin0 -> 19051 bytes
-rw-r--r--plugins/jetpack/images/screenshots/spelling.pngbin52755 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/stats.jpgbin0 -> 18641 bytes
-rw-r--r--plugins/jetpack/images/screenshots/stats.pngbin68102 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/subscriptions.jpgbin0 -> 22165 bytes
-rw-r--r--plugins/jetpack/images/screenshots/subscriptions.pngbin41785 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/tiled-gallery.jpgbin0 -> 31306 bytes
-rw-r--r--plugins/jetpack/images/screenshots/tiled-gallery.pngbin175467 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/vaultpress.jpgbin0 -> 21181 bytes
-rw-r--r--plugins/jetpack/images/screenshots/vaultpress.pngbin35503 -> 0 bytes
-rw-r--r--plugins/jetpack/images/screenshots/widgets.jpgbin0 -> 23939 bytes
-rw-r--r--plugins/jetpack/images/screenshots/widgets.pngbin103682 -> 0 bytes
-rw-r--r--plugins/jetpack/images/the-footcloud.svg8
-rw-r--r--plugins/jetpack/images/wordpress-connect.jpgbin5956 -> 5524 bytes
-rw-r--r--plugins/jetpack/images/wordpress-connect@2x.jpgbin14451 -> 12401 bytes
-rw-r--r--plugins/jetpack/images/wordpress-stats.jpgbin12088 -> 11658 bytes
-rw-r--r--plugins/jetpack/images/wordpress-stats@2x.jpgbin25681 -> 24786 bytes
-rw-r--r--plugins/jetpack/images/wpspin_light-2x.gifbin10411 -> 0 bytes
-rw-r--r--plugins/jetpack/jetpack.php10
-rw-r--r--plugins/jetpack/json-api-config.php1
-rw-r--r--plugins/jetpack/json-endpoints.php2515
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php68
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-comment-endpoint.php4
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-autosave-v1-1-endpoint.php46
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-comment-endpoint.php1
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-customcss.php34
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-media-v1-1-endpoint.php4
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-counts-v1-1-endpoint.php107
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-endpoint.php1
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-v1-1-endpoint.php1
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php134
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php1
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-comments-endpoint.php11
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-embeds-endpoint.php8
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-invites-endpoint.php124
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php14
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-endpoint.php5
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php42
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-roles-endpoint.php64
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-shortcodes-endpoint.php4
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-users-endpoint.php29
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-menus-v1-1-endpoint.php3
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-post-endpoint.php26
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php43
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-publicize-endpoint.php23
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php63
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-site-user-endpoint.php107
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-taxonomy-endpoint.php4
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-comment-endpoint.php18
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-customcss.php50
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-invites-endpoint.php141
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-media-v1-1-endpoint.php12
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-endpoint.php132
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php116
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php116
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-taxonomy-endpoint.php17
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-update-user-endpoint.php101
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php16
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-maybe-auto-update-endpoint.php32
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-modules-endpoint.php7
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-endpoint.php2
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-install-endpoint.php155
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php12
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php1
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-themes-endpoint.php12
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php39
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-update-option-endpoint.php31
-rw-r--r--plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php93
-rw-r--r--plugins/jetpack/languages/jetpack-af.mobin11152 -> 11262 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ar.mobin243407 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-az.mobin192930 -> 200045 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-bg_BG.mobin20081 -> 21156 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-bs_BA.mobin71898 -> 71909 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ca.mobin79651 -> 80071 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ckb.mobin91963 -> 91348 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-cs_CZ.mobin47202 -> 46928 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-cy.mobin17699 -> 20883 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-da_DK.mobin50817 -> 57726 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-de_DE.mobin212453 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-el.mobin231030 -> 251264 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-es_CL.mobin0 -> 717 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-es_ES.mobin208445 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-fa_IR.mobin150553 -> 185029 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-fi.mobin39939 -> 43192 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-fr_FR.mobin213518 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-gd.mobin0 -> 48759 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-gl_ES.mobin38869 -> 39180 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-he_IL.mobin226278 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-hr.mobin38656 -> 38814 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-hu_HU.mobin176055 -> 174752 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-id_ID.mobin202361 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-is_IS.mobin0 -> 21640 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-it_IT.mobin207351 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ja.mobin223739 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ka_GE.mobin1031 -> 1774 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ko_KR.mobin210885 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-lt_LT.mobin17297 -> 19361 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-lv.mobin0 -> 806 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-mk_MK.mobin25106 -> 25205 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ms_MY.mobin24467 -> 24416 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-my_MM.mobin17386 -> 18713 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-nb_NO.mobin182016 -> 182475 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-nl_NL.mobin200739 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-nn_NO.mobin24985 -> 25313 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-pl_PL.mobin40760 -> 43924 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-pt_BR.mobin204415 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-pt_PT.mobin79626 -> 87285 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ro_RO.mobin81733 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ru_RU.mobin269288 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-sa_IN.mobin887 -> 1075 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-si_LK.mobin57057 -> 56106 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-sk_SK.mobin17903 -> 18116 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-sl_SI.mobin9505 -> 9766 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-sq.mobin202110 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-sr_RS.mobin54536 -> 54232 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-sv_SE.mobin52964 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-te.mobin21783 -> 22370 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-th.mobin30284 -> 29992 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-tr_TR.mobin209580 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-uk.mobin12489 -> 56465 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-ur.mobin4434 -> 4576 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-vi.mobin22062 -> 22558 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-zh_CN.mobin191136 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/jetpack-zh_TW.mobin191481 -> 0 bytes
-rw-r--r--plugins/jetpack/languages/readme.txt8
-rw-r--r--plugins/jetpack/locales.php332
-rw-r--r--plugins/jetpack/modules/after-the-deadline.php8
-rw-r--r--plugins/jetpack/modules/after-the-deadline/atd-nonvis-editor-plugin.js20
-rw-r--r--plugins/jetpack/modules/after-the-deadline/atd.core.js83
-rw-r--r--plugins/jetpack/modules/after-the-deadline/proxy.php8
-rw-r--r--plugins/jetpack/modules/carousel.php3
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel.css15
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel.js124
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel.php137
-rw-r--r--plugins/jetpack/modules/carousel/rtl/jetpack-carousel-rtl.css45
-rw-r--r--plugins/jetpack/modules/comments.php3
-rw-r--r--plugins/jetpack/modules/comments/admin.php10
-rw-r--r--plugins/jetpack/modules/comments/base.php8
-rw-r--r--plugins/jetpack/modules/comments/comments.php44
-rw-r--r--plugins/jetpack/modules/contact-form.php3
-rw-r--r--plugins/jetpack/modules/contact-form/admin.php162
-rw-r--r--plugins/jetpack/modules/contact-form/css/grunion.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/menu-alter-rtl.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/menu-alter-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/menu-alter.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/menu-alter.min.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/rtl/grunion-rtl.css4
-rw-r--r--plugins/jetpack/modules/contact-form/css/rtl/menu-alter-rtl.css53
-rw-r--r--plugins/jetpack/modules/contact-form/grunion-contact-form.php697
-rw-r--r--plugins/jetpack/modules/contact-form/grunion-form-view.php19
-rw-r--r--plugins/jetpack/modules/contact-form/grunion-omnisearch.php3
-rw-r--r--plugins/jetpack/modules/contact-form/js/grunion.js63
-rw-r--r--plugins/jetpack/modules/contact-form/readme.txt132
-rw-r--r--plugins/jetpack/modules/custom-content-types.php1
-rw-r--r--plugins/jetpack/modules/custom-css.php3
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php52
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php6
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/data.inc.php9
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css.php441
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/blank.css1
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php205
-rw-r--r--plugins/jetpack/modules/custom-post-types/comics.php38
-rw-r--r--plugins/jetpack/modules/custom-post-types/css/nova-font.css5
-rw-r--r--plugins/jetpack/modules/custom-post-types/css/testimonial-shortcode.css1
-rw-r--r--plugins/jetpack/modules/custom-post-types/nova.php153
-rw-r--r--plugins/jetpack/modules/custom-post-types/portfolios.php134
-rw-r--r--plugins/jetpack/modules/custom-post-types/testimonial.php307
-rw-r--r--plugins/jetpack/modules/enhanced-distribution.php4
-rw-r--r--plugins/jetpack/modules/gravatar-hovercards.php12
-rw-r--r--plugins/jetpack/modules/holiday-snow.php60
-rw-r--r--plugins/jetpack/modules/infinite-scroll.php29
-rw-r--r--plugins/jetpack/modules/infinite-scroll/infinity.js4
-rw-r--r--plugins/jetpack/modules/infinite-scroll/infinity.php277
-rw-r--r--plugins/jetpack/modules/infinite-scroll/themes/twentysixteen-rtl.css161
-rw-r--r--plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.css161
-rw-r--r--plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php41
-rw-r--r--plugins/jetpack/modules/json-api.php1
-rw-r--r--plugins/jetpack/modules/latex.php2
-rw-r--r--plugins/jetpack/modules/likes.php315
-rw-r--r--plugins/jetpack/modules/manage.php38
-rw-r--r--plugins/jetpack/modules/manage/activate-admin.php95
-rw-r--r--plugins/jetpack/modules/manage/confirm-admin.php107
-rw-r--r--plugins/jetpack/modules/markdown.php3
-rw-r--r--plugins/jetpack/modules/markdown/easy-markdown.php43
-rw-r--r--plugins/jetpack/modules/minileven.php1
-rw-r--r--plugins/jetpack/modules/minileven/minileven.php59
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php5
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php15
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/functions.php22
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/header.php4
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/image.php10
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/page.php5
-rw-r--r--plugins/jetpack/modules/module-extras.php11
-rw-r--r--plugins/jetpack/modules/module-headings.php59
-rw-r--r--plugins/jetpack/modules/module-info.php748
-rw-r--r--plugins/jetpack/modules/monitor.php8
-rw-r--r--plugins/jetpack/modules/notes.php31
-rw-r--r--plugins/jetpack/modules/omnisearch.php1
-rw-r--r--plugins/jetpack/modules/omnisearch/omnisearch-comments.php4
-rw-r--r--plugins/jetpack/modules/omnisearch/omnisearch-core.php68
-rw-r--r--plugins/jetpack/modules/omnisearch/omnisearch-media.php8
-rw-r--r--plugins/jetpack/modules/omnisearch/omnisearch-plugins.php2
-rw-r--r--plugins/jetpack/modules/omnisearch/omnisearch-posts.php9
-rw-r--r--plugins/jetpack/modules/photon.php9
-rw-r--r--plugins/jetpack/modules/post-by-email.php11
-rw-r--r--plugins/jetpack/modules/protect.php380
-rw-r--r--plugins/jetpack/modules/protect/config-ui.php25
-rw-r--r--plugins/jetpack/modules/protect/math-fallback.php24
-rw-r--r--plugins/jetpack/modules/protect/shared-functions.php230
-rw-r--r--plugins/jetpack/modules/protect/transient-cleanup.php18
-rw-r--r--plugins/jetpack/modules/publicize.php12
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize-rtl.css15
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize.css15
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize.min.css2
-rw-r--r--plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css15
-rw-r--r--plugins/jetpack/modules/publicize/publicize-jetpack.php13
-rw-r--r--plugins/jetpack/modules/publicize/publicize.php118
-rw-r--r--plugins/jetpack/modules/publicize/ui.php236
-rw-r--r--plugins/jetpack/modules/related-posts.php7
-rw-r--r--plugins/jetpack/modules/related-posts/jetpack-related-posts.php207
-rw-r--r--plugins/jetpack/modules/related-posts/related-posts.css76
-rw-r--r--plugins/jetpack/modules/related-posts/related-posts.js15
-rw-r--r--plugins/jetpack/modules/sharedaddy.php5
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css30
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing.css30
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing.min.css2
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-skype.pngbin0 -> 2995 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.pngbin0 -> 6782 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-twitter.pngbin1427 -> 2945 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.pngbin2258 -> 2686 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/stumbleupon.pngbin638 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.pngbin1423 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/readme.txt129
-rw-r--r--plugins/jetpack/modules/sharedaddy/recaptcha.php179
-rw-r--r--plugins/jetpack/modules/sharedaddy/recaptchalib.php277
-rw-r--r--plugins/jetpack/modules/sharedaddy/screenshot-1.jpgbin48840 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/screenshot-2.jpgbin23781 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharedaddy.php50
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharedaddy.pot404
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing-service.php90
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing-sources.php660
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.css34
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.js151
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.php32
-rw-r--r--plugins/jetpack/modules/shortcodes.php3
-rw-r--r--plugins/jetpack/modules/shortcodes/audio.php64
-rw-r--r--plugins/jetpack/modules/shortcodes/bandcamp.php100
-rw-r--r--plugins/jetpack/modules/shortcodes/css/rtl/slideshow-shortcode-rtl.css52
-rw-r--r--plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.css54
-rw-r--r--plugins/jetpack/modules/shortcodes/dailymotion.php70
-rw-r--r--plugins/jetpack/modules/shortcodes/facebook.php39
-rw-r--r--plugins/jetpack/modules/shortcodes/gist.php31
-rw-r--r--plugins/jetpack/modules/shortcodes/instagram.php47
-rw-r--r--plugins/jetpack/modules/shortcodes/js/facebook.js29
-rw-r--r--plugins/jetpack/modules/shortcodes/js/gist.js28
-rw-r--r--plugins/jetpack/modules/shortcodes/js/instagram.js19
-rw-r--r--plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js49
-rw-r--r--plugins/jetpack/modules/shortcodes/medium.php15
-rw-r--r--plugins/jetpack/modules/shortcodes/mixcloud.php2
-rw-r--r--plugins/jetpack/modules/shortcodes/polldaddy.php370
-rw-r--r--plugins/jetpack/modules/shortcodes/recipe.php8
-rw-r--r--plugins/jetpack/modules/shortcodes/slideshare.php85
-rw-r--r--plugins/jetpack/modules/shortcodes/slideshow.php197
-rw-r--r--plugins/jetpack/modules/shortcodes/soundcloud.php29
-rw-r--r--plugins/jetpack/modules/shortcodes/twitchtv.php79
-rw-r--r--plugins/jetpack/modules/shortcodes/vimeo.php88
-rw-r--r--plugins/jetpack/modules/shortcodes/wufoo.php81
-rw-r--r--plugins/jetpack/modules/shortcodes/youtube.php47
-rw-r--r--plugins/jetpack/modules/shortlinks.php3
-rw-r--r--plugins/jetpack/modules/site-icon.php3
-rw-r--r--plugins/jetpack/modules/site-icon/jetpack-site-icon.php50
-rw-r--r--plugins/jetpack/modules/site-icon/site-icon-functions.php2
-rw-r--r--plugins/jetpack/modules/site-icon/upload-site-icon.php14
-rw-r--r--plugins/jetpack/modules/sitemaps.php26
-rw-r--r--plugins/jetpack/modules/sitemaps/sitemap-xsl.php147
-rw-r--r--plugins/jetpack/modules/sitemaps/sitemaps.php751
-rw-r--r--plugins/jetpack/modules/sso.php156
-rw-r--r--plugins/jetpack/modules/stats.php225
-rw-r--r--plugins/jetpack/modules/subscriptions.php332
-rw-r--r--plugins/jetpack/modules/theme-tools.php27
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentyfifteen-rtl.css18
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentyfifteen.css18
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentysixteen-rtl.css763
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentysixteen.css763
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentysixteen.php49
-rw-r--r--plugins/jetpack/modules/theme-tools/featured-content.php51
-rw-r--r--plugins/jetpack/modules/theme-tools/infinite-scroll.php3
-rw-r--r--plugins/jetpack/modules/theme-tools/random-redirect.php2
-rw-r--r--plugins/jetpack/modules/theme-tools/responsive-videos.php71
-rw-r--r--plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.css10
-rw-r--r--plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.js15
-rw-r--r--plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js2
-rw-r--r--plugins/jetpack/modules/theme-tools/site-logo.php25
-rw-r--r--plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php56
-rw-r--r--plugins/jetpack/modules/theme-tools/social-links.php12
-rw-r--r--plugins/jetpack/modules/theme-tools/social-menu.php67
-rw-r--r--plugins/jetpack/modules/theme-tools/social-menu/social-menu.css180
-rw-r--r--plugins/jetpack/modules/tiled-gallery.php1
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery.php42
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery/rtl/tiled-gallery-rtl.css4
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/carousel-image-args.php10
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/item.php8
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery-item.php10
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery.css2
-rw-r--r--plugins/jetpack/modules/vaultpress.php6
-rw-r--r--plugins/jetpack/modules/verification-tools.php3
-rw-r--r--plugins/jetpack/modules/verification-tools/blog-verification-tools.php93
-rw-r--r--plugins/jetpack/modules/videopress.php1
-rw-r--r--plugins/jetpack/modules/videopress/class.videopress-player.php137
-rw-r--r--plugins/jetpack/modules/videopress/class.videopress-video.php14
-rw-r--r--plugins/jetpack/modules/videopress/shortcode.php53
-rw-r--r--plugins/jetpack/modules/videopress/videopress.php7
-rw-r--r--plugins/jetpack/modules/widget-visibility.php1
-rw-r--r--plugins/jetpack/modules/widget-visibility/widget-conditions.php180
-rw-r--r--plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.css3
-rw-r--r--plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.css3
-rw-r--r--plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.js37
-rw-r--r--plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.min.css2
-rw-r--r--plugins/jetpack/modules/widgets.php3
-rw-r--r--plugins/jetpack/modules/widgets/contact-info.php1
-rw-r--r--plugins/jetpack/modules/widgets/contact-info/contact-info-map.js6
-rw-r--r--plugins/jetpack/modules/widgets/facebook-likebox.php179
-rw-r--r--plugins/jetpack/modules/widgets/facebook-likebox/style.css3
-rw-r--r--plugins/jetpack/modules/widgets/gallery.php33
-rw-r--r--plugins/jetpack/modules/widgets/gallery/js/admin.js7
-rw-r--r--plugins/jetpack/modules/widgets/goodreads.php12
-rw-r--r--plugins/jetpack/modules/widgets/google-plus/js/admin.js22
-rw-r--r--plugins/jetpack/modules/widgets/googleplus-badge.php310
-rw-r--r--plugins/jetpack/modules/widgets/gravatar-profile.php79
-rw-r--r--plugins/jetpack/modules/widgets/image-widget.php44
-rw-r--r--plugins/jetpack/modules/widgets/rsslinks-widget.php52
-rw-r--r--plugins/jetpack/modules/widgets/social-media-icons.php250
-rw-r--r--plugins/jetpack/modules/widgets/social-media-icons/style.css49
-rw-r--r--plugins/jetpack/modules/widgets/top-posts.php177
-rw-r--r--plugins/jetpack/modules/widgets/twitter-timeline.php14
-rw-r--r--plugins/jetpack/modules/widgets/wordpress-post-widget.php1093
-rw-r--r--plugins/jetpack/modules/wpgroho.js4
-rw-r--r--plugins/jetpack/readme.txt1677
-rw-r--r--plugins/jetpack/require-lib.php8
-rw-r--r--plugins/jetpack/scss/atoms/colors/_colors.scss11
-rw-r--r--plugins/jetpack/scss/atoms/icons/_jetpack.scss2
-rw-r--r--plugins/jetpack/scss/jetpack-admin-jitm.scss170
-rw-r--r--plugins/jetpack/scss/jetpack-admin.scss6
-rw-r--r--plugins/jetpack/scss/organisms/_banners.scss151
-rw-r--r--plugins/jetpack/scss/pages/_connection.scss160
-rw-r--r--plugins/jetpack/scss/pages/_manage.scss40
-rw-r--r--plugins/jetpack/scss/templates/_id-crisis.scss9
-rw-r--r--plugins/jetpack/scss/templates/_main.scss123
-rw-r--r--plugins/jetpack/scss/templates/_module-overhaul.scss279
-rw-r--r--plugins/jetpack/scss/templates/_nux-landing-2015.scss694
-rw-r--r--plugins/jetpack/scss/templates/_settings.scss64
-rw-r--r--plugins/jetpack/to-test.md287
-rw-r--r--plugins/jetpack/views/admin/admin-page.php293
-rw-r--r--plugins/jetpack/views/admin/landing-page-templates.php80
-rw-r--r--plugins/jetpack/views/admin/module-modal-template.php2
-rw-r--r--plugins/jetpack/views/admin/must-connect-main-blog.php8
-rw-r--r--plugins/jetpack/views/admin/my-jetpack-page.php173
-rw-r--r--plugins/jetpack/views/admin/network-admin-alert.php6
-rw-r--r--plugins/jetpack/views/admin/network-admin-header.php5
-rw-r--r--plugins/jetpack/views/admin/network-settings.php27
506 files changed, 28071 insertions, 9850 deletions
diff --git a/plugins/jetpack/3rd-party/3rd-party.php b/plugins/jetpack/3rd-party/3rd-party.php
index 2ff07816..7bc11bd8 100644
--- a/plugins/jetpack/3rd-party/3rd-party.php
+++ b/plugins/jetpack/3rd-party/3rd-party.php
@@ -5,6 +5,7 @@
* is architected
*/
-require_once( 'buddypress.php' );
-require_once( 'wpml.php' );
-require_once( 'bitly.php' ); \ No newline at end of file
+require_once( JETPACK__PLUGIN_DIR . '3rd-party/buddypress.php' );
+require_once( JETPACK__PLUGIN_DIR . '3rd-party/wpml.php' );
+require_once( JETPACK__PLUGIN_DIR . '3rd-party/bitly.php' );
+require_once( JETPACK__PLUGIN_DIR . '3rd-party/bbpress.php' ); \ No newline at end of file
diff --git a/plugins/jetpack/3rd-party/bbpress.php b/plugins/jetpack/3rd-party/bbpress.php
new file mode 100644
index 00000000..ae60d91d
--- /dev/null
+++ b/plugins/jetpack/3rd-party/bbpress.php
@@ -0,0 +1,28 @@
+<?php
+add_action( 'init', 'jetpack_bbpress_compat', 11 ); // Priority 11 needed to ensure sharing_display is loaded.
+
+/**
+ * Adds Jetpack + bbPress Compatibility filters.
+ *
+ * @author Brandon Kraft
+ * @since 3.7.1
+ */
+function jetpack_bbpress_compat() {
+ if ( function_exists( 'sharing_display' ) ) {
+ add_filter( 'bbp_get_topic_content', 'sharing_display', 19 );
+ add_action( 'bbp_template_after_single_forum', 'jetpack_sharing_bbpress' );
+ add_action( 'bbp_template_after_single_topic', 'jetpack_sharing_bbpress' );
+ }
+}
+
+/**
+ * Display Jetpack "Sharing" buttons on bbPress 2.x forums/ topics/ lead topics/ replies.
+ *
+ * Determination if the sharing buttons should display on the post type is handled within sharing_display().
+ *
+ * @author David Decker
+ * @since 3.7.0
+ */
+function jetpack_sharing_bbpress() {
+ sharing_display( null, true );
+} \ No newline at end of file
diff --git a/plugins/jetpack/3rd-party/bitly.php b/plugins/jetpack/3rd-party/bitly.php
index b8f3f63c..9d087b77 100644
--- a/plugins/jetpack/3rd-party/bitly.php
+++ b/plugins/jetpack/3rd-party/bitly.php
@@ -1,11 +1,11 @@
-<?php
+<?php
-/*
+/*
* Fixes issues with the Official Bitly for WordPress
* http://wordpress.org/plugins/bitly/
*/
if( class_exists( 'Bitly' ) ) {
-
+
if( isset( $GLOBALS['bitly'] ) ) {
remove_action( 'wp_head', array( $GLOBALS['bitly'], 'og_tags' ) );
add_action( 'wp_head', 'jetpack_bitly_og_tag', 100 );
@@ -14,8 +14,8 @@ if( class_exists( 'Bitly' ) ) {
}
/**
- * jetpack_bitly_og_tag
- *
+ * jetpack_bitly_og_tag
+ *
* @return null
*/
function jetpack_bitly_og_tag() {
@@ -23,7 +23,7 @@ function jetpack_bitly_og_tag() {
// Add the bitly part again back if we don't have any jetpack_og_tags added
$GLOBALS['bitly']->og_tags();
} elseif ( isset( $GLOBALS['posts'] ) && $GLOBALS['posts'][0]->ID > 0 ) {
- printf( "<meta property=\"bitly:url\" content=\"%s\" /> \n", esc_attr( $GLOBALS['bitly']->get_bitly_link_for_post_id( $GLOBALS['posts'][0]->ID ) ) );
- }
+ printf( "<meta property=\"bitly:url\" content=\"%s\" /> \n", esc_attr( $GLOBALS['bitly']->get_bitly_link_for_post_id( $GLOBALS['posts'][0]->ID ) ) );
+ }
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/_inc/footer.php b/plugins/jetpack/_inc/footer.php
index bfda9e7d..e04d187f 100644
--- a/plugins/jetpack/_inc/footer.php
+++ b/plugins/jetpack/_inc/footer.php
@@ -1,12 +1,4 @@
-<?php
-global $current_user;
-$is_active = Jetpack::is_active();
-$user_token = Jetpack_Data::get_access_token( $current_user->ID );
-$is_user_connected = $user_token && ! is_wp_error( $user_token );
-$is_master_user = $current_user->ID == Jetpack_Options::get_option( 'master_user' );
-?>
-
- </div><!-- .wrapper -->
+ </div><!-- .wrapper -->
<div class="footer">
<nav class="primary nav-horizontal">
@@ -24,17 +16,12 @@ $is_master_user = $current_user->ID == Jetpack_Options::get_option( 'master_u
<a href="http://jetpack.me">Jetpack <?php echo JETPACK__VERSION; ?></a>
<a href="http://wordpress.com/tos/"><?php esc_html_e( 'Terms', 'jetpack' ); ?></a>
<a href="http://automattic.com/privacy/"><?php esc_html_e( 'Privacy', 'jetpack' ); ?></a>
- <a href="<?php echo esc_url( Jetpack::admin_url( 'page=jetpack-debugger' ) ); ?>" title="<?php esc_attr_e( 'Test your site&#8217;s compatibility with Jetpack.', 'jetpack' ); ?>"><?php _e( 'Debug', 'jetpack' ); ?></a>
+ <?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?><a href="<?php echo esc_url( Jetpack::admin_url( 'page=jetpack-debugger' ) ); ?>" title="<?php esc_attr_e( 'Test your site&#8217;s compatibility with Jetpack.', 'jetpack' ); ?>"><?php _e( 'Debug', 'jetpack' ); ?><?php endif; ?></a>
<a href="http://jetpack.me/contact-support/" title="<?php esc_attr_e( 'Contact the Jetpack Happiness Squad.', 'jetpack' ); ?>"><?php _e( 'Support', 'jetpack' ); ?></a>
<a href="http://jetpack.me/survey/?rel=<?php echo JETPACK__VERSION; ?>" title="<?php esc_attr_e( 'Take a survey. Tell us how we&#8217;re doing.', 'jetpack' ); ?>"><?php _e( 'Give Us Feedback', 'jetpack' ); ?></a>
-
- <?php if ( $is_active && current_user_can( 'jetpack_disconnect' ) ) : ?>
- <a href="<?php echo wp_nonce_url( Jetpack::admin_url( 'action=disconnect' ), 'jetpack-disconnect' ); ?>" onclick="return confirm('<?php echo htmlspecialchars( __('Are you sure you want to disconnect from WordPress.com?', 'jetpack'), ENT_QUOTES ); ?>');"><?php esc_html_e( 'Disconnect from WordPress.com', 'jetpack' ); ?></a>
+ <?php if ( Jetpack::is_active() && current_user_can( 'jetpack_disconnect' ) ) : ?>
+ <a href="<?php echo esc_url( Jetpack::admin_url( 'page=my_jetpack#disconnect' ) ); ?>"><?php esc_html_e( 'Disconnect Jetpack', 'jetpack' ); ?></a>
<?php endif; ?>
- <?php if ( $is_active && $is_user_connected && ! $is_master_user ) : ?>
- <a href="<?php echo wp_nonce_url( Jetpack::admin_url( 'action=unlink' ), 'jetpack-unlink' ); ?>"><?php esc_html_e( 'Unlink your user account', 'jetpack' ); ?></a>
- <?php endif; ?>
-
</div>
</nav><!-- .secondary -->
</div><!-- .footer -->
diff --git a/plugins/jetpack/_inc/gallery-settings.js b/plugins/jetpack/_inc/gallery-settings.js
index fe88f568..7e7b29f2 100644
--- a/plugins/jetpack/_inc/gallery-settings.js
+++ b/plugins/jetpack/_inc/gallery-settings.js
@@ -20,7 +20,7 @@
$el.find( 'select[name=type]' ).on( 'change', function () {
var columnSetting = $el.find( 'select[name=columns]' ).closest( 'label.setting' );
- if ( 'default' === $( this ).val() ) {
+ if ( 'default' === $( this ).val() || 'thumbnails' === $( this ).val() ) {
columnSetting.show();
} else {
columnSetting.hide();
@@ -30,4 +30,4 @@
return this;
}
});
-})(jQuery); \ No newline at end of file
+})(jQuery);
diff --git a/plugins/jetpack/_inc/genericons/README.md b/plugins/jetpack/_inc/genericons/README.md
index 98c10947..4aa8cc0d 100644
--- a/plugins/jetpack/_inc/genericons/README.md
+++ b/plugins/jetpack/_inc/genericons/README.md
@@ -1,13 +1,13 @@
-## Genericons
+# Genericons
Genericons are vector icons embedded in a webfont designed to be clean and simple keeping with a generic aesthetic.
Use genericons for instant HiDPI, to change icon colors on the fly, or even with CSS effects such as drop-shadows or gradients!
-### Usage
+## Usage
-To use it, place the `font` folder in your stylesheet directory and enqueue the genericons.css file. Now you can create an icon like this:
+To use it, place the `genericons` folder in your stylesheet directory and enqueue the genericons.css file. Now you can create an icon like this:
```
.my-icon:before {
@@ -24,30 +24,124 @@ This will output a comment icon before every element with the class "my-icon". T
You can also use the bundled example.css if you'd rather insert the icons using HTML tags.
-### Notes
+## Building your own Genericons
-** Photoshop mockups **
+In the `source` directory, you'll find all Genericons source icons in SVG format. This will allow you to bake your own flavor of Genericons using a tool such as FontCustom (http://fontcustom.com) or Fontello (http://fontello.com). Perhaps you need more logos than are available in the base Genericons package? Just add those logos and bake your own expanded set. Maybe you need just a few of the icons Genericons provides, but would like to trim the fat? Remove the ones you won't need!
-The `Genericons.ttf` file found in the `font` directory can be placed in your system fonts folder and used Photoshop or other graphics apps if you like.
+
+### FontCustom instructions
+
+FontCustom is a powerful commandline tool which which bakes icon fonts from the SVG source files. It's the tool Genericons is built on, and it provides highly accurate and perfectly crisp icons, *provided all SVGs have the same pixel height*.
+
+It's not that hard to use, and once it's installed you'll never think of icon-fonts the same way again. Seriously, you should try it. Icon fonts for everyone!
+
+1. Install FontCustom. Follow the instructions on the website: http://fontcustom.com/
+2. In the `source` directory from the Genericons download, open the file called `fontcustom.yml` in a text editor. Customize the `font_name` and `css_selector`.
+3. Open a terminal. Browse to the `source` directory. Type `fontcustom compile`.
+
+You'll now receive a brand new subdirectory called `fontcustom-webfont`. Inside here you'll find your very own flavor of Genericons, with only the icons you want, including a handy example page that'll help you copy/paste the necessary glyphs or CSS values.
+
+*Please note*: In the source directory, there's a hidden file called `.fontcustom-manifest.json`. This file is auto-generated by the FontCustom tool, and holds codepoints (unicode addresses) for every glyph, so its address doesn't change when you add or remove icons. If you feel the need to "start fresh" with the unicode addresses, you should delete this file.
+
+
+### Fontello instructions
+
+Fontello is very easy to use. Just drop the SVG files of the icons you want onto their website and download the font. The downside is that Fontello seems to ignore the 16px pixelgrid, so you'll end up with fuzzy icons. Buyer beware.
+
+
+## Notes
+
+**Photoshop mockups**
+
+The `Genericons.ttf` file can be placed in your system fonts folder and used Photoshop or other graphics apps if you like.
If you're using Genericons in your Photoshop mockups, please remember to delete the old version of the font from Font Book, and grab the new one from the zip file. This also affects using it in your webdesigns: if you have an old version of the font installed locally, that's the font that'll be used in your website as well, so if you're missing icons, check for old versions of the font on your system.
-** Pixel grid **
+**Pixel grid**
Genericons has been designed for a 16x16px grid. That means it'll look sharp at font-size: 16px exactly. It'll also be crisp at multiples thereof, such as 32px or 64px. It'll look reasonably crisp at in-between font sizes such as 24px or 48px, but not quite as crisp as 16 or 32. Please don't set the font-size to 17px, though, that'll just look terrible blurry.
-** Antialiasing **
+**Antialiasing**
If you keep intact the `-webkit-font-smoothing: antialiased;` and `-moz-osx-font-smoothing: grayscale;` CSS properties. That'll make the icons look their best possible, in Firefox and WebKit based browsers.
-** Updates **
+**optimizeLegibility**
+
+Note: On Android browsers with version 4.2, 4.3, and probably later, Genericons will simply not show up if you're using the CSS property "text-rendering" set to "optimizeLegibility.
+
+**Updates**
We don't often update icons, but do very carefully when we get good feedback suggesting improvements. Please be mindful if you upgrade, and check that the updated icons behave as you intended.
+**Base64 encoding**
+
+By default, Genericons ships with a stylesheet that includes a base64 encoded version of the font. This is to sidestep issues with cross-origin requests for fonts, that happen when a stylesheet loads a font that's stored on a different domain or subdomain. This is very common when using caching plugins.
+
+Base64 encoding comes with a 25% filesize overhead compared to just loading the WOFF file directly. If you know that you won't be loading fonts across domains, or have the ability to edit your server config files to allow it, you can get slightly faster performance by loading Genericons without the base64 encoding. Simply edit `genericons.css` and edit the `@font-face` declaration to match this:
+
+```
+@font-face {
+ font-family: 'Genericons';
+ src: url('Genericons.woff') format('woff'),
+ url('Genericons.ttf') format('truetype'),
+ url('Genericons.svg#genericonsregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+```
+
+
+
+## Changelog
+
+**3.4.1**
+
+* IE8 support restored.
+
+**3.4**
+
+* Updated: Update Google Plus icon to new geometric version. This also *retires* the "alt" version, so *please be mindful if you choose to update, make sure you use the `f206` glyph, not the `f218` glyph, as it no longer exists!
+* New: Added helper rotation classes to the base CSS, thanks to geminorum. Apply `genericon-rotate-90` to rotate 90 degrees, -180, -270. Or `genericon-flip-horizontal` or -vertical.
+
+*Again, it is important if you choose to update to this version, make sure you're not using `genericon-googleplus-alt` or unicode character `f218`, as that has been retired! Use `genericon-googleplus` and glyph `f206` instead!*
+
+**3.3.1**
+
+Security Hardening: Remove Genericons example.html file. Please visit genericons.com instead.
+
+**3.3**
+
+The Open Source release.
+
+You can now build your own flavors of Genericons with all the SVGs provided.
+
+
+**3.2**
+
+A number of new icons and a couple of quick updates.
+
+* New: Activity
+* New: HTML anchor
+* New: Bug
+* New: Download
+* New: Handset
+* New: Microphone
+* New: Minus
+* New: Plus
+* New: Move
+* New: Rating stars, empty, half, full
+* New: Shuffle
+* New: video camera
+* New: Spotify
+* New: Twitch
+* Update: Fixed geometry in Edit icon
+* Update: Updated Foursquare icon
+* IE8 bugfix, slipstreamed into this.
-### Changelog
+Twitch and Spotify mark the last social icons that will be added to Genericons.
+Future social icons will have to happen in a separate font.
-** 3.1 **
+**3.1**
Genericons is now generated using a commandline tool called FontCustom. This makes it far easier to add new icons to the font, but the switch means the download zip now has a different layout, fonts have different filenames, there's now no .otf font included (but the .ttf should suffice), and the font now has slightly different metrics. I've taken great care to ensure this new version should work as a drop-in replacement, but please be mindful and test carefully if you choose to upgrade.
@@ -63,7 +157,7 @@ Genericons is now generated using a commandline tool called FontCustom. This mak
* New: Paintbrush.
* Updated: Show and Hide icons were updated for clarity.
-** 3.0.3 **
+**3.0.3**
Bunch of updates mostly.
@@ -73,7 +167,7 @@ Bunch of updates mostly.
* Nicer "Share" icon.
* Bigger default Linkedin icon.
-** 3.0.2 **
+**3.0.2**
A slew of new stuff and updates.
@@ -88,7 +182,7 @@ A slew of new stuff and updates.
* The "pin" icon has been updated for style and clarity.
* The Twitter icon has been scaled down to fit with the other social icons.
-** 3.0.1 **
+**3.0.1**
Mostly maintenance.
@@ -97,7 +191,7 @@ Mostly maintenance.
* Replaced tabs with spaces in the helper CSS.
* Changed the Genericons.com copy/paste tool to serve span's instead of div's for casual icon insertion. It's being converted to "inline-block" anyway.
-** 3.0 **
+**3.0**
Mainly maintenance and a few new icons.
@@ -107,18 +201,18 @@ Mainly maintenance and a few new icons.
* Genericons.com now has a mini release blog.
* The CSS has prettier formatting, props Konstantin Obenland.
-** 2.09 **
+**2.09**
Updated Facebook icon to new version. Updated Instagram logo to use new one-color version. Updated Google+ icon to use same radius as Instagram and Facebook. Added a bunch of new icons, cog, unapprove, cart, media player buttons, tablet, send to tablet.
-** 2.06 **
+**2.06**
Included Base64 encoded version. This is necessary for Genericons to work with CDNs in Firefox. Firefox blocks fonts linked from a different domain. A CDN (typically s.example.com) usually puts the font on a subdomain, and is hence blocked in Firefox.
-** 2.05 **
+**2.05**
Added a bunch of new icons, including upload to cloud, download to cloud, many more.
-** 2.0 **
+**2.0**
-Initial public release \ No newline at end of file
+Initial public release
diff --git a/plugins/jetpack/_inc/genericons/genericons/Genericons.eot b/plugins/jetpack/_inc/genericons/genericons/Genericons.eot
index b5f8647f..7322565a 100644
--- a/plugins/jetpack/_inc/genericons/genericons/Genericons.eot
+++ b/plugins/jetpack/_inc/genericons/genericons/Genericons.eot
Binary files differ
diff --git a/plugins/jetpack/_inc/genericons/genericons/Genericons.svg b/plugins/jetpack/_inc/genericons/genericons/Genericons.svg
index f8131107..47406858 100644
--- a/plugins/jetpack/_inc/genericons/genericons/Genericons.svg
+++ b/plugins/jetpack/_inc/genericons/genericons/Genericons.svg
@@ -1,30 +1,32 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
-2014-10-3: Created.
+2015-9-18: Created with FontForge (http://fontforge.org)
-->
-<svg xmlns="http://www.w3.org/2000/svg">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata>
-Created by FontForge 20120731 at Fri Oct 3 09:39:07 2014
- By Joen
-Created by Joen with FontForge 2.0 (http://fontforge.sf.net)
+Created by FontForge 20150618 at Fri Sep 18 10:24:13 2015
+ By Joen Asmussen
+Copyright (c) 2015, Joen Asmussen
</metadata>
<defs>
<font id="Genericons" horiz-adv-x="2048" >
<font-face
font-family="Genericons"
- font-weight="500"
+ font-weight="400"
font-stretch="normal"
units-per-em="2048"
- panose-1="2 0 6 9 0 0 0 0 0 0"
+ panose-1="2 0 5 3 0 0 0 0 0 0"
ascent="2048"
descent="0"
bbox="-0.0140489 0 2048.01 2048"
underline-thickness="102.4"
underline-position="-204.8"
- unicode-range="U+F100-F517"
+ unicode-range="U+0020-F517"
/>
<missing-glyph />
+ <glyph glyph-name="space" unicode=" " horiz-adv-x="200"
+ />
<glyph glyph-name="uniF413" unicode="&#xf413;"
d="M256 1280c565.504 0 1024 -458.496 1024 -1024h-256c0 423.552 -344.448 768 -768 768v256zM256 1792c848.256 0 1536 -687.744 1536 -1536h-256c0 705.792 -574.208 1280 -1280 1280v256zM448 640c106.112 0 192 -86.0156 192 -192s-85.8877 -192 -192 -192
s-192 86.0156 -192 192s85.8877 192 192 192z" />
@@ -55,13 +57,13 @@ d="M1664 1280h128l-256 -768h-768l256 768h128l86.2725 256h339.455zM1300.86 1280h2
<glyph glyph-name="uniF430" unicode="&#xf430;"
d="M1024 1453.31l86.6562 -86.6553l-342.656 -342.656h896v-128h-896l342.656 -342.656l-86.6562 -86.6553l-493.312 493.312z" />
<glyph glyph-name="uniF515" unicode="&#xf515;"
-d="M1024 1920c494.848 0 896 -401.152 896 -896s-401.152 -896 -896 -896s-896 401.152 -896 896s401.152 896 896 896zM1387.52 601.216c29.4404 0 55.6807 23.6807 55.8086 56.0645c0 33.1514 -13.0557 46.4639 -35.4561 59.5195
-c-150.4 90.1123 -325.12 135.168 -521.216 135.168c-114.433 0 -224.769 -14.4639 -335.36 -39.6797c-27.1357 -5.12012 -48.7676 -23.8076 -48.7676 -61.4404c0 -29.1836 22.6553 -56.3193 56.7041 -56.3193c11.0078 0 29.4395 5.75977 44.1592 8.83203
-c90.2402 18.6875 186.752 30.9756 282.624 30.9756c171.776 0 333.696 -41.3438 463.616 -119.808c13.5684 -8.32031 23.4238 -13.3125 37.8877 -13.3125zM1485.18 838.4c38.9121 0 69.7607 31.3594 69.8887 70.0156c0 31.8721 -11.0078 53.6318 -40.832 70.7842
-c-178.433 106.752 -405.376 165.12 -639.872 165.12c-149.76 0 -252.544 -21.248 -353.28 -48.8965c-37.248 -10.624 -55.6797 -36.7354 -55.6797 -74.8799c0 -38.7842 31.3594 -70.1436 69.8877 -70.1436c16.3838 0 26.1123 5.11914 43.5205 10.1113
-c81.1514 21.5039 179.071 37.376 292.479 37.376c221.185 0 423.168 -57.4717 568.96 -144c13.3125 -7.55176 25.6006 -15.4873 44.9277 -15.4873zM1596.29 1114.24c45.3115 0 84.6084 35.0713 84.3516 83.8398c0 42.752 -18.9434 66.0479 -46.208 81.4082
-c-202.111 118.912 -478.976 172.928 -742.016 172.928c-155.008 0 -297.472 -17.5361 -425.216 -55.168c-32.5117 -9.59961 -62.7197 -36.9922 -62.7197 -85.6318c0 -47.8721 36.7354 -85.6318 84.4795 -85.6318c16.5117 0 33.0244 6.39941 46.0801 9.72754
-c113.024 30.5918 236.416 43.0078 357.888 43.0078c243.328 0 495.104 -53.5039 657.28 -150.784c17.0244 -9.34375 27.7764 -13.6953 46.0801 -13.6953z" />
+d="M1024 1920c499.2 0 896 -396.8 896 -896s-396.8 -896 -896 -896s-896 396.8 -896 896s396.8 896 896 896zM1382.4 601.6c38.3994 0 64 25.6006 64 51.2002c0 38.4004 -12.8008 51.2002 -38.4004 64c-153.6 89.6006 -332.8 140.8 -524.8 140.8
+c-115.2 0 -217.601 -25.5996 -320 -51.1992c-25.6006 -12.8008 -51.2002 -25.6006 -51.2002 -64c0 -25.6006 12.7998 -51.2002 51.2002 -51.2002c0 0 25.5996 12.7998 38.3994 12.7998c89.6006 12.7998 192 25.5996 281.601 25.5996
+c166.399 0 332.8 -38.3994 460.8 -115.199c12.7998 -12.8008 25.5996 -12.8008 38.4004 -12.8008zM1484.8 832c38.4004 0 64 38.4004 64 76.7998c0 38.4004 -12.7998 64 -38.3994 76.7998c-179.2 102.4 -409.601 166.4 -640 166.4c-153.601 0 -256 -25.5996 -358.4 -51.2002
+c-38.4004 -12.7998 -51.2002 -38.3994 -51.2002 -76.7998s38.4004 -76.7998 76.7998 -89.5996c12.8008 0 25.6006 12.7998 38.4004 12.7998c76.7998 25.5996 179.2 38.3994 294.4 38.3994c217.6 0 422.399 -51.1992 563.199 -140.8
+c25.6006 0 25.6006 -12.7998 51.2002 -12.7998zM1600 1113.6c38.4004 0 76.7998 38.4004 76.7998 89.6006c0 38.3994 -25.5996 64 -51.2002 76.7998c-204.8 128 -473.6 179.2 -742.399 179.2c-153.601 0 -294.4 -12.7998 -422.4 -51.2002
+c-38.3994 -12.7998 -64 -38.4004 -64 -89.5996c0 -51.2002 38.4004 -89.6006 89.6006 -89.6006c25.5996 0 38.3994 12.7998 51.1992 12.7998c115.2 25.6006 230.4 38.4004 358.4 38.4004c243.2 0 486.4 -51.2002 652.8 -153.6
+c25.6006 -12.8008 38.4004 -12.8008 51.2002 -12.8008z" />
<glyph glyph-name="uniF448" unicode="&#xf448;"
d="M512 384v1280h384v-1280h-384zM1152 1664h384v-1280h-384v1280z" />
<glyph glyph-name="uniF453" unicode="&#xf453;"
@@ -163,12 +165,8 @@ d="M1024 1664l640 -512l-128 -128v-512h-1024v512l-128 128zM1152 576v448h-256v-448
<glyph glyph-name="uniF458" unicode="&#xf458;"
d="M1920 1024l-1024 -640v480l-768 -480v1280l768 -480v480z" />
<glyph glyph-name="uniF218" unicode="&#xf218;"
-d="M1792 1152h256v-128h-256v-256h-128v256h-256v128h256v256h128v-256zM1301.5 1920l-150.528 -84.7363h-145.792c54.0166 -44.6719 167.04 -138.624 167.04 -317.439c0 -173.952 -98.8154 -256.256 -197.504 -333.952
-c-30.5918 -30.4639 -65.9199 -63.4883 -65.9199 -115.2s35.3281 -79.8721 61.1846 -101.12l84.7354 -65.792c103.424 -86.9121 197.376 -166.912 197.376 -329.216c0 -221.184 -213.888 -444.544 -618.368 -444.544c-341.119 0 -505.728 162.304 -505.728 336.384
-c0 84.6084 42.3682 204.544 181.12 286.849c145.792 89.4717 343.424 101.119 449.152 108.159c-32.8965 42.3682 -70.5283 87.04 -70.5283 159.744c0 40.1924 11.7754 63.7441 23.5518 91.7764c-25.9844 -2.04785 -51.7119 -4.6084 -75.2637 -4.6084
-c-249.216 0 -390.4 185.856 -390.4 369.28c0 108.032 49.4082 227.968 150.528 315.008c134.144 110.592 294.016 129.408 420.864 129.408h484.479zM1094.53 480.768c0 119.809 -77.5684 183.425 -256.385 310.528c-18.8154 2.30371 -30.5918 2.30371 -54.0156 2.30371
-c-21.1201 0 -148.224 -4.60742 -246.912 -37.6318c-51.8398 -18.8154 -202.368 -75.1357 -202.368 -242.304c0 -166.784 162.305 -286.848 413.952 -286.848c225.792 0 345.729 108.159 345.729 253.951zM906.496 1238.02c54.0156 54.1445 58.752 129.408 58.624 171.648
-c0 169.344 -101.12 432.768 -296.192 432.768c-61.3115 0 -127.104 -30.5918 -164.735 -77.5674c-39.9365 -49.4082 -51.7119 -112.896 -51.7119 -174.08c0 -157.568 91.6475 -418.561 294.016 -418.561c58.752 0 122.368 28.2881 160 65.792z" />
+d="M729.6 1152h550.4s12.7998 -38.4004 12.7998 -89.5996c0 -332.801 -230.399 -563.2 -563.2 -563.2c-320 0 -588.8 268.8 -588.8 588.8s281.601 588.8 588.8 588.8c153.601 0 294.4 -51.2002 384 -153.6l-153.6 -153.601c-38.4004 25.6006 -102.4 76.8008 -230.4 76.8008
+c-204.8 0 -371.199 -166.4 -371.199 -371.2s166.399 -371.2 371.199 -371.2c230.4 0 320 166.4 332.801 243.2h-332.801v204.8zM1664 1152h128v-128h-128v-128h-128v128h-128v128h128v128h128v-128z" />
<glyph glyph-name="uniF513" unicode="&#xf513;"
d="M1920 1280l-555.136 -387.968l212.863 -636.032l-553.728 394.496l-553.728 -394.496l212.991 636.032l-555.264 387.968h685.312l210.688 640l210.688 -640h685.312zM1024 807.68l307.584 -219.136l-118.4 353.536l300.288 209.92h-371.456l-118.016 358.528v-702.849z
" />
@@ -398,12 +396,8 @@ c-48.2559 175.232 -96.5117 350.336 -144.64 525.568c-53.6318 190.976 -111.232 286
c117.888 100.991 206.464 154.111 265.472 159.487c139.521 13.3125 225.28 -81.2793 257.536 -283.392c34.8164 -218.24 58.8799 -353.92 72.4482 -407.04c40.1924 -180.992 84.4805 -271.36 132.736 -271.36c37.5039 0 93.8232 58.752 169.088 176.128
c75.0078 117.376 115.2 206.849 120.576 268.16c10.624 101.376 -29.4404 152.192 -120.576 152.192c-43.0078 0 -87.2959 -9.98438 -132.736 -29.1846c88.0645 285.952 256.512 424.704 504.704 416.769z" />
<glyph glyph-name="uniF206" unicode="&#xf206;"
-d="M571.904 570.112c-36.4805 0 -71.6807 -1.02441 -110.208 -1.02441c-127.36 0 -240.513 -32 -333.696 -83.3281v484.864c78.0801 -78.208 189.696 -126.208 329.984 -126.336c20.2236 0 39.6797 1.02344 58.8799 2.43164
-c-18.8164 -35.9678 -32.2559 -76.1602 -32.2559 -118.271c0 -70.9121 39.04 -111.36 87.2959 -158.336zM575.232 937.088c-163.584 4.86426 -319.104 155.008 -347.265 369.792c-28.2881 214.912 81.4082 379.264 244.992 374.4
-c163.584 -4.86426 303.488 -181.12 331.648 -396.032c28.2881 -214.784 -65.9199 -353.024 -229.376 -348.16zM965.504 217.856c4.99219 -21.248 7.80762 -43.1367 7.80762 -65.5361c0 -8.19238 -0.639648 -16.2559 -1.02344 -24.3203h-588.288
-c-115.328 0 -211.712 76.7998 -243.712 181.504c74.8799 110.72 228.224 189.824 401.408 187.904c56.832 -0.640625 109.823 -9.72852 157.952 -25.3438c132.352 -91.9043 238.976 -149.376 265.855 -254.208zM1920 1536h-256v256h-128v-256h-256v-128h256v-256h128v256
-h256v-1024.13c0 -141.312 -114.688 -256 -256 -256h-506.624c2.55957 16.7676 4.22363 33.5361 4.22363 50.3037c0 183.937 -39.6797 276.48 -235.647 423.424c-56.1924 42.2402 -178.688 128.769 -178.688 186.881c0 67.9678 19.4561 101.632 121.856 181.504
-c104.96 82.0479 179.328 190.208 179.328 324.352c0 146.176 -59.7764 278.912 -172.16 343.296h159.36l135.68 142.464h-606.977c-174.336 0 -332.159 -72.832 -436.352 -181.376v65.2803c0 141.312 114.688 256 256 256h1280c141.312 0 256 -114.688 256 -256v-128z" />
+d="M729.6 1152h550.4s12.7998 -38.4004 12.7998 -89.5996c0 -332.801 -230.399 -563.2 -563.2 -563.2c-320 0 -588.8 268.8 -588.8 588.8s281.601 588.8 588.8 588.8c153.601 0 294.4 -51.2002 384 -153.6l-153.6 -153.601c-38.4004 25.6006 -102.4 76.8008 -230.4 76.8008
+c-204.8 0 -371.199 -166.4 -371.199 -371.2s166.399 -371.2 371.199 -371.2c230.4 0 320 166.4 332.801 243.2h-332.801v204.8zM1664 1152h128v-128h-128v-128h-128v128h-128v128h128v128h128v-128z" />
<glyph glyph-name="uniF407" unicode="&#xf407;"
d="M1280 1536l256 -128v-128h-128h-128h-128h-128h-128h-128h-128h-128h-128v128l256 128c0 70.7842 57.3438 128 128 128h384c70.7842 0 128 -57.2158 128 -128zM1088 1408c35.3281 0 64 28.6719 64 64s-28.6719 64 -64 64h-256c-35.3281 0 -64 -28.6719 -64 -64
s28.6719 -64 64 -64h256zM1280 1216h128v-704c0 -70.7842 -57.2158 -128 -128 -128h-640c-70.6562 0 -128 57.2158 -128 128v704h128v-704h128v704h128v-704h128v704h128v-704h128v704z" />
diff --git a/plugins/jetpack/_inc/genericons/genericons/Genericons.ttf b/plugins/jetpack/_inc/genericons/genericons/Genericons.ttf
index 1f160ddb..01744385 100644
--- a/plugins/jetpack/_inc/genericons/genericons/Genericons.ttf
+++ b/plugins/jetpack/_inc/genericons/genericons/Genericons.ttf
Binary files differ
diff --git a/plugins/jetpack/_inc/genericons/genericons/Genericons.woff b/plugins/jetpack/_inc/genericons/genericons/Genericons.woff
index 973e0339..0e7212af 100644
--- a/plugins/jetpack/_inc/genericons/genericons/Genericons.woff
+++ b/plugins/jetpack/_inc/genericons/genericons/Genericons.woff
Binary files differ
diff --git a/plugins/jetpack/_inc/genericons/genericons/genericons.css b/plugins/jetpack/_inc/genericons/genericons/genericons.css
index f58f42e8..87cf754e 100644
--- a/plugins/jetpack/_inc/genericons/genericons/genericons.css
+++ b/plugins/jetpack/_inc/genericons/genericons/genericons.css
@@ -9,19 +9,21 @@
IE9 uses WOFF which is base64 encoded to allow cross-site embedding.
So unfortunately, IE9 will throw a console error, but it'll still work.
When the font is base64 encoded, cross-site embedding works in Firefox */
-
@font-face {
- font-family: 'Genericons';
- src: url('Genericons.eot');
+ font-family: "Genericons";
+ src: url("./Genericons.eot");
+ src: url("./Genericons.eot?") format("embedded-opentype");
+ font-weight: normal;
+ font-style: normal;
}
@font-face {
- font-family: 'Genericons';
- src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAADgYAA0AAAAAWDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAA3/AAAABoAAAAcbOWpBk9TLzIAAAGUAAAARQAAAGBVb3cYY21hcAAAAngAAACUAAABqq7WqvhjdnQgAAADDAAAAAQAAAAEAEQFEWdhc3AAADf0AAAACAAAAAj//wADZ2x5ZgAABEAAADAqAABJ0A3bTddoZWFkAAABMAAAACkAAAA2B8ZTM2hoZWEAAAFcAAAAGAAAACQQuQgFaG10eAAAAdwAAACZAAABNGKqU2Vsb2NhAAADEAAAAS4AAAEuB9f1Nm1heHAAAAF0AAAAIAAAACAA6AEZbmFtZQAANGwAAAFRAAAChXCWuFJwb3N0AAA1wAAAAjEAAAXmlxz2knjaY2BkYGAA4rplZ/Tj+W2+MnBz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zuc/Qid0Qid0Qid0Qid04n+nc0/YT9hP2E/YT9hP2E/YT9hP2E/YT9hP2E/YT9hP2E/YT9hPJL2kl/SyXtbLelkv62W9rJf1sl7WC73QC73QC73QC73QC73QK3pFr+gVvaJX9Ipe0St6Ra/Wq/VqvVqv1qv1ar1ar9ar9Rq9Rq/Ra/QavUav6XjFnRV3VtxZcWfFnRV3VtpD3zVmt9lj9pqrzNVmn7nG7O+kuyzusrjL4i6LuyzusrjLUjVvAQpVcTgAAAAAAAAB//8AAnjaY2BgYGQAgjO2i86D6AshzNIwGgBAmQUAAAA=) format('woff'),
- url('Genericons.ttf') format('truetype'),
- url('Genericons.svg#genericonsregular') format('svg');
- font-weight: normal;
- font-style: normal;
+ font-family: "Genericons";
+ src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAADakAA0AAAAAVqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAA2iAAAABoAAAAcdeu6KE9TLzIAAAGgAAAARQAAAGBkLHXFY21hcAAAAogAAACWAAABsqlys6FjdnQgAAADIAAAAAQAAAAEAEQFEWdhc3AAADaAAAAACAAAAAj//wADZ2x5ZgAABFQAAC7AAABIkKrsSc5oZWFkAAABMAAAAC8AAAA2C2BCV2hoZWEAAAFgAAAAHQAAACQQuAgGaG10eAAAAegAAACfAAABOFjwU3Jsb2NhAAADJAAAATAAAAEwy4vdrm1heHAAAAGAAAAAIAAAACAA6QEZbmFtZQAAMxQAAAE5AAACN1KGf59wb3N0AAA0UAAAAjAAAAXo9iKXv3jaY2BkYGAAYqUtWvLx/DZfGbg5GEDgkmLVWhj9/ycDAwcbWJyDgQlEAQABJgkgAHjaY2BkYOBgAIIdHAz/fwLZbAyMDKiAFQBE7gLWAAAAAAEAAACXAOgAEAAAAAAAAgAAAAEAAQAAAEAALgAAAAB42mNgYf/MOIGBlYGB1Zh1JgMDoxyEZr7OkMYkxMDAxMDKzAADjAIMCBCQ5prC0MCg8FWcA8TdwQFVg6REgYERAPvT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IFhdvn7NM9gxKGCZKzKGZyUHJGySAgSq7i5wrFfYdPdFXX+tRP9V61Wl2tt8//rdbh1vueV29eWl2tYXQxjOGMYCSjGM0YxvIB4xjPBCbyIZOYzBSm8hHTmM7HzGAms5jNJ8xhLp/yGfOYzwIWsojFLOFzlrKML/iS5aygTUUiExRqGrrpYSVf8TWrWM0a1tLLOvroZ4BBvmE9G9jIJjazha1sYzs72MkudvMte/iO79nLD/zIT/zML/zKb+xjPwc4yCEOc4SjHOM4v/MHJzjJKU5zhrOc4zwXuMglLnOFq/zJX1zjOje4yS1uc4e73ONv7vOAh/zDI/7lPx7zhKc84zkveDnqwsljg1W7bVZmMrMZZjFrszG7zZ63mfSSXtJLekkv6SW9pJf00pBX6VV6lV6lV+lVepVepVfpVXpJL+klvaSX9JJe6njZu7J3Ze/K3pW9K3tXbg9915id/wid0Amd0Amd0Amd0Il3TueesJ+wn7CfsJ+wn7CfsJ+wn7CfsJ+wn7CfsJ+wn7CfsJ+wn0h6SS/pZb2sl/WyXtbLelkv62W9rBd6oRd6oRd6oRd6oRd6oVf0il7RK3pFr+gVvaJX9IperVfr1Xq1Xq1X69V6tV6tV+s1eo1eo9foNXqNXtPxijsr7qy4s+LOijsr7qy0h75rzG6zx+w115l9Zr85YA520l0Wd1ncZXGXxV0Wd1ncZama1x+EcTsAAAAB//8AAnjaY2BgYGQAgosrjpwF0ZcUq9bCaABTzgdAAAA=") format("woff"),
+ url("./Genericons.ttf") format("truetype"),
+ url("./Genericons.svg#Genericons") format("svg");
+ font-weight: normal;
+ font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@@ -57,6 +59,54 @@
/**
+ * Helper classes
+ */
+
+.genericon-rotate-90 {
+ -webkit-transform: rotate(90deg);
+ -moz-transform: rotate(90deg);
+ -ms-transform: rotate(90deg);
+ -o-transform: rotate(90deg);
+ transform: rotate(90deg);
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
+}
+
+.genericon-rotate-180 {
+ -webkit-transform: rotate(180deg);
+ -moz-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ -o-transform: rotate(180deg);
+ transform: rotate(180deg);
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
+}
+
+.genericon-rotate-270 {
+ -webkit-transform: rotate(270deg);
+ -moz-transform: rotate(270deg);
+ -ms-transform: rotate(270deg);
+ -o-transform: rotate(270deg);
+ transform: rotate(270deg);
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+}
+
+.genericon-flip-horizontal {
+ -webkit-transform: scale(-1, 1);
+ -moz-transform: scale(-1, 1);
+ -ms-transform: scale(-1, 1);
+ -o-transform: scale(-1, 1);
+ transform: scale(-1, 1);
+}
+
+.genericon-flip-vertical {
+ -webkit-transform: scale(1, -1);
+ -moz-transform: scale(1, -1);
+ -ms-transform: scale(1, -1);
+ -o-transform: scale(1, -1);
+ transform: scale(1, -1);
+}
+
+
+/**
* Individual icons
*/
diff --git a/plugins/jetpack/_inc/genericons/genericons/rtl/genericons-rtl.css b/plugins/jetpack/_inc/genericons/genericons/rtl/genericons-rtl.css
index dbe23b22..fbf8fac5 100644
--- a/plugins/jetpack/_inc/genericons/genericons/rtl/genericons-rtl.css
+++ b/plugins/jetpack/_inc/genericons/genericons/rtl/genericons-rtl.css
@@ -1,4 +1,4 @@
-/* This file was automatically generated on Oct 03 2014 13:34:55 */
+/* This file was automatically generated on Sep 30 2015 12:24:15 */
/**
@@ -11,19 +11,21 @@
IE9 uses WOFF which is base64 encoded to allow cross-site embedding.
So unfortunately, IE9 will throw a console error, but it'll still work.
When the font is base64 encoded, cross-site embedding works in Firefox */
-
@font-face {
- font-family: 'Genericons';
- src: url('../Genericons.eot');
+ font-family: "Genericons";
+ src: url(".././Genericons.eot");
+ src: url(".././Genericons.eot?") format("embedded-opentype");
+ font-weight: normal;
+ font-style: normal;
}
@font-face {
- font-family: 'Genericons';
- src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAADgYAA0AA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VanW1Bp83rdbRd0Hr/ee/wbdddPEBwxjOCEbyIaMYzRjGMo6PGM8EPuYTPuUzPmcik5jMFKYyjenMYCazmM0c5jKP+SzgCxbyJYv4iq/5hm/5jsW0qUhkgkJNQzc9LOF7lrKM5axgJb2sYjV9rKGftaxjPRv4gY1sYjNb2Mo2fuQntrODneziZ3azh73s4xd+ZT8HOMghDvMbRzjKMY4zwAlOcorTnOEs5zjPBS5yictc4Xf+4CrXuM4N/uQvbnKLv7nNHe5yj/s84CGPeMwTnvKM57zgJa94zT/8O/LymYH+qt02KzOZ2QyzmLXZmN1mz2AmvaSX9JJe0kt6SS/pJb005FV6lV6lV+lVepVepVfpVXqVXtJLekkv6SW9pJc6Xvau7F3Zu7J3Ze/K3pXbQ981Zuc/Qid0Qid0Qid0Qid04n+nc0/YT9hP2E/YT9hP2E/YT9hP2E/YT9hP2E/YT9hP2E/YT9hPJL2kl/SyXtbLelkv62W9rJf1sl7WC73QC73QC73QC73QC73QK3pFr+gVvaJX9Ipe0St6Ra/Wq/VqvVqv1qv1ar1ar9ar9Rq9Rq/Ra/QavUav6XjFnRV3VtxZcWfFnRV3VtpD3zVmt9lj9pqrzNVmn7nG7O+kuyzusrjL4i6LuyzusrjLUjVvAQpVcTgAAAAAAAAB//8AAnjaY2BgYGQAgjO2i86D6AshzNIwGgBAmQUAAAA=) format('woff'),
- url('../Genericons.ttf') format('truetype'),
- url('../Genericons.svg#genericonsregular') format('svg');
- font-weight: normal;
- font-style: normal;
+ font-family: "Genericons";
+ src: url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAADakAA0AAAAAVqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAA2iAAAABoAAAAcdeu6KE9TLzIAAAGgAAAARQAAAGBkLHXFY21hcAAAAogAAACWAAABsqlys6FjdnQgAAADIAAAAAQAAAAEAEQFEWdhc3AAADaAAAAACAAAAAj//wADZ2x5ZgAABFQAAC7AAABIkKrsSc5oZWFkAAABMAAAAC8A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h75rzG6zx+w115l9Zr85YA520l0Wd1ncZXGXxV0Wd1ncZama1x+EcTsAAAAB//8AAnjaY2BgYGQAgosrjpwF0ZcUq9bCaABTzgdAAAA=") format("woff"),
+ url(".././Genericons.ttf") format("truetype"),
+ url(".././Genericons.svg#Genericons") format("svg");
+ font-weight: normal;
+ font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@@ -59,6 +61,54 @@
/**
+ * Helper classes
+ */
+
+.genericon-rotate-90 {
+ -webkit-transform: rotate(90deg);
+ -moz-transform: rotate(90deg);
+ -ms-transform: rotate(90deg);
+ -o-transform: rotate(90deg);
+ transform: rotate(90deg);
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
+}
+
+.genericon-rotate-180 {
+ -webkit-transform: rotate(180deg);
+ -moz-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ -o-transform: rotate(180deg);
+ transform: rotate(180deg);
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
+}
+
+.genericon-rotate-270 {
+ -webkit-transform: rotate(270deg);
+ -moz-transform: rotate(270deg);
+ -ms-transform: rotate(270deg);
+ -o-transform: rotate(270deg);
+ transform: rotate(270deg);
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+}
+
+.genericon-flip-horizontal {
+ -webkit-transform: scale(-1, 1);
+ -moz-transform: scale(-1, 1);
+ -ms-transform: scale(-1, 1);
+ -o-transform: scale(-1, 1);
+ transform: scale(-1, 1);
+}
+
+.genericon-flip-vertical {
+ -webkit-transform: scale(1, -1);
+ -moz-transform: scale(1, -1);
+ -ms-transform: scale(1, -1);
+ -o-transform: scale(1, -1);
+ transform: scale(1, -1);
+}
+
+
+/**
* Individual icons
*/
diff --git a/plugins/jetpack/_inc/header.php b/plugins/jetpack/_inc/header.php
index 0ec2c3f5..a15e3313 100644
--- a/plugins/jetpack/_inc/header.php
+++ b/plugins/jetpack/_inc/header.php
@@ -6,15 +6,19 @@
<ul class="main-nav">
<li class="jetpack-logo"><a href="<?php echo Jetpack::admin_url(); ?>" title="<?php esc_attr_e( 'Jetpack', 'jetpack' ); ?>" <?php if ( 'jetpack' == $current ) { echo 'class="current"'; } ?>><span><?php esc_html_e( 'Jetpack', 'jetpack' ); ?></span></a></li>
- <?php if ( ( Jetpack::is_active() || Jetpack::is_development_mode() )
- && current_user_can( 'jetpack_manage_modules' )
- ) : ?>
- <li class="jetpack-modules">
- <a href="<?php echo Jetpack::admin_url( 'page=jetpack_modules' ); ?>" class="jp-button--settings <?php if ( 'jetpack_modules' == $current ) { echo 'current'; } ?>"><?php esc_html_e( 'Settings', 'jetpack' ); ?></a>
- </li>
- <li class="jetpack-modules">
- <a href="http://jetpack.me/survey/?rel=<?php echo JETPACK__VERSION; ?>" class="jp-button--settings"><?php esc_html_e( 'Feedback', 'jetpack' ); ?></a>
- </li>
+ <?php if ( ( Jetpack::is_active() || Jetpack::is_development_mode() ) && current_user_can( 'jetpack_manage_modules' ) ) : ?>
+ <li class="jetpack-modules">
+ <a href="<?php echo Jetpack::admin_url( 'page=jetpack_modules' ); ?>" class="jp-button--settings <?php if ( 'jetpack_modules' == $current ) { echo 'current'; } ?>"><?php esc_html_e( 'Settings', 'jetpack' ); ?></a>
+ </li>
+ <li class="jetpack-modules">
+ <a href="http://jetpack.me/survey/?rel=<?php echo JETPACK__VERSION; ?>" class="jp-button--settings"><?php esc_html_e( 'Feedback', 'jetpack' ); ?></a>
+ </li>
+ <?php endif; // End if connected or dev mode and is admin ?>
+
+ <?php if ( Jetpack::is_active() && ! Jetpack::is_development_mode() ) : ?>
+ <li class="jetpack-modules">
+ <a href="<?php echo Jetpack::admin_url( 'page=my_jetpack' ); ?>" class="jp-button--settings <?php if ( 'my_jetpack' == $current ) { echo 'current'; } ?>"><?php esc_html_e( 'My Jetpack', 'jetpack' ); ?></a>
+ </li>
<?php endif; ?>
</ul>
diff --git a/plugins/jetpack/_inc/jetpack-jitm.js b/plugins/jetpack/_inc/jetpack-jitm.js
new file mode 100644
index 00000000..79b2f24a
--- /dev/null
+++ b/plugins/jetpack/_inc/jetpack-jitm.js
@@ -0,0 +1,129 @@
+/* global jitmL10n, jQuery */
+
+(function($, jitmL10n) {
+
+ ///////////////////////////////////////
+ // INIT
+ ///////////////////////////////////////
+
+ var data;
+
+ $(document).ready(function () {
+
+ data = {
+ 'action' : 'jitm_ajax',
+ 'jitmNonce' : jitmL10n.jitm_nonce,
+ 'photon' : jitmL10n.photon_msgs,
+ 'manage' : jitmL10n.manage_msgs,
+ 'stats' : jitmL10n.stats_msgs,
+ 'jitm_stats_url' : jitmL10n.jitm_stats_url,
+ 'enabledModules' : []
+ };
+
+ initEvents();
+
+ });
+
+ ///////////////////////////////////////
+ // FUNCTIONS
+ ///////////////////////////////////////
+
+ function initEvents() {
+
+ var module_slug, success_msg, fail_msg, hide_msg,
+ $body = $( 'body' );
+
+ // On dismiss of JITM admin notice
+ $body.on( 'click', '.jp-jitm .dismiss', function() {
+ var $self = $( this );
+
+ // hide the notice
+ $self.closest( '.jp-jitm' ).hide();
+
+ // ajax request to save dismiss and never show again
+ data.jitmActionToTake = 'dismiss';
+ module_slug = $self.data( 'module' );
+ data.jitmModule = module_slug;
+
+ $.post( jitmL10n.ajaxurl, data, function ( response ) {
+ if ( true === response.success ) {
+ //console.log('successfully dismissed for ever')
+ }
+ });
+ });
+
+ $body.on( 'click', '.jp-jitm .activate', function() {
+
+ var $self = $( this ),
+ $jitm = $self.closest( '.jp-jitm' );
+ $jitm.find( '.button' ).addClass( 'hide' );
+ $jitm.find( '.j-spinner' ).toggleClass( 'hide' );
+ data.jitmActionToTake = 'activate';
+
+ // get the module we're working with using the data-module attribute
+ module_slug = $self.data( 'module' );
+ // Check if there's a custom success message, otherwise use default.
+ success_msg = $self.data( 'module-success' ) ? $self.data( 'module-success' ) : data[module_slug].success;
+ fail_msg = data[module_slug].fail;
+
+ data.jitmModule = module_slug;
+
+ // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
+ $.post( jitmL10n.ajaxurl, data, function ( response ) {
+ // If there's no response, something bad happened
+ if ( true === response.success ) {
+ var $msg = $jitm.find( '.msg' );
+ $msg.html( success_msg );
+ $jitm.find( '.j-spinner' ).add( '#jetpack-wordpressdotcom' ).toggleClass( 'hide' );
+ if ( 'manage' !== data.jitmModule ) {
+ hide_msg = setTimeout( function () {
+ $jitm.hide( 'slow' );
+ }, 5000 );
+ }
+ $jitm.find( '.show-after-enable.hide' ).removeClass( 'hide' );
+ data.enabledModules.push( module_slug );
+ } else {
+ $jitm.html( '<p><span class="icon"></span>' + fail_msg + '</p>' );
+ }
+ });
+
+ });
+
+ $body.on( 'click', '.jp-jitm .launch', function() {
+ data.jitmActionToTake = 'launch';
+ module_slug = $(this).data( 'module' );
+ data.jitmModule = module_slug;
+ // ajax request to save click in stat
+ $.post( jitmL10n.ajaxurl, data );
+ } );
+
+ $body.on( 'click', '#jetpack-wordpressdotcom', function() {
+ //Log user heads to wordpress.com/plugins
+ new Image().src = data.jitm_stats_url;
+ });
+
+ // Display Photon JITM after user started uploading an image.
+ if ( $( '#tmpl-jitm-photon' ).length > 0 ) {
+ wp.Uploader.queue.on( 'add', function ( e ) {
+ if ( -1 === $.inArray( 'photon', data.enabledModules ) ) {
+ if ( 'image' === e.attributes.type ) {
+ var jitmTemplate = wp.template( 'jitm-photon' ),
+ $menu = wp.media.frame.$el.find( '.media-menu' ),
+ $jitm;
+ if ( $menu.length > 0 ) {
+ $jitm = $menu.append( jitmTemplate() ).find( '.jp-jitm' );
+
+ // JITM is visible to user, track it.
+ data.jitmActionToTake = 'viewed';
+ data.jitmModule = $jitm.data( 'track' );
+ $.post( jitmL10n.ajaxurl, data );
+ }
+ } else {
+ $( '.media-menu' ).find( '.jp-jitm' ).remove();
+ }
+ }
+ } );
+ }
+ }
+
+})(jQuery, jitmL10n); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/jetpack-modules.js b/plugins/jetpack/_inc/jetpack-modules.js
index 83cb4475..8ba288dc 100644
--- a/plugins/jetpack/_inc/jetpack-modules.js
+++ b/plugins/jetpack/_inc/jetpack-modules.js
@@ -1,5 +1,5 @@
-( function( window, $, items, models, views, i18n, nonces ) {
+( function( window, $, items, models, views, i18n, modalinfo, nonces ) {
'use strict';
var modules, list_table, handle_module_tag_click, $the_table, $the_filters, $the_search, $jp_frame, $bulk_button, show_modal, hide_modal, set_modal_tab, originPoint;
@@ -41,10 +41,7 @@
$( window ).on( 'keydown', function( e ) {
// If pressing ESC close the modal
if ( 27 === e.keyCode ) {
- $( '.shade, .modal' ).hide();
- $( '.manage-right' ).removeClass( 'show' );
- originPoint.focus();
- $( '.modal' )[0].removeAttribute( 'tabindex' );
+ hide_modal();
}
});
@@ -57,14 +54,26 @@
$( '.modal ').empty().html( wp.template( 'modal' )( items[ module ] ) );
$( '.modal' )[0].setAttribute( 'tabindex', '0' );
$( '.modal' ).focus();
+ $( 'body' ).css( 'overflow', 'hidden' );
};
+ /**
+ * If modalinfo is defined, auto popup the modal
+ */
+ $( document ).ready(function() {
+ if ( modalinfo ) {
+ show_modal( modalinfo );
+ }
+ });
+
hide_modal = function() {
$jp_frame.children( '.modal, .shade' ).hide();
$jp_frame.children( '.modal' ).data( 'current-module', '' );
set_modal_tab( null );
originPoint.focus();
$( '.modal' )[0].removeAttribute( 'tabindex' );
+ $( 'body' ).css( 'overflow', 'auto' );
+ event.preventDefault();
};
set_modal_tab = function( tab ) {
@@ -138,4 +147,4 @@
event.preventDefault();
} );
-} ) ( this, jQuery, window.jetpackModulesData.modules, this.jetpackModules.models, this.jetpackModules.views, window.jetpackModulesData.i18n, window.jetpackModulesData.nonces );
+} ) ( this, jQuery, window.jetpackModulesData.modules, this.jetpackModules.models, this.jetpackModules.views, window.jetpackModulesData.i18n, window.jetpackModulesData.modalinfo, window.jetpackModulesData.nonces );
diff --git a/plugins/jetpack/_inc/jetpack.js b/plugins/jetpack/_inc/jetpack.js
index 0279ee7d..fd3512de 100644
--- a/plugins/jetpack/_inc/jetpack.js
+++ b/plugins/jetpack/_inc/jetpack.js
@@ -63,7 +63,7 @@ jetpack = {
jQuery( '#jp-disconnect a' ).click( function() {
if ( confirm( jetpackL10n.ays_disconnect ) ) {
jQuery( this ).addClass( 'clicked' ).css( {
- 'background-image': 'url( ' + userSettings.url + 'wp-admin/images/wpspin_light.gif )',
+ 'background-image': 'url( ' + userSettings.url + 'wp-includes/images/spinner-2x.gif )',
'background-position': '9px 5px',
'background-size': '16px 16px'
} ).unbind( 'click' ).click( function() { return false; } );
@@ -74,7 +74,7 @@ jetpack = {
jQuery( '#jp-unlink a' ).click( function() {
if ( confirm( jetpackL10n.ays_unlink ) ) {
jQuery( this ).css( {
- 'background-image': 'url( ' + userSettings.url + 'wp-admin/images/wpspin_light.gif )',
+ 'background-image': 'url( ' + userSettings.url + 'wp-includes/images/spinner-2x.gif )',
'background-position': '9px 5px',
'background-size': '16px 16px'
} ).unbind( 'click' ).click( function() { return false; } );
diff --git a/plugins/jetpack/_inc/jp-my-jetpack.js b/plugins/jetpack/_inc/jp-my-jetpack.js
new file mode 100644
index 00000000..4eb093f5
--- /dev/null
+++ b/plugins/jetpack/_inc/jp-my-jetpack.js
@@ -0,0 +1,86 @@
+/* global jpConnection, jQuery */
+
+(function( $, jpConnection ) {
+
+ ///////////////////////////////////////
+ // INIT
+ ///////////////////////////////////////
+
+ var data = {
+ 'jetpackIsActive' : jpConnection.jetpackIsActive,
+ 'isAdmin' : jpConnection.isAdmin,
+ 'otherAdminsLinked' : jpConnection.otherAdminsLinked,
+ 'stats_urls' : jpConnection.my_jetpack_stats_urls,
+ 'masterUser' : jpConnection.masterUser,
+ 'masterUserLink' : jpConnection.masterUser.masterUserLink,
+ 'currentUser' : jpConnection.currentUser
+ };
+
+ $( document ).ready(function () {
+ renderPageTemplate( data );
+
+ // Set someone as master.
+ $( '#change-primary-btn' ).click( function() {
+ $( '#change-primary-btn' ).hide();
+ $( '#user-list' ).show();
+ $( '#save-primary-btn' ).show();
+
+ //Log My Jetpack event "change primary" in MC Stats
+ new Image().src = data.stats_urls.change_primary;
+ });
+
+ // Hide the success message after a little bit
+ setTimeout( function(){
+ jQuery( '.jetpack-message:not( .stay-visible, .jetpack-err )' ).hide( 600 );
+ }, 6000);
+
+ });
+
+ function renderPageTemplate( data ) {
+ $( '#my-jetpack-page-template' ).html( wp.template( 'connection-page' )( data ) );
+ // Save the focused element, then shift focus to the modal window.
+ confirmJetpackDisconnect();
+ }
+
+ /*
+ The function used to display the disconnect confirmation and support buttons
+ */
+ function confirmJetpackDisconnect() {
+ if ( window.location.hash.substr( '#disconnect' ) ) {
+ $( '#jetpack-disconnect-content' ).show();
+ $( '#my-jetpack-content, .my-jetpack-actions' ).hide();
+
+ //Log My Jetpack event "wants to disconnect Jetpack" in MC Stats
+ new Image().src = data.stats_urls.disconnect_site;
+ }
+
+ $( '#jetpack-disconnect' ).click( function() {
+ $( '#jetpack-disconnect-content' ).show();
+ $( '#my-jetpack-content, .my-jetpack-actions' ).hide();
+
+ //Log My Jetpack event "wants to disconnect Jetpack" in MC Stats
+ new Image().src = data.stats_urls.disconnect_site;
+ });
+
+ $( '#cancel-disconnect' ).click( function() {
+ event.preventDefault();
+
+ $( '#jetpack-disconnect-content' ).hide();
+ $( '#my-jetpack-content, .my-jetpack-actions' ).show();
+
+ //Log My Jetpack event "decided not to disconnect Jetpack" in MC Stats
+ new Image().src = data.stats_urls.cancel_disconnect;
+ });
+
+ $( '#jetpack-disconnect-content #support-no-disconnect' ).click( function() {
+ //Log My Jetpack event "get support instead of disconnecting site" in MC Stats
+ new Image().src = data.stats_urls.support_no_disconnect;
+ });
+
+ $( '#jetpack-disconnect-content #confirm-disconnect' ).click( function() {
+ //Log My Jetpack event "confirm the disconnecting of a the site" in MC Stats
+ new Image().src = data.stats_urls.confirm_disconnect;
+ });
+ }
+
+})( jQuery, jpConnection ); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/jp.js b/plugins/jetpack/_inc/jp.js
index afbc01c6..15faad11 100644
--- a/plugins/jetpack/_inc/jp.js
+++ b/plugins/jetpack/_inc/jp.js
@@ -12,20 +12,37 @@
$( document ).ready(function () {
data = {
- 'action' : 'jetpack_admin_ajax',
'jumpstartModules' : jetpackL10n.jumpstart_modules,
'jumpstartModSlug' : jetpackL10n.jumpstart_modules,
'jumpstartNonce' : jetpackL10n.activate_nonce,
'jumpstartStatsURLS' : jetpackL10n.jumpstart_stats_urls,
- 'showJumpstart' : jetpackL10n.show_jumpstart
+ 'nuxAdminStatsURLS' : jetpackL10n.admin_stats_urls,
+ 'showJumpstart' : jetpackL10n.show_jumpstart,
+ 'adminNonce' : jetpackL10n.admin_nonce
};
initEvents();
- loadModules( 'Recommended', 'mod-recommended', '.modules' );
+ loadModules( 'Performance-Security', 'mod-nux', '#nux-performance-security' );
+ loadModules( 'Traffic', 'mod-nux', '#nux-traffic' );
if('1' === data.showJumpstart) {
loadModules( 'Jumpstart', 'mod-jumpstart', '#jp-config-list' );
}
+
+ /*
+ We are listening to see if we need to refresh the data.
+ We'd need to refresh the data only if the page is navigated to
+ via the back or forward browser buttons. We do this so the
+ browser cache isn't out of sync with the real data generated by the
+ AJAX event.
+ */
+ onload = function() {
+ if ( window.location.hash.substr( '#refresh' ) ) {
+ refreshData();
+ }
+ };
+
jumpStartAJAX();
+ adminAJAX();
});
///////////////////////////////////////
@@ -39,6 +56,7 @@
$( '.manage-right' ).removeClass( 'show' );
originPoint.focus();
$( '.modal' )[0].removeAttribute( 'tabindex' );
+ $( 'body' ).css( 'overflow', 'auto' );
return false;
});
@@ -49,15 +67,21 @@
$( '.manage-right' ).removeClass( 'show' );
originPoint.focus();
$( '.modal' )[0].removeAttribute( 'tabindex' );
+ $( 'body' ).css( 'overflow', 'auto' );
}
});
}
function initEvents () {
+ // Only show module table if Jumpstart isn't there
+ if ( ! data.showJumpstart ) {
+ $( '.nux-intro' ).show();
+ }
// Show preconfigured list of features to enable via "Jump-start"
$( '.jp-config-list-btn' ).click(function(){
$( '#jp-config-list' ).toggle();
+ recalculateModuleHeights();
//Log Jump Start event "learn more" in MC Stats
new Image().src = data.jumpstartStatsURLS.learnmore;
@@ -65,7 +89,7 @@
// Hide the successful connection message after a little bit
setTimeout( function(){
- jQuery( '.jetpack-message:not(.stay-visible)' ).hide( 600 );
+ jQuery( '.jetpack-message:not( .stay-visible, .jetpack-err )' ).hide( 600 );
}, 6000);
// Modal events
@@ -84,11 +108,16 @@
}, 100 );
}
};
+
+ // This function will track the number of clicks on the "See the other X Jetpack features"
+ $( '.full-features-btn' ).click( function() {
+ new Image().src = data.nuxAdminStatsURLS.learnmore+'-full-features-btn';
+ });
}
function initModalEvents() {
var $modal = $( '.modal' );
- $( '.module h3, .feature a, .configs a, .more-info' ).on( 'click keypress', function (e) {
+ $( '.module h3, .feature a, .configs a, .more-info, .feat h4' ).on( 'click keypress', function (e) {
// Only show modal on enter when keypress recorded (accessibility)
if ( e.keyCode && 13 !== e.keyCode ) {
return;
@@ -111,6 +140,9 @@
$modal[0].setAttribute( 'tabindex', '0' );
$modal.focus();
+ // Disallow scroll
+ $( 'body' ).css( 'overflow', 'hidden' );
+
closeShadeToggle();
// Modal header links
@@ -165,9 +197,13 @@
}
- // Render modules
+ // Render modules. Don't show active in Jumpstart.
for ( i = 0; i < renderingmodules.length; i++ ) {
- html += wp.template( template )( renderingmodules[i] );
+ if ( 'Jumpstart' === prop && ! renderingmodules[i].activated ) {
+ html += wp.template( template )( renderingmodules[i] );
+ } else if ( 'Jumpstart' !== prop ) {
+ html += wp.template( template )( renderingmodules[i] );
+ }
}
$( location ).append( html );
@@ -200,8 +236,8 @@
}
});
- // Apply new height
- module.css( 'height', tallest + 'px' );
+ // Apply new height plus 20 pixels
+ module.css( 'height', ( parseInt( tallest, 10 ) + 5 ) + 'px' );
}
/*
@@ -219,14 +255,19 @@
$( '#jump-start-area' ).hide( 600 );
data.disableJumpStart = true;
+ data.action = 'jetpack_jumpstart_ajax';
$.post( jetpackL10n.ajaxurl, data, function (response) {
// If there's no response, something bad happened
if ( ! response ) {
//console.log( 'Option "jetpack_dismiss_jumpstart" not updated.' );
}
+
+ window.location.hash = 'refresh';
});
+ $( '.nux-intro' ).show();
+
// Log Jump Start event in MC Stats
new Image().src = data.jumpstartStatsURLS.dismiss;
@@ -235,12 +276,14 @@
// Activate all Jump-start modules
$( '#jump-start' ).click(function () {
+ var module, dataName, configURL, checkBox;
- var module, dataName, configURL;
-
- $( '.spinner' ).show();
+ $( '.jumpstart-spinner' ).show().css( 'display', 'block' );
+ $( '#jump-start' ).hide();
+ $( '.dismiss-jumpstart' ).hide();
data.jumpStartActivate = 'jump-start-activate';
+ data.action = 'jetpack_jumpstart_ajax';
$( '#jp-config-list' ).hide();
@@ -254,23 +297,25 @@
// Only target Jump Start modules
_.each( module, function( mod ) {
- dataName = $( 'div[data-name="' + mod.module_name + '"]' );
+ dataName = $( 'label[for="active-' + mod.module_slug + '"]' + '.plugin-action__label' );
configURL = mod.configure_url;
-
- // Replace inactive content with active, provide config url
- _.find( dataName, function( div ) {
- $( div.children ).find( '.notconfigurable ').hide();
- $( div.children ).find( '.configurable ' ).replaceWith( '<a class="button alignright" data-name="' + mod.module_name + '" title="Configure" href="' + configURL + '">Configure</a>' );
- div.className += ' active';
- });
+ checkBox = $( 'input[id="active-' + mod.module_slug + '"]' );
+
+ $( '#toggle-' + mod.module_slug ).addClass( 'activated' );
+ dataName.html( 'ACTIVE' );
+ $( checkBox ).prop( 'checked', true );
});
- $( '.spinner, .jstart, #jumpstart-cta' ).hide();
- $( '.jumpstart-message, .miguel' ).toggle();
+ $( '.jumpstart-spinner, .jstart, #jumpstart-cta, .manage-cta-inactive' ).hide();
+ $( '.jumpstart-message, .manage-cta-active' ).toggle();
+ $( '#jump-start-area' ).delay( 5000 ).hide( 600 );
// Log Jump Start event in MC Stats
new Image().src = data.jumpstartStatsURLS.jumpstarted;
+ $( '.nux-intro' ).show();
+
+ window.location.hash = 'refresh';
});
return false;
@@ -282,18 +327,107 @@
*/
$( '#jump-start-deactivate' ).click(function () {
- $( '.spinner' ).show();
+ $( '.jumpstart-spinner' ).show();
data.jumpStartDeactivate = 'jump-start-deactivate';
+ data.action = 'jetpack_jumpstart_ajax';
$.post( jetpackL10n.ajaxurl, data, function ( response ) {
//$('#jumpstart-cta').html(response);
$( '#deactivate-success' ).html( response );
- $( '.spinner' ).hide();
+ $( '.jumpstart-spinner' ).hide();
+ window.location.hash = '';
+
});
return false;
});
}
+ /*
+ Handles the module activation ajax actions
+ */
+ function adminAJAX() {
+ $( '.nux-in' ).on( 'keypress click', '.form-toggle', function( e ){
+ if ( e.which !== 13 && e.type !== 'click' ) {
+ return;
+ }
+ var thisElementId = e.target.id,
+ thisLabel = $( 'label[for="' + thisElementId + '"]' + '.plugin-action__label'),
+ index;
+
+ data.action = 'jetpack_admin_ajax';
+ data.thisModuleSlug = thisElementId.replace( 'active-', '' );
+ data.toggleModule = 'nux-toggle-module';
+
+ index = $( '#toggle-' + data.thisModuleSlug ).data( 'index' );
+
+ thisLabel.hide();
+ $( '.module-spinner-' + data.thisModuleSlug ).show();
+
+ $.post( jetpackL10n.ajaxurl, data, function ( response ) {
+ if ( 0 !== response ) {
+
+ // Log NUX Admin event in MC Stats
+ if( true === response.activated ){
+ new Image().src = data.nuxAdminStatsURLS.enabled+','+'enabled-'+data.thisModuleSlug;
+ }else{
+ new Image().src = data.nuxAdminStatsURLS.deactivated+','+'deactivated-'+data.thisModuleSlug;
+ }
+
+ $( '.module-spinner-' + response.module ).hide();
+
+ // This is a hacky way around not showing the config link when activated.
+ response.noConfig = _.indexOf( [ 'photon', 'enhanced-distribution' ], response.module );
+
+ // Preserves the modal index so it can be rendered properly after the data has changed
+ response.index = index;
+
+ $( '#toggle-' + response.module ).replaceWith( wp.template( 'mod-nux' )( response ) );
+
+ // Refreshes the modal element data
+ _.extend( _.findWhere( modules, { module: response.module } ), response );
+
+ // Manual element alteration for Manage, since it's not part of the template
+ if ( 'manage' === data.thisModuleSlug ) {
+ if ( response.activated ) {
+ thisLabel.show().html( 'ACTIVE' );
+ $( '#manage-row' ).addClass( 'activated' );
+ } else {
+ thisLabel.show().html( 'INACTIVE' );
+ $( '#manage-row' ).removeClass( 'activated' );
+ }
+
+ $( '.manage-cta-inactive' ).toggle();
+ $( '.manage-cta-active' ).toggle();
+ return;
+ }
+
+ initModalEvents();
+ window.location.hash = 'refresh';
+ }
+
+ }, 'json' );
+ });
+ }
+
+ /*
+ This function will refresh any data elements that we've
+ changed via AJAX. Necessary when page is visited via back/forward
+ browsing.
+ */
+ function refreshData() {
+ // Clean up
+ $( '#nux-performance-security, #nux-traffic' ).empty();
+ $( '#jump-start-area' ).hide();
+ $( '.nux-intro' ).show();
+
+ data.action = 'jetpack_admin_ajax_refresh';
+ data.refreshData = 'refresh';
+ $.post( jetpackL10n.ajaxurl, data, function ( response ) {
+ modules = _.values( response );
+ loadModules( 'Performance-Security', 'mod-nux', '#nux-performance-security' );
+ loadModules( 'Traffic', 'mod-nux', '#nux-traffic' );
+ }, 'json' );
+ }
})( jQuery, jetpackL10n.modules, jetpackL10n.currentVersion, jetpackL10n );
diff --git a/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-landing-page.php b/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-landing-page.php
index ff54b29d..ec00730b 100644
--- a/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-landing-page.php
+++ b/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-landing-page.php
@@ -38,7 +38,15 @@ class Jetpack_Landing_Page extends Jetpack_Admin_Page {
function add_page_actions( $hook ) {
// Add landing page specific underscore templates
- add_action( "admin_footer-$hook", array( $this, 'js_templates' ) );
+ /**
+ * Filters the js_templates callback value
+ *
+ * @since 3.6.0
+ *
+ * @param array array( $this, 'js_templates' ) js_templates callback.
+ * @param string $hook Specific admin page.
+ */
+ add_action( "admin_footer-$hook", apply_filters( 'jetpack_landing_page_js_templates_callback', array( $this, 'js_templates' ), $hook ) );
/** This action is documented in class.jetpack.php */
do_action( 'jetpack_admin_menu', $hook );
@@ -115,9 +123,8 @@ class Jetpack_Landing_Page extends Jetpack_Admin_Page {
$module_name[] = $val['module_name'];
}
}
- $jumpstart_module_list = implode( $module_name, ', ' );
- return $jumpstart_module_list;
+ return $module_name;
}
function jetpack_menu_order( $menu_order ) {
@@ -194,7 +201,7 @@ class Jetpack_Landing_Page extends Jetpack_Admin_Page {
?>
<div id="message" class="jetpack-message">
<div class="squeezer">
- <h4><?php echo wp_kses( $message, array( 'strong' => array(), 'a' => array( 'href' => true ), 'br' => true ) ); ?></h4>
+ <h2><?php echo wp_kses( $message, array( 'strong' => array(), 'a' => array( 'href' => true ), 'br' => true ) ); ?></h2>
<?php
/**
* Fires within the displayed message when a feature configuation is updated.
@@ -245,6 +252,24 @@ class Jetpack_Landing_Page extends Jetpack_Admin_Page {
}
+ /*
+ * Build an array of NUX admin stats urls.
+ * requires the build URL args passed as an array
+ *
+ * @param array $nux_admin_stats
+ * @return (array) of built stats urls
+ */
+ function build_nux_admin_stats_urls( $nux_admin_stats ) {
+ $nux_admin_urls = array();
+
+ foreach ( $nux_admin_stats as $value) {
+ $nux_admin_urls[ $value ] = Jetpack::build_stats_url( array( 'x_jetpack-nux' => $value ) );
+ }
+
+ return $nux_admin_urls;
+
+ }
+
function page_admin_scripts() {
// Enqueue jp.js and localize it
wp_enqueue_script( 'jetpack-js', plugins_url( '_inc/jp.js', JETPACK__PLUGIN_FILE ),
@@ -264,7 +289,9 @@ class Jetpack_Landing_Page extends Jetpack_Admin_Page {
'jumpstart_modules' => $this->jumpstart_module_tag( 'Jumpstart' ),
'show_jumpstart' => $this->jetpack_show_jumpstart(),
'activate_nonce' => wp_create_nonce( 'jetpack-jumpstart-nonce' ),
+ 'admin_nonce' => wp_create_nonce( 'jetpack-admin-nonce' ),
'jumpstart_stats_urls' => $this->build_jumpstart_stats_urls( array( 'dismiss', 'jumpstarted', 'learnmore', 'viewed', 'manual' ) ),
+ 'admin_stats_urls' => $this->build_nux_admin_stats_urls( array( 'enabled', 'deactivated', 'learnmore' ) ),
'site_url_manage' => Jetpack::build_raw_urls( get_site_url() ),
)
);
diff --git a/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-my-jetpack-page.php b/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-my-jetpack-page.php
new file mode 100644
index 00000000..512b71a5
--- /dev/null
+++ b/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-my-jetpack-page.php
@@ -0,0 +1,187 @@
+<?php
+include_once( 'class.jetpack-admin-page.php' );
+include_once( JETPACK__PLUGIN_DIR . 'class.jetpack-modules-list-table.php' );
+
+// Builds the My Jetpack page
+class Jetpack_My_Jetpack_Page extends Jetpack_Admin_Page {
+ // Show the settings page only when Jetpack is connected or in dev mode
+ protected $dont_show_if_not_active = true;
+ function add_page_actions( $hook ) {} // There are no page specific actions to attach to the menu
+
+ // Adds the My Jetpack page, but hides it from the submenu
+ function get_page_hook() {
+ return add_submenu_page( null, __( 'My Jetpack', 'jetpack' ), __( 'My Jetpack', 'jetpack' ), 'jetpack_connect_user', 'my_jetpack', array( $this, 'render' ) );
+ }
+
+ // Renders the view file
+ function page_render() {
+ Jetpack::init()->load_view( 'admin/my-jetpack-page.php' );
+
+ //My Jetpack view tracking, send to MC Stats
+ Jetpack::init()->stat( 'admin', 'my-jetpack' );
+ Jetpack::init()->do_stats( 'server_side' );
+
+ }
+
+ /*
+ * Handle the change in master user
+ */
+ function jetpack_my_jetpack_change_user() {
+ if ( ! isset( $_POST['_my_jetpack_nonce'] ) || ! wp_verify_nonce( $_POST['_my_jetpack_nonce'], 'jetpack_change_primary_user' ) ) {
+ wp_die( __( 'Failed permissions, please try again.', 'jetpack' ) );
+ exit;
+ }
+
+ if ( isset( $_POST['jetpack-new-master'] ) ) {
+ $old_master_user = Jetpack_Options::get_option( 'master_user' );
+ $new_master_user = $_POST['jetpack-new-master'];
+ $user_token = Jetpack_Data::get_access_token( $new_master_user );
+ $is_user_connected = $user_token && ! is_wp_error( $user_token );
+ if ( current_user_can( 'manage_options' ) && $is_user_connected ) {
+ Jetpack::log( 'switch_master_user', array( 'old_master' => $old_master_user, 'new_master' => $new_master_user ) );
+ Jetpack_Options::update_option( 'master_user', $new_master_user );
+ Jetpack::state( 'message', 'switch_master' );
+
+ //My Jetpack primary user successfully changed, send to MC Stats
+ Jetpack::init()->stat( 'admin', 'change-primary-successful' );
+ Jetpack::init()->do_stats( 'server_side' );
+
+ // Change the blog owner dotcom side
+ $this->wpcom_switch_blog_owner( $new_master_user );
+ }
+ }
+ }
+
+ /*
+ * Tell wpcom that the master user has switched
+ * so we can update the 'wpcom_blog_owner'
+ */
+ function wpcom_switch_blog_owner( $new_master ) {
+ $request = array(
+ 'new_blog_owner' => $new_master
+ );
+
+ // Tell wpcom about the change
+ Jetpack::load_xml_rpc_client();
+ $xml = new Jetpack_IXR_Client( array(
+ 'user_id' => get_current_user_id(),
+ ) );
+
+ $xml->query( 'jetpack.switchBlogOwner', $request );
+ }
+
+ /*
+ * Checks to see if there are any other users available to become primary
+ * Users must both:
+ * - Be linked to wpcom
+ * - Be an admin
+ *
+ * @return bool
+ */
+ function jetpack_are_other_users_linked_and_admin() {
+ // If only one admin
+ $all_users = count_users();
+ if ( 2 > $all_users['avail_roles']['administrator'] ) {
+ return false;
+ }
+
+ $users = get_users();
+ $available = array();
+ // If no one else is linked to dotcom
+ foreach ( $users as $user ) {
+ if ( isset( $user->caps['administrator'] ) && Jetpack::is_user_connected( $user->ID ) ) {
+ $available[] = $user->ID;
+ }
+ }
+
+ if ( 2 > count( $available ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /*
+ * All the data we'll need about the Master User
+ * for the My Jetpack page template
+ *
+ * @return array
+ */
+ function jetpack_master_user_data() {
+ // If the master user has disappeared, none of this is useful.
+ // @todo throw up a warning and offer a solution
+ $master = Jetpack_Options::get_option( 'master_user' );
+ if ( ! get_user_by( 'id', $master ) ) {
+ return false;
+ }
+
+ $master_user = get_userdata( $master );
+ $master_user_data_com = Jetpack::get_connected_user_data( $master_user->ID );
+ $gravatar = sprintf( '<a href="%s">%s</a>', get_edit_user_link( $master_user->ID ), get_avatar( $master_user->ID, 40 ) );
+
+ $master_user_data = array(
+ 'masterUser' => $master_user,
+ 'masterDataCom' => $master_user_data_com,
+ 'gravatar' => $gravatar,
+ );
+
+ return $master_user_data;
+ }
+
+ /*
+ * All the data we'll need about the Current User
+ *
+ * @return array
+ */
+ function jetpack_current_user_data() {
+ global $current_user;
+ $is_master_user = $current_user->ID == Jetpack_Options::get_option( 'master_user' );
+ $dotcom_data = Jetpack::get_connected_user_data();
+
+ $current_user_data = array(
+ 'isUserConnected' => Jetpack::is_user_connected( $current_user->ID ),
+ 'isMasterUser' => $is_master_user,
+ 'adminUsername' => $current_user->user_login,
+ 'userComData' => $dotcom_data,
+ 'gravatar' => sprintf( '<a href="%s">%s</a>', get_edit_user_link( $current_user->ID ), get_avatar( $current_user->ID, 40 ) ),
+ );
+
+ return $current_user_data;
+ }
+
+
+ /*
+ * Build an array of My Jetpack stats urls.
+ * requires the build URL args passed as an array
+ *
+ * @param array $my_jetpack_stats
+ * @return (array) of built stats urls
+ */
+ function build_my_jetpack_stats_urls( $my_jetpack_stats ) {
+ $my_jetpack_urls = array();
+
+ foreach ( $my_jetpack_stats as $value ) {
+ $my_jetpack_urls[ $value ] = Jetpack::build_stats_url( array( 'x_jetpack-admin' => $value ) );
+ }
+
+ return $my_jetpack_urls;
+
+ }
+
+ // Load up admin scripts
+ function page_admin_scripts() {
+ wp_enqueue_script( 'jp-connection-js', plugins_url( '_inc/jp-my-jetpack.js', JETPACK__PLUGIN_FILE ), array( 'jquery', 'wp-util' ), JETPACK__VERSION . 'yep' );
+
+ wp_localize_script( 'jp-connection-js', 'jpConnection',
+ array(
+ 'jetpackIsActive' => Jetpack::is_active(),
+ 'isAdmin' => current_user_can( 'jetpack_manage_modules' ),
+ 'otherAdminsLinked' => $this->jetpack_are_other_users_linked_and_admin(),
+ 'masterUser' => $this->jetpack_master_user_data(),
+ 'currentUser' => $this->jetpack_current_user_data(),
+ 'my_jetpack_stats_urls' => $this->build_my_jetpack_stats_urls( array( 'change_primary', 'disconnect_site', 'confirm_disconnect', 'support_no_disconnect', 'cancel_disconnect' ) ),
+ 'alertText' => __( 'You must link another admin account before switching primary account holders.', 'jetpack' ),
+ )
+ );
+ }
+}
diff --git a/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-settings-page.php b/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-settings-page.php
index 0204aaf6..fa45db76 100644
--- a/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-settings-page.php
+++ b/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-settings-page.php
@@ -19,7 +19,7 @@ class Jetpack_Settings_Page extends Jetpack_Admin_Page {
$list_table = new Jetpack_Modules_List_Table;
?>
<div class="clouds-sm"></div>
- <?php /** This action is documented in class.jetpack.php */
+ <?php /** This action is already documented in views/admin/admin-page.php */
do_action( 'jetpack_notices' ) ?>
<div class="page-content configure">
<div class="frame top hide-if-no-js">
diff --git a/plugins/jetpack/_inc/lib/markdown/extra.php b/plugins/jetpack/_inc/lib/markdown/extra.php
index 562acef8..4f52171f 100644
--- a/plugins/jetpack/_inc/lib/markdown/extra.php
+++ b/plugins/jetpack/_inc/lib/markdown/extra.php
@@ -72,34 +72,34 @@ class Markdown_Parser {
### Configuration Variables ###
# Change to ">" for HTML output.
- var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX;
- var $tab_width = MARKDOWN_TAB_WIDTH;
+ public $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX;
+ public $tab_width = MARKDOWN_TAB_WIDTH;
# Change to `true` to disallow markup or entities.
- var $no_markup = false;
- var $no_entities = false;
+ public $no_markup = false;
+ public $no_entities = false;
# Predefined urls and titles for reference links and images.
- var $predef_urls = array();
- var $predef_titles = array();
+ public $predef_urls = array();
+ public $predef_titles = array();
### Parser Implementation ###
# Regex to match balanced [brackets].
# Needed to insert a maximum bracked depth while converting to PHP.
- var $nested_brackets_depth = 6;
- var $nested_brackets_re;
+ public $nested_brackets_depth = 6;
+ public $nested_brackets_re;
- var $nested_url_parenthesis_depth = 4;
- var $nested_url_parenthesis_re;
+ public $nested_url_parenthesis_depth = 4;
+ public $nested_url_parenthesis_re;
# Table of hash values for escaped characters:
- var $escape_chars = '\`*_{}[]()>#+-.!';
- var $escape_chars_re;
+ public $escape_chars = '\`*_{}[]()>#+-.!';
+ public $escape_chars_re;
- function Markdown_Parser() {
+ function __construct() {
#
# Constructor function. Initialize appropriate member variables.
#
@@ -124,12 +124,12 @@ class Markdown_Parser {
# Internal hashes used during transformation.
- var $urls = array();
- var $titles = array();
- var $html_hashes = array();
+ public $urls = array();
+ public $titles = array();
+ public $html_hashes = array();
# Status flag to avoid invalid nesting.
- var $in_anchor = false;
+ public $in_anchor = false;
function setup() {
@@ -195,7 +195,7 @@ class Markdown_Parser {
return $text . "\n";
}
- var $document_gamut = array(
+ public $document_gamut = array(
# Strip link definitions, store in hashes.
"stripLinkDefinitions" => 20,
@@ -423,7 +423,7 @@ class Markdown_Parser {
}
- var $block_gamut = array(
+ public $block_gamut = array(
#
# These are all the transformations that form block-level
# tags like paragraphs, headers, and list items.
@@ -485,7 +485,7 @@ class Markdown_Parser {
}
- var $span_gamut = array(
+ public $span_gamut = array(
#
# These are all the transformations that occur *within* block-level
# tags like paragraphs, headers, and list items.
@@ -888,7 +888,7 @@ class Markdown_Parser {
return "\n". $result ."\n\n";
}
- var $list_level = 0;
+ public $list_level = 0;
function processListItems($list_str, $marker_any_re) {
#
@@ -1002,22 +1002,22 @@ class Markdown_Parser {
}
- var $em_relist = array(
+ public $em_relist = array(
'' => '(?:(?<!\*)\*(?!\*)|(?<!_)_(?!_))(?=\S|$)(?![\.,:;]\s)',
'*' => '(?<=\S|^)(?<!\*)\*(?!\*)',
'_' => '(?<=\S|^)(?<!_)_(?!_)',
);
- var $strong_relist = array(
+ public $strong_relist = array(
'' => '(?:(?<!\*)\*\*(?!\*)|(?<!_)__(?!_))(?=\S|$)(?![\.,:;]\s)',
'**' => '(?<=\S|^)(?<!\*)\*\*(?!\*)',
'__' => '(?<=\S|^)(?<!_)__(?!_)',
);
- var $em_strong_relist = array(
+ public $em_strong_relist = array(
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<!_)___(?!_))(?=\S|$)(?![\.,:;]\s)',
'***' => '(?<=\S|^)(?<!\*)\*\*\*(?!\*)',
'___' => '(?<=\S|^)(?<!_)___(?!_)',
);
- var $em_strong_prepared_relist;
+ public $em_strong_prepared_relist;
function prepareItalicsAndBold() {
#
@@ -1483,7 +1483,7 @@ class Markdown_Parser {
# String length function for detab. `_initDetab` will create a function to
# hanlde UTF-8 if the default function does not exist.
- var $utf8_strlen = 'mb_strlen';
+ public $utf8_strlen = 'mb_strlen';
function detab($text) {
#
@@ -1552,29 +1552,29 @@ class MarkdownExtra_Parser extends Markdown_Parser {
### Configuration Variables ###
# Prefix for footnote ids.
- var $fn_id_prefix = "";
+ public $fn_id_prefix = "";
# Optional title attribute for footnote links and backlinks.
- var $fn_link_title = MARKDOWN_FN_LINK_TITLE;
- var $fn_backlink_title = MARKDOWN_FN_BACKLINK_TITLE;
+ public $fn_link_title = MARKDOWN_FN_LINK_TITLE;
+ public $fn_backlink_title = MARKDOWN_FN_BACKLINK_TITLE;
# Optional class attribute for footnote links and backlinks.
- var $fn_link_class = MARKDOWN_FN_LINK_CLASS;
- var $fn_backlink_class = MARKDOWN_FN_BACKLINK_CLASS;
+ public $fn_link_class = MARKDOWN_FN_LINK_CLASS;
+ public $fn_backlink_class = MARKDOWN_FN_BACKLINK_CLASS;
# Optional class prefix for fenced code block.
- var $code_class_prefix = MARKDOWN_CODE_CLASS_PREFIX;
+ public $code_class_prefix = MARKDOWN_CODE_CLASS_PREFIX;
# Class attribute for code blocks goes on the `code` tag;
# setting this to true will put attributes on the `pre` tag instead.
- var $code_attr_on_pre = MARKDOWN_CODE_ATTR_ON_PRE;
+ public $code_attr_on_pre = MARKDOWN_CODE_ATTR_ON_PRE;
# Predefined abbreviations.
- var $predef_abbr = array();
+ public $predef_abbr = array();
### Parser Implementation ###
- function MarkdownExtra_Parser() {
+ function __construct() {
#
# Constructor function. Initialize the parser object.
#
@@ -1600,20 +1600,20 @@ class MarkdownExtra_Parser extends Markdown_Parser {
"doAbbreviations" => 70,
);
- parent::Markdown_Parser();
+ parent::__construct();
}
# Extra variables used during extra transformations.
- var $footnotes = array();
- var $footnotes_ordered = array();
- var $footnotes_ref_count = array();
- var $footnotes_numbers = array();
- var $abbr_desciptions = array();
- var $abbr_word_re = '';
+ public $footnotes = array();
+ public $footnotes_ordered = array();
+ public $footnotes_ref_count = array();
+ public $footnotes_numbers = array();
+ public $abbr_desciptions = array();
+ public $abbr_word_re = '';
# Give the current footnote number.
- var $footnote_counter = 1;
+ public $footnote_counter = 1;
function setup() {
@@ -1656,9 +1656,9 @@ class MarkdownExtra_Parser extends Markdown_Parser {
### Extra Attribute Parser ###
# Expression to use to catch attributes (includes the braces)
- var $id_class_attr_catch_re = '\{((?:[ ]*[#.][-_:a-zA-Z0-9]+){1,})[ ]*\}';
+ public $id_class_attr_catch_re = '\{((?:[ ]*[#.][-_:a-zA-Z0-9]+){1,})[ ]*\}';
# Expression to use when parsing in a context when no capture is desired
- var $id_class_attr_nocatch_re = '\{(?:[ ]*[#.][-_:a-zA-Z0-9]+){1,}[ ]*\}';
+ public $id_class_attr_nocatch_re = '\{(?:[ ]*[#.][-_:a-zA-Z0-9]+){1,}[ ]*\}';
function doExtraAttributes($tag_name, $attr) {
#
@@ -1744,20 +1744,20 @@ class MarkdownExtra_Parser extends Markdown_Parser {
### HTML Block Parser ###
# Tags that are always treated as block tags:
- var $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption';
+ public $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption';
# Tags treated as block tags only if the opening tag is alone on its line:
- var $context_block_tags_re = 'script|noscript|ins|del|iframe|object|source|track|param|math|svg|canvas|audio|video';
+ public $context_block_tags_re = 'script|noscript|ins|del|iframe|object|source|track|param|math|svg|canvas|audio|video';
# Tags where markdown="1" default to span mode:
- var $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address';
+ public $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address';
# Tags which must not have their contents modified, no matter where
# they appear:
- var $clean_tags_re = 'script|math|svg';
+ public $clean_tags_re = 'script|math|svg';
# Tags that do not need to be closed.
- var $auto_close_tags_re = 'hr|img|param|source|track';
+ public $auto_close_tags_re = 'hr|img|param|source|track';
function hashHTMLBlocks($text) {
@@ -2835,17 +2835,17 @@ class MarkdownExtra_Parser extends Markdown_Parser {
# Redefining emphasis markers so that emphasis by underscore does not
# work in the middle of a word.
#
- var $em_relist = array(
+ public $em_relist = array(
'' => '(?:(?<!\*)\*(?!\*)|(?<![a-zA-Z0-9_])_(?!_))(?=\S|$)(?![\.,:;]\s)',
'*' => '(?<=\S|^)(?<!\*)\*(?!\*)',
'_' => '(?<=\S|^)(?<!_)_(?![a-zA-Z0-9_])',
);
- var $strong_relist = array(
+ public $strong_relist = array(
'' => '(?:(?<!\*)\*\*(?!\*)|(?<![a-zA-Z0-9_])__(?!_))(?=\S|$)(?![\.,:;]\s)',
'**' => '(?<=\S|^)(?<!\*)\*\*(?!\*)',
'__' => '(?<=\S|^)(?<!_)__(?![a-zA-Z0-9_])',
);
- var $em_strong_relist = array(
+ public $em_strong_relist = array(
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<![a-zA-Z0-9_])___(?!_))(?=\S|$)(?![\.,:;]\s)',
'***' => '(?<=\S|^)(?<!\*)\*\*\*(?!\*)',
'___' => '(?<=\S|^)(?<!_)___(?![a-zA-Z0-9_])',
diff --git a/plugins/jetpack/_inc/lib/markdown/gfm.php b/plugins/jetpack/_inc/lib/markdown/gfm.php
index 450742b2..6cd208af 100644
--- a/plugins/jetpack/_inc/lib/markdown/gfm.php
+++ b/plugins/jetpack/_inc/lib/markdown/gfm.php
@@ -64,7 +64,7 @@ class WPCom_GHF_Markdown_Parser extends MarkdownExtra_Parser {
$this->preserve_latex = function_exists( 'latex_markup' );
$this->strip_paras = function_exists( 'wpautop' );
- parent::MarkdownExtra_Parser();
+ parent::__construct();
}
/**
@@ -148,6 +148,7 @@ class WPCom_GHF_Markdown_Parser extends MarkdownExtra_Parser {
public function do_codeblock_preserve( $matches ) {
$block = stripslashes( $matches[3] );
$block = esc_html( $block );
+ $block = str_replace( '\\', '\\\\', $block );
$open = $matches[1] . $matches[2] . "\n";
return $open . $block . $matches[4];
}
@@ -264,10 +265,10 @@ class WPCom_GHF_Markdown_Parser extends MarkdownExtra_Parser {
*/
protected function get_shortcode_regex() {
$pattern = get_shortcode_regex();
-
+
// don't match markdown link anchors that could be mistaken for shortcodes.
- $pattern .= '(?!\()';
-
+ $pattern .= '(?!\()';
+
return "/$pattern/s";
}
diff --git a/plugins/jetpack/_inc/lib/markdown/test.php b/plugins/jetpack/_inc/lib/markdown/test.php
deleted file mode 100644
index 8a0b08be..00000000
--- a/plugins/jetpack/_inc/lib/markdown/test.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-require 'extra.php';
-require 'gfm.php';
-$parser = new WPCom_GHF_Markdown_Parser;
-
-$text1 = <<<EOD
-I am just back\slashing up a *storm* \*mofo*.
-
-EOD;
-
-$text = 'Just rockin in the *free* world
-
-```html
-<html lang="en">
-</html>
-```
-';
-#echo $text;
-echo $parser->transform( $text );
-echo "\n\n\n";
-#echo $parser->hashBlock( '<pre>foobar</pre>' );
-
-
-$foo = <<<EOD
-Here is a *list* with things:
-
-* some `code` is better than others
-* **my** code is better than *yours*
-* the best code is that which need not be written
-
-Selah.
-EOD;
diff --git a/plugins/jetpack/_inc/lib/tonesque.php b/plugins/jetpack/_inc/lib/tonesque.php
index 2a17a741..8f867a1f 100644
--- a/plugins/jetpack/_inc/lib/tonesque.php
+++ b/plugins/jetpack/_inc/lib/tonesque.php
@@ -25,6 +25,8 @@ class Tonesque {
/**
* Allows any image URL to be passed in for $this->image_url.
*
+ * @module theme-tools
+ *
* @since 2.5.0
*
* @param string $image_url The URL to any image
diff --git a/plugins/jetpack/_inc/lib/tracks/class.tracks-client.php b/plugins/jetpack/_inc/lib/tracks/class.tracks-client.php
new file mode 100644
index 00000000..09880bf4
--- /dev/null
+++ b/plugins/jetpack/_inc/lib/tracks/class.tracks-client.php
@@ -0,0 +1,168 @@
+<?php
+
+/**
+ * Jetpack_Tracks_Client
+ * @autounit nosara tracks-client
+ *
+ * Send Tracks events on behalf of a user
+ *
+ * Example Usage:
+```php
+ require( dirname(__FILE__).'path/to/tracks/class.tracks-client' );
+
+ $result = Jetpack_Tracks_Client::record_event( array(
+ '_en' => $event_name, // required
+ '_ui' => $user_id, // required unless _ul is provided
+ '_ul' => $user_login, // required unless _ui is provided
+
+ // Optional, but recommended
+ '_ts' => $ts_in_ms, // Default: now
+ '_via_ip' => $client_ip, // we use it for geo, etc.
+
+ // Possibly useful to set some context for the event
+ '_via_ua' => $client_user_agent,
+ '_via_url' => $client_url,
+ '_via_ref' => $client_referrer,
+
+ // For user-targeted tests
+ 'abtest_name' => $abtest_name,
+ 'abtest_variation' => $abtest_variation,
+
+ // Your application-specific properties
+ 'custom_property' => $some_value,
+ ) );
+
+ if ( is_wp_error( $result ) ) {
+ // Handle the error in your app
+ }
+```
+ */
+
+require_once( dirname(__FILE__).'/class.tracks-client.php' );
+
+class Jetpack_Tracks_Client {
+ const PIXEL = 'http://pixel.wp.com/t.gif';
+ const BROWSER_TYPE = 'php-agent';
+ const USER_AGENT_SLUG = 'tracks-client';
+ const VERSION = '0.3';
+
+ /**
+ * record_event
+ * @param mixed $event Event object to send to Tracks. An array will be cast to object. Required.
+ * Properties are included directly in the pixel query string after light validation.
+ * @return mixed True on success, WP_Error on failure
+ */
+ static function record_event( $event ) {
+ if ( ! $event instanceof Jetpack_Tracks_Event ) {
+ $event = new Jetpack_Tracks_Event( $event );
+ }
+ if ( is_wp_error( $event ) ) {
+ return $event;
+ }
+
+ $pixel = $event->build_pixel_url( $event );
+
+ if ( ! $pixel ) {
+ return new WP_Error( 'invalid_pixel', 'cannot generate tracks pixel for given input', 400 );
+ }
+
+ return self::record_pixel( $pixel );
+ }
+
+ /**
+ * Synchronously request the pixel
+ */
+ static function record_pixel( $pixel ) {
+ // Add the Request Timestamp and URL terminator just before the HTTP request.
+ $pixel .= '&_rt=' . self::build_timestamp() . '&_=_';
+
+ $response = wp_remote_get( $pixel, array(
+ 'blocking' => true, // The default, but being explicit here :)
+ 'timeout' => 1,
+ 'redirection' => 2,
+ 'httpversion' => '1.1',
+ 'user-agent' => self::get_user_agent(),
+ ) );
+
+ if ( is_wp_error( $response ) ) {
+ return $response;
+ }
+
+ $code = isset( $response['response']['code'] ) ? $response['response']['code'] : 0;
+
+ if ( $code !== 200 ) {
+ return new WP_Error( 'request_failed', 'Tracks pixel request failed', $code );
+ }
+
+ return true;
+ }
+
+ static function get_user_agent() {
+ return Jetpack_Tracks_Client::USER_AGENT_SLUG . '-v' . Jetpack_Tracks_Client::VERSION;
+ }
+
+ /**
+ * Build an event and return its tracking URL
+ * @deprecated Call the `build_pixel_url` method on a Jetpack_Tracks_Event object instead.
+ * @param array $event Event keys and values
+ * @return string URL of a tracking pixel
+ */
+ static function build_pixel_url( $event ) {
+ $_event = new Jetpack_Tracks_Event( $event );
+ return $_event->build_pixel_url();
+ }
+
+ /**
+ * Validate input for a tracks event.
+ * @deprecated Instantiate a Jetpack_Tracks_Event object instead
+ * @param array $event Event keys and values
+ * @return mixed Validated keys and values or WP_Error on failure
+ */
+ private static function validate_and_sanitize( $event ) {
+ $_event = new Jetpack_Tracks_Event( $event );
+ if ( is_wp_error( $_event ) ) {
+ return $_event;
+ }
+ return get_object_vars( $_event );
+ }
+
+ // Milliseconds since 1970-01-01
+ static function build_timestamp() {
+ $ts = round( microtime( true ) * 1000 );
+ return number_format( $ts, 0, '', '' );
+ }
+
+ /**
+ * Grabs the user's anon id from cookies, or generates and sets a new one
+ *
+ * @return string An anon id for the user
+ */
+ static function get_anon_id() {
+ static $anon_id = null;
+
+ if ( ! isset( $anon_id ) ) {
+
+ // Did the browser send us a cookie?
+ if ( isset( $_COOKIE[ 'tk_ai' ] ) && preg_match( '#^[A-Za-z0-9+/=]{24}$#', $_COOKIE[ 'tk_ai' ] ) ) {
+ $anon_id = $_COOKIE[ 'tk_ai' ];
+ } else {
+
+ $binary = '';
+
+ // Generate a new anonId and try to save it in the browser's cookies
+ // Note that base64-encoding an 18 character string generates a 24-character anon id
+ for ( $i = 0; $i < 18; ++$i ) {
+ $binary .= chr( mt_rand( 0, 255 ) );
+ }
+
+ $anon_id = 'jetpack:' . base64_encode( $binary );
+
+ if ( ! headers_sent() ) {
+ setcookie( 'tk_ai', $anon_id );
+ }
+ }
+ }
+
+ return $anon_id;
+ }
+}
diff --git a/plugins/jetpack/_inc/lib/tracks/class.tracks-event.php b/plugins/jetpack/_inc/lib/tracks/class.tracks-event.php
new file mode 100644
index 00000000..fb86e0ba
--- /dev/null
+++ b/plugins/jetpack/_inc/lib/tracks/class.tracks-event.php
@@ -0,0 +1,149 @@
+<?php
+
+/**
+ * @autounit nosara tracks-client
+ *
+ * Example Usage:
+```php
+ require_once( dirname(__FILE__) . 'path/to/tracks/class.tracks-event' );
+
+ $event = new Jetpack_Tracks_Event( array(
+ '_en' => $event_name, // required
+ '_ui' => $user_id, // required unless _ul is provided
+ '_ul' => $user_login, // required unless _ui is provided
+
+ // Optional, but recommended
+ '_via_ip' => $client_ip, // for geo, etc.
+
+ // Possibly useful to set some context for the event
+ '_via_ua' => $client_user_agent,
+ '_via_url' => $client_url,
+ '_via_ref' => $client_referrer,
+
+ // For user-targeted tests
+ 'abtest_name' => $abtest_name,
+ 'abtest_variation' => $abtest_variation,
+
+ // Your application-specific properties
+ 'custom_property' => $some_value,
+ ) );
+
+ if ( is_wp_error( $event->error ) ) {
+ // Handle the error in your app
+ }
+
+ $bump_and_redirect_pixel = $event->build_signed_pixel_url();
+```
+ */
+
+require_once( dirname(__FILE__) . '/class.tracks-client.php' );
+
+class Jetpack_Tracks_Event {
+ const EVENT_NAME_REGEX = '/^(([a-z0-9]+)_){2}([a-z0-9_]+)$/';
+ const PROP_NAME_REGEX = '/^[a-z_][a-z0-9_]*$/';
+ public $error;
+
+ function __construct( $event ) {
+ $_event = self::validate_and_sanitize( $event );
+ if ( is_wp_error( $_event ) ) {
+ $this->error = $_event;
+ return;
+ }
+
+ foreach( $_event as $key => $value ) {
+ $this->{$key} = $value;
+ }
+ }
+
+ function record() {
+ return Jetpack_Tracks_Client::record_event( $this );
+ }
+
+ /**
+ * Annotate the event with all relevant info.
+ * @param mixed $event Object or (flat) array
+ * @return mixed The transformed event array or WP_Error on failure.
+ */
+ static function validate_and_sanitize( $event ) {
+ $event = (object) $event;
+
+ // Required
+ if ( ! $event->_en ) {
+ return new WP_Error( 'invalid_event', 'A valid event must be specified via `_en`', 400 );
+ }
+
+ // delete non-routable addresses otherwise geoip will discard the record entirely
+ if ( property_exists( $event, '_via_ip' ) && preg_match( '/^192\.168|^10\./', $event->_via_ip ) ) {
+ unset($event->_via_ip);
+ }
+
+ $validated = array(
+ 'browser_type' => Jetpack_Tracks_Client::BROWSER_TYPE,
+ '_aua' => Jetpack_Tracks_Client::get_user_agent(),
+ );
+
+ $_event = (object) array_merge( (array) $event, $validated );
+
+ // If you want to blacklist property names, do it here.
+
+ // Make sure we have an event timestamp.
+ if ( ! isset( $_event->_ts ) ) {
+ $_event->_ts = Jetpack_Tracks_Client::build_timestamp();
+ }
+
+ return $_event;
+ }
+
+ /**
+ * Build a pixel URL that will send a Tracks event when fired.
+ * On error, returns an empty string ('').
+ *
+ * @return string A pixel URL or empty string ('') if there were invalid args.
+ */
+ function build_pixel_url() {
+ if ( $this->error ) {
+ return '';
+ }
+
+ $args = get_object_vars( $this );
+
+ // Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.
+ unset( $args['_rt'] );
+ unset( $args['_'] );
+
+ $validated = self::validate_and_sanitize( $args );
+
+ if ( is_wp_error( $validated ) )
+ return '';
+
+ return Jetpack_Tracks_Client::PIXEL . '?' . http_build_query( $validated );
+ }
+
+ static function event_name_is_valid( $name ) {
+ return preg_match( Jetpack_Tracks_Event::EVENT_NAME_REGEX, $name );
+ }
+
+ static function prop_name_is_valid( $name ) {
+ return preg_match( Jetpack_Tracks_Event::PROP_NAME_REGEX, $name );
+ }
+
+ static function scrutinize_event_names( $event ) {
+ if ( ! Jetpack_Tracks_Event::event_name_is_valid( $event->_en ) ) {
+ return;
+ }
+
+ $whitelisted_key_names = array(
+ 'anonId',
+ 'Browser_Type',
+ );
+
+ foreach ( array_keys( (array) $event ) as $key ) {
+ if ( in_array( $key, $whitelisted_key_names ) ) {
+ continue;
+ }
+ if ( ! Jetpack_Tracks_Event::prop_name_is_valid( $key ) ) {
+ return;
+ }
+ }
+ }
+}
diff --git a/plugins/jetpack/_inc/lib/tracks/client.php b/plugins/jetpack/_inc/lib/tracks/client.php
new file mode 100644
index 00000000..cb471c60
--- /dev/null
+++ b/plugins/jetpack/_inc/lib/tracks/client.php
@@ -0,0 +1,124 @@
+<?php
+/**
+ * PHP Tracks Client
+ * @autounit nosara tracks-client
+ * Example Usage:
+ *
+```php
+ include( plugin_dir_path( __FILE__ ) . 'lib/tracks/client.php');
+ $result = jetpack_tracks_record_event( $user, $event_name, $properties );
+
+ if ( is_wp_error( $result ) ) {
+ // Handle the error in your app
+ }
+```
+ */
+
+// Load the client classes
+require_once( dirname(__FILE__) . '/class.tracks-event.php' );
+require_once( dirname(__FILE__) . '/class.tracks-client.php' );
+
+// Now, let's export a sprinkling of syntactic sugar!
+
+/**
+ * Procedurally (vs. Object-oriented), track an event object (or flat array)
+ * NOTE: Use this only when the simpler jetpack_tracks_record_event() function won't work for you.
+ * @param \Jetpack_Tracks_Event $event The event object.
+ * @return \Jetpack_Tracks_Event|\WP_Error
+ */
+function jetpack_tracks_record_event_raw( $event ) {
+ return Jetpack_Tracks_Client::record_event( $event );
+}
+
+/**
+ * Procedurally build a Tracks Event Object.
+ * NOTE: Use this only when the simpler jetpack_tracks_record_event() function won't work for you.
+ * @param $identity WP_user object
+ * @param string $event_name The name of the event
+ * @param array $properties Custom properties to send with the event
+ * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred
+ * @return \Jetpack_Tracks_Event|\WP_Error
+ */
+function jetpack_tracks_build_event_obj( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) {
+
+ $identity = jetpack_tracks_get_identity( $user->ID );
+
+ $properties['user_lang'] = $user->get( 'WPLANG' );
+
+ $blog_details = array(
+ 'blog_lang' => isset( $properties['blog_lang'] ) ? $properties['blog_lang'] : get_bloginfo( 'language' )
+ );
+
+ $timestamp = ( $event_timestamp_millis !== false ) ? $event_timestamp_millis : round( microtime( true ) * 1000 );
+ $timestamp_string = is_string( $timestamp ) ? $timestamp : number_format( $timestamp, 0, '', '' );
+
+ return new Jetpack_Tracks_Event( array_merge( $blog_details, (array) $properties, $identity, array(
+ '_en' => $event_name,
+ '_ts' => $timestamp_string
+ ) ) );
+}
+
+/*
+ * Get the identity to send to tracks.
+ *
+ * @param int $user_id The user id of the local user
+ * @return array $identity
+ */
+function jetpack_tracks_get_identity( $user_id ) {
+
+ // Meta is set, and user is still connected. Use WPCOM ID
+ $wpcom_id = get_user_meta( $user_id, 'jetpack_tracks_wpcom_id', true );
+ if ( $wpcom_id && Jetpack::is_user_connected( $user_id ) ) {
+ return array(
+ '_ut' => 'wpcom:user_id',
+ '_ui' => $wpcom_id
+ );
+ }
+
+ // User is connected, but no meta is set yet. Use WPCOM ID and set meta.
+ if ( Jetpack::is_user_connected( $user_id ) ) {
+ $wpcom_user_data = Jetpack::get_connected_user_data( $user_id );
+ add_user_meta( $user_id, 'jetpack_tracks_wpcom_id', $wpcom_user_data['ID'], true );
+
+ return array(
+ '_ut' => 'wpcom:user_id',
+ '_ui' => $wpcom_user_data['ID']
+ );
+ }
+
+ // User isn't linked at all. Fall back to anonymous ID.
+ $anon_id = get_user_meta( $user_id, 'jetpack_tracks_anon_id', true );
+ if ( ! $anon_id ) {
+ $anon_id = Jetpack_Tracks_Client::get_anon_id();
+ add_user_meta( $user_id, 'jetpack_tracks_anon_id', $anon_id, false );
+ }
+
+ if ( ! isset( $_COOKIE[ 'tk_ai' ] ) && ! headers_sent() ) {
+ setcookie( 'tk_ai', $anon_id );
+ }
+
+ return array(
+ '_ut' => 'anon',
+ '_ui' => $anon_id
+ );
+
+}
+
+/**
+ * Record an event in Tracks - this is the preferred way to record events from PHP.
+ *
+ * @param mixed $identity username, user_id, or WP_user object
+ * @param string $event_name The name of the event
+ * @param array $properties Custom properties to send with the event
+ * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred
+ * @return bool true for success | \WP_Error if the event pixel could not be fired
+ */
+function jetpack_tracks_record_event( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) {
+ $event_obj = jetpack_tracks_build_event_obj( $user, $event_name, $properties, $event_timestamp_millis );
+
+ if ( is_wp_error( $event_obj->error ) ) {
+ return $event_obj->error;
+ }
+
+ return $event_obj->record();
+}
diff --git a/plugins/jetpack/changelog.txt b/plugins/jetpack/changelog.txt
new file mode 100644
index 00000000..a19f9555
--- /dev/null
+++ b/plugins/jetpack/changelog.txt
@@ -0,0 +1,1405 @@
+== Changelog ==
+= 3.7.2 =
+Release date: September 29th, 2015
+
+* Bug Fix: REST API: Fixed an error when saving drafts and publishing posts
+
+= 3.7.1 =
+Release date: September 28th, 2015
+
+* Enhancement: General: Added inline documentation for various filters and functions
+* Enhancement: General: Added custom capabilities for module management on multi-site installs
+* Enhancement: General: Cleaned up old changelog entries from readme
+* Enhancement: General: Cleaned up unused i18n textdomains
+* Enhancement: General: Updated the new settings page to look better in various translations
+* Enhancement: REST API: Added new endpoints to manage users
+* Enhancement: Sharing: Updated the Google logo
+* Bug Fix: Carousel: Page scroll no longer disappears after closing the carousel
+* Bug Fix: Contact Form: Fields are sent and displayed in the correct order
+* Bug Fix: Contact Form: No longer showing a notice on AJAX actions in feedback lists
+* Bug Fix: Contact Form: Made using more than two notification emails possible
+* Bug Fix: Contact Form: Mitigate a potential stored XSS vulnerability. Thanks to Marc-Alexandre Montpas (Sucuri)
+* Bug Fix: General: Mitigate a potential information disclosure. Thanks to Jaime Delgado Horna
+* Bug Fix: General: Fixed a locale error in the notifications popout
+* Bug Fix: General: Fixed a possible fatal error in the client area
+* Bug Fix: General: Fixed compatibility issues with certain use cases
+* Bug Fix: General: Disabled connection warnings for multisites with domain mapping
+* Bug Fix: General: Updated translations for correct link display in admin notices
+* Bug Fix: REST API: Fixed a fatal error in one of the endpoints
+* Bug Fix: Sharing: Fixed OpenGraph tags for Instagram embeds
+* Bug Fix: Sharing: Fixed compatibility issues with bbPress
+* Bug Fix: Widget Visibility: Fixed a fatal error in case of a missing tag
+
+= 3.7.0 =
+Release date: September 9th, 2015
+
+Feature Enhancements:
+
+* New admin page interface to easily configure Jetpack
+* Added staging site support for testing a connected Jetpack site
+
+Additional changes:
+
+* Enhancement: CLI: Added a possibility to change all options with confirmation for some of them
+* Enhancement: Gallery: Added filters to allow new gallery types to be declared
+* Enhancement: General: Added inline documentation for actions, filters, etc.
+* Enhancement: General: Changed class variable declarations keyword from var to public
+* Enhancement: General: Made the Settings page module toggle buttons more accessible
+* Enhancement: General: The admin bar now loads new notifications popout
+* Enhancement: General: Renamed some modules to avoid redundant prefixes
+* Enhancement: General: Switched to the WordPress Core's spinner image
+* Enhancement: General: Updated the bot list
+* Enhancement: Manage: Added the ability to activate a network-wide plugin on a single site from WordPress.com
+* Enhancement: Photon: Added a way to check image URLs against custom domains
+* Enhancement: Photon: Added prompts on the media upload page telling the user about Photon
+* Enhancement: Publicize: Added width and height values to OpenGraph tags for default images
+* Enhancement: Related Posts: Added a filter to allow disabling nofollow
+* Enhancement: REST API: Added new API endpoints to extend API functionality
+* Enhancement: REST API: Added new fields to existing API endpoints
+* Enhancement: Sharing: Added a possibility to opt-out of sharing for a single post
+* Enhancement: Sharing: Added bbPress support
+* Enhancement: Sharing: Added more configuration to the Likes modal
+* Enhancement: Sharing: Made the reddit button open a new tab
+* Enhancement: Sharing: Removed unused files
+* Enhancement: Shortcodes: Added auto embed option inside comments
+* Enhancement: Shortcodes: Added autohide parameter to the YouTube shortcode
+* Enhancement: Subscriptions: added an action that triggers at the end of the subscription process
+* Enhancement: VideoPress: Videos are now embedded using a new player
+* Enhancement: Widget Visibility: Added parent page logic
+* Enhancement: Widget Visibility: Added support for split terms
+* Enhancement: Widgets: Added actions to the Social Media widget
+* Enhancement: Widgets: Switched the Display Posts widget to the new API version
+* Bug Fix: General: Fixed scrolling to top after modal window closing
+* Bug Fix: Infinite Scroll: Added a check for cases when output buffering is disabled
+* Bug Fix: Infinite Scroll: Added translation to the copyright message
+* Bug Fix: Manage: Fixed automatic update synchronization on WordPress multisite network admin
+* Bug Fix: Manage: Redirects back to WordPress.com are allowed from the customizer view
+* Bug Fix: Media: Fixed duplicate images bug in the Media Extractor
+* Bug Fix: Publicize: Made it possible to remove previously set message
+* Bug Fix: Sharing: Added a thumbnail image to OpenGraph tags on pages with DailyMotion embeds
+* Bug Fix: Sharing: Fixed Twitter Cards tags escaping
+* Bug Fix: Sharing: Made OpenGraph tags for title and description use proper punctuation
+* Bug Fix: Sharing: Made sure Likes can be disabled on the front page
+* Bug Fix: Shortcodes: Fixed Facebook embeds by placing the scipt in the footer
+* Bug Fix: Shortcodes: Fixed PollDaddy shortcode issues over SSL connections
+* Bug Fix: Shortcodes: Made responsive video wrappers only wrap video embeds
+* Bug Fix: Shortcodes: Made SoundCloud accept percents for dimensions
+* Bug Fix: Social Links: Fixed a possible conflict with another class
+* Bug Fix: Stats: Made sure the Stats URL is always escaped properly
+
+= 3.6.1 =
+Release Date: July 24, 2015
+
+* Enhancement: Fully compatible with upcoming WordPress 4.3
+* Enhancement: Site Icon: Start to deprecate Site Icon in favor of Core's version (if available)
+* Bug Fix: Subscriptions: You can now use more than one Subscription form on a single page
+* Bug Fix: Quieted PHP notices and warnings with the JSON API, Display Posts Widget and Gallery Widget (slideshow mode)
+* Bug Fix: Correct permissions check for connection panel
+* Hardening: Increase permissions checks
+
+= 3.6 =
+Release Date: July 6th, 2015
+Release Post: http://jetpack.me/2015/07/06/jetpack-3-6-updated-social-widgets-jetpack-cli-and-more/
+
+Feature Enhancements:
+
+* CLI: Add a number of Jetpack CLI improvements: see http://jetpack.me/support/jetpack-cli
+* New Jetpack admin page for connection management
+* New Social Media Icons widget
+* FB Like Box: A visual refresh of the Facebook likebox widget
+* Protect: When your IP is blocked, use a math captcha as a fallback instead of a complete block
+
+Additional changes:
+
+* Enhancement: Custom CSS: Add more Flexbox support and other enhancements
+* Enhancement: Extra Sidebar Widgets: Top Posts Widget: Choose what Post Types to display
+* Enhancement: General: Save on some requests! print CSS inline when there isn't much of it
+* Enhancement: Likes: Likes can now be shown on all post types
+* Enhancement: Minileven: Add Featured Image to Gallery Post Format and Pages
+* Enhancement: Mobile Theme: Add div wrapping View Mobile Site link to allow for easier CSS customizations
+* Enhancement: Omnisearch: Link to edit post in titles
+* Enhancement: Protect: Learn Trusted Headers locally and cache blocks properly
+* Enhancement: REST API: Add locale support
+* Enhancement: Sharing: Retire StumbleUpon
+* Enhancement: Sharing: Upgrade to reCAPTCHA 2.0 for Email Sharing
+* Enhancement: Shortcode Embeds: Add Mesh oembed support
+* Enhancement: Shortcode Embeds: New Wufoo Shortcode from WordPress.com
+* Enhancement: Shortcode Embeds: Mixcloud: handle accented characters in URLs
+* Enhancement: Site Logo: Adding itemprops to support logo schema.
+* Enhancement: Slideshow Gallery: New parameters *size* and *autostart*
+* Enhancement: Slideshow Gallery: Use more reliable CSS for resizing instead of js
+* Enhancement: Stats: No longer track stats for preview pages
+* Enhancement: Tiled Gallery: Improve the shapes and distributions of shapes in the Tiled Gallery, based on observations for its usage.
+* Enhancement: Protect: Whitelist for multisite globally and locally
+* Enhancement: Sharing: LinkedIn always uses https for share counts. (saved extra http request)
+* Bug Fix: Carousel: Jetpack Carousel now supports HTML5 gallery
+* Bug Fix: Extra Sidebar Widgets: Choose Images button works in accessibility mode
+* Bug Fix: General: Fix: Cannot remove hooks from filter 'jetpack_get_available_modules'
+* Bug Fix: Infinite Scroll: Check that search terms exist before matching against post title. fixes #2075
+* Bug Fix: Likes: Never double show on search results
+* Bug Fix: Notifications: Notifications didn't load on wp-admin/network pages
+* Bug Fix: Sharing: Fix Facebook share button not showing for Australian & Canadian locale
+* Bug Fix: Shortcode Embed: Slideshare Shortcode now fixed
+* Bug Fix: SSO: Hide login no matter what when using the filter to do so
+* Bug Fix: Subs Widget: Don't hide email input if submit failed
+* Bug Fix: Tiled Gallery: Show columns setting for Thumbnail Grid when Tiled Mosaic galleries are the default
+* Bug Fix: Twitter Cards: Remove deprecated card types
+
+= 3.5.3 =
+Release Date: May 6th, 2015
+
+* Security Hardening: Remove Genericons example.html file.
+
+= 3.5.2 =
+Release Date: May 5th, 2015
+
+* Bug Fix: Sharing: Changes Facebook share count endpoint
+
+
+= 3.5.1 =
+Release Date: May 5th, 2015
+
+* Enhancement: Sharing: Changes Facebook share count method per Facebook API change
+* Enhancement: General: Remove .po files to reduce plugin size
+* Bug Fix: General: Remove identity crisis notification
+* Bug Fix: Subscriptions: Correct required input validation
+* Security hardening
+
+= 3.5 =
+Release Date: April 23rd, 2015
+Release Post: http://jetpack.me/2016/04/23/jetpack-3-5-menu-management/
+
+Jetpack 3.5 introduces the ability to manage your site's menus directly from WordPress.com and several bug fixes and enhancements. This upgrade is recommended for all users.
+
+* Enhancement: General: Change security reporting to use a transient instead of option to reduce backup load
+* Enhancement: General: Improve module search
+* Enhancement: JSON API: Allow users to manage menus through WordPress.com
+* Enhancement: Sharing: Reduce spam through email sharing
+* Bug Fix: Custom CSS: Improve recall of CSS revisions
+* Bug Fix: Extra Sidebar Widgets: Change class name for Contact Info widget
+* Bug Fix: Extra Sidebar Widgets: Fix errors when adding widgets via the customizer
+* Bug Fix: Extra Sidebar Widgets: Fix PHP notices in RSS widget
+* Bug Fix: General: Fix redirect loop on activation
+* Bug Fix: General: Styling fixes
+* Bug Fix: Protect: Add IP translation fallback when inet_pton is not available
+* Bug Fix: Protect: Always allow login from local IDs
+* Bug Fix: Protect: Sanitize displayed IP after block
+* Bug Fix: Publicize: Prevent generating Facebook profile links for app-scoped user IDs
+* Bug Fix: Subscriptions: Improve error handling
+* Bug Fix: Theme Tools: Include breadcrumb code
+* Misc: Extra Sidebar Widgets: Remove Readmill Widget
+
+= 3.4.3 =
+Release Date: April 20th, 2015
+
+* Security hardening.
+
+= 3.4.2 =
+Release Date: April 19th, 2015
+
+* Bug Fix: Contact info widget namespacing
+* Bug Fix: Javascript errors on wp-admin due to stats display code
+* Bug Fix: Potential fatal error from improperly called function
+* Bug Fix: Potential fatal error when protect servers are unreachable for WordPress Multisite
+
+= 3.4.1 =
+Release Date: March 19th, 2015
+
+* Bug Fix: General: Modules not displaying properly in non-English installs
+* Bug Fix: Manage: Some installs showing a transient fatal error
+* Bug Fix: Protect: Protect module not auto-activating for users who upgrade
+* Bug Fix: Omnisearch: Some installs not properly reporting WP version number, causing Omnisearch error
+* Bug Fix: Stats: Top posts/pages widget not loading
+* Bug Fix: Contact Info Widget: Fix conflict with Avada theme
+
+= 3.4 =
+Release Date: March 18th, 2015
+
+Release Post: http://jetpack.me/2015/03/17/jetpack-3-4-protect-secure-and-simplify/
+
+* Enhancement : Config Settings: provide a notification for users that update features settings
+* Enhancement : Config Settings: provide a notification for users that update features settings
+* Enhancement : Contact Form: Use the predefined $title variable in the anchor tag in grunion contact form button
+* Enhancement : Contact Form: Use the predefined $title variable in the anchor tag in the button on admin
+* Enhancement : Custom Content Type: Add all Custom Post Types to Omnisearch
+* Enhancement : Custom Content Type: Add option to add Testimonial Custom Content Type in admin
+* Enhancement : Custom Content Type: bring consistency between the portfolio and testimonial shared codebase
+* Enhancement : Custom Content Type: code cleanup
+* Enhancement : Custom Content Type: register namespaced 'jetpack_portfolio' shortcode/use a prefix for shortcode for Portfolio
+* Enhancement : Custom Content Type: set shortcode image size to 'large' and add jetpack_portfolio_thumbnail_size filter to allow themes to set their own size for Portfolio
+* Enhancement : Custom Content Type: testimonial shortcode enhancement
+* Enhancement : Extra Sidebar Widgets: Add subscription widget wildcard
+* Enhancement : Extra Sidebar Widgets: Likes and Sharing Shortcodes
+* Enhancement : Extra Sidebar Widgets: Minor fixes to Facebook widget plugin for SSL
+* Enhancement : Fix/update jetpack version
+* Enhancement : General: Add DNS Prefetching
+* Enhancement : General: Add Jetpack admin dashboard widget
+* Enhancement : GlotPress: Update GP_Locales and GP_Locale classes
+* Enhancement : Improved control over Nova Theme Menu output markup
+* Enhancement : Infinite Scroll: Adds a `button` wrapper for the infinity handle.
+* Enhancement : Infinite Scroll: Check for response.html before using indexOf
+* Enhancement : Integrate BruteProtect for protection against Brute Force attacks
+* Enhancement : JSON API Manage: Added Mock Jetpack Option to Sync options that don't have to live in the Database
+* Enhancement : JSON API: Add/empty trash days option to sync
+* Enhancement : Jump Start: Add "Jump Start" interface for new users
+* Enhancement : Manage: Add "modified_before" and "modified_after" parameters to /sites/%s/posts/ via JSON API
+* Enhancement : Mobile Theme: Add filter for choosing mobile theme menu
+* Enhancement : Notifications: Changes to load the new notifications client.
+* Enhancement : Protect: Add a filter so that user can add thier own bots
+* Enhancement : Protect: Add security reporting
+* Enhancement : Protect: Add/whitelist endpoints via JSON API for Jetpack Protect
+* Enhancement : Publicize: update connection confirmation message
+* Enhancement : Sharing: Add custom service name as a class
+* Enhancement : Sharing: display name of custom service in link title
+* Enhancement : Sharing: Remove default post types for showing share links
+* Enhancement : Sharing: use Jetpack version number when enqueing sharing.js
+* Enhancement : Shortcodes Team Partnerships: Backport fixes from SoundCloud 2.3.1 through 3.0.2
+* Enhancement : Shortlinks: use HTTPS when possible
+* Enhancement : Stats: Make loading of stats async
+* Enhancement : Subscriptions: Added settings field for comment sub text
+* Enhancement : Subscriptions: Hide Form After Submit
+* Enhancement : Subscriptions: remove label from widget title
+* Enhancement : Subscriptions: Update subscriptions.php
+* Bug Fix : Contact form: Increase CSS specificity for Contact Forms in widgets
+* Bug Fix : Custom Content Type: Testimonial Custom Content Type: use core `WP_Customize_Image_Control` instead of custom...
+* Bug Fix : Extra Sidebar Widgets: add missing & to if statement for widget visibility
+* Bug Fix : Extra Sidebar Widgets: Don't require height/width values in the Twitter Timeline widget
+* Bug Fix : Extra Sidebar Widgets: Upload images from the customizer/Extra Sidebar Widgets Tiled Galleries for Gallery Widget
+* Bug Fix : General: Fix bug that was preventing modules from displaying properly
+* Bug Fix : Manage: When calling /sites/%s/posts/ include all attachments not just the first five via JSON API
+* Bug Fix : Mobile Theme: Minileven; Start after DOM ready
+* Bug Fix : Sharing: Open sharing in same window
+* Bug Fix : Stats language
+* Bug Fix : Subscritpions: fix invalid field when no email address
+
+
+= 3.3.2 =
+Release Date: February 19th, 2015
+
+* Enhancement: Updated translation files.
+* Enhancement: Heartbeat: Correctly stat new datasets.
+* Bug Fix: Widget Visibility: Correct some caching of visibility results that may get evaluated too soon.
+* Bug Fix: Contact Form: Hardening.
+* Bug Fix: Photon: Make sure our gallery filter can parse array inputs as well as the default html.
+
+= 3.3.1 =
+Release Date: February 11th, 2015
+
+* Bug Fix: JSON API: Minor versioning data.
+* Bug Fix: Markdown: Re-run KSES after processing to account for syntax changes.
+* Bug Fix: Media Extractor: Don't call a gallery a gallery if it hasn't got any pictures!
+* Bug Fix: Module Management: Handle a core api change for folks running trunk.
+* Bug Fix: Related Posts: CSS -- better clear rows.
+* Bug Fix: Sharing: Including sharing account on Pinterest unofficial buttons as well.
+* Bug Fix: Sharing: Properly version external assets by Jetpack release version.
+* Bug Fix: Shortcodes: Soundcloud: Backport API compatibility fixes.
+* Bug Fix: Shortcodes: Flickr: Tidy up our regex url pattern matching.
+* Bug Fix: Subscriptions: Don't add 'Email Address' as the value -- we have placeholders!
+* Bug Fix: Widgets: Gallery Widget: Allow folks to upload images from the widget area in the customizer.
+
+= 3.3 =
+Release Date: December 15th, 2014
+Release Post: http://jetpack.me/2014/12/16/jetpack-3-3-a-single-home-for-all-your-wordpress-sites/
+
+* Enhancement: Adds responsive video support to BuddyPress.
+* Enhancement: Custom Content Types: Added 'order' and 'orderby' options to portfolio shortcode.
+* Enhancement: Display notice when Jetpack Development Mode is on.
+* Enhancement: General: Update compatibility with Twenty Fifteen.
+* Enhancement: Image URL can now be overwritten with the `jetpack_images_fit_image_url_override` filter after dimensions are set by Photon.
+* Enhancement: JSON API: Add Endpoint for trigger Plugin Autoupdates.
+* Enhancement: JSON API: General Improvements. Documentation on http://developer.wordpress.com/
+* Enhancement: Likes: Updated the code to accept arbitrary CPTs.
+* Enhancement: Related Posts: Allow filter by `post_format`.
+* Enhancement: Sharing: add new `jetpack_sharing_counts` filter for option to turn off sharing counts.
+* Enhancement: Sharing: Use the Site Logo Theme Tool and the Site Icon as fallbacks for image tags.
+* Enhancement: Shortcodes: Made the code more readable by using output buffers instead of string concatenation.
+* Enhancement: Site Logo: Add alias functions to provide backward compatibility for themes expecting the old function calls.
+* Enhancement: Slideshow: Add title and alt text to images.
+* Enhancement: Subscription Form: Do not display the logged in user's email address by default.
+* Enhancement: Top Posts Widget: Refactor to allow conditional loading of the css.
+* Enhancement: Top Posts: Add `jetpack_top_posts_widget_count` filter to control number of displayed posts.
+* Bug Fix: Change subscribe_text from `p` to `div` so that it can contain block-level elements.
+* Bug Fix: Fonts: Change path to look for the svg in the right directory.
+* Bug Fix: Increase CSS specificity for Contact Forms in widgets.
+* Bug Fix: JSON API: Plugins Update: Make sure the plugin doesn't get deactivated.
+* Bug Fix: Likes: Fixes issues where likes don't load, load master iframe after scripts are loaded.
+* Bug Fix: Notes Module: Avoid a PHP Notice in cli scripts when the request doesn't contain a User-Agent header.
+* Bug Fix: Nova Menu CPT: fix notice when we have no taxonomies.
+* Bug Fix: Nova Menus: Use current instance to maintain object context.
+* Bug Fix: Related Posts: Add filter for `_enabled_for_request()`.
+* Bug Fix: Sharing: Prevent duplicate @ in shared Tweets.
+* Bug Fix: Site Logo: `get_site_logo()` now properly returns the site logo ID when provided in the `$show` argument.
+* Bug Fix: Site Logo: Correct evaluation of the Display Header Text in Customizer preview.
+
+= 3.2.1 =
+Release Date: November 14th, 2014
+
+* Enhancement: Updated translation files.
+* Enhancement: JSON API: More object vars passed back to some queries. Documentation on http://developer.wordpress.com/
+* Bug Fix: JSON API: Pass back correct author in `me/posts` data.
+* Bug Fix: JSON API: Don't check if a post is freshly pressed on remote Jetpack sites where the function doesn't exist.
+* Bug Fix: Site Logo: Add backward-compatible template tags to match the standalone release.
+* Bug Fix: Don't use __DIR__ -- it's 5.3+ only, and WordPress supports back to 5.2.
+* Bug Fix: Retool how we remove the source styles when using the concatenated version.
+* Bug Fix: Shortcodes: TED: Correct default language code from `eng` to `en`.
+* Bug Fix: Gallery Widget: Add a default background color.
+* Bug Fix: Subscription Notifications: Remove the label.
+* Bug Fix: Sharing: enqueue Genericons on static front page as well if selected.
+
+= 3.2 =
+Release Date: October 29, 2014
+Release Post: http://jetpack.me/2014/11/03/jetpack-3-2/
+
+* Enhancement: Speed Improvements (woohoo!).
+* Enhancement: Add site icons: an avatar for your blog.
+* Enhancement: Improvements to API endpoints.
+* Enhancement: Add oEmbed sources (Twitter, SoundCloud, Instagram, DailyMotion, Vine).
+* Enhancement: Add indicators to make it easier to see which modules are active.
+* Enhancement: Improve debug tool.
+* Enhancement: Add new 'Site Logos' code to theme tools, for themes that opt in to support it.
+* Enhancement: Improved caching for related posts.
+* Enhancement: Added "Remember Me" functionality to Single Sign On.
+* Enhancement: Improved accessibility.
+* Enhancement: Added additional filters to Widget Visibility.
+* Bug Fix: Fixed PHP Notice errors for Likes, Widget Visibility.
+* Bug Fix: Improvements to the testimonials CPT.
+* Bug Fix: Improved RTL on VideoPress admin.
+* Bug Fix: Removed Google+ Authorship module (discontinued by Google).
+* Bug Fix: Fixed use of deprecated function in mobile theme.
+* Bug Fix: Various fixes to Tiled Galleries.
+* Bug Fix: Various fixes to Contact Form.
+* Bug Fix: Various fixes to oEmbed.
+* Bug Fix: Various fixes to Single Sign On.
+* Bug Fix: Fixed styles in ShareDaddy.
+* Bug Fix: Better match protocols (http/https) to the site.
+
+
+= 3.1.1 =
+Release Date: August 7, 2014
+
+* Enhancement: Update translation files for strings that had been submitted/approved since release.
+* Bug Fix: Social Links: Add a function check to better degrade if Publicize isn't around.
+* Bug Fix: Open Graph: Add WordPress SEO back to the blacklist, until they update how they opt us out.
+* Bug Fix: Asset Minification: Add another caveat ( empty $plugin ) to short out on.
+* Bug Fix: Deprecated Hooks: Fixing our expectations where something that should be an array occasionally wasn't.
+* Bug Fix: Custom CSS: Add extra whitelist rule for -o-keyframe rules.
+
+= 3.1 =
+Release Date: July 31, 2014
+Release Post: http://jetpack.me/2014/07/31/jetpack-3-1-portfolio-custom-post-types-a-new-logo-and-much-more/
+
+* Enhancement: New Custom Content Types module.
+* Enhancement: New Jetpack Logo.
+* Enhancement: New optional JSON API endpoints for viewing updates and managing plugins and themes.
+* Enhancement: New Custom Post Type: Portfolio!
+* Enhancement: Rearranged buttons on the modules modals for easier management.
+* Enhancement: Jetpack Settings have improved keyboard accessibility.
+* Enhancement: Improved RTL support for After the Deadline, Carousel, Contact Form, Comics CPT, Custom CSS, Omnisearch, Publicize, Related Posts, Slideshow short code, Tiled Gallery, Widget-Visibility and Widgets Gallery.
+* Enhancement: Contact Form: Add an "Empty Spam" option.
+* Enhancement: i18n: Change the priority of where plugin_textdomain is hooked so that the plugins can better translate Jetpack.
+* Enhancement: Monitor: Displays how often the site is checked for downtime.
+* Enhancement: Shortcode: Added Mixcloud shortcode and oEmbed support.
+* Enhancement: Social Links: Improved handling of customizer hooks in non-admin context.
+* Enhancement: Stats: The smiley image is gone by default.
+* Enhancement: Stats: Added link to the configure page for stats so that the stats settings page is easier to find.
+* Enhancement: Theme Tools: Added the responsive videos to theme tools so that themes can support responsive videos more easily.
+* Update: Updated Genericons to version 3.1, new icons for website, ellipsis, foursquare, x-post, sitemap, hierarchy and paintbrush.
+* Bug Fix: Contact Form: Prefix function to avoid conflicts with other plugins.
+* Bug Fix: Custom CSS: Admin UI has a responsive layout.
+* Bug Fix: Custom CSS: Custom $content_width value doesn't overwrite theme's $content_width.
+* Bug Fix: Contact Form: Feedback link takes you to the form page.
+* Bug Fix: Carousel: Confirms an avatar is returned by get_avatar before displaying.
+* Bug Fix: Featured Content: Don't remove setting validation.
+* Bug Fix: Infinite Scroll: Google Universal Analytics support added.
+* Bug Fix: Multisite: Add message when updating multisite settings.
+* Bug Fix: Photon: Photon will no longer upscale images larger than the original size.
+* Bug Fix: Photon: Check that the image exists before rewriting the image URL to utilize Photon.
+* Bug Fix: Sharing: Pinterest adds attribute to display share count.
+* Bug Fix: Sharing: Respect an empty sharing title.
+* Bug Fix: Sharing: Share buttons now appear in the bbPress forms.
+* Bug Fix: Sharing: Support for multiple meta html tag og:image values.
+* Bug Fix: Single Sign On: Logout allows override of forcing Single Sign On.
+* Bug Fix: Single Sign On: Remove the lost password link on auto-forward logout.
+* Bug Fix: Social Links: Do not use anonymous function for compatibility with PHP 5.2.
+* Bug Fix: Tiled Galleries: Update jQuery mouseover caption effect to reduce flickering.
+* Bug Fix: Widgets Visibility: Works better in the customizer admin view.
+
+= 3.0.2 =
+Release Date: June 17, 2014
+
+* Enhancement: General: Make module categories filter more visible when active.
+* Enhancement: General: Updated translation files with more strings added since the last release.
+* Enhancement: General: Allow deep-linking to the Contact Support form.
+* Bug Fix: General: RTL Jetpack Admin UI looks better.
+* Bug Fix: General: Fixed PHP warning when bulk deactivating modules.
+* Bug Fix: General: Removed an unnecessary description.
+* Bug Fix: General: Resolved an SSL error on Jetpack Admin UI.
+* Bug Fix: General: Fix error comparing signatures when the WordPress installation is using site_url filters (applied mostly to WPEngine sites).
+* Bug Fix: General: Resolved PHP strict error on the mobile menu.
+* Bug Fix: General: Fix timing of conditional checks, so that calling developer mode via a plugin works again.
+* Bug Fix: General: Main page categories tab now properly translates module names.
+* Bug Fix: Related Posts: Fix a typo, the "more info" link now works.
+* Bug Fix: Likes: Improve button styling.
+* Bug Fix: Likes: Remove unused UI for Reblog settings on social settings page.
+* Bug Fix: Contact Form: Updated to no longer use a deprecated Akismet function.
+* Bug Fix: Contact Form: Sends email to the administrator that is not marked as spam again.
+* Bug Fix: Open Graph: Resolved PHP warning on open graph gallery pages when the gallery is empty.
+
+= 3.0.1 =
+Release Date: May 22, 2014
+
+* Bug Fix: AtD: A wpcom-only function got synced by mistake and caused a few errors. Fixed.
+* Bug Fix: Post By Email: Add static keyword to a function.
+* Bug Fix: ShareDaddy: In the admin-side configuration of sharing links, we used a Path icon instead of Pinterest. Oops!
+* Bug Fix: ShareDaddy: We inadvertently appended `via @jetpack` to some twitter shares. This is no longer the case.
+* Bug Fix: Related Posts: Tidying up and relocation of the `resync` button formerly on the more info modal.
+* Bug Fix: Infinite Scroll: Work better with core's MediaElement.js
+* Bug Fix: Heartbeat: Undeclared variable fixed.
+
+= 3.0 =
+Release Date: May 20, 2014
+Release Post: http://jetpack.me/2014/05/20/jetpack-3-0/
+
+* New User Interface for managing modules and settings
+* New Module: Verfication Tools
+* Enhancement: New look for the Sharing module
+* Enhancement: Multiple improvements on which Twitter handle a Twitter card will display
+* Enhancement: Add option to hide Google+ Authorship banner while still receiving the benefits
+* Enhancement: Many Infinite Scroll enhancements to improve performance
+* Enhancement: Infinite Scroll will use your CPT's display name instead of "Older Posts"
+* Enhancement: JSON API added /media/new endpoint
+* Enhancement: Added filter to assign new default image for Open Graph tags
+* Enhancement: New [jetpack-related-posts] shortcode to add Related Posts to page instead of default placement
+* Enhancement: Added SSO option to turn off login form completely, to use WordPress.com login exclusively
+* Enhancement: The [googlemaps] shortcode allows for Google Maps Engine
+* Enhancement: YouTube shortcode allows HD playback
+* Enhancement: Smoother, Faster Tiled Galleries!
+* Enhancement: New languages! Use Jetpack in Irish, Fulah, and Tigrinya
+* Bug Fix: Use your browser's Back and Forward buttons when naviagating a Carousel
+* Bug Fix: Various Related Posts fixes and improvements for added flexibility
+* Bug Fix: WordPress 3.9: Restores ability to edit Contact Forms
+* Bug Fix: WordPress 3.9: Restores Gallery Widget compatability
+* Bug Fix: Ensure Markdown is kept when Bulk Editing posts
+* Bug Fix: Improved Jetpack's Multisite Network Admin page for networks with a large number of sites
+* Bug Fix: Ensure Sharing settings persist when Bulk Editing a post
+* Bug Fix: Various other shortcode improvements
+
+= 2.9.3 =
+Release Date: April 10, 2014
+
+* Important security update. CVE-2014-0173
+
+= 2.9.2 =
+Release Date: March 17, 2014
+
+* Bug Fix: Publicize: When publishing from a mobile app or third-party client, Publicize now works again.
+
+= 2.9.1 =
+Release Date: March 6, 2014
+
+* Bug Fix: After the Deadline: Fix a Javascript glitch that could prevent publishing of posts.
+* Bug Fix: SSO: Disable the implementation of an option that had been removed before release. This would have only been an issue if a site administrator had enabled the module during an early beta of 2.9.
+
+= 2.9 =
+Release Date: February 26, 2014
+Release Post: http://jetpack.me/2014/02/26/jetpack-2-9/
+
+* Added Multisite network functionality
+* New Module: Related Posts
+* Enhancement: Single Sign On
+* Enhancement: Mixcloud shortcode and oEmbed
+* Enhancement: Gist shortcode and oEmbed
+* Enhancement: Modify Facebook Like Box widget to support new Facebook parameters
+* Enhancement: Rolled the Push Notifications module into the Notes module
+* Enhancement: Update kses with Markdown
+* Enhancement: Adding keyboard accessibility to sharing buttons config page
+* Enhancement: Pull WordPress testing bits from the new official git mirror at WordPress.org
+* Bug Fix: Widget Visibility
+* Bug Fix: Revisions box in Custom CSS
+* Bug Fix: Fix several bugs in the WordPress Posts Widget so that it correctly updates
+* Bug Fix: Limit Login Attempts no longer generates false positives from xmlrpc.
+* Bug Fix: Clear max_posts transient on theme switch.
+* Bug Fix: Lower priority of sync to allow all CPTs to be registered.
+* Bug Fix: Contact form fields emailed in correct order.
+
+* Other bugfixes and enhancements at https://github.com/Automattic/jetpack/commits/2.9
+
+= 2.8 =
+Release Date: January 31, 2014
+Release Post: http://jetpack.me/2014/01/31/jetpack-2-8-introducing-markdown-and-improving-monitor/
+
+* New Module: Markdown
+* Module Update: Jetpack Monitor
+* Enhancement: Infinite Scroll: Keep track of $current_day between requests so the_date() works well.
+* Enhancement: Embeds: New filter to turn off embeds in comments.
+* Enhancement: Contact Form: Add placeholder support.
+* Enhancement: Widget: Gravatar Profile: Added filters to allow users to customize headings and fixed output of personal links.
+* Enhancement: Facebook OG Tags: Add `published_time`, `modified_time`, and `author` if the post type supports it.
+* Enhancement: Sharing: Display buttons on CPT archive pages.
+* Enhancement: Sharing: Add `get_share_title` function and filter.
+* Enhancement: Sharing: Add filter `sharing_display_link`.
+* Enhancement: Twitter Timeline: Flesh out tweet limit option.
+* Enhancement: Social Links: Add Google+ to the list of supported services.
+* Enhancement: Stats: Improve dashboard styles in 3.8.
+* Enhancement: Stats: No longer use Quantcast.
+* Enhancement: Top Posts: Add `jetpack_top_posts_days` filter.
+* Enhancement: AtD: Add TinyMCE 4 compatibility for its pending arrival in WordPress 3.9
+* Enhancement: Genericons: Update to v3.0.3
+* Enhancement: Tiled Galleries: Add alt attributes to images.
+* Enhancement: Shortcode: YouTube: Accept protocol-relative URLs.
+* Enhancement: Shortcode: Slideshow: Add white background option.
+* Enhancement: Shortcode: YouTube: Add support for the two closed-caption arguments.
+* Enhancement: Shortcode: Vimeo: Update the regex to support the new embed code.
+* Enhancement: Shortcode: Google Maps: Update the regex to handle new format for embeds.
+* Enhancement: Likes: Avoid a PHP Notice when $_POST['post_type'] is not set in meta_box_save.
+* Enhancement: Smush images to save on file size.
+* Enhancement: Publicize: Enable opt-in publicizing of custom post types.
+* Bug Fix: Random Redirect: Further namespace to avoid conflicts.
+* Bug Fix: Twitter Timeline: Resolve undefined index notice.
+* Bug Fix: Featured Content: Add extra class_exists() check to be extra careful.
+* Bug Fix: Facebook OG Tags: Change OG type of Home and Front Page to 'website'
+* Bug Fix: Widget Visibility: Add support for old-style single use widgets.
+* Bug Fix: Google Authorship: Support apostrophe in author names.
+* Bug Fix: Media Extractor: Assorted graceful failure caveats.
+* Bug Fix: Carousel: 'Link to None' bug fixed.
+* Bug Fix: Embeds: Bandcamp: Switch escaping function for album and track IDs to handle (int)s greater than PHP_INT_MAX
+* Bug Fix: Some plugins trying to catch brute-force attacks mistakenly flagged the Jetpack connection as one.
+
+= 2.7 =
+Release Date: December 11, 2013
+Release Post: http://jetpack.me/2013/12/11/jetpack-2-7-publicize/
+
+* Enhancement: Google+ Publicize
+* Enhancement: Add Cloudup as an oEmbed provider
+* Enhancement: Subscriptions: Add subscribe_field_id filter to allow updated ids when using multiple widgets
+* Enhancement: Infinite Scroll: TwentyFourteen Support
+* Bug Fix: Contact Form: Fix warning when form is called outside the loop
+* Bug Fix: Featured Content: Moving Settings to Customizer, provide option to set default tag as fallback, specify all supported post-types rather than just additional ones. Description Updates
+* Bug Fix: Featured Content: Compat with 'additional_post_types' theme support argument. Comment updates
+* Bug Fix: Featured Content: Make sure $term is an object before we treat it as one
+* Bug Fix: GlotPress: Merge with latest GlotPress
+* Bug Fix: Infinite Scroll: prevent Undefined index notice that can cause IS to fail when user has WP_DEBUG set to true
+* Bug Fix: Infinite Scroll: Improved compatibility with Carousel, Tiled Galleries, VideoPress, and the `[audio]` and `[video]` shortcodes
+* Bug Fix: Likes: Stop manually including version.php and trust the global. Some whitespace fixes, and if it's an attachment, follow the post_status of the parent post
+* Bug Fix: Mobile Theme: Display password field for Gallery format protected posts
+* Bug Fix: Sharing: Add new translation width for share button, and Google Plus icons
+* Bug Fix: Shortcodes: Support Ineternational Google domains for maps
+* Bug Fix: Shortcodes: Facebook Embeds: Register alternate permalink.php URL for posts
+* Bug Fix: Subscriptions: Moved inline styles from widget email input to separate css file
+* Bug Fix: Theme Tools: Fix glitch where random-redirect.php also showed as a plugin being deleted if you were deleting Jetpack
+* Bug Fix: Misc: Internationalization & RTL updates
+* Bug Fix: Misc: Prevent collisions with 'Facebook Featured Image & OG Meta Tags' plugin
+
+= 2.6.1 =
+Release Date: December 3, 2013
+
+* Bug Fix: minor styling fix in pre- and post-MP6/3.8 UI changes.
+* Bug Fix: Stats: spinner gif url fix when the user is viewing it over https.
+* Bug Fix: Stats: Switch to esc_html from htmlspecialchars in error message -- better to be native
+* Bug Fix: Media Extractor: some hosts don't compile unicode for preg_match_all, so we temporarily removed the block that depended on it.
+* Bug Fix: Media Extractor: Add in some error handling for malformed URLs.
+* Bug Fix: Twitter Cards: treat single-image galleries as a photo-type.
+* Bug Fix: Update conflicting plugins for OG tags and Twitter Cards.
+* Bug Fix: Correct max supported version number -- had been 3.6, update to 3.7.1
+
+= 2.6 =
+Release Date: November 28, 2013
+Release Post: http://jetpack.me/2013/11/26/new-release-jetpack-2-6/
+
+* Enhancement: WPCC / now called [SSO](http://jetpack.me/support/sso/): refactored.
+* Enhancement: Monitor: new module which will notify you if your site goes down(http://jetpack.me/support/monitor/).
+* Enhancement: Custom CSS: replace Ace editor with Codemirror.
+* Enhancement: Widgets: new “Display Posts” widget.
+* Enhancement: WP-CLI: add commands to disconnect a site and manage modules.
+* Enhancement: Contact Form: new filters, `grunion_contact_form_field_html` and `grunion_should_send_email`.
+* Enhancement: Custom Post Types: new restaurant post type.
+* Enhancement: Genericons: update to version 3.0.2.
+* Enhancement: Infinite Scroll: many improvements and fixes.
+* Enhancement: Likes: performance improvements.
+* Enhancement: MP6: Jetpack icons are now compatible with WordPress 3.8.
+* Enhancement: Open Graph: better descriptions, fallback images, and media extraction from video posts.
+* Enhancement: Publicize: new background token tests for connected publicize services and display problems on settings sharing and add new post.
+* Enhancement: Shortcodes: updated Bandcamp shortcode to support the `tracklist` and `minimal` attributes, as well as more `artwork` attribute values.
+* Enhancement: Shortlinks: add Custom Post Type support.
+* Enhancement: Subscriptions: add more ways to customize the subscriptions widget.
+* Enhancement: Twitter Cards: better media management and card type detection, and better handling of conflicts with other Twitter Cards plugins.
+* Enhancement: better handling of conflicts with other plugins.
+* Bug Fix: After the Deadline: add a typeof check for `tinyMCEPreInit.mceInit` to prevent js errors.
+* Bug Fix: Carousel: speed improvements and several bugfixes.
+* Bug Fix: Contact Form: remove nonce creating issues with caching plugins.
+* Bug Fix: Custom Post Types: Testimonials: return if featured image is empty so it can be removed after it’s been set.
+* Bug Fix: Featured Content: add additional post type support through the `additional_post_types` argument.
+* Bug Fix: Google Authorship: support apostrophes in Google+ profiles.
+* Bug Fix: Google Authorship: use a regexp Instead of using `mb_convert_encoding`, which doesn’t enjoy universal support.
+* Bug Fix: Heartbeat: ensure that it never triggers more than once per week.
+* Bug Fix: JSON API: add new `?meta=` parameter that allows you to expand the data found in the `meta->links` responses.
+* Bug Fix: JSON API: add new `is_private` response to the sites endpoint and `global_ID` response to the reader and post endpoints.
+* Bug Fix: Mobile Theme: allow small images to display inline.
+* Bug Fix: Mobile Theme: fix fatal errors for missing `minileven_header` function.
+* Bug Fix: Photon: fix errors when an image is not uploaded properly.
+* Bug Fix: Shortcodes: improvements to Archives, Google+, Presentations, Vine and Youtube.
+* Bug Fix: Tiled Galleries: improve display of panoramic images and fix errors when an image is not uploaded properly.
+
+= 2.5 =
+Release Date: September 19, 2013
+Release Post: http://jetpack.me/2013/09/19/jetpack-2-5/
+
+* Enhancement: Connect your Google+ profile and WordPress site to prove authorship of posts.
+* Enhancement: Improved sharing buttons display.
+* Enhancement: Comment on your posts using Google+ to signin.
+* Enhancement: Embed Google+ posts into your posts.
+* Enhancement: Added event logging capabilities for debugging
+* Enhancement: LaTeX is now available in dev mode
+* Enhancement: Introduced gallery widget
+* Enhancement: Added new module: VideoPress
+* Enhancement: Updated identity crisis checker
+* Enhancement: Tiled Gallery widget added
+* Enhancement: Google +1 button changed to Google+ Share button, to avoid confusion
+* Enhancement: Added check to ensure Google+ authorship accounts have disconnected properly
+* Enhancement: Updated identity crisis checker
+* Enhancement: Tiled Gallery widget added
+* Enhancement: Google +1 button changed to Google+ Share button, to avoid confusion
+* Enhancement: Added the ability to embed Facebook posts
+* Bug Fix: Redirect issue with G+ authorship when WordPress is not in the root directory
+* Enhancement: Better security if carousel to prevent self-XSS
+* Enhancement: Better handling of cookies for subsites on multisite installs
+* Bug Fix: Check for post in G+ authorship before accessing it
+
+= 2.4.2 =
+Release Date: September 5, 2013
+
+* Enhancement: Converted to module headers to detect Auto-Activating modules.
+* Enhancement: WPCC: Added 'Close' link to deactivate WPCC in the admin nag.
+* Enhancement: JSON API: Add User Nicename to the user data.
+* Bug Fix: Contact Form: Stopped using a short tag.
+* Bug Fix: Changed CSS selector to catch MP6 stylings.
+* Bug Fix: Dropped __FILE__ references in class.jetpack.php in favor of JETPACK__PLUGIN_DIR constant, now code that deactivates the plugin from the connect nag works again.
+* Bug Fix: Random Redirect: Add random-redirect to the plugins overriden list, in case someone is using Matt's Random Redirect plugin.
+* Bug Fix: Tiled Gallery: Revert r757178 relating to tiled gallery defaults.
+* Bug Fix: Return false, not zero, if $GLOBALS['content_width'] isn't defined.
+* Bug Fix: WPCC: Don't call wp_login_url() in the constructor -- if someone is running a custom login page, that can break things if their plugin runs get_permalink as a filter before init.
+* Bug Fix: Tiled Gallery: Add fallback if post_parent == 0 due to infinite_scroll_load_other_plugins_scripts.
+* Bug Fix: Custom CSS: Set the ACE gutter z-index to 1.
+* Bug Fix: Custom Post Types: Switch from wp_redirect() to wp_safe_redirect().
+* Bug Fix: Likes: Set overflow:hidden; on the likes adminbar item.
+* Bug Fix: Mobile Theme: Migrate where/when the custom header stuff is included.
+* Bug Fix: Slideshow Shortcode: Add a height of 410px.
+
+= 2.4.1 =
+Release Date: September 4, 2013
+
+* Enhancement: Don't auto-activate WPCC.
+
+= 2.4 =
+Release Date: August 30, 2013
+Release Post: http://jetpack.me/2013/09/04/jetpack-2-4-widget-visibility-and-wpcc-and-more/
+
+* Enhancement: WordPress.com Connect (WPCC): New Module.
+* Enhancement: Widget Visibility: New Module.
+* Enhancement: Shortcode: Addition of new Twitter Timeline shortcode.
+* Enhancement: Shortcode: Addition of new Presentation shortcode.
+* Enhancement: Shortcode: Addition of new Vine shortcode.
+* Enhancement: Custom Post Types: CPTs are available.
+* Enhancement: Subscriptions: Add 'jetpack_is_post_mailable' filter.
+* Enhancement: OpenGraph: Add Twitter Cards meta tags as well.
+* Enhancement: Custom CSS: Update lessc and scssc preprocessors to 0.4.0 and 0.0.7 respectively.
+* Enhancement: Omnisearch: Add Media results.
+* Enhancement: Likes: Use a protocol-agnostic iframe, instead of forced HTTPS.
+* Enhancement: Top Posts: Increase post limit.
+* Enhancement: Publicize: Updated JS and UI.
+* Enhancement: Photon: New filter to let site admins/owners enable photon for HTTPS urls.
+* Enhancement: New jetpack_get_available_modules filter.
+* Enhancement: Subscriptions: Antispam measures.
+* Bug Fix: Add inline style to keep plugins/themes from inadvertently hiding the Connect box.
+* Bug Fix: Custom CSS: Respect the new wp_revisions_to_keep filter.
+* Bug Fix: Photon: Only hook jetpack_photon_url into the filter if the user has Photon active.
+* Bug Fix: Heartbeat: Used wrong object, occasinally fatal-erroring out for the cron.
+* Bug Fix: Add an empty debug.php file to the /modules/ folder, to solve some update issues where it never got deleted.
+
+= 2.3.5 =
+Release Date: August 12, 2013
+
+* Enhancement: Added Path support to Publicize.
+
+= 2.3.4 =
+Release Date: August 6, 2013
+
+* Bug Fix: Correct when output occurs with CSV export for feedback.
+* Bug Fix: Tidy up the Heartbeat API.
+* Enhancement: User Agent: Improve detecting of bots.
+* Enhancement: Genericons: Make sure we're pulling the freshest version from genericons.com on each release.
+* Enhancement: JSON API: Open up replies/new endpoints so that users can comment on blogs that are not in their access token.
+* Enhancement: Photon: Apply to `get_post_gallery()` function as well.
+* Enhancement: Tiled Galleries: Add a default bottom margin to be more robust out of the box.
+* Translations: Adding in fresher translation files.
+* Deprecation: Removing the retinization code for 3.4, as it was included in WordPress trunk from 3.5 onwards.
+
+= 2.3.3 =
+Release Date: July 26, 2013
+
+* Bug Fix: We were inadvertently overwriting cron schedules with our Jetpack heartbeat. This should now be fixed.
+* Enhancement: New Facebook Sharing icons.
+* Enhancement: Minor update to the Minileven stylesheet.
+
+= 2.3.2 =
+Release Date: July 25, 2013
+
+* Bug Fix: Fixed an issue where Facebook Pages were not available when connecting a Publicize account.
+* Bug Fix: For some web hosts, fixed an issue where 'Jetpack ID' error would occur consistently on connecting to WordPress.com.
+* Enhancement: Adding some new stats and heartbeat checking to Jetpack.
+
+= 2.3.1 =
+Release Date: July 2, 2013
+
+* Enhancement: Social Links: Retooling the class for better consistency and performance behind the scenes.
+* Enhancement: Omnisearch: Make it easier to search Custom Post Types. No longer need to extend the class, if all you want is a basic display. Just call `new Jetpack_Omnisearch_Posts( 'cpt' );`
+* Enhancement: Sharing Buttons: LinkedIn: Use the official button's sharing link on the Jetpack implementation for a more consistent sharing experience and produce better results on LinkedIn's end.
+* Enhancement: Debug / Connection: Better logic in determining whether the server can use SSL to connect to WPCOM servers.
+* Enhancement: Sharing: Twitter: Calculate the size of the Tweet based on the short URL rather than the full URL size.
+* Enhancement: Debug: More readable and understandable messages.
+* Enhancement: Likes: Including some MP6 styles.
+* Enhancement: Comments: Add new core classes to comment form. See http://core.trac.wordpress.org/changeset/24525
+* Bug Fix: Omnisearch: Don't load everything initially, run the providers off admin_init, and then issue an action for folks to hook into.
+* Bug Fix: Omnisearch: Modify some child class functions to match the parent's parameters and avoid strict notices in newer versions of PHP.
+* Bug Fix: Omnisearch: Hide the search form in the module description if the current user can't use it.
+* Bug Fix: Comment Form: Use edit_pages, not edit_page (fixes glitch in previous beta, never publicly released).
+* Bug Fix: Twitter Timeline Widget: Additional testing of values and casting to default if they are nonconforming.
+* Bug Fix: Sharing: Pinterest: Make the button wider if there's a count to avoid overlapping with others.
+* Bug Fix: Post By Email: Change configuration_redirect to static.
+* Bug Fix: Likes: Don't call configuration_redirect as a static, do it as a method.
+* Bug Fix: Add some further security measures to module activation.
+
+= 2.3 =
+Release Date: June 19, 2013
+Release Post: http://jetpack.me/2013/06/19/jetpack-2-3/
+
+* Enhancement: Omnisearch: Search once, get results from everything! Omnisearch is a single search box that lets you search many different things
+* Enhancement: Debugger: this module helps you debug connection issues right from your dashboard, and contact the Jetpack support team if needed
+* Enhancement: Social Links: this module is a canonical source, based on Publicize, that themes can use to let users specify where social icons should link to
+* Enhancement: It’s now easier to find out if a module is active or note, thanks to the new Jetpack::is_module_active()
+* Enhancement: Contact Form: You are now able to customize the submit button text thanks to the submit_button_text parameter
+* Enhancement: Comments: We've added a filter to let users customize the Comment Reply label, and users can now also customize the prompt on the comment form again.
+* Enhancement: Mobile Theme: Add genericons.css and registering it so it’s easily accessible to other modules that may want it
+* Enhancement: Tiled Galleries: You can now customize the captions, thanks to the jetpack_slideshow_slide_caption filter
+* Enhancement: Widgets: Twitter Timeline: Add the noscrollbar option
+* Enhancement: Widgets: Facebook Like Box Widget: add a show_border attribute
+* Enhancement: Widgets: FB Like Box: let Jetpack users override the iframe background color set in an inline style attribute by using the jetpack_fb_likebox_bg filter
+* Bug Fix: Carousel: Fix a bug where double-clicking a gallery thumbnail broke the carousel functionality
+* Bug Fix: Comments: Change “must-log-in” to class from ID
+* Bug Fix: Contact Form: Make the Add Contact Form link a button, ala Add Media in core
+* Bug Fix: Contact Form: Fix encoding of field labels
+* Bug Fix: Contact Form: Remove references to missing images
+* Bug Fix: Fix 2 XSS vulnerabilities
+* Bug Fix: JSON API: Minor fixes for bbPress compatibility
+* Bug Fix: JSON API: Fix metadata bugs
+* Bug Fix: JSON API: Add a new hook that is fired when a post is posted using the API
+* Bug Fix: JSON API: Prefork/REST: update path normalizer to accept versions other than 1
+* Bug Fix: JSON API: Remove extra parenthesis in CSS
+* Bug Fix: Custom CSS: Move content width filters higher up so that they’re active for all users, not just logged-in admins.
+* Bug Fix: Custom CSS: All CSS properties that accept images as values need to be allowed to be declared multiple times so that cross-browser gradients work
+* Bug Fix: Infinite Scroll: Allow themes to define a custom function to render the IS footer
+* Bug Fix: Infinite Scroll: Fix up Twenty Thirteen styles for RTL and small viewports.
+* Bug Fix: Likes: Fix ‘Call to undefined function’
+* Bug Fix: Likes: Add scrolling no to iframe to make sure that like button in admin bar does not show scrollbars
+* Bug Fix: Likes: Remove setInterval( JetpackLikesWidgetQueueHandler, 250 ) call that was causing heavy CPU load
+* Bug Fix: Mobile Theme: Remove unused variable & function call
+* Bug Fix: Publicize: Fix LinkedIn profile URL generation
+* Bug Fix: Publicize: Better refresh handling for services such as LinkedIn and Facebook
+* Bug Fix: Shortcodes: Audio shortcode: Treat src as element 0. Fixes audio shortcodes created by wp_embed_register_handler when an audio url is on a line by itself
+* Bug Fix: Bandcamp: Updates to the Bandcamp shortcode
+* Bug Fix: Stats: Fix missing function get_editable_roles on non-admin page loads
+* Bug Fix: Widgets: Twitter Timeline: Fix HTML links in admin; set default values for width/height; change some of the sanitization functions
+* Bug Fix: Widgets: Top Posts Widget: Exclude attachments
+* Bug Fix: Widgets: Top Posts Widget: fix data validation for number of posts
+* Bug Fix: Fix PHP warnings non-static method called dynamically
+* Bug Fix: Fixed an issue in image extraction from HTML content
+* Bug Fix: Open Graph: Change default minimum size for og:image too 200×200
+* Note: The old Twitter widget was removed in favour of Twitter Timeline widget
+* Note: Add is_module_active() to make it easier to detect what is and what isn’t
+* Note: Compressing images via lossless methods
+* Note: Tidying up jetpack’s CSS
+* Note: Set the max DB version for our retina overrides that were meant to stop for WordPress 3.5
+* Note: Updating spin.js to the current version, and shifting to the canonical jquery.spin.js library
+* Note: Adding Jetpack_Options class, and abstracting out options functions to it
+
+= 2.2.5 =
+Release Date: May 1, 2013
+
+* Enhancement: Stats: Counting of registered users' views can now be enabled for specific roles
+* Bug Fix: Security tightening for metadata support in the REST API
+* Bug Fix: Update the method for checking Twitter Timeline widget_id and update coding standards
+* Bug Fix: Custom CSS: Allow the content width setting to be larger than the theme's content width
+* Bug Fix: Custom CSS: Fix possible missing argument warning.
+
+= 2.2.4 =
+Release Date: April 26, 2013
+
+* Bug Fix: JSON API compat file include was not assigning a variable correctly, thus throwing errors. This has been resolved.
+
+= 2.2.3 =
+Release Date: April 26, 2013
+
+* Enhancement: Comments - Add the reply-title H3 to the comment form so that themes or user CSS can style it
+* Enhancement: Custom CSS - Support for the CSS @viewport
+* Enhancement: JSON API - Support for i_like, is_following, and is_reblogged
+* Enhancement: JSON API: Custom Post Type Support
+* Enhancement: JSON API: Meta Data Support
+* Enhancement: JSON API: Bundled Support for bbPress
+* Enhancement: JSON API: Additions of following, reblog, and like status for post endpoints.
+* Enhancement: Shortcodes - Add Bandcamp shortcode
+* Enhancement: Tiled Galleries - Add code to get blog_id
+* Bug Fix: Carousel - Support relative image paths incase a plugin is filtering attachment URLs to be relative instead of absolute
+* Bug Fix: Carousel - Add likes widget to images / Respect comment settings for name/email
+* Bug Fix: Carousel - Make name and email optional if the setting in the admin area says they are
+* Bug Fix: Contact Form - Bug fixes, including a fix for WP-CLI
+* Bug Fix: Contact Form - Remove deprecated .live calls, delegate lazily to jQuery(document) since it's all in an iframe modal
+* Bug Fix: Contact Form - RTL styles
+* Bug Fix: Contact Form - Better handle MP6 icons
+* Bug Fix: Custom CSS - array_shift() took a variable by reference, so avoid passing it the result of a function
+* 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>)
+* Bug Fix: Infinite Scroll - Maintain main query's `post__not_in` values when querying posts for IS
+* 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
+* Bug Fix: Infinite Scroll - CSS update - IS footer was too large in Firefox
+* Bug Fix: Infinite Scroll - Add bundled support for Twenty Thirteen default theme
+* Bug Fix: Infinite Scroll - Include posts table's prefix when modifying the SQL WordPress generates to retrieve posts for Infinite Scroll
+* Bug Fix: JSON API - Use wp_set_comment_status to change the comment status, to make sure actions are run where needed
+* Bug Fix: Likes - Update style and logic for matching id's
+* Bug Fix: Mobile Theme - Ensure that <code>minileven_actual_current_theme()</code> is child-theme compatible + other updates
+* Bug Fix: Mobile Theme - Update method for finding currently active theme.
+* Bug Fix: Notifications - Remove the postmessage.js enqueue since this feature solely supports native postMessage
+* Bug Fix: Notifications - Clean up script enqueues and use core versions of underscore and backbone on wpcom as fallbacks
+* Bug Fix: Notifications - Enqueue v2 scripts and style
+* Bug Fix: Notifications - Prefix module-specific scripts and style to prevent collision
+* Bug Fix: Notifications - Include lang and dir attributes on #wpnt-notes-panel so the notifications iframe can use these to display correctly
+* Bug Fix: Open Graph: Use the profile OG type instead of author. Add tags for first/last names
+* Bug Fix: Publicize - Remove the Yahoo! service because they stopped supporting that API entirely
+* Bug Fix: Publicize - fix fatal errors caused by using a method on a non-object. Props @ipstenu
+* Bug Fix: Sharing - Adding 2x graphics for Pocket sharing service
+* Bug Fix: Sharing - Bug fixes, and a new filter
+* Bug Fix: Shortcodes - Audio: make sure that the Jetpack audion shortcode does not override the 3.6 core audio shortcode. Also, we need to filter the old Jetpack-style shortcode to properly set the params for the Core audio shortcode.
+* Bug Fix: Shortcodes - Audio: Re-enable the flash player
+* Bug Fix: Shortcodes - Slideshow: RTL styling update
+* Bug Fix: Tiled Galleries - Fix IE8 display bug where it doesn't honor inline CSS for width on images
+* Bug Fix: Tiled Galleries - Remove depreacted hover call, use mouseenter mouseleave instead
+* Enhancement: Twitter Timeline Widget: New JavaScript based widget. Old one will discontinue May 7th.
+
+= 2.2.2 =
+Release Date: April 5, 2013
+
+* Enhancement: Mobile Theme: Add controls for custom CSS.
+* Enhancement: Sharing: Add Pocket to the available services.
+* Bug Fix: Custom CSS: Update the method for generating content width setting.
+* Bug Fix: JSON API: Security updates.
+* Bug Fix: Likes: Add settings for email notifications and misc style updates.
+* Bug Fix: Notifications: Add the post types to sync after init.
+* Bug Fix: Publicize: RTL styling.
+* Bug Fix: Shortcodes: security fixes and function prefixing.
+* Bug Fix: Widgets: Update wording on the Top Posts widget for clarity.
+* Bug Fix: Jetpack Post Images security fixes.
+
+= 2.2.1 =
+Release Date: March 28, 2013
+
+* Enhancement: Development Mode: Define the `JETPACK_DEV_DEBUG` constant to `true` to enable an offline mode for localhost development. Only modules that don't require a WordPress.com connection can be enabled in this mode.
+* Enhancement: Likes: Added the number of likes to the wp-admin/edit.php screens.
+* Enhancement: Mobile Theme - design refresh
+* Enhancement: Shortcodes - Add a filter to the shortcode loading section so that a plugin can override what Jetpack loads for shortcodes
+* Enhancement: Widgets - Filter Jetpack's widgets so that a plugin can control which widgets get loaded
+* Bug Fix: Comments - Add in a wrapper div with id='commentform'
+* Bug Fix: Contact Form - Added date field with datepicker
+* Bug Fix: Contact Form - Allowed non-text widgets to use contact forms by running their output through the widget_text filter
+* Bug Fix: Custom CSS - Allowing color values to be defined multiple times
+* Bug Fix: Custom CSS - Dynamically loading the correct CSS/LESS/SCSS mode for the CSS editor if the user changes the preprocessor
+* Bug Fix: Custom CSS - Using the unminified worker CSS
+* Bug Fix: Custom CSS - Added rule: reminder about using .custom-background on body selector
+* Bug Fix: Custom CSS - Modified rule: Removed portion of overqualification rule that deems 'a.foo' overqualified if there are no other 'a' rules
+* Bug Fix: Custom CSS - Ensuring that the editor and the textarea behind it are using the same font so that the cursor appears in the correct location
+* Bug Fix: Custom CSS - Fix a bug that caused some sites to always ignore the base theme's CSS when in preview mode
+* Bug Fix: Custom CSS - Run stripslashes() before passing CSS to save()
+* Bug Fix: Custom CSS - Moving inline CSS and JavaScript into external files
+* Bug Fix: Infinite Scroll - Use the `is_main_query()` function and query method
+* Bug Fix: Infinite Scroll - Remove unused styles and an unnecessary margin setting
+* Bug Fix: Infinite Scroll - Allow the query used with IS to be filtered, so IS can be applied to a new query within a page template
+* Bug Fix: JSON API - Catch the 'User cannot view password protected post' error from can_view_post and bypass it for likes actions if the user has the password entered
+* Bug Fix: Likes - Bump cache buster, Don't show likes for password protected posts
+* Bug Fix: Notifications - Remove a redundant span closing tag
+* Bug Fix: Photon - If an image is already served from Photon but the anchor tag that surrounds it hasn't had its `href` value rewritten to use Photon, do so. Accounts for WP galleries whose individual items are linked to the original image files
+* Bug Fix: Publicize - Allows GLOBAL_CAP to be filtered, Adds an AYS to connection deletion, UI improvement for MP6 (and in general)
+* Bug Fix: Sharedaddy - Fire the sharing redirect earlier for increased plugin compatibility
+* Bug Fix: Stats - Move the display:none CSS output to wp_head so it gets written inside the HEAD tag if the option to hide the stats smilie is active
+* Bug Fix: Tiled Galleries - A more descriptive name for the default gallery type
+* Bug Fix: Tiled Galleries - Hide the Columns setting for gallery types that don't support it
+* Bug Fix: Run the admin_menu action late so that plugins hooking into it get a chance to run
+* Bug Fix: Prophylactic strict equality check
+
+= 2.2 =
+Release Date: February 26, 2013
+Release Post: http://jetpack.me/2013/02/26/jetpack-2-2-likes/
+
+* Enhancement: Likes: Allow your readers to show their appreciation of your posts.
+* Enhancement: Shortcodes: SoundCloud: Update to version 2.3 of the SoundCloud plugin (HTML5 default player, various fixes).
+* Enhancement: Shortcodes: Subscriptions: Add a shortcode to enable placement of a subscription signup form in a post or page.
+* Enhancement: Sharedaddy: Allow selecting multiple images from a post using the Pinterest share button.
+* Enhancement: Contact Form: Allow feedbacks to be marked spam in bulk.
+* Enhancement: Widgets: Readmill Widget: Give your visitors a link to send your book to their Readmill library.
+* Note: Notifications: Discontinue support for Internet Explorer 7 and below.
+* Bug Fix: JSON API: Fix authorization problems that some users were experiencing.
+* Bug Fix: JSON API: Sticky posts were not being sorted correctly in /posts requests.
+* Bug Fix: Stats: sync stats_options so server has roles array needed for view_stats cap check.
+* Bug Fix: Infinite Scroll: Display improvements.
+* Bug Fix: Infinite Scroll: WordPress compatibility fixes.
+* Bug Fix: Photon: Only rewrite iamge urls if the URL is compatible with Photon.
+* Bug Fix: Photon: Account for registered image sizes with one or more dimesions set to zero.
+* Bug Fix: Subscriptions: Make HTML markup more valid.
+* Bug Fix: Subscriptions: Fixed notices displayed in debug mode.
+* Bug Fix: Custom CSS: CSS warnings and errors should now work in environments where JavaScript is concatenated or otherwise modified before being served.
+* Bug Fix: Hovercards: WordPress compatibility fixes.
+* Bug Fix: Improved image handling for the Sharing and Publicize modules.
+* Bug Fix: Carousel: Display and Scrollbar fixes.
+* Bug Fix: Tiled Galleries: Restrict images in tiled galleries from being set larger than their containers.
+* Bug Fix: Widgets: Gravatar Profile: CSS fixes.
+* Bug Fix: Publicize: Strip HTML comments from the data we send to the third party services.
+* Bug Fix: Notifications: Dropped support for IE7 and below in the notifications menu.
+* Bug Fix: Custom CSS Editor: Allow custom themes to save CSS more easily.
+* Bug Fix: Infinite Scroll: Waits until the DOM is ready before loading the scrolling code.
+* Bug Fix: Mobile Theme: If the user has disabled the custom header text color, show the default black header text color.
+* Bug Fix: Mobile Theme: Fix for the "View Full Site" link.
+* Bug Fix: Mobile Theme: Use a filter to modify the output of wp_title().
+* Bug Fix: Publicize: Twitter: Re-enable character count turning red when more than 140 characters are typed.
+
+= 2.1.2 =
+Release Date: February 5, 2013
+
+* Enhancement: Infinite Scroll: Introduce filters for Infinite Scroll.
+* Enhancement: Shortcodes: TED shortcode.
+* Bug Fix: Carousel: Make sure to use large image sizes.
+* Bug Fix: Carousel: Clicking the back button in your browser after exiting a carousel gallery brings you back to the gallery.
+* Bug Fix: Carousel: Fix a scrollbar issue.
+* Bug Fix: Comments: Move the get_avatar() function out of the base class.
+* Bug Fix: Contact Form: Prevent the form from displaying i18n characters.
+* Bug Fix: Contact Form: Remove the !important CSS rule.
+* Bug Fix: Infinite Scroll: Main query arguments are not respected when using default permalink.
+* Bug Fix: JSON API: Trap 'wp_die' for new comments and image uploads.
+* Bug Fix: JSON API: Use a better array key for the user_ID.
+* Bug Fix: JSON API: Make the class instantiable only once, but multi-use.
+* Bug Fix: JSON API: Fix lookup of pages by page slug.
+* Bug Fix: JSON API: Updates for post likes.
+* Bug Fix: Mobile Theme: Remove Android download link for BB10 and Playbook.
+* Bug Fix: Open Graph: Stop using Loop functions to get post data for meta tags.
+* Bug Fix: Photon: Suppress and check for warnings when pasing_url and using it.
+* Bug Fix: Photon: Ensure full image size can be used.
+* Bug Fix: Photon: Resolve Photon / YouTube embed conflict.
+* Bug Fix: Photon: Fix dimension parsing from URLs.
+* Bug Fix: Photon: Make sure that width/height atts are greater than zero.
+* Bug Fix: Sharedaddy: Layout fixes for share buttons.
+* Bug Fix: Sharedaddy: Always send Facebook a language locale.
+* Bug Fix: Sharedaddy: Don't look up share counts for empty URLs.
+* Bug Fix: Shortcodes: Ensure that images don't overflow their containers in the slideshow shortcode.
+* Bug Fix: Shortcodes: only enqueue jquery if archive supports Infinite Scroll in the Audio Shortcode.
+* Bug Fix: Tiled Galleries: Use a more specific class for gallery item size to avoid conflicts.
+* Bug Fix: Tiled Galleries: Fixing scrolling issue when tapping on a Tiled Gallery on Android.
+* Bug Fix: Widgets: Gravatar profile widget typo.
+* Bug Fix: Widgets: Add (Jetpack) to widget titles.
+* Bug Fix: Widgets: Twitter wasn't wrapping links in the t.co shortener.
+* Bug Fix: Widgets: Facebook Likebox updates to handling the language locale.
+* Bug Fix: Widgets: Top Posts: Fixed a WP_DEBUG notice.
+* Bug Fix: Widgets: Gravatar Profile Widget: transient names must be less than 45 characters long.
+* Bug Fix: typo in delete_post_action function.
+* Bug Fix: Load rendered LaTeX image on same protocol as its page.
+
+
+= 2.1.1 =
+Release Date: January 5, 2013
+
+* Bug Fix: Fix for an error appearing for blogs updating from Jetpack 1.9.2 or earlier to 2.1.
+
+= 2.1 =
+Release Date: January 4, 2013
+Release Post: http://jetpack.me/2013/01/04/galleries/
+
+* Enhancement: Tiled Galleries: Show off your photos with cool mosaic galleries.
+* Enhancement: Slideshow gallery type: Display any gallery as a slideshow.
+* Enhancement: Custom CSS: Allow zoom property.
+* Enhancement: Stats: Show WordPress.com subscribers in stats.
+* Bug Fix: Fix errors shown after connecting Jetpack to WordPress.com.
+* Bug Fix: Photon: Fix bug causing errors to be shown in some posts.
+* Bug Fix: Photon: Convert all images in posts when Photon is active.
+* Bug Fix: Infinite Scroll: Improved compatibility with the other modules.
+* Bug Fix: Custom CSS: Updated editor to fix missing file errors.
+* Bug Fix: Publicize: Don't show the Facebook profile option if this is a Page-only account.
+* Bug Fix: Photon: A fix for photos appearing shrunken if they didn't load quickly enough.
+* Bug Fix: Sharing: A compatibility fix for posts that only have partial featured image data.
+* Bug Fix: Publicize/Sharing: For sites without a static homepage, don't set the OpenGraph url value to the first post permalink.
+* Bug Fix: Mobile Theme: Better compatibility with the customizer on mobile devices.
+* Bug Fix: Sharing: Don't show sharing options on front page if that option is turned off.
+* Bug Fix: Contact Form: Fix PHP warning shown when adding a Contact Form in WordPress 3.5.
+* Bug Fix: Photon: Handle images with relative paths.
+* Bug Fix: Contact Form: Fix compatibility with the Shortcode Embeds module.
+
+
+= 2.0.4 =
+Release Date: December 14, 2012
+
+* Bug Fix: Open Graph: Correct a bug that prevents Jetpack from being activated if the SharePress plugin isn't installed.
+
+= 2.0.3 =
+Release Date: December 14, 2012
+
+* Enhancement: Infinite Scroll: support [VideoPress](http://wordpress.org/extend/plugins/video/) plugin.
+* Enhancement: Photon: Apply to all images retrieved from the Media Library.
+* Enhancement: Photon: Retina image support.
+* Enhancement: Custom CSS: Refined editor interface.
+* Enhancement: Custom CSS: Support [Sass](http://sass-lang.com/) and [LESS](http://lesscss.org/) with built-in preprocessors.
+* Enhancement: Open Graph: Better checks for other plugins that may be loading Open Graph tags to prevent Jetpack from doubling meta tag output.
+* Bug Fix: Infinite Scroll: Respect relative image dimensions.
+* Bug Fix: Photon: Detect custom-cropped images and use those with Photon, rather than trying to use the original.
+* Bug Fix: Custom CSS: Fix for bug preventing @import from working with url()-style URLs.
+
+= 2.0.2 =
+Release Date: November 21, 2012
+
+* Bug Fix: Remove an erroneous PHP short open tag with the full tag to correct fatal errors under certain PHP configurations.
+
+= 2.0.1 =
+Release Date: November 21, 2012
+
+* Enhancement: Photon: Support for the [Lazy Load](http://wordpress.org/extend/plugins/lazy-load/) plugin.
+* Bug Fix: Photon: Fix warped images with un- or under-specified dimensions.
+* Bug Fix: Photon: Fix warped images with pre-photonized URLs; don't try to photonize them twice.
+* Bug Fix: Infinite Scroll: Check a child theme's parent theme for infinite scroll support.
+* Bug Fix: Infinite Scroll: Correct a bug with archives that resulted in posts appearing on archives that they didn't belong on.
+* Bug Fix: Publicize: Send the correct shortlink to Twitter (et al.) if your site uses a shortener other than wp.me.
+* Bug Fix: Sharing: Improved theme compatibility for the Google+ button.
+* Bug Fix: Notifications: Use locally-installed Javascript libraries if available.
+
+= 2.0 =
+Release Date: November 8, 2012
+Release Post: http://jetpack.me/2012/11/08/jetpack-2-0-publicize-to-facebook-twitter-linkedin-tumblr-post-by-email-photon-infinite-scroll/
+
+* Enhancement: Publicize: Connect your site to popular social networks and automatically share new posts with your friends.
+* Enhancement: Post By Email: Publish posts to your blog directly from your personal email account.
+* Enhancement: Photon: Images served through the global WordPress.com cloud.
+* Enhancement: Infinite Scroll: Better/faster browsing by pulling the next set of posts into view automatically when the reader approaches the bottom of the page.
+* Enhancement: Open Graph: Provides more detailed information about your posts to social networks.
+* Enhancement: JSON API: New parameters for creating and viewing posts.
+* Enhancement: Improved compatibility for the upcoming WordPress 3.5.
+* Bug Fix: Sharing: When you set your sharing buttons to use icon, text, or icon + text mode, the Google+ button will display accordingly.
+* Bug Fix: Gravatar Profile Widget: Allow basic HTML to be displayed.
+* Bug Fix: Twitter Widget: Error handling fixes.
+* Bug Fix: Sharing: Improved theme compatibility
+* Bug Fix: JSON API: Fixed error when creating some posts in some versions of PHP.
+
+= 1.9.2 =
+Release Date: October 29, 2012
+
+* Bug Fix: Only sync options on upgrade once.
+
+= 1.9.1 =
+* Enhancement: Notifications feature is enabled for logged-out users when the module is active & the toolbar is shown by another plugin.
+* Bug Fix: Use proper CDN addresses to avoid SSL cert issues.
+* Bug Fix: Prioritize syncing comments over deleting comments on WordPress.com. Fixes comment notifications marked as spam appearing to be trashed.
+
+= 1.9 =
+Release Date: October 26, 2012
+Release Post: http://jetpack.me/2012/10/26/jetpack-1-9-toolbar-notifications/
+
+* Enhancement: Notifications: Display Notifications in the toolbar and support reply/moderation of comment notifications.
+* Enhancement: Mobile Push Notifications: Added support for mobile push notifications of new comments for users that linked their accounts to WordPress.com accounts.
+* Enhancement: JSON API: Allows applications to send API requests via WordPress.com (see [the docs](http://developer.wordpress.com/docs/api/) )
+* Enhancement: Sync: Modules (that require the data) sync full Post/Comment to ensure consistent data on WP.com (eg Stats)
+* Enhancement: Sync: Improve syncing of site options to WP.com
+* Enhancement: Sync: Sync attachment parents to WP.com
+* Enhancement: Sync: Add signing of WP.com user ids for Jetpack Comments
+* Enhancement: Sync: Mark and obfuscate private posts.
+* Enhancement: Privacy: Default disable enhanced-distribution and json-api modules if site appears to be private.
+* Enhancement: Custom CSS: allow applying Custom CSS to mobile theme.
+* Enhancement: Sharing: On HTTPS pageloads, load as much of the sharing embeds as possible from HTTPS URLs.
+* Enhancement: Contact Form: Overhaul of the contact form code to fix incompatibilites with other plugins.
+* Bug Fix: Only allow users with manage_options permission to enable/disable modules
+* Bug Fix: Custom CSS: allow '/' in media query units; e.g. (-o-min-device-pixel-ratio: 3/2)
+* Bug Fix: Custom CSS: leave comments alone in CSS when editing but minify on the frontend
+* Bug Fix: Sharing: Keep "more" pane open so Google+ Button isn't obscured
+* Bug Fix: Carousel: Make sure the original size is used, even when it is exceedingly large.
+* Bug Fix: Exclude iPad from Twitter on iPhone mobile browsing
+* Bug Fix: Sync: On .org user role changes synchronize the change to .com
+* Bug Fix: Contact Form: Fix a bug where some web hosts would reject mail from the contact form due to email address spoofing.
+
+= 1.8.3 =
+Release Date: October 23, 2012
+
+* Bug Fix: Subscriptions: Fix a bug where subscriptions were not being sent from the blog.
+* Bug Fix: Twitter: Fix a bug where the Twitter username was being saved as blank.
+* Bug Fix: Fix a bug where Contact Form notification emails were not being sent.
+
+= 1.8.2 =
+Release Date: October 4, 2012
+
+* Bug Fix: Subscriptions: Fix a bug where subscriptions were not sent for posts and comments written by some authors.
+* Bug Fix: Widgets: Fix CSS that was uglifying some themes (like P2).
+* Bug Fix: Widgets: Improve Top Posts and Pages styling.
+* Bug Fix: Custom CSS: Make the default "Welcome" message translatable.
+* Bug Fix: Fix Lithuanian translation.
+
+= 1.8.1 =
+Release Date: September 28, 2012
+
+* Bug Fix: Stats: Fixed a bug preventing some users from viewing stats.
+* Bug Fix: Mobile Theme: Fixed some disabled toolbar buttons.
+* Bug Fix: Top Posts widget: Fixed a bug preventing the usage of the Top Posts widget.
+* Bug Fix: Mobile Theme: Fixed a bug that broke some sites when the Subscriptions module was not enabled and the Mobile Theme module was enabled.
+* Bug Fix: Mobile Theme: Made mobile app promos in the Mobile Theme footer opt-in.
+* Bug Fix: Twitter Widget: A fix to prevent malware warnings.
+* Bug Fix: Mobile Theme: Fixed a bug that caused errors for some users with custom header images.
+
+= 1.8 =
+Release Date: September 27, 2012
+Release Post: http://jetpack.me/2012/09/27/jetpack-1-8-mobile-theme/
+
+* Enhancement: Mobile Theme: Automatically serve a slimmed down version of your site to users on mobile devices.
+* Enhancement: Multiuser: Allow multiple users to link their accounts to WordPress.com accounts.
+* Enhancement: Custom CSS: Added support for object-fit, object-position, transition, and filter properties.
+* Enhancement: Twitter Widget: Added Follow button
+* Enhancement: Widgets: Added Top Posts and Pages widget
+* Enhancement: Mobile Push Notifications: Added support for mobile push notifications on new comments.
+* Enhancement: VideoPress: Shortcodes now support the HD option, for default HD playback.
+* Bug Fix: Twitter Widget: Fixed tweet permalinks in the Twitter widget
+* Bug Fix: Custom CSS: @import rules and external images are no longer stripped out of custom CSS
+* Bug Fix: Custom CSS: Fixed warnings and notices displayed in debug mode
+* Bug Fix: Sharing: Fixed double-encoding of image URLs
+* Bug Fix: Sharing: Fix Google +1 button HTML validation issues (again :))
+* Bug Fix: Gravatar Profile Widget: Reduce size of header margins
+
+= 1.7 =
+Release Date: August 23, 2012
+Release Post: http://jetpack.me/2012/08/23/jetpack-1-7-custom-css/
+
+* Enhancement: CSS Editor: Customize your site's design without modifying your theme.
+* Enhancement: Comments: Submit the comment within the iframe. No more full page load to jetpack.wordpress.com.
+* Enhancement: Sharing: Share counts for Twitter, Facebook, LinkedIn
+* Enhancement: Sharing: Improve styling
+* Enhancement: Sharing: Add support for ReCaptcha
+* Enhancement: Sharing: Better extensability through filters
+* Enhancement: Widgets: Twitter: Attempt to reduce errors by storing a long lasting copy of the data. Thanks, kareldonk :)
+* Regression Fix: Sharing: Properly store and display the sharing label option's default value.
+* Bug Fix: Contact Form: remove worse-than-useless nonce.
+* Bug Fix: Subscriptions: remove worse-than-useless nonce.
+* Bug Fix: Sharing: Don't show sharing buttons twice on attachment pages.
+* Bug Fix: Sharing: Increase width of Spanish Like button for Facebook.
+* Bug Fix: Sharing: Use the correct URL to the throbber.
+* Bug Fix: Stats: Fix notice about undefined variable $alt
+* Bug Fix: Subscriptions: Make Subscriptions module obey the settings of the Settngs -> Discussion checkboxes for Follow Blog/Comments
+* Bug Fix: Shortcodes: VideoPress: Compatibility with the latest version of VideoPress
+* Bug Fix: Shortcodes: Audio: Include JS File for HTML5 audio player
+* Bug Fix: Hovercards: Improve cache handling.
+* Bug Fix: Widgets: Gravatar Profle: Correctly display service icons in edge cases.
+* Bug Fix: Widgets: Gravatar Profle: Prevent ugly "flash" of too-large image when page first loads on some sites
+* Bug Fix: Carousel: CSS Compatibility with more themes.
+
+= 1.6.1 =
+Release Date: August 4, 2012
+
+* Bug Fix: Prevent Fatal error under certain conditions in sharing module
+* Bug Fix: Add cachebuster to sharing.css
+* Bug Fix: Disable via for Twitter until more robust code is in place
+
+= 1.6 =
+Release Date: August 2, 2012
+Release Post: http://jetpack.me/2012/08/02/jetpack-1-6-retina-and-pinterest/
+
+* Enhancement: Carousel: Better image resolution selection based on available width/height.
+* Enhancement: Carousel: Load image caption, metadata, comments, et alii when a slide is clicked to switch to instead of waiting.
+* Enhancement: Carousel: Added a "Comment" button and handling to scroll to and focus on comment textarea.
+* Enhancement: Widgets: Facebook Likebox now supports a height parameter and a better width parameter.
+* Enhancement: Widgets: Better feedback when widgets are not set up properly.
+* Enhancement: Shortcodes: Google Maps shortcode now supports percentages in the width.
+* Enhancement: Shortcodes: Update Polldaddy shortcode for more efficient Javascript libraries.
+* Enhancement: Shortcodes: Youtube shortcode now has playlist support.
+* Enhancement: Add Gravatar Profile widget.
+* Enhancement: Update Sharedaddy to latest version, including Pinterest support.
+* Enhancement: Retinize Jetpack and much of WordPress.
+* Bug Fix: Shortcodes: Fix Audio shortcode color parameter and rename encoding function.
+* Bug Fix: Shortcodes: Don't output HTML 5 version of the Audio shortcode because of a bug with Google Reader.
+* Bug Fix: Jetpack Comments: Don't overlead the addComments object if it doesn't exist. Fixes spacing issue with comment form.
+* Bug Fix: Contact Form: If send_to_editor() exists, use it. Fixes an IE9 text area issue.
+
+= 1.5 =
+Release Date: July 31, 2012
+
+* Enhancement: Add Gallery Carousel feature
+* Note: the Carousel module bundles http://fgnass.github.com/spin.js/ (MIT license)
+
+= 1.4.2 =
+Release Date: June 20, 2012
+
+* Bug Fix: Jetpack Comments: Add alternative Javascript event listener for Internet 8 users.
+* Enhancement: Remove more PHP 4 backwards-compatible code (WordPress andJetpack only support PHP 5).
+* Enhancement: Remove more WordPress 3.1 and under backwards-compatible code.
+
+= 1.4.1 =
+Release Date: June 15, 2012
+
+* Bug Fix: Jetpack Comments / Subscriptions: Add checkboxes and logic control for the Subscription checkboxes.
+
+= 1.4 =
+Release Date: June 14, 2012
+
+* Enhancement: Add Jetpack Comments feature.
+* Bug Fix: Sharing: Make the sharing_label translatable.
+* Bug Fix: Sharing: Fixed the file type on the LinkedIn graphic.
+* Bug Fix: Sharing: Fixes for the Faceboox Like button language locales.
+* Bug Fix: Sharing: Updates for the "more" button when used with touch screen devices.
+* Bug Fix: Sharing: Properly scope the More button so that multiple More buttons on a page behave properly.
+* Bug Fix: Shortcodes: Update the YouTube and Audio shortcodes to better handle spaces in the URLs.
+* Bug Fix: Shortcodes: Make the YouTube shortcode respect embed settings in Settings -> Media when appropriate.
+* Bug Fix: Shortcodes: Removed the Slide.com shortcode; Slide.com no longer exists.
+* Bug Fix: Shortcodes: Match both http and https links in the [googlemaps] shortcode.
+* Bug Fix: After the Deadline: Code clean up and removal of inconsistencies.
+
+= 1.3.4 =
+Release Date: May 24, 2012
+
+* Bug Fix: Revert changes to the top level menu that are causing problems.
+
+= 1.3.3 =
+Release Date: May 22, 2012
+
+* Bug Fix: Fix notices caused by last update
+
+= 1.3.2 =
+Release Date: May 22, 2012
+
+* Bug Fix: Fix Jetpack menu so that Akismet and VaultPress submenus show up.
+
+= 1.3.1 =
+Release Date: May 22, 2012
+
+* Enhancement: Add a new widget, the Facebook Likebox
+* Bug Fix: Sharing: Sharing buttons can now be used on custom post types.
+* Bug Fix: Contact Forms: Make Contact Forms widget shortcode less aggressive about the shortcodes it converts.
+* Bug Fix: Ensure contact forms are parsed correctly in text widgets.
+* Bug Fix: Connection notices now only appear on the Dashboard and plugin page.
+* Bug Fix: Connection notices are now dismissable if Jetpack is not network activated.
+* Bug Fix: Subscriptions: Fix an issue that was causing errors with new BuddyPress forum posts.
+
+= 1.3 =
+Release Date: April 25, 2012
+Release Post: http://jetpack.me/2012/04/24/jetpack-1-3-released-contact-forms/
+
+* Enhancement: Add Contact Forms feature. Formerly Grunion Contact Forms.
+* Bug Fix: Tweak YouTube autoembedder to catch more YouTube URLs.
+* Bug Fix: Correctly load the Sharing CSS files.
+
+= 1.2.4 =
+Release Date: April 6, 2012
+
+* Bug Fix: Fix rare bug with static front pages
+
+= 1.2.3 =
+Release Date: April 5, 2012
+
+* Enhancement: Twitter Widget: Expand t.co URLs
+* Bug Fix: Various PHP Notices.
+* Bug Fix: WordPress Deprecated `add_contextual_help()` notices
+* Bug Fix: Don't display unimportant DB errors when processing Jetpack nonces
+* Bug Fix: Correctly sync data during certain MultiSite cases.
+* Bug Fix: Stats: Allow sparkline img to load even when there is a DB upgrade.
+* Bug Fix: Stats: Replace "loading title" with post title regardless of type and status.
+* Bug Fix: Stats: Avoid edge case infinite redirect for `show_on_front=page` sites where the `home_url()` conatins uppercase letters.
+* Bug Fix: Subscriptions: Don't send subscriptions if the feature is turned off in Jetpack.
+* Bug Fix: Subscriptions: Fix pagination of subscribers.
+* Bug Fix: Subscriptions: Sync data about categories/tags as well to improve subscription emails.
+* Bug Fix: Subscriptions: Better styling for the subscription success message.
+* Bug Fix: Shortcodes: Support for multiple Google Maps in one post. Support for all Google Maps URLs.
+* Bug Fix: Shortcodes: Improved support for youtu.be URLs
+* Bug Fix: Shortcodes: Improved Vimeo embeds.
+* Bug Fix: Sharing: Switch to the 20px version of Google's +1 button for consistency.
+* Bug Fix: Sharing: Fix Google +1 button HTML validation issues.
+* Bug Fix: Sharing: Disable sharing buttons during preview.
+* Bug Fix: Spelling and Grammar: Properly handle proofreading settings.
+* Bug Fix: Spelling and Grammar: Don't prevent post save when proofreading service is unavailable.
+
+= 1.2.2 =
+Release Date: December 6, 2011
+
+* Bug Fix: Ensure expected modules get reactivated correctly during upgrade.
+* Bug Fix: Don't send subscription request during spam comment submission.
+* Bug Fix: Increased theme compatibility for subscriptions.
+* Bug Fix: Remove reference to unused background image.
+
+= 1.2.1 =
+Release Date: November 18, 2011
+
+* Bug Fix: Ensure Site Stats menu item is accessible.
+* Bug Fix: Fixed errors displayed during some upgrades.
+* Bug Fix: Fix inaccurate new modules "bubble" in menu for some upgrades.
+* Bug Fix: Fix VaultPress detection.
+* Bug Fix: Fix link to http://jetpack.me/faq/
+
+= 1.2 =
+Release Date: November 17, 2011
+Release Post: http://jetpack.me/2011/11/17/announcing-jetpack-1-2/
+
+* Enhancement: Add Subscriptions: Subscribe to site's posts and posts' comments.
+* Enhancement: Add Google Maps shortcode.
+* Enhancement: Add Image Widget.
+* Enhancement: Add RSS Links Widget.
+* Enhancement: Stats: More responsive stats dashboard.
+* Enhancement: Shortcodes: Google Maps, VideoPress
+* Enhancement: Sharing: Google+, LinkedIn
+* Enhancement: Enhanced Distribution: Added Jetpack blogs to http://en.wordpress.com/firehose/
+* Bug Fix: Spelling and Grammar: WordPress 3.3 compatibility.
+* Bug Fix: Translatable module names/descriptinos.
+* Bug Fix: Correctly detect host's ability to make outgoing HTTPS requests.
+
+= 1.1.3 =
+Release Date: July 19, 2011
+
+* Bug Fix: Increase compatibility with WordPress 3.2's new `wp_remote_request()` API.
+* Bug Fix: Increase compatibility with Admin Bar.
+* Bug Fix: Stats: Improved performance when creating new posts.
+* Bug Fix: Twitter Widget: Fix PHP Notice.
+* Bug Fix: Sharedaddy: Fix PHP Warning.
+* Enhancement: AtD: Add spellcheck button to Distraction Free Writing screen.
+* Translations: Added: Bosnian, Danish, German, Finnish, Galician, Croatian, Indonesian, Macedonian, Norwegian (Bokmål), Russian, Slovak, Serbian, Swedish
+* Translations: Updated: Spanish, French, Italian, Japanese, Brazilian Portuguese, Portuguese
+
+= 1.1.2 =
+Release Date: July 6, 2011
+
+* Bug Fix: Note, store, and keep fresh the time difference between the Jetpack site's host and the Jetpack servers at WordPress.com. Should fix all "timestamp is too old" errors.
+* Bug Fix: Improve experience on hosts capable of making outgoing HTTPS requests but incapable of verifying SSL certificates. Fixes some "register_http_request_failed", "error setting certificate verify locations", and "error:14090086:lib(20):func(144):reason(134)" errors.
+* Bug Fix: Better fallback when WordPress.com is experiencing problems.
+* Bug Fix: It's Jetpack, not JetPack :)
+* Bug Fix: Remove PHP Warnings/Notices.
+* Bug Fix: AtD: JS based XSS bug. Props markjaquith.
+* Bug Fix: AtD: Prevent stored configuration options from becoming corrupted.
+* Bug Fix: Stats: Prevent missing old stats for some blogs.
+* Bug Fix: Twitter Widget: Fix formatting of dates/times in PHP4.
+* Bug Fix: Twitter Widget: Cache the response from Twitter to prevent "Twitter did not respond. Please wait a few minutes and refresh this page." errors.
+* Enhancement: Slightly improved RTL experience. Jetpack 1.2 should include a much better fix.
+* Enhancement: Sharedaddy: Improve localization for Facebook Like button.
+* Enhancement: Gravatar Hovercards: Improved experience for Windows browsers.
+
+= 1.1.1 =
+Release Date: March 19, 2011
+* Bug Fix: Improve experience on hosts capable of making outgoing HTTPS requests but incapable of verifying SSL certificates. Fixes most "Your Jetpack has a glitch. Connecting this site with WordPress.com is not possible. This usually means your site is not publicly accessible (localhost)." errors.
+* Bug Fix: Sharedaddy: Fatal error under PHP4. Disable on PHP4 hosts.
+* Bug Fix: Stats: Fatal error under PHP4. Rewrite to be PHP4 compatible.
+* Bug Fix: Stats: Fatal error on some sites modifying/removing core WordPress user roles. Add sanity check.
+* Bug Fix: Stats: Replace debug output with error message in dashboard widget.
+* Bug Fix: Stats: Rework hook priorities so that stats views are always counted even if a plugin (such as Paginated Comments) bails early on template_redirect.
+* Bug Fix: Identify the module that connot be activated to fatal error during single module activation.
+* Bug Fix: `glob()` is not always available. Use `opendir()`, `readdir()`, `closedir()`.
+* Bug Fix: Send permalink options to Stats Server for improved per post permalink calculation.
+* Bug Fix: Do not hide Screen Options and Help links during Jetpack call to connect.
+* Bug Fix: Improve readablitiy of text.
+* Bug Fix: AtD: Correctly store/display options.
+* Enhancement: Output more informative error messages.
+* Enhancement: Improve CSS styling.
+* Enhancement: Stats: Query all post types and statuses when getting posts for stats reports.
+* Enhancement: Improve performance of LaTeX URLs be using cookieless CDN.
+
+= 1.1 =
+Release Date: March 9, 2011
+
+* Initial release
diff --git a/plugins/jetpack/class.jetpack-admin.php b/plugins/jetpack/class.jetpack-admin.php
index c9dfb463..6e46ee38 100644
--- a/plugins/jetpack/class.jetpack-admin.php
+++ b/plugins/jetpack/class.jetpack-admin.php
@@ -30,10 +30,19 @@ class Jetpack_Admin {
jetpack_require_lib( 'admin-pages/class.jetpack-settings-page' );
$this->settings_page = new Jetpack_Settings_Page;
+ jetpack_require_lib( 'admin-pages/class.jetpack-my-jetpack-page' );
+ $this->my_jetpack_page = new Jetpack_My_Jetpack_Page;
+
+ if ( isset( $_POST['jetpack-set-master-user'] ) ) {
+ add_action( 'init', array( $this->my_jetpack_page, 'jetpack_my_jetpack_change_user' ) );
+ }
+
// Add hooks for admin menus
add_action( 'admin_menu', array( $this->landing_page, 'add_actions' ), 998 );
add_action( 'jetpack_admin_menu', array( $this, 'admin_menu_debugger' ) );
add_action( 'jetpack_admin_menu', array( $this->settings_page, 'add_actions' ) );
+ add_action( 'jetpack_admin_menu', array( $this->my_jetpack_page, 'add_actions' ) );
+
// Add redirect to current page for activation/deactivation of modules
add_action( 'jetpack_pre_activate_module', array( $this, 'fix_redirect' ), 10, 2 );
@@ -65,6 +74,14 @@ class Jetpack_Admin {
$jetpack_active = Jetpack::is_active() || Jetpack::is_development_mode();
foreach ( $available_modules as $module ) {
if ( $module_array = $this->jetpack->get_module( $module ) ) {
+ /**
+ * Filters each module's short description.
+ *
+ * @since 3.0.0
+ *
+ * @param string $module_array['description'] Module description.
+ * @param string $module Module slug.
+ */
$short_desc = apply_filters( 'jetpack_short_module_description', $module_array['description'], $module );
// Fix: correct multibyte strings truncate with checking for mbstring extension
$short_desc_trunc = ( function_exists( 'mb_strlen' ) )
@@ -84,16 +101,24 @@ class Jetpack_Admin {
$module_array['configure_url'] = Jetpack::module_configuration_url( $module );
ob_start();
+ /**
+ * Allow the display of a "Learn More" button.
+ * The dynamic part of the action, $module, is the module slug.
+ *
+ * @since 3.0.0
+ */
do_action( 'jetpack_learn_more_button_' . $module );
$module_array['learn_more_button'] = ob_get_clean();
ob_start();
- if ( Jetpack::is_active() && has_action( 'jetpack_module_more_info_connected_' . $module ) ) {
- do_action( 'jetpack_module_more_info_connected_' . $module );
- } else {
- do_action( 'jetpack_module_more_info_' . $module );
- }
-
+ /**
+ * Allow the display of information text when Jetpack is connected to WordPress.com.
+ * The dynamic part of the action, $module, is the module slug.
+ *
+ * @since 3.0.0
+ */
+ do_action( 'jetpack_module_more_info_' . $module );
+
/**
* Filter the long description of a module.
*
@@ -108,7 +133,7 @@ class Jetpack_Admin {
/**
* Filter the search terms for a module
*
- * Search terms are be typically added to a module in module-info.php.
+ * Search terms are typically added to the module headers, under "Additional Search Queries".
*
* Use syntax:
* function jetpack_$module_search_terms( $terms ) {
@@ -118,13 +143,25 @@ class Jetpack_Admin {
* add_filter( 'jetpack_search_terms_$module', 'jetpack_$module_search_terms' );
*
* @since 3.5.0
- * @param string The search terms (comma separated)
+ *
+ * @param string The search terms (comma separated).
*/
- echo apply_filters( 'jetpack_search_terms_' . $module, '' );
+ echo apply_filters( 'jetpack_search_terms_' . $module, $module_array['additional_search_queries'] );
$module_array['search_terms'] = ob_get_clean();
$module_array['configurable'] = false;
- if ( current_user_can( 'manage_options' ) && apply_filters( 'jetpack_module_configurable_' . $module, false ) ) {
+ if (
+ current_user_can( 'manage_options' ) &&
+ /**
+ * Allow the display of a configuration link in the Jetpack Settings screen.
+ *
+ * @since 3.0.0
+ *
+ * @param string $module Module name.
+ * @param bool false Should the Configure module link be displayed? Default to false.
+ */
+ apply_filters( 'jetpack_module_configurable_' . $module, false )
+ ) {
$module_array['configurable'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( Jetpack::module_configuration_url( $module ) ), __( 'Configure', 'jetpack' ) );
}
@@ -146,14 +183,14 @@ class Jetpack_Admin {
return false;
/**
- * We never want to show VaultPress as activate-able through Jetpack.
+ * We never want to show VaultPress as activatable through Jetpack.
*/
if ( 'vaultpress' === $module['module'] ) {
return false;
}
if ( Jetpack::is_development_mode() ) {
- return ! ( $module['requires_connection'] && ! Jetpack::is_active() );
+ return ! ( $module['requires_connection'] );
} else {
return Jetpack::is_active();
}
diff --git a/plugins/jetpack/class.jetpack-autoupdate.php b/plugins/jetpack/class.jetpack-autoupdate.php
index e702679b..0041726c 100644
--- a/plugins/jetpack/class.jetpack-autoupdate.php
+++ b/plugins/jetpack/class.jetpack-autoupdate.php
@@ -6,17 +6,16 @@
*/
class Jetpack_Autoupdate {
- public $updates_allowed;
- public $jetpack;
- public $autoupdate_results;
- public $is_updating = false;
+ private $results = array();
- public $autoupdate_expected = array(
- 'plugin'=> array(),
+ private $expected = array();
+
+ private $success = array(
+ 'plugin' => array(),
'theme' => array(),
);
- public $log = array(
+ private $failed = array(
'plugin' => array(),
'theme' => array(),
);
@@ -31,46 +30,33 @@ class Jetpack_Autoupdate {
}
private function __construct() {
- $this->updates_allowed = Jetpack::is_module_active( 'manage' );
-
- // Only run automatic updates if a user as opted in by activating the manage module.
- if ( $this->updates_allowed ) {
+ if ( Jetpack::is_module_active( 'manage' ) ) {
add_filter( 'auto_update_plugin', array( $this, 'autoupdate_plugin' ), 10, 2 );
add_filter( 'auto_update_theme', array( $this, 'autoupdate_theme' ), 10, 2 );
add_filter( 'auto_update_core', array( $this, 'autoupdate_core' ), 10, 2 );
- add_action( 'automatic_updates_complete', array( $this, 'automatic_updates_complete' ), 10, 1 );
- add_action( 'shutdown', array( $this, 'log_results' ) );
+ add_action( 'automatic_updates_complete', array( $this, 'automatic_updates_complete' ), 999, 1 );
}
-
- // Anytime WordPress saves update data, we'll want to update our Jetpack option as well.
- if ( is_main_site() ) {
- add_action( 'set_site_transient_update_plugins', array( $this, 'save_update_data' ) );
- add_action( 'set_site_transient_update_themes', array( $this, 'save_update_data' ) );
- add_action( 'set_site_transient_update_core', array( $this, 'save_update_data' ) );
- }
-
}
- function autoupdate_plugin( $update, $item ) {
+ public function autoupdate_plugin( $update, $item ) {
$autoupdate_plugin_list = Jetpack_Options::get_option( 'autoupdate_plugins', array() );
if ( in_array( $item->plugin, $autoupdate_plugin_list ) ) {
- $this->expect( $item->plugin );
+ $this->expect( $item->plugin, 'plugin' );
return true;
}
-
return $update;
}
- function autoupdate_theme( $update, $item ) {
+ public function autoupdate_theme( $update, $item ) {
$autoupdate_theme_list = Jetpack_Options::get_option( 'autoupdate_themes', array() );
if ( in_array( $item->theme , $autoupdate_theme_list) ) {
- $this->expect( $item->theme, $type = 'theme' );
+ $this->expect( $item->theme, 'theme' );
return true;
}
return $update;
}
- function autoupdate_core( $update, $item ) {
+ public function autoupdate_core( $update, $item ) {
$autoupdate_core = Jetpack_Options::get_option( 'autoupdate_core', false );
if ( $autoupdate_core ) {
return $autoupdate_core;
@@ -79,139 +65,108 @@ class Jetpack_Autoupdate {
}
/**
- * Stores the an item identifier to the autoupdate_expected array.
+ * Stores the an item identifier to the expected array.
*
* @param string $item Example: 'jetpack/jetpack.php' for type 'plugin' or 'twentyfifteen' for type 'theme'
* @param string $type 'plugin' or 'theme'
*/
- function expect( $item, $type='plugin' ) {
- $this->is_updating = true;
- $this->autoupdate_expected[ $type ][] = $item;
+ private function expect( $item, $type ) {
+ if ( ! isset( $this->expected[ $type ] ) ) {
+ $this->expected[ $type ] = array();
+ }
+ $this->expected[ $type ][] = $item;
}
/**
- * Calculates available updates and saves them to a Jetpack Option
- * Update data is saved in the following schema:
+ * On completion of an automatic update, let's store the results.
*
- * array (
- * 'plugins' => (int) number of plugin updates available
- * 'themes' => (int) number of theme updates available
- * 'wordpress' => (int) number of wordpress core updates available
- * 'translations' => (int) number of translation updates available
- * 'total' => (int) total of all available updates
- * 'wp_version' => (string) the current version of WordPress that is running
- * 'wp_update_version' => (string) the latest available version of WordPress, only present if a WordPress update is needed
- * 'site_is_version_controlled' => (bool) is the site under version control
- * )
+ * @param $results - Sent by WP_Automatic_Updater after it completes an autoupdate action. Results may be empty.
*/
- function save_update_data() {
- global $wp_version;
-
- $update_data = wp_get_update_data();
-
- // Stores the individual update counts as well as the total count.
- if ( isset( $update_data['counts'] ) ) {
- $updates = $update_data['counts'];
+ public function automatic_updates_complete( $results ) {
+ if ( empty( $this->expected ) ) {
+ return;
}
+ $this->results = empty( $results ) ? self::get_possible_failures() : $results;
- // Stores the current version of WordPress.
- $updates['wp_version'] = $wp_version;
-
- // If we need to update WordPress core, let's find the latest version number.
- if ( ! empty( $updates['wordpress'] ) ) {
- $cur = get_preferred_from_update_core();
- if ( isset( $cur->response ) && 'upgrade' === $cur->response ) {
- $updates['wp_update_version'] = $cur->current;
- }
- }
+ add_action( 'shutdown', array( $this, 'bump_stats' ) );
- $updates['site_is_version_controlled'] = (bool) $this->is_version_controlled();
- Jetpack_Options::update_option( 'updates', $updates );
- }
+ Jetpack::init();
- /**
- * Finds out if a site is using a version control system.
- * We'll store that information as a transient with a 24 expiration.
- * We only need to check once per day.
- *
- * @return string ( '1' | '0' )
- */
- function is_version_controlled() {
- $is_version_controlled = get_transient( 'jetpack_site_is_vcs' );
-
- if ( false === $is_version_controlled ) {
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
- $updater = new WP_Automatic_Updater();
- $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) );
- // transients should not be empty
- if ( empty( $is_version_controlled ) ) {
- $is_version_controlled = '0';
- }
- set_transient( 'jetpack_site_is_vcs', $is_version_controlled, DAY_IN_SECONDS );
+ $items_to_log = array( 'plugin', 'theme' );
+ foreach( $items_to_log as $items ) {
+ $this->log_items( $items );
}
- return $is_version_controlled;
+ Jetpack::log( 'autoupdates', $this->get_log() );
}
- /**
- * On completion of an automatic update, let's store the results.
- *
- * @param $results - Sent by WP_Automatic_Updater after it completes an autoupdate action. Results may be empty.
- */
- function automatic_updates_complete( $results ) {
- $this->autoupdate_results = $results;
+ public function get_log() {
+ return array(
+ 'results' => $this->results,
+ 'failed' => $this->failed,
+ 'success' => $this->success
+ );
}
/**
- * On shutdown, let's check to see if we've preformed an automatic update.
- * If so, let's compare the expected results to the actual results, and log our findings.
+ * Iterates through expected items ( plugins or themes ) and compares them to actual results.
*
- * Results are logged locally via Jetpack::log(), and globally via Jetpack::do_stats()
+ * @param $items 'plugin' or 'theme'
*/
- function log_results() {
+ private function log_items( $items ) {
- if ( $this->is_updating ) {
+ if ( ! isset( $this->expected[ $items ] ) ) {
+ return;
+ }
- $this->jetpack = Jetpack::init();
- $items_to_log = array( 'plugin', 'theme' );
+ $item_results = $this->get_successful_updates( $items );
- foreach( $items_to_log as $items ) {
- $this->log_items( $items );
+ if ( is_array( $this->expected[ $items ] ) ) {
+ foreach( $this->expected[ $items ] as $item ) {
+ if ( in_array( $item, $item_results ) ) {
+ $this->success[ $items ][] = $item;
+ } else {
+ $this->failed[ $items ][] = $item;
+ }
}
-
- $this->jetpack->do_stats( 'server_side' );
- $this->jetpack->log( 'autoupdates', $this->log );
}
}
- /**
- * Iterates through expected items ( plugins or themes ) and compares them to actual results.
- *
- * @param $items 'plugin' or 'theme'
- */
- function log_items( $items ) {
- $items_updated = 0;
- $items_failed = 0;
- $item_results = $this->get_successful_updates( $items );
-
- foreach( $this->autoupdate_expected[ $items ] as $item ) {
- if ( in_array( $item, $item_results ) ) {
- $items_updated++;
- $this->log[ $items ][ $item ] = true;
- } else {
- $items_failed++;
- $this->log[ $items ][ $item ] = new WP_Error( "$items-fail", $this->get_error_message( $item, $type = $items ) );
- }
+ public function bump_stats() {
+ $instance = Jetpack::init();
+ $log = array();
+ // Bump numbers
+ if ( ! empty( $this->success['plugin'] ) ) {
+ $instance->stat( 'autoupdates/plugin-success', count( $this->success['plugin'] ) );
+ $log['plugins_success'] = $this->success['plugin'];
+ }
+
+ if ( ! empty( $this->failed['plugin'] ) ) {
+ $instance->stat( 'autoupdates/plugin-fail', count( $this->failed['plugin'] ) );
+ $log['plugins_failed'] = $this->failed['plugin'];
}
- if ( $items_updated ) {
- $this->jetpack->stat( "autoupdates/$items-success", $items_updated );
+ if ( ! empty( $this->success['theme'] ) ) {
+ $instance->stat( 'autoupdates/theme-success', count( $this->success['theme'] ) );
+ $log['themes_success'] = $this->success['theme'];
}
- if ( $items_failed ) {
- $this->jetpack->stat( "autoupdates/$items-fail", $items_failed );
+ if ( ! empty( $this->failed['theme'] ) ) {
+ $instance->stat( 'autoupdates/theme-fail', count( $this->failed['theme'] ) );
+ $log['themes_failed'] = $this->failed['theme'];
}
+ $instance->do_stats( 'server_side' );
+
+ // Send a more detailed log to logstash
+ if ( ! empty( $log ) ) {
+ Jetpack::load_xml_rpc_client();
+ $xml = new Jetpack_IXR_Client( array(
+ 'user_id' => get_current_user_id()
+ ) );
+ $log['blog_id'] = Jetpack_Options::get_option( 'id' );
+ $xml->query( 'jetpack.debug_autoupdate', $log );
+ }
}
/**
@@ -221,20 +176,20 @@ class Jetpack_Autoupdate {
*
* @return array
*/
- private function get_successful_updates( $type = 'plugin' ) {
+ private function get_successful_updates( $type ) {
$successful_updates = array();
- if ( ! isset( $this->autoupdate_results[ $type ] ) ) {
+ if ( ! isset( $this->results[ $type ] ) ) {
return $successful_updates;
}
- foreach( $this->autoupdate_results[ $type ] as $result ) {
+ foreach( $this->results[ $type ] as $result ) {
if ( $result->result ) {
switch( $type ) {
case 'theme':
$successful_updates[] = $result->item->theme;
break;
- default:
+ case 'plugin':
$successful_updates[] = $result->item->plugin;
}
}
@@ -243,32 +198,49 @@ class Jetpack_Autoupdate {
return $successful_updates;
}
- /**
- * Cycles through results generated by WP_Automatic_Updater to find the messages for the given item and item type.
- *
- * @param $item Example: 'jetpack/jetpack.php' for type 'plugin' or 'twentyfifteen' for type 'theme'
- * @param string $type 'plugin' or 'theme'
- *
- * @return bool|string
- */
- private function get_error_message( $item, $type = 'plugin' ) {
- if ( ! isset( $this->autoupdate_results[ $type ] ) ) {
- return false;
+ static function get_possible_failures() {
+ $result = array();
+ // Lets check some reasons why it might not be working as expected
+ include_once( ABSPATH . '/wp-admin/includes/admin.php' );
+ include_once( ABSPATH . '/wp-admin/includes/class-wp-upgrader.php' );
+ $upgrader = new WP_Automatic_Updater;
+
+ if ( $upgrader->is_disabled() ) {
+ $result[] = 'autoupdates-disabled';
}
- foreach( $this->autoupdate_results[ $type ] as $result ) {
- switch( $type ) {
- case 'theme':
- $id = $result->item->theme;
- break;
- default:
- $id = $result->item->plugin;
- }
- if ( $id == $item && isset( $result->messages ) ) {
- return implode( ', ', $result->messages );
- }
+ if ( ! is_main_site() ) {
+ $result[] = 'is-not-main-site';
+ }
+ if ( ! is_main_network() ) {
+ $result[] = 'is-not-main-network';
+ }
+ if ( $upgrader->is_vcs_checkout( ABSPATH ) ) {
+ $result[] = 'site-on-vcs';
+ }
+ if ( $upgrader->is_vcs_checkout( WP_PLUGIN_DIR ) ) {
+ $result[] = 'plugin-directory-on-vcs';
+ }
+ if ( $upgrader->is_vcs_checkout( WP_CONTENT_DIR ) ) {
+ $result[] = 'content-directory-on-vcs';
+ }
+ $lock = get_option( 'auto_updater.lock' );
+ if ( $lock > ( time() - HOUR_IN_SECONDS ) ) {
+ $result[] = 'lock-is-set';
+ }
+ $skin = new Automatic_Upgrader_Skin;
+ include_once( ABSPATH . 'wp-admin/includes/file.php' );
+ include_once( ABSPATH . 'wp-admin/includes/template.php' );
+ if ( ! $skin->request_filesystem_credentials( false, ABSPATH, false ) ) {
+ $result[] = 'no-system-write-access';
+ }
+ if ( ! $skin->request_filesystem_credentials( false, WP_PLUGIN_DIR, false ) ) {
+ $result[] = 'no-plugin-directory-write-access';
+ }
+ if ( ! $skin->request_filesystem_credentials( false, WP_CONTENT_DIR, false ) ) {
+ $result[] = 'no-wp-content-directory-write-access';
}
- return false;
+ return $result;
}
}
-Jetpack_Autoupdate::init(); \ No newline at end of file
+Jetpack_Autoupdate::init();
diff --git a/plugins/jetpack/class.jetpack-cli.php b/plugins/jetpack/class.jetpack-cli.php
index 5fd75d24..d84f39ca 100644
--- a/plugins/jetpack/class.jetpack-cli.php
+++ b/plugins/jetpack/class.jetpack-cli.php
@@ -7,26 +7,82 @@ WP_CLI::add_command( 'jetpack', 'Jetpack_CLI' );
*/
class Jetpack_CLI extends WP_CLI_Command {
+ // Aesthetics
+ public $green_open = "\033[32m";
+ public $red_open = "\033[31m";
+ public $yellow_open = "\033[33m";
+ public $color_close = "\033[0m";
+
/**
* Get Jetpack Details
*
* ## OPTIONS
*
- * None. Simply returns details about whether or not your blog
- * is connected, its Jetpack version, and WordPress.com blog_id.
+ * empty: Leave it empty for basic stats
+ *
+ * full: View full stats. It's the data from the heartbeat
*
* ## EXAMPLES
*
* wp jetpack status
+ * wp jetpack status full
*
*/
public function status( $args, $assoc_args ) {
- if ( Jetpack::is_active() ) {
+ if ( ! Jetpack::is_active() ) {
+ WP_CLI::error( __( 'Jetpack is not currently connected to WordPress.com', 'jetpack' ) );
+ }
+
+ if ( isset( $args[0] ) && 'full' !== $args[0] ) {
+ WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $args[0] ) );
+ }
+
+ /*
+ * Are they asking for all data?
+ *
+ * Loop through heartbeat data and organize by priority.
+ */
+ $all_data = ( isset( $args[0] ) && 'full' == $args[0] ) ? 'full' : false;
+ if ( $all_data ) {
+ WP_CLI::success( __( 'Jetpack is currently connected to WordPress.com', 'jetpack' ) );
+ WP_CLI::line( sprintf( __( "The Jetpack Version is %s", 'jetpack' ), JETPACK__VERSION ) );
+ WP_CLI::line( sprintf( __( "The WordPress.com blog_id is %d", 'jetpack' ), Jetpack_Options::get_option( 'id' ) ) );
+
+ // Heartbeat data
+ WP_CLI::line( "\n" . __( 'Additional data: ', 'jetpack' ) );
+
+ // Get the filtered heartbeat data.
+ // Filtered so we can color/list by severity
+ $stats = Jetpack::jetpack_check_heartbeat_data();
+
+ // Display red flags first
+ foreach ( $stats['bad'] as $stat => $value ) {
+ printf( "$this->red_open%-'.16s %s $this->color_close\n", $stat, $value );
+ }
+
+ // Display caution warnings next
+ foreach ( $stats['caution'] as $stat => $value ) {
+ printf( "$this->yellow_open%-'.16s %s $this->color_close\n", $stat, $value );
+ }
+
+ // The rest of the results are good!
+ foreach ( $stats['good'] as $stat => $value ) {
+
+ // Modules should get special spacing for aestetics
+ if ( strpos( $stat, 'odule-' ) ) {
+ printf( "%-'.30s %s\n", $stat, $value );
+ usleep( 4000 ); // For dramatic effect lolz
+ continue;
+ }
+ printf( "%-'.16s %s\n", $stat, $value );
+ usleep( 4000 ); // For dramatic effect lolz
+ }
+ } else {
+ // Just the basics
WP_CLI::success( __( 'Jetpack is currently connected to WordPress.com', 'jetpack' ) );
WP_CLI::line( sprintf( __( 'The Jetpack Version is %s', 'jetpack' ), JETPACK__VERSION ) );
WP_CLI::line( sprintf( __( 'The WordPress.com blog_id is %d', 'jetpack' ), Jetpack_Options::get_option( 'id' ) ) );
- } else {
- WP_CLI::line( __( 'Jetpack is not currently connected to WordPress.com', 'jetpack' ) );
+ WP_CLI::line( "\n" . _x( "View full status with 'wp jetpack status full'", '"wp jetpack status full" is a command - do not translate', 'jetpack' ) );
}
}
@@ -50,7 +106,7 @@ class Jetpack_CLI extends WP_CLI_Command {
* wp jetpack disconnect user username
* wp jetpack disconnect user email@domain.com
*
- * @synopsis blog|[user <user_id>]
+ * @synopsis <blog|user> [<user_identifier>]
*/
public function disconnect( $args, $assoc_args ) {
if ( ! Jetpack::is_active() ) {
@@ -79,7 +135,7 @@ class Jetpack_CLI extends WP_CLI_Command {
WP_CLI::error( __( 'Please specify a valid user.', 'jetpack' ) );
}
} else {
- WP_CLI::error( __( 'Please specify a user.', 'jetpack' ) );
+ WP_CLI::error( __( 'Please specify a user by either ID, username, or email.', 'jetpack' ) );
}
}
@@ -104,17 +160,91 @@ class Jetpack_CLI extends WP_CLI_Command {
}
/**
- * Manage Jetpack Modules
+ * Reset Jetpack options and settings to default
*
* ## OPTIONS
*
- * list: View all available modules, and their status.
+ * modules: Resets modules to default state ( get_default_modules() )
*
- * activate <module_slug>: Activate a module.
+ * options: Resets all Jetpack options except:
+ * - All private options (Blog token, user token, etc...)
+ * - id (The Client ID/WP.com Blog ID of this site)
+ * - master_user
+ * - version
+ * - activated
*
- * deactivate <module_slug>: Deactivate a module.
+ * ## EXAMPLES
*
- * toggle <module_slug>: Toggle a module on or off.
+ * wp jetpack reset options
+ * wp jetpack reset modules
+ *
+ * @synopsis <modules|options>
+ */
+ public function reset( $args, $assoc_args ) {
+ $action = isset( $args[0] ) ? $args[0] : 'prompt';
+ if ( ! in_array( $action, array( 'options', 'modules' ) ) ) {
+ WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
+ }
+
+ // Are you sure?
+ jetpack_cli_are_you_sure();
+
+ switch ( $action ) {
+ case 'options':
+ $options_to_reset = Jetpack::get_jetpack_options_for_reset();
+
+ // Reset the Jetpack options
+ _e( "Resetting Jetpack Options...\n", "jetpack" );
+ sleep(1); // Take a breath
+ foreach ( $options_to_reset['jp_options'] as $option_to_reset ) {
+ Jetpack_Options::delete_option( $option_to_reset );
+ usleep( 100000 );
+ WP_CLI::success( sprintf( __( '%s option reset', 'jetpack' ), $option_to_reset ) );
+ }
+
+ // Reset the WP options
+ _e( "Resetting the jetpack options stored in wp_options...\n", "jetpack" );
+ usleep( 500000 ); // Take a breath
+ foreach ( $options_to_reset['wp_options'] as $option_to_reset ) {
+ delete_option( $option_to_reset );
+ usleep( 100000 );
+ WP_CLI::success( sprintf( __( '%s option reset', 'jetpack' ), $option_to_reset ) );
+ }
+
+ // Reset to default modules
+ _e( "Resetting default modules...\n", "jetpack" );
+ usleep( 500000 ); // Take a breath
+ $default_modules = Jetpack::get_default_modules();
+ Jetpack_Options::update_option( 'active_modules', $default_modules );
+ WP_CLI::success( __( 'Modules reset to default.', 'jetpack' ) );
+
+ // Jumpstart option is special
+ Jetpack_Options::update_option( 'jumpstart', 'new_connection' );
+ WP_CLI::success( __( 'jumpstart option reset', 'jetpack' ) );
+ break;
+ case 'modules':
+ $default_modules = Jetpack::get_default_modules();
+ Jetpack_Options::update_option( 'active_modules', $default_modules );
+ WP_CLI::success( __( 'Modules reset to default.', 'jetpack' ) );
+ break;
+ case 'prompt':
+ WP_CLI::error( __( 'Please specify if you would like to reset your options, or modules', 'jetpack' ) );
+ break;
+ }
+ }
+
+ /**
+ * Manage Jetpack Modules
+ *
+ * ## OPTIONS
+ *
+ * list : View all available modules, and their status.
+ * activate all : Activate all modules
+ * deactivate all: Deactivate all modules
+ *
+ * activate <module_slug> : Activate a module.
+ * deactivate <module_slug> : Deactivate a module.
+ * toggle <module_slug> : Toggle a module on or off.
*
* ## EXAMPLES
*
@@ -123,35 +253,47 @@ class Jetpack_CLI extends WP_CLI_Command {
* wp jetpack module deactivate stats
* wp jetpack module toggle stats
*
- * @synopsis [list|activate|deactivate|toggle [<module_name>]]
+ * wp jetpack module activate all
+ * wp jetpack module deactivate all
+ *
+ * @synopsis <list|activate|deactivate|toggle> [<module_name>]
*/
public function module( $args, $assoc_args ) {
$action = isset( $args[0] ) ? $args[0] : 'list';
if ( ! in_array( $action, array( 'list', 'activate', 'deactivate', 'toggle' ) ) ) {
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
}
-
if ( in_array( $action, array( 'activate', 'deactivate', 'toggle' ) ) ) {
if ( isset( $args[1] ) ) {
$module_slug = $args[1];
- if ( ! Jetpack::is_module( $module_slug ) ) {
+ if ( 'all' !== $module_slug && ! Jetpack::is_module( $module_slug ) ) {
WP_CLI::error( sprintf( __( '%s is not a valid module.', 'jetpack' ), $module_slug ) );
}
if ( 'toggle' == $action ) {
$action = Jetpack::is_module_active( $module_slug ) ? 'deactivate' : 'activate';
}
+ // Bulk actions
+ if ( 'all' == $args[1] ) {
+ $action = ( 'deactivate' == $action ) ? 'deactivate_all' : 'activate_all';
+ }
+ // VaultPress needs to be handled elsewhere.
+ if ( in_array( $action, array( 'activate', 'deactivate', 'toggle' ) ) && 'vaultpress' == $args[1] ) {
+ WP_CLI::error( sprintf( _x( 'Please visit %s to configure your VaultPress subscription.', '%s is a website', 'jetpack' ), esc_url( 'https://vaultpress.com/jetpack/' ) ) );
+ }
} else {
WP_CLI::line( __( 'Please specify a valid module.', 'jetpack' ) );
$action = 'list';
}
}
-
switch ( $action ) {
case 'list':
WP_CLI::line( __( 'Available Modules:', 'jetpack' ) );
$modules = Jetpack::get_available_modules();
sort( $modules );
foreach( $modules as $module_slug ) {
+ if ( 'vaultpress' == $module_slug ) {
+ continue;
+ }
$active = Jetpack::is_module_active( $module_slug ) ? __( 'Active', 'jetpack' ) : __( 'Inactive', 'jetpack' );
WP_CLI::line( "\t" . str_pad( $module_slug, 24 ) . $active );
}
@@ -159,19 +301,299 @@ class Jetpack_CLI extends WP_CLI_Command {
case 'activate':
$module = Jetpack::get_module( $module_slug );
Jetpack::log( 'activate', $module_slug );
- Jetpack::activate_module( $module_slug, false );
+ Jetpack::activate_module( $module_slug, false, false );
WP_CLI::success( sprintf( __( '%s has been activated.', 'jetpack' ), $module['name'] ) );
break;
+ case 'activate_all':
+ $modules = Jetpack::get_available_modules();
+ Jetpack_Options::update_option( 'active_modules', $modules );
+ WP_CLI::success( __( 'All modules activated!', 'jetpack' ) );
+ break;
case 'deactivate':
$module = Jetpack::get_module( $module_slug );
Jetpack::log( 'deactivate', $module_slug );
Jetpack::deactivate_module( $module_slug );
WP_CLI::success( sprintf( __( '%s has been deactivated.', 'jetpack' ), $module['name'] ) );
break;
+ case 'deactivate_all':
+ Jetpack_Options::update_option( 'active_modules', '' );
+ WP_CLI::success( __( 'All modules deactivated!', 'jetpack' ) );
+ break;
case 'toggle':
// Will never happen, should have been handled above and changed to activate or deactivate.
break;
}
}
+ /**
+ * Manage Protect Settings
+ *
+ * ## OPTIONS
+ *
+ * whitelist: Whitelist an IP address. You can also read or clear the whitelist.
+ *
+ *
+ * ## EXAMPLES
+ *
+ * wp jetpack protect whitelist <ip address>
+ * wp jetpack protect whitelist list
+ * wp jetpack protect whitelist clear
+ *
+ * @synopsis <whitelist> [<ip|ip_low-ip_high|list|clear>]
+ */
+ public function protect( $args, $assoc_args ) {
+ $action = isset( $args[0] ) ? $args[0] : 'prompt';
+ if ( ! in_array( $action, array( 'whitelist' ) ) ) {
+ WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
+ }
+ // Check if module is active
+ if ( ! Jetpack::is_module_active( __FUNCTION__ ) ) {
+ WP_CLI::error( sprintf( _x( '%s is not active. You can activate it with "wp jetpack module activate %s"', '"wp jetpack module activate" is a command - do not translate', 'jetpack' ), __FUNCTION__, __FUNCTION__ ) );
+ }
+ if ( in_array( $action, array( 'whitelist' ) ) ) {
+ if ( isset( $args[1] ) ) {
+ $action = 'whitelist';
+ } else {
+ $action = 'prompt';
+ }
+ }
+ switch ( $action ) {
+ case 'whitelist':
+ $whitelist = array();
+ $new_ip = $args[1];
+ $current_whitelist = get_site_option( 'jetpack_protect_whitelist' );
+
+ // Build array of IPs that are already whitelisted.
+ // Re-build manually instead of using jetpack_protect_format_whitelist() so we can easily get
+ // low & high range params for jetpack_protect_ip_address_is_in_range();
+ foreach( $current_whitelist as $whitelisted ) {
+
+ // IP ranges
+ if ( $whitelisted->range ) {
+
+ // Is it already whitelisted?
+ if ( jetpack_protect_ip_address_is_in_range( $new_ip, $whitelisted->range_low, $whitelisted->range_high ) ) {
+ WP_CLI::error( sprintf( __( "%s has already been whitelisted", 'jetpack' ), $new_ip ) );
+ break;
+ }
+ $whitelist[] = $whitelisted->range_low . " - " . $whitelisted->range_high;
+
+ } else { // Individual IPs
+
+ // Check if the IP is already whitelisted (single IP only)
+ if ( $new_ip == $whitelisted->ip_address ) {
+ WP_CLI::error( sprintf( __( "%s has already been whitelisted", 'jetpack' ), $new_ip ) );
+ break;
+ }
+ $whitelist[] = $whitelisted->ip_address;
+
+ }
+ }
+
+ /*
+ * List the whitelist
+ * Done here because it's easier to read the $whitelist array after it's been rebuilt
+ */
+ if ( isset( $args[1] ) && 'list' == $args[1] ) {
+ if ( ! empty( $whitelist ) ) {
+ WP_CLI::success( __( 'Here are your whitelisted IPs:', 'jetpack' ) );
+ foreach ( $whitelist as $ip ) {
+ WP_CLI::line( "\t" . str_pad( $ip, 24 ) ) ;
+ }
+ } else {
+ WP_CLI::line( __( 'Whitelist is empty.', "jetpack" ) ) ;
+ }
+ break;
+ }
+
+ /*
+ * Clear the whitelist
+ */
+ if ( isset( $args[1] ) && 'clear' == $args[1] ) {
+ if ( ! empty( $whitelist ) ) {
+ $whitelist = array();
+ jetpack_protect_save_whitelist( $whitelist );
+ WP_CLI::success( __( 'Cleared all whitelisted IPs', 'jetpack' ) );
+ } else {
+ WP_CLI::line( __( 'Whitelist is empty.', "jetpack" ) ) ;
+ }
+ break;
+ }
+
+ // Append new IP to whitelist array
+ array_push( $whitelist, $new_ip );
+
+ // Save whitelist if there are no errors
+ $result = jetpack_protect_save_whitelist( $whitelist );
+ if ( is_wp_error( $result ) ) {
+ WP_CLI::error( __( $result, 'jetpack' ) );
+ }
+
+ WP_CLI::success( sprintf( __( '%s has been whitelisted.', 'jetpack' ), $new_ip ) );
+ break;
+ case 'prompt':
+ WP_CLI::error(
+ __( 'No command found.', 'jetpack' ) . "\n" .
+ __( 'Please enter the IP address you want to whitelist.', 'jetpack' ) . "\n" .
+ _x( 'You can save a range of IPs {low_range}-{high_range}. No spaces allowed. (example: 1.1.1.1-2.2.2.2)', 'Instructions on how to whitelist IP ranges - low_range/high_range should be translated.', 'jetpack' ) . "\n" .
+ _x( "You can also 'list' or 'clear' the whitelist.", "'list' and 'clear' are commands and should not be translated", 'jetpack' ) . "\n"
+ );
+ break;
+ }
+ }
+
+ /**
+ * Manage Jetpack Options
+ *
+ * ## OPTIONS
+ *
+ * list : List all jetpack options and their values
+ * delete : Delete an option
+ * - can only delete options that are white listed.
+ * update : update an option
+ * - can only update option strings
+ * get : get the value of an option
+ *
+ * ## EXAMPLES
+ *
+ * wp jetpack options list
+ * wp jetpack options get <option_name>
+ * wp jetpack options delete <option_name>
+ * wp jetpack options update <option_name> [<option_value>]
+ *
+ * @synopsis <list|get|delete|update> [<option_name>] [<option_value>]
+ */
+ public function options( $args, $assoc_args ) {
+ $action = isset( $args[0] ) ? $args[0] : 'list';
+ $safe_to_modify = Jetpack::get_jetpack_options_for_reset();
+
+ // Jumpstart is special
+ array_push( $safe_to_modify, 'jumpstart' );
+
+ // Is the option flagged as unsafe?
+ $flagged = ! in_array( $args[1], $safe_to_modify );
+
+ if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) {
+ WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) );
+ }
+
+ if ( isset( $args[0] ) ) {
+ if ( 'get' == $args[0] && isset( $args[1] ) ) {
+ $action = 'get';
+ } else if ( 'delete' == $args[0] && isset( $args[1] ) ) {
+ $action = 'delete';
+ } else if ( 'update' == $args[0] && isset( $args[1] ) ) {
+ $action = 'update';
+ } else {
+ $action = 'list';
+ }
+ }
+
+ // Bail if the option isn't found
+ $option = isset( $args[1] ) ? Jetpack_Options::get_option( $args[1] ) : false;
+ if ( isset( $args[1] ) && ! $option && 'update' !== $args[0] ) {
+ WP_CLI::error( __( 'Option not found or is empty. Use "list" to list option names', 'jetpack' ) );
+ }
+
+ // Let's print_r the option if it's an array
+ // Used in the 'get' and 'list' actions
+ $option = is_array( $option ) ? print_r( $option ) : $option;
+
+ switch ( $action ) {
+ case 'get':
+ WP_CLI::success( "\t" . $option );
+ break;
+ case 'delete':
+ jetpack_cli_are_you_sure( $flagged );
+
+ Jetpack_Options::delete_option( $args[1] );
+ WP_CLI::success( sprintf( __( 'Deleted option: %s', 'jetpack' ), $args[1] ) );
+ break;
+ case 'update':
+ jetpack_cli_are_you_sure( $flagged );
+
+ // Updating arrays would get pretty tricky...
+ $value = Jetpack_Options::get_option( $args[1] );
+ if ( $value && is_array( $value ) ) {
+ WP_CLI::error( __( 'Sorry, no updating arrays at this time', 'jetpack' ) );
+ }
+
+ Jetpack_Options::update_option( $args[1], $args[2] );
+ WP_CLI::success( sprintf( _x( 'Updated option: %s to "%s"', 'Updating an option from "this" to "that".', 'jetpack' ), $args[1], $args[2] ) );
+ break;
+ case 'list':
+ $options_compact = Jetpack_Options::get_option_names();
+ $options_non_compact = Jetpack_Options::get_option_names( 'non_compact' );
+ $options_private = Jetpack_Options::get_option_names( 'private' );
+ $options = array_merge( $options_compact, $options_non_compact, $options_private );
+
+ // Table headers
+ WP_CLI::line( "\t" . str_pad( __( 'Option', 'jetpack' ), 30 ) . __( 'Value', 'jetpack' ) );
+
+ // List out the options and their values
+ // Tell them if the value is empty or not
+ // Tell them if it's an array
+ foreach ( $options as $option ) {
+ $value = Jetpack_Options::get_option( $option );
+ if ( ! $value ) {
+ WP_CLI::line( "\t" . str_pad( $option, 30 ) . 'Empty' );
+ continue;
+ }
+
+ if ( ! is_array( $value ) ) {
+ WP_CLI::line( "\t" . str_pad( $option, 30 ) . $value );
+ } else if ( is_array( $value ) ) {
+ WP_CLI::line( "\t" . str_pad( $option, 30 ) . 'Array - Use "get <option>" to read option array.' );
+ }
+ }
+ $option_text = '{' . _x( 'option', 'a variable command that a user can write, provided in the printed instructions', 'jetpack' ) . '}';
+ $value_text = '{' . _x( 'value', 'the value that they want to update the option to', 'jetpack' ) . '}';
+
+ WP_CLI::success(
+ _x( "Above are your options. You may 'get', 'delete', and 'update' them.", "'get', 'delete', and 'update' are commands - do not translate.", 'jetpack' ) . "\n" .
+ str_pad( 'wp jetpack options get', 26 ) . $option_text . "\n" .
+ str_pad( 'wp jetpack options delete', 26 ) . $option_text . "\n" .
+ str_pad( 'wp jetpack options update', 26 ) . "$option_text $value_text" . "\n" .
+ _x( "Type 'wp jetpack options' for more info.", "'wp jetpack options' is a command - do not translate.", 'jetpack' ) . "\n"
+ );
+ break;
+ }
+ }
}
+
+/*
+ * Standard "ask for permission to continue" function.
+ * If action cancelled, ask if they need help.
+ *
+ * Written outside of the class so it's not listed as an executable command w/ 'wp jetpack'
+ *
+ * @param $flagged bool false = normal option | true = flagged by get_jetpack_options_for_reset()
+ * @param $error_msg string (optional)
+ */
+function jetpack_cli_are_you_sure( $flagged = false, $error_msg = false ) {
+ $cli = new Jetpack_CLI();
+
+ // Default cancellation message
+ if ( ! $error_msg ) {
+ $error_msg =
+ __( 'Action cancelled. Have a question?', 'jetpack' )
+ . ' '
+ . $cli->green_open
+ . 'jetpack.me/support'
+ . $cli->color_close;
+ }
+
+ if ( ! $flagged ) {
+ $prompt_message = __( 'Are you sure? This cannot be undone. Type "yes" to continue:', '"yes" is a command. Do not translate that.', 'jetpack' );
+ } else {
+ /* translators: Don't translate the word yes here. */
+ $prompt_message = __( 'Are you sure? Modifying this option may disrupt your Jetpack connection. Type "yes" to continue.', 'jetpack' );
+ }
+
+ WP_CLI::line( $prompt_message );
+ $handle = fopen( "php://stdin", "r" );
+ $line = fgets( $handle );
+ if ( 'yes' != trim( $line ) ){
+ WP_CLI::error( $error_msg );
+ }
+} \ No newline at end of file
diff --git a/plugins/jetpack/class.jetpack-client-server.php b/plugins/jetpack/class.jetpack-client-server.php
index d0ddf087..63a678d8 100644
--- a/plugins/jetpack/class.jetpack-client-server.php
+++ b/plugins/jetpack/class.jetpack-client-server.php
@@ -5,14 +5,38 @@
* Client Server = API Methods the Plugin must respond to
*/
class Jetpack_Client_Server {
+
function authorize() {
$data = stripslashes_deep( $_GET );
- $args = array();
$redirect = isset( $data['redirect'] ) ? esc_url_raw( (string) $data['redirect'] ) : '';
- do {
+ $jetpack_unique_connection = Jetpack_Options::get_option( 'unique_connection' );
+ // Checking if site has been active/connected previously before recording unique connection
+ if ( ! $jetpack_unique_connection ) {
+ // jetpack_unique_connection option has never been set
+ $jetpack_unique_connection = array(
+ 'connected' => 0,
+ 'disconnected' => 0,
+ 'version' => '3.6.1'
+ );
+
+ update_option( 'jetpack_unique_connection', $jetpack_unique_connection );
+
+ //track unique connection
$jetpack = Jetpack::init();
+
+ $jetpack->stat( 'connections', 'unique-connection' );
+ $jetpack->do_stats( 'server_side' );
+ }
+
+ // increment number of times connected
+ $jetpack_unique_connection['connected'] += 1;
+ Jetpack_Options::update_option( 'unique_connection', $jetpack_unique_connection );
+
+ do {
+ $jetpack = $this->get_jetpack();
$role = $jetpack->translate_current_user_to_role();
+
if ( !$role ) {
Jetpack::state( 'error', 'no_role' );
break;
@@ -24,7 +48,7 @@ class Jetpack_Client_Server {
break;
}
- check_admin_referer( "jetpack-authorize_{$role}_{$redirect}" );
+ $this->check_admin_referer( "jetpack-authorize_{$role}_{$redirect}" );
if ( !empty( $data['error'] ) ) {
Jetpack::state( 'error', $data['error'] );
@@ -92,6 +116,7 @@ class Jetpack_Client_Server {
}
// Sync all registers options and constants
+ /** This action is documented in class.jetpack.php */
do_action( 'jetpack_sync_all_registered_options' );
// Start nonce cleaner
@@ -100,12 +125,12 @@ class Jetpack_Client_Server {
} while ( false );
if ( wp_validate_redirect( $redirect ) ) {
- wp_safe_redirect( $redirect );
+ $this->wp_safe_redirect( $redirect );
} else {
- wp_safe_redirect( Jetpack::admin_url() );
+ $this->wp_safe_redirect( Jetpack::admin_url() );
}
- exit;
+ $this->do_exit();
}
public static function deactivate_plugin( $probable_file, $probable_title ) {
@@ -132,7 +157,7 @@ class Jetpack_Client_Server {
* @return object|WP_Error
*/
function get_token( $data ) {
- $jetpack = Jetpack::init();
+ $jetpack = $this->get_jetpack();
$role = $jetpack->translate_current_user_to_role();
if ( !$role ) {
@@ -209,9 +234,33 @@ class Jetpack_Client_Server {
if ( !$cap = $jetpack->translate_role_to_cap( $role ) )
return new Jetpack_Error( 'scope', 'No Cap', $code );
- if ( !current_user_can( $cap ) )
+ if ( ! current_user_can( $cap ) )
return new Jetpack_Error( 'scope', 'current_user_cannot', $code );
+ /**
+ * Fires after user has successfully received an auth token.
+ *
+ * @since 3.9.0
+ */
+ do_action( 'jetpack_user_authorized' );
+
return (string) $json->access_token;
}
+
+ public function get_jetpack() {
+ return Jetpack::init();
+ }
+
+ public function check_admin_referer( $action ) {
+ return check_admin_referer( $action );
+ }
+
+ public function wp_safe_redirect( $redirect ) {
+ return wp_safe_redirect( $redirect );
+ }
+
+ public function do_exit() {
+ exit;
+ }
+
}
diff --git a/plugins/jetpack/class.jetpack-client.php b/plugins/jetpack/class.jetpack-client.php
index 669ccba7..df1c4c07 100644
--- a/plugins/jetpack/class.jetpack-client.php
+++ b/plugins/jetpack/class.jetpack-client.php
@@ -1,6 +1,9 @@
<?php
class Jetpack_Client {
+ const WPCOM_JSON_API_HOST = 'public-api.wordpress.com';
+ const WPCOM_JSON_API_VERSION = '1.1';
+
/**
* Makes an authorized remote request using Jetpack_Signature
*
@@ -51,7 +54,7 @@ class Jetpack_Client {
$jetpack_signature = new Jetpack_Signature( $token->secret, $time_diff );
$timestamp = time() + $time_diff;
-
+
if( function_exists( 'wp_generate_password' ) ) {
$nonce = wp_generate_password( 10, false );
} else {
@@ -131,6 +134,21 @@ class Jetpack_Client {
* @return array|WP_Error WP HTTP response on success
*/
public static function _wp_remote_request( $url, $args, $set_fallback = false ) {
+ /**
+ * SSL verification (`sslverify`) for the JetpackClient remote request
+ * defaults to off, use this filter to force it on.
+ *
+ * Return `true` to ENABLE SSL verification, return `false`
+ * to DISABLE SSL verification.
+ *
+ * @since 3.6.0
+ *
+ * @param bool Whether to force `sslverify` or not.
+ */
+ if ( apply_filters( 'jetpack_client_verify_ssl_certs', false ) ) {
+ return wp_remote_request( $url, $args );
+ }
+
$fallback = Jetpack_Options::get_option( 'fallback_no_verify_ssl_certs' );
if ( false === $fallback ) {
Jetpack_Options::update_option( 'fallback_no_verify_ssl_certs', 0 );
@@ -216,4 +234,49 @@ class Jetpack_Client {
}
}
}
+
+ /**
+ * Query the WordPress.com REST API using the blog token
+ *
+ * @param string $path
+ * @param string $version
+ * @param array $args
+ * @param string $body
+ * @return array|WP_Error $response Data.
+ */
+ static function wpcom_json_api_request_as_blog( $path, $version = self::WPCOM_JSON_API_VERSION, $args = array(), $body = null ) {
+ $filtered_args = array_intersect_key( $args, array(
+ 'method' => 'string',
+ 'timeout' => 'int',
+ 'redirection' => 'int',
+ ) );
+
+ /**
+ * Determines whether Jetpack can send outbound https requests to the WPCOM api.
+ *
+ * @since 3.6.0
+ *
+ * @param bool $proto Defaults to true.
+ */
+ $proto = apply_filters( 'jetpack_can_make_outbound_https', true ) ? 'https' : 'http';
+
+ // unprecedingslashit
+ $_path = preg_replace( '/^\//', '', $path );
+
+ // Use GET by default whereas `remote_request` uses POST
+ if ( isset( $filtered_args['method'] ) && strtoupper( $filtered_args['method'] === 'POST' ) ) {
+ $request_method = 'POST';
+ } else {
+ $request_method = 'GET';
+ }
+
+ $validated_args = array_merge( $filtered_args, array(
+ 'url' => sprintf( '%s://%s/rest/v%s/%s', $proto, self::WPCOM_JSON_API_HOST, $version, $_path ),
+ 'blog_id' => (int) Jetpack_Options::get_option( 'id' ),
+ 'method' => $request_method,
+ ) );
+
+ return Jetpack_Client::remote_request( $validated_args, $body );
+ }
+
}
diff --git a/plugins/jetpack/class.jetpack-data.php b/plugins/jetpack/class.jetpack-data.php
index 30d6e5b2..727bd059 100644
--- a/plugins/jetpack/class.jetpack-data.php
+++ b/plugins/jetpack/class.jetpack-data.php
@@ -39,4 +39,87 @@ class Jetpack_Data {
'external_user_id' => (int) $user_id,
);
}
+
+ /**
+ * This function mirrors Jetpack_Data::is_usable_domain() in the WPCOM codebase.
+ *
+ * @param $domain
+ * @param array $extra
+ *
+ * @return bool|WP_Error
+ */
+ public static function is_usable_domain( $domain, $extra = array() ) {
+
+ // If it's empty, just fail out.
+ if ( ! $domain ) {
+ return new WP_Error( 'fail_domain_empty', sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as it is empty.', 'jetpack' ), $domain ) );
+ }
+
+ // None of the explicit localhosts.
+ $forbidden_domains = array(
+ 'wordpress.com',
+ 'localhost',
+ 'localhost.localdomain',
+ '127.0.0.1',
+ 'local.wordpress.dev', // VVV
+ 'local.wordpress-trunk.dev', // VVV
+ 'src.wordpress-develop.dev', // VVV
+ 'build.wordpress-develop.dev', // VVV
+ );
+ if ( in_array( $domain, $forbidden_domains ) ) {
+ return new WP_Error( 'fail_domain_forbidden', sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as it is in the forbidden array.', 'jetpack' ), $domain ) );
+ }
+
+ // No .dev or .local domains
+ if ( preg_match( '#\.(dev|local)$#i', $domain ) ) {
+ return new WP_Error( 'fail_domain_tld', sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as it uses an invalid top level domain.', 'jetpack' ), $domain ) );
+ }
+
+ // No WPCOM subdomains
+ if ( preg_match( '#\.wordpress\.com$#i', $domain ) ) {
+ return new WP_Error( 'fail_subdomain_wpcom', sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as it is a subdomain of WordPress.com.', 'jetpack' ), $domain ) );
+ }
+
+ // If PHP was compiled without support for the Filter module (very edge case)
+ if ( ! function_exists( 'filter_var' ) ) {
+ // Just pass back true for now, and let wpcom sort it out.
+ return true;
+ }
+
+ // Check the IP to make sure it's pingable.
+ $ip = gethostbyname( $domain );
+
+ // Doing this again as I was getting some false positives when gethostbyname() flaked out and returned the domain.
+ $ip = filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ? $ip : gethostbyname( $ip );
+
+ if ( ! filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_IPV4 ) && ! self::php_bug_66229_check( $ip ) ) {
+ return new WP_Error( 'fail_domain_bad_ip_range', sprintf( __( 'Domain `%1$s` just failed is_usable_domain check as its IP `%2$s` is either invalid, or in a reserved or private range.', 'jetpack' ), $domain, $ip ) );
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns true if the IP address passed in should not be in a reserved range, even if PHP says that it is.
+ * See: https://bugs.php.net/bug.php?id=66229 and https://github.com/php/php-src/commit/d1314893fd1325ca6aa0831101896e31135a2658
+ *
+ * This function mirrors Jetpack_Data::php_bug_66229_check() in the WPCOM codebase.
+ */
+ public static function php_bug_66229_check( $ip ) {
+ if ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {
+ return false;
+ }
+
+ $ip_arr = array_map( 'intval', explode( '.', $ip ) );
+
+ if ( 128 == $ip_arr[0] && 0 == $ip_arr[1] ) {
+ return true;
+ }
+
+ if ( 191 == $ip_arr[0] && 255 == $ip_arr[1] ) {
+ return true;
+ }
+
+ return false;
+ }
}
diff --git a/plugins/jetpack/class.jetpack-debugger.php b/plugins/jetpack/class.jetpack-debugger.php
index d9cf878d..7b0d0f54 100644
--- a/plugins/jetpack/class.jetpack-debugger.php
+++ b/plugins/jetpack/class.jetpack-debugger.php
@@ -14,17 +14,15 @@ class Jetpack_Debugger {
}
}
- public static function jetpack_increase_timeout($time) {
- $time = 30; //seconds
- return $time;
+ public static function jetpack_increase_timeout() {
+ return 30; // seconds
}
public static function jetpack_debug_display_handler() {
if ( ! current_user_can( 'manage_options' ) )
wp_die( esc_html__('You do not have sufficient permissions to access this page.', 'jetpack' ) );
- global $current_user;
- get_currentuserinfo();
+ $current_user = wp_get_current_user();
$user_id = get_current_user_id();
$user_tokens = Jetpack_Options::get_option( 'user_tokens' );
@@ -57,6 +55,37 @@ class Jetpack_Debugger {
$debug_info .= "\r\n" . esc_html( "JETPACK__PLUGIN_DIR: " . JETPACK__PLUGIN_DIR );
$debug_info .= "\r\n" . esc_html( "SITE_URL: " . site_url() );
$debug_info .= "\r\n" . esc_html( "HOME_URL: " . home_url() );
+ $debug_info .= "\r\n" . esc_html( "SERVER_PORT: " . $_SERVER['SERVER_PORT'] );
+
+
+ foreach ( array (
+ 'GD_PHP_HANDLER',
+ 'HTTP_AKAMAI_ORIGIN_HOP',
+ 'HTTP_CF_CONNECTING_IP',
+ 'HTTP_CLIENT_IP',
+ 'HTTP_FASTLY_CLIENT_IP',
+ 'HTTP_FORWARDED',
+ 'HTTP_FORWARDED_FOR',
+ 'HTTP_INCAP_CLIENT_IP',
+ 'HTTP_TRUE_CLIENT_IP',
+ 'HTTP_X_CLIENTIP',
+ 'HTTP_X_CLUSTER_CLIENT_IP',
+ 'HTTP_X_FORWARDED',
+ 'HTTP_X_FORWARDED_FOR',
+ 'HTTP_X_IP_TRAIL',
+ 'HTTP_X_REAL_IP',
+ 'HTTP_X_VARNISH',
+ 'REMOTE_ADDR'
+ ) as $header ) {
+ if( isset( $_SERVER[$header] ) ) {
+ $debug_info .= "\r\n" . esc_html( 'IP HEADER: '.$header . ": " . $_SERVER[$header] );
+ } else {
+ $debug_info .= "\r\n" . esc_html( 'IP HEADER: '.$header . ": Not Set" );
+ }
+ }
+
+
+ $debug_info .= "\r\n" . esc_html( "PROTECT_TRUSTED_HEADER: " . json_encode(get_site_option( 'trusted_ip_header' )));
$debug_info .= "\r\n\r\nTEST RESULTS:\r\n\r\n";
$debug_raw_info = '';
@@ -139,7 +168,19 @@ class Jetpack_Debugger {
<ol>
<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">known conflicts</a> with Jetpack – check the <a href="%2$s">list</a>. (You can also browse the <a href="%3$s">Jetpack support pages</a> or <a href="%4$s">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), 'http://jetpack.me/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.me/support/getting-started-with-jetpack/known-issues/', 'http://jetpack.me/support/', 'http://wordpress.org/support/plugin/jetpack' ); ?></li>
<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>
- <li><b><em><?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?></em></b> <?php esc_html_e( "If your problem isn't known or caused by a plugin, try activating Twenty Twelve (the default WordPress theme). If this solves the problem, something in your theme is probably broken – let the theme's author know.", 'jetpack' ); ?></li>
+ <li>
+ <b><em><?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?></em></b>
+ <?php
+ $default_theme = wp_get_theme( WP_DEFAULT_THEME );
+
+ if ( $default_theme->exists() ) {
+ echo esc_html( sprintf( __( "If your problem isn't known or caused by a plugin, try activating %s (the default WordPress theme).", 'jetpack' ), $default_theme->get( 'Name' ) ) );
+ } else {
+ esc_html_e( "If your problem isn't known or caused by a plugin, try activating the default WordPress theme.", 'jetpack' );
+ }
+ ?>
+ <?php esc_html_e( "If this solves the problem, something in your theme is probably broken – let the theme's author know.", 'jetpack' ); ?>
+ </li>
<li><b><em><?php esc_html_e( 'A problem with your XMLRPC file.', 'jetpack' ); ?></em></b> <?php echo sprintf( __( 'Load your <a href="%s">XMLRPC file</a>. It should say “XML-RPC server accepts POST requests only.” on a line by itself.', 'jetpack' ), site_url( 'xmlrpc.php' ) ); ?>
<ul>
<li>- <?php esc_html_e( "If it's not by itself, a theme or plugin is displaying extra characters. Try steps 2 and 3.", 'jetpack' ); ?></li>
@@ -171,7 +212,22 @@ class Jetpack_Debugger {
<input type="hidden" name="contact_form" id="contact_form" value="1">
<input type="hidden" name="blog_url" id="blog_url" value="<?php echo esc_attr( site_url() ); ?>">
- <input type="hidden" name="subject" id="subject" value="from: <?php echo esc_attr( site_url() ); ?> Jetpack contact form">
+ <?php
+ $subject_line = sprintf(
+ /* translators: %s is the URL of the site */
+ _x( 'from: %s Jetpack contact form', 'Support request email subject line', 'jetpack' ),
+ esc_attr( site_url() )
+ );
+
+ if ( Jetpack::is_development_version() ) {
+ $subject_line = 'BETA ' . $subject_line;
+ }
+
+ $subject_line_input = printf(
+ '<input type="hidden" name="subject" id="subject" value="%s"">',
+ $subject_line
+ );
+ ?>
<div class="formbox">
<label for="message" class="h"><?php esc_html_e( 'Please describe the problem you are having.', 'jetpack' ); ?></label>
<textarea name="message" cols="40" rows="7" id="did"></textarea>
diff --git a/plugins/jetpack/class.jetpack-heartbeat.php b/plugins/jetpack/class.jetpack-heartbeat.php
index 744a3a08..2c1fa4f2 100644
--- a/plugins/jetpack/class.jetpack-heartbeat.php
+++ b/plugins/jetpack/class.jetpack-heartbeat.php
@@ -91,6 +91,11 @@ class Jetpack_Heartbeat {
$jetpack->do_stats( 'server_side' );
+ /**
+ * Fires when we synchronize all registered options on heartbeat.
+ *
+ * @since 3.3.0
+ */
do_action( 'jetpack_heartbeat' );
}
@@ -105,12 +110,15 @@ class Jetpack_Heartbeat {
$return["{$prefix}php-branch"] = floatval( PHP_VERSION );
$return["{$prefix}public"] = Jetpack_Options::get_option( 'public' );
$return["{$prefix}ssl"] = Jetpack::permit_ssl();
+ $return["{$prefix}is-https"] = is_ssl() ? 'https' : 'http';
$return["{$prefix}language"] = get_bloginfo( 'language' );
$return["{$prefix}charset"] = get_bloginfo( 'charset' );
$return["{$prefix}is-multisite"] = is_multisite() ? 'multisite' : 'singlesite';
$return["{$prefix}identitycrisis"] = Jetpack::check_identity_crisis( 1 ) ? 'yes' : 'no';
$return["{$prefix}plugins"] = implode( ',', Jetpack::get_active_plugins() );
+ $return["{$prefix}single-user-site"]= Jetpack::is_single_user_site();
+
$return["{$prefix}manage-enabled"] = Jetpack::is_module_active( 'manage' );
// is-multi-network can have three values, `single-site`, `single-network`, and `multi-network`
diff --git a/plugins/jetpack/class.jetpack-ixr-client.php b/plugins/jetpack/class.jetpack-ixr-client.php
index 7eefee5f..a3d67a34 100644
--- a/plugins/jetpack/class.jetpack-ixr-client.php
+++ b/plugins/jetpack/class.jetpack-ixr-client.php
@@ -1,5 +1,7 @@
<?php
+require_once( ABSPATH . WPINC . '/class-IXR.php' );
+
/**
* IXR_Client
*
@@ -8,9 +10,9 @@
*
*/
class Jetpack_IXR_Client extends IXR_Client {
- var $jetpack_args = null;
+ public $jetpack_args = null;
- function Jetpack_IXR_Client( $args = array(), $path = false, $port = 80, $timeout = 15 ) {
+ function __construct( $args = array(), $path = false, $port = 80, $timeout = 15 ) {
$defaults = array(
'url' => Jetpack::xmlrpc_api_url(),
'user_id' => 0,
@@ -29,10 +31,6 @@ class Jetpack_IXR_Client extends IXR_Client {
$request = new IXR_Request( $method, $args );
$xml = trim( $request->getXml() );
- $headers = array(
- 'Content-Type' => 'text/xml',
- );
-
$response = Jetpack_Client::remote_request( $this->jetpack_args, $xml );
if ( is_wp_error( $response ) ) {
@@ -97,10 +95,10 @@ class Jetpack_IXR_Client extends IXR_Client {
* @since 1.5
*/
class Jetpack_IXR_ClientMulticall extends Jetpack_IXR_Client {
- var $calls = array();
+ public $calls = array();
- function Jetpack_IXR_ClientMulticall( $args = array(), $path = false, $port = 80, $timeout = 15 ) {
- parent::Jetpack_IXR_Client( $args, $path, $port, $timeout );
+ function __construct( $args = array(), $path = false, $port = 80, $timeout = 15 ) {
+ parent::__construct( $args, $path, $port, $timeout );
}
function addCall() {
diff --git a/plugins/jetpack/class.jetpack-jitm.php b/plugins/jetpack/class.jetpack-jitm.php
new file mode 100644
index 00000000..a4760400
--- /dev/null
+++ b/plugins/jetpack/class.jetpack-jitm.php
@@ -0,0 +1,426 @@
+<?php
+
+/**
+ * Jetpack just in time messaging through out the admin
+ *
+ * @since 3.7.0
+ */
+class Jetpack_JITM {
+
+ /**
+ * @var Jetpack_JITM
+ **/
+ private static $instance = null;
+
+ /**
+ * Get user dismissed messages.
+ *
+ * @var array
+ */
+ private static $jetpack_hide_jitm = null;
+
+ /**
+ * Whether plugin auto updates are allowed in this WordPress installation or not.
+ *
+ * @var bool
+ */
+ private static $auto_updates_allowed = false;
+
+ static function init() {
+ if ( is_null( self::$instance ) ) {
+ self::$instance = new Jetpack_JITM;
+ }
+
+ return self::$instance;
+ }
+
+ private function __construct() {
+ if ( ! Jetpack::is_active() || self::is_jitm_dismissed() ) {
+ return;
+ }
+ add_action( 'current_screen', array( $this, 'prepare_jitms' ) );
+ }
+
+ /**
+ * Prepare actions according to screen and post type.
+ *
+ * @since 3.8.2
+ *
+ * @uses Jetpack_Autoupdate::get_possible_failures()
+ *
+ * @param object $screen
+ */
+ function prepare_jitms( $screen ) {
+ if ( ! current_user_can( 'jetpack_manage_modules' ) ) {
+ return;
+ }
+ global $pagenow;
+
+ // Only show auto update JITM if auto updates are allowed in this installation
+ $possible_reasons_for_failure = Jetpack_Autoupdate::get_possible_failures();
+ self::$auto_updates_allowed = empty( $possible_reasons_for_failure );
+ $photon_inactive = ! Jetpack::is_module_active( 'photon' );
+
+ if ( 'media-new.php' == $pagenow && $photon_inactive ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
+ add_action( 'post-plupload-upload-ui', array( $this, 'photon_msg' ) );
+ }
+ elseif ( 'post-new.php' == $pagenow ) {
+ $calypso_supported_post_types = in_array( $screen->post_type, array( 'post', 'page' ) );
+ if ( $calypso_supported_post_types || $photon_inactive ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
+ }
+ if ( $calypso_supported_post_types ) {
+ add_action( 'admin_notices', array( $this, 'editor_msg' ) );
+ }
+ if ( $photon_inactive ) {
+ add_action( 'print_media_templates', array( $this, 'photon_tmpl' ) );
+ }
+ }
+ elseif ( 'post.php' == $pagenow ) {
+ $user_published = isset( $_GET['message'] ) && 6 == $_GET['message'];
+ if ( $user_published || $photon_inactive ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
+ }
+ if ( $user_published ) {
+ add_action( 'edit_form_top', array( $this, 'stats_msg' ) );
+ }
+ if ( $photon_inactive ) {
+ add_action( 'print_media_templates', array( $this, 'photon_tmpl' ) );
+ }
+ }
+ elseif ( self::$auto_updates_allowed ) {
+ if ( 'update-core.php' == $pagenow && ! Jetpack::is_module_active( 'manage' ) ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
+ add_action( 'admin_notices', array( $this, 'manage_msg' ) );
+ }
+ elseif ( 'plugins.php' == $pagenow ) {
+ if ( ( isset( $_GET['activate'] ) && 'true' === $_GET['activate'] ) || ( isset( $_GET['activate-multi'] ) && 'true' === $_GET['activate-multi'] ) ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
+ add_action( 'pre_current_active_plugins', array( $this, 'manage_pi_msg' ) );
+ } else {
+
+ // Save plugins that are activated. This is used when one or more plugins are activated to know
+ // what was activated and use it in Jetpack_JITM::manage_pi_msg() before deleting the option.
+ $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
+ $action = $wp_list_table->current_action();
+ if ( $action && ( 'activate' == $action || 'activate-selected' == $action ) ) {
+ update_option( 'jetpack_temp_active_plugins_before', get_option( 'active_plugins', array() ) );
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Present Manage just in time activation msg on update-core.php
+ *
+ */
+ function manage_msg() {
+ $normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
+ ?>
+ <div class="jp-jitm">
+ <a href="#" data-module="manage" class="dismiss"><span class="genericon genericon-close"></span></a>
+
+ <div class="jp-emblem">
+ <?php echo self::get_jp_emblem(); ?>
+ </div>
+ <p class="msg">
+ <?php esc_html_e( 'Reduce security risks with automated plugin updates.', 'jetpack' ); ?>
+ </p>
+
+ <p>
+ <img class="j-spinner hide" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="manage" class="activate button <?php if ( Jetpack::is_module_active( 'manage' ) ) {
+ echo 'hide';
+ } ?>"><?php esc_html_e( 'Activate Now', 'jetpack' ); ?></a><a href="<?php echo esc_url( 'https://wordpress.com/plugins/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Go to WordPress.com to try these features', 'jetpack' ); ?>" id="jetpack-wordpressdotcom" class="button button-jetpack <?php if ( ! Jetpack::is_module_active( 'manage' ) ) {
+ echo 'hide';
+ } ?>"><?php esc_html_e( 'Go to WordPress.com', 'jetpack' ); ?></a>
+ </p>
+ </div>
+ <?php
+ //jitm is being viewed, track it
+ $jetpack = Jetpack::init();
+ $jetpack->stat( 'jitm', 'manage-viewed-' . JETPACK__VERSION );
+ $jetpack->do_stats( 'server_side' );
+ }
+
+ /*
+ * Present Photon just in time activation msg
+ *
+ */
+ function photon_msg() {
+ ?>
+ <div class="jp-jitm">
+ <a href="#" data-module="photon" class="dismiss"><span class="genericon genericon-close"></span></a>
+
+ <div class="jp-emblem">
+ <?php echo self::get_jp_emblem(); ?>
+ </div>
+ <p class="msg">
+ <?php esc_html_e( 'Speed up your photos and save bandwidth costs by using a free content delivery network.', 'jetpack' ); ?>
+ </p>
+
+ <p>
+ <img class="j-spinner hide" style="margin-top: 13px;" width="17" height="17" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="photon" class="activate button button-jetpack"><?php esc_html_e( 'Activate Photon', 'jetpack' ); ?></a>
+ </p>
+ </div>
+ <?php
+ //jitm is being viewed, track it
+ $jetpack = Jetpack::init();
+ $jetpack->stat( 'jitm', 'photon-viewed-' . JETPACK__VERSION );
+ $jetpack->do_stats( 'server_side' );
+ }
+
+ /**
+ * Display Photon JITM template in Media Library after user uploads an image.
+ *
+ * @since 3.9.0
+ */
+ function photon_tmpl() {
+ ?>
+ <script id="tmpl-jitm-photon" type="text/html">
+ <div class="jp-jitm" data-track="photon-modal">
+ <a href="#" data-module="photon" class="dismiss"><span class="genericon genericon-close"></span></a>
+
+ <div class="jp-emblem">
+ <?php echo self::get_jp_emblem(); ?>
+ </div>
+ <p class="msg">
+ <?php esc_html_e( 'Let Jetpack deliver your images optimized and faster than ever.', 'jetpack' ); ?>
+ </p>
+
+ <p>
+ <img class="j-spinner hide" style="margin-top: 13px;" width="17" height="17" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="photon" class="activate button button-jetpack"><?php esc_html_e( 'Activate Photon', 'jetpack' ); ?></a>
+ </p>
+ </div>
+ </script>
+ <?php
+ }
+
+ /**
+ * Display message prompting user to enable auto-updates in WordPress.com.
+ *
+ * @since 3.8.2
+ */
+ function manage_pi_msg() {
+ $normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
+ $manage_active = Jetpack::is_module_active( 'manage' );
+
+ // Check if plugin has auto update already enabled in WordPress.com and don't show JITM in such case.
+ $active_before = get_option( 'jetpack_temp_active_plugins_before', array() );
+ delete_option( 'jetpack_temp_active_plugins_before' );
+ $active_now = get_option( 'active_plugins', array() );
+ $activated = array_diff( $active_now, $active_before );
+ $auto_update_plugin_list = Jetpack_Options::get_option( 'autoupdate_plugins', array() );
+ $plugin_auto_update_disabled = false;
+ foreach ( $activated as $plugin ) {
+ if ( ! in_array( $plugin, $auto_update_plugin_list ) ) {
+
+ // Plugin doesn't have auto updates enabled in WordPress.com yet.
+ $plugin_auto_update_disabled = true;
+
+ // We don't need to continue checking, it's ok to show JITM for this plugin.
+ break;
+ }
+ }
+
+ // Check if the activated plugin is in the WordPress.org repository
+ $plugin_can_auto_update = false;
+ $plugin_updates = get_site_transient( 'update_plugins' );
+ if ( false === $plugin_updates ) {
+
+ // If update_plugins doesn't exist, display message anyway
+ $plugin_can_auto_update = true;
+ } else {
+ $plugin_updates = array_merge( $plugin_updates->response, $plugin_updates->no_update );
+ foreach ( $activated as $plugin ) {
+ if ( isset( $plugin_updates[ $plugin ] ) ) {
+
+ // There's at least one plugin set cleared for auto updates
+ $plugin_can_auto_update = true;
+
+ // We don't need to continue checking, it's ok to show JITM for this round.
+ break;
+ }
+ }
+ }
+
+ if ( ! $manage_active && $plugin_auto_update_disabled && $plugin_can_auto_update && self::$auto_updates_allowed ) :
+ ?>
+ <div class="jp-jitm">
+ <a href="#" data-module="manage-pi" class="dismiss"><span class="genericon genericon-close"></span></a>
+
+ <div class="jp-emblem">
+ <?php echo self::get_jp_emblem(); ?>
+ </div>
+ <?php if ( ! $manage_active ) : ?>
+ <p class="msg">
+ <?php esc_html_e( 'Save time with automated plugin updates.', 'jetpack' ); ?>
+ </p>
+ <p>
+ <img class="j-spinner hide" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="manage" data-module-success="<?php esc_attr_e( 'Success!', 'jetpack' ); ?>" class="activate button"><?php esc_html_e( 'Activate remote management', 'jetpack' ); ?></a>
+ </p>
+ <?php elseif ( $manage_active ) : ?>
+ <p>
+ <?php esc_html_e( 'Save time with auto updates on WordPress.com', 'jetpack' ); ?>
+ </p>
+ <?php endif; // manage inactive
+ ?>
+ <p class="show-after-enable <?php echo $manage_active ? '' : 'hide'; ?>">
+ <a href="<?php echo esc_url( 'https://wordpress.com/plugins/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Go to WordPress.com to enable auto-updates for plugins', 'jetpack' ); ?>" data-module="manage-pi" class="button button-jetpack launch show-after-enable"><?php if ( ! $manage_active ) : ?><?php esc_html_e( 'Enable auto-updates on WordPress.com', 'jetpack' ); ?><?php elseif ( $manage_active ) : ?><?php esc_html_e( 'Enable auto-updates', 'jetpack' ); ?><?php endif; // manage inactive ?></a>
+ </p>
+ </div>
+ <?php
+ //jitm is being viewed, track it
+ $jetpack = Jetpack::init();
+ $jetpack->stat( 'jitm', 'manage-pi-viewed-' . JETPACK__VERSION );
+ $jetpack->do_stats( 'server_side' );
+ endif; // manage inactive
+ }
+
+ /**
+ * Display message in editor prompting user to compose entry in WordPress.com.
+ *
+ * @since 3.8.2
+ */
+ function editor_msg() {
+ global $typenow;
+ if ( current_user_can( 'manage_options' ) ) {
+ $normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
+ $editor_dismissed = isset( self::$jetpack_hide_jitm['editor'] );
+ if ( ! $editor_dismissed ) :
+ ?>
+ <div class="jp-jitm">
+ <a href="#" data-module="editor" class="dismiss"><span class="genericon genericon-close"></span></a>
+ <div class="jp-emblem">
+ <?php echo self::get_jp_emblem(); ?>
+ </div>
+ <p class="msg">
+ <?php esc_html_e( 'Try the brand new editor.', 'jetpack' ); ?>
+ </p>
+ <p>
+ <a href="<?php echo esc_url( 'https://wordpress.com/' . $typenow . '/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Write on WordPress.com', 'jetpack' ); ?>" data-module="editor" class="button button-jetpack launch show-after-enable"><?php esc_html_e( 'Write on WordPress.com', 'jetpack' ); ?></a>
+ </p>
+ </div>
+ <?php
+ //jitm is being viewed, track it
+ $jetpack = Jetpack::init();
+ $jetpack->stat( 'jitm', 'editor-viewed-' . JETPACK__VERSION );
+ $jetpack->do_stats( 'server_side' );
+ endif; // manage or editor inactive
+ }
+ }
+
+ /**
+ * Display message in editor prompting user to enable stats.
+ *
+ * @since 3.9.0
+ */
+ function stats_msg() {
+ $stats_active = Jetpack::is_module_active( 'stats' );
+ $normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
+ ?>
+ <div class="jp-jitm">
+ <a href="#" data-module="stats" class="dismiss"><span class="genericon genericon-close"></span></a>
+
+ <div class="jp-emblem">
+ <?php echo self::get_jp_emblem(); ?>
+ </div>
+ <p class="msg">
+ <?php esc_html_e( 'Track detailed stats on this post and the rest of your site.', 'jetpack' ); ?>
+ </p>
+ <?php if ( ! $stats_active ) : ?>
+ <p>
+ <img class="j-spinner hide" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="stats" data-module-success="<?php esc_attr_e( 'Success! Jetpack Stats is now activated.', 'jetpack' ); ?>" class="activate button"><?php esc_html_e( 'Enable Jetpack Stats', 'jetpack' ); ?></a>
+ </p>
+ <?php endif; // stats inactive
+ ?>
+ <p class="show-after-enable <?php echo $stats_active ? '' : 'hide'; ?>">
+ <a href="<?php echo esc_url( 'https://wordpress.com/stats/insights/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Go to WordPress.com', 'jetpack' ); ?>" data-module="stats" class="button button-jetpack launch show-after-enable"><?php esc_html_e( 'Go to WordPress.com', 'jetpack' ); ?></a>
+ </p>
+ </div>
+ <?php
+ //jitm is being viewed, track it
+ $jetpack = Jetpack::init();
+ $jetpack->stat( 'jitm', 'post-stats-viewed-' . JETPACK__VERSION );
+ $jetpack->do_stats( 'server_side' );
+ }
+
+ /*
+ * Function to enqueue jitm css and js
+ */
+ function jitm_enqueue_files( $hook ) {
+
+ $wp_styles = new WP_Styles();
+ $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
+ wp_enqueue_style( 'jetpack-jitm-css', plugins_url( "css/jetpack-admin-jitm{$min}.css", JETPACK__PLUGIN_FILE ), false, JETPACK__VERSION . '-201243242' );
+ $wp_styles->add_data( 'jetpack-jitm-css', 'rtl', true );
+
+ //Build stats url for tracking manage button
+ $jitm_stats_url = Jetpack::build_stats_url( array( 'x_jetpack-jitm' => 'wordpresstools' ) );
+
+ // Enqueue javascript to handle jitm notice events
+ wp_enqueue_script( 'jetpack-jitm-js', plugins_url( '_inc/jetpack-jitm.js', JETPACK__PLUGIN_FILE ),
+ array( 'jquery' ), JETPACK__VERSION, true );
+ wp_localize_script(
+ 'jetpack-jitm-js',
+ 'jitmL10n',
+ array(
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
+ 'jitm_nonce' => wp_create_nonce( 'jetpack-jitm-nonce' ),
+ 'photon_msgs' => array(
+ 'success' => esc_html__( 'Success! Photon is now actively optimizing and serving your images for free.', 'jetpack' ),
+ 'fail' => esc_html__( 'We are sorry but unfortunately Photon did not activate.', 'jetpack' )
+ ),
+ 'manage_msgs' => array(
+ 'success' => esc_html__( 'Success! WordPress.com tools are now active.', 'jetpack' ),
+ 'fail' => esc_html__( 'We are sorry but unfortunately Manage did not activate.', 'jetpack' )
+ ),
+ 'stats_msgs' => array(
+ 'success' => esc_html__( 'Success! Stats are now active.', 'jetpack' ),
+ 'fail' => esc_html__( 'We are sorry but unfortunately Stats did not activate.', 'jetpack' )
+ ),
+ 'jitm_stats_url' => $jitm_stats_url
+ )
+ );
+ }
+
+ /**
+ * Check if a JITM was dismissed or not. Currently, dismissing one JITM will dismiss all of them.
+ *
+ * @since 3.8.2
+ *
+ * @return bool
+ */
+ function is_jitm_dismissed() {
+ if ( is_null( self::$jetpack_hide_jitm ) ) {
+
+ // The option returns false when nothing was dismissed
+ self::$jetpack_hide_jitm = Jetpack_Options::get_option( 'hide_jitm' );
+ }
+
+ // so if it's not an array, it means no JITM was dismissed
+ return is_array( self::$jetpack_hide_jitm );
+ }
+
+ /**
+ * Return string containing the Jetpack logo.
+ *
+ * @since 3.9.0
+ *
+ * @return string
+ */
+ function get_jp_emblem() {
+ return '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0" y="0" viewBox="0 0 172.9 172.9" enable-background="new 0 0 172.9 172.9" xml:space="preserve"> <path d="M86.4 0C38.7 0 0 38.7 0 86.4c0 47.7 38.7 86.4 86.4 86.4s86.4-38.7 86.4-86.4C172.9 38.7 134.2 0 86.4 0zM83.1 106.6l-27.1-6.9C49 98 45.7 90.1 49.3 84l33.8-58.5V106.6zM124.9 88.9l-33.8 58.5V66.3l27.1 6.9C125.1 74.9 128.4 82.8 124.9 88.9z" /></svg>';
+ }
+}
+/**
+ * Filter to turn off all just in time messages
+ *
+ * @since 3.7.0
+ *
+ * @param bool true Whether to show just in time messages.
+ */
+if ( apply_filters( 'jetpack_just_in_time_msgs', false ) ) {
+ Jetpack_JITM::init();
+} \ No newline at end of file
diff --git a/plugins/jetpack/class.jetpack-modules-list-table.php b/plugins/jetpack/class.jetpack-modules-list-table.php
index fb649f33..941bae75 100644
--- a/plugins/jetpack/class.jetpack-modules-list-table.php
+++ b/plugins/jetpack/class.jetpack-modules-list-table.php
@@ -18,8 +18,16 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
$this->items = $this->all_items = Jetpack_Admin::init()->get_modules();
$this->items = $this->filter_displayed_table_items( $this->items );
+ /**
+ * Filters the list of modules available to be displayed in the Jetpack Settings screen.
+ *
+ * @since 3.0.0
+ *
+ * @param array $this->items Array of Jetpack modules.
+ */
$this->items = apply_filters( 'jetpack_modules_list_table_items', $this->items );
- $this->_column_headers = array( $this->get_columns(), array(), array() );
+ $this->_column_headers = array( $this->get_columns(), array(), array(), 'name' );
+ $modal_info = isset( $_GET['info'] ) ? $_GET['info'] : false;
wp_register_script(
'models.jetpack-modules',
@@ -50,13 +58,23 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
'i18n' => array(
'search_placeholder' => __( 'Search Modules…', 'jetpack' ),
),
+ 'modalinfo' => $this->module_info_check( $modal_info, $this->all_items ),
'nonces' => array(
'bulk' => wp_create_nonce( 'bulk-jetpack_page_jetpack_modules' ),
),
+ 'coreIconAvailable' => Jetpack::jetpack_site_icon_available_in_core(),
) );
wp_enqueue_script( 'jetpack-modules-list-table' );
- add_action( 'admin_footer', array( $this, 'js_templates' ), 9 );
+
+ /**
+ * Filters the js_templates callback value.
+ *
+ * @since 3.6.0
+ *
+ * @param array array( $this, 'js_templates' ) js_templates callback.
+ */
+ add_action( 'admin_footer', apply_filters( 'jetpack_modules_list_table_js_template_callback', array( $this, 'js_templates' ) ), 9 );
}
function js_templates() {
@@ -66,7 +84,20 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
if ( data.items.length ) {
_.each( data.items, function( item, key, list ) {
if ( item === undefined ) return;
- #>
+ if ( jetpackModulesData.coreIconAvailable && 'site-icon' == item.module ) { #>
+ <tr class="jetpack-module deprecated <# if ( ++i % 2 ) { #> alternate<# } #>" id="site-icon-deprecated">
+ <th scope="row" class="check-column">
+ <input type="checkbox" name="modules[]" value="{{{ item.module }}}" disabled />
+ </th>
+ <td class='name column-name'>
+ <span class='info'>{{{ item.name }}}</span>
+ <div class="row-actions">
+ <span class="dep-msg"><?php _ex( 'WordPress now has Site Icon built in!', '"Site Icon" is the feature name.', 'jetpack' ); ?></span>
+ <span class='configure'><a href="<?php esc_html_e( admin_url( 'customize.php?autofocus[control]=site_icon' ), 'jetpack' ); ?>"><?php _e( 'Configure' , 'jetpack' ); ?></a></span>
+ </div>
+ </td>
+ </tr>
+ <# return; } #>
<tr class="jetpack-module <# if ( ++i % 2 ) { #> alternate<# } #><# if ( item.activated ) { #> active<# } #><# if ( ! item.available ) { #> unavailable<# } #>" id="{{{ item.module }}}">
<th scope="row" class="check-column">
<input type="checkbox" name="modules[]" value="{{{ item.module }}}" />
@@ -77,7 +108,7 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
<# if ( item.configurable ) { #>
<span class='configure'>{{{ item.configurable }}}</span>
<# } #>
- <# if ( item.activated && 'vaultpress' !== item.module ) { #>
+ <# if ( item.activated && 'vaultpress' !== item.module && item.available ) { #>
<span class='delete'><a href="<?php echo admin_url( 'admin.php' ); ?>?page=jetpack&#038;action=deactivate&#038;module={{{ item.module }}}&#038;_wpnonce={{{ item.deactivate_nonce }}}"><?php _e( 'Deactivate', 'jetpack' ); ?></a></span>
<# } else if ( item.available ) { #>
<span class='activate'><a href="<?php echo admin_url( 'admin.php' ); ?>?page=jetpack&#038;action=activate&#038;module={{{ item.module }}}&#038;_wpnonce={{{ item.activate_nonce }}}"><?php _e( 'Activate', 'jetpack' ); ?></a></span>
@@ -115,7 +146,7 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
'all' => sprintf( $format, $title, $count, $url, $current ),
);
foreach ( $module_tags_unique as $title => $count ) {
- if( 'Jumpstart' == $title ) {
+ if ( 'Jumpstart' == $title ) {
continue;
}
$key = sanitize_title( $title );
@@ -148,7 +179,11 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
if ( ! is_array( $module ) || empty( $module ) )
return false;
- return ! ( $module['requires_connection'] && ! Jetpack::is_active() );
+ if ( Jetpack::is_development_mode() ) {
+ return ! ( $module['requires_connection'] );
+ } else {
+ return Jetpack::is_active();
+ }
}
static function is_module_displayed( $module ) {
@@ -266,14 +301,13 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
function column_description( $item ) {
ob_start();
+ /** This action is documented in class.jetpack-admin.php */
echo apply_filters( 'jetpack_short_module_description', $item['description'], $item['module'] );
+ /** This action is documented in class.jetpack-admin.php */
do_action( 'jetpack_learn_more_button_' . $item['module'] );
echo '<div id="more-info-' . $item['module'] . '" class="more-info">';
- if ( Jetpack::is_active() && has_action( 'jetpack_module_more_info_connected_' . $item['module'] ) ) {
- do_action( 'jetpack_module_more_info_connected_' . $item['module'] );
- } else {
- do_action( 'jetpack_module_more_info_' . $item['module'] );
- }
+ /** This action is documented in class.jetpack-admin.php */
+ do_action( 'jetpack_module_more_info_' . $item['module'] );
echo '</div>';
return ob_get_clean();
}
@@ -297,6 +331,15 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
}
}
+ //Check if the info parameter provided in the URL corresponds to an actual module
+ function module_info_check( $info = false, $modules ) {
+ if ( false == $info ) {
+ return false;
+ } else if ( array_key_exists( $info, $modules ) ) {
+ return $info;
+ }
+ }
+
/**
* Core switched their `display_tablenav()` method to protected, so we can't access it directly.
* Instead, let's include an access function to make it doable without errors!
diff --git a/plugins/jetpack/class.jetpack-network-sites-list-table.php b/plugins/jetpack/class.jetpack-network-sites-list-table.php
index b8a3bfc5..ad89ed3a 100644
--- a/plugins/jetpack/class.jetpack-network-sites-list-table.php
+++ b/plugins/jetpack/class.jetpack-network-sites-list-table.php
@@ -6,7 +6,7 @@ if( ! class_exists( 'WP_List_Table' ) ) {
class Jetpack_Network_Sites_List_Table extends WP_List_Table {
-
+
public function get_columns() {
// site name, status, username connected under
$columns = array(
@@ -26,10 +26,13 @@ class Jetpack_Network_Sites_List_Table extends WP_List_Table {
$this->process_bulk_action();
// Get sites
- $sites = $jpms->wp_get_sites( array( 'exclude_blogs' => array( 1 ) ) );
-
+ $sites = $jpms->wp_get_sites( array(
+ 'exclude_blogs' => array( 1 ),
+ 'archived' => false,
+ ) );
+
// Setup pagination
- $per_page = 40;
+ $per_page = 25;
$current_page = $this->get_pagenum();
$total_items = count( $sites );
$sites = array_slice( $sites, ( ( $current_page-1 ) * $per_page ), $per_page );
@@ -55,15 +58,15 @@ class Jetpack_Network_Sites_List_Table extends WP_List_Table {
'edit' => '<a href="' . network_admin_url( 'site-info.php?id=' . $item->blog_id ) . '">' . __( 'Edit', 'jetpack' ) . '</a>',
'dashboard' => '<a href="' . get_admin_url( $item->blog_id, '', 'admin' ) . '">Dashboard</a>',
'view' => '<a href="' . get_site_url( $item->blog_id, '', 'admin' ) . '">View</a>',
- 'jetpack-' . $item->blog_id => '<a href="' . $jp_url . '">Jetpack</a>',
+ 'jetpack-' . $item->blog_id => '<a href="' . $jp_url . '">Jetpack</a>',
);
return sprintf('%1$s %2$s', '<strong>' . get_blog_option( $item->blog_id, 'blogname' ) . '</strong>', $this->row_actions($actions) );
}
public function column_blog_path( $item ) {
- return
- '<a href="' .
+ return
+ '<a href="' .
get_site_url( $item->blog_id, '', 'admin' ) .
'">' .
str_replace( array( 'http://', 'https://' ), '', get_site_url( $item->blog_id, '', 'admin' ) ) .
@@ -76,7 +79,7 @@ class Jetpack_Network_Sites_List_Table extends WP_List_Table {
switch_to_blog( $item->blog_id );
if( $jp->is_active() ) {
- // Build url for disconnecting
+ // Build url for disconnecting
$url = $jpms->get_url( array(
'name' => 'subsitedisconnect',
'site_id' => $item->blog_id,
@@ -86,7 +89,7 @@ class Jetpack_Network_Sites_List_Table extends WP_List_Table {
return '<a href="' . $url . '">Disconnect</a>';
}
restore_current_blog();
-
+
// Build URL for connecting
$url = $jpms->get_url( array(
'name' => 'subsiteregister',
@@ -107,7 +110,7 @@ class Jetpack_Network_Sites_List_Table extends WP_List_Table {
function column_cb($item) {
return sprintf(
'<input type="checkbox" name="bulk[]" value="%s" />', $item->blog_id
- );
+ );
}
public function process_bulk_action() {
@@ -123,7 +126,7 @@ class Jetpack_Network_Sites_List_Table extends WP_List_Table {
case 'connect':
foreach( $_POST['bulk'] as $k => $site ) {
$jpms->do_subsiteregister( $site );
- }
+ }
break;
case 'disconnect':
foreach( $_POST['bulk'] as $k => $site ) {
diff --git a/plugins/jetpack/class.jetpack-network.php b/plugins/jetpack/class.jetpack-network.php
index de78edf5..620f939f 100644
--- a/plugins/jetpack/class.jetpack-network.php
+++ b/plugins/jetpack/class.jetpack-network.php
@@ -34,9 +34,9 @@ class Jetpack_Network {
* @var array
*/
private $setting_defaults = array(
- 'auto-connect' => 0,
- 'sub-site-connection-override' => 1,
- // 'manage_auto_activated_modules' => 0,
+ 'auto-connect' => 0,
+ 'sub-site-connection-override' => 1,
+ //'manage_auto_activated_modules' => 0,
);
/**
@@ -45,34 +45,34 @@ class Jetpack_Network {
* @since 2.9
*/
private function __construct() {
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); // For the is_plugin... check
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); // For the is_plugin... check
+ require_once( JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php' ); // For managing the global whitelist
/*
* Sanity check to ensure the install is Multisite and we
* are in Network Admin
*/
- if (is_multisite() && is_network_admin()) {
- add_action('network_admin_menu', array($this, 'add_network_admin_menu'));
- add_action('network_admin_edit_jetpack-network-settings', array($this, 'save_network_settings_page'), 10, 0);
+ if ( is_multisite() && is_network_admin() ) {
+ add_action( 'network_admin_menu', array( $this, 'add_network_admin_menu' ) );
+ add_action( 'network_admin_edit_jetpack-network-settings', array( $this, 'save_network_settings_page' ), 10, 0 );
add_filter( 'admin_body_class', array( $this, 'body_class' ) );
- if( isset( $_GET['page'] ) && 'jetpack' == $_GET['page'] ) {
- add_action( 'admin_init', array ( $this, 'jetpack_sites_list' ) );
+ if ( isset( $_GET['page'] ) && 'jetpack' == $_GET['page'] ) {
+ add_action( 'admin_init', array( $this, 'jetpack_sites_list' ) );
}
}
/*
* Things that should only run on multisite
*/
- if( is_multisite() && is_plugin_active_for_network( 'jetpack/jetpack.php' ) ) {
+ if ( is_multisite() && is_plugin_active_for_network( 'jetpack/jetpack.php' ) ) {
add_action( 'wp_before_admin_bar_render', array( $this, 'add_to_menubar' ) );
-
/*
* If admin wants to automagically register new sites set the hook here
*
* This is a hacky way because xmlrpc is not available on wpmu_new_blog
*/
- if( $this->get_option( 'auto-connect' ) == 1 ) {
+ if ( $this->get_option( 'auto-connect' ) == 1 ) {
add_action( 'wpmu_new_blog', array( $this, 'do_automatically_add_new_site' ) );
}
}
@@ -86,27 +86,29 @@ class Jetpack_Network {
* Modules can be set in Network Admin > Jetpack > Settings
*
* @since 2.9
+ *
* @param array $modules
+ *
* @return array
**/
public function set_auto_activated_modules( $modules ) {
return $modules;
-/* Remove the toggles for 2.9, re-evaluate how they're done and added for a 3.0 release. They don't feel quite right yet.
+ /* Remove the toggles for 2.9, re-evaluate how they're done and added for a 3.0 release. They don't feel quite right yet.
if( 1 == $this->get_option( 'manage_auto_activated_modules' ) ) {
return (array) $this->get_option( 'modules' );
} else {
return $modules;
}
-*/
+ */
}
-
/**
* Registers new sites upon creation
*
* @since 2.9
- * @uses wpmu_new_blog
+ * @uses wpmu_new_blog
+ *
* @param int $blog_id
**/
public function do_automatically_add_new_site( $blog_id ) {
@@ -115,7 +117,7 @@ class Jetpack_Network {
/**
* Adds .network-admin class to the body tag
- * Helps distiguish network admin JP styles from regular site JP styles
+ * Helps distinguish network admin JP styles from regular site JP styles
*
* @since 2.9
*/
@@ -132,7 +134,7 @@ class Jetpack_Network {
* @return Jetpack_Network
*/
public static function init() {
- if (!self::$instance || !is_a(self::$instance, 'Jetpack_Network')) {
+ if ( ! self::$instance || ! is_a( self::$instance, 'Jetpack_Network' ) ) {
self::$instance = new Jetpack_Network;
}
@@ -160,11 +162,14 @@ class Jetpack_Network {
* @since 2.9
**/
public function deactivate() {
- if( !is_network_admin() ) return; // Only fire if in network admin
+ // Only fire if in network admin
+ if ( ! is_network_admin() ) {
+ return;
+ }
$sites = $this->wp_get_sites();
- foreach( $sites as $s ) {
+ foreach ( $sites as $s ) {
switch_to_blog( $s->blog_id );
$active_plugins = get_option( 'active_plugins' );
@@ -174,7 +179,7 @@ class Jetpack_Network {
* individually (before network activation) stay activated
* when the network deactivation occurs
*/
- if( !in_array( 'jetpack/jetpack.php', $active_plugins ) ) {
+ if ( ! in_array( 'jetpack/jetpack.php', $active_plugins ) ) {
Jetpack::disconnect();
}
}
@@ -182,23 +187,24 @@ class Jetpack_Network {
}
/**
- * Adds a link to the Jetpack Network Admin page in the netowrk admin menu bar.
+ * Adds a link to the Jetpack Network Admin page in the network admin menu bar.
*
* @since 2.9
**/
- public function add_to_menubar () {
+ public function add_to_menubar() {
global $wp_admin_bar;
// Don't show for logged out users or single site mode.
- if ( ! is_user_logged_in() || ! is_multisite() )
- return;
-
- $wp_admin_bar->add_node( array(
- 'parent' => 'network-admin',
- 'id' => 'network-admin-jetpack',
- 'title' => __( 'Jetpack' , 'jetpack' ),
- 'href' => $this->get_url( 'network_admin_page' ),
+ if ( ! is_user_logged_in() || ! is_multisite() ) {
+ return;
+ }
+
+ $wp_admin_bar->add_node( array(
+ 'parent' => 'network-admin',
+ 'id' => 'network-admin-jetpack',
+ 'title' => __( 'Jetpack', 'jetpack' ),
+ 'href' => $this->get_url( 'network_admin_page' ),
) );
- }
+ }
/**
* Returns various URL strings. Factory like
@@ -212,40 +218,46 @@ class Jetpack_Network {
* - subsitedisconnect: Pass array( 'name' => 'subsitedisconnect', 'site_id' => SITE_ID )
*
* @since 2.9
+ *
* @param Mixed $args
+ *
* @return String
**/
public function get_url( $args ) {
$url = null; // Default url value
- if( is_string( $args ) )
- $name = $args;
- else
- $name = $args['name'];
-
+ if ( is_string( $args ) ) {
+ $name = $args;
+ } else {
+ $name = $args['name'];
+ }
- switch( $name ) {
- case 'subsiteregister':
- if( !isset( $args['site_id'] ) ) {
- break; // If there is not a site id present we cannot go further
- }
- $url = network_admin_url(
- 'admin.php?page=jetpack&action=subsiteregister&site_id='
- . $args['site_id'] );
- break;
-
- case 'network_admin_page':
- $url = network_admin_url( 'admin.php?page=jetpack' );
- break;
- case 'subsitedisconnect':
- if( !isset( $args['site_id'] ) ) {
- break; // If there is not a site id present we cannot go further
- }
- $url = network_admin_url(
- 'admin.php?page=jetpack&action=subsitedisconnect&site_id='
- . $args['site_id'] );
- break;
+ switch ( $name ) {
+ case 'subsiteregister':
+ if ( ! isset( $args['site_id'] ) ) {
+ break; // If there is not a site id present we cannot go further
+ }
+ $url = network_admin_url(
+ 'admin.php?page=jetpack&action=subsiteregister&site_id='
+ . $args['site_id']
+ );
+ break;
+
+ case 'network_admin_page':
+ $url = network_admin_url( 'admin.php?page=jetpack' );
+ break;
+
+ case 'subsitedisconnect':
+ if ( ! isset( $args['site_id'] ) ) {
+ break; // If there is not a site id present we cannot go further
+ }
+ $url = network_admin_url(
+ 'admin.php?page=jetpack&action=subsitedisconnect&site_id='
+ . $args['site_id']
+ );
+ break;
}
+
return $url;
}
@@ -255,9 +267,9 @@ class Jetpack_Network {
* @since 2.9
*/
public function add_network_admin_menu() {
- add_menu_page( __('Jetpack', 'jetpack'), __('Jetpack', 'jetpack'), 'read', 'jetpack', array($this, 'network_admin_page'), 'div', 3);
- add_submenu_page('jetpack', __('Jetpack Sites', 'jetpack'), __('Sites', 'jetpack'), 'manage_options', 'jetpack', array($this, 'network_admin_page'));
- add_submenu_page('jetpack', __('Settings', 'jetpack'), __('Settings', 'jetpack'), 'read', 'jetpack-settings', array($this, 'render_network_admin_settings_page'));
+ add_menu_page( __( 'Jetpack', 'jetpack' ), __( 'Jetpack', 'jetpack' ), 'jetpack_network_admin_page', 'jetpack', array( $this, 'network_admin_page' ), 'div', 3 );
+ add_submenu_page( 'jetpack', __( 'Jetpack Sites', 'jetpack' ), __( 'Sites', 'jetpack' ), 'jetpack_network_sites_page', 'jetpack', array( $this, 'network_admin_page' ) );
+ add_submenu_page( 'jetpack', __( 'Settings', 'jetpack' ), __( 'Settings', 'jetpack' ), 'jetpack_network_settings_page', 'jetpack-settings', array( $this, 'render_network_admin_settings_page' ) );
/**
* As jetpack_register_genericons is by default fired off a hook,
@@ -267,18 +279,19 @@ class Jetpack_Network {
require_once( JETPACK__PLUGIN_DIR . '_inc/genericons.php' );
jetpack_register_genericons();
- if ( ! wp_style_is( 'jetpack-icons', 'registered' ) )
+ if ( ! wp_style_is( 'jetpack-icons', 'registered' ) ) {
wp_register_style( 'jetpack-icons', plugins_url( 'css/jetpack-icons.min.css', JETPACK__PLUGIN_FILE ), false, JETPACK__VERSION );
+ }
add_action( 'admin_enqueue_scripts', array( $this, 'admin_menu_css' ) );
}
- /**
+ /**
* Adds JP menu icon
*
* @since 2.9
**/
- function admin_menu_css() {
+ function admin_menu_css() {
wp_enqueue_style( 'jetpack-icons' );
}
@@ -291,8 +304,8 @@ class Jetpack_Network {
public function jetpack_sites_list() {
Jetpack::init();
- if( isset( $_GET['action'] ) ) {
- switch( $_GET['action'] ) {
+ if ( isset( $_GET['action'] ) ) {
+ switch ( $_GET['action'] ) {
case 'subsiteregister':
/*
* @todo check_admin_referer( 'jetpack-subsite-register' );
@@ -300,19 +313,20 @@ class Jetpack_Network {
Jetpack::log( 'subsiteregister' );
// If !$_GET['site_id'] stop registration and error
- if( !isset( $_GET['site_id'] ) || empty( $_GET['site_id'] ) ) {
- // Log error to state cookie for display later
- /**
- * @todo Make state messages show on Jetpack NA pages
- **/
- Jetpack::state( 'missing_site_id', 'Site ID must be provided to register a sub-site' );
+ if ( ! isset( $_GET['site_id'] ) || empty( $_GET['site_id'] ) ) {
+ // Log error to state cookie for display later
+ /**
+ * @todo Make state messages show on Jetpack NA pages
+ **/
+ Jetpack::state( 'missing_site_id', 'Site ID must be provided to register a sub-site' );
break;
}
// Send data to register endpoint and retrieve shadow blog details
$result = $this->do_subsiteregister();
- $url = $this->get_url( 'network_admin_page' );
- if( is_wp_error( $result ) ) {
+ $url = $this->get_url( 'network_admin_page' );
+
+ if ( is_wp_error( $result ) ) {
$url = add_query_arg( 'action', 'connection_failed', $url );
} else {
$url = add_query_arg( 'action', 'connected', $url );
@@ -320,16 +334,18 @@ class Jetpack_Network {
wp_safe_redirect( $url );
break;
+
case 'subsitedisconnect':
Jetpack::log( 'subsitedisconnect' );
- if( !isset( $_GET['site_id'] ) || empty( $_GET['site_id'] ) ) {
+ if ( ! isset( $_GET['site_id'] ) || empty( $_GET['site_id'] ) ) {
Jetpack::state( 'missing_site_id', 'Site ID must be provided to disconnect a sub-site' );
break;
}
$this->do_subsitedisconnect();
break;
+
case 'connected':
case 'connection_failed':
add_action( 'jetpack_notices', array( $this, 'show_jetpack_notice' ) );
@@ -339,11 +355,10 @@ class Jetpack_Network {
}
public function show_jetpack_notice() {
-
- if( isset( $_GET['action'] ) && 'connected' == $_GET['action'] ) {
- $notice = 'Blog successfully connected';
- } else if( isset( $_GET['action'] ) && 'connection_failed' == $_GET['action'] ) {
- $notice = 'Blog connection <strong>failed</strong>';
+ if ( isset( $_GET['action'] ) && 'connected' == $_GET['action'] ) {
+ $notice = __( 'Site successfully connected.', 'jetpack' );
+ } else if ( isset( $_GET['action'] ) && 'connection_failed' == $_GET['action'] ) {
+ $notice = __( 'Site connection <strong>failed</strong>', 'jetpack' );
}
Jetpack::init()->load_view( 'admin/network-admin-alert.php', array( 'notice' => $notice ) );
@@ -353,10 +368,13 @@ class Jetpack_Network {
* Disconnect functionality for an individual site
*
* @since 2.9
- * @see Jetpack_Network::jetpack_sites_list()
+ * @see Jetpack_Network::jetpack_sites_list()
*/
public function do_subsitedisconnect( $site_id = null ) {
- $site_id = ( is_null( $site_id ) ) ? $_GET['site_id']: $site_id;
+ if ( ! current_user_can( 'jetpack_disconnect' ) ) {
+ return;
+ }
+ $site_id = ( is_null( $site_id ) ) ? $_GET['site_id'] : $site_id;
switch_to_blog( $site_id );
Jetpack::disconnect();
restore_current_blog();
@@ -366,14 +384,22 @@ class Jetpack_Network {
* Registers a subsite with the Jetpack servers
*
* @since 2.9
- * @todo Break apart into easier to manage chunks that can be unit tested
- * @see Jetpack_Network::jetpack_sites_list();
+ * @todo Break apart into easier to manage chunks that can be unit tested
+ * @see Jetpack_Network::jetpack_sites_list();
*/
public function do_subsiteregister( $site_id = null ) {
+ if ( ! current_user_can( 'jetpack_disconnect' ) ) {
+ return;
+ }
+
+ if ( Jetpack::is_development_mode() ) {
+ return;
+ }
+
$jp = Jetpack::init();
// Figure out what site we are working on
- $site_id = ( is_null( $site_id ) ) ? $_GET['site_id']: $site_id;
+ $site_id = ( is_null( $site_id ) ) ? $_GET['site_id'] : $site_id;
// Build secrets to sent to wpcom for verification
$secrets = $jp->generate_secrets();
@@ -387,20 +413,20 @@ class Jetpack_Network {
/*
* Here we need to switch to the subsite
* For the registration process we really only hijack how it
- * works for an idividual site and pass in some extra data here
+ * works for an individual site and pass in some extra data here
*/
switch_to_blog( $site_id );
// Save the secrets in the subsite so when the wpcom server does a pingback it
// will be able to validate the connection
Jetpack_Options::update_option( 'register',
- $secrets[0] . ':' .$secrets[1]. ':' . $secrets[2]
+ $secrets[0] . ':' . $secrets[1] . ':' . $secrets[2]
);
// Gra info for gmt offset
$gmt_offset = get_option( 'gmt_offset' );
if ( ! $gmt_offset ) {
- $gmt_offset = 0;
+ $gmt_offset = 0;
}
/*
@@ -411,28 +437,29 @@ class Jetpack_Network {
* @todo Find out if sending the stats_id is necessary
*/
$stat_options = get_option( 'stats_options' );
- $stat_id = $stat_options = isset($stats_options['blog_id']) ? $stats_options['blog_id'] : null;
+ $stat_id = $stat_options = isset( $stats_options['blog_id'] ) ? $stats_options['blog_id'] : null;
+
$args = array(
- 'method' => 'POST',
- 'body' => array(
- 'network_url' => $this->get_url( 'network_admin_page' ),
- 'network_wpcom_blog_id' => $network_wpcom_blog_id,
- 'siteurl' => site_url(),
- 'home' => home_url(),
- 'gmt_offset' => $gmt_offset,
- 'timezone_string' => (string) get_option( 'timezone_string' ),
- 'site_name' => (string) get_option( 'blogname' ),
- 'secret_1' => $secrets[0],
- 'secret_2' => $secrets[1],
- 'site_lang' => get_locale(),
- 'timeout' => $timeout,
- 'stats_id' => $stat_id, // Is this still required?
- 'user_id' => get_current_user_id(),
- ),
- 'headers' => array(
- 'Accept' => 'application/json',
- ),
- 'timeout' => $timeout,
+ 'method' => 'POST',
+ 'body' => array(
+ 'network_url' => $this->get_url( 'network_admin_page' ),
+ 'network_wpcom_blog_id' => $network_wpcom_blog_id,
+ 'siteurl' => site_url(),
+ 'home' => home_url(),
+ 'gmt_offset' => $gmt_offset,
+ 'timezone_string' => (string) get_option( 'timezone_string' ),
+ 'site_name' => (string) get_option( 'blogname' ),
+ 'secret_1' => $secrets[0],
+ 'secret_2' => $secrets[1],
+ 'site_lang' => get_locale(),
+ 'timeout' => $timeout,
+ 'stats_id' => $stat_id, // Is this still required?
+ 'user_id' => get_current_user_id(),
+ ),
+ 'headers' => array(
+ 'Accept' => 'application/json',
+ ),
+ 'timeout' => $timeout,
);
// Attempt to retrieve shadow blog details
@@ -450,20 +477,24 @@ class Jetpack_Network {
*/
$valid_response = $jp->validate_remote_register_response( $response );
- if( is_wp_error( $valid_response ) || !$valid_response ) {
+ if ( is_wp_error( $valid_response ) || ! $valid_response ) {
+ restore_current_blog();
return $valid_response;
}
// Grab the response values to work with
$code = wp_remote_retrieve_response_code( $response );
$entity = wp_remote_retrieve_body( $response );
- if ( $entity )
+ if ( $entity ) {
$json = json_decode( $entity );
- else
+ } else {
$json = false;
+ }
- if ( empty( $json->jetpack_secret ) || ! is_string( $json->jetpack_secret ) )
- return new Jetpack_Error( 'jetpack_secret', '', $code );
+ if ( empty( $json->jetpack_secret ) || ! is_string( $json->jetpack_secret ) ) {
+ restore_current_blog();
+ return new Jetpack_Error( 'jetpack_secret', '', $code );
+ }
if ( isset( $json->jetpack_public ) ) {
$jetpack_public = (int) $json->jetpack_public;
@@ -471,13 +502,11 @@ class Jetpack_Network {
$jetpack_public = false;
}
- Jetpack_Options::update_options(
- array(
- 'id' => (int) $json->jetpack_id,
+ Jetpack_Options::update_options( array(
+ 'id' => (int) $json->jetpack_id,
'blog_token' => (string) $json->jetpack_secret,
'public' => $jetpack_public,
- )
- );
+ ) );
/*
* Update the subsiteregister method on wpcom so that it also sends back the
@@ -486,11 +515,7 @@ class Jetpack_Network {
$is_master_user = ! Jetpack::is_active();
Jetpack::update_user_token(
get_current_user_id(),
- sprintf(
- '%s.%d',
- $json->token->secret,
- get_current_user_id()
- ),
+ sprintf( '%s.%d', $json->token->secret, get_current_user_id() ),
$is_master_user
);
@@ -504,46 +529,47 @@ class Jetpack_Network {
* dis/connected to Jetpack
*
* @since 2.9
- * @see Jetpack_Network::jetpack_sites_list()
+ * @see Jetpack_Network::jetpack_sites_list()
*/
function network_admin_page() {
global $current_site;
$this->network_admin_page_header();
- $jp = Jetpack::init();
+ $jp = Jetpack::init();
- // We should be, but ensure we are on the main blog
- switch_to_blog( $current_site->blog_id );
- $main_active = $jp->is_active();
- restore_current_blog();
+ // We should be, but ensure we are on the main blog
+ switch_to_blog( $current_site->blog_id );
+ $main_active = $jp->is_active();
+ restore_current_blog();
- // If we are in dev mode, just show the notice and bail
- if ( Jetpack::is_development_mode() ) {
- Jetpack::show_development_mode_notice();
- return;
- }
+ // If we are in dev mode, just show the notice and bail
+ if ( Jetpack::is_development_mode() ) {
+ Jetpack::show_development_mode_notice();
+ return;
+ }
- /*
- * Ensure the main blog is connected as all other subsite blog
- * connections will feed off this one
- */
- if( !$main_active ) {
- $url = $this->get_url( array(
- 'name' => 'subsiteregister',
- 'site_id' => 1,
- ) );
- $data = array( 'url' => $jp->build_connect_url() );
- Jetpack::init()->load_view( 'admin/must-connect-main-blog.php', $data );
- return;
- }
+ /*
+ * Ensure the main blog is connected as all other subsite blog
+ * connections will feed off this one
+ */
+ if ( ! $main_active ) {
+ $url = $this->get_url( array(
+ 'name' => 'subsiteregister',
+ 'site_id' => 1,
+ ) );
+ $data = array( 'url' => $jp->build_connect_url() );
+ Jetpack::init()->load_view( 'admin/must-connect-main-blog.php', $data );
+
+ return;
+ }
- require_once( 'class.jetpack-network-sites-list-table.php' );
- $myListTable = new Jetpack_Network_Sites_List_Table();
- echo '<div class="wrap"><h2>' . __('Sites', 'jetpack') . '</h2>';
- echo '<form method="post">';
- $myListTable->prepare_items();
- $myListTable->display();
- echo '</form></div>';
+ require_once( 'class.jetpack-network-sites-list-table.php' );
+ $myListTable = new Jetpack_Network_Sites_List_Table();
+ echo '<div class="wrap"><h2>' . __( 'Sites', 'jetpack' ) . '</h2>';
+ echo '<form method="post">';
+ $myListTable->prepare_items();
+ $myListTable->display();
+ echo '</form></div>';
$this->network_admin_page_footer();
}
@@ -556,7 +582,7 @@ class Jetpack_Network {
function network_admin_page_header() {
global $current_user;
- $is_connected = Jetpack::is_active();
+ $is_connected = Jetpack::is_active();
$data = array(
'is_connected' => $is_connected
@@ -580,6 +606,31 @@ class Jetpack_Network {
*/
public function save_network_settings_page() {
+ if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'jetpack-network-settings' ) ) {
+ // no nonce, push back to settings page
+ wp_safe_redirect(
+ add_query_arg(
+ array( 'page' => 'jetpack-settings' ),
+ network_admin_url( 'admin.php' )
+ )
+ );
+ exit();
+ }
+
+ // try to save the Protect whitelist before anything else, since that action can result in errors
+ $whitelist = str_replace( ' ', '', $_POST['global-whitelist'] );
+ $whitelist = explode( PHP_EOL, $whitelist );
+ $result = jetpack_protect_save_whitelist( $whitelist, $global = true );
+ if ( is_wp_error( $result ) ) {
+ wp_safe_redirect(
+ add_query_arg(
+ array( 'page' => 'jetpack-settings', 'error' => 'jetpack_protect_whitelist' ),
+ network_admin_url( 'admin.php' )
+ )
+ );
+ exit();
+ }
+
/*
* Fields
*
@@ -587,31 +638,41 @@ class Jetpack_Network {
* sub-site-connection-override - Allow sub-site admins to (dis)reconnect with their own Jetpack account
*/
$auto_connect = 0;
- if( isset( $_POST['auto-connect'] ) )
+ if ( isset( $_POST['auto-connect'] ) ) {
$auto_connect = 1;
-
+ }
$sub_site_connection_override = 0;
- if( isset( $_POST['sub-site-connection-override'] ) )
+ if ( isset( $_POST['sub-site-connection-override'] ) ) {
$sub_site_connection_override = 1;
-/* Remove the toggles for 2.9, re-evaluate how they're done and added for a 3.0 release. They don't feel quite right yet.
+ }
+
+ /* Remove the toggles for 2.9, re-evaluate how they're done and added for a 3.0 release. They don't feel quite right yet.
$manage_auto_activated_modules = 0;
- if( isset( $_POST['manage_auto_activated_modules'] ) )
+ if ( isset( $_POST['manage_auto_activated_modules'] ) ) {
$manage_auto_activated_modules = 1;
+ }
$modules = array();
- if( isset( $_POST['modules'] ) )
+ if ( isset( $_POST['modules'] ) ) {
$modules = $_POST['modules'];
-*/
+ }
+ */
+
$data = array(
- 'auto-connect' => $auto_connect,
- 'sub-site-connection-override' => $sub_site_connection_override,
- // 'manage_auto_activated_modules' => $manage_auto_activated_modules,
- // 'modules' => $modules,
+ 'auto-connect' => $auto_connect,
+ 'sub-site-connection-override' => $sub_site_connection_override,
+ //'manage_auto_activated_modules' => $manage_auto_activated_modules,
+ //'modules' => $modules,
);
update_site_option( $this->settings_name, $data );
- wp_safe_redirect(add_query_arg(array('page' => 'jetpack-settings', 'updated' => 'true'), network_admin_url('admin.php')));
+ wp_safe_redirect(
+ add_query_arg(
+ array( 'page' => 'jetpack-settings', 'updated' => 'true' ),
+ network_admin_url( 'admin.php' )
+ )
+ );
exit();
}
@@ -622,20 +683,21 @@ class Jetpack_Network {
$modules = array();
$module_slugs = Jetpack::get_available_modules();
foreach ( $module_slugs as $slug ) {
- $module = Jetpack::get_module( $slug );
+ $module = Jetpack::get_module( $slug );
$module['module'] = $slug;
- $modules[] = $module;
+ $modules[] = $module;
}
usort( $modules, array( 'Jetpack', 'sort_modules' ) );
- if( !isset( $options['modules'] ) ) {
+ if ( ! isset( $options['modules'] ) ) {
$options['modules'] = $modules;
}
$data = array(
'modules' => $modules,
- 'options' => $options
+ 'options' => $options,
+ 'jetpack_protect_whitelist' => jetpack_protect_format_whitelist(),
);
Jetpack::init()->load_view( 'admin/network-settings.php', $data );
@@ -646,13 +708,16 @@ class Jetpack_Network {
* Updates a site wide option
*
* @since 2.9
+ *
* @param string $key
- * @param mixed $value
+ * @param mixed $value
+ *
* @return boolean
**/
public function update_option( $key, $value ) {
- $options = get_site_option( $this->settings_name, $this->setting_defaults );
- $options[$key] = $value;
+ $options = get_site_option( $this->settings_name, $this->setting_defaults );
+ $options[ $key ] = $value;
+
return update_site_option( $this->settings_name, $options );
}
@@ -660,71 +725,78 @@ class Jetpack_Network {
* Retrieves a site wide option
*
* @since 2.9
+ *
* @param string $name - Name of the option in the database
**/
public function get_option( $name ) {
$options = get_site_option( $this->settings_name, $this->setting_defaults );
-
$options = wp_parse_args( $options, $this->setting_defaults );
- if( !isset( $options[$name] ) )
- $options[$name] = null;
+ if ( ! isset( $options[ $name ] ) ) {
+ $options[ $name ] = null;
+ }
- return $options[$name];
+ return $options[ $name ];
}
/**
* Return an array of sites on the specified network. If no network is specified,
* return all sites, regardless of network.
*
- *
* @todo REMOVE THIS FUNCTION! This function is moving to core. Use that one in favor of this. WordPress::wp_get_sites(). http://codex.wordpress.org/Function_Reference/wp_get_sites NOTE, This returns an array instead of stdClass. Be sure to update class.network-sites-list-table.php
* @since 2.9
* @deprecated 2.4.5
+ *
* @param array|string $args Optional. Specify the status of the sites to return.
+ *
* @return array An array of site data
*/
- public function wp_get_sites($args = array()) {
+ public function wp_get_sites( $args = array() ) {
global $wpdb;
- if (wp_is_large_network())
+ if ( wp_is_large_network() ) {
return;
+ }
- $defaults = array('network_id' => $wpdb->siteid);
-
- $args = wp_parse_args($args, $defaults);
-
- $query = "SELECT * FROM $wpdb->blogs WHERE 1=1 ";
+ $defaults = array( 'network_id' => $wpdb->siteid );
+ $args = wp_parse_args( $args, $defaults );
+ $query = "SELECT * FROM $wpdb->blogs WHERE 1=1 ";
- if (isset($args['network_id']) && ( is_array($args['network_id']) || is_numeric($args['network_id']) )) {
- $network_ids = array_map('intval', (array) $args['network_id']);
- $network_ids = implode(',', $network_ids);
+ if ( isset( $args['network_id'] ) && ( is_array( $args['network_id'] ) || is_numeric( $args['network_id'] ) ) ) {
+ $network_ids = array_map( 'intval', (array) $args['network_id'] );
+ $network_ids = implode( ',', $network_ids );
$query .= "AND site_id IN ($network_ids) ";
}
- if (isset($args['public']))
- $query .= $wpdb->prepare("AND public = %s ", $args['public']);
+ if ( isset( $args['public'] ) ) {
+ $query .= $wpdb->prepare( "AND public = %s ", $args['public'] );
+ }
- if (isset($args['archived']))
- $query .= $wpdb->prepare("AND archived = %s ", $args['archived']);
+ if ( isset( $args['archived'] ) ) {
+ $query .= $wpdb->prepare( "AND archived = %s ", $args['archived'] );
+ }
- if (isset($args['mature']))
- $query .= $wpdb->prepare("AND mature = %s ", $args['mature']);
+ if ( isset( $args['mature'] ) ) {
+ $query .= $wpdb->prepare( "AND mature = %s ", $args['mature'] );
+ }
- if (isset($args['spam']))
- $query .= $wpdb->prepare("AND spam = %s ", $args['spam']);
+ if ( isset( $args['spam'] ) ) {
+ $query .= $wpdb->prepare( "AND spam = %s ", $args['spam'] );
+ }
- if (isset($args['deleted']))
- $query .= $wpdb->prepare("AND deleted = %s ", $args['deleted']);
+ if ( isset( $args['deleted'] ) ) {
+ $query .= $wpdb->prepare( "AND deleted = %s ", $args['deleted'] );
+ }
- if( isset( $args['exclude_blogs'] ) )
+ if ( isset( $args['exclude_blogs'] ) ) {
$query .= "AND blog_id NOT IN (" . implode( ',', $args['exclude_blogs'] ) . ")";
+ }
- $key = 'wp_get_sites:' . md5($query);
+ $key = 'wp_get_sites:' . md5( $query );
- if (!$site_results = wp_cache_get($key, 'site-id-cache')) {
- $site_results = (array) $wpdb->get_results($query);
- wp_cache_set($key, $site_results, 'site-id-cache');
+ if ( ! $site_results = wp_cache_get( $key, 'site-id-cache' ) ) {
+ $site_results = (array) $wpdb->get_results( $query );
+ wp_cache_set( $key, $site_results, 'site-id-cache' );
}
return $site_results;
diff --git a/plugins/jetpack/class.jetpack-options.php b/plugins/jetpack/class.jetpack-options.php
index 7562109d..f9bd7143 100644
--- a/plugins/jetpack/class.jetpack-options.php
+++ b/plugins/jetpack/class.jetpack-options.php
@@ -32,8 +32,11 @@ class Jetpack_Options {
'site_icon_url', // (string) url to the full site icon
'site_icon_id', // (int) Attachment id of the site icon file
'dismissed_manage_banner', // (bool) Dismiss Jetpack manage banner allows the user to dismiss the banner permanently
- 'updates', // (array) information about available updates to plugins, theme, WordPress core, and if site is under version control
+ 'restapi_stats_cache', // (array) Stats Cache data.
+ 'unique_connection', // (array) A flag to determine a unique connection to wordpress.com two values "connected" and "disconnected" with values for how many times each has occured
+ 'protect_whitelist' // (array) IP Address for the Protect module to ignore
);
+
case 'private' :
return array(
'register',
@@ -60,7 +63,8 @@ class Jetpack_Options {
'last_heartbeat', // (int) The timestamp of the last heartbeat that fired.
'last_security_report', // (int) The timestamp of the last security report that was run.
'sync_bulk_reindexing', // (bool) If a bulk reindex is currently underway.
- 'jumpstart' // (string) A flag for whether or not to show the Jump Start. Accepts: new_connection, jumpstart_activated, jetpack_action_taken, jumpstart_dismissed.
+ 'jumpstart', // (string) A flag for whether or not to show the Jump Start. Accepts: new_connection, jumpstart_activated, jetpack_action_taken, jumpstart_dismissed.
+ 'hide_jitm' // (array) A list of just in time messages that we should not show because they have been dismissed by the user
);
}
@@ -130,10 +134,26 @@ class Jetpack_Options {
*
* @param string $name Option name
* @param mixed $value Option value
+ * @param string $autoload If not compact option, allows specifying whether to autoload or not.
*/
- public static function update_option( $name, $value ) {
+ public static function update_option( $name, $value, $autoload = null ) {
+ /**
+ * Fires before Jetpack updates a specific option.
+ *
+ * @since 3.0.0
+ *
+ * @param str $name The name of the option being updated.
+ * @param mixed $value The new value of the option.
+ */
do_action( 'pre_update_jetpack_option_' . $name, $name, $value );
if ( self::is_valid( $name, 'non_compact' ) ) {
+ /**
+ * Allowing update_option to change autoload status only shipped in WordPress v4.2
+ * @link https://github.com/WordPress/WordPress/commit/305cf8b95
+ */
+ if ( version_compare( $GLOBALS['wp_version'], '4.2', '>=' ) ) {
+ return update_option( "jetpack_$name", $value, $autoload );
+ }
return update_option( "jetpack_$name", $value );
}
diff --git a/plugins/jetpack/class.jetpack-post-images.php b/plugins/jetpack/class.jetpack-post-images.php
index b03eb7ba..83df87b1 100644
--- a/plugins/jetpack/class.jetpack-post-images.php
+++ b/plugins/jetpack/class.jetpack-post-images.php
@@ -85,64 +85,28 @@ class Jetpack_PostImages {
$images = array();
$post = get_post( $post_id );
- if ( !empty( $post->post_password ) )
+ if ( ! empty( $post->post_password ) ) {
return $images;
-
- if ( false === has_shortcode( $post->post_content, 'gallery' ) ) {
- return false; // no gallery - bail
}
$permalink = get_permalink( $post->ID );
- // CATS: All your base are belong to us
- $old_post = $GLOBALS['post'];
- $GLOBALS['post'] = $post;
- $old_shortcodes = $GLOBALS['shortcode_tags'];
- $GLOBALS['shortcode_tags'] = array( 'gallery' => $old_shortcodes['gallery'] );
-
- // Find all the galleries
- preg_match_all( '/' . get_shortcode_regex() . '/s', $post->post_content, $gallery_matches, PREG_SET_ORDER );
-
- foreach ( $gallery_matches as $gallery_match ) {
- $gallery = do_shortcode_tag( $gallery_match );
-
- // Um... no images in the gallery - bail
- if ( false === $pos = stripos( $gallery, '<img' ) )
- continue;
-
- preg_match_all( '/<img\s+[^>]*src=([\'"])([^\'"]*)\\1/', $gallery, $image_match, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE );
+ $gallery_images = get_post_galleries_images( $post->ID, false );
- $a_pos = 0;
- foreach ( $image_match[2] as $src ) {
- list( $raw_src ) = explode( '?', $src[0] ); // pull off any Query string (?w=250)
+ foreach ( $gallery_images as $galleries ) {
+ foreach ( $galleries as $src ) {
+ list( $raw_src ) = explode( '?', $src ); // pull off any Query string (?w=250)
$raw_src = wp_specialchars_decode( $raw_src ); // rawify it
$raw_src = esc_url_raw( $raw_src ); // clean it
-
- $a_pos = strrpos( substr( $gallery, 0, $src[1] ), '<a', $a_pos ); // is there surrounding <a>?
-
- if ( false !== $a_pos && preg_match( '/<a\s+[^>]*href=([\'"])([^\'"]*)\\1/', $gallery, $href_match, 0, $a_pos ) ) {
- $href = wp_specialchars_decode( $href_match[2] );
- $href = esc_url_raw( $href );
- } else {
- // CATS: You have no chance to survive make your time
- $href = $raw_src;
- }
-
- $a_pos = $src[1];
-
$images[] = array(
'type' => 'image',
'from' => 'gallery',
'src' => $raw_src,
- 'href' => $permalink, // $href,
+ 'href' => $permalink,
);
}
}
- // Captain: For great justice
- $GLOBALS['shortcode_tags'] = $old_shortcodes;
- $GLOBALS['post'] = $old_post;
-
return $images;
}
@@ -245,7 +209,13 @@ class Jetpack_PostImages {
$too_big = ( ( ! empty( $meta['width'] ) && $meta['width'] > 1200 ) || ( ! empty( $meta['height'] ) && $meta['height'] > 1200 ) );
- if ( $too_big ) {
+ if (
+ $too_big &&
+ (
+ ( method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'photon' ) ) ||
+ ( defined( 'WPCOM' ) && IS_WPCOM )
+ )
+ ) {
$img_src = wp_get_attachment_image_src( $thumb, array( 1200, 1200 ) );
} else {
$img_src = wp_get_attachment_image_src( $thumb, 'full' );
@@ -392,6 +362,14 @@ class Jetpack_PostImages {
*/
static function get_image( $post_id, $args = array() ) {
$image = '';
+
+ /**
+ * Fires before we find a single good image for a specific post.
+ *
+ * @since 2.2.0
+ *
+ * @param int $post_id Post ID.
+ */
do_action( 'jetpack_postimages_pre_get_image', $post_id );
$media = self::get_images( $post_id, $args );
@@ -405,6 +383,13 @@ class Jetpack_PostImages {
}
}
+ /**
+ * Fires after we find a single good image for a specific post.
+ *
+ * @since 2.2.0
+ *
+ * @param int $post_id Post ID.
+ */
do_action( 'jetpack_postimages_post_get_image', $post_id );
return $image;
@@ -421,6 +406,16 @@ class Jetpack_PostImages {
// Figure out which image to attach to this post.
$media = false;
+ /**
+ * Filters the array of images that would be good for a specific post.
+ * This filter is applied before options ($args) filter the original array.
+ *
+ * @since 2.0.0
+ *
+ * @param array $media Array of images that would be good for a specific post.
+ * @param int $post_id Post ID.
+ * @param array $args Array of options to get images.
+ */
$media = apply_filters( 'jetpack_images_pre_get_images', $media, $post_id, $args );
if ( $media )
return $media;
@@ -433,7 +428,7 @@ class Jetpack_PostImages {
'avatar_size' => 96, // Used for both Grav and Blav
'gravatar_default' => false, // Default image to use if we end up with no Gravatar
- 'from_thumbnail' => true, // Use these flags to specifcy which methods to use to find an image
+ 'from_thumbnail' => true, // Use these flags to specify which methods to use to find an image
'from_slideshow' => true,
'from_gallery' => true,
'from_attachment' => true,
@@ -465,6 +460,16 @@ class Jetpack_PostImages {
$media = self::from_gravatar( $post_id, $args['avatar_size'], $args['gravatar_default'] );
}
+ /**
+ * Filters the array of images that would be good for a specific post.
+ * This filter is applied after options ($args) filter the original array.
+ *
+ * @since 2.0.0
+ *
+ * @param array $media Array of images that would be good for a specific post.
+ * @param int $post_id Post ID.
+ * @param array $args Array of options to get images.
+ */
return apply_filters( 'jetpack_images_get_images', $media, $post_id, $args );
}
@@ -487,6 +492,15 @@ class Jetpack_PostImages {
// See if we should bypass WordPress.com SaaS resizing
if ( has_filter( 'jetpack_images_fit_image_url_override' ) ) {
+ /**
+ * Filters the image URL used after dimensions are set by Photon.
+ *
+ * @since 3.3.0
+ *
+ * @param string $src Image URL.
+ * @param int $width Image width.
+ * @param int $width Image height.
+ */
return apply_filters( 'jetpack_images_fit_image_url_override', $src, $width, $height );
}
diff --git a/plugins/jetpack/class.jetpack-signature.php b/plugins/jetpack/class.jetpack-signature.php
index f2c9e03d..a63636ae 100644
--- a/plugins/jetpack/class.jetpack-signature.php
+++ b/plugins/jetpack/class.jetpack-signature.php
@@ -4,10 +4,10 @@ defined( 'JETPACK_SIGNATURE__HTTP_PORT' ) or define( 'JETPACK_SIGNATURE__HTTP_P
defined( 'JETPACK_SIGNATURE__HTTPS_PORT' ) or define( 'JETPACK_SIGNATURE__HTTPS_PORT', 443 );
class Jetpack_Signature {
- var $token;
- var $secret;
+ public $token;
+ public $secret;
- function Jetpack_Signature( $access_token, $time_diff = 0 ) {
+ function __construct( $access_token, $time_diff = 0 ) {
$secret = explode( '.', $access_token );
if ( 2 != count( $secret ) )
return;
diff --git a/plugins/jetpack/class.jetpack-sync.php b/plugins/jetpack/class.jetpack-sync.php
index 66a7f316..188b7d81 100644
--- a/plugins/jetpack/class.jetpack-sync.php
+++ b/plugins/jetpack/class.jetpack-sync.php
@@ -6,19 +6,19 @@
*/
class Jetpack_Sync {
// What modules want to sync what content
- var $sync_conditions = array( 'posts' => array(), 'comments' => array() );
+ public $sync_conditions = array( 'posts' => array(), 'comments' => array() );
// We keep track of all the options registered for sync so that we can sync them all if needed
- var $sync_options = array();
+ public $sync_options = array();
- var $sync_constants = array();
+ public $sync_constants = array();
// 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.
- var $post_transitions = array();
- var $comment_transitions = array();
+ public $post_transitions = array();
+ public $comment_transitions = array();
// Objects to sync
- var $sync = array();
+ public $sync = array();
function __construct() {
// WP Cron action. Only used on upgrade
@@ -26,6 +26,7 @@ class Jetpack_Sync {
add_action( 'jetpack_heartbeat', array( $this, 'sync_all_registered_options' ) );
// Sync constants on heartbeat and plugin upgrade and connects
+ add_action( 'init', array( $this, 'register_constants_as_options' ) );
add_action( 'jetpack_sync_all_registered_options', array( $this, 'sync_all_constants' ) );
add_action( 'jetpack_heartbeat', array( $this, 'sync_all_constants' ) );
@@ -168,6 +169,11 @@ class Jetpack_Sync {
return false;
}
+ // Don't sync anything from a staging site.
+ if ( Jetpack::is_development_mode() || Jetpack::is_staging_site() ) {
+ return false;
+ }
+
$sync_data = $this->get_common_sync_data();
$wp_importing = defined( 'WP_IMPORTING' ) && WP_IMPORTING;
@@ -236,7 +242,6 @@ class Jetpack_Sync {
}
break;
}
-
}
Jetpack::xmlrpc_async_call( 'jetpack.syncContent', $sync_data );
}
@@ -378,6 +383,7 @@ class Jetpack_Sync {
$delete_on_behalf_of = array();
$submit_on_behalf_of = array();
$delete_stati = array( 'delete' );
+ $cache_cleared = false;
foreach ( $module_conditions as $module => $conditions ) {
if ( !in_array( $post->post_type, $conditions['post_types'] ) ) {
@@ -389,7 +395,11 @@ class Jetpack_Sync {
if ( $deleted_post ) {
$delete_on_behalf_of[] = $module;
} else {
- clean_post_cache( $post->ID );
+ if ( ! $cache_cleared ) {
+ // inefficient to clear cache more than once
+ clean_post_cache( $post->ID );
+ $cache_cleared = true;
+ }
$new_status = get_post_status( $post->ID ); // Inherited status is resolved here
}
@@ -489,6 +499,7 @@ class Jetpack_Sync {
$post['extra'] = array(
'author' => get_the_author_meta( 'display_name', $post_obj->post_author ),
'author_email' => get_the_author_meta( 'email', $post_obj->post_author ),
+ 'dont_email_post_to_subs' => get_post_meta( $post_obj->ID, '_jetpack_dont_email_post_to_subs', true ),
);
if ( $fid = get_post_thumbnail_id( $id ) ) {
@@ -514,12 +525,35 @@ class Jetpack_Sync {
$post['extra']['post_thumbnail'] = (int) $metadata['duration'];
}
+ /**
+ * Filters the Post Thumbnail information returned for a specific post.
+ *
+ * @since 3.3.0
+ *
+ * @param array $post['extra']['post_thumbnail'] {
+ * Array of details about the Post Thumbnail.
+ * @param int ID Post Thumbnail ID.
+ * @param string URL Post thumbnail URL.
+ * @param string guid Post thumbnail guid.
+ * @param string mime_type Post thumbnail mime type.
+ * @param int width Post thumbnail width.
+ * @param int height Post thumbnail height.
+ * }
+ */
$post['extra']['post_thumbnail'] = (object) apply_filters( 'get_attachment', $post['extra']['post_thumbnail'] );
}
}
$post['permalink'] = get_permalink( $post_obj->ID );
$post['shortlink'] = wp_get_shortlink( $post_obj->ID );
+ /**
+ * Allow modules to send extra info on the sync post process.
+ *
+ * @since 2.8.0
+ *
+ * @param array $args Array of custom data to attach to a post.
+ * @param Object $post_obj Object returned by get_post() for a given post ID.
+ */
$post['module_custom_data'] = apply_filters( 'jetpack_sync_post_module_custom_data', array(), $post_obj );
return $post;
}
@@ -727,7 +761,7 @@ class Jetpack_Sync {
$this->register( 'delete_option', $option );
}
- function updated_option_action( $old_value ) {
+ function updated_option_action() {
// The value of $option isn't passed to the filter
// Calculate it
$option = current_filter();
@@ -754,7 +788,7 @@ class Jetpack_Sync {
}
}
- function sync_all_registered_options( $options = array() ) {
+ function sync_all_registered_options() {
if ( 'jetpack_sync_all_registered_options' == current_filter() ) {
add_action( 'shutdown', array( $this, 'register_all_options' ), 8 );
} else {
@@ -775,24 +809,52 @@ class Jetpack_Sync {
/* Constants Sync */
- function sync_all_constants() {
- // list of contants to sync needed by Jetpack
- $constants = array(
+ function get_all_constants() {
+ return array(
'EMPTY_TRASH_DAYS',
'WP_POST_REVISIONS',
- 'UPDATER_DISABLED',
'AUTOMATIC_UPDATER_DISABLED',
'ABSPATH',
- 'WP_CONTENT_DIR'
+ 'WP_CONTENT_DIR',
+ 'FS_METHOD',
+ 'DISALLOW_FILE_EDIT',
+ 'DISALLOW_FILE_MODS',
+ 'WP_AUTO_UPDATE_CORE',
+ 'WP_HTTP_BLOCK_EXTERNAL',
+ 'WP_ACCESSIBLE_HOSTS',
);
+ }
+ /**
+ * This lets us get the constant value like get_option( 'jetpack_constant_CONSTANT' );
+ * Not the best way to get the constant value but necessery in some cases like in the API.
+ */
+ function register_constants_as_options() {
+ foreach( $this->get_all_constants() as $constant ) {
+ add_filter( 'pre_option_jetpack_constant_'. $constant, array( $this, 'get_default_constant' ) );
+ }
+ }
+ function sync_all_constants() {
// add the constant to sync.
- foreach( $constants as $contant ) {
- $this->register_constant( $contant );
+ foreach( $this->get_all_constants() as $constant ) {
+ $this->register_constant( $constant );
}
-
add_action( 'shutdown', array( $this, 'register_all_module_constants' ), 8 );
+ }
+
+ /**
+ * Returns default values of Constants
+ */
+ function default_constant( $constant ) {
+ switch( $constant ) {
+ case 'WP_AUTO_UPDATE_CORE':
+ return 'minor';
+ break;
+ default:
+ return null;
+ break;
+ }
}
function register_all_module_constants() {
@@ -972,7 +1034,6 @@ EOT;
* @param string or array $callback
*/
function mock_option( $option , $callback ) {
-
add_filter( 'pre_option_jetpack_'. $option, $callback );
// This shouldn't happen but if it does we return the same as before.
add_filter( 'option_jetpack_'. $option, $callback );
@@ -990,6 +1051,20 @@ EOT;
function register_constant( $constant ) {
$this->register( 'constant', $constant );
}
+
+ function get_default_constant() {
+ $filter = current_filter();
+ // We don't know what the constant is so we get it from the current filter.
+ if ( 'pre_option_jetpack_constant_' === substr( $filter, 0, 28 ) ) {
+ $constant = substr( $filter, 28 );
+ if ( defined( $constant ) ) {
+ // If constant is set to false we will not shortcut the get_option function and will return the default value.
+ // Hance we set it to null. Which in most cases would produce the same result.
+ return false === constant( $constant ) ? null : constant( $constant );
+ }
+ return $this->default_constant( $constant );
+ }
+ }
/**
* Simular to $this->options() function.
* Add the constant to be synced to .com when we activate the module.
diff --git a/plugins/jetpack/class.jetpack-tracks.php b/plugins/jetpack/class.jetpack-tracks.php
new file mode 100644
index 00000000..58a815cf
--- /dev/null
+++ b/plugins/jetpack/class.jetpack-tracks.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Nosara Tracks for Jetpack
+ */
+
+require_once( dirname( __FILE__ ) . '/_inc/lib/tracks/client.php' );
+
+class JetpackTracking {
+ static $product_name = 'jetpack';
+
+ static function track_jetpack_usage() {
+ if ( ! Jetpack::is_active() ) {
+ return;
+ }
+
+ add_action( 'jetpack_pre_activate_module', array( __CLASS__, 'track_activate_module'), 1, 1 );
+ add_action( 'jetpack_pre_deactivate_module', array( __CLASS__, 'track_deactivate_module'), 1, 1 );
+ add_action( 'jetpack_user_authorized', array( __CLASS__, 'track_user_linked' ) );
+ }
+
+ /* User has linked their account */
+ static function track_user_linked() {
+ $user_id = get_current_user_id();
+ $anon_id = get_user_meta( $user_id, 'jetpack_tracks_anon_id', true );
+
+ if ( $anon_id ) {
+ self::record_user_event( '_aliasUser', array( 'anonId' => $anon_id ) );
+ delete_user_meta( $user_id, 'jetpack_tracks_anon_id' );
+ if ( ! headers_sent() ) {
+ setcookie( 'tk_ai', 'expired', time() - 1000 );
+ }
+ }
+
+ $wpcom_user_data = Jetpack::get_connected_user_data( $user_id );
+ update_user_meta( $user_id, 'jetpack_tracks_wpcom_id', $wpcom_user_data['ID'] );
+
+ self::record_user_event( 'user_linked', array() );
+ }
+
+ /* Activated module */
+ static function track_activate_module( $module ) {
+ self::record_user_event( 'module_activated', array( 'module' => $module ) );
+ }
+
+ /* Deactivated module */
+ static function track_deactivate_module( $module ) {
+ self::record_user_event( 'module_deactivated', array( 'module' => $module ) );
+ }
+
+ static function record_user_event( $event_type, $data ) {
+
+ $user = wp_get_current_user();
+ $site_url = get_option( 'siteurl' );
+
+ $data['_via_ua'] = $_SERVER['HTTP_USER_AGENT'];
+ $data['_via_ip'] = $_SERVER['REMOTE_ADDR'];
+ $data['_lg'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
+ $data['blog_url'] = $site_url;
+ $data['blog_id'] = Jetpack_Options::get_option( 'id' );
+
+ // Top level events should not be namespaced
+ if ( '_aliasUser' != $event_type ) {
+ $event_type = self::$product_name . '_' . $event_type;
+ }
+
+ $data['jetpack_version'] = defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : '0';
+
+ jetpack_tracks_record_event( $user, $event_type, $data );
+ }
+}
+
+add_action( 'init', array( 'JetpackTracking', 'track_jetpack_usage' ) );
diff --git a/plugins/jetpack/class.jetpack-twitter-cards.php b/plugins/jetpack/class.jetpack-twitter-cards.php
index 8141bf5d..f2a4e250 100644
--- a/plugins/jetpack/class.jetpack-twitter-cards.php
+++ b/plugins/jetpack/class.jetpack-twitter-cards.php
@@ -17,6 +17,7 @@ class Jetpack_Twitter_Cards {
return $og_tags;
}
+ /** This action is documented in class.jetpack.php */
if ( apply_filters( 'jetpack_disable_twitter_cards', false ) ) {
return $og_tags;
}
@@ -26,7 +27,9 @@ class Jetpack_Twitter_Cards {
*/
$site_tag = self::site_tag();
+ /** This action is documented in modules/sharedaddy/sharing-sources.php */
$site_tag = apply_filters( 'jetpack_sharing_twitter_via', $site_tag, ( is_singular() ? $post->ID : null ) );
+ /** This action is documented in modules/sharedaddy/sharing-sources.php */
$site_tag = apply_filters( 'jetpack_twitter_cards_site_tag', $site_tag, $og_tags );
if ( ! empty( $site_tag ) ) {
$og_tags['twitter:site'] = self::sanitize_twitter_user( $site_tag );
@@ -47,14 +50,10 @@ class Jetpack_Twitter_Cards {
$featured = Jetpack_PostImages::from_thumbnail( $post->ID, 240, 240 );
if ( !empty( $featured ) && count( $featured ) > 0 ) {
if ( (int) $featured[0]['src_width'] >= 280 && (int) $featured[0]['src_height'] >= 150 ) {
- if ( 'image' === get_post_format( $post->ID ) ) {
- $card_type = 'photo';
- } else {
- $card_type = 'summary_large_image';
- }
- $og_tags['twitter:image:src'] = add_query_arg( 'w', 640, $featured[0]['src'] );
+ $card_type = 'summary_large_image';
+ $og_tags['twitter:image'] = esc_url( add_query_arg( 'w', 640, $featured[0]['src'] ) );
} else {
- $og_tags['twitter:image'] = add_query_arg( 'w', 240, $featured[0]['src'] );
+ $og_tags['twitter:image'] = esc_url( add_query_arg( 'w', 240, $featured[0]['src'] ) );
}
}
}
@@ -72,10 +71,10 @@ class Jetpack_Twitter_Cards {
if ( 'gallery' == $extract['type'] ) {
list( $og_tags, $card_type ) = self::twitter_cards_define_type_based_on_image_count( $og_tags, $extract );
- } else if ( 'video' == $extract['type'] ) {
+ } elseif ( 'video' == $extract['type'] ) {
// Leave as summary, but with large pict of poster frame (we know those comply to Twitter's size requirements)
$card_type = 'summary_large_image';
- $og_tags['twitter:image:src'] = add_query_arg( 'w', 640, $extract['image'] );
+ $og_tags['twitter:image'] = esc_url( add_query_arg( 'w', 640, $extract['image'] ) );
} else {
list( $og_tags, $card_type ) = self::twitter_cards_define_type_based_on_image_count( $og_tags, $extract );
}
@@ -86,6 +85,7 @@ class Jetpack_Twitter_Cards {
// If we have information on the author/creator, then include that as well
if ( ! empty( $post ) && ! empty( $post->post_author ) ) {
+ /** This action is documented in modules/sharedaddy/sharing-sources.php */
$handle = apply_filters( 'jetpack_sharing_twitter_via', '', $post->ID );
if ( ! empty( $handle ) && 'wordpressdotcom' != $handle && 'jetpack' != $handle ) {
$og_tags['twitter:creator'] = self::sanitize_twitter_user( $handle );
@@ -95,12 +95,8 @@ class Jetpack_Twitter_Cards {
// Make sure we have a description for Twitter, their validator isn't happy without some content (single space not valid).
if ( ! isset( $og_tags['og:description'] ) || '' == trim( $og_tags['og:description'] ) || __('Visit the post for more.', 'jetpack') == $og_tags['og:description'] ) { // empty( trim( $og_tags['og:description'] ) ) isn't valid php
$has_creator = ( ! empty($og_tags['twitter:creator']) && '@wordpressdotcom' != $og_tags['twitter:creator'] ) ? true : false;
- if ( 'photo' == $card_type ) {
- $og_tags['twitter:description'] = ( $has_creator ) ? sprintf( __('Photo post by %s.', 'jetpack'), $og_tags['twitter:creator'] ) : __('Photo post.', 'jetpack');
- } elseif ( ! empty( $extract ) && 'video' == $extract['type'] ) { // use $extract['type'] since $card_type is 'summary' for video posts
+ if ( ! empty( $extract ) && 'video' == $extract['type'] ) { // use $extract['type'] since $card_type is 'summary' for video posts
$og_tags['twitter:description'] = ( $has_creator ) ? sprintf( __('Video post by %s.', 'jetpack'), $og_tags['twitter:creator'] ) : __('Video post.', 'jetpack');
- } elseif ( 'gallery' == $card_type ) {
- $og_tags['twitter:description'] = ( $has_creator ) ? sprintf( __('Gallery post by %s.', 'jetpack'), $og_tags['twitter:creator'] ) : __('Gallery post.', 'jetpack');
} else {
$og_tags['twitter:description'] = ( $has_creator ) ? sprintf( __('Post by %s.', 'jetpack'), $og_tags['twitter:creator'] ) : __('Visit the post for more.', 'jetpack');
}
@@ -146,33 +142,15 @@ class Jetpack_Twitter_Cards {
// Not falling back on Gravatar, because there's no way to know if we end up with an auto-generated one.
- } elseif ( 1 == $img_count && ( 'image' == $extract['type'] || 'gallery' == $extract['type'] ) ) {
- // 1 image = photo
+ } elseif ( $img_count && ( 'image' == $extract['type'] || 'gallery' == $extract['type'] ) ) {
// Test for $extract['type'] to limit to image and gallery, so we don't send a potential fallback image like a Gravatar as a photo post.
- $card_type = 'photo';
- $og_tags['twitter:image'] = add_query_arg( 'w', 1400, ( empty( $extract['images'] ) ) ? $extract['image'] : $extract['images'][0]['url'] );
- } elseif ( $img_count <= 3 ) {
- // 2-3 images = summary with small thumbnail
- $og_tags['twitter:image'] = add_query_arg( 'w', 240, ( empty( $extract['images'] ) ) ? $extract['image'] : $extract['images'][0]['url'] );
- } elseif ( $img_count >= 4 ) {
- // >= 4 images = gallery
- $card_type = 'gallery';
- $og_tags = self::twitter_cards_gallery( $extract, $og_tags );
+ $card_type = 'summary_large_image';
+ $og_tags['twitter:image'] = esc_url( add_query_arg( 'w', 1400, ( empty( $extract['images'] ) ) ? $extract['image'] : $extract['images'][0]['url'] ) );
}
return array( $og_tags, $card_type );
}
- static function twitter_cards_gallery( $extract, $og_tags ) {
- foreach( $extract['images'] as $key => $value ) {
- if ( $key > 3 ) {
- break; // only the first 4 appear in card template (https://dev.twitter.com/cards/types/gallery)
- }
- $og_tags[ 'twitter:image' . $key ] = add_query_arg( 'w', 640, $value['url'] );
- }
- return $og_tags;
- }
-
static function twitter_cards_output( $og_tag ) {
return ( false !== strpos( $og_tag, 'twitter:' ) ) ? preg_replace( '/property="([^"]+)"/', 'name="\1"', $og_tag ) : $og_tag;
}
diff --git a/plugins/jetpack/class.jetpack-user-agent.php b/plugins/jetpack/class.jetpack-user-agent.php
index dba40260..64aea25c 100644
--- a/plugins/jetpack/class.jetpack-user-agent.php
+++ b/plugins/jetpack/class.jetpack-user-agent.php
@@ -64,11 +64,11 @@ function jetpack_is_mobile( $kind = 'any', $return_matched_agent = false ) {
class Jetpack_User_Agent_Info {
- var $useragent;
- var $matched_agent;
- var $isTierIphone; //Stores whether is the iPhone tier of devices.
- var $isTierRichCss; //Stores whether the device can probably support Rich CSS, but JavaScript (jQuery) support is not assumed.
- var $isTierGenericMobile; //Stores whether it is another mobile device, which cannot be assumed to support CSS or JS (eg, older BlackBerry, RAZR)
+ public $useragent;
+ public $matched_agent;
+ public $isTierIphone; //Stores whether is the iPhone tier of devices.
+ public $isTierRichCss; //Stores whether the device can probably support Rich CSS, but JavaScript (jQuery) support is not assumed.
+ public $isTierGenericMobile; //Stores whether it is another mobile device, which cannot be assumed to support CSS or JS (eg, older BlackBerry, RAZR)
private $_platform = null; //Stores the device platform name
const PLATFORM_WINDOWS = 'windows';
@@ -84,7 +84,7 @@ class Jetpack_User_Agent_Info {
const PLATFORM_ANDROID_TABLET = 'android_tablet';
const PLATFORM_FIREFOX_OS = 'firefoxOS';
- var $dumb_agents = array(
+ public $dumb_agents = array(
'nokia', 'blackberry', 'philips', 'samsung', 'sanyo', 'sony', 'panasonic', 'webos',
'ericsson', 'alcatel', 'palm',
'windows ce', 'opera mini', 'series60', 'series40',
@@ -100,7 +100,7 @@ class Jetpack_User_Agent_Info {
);
//The constructor. Initializes default variables.
- function Jetpack_User_Agent_Info()
+ function __construct()
{
if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) )
$this->useragent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
@@ -1193,45 +1193,47 @@ class Jetpack_User_Agent_Info {
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
return false;
- if ( self::is_blackberry_10() )
+ if ( self::is_blackberry_10() ) {
return 'blackberry-10';
+ }
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
$pos_blackberry = stripos( $agent, 'blackberry' );
if ( $pos_blackberry === false ) {
- //not a blackberry device
+ // not a blackberry device
return false;
}
- //blackberry devices OS 6.0 or higher
- //Mozilla/5.0 (BlackBerry; U; BlackBerry 9670; en) AppleWebKit/534.3+ (KHTML, like Gecko) Version/6.0.0.286 Mobile Safari/534.3+
- //Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, Like Gecko) Version/6.0.0.141 Mobile Safari/534.1+
- //Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0 Mobile Safari/534.11+
+ // blackberry devices OS 6.0 or higher
+ // Mozilla/5.0 (BlackBerry; U; BlackBerry 9670; en) AppleWebKit/534.3+ (KHTML, like Gecko) Version/6.0.0.286 Mobile Safari/534.3+
+ // Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, Like Gecko) Version/6.0.0.141 Mobile Safari/534.1+
+ // Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0 Mobile Safari/534.11+
$pos_webkit = stripos( $agent, 'webkit' );
if ( $pos_webkit !== false ) {
- //detected blackberry webkit browser
+ // detected blackberry webkit browser
$pos_torch = stripos( $agent, 'BlackBerry 9800' );
if ( $pos_torch !== false ) {
- return 'blackberry-torch'; //match the torch first edition. the 2nd edition should use the OS7 and doesn't need any special rule
+ return 'blackberry-torch'; // match the torch first edition. the 2nd edition should use the OS7 and doesn't need any special rule
} else {
- //detecting the BB OS version for devices running OS 6.0 or higher
+ // detecting the BB OS version for devices running OS 6.0 or higher
if ( preg_match( '#Version\/([\d\.]+)#i', $agent, $matches ) ) {
$version = $matches[1];
$version_num = explode( '.', $version );
- if( is_array( $version_num ) === false || count( $version_num ) <= 1 )
- return 'blackberry-6'; //not a BB device that match our rule.
- else
- return 'blackberry-'.$version_num[0];
+ if ( is_array( $version_num ) === false || count( $version_num ) <= 1 ) {
+ return 'blackberry-6'; // not a BB device that match our rule.
+ } else {
+ return 'blackberry-' . $version_num[0];
+ }
} else {
- //if doesn't match returns the minimun version with a webkit browser. we should never fall here.
- return 'blackberry-6'; //not a BB device that match our rule.
+ // if doesn't match returns the minimun version with a webkit browser. we should never fall here.
+ return 'blackberry-6'; // not a BB device that match our rule.
}
}
}
- //blackberry devices <= 5.XX
- //BlackBerry9000/5.0.0.93 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/179
+ // blackberry devices <= 5.XX
+ // BlackBerry9000/5.0.0.93 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/179
if ( preg_match( '#BlackBerry\w+\/([\d\.]+)#i', $agent, $matches ) ) {
$version = $matches[1];
} else {
@@ -1240,8 +1242,9 @@ class Jetpack_User_Agent_Info {
$version_num = explode( '.', $version );
- if( is_array( $version_num ) === false || count( $version_num ) <= 1 )
+ if ( is_array( $version_num ) === false || count( $version_num ) <= 1 ) {
return false;
+ }
if ( $version_num[0] == 5 ) {
return 'blackberry-5';
} elseif ( $version_num[0] == 4 && $version_num[1] == 7 ) {
@@ -1254,7 +1257,6 @@ class Jetpack_User_Agent_Info {
return false;
}
- return false;
}
/**
@@ -1272,17 +1274,19 @@ class Jetpack_User_Agent_Info {
*/
static function detect_blackberry_browser_version() {
- if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
- return false;
+ if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
+ return false;
+ }
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
- if ( self::is_blackberry_10() )
+ if ( self::is_blackberry_10() ) {
return 'blackberry-10';
+ }
$pos_blackberry = strpos( $agent, 'blackberry' );
if ( $pos_blackberry === false ) {
- //not a blackberry device
+ // not a blackberry device
return false;
}
@@ -1294,13 +1298,14 @@ class Jetpack_User_Agent_Info {
if ( preg_match( '#BlackBerry\w+\/([\d\.]+)#i', $agent, $matches ) ) {
$version = $matches[1];
} else {
- return false; //not a BB device that match our rule.
+ return false; // not a BB device that match our rule.
}
$version_num = explode( '.', $version );
- if( is_array( $version_num ) === false || count( $version_num ) <= 1 )
- return false;
+ if ( is_array( $version_num ) === false || count( $version_num ) <= 1 ) {
+ return false;
+ }
if ( $version_num[0] == 5 ) {
return 'blackberry-5';
@@ -1309,14 +1314,14 @@ class Jetpack_User_Agent_Info {
} elseif ( $version_num[0] == 4 && $version_num[1] == 6 ) {
return 'blackberry-4.6';
} else {
- //A very old BB device is found or this is a BB device that doesn't match our rules.
+ // A very old BB device is found or this is a BB device that doesn't match our rules.
return false;
}
}
- return false;
+
}
- //Checks if a visitor is coming from one of the WordPress mobile apps
+ // Checks if a visitor is coming from one of the WordPress mobile apps
static function is_mobile_app() {
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
@@ -1389,10 +1394,11 @@ class Jetpack_User_Agent_Info {
$bot_agents = array(
'alexa', 'altavista', 'ask jeeves', 'attentio', 'baiduspider', 'bingbot', 'chtml generic', 'crawler', 'fastmobilecrawl',
'feedfetcher-google', 'firefly', 'froogle', 'gigabot', 'googlebot', 'googlebot-mobile', 'heritrix', 'ia_archiver', 'irlbot',
- 'infoseek', 'jumpbot', 'lycos', 'mediapartners', 'mediobot', 'motionbot', 'msnbot', 'mshots', 'openbot',
- 'pss-webkit-request',
- 'pythumbnail', 'scooter', 'slurp', 'snapbot', 'spider', 'taptubot', 'technoratisnoop',
- 'teoma', 'twiceler', 'yahooseeker', 'yahooysmcm', 'yammybot',
+ 'iescholar', 'infoseek', 'jumpbot', 'lycos', 'mediapartners', 'mediobot', 'motionbot', 'msnbot', 'mshots', 'openbot',
+ 'pss-webkit-request', 'pythumbnail', 'scooter', 'slurp', 'snapbot', 'spider', 'taptubot', 'technoratisnoop',
+ 'teoma', 'twiceler', 'yahooseeker', 'yahooysmcm', 'yammybot', 'ahrefsbot', 'pingdom.com_bot', 'kraken', 'yandexbot',
+ 'twitterbot', 'tweetmemebot', 'openhosebot', 'queryseekerspider', 'linkdexbot', 'grokkit-crawler',
+ 'livelapbot', 'germcrawler', 'domaintunocrawler', 'grapeshotcrawler', 'cloudflare-alwaysonline',
);
foreach ( $bot_agents as $bot_agent ) {
diff --git a/plugins/jetpack/class.jetpack-xmlrpc-server.php b/plugins/jetpack/class.jetpack-xmlrpc-server.php
index 42a6cd12..c775dd7e 100644
--- a/plugins/jetpack/class.jetpack-xmlrpc-server.php
+++ b/plugins/jetpack/class.jetpack-xmlrpc-server.php
@@ -7,7 +7,7 @@ class Jetpack_XMLRPC_Server {
/**
* The current error object
*/
- var $error = null;
+ public $error = null;
/**
* Whitelist of the XML-RPC methods available to the Jetpack Server. If the
@@ -41,9 +41,26 @@ class Jetpack_XMLRPC_Server {
$jetpack_methods['jetpack.updateAttachmentParent'] = array( $this, 'update_attachment_parent' );
}
+ /**
+ * Filters the XML-RPC methods available to Jetpack for authenticated users.
+ *
+ * @since 1.1.0
+ *
+ * @param array $jetpack_methods XML-RPC methods available to the Jetpack Server.
+ * @param array $core_methods Available core XML-RPC methods.
+ * @param WP_User $user Information about a given WordPress user.
+ */
$jetpack_methods = apply_filters( 'jetpack_xmlrpc_methods', $jetpack_methods, $core_methods, $user );
}
+ /**
+ * Filters the XML-RPC methods available to Jetpack for unauthenticated users.
+ *
+ * @since 3.0.0
+ *
+ * @param array $jetpack_methods XML-RPC methods available to the Jetpack Server.
+ * @param array $core_methods Available core XML-RPC methods.
+ */
return apply_filters( 'jetpack_xmlrpc_unauthenticated_methods', $jetpack_methods, $core_methods );
}
@@ -95,7 +112,7 @@ class Jetpack_XMLRPC_Server {
return $this->error( new Jetpack_Error( 'verify_secrets_missing', 'Verification took too long', 400 ) );
}
- if ( $verify_secret !== $secret_1 ) {
+ if ( ! hash_equals( $verify_secret, $secret_1 ) ) {
Jetpack_Options::delete_option( $action );
return $this->error( new Jetpack_Error( 'verify_secrets_mismatch', 'Secret mismatch', 400 ) );
}
@@ -322,8 +339,8 @@ class Jetpack_XMLRPC_Server {
$method = (string) $json_api_args[0];
$url = (string) $json_api_args[1];
$post_body = is_null( $json_api_args[2] ) ? null : (string) $json_api_args[2];
- $my_id = (int) $json_api_args[3];
$user_details = (array) $json_api_args[4];
+ $locale = (string) $json_api_args[5];
if ( !$verify_api_user_args ) {
$user_id = 0;
@@ -347,12 +364,32 @@ class Jetpack_XMLRPC_Server {
error_log( "METHOD: $method" );
error_log( "URL: $url" );
error_log( "POST BODY: $post_body" );
- error_log( "MY JETPACK ID: $my_id" );
error_log( "VERIFY_ARGS: " . print_r( $verify_api_user_args, 1 ) );
error_log( "VERIFIED USER_ID: " . (int) $user_id );
error_log( "-- end json api via jetpack debugging -- " );
*/
+ if ( 'en' !== $locale ) {
+ // .org mo files are named slightly different from .com, and all we have is this the locale -- try to guess them.
+ $new_locale = $locale;
+ if ( strpos( $locale, '-' ) !== false ) {
+ $pieces = explode( '-', $locale );
+ $new_locale = $locale_pieces[0];
+ $new_locale .= ( ! empty( $locale_pieces[1] ) ) ? '_' . strtoupper( $locale_pieces[1] ) : '';
+ } else {
+ // .com might pass 'fr' because thats what our language files are named as, where core seems
+ // to do fr_FR - so try that if we don't think we can load the file.
+ if ( ! file_exists( WP_LANG_DIR . '/' . $locale . '.mo' ) ) {
+ $new_locale = $locale . '_' . strtoupper( $locale );
+ }
+ }
+
+ if ( file_exists( WP_LANG_DIR . '/' . $new_locale . '.mo' ) ) {
+ unload_textdomain( 'default' );
+ load_textdomain( 'default', WP_LANG_DIR . '/' . $new_locale . '.mo' );
+ }
+ }
+
$old_user = wp_get_current_user();
wp_set_current_user( $user_id );
diff --git a/plugins/jetpack/class.jetpack.php b/plugins/jetpack/class.jetpack.php
index 76bdd135..5c0f846d 100644
--- a/plugins/jetpack/class.jetpack.php
+++ b/plugins/jetpack/class.jetpack.php
@@ -23,16 +23,16 @@ jetpack_do_activate (bool)
*/
class Jetpack {
- var $xmlrpc_server = null;
+ public $xmlrpc_server = null;
private $xmlrpc_verification = null;
- var $HTTP_RAW_POST_DATA = null; // copy of $GLOBALS['HTTP_RAW_POST_DATA']
+ public $HTTP_RAW_POST_DATA = null; // copy of $GLOBALS['HTTP_RAW_POST_DATA']
/**
* @var array The handles of styles that are concatenated into jetpack.css
*/
- var $concatenated_style_handles = array(
+ public $concatenated_style_handles = array(
'jetpack-carousel',
'grunion.css',
'the-neverending-homepage',
@@ -49,9 +49,10 @@ class Jetpack {
'widget-grid-and-list',
'jetpack-widgets',
'goodreads-widget',
+ 'jetpack_social_media_icons_widget',
);
- var $plugins_to_deactivate = array(
+ public $plugins_to_deactivate = array(
'stats' => array( 'stats/stats.php', 'WordPress.com Stats' ),
'shortlinks' => array( 'stats/stats.php', 'WordPress.com Stats' ),
'sharedaddy' => array( 'sharedaddy/sharedaddy.php', 'Sharedaddy' ),
@@ -70,7 +71,7 @@ class Jetpack {
'latex' => array( 'wp-latex/wp-latex.php', 'WP LaTeX' )
);
- var $capability_translations = array(
+ public $capability_translations = array(
'administrator' => 'manage_options',
'editor' => 'edit_others_posts',
'author' => 'publish_posts',
@@ -94,73 +95,88 @@ class Jetpack {
*/
private $conflicting_plugins = array(
'comments' => array(
- 'Intense Debate' => 'intensedebate/intensedebate.php',
- 'Disqus' => 'disqus-comment-system/disqus.php',
- 'Livefyre' => 'livefyre-comments/livefyre.php',
- 'Comments Evolved for WordPress' => 'gplus-comments/comments-evolved.php',
- 'Google+ Comments' => 'google-plus-comments/google-plus-comments.php',
- 'WP-SpamShield Anti-Spam' => 'wp-spamshield/wp-spamshield.php',
+ 'Intense Debate' => 'intensedebate/intensedebate.php',
+ 'Disqus' => 'disqus-comment-system/disqus.php',
+ 'Livefyre' => 'livefyre-comments/livefyre.php',
+ 'Comments Evolved for WordPress' => 'gplus-comments/comments-evolved.php',
+ 'Google+ Comments' => 'google-plus-comments/google-plus-comments.php',
+ 'WP-SpamShield Anti-Spam' => 'wp-spamshield/wp-spamshield.php',
),
'contact-form' => array(
- 'Contact Form 7' => 'contact-form-7/wp-contact-form-7.php',
- 'Gravity Forms' => 'gravityforms/gravityforms.php',
- 'Contact Form Plugin' => 'contact-form-plugin/contact_form.php',
- 'Easy Contact Forms' => 'easy-contact-forms/easy-contact-forms.php',
- 'Fast Secure Contact Form' => 'si-contact-form/si-contact-form.php',
+ 'Contact Form 7' => 'contact-form-7/wp-contact-form-7.php',
+ 'Gravity Forms' => 'gravityforms/gravityforms.php',
+ 'Contact Form Plugin' => 'contact-form-plugin/contact_form.php',
+ 'Easy Contact Forms' => 'easy-contact-forms/easy-contact-forms.php',
+ 'Fast Secure Contact Form' => 'si-contact-form/si-contact-form.php',
),
'minileven' => array(
- 'WPtouch' => 'wptouch/wptouch.php',
+ 'WPtouch' => 'wptouch/wptouch.php',
),
'latex' => array(
- 'LaTeX for WordPress' => 'latex/latex.php',
- 'Youngwhans Simple Latex' => 'youngwhans-simple-latex/yw-latex.php',
- 'Easy WP LaTeX' => 'easy-wp-latex-lite/easy-wp-latex-lite.php',
- 'MathJax-LaTeX' => 'mathjax-latex/mathjax-latex.php',
- 'Enable Latex' => 'enable-latex/enable-latex.php',
- 'WP QuickLaTeX' => 'wp-quicklatex/wp-quicklatex.php',
+ 'LaTeX for WordPress' => 'latex/latex.php',
+ 'Youngwhans Simple Latex' => 'youngwhans-simple-latex/yw-latex.php',
+ 'Easy WP LaTeX' => 'easy-wp-latex-lite/easy-wp-latex-lite.php',
+ 'MathJax-LaTeX' => 'mathjax-latex/mathjax-latex.php',
+ 'Enable Latex' => 'enable-latex/enable-latex.php',
+ 'WP QuickLaTeX' => 'wp-quicklatex/wp-quicklatex.php',
),
'protect' => array(
- 'Limit Login Attempts' => 'limit-login-attempts/limit-login-attempts.php',
- 'Captcha' => 'captcha/captcha.php',
- 'Brute Force Login Protection' => 'brute-force-login-protection/brute-force-login-protection.php',
- 'Login Security Solution' => 'login-security-solution/login-security-solution.php',
- 'WPSecureOps Brute Force Protect' => 'wpsecureops-bruteforce-protect/wpsecureops-bruteforce-protect.php',
- 'BulletProof Security' => 'bulletproof-security/bulletproof-security.php',
- 'SiteGuard WP Plugin' => 'siteguard/siteguard.php',
- 'Security-protection' => 'security-protection/security-protection.php',
- 'Login Security' => 'login-security/login-security.php',
- 'Botnet Attack Blocker' => 'botnet-attack-blocker/botnet-attack-blocker.php',
- 'Wordfence Security' => 'wordfence/wordfence.php',
- 'All In One WP Security & Firewall' => 'all-in-one-wp-security-and-firewall/wp-security.php',
- 'iThemes Security' => 'better-wp-security/better-wp-security.php',
+ 'Limit Login Attempts' => 'limit-login-attempts/limit-login-attempts.php',
+ 'Captcha' => 'captcha/captcha.php',
+ 'Brute Force Login Protection' => 'brute-force-login-protection/brute-force-login-protection.php',
+ 'Login Security Solution' => 'login-security-solution/login-security-solution.php',
+ 'WPSecureOps Brute Force Protect' => 'wpsecureops-bruteforce-protect/wpsecureops-bruteforce-protect.php',
+ 'BulletProof Security' => 'bulletproof-security/bulletproof-security.php',
+ 'SiteGuard WP Plugin' => 'siteguard/siteguard.php',
+ 'Security-protection' => 'security-protection/security-protection.php',
+ 'Login Security' => 'login-security/login-security.php',
+ 'Botnet Attack Blocker' => 'botnet-attack-blocker/botnet-attack-blocker.php',
+ 'Wordfence Security' => 'wordfence/wordfence.php',
+ 'All In One WP Security & Firewall' => 'all-in-one-wp-security-and-firewall/wp-security.php',
+ 'iThemes Security' => 'better-wp-security/better-wp-security.php',
),
'random-redirect' => array(
- 'Random Redirect 2' => 'random-redirect-2/random-redirect.php',
+ 'Random Redirect 2' => 'random-redirect-2/random-redirect.php',
),
'related-posts' => array(
- 'YARPP' => 'yet-another-related-posts-plugin/yarpp.php',
- 'WordPress Related Posts' => 'wordpress-23-related-posts-plugin/wp_related_posts.php',
- 'nrelate Related Content' => 'nrelate-related-content/nrelate-related.php',
- 'Contextual Related Posts' => 'contextual-related-posts/contextual-related-posts.php',
- 'Related Posts for WordPress' => 'microkids-related-posts/microkids-related-posts.php',
- 'outbrain' => 'outbrain/outbrain.php',
- 'Shareaholic' => 'shareaholic/shareaholic.php',
- 'Sexybookmarks' => 'sexybookmarks/shareaholic.php',
+ 'YARPP' => 'yet-another-related-posts-plugin/yarpp.php',
+ 'WordPress Related Posts' => 'wordpress-23-related-posts-plugin/wp_related_posts.php',
+ 'nrelate Related Content' => 'nrelate-related-content/nrelate-related.php',
+ 'Contextual Related Posts' => 'contextual-related-posts/contextual-related-posts.php',
+ 'Related Posts for WordPress' => 'microkids-related-posts/microkids-related-posts.php',
+ 'outbrain' => 'outbrain/outbrain.php',
+ 'Shareaholic' => 'shareaholic/shareaholic.php',
+ 'Sexybookmarks' => 'sexybookmarks/shareaholic.php',
),
'sharedaddy' => array(
- 'AddThis' => 'addthis/addthis_social_widget.php',
- 'Add To Any' => 'add-to-any/add-to-any.php',
- 'ShareThis' => 'share-this/sharethis.php',
- 'Shareaholic' => 'shareaholic/shareaholic.php',
+ 'AddThis' => 'addthis/addthis_social_widget.php',
+ 'Add To Any' => 'add-to-any/add-to-any.php',
+ 'ShareThis' => 'share-this/sharethis.php',
+ 'Shareaholic' => 'shareaholic/shareaholic.php',
),
'verification-tools' => array(
- 'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
- 'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
- 'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
+ 'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
+ 'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
+ 'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
),
'widget-visibility' => array(
- 'Widget Logic' => 'widget-logic/widget_logic.php',
- 'Dynamic Widgets' => 'dynamic-widgets/dynamic-widgets.php',
+ 'Widget Logic' => 'widget-logic/widget_logic.php',
+ 'Dynamic Widgets' => 'dynamic-widgets/dynamic-widgets.php',
+ ),
+ 'sitemaps' => array(
+ 'Google XML Sitemaps' => 'google-sitemap-generator/sitemap.php',
+ 'Better WordPress Google XML Sitemaps' => 'bwp-google-xml-sitemaps/bwp-simple-gxs.php',
+ 'Google XML Sitemaps for qTranslate' => 'google-xml-sitemaps-v3-for-qtranslate/sitemap.php',
+ 'XML Sitemap & Google News feeds' => 'xml-sitemap-feed/xml-sitemap.php',
+ 'Google Sitemap by BestWebSoft' => 'google-sitemap-plugin/google-sitemap-plugin.php',
+ 'WordPress SEO by Yoast' => 'wordpress-seo/wp-seo.php',
+ 'WordPress SEO Premium by Yoast' => 'wordpress-seo-premium/wp-seo-premium.php',
+ 'All in One SEO Pack' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
+ 'Sitemap' => 'sitemap/sitemap.php',
+ 'Simple Wp Sitemap' => 'simple-wp-sitemap/simple-wp-sitemap.php',
+ 'Simple Sitemap' => 'simple-sitemap/simple-sitemap.php',
+ 'XML Sitemaps' => 'xml-sitemaps/xml-sitemaps.php',
+ 'MSM Sitemaps' => 'msm-sitemap/msm-sitemap.php',
),
);
@@ -178,7 +194,6 @@ class Jetpack {
// 2 Click Social Media Buttons
'add-link-to-facebook/add-link-to-facebook.php', // Add Link to Facebook
'add-meta-tags/add-meta-tags.php', // Add Meta Tags
- 'all-in-one-seo-pack/all_in_one_seo_pack.php', // All in One SEO Pack
'easy-facebook-share-thumbnails/esft.php', // Easy Facebook Share Thumbnail
'facebook/facebook.php', // Facebook (official plugin)
'facebook-awd/AWD_facebook.php', // Facebook AWD All in one
@@ -218,6 +233,7 @@ class Jetpack {
'wp-facebook-open-graph-protocol/wp-facebook-ogp.php', // WP Facebook Open Graph protocol
'wp-ogp/wp-ogp.php', // WP-OGP
'zoltonorg-social-plugin/zosp.php', // Zolton.org Social Plugin
+ 'wp-fb-share-like-button/wp_fb_share-like_widget.php' // WP Facebook Like Button
);
/**
@@ -240,26 +256,26 @@ class Jetpack {
* Message to display in admin_notice
* @var string
*/
- var $message = '';
+ public $message = '';
/**
* Error to display in admin_notice
* @var string
*/
- var $error = '';
+ public $error = '';
/**
* Modules that need more privacy description.
* @var string
*/
- var $privacy_checks = '';
+ public $privacy_checks = '';
/**
* Stats to record once the page loads
*
* @var array
*/
- var $stats = array();
+ public $stats = array();
/**
* Allows us to build a temporary security report
@@ -271,12 +287,12 @@ class Jetpack {
/**
* Jetpack_Sync object
*/
- var $sync;
+ public $sync;
/**
* Verified data for JSON authorization request
*/
- var $json_api_authorization_request = array();
+ public $json_api_authorization_request = array();
/**
* Holds the singleton instance of this class
@@ -332,6 +348,14 @@ class Jetpack {
// Add missing version and old_version options
if ( ! $version = Jetpack_Options::get_option( 'version' ) ) {
$version = $old_version = '1.1:' . time();
+ /**
+ * Fires on update, before bumping version numbers up to a new version.
+ *
+ * @since 3.4.0
+ *
+ * @param string $version Jetpack version number.
+ * @param bool false Does an old version exist. Default is false.
+ */
do_action( 'updating_jetpack_version', $version, false );
Jetpack_Options::update_options( compact( 'version', 'old_version' ) );
}
@@ -375,14 +399,32 @@ class Jetpack {
list( $version ) = explode( ':', Jetpack_Options::get_option( 'version' ) );
if ( JETPACK__VERSION != $version ) {
add_action( 'init', array( __CLASS__, 'activate_new_modules' ) );
+ /**
+ * Fires when synchronizing all registered options and constants.
+ *
+ * @since 3.3.0
+ */
do_action( 'jetpack_sync_all_registered_options' );
}
+
+ //if Jetpack is connected check if jetpack_unique_connection exists and if not then set it
+ $jetpack_unique_connection = get_option( 'jetpack_unique_connection' );
+ $is_unique_connection = $jetpack_unique_connection && array_key_exists( 'version', $jetpack_unique_connection );
+ if ( ! $is_unique_connection ) {
+ $jetpack_unique_connection = array(
+ 'connected' => 1,
+ 'disconnected' => -1,
+ 'version' => '3.6.1'
+ );
+ update_option( 'jetpack_unique_connection', $jetpack_unique_connection );
+ }
}
if ( get_option( 'jetpack_json_api_full_management' ) ) {
delete_option( 'jetpack_json_api_full_management' );
self::activate_manage();
}
+
}
static function activate_manage( ) {
@@ -398,7 +440,7 @@ class Jetpack {
/**
* Constructor. Initializes WordPress hooks
*/
- private function Jetpack() {
+ private function __construct() {
/*
* Check for and alert any deprecated hooks
*/
@@ -408,7 +450,21 @@ class Jetpack {
* Do things that should run even in the network admin
* here, before we potentially fail out.
*/
- add_filter( 'jetpack_require_lib_dir', array( $this, 'require_lib_dir' ) );
+ add_filter( 'jetpack_require_lib_dir', array( $this, 'require_lib_dir' ) );
+
+ /**
+ * We need sync object even in Multisite mode
+ */
+ $this->sync = new Jetpack_Sync;
+
+ /**
+ * Trigger a wp_version sync when updating WP versions
+ **/
+ add_action( 'upgrader_process_complete', array( 'Jetpack', 'update_get_wp_version' ), 10, 2 );
+ $this->sync->mock_option( 'wp_version', array( 'Jetpack', 'get_wp_version' ) );
+
+ add_action( 'init', array( $this, 'sync_update_data') );
+ add_action( 'init', array( $this, 'sync_theme_data' ) );
/*
* Load things that should only be in Network Admin.
@@ -420,14 +476,25 @@ class Jetpack {
if( is_multisite() ) {
Jetpack_Network::init();
- if( is_network_admin() )
- return; // End here to prevent single site actions from firing
+ // Only sync this info if we are on a multi site
+ // @since 3.7
+ $this->sync->mock_option( 'network_name', array( 'Jetpack', 'network_name' ) );
+ $this->sync->mock_option( 'network_allow_new_registrations', array( 'Jetpack', 'network_allow_new_registrations' ) );
+ $this->sync->mock_option( 'network_add_new_users', array( 'Jetpack', 'network_add_new_users' ) );
+ $this->sync->mock_option( 'network_site_upload_space', array( 'Jetpack', 'network_site_upload_space' ) );
+ $this->sync->mock_option( 'network_upload_file_types', array( 'Jetpack', 'network_upload_file_types' ) );
+ $this->sync->mock_option( 'network_enable_administration_menus', array( 'Jetpack', 'network_enable_administration_menus' ) );
+
+ if( is_network_admin() ) {
+ // Sync network site data if it is updated or not.
+ add_action( 'update_wpmu_options', array( $this, 'update_jetpack_network_settings' ) );
+ return; // End here to prevent single site actions from firing
+ }
}
$theme_slug = get_option( 'stylesheet' );
- $this->sync = new Jetpack_Sync;
// Modules should do Jetpack_Sync::sync_options( __FILE__, $option, ... ); instead
// We access the "internal" method here only because the Jetpack object isn't instantiated yet
@@ -442,7 +509,18 @@ class Jetpack {
'stylesheet',
"theme_mods_{$theme_slug}",
'jetpack_sync_non_public_post_stati',
- 'jetpack_options'
+ 'jetpack_options',
+ 'site_icon', // (int) - ID of core's Site Icon attachment ID
+ 'default_post_format',
+ 'default_category',
+ 'large_size_w',
+ 'large_size_h',
+ 'thumbnail_size_w',
+ 'thumbnail_size_h',
+ 'medium_size_w',
+ 'medium_size_h',
+ 'thumbnail_crop',
+ 'image_default_link_type'
);
foreach( Jetpack_Options::get_option_names( 'non-compact' ) as $option ) {
@@ -456,8 +534,13 @@ class Jetpack {
$this->sync->mock_option( 'is_main_network', array( $this, 'is_main_network_option' ) );
$this->sync->mock_option( 'is_multi_site', array( $this, 'is_multisite' ) );
$this->sync->mock_option( 'main_network_site', array( $this, 'jetpack_main_network_site_option' ) );
- $this->sync->mock_option( 'single_user_site', array( $this, 'is_single_user_site' ) );
+ $this->sync->mock_option( 'single_user_site', array( 'Jetpack', 'is_single_user_site' ) );
+ $this->sync->mock_option( 'stat_data', array( $this, 'get_stat_data' ) );
+ $this->sync->mock_option( 'has_file_system_write_access', array( 'Jetpack', 'file_system_write_access' ) );
+ $this->sync->mock_option( 'is_version_controlled', array( 'Jetpack', 'is_version_controlled' ) );
+ $this->sync->mock_option( 'max_upload_size', 'wp_max_upload_size' );
+ $this->sync->mock_option( 'content_width', array( 'Jetpack', 'get_content_width' ) );
/**
* Trigger an update to the main_network_site when we update the blogname of a site.
@@ -471,6 +554,10 @@ class Jetpack {
add_action( 'user_register', array( $this, 'is_single_user_site_invalidate' ) );
add_action( 'deleted_user', array( $this, 'is_single_user_site_invalidate' ) );
+ // Unlink user before deleting the user from .com
+ add_action( 'deleted_user', array( $this, 'unlink_user' ), 10, 1 );
+ add_action( 'remove_user_from_blog', array( $this, 'unlink_user' ), 10, 1 );
+
if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST && isset( $_GET['for'] ) && 'jetpack' == $_GET['for'] ) {
@ini_set( 'display_errors', false ); // Display errors can cause the XML to be not well formed.
@@ -527,16 +614,22 @@ class Jetpack {
// Filter the dashboard meta box order to swap the new one in in place of the old one.
add_filter( 'get_user_option_meta-box-order_dashboard', array( $this, 'get_user_option_meta_box_order_dashboard' ) );
- add_action( 'wp_ajax_jetpack-check-news-subscription', array( $this, 'check_news_subscription' ) );
- add_action( 'wp_ajax_jetpack-subscribe-to-news', array( $this, 'subscribe_to_news' ) );
-
add_action( 'wp_ajax_jetpack-sync-reindex-trigger', array( $this, 'sync_reindex_trigger' ) );
add_action( 'wp_ajax_jetpack-sync-reindex-status', array( $this, 'sync_reindex_status' ) );
// Jump Start AJAX callback function
- add_action( 'wp_ajax_jetpack_admin_ajax', array( $this, 'jetpack_jumpstart_ajax_callback' ) );
+ add_action( 'wp_ajax_jetpack_jumpstart_ajax', array( $this, 'jetpack_jumpstart_ajax_callback' ) );
add_action( 'update_option', array( $this, 'jumpstart_has_updated_module_option' ) );
+ // Identity Crisis AJAX callback function
+ add_action( 'wp_ajax_jetpack_resolve_identity_crisis', array( $this, 'resolve_identity_crisis_ajax_callback' ) );
+
+ // JITM AJAX callback function
+ add_action( 'wp_ajax_jitm_ajax', array( $this, 'jetpack_jitm_ajax_callback' ) );
+
+ add_action( 'wp_ajax_jetpack_admin_ajax', array( $this, 'jetpack_admin_ajax_callback' ) );
+ add_action( 'wp_ajax_jetpack_admin_ajax_refresh', array( $this, 'jetpack_admin_ajax_refresh_data' ) );
+
add_action( 'wp_loaded', array( $this, 'register_assets' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'devicepx' ) );
add_action( 'customize_controls_enqueue_scripts', array( $this, 'devicepx' ) );
@@ -564,6 +657,9 @@ class Jetpack {
add_filter( 'jetpack_get_default_modules', array( $this, 'filter_default_modules' ) );
add_filter( 'jetpack_get_default_modules', array( $this, 'handle_deprecated_modules' ), 99 );
+ // A filter to control all just in time messages
+ add_filter( 'jetpack_just_in_time_msgs', '__return_true' );
+
/**
* This is the hack to concatinate all css files into one.
* For description and reasoning see the implode_frontend_css method
@@ -574,6 +670,82 @@ class Jetpack {
add_action( 'wp_print_styles', array( $this, 'implode_frontend_css' ), -1 ); // Run first
add_action( 'wp_print_footer_scripts', array( $this, 'implode_frontend_css' ), -1 ); // Run first to trigger before `print_late_styles`
}
+
+ // Sync Core Icon: Detect changes in Core's Site Icon and make it syncable.
+ add_action( 'add_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) );
+ add_action( 'update_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) );
+ add_action( 'delete_option_site_icon', array( $this, 'jetpack_sync_core_icon' ) );
+ add_action( 'jetpack_heartbeat', array( $this, 'jetpack_sync_core_icon' ) );
+
+ }
+
+ /*
+ * Make sure any site icon added to core can get
+ * synced back to dotcom, so we can display it there.
+ */
+ function jetpack_sync_core_icon() {
+ if ( function_exists( 'get_site_icon_url' ) ) {
+ $url = get_site_icon_url();
+ } else {
+ return;
+ }
+
+ require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' );
+ // If there's a core icon, maybe update the option. If not, fall back to Jetpack's.
+ if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) {
+ // This is the option that is synced with dotcom
+ Jetpack_Options::update_option( 'site_icon_url', $url );
+ } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) {
+ Jetpack_Options::delete_option( 'site_icon_url' );
+ }
+ }
+
+ function jetpack_admin_ajax_callback() {
+ // Check for nonce
+ if ( ! isset( $_REQUEST['adminNonce'] ) || ! wp_verify_nonce( $_REQUEST['adminNonce'], 'jetpack-admin-nonce' ) || ! current_user_can( 'jetpack_manage_modules' ) ) {
+ wp_die( 'permissions check failed' );
+ }
+
+ if ( isset( $_REQUEST['toggleModule'] ) && 'nux-toggle-module' == $_REQUEST['toggleModule'] ) {
+ $slug = $_REQUEST['thisModuleSlug'];
+
+ if ( ! in_array( $slug, Jetpack::get_available_modules() ) ) {
+ wp_die( 'That is not a Jetpack module slug' );
+ }
+
+ if ( Jetpack::is_module_active( $slug ) ) {
+ Jetpack::deactivate_module( $slug );
+ } else {
+ Jetpack::activate_module( $slug, false, false );
+ }
+
+ $modules = Jetpack_Admin::init()->get_modules();
+ echo json_encode( $modules[ $slug ] );
+
+ exit;
+ }
+
+ wp_die();
+ }
+
+ /*
+ * Sometimes we need to refresh the data,
+ * especially if the page is visited via a 'history'
+ * event like back/forward
+ */
+ function jetpack_admin_ajax_refresh_data() {
+ // Check for nonce
+ if ( ! isset( $_REQUEST['adminNonce'] ) || ! wp_verify_nonce( $_REQUEST['adminNonce'], 'jetpack-admin-nonce' ) ) {
+ wp_die( 'permissions check failed' );
+ }
+
+ if ( isset( $_REQUEST['refreshData'] ) && 'refresh' == $_REQUEST['refreshData'] ) {
+ $modules = Jetpack_Admin::init()->get_modules();
+ echo json_encode( $modules );
+ exit;
+ }
+
+ wp_die();
}
/**
@@ -671,6 +843,67 @@ class Jetpack {
}
/**
+ * The callback for the JITM ajax requests.
+ */
+ function jetpack_jitm_ajax_callback() {
+ // Check for nonce
+ if ( ! isset( $_REQUEST['jitmNonce'] ) || ! wp_verify_nonce( $_REQUEST['jitmNonce'], 'jetpack-jitm-nonce' ) ) {
+ wp_die( 'Module activation failed due to lack of appropriate permissions' );
+ }
+ if ( isset( $_REQUEST['jitmActionToTake'] ) && 'activate' == $_REQUEST['jitmActionToTake'] ) {
+ $module_slug = $_REQUEST['jitmModule'];
+ Jetpack::log( 'activate', $module_slug );
+ Jetpack::activate_module( $module_slug, false, false );
+ Jetpack::state( 'message', 'no_message' );
+
+ //A Jetpack module is being activated through a JITM, track it
+ $this->stat( 'jitm', $module_slug.'-activated-' . JETPACK__VERSION );
+ $this->do_stats( 'server_side' );
+
+ wp_send_json_success();
+ }
+ if ( isset( $_REQUEST['jitmActionToTake'] ) && 'dismiss' == $_REQUEST['jitmActionToTake'] ) {
+ // get the hide_jitm options array
+ $jetpack_hide_jitm = Jetpack_Options::get_option( 'hide_jitm' );
+ $module_slug = $_REQUEST['jitmModule'];
+
+ if( ! $jetpack_hide_jitm ) {
+ $jetpack_hide_jitm = array(
+ $module_slug => 'hide'
+ );
+ } else {
+ $jetpack_hide_jitm[$module_slug] = 'hide';
+ }
+
+ Jetpack_Options::update_option( 'hide_jitm', $jetpack_hide_jitm );
+
+ //jitm is being dismissed forever, track it
+ $this->stat( 'jitm', $module_slug.'-dismissed-' . JETPACK__VERSION );
+ $this->do_stats( 'server_side' );
+
+ wp_send_json_success();
+ }
+ if ( isset( $_REQUEST['jitmActionToTake'] ) && 'launch' == $_REQUEST['jitmActionToTake'] ) {
+ $module_slug = $_REQUEST['jitmModule'];
+
+ // User went to WordPress.com, track this
+ $this->stat( 'jitm', $module_slug.'-wordpress-tools-' . JETPACK__VERSION );
+ $this->do_stats( 'server_side' );
+
+ wp_send_json_success();
+ }
+ if ( isset( $_REQUEST['jitmActionToTake'] ) && 'viewed' == $_REQUEST['jitmActionToTake'] ) {
+ $track = $_REQUEST['jitmModule'];
+
+ // User is viewing JITM, track it.
+ $this->stat( 'jitm', $track . '-viewed-' . JETPACK__VERSION );
+ $this->do_stats( 'server_side' );
+
+ wp_send_json_success();
+ }
+ }
+
+ /**
* If there are any stats that need to be pushed, but haven't been, push them now.
*/
function __destruct() {
@@ -720,11 +953,35 @@ class Jetpack {
case 'jetpack_configure_modules' :
$caps = array( 'manage_options' );
break;
+ case 'jetpack_network_admin_page':
+ case 'jetpack_network_settings_page':
+ $caps = array( 'manage_network_plugins' );
+ break;
+ case 'jetpack_network_sites_page':
+ $caps = array( 'manage_sites' );
+ break;
case 'jetpack_admin_page' :
if ( Jetpack::is_development_mode() ) {
$caps = array( 'manage_options' );
break;
}
+
+ // Don't ever show to subscribers, but allow access to the page if they're trying to unlink.
+ if ( ! current_user_can( 'edit_posts' ) ) {
+ if ( isset( $_GET['redirect'] ) && 'sub-unlink' == $_GET['redirect'] ) {
+ // We need this in order to unlink the user.
+ $this->admin_page_load();
+ }
+ if ( ! wp_verify_nonce( 'jetpack-unlink' ) ) {
+ $caps = array( 'do_not_allow' );
+ break;
+ }
+ }
+
+ if ( ! self::is_active() && ! current_user_can( 'jetpack_connect' ) ) {
+ $caps = array( 'do_not_allow' );
+ break;
+ }
/**
* Pass through. If it's not development mode, these should match the admin page.
* Let users disconnect if it's development mode, just in case things glitch.
@@ -814,7 +1071,7 @@ class Jetpack {
*
* @filter require_lib_dir
*/
- function require_lib_dir( $lib_dir ) {
+ function require_lib_dir() {
return JETPACK__PLUGIN_DIR . '_inc/lib';
}
@@ -826,6 +1083,61 @@ class Jetpack {
public function jetpack_main_network_site_option( $option ) {
return network_site_url();
}
+ /**
+ * Network Name.
+ */
+ static function network_name( $option = null ) {
+ global $current_site;
+ return $current_site->site_name;
+ }
+ /**
+ * Does the network allow new user and site registrations.
+ * @return string
+ */
+ static function network_allow_new_registrations( $option = null ) {
+ return ( in_array( get_site_option( 'registration' ), array('none', 'user', 'blog', 'all' ) ) ? get_site_option( 'registration') : 'none' );
+ }
+ /**
+ * Does the network allow admins to add new users.
+ * @return boolian
+ */
+ static function network_add_new_users( $option = null ) {
+ return (bool) get_site_option( 'add_new_users' );
+ }
+ /**
+ * File upload psace left per site in MB.
+ * -1 means NO LIMIT.
+ * @return number
+ */
+ static function network_site_upload_space( $option = null ) {
+ // value in MB
+ return ( get_site_option( 'upload_space_check_disabled' ) ? -1 : get_space_allowed() );
+ }
+
+ /**
+ * Network allowed file types.
+ * @return string
+ */
+ static function network_upload_file_types( $option = null ) {
+ return get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
+ }
+
+ /**
+ * Maximum file upload size set by the network.
+ * @return number
+ */
+ static function network_max_upload_file_size( $option = null ) {
+ // value in KB
+ return get_site_option( 'fileupload_maxk', 300 );
+ }
+
+ /**
+ * Lets us know if a site allows admins to manage the network.
+ * @return array
+ */
+ static function network_enable_administration_menus( $option = null ) {
+ return get_site_option( 'menu_items' );
+ }
/**
* Return whether we are dealing with a multi network setup or not.
@@ -881,17 +1193,58 @@ class Jetpack {
*/
function update_jetpack_main_network_site_option() {
// do_action( 'add_option_$option', '$option', '$value-of-the-option' );
+ /**
+ * Fires when the site URL is updated.
+ * Determines if the site is the main site of a Mulitiste network.
+ *
+ * @since 3.3.0
+ *
+ * @param string jetpack_main_network_site.
+ * @param string network_site_url() Site URL for the "main" site of the current Multisite network.
+ */
do_action( 'add_option_jetpack_main_network_site', 'jetpack_main_network_site', network_site_url() );
+ /**
+ * Fires when the site URL is updated.
+ * Determines if the is part of a multi network.
+ *
+ * @since 3.3.0
+ *
+ * @param string jetpack_is_main_network.
+ * @param bool Jetpack::is_multi_network() Is the site part of a multi network.
+ */
do_action( 'add_option_jetpack_is_main_network', 'jetpack_is_main_network', (string) (bool) Jetpack::is_multi_network() );
+ /**
+ * Fires when the site URL is updated.
+ * Determines if the site is part of a multisite network.
+ *
+ * @since 3.4.0
+ *
+ * @param string jetpack_is_multi_site.
+ * @param bool is_multisite() Is the site part of a mutlisite network.
+ */
do_action( 'add_option_jetpack_is_multi_site', 'jetpack_is_multi_site', (string) (bool) is_multisite() );
}
+ /**
+ * Triggered after a user updates the network settings via Network Settings Admin Page
+ *
+ */
+ function update_jetpack_network_settings() {
+ // Only sync this info for the main network site.
+ do_action( 'add_option_jetpack_network_name', 'jetpack_network_name', Jetpack::network_name() );
+ do_action( 'add_option_jetpack_network_allow_new_registrations', 'jetpack_network_allow_new_registrations', Jetpack::network_allow_new_registrations() );
+ do_action( 'add_option_jetpack_network_add_new_users', 'jetpack_network_add_new_users', Jetpack::network_add_new_users() );
+ do_action( 'add_option_jetpack_network_site_upload_space', 'jetpack_network_site_upload_space', Jetpack::network_site_upload_space() );
+ do_action( 'add_option_jetpack_network_upload_file_types', 'jetpack_network_upload_file_types', Jetpack::network_upload_file_types() );
+ do_action( 'add_option_jetpack_network_enable_administration_menus', 'jetpack_network_enable_administration_menus', Jetpack::network_enable_administration_menus() );
+
+ }
/**
* Get back if the current site is single user site.
*
* @return bool
*/
- public function is_single_user_site() {
+ public static function is_single_user_site() {
$user_query = new WP_User_Query( array(
'blog_id' => get_current_blog_id(),
@@ -902,16 +1255,201 @@ class Jetpack {
}
/**
+ * Returns true if the site has file write access false otherwise.
+ * @return string ( '1' | '0' )
+ **/
+ public static function file_system_write_access() {
+ if ( ! function_exists( 'get_filesystem_method' ) ) {
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
+ }
+
+ require_once( ABSPATH . 'wp-admin/includes/template.php' );
+
+ $filesystem_method = get_filesystem_method();
+ if ( $filesystem_method === 'direct' ) {
+ return 1;
+ }
+
+ ob_start();
+ $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() );
+ ob_end_clean();
+ if ( $filesystem_credentials_are_stored ) {
+ return 1;
+ }
+ return 0;
+ }
+
+ /**
+ * Finds out if a site is using a version control system.
+ * @return string ( '1' | '0' )
+ **/
+ public static function is_version_controlled() {
+
+ if ( !class_exists( 'WP_Automatic_Updater' ) ) {
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+ }
+ $updater = new WP_Automatic_Updater();
+ $is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) );
+ // transients should not be empty
+ if ( empty( $is_version_controlled ) ) {
+ $is_version_controlled = '0';
+ }
+ return $is_version_controlled;
+ }
+
+ /**
+ * Determines whether the current theme supports featured images or not.
+ * @return string ( '1' | '0' )
+ */
+ public static function featured_images_enabled() {
+ return current_theme_supports( 'post-thumbnails' ) ? '1' : '0';
+ }
+
+ /*
+ * Sync back wp_version
+ */
+ public static function get_wp_version() {
+ global $wp_version;
+ return $wp_version;
+ }
+
+ /**
+ * Keeps wp_version in sync with .com when WordPress core updates
+ **/
+ public static function update_get_wp_version( $update, $meta_data ) {
+ if ( 'update' === $meta_data['action'] && 'core' === $meta_data['type'] ) {
+ /** This action is documented in wp-includes/option.php */
+ /**
+ * This triggers the sync for the jetpack version
+ * See Jetpack_Sync options method for more info.
+ */
+ do_action( 'add_option_jetpack_wp_version', 'jetpack_wp_version', (string) Jetpack::get_wp_version() );
+ }
+ }
+
+ /**
+ * Triggers a sync of update counts and update details
+ */
+ function sync_update_data() {
+ // Anytime WordPress saves update data, we'll want to sync update data
+ add_action( 'set_site_transient_update_plugins', array( 'Jetpack', 'refresh_update_data' ) );
+ add_action( 'set_site_transient_update_themes', array( 'Jetpack', 'refresh_update_data' ) );
+ add_action( 'set_site_transient_update_core', array( 'Jetpack', 'refresh_update_data' ) );
+ // Anytime a connection to jetpack is made, sync the update data
+ add_action( 'jetpack_site_registered', array( 'Jetpack', 'refresh_update_data' ) );
+ // Anytime the Jetpack Version changes, sync the the update data
+ add_action( 'updating_jetpack_version', array( 'Jetpack', 'refresh_update_data' ) );
+
+ if ( current_user_can( 'update_core' ) && current_user_can( 'update_plugins' ) && current_user_can( 'update_themes' ) ) {
+ $this->sync->mock_option( 'updates', array( 'Jetpack', 'get_updates' ) );
+ }
+
+ $this->sync->mock_option( 'update_details', array( 'Jetpack', 'get_update_details' ) );
+ }
+
+ /**
+ * Triggers a sync of information specific to the current theme.
+ */
+ function sync_theme_data() {
+ add_action( 'switch_theme', array( 'Jetpack', 'refresh_theme_data' ) );
+ $this->sync->mock_option( 'featured_images_enabled', array( 'Jetpack', 'featured_images_enabled' ) );
+ }
+
+ /**
+ * jetpack_updates is saved in the following schema:
+ *
+ * array (
+ * 'plugins' => (int) Number of plugin updates available.
+ * 'themes' => (int) Number of theme updates available.
+ * 'wordpress' => (int) Number of WordPress core updates available.
+ * 'translations' => (int) Number of translation updates available.
+ * 'total' => (int) Total of all available updates.
+ * 'wp_update_version' => (string) The latest available version of WordPress, only present if a WordPress update is needed.
+ * )
+ * @return array
+ */
+ public static function get_updates() {
+ $update_data = wp_get_update_data();
+
+ // Stores the individual update counts as well as the total count.
+ if ( isset( $update_data['counts'] ) ) {
+ $updates = $update_data['counts'];
+ }
+
+ // If we need to update WordPress core, let's find the latest version number.
+ if ( ! empty( $updates['wordpress'] ) ) {
+ $cur = get_preferred_from_update_core();
+ if ( isset( $cur->response ) && 'upgrade' === $cur->response ) {
+ $updates['wp_update_version'] = $cur->current;
+ }
+ }
+ return isset( $updates ) ? $updates : array();
+ }
+
+ public static function get_update_details() {
+ $update_details = array(
+ 'update_core' => get_site_transient( 'update_core' ),
+ 'update_plugins' => get_site_transient( 'update_plugins' ),
+ 'update_themes' => get_site_transient( 'update_themes' ),
+ );
+ return $update_details;
+ }
+
+ public static function refresh_update_data() {
+ if ( current_user_can( 'update_core' ) && current_user_can( 'update_plugins' ) && current_user_can( 'update_themes' ) ) {
+ /**
+ * Fires whenever the amount of updates needed for a site changes.
+ * Syncs an array that includes the number of theme, plugin, and core updates available, as well as the latest core version available.
+ *
+ * @since 3.7.0
+ *
+ * @param string jetpack_updates
+ * @param array Update counts calculated by Jetpack::get_updates
+ */
+ do_action( 'add_option_jetpack_updates', 'jetpack_updates', Jetpack::get_updates() );
+ }
+ /**
+ * Fires whenever the amount of updates needed for a site changes.
+ * Syncs an array of core, theme, and plugin data, and which of each is out of date
+ *
+ * @since 3.7.0
+ *
+ * @param string jetpack_update_details
+ * @param array Update details calculated by Jetpack::get_update_details
+ */
+ do_action( 'add_option_jetpack_update_details', 'jetpack_update_details', Jetpack::get_update_details() );
+ }
+
+ public static function refresh_theme_data() {
+ /**
+ * Fires whenever a theme change is made.
+ *
+ * @since 3.8.1
+ *
+ * @param string featured_images_enabled
+ * @param boolean Whether featured images are enabled or not
+ */
+ do_action( 'add_option_jetpack_featured_images_enabled', 'jetpack_featured_images_enabled', Jetpack::featured_images_enabled() );
+ }
+
+ /**
* Invalides the transient as well as triggers the update of the mock option.
*
* @return null
*/
function is_single_user_site_invalidate() {
- do_action( 'update_option_jetpack_single_user_site', 'jetpack_single_user_site', (bool) $this->is_single_user_site() );
+ /**
+ * Fires when a user is added or removed from a site.
+ * Determines if the site is a single user site.
+ *
+ * @since 3.4.0
+ *
+ * @param string jetpack_single_user_site.
+ * @param bool Jetpack::is_single_user_site() Is the current site a single user site.
+ */
+ do_action( 'update_option_jetpack_single_user_site', 'jetpack_single_user_site', (bool) Jetpack::is_single_user_site() );
}
-
-
/**
* Is Jetpack active?
*/
@@ -932,6 +1470,15 @@ class Jetpack {
elseif ( site_url() && false === strpos( site_url(), '.' ) ) {
$development_mode = true;
}
+ /**
+ * Filters Jetpack's development mode.
+ *
+ * @see http://jetpack.me/support/development-mode/
+ *
+ * @since 2.2.1
+ *
+ * @param bool $development_mode Is Jetpack's development mode active.
+ */
return apply_filters( 'jetpack_development_mode', $development_mode );
}
@@ -944,15 +1491,34 @@ class Jetpack {
public static function show_development_mode_notice() {
if ( Jetpack::is_development_mode() ) {
if ( defined( 'JETPACK_DEV_DEBUG' ) && JETPACK_DEV_DEBUG ) {
- $notice = __( 'In Development Mode, via the JETPACK_DEV_DEBUG constant being defined in wp-config.php or elsewhere.', 'jetpack' );
+ $notice = sprintf(
+ /* translators: %s is a URL */
+ __( 'In <a href="%s" target="_blank">Development Mode</a>, via the JETPACK_DEV_DEBUG constant being defined in wp-config.php or elsewhere.', 'jetpack' ),
+ 'http://jetpack.me/support/development-mode/'
+ );
} elseif ( site_url() && false === strpos( site_url(), '.' ) ) {
- $notice = __( 'In Development Mode, via site URL lacking a dot (e.g. http://localhost).', 'jetpack' );
+ $notice = sprintf(
+ /* translators: %s is a URL */
+ __( 'In <a href="%s" target="_blank">Development Mode</a>, via site URL lacking a dot (e.g. http://localhost).', 'jetpack' ),
+ 'http://jetpack.me/support/development-mode/'
+ );
} else {
- $notice = __( 'In Development Mode, via the jetpack_development_mode filter.', 'jetpack' );
+ $notice = sprintf(
+ /* translators: %s is a URL */
+ __( 'In <a href="%s" target="_blank">Development Mode</a>, via the jetpack_development_mode filter.', 'jetpack' ),
+ 'http://jetpack.me/support/development-mode/'
+ );
}
- $output = '<div class="error"><p>' . $notice . '</p></div>';
- echo $output;
+ echo '<div class="updated" style="border-color: #f0821e;"><p>' . $notice . '</p></div>';
+ }
+
+ // Throw up a notice if using a development version and as for feedback.
+ if ( Jetpack::is_development_version() ) {
+ /* translators: %s is a URL */
+ $notice = sprintf( __( 'You are currently running a development version of Jetpack. <a href="%s" target="_blank">Submit your feedback</a>', 'jetpack' ), 'https://jetpack.me/contact-support/beta-group/' );
+
+ echo '<div class="updated" style="border-color: #f0821e;"><p>' . $notice . '</p></div>';
}
}
@@ -1032,6 +1598,9 @@ class Jetpack {
function extra_oembed_providers() {
// Cloudup: https://dev.cloudup.com/#oembed
wp_oembed_add_provider( 'https://cloudup.com/*' , 'https://cloudup.com/oembed' );
+ wp_oembed_add_provider( 'https://me.sh/*', 'https://me.sh/oembed?format=json' );
+ wp_oembed_add_provider( '#https?://(www\.)?gfycat\.com/.*#i', 'https://api.gfycat.com/v1/oembed', true );
+ wp_oembed_add_provider( '#https?://[^.]+\.(wistia\.com|wi\.st)/(medias|embed)/.*#', 'https://fast.wistia.com/oembed', true );
}
/**
@@ -1085,13 +1654,16 @@ class Jetpack {
* Loads the currently active modules.
*/
public static function load_modules() {
- if( !self::is_active() && !self::is_development_mode() ) {
- return;
+ if ( ! self::is_active() && !self::is_development_mode() ) {
+ if ( ! is_multisite() || ! get_site_option( 'jetpack_protect_active' ) ) {
+ return;
+ }
}
$version = Jetpack_Options::get_option( 'version' );
if ( ! $version ) {
$version = $old_version = JETPACK__VERSION . ':' . time();
+ /** This action is documented in class.jetpack.php */
do_action( 'updating_jetpack_version', $version, false );
Jetpack_Options::update_options( compact( 'version', 'old_version' ) );
}
@@ -1140,9 +1712,20 @@ class Jetpack {
}
require Jetpack::get_module_path( $module );
+ /**
+ * Fires when a specific module is loaded.
+ * The dynamic part of the hook, $module, is the module slug.
+ *
+ * @since 1.1.0
+ */
do_action( 'jetpack_module_loaded_' . $module );
}
+ /**
+ * Fires when all the modules are loaded.
+ *
+ * @since 1.1.0
+ */
do_action( 'jetpack_modules_loaded' );
// Load module-specific code that is needed even when a module isn't active. Loaded here because code contained therein may need actions such as setup_theme.
@@ -1156,6 +1739,13 @@ class Jetpack {
* @return null
*/
public function check_rest_api_compat() {
+ /**
+ * Filters the list of REST API compat files to be included.
+ *
+ * @since 2.2.5
+ *
+ * @param array $args Array of REST API compat files to include.
+ */
$_jetpack_rest_api_compat_includes = apply_filters( 'jetpack_rest_api_compat', array() );
if ( function_exists( 'bbpress' ) )
@@ -1185,7 +1775,65 @@ class Jetpack {
sort( $active_plugins );
- return $active_plugins;
+ return array_unique( $active_plugins );
+ }
+
+ /**
+ * Gets and parses additional plugin data to send with the heartbeat data
+ *
+ * @since 3.8.1
+ *
+ * @return array Array of plugin data
+ */
+ public static function get_parsed_plugin_data() {
+ if ( ! function_exists( 'get_plugins' ) ) {
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
+ }
+ $all_plugins = get_plugins();
+ $active_plugins = Jetpack::get_active_plugins();
+
+ $plugins = array();
+ foreach ( $all_plugins as $path => $plugin_data ) {
+ $plugins[ $path ] = array(
+ 'is_active' => in_array( $path, $active_plugins ),
+ 'file' => $path,
+ 'name' => $plugin_data['Name'],
+ 'version' => $plugin_data['Version'],
+ 'author' => $plugin_data['Author'],
+ );
+ }
+
+ return $plugins;
+ }
+
+ /**
+ * Gets and parses theme data to send with the heartbeat data
+ *
+ * @since 3.8.1
+ *
+ * @return array Array of theme data
+ */
+ public static function get_parsed_theme_data() {
+ $all_themes = wp_get_themes( array( 'allowed' => true ) );
+ $header_keys = array( 'Name', 'Author', 'Version', 'ThemeURI', 'AuthorURI', 'Status', 'Tags' );
+
+ $themes = array();
+ foreach ( $all_themes as $slug => $theme_data ) {
+ $theme_headers = array();
+ foreach ( $header_keys as $header_key ) {
+ $theme_headers[ $header_key ] = $theme_data->get( $header_key );
+ }
+
+ $themes[ $slug ] = array(
+ 'is_active_theme' => $slug == wp_get_theme()->get_template(),
+ 'slug' => $slug,
+ 'theme_root' => $theme_data->get_theme_root_uri(),
+ 'parent' => $theme_data->parent(),
+ 'headers' => $theme_headers
+ );
+ }
+
+ return $themes;
}
/**
@@ -1222,6 +1870,13 @@ class Jetpack {
}
}
+ /**
+ * Allow the addition of Open Graph Meta Tags to all pages.
+ *
+ * @since 2.0.3
+ *
+ * @param bool false Should Open Graph Meta tags be added. Default to false.
+ */
if ( apply_filters( 'jetpack_enable_open_graph', false ) ) {
require_once JETPACK__PLUGIN_DIR . 'functions.opengraph.php';
}
@@ -1248,6 +1903,13 @@ class Jetpack {
}
}
+ /**
+ * Allow Twitter Card Meta tags to be disabled.
+ *
+ * @since 2.6.0
+ *
+ * @param bool true Should Twitter Card Meta tags be disabled. Default to true.
+ */
if ( apply_filters( 'jetpack_disable_twitter_cards', true ) ) {
require_once JETPACK__PLUGIN_DIR . 'class.jetpack-twitter-cards.php';
}
@@ -1289,6 +1951,11 @@ class Jetpack {
return;
}
+ /**
+ * Fires before a security report is created.
+ *
+ * @since 3.4.0
+ */
do_action( 'jetpack_security_report' );
Jetpack_Options::update_option( 'security_report', self::$security_report );
@@ -1313,7 +1980,7 @@ class Jetpack {
}
if( !function_exists( 'get_plugin_data' ) ) {
- include( ABSPATH . 'wp-admin/includes/plugin.php' );
+ include( ABSPATH . 'wp-admin/includes/plugin.php' );
}
//Get rid of any non-allowed args
@@ -1514,6 +2181,7 @@ class Jetpack {
$jetpack_old_version = Jetpack_Options::get_option( 'version' ); // [sic]
if ( ! $jetpack_old_version ) {
$jetpack_old_version = $version = $old_version = '1.1:' . time();
+ /** This action is documented in class.jetpack.php */
do_action( 'updating_jetpack_version', $version, false );
Jetpack_Options::update_options( compact( 'version', 'old_version' ) );
}
@@ -1541,6 +2209,7 @@ class Jetpack {
}
$new_version = JETPACK__VERSION . ':' . time();
+ /** This action is documented in class.jetpack.php */
do_action( 'updating_jetpack_version', $new_version, $jetpack_old_version );
Jetpack_Options::update_options(
array(
@@ -1594,14 +2263,23 @@ class Jetpack {
}
}
- $modules = apply_filters( 'jetpack_get_available_modules', $modules, $min_version, $max_version );
+ /**
+ * Filters the array of modules available to be activated.
+ *
+ * @since 2.4.0
+ *
+ * @param array $modules Array of available modules.
+ * @param string $min_version Minimum version number required to use modules.
+ * @param string $max_version Maximum version number required to use modules.
+ */
+ $mods = apply_filters( 'jetpack_get_available_modules', $modules, $min_version, $max_version );
if ( ! $min_version && ! $max_version ) {
- return array_keys( $modules );
+ return array_keys( $mods );
}
$r = array();
- foreach ( $modules as $slug => $introduced ) {
+ foreach ( $mods as $slug => $introduced ) {
if ( $min_version && version_compare( $min_version, $introduced, '>=' ) ) {
continue;
}
@@ -1639,6 +2317,15 @@ class Jetpack {
break;
}
}
+ /**
+ * Filters the array of default modules.
+ *
+ * @since 2.5.0
+ *
+ * @param array $return Array of default modules.
+ * @param string $min_version Minimum version number required to use modules.
+ * @param string $max_version Maximum version number required to use modules.
+ */
return apply_filters( 'jetpack_get_default_modules', $return, $min_version, $max_version );
}
@@ -1743,19 +2430,20 @@ class Jetpack {
*/
public static function get_module( $module ) {
$headers = array(
- 'name' => 'Module Name',
- 'description' => 'Module Description',
- 'jumpstart_desc' => 'Jumpstart Description',
- 'sort' => 'Sort Order',
- 'recommendation_order' => 'Recommendation Order',
- 'introduced' => 'First Introduced',
- 'changed' => 'Major Changes In',
- 'deactivate' => 'Deactivate',
- 'free' => 'Free',
- 'requires_connection' => 'Requires Connection',
- 'auto_activate' => 'Auto Activate',
- 'module_tags' => 'Module Tags',
- 'feature' => 'Feature',
+ 'name' => 'Module Name',
+ 'description' => 'Module Description',
+ 'jumpstart_desc' => 'Jumpstart Description',
+ 'sort' => 'Sort Order',
+ 'recommendation_order' => 'Recommendation Order',
+ 'introduced' => 'First Introduced',
+ 'changed' => 'Major Changes In',
+ 'deactivate' => 'Deactivate',
+ 'free' => 'Free',
+ 'requires_connection' => 'Requires Connection',
+ 'auto_activate' => 'Auto Activate',
+ 'module_tags' => 'Module Tags',
+ 'feature' => 'Feature',
+ 'additional_search_queries' => 'Additional Search Queries',
);
$file = Jetpack::get_module_path( Jetpack::get_module_slug( $module ) );
@@ -1765,9 +2453,6 @@ class Jetpack {
return false;
}
- $mod['jumpstart_desc'] = _x( $mod['jumpstart_desc'], 'Jumpstart Description', 'jetpack' );
- $mod['name'] = _x( $mod['name'], 'Module Name', 'jetpack' );
- $mod['description'] = _x( $mod['description'], 'Module Description', 'jetpack' );
$mod['sort'] = empty( $mod['sort'] ) ? 10 : (int) $mod['sort'];
$mod['recommendation_order'] = empty( $mod['recommendation_order'] ) ? 20 : (int) $mod['recommendation_order'];
$mod['deactivate'] = empty( $mod['deactivate'] );
@@ -1796,31 +2481,45 @@ class Jetpack {
}
/**
- * Filter the feature array on a module
+ * Filters the feature array on a module.
*
* This filter allows you to control where each module is filtered: Recommended,
* Jumpstart, and the default "Other" listing.
*
- * @since 3.5
+ * @since 3.5.0
*
* @param array $mod['feature'] The areas to feature this module:
- * 'Jumpstart' adds to the "Jumpstart" option to activate many modules at once
- * 'Recommended' shows on the main Jetpack admin screen
- * 'Other' should be the default if no other value is in the array
- * @param string $module The slug of the module, e.g. sharedaddy
- * @param array $mod All the currently assembled module data
+ * 'Jumpstart' adds to the "Jumpstart" option to activate many modules at once.
+ * 'Recommended' shows on the main Jetpack admin screen.
+ * 'Other' should be the default if no other value is in the array.
+ * @param string $module The slug of the module, e.g. sharedaddy.
+ * @param array $mod All the currently assembled module data.
*/
$mod['feature'] = apply_filters( 'jetpack_module_feature', $mod['feature'], $module, $mod );
- return $mod;
+ /**
+ * Filter the returned data about a module.
+ *
+ * This filter allows overriding any info about Jetpack modules. It is dangerous,
+ * so please be careful.
+ *
+ * @since 3.6.0
+ *
+ * @param array $mod The details of the requested module.
+ * @param string $module The slug of the module, e.g. sharedaddy
+ * @param string $file The path to the module source file.
+ */
+ return apply_filters( 'jetpack_get_module', $mod, $module, $file );
}
/**
* Like core's get_file_data implementation, but caches the result.
*/
public static function get_file_data( $file, $headers ) {
+ //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
+ $file_name = basename( $file );
$file_data_option = Jetpack_Options::get_option( 'file_data', array() );
- $key = md5( $file . serialize( $headers ) );
+ $key = md5( $file_name . serialize( $headers ) );
$refresh_cache = is_admin() && isset( $_GET['page'] ) && 'jetpack' === substr( $_GET['page'], 0, 7 );
// If we don't need to refresh the cache, and already have the value, short-circuit!
@@ -1856,6 +2555,12 @@ class Jetpack {
} else {
$active = array_diff( $active, array( 'vaultpress' ) );
}
+
+ //If protect is active on the main site of a multisite, it should be active on all sites.
+ if ( ! in_array( 'protect', $active ) && is_multisite() && get_site_option( 'jetpack_protect_active' ) ) {
+ $active[] = 'protect';
+ }
+
return array_unique( $active );
}
@@ -1940,6 +2645,15 @@ class Jetpack {
exit;
}
+ /**
+ * Fires before default modules are activated.
+ *
+ * @since 1.9.0
+ *
+ * @param string $min_version Minimum version number required to use modules.
+ * @param string $max_version Maximum version number required to use modules.
+ * @param array $other_modules Array of other modules to activate alongside the default modules.
+ */
do_action( 'jetpack_before_activate_default_modules', $min_version, $max_version, $other_modules );
// Check each module for fatal errors, a la wp-admin/plugins.php::activate before activating
@@ -1981,6 +2695,13 @@ class Jetpack {
Jetpack::state( 'module', $module );
ob_start();
require $file;
+ /**
+ * Fires when a specific module is activated.
+ *
+ * @since 1.9.0
+ *
+ * @param string $module Module slug.
+ */
do_action( 'jetpack_activate_module', $module );
$active[] = $module;
$state = in_array( $module, $other_modules ) ? 'reactivated_modules' : 'activated_modules';
@@ -1997,10 +2718,28 @@ class Jetpack {
Jetpack::state( 'error', false );
Jetpack::state( 'module', false );
Jetpack::catch_errors( false );
+ /**
+ * Fires when default modules are activated.
+ *
+ * @since 1.9.0
+ *
+ * @param string $min_version Minimum version number required to use modules.
+ * @param string $max_version Maximum version number required to use modules.
+ * @param array $other_modules Array of other modules to activate alongside the default modules.
+ */
do_action( 'jetpack_activate_default_modules', $min_version, $max_version, $other_modules );
}
public static function activate_module( $module, $exit = true, $redirect = true ) {
+ /**
+ * Fires before a module is activated.
+ *
+ * @since 2.6.0
+ *
+ * @param string $module Module slug.
+ * @param bool $exit Should we exit after the module has been activated. Default to true.
+ * @param bool $redirect Should the user be redirected after module activation? Default to true.
+ */
do_action( 'jetpack_pre_activate_module', $module, $exit, $redirect );
$jetpack = Jetpack::init();
@@ -2048,6 +2787,7 @@ class Jetpack {
Jetpack::catch_errors( true );
ob_start();
require Jetpack::get_module_path( $module );
+ /** This action is documented in class.jetpack.php */
do_action( 'jetpack_activate_module', $module );
$active[] = $module;
Jetpack_Options::update_option( 'active_modules', array_unique( $active ) );
@@ -2076,12 +2816,27 @@ class Jetpack {
}
function activate_module_actions( $module ) {
+ /**
+ * Fires when a module is activated.
+ * The dynamic part of the filter, $module, is the module slug.
+ *
+ * @since 1.9.0
+ *
+ * @param string $module Module slug.
+ */
do_action( "jetpack_activate_module_$module", $module );
$this->sync->sync_all_module_options( $module );
}
public static function deactivate_module( $module ) {
+ /**
+ * Fires when a module is deactivated.
+ *
+ * @since 1.9.0
+ *
+ * @param string $module Module slug.
+ */
do_action( 'jetpack_pre_deactivate_module', $module );
$jetpack = Jetpack::init();
@@ -2089,6 +2844,14 @@ class Jetpack {
$active = Jetpack::get_active_modules();
$new = array_filter( array_diff( $active, (array) $module ) );
+ /**
+ * Fires when a module is deactivated.
+ * The dynamic part of the filter, $module, is the module slug.
+ *
+ * @since 1.9.0
+ *
+ * @param string $module Module slug.
+ */
do_action( "jetpack_deactivate_module_$module", $module );
// A flag for Jump Start so it's not shown again.
@@ -2129,6 +2892,11 @@ class Jetpack {
add_action( 'jetpack_module_configuration_screen_' . $module, $method );
}
+ public static function module_configuration_activation_screen( $module, $method ) {
+ $module = Jetpack::get_module_slug( $module );
+ add_action( 'display_activate_module_setting_' . $module, $method );
+ }
+
/* Installation */
public static function bail_on_activation( $message, $deactivate = true ) {
@@ -2213,6 +2981,7 @@ p {
if ( ! Jetpack_Options::get_option( 'version' ) ) {
$version = $old_version = JETPACK__VERSION . ':' . time();
+ /** This action is documented in class.jetpack.php */
do_action( 'updating_jetpack_version', $version, false );
Jetpack_Options::update_options( compact( 'version', 'old_version' ) );
}
@@ -2265,6 +3034,25 @@ p {
Jetpack_Options::update_option( 'activated', 4 );
}
+ $jetpack_unique_connection = Jetpack_Options::get_option( 'unique_connection' );
+ // Check then record unique disconnection if site has never been disconnected previously
+ if ( -1 == $jetpack_unique_connection['disconnected'] ) {
+ $jetpack_unique_connection['disconnected'] = 1;
+ }
+ else {
+ if ( 0 == $jetpack_unique_connection['disconnected'] ) {
+ //track unique disconnect
+ $jetpack = Jetpack::init();
+
+ $jetpack->stat( 'connections', 'unique-disconnect' );
+ $jetpack->do_stats( 'server_side' );
+ }
+ // increment number of times disconnected
+ $jetpack_unique_connection['disconnected'] += 1;
+ }
+
+ Jetpack_Options::update_option( 'unique_connection', $jetpack_unique_connection );
+
// Disable the Heartbeat cron
Jetpack_Heartbeat::init()->deactivate();
}
@@ -2299,6 +3087,21 @@ p {
* Attempts Jetpack registration. If it fail, a state flag is set: @see ::admin_page_load()
*/
public static function try_registration() {
+ // Let's get some testing in beta versions and such.
+ if ( self::is_development_version() && defined( 'PHP_URL_HOST' ) ) {
+ // Before attempting to connect, let's make sure that the domains are viable.
+ $domains_to_check = array_unique( array(
+ 'siteurl' => parse_url( get_site_url(), PHP_URL_HOST ),
+ 'homeurl' => parse_url( get_home_url(), PHP_URL_HOST ),
+ ) );
+ foreach ( $domains_to_check as $domain ) {
+ $result = Jetpack_Data::is_usable_domain( $domain );
+ if ( is_wp_error( $result ) ) {
+ return $result;
+ }
+ }
+ }
+
$result = Jetpack::register();
// If there was an error with registration and the site was not registered, record this so we can show a message.
@@ -2315,7 +3118,8 @@ p {
* [Everyone Loves a Log!](https://www.youtube.com/watch?v=2C7mNr5WMjA)
*/
public static function log( $code, $data = null ) {
- $log = Jetpack_Options::get_option( 'log', array() );
+ // only grab the latest 200 entries
+ $log = array_slice( Jetpack_Options::get_option( 'log', array() ), -199, 199 );
// Append our event to the log
$log_entry = array(
@@ -2336,14 +3140,67 @@ p {
Jetpack_Options::update_option( 'log', $log );
}
+ /**
+ * Fires when Jetpack logs an internal event.
+ *
+ * @since 3.0.0
+ *
+ * @param array $log_entry {
+ * Array of details about the log entry.
+ *
+ * @param string time Time of the event.
+ * @param int user_id ID of the user who trigerred the event.
+ * @param int blog_id Jetpack Blog ID.
+ * @param string code Unique name for the event.
+ * @param string data Data about the event.
+ * }
+ */
do_action( 'jetpack_log_entry', $log_entry );
}
/**
* Get the internal event log.
+ *
+ * @param $event (string) - only return the specific log events
+ * @param $num (int) - get specific number of latest results, limited to 200
+ *
+ * @return array of log events || WP_Error for invalid params
*/
- public static function get_log() {
- return Jetpack_Options::get_option( 'log', array() );
+ public static function get_log( $event = false, $num = false ) {
+ if ( $event && ! is_string( $event ) ) {
+ return new WP_Error( __( 'First param must be string or empty', 'jetpack' ) );
+ }
+
+ if ( $num && ! is_numeric( $num ) ) {
+ return new WP_Error( __( 'Second param must be numeric or empty', 'jetpack' ) );
+ }
+
+ $entire_log = Jetpack_Options::get_option( 'log', array() );
+
+ // If nothing set - act as it did before, otherwise let's start customizing the output
+ if ( ! $num && ! $event ) {
+ return $entire_log;
+ } else {
+ $entire_log = array_reverse( $entire_log );
+ }
+
+ $custom_log_output = array();
+
+ if ( $event ) {
+ foreach ( $entire_log as $log_event ) {
+ if ( $event == $log_event[ 'code' ] ) {
+ $custom_log_output[] = $log_event;
+ }
+ }
+ } else {
+ $custom_log_output = $entire_log;
+ }
+
+ if ( $num ) {
+ $custom_log_output = array_slice( $custom_log_output, 0, $num );
+ }
+
+ return $custom_log_output;
}
/**
@@ -2357,6 +3214,30 @@ p {
}
}
+ /**
+ * Return stat data for WPCOM sync
+ */
+ function get_stat_data() {
+ $heartbeat_data = Jetpack_Heartbeat::generate_stats_array();
+ $additional_data = $this->get_additional_stat_data();
+
+ return json_encode( array_merge( $heartbeat_data, $additional_data ) );
+ }
+
+ /**
+ * Get additional stat data to sync to WPCOM
+ */
+ function get_additional_stat_data( $prefix = '' ) {
+ $return["{$prefix}themes"] = Jetpack::get_parsed_theme_data();
+ $return["{$prefix}plugins-extra"] = Jetpack::get_parsed_plugin_data();
+ $return["{$prefix}users"] = count_users();
+ $return["{$prefix}site-count"] = 0;
+ if ( function_exists( 'get_blog_count' ) ) {
+ $return["{$prefix}site-count"] = get_blog_count();
+ }
+ return $return;
+ }
+
/* Admin Pages */
function admin_init() {
@@ -2390,6 +3271,9 @@ p {
// Show the notice on the Dashboard only for now
add_action( 'load-index.php', array( $this, 'prepare_manage_jetpack_notice' ) );
+
+ // Identity crisis notices
+ add_action( 'jetpack_notices', array( $this, 'alert_identity_crisis' ) );
}
// If the plugin has just been disconnected from WP.com, show the survey notice
@@ -2397,8 +3281,6 @@ p {
add_action( 'jetpack_notices', array( $this, 'disconnect_survey_notice' ) );
}
- // add_action( 'admin_notices', array( $this, 'alert_identity_crisis' ) );
-
if ( current_user_can( 'manage_options' ) && 'ALWAYS' == JETPACK_CLIENT__HTTPS && ! self::permit_ssl() ) {
add_action( 'admin_notices', array( $this, 'alert_required_ssl_fail' ) );
}
@@ -2414,6 +3296,9 @@ p {
// Kick off synchronization of user role when it changes
add_action( 'set_user_role', array( $this, 'user_role_change' ) );
}
+
+ // Jetpack Manage Activation Screen from .com
+ Jetpack::module_configuration_activation_screen( 'manage', array( $this, 'manage_activate_screen' ) );
}
function admin_body_class( $admin_body_class = '' ) {
@@ -2448,6 +3333,9 @@ p {
add_action( 'admin_notices', array( $this, 'admin_jetpack_manage_notice' ) );
}
+ function manage_activate_screen() {
+ include ( JETPACK__PLUGIN_DIR . 'modules/manage/activate-admin.php' );
+ }
/**
* Sometimes a plugin can activate without causing errors, but it will cause errors on the next page load.
* This function artificially throws errors for such cases (whitelisted).
@@ -2694,16 +3582,16 @@ p {
function admin_head() {
if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )
+ /** This action is documented in class.jetpack-admin-page.php */
do_action( 'jetpack_module_configuration_head_' . $_GET['configure'] );
}
function admin_banner_styles() {
- global $wp_styles;
-
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_style( 'jetpack', plugins_url( "css/jetpack-banners{$min}.css", JETPACK__PLUGIN_FILE ), false, JETPACK__VERSION . '-20121016' );
- $wp_styles->add_data( 'jetpack', 'rtl', true );
+ wp_style_add_data( 'jetpack', 'rtl', 'replace' );
+ wp_style_add_data( 'jetpack', 'suffix', $min );
}
function admin_scripts() {
@@ -2728,6 +3616,7 @@ p {
return array_merge(
$jetpack_home,
array( 'settings' => sprintf( '<a href="%s">%s</a>', Jetpack::admin_url( 'page=jetpack_modules' ), __( 'Settings', 'jetpack' ) ) ),
+ array( 'support' => sprintf( '<a href="%s">%s</a>', Jetpack::admin_url( 'page=jetpack-debugger '), __( 'Support', 'jetpack' ) ) ),
$actions
);
}
@@ -2750,7 +3639,7 @@ p {
<a class="jp-banner__dismiss" href="<?php echo esc_url( $dismiss_and_deactivate_url ); ?>" title="<?php esc_attr_e( 'Dismiss this notice and deactivate Jetpack.', 'jetpack' ); ?>"></a>
<?php if ( in_array( Jetpack_Options::get_option( 'activated' ) , array( 1, 2, 3 ) ) ) : ?>
<div class="jp-banner__content is-connection">
- <h4><?php _e( 'Your Jetpack is almost ready!', 'jetpack' ); ?></h4>
+ <h2><?php _e( 'Your Jetpack is almost ready!', 'jetpack' ); ?></h2>
<p><?php _e( 'Connect now to enable features like Stats, Likes, and Social Sharing.', 'jetpack' ); ?></p>
</div>
<div class="jp-banner__action-container is-connection">
@@ -2758,7 +3647,7 @@ p {
</div>
<?php else : ?>
<div class="jp-banner__content">
- <h4><?php _e( 'Jetpack is installed!', 'jetpack' ) ?></h4>
+ <h2><?php _e( 'Jetpack is installed!', 'jetpack' ) ?></h2>
<p><?php _e( 'It\'s ready to bring awesome, WordPress.com cloud-powered features to your site.', 'jetpack' ) ?></p>
</div>
<div class="jp-banner__action-container">
@@ -2802,7 +3691,7 @@ p {
<div id="message" class="updated jetpack-message jp-banner is-opt-in" style="display:block !important;">
<a class="jp-banner__dismiss" href="<?php echo esc_url( $opt_out_url ); ?>" title="<?php esc_attr_e( 'Dismiss this notice for now.', 'jetpack' ); ?>"></a>
<div class="jp-banner__content">
- <h4><?php esc_html_e( 'New in Jetpack: Centralized Site Management', 'jetpack' ); ?></h4>
+ <h2><?php esc_html_e( 'New in Jetpack: Centralized Site Management', 'jetpack' ); ?></h2>
<p><?php printf( __( 'Manage multiple sites from one dashboard at wordpress.com/sites. Enabling allows all existing, connected Administrators to modify your site from WordPress.com. <a href="%s" target="_blank">Learn More</a>.', 'jetpack' ), 'http://jetpack.me/support/site-management' ); ?></p>
</div>
<div class="jp-banner__action-container is-opt-in">
@@ -2855,6 +3744,13 @@ p {
if( ! Jetpack_Options::get_option( 'public' ) )
return false;
+ /**
+ * Should the Jetpack Remote Site Management notice be displayed.
+ *
+ * @since 3.3.0
+ *
+ * @param bool ! self::is_module_active( 'manage' ) Is the Manage module inactive.
+ */
return apply_filters( 'can_display_jetpack_manage_notice', ! self::is_module_active( 'manage' ) );
}
@@ -2862,7 +3758,7 @@ p {
?>
<div id="message" class="updated jetpack-message">
<div class="squeezer">
- <h4><?php _e( '<strong>Jetpack is activated!</strong> Each site on your network must be connected individually by an admin on that site.', 'jetpack' ) ?></h4>
+ <h2><?php _e( '<strong>Jetpack is activated!</strong> Each site on your network must be connected individually by an admin on that site.', 'jetpack' ) ?></h2>
</div>
</div>
<?php
@@ -2889,7 +3785,7 @@ p {
}
return '<br /><br />' . sprintf(
- __( 'Jetpack now includes Jetpack Comments, which enables your visitors to use their WordPress.com, Twitter, or Facebook accounts when commenting on your site. To activate Jetpack Comments, <a href="%s">%s</a>.', 'jetpack' ),
+ __( 'Jetpack now includes Comments, which enables your visitors to use their WordPress.com, Twitter, or Facebook accounts when commenting on your site. To activate Comments, <a href="%s">%s</a>.', 'jetpack' ),
wp_nonce_url(
Jetpack::admin_url(
array(
@@ -2912,14 +3808,15 @@ p {
<div class="wrap">
<div id="message" class="jetpack-message stay-visible">
<div class="squeezer">
- <h4>
+ <h2>
<?php _e( 'You have successfully disconnected Jetpack.', 'jetpack' ); ?>
<br />
<?php echo sprintf(
- __( 'Would you tell us why? Just <a href="%s">answering two simple questions</a> would help us improve Jetpack.', 'jetpack' ),
- 'https://jetpack.me/survey-disconnected/" target="_blank'
+ __( 'Would you tell us why? Just <a href="%1$s" target="%2$s">answering two simple questions</a> would help us improve Jetpack.', 'jetpack' ),
+ 'https://jetpack.me/survey-disconnected/',
+ '_blank'
); ?>
- </h4>
+ </h2>
</div>
</div>
</div>
@@ -3003,6 +3900,10 @@ p {
$client_server->authorize();
exit;
case 'register' :
+ if ( ! current_user_can( 'jetpack_connect' ) ) {
+ $error = 'cheatin';
+ break;
+ }
check_admin_referer( 'jetpack-register' );
Jetpack::log( 'register' );
Jetpack::maybe_set_version_option();
@@ -3077,13 +3978,25 @@ p {
wp_safe_redirect( Jetpack::admin_url( 'page=jetpack' ) );
exit;
case 'unlink' :
+ $redirect = isset( $_GET['redirect'] ) ? $_GET['redirect'] : '';
check_admin_referer( 'jetpack-unlink' );
Jetpack::log( 'unlink' );
$this->unlink_user();
Jetpack::state( 'message', 'unlinked' );
- wp_safe_redirect( Jetpack::admin_url() );
+ if ( 'sub-unlink' == $redirect ) {
+ wp_safe_redirect( admin_url() );
+ } else {
+ wp_safe_redirect( Jetpack::admin_url( array( 'page' => $redirect ) ) );
+ }
exit;
default:
+ /**
+ * Fires when a Jetpack admin page is loaded with an unrecognized parameter.
+ *
+ * @since 2.6.0
+ *
+ * @param string sanitize_key( $_GET['action'] ) Unrecognized URL parameter.
+ */
do_action( 'jetpack_unrecognized_action', sanitize_key( $_GET['action'] ) );
}
}
@@ -3200,7 +4113,7 @@ p {
case 'verify_secrets_missing' :
case 'verify_secrets_mismatch' :
$error = esc_html( $error );
- $this->error = sprintf( __( '<strong>Your Jetpack has a glitch.</strong> Something went wrong that&#8217;s never supposed to happen. Guess you&#8217;re just lucky: %s', 'jetpack' ), "<code>$error</code>" );
+ $this->error = sprintf( __( '<strong>Your Jetpack has a glitch.</strong> We&#8217;re sorry for the inconvenience. Please try again later, if the issue continues please contact support with this message: %s', 'jetpack' ), "<code>$error</code>" );
if ( ! Jetpack::is_active() ) {
$this->error .= '<br />';
$this->error .= sprintf( __( 'Try connecting again.', 'jetpack' ) );
@@ -3328,6 +4241,17 @@ p {
$user = wp_get_current_user();
$this->message = sprintf( __( '<strong>You have unlinked your account (%s) from WordPress.com.</strong>', 'jetpack' ), $user->user_login );
break;
+
+ case 'switch_master' :
+ global $current_user;
+ $is_master_user = $current_user->ID == Jetpack_Options::get_option( 'master_user' );
+ $master_userdata = get_userdata( Jetpack_Options::get_option( 'master_user' ) );
+ if ( $is_master_user ) {
+ $this->message = __( 'You have successfully set yourself as Jetpack’s primary user.', 'jetpack' );
+ } else {
+ $this->message = sprintf( _x( 'You have successfully set %s as Jetpack’s primary user.', '%s is a username', 'jetpack' ), $master_userdata->user_login );
+ }
+ break;
}
$deactivated_plugins = Jetpack::state( 'deactivated_plugins' );
@@ -3376,6 +4300,12 @@ p {
}
if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) ) {
+ /**
+ * Fires when a module configuration page is loaded.
+ * The dynamic part of the hook is the configure parameter from the URL.
+ *
+ * @since 1.1.0
+ */
do_action( 'jetpack_module_configuration_load_' . $_GET['configure'] );
}
@@ -3388,7 +4318,7 @@ p {
?>
<div id="message" class="jetpack-message jetpack-err">
<div class="squeezer">
- <h4><?php echo wp_kses( $this->error, array( 'code' => true, 'strong' => true, 'br' => true, 'b' => true ) ); ?></h4>
+ <h2><?php echo wp_kses( $this->error, array( 'code' => true, 'strong' => true, 'br' => true, 'b' => true ) ); ?></h2>
<?php if ( $desc = Jetpack::state( 'error_description' ) ) : ?>
<p><?php echo esc_html( stripslashes( $desc ) ); ?></p>
<?php endif; ?>
@@ -3401,7 +4331,7 @@ p {
?>
<div id="message" class="jetpack-message">
<div class="squeezer">
- <h4><?php echo wp_kses( $this->message, array( 'strong' => array(), 'a' => array( 'href' => true ), 'br' => true ) ); ?></h4>
+ <h2><?php echo wp_kses( $this->message, array( 'strong' => array(), 'a' => array( 'href' => true ), 'br' => true ) ); ?></h2>
</div>
</div>
<?php
@@ -3426,7 +4356,7 @@ p {
?>
<div id="message" class="jetpack-message jetpack-err">
<div class="squeezer">
- <h4><strong><?php esc_html_e( 'Is this site private?', 'jetpack' ); ?></strong></h4><br />
+ <h2><strong><?php esc_html_e( 'Is this site private?', 'jetpack' ); ?></strong></h2><br />
<p><?php
echo wp_kses(
wptexturize(
@@ -3516,7 +4446,7 @@ p {
* @return bool If it worked.
*/
static function do_server_side_stat( $args ) {
- $response = wp_remote_get( self::build_stats_url( $args ) );
+ $response = wp_remote_get( esc_url_raw( self::build_stats_url( $args ) ) );
if ( is_wp_error( $response ) )
return false;
@@ -3539,6 +4469,13 @@ p {
'rand' => md5( mt_rand( 0, 999 ) . time() ),
);
$args = wp_parse_args( $args, $defaults );
+ /**
+ * Filter the URL used as the Stats tracking pixel.
+ *
+ * @since 2.3.2
+ *
+ * @param string $url Base URL used as the Stats tracking pixel.
+ */
$base_url = apply_filters(
'jetpack_stats_base_url',
set_url_scheme( 'http://pixel.wp.com/g.gif' )
@@ -3579,7 +4516,7 @@ p {
}
function build_connect_url( $raw = false, $redirect = false ) {
- if ( ! Jetpack_Options::get_option( 'blog_token' ) ) {
+ if ( ! Jetpack_Options::get_option( 'blog_token' ) || ! Jetpack_Options::get_option( 'id' ) ) {
$url = Jetpack::nonce_url_no_esc( Jetpack::admin_url( 'action=register' ), 'jetpack-register' );
if( is_network_admin() ) {
$url = add_query_arg( 'is_multisite', network_admin_url(
@@ -3670,6 +4607,21 @@ p {
}
}
break;
+ case 'jetpack-protect-multisite-opt-out':
+
+ if ( check_admin_referer( 'jetpack_protect_multisite_banner_opt_out' ) ) {
+ // Don't show the banner again
+
+ update_site_option( 'jetpack_dismissed_protect_multisite_banner', true );
+ // redirect back to the page that had the notice
+ if ( wp_get_referer() ) {
+ wp_safe_redirect( wp_get_referer() );
+ } else {
+ // Take me to Jetpack
+ wp_safe_redirect( admin_url( 'admin.php?page=jetpack' ) );
+ }
+ }
+ break;
case 'jetpack-manage-opt-in':
if ( check_admin_referer( 'jetpack_manage_banner_opt_in' ) ) {
// This makes sure that we are redirect to jetpack home so that we can see the Success Message.
@@ -3700,185 +4652,6 @@ p {
}
}
- /**
- * This is the old pre-3.0 admin page. It is replaced by the Jetpack_Admin class.
- * Tentatively left here for comparison purposes.
- */
- function admin_page() {
- global $current_user;
-
- $is_connected = Jetpack::is_active();
- $user_token = Jetpack_Data::get_access_token( $current_user->ID );
- $is_user_connected = $user_token && ! is_wp_error( $user_token );
- $is_master_user = $current_user->ID == Jetpack_Options::get_option( 'master_user' );
-
- $can_reconnect_jpms = true;
- if( is_plugin_active_for_network( 'jetpack/jetpack.php' ) ) {
- $jpms = Jetpack_Network::init();
- $can_reconnect_jpms = ( $jpms->get_option( 'sub-site-connection-override' ) ) ? 1: 0;
- }
-
-
-
- ?>
- <div class="wrap" id="jetpack-settings">
-
- <div id="jp-header"<?php if ( $is_connected ) : ?> class="small"<?php endif; ?>>
- <div id="jp-clouds">
- <?php if ( $is_connected && $can_reconnect_jpms ) : ?>
- <div id="jp-disconnectors">
- <?php if ( current_user_can( 'jetpack_disconnect' ) ) : ?>
- <div id="jp-disconnect" class="jp-disconnect">
- <a href="<?php echo wp_nonce_url( Jetpack::admin_url( 'action=disconnect' ), 'jetpack-disconnect' ); ?>" onclick="return confirm('<?php echo htmlspecialchars( __('Are you sure you want to disconnect from WordPress.com?', 'jetpack'), ENT_QUOTES ); ?>');"><div class="deftext"><?php _e( 'Connected to WordPress.com', 'jetpack' ); ?></div><div class="hovertext"><?php _e( 'Disconnect from WordPress.com', 'jetpack' ) ?></div></a>
- </div>
- <?php endif; ?>
- <?php if ( $is_user_connected && ! $is_master_user ) : ?>
- <div id="jp-unlink" class="jp-disconnect">
- <a href="<?php echo wp_nonce_url( Jetpack::admin_url( 'action=unlink' ), 'jetpack-unlink' ); ?>"><div class="deftext"><?php _e( 'User linked to WordPress.com', 'jetpack' ); ?></div><div class="hovertext"><?php _e( 'Unlink user from WordPress.com', 'jetpack' ) ?></div></a>
- </div>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <h3><?php _e( 'Jetpack by WordPress.com', 'jetpack' ) ?></h3>
- <?php if ( ! $is_connected ) : ?>
- <div id="jp-notice">
- <p><?php _e( 'Jetpack supercharges your self-hosted WordPress site with the awesome cloud power of WordPress.com.', 'jetpack' ); ?></p>
- </div>
- <?php endif; ?>
- </div>
- </div>
-
- <h2 style="display: none"></h2> <!-- For WP JS message relocation -->
-
- <?php Jetpack::init()->load_view( 'admin/network-activated-notice.php' ); ?>
-
- <?php do_action( 'jetpack_notices' ) ?>
-
- <?php
- // If the connection has not been made then show the marketing text.
- if( !$can_reconnect_jpms && !$is_connected ) {
- ?>
- <div id="message" class="updated jetpack-message jp-banner jp-multisite" style="display:block !important">
- <div class="jp-banner__content">
- <h4><?php _e( 'To use Jetpack please contact your WordPress administrator to connect it for you.', 'jetpack' ) ?></h4>
- </div>
- </div> <?php
- }
- if ( ! Jetpack::is_development_mode() && $can_reconnect_jpms ) :
- ?>
- <?php if ( ! $is_connected ) :
- $dismiss_and_deactivate_url = wp_nonce_url( Jetpack::admin_url( '?page=jetpack&jetpack-notice=dismiss' ), 'jetpack-deactivate' );
- ?>
- <div id="message" class="updated jetpack-message jp-banner" style="display:block !important;">
- <a class="jp-banner__dismiss" href="<?php echo esc_url( $dismiss_and_deactivate_url ); ?>"></a>
- <div class="jp-banner__content">
- <h4><?php _e( 'To enable all of the Jetpack features, you&#8217;ll need to connect your website to WordPress.com.', 'jetpack' ) ?></h4>
- <p><?php _e( 'Once you&#8217;ve made the connection you&#8217;ll activate all the delightful features below.', 'jetpack' ) ?></p>
- </div>
- <div class="jp-banner__action-container">
- <a href="<?php echo $this->build_connect_url() ?>" class="jp-banner__button" id="wpcom-connect"><?php _e( 'Connect', 'jetpack' ); ?></a>
- </div>
- </div>
-
- <?php else /* blog and user are connected */ : ?>
- <?php /* TODO: if not master user, show user disconnect button? */ ?>
- <?php endif; ?>
- <?php endif; // ! Jetpack::is_development_mode() ?>
-
-
-
-
-
- <?php if ( Jetpack::is_active() && !Jetpack::is_development_mode() && ! $is_user_connected ) : ?>
-
- <div id="message" class="updated jetpack-message jp-banner" style="display:block !important;">
- <div class="jp-banner__content">
- <h4><?php _e( 'To enable all of the Jetpack features you&#8217;ll need to link your account here to your WordPress.com account.', 'jetpack' ) ?></h4>
- </div>
- <div class="jp-banner__action-container is-full-width">
- <a href="<?php echo $this->build_connect_url() ?>" class="jp-banner__button" id="wpcom-connect"><?php _e( 'Link account with WordPress.com', 'jetpack' ); ?></a>
- </div>
- </div>
-
- <?php endif; ?>
-
-
-
-
- <?php
- if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) ) {
- $this->admin_screen_configure_module( $_GET['configure'] );
- } else {
- $this->admin_screen_list_modules();
- }
- ?>
-
- <div id="survey" class="jp-survey">
- <div class="jp-survey-container">
- <div class="jp-survey-text">
- <h4><?php _e( 'Have feedback on Jetpack?', 'jetpack' ); ?></h4>
- <br />
- <?php _e( 'Answer a short survey to let us know how we&#8217;re doing and what to add in the future.', 'jetpack' ); ?>
- </div>
- <div class="jp-survey-button-container">
- <p class="submit"><?php printf( '<a id="jp-survey-button" class="button-primary" target="_blank" href="%1$s">%2$s</a>', 'http://jetpack.me/survey/?rel=' . JETPACK__VERSION, __( 'Take Survey', 'jetpack' ) ); ?></p>
- </div>
- </div>
- </div>
-
- <?php if ( $is_connected && $this->current_user_is_connection_owner() ) : ?>
- <p id="news-sub"><?php _e( 'Checking email updates status&hellip;', 'jetpack' ); ?></p>
- <script type="text/javascript">
- jQuery(document).ready(function($){
- $.get( ajaxurl, { action: 'jetpack-check-news-subscription', rand: jQuery.now().toString() + Math.random().toString() }, function( data ) {
- if ( 'subscribed' == data ) {
- $( '#news-sub' ).html( '<?php printf(
- esc_js( _x( 'You are currently subscribed to email updates. %s', '%s = Unsubscribe link', 'jetpack' ) ),
- '<a href="#" class="jp-news-link button">' . esc_js( __( 'Unsubscribe', 'jetpack' ) ) . '</a>'
- ); ?>' );
- } else {
- $( '#news-sub' ).html( '<?php printf(
- esc_js( _x( 'Want to receive updates about Jetpack by email? %s', '%s = Subscribe link', 'jetpack' ) ),
- '<a href="#" class="jp-news-link button-primary">' . esc_js( __( 'Subscribe', 'jetpack' ) ) . '</a>'
- ); ?>' );
- }
- $( '.jp-news-link' ).click( function() {
- $( '#news-sub' ).append( ' <img src="<?php echo esc_js( esc_url( admin_url( 'images/loading.gif' ) ) ); ?>" align="absmiddle" id="jp-news-loading" />' );
- $.get( ajaxurl, { action: 'jetpack-subscribe-to-news', rand: jQuery.now().toString() + Math.random().toString() }, function( data ) {
- if ( 'subscribed' == data ) {
- $( '#news-sub' ).text( '<?php echo esc_js( __( 'You have been subscribed to receive email updates.', 'jetpack' ) ); ?>' );
- } else {
- $( '#news-sub' ).text( '<?php echo esc_js( __( 'You will no longer receive email updates about Jetpack.', 'jetpack' ) ); ?>' );
- }
- $( '#jp-news-loading' ).remove();
- } );
- return false;
- } );
- } );
- } );
- </script>
- <?php endif; ?>
-
- <div id="jp-footer">
- <p class="automattic"><?php _e( 'An <span>Automattic</span> Airline', 'jetpack' ) ?></p>
- <p class="small">
- <a href="http://jetpack.me/" target="_blank">Jetpack <?php echo esc_html( JETPACK__VERSION ); ?></a> |
- <a href="http://automattic.com/privacy/" target="_blank"><?php _e( 'Privacy Policy', 'jetpack' ); ?></a> |
- <a href="http://wordpress.com/tos/" target="_blank"><?php _e( 'Terms of Service', 'jetpack' ); ?></a> |
-<?php if ( current_user_can( 'manage_options' ) ) : ?>
- <a href="<?php echo Jetpack::admin_url( array( 'page' => 'jetpack-debugger' ) ); ?>"><?php _e( 'Debug', 'jetpack' ); ?></a> |
-<?php endif; ?>
- <a href="http://jetpack.me/support/" target="_blank"><?php _e( 'Support', 'jetpack' ); ?></a>
- </p>
- </div>
-
- <div id="jetpack-configuration" style="display:none;">
- <p><img width="16" src="<?php echo esc_url( plugins_url( 'images/wpspin_light-2x.gif', JETPACK__PLUGIN_FILE) ); ?>" alt="Loading ..." /></p>
- </div>
- </div>
- <?php
- }
-
function debugger_page() {
nocache_headers();
if ( ! current_user_can( 'manage_options' ) ) {
@@ -3892,7 +4665,24 @@ p {
// User that doesn't have 'jetpack_configure_modules' will never end up here since Jetpack Landing Page woun't let them.
if ( ! in_array( $module_id, Jetpack::get_active_modules() ) && current_user_can( 'manage_options' ) ) {
- self::display_activate_module_link( $module_id );
+ if ( has_action( 'display_activate_module_setting_' . $module_id ) ) {
+ /**
+ * Fires to diplay a custom module activation screen.
+ *
+ * To add a module actionation screen use Jetpack::module_configuration_activation_screen method.
+ * Example: Jetpack::module_configuration_activation_screen( 'manage', array( $this, 'manage_activate_screen' ) );
+ *
+ * @module manage
+ *
+ * @since 3.8.0
+ *
+ * @param int $module_id Module ID.
+ */
+ do_action( 'display_activate_module_setting_' . $module_id );
+ } else {
+ self::display_activate_module_link( $module_id );
+ }
+
return false;
} ?>
@@ -3904,8 +4694,23 @@ p {
printf( __( 'Configure %s', 'jetpack' ), $module['name'] );
?>
</h3>
- <?php do_action( 'jetpack_notices_update_settings', $module_id ); ?>
- <?php do_action( 'jetpack_module_configuration_screen_' . $module_id ); ?>
+ <?php
+ /**
+ * Fires within the displayed message when a feature configuation is updated.
+ *
+ * @since 3.4.0
+ *
+ * @param int $module_id Module ID.
+ */
+ do_action( 'jetpack_notices_update_settings', $module_id );
+ /**
+ * Fires when a feature configuation screen is loaded.
+ * The dynamic part of the hook, $module_id, is the module ID.
+ *
+ * @since 1.1.0
+ */
+ do_action( 'jetpack_module_configuration_screen_' . $module_id );
+ ?>
</div><?php
}
@@ -3974,208 +4779,6 @@ p {
return ( $a['sort'] < $b['sort'] ) ? -1 : 1;
}
- function admin_screen_list_modules() {
- require_once JETPACK__PLUGIN_DIR . 'modules/module-info.php';
- $jetpack_connected = true;
- if ( ! Jetpack::is_active() )
- $jetpack_connected = false;
-
- ?>
- <div class="module-container">
- <?php
-
- $avail_raw = Jetpack::get_available_modules();
- $available = array();
- $active = Jetpack::get_active_modules();
- $counter = 0;
-
- foreach ( (array) $avail_raw as $module ) {
- if ( $plugin = Jetpack::get_module( $module ) ) {
- $plugin['module'] = $module;
- $available[] = $plugin;
- }
- }
- unset( $avail_raw );
- usort( $available, array( 'Jetpack', 'sort_modules' ) );
- $jetpack_version = Jetpack_Options::get_option( 'version' );
- if ( $jetpack_version ) {
- list( $jetpack_version, $jetpack_version_time ) = explode( ':', $jetpack_version );
- } else {
- $jetpack_version = 0;
- $jetpack_version_time = 0;
- }
-
- $jetpack_old_version = Jetpack_Options::get_option( 'old_version' );
- if ( $jetpack_old_version ) {
- list( $jetpack_old_version ) = explode( ':', $jetpack_old_version );
- } else {
- $jetpack_old_version = 0;
- }
- $now = time();
-
- foreach ( (array) $available as $module_data ) {
- $module = $module_data['module'];
- $activated = in_array( $module, $active );
- if ( $activated ) {
- $css = 'active';
- $toggle = __( 'Deactivate', 'jetpack' );
- $toggle_url = wp_nonce_url(
- Jetpack::admin_url(
- array(
- 'page' => 'jetpack',
- 'action' => 'deactivate',
- 'module' => $module,
- )
- ),
- "jetpack_deactivate-$module"
- );
- } else {
- $css = 'inactive';
- $toggle = __( 'Activate', 'jetpack' );
- $toggle_url = wp_nonce_url(
- Jetpack::admin_url(
- array(
- 'page' => 'jetpack',
- 'action' => 'activate',
- 'module' => $module,
- )
- ),
- "jetpack_activate-$module"
- );
- }
-
- if ( $counter % 4 == 0 ) {
- $classes = $css . ' jetpack-newline';
- $counter = 0;
- } else {
- $classes = $css;
- }
-
- $free_text = esc_html( $module_data['free'] ? __( 'Free', 'jetpack' ) : __( 'Purchase', 'jetpack' ) );
- $free_text = apply_filters( 'jetpack_module_free_text_' . $module, $free_text );
- $badge_text = $free_text;
-
- if ( ( ! $jetpack_connected && ! Jetpack::is_development_mode() ) ) {
- $classes = 'x disabled';
- } elseif ( $jetpack_version_time + 604800 > $now ) { // 1 week
- if ( version_compare( $module_data['introduced'], $jetpack_old_version, '>' ) ) {
- $badge_text = esc_html__( 'New', 'jetpack' );
- $classes .= ' jetpack-new-module';
- } elseif ( isset( $module_data['changed'] ) && version_compare( $module_data['changed'], $jetpack_old_version, '>' ) ) {
- $badge_text = esc_html__( 'Updated', 'jetpack' );
- $classes .= ' jetpack-updated-module';
- } else {
- $badge_text = $free_text;
- }
- }
-
- ?>
- <div class="jetpack-module jetpack-<?php echo $classes; ?>" id="<?php echo $module ?>">
- <h3><?php echo esc_html( $module_data['name'] ); ?></h3>
- <div class="jetpack-module-description">
- <div class="module-image">
- <p><span class="module-image-badge"><?php echo $badge_text; ?></span><span class="module-image-free" style="display: none"><?php echo $free_text; ?></span></p>
- </div>
-
- <p><?php echo apply_filters( 'jetpack_short_module_description', $module_data['description'], $module ); ?></p>
- </div>
-
- <div class="jetpack-module-actions">
- <?php if ( $jetpack_connected || ( Jetpack::is_development_mode() && ! $module_data['requires_connection'] ) ) : ?>
- <?php if ( ! $activated && current_user_can( 'manage_options' ) && apply_filters( 'jetpack_can_activate_' . $module, true ) ) : ?>
- <a href="<?php echo esc_url( $toggle_url ); ?>" class="<?php echo ( 'inactive' == $css ? ' button-primary' : ' button-secondary' ); ?>"><?php echo $toggle; ?></a>&nbsp;
- <?php endif; ?>
-
- <?php do_action( 'jetpack_learn_more_button_' . $module ) ?>
-
- <?php
- if ( current_user_can( 'manage_options' ) && apply_filters( 'jetpack_module_configurable_' . $module, false ) ) {
- echo '<a href="' . esc_url( Jetpack::module_configuration_url( $module ) ) . '" class="jetpack-configure-button button-secondary">' . __( 'Configure', 'jetpack' ) . '</a>';
- }
- ?><?php if ( $activated && $module_data['deactivate'] && current_user_can( 'manage_options' ) ) : ?><a style="display: none;" href="<?php echo esc_url( $toggle_url ); ?>" class="jetpack-deactivate-button button-secondary"><?php echo $toggle; ?></a>&nbsp;<?php endif; ?>
-
- <?php else : ?>
- <?php do_action( 'jetpack_learn_more_button_' . $module ) ?>
- <?php endif; ?>
- </div>
- </div>
- <?php if ( 'inactive' == $css && $jetpack_connected && current_user_can( 'manage_options' ) && apply_filters( 'jetpack_can_activate_' . $module, true ) ) : ?>
- <script type="text/javascript">
- jQuery( '#<?php echo esc_js( $module ); ?>' ).bind( 'click', function(e){
- if ( ! jQuery(e.target).hasClass('more-info-link') )
- document.location.href = '<?php echo str_replace( '&amp;', '&', esc_js( esc_url( $toggle_url ) ) ); ?>';
- } );
- </script>
- <?php else : ?>
- <style>
- #<?php echo $module; ?> { cursor: default; }
- </style>
- <?php endif; ?>
-
- <div id="jp-more-info-<?php echo esc_attr( $module ); ?>" style="display:none;">
- <?php
- if ( $jetpack_connected && has_action( 'jetpack_module_more_info_connected_' . $module ) )
- do_action( 'jetpack_module_more_info_connected_' . $module );
- else
- do_action( 'jetpack_module_more_info_' . $module );
- ?>
- </div>
-
- <?php
- $counter++;
- }
-
- // Add in some "Coming soon..." placeholders to fill up the current row and one more
- for ( $i = 0; $i < 4; $i++ ) { ?>
- <div class="jetpack-module placeholder"<?php if ( $i > 8 - $counter ) echo ' style="display: none;"'; ?>>
- <h3><?php _e( 'Coming soon&#8230;', 'jetpack' ) ?></h3>
- </div>
- <?php
- }
-
- echo '</div><!-- .module-container -->';
- }
-
- function check_news_subscription() {
- if ( ! $this->current_user_is_connection_owner() ) {
- exit;
- }
-
- Jetpack::load_xml_rpc_client();
- $xml = new Jetpack_IXR_Client(
- array(
- 'user_id' => JETPACK_MASTER_USER,
- )
- );
- $xml->query( 'jetpack.checkNewsSubscription' );
- if ( $xml->isError() ) {
- printf( '%s: %s', $xml->getErrorCode(), $xml->getErrorMessage() );
- } else {
- print_r( $xml->getResponse() );
- }
- exit;
- }
-
- function subscribe_to_news() {
- if ( ! $this->current_user_is_connection_owner() ) {
- exit;
- }
-
- Jetpack::load_xml_rpc_client();
- $xml = new Jetpack_IXR_Client(
- array(
- 'user_id' => JETPACK_MASTER_USER,
- )
- );
- $xml->query( 'jetpack.subscribeToNews' );
- if ( $xml->isError() ) {
- printf( '%s: %s', $xml->getErrorCode(), $xml->getErrorMessage() );
- } else {
- print_r( $xml->getResponse() );
- }
- exit;
- }
-
function sync_reindex_trigger() {
if ( $this->current_user_is_connection_owner() && current_user_can( 'manage_options' ) ) {
echo json_encode( $this->sync->reindex_trigger() );
@@ -4277,7 +4880,7 @@ p {
<div id="message" class="error jetpack-message jp-identity-crisis">
<div class="jp-banner__content">
- <h4><?php _e( 'Something is being cranky!', 'jetpack' ); ?></h4>
+ <h2><?php _e( 'Something is being cranky!', 'jetpack' ); ?></h2>
<p><?php _e( 'Your site is configured to only permit SSL connections to Jetpack, but SSL connections don\'t seem to be functional!', 'jetpack' ); ?></p>
</div>
</div>
@@ -4423,7 +5026,6 @@ p {
return $valid_response;
}
-
// Grab the response values to work with
$code = wp_remote_retrieve_response_code( $response );
$entity = wp_remote_retrieve_body( $response );
@@ -4450,9 +5052,25 @@ p {
)
);
+ /**
+ * Fires when a site is registered on WordPress.com.
+ *
+ * @since 3.7.0
+ *
+ * @param int $json->jetpack_id Jetpack Blog ID.
+ * @param string $json->jetpack_secret Jetpack Blog Token.
+ * @param int|bool $jetpack_public Is the site public.
+ */
+ do_action( 'jetpack_site_registered', $json->jetpack_id, $json->jetpack_secret, $jetpack_public );
+
// Initialize Jump Start for the first and only time.
if ( ! Jetpack_Options::get_option( 'jumpstart' ) ) {
Jetpack_Options::update_option( 'jumpstart', 'new_connection' );
+
+ $jetpack = Jetpack::init();
+
+ $jetpack->stat( 'jumpstart', 'unique-views' );
+ $jetpack->do_stats( 'server_side' );
};
return true;
@@ -4705,6 +5323,10 @@ p {
}
function xmlrpc_options( $options ) {
+ $jetpack_client_id = false;
+ if ( self::is_active() ) {
+ $jetpack_client_id = Jetpack_Options::get_option( 'id' );
+ }
$options['jetpack_version'] = array(
'desc' => __( 'Jetpack Plugin Version', 'jetpack' ),
'readonly' => true,
@@ -4714,7 +5336,7 @@ p {
$options['jetpack_client_id'] = array(
'desc' => __( 'The Client ID/WP.com Blog ID of this site', 'jetpack' ),
'readonly' => true,
- 'value' => Jetpack_Options::get_option( 'id' ),
+ 'value' => $jetpack_client_id,
);
return $options;
}
@@ -4944,7 +5566,7 @@ p {
// Make sure the login form is POSTed to the signed URL so we can reverify the request
function post_login_form_to_signed_url( $url, $path, $scheme ) {
- if ( 'wp-login.php' !== $path || 'login_post' !== $scheme ) {
+ if ( 'wp-login.php' !== $path || ( 'login_post' !== $scheme && 'login' !== $scheme ) ) {
return $url;
}
@@ -5084,6 +5706,13 @@ p {
*/
public static function get_content_width() {
$content_width = isset( $GLOBALS['content_width'] ) ? $GLOBALS['content_width'] : false;
+ /**
+ * Filter the Content Width value.
+ *
+ * @since 2.2.3
+ *
+ * @param string $content_width Content Width value.
+ */
return apply_filters( 'jetpack_content_width', $content_width );
}
@@ -5140,7 +5769,10 @@ p {
$xml = new Jetpack_IXR_Client( array( 'user_id' => JETPACK_MASTER_USER, ) );
$xml->query( 'jetpack.fetchSiteOptions', $option_names );
if ( $xml->isError() ) {
- return array_flip( $option_names );
+ return array(
+ 'error_code' => $xml->getErrorCode(),
+ 'error_msg' => $xml->getErrorMessage(),
+ );
}
$cloud_site_options = $xml->getResponse();
@@ -5157,6 +5789,13 @@ p {
'siteurl',
'home',
);
+ /**
+ * Filter the options that we should compare to determine an identity crisis.
+ *
+ * @since 2.5.0
+ *
+ * @param array $options Array of options to compare to determine an identity crisis.
+ */
return apply_filters( 'jetpack_identity_crisis_options_to_check', $options );
}
@@ -5168,16 +5807,33 @@ p {
* @return array An array of options that do not match. If everything is good, it will evaluate to false.
*/
public static function check_identity_crisis( $force_recheck = false ) {
- if ( ! Jetpack::is_active() || Jetpack::is_development_mode() )
+ if ( ! Jetpack::is_active() || Jetpack::is_development_mode() || Jetpack::is_staging_site() )
return false;
if ( $force_recheck || false === ( $errors = get_transient( 'jetpack_has_identity_crisis' ) ) ) {
$options_to_check = self::identity_crisis_options_to_check();
$cloud_options = Jetpack::init()->get_cloud_site_options( $options_to_check );
$errors = array();
+
foreach ( $cloud_options as $cloud_key => $cloud_value ) {
+
// If it's not the same as the local value...
if ( $cloud_value !== get_option( $cloud_key ) ) {
+
+ // Break out if we're getting errors. We are going to check the error keys later when we alert.
+ if ( 'error_code' == $cloud_key ) {
+ $errors[ $cloud_key ] = $cloud_value;
+ break;
+ }
+
+ $parsed_cloud_value = parse_url( $cloud_value );
+ // If the current options is an IP address
+ if ( filter_var( $parsed_cloud_value['host'], FILTER_VALIDATE_IP ) ) {
+ // Give the new value a Jetpack to fly in to the clouds
+ Jetpack::resolve_identity_crisis( $cloud_key );
+ continue;
+ }
+
// And it's not been added to the whitelist...
if ( ! self::is_identity_crisis_value_whitelisted( $cloud_key, $cloud_value ) ) {
/*
@@ -5191,7 +5847,7 @@ p {
*
* @see https://github.com/Automattic/jetpack/issues/1006
*/
- if( ( 'home' == $cloud_key || 'siteurl' == $cloud_key )
+ if ( ( 'home' == $cloud_key || 'siteurl' == $cloud_key )
&& ( substr( $cloud_value, 0, 8 ) == "https://" )
&& Jetpack::init()->is_ssl_required_to_visit_site() ) {
// Ok, we found a mismatch of http and https because of wp-config, not an invalid url
@@ -5205,9 +5861,113 @@ p {
}
}
}
+
+ /**
+ * Filters the errors returned when checking for an Identity Crisis.
+ *
+ * @since 2.3.2
+ *
+ * @param array $errors Array of Identity Crisis errors.
+ * @param bool $force_recheck Ignore any cached transient and manually re-check. Default to false.
+ */
return apply_filters( 'jetpack_has_identity_crisis', $errors, $force_recheck );
}
+ /*
+ * Resolve ID crisis
+ *
+ * If the URL has changed, but the rest of the options are the same (i.e. blog/user tokens)
+ * The user has the option to update the shadow site with the new URL before a new
+ * token is created.
+ *
+ * @param $key : Which option to sync. null defautlts to home and siteurl
+ */
+ public static function resolve_identity_crisis( $key = null ) {
+ if ( $key ) {
+ $identity_options = array( $key );
+ } else {
+ $identity_options = self::identity_crisis_options_to_check();
+ }
+
+ if ( is_array( $identity_options ) ) {
+ foreach( $identity_options as $identity_option ) {
+ Jetpack_Sync::sync_options( __FILE__, $identity_option );
+
+ /**
+ * Fires when a shadow site option is updated.
+ * These options are updated via the Identity Crisis UI.
+ * $identity_option is the option that gets updated.
+ *
+ * @since 3.7.0
+ */
+ do_action( "update_option_{$identity_option}" );
+ }
+ }
+ }
+
+ /*
+ * Whitelist URL
+ *
+ * Ignore the URL differences between the blog and the shadow site.
+ */
+ public static function whitelist_current_url() {
+ $options_to_check = Jetpack::identity_crisis_options_to_check();
+ $cloud_options = Jetpack::init()->get_cloud_site_options( $options_to_check );
+
+ foreach ( $cloud_options as $cloud_key => $cloud_value ) {
+ Jetpack::whitelist_identity_crisis_value( $cloud_key, $cloud_value );
+ }
+ }
+
+ /*
+ * Ajax callbacks for ID crisis resolutions
+ *
+ * Things that could happen here:
+ * - site_migrated : Update the URL on the shadow blog to match new domain
+ * - whitelist : Ignore the URL difference
+ * - default : Error message
+ */
+ public static function resolve_identity_crisis_ajax_callback() {
+ check_ajax_referer( 'resolve-identity-crisis', 'ajax-nonce' );
+
+ switch ( $_POST[ 'crisis_resolution_action' ] ) {
+ case 'site_migrated':
+ Jetpack::resolve_identity_crisis();
+ echo 'resolved';
+ break;
+
+ case 'whitelist':
+ Jetpack::whitelist_current_url();
+ echo 'whitelisted';
+ break;
+
+ case 'reset_connection':
+ // Delete the options first so it doesn't get confused which site to disconnect dotcom-side
+ Jetpack_Options::delete_option(
+ array(
+ 'register',
+ 'blog_token',
+ 'user_token',
+ 'user_tokens',
+ 'master_user',
+ 'time_diff',
+ 'fallback_no_verify_ssl_certs',
+ 'id',
+ )
+ );
+ delete_transient( 'jetpack_has_identity_crisis' );
+
+ echo 'reset-connection-success';
+ break;
+
+ default:
+ echo 'missing action';
+ break;
+ }
+
+ wp_die();
+ }
+
/**
* Adds a value to the whitelist for the specified key.
*
@@ -5217,7 +5977,7 @@ p {
* @return bool Whether the value was added to the whitelist, or false if it was already there.
*/
public static function whitelist_identity_crisis_value( $key, $value ) {
- if ( self::is_identity_crisis_url_whitelisted( $key, $value ) ) {
+ if ( Jetpack::is_identity_crisis_value_whitelisted( $key, $value ) ) {
return false;
}
@@ -5248,25 +6008,269 @@ p {
}
/**
+ * Checks whether the home and siteurl specifically are whitelisted
+ * Written so that we don't have re-check $key and $value params every time
+ * we want to check if this site is whitelisted, for example in footer.php
+ *
+ * @return bool True = already whitelsisted False = not whitelisted
+ */
+ public static function is_staging_site() {
+ $is_staging = false;
+
+ $current_whitelist = Jetpack_Options::get_option( 'identity_crisis_whitelist' );
+ if ( $current_whitelist ) {
+ $options_to_check = Jetpack::identity_crisis_options_to_check();
+ $cloud_options = Jetpack::init()->get_cloud_site_options( $options_to_check );
+
+ foreach ( $cloud_options as $cloud_key => $cloud_value ) {
+ if ( self::is_identity_crisis_value_whitelisted( $cloud_key, $cloud_value ) ) {
+ $is_staging = true;
+ break;
+ }
+ }
+ }
+ $known_staging = array(
+ 'urls' => array(
+ '#\.staging\.wpengine\.com$#i',
+ ),
+ 'constants' => array(
+ 'IS_WPE_SNAPSHOT',
+ )
+ );
+ /**
+ * Filters the flags of known staging sites.
+ *
+ * @since 3.9.0
+ *
+ * @param array $known_staging {
+ * An array of arrays that each are used to check if the current site is staging.
+ * @type array $urls URLs of staging sites in regex to check against site_url.
+ * @type array $cosntants PHP constants of known staging/developement environments.
+ * }
+ */
+ $known_staging = apply_filters( 'jetpack_known_staging', $known_staging );
+
+ if ( isset( $known_staging['urls'] ) ) {
+ foreach ( $known_staging['urls'] as $url ){
+ if ( preg_match( $url, site_url() ) ) {
+ $is_staging = true;
+ break;
+ }
+ }
+ }
+
+ if ( isset( $known_staging['constants'] ) ) {
+ foreach ( $known_staging['constants'] as $constant ) {
+ if ( defined( $constant ) && constant( $constant ) ) {
+ $is_staging = true;
+ }
+ }
+ }
+
+ /**
+ * Filters is_staging_site check.
+ *
+ * @since 3.9.0
+ *
+ * @param bool $is_staging If the current site is a staging site.
+ */
+ return apply_filters( 'jetpack_is_staging_site', $is_staging );
+ }
+
+ public function identity_crisis_js( $nonce ) {
+?>
+<script>
+(function( $ ) {
+ var SECOND_IN_MS = 1000;
+
+ function contactSupport( e ) {
+ e.preventDefault();
+ $( '.jp-id-crisis-question' ).hide();
+ $( '#jp-id-crisis-contact-support' ).show();
+ }
+
+ function autodismissSuccessBanner() {
+ $( '.jp-identity-crisis' ).fadeOut(600); //.addClass( 'dismiss' );
+ }
+
+ var data = { action: 'jetpack_resolve_identity_crisis', 'ajax-nonce': '<?php echo $nonce; ?>' };
+
+ $( document ).ready(function() {
+
+ // Site moved: Update the URL on the shadow blog
+ $( '.site-moved' ).click(function( e ) {
+ e.preventDefault();
+ data.crisis_resolution_action = 'site_migrated';
+ $( '#jp-id-crisis-question-1 .spinner' ).show();
+ $.post( ajaxurl, data, function() {
+ $( '.jp-id-crisis-question' ).hide();
+ $( '.banner-title' ).hide();
+ $( '#jp-id-crisis-success' ).show();
+ setTimeout( autodismissSuccessBanner, 6 * SECOND_IN_MS );
+ });
+
+ });
+
+ // URL hasn't changed, next question please.
+ $( '.site-not-moved' ).click(function( e ) {
+ e.preventDefault();
+ $( '.jp-id-crisis-question' ).hide();
+ $( '#jp-id-crisis-question-2' ).show();
+ });
+
+ // Reset connection: two separate sites.
+ $( '.reset-connection' ).click(function( e ) {
+ data.crisis_resolution_action = 'reset_connection';
+ $.post( ajaxurl, data, function( response ) {
+ if ( 'reset-connection-success' === response ) {
+ window.location.replace( '<?php echo Jetpack::admin_url(); ?>' );
+ }
+ });
+ });
+
+ // It's a dev environment. Ignore.
+ $( '.is-dev-env' ).click(function( e ) {
+ data.crisis_resolution_action = 'whitelist';
+ $( '#jp-id-crisis-question-2 .spinner' ).show();
+ $.post( ajaxurl, data, function() {
+ $( '.jp-id-crisis-question' ).hide();
+ $( '.banner-title' ).hide();
+ $( '#jp-id-crisis-success' ).show();
+ setTimeout( autodismissSuccessBanner, 4 * SECOND_IN_MS );
+ });
+ });
+
+ $( '.not-reconnecting' ).click(contactSupport);
+ $( '.not-staging-or-dev' ).click(contactSupport);
+ });
+})( jQuery );
+</script>
+<?php
+ }
+
+ /**
* Displays an admin_notice, alerting the user to an identity crisis.
*/
public function alert_identity_crisis() {
- if ( ! current_user_can( 'manage_options' ) )
+ // @todo temporary killing of feature in 3.8.1 as it revealed a number of scenarios not foreseen.
+ if ( ! Jetpack::is_development_version() ) {
return;
+ }
- if ( ! $errors = self::check_identity_crisis() )
+ // @todo temporary copout for dealing with domain mapping
+ // @see https://github.com/Automattic/jetpack/issues/2702
+ if ( is_multisite() && defined( 'SUNRISE' ) && ! Jetpack::is_development_version() ) {
return;
+ }
+
+ if ( ! current_user_can( 'jetpack_disconnect' ) ) {
+ return;
+ }
+
+ if ( ! $errors = self::check_identity_crisis() ) {
+ return;
+ }
+
+ // Only show on dashboard and jetpack pages
+ $screen = get_current_screen();
+ if ( 'dashboard' !== $screen->base && ! did_action( 'jetpack_notices' ) ) {
+ return;
+ }
+
+ // Include the js!
+ $ajax_nonce = wp_create_nonce( 'resolve-identity-crisis' );
+ $this->identity_crisis_js( $ajax_nonce );
+
+ // Include the CSS!
+ if ( ! wp_script_is( 'jetpack', 'done' ) ) {
+ $this->admin_banner_styles();
+ }
+
+ if ( ! array_key_exists( 'error_code', $errors ) ) {
+ $key = 'siteurl';
+ if ( ! $errors[ $key ] ) {
+ $key = 'home';
+ }
+ } else {
+ $key = 'error_code';
+ // 401 is the only error we care about. Any other errors should not trigger the alert.
+ if ( 401 !== $errors[ $key ] ) {
+ return;
+ }
+ }
+
?>
- <div id="message" class="updated jetpack-message jp-identity-crisis">
- <div class="jp-banner__content">
- <h4><?php _e( 'Something has gotten mixed up!', 'jetpack' ); ?></h4>
- <?php foreach ( $errors as $key => $value ) : ?>
- <p><?php printf( __( 'Your <code>%1$s</code> option is set up as <strong>%2$s</strong>, but your WordPress.com connection lists it as <strong>%3$s</strong>!', 'jetpack' ), $key, (string) get_option( $key ), $value ); ?></p>
- <?php endforeach; ?>
- <p><a href="<?php echo $this->build_reconnect_url() ?>"><?php _e( 'The data listed above is not for my current site. Please disconnect, and then form a new connection to WordPress.com for this site using my current settings.', 'jetpack' ); ?></a></p>
- <p><a href="#"><?php _e( 'Ignore the difference. This is just a staging site for the real site referenced above.', 'jetpack' ); ?></a></p>
- <p><a href="#"><?php _e( 'That used to be my URL for this site before I changed it. Update the WordPress.com Cloud\'s data to match my current settings.', 'jetpack' ); ?></a></p>
+ <style>
+ .jp-identity-crisis .jp-btn-group {
+ margin: 15px 0;
+ }
+ .jp-identity-crisis strong {
+ color: #518d2a;
+ }
+ .jp-identity-crisis.dismiss {
+ display: none;
+ }
+ .jp-identity-crisis .button {
+ margin-right: 4px;
+ }
+ </style>
+
+ <div id="message" class="error jetpack-message jp-identity-crisis stay-visible">
+ <div class="service-mark"></div>
+ <div class="jp-id-banner__content">
+ <!-- <h3 class="banner-title"><?php _e( 'Something\'s not quite right with your Jetpack connection! Let\'s fix that.', 'jetpack' ); ?></h3> -->
+
+ <div class="jp-id-crisis-question" id="jp-id-crisis-question-1">
+ <?php
+ // 401 means that this site has been disconnected from wpcom, but the remote site still thinks it's connected.
+ if ( 'error_code' == $key && '401' == $errors[ $key ] ) : ?>
+ <div class="banner-content">
+ <p><?php
+ /* translators: %s is a URL */
+ printf( __( 'Our records show that this site does not have a valid connection to WordPress.com. Please reset your connection to fix this. <a href="%s" target="_blank">What caused this?</a>', 'jetpack' ), 'https://jetpack.me/support/no-valid-wordpress-com-connection/' );
+ ?></p>
+ </div>
+ <div class="jp-btn-group">
+ <a href="#" class="reset-connection"><?php _e( 'Reset the connection', 'jetpack' ); ?></a>
+ <span class="idc-separator">|</span>
+ <a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( 'jetpack-notice=dismiss' ), 'jetpack-deactivate' ) ); ?>"><?php _e( 'Deactivate Jetpack', 'jetpack' ); ?></a>
+ </div>
+ <?php else : ?>
+ <div class="banner-content">
+ <p><?php printf( __( 'It looks like you may have changed your domain. Is <strong>%1$s</strong> still your site\'s domain, or have you updated it to <strong> %2$s </strong>?', 'jetpack' ), $errors[ $key ], (string) get_option( $key ) ); ?></p>
+ </div>
+ <div class="jp-btn-group">
+ <a href="#" class="regular site-moved"><?php printf( __( '%s is now my domain.', 'jetpack' ), $errors[ $key ] ); ?></a> <span class="idc-separator">|</span> <a href="#" class="site-not-moved" ><?php printf( __( '%s is still my domain.', 'jetpack' ), (string) get_option( $key ) ); ?></a>
+ <span class="spinner"></span>
+ </div>
+ <?php endif ; ?>
+ </div>
+
+ <div class="jp-id-crisis-question" id="jp-id-crisis-question-2" style="display: none;">
+ <div class="banner-content">
+ <p><?php printf(
+ /* translators: %1$s, %2$s and %3$s are URLs */
+ __(
+ 'Are <strong> %2$s </strong> and <strong> %1$s </strong> two completely separate websites? If so we should create a new connection, which will reset your followers and linked services. <a href="%3$s"><em>What does this mean?</em></a>',
+ 'jetpack'
+ ),
+ $errors[ $key ],
+ (string) get_option( $key ),
+ 'https://jetpack.me/support/what-does-resetting-the-connection-mean/'
+ ); ?></p>
+ </div>
+ <div class="jp-btn-group">
+ <a href="#" class="reset-connection"><?php _e( 'Reset the connection', 'jetpack' ); ?></a> <span class="idc-separator">|</span>
+ <a href="#" class="is-dev-env"><?php _e( 'This is a development environment', 'jetpack' ); ?></a> <span class="idc-separator">|</span>
+ <a href="https://jetpack.me/contact-support/" class="contact-support"><?php _e( 'Submit a support ticket', 'jetpack' ); ?></a>
+ <span class="spinner"></span>
+ </div>
+ </div>
+
+ <div class="jp-id-crisis-success" id="jp-id-crisis-success" style="display: none;">
+ <h3 class="success-notice"><?php printf( __( 'Thanks for taking the time to sort things out. We&#039;ve updated our records accordingly!', 'jetpack' ) ); ?></h3>
+ </div>
</div>
</div>
@@ -5429,6 +6433,8 @@ p {
*/
$deprecated_list = array(
'jetpack_bail_on_shortcode' => 'jetpack_shortcodes_to_include',
+ 'wpl_sharing_2014_1' => null,
+ 'jetpack-tools-to-include' => 'jetpack_tools_to_include',
);
// This is a silly loop depth. Better way?
@@ -5512,11 +6518,10 @@ p {
* @return boolean
**/
private function is_ssl_required_to_visit_site() {
+ global $wp_version;
$ssl = is_ssl();
- if ( force_ssl_login() ) {
- $ssl = true;
- } else if ( force_ssl_admin() ) {
+ if ( force_ssl_admin() ) {
$ssl = true;
}
return $ssl;
@@ -5554,6 +6559,13 @@ p {
$do_implode = false;
}
+ /**
+ * Allow CSS to be concatenated into a single jetpack.css file.
+ *
+ * @since 3.2.0
+ *
+ * @param bool $do_implode Should CSS be concatenated? Default to true.
+ */
$do_implode = apply_filters( 'jetpack_implode_frontend_css', $do_implode );
// Do not use the imploded file when default behaviour was altered through the filter
@@ -5606,22 +6618,90 @@ p {
}
/*
- * Check if an option of a Jetpack module has been updated.
+ * Check the heartbeat data
*
- * If any module option has been updated before Jump Start has been dismissed,
- * update the 'jumpstart' option so we can hide Jump Start.
+ * Organizes the heartbeat data by severity. For example, if the site
+ * is in an ID crisis, it will be in the $filtered_data['bad'] array.
+ *
+ * Data will be added to "caution" array, if it either:
+ * - Out of date Jetpack version
+ * - Out of date WP version
+ * - Out of date PHP version
+ *
+ * $return array $filtered_data
*/
- public static function jumpstart_has_updated_module_option( $option_name = '' ) {
- // Bail if Jump Start has already been dismissed
- if ( 'new_connection' !== Jetpack::get_option( 'jumpstart' ) ) {
- return false;
+ public static function jetpack_check_heartbeat_data() {
+ $raw_data = Jetpack_Heartbeat::generate_stats_array();
+
+ $good = array();
+ $caution = array();
+ $bad = array();
+
+ foreach ( $raw_data as $stat => $value ) {
+
+ // Check jetpack version
+ if ( 'version' == $stat ) {
+ if ( version_compare( $value, JETPACK__VERSION, '<' ) ) {
+ $caution[ $stat ] = $value . " - min supported is " . JETPACK__VERSION;
+ continue;
+ }
+ }
+
+ // Check WP version
+ if ( 'wp-version' == $stat ) {
+ if ( version_compare( $value, JETPACK__MINIMUM_WP_VERSION, '<' ) ) {
+ $caution[ $stat ] = $value . " - min supported is " . JETPACK__MINIMUM_WP_VERSION;
+ continue;
+ }
+ }
+
+ // Check PHP version
+ if ( 'php-version' == $stat ) {
+ if ( version_compare( PHP_VERSION, '5.2.4', '<' ) ) {
+ $caution[ $stat ] = $value . " - min supported is 5.2.4";
+ continue;
+ }
+ }
+
+ // Check ID crisis
+ if ( 'identitycrisis' == $stat ) {
+ if ( 'yes' == $value ) {
+ $bad[ $stat ] = $value;
+ continue;
+ }
+ }
+
+ // The rest are good :)
+ $good[ $stat ] = $value;
}
- $jetpack = Jetpack::init();
+ $filtered_data = array(
+ 'good' => $good,
+ 'caution' => $caution,
+ 'bad' => $bad
+ );
+ return $filtered_data;
+ }
- // Manual build of module options
- $option_names = array(
+
+ /*
+ * This method is used to organize all options that can be reset
+ * without disconnecting Jetpack.
+ *
+ * It is used in class.jetpack-cli.php to reset options
+ *
+ * @return array of options to delete.
+ */
+ public static function get_jetpack_options_for_reset() {
+ $jetpack_options = Jetpack_Options::get_option_names();
+ $jetpack_options_non_compat = Jetpack_Options::get_option_names( 'non_compact' );
+ $jetpack_options_private = Jetpack_Options::get_option_names( 'private' );
+
+ $all_jp_options = array_merge( $jetpack_options, $jetpack_options_non_compat, $jetpack_options_private );
+
+ // A manual build of the wp options
+ $wp_options = array(
'sharing-options',
'disabled_likes',
'disabled_reblogs',
@@ -5648,7 +6728,57 @@ p {
'site_logo',
);
- if ( in_array( $option_name, $option_names ) ) {
+ // Flag some Jetpack options as unsafe
+ $unsafe_options = array(
+ 'id', // (int) The Client ID/WP.com Blog ID of this site.
+ 'master_user', // (int) The local User ID of the user who connected this site to jetpack.wordpress.com.
+ 'version', // (string) Used during upgrade procedure to auto-activate new modules. version:time
+ 'jumpstart', // (string) A flag for whether or not to show the Jump Start. Accepts: new_connection, jumpstart_activated, jetpack_action_taken, jumpstart_dismissed.
+
+ // non_compact
+ 'activated',
+
+ // private
+ 'register',
+ 'blog_token', // (string) The Client Secret/Blog Token of this site.
+ 'user_token', // (string) The User Token of this site. (deprecated)
+ 'user_tokens'
+ );
+
+ // Remove the unsafe Jetpack options
+ foreach ( $unsafe_options as $unsafe_option ) {
+ if ( false !== ( $key = array_search( $unsafe_option, $all_jp_options ) ) ) {
+ unset( $all_jp_options[ $key ] );
+ }
+ }
+
+ $options = array(
+ 'jp_options' => $all_jp_options,
+ 'wp_options' => $wp_options
+ );
+
+ return $options;
+ }
+
+ /*
+ * Check if an option of a Jetpack module has been updated.
+ *
+ * If any module option has been updated before Jump Start has been dismissed,
+ * update the 'jumpstart' option so we can hide Jump Start.
+ */
+ public static function jumpstart_has_updated_module_option( $option_name = '' ) {
+ // Bail if Jump Start has already been dismissed
+ if ( 'new_connection' !== Jetpack::get_option( 'jumpstart' ) ) {
+ return false;
+ }
+
+ $jetpack = Jetpack::init();
+
+
+ // Manual build of module options
+ $option_names = self::get_jetpack_options_for_reset();
+
+ if ( in_array( $option_name, $option_names['wp_options'] ) ) {
Jetpack_Options::update_option( 'jumpstart', 'jetpack_action_taken' );
//Jump start is being dismissed send data to MC Stats
@@ -5699,14 +6829,16 @@ p {
public function wp_dashboard_setup() {
if ( self::is_active() ) {
add_action( 'jetpack_dashboard_widget', array( __CLASS__, 'dashboard_widget_footer' ), 999 );
- } elseif ( ! self::is_development_mode() ) {
+ $widget_title = __( 'Site Stats', 'jetpack' );
+ } elseif ( ! self::is_development_mode() && current_user_can( 'jetpack_connect' ) ) {
add_action( 'jetpack_dashboard_widget', array( $this, 'dashboard_widget_connect_to_wpcom' ) );
+ $widget_title = __( 'Please Connect Jetpack', 'jetpack' );
}
if ( has_action( 'jetpack_dashboard_widget' ) ) {
wp_add_dashboard_widget(
'jetpack_summary_widget',
- __( 'Jetpack', 'jetpack' ),
+ $widget_title,
array( __CLASS__, 'dashboard_widget' )
);
wp_enqueue_style( 'jetpack-dashboard-widget', plugins_url( 'css/dashboard-widget.css', JETPACK__PLUGIN_FILE ), array(), JETPACK__VERSION );
@@ -5754,6 +6886,11 @@ p {
}
public static function dashboard_widget() {
+ /**
+ * Fires when the dashboard is loaded.
+ *
+ * @since 3.4.0
+ */
do_action( 'jetpack_dashboard_widget' );
}
@@ -5766,11 +6903,11 @@ p {
<h3><?php echo number_format_i18n( get_site_option( 'jetpack_protect_blocked_attempts', 0 ) ); ?></h3>
<p><?php echo esc_html_x( 'Blocked malicious login attempts', '{#} Blocked malicious login attempts -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
<?php elseif ( current_user_can( 'jetpack_activate_modules' ) && ! self::is_development_mode() ) : ?>
- <a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( array( 'action' => 'activate', 'module' => 'protect' ) ), 'jetpack_activate-protect' ) ); ?>" class="button button-jetpack" title="<?php esc_attr_e( 'Jetpack Protect helps to keep you secure from brute-force login attacks.', 'jetpack' ); ?>">
- <?php esc_html_e( 'Activate Jetpack Protect', 'jetpack' ); ?>
+ <a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( array( 'action' => 'activate', 'module' => 'protect' ) ), 'jetpack_activate-protect' ) ); ?>" class="button button-jetpack" title="<?php esc_attr_e( 'Protect helps to keep you secure from brute-force login attacks.', 'jetpack' ); ?>">
+ <?php esc_html_e( 'Activate Protect', 'jetpack' ); ?>
</a>
<?php else : ?>
- <?php esc_html_e( 'Jetpack Protect is inactive.', 'jetpack' ); ?>
+ <?php esc_html_e( 'Protect is inactive.', 'jetpack' ); ?>
<?php endif; ?>
</div>
@@ -5787,33 +6924,85 @@ p {
<?php endif; ?>
</div>
+
+ <?php if ( ! current_user_can( 'edit_posts' ) && self::is_user_connected() ) : ?>
+ <div style="width: 100%; text-align: center; padding-top: 20px; clear: both;"><a class="button" title="<?php esc_attr_e( 'Unlink your account from WordPress.com', 'jetpack' ); ?>" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'unlink', 'redirect' => 'sub-unlink' ), admin_url( 'index.php' ) ), 'jetpack-unlink' ) ); ?>"><?php esc_html_e( 'Unlink your account from WordPress.com', 'jetpack' ); ?></a></div>
+ <?php endif; ?>
+
</footer>
<?php
}
public function dashboard_widget_connect_to_wpcom() {
+ if ( Jetpack::is_active() || Jetpack::is_development_mode() || ! current_user_can( 'jetpack_connect' ) ) {
+ return;
+ }
?>
<div class="wpcom-connect">
<div class="jp-emblem">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0" y="0" viewBox="0 0 172.9 172.9" enable-background="new 0 0 172.9 172.9" xml:space="preserve">
- <path d="M86.4 0C38.7 0 0 38.7 0 86.4c0 47.7 38.7 86.4 86.4 86.4s86.4-38.7 86.4-86.4C172.9 38.7 134.2 0 86.4 0zM83.1 106.6l-27.1-6.9C49 98 45.7 90.1 49.3 84l33.8-58.5V106.6zM124.9 88.9l-33.8 58.5V66.3l27.1 6.9C125.1 74.9 128.4 82.8 124.9 88.9z"/>
+ <path d="M86.4 0C38.7 0 0 38.7 0 86.4c0 47.7 38.7 86.4 86.4 86.4s86.4-38.7 86.4-86.4C172.9 38.7 134.2 0 86.4 0zM83.1 106.6l-27.1-6.9C49 98 45.7 90.1 49.3 84l33.8-58.5V106.6zM124.9 88.9l-33.8 58.5V66.3l27.1 6.9C125.1 74.9 128.4 82.8 124.9 88.9z"/>
</svg>
</div>
- <h3><?php esc_html_e( 'Boost traffic, enhance security, and improve performance.', 'jetpack' ); ?></h3>
- <p><?php esc_html_e( 'Jetpack connects your site to WordPress.com to give you traffic and customization tools, enhanced security, speed boosts, and more.', 'jetpack' ); ?></p>
+ <h3><?php esc_html_e( 'Please Connect Jetpack', 'jetpack' ); ?></h3>
+ <p><?php echo wp_kses( __( 'Connecting Jetpack will show you <strong>stats</strong> about your traffic, <strong>protect</strong> you from brute force attacks, <strong>speed up</strong> your images and photos, and enable other <strong>traffic and security</strong> features.', 'jetpack' ), 'jetpack' ) ?></p>
<div class="actions">
<a href="<?php echo $this->build_connect_url() ?>" class="button button-primary">
- <?php esc_html_e( 'Connect to WordPress.com', 'jetpack' ); ?>
+ <?php esc_html_e( 'Connect Jetpack', 'jetpack' ); ?>
</a>
- <?php if ( current_user_can( 'activate_plugins' ) ) : ?>
- <small><a href="<?php echo esc_url( wp_nonce_url( Jetpack::admin_url( 'jetpack-notice=dismiss' ), 'jetpack-deactivate' ) ); ?>" title="Deactivate Jetpack">
- <?php esc_html_e( 'or, deactivate Jetpack', 'jetpack' ); ?>
- </a></small>
- <?php endif; ?>
</div>
</div>
<?php
}
+ /*
+ * A graceful transition to using Core's site icon.
+ *
+ * All of the hard work has already been done with the image
+ * in all_done_page(). All that needs to be done now is update
+ * the option and display proper messaging.
+ *
+ * @todo remove when WP 4.3 is minimum
+ *
+ * @since 3.6.1
+ *
+ * @return bool false = Core's icon not available || true = Core's icon is available
+ */
+ public static function jetpack_site_icon_available_in_core() {
+ global $wp_version;
+ $core_icon_available = function_exists( 'has_site_icon' ) && version_compare( $wp_version, '4.3-beta' ) >= 0;
+
+ if ( ! $core_icon_available ) {
+ return false;
+ }
+
+ // No need for Jetpack's site icon anymore if core's is already set
+ if ( has_site_icon() ) {
+ if ( Jetpack::is_module_active( 'site-icon' ) ) {
+ Jetpack::log( 'deactivate', 'site-icon' );
+ Jetpack::deactivate_module( 'site-icon' );
+ }
+ return true;
+ }
+
+ // Transfer Jetpack's site icon to use core.
+ $site_icon_id = Jetpack::get_option( 'site_icon_id' );
+ if ( $site_icon_id ) {
+ // Update core's site icon
+ update_option( 'site_icon', $site_icon_id );
+
+ // Delete Jetpack's icon option. We still want the blavatar and attached data though.
+ delete_option( 'site_icon_id' );
+ }
+
+ // No need for Jetpack's site icon anymore
+ if ( Jetpack::is_module_active( 'site-icon' ) ) {
+ Jetpack::log( 'deactivate', 'site-icon' );
+ Jetpack::deactivate_module( 'site-icon' );
+ }
+
+ return true;
+ }
+
}
diff --git a/plugins/jetpack/class.json-api-endpoints.php b/plugins/jetpack/class.json-api-endpoints.php
index 25716ab8..1943d272 100644
--- a/plugins/jetpack/class.json-api-endpoints.php
+++ b/plugins/jetpack/class.json-api-endpoints.php
@@ -5,37 +5,37 @@ require_once( dirname( __FILE__ ) . '/json-api-config.php' );
// Endpoint
abstract class WPCOM_JSON_API_Endpoint {
// The API Object
- var $api;
+ public $api;
- var $pass_wpcom_user_details = false;
- var $can_use_user_details_instead_of_blog_membership = false;
+ public $pass_wpcom_user_details = false;
+ public $can_use_user_details_instead_of_blog_membership = false;
// One liner.
- var $description;
+ public $description;
// Object Grouping For Documentation (Users, Posts, Comments)
- var $group;
+ public $group;
// Stats extra value to bump
- var $stat;
+ public $stat;
// HTTP Method
- var $method = 'GET';
+ public $method = 'GET';
// Minimum version of the api for which to serve this endpoint
- var $min_version = '0';
+ public $min_version = '0';
// Maximum version of the api for which to serve this endpoint
- var $max_version = WPCOM_JSON_API__CURRENT_VERSION;
+ public $max_version = WPCOM_JSON_API__CURRENT_VERSION;
// Path at which to serve this endpoint: sprintf() format.
- var $path = '';
+ public $path = '';
// Identifiers to fill sprintf() formatted $path
- var $path_labels = array();
+ public $path_labels = array();
// Accepted query parameters
- var $query = array(
+ public $query = array(
// Parameter name
'context' => array(
// Default value => description
@@ -45,7 +45,7 @@ abstract class WPCOM_JSON_API_Endpoint {
),
'http_envelope' => array(
'false' => '',
- 'true' => 'Some environments (like in-browser Javascript or Flash) block or divert responses with a non-200 HTTP status code. Setting this parameter will force the HTTP status code to always be 200. The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.',
+ 'true' => 'Some environments (like in-browser JavaScript or Flash) block or divert responses with a non-200 HTTP status code. Setting this parameter will force the HTTP status code to always be 200. The JSON response is wrapped in an "envelope" containing the "real" HTTP status code and headers.',
),
'pretty' => array(
'false' => '',
@@ -58,51 +58,56 @@ abstract class WPCOM_JSON_API_Endpoint {
);
// Response format
- var $response_format = array();
+ public $response_format = array();
// Request format
- var $request_format = array();
+ public $request_format = array();
// Is this endpoint still in testing phase? If so, not available to the public.
- var $in_testing = false;
+ public $in_testing = false;
// Is this endpoint still allowed if the site in question is flagged?
- var $allowed_if_flagged = false;
+ public $allowed_if_flagged = false;
/**
* @var string Version of the API
*/
- var $version = '';
+ public $version = '';
/**
* @var string Example request to make
*/
- var $example_request = '';
+ public $example_request = '';
/**
* @var string Example request data (for POST methods)
*/
- var $example_request_data = '';
+ public $example_request_data = '';
/**
* @var string Example response from $example_request
*/
- var $example_response = '';
+ public $example_response = '';
/**
* @var bool Set to true if the endpoint implements its own filtering instead of the standard `fields` query method
*/
- var $custom_fields_filtering = false;
+ public $custom_fields_filtering = false;
/**
* @var bool Set to true if the endpoint accepts all cross origin requests. You probably should not set this flag.
*/
- var $allow_cross_origin_request = false;
+ public $allow_cross_origin_request = false;
/**
* @var bool Set to true if the endpoint can recieve unauthorized POST requests.
*/
- var $allow_unauthorized_request = false;
+ public $allow_unauthorized_request = false;
+
+ /**
+ * @var bool Set to true if the endpoint should accept site based (not user based) authentication.
+ */
+ public $allow_jetpack_site_auth = false;
function __construct( $args ) {
$defaults = array(
@@ -132,6 +137,7 @@ abstract class WPCOM_JSON_API_Endpoint {
'custom_fields_filtering' => false,
'allow_cross_origin_request' => false,
'allow_unauthorized_request' => false,
+ 'allow_jetpack_site_auth' => false,
);
$args = wp_parse_args( $args, $defaults );
@@ -159,8 +165,8 @@ abstract class WPCOM_JSON_API_Endpoint {
$this->can_use_user_details_instead_of_blog_membership = $args['can_use_user_details_instead_of_blog_membership'];
$this->allow_cross_origin_request = (bool) $args['allow_cross_origin_request'];
-
$this->allow_unauthorized_request = (bool) $args['allow_unauthorized_request'];
+ $this->allow_jetpack_site_auth = (bool) $args['allow_jetpack_site_auth'];
$this->version = $args['version'];
@@ -345,8 +351,8 @@ abstract class WPCOM_JSON_API_Endpoint {
$return[$key] = (string) esc_url_raw( $value );
break;
case 'string' :
- // Fallback string -> array
- if ( is_array( $value ) ) {
+ // Fallback string -> array, or string -> object
+ if ( is_array( $value ) || is_object( $value ) ) {
if ( !empty( $types[0] ) ) {
$next_type = array_shift( $types );
return $this->cast_and_filter_item( $return, $next_type, $key, $value, $types, $for_output );
@@ -462,7 +468,7 @@ abstract class WPCOM_JSON_API_Endpoint {
case 'tag' :
case 'category' :
$docs = array(
- 'ID' => '(int)',
+ 'ID' => '(int)',
'name' => '(string)',
'slug' => '(string)',
'description' => '(HTML)',
@@ -477,10 +483,10 @@ abstract class WPCOM_JSON_API_Endpoint {
case 'post_reference' :
case 'comment_reference' :
$docs = array(
- 'ID' => '(int)',
- 'type' => '(string)',
+ 'ID' => '(int)',
+ 'type' => '(string)',
'title' => '(string)',
- 'link' => '(URL)',
+ 'link' => '(URL)',
);
$return[$key] = (object) $this->cast_and_filter( $value, $docs, false, $for_output );
break;
@@ -494,13 +500,27 @@ abstract class WPCOM_JSON_API_Endpoint {
break;
case 'author' :
$docs = array(
- 'ID' => '(int)',
- 'user_login' => '(string)',
- 'email' => '(string|false)',
- 'name' => '(string)',
- 'URL' => '(URL)',
- 'avatar_URL' => '(URL)',
- 'profile_URL' => '(URL)',
+ 'ID' => '(int)',
+ 'user_login' => '(string)',
+ 'login' => '(string)',
+ 'email' => '(string|false)',
+ 'name' => '(string)',
+ 'first_name' => '(string)',
+ 'last_name' => '(string)',
+ 'nice_name' => '(string)',
+ 'URL' => '(URL)',
+ 'avatar_URL' => '(URL)',
+ 'profile_URL' => '(URL)',
+ 'is_super_admin' => '(bool)',
+ 'roles' => '(array:string)'
+ );
+ $return[$key] = (object) $this->cast_and_filter( $value, $docs, false, $for_output );
+ break;
+ case 'role' :
+ $docs = array(
+ 'name' => '(string)',
+ 'display_name' => '(string)',
+ 'capabilities' => '(object:boolean)',
);
$return[$key] = (object) $this->cast_and_filter( $value, $docs, false, $for_output );
break;
@@ -514,7 +534,21 @@ abstract class WPCOM_JSON_API_Endpoint {
'height' => '(int)',
'duration' => '(int)',
);
- $return[$key] = (object) $this->cast_and_filter( $value, apply_filters( 'wpcom_json_api_attachment_cast_and_filter', $docs ), false, $for_output );
+ $return[$key] = (object) $this->cast_and_filter(
+ $value,
+ /**
+ * Filter the documentation returned for a post attachment.
+ *
+ * @module json-api
+ *
+ * @since 1.9.0
+ *
+ * @param array $docs Array of documentation about a post attachment.
+ */
+ apply_filters( 'wpcom_json_api_attachment_cast_and_filter', $docs ),
+ false,
+ $for_output
+ );
break;
case 'metadata' :
$docs = array(
@@ -524,7 +558,13 @@ abstract class WPCOM_JSON_API_Endpoint {
'previous_value' => '(string)',
'operation' => '(string)',
);
- $return[$key] = (object) $this->cast_and_filter( $value, apply_filters( 'wpcom_json_api_attachment_cast_and_filter', $docs ), false, $for_output );
+ $return[$key] = (object) $this->cast_and_filter(
+ $value,
+ /** This filter is documented in class.json-api-endpoints.php */
+ apply_filters( 'wpcom_json_api_attachment_cast_and_filter', $docs ),
+ false,
+ $for_output
+ );
break;
case 'plugin' :
$docs = array(
@@ -542,7 +582,21 @@ abstract class WPCOM_JSON_API_Endpoint {
'autoupdate' => '(boolean) Whether the plugin is auto updated',
'log' => '(array:safehtml) An array of update log strings.',
);
- $return[$key] = (object) $this->cast_and_filter( $value, apply_filters( 'wpcom_json_api_plugin_cast_and_filter', $docs ), false, $for_output );
+ $return[$key] = (object) $this->cast_and_filter(
+ $value,
+ /**
+ * Filter the documentation returned for a plugin.
+ *
+ * @module json-api
+ *
+ * @since 3.1.0
+ *
+ * @param array $docs Array of documentation about a plugin.
+ */
+ apply_filters( 'wpcom_json_api_plugin_cast_and_filter', $docs ),
+ false,
+ $for_output
+ );
break;
case 'jetpackmodule' :
$docs = array(
@@ -556,7 +610,13 @@ abstract class WPCOM_JSON_API_Endpoint {
'free' => '(boolean) The module\'s Free or Paid status.',
'module_tags' => '(array) The module\'s tags.'
);
- $return[$key] = (object) $this->cast_and_filter( $value, apply_filters( 'wpcom_json_api_plugin_cast_and_filter', $docs ), false, $for_output );
+ $return[$key] = (object) $this->cast_and_filter(
+ $value,
+ /** This filter is documented in class.json-api-endpoints.php */
+ apply_filters( 'wpcom_json_api_plugin_cast_and_filter', $docs ),
+ false,
+ $for_output
+ );
break;
case 'sharing_button' :
$docs = array(
@@ -588,7 +648,13 @@ abstract class WPCOM_JSON_API_Endpoint {
}
if ( ! empty( $docs ) ) {
- $return[$key] = (object) $this->cast_and_filter( $value, apply_filters( 'wpcom_json_api_plugin_cast_and_filter', $docs ), false, $for_output );
+ $return[$key] = (object) $this->cast_and_filter(
+ $value,
+ /** This filter is documented in class.json-api-endpoints.php */
+ apply_filters( 'wpcom_json_api_plugin_cast_and_filter', $docs ),
+ false,
+ $for_output
+ );
} else {
trigger_error( "Unknown API casting type {$type['type']}", E_USER_WARNING );
}
@@ -628,6 +694,7 @@ abstract class WPCOM_JSON_API_Endpoint {
* Echoes HTML.
*/
function document( $show_description = true ) {
+ global $wpdb;
$original_post = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : 'unset';
unset( $GLOBALS['post'] );
@@ -646,28 +713,46 @@ abstract class WPCOM_JSON_API_Endpoint {
<p><strong>This endpoint is deprecated in favor of version <?php echo floatval( $this->new_version ); ?></strong></p>
<?php } ?>
-<section class="resource-url">
- <h2 id="apidoc-resource-url">Resource URL</h2>
+<section class="resource-info">
+ <h2 id="apidoc-resource-info">Resource Information</h2>
+
<table class="api-doc api-doc-resource-parameters api-doc-resource">
- <thead>
- <tr>
- <th class="api-index-title" scope="column">Type</th>
- <th class="api-index-title" scope="column">URL and Format</th>
- </tr>
- </thead>
- <tbody>
- <tr class="api-index-item">
- <th scope="row" class="parameter api-index-item-title"><?php echo wp_kses_post( $doc['method'] ); ?></th>
- <?php
- $version = WPCOM_JSON_API__CURRENT_VERSION;
- if ( !empty( $this->max_version ) ) {
- $version = $this->max_version;
- }
- ?>
- <td class="type api-index-item-title" style="white-space: nowrap;">https://public-api.wordpress.com/rest/v<?php echo floatval( $version ); ?><?php echo wp_kses_post( $doc['path_labeled'] ); ?></td>
- </tr>
- </tbody>
+
+ <thead>
+ <tr>
+ <th class="api-index-title" scope="column">&nbsp;</th>
+ <th class="api-index-title" scope="column">&nbsp;</th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr class="api-index-item">
+ <th scope="row" class="parameter api-index-item-title">Method</th>
+ <td class="type api-index-item-title"><?php echo wp_kses_post( $doc['method'] ); ?></td>
+ </tr>
+
+ <tr class="api-index-item">
+ <th scope="row" class="parameter api-index-item-title">URL</th>
+ <?php
+ $version = WPCOM_JSON_API__CURRENT_VERSION;
+ if ( !empty( $this->max_version ) ) {
+ $version = $this->max_version;
+ }
+ ?>
+ <td class="type api-index-item-title">https://public-api.wordpress.com/rest/v<?php echo floatval( $version ); ?><?php echo wp_kses_post( $doc['path_labeled'] ); ?></td>
+ </tr>
+
+ <tr class="api-index-item">
+ <th scope="row" class="parameter api-index-item-title">Requires authentication?</th>
+ <?php
+ $requires_auth = $wpdb->get_row( $wpdb->prepare( "SELECT requires_authentication FROM rest_api_documentation WHERE `version` = %s AND `path` = %s AND `method` = %s LIMIT 1", $version, untrailingslashit( $doc['path_labeled'] ), $doc['method'] ) );
+ ?>
+ <td class="type api-index-item-title"><?php echo ( true === (bool) $requires_auth->requires_authentication ? 'Yes' : 'No' ); ?></td>
+ </tr>
+
+ </tbody>
</table>
+
</section>
<?php
@@ -720,146 +805,6 @@ abstract class WPCOM_JSON_API_Endpoint {
<?php endforeach; ?>
<?php
- // If no example was hardcoded in the doc, try to get some
- if ( empty( $this->example_response ) ) {
-
- // Examples for endpoint documentation response
- $response_key = 'dev_example_response_' . $this->version . '_' . $this->method . '_' . sanitize_key( $this->path );
- $response_body = wp_cache_get( $response_key );
-
- // Response doesn't exist, so run the request
- if ( false === $response_body ) {
-
- // Only trust GET request
- if ( 'GET' === $this->method ) {
- $response = wp_remote_get( $this->example_request );
- $response_body = wp_remote_retrieve_body( $response );
-
- // Only cache if there's a result
- if ( ! is_wp_error( $response ) && strlen( $response_body ) ) {
- wp_cache_set( $response_key, $response_body );
- } else {
- wp_cache_delete( $response_key );
- }
- }
- }
-
- // Example response was passed into the constructor via params
- } else {
- $response_body = $this->example_response;
- }
-
- // Wrap the response in a sourcecode shortcode
- if ( !empty( $response_body ) && !is_wp_error( $response ) ) {
- $response_body = '[sourcecode language="javascript" wraplines="false" light="true" autolink="false" htmlscript="false"]' . $response_body . '[/sourcecode]';
- $response_body = apply_filters( 'the_content', $response_body );
- $this->example_response = $response_body;
- }
-
- $curl = 'curl';
-
- $php_opts = array( 'ignore_errors' => true );
-
- if ( 'GET' !== $this->method ) {
- $php_opts['method'] = $this->method;
- }
-
- if ( $this->example_request_data ) {
- if ( isset( $this->example_request_data['headers'] ) && is_array( $this->example_request_data['headers'] ) ) {
- $php_opts['header'] = array();
- foreach ( $this->example_request_data['headers'] as $header => $value ) {
- $curl .= " \\\n -H " . escapeshellarg( "$header: $value" );
- $php_opts['header'][] = "$header: $value";
- }
- }
-
- if ( isset( $this->example_request_data['body'] ) && is_array( $this->example_request_data['body'] ) ) {
- $php_opts['content'] = $this->example_request_data['body'];
- $php_opts['header'][] = 'Content-Type: application/x-www-form-urlencoded';
- foreach ( $this->example_request_data['body'] as $key => $value ) {
- $curl .= " \\\n --data-urlencode " . escapeshellarg( "$key=$value" );
- }
- }
- }
-
- if ( $php_opts ) {
- $php_opts_exported = var_export( array( 'http' => $php_opts ), true );
- if ( !empty( $php_opts['content'] ) ) {
- $content_exported = preg_quote( var_export( $php_opts['content'], true ), '/' );
- $content_exported = '\\s*' . str_replace( "\n", "\n\\s*", $content_exported ) . '\\s*';
- $php_opts_exported = preg_replace_callback( "/$content_exported/", array( $this, 'add_http_build_query_to_php_content_example' ), $php_opts_exported );
- }
- $php = <<<EOPHP
-<?php
-
-\$options = $php_opts_exported;
-
-\$context = stream_context_create( \$options );
-\$response = file_get_contents(
- '$this->example_request',
- false,
- \$context
-);
-\$response = json_decode( \$response );
-
-?>
-EOPHP;
- } else {
- $php = <<<EOPHP
-<?php
-
-\$response = file_get_contents( '$this->example_request' );
-\$response = json_decode( \$response );
-
-?>
-EOPHP;
- }
-
- if ( false !== strpos( $curl, "\n" ) ) {
- $curl .= " \\\n";
- }
-
- // Escape square brackets to prevent curl "[globbing] bad range specification" errors
- $example_request = strtr( $this->example_request, array( '[' => '\[', ']' => '\]' ) );
-
- $curl .= ' ' . escapeshellarg( $example_request );
-
- $curl = '[sourcecode language="bash" wraplines="false" light="true" autolink="false" htmlscript="false"]' . $curl . '[/sourcecode]';
- $curl = apply_filters( 'the_content', $curl );
-
- $php = '[sourcecode language="php" wraplines="false" light="true" autolink="false" htmlscript="false"]' . $php . '[/sourcecode]';
- $php = apply_filters( 'the_content', $php );
-?>
-
-<?php if ( ! empty( $this->example_request ) || ! empty( $this->example_request_data ) || ! empty( $this->example_response ) ) : ?>
-
- <section class="example-response">
- <h2 id="apidoc-example">Example</h2>
-
- <section>
- <h3>cURL</h3>
- <?php echo wp_kses_post( $curl ); ?>
- </section>
-
- <section>
- <h3>PHP</h3>
- <?php echo wp_kses_post( $php ); ?>
- </section>
-
- <?php if ( ! empty( $this->example_response ) ) : ?>
-
- <section>
- <h3>Response Body</h3>
- <?php echo $this->example_response; ?>
- </section>
-
- <?php endif; ?>
-
- </section>
-
-<?php endif; ?>
-
-<?php
if ( 'unset' !== $original_post ) {
$GLOBALS['post'] = $original_post;
}
@@ -1019,7 +964,24 @@ EOPHP;
}
}
- if ( -1 == get_option( 'blog_public' ) && ! apply_filters( 'wpcom_json_api_user_can_view_post', current_user_can( 'read_post', $post->ID ), $post ) ) {
+ if (
+ -1 == get_option( 'blog_public' ) &&
+ /**
+ * Filter access to a specific post.
+ *
+ * @module json-api
+ *
+ * @since 3.4.0
+ *
+ * @param bool current_user_can( 'read_post', $post->ID ) Can the current user access the post.
+ * @param WP_Post $post Post data.
+ */
+ ! apply_filters(
+ 'wpcom_json_api_user_can_view_post',
+ current_user_can( 'read_post', $post->ID ),
+ $post
+ )
+ ) {
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) );
}
@@ -1044,6 +1006,8 @@ EOPHP;
$login = '';
$email = $author->comment_author_email;
$name = $author->comment_author;
+ $first_name = '';
+ $last_name = '';
$URL = $author->comment_author_url;
$profile_URL = 'http://en.gravatar.com/' . md5( strtolower( trim( $email ) ) );
$nice = '';
@@ -1059,15 +1023,27 @@ EOPHP;
// then $author is a Post Object.
if ( 0 == $author->post_author )
return null;
+ /**
+ * Filter whether the current site is a Jetpack site.
+ *
+ * @module json-api
+ *
+ * @since 3.3.0
+ *
+ * @param bool false Is the current site a Jetpack site. Default to false.
+ * @param int get_current_blog_id() Blog ID.
+ */
$is_jetpack = true === apply_filters( 'is_jetpack_site', false, get_current_blog_id() );
$post_id = $author->ID;
if ( $is_jetpack && ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) {
- $ID = get_post_meta( $post_id, '_jetpack_post_author_external_id', true );
- $email = get_post_meta( $post_id, '_jetpack_author_email', true );
- $login = '';
- $name = get_post_meta( $post_id, '_jetpack_author', true );
- $URL = '';
- $nice = '';
+ $ID = get_post_meta( $post_id, '_jetpack_post_author_external_id', true );
+ $email = get_post_meta( $post_id, '_jetpack_author_email', true );
+ $login = '';
+ $name = get_post_meta( $post_id, '_jetpack_author', true );
+ $first_name = '';
+ $last_name = '';
+ $URL = '';
+ $nice = '';
} else {
$author = $author->post_author;
}
@@ -1084,12 +1060,14 @@ EOPHP;
return null;
}
- $ID = $user->ID;
- $email = $user->user_email;
- $login = $user->user_login;
- $name = $user->display_name;
- $URL = $user->user_url;
- $nice = $user->user_nicename;
+ $ID = $user->ID;
+ $email = $user->user_email;
+ $login = $user->user_login;
+ $name = $user->display_name;
+ $first_name = $user->first_name;
+ $last_name = $user->last_name;
+ $URL = $user->user_url;
+ $nice = $user->user_nicename;
}
if ( defined( 'IS_WPCOM' ) && IS_WPCOM && ! $is_jetpack ) {
$active_blog = get_active_blog_for_user( $ID );
@@ -1110,6 +1088,8 @@ EOPHP;
'login' => (string) $login,
'email' => $email, // (string|bool)
'name' => (string) $name,
+ 'first_name' => (string) $first_name,
+ 'last_name' => (string) $last_name,
'nice_name' => (string) $nice,
'URL' => (string) esc_url_raw( $URL ),
'avatar_URL' => (string) esc_url_raw( $avatar_URL ),
@@ -1185,23 +1165,51 @@ EOPHP;
if ( in_array( $ext, array( 'jpg', 'jpeg', 'png', 'gif' ) ) ) {
$metadata = wp_get_attachment_metadata( $media_item->ID );
- $response['height'] = $metadata['height'];
- $response['width'] = $metadata['width'];
- foreach ( $metadata['sizes'] as $size => $size_details ) {
- $response['thumbnails'][ $size ] = dirname( $response['URL'] ) . '/' . $size_details['file'];
+ if ( isset( $metadata['height'], $metadata['width'] ) ) {
+ $response['height'] = $metadata['height'];
+ $response['width'] = $metadata['width'];
+ }
+
+ if ( isset( $metadata['sizes'] ) ) {
+ /**
+ * Filter the thumbnail sizes available for each attachment ID.
+ *
+ * @module json-api
+ *
+ * @since 3.9.0
+ *
+ * @param array $metadata['sizes'] Array of thumbnail sizes available for a given attachment ID.
+ * @param string $media_id Attachment ID.
+ */
+ $sizes = apply_filters( 'rest_api_thumbnail_sizes', $metadata['sizes'], $media_id );
+ if ( is_array( $sizes ) ) {
+ foreach ( $sizes as $size => $size_details ) {
+ $response['thumbnails'][ $size ] = dirname( $response['URL'] ) . '/' . $size_details['file'];
+ }
+ }
+ }
+
+ if ( isset( $metadata['image_meta'] ) ) {
+ $response['exif'] = $metadata['image_meta'];
}
- $response['exif'] = $metadata['image_meta'];
}
if ( in_array( $ext, array( 'mp3', 'm4a', 'wav', 'ogg' ) ) ) {
$metadata = wp_get_attachment_metadata( $media_item->ID );
+ $response['length'] = $metadata['length'];
$response['exif'] = $metadata;
}
if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) {
$metadata = wp_get_attachment_metadata( $media_item->ID );
- $response['height'] = $metadata['height'];
- $response['width'] = $metadata['width'];
+ if ( isset( $metadata['height'], $metadata['width'] ) ) {
+ $response['height'] = $metadata['height'];
+ $response['width'] = $metadata['width'];
+ }
+
+ if ( isset( $metadata['length'] ) ) {
+ $response['length'] = $metadata['length'];
+ }
// add VideoPress info
if ( function_exists( 'video_get_info_by_blogpostid' ) ) {
@@ -1271,7 +1279,6 @@ EOPHP;
return new WP_Error( 'unauthorized', 'User cannot edit taxonomy', 403 );
break;
case 'display' :
- $tax = get_taxonomy( $taxonomy_type );
if ( -1 == get_option( 'blog_public' ) && ! current_user_can( 'read' ) ) {
return new WP_Error( 'unauthorized', 'User cannot view taxonomy', 403 );
}
@@ -1410,9 +1417,20 @@ EOPHP;
// Load the functions.php file for the current theme to get its post formats, CPTs, etc.
function load_theme_functions() {
- // the theme info we care about is found either within functions.php or one of the jetpack files. it might also make sense to load inc/wpcom.php and includes/wpcom.php if there is a need for it
+ // bail if we've done this already (can happen when calling /batch endpoint)
+ if ( defined( 'REST_API_THEME_FUNCTIONS_LOADED' ) )
+ return;
+
+ define( 'REST_API_THEME_FUNCTIONS_LOADED', true );
+
+ // the theme info we care about is found either within functions.php or one of the jetpack files.
$function_files = array( '/functions.php', '/inc/jetpack.compat.php', '/inc/jetpack.php', '/includes/jetpack.compat.php' );
+ $copy_dirs = array( get_template_directory() );
+ if ( wpcom_is_vip() ) {
+ $copy_dirs[] = WP_CONTENT_DIR . '/themes/vip/plugins/';
+ }
+
// Is this a child theme? Load the child theme's functions file.
if ( get_stylesheet_directory() !== get_template_directory() && wpcom_is_child_theme() ) {
foreach ( $function_files as $function_file ) {
@@ -1420,6 +1438,7 @@ EOPHP;
require_once( get_stylesheet_directory() . $function_file );
}
}
+ $copy_dirs[] = get_stylesheet_directory();
}
foreach ( $function_files as $function_file ) {
@@ -1428,14 +1447,43 @@ EOPHP;
}
}
+ // add inc/wpcom.php and/or includes/wpcom.php
+ wpcom_load_theme_compat_file();
+
// since the stuff we care about (CPTS, post formats, are usually on setup or init hooks, we want to load those)
- $this->copy_hooks( 'after_setup_theme', 'restapi_theme_after_setup_theme', WP_CONTENT_DIR . '/themes' );
+ $this->copy_hooks( 'after_setup_theme', 'restapi_theme_after_setup_theme', $copy_dirs );
+
+ /**
+ * Fires functions hooked onto `after_setup_theme` by the theme for the purpose of the REST API.
+ *
+ * The REST API does not load the theme when processing requests.
+ * To enable theme-based functionality, the API will load the '/functions.php',
+ * '/inc/jetpack.compat.php', '/inc/jetpack.php', '/includes/jetpack.compat.php files
+ * of the theme (parent and child) and copy functions hooked onto 'after_setup_theme' within those files.
+ *
+ * @module json-api
+ *
+ * @since 3.2.0
+ */
do_action( 'restapi_theme_after_setup_theme' );
- $this->copy_hooks( 'init', 'restapi_theme_init', WP_CONTENT_DIR . '/themes' );
+ $this->copy_hooks( 'init', 'restapi_theme_init', $copy_dirs );
+
+ /**
+ * Fires functions hooked onto `init` by the theme for the purpose of the REST API.
+ *
+ * The REST API does not load the theme when processing requests.
+ * To enable theme-based functionality, the API will load the '/functions.php',
+ * '/inc/jetpack.compat.php', '/inc/jetpack.php', '/includes/jetpack.compat.php files
+ * of the theme (parent and child) and copy functions hooked onto 'init' within those files.
+ *
+ * @module json-api
+ *
+ * @since 3.2.0
+ */
do_action( 'restapi_theme_init' );
}
- function copy_hooks( $from_hook, $to_hook, $base_path = '' ) {
+ function copy_hooks( $from_hook, $to_hook, $base_paths ) {
global $wp_filter;
foreach ( $wp_filter as $hook => $actions ) {
if ( $from_hook <> $hook )
@@ -1446,8 +1494,10 @@ EOPHP;
$reflection = $this->get_reflection( $callback ); // use reflection api to determine filename where function is defined
if ( false !== $reflection ) {
$file_name = $reflection->getFileName();
- if ( 0 === strpos( $file_name, $base_path ) ) { // only copy hooks with functions which are part of VIP (the theme, parent theme, or VIP plugins)
- $wp_filter[$to_hook][$priority][ 'cph' . $callback_key ] = $callback_data;
+ foreach( $base_paths as $base_path ) {
+ if ( 0 === strpos( $file_name, $base_path ) ) { // only copy hooks with functions which are part of the specified files
+ $wp_filter[ $to_hook ][ $priority ][ 'cph' . $callback_key ] = $callback_data;
+ }
}
}
}
@@ -1645,6 +1695,8 @@ EOPHP;
$base = substr( $base, 0, - 1 ) . $api_version;
}
+ // escape any % in the relative path before running it through sprintf again
+ $relative_path = str_replace( '%', '%%', $relative_path );
// http, WPCOM_JSON_API__BASE, ... , path
// %s , %s , $format, %s
return esc_url_raw( sprintf( "%s://%s$relative_path", $this->api->public_api_scheme, $base ) );
@@ -1740,6 +1792,15 @@ EOPHP;
protected function _get_whitelisted_post_types() {
$allowed_types = array( 'post', 'page', 'revision' );
+ /**
+ * Filter the post types Jetpack has access to, and can synchronize with WordPress.com.
+ *
+ * @module json-api
+ *
+ * @since 2.2.3
+ *
+ * @param array $allowed_types Array of whitelisted post types. Default to `array( 'post', 'page', 'revision' )`.
+ */
$allowed_types = apply_filters( 'rest_api_allowed_post_types', $allowed_types );
return array_unique( $allowed_types );
@@ -1899,6 +1960,15 @@ EOPHP;
// lets whitelist to only specific clients right now
$clients_allowed_video_uploads = array();
+ /**
+ * Filter the list of whitelisted video clients.
+ *
+ * @module json-api
+ *
+ * @since 3.2.0
+ *
+ * @param array $clients_allowed_video_uploads Array of whitelisted Video clients.
+ */
$clients_allowed_video_uploads = apply_filters( 'rest_api_clients_allowed_video_uploads', $clients_allowed_video_uploads );
if ( !in_array( $this->api->token_details['client_id'], $clients_allowed_video_uploads ) ) {
return $mimes;
@@ -1907,6 +1977,15 @@ EOPHP;
$mime_list = wp_get_mime_types();
$video_exts = explode( ' ', get_site_option( 'video_upload_filetypes', false, false ) );
+ /**
+ * Filter the video filetypes allowed on the site.
+ *
+ * @module json-api
+ *
+ * @since 3.2.0
+ *
+ * @param array $video_exts Array of video filetypes allowed on the site.
+ */
$video_exts = apply_filters( 'video_upload_filetypes', $video_exts );
$video_mimes = array();
diff --git a/plugins/jetpack/class.json-api.php b/plugins/jetpack/class.json-api.php
index 0e7e175e..58d1de0f 100644
--- a/plugins/jetpack/class.json-api.php
+++ b/plugins/jetpack/class.json-api.php
@@ -5,28 +5,28 @@ defined( 'WPCOM_JSON_API__DEBUG' ) or define( 'WPCOM_JSON_API__DEBUG', false );
class WPCOM_JSON_API {
static $self = null;
- var $endpoints = array();
+ public $endpoints = array();
- var $token_details = array();
+ public $token_details = array();
- var $method = '';
- var $url = '';
- var $path = '';
- var $version = null;
- var $query = array();
- var $post_body = null;
- var $files = null;
- var $content_type = null;
- var $accept = '';
+ public $method = '';
+ public $url = '';
+ public $path = '';
+ public $version = null;
+ public $query = array();
+ public $post_body = null;
+ public $files = null;
+ public $content_type = null;
+ public $accept = '';
- var $_server_https;
- var $exit = true;
- var $public_api_scheme = 'https';
+ public $_server_https;
+ public $exit = true;
+ public $public_api_scheme = 'https';
- var $output_status_code = 200;
+ public $output_status_code = 200;
- var $trapped_error = null;
- var $did_output = false;
+ public $trapped_error = null;
+ public $did_output = false;
/**
* @return WPCOM_JSON_API instance
@@ -141,7 +141,12 @@ class WPCOM_JSON_API {
$this->exit = (bool) $exit;
- add_filter( 'home_url', array( $this, 'ensure_http_scheme_of_home_url' ), 10, 3 );
+ // This was causing problems with Jetpack, but is necessary for wpcom
+ // @see https://github.com/Automattic/jetpack/pull/2603
+ // @see r124548-wpcom
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ add_filter( 'home_url', array( $this, 'ensure_http_scheme_of_home_url' ), 10, 3 );
+ }
add_filter( 'user_can_richedit', '__return_true' );
@@ -149,6 +154,14 @@ class WPCOM_JSON_API {
$initialization = $this->initialize();
if ( 'OPTIONS' == $this->method ) {
+ /**
+ * Fires before the page output.
+ * Can be used to specify custom header options.
+ *
+ * @module json-api
+ *
+ * @since 3.1.0
+ */
do_action( 'wpcom_json_api_options' );
return $this->output( 200, '', 'plain/text' );
}
@@ -161,8 +174,20 @@ class WPCOM_JSON_API {
// Normalize path and extract API version
$this->path = untrailingslashit( $this->path );
preg_match( '#^/rest/v(\d+(\.\d+)*)#', $this->path, $matches );
- $this->path = substr( $this->path, strlen( $matches[0] ) );
- $this->version = $matches[1];
+
+ // HACK Alert!
+ // In order to workaround a bug in the iOS 5.6 release we need to handle /rest/sites/new as if it was
+ // /rest/v1.1/sites/new
+ if ( $this->path === '/rest/sites/new' ) {
+ $this->version = '1.1';
+ $this->path = '/sites/new';
+ } else if ( $this->path === '/rest/users/new' ) {
+ $this->version = '1.1';
+ $this->path = '/users/new';
+ } else {
+ $this->path = substr( $this->path, strlen( $matches[0] ) );
+ $this->version = $matches[1];
+ }
$allowed_methods = array( 'GET', 'POST' );
$four_oh_five = false;
@@ -176,7 +201,7 @@ class WPCOM_JSON_API {
if ( !empty( $origin ) && 'GET' == $this->method ) {
header( 'Access-Control-Allow-Origin: ' . esc_url_raw( $origin ) );
}
-
+
$this->path = substr( rtrim( $this->path, '/' ), 0, -5 );
// Show help for all matching endpoints regardless of method
$methods = $allowed_methods;
@@ -266,6 +291,13 @@ class WPCOM_JSON_API {
}
if ( $is_help ) {
+ /**
+ * Fires before the API output.
+ *
+ * @since 1.9.0
+ *
+ * @param string help.
+ */
do_action( 'wpcom_json_api_output', 'help' );
if ( 'json' === $help_content_type ) {
$docs = array();
@@ -288,6 +320,7 @@ class WPCOM_JSON_API {
return $this->output( 404, '', 'text/plain' );
}
+ /** This action is documented in class.json-api.php */
do_action( 'wpcom_json_api_output', $endpoint->stat );
$response = $this->process_request( $endpoint, $path_pieces );
@@ -317,7 +350,9 @@ class WPCOM_JSON_API {
else
$this->output( $status_code, $response, $content_type );
$this->exit = $exit;
- $this->finish_request();
+ if ( ! defined( 'XMLRPC_REQUEST' ) || ! XMLRPC_REQUEST ) {
+ $this->finish_request();
+ }
}
function set_output_status_code( $code = 200 ) {
@@ -529,6 +564,15 @@ class WPCOM_JSON_API {
// Returns true if the specified blog ID is a restricted blog
function is_restricted_blog( $blog_id ) {
+ /**
+ * Filters all REST API access and return a 403 unauthorized response for all Restricted blog IDs.
+ *
+ * @module json-api
+ *
+ * @since 3.4.0
+ *
+ * @param array $array Array of Blog IDs.
+ */
$restricted_blog_ids = apply_filters( 'wpcom_json_api_restricted_blog_ids', array() );
return true === in_array( $blog_id, $restricted_blog_ids );
}
diff --git a/plugins/jetpack/class.media-extractor.php b/plugins/jetpack/class.media-extractor.php
index f4aff27b..855c3fe8 100644
--- a/plugins/jetpack/class.media-extractor.php
+++ b/plugins/jetpack/class.media-extractor.php
@@ -377,7 +377,7 @@ class Jetpack_Media_Meta_Extractor {
public static function build_image_struct( $image_list ) {
if ( ! empty( $image_list ) ) {
$retval = array( 'image' => array() );
- $unique_imgs = array_unique( $image_list );
+ $image_list = array_unique( $image_list );
foreach ( $image_list as $img ) {
$retval['image'][] = array( 'url' => $img );
}
diff --git a/plugins/jetpack/class.media-summary.php b/plugins/jetpack/class.media-summary.php
index fa5e3b01..7a9c6acc 100644
--- a/plugins/jetpack/class.media-summary.php
+++ b/plugins/jetpack/class.media-summary.php
@@ -99,7 +99,7 @@ class Jetpack_Media_Summary {
if ( !empty( $extract['has']['embed'] ) ) {
foreach( $extract['embed']['url'] as $embed ) {
- if ( preg_match( '/((youtube|vimeo)\.com|youtu.be)/', $embed ) ) {
+ if ( preg_match( '/((youtube|vimeo|dailymotion)\.com|youtu.be)/', $embed ) ) {
if ( 0 == $return['count']['video'] ) {
$return['type'] = 'video';
$return['video'] = 'http://' . $embed;
@@ -120,6 +120,10 @@ class Jetpack_Media_Summary {
$poster_url_parts = parse_url( $poster_image );
$return['secure']['image'] = 'https://secure-a.vimeocdn.com' . $poster_url_parts['path'];
}
+ } else if ( false !== strpos( $embed, 'dailymotion' ) ) {
+ $return['image'] = str_replace( 'dailymotion.com/video/','dailymotion.com/thumbnail/video/', $embed );
+ $return['image'] = parse_url( $return['image'], PHP_URL_SCHEME ) === null ? 'http://' . $return['image'] : $return['image'];
+ $return['secure']['image'] = self::https( $return['image'] );
}
}
@@ -249,8 +253,11 @@ class Jetpack_Media_Summary {
'show_read_more' => false,
'max_words' => $max_words,
'max_chars' => $max_chars,
+ 'read_more_threshold' => 25,
) ) );
} else {
+
+ /** This filter is documented in core/src/wp-includes/post-template.php */
$post_excerpt = apply_filters( 'get_the_excerpt', $post_excerpt );
return self::clean_text( $post_excerpt );
}
diff --git a/plugins/jetpack/class.photon.php b/plugins/jetpack/class.photon.php
index b9c56f35..c5627fef 100644
--- a/plugins/jetpack/class.photon.php
+++ b/plugins/jetpack/class.photon.php
@@ -58,6 +58,9 @@ class Jetpack_Photon {
// Core image retrieval
add_filter( 'image_downsize', array( $this, 'filter_image_downsize' ), 10, 3 );
+ // Responsive image srcset substitution
+ add_filter( 'wp_calculate_image_srcset', array( $this, 'filter_srcset_array' ), 10, 4 );
+
// Helpers for maniuplated images
add_action( 'wp_enqueue_scripts', array( $this, 'action_wp_enqueue_scripts' ), 9 );
}
@@ -151,7 +154,17 @@ class Jetpack_Photon {
// Identify image source
$src = $src_orig = $images['img_url'][ $index ];
- // Allow specific images to be skipped
+ /**
+ * Allow specific images to be skipped by Photon.
+ *
+ * @module photon
+ *
+ * @since 2.0.3
+ *
+ * @param bool false Should Photon ignore this image. Default to false.
+ * @param string $src Image URL.
+ * @param string $tag Image Tag (Image HTML output).
+ */
if ( apply_filters( 'jetpack_photon_skip_image', false, $src, $tag ) )
continue;
@@ -195,7 +208,30 @@ class Jetpack_Photon {
}
// WP Attachment ID, if uploaded to this site
- if ( preg_match( '#class=["|\']?[^"\']*wp-image-([\d]+)[^"\']*["|\']?#i', $images['img_tag'][ $index ], $attachment_id ) && ( 0 === strpos( $src, $upload_dir['baseurl'] ) || apply_filters( 'jetpack_photon_image_is_local', false, compact( 'src', 'tag', 'images', 'index' ) ) ) ) {
+ if (
+ preg_match( '#class=["|\']?[^"\']*wp-image-([\d]+)[^"\']*["|\']?#i', $images['img_tag'][ $index ], $attachment_id ) &&
+ (
+ 0 === strpos( $src, $upload_dir['baseurl'] ) ||
+ /**
+ * Filter whether an image using an attachment ID in its class has to be uploaded to the local site to go through Photon.
+ *
+ * @module photon
+ *
+ * @since 2.0.3
+ *
+ * @param bool false Was the image uploaded to the local site. Default to false.
+ * @param array $args {
+ * Array of image details.
+ *
+ * @type $src Image URL.
+ * @type tag Image tag (Image HTML output).
+ * @type $images Array of information about the image.
+ * @type $index Image index.
+ * }
+ */
+ apply_filters( 'jetpack_photon_image_is_local', false, compact( 'src', 'tag', 'images', 'index' ) )
+ )
+ ) {
$attachment_id = intval( array_pop( $attachment_id ) );
if ( $attachment_id ) {
@@ -275,6 +311,26 @@ class Jetpack_Photon {
elseif ( false !== $height )
$args['h'] = $height;
+ /**
+ * Filter the array of Photon arguments added to an image when it goes through Photon.
+ * By default, only includes width and height values.
+ * @see https://developer.wordpress.com/docs/photon/api/
+ *
+ * @module photon
+ *
+ * @since 2.0.0
+ *
+ * @param array $args Array of Photon Arguments.
+ * @param array $args {
+ * Array of image details.
+ *
+ * @type $tag Image tag (Image HTML output).
+ * @type $src Image URL.
+ * @type $src_orig Original Image URL.
+ * @type $width Image width.
+ * @type $height Image height.
+ * }
+ */
$args = apply_filters( 'jetpack_photon_post_image_args', $args, compact( 'tag', 'src', 'src_orig', 'width', 'height' ) );
$photon_url = jetpack_photon_url( $src, $args );
@@ -361,17 +417,41 @@ class Jetpack_Photon {
*/
public function filter_image_downsize( $image, $attachment_id, $size ) {
// Don't foul up the admin side of things, and provide plugins a way of preventing Photon from being applied to images.
- if ( is_admin() || apply_filters( 'jetpack_photon_override_image_downsize', false, compact( 'image', 'attachment_id', 'size' ) ) )
+ if (
+ is_admin() ||
+ /**
+ * Provide plugins a way of preventing Photon from being applied to images retrieved from WordPress Core.
+ *
+ * @module photon
+ *
+ * @since 2.0.0
+ *
+ * @param bool false Stop Photon from being applied to the image. Default to false.
+ * @param array $args {
+ * Array of image details.
+ *
+ * @type $image Image URL.
+ * @type $attachment_id Attachment ID of the image.
+ * @type $size Image size. Can be a string (name of the image size, e.g. full) or an integer.
+ * }
+ */
+ apply_filters( 'jetpack_photon_override_image_downsize', false, compact( 'image', 'attachment_id', 'size' ) )
+ )
return $image;
// Get the image URL and proceed with Photon-ification if successful
$image_url = wp_get_attachment_url( $attachment_id );
+ // Set this to true later when we know we have size meta.
+ $has_size_meta = false;
+
if ( $image_url ) {
// Check if image URL should be used with Photon
if ( ! self::validate_image_url( $image_url ) )
return $image;
+ $intermediate = true; // For the fourth array item returned by the image_downsize filter.
+
// If an image is requested with a size known to WordPress, use that size's settings with Photon
if ( ( is_string( $size ) || is_int( $size ) ) && array_key_exists( $size, self::image_sizes() ) ) {
$image_args = self::image_sizes();
@@ -379,20 +459,34 @@ class Jetpack_Photon {
$photon_args = array();
- // `full` is a special case in WP
- // To ensure filter receives consistent data regardless of requested size, `$image_args` is overridden with dimensions of original image.
+ $image_meta = image_get_intermediate_size( $attachment_id, $size );
+
+ // 'full' is a special case: We need consistent data regardless of the requested size.
if ( 'full' == $size ) {
$image_meta = wp_get_attachment_metadata( $attachment_id );
+ $intermediate = false;
+ } elseif ( ! $image_meta ) {
+ // If we still don't have any image meta at this point, it's probably from a custom thumbnail size
+ // for an image that was uploaded before the custom image was added to the theme. Try to determine the size manually.
+ $image_meta = wp_get_attachment_metadata( $attachment_id );
+
if ( isset( $image_meta['width'], $image_meta['height'] ) ) {
- // 'crop' is true so Photon's `resize` method is used
- $image_args = array(
- 'width' => $image_meta['width'],
- 'height' => $image_meta['height'],
- 'crop' => true
- );
+ $image_resized = image_resize_dimensions( $image_meta['width'], $image_meta['height'], $image_args['width'], $image_args['height'], $image_args['crop'] );
+ if ( $image_resized ) { // This could be false when the requested image size is larger than the full-size image.
+ $image_meta['width'] = $image_resized[6];
+ $image_meta['height'] = $image_resized[7];
+ }
}
}
+ if ( isset( $image_meta['width'], $image_meta['height'] ) ) {
+ $image_args['width'] = $image_meta['width'];
+ $image_args['height'] = $image_meta['height'];
+
+ list( $image_args['width'], $image_args['height'] ) = image_constrain_size_for_editor( $image_args['width'], $image_args['height'], $size, 'display' );
+ $has_size_meta = true;
+ }
+
// Expose determined arguments to a filter before passing to Photon
$transform = $image_args['crop'] ? 'resize' : 'fit';
@@ -405,24 +499,48 @@ class Jetpack_Photon {
}
} else {
if ( ( 'resize' === $transform ) && $image_meta = wp_get_attachment_metadata( $attachment_id ) ) {
- // Lets make sure that we don't upscale images since wp never upscales them as well
- $smaller_width = ( ( $image_meta['width'] < $image_args['width'] ) ? $image_meta['width'] : $image_args['width'] );
- $smaller_height = ( ( $image_meta['height'] < $image_args['height'] ) ? $image_meta['height'] : $image_args['height'] );
+ if ( isset( $image_meta['width'], $image_meta['height'] ) ) {
+ // Lets make sure that we don't upscale images since wp never upscales them as well
+ $smaller_width = ( ( $image_meta['width'] < $image_args['width'] ) ? $image_meta['width'] : $image_args['width'] );
+ $smaller_height = ( ( $image_meta['height'] < $image_args['height'] ) ? $image_meta['height'] : $image_args['height'] );
- $photon_args[ $transform ] = $smaller_width . ',' . $smaller_height;
+ $photon_args[ $transform ] = $smaller_width . ',' . $smaller_height;
+ }
} else {
$photon_args[ $transform ] = $image_args['width'] . ',' . $image_args['height'];
}
}
+
+ /**
+ * Filter the Photon Arguments added to an image when going through Photon, when that image size is a string.
+ * Image size will be a string (e.g. "full", "medium") when it is known to WordPress.
+ *
+ * @module photon
+ *
+ * @since 2.0.0
+ *
+ * @param array $photon_args Array of Photon arguments.
+ * @param array $args {
+ * Array of image details.
+ *
+ * @type $image_args Array of Image arguments (width, height, crop).
+ * @type $image_url Image URL.
+ * @type $attachment_id Attachment ID of the image.
+ * @type $size Image size. Can be a string (name of the image size, e.g. full) or an integer.
+ * @type $transform Value can be resize or fit.
+ * @see https://developer.wordpress.com/docs/photon/api
+ * }
+ */
$photon_args = apply_filters( 'jetpack_photon_image_downsize_string', $photon_args, compact( 'image_args', 'image_url', 'attachment_id', 'size', 'transform' ) );
// Generate Photon URL
$image = array(
jetpack_photon_url( $image_url, $photon_args ),
- false,
- false
+ $has_size_meta ? $image_args['width'] : false,
+ $has_size_meta ? $image_args['height'] : false,
+ $intermediate
);
} elseif ( is_array( $size ) ) {
// Pull width and height values from the provided array, if possible
@@ -430,21 +548,58 @@ class Jetpack_Photon {
$height = isset( $size[1] ) ? (int) $size[1] : false;
// Don't bother if necessary parameters aren't passed.
- if ( ! $width || ! $height )
+ if ( ! $width || ! $height ) {
return $image;
+ }
+
+ $image_meta = wp_get_attachment_metadata( $attachment_id );
+ if ( isset( $image_meta['width'], $image_meta['height'] ) ) {
+ $image_resized = image_resize_dimensions( $image_meta['width'], $image_meta['height'], $width, $height );
+
+ if ( $image_resized ) { // This could be false when the requested image size is larger than the full-size image.
+ $width = $image_resized[6];
+ $height = $image_resized[7];
+ } else {
+ $width = $image_meta['width'];
+ $height = $image_meta['height'];
+ }
+
+ $has_size_meta = true;
+ }
+
+ list( $width, $height ) = image_constrain_size_for_editor( $width, $height, $size );
// Expose arguments to a filter before passing to Photon
$photon_args = array(
'fit' => $width . ',' . $height
);
+ /**
+ * Filter the Photon Arguments added to an image when going through Photon,
+ * when the image size is an array of height and width values.
+ *
+ * @module photon
+ *
+ * @since 2.0.0
+ *
+ * @param array $photon_args Array of Photon arguments.
+ * @param array $args {
+ * Array of image details.
+ *
+ * @type $width Image width.
+ * @type height Image height.
+ * @type $image_url Image URL.
+ * @type $attachment_id Attachment ID of the image.
+ * }
+ */
$photon_args = apply_filters( 'jetpack_photon_image_downsize_array', $photon_args, compact( 'width', 'height', 'image_url', 'attachment_id' ) );
// Generate Photon URL
$image = array(
jetpack_photon_url( $image_url, $photon_args ),
- false,
- false
+ $has_size_meta ? $width : false,
+ $has_size_meta ? $height : false,
+ $intermediate
);
}
}
@@ -453,6 +608,48 @@ class Jetpack_Photon {
}
/**
+ * Filters an array of image `srcset` values, replacing each URL with its Photon equivalent.
+ *
+ * @since 3.8.0
+ * @param array $sources An array of image urls and widths.
+ * @uses self::validate_image_url, jetpack_photon_url
+ * @return array An array of Photon image urls and widths.
+ */
+ public function filter_srcset_array( $sources, $size_array, $image_src, $image_meta ) {
+ $upload_dir = wp_upload_dir();
+
+ foreach ( $sources as $i => $source ) {
+ if ( ! self::validate_image_url( $source['url'] ) ) {
+ continue;
+ }
+
+ $url = $source['url'];
+ list( $width, $height ) = Jetpack_Photon::parse_dimensions_from_filename( $url );
+
+ // It's quicker to get the full size with the data we have already, if available
+ if ( isset( $image_meta['file'] ) ) {
+ $url = trailingslashit( $upload_dir['baseurl'] ) . $image_meta['file'];
+ } else {
+ $url = Jetpack_Photon::strip_image_dimensions_maybe( $url );
+ }
+
+ $args = array();
+ if ( 'w' === $source['descriptor'] ) {
+ if ( $height && ( $source['value'] == $width ) ) {
+ $args['resize'] = $width . ',' . $height;
+ } else {
+ $args['w'] = $source['value'];
+ }
+
+ }
+
+ $sources[ $i ]['url'] = jetpack_photon_url( $url, $args );
+ }
+
+ return $sources;
+ }
+
+ /**
** GENERAL FUNCTIONS
**/
@@ -479,8 +676,22 @@ class Jetpack_Photon {
) );
// Bail if scheme isn't http or port is set that isn't port 80
- if ( ( 'http' != $url_info['scheme'] || ! in_array( $url_info['port'], array( 80, null ) ) ) && apply_filters( 'jetpack_photon_reject_https', true ) )
+ if (
+ ( 'http' != $url_info['scheme'] || ! in_array( $url_info['port'], array( 80, null ) ) ) &&
+ /**
+ * Allow Photon to fetch images that are served via HTTPS.
+ *
+ * @module photon
+ *
+ * @since 2.4.0
+ * @since 3.9.0 Default to false.
+ *
+ * @param bool $reject_https Should Photon ignore images using the HTTPS scheme. Default to false.
+ */
+ apply_filters( 'jetpack_photon_reject_https', false )
+ ) {
return false;
+ }
// Bail if no host is found
if ( is_null( $url_info['host'] ) )
@@ -500,6 +711,17 @@ class Jetpack_Photon {
// If we got this far, we should have an acceptable image URL
// But let folks filter to decline if they prefer.
+ /**
+ * Overwrite the results of the validation steps an image goes through before to be considered valid to be used by Photon.
+ *
+ * @module photon
+ *
+ * @since 3.0.0
+ *
+ * @param bool true Is the image URL valid and can it be used by Photon. Default to true.
+ * @param string $url Image URL.
+ * @param array $parsed_url Array of information about the image.
+ */
return apply_filters( 'photon_validate_image_url', true, $url, $parsed_url );
}
diff --git a/plugins/jetpack/css/jetpack-admin-jitm-rtl.css b/plugins/jetpack/css/jetpack-admin-jitm-rtl.css
new file mode 100644
index 00000000..d563907e
--- /dev/null
+++ b/plugins/jetpack/css/jetpack-admin-jitm-rtl.css
@@ -0,0 +1,150 @@
+/*!
+* Do not modify this file directly. It is compiled Sass code.
+* @see: jetpack/_inc/jetpack.scss
+*/
+.jp-jitm {
+ border-radius: 2px;
+ max-width: 100%;
+ margin: 2em auto 1em auto;
+ padding: .85em;
+ background: #fcfcfc;
+ border: 1px solid #dedede;
+ text-align: center;
+}
+.jp-jitm:before, .jp-jitm:after {
+ content: "";
+ display: table;
+}
+.jp-jitm:after {
+ clear: both;
+}
+#screen-meta-links + .jp-jitm {
+ margin: 3em auto 0 1.5385em;
+}
+.jp-jitm .activate {
+ margin-top: .5em;
+}
+.jp-jitm .jp-emblem {
+ width: 25px;
+ height: 25px;
+ margin: .40em auto 0 1em;
+}
+.jp-jitm svg {
+ width: 100%;
+ height: 100%;
+}
+.jp-jitm path {
+ fill: #8cc258;
+}
+.jp-jitm .dismiss {
+ margin: 0;
+ text-decoration: none;
+ float: left;
+}
+.jp-jitm .dismiss:before {
+ color: #666;
+ font: 400 15px/1 dashicons;
+ content: '\f158';
+}
+.jp-jitm p {
+ font-size: 1em;
+ line-height: 165%;
+}
+.jp-jitm .j-spinner {
+ margin: 8px 0 0;
+ height: 17px;
+ width: 17px;
+}
+.jp-jitm .hide {
+ display: none;
+}
+form[name=post] > .jp-jitm:first-of-type {
+ margin-top: 1em;
+}
+@media (min-width: 800px) {
+ .jp-jitm .jp-emblem, .jp-jitm p {
+ float: right;
+ /* margin: .5em 1em 0 .5em;
+ padding-top: 4px; */
+ }
+ .jp-jitm .jp-emblem {
+ width: 20px;
+ height: 20px;
+ margin-left: .5em;
+ }
+ .jp-jitm p {
+ margin: .40em 0 0 1em;
+ }
+ .jp-jitm p + p {
+ margin: 0;
+ padding: 0;
+ }
+ .jp-jitm .activate {
+ margin-top: 0;
+ }
+}
+@media (max-width: 1100px) {
+ .jp-jitm {
+ margin: 2.5em .5em .5em .75em;
+ }
+ form[name=post] > .jp-jitm:first-of-type {
+ margin-right: auto;
+ margin-left: auto;
+ }
+}
+@media (max-width: 800px) {
+ .jp-jitm .jp-emblem {
+ margin: .40em auto 0 auto;
+ }
+}
+
+@media (min-width: 1100px) {
+ .update-core-php .jp-jitm {
+ margin: 3em auto 0 2em;
+ }
+}
+
+.jetpack-connected .media-modal-content .uploader-inline-content {
+ top: 20%;
+}
+
+@media only screen and (min-width: 800px) {
+ .media-menu .jp-jitm {
+ margin: 10px 0;
+ padding: 5px 5px 15px;
+ border-width: 1px 0;
+ }
+ .media-menu .jp-jitm .jp-emblem {
+ margin: 20px 15px 0 10px;
+ }
+ .media-menu .jp-jitm .msg {
+ width: 75%;
+ text-align: right;
+ margin: 0 0 10px;
+ }
+ .media-menu .jp-jitm .msg + p {
+ text-align: center;
+ width: 100%;
+ }
+}
+@media only screen and (max-width: 900px) {
+ .media-menu .jp-jitm {
+ display: none;
+ margin: .5em 3%;
+ border-width: 1px;
+ }
+ .media-menu .jp-jitm .msg {
+ margin-top: 20px;
+ width: 88%;
+ margin-right: auto;
+ margin-left: auto;
+ }
+ .media-menu.visible .jp-jitm {
+ display: block;
+ }
+}
+
+/*# sourceMappingURL=jetpack-admin-jitm.css.map */
+.jp-jitm{border-radius:2px;max-width:100%;margin:2em auto 1em auto;padding:.85em;background:#fcfcfc;border:1px solid #dedede;text-align:center}.jp-jitm:before,.jp-jitm:after{content:"";display:table}.jp-jitm:after{clear:both}#screen-meta-links+.jp-jitm{margin:3em auto 0 1.5385em}.jp-jitm .activate{margin-top:.5em}.jp-jitm .jp-emblem{width:25px;height:25px;margin:.40em auto 0 1em}.jp-jitm svg{width:100%;height:100%}.jp-jitm path{fill:#8cc258}.jp-jitm .dismiss{margin:0;text-decoration:none;float:left}.jp-jitm .dismiss:before{color:#666;font:400 15px/1 dashicons;content:'\f158'}.jp-jitm p{font-size:1em;line-height:165%}.jp-jitm .j-spinner{margin:8px 0 0;height:17px;width:17px}.jp-jitm .hide{display:none}form[name=post]>.jp-jitm:first-of-type{margin-top:1em}@media (min-width: 800px){.jp-jitm .jp-emblem,.jp-jitm p{float:right}.jp-jitm .jp-emblem{width:20px;height:20px;margin-left:.5em}.jp-jitm p{margin:.40em 0 0 1em}.jp-jitm p+p{margin:0;padding:0}.jp-jitm .activate{margin-top:0}}@media (max-width: 1100px){.jp-jitm{margin:2.5em .5em .5em .75em}form[name=post]>.jp-jitm:first-of-type{margin-right:auto;margin-left:auto}}@media (max-width: 800px){.jp-jitm .jp-emblem{margin:.40em auto 0 auto}}@media (min-width: 1100px){.update-core-php .jp-jitm{margin:3em auto 0 2em}}.jetpack-connected .media-modal-content .uploader-inline-content{top:20%}@media only screen and (min-width: 800px){.media-menu .jp-jitm{margin:10px 0;padding:5px 5px 15px;border-width:1px 0}.media-menu .jp-jitm .jp-emblem{margin:20px 15px 0 10px}.media-menu .jp-jitm .msg{width:75%;text-align:right;margin:0 0 10px}.media-menu .jp-jitm .msg+p{text-align:center;width:100%}}@media only screen and (max-width: 900px){.media-menu .jp-jitm{display:none;margin:.5em 3%;border-width:1px}.media-menu .jp-jitm .msg{margin-top:20px;width:88%;margin-right:auto;margin-left:auto}.media-menu.visible .jp-jitm{display:block}}
+
+/*# sourceMappingURL=jetpack-admin-jitm.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin-jitm-rtl.min.css b/plugins/jetpack/css/jetpack-admin-jitm-rtl.min.css
new file mode 100644
index 00000000..f807fb2c
--- /dev/null
+++ b/plugins/jetpack/css/jetpack-admin-jitm-rtl.min.css
@@ -0,0 +1,3 @@
+.jp-jitm{border-radius:2px;max-width:100%;margin:2em auto 1em auto;padding:.85em;background:#fcfcfc;border:1px solid #dedede;text-align:center}.jp-jitm:before,.jp-jitm:after{content:"";display:table}.jp-jitm:after{clear:both}#screen-meta-links+.jp-jitm{margin:3em auto 0 1.5385em}.jp-jitm .activate{margin-top:.5em}.jp-jitm .jp-emblem{width:25px;height:25px;margin:.40em auto 0 1em}.jp-jitm svg{width:100%;height:100%}.jp-jitm path{fill:#8cc258}.jp-jitm .dismiss{margin:0;text-decoration:none;float:left}.jp-jitm .dismiss:before{color:#666;font:400 15px/1 dashicons;content:'\f158'}.jp-jitm p{font-size:1em;line-height:165%}.jp-jitm .j-spinner{margin:8px 0 0;height:17px;width:17px}.jp-jitm .hide{display:none}form[name=post]>.jp-jitm:first-of-type{margin-top:1em}@media (min-width: 800px){.jp-jitm .jp-emblem,.jp-jitm p{float:right}.jp-jitm .jp-emblem{width:20px;height:20px;margin-left:.5em}.jp-jitm p{margin:.40em 0 0 1em}.jp-jitm p+p{margin:0;padding:0}.jp-jitm .activate{margin-top:0}}@media (max-width: 1100px){.jp-jitm{margin:2.5em .5em .5em .75em}form[name=post]>.jp-jitm:first-of-type{margin-right:auto;margin-left:auto}}@media (max-width: 800px){.jp-jitm .jp-emblem{margin:.40em auto 0 auto}}@media (min-width: 1100px){.update-core-php .jp-jitm{margin:3em auto 0 2em}}.jetpack-connected .media-modal-content .uploader-inline-content{top:20%}@media only screen and (min-width: 800px){.media-menu .jp-jitm{margin:10px 0;padding:5px 5px 15px;border-width:1px 0}.media-menu .jp-jitm .jp-emblem{margin:20px 15px 0 10px}.media-menu .jp-jitm .msg{width:75%;text-align:right;margin:0 0 10px}.media-menu .jp-jitm .msg+p{text-align:center;width:100%}}@media only screen and (max-width: 900px){.media-menu .jp-jitm{display:none;margin:.5em 3%;border-width:1px}.media-menu .jp-jitm .msg{margin-top:20px;width:88%;margin-right:auto;margin-left:auto}.media-menu.visible .jp-jitm{display:block}}
+
+/*# sourceMappingURL=jetpack-admin-jitm.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin-jitm.css b/plugins/jetpack/css/jetpack-admin-jitm.css
new file mode 100644
index 00000000..a643c327
--- /dev/null
+++ b/plugins/jetpack/css/jetpack-admin-jitm.css
@@ -0,0 +1,147 @@
+/*!
+* Do not modify this file directly. It is compiled Sass code.
+* @see: jetpack/_inc/jetpack.scss
+*/
+.jp-jitm {
+ border-radius: 2px;
+ max-width: 100%;
+ margin: 2em auto 1em auto;
+ padding: .85em;
+ background: #fcfcfc;
+ border: 1px solid #dedede;
+ text-align: center;
+}
+.jp-jitm:before, .jp-jitm:after {
+ content: "";
+ display: table;
+}
+.jp-jitm:after {
+ clear: both;
+}
+#screen-meta-links + .jp-jitm {
+ margin: 3em 1.5385em 0 auto;
+}
+.jp-jitm .activate {
+ margin-top: .5em;
+}
+.jp-jitm .jp-emblem {
+ width: 25px;
+ height: 25px;
+ margin: .40em 1em 0 auto;
+}
+.jp-jitm svg {
+ width: 100%;
+ height: 100%;
+}
+.jp-jitm path {
+ fill: #8cc258;
+}
+.jp-jitm .dismiss {
+ margin: 0;
+ text-decoration: none;
+ float: right;
+}
+.jp-jitm .dismiss:before {
+ color: #666;
+ font: 400 15px/1 dashicons;
+ content: '\f158';
+}
+.jp-jitm p {
+ font-size: 1em;
+ line-height: 165%;
+}
+.jp-jitm .j-spinner {
+ margin: 8px 0 0;
+ height: 17px;
+ width: 17px;
+}
+.jp-jitm .hide {
+ display: none;
+}
+form[name=post] > .jp-jitm:first-of-type {
+ margin-top: 1em;
+}
+@media (min-width: 800px) {
+ .jp-jitm .jp-emblem, .jp-jitm p {
+ float: left;
+ /* margin: .5em 1em 0 .5em;
+ padding-top: 4px; */
+ }
+ .jp-jitm .jp-emblem {
+ width: 20px;
+ height: 20px;
+ margin-right: .5em;
+ }
+ .jp-jitm p {
+ margin: .40em 1em 0 0;
+ }
+ .jp-jitm p + p {
+ margin: 0;
+ padding: 0;
+ }
+ .jp-jitm .activate {
+ margin-top: 0;
+ }
+}
+@media (max-width: 1100px) {
+ .jp-jitm {
+ margin: 2.5em .75em .5em .5em;
+ }
+ form[name=post] > .jp-jitm:first-of-type {
+ margin-left: auto;
+ margin-right: auto;
+ }
+}
+@media (max-width: 800px) {
+ .jp-jitm .jp-emblem {
+ margin: .40em auto 0 auto;
+ }
+}
+
+@media (min-width: 1100px) {
+ .update-core-php .jp-jitm {
+ margin: 3em 2em 0 auto;
+ }
+}
+
+.jetpack-connected .media-modal-content .uploader-inline-content {
+ top: 20%;
+}
+
+@media only screen and (min-width: 800px) {
+ .media-menu .jp-jitm {
+ margin: 10px 0;
+ padding: 5px 5px 15px;
+ border-width: 1px 0;
+ }
+ .media-menu .jp-jitm .jp-emblem {
+ margin: 20px 10px 0 15px;
+ }
+ .media-menu .jp-jitm .msg {
+ width: 75%;
+ text-align: left;
+ margin: 0 0 10px;
+ }
+ .media-menu .jp-jitm .msg + p {
+ text-align: center;
+ width: 100%;
+ }
+}
+@media only screen and (max-width: 900px) {
+ .media-menu .jp-jitm {
+ display: none;
+ margin: .5em 3%;
+ border-width: 1px;
+ }
+ .media-menu .jp-jitm .msg {
+ margin-top: 20px;
+ width: 88%;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ .media-menu.visible .jp-jitm {
+ display: block;
+ }
+}
+
+/*# sourceMappingURL=jetpack-admin-jitm.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin-jitm.css.map b/plugins/jetpack/css/jetpack-admin-jitm.css.map
new file mode 100644
index 00000000..007265cf
--- /dev/null
+++ b/plugins/jetpack/css/jetpack-admin-jitm.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../scss/jetpack-admin-jitm.scss","jetpack-admin-jitm.css"],"names":[],"mappings":"AAEA;;;GAGC;ACDD;EDGC,oBAAmB;EACnB,iBAAQ;EACR,2BAAkB;ECDjB,gBAAe;EDIhB,qBAAA;EACC,2BAAW;EACX,oBAAc;ECFf;ADIA;EACC,aAAW;ECFX,gBAAe;EDKhB;ACHD;EACE,aAAY;EDMb;ACJD;EACE,6BAA4B;EDM7B;ACJD;EDME,kBAAY;ECJb;AACD;EDOC,aAAI;EACH,cAAW;EACX,0BAAY;ECLb;ADQA;EACC,aAAM;ECNN,cAAa;EDSd;ACPD;EDSE,eAAA;ECPD;AACD;EDQE,WAAA;EACC,uBAAW;EACX,cAAM;ECNR;AACD;EDUC,aAAE;EACD,4BAAc;EACd,kBAAiB;ECRlB;ADWA;EACC,gBAAe;EACf,mBAAY;ECTb;AACD;EDYC,iBAAM;EACL,cAAa;ECVb,aAAY;EDab;ACXD;EACE,eAAc;EDcf;ACZD;EACE,iBDaY;ECZb;AACD;EACE;IDcA,aAAA;IACC;yBACY;ICZZ;EACD;IDcA,aAAE;IACD,cAAQ;ICZP,oBAAmB;IDcrB;ECZA;IDcC,uBAAU;ICZV;EDcD;IACC,WAAU;ICZT,YAAW;IACZ;EDeF;IA7FD,eAAS;ICiFN;EACF;AACD;EACE;IDcC,+BAAkB;ICZlB;EACD;IDeD,mBAAA;IACC,oBAAW;ICbV;EACF;AACD;EACE;IDmBD,2BAA2B;IAD5B;ECfC;;AAED;EACE;IDiBF,wBAAA;IACC;ECfA;;ADoBA;EAEC,UAAA;EClBD;;AAED;EACE;IDoBC,gBAAA;IACC,uBAAQ;IClBR,qBAAoB;IDqBrB;ECnBD;IDqBE,0BAAgB;ICnBjB;EACD;IDsBC,YAAA;IACC,kBAAY;IACZ,kBAAW;ICpBZ;EACD;IDyBD,oBAAA;IAEC,aAAA;ICxBC;EACF;AACD;EACE;ID0BC,eAAA;IACC,iBAAgB;IAChB,mBAAU;ICxBX;EACD;IACE,kBAAiB;ID4BnB,YAAA;IACC,mBAAc;IC1Bb,oBAAmB;IACpB;EACD;IACE,gBAAe;IAChB;EACF","file":"jetpack-admin-jitm.css"} \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin-jitm.min.css b/plugins/jetpack/css/jetpack-admin-jitm.min.css
new file mode 100644
index 00000000..322a387a
--- /dev/null
+++ b/plugins/jetpack/css/jetpack-admin-jitm.min.css
@@ -0,0 +1,3 @@
+.jp-jitm{border-radius:2px;max-width:100%;margin:2em auto 1em auto;padding:.85em;background:#fcfcfc;border:1px solid #dedede;text-align:center}.jp-jitm:before,.jp-jitm:after{content:"";display:table}.jp-jitm:after{clear:both}#screen-meta-links+.jp-jitm{margin:3em 1.5385em 0 auto}.jp-jitm .activate{margin-top:.5em}.jp-jitm .jp-emblem{width:25px;height:25px;margin:.40em 1em 0 auto}.jp-jitm svg{width:100%;height:100%}.jp-jitm path{fill:#8cc258}.jp-jitm .dismiss{margin:0;text-decoration:none;float:right}.jp-jitm .dismiss:before{color:#666;font:400 15px/1 dashicons;content:'\f158'}.jp-jitm p{font-size:1em;line-height:165%}.jp-jitm .j-spinner{margin:8px 0 0;height:17px;width:17px}.jp-jitm .hide{display:none}form[name=post]>.jp-jitm:first-of-type{margin-top:1em}@media (min-width: 800px){.jp-jitm .jp-emblem,.jp-jitm p{float:left}.jp-jitm .jp-emblem{width:20px;height:20px;margin-right:.5em}.jp-jitm p{margin:.40em 1em 0 0}.jp-jitm p+p{margin:0;padding:0}.jp-jitm .activate{margin-top:0}}@media (max-width: 1100px){.jp-jitm{margin:2.5em .75em .5em .5em}form[name=post]>.jp-jitm:first-of-type{margin-left:auto;margin-right:auto}}@media (max-width: 800px){.jp-jitm .jp-emblem{margin:.40em auto 0 auto}}@media (min-width: 1100px){.update-core-php .jp-jitm{margin:3em 2em 0 auto}}.jetpack-connected .media-modal-content .uploader-inline-content{top:20%}@media only screen and (min-width: 800px){.media-menu .jp-jitm{margin:10px 0;padding:5px 5px 15px;border-width:1px 0}.media-menu .jp-jitm .jp-emblem{margin:20px 10px 0 15px}.media-menu .jp-jitm .msg{width:75%;text-align:left;margin:0 0 10px}.media-menu .jp-jitm .msg+p{text-align:center;width:100%}}@media only screen and (max-width: 900px){.media-menu .jp-jitm{display:none;margin:.5em 3%;border-width:1px}.media-menu .jp-jitm .msg{margin-top:20px;width:88%;margin-left:auto;margin-right:auto}.media-menu.visible .jp-jitm{display:block}}
+
+/*# sourceMappingURL=jetpack-admin-jitm.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin-jitm.min.css.map b/plugins/jetpack/css/jetpack-admin-jitm.min.css.map
new file mode 100644
index 00000000..5138446b
--- /dev/null
+++ b/plugins/jetpack/css/jetpack-admin-jitm.min.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../scss/jetpack-admin-jitm.scss"],"names":[],"mappings":"AAEA,SACC,kBACA,CAAA,cACA,CAAA,wBACA,CAAA,aACA,CAAA,kBACA,CAAA,wBACA,CAAA,iBAGA,CAAA,8BACC,WACA,CAAA,aAED,CAAA,cACC,WAGD,CAAA,2BACE,2BAGF,CAAA,kBACC,gBAED,CAAA,mBACC,WACA,CAAA,WACA,CAAA,uBAGD,CAAA,YACC,WACA,CAAA,WAGD,CAAA,aACC,aAGD,CAAA,iBACC,SACA,CAAA,oBACA,CAAA,WACA,CAAA,wBACC,WACA,CAAA,yBACA,CAAA,eAIF,CAAA,UACC,cACA,CAAA,gBAGD,CAAA,mBACC,eACA,CAAA,WACA,CAAA,UAGD,CAAA,cACC,aAGD,CAAA,sCACC,eAGD,CAAA,yBACC,+BACC,WAID,CAAA,mBACC,WACA,CAAA,WACA,CAAA,iBAED,CAAA,UACC,qBAED,CAAA,YACC,SACA,CAAA,SAED,CAAA,kBACC,aAAa,CAAA,AAIf,CAAA,0BA7FD,SA8FE,6BAEA,CAAA,sCACC,iBACA,CAAA,iBAAkB,CAAA,AAIpB,CAAA,yBACC,oBACC,yBAAyB,CAAA,AAQ3B,CAAA,0BADD,0BAC8B,sBAAsB,CAAA,AAIpD,CAAA,gEACC,QAKA,CAAA,yCAEC,qBACC,cACA,CAAA,oBACA,CAAA,kBAEA,CAAA,+BACC,wBAGD,CAAA,yBACC,UACA,CAAA,eACA,CAAA,eAGD,CAAA,2BACC,kBACA,CAAA,UAAW,CAAA,AAMd,CAAA,yCAEC,qBACC,aACA,CAAA,cACA,CAAA,gBAEA,CAAA,yBACC,gBACA,CAAA,SACA,CAAA,gBACA,CAAA,iBAIF,CAAA,4BACC,cAAc,CAAA,CAAA","file":"jetpack-admin-jitm.min.css"} \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin-rtl.css b/plugins/jetpack/css/jetpack-admin-rtl.css
index 8cd9b2e6..5f5a7f5d 100644
--- a/plugins/jetpack/css/jetpack-admin-rtl.css
+++ b/plugins/jetpack/css/jetpack-admin-rtl.css
@@ -539,10 +539,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
margin-right: 36px;
}
-#wpfooter {
- display: none;
-}
-
.jp-content {
background: #f9f9f9;
margin: 0;
@@ -776,17 +772,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
max-width: 600px;
}
-.flyby {
- position: relative;
- max-width: 1200px;
- margin: 0 auto;
-}
-@media (max-width: 900px) {
- .flyby {
- display: none;
- }
-}
-
.flyer {
position: absolute;
bottom: -200px;
@@ -1249,6 +1234,37 @@ ul#adminmenu a.toplevel_page_jetpack:after {
border-color: #69bedd;
box-shadow: inset -4px 0 0 #69bedd;
}
+.module .button,
+.module .button-primary {
+ margin-top: 15px;
+}
+@media (max-width: 530px) {
+ .module .configure, .module .activate {
+ display: block;
+ width: 100%;
+ text-align: center;
+ }
+ .module .button,
+ .module .button-primary {
+ width: 50%;
+ }
+ .module .button-primary {
+ line-height: normal;
+ padding: 6px 14px;
+ height: auto;
+ font-size: 14px;
+ }
+}
+@media screen and (max-width: 450px) {
+ .module .button,
+ .module .button-primary {
+ margin: 20px auto 0 auto;
+ }
+ .module .button.alignright,
+ .module .button-primary.alignright {
+ float: none;
+ }
+}
@media (max-width: 1147px) {
.cat .module:nth-child(3n + 1) {
margin: .75% 1.5% .75% 0;
@@ -1590,27 +1606,27 @@ ul#adminmenu a.toplevel_page_jetpack:after {
height: 195px;
}
.footer:after {
- bottom: 0;
- width: 100%;
- height: 50px;
- background: url("../images/the-footcloud.svg") center bottom no-repeat;
- background-size: auto 45px;
- z-index: 1;
+ display: none;
}
.footer .download-jetpack {
margin-bottom: 33px;
}
+@media (min-width: 1147px) {
+ .footer {
+ padding-bottom: 35px;
+ }
+}
@media (max-width: 1147px) {
.footer {
padding-top: 165px;
padding-bottom: 0;
+ /*&:after {
+ display: none;
+ }*/
}
.footer:before {
background-size: 160% auto;
}
- .footer:after {
- display: none;
- }
.footer ul {
float: none;
overflow: hidden;
@@ -1652,14 +1668,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
color: #81A844;
}
@media (max-width: 1147px) {
- .footer nav {
- border: none;
- padding: 0;
- }
.footer nav a:hover, .footer nav a:focus,
.footer nav a:visited:hover,
.footer nav a:visited:focus {
- color: #fff;
+ color: #81a844;
}
}
@media (max-width: 530px) {
@@ -1687,10 +1699,22 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.secondary-footer li {
margin-left: 5px;
}
-@media (max-width: 1147px) {
+@media (min-width: 782px) {
+ .secondary-footer {
+ padding: 8px 15px 10px;
+ margin-bottom: 30px;
+ border-bottom: 1px solid #eee;
+ }
+}
+@media (min-width: 1147px) {
.secondary-footer {
- margin: 0 30px;
- padding: 8px 15px 30px;
+ margin-bottom: 0;
+ }
+}
+@media (max-width: 782px) {
+ .secondary-footer {
+ padding: 8px 15px 8px;
+ border-bottom: none;
}
}
@media (max-width: 530px) {
@@ -1712,9 +1736,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
font-size: 0.78571em;
font-family: "Gill Sans", "Gill Sans MT", "Open Sans", Helvetica, Arial, sans-serif;
text-transform: uppercase;
- /*@include breakpoint(large-desktop){
- display: none;
- };*/
}
.footer .a8c-attribution a {
display: inline-block;
@@ -1739,8 +1760,17 @@ ul#adminmenu a.toplevel_page_jetpack:after {
animation: candy .4s ease-in-out;
}
-.secondary {
- padding: 10px 15px 0 15px;
+@media (min-width: 782px) {
+ .secondary {
+ padding: 0 15px 10px 15px;
+ border-bottom: 1px solid #eee;
+ }
+}
+@media (min-width: 1147px) {
+ .secondary {
+ padding: 0 15px 10px 15px;
+ border-bottom: none;
+ }
}
.jetpack-message {
@@ -1777,7 +1807,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
margin-top: 15px;
display: none;
}
-.jetpack-message h4 {
+.jetpack-message .squeezer h2 {
+ font-size: 1em;
+}
+.jetpack-message h2 {
color: #fff;
margin: 0;
}
@@ -1826,10 +1859,12 @@ ul#adminmenu a.toplevel_page_jetpack:after {
max-width: 100%;
}
+.jetpack-modules #site-icon-deprecated .info,
.modules h3.icon,
.jetpack-modules .info a {
width: auto;
}
+.jetpack-modules #site-icon-deprecated .info:before,
.modules h3.icon:before,
.jetpack-modules .info a:before {
display: inline-block;
@@ -2037,6 +2072,14 @@ ul#adminmenu a.toplevel_page_jetpack:after {
content: '\f475';
}
+.jetpack-modules #site-icon-deprecated .info:before {
+ content: '\f475';
+}
+
+.jetpack-modules #sitemaps .info a:before {
+ content: '\f507';
+}
+
@media (max-width: 782px) {
.blog .type-post,
.page-template-default .type-page,
@@ -2062,7 +2105,7 @@ ul#adminmenu a.toplevel_page_jetpack:after {
width: 100%;
}
}
-@media screen and (max-width: 400px) {
+@media screen and (max-width: 515px) {
.jp-frame .header-nav {
padding-bottom: 10px;
}
@@ -2082,6 +2125,14 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.jp-frame .header-nav .jetpack-modules + .jetpack-modules {
text-align: right;
}
+ .jp-frame .header-nav .jetpack-modules:nth-child(4) {
+ text-align: center;
+ margin: 0 auto;
+ width: 100%;
+ }
+ .jp-frame .header-nav .jetpack-modules:nth-child(4) a {
+ padding: 0 10px;
+ }
}
@media (max-width: 320px) {
.jetpack_page_jetpack_modules .wrap {
@@ -2205,6 +2256,13 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.table-bordered.jetpack-modules tr.jetpack-module#vaultpress {
opacity: 1;
}
+.table-bordered.jetpack-modules tr.jetpack-module.deprecated span {
+ color: #888;
+}
+.table-bordered.jetpack-modules tr.jetpack-module.deprecated .dep-msg {
+ margin-left: 10px;
+ color: #555;
+}
.table-bordered.jetpack-modules tr.jetpack-module th,
.table-bordered.jetpack-modules tr.jetpack-module td {
background: #fff;
@@ -2349,10 +2407,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
}
.wrap .manage-right.show {
display: block;
- position: fixed;
overflow-y: auto;
overflow-x: hidden;
position: absolute;
+ z-index: 100000;
}
.wrap .manage-right .search-bar {
margin-bottom: 18px;
@@ -2394,7 +2452,7 @@ ul#adminmenu a.toplevel_page_jetpack:after {
border-radius: 2px;
margin-right: -5px;
background: #0D72B2;
- color: #FFF;
+ color: #fff;
}
.wrap .manage-right .subsubsub .current .count {
color: #BCD7E7;
@@ -2425,6 +2483,44 @@ ul#adminmenu a.toplevel_page_jetpack:after {
}
}
+@media (max-width: 782px) {
+ .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary):not(.check-column) {
+ padding: 11px 10px;
+ display: block;
+ }
+
+ .jetpack_page_jetpack_modules #doaction {
+ padding: 7px 14px;
+ }
+ .jetpack_page_jetpack_modules .fixed-top thead .check-column {
+ padding: 28px 10px 0 10px;
+ }
+ .jetpack_page_jetpack_modules .filter-search {
+ margin-top: 28px;
+ }
+ .jetpack_page_jetpack_modules .filter-search .button {
+ padding: 7px 14px;
+ }
+
+ .manage-right.show .subsubsub li {
+ padding: 5px;
+ }
+}
+@media (max-width: 650px) {
+ .table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions {
+ float: none;
+ padding-right: 18px;
+ }
+}
+@media (max-width: 430px) {
+ .table-bordered.jetpack-modules tr.jetpack-module td .row-actions {
+ display: none;
+ }
+
+ .table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions {
+ display: block;
+ }
+}
/* 'Pages' is a temporary location for these styles, until we can break them up into their proper atmoic locations */
.configure-module p {
font-size: 14px;
@@ -2641,6 +2737,183 @@ ul#adminmenu a.toplevel_page_jetpack:after {
}
}
/* end < 400px */
+.my-jetpack-actions {
+ margin: 0 0 40px 0;
+}
+.my-jetpack-actions .j-col {
+ padding: 0;
+ text-align: center;
+}
+.my-jetpack-actions #user-list {
+ height: 30px;
+ margin-top: -1px;
+ margin-right: -3px;
+}
+
+#jetpack-disconnect-content {
+ display: none;
+ text-align: center;
+}
+#jetpack-disconnect-content .cancel-disconnect {
+ display: block;
+ margin-top: 10px;
+}
+
+.connection-details {
+ border: 1px #ddd solid;
+}
+.connection-details.local-user {
+ margin-bottom: 10px;
+}
+.connection-details .user-01,
+.connection-details .wpuser-02,
+.connection-details .action-btns {
+ padding: 10px;
+}
+.connection-details .user-01 .button, .connection-details .user-01 select,
+.connection-details .wpuser-02 .button,
+.connection-details .wpuser-02 select,
+.connection-details .action-btns .button,
+.connection-details .action-btns select {
+ margin-top: 5px;
+}
+.connection-details .wpuser-02 {
+ margin-top: 10px;
+}
+.connection-details h3 {
+ padding: 10px;
+ margin: 0;
+ background: #eee;
+ border-bottom: 1px #ddd solid;
+ font-size: 14px;
+}
+
+.jp-user img {
+ margin-left: 10px;
+ border-radius: 50%;
+}
+
+.jp-user div,
+.wp-user div,
+.wp-action div {
+ display: inline-block;
+ width: 100%;
+}
+
+.j-col.jp-user,
+.j-col.wp-user,
+.j-col.wp-action {
+ padding: 0;
+}
+
+.my-jetpack-actions select {
+ max-width: 150px;
+}
+
+.j-actions .button:nth-child(3) {
+ margin-left: 5px;
+}
+
+.j-row.disconnect {
+ text-align: center;
+}
+.j-row.disconnect .button {
+ margin: 0 auto;
+}
+
+a.what-is-primary {
+ color: #b4b9be;
+ margin-right: 4px;
+}
+
+@media (max-width: 782px) {
+ .wp-action {
+ border-top: 1px #ddd solid;
+ }
+ .wp-action h3 {
+ display: none;
+ }
+}
+@media screen and (max-width: 500px) {
+ .connection-details {
+ font-size: 11px;
+ }
+ .connection-details h3 {
+ font-size: 12px;
+ padding: 5px;
+ }
+ .connection-details .user-01,
+ .connection-details .wpuser-02 {
+ padding: 6px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 200px;
+ }
+ .connection-details .action-btns {
+ text-align: center;
+ }
+}
+@media (max-width: 530px) {
+ .connection-details .wpuser-02 {
+ margin-top: 0;
+ padding: 12px;
+ }
+}
+@media screen and (max-width: 450px) {
+ .j-actions .button {
+ width: 100%;
+ margin-bottom: 5px;
+ text-align: center;
+ }
+ .j-actions .button.alignright {
+ float: none;
+ }
+}
+@media screen and (max-width: 350px) {
+ .user-01,
+ .wpuser-02 {
+ max-width: 100px;
+ }
+}
+.manage__icon {
+ width: 155px;
+ height: 155px;
+ margin: 20px auto;
+}
+
+.manage-page .manage__description {
+ max-width: 600px;
+ text-align: center;
+ font-size: 22px;
+ color: #999;
+ margin: 20px auto;
+}
+.manage-page .manage__button {
+ font-size: 16px;
+ padding: 0 20px;
+ height: 40px;
+ line-height: 40px;
+}
+
+.manage__title .genericon {
+ font-size: 38px;
+ color: #81A944;
+}
+
+.manage__link {
+ font-size: 16px;
+ padding: 0 20px;
+ height: 40px;
+ line-height: 40px;
+ font-weight: normal;
+}
+.manage__link .genericon {
+ font-size: 28px;
+ vertical-align: middle;
+ margin-top: -6px;
+}
+
.jp-content .hide {
display: none;
}
@@ -2704,6 +2977,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
background: #fefefe;
border: 1px #dae0e2 solid;
padding-bottom: 20px;
+ text-align: center;
+}
+#jump-start-area .connect-btn {
+ text-align: center;
}
#jump-start-area #jumpstart-cta,
#jump-start-area .jumpstart-desc {
@@ -2736,6 +3013,8 @@ ul#adminmenu a.toplevel_page_jetpack:after {
#jumpstart-cta {
text-align: center;
+ display: inline-block;
+ float: none;
}
.dismiss-jumpstart {
@@ -2796,57 +3075,338 @@ ul#adminmenu a.toplevel_page_jetpack:after {
display: inline-block;
}
-.miguel {
+.nux-intro h3 {
+ background: #81a844;
+ color: #fff;
+ font-weight: 600;
+ padding: .75em;
+ margin: 0;
+}
+.nux-intro h4 {
+ margin: 0 0 2px 0;
+}
+.nux-intro p {
+ text-align: center;
+ font-size: 1.24em;
+ line-height: 175%;
+}
+.nux-intro a {
+ transition: all .4s ease;
+}
+.nux-intro .j-col {
+ padding: 0 0.5em;
+}
+.nux-intro .j-col:first-of-type {
+ padding-right: 0;
+}
+.nux-intro .j-col:last-of-type {
+ padding-left: 0;
+}
+.nux-intro .nux-in {
+ background: #ececec;
+ -webkit-border-bottom-left-radius: 6px;
+ -webkit-border-bottom-right-radius: 6px;
+ -moz-border-radius-bottomright: 6px;
+ -moz-border-radius-bottomleft: 6px;
+ border-bottom-left-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+.nux-intro .nux-in h3 {
+ font-size: 1.10em;
+ -webkit-border-top-right-radius: 6px;
+ -webkit-border-top-left-radius: 6px;
+ -moz-border-radius-topleft: 6px;
+ -moz-border-radius-topright: 6px;
+ border-top-right-radius: 6px;
+ border-top-left-radius: 6px;
+}
+.nux-intro .nux-in h3 .dashicons {
+ float: left;
+ color: #658435;
+ font-size: 1.25em;
+ padding-right: 0;
+}
+.nux-intro .nux-in h3 .dashicons:hover {
+ color: #57722e;
+}
+.nux-intro .nux-in p {
+ font-size: .9em;
+ line-height: 150%;
+ margin: 0;
+ text-align: right;
+ color: #686f72;
+}
+.nux-intro .nux-in .j-row {
+ border-bottom: 1px #f9f9f9 solid;
+ padding: 5px 0;
+ position: relative;
+ min-height: 70px;
+}
+.nux-intro .nux-in .j-row:hover {
+ background: #e0e0e0;
+}
+.nux-intro .nux-in .unavailable {
+ opacity: 0.5;
+}
+.nux-intro .nux-in .unavailable .act {
display: none;
- position: fixed;
- opacity: .35;
- bottom: -200px;
+}
+.nux-intro .nux-in .paid {
+ top: 4px;
+ margin-right: 12px;
+}
+.nux-intro .nux-in .dashicons {
+ color: #81a844;
+ font-size: 1em;
+ position: relative;
+ top: 3px;
+ padding-right: 6px;
+}
+.nux-intro .nux-in .dashicons:hover {
+ color: #57722e;
+}
+.nux-intro .nux-in .dashicons-external {
+ font-size: 1.5em;
+ top: 2px;
+ padding-right: 3px;
+}
+.nux-intro .nux-in .lmore {
+ font-size: 11px;
+ color: #81a844;
+}
+.nux-intro .nux-in .lmore:hover {
+ color: #57722e;
+}
+.nux-intro .feat.j-col {
+ padding: 10px 10px 10px 2px;
+}
+.nux-intro .feat .dashicons {
+ display: none;
+}
+.nux-intro .activated .feat .dashicons {
+ display: inline-block;
+}
+.nux-intro .act {
+ position: absolute;
+ top: 50%;
+ -ms-transform: translate(0, -50%);
+ -webkit-transform: translate(0, -50%);
+ transform: translate(0, -50%);
+ left: 8px;
+ float: left;
+}
+.nux-intro .act.j-col {
+ padding: 5px;
+ text-align: left;
+}
+.nux-intro .module-action {
+ text-transform: uppercase;
+ font-size: .85em;
+ font-weight: 600;
+}
+.nux-intro .wpcom h3 {
+ background: #0087be;
+}
+.nux-intro .wpcom h3 .dashicons {
+ color: #00638b;
+}
+.nux-intro .wpcom h3 .dashicons:hover {
+ color: #005172;
+}
+.nux-intro .wpcom .j-col {
+ padding: 10px;
+}
+.nux-intro .wpcom .goto {
+ text-align: center;
+ padding: 1em;
+}
+.nux-intro .wpcom .goto:hover {
+ background: #ececec;
+}
+.nux-intro .wpcom .goto .j-col {
+ padding: 0 5px;
+}
+.nux-intro .wpcom .goto a {
+ width: 100%;
+ padding: .25em;
+ height: auto;
+}
+.nux-intro .wpcom .goto .button {
+ height: auto;
+ min-height: 28px;
+ line-height: 18px;
+ white-space: normal;
+ max-width: 200px;
+ margin-bottom: 0;
+ padding-top: 4px;
+ padding-bottom: 5px;
+}
+.nux-intro .wpcom .goto .feat {
+ position: absolute;
+ top: 50%;
+ -ms-transform: translate(0, -50%);
+ -webkit-transform: translate(0, -50%);
+ transform: translate(0, -50%);
+}
+.nux-intro .nux-foot .j-col {
+ padding: 1em;
+}
+
+.nux-foot {
+ margin-top: 2em;
+ background: #ececec;
+ border-radius: 6px;
+}
+.nux-foot .j-col {
+ min-height: 75px;
+ padding: 1em;
+}
+@media (max-width: 650px) {
+ .nux-foot .j-col {
+ width: 100%;
+ }
+}
+.nux-foot .j-col + .j-col {
+ border-right: 1px #f9f9f9 solid;
+}
+@media (max-width: 650px) {
+ .nux-foot .j-col + .j-col {
+ border-right: none;
+ border-top: 1px #f9f9f9 solid;
+ }
+}
+.nux-foot .actions {
+ margin-top: 1em;
+}
+.nux-foot a {
+ text-decoration: underline;
+}
+.nux-foot img {
+ float: left;
+ margin-right: 1em;
+ width: 75px;
+ border-radius: 4px;
+}
+.nux-foot p {
+ font-size: .9em;
+ text-align: right;
+ font-weight: 600;
+ margin-top: 0;
+}
+.nux-foot p + p {
+ font-weight: 400;
+ margin-bottom: 0;
+}
+.nux-foot ul {
+ font-size: .9em;
+ margin-bottom: 0;
+}
+.nux-foot ul li {
+ margin-left: .875em;
+ margin-bottom: 0;
+ line-height: 175%;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.form-toggle[type="checkbox"] {
+ opacity: 0;
+ position: absolute;
+}
+
+.form-toggle__switch {
+ position: relative;
+ display: inline-block;
+ border-radius: 12px;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 2px;
+ width: 40px;
+ height: 24px;
+ background: #b9b9b9;
+ vertical-align: middle;
+ outline: 0;
+ cursor: pointer;
+ transition: all .4s ease;
+}
+.form-toggle__switch:before, .form-toggle__switch:after {
+ position: relative;
+ display: block;
+ content: "";
+ width: 20px;
+ height: 20px;
+}
+.form-toggle__switch:after {
right: 0;
- z-index: 1;
- -webkit-animation: miguel 3.4s 0s ease-in-out;
- animation: miguel 3.4s 0s ease-in-out;
+ border-radius: 50%;
+ background: #fff;
+ transition: all .2s ease;
+}
+.form-toggle__switch:before {
+ display: none;
+}
+.form-toggle__switch:hover {
+ background: #bdd597;
}
-.miguel:nth-child(2) {
- right: 49%;
- width: 120px;
- height: 131px;
- -webkit-animation-duration: 2.4s;
- animation-duration: 2.4s;
- -webkit-animation-delay: 0s;
- animation-delay: 0s;
+.form-toggle__label {
+ cursor: pointer;
}
-.miguel:nth-child(3) {
- right: 23%;
- width: 60px;
- height: 66px;
- -webkit-animation-duration: 4.5s;
- animation-duration: 4.5s;
- -webkit-animation-delay: 0s;
- animation-delay: 0s;
+.plugin-action__label {
+ padding-left: 5px;
+ top: -1px;
+ position: relative;
+ color: #8e9598;
}
-@-webkit-keyframes "miguel" {
- 0% {
- -webkit-transform: translate3d(0px, 0px, 0px);
- transform: translate3d(0px, 0px, 0px);
- }
- 100% {
- -webkit-transform: translate3d(900px, -900px, 0px);
- transform: translate3d(900px, -900px, 0px);
- }
+.activated .plugin-action__label {
+ color: #81a844;
}
-@keyframes "miguel" {
- 0% {
- -webkit-transform: translate3d(0px, 0px, 0px);
- transform: translate3d(0px, 0px, 0px);
- }
- 100% {
- -webkit-transform: translate3d(900px, -900px, 0px);
- transform: translate3d(900px, -900px, 0px);
- }
+
+.form-toggle:focus + .form-toggle__label .form-toggle__switch,
+.form-toggle:focus:checked + .form-toggle__label .form-toggle__switch {
+ box-shadow: 0 0 0 2px #0087be;
+}
+
+.form-toggle:checked + .form-toggle__label .form-toggle__switch {
+ background: #81a844;
+}
+.form-toggle:checked + .form-toggle__label .form-toggle__switch:after {
+ right: 16px;
+}
+
+.form-toggle:checked:hover + .form-toggle__label .form-toggle__switch {
+ background: #bdd597;
+}
+
+.form-toggle:disabled + .form-toggle__label .form-toggle__switch,
+.form-toggle:disabled:hover + .form-toggle__label .form-toggle__switch {
+ background: #e9eff3;
+}
+
+.form-toggle.is-toggling + .form-toggle__label .form-toggle__switch {
+ background: #81a844;
+}
+
+.form-toggle.is-toggling:checked + .form-toggle__label .form-toggle__switch {
+ background: #bdd597;
+}
+
+.form-toggle.is-compact + .form-toggle__label .form-toggle__switch {
+ border-radius: 8px;
+ width: 24px;
+ height: 16px;
+}
+.form-toggle.is-compact + .form-toggle__label .form-toggle__switch:before, .form-toggle.is-compact + .form-toggle__label .form-toggle__switch:after {
+ width: 12px;
+ height: 12px;
+}
+
+.form-toggle.is-compact:checked + .form-toggle__label .form-toggle__switch:after {
+ right: 8px;
}
+
@media (max-width: 1147px) {
.jp-content .landing {
padding: 0 2em;
@@ -2854,6 +3414,53 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.jp-content .footer {
padding-top: 1.5em;
}
+
+ .nux-intro .main-col {
+ width: 50%;
+ margin-bottom: 2em;
+ }
+ .nux-intro .main-col.wpcom {
+ width: 100%;
+ }
+ .nux-intro .main-col + .main-col {
+ padding-left: 0;
+ }
+ .nux-intro .wpcom {
+ padding: 0;
+ }
+ .nux-intro .wpcom .j-row {
+ width: 50%;
+ float: right;
+ border-bottom: 1px #f9f9f9 solid;
+ border-left: 1px #f9f9f9 solid;
+ }
+ .nux-intro .wpcom .j-row:last-of-type {
+ width: 100%;
+ float: none;
+ clear: both;
+ border: none;
+ border-top: 1px #f9f9f9 solid;
+ position: relative;
+ top: -1px;
+ }
+ .nux-intro .wpcom .goto .feat a {
+ float: right;
+ }
+
+ .nux-foot .j-col {
+ border: none;
+ }
+}
+@media (max-width: 900px) {
+ .nux-intro .main-col {
+ width: 100%;
+ padding: 0;
+ margin-bottom: 2em;
+ }
+ .nux-intro .wpcom .j-row {
+ width: 100%;
+ float: none;
+ }
}
@media (max-width: 782px) {
#jumpstart-cta .button-primary {
@@ -2864,6 +3471,14 @@ ul#adminmenu a.toplevel_page_jetpack:after {
background-position: 50% 35%;
}
}
+@media (max-width: 600px) {
+ .nux-intro h1 {
+ font-size: 1.75em;
+ }
+ .nux-intro p {
+ font-size: 1em;
+ }
+}
@media (max-width: 530px) {
.jp-content .landing {
padding: 0 .5em;
@@ -2895,6 +3510,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
}
/*# sourceMappingURL=jetpack-admin.css.map */
-.j-row{width:100%;margin:0 auto}.j-row:before,.j-row:after{content:" ";display:table}.j-row:after{clear:both}.j-col{padding:0.85em;width:100%;float:right;position:relative}@media only screen{.j-sm-1{width:8.33333%}.j-sm-2{width:16.66667%}.j-sm-3{width:25%}.j-sm-4{width:33.33333%}.j-sm-5{width:41.66667%}.j-sm-6{width:50%}.j-sm-7{width:58.33333%}.j-sm-8{width:66.66667%}.j-sm-9{width:75%}.j-sm-10{width:83.33333%}.j-sm-11{width:91.66667%}.j-sm-12{width:100%}}@media (min-width: 530px){.j-md-1{width:8.33333%}.j-md-2{width:16.66667%}.j-md-3{width:25%}.j-md-4{width:33.33333%}.j-md-5{width:41.66667%}.j-md-6{width:50%}.j-md-7{width:58.33333%}.j-md-8{width:66.66667%}.j-md-9{width:75%}.j-md-10{width:83.33333%}.j-md-11{width:91.66667%}.j-md-12{width:100%}}@media (min-width: 782px){.j-lrg-1{width:8.33333%}.j-lrg-2{width:16.66667%}.j-lrg-3{width:25%}.j-lrg-4{width:33.33333%}.j-lrg-5{width:41.66667%}.j-lrg-6{width:50%}.j-lrg-7{width:58.33333%}.j-lrg-8{width:66.66667%}.j-lrg-9{width:75%}.j-lrg-10{width:83.33333%}.j-lrg-11{width:91.66667%}.j-lrg-12{width:100%}}body,button,input,select,textarea{color:#222;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{color:#222;clear:both}a{color:#0d72b2;transition:color .2s;text-decoration:none}a:visited{color:#0d72b2}a:hover{color:#0f92e5}a:focus{outline:thin dotted}address{margin:0 0 1.5em}abbr[title],acronym{cursor:help}ins{background:#eee;text-decoration:none}dt{font-weight:700}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}@-webkit-keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}@keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}.button,.download-jetpack{transition:all .1s ease-in-out}.jp-button,.jp-button--settings{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#efefef;font:800 0.9285714286em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;border-radius:3px}.jp-button:visited,.jp-button--settings:visited{color:#efefef}.jp-button:hover,.jp-button--settings:hover,.jp-button:focus,.jp-button--settings:focus{color:#fff;background:#57972d}.jp-button:active,.jp-button--settings:active{background:#57972d;opacity:0.8}.jp-button--settings{background:#93b45f;color:#e8eedf}.jp-button--settings:visited{color:#e8eedf}.jp-button--settings:hover,.jp-button--settings:focus{background:#9fbd72;color:#fff}.jp-button--settings.current{background:#3c6621;color:#fff;box-shadow:inset 0 2px 0 #365A1F, inset 0 1px 3px #3c6621}.download-jetpack{display:inline-block;position:relative;padding:0.64286em 0.85714em 0.53571em;color:#fff;font:400 20px/1 "proxima-nova", 'Open Sans', Helvetica, sans-serif;background:#518d2a;z-index:3;border-radius:6px;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:visited{color:#fff}.download-jetpack:hover,.download-jetpack:focus{color:#fff;background:#57972d;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:active{top:6px;box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.4)}.download-jetpack:active:after{top:-6px}.download-jetpack:before{content:'';display:inline-block;position:relative;top:-2px;margin-left:13px;width:30px;height:30px;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%}.download-jetpack:after{content:'';position:absolute;top:0;right:0;width:100%;height:100%}@media (max-width: 1147px){.download-jetpack{font-size:1.28571em}.download-jetpack:before{top:-1px;width:23px;height:23px}}@media (max-width: 900px){.download-jetpack:active{top:0}}@media (max-width: 530px){.download-jetpack{font-size:1.21429em;font-weight:600}.download-jetpack:before{width:19px;height:19px;margin-left:9px}}#searchsubmit{display:inline-block;border:none;position:relative;padding:0.71429em 1.5em;color:#efefef;font:800 0.8em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;outline:none;border-radius:3px}#searchsubmit:visited{color:#efefef}#searchsubmit:hover,#searchsubmit:focus{color:#fff;background:#2aa0d5}#searchsubmit:active{opacity:0.7}@font-face{font-family:'automatticons';src:url("../_inc/fonts/automatticons/automatticons.eot");src:url("../_inc/fonts/automatticons/automatticons.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/automatticons/automatticons.woff") format("woff"),url("../_inc/fonts/automatticons/automatticons.ttf") format("truetype"),url("../_inc/fonts/automatticons/automatticons.svg#automatticonsregular") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.eot");src:url("../_inc/fonts/jetpack/jetpack.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/jetpack/jetpack.woff") format("woff"),url("../_inc/fonts/jetpack/jetpack.ttf") format("truetype"),url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg");font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio: 0){@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg")}}.nav-horizontal a{display:inline-block}.nav-horizontal li{position:relative;float:right}.nav-horizontal ul{margin:0;padding:0}*,*:before,*:after{-moz-box-sizing:border-box;box-sizing:border-box}::-moz-selection{background:#91bd51;color:#fff;text-shadow:none}::selection{background:#91bd51;color:#fff;text-shadow:none}#wpbody-content{padding-bottom:0}#wpcontent{margin-right:160px;padding:0}ul#adminmenu a.toplevel_page_jetpack:after{border-left-color:#81a844}.folded #wpcontent{margin-right:36px}#wpfooter{display:none}.jp-content{background:#f9f9f9;margin:0;height:auto;min-height:100%;width:100%;width:100%;-webkit-font-smoothing:antialiased}.jp-content .wrapper{background:#f9f9f9}@media (max-width: 900px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:36px;padding-right:0}}@media (max-width: 782px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:0}}@media (max-width: 782px){.configure .frame.top.fixed{padding-right:0}}.wrap.inner,.page-content{max-width:950px;margin:0 auto}.wrap.inner li,.page-content li{line-height:23px}@media (max-width: 530px){.page-content{margin-top:0}}@media (max-width: 1147px){.wrap.inner{background:#f9f9f9;padding:15px}}@media (max-width: 530px){.wrap.inner{margin-top:1.71429em}}.jetpack_page_jetpack_modules .header-nav{margin:0}.jetpack_page_jetpack_modules .page-content{max-width:1200px;min-height:500px;margin:0}.page-content.about{position:relative;z-index:10}@media (max-width: 1147px){.page-content.about{background:#f9f9f9;padding:15px}}@media (max-width: 1147px){.page-content.configure{background:#f9f9f9}}.footer nav{max-width:550px;margin:0 auto}.header{right:0;left:0;background:#81a844}.header-nav li{line-height:60px}.header-nav a{padding:0 0.71429em;line-height:24px}.header-nav .jetpack-logo a{display:inline-block;position:relative;width:214px;margin-left:6px;background:url(../images/jetpack-logo.png) center center no-repeat;background:url(../images/jetpack-logo.svg) center center no-repeat,none;background-size:183px auto;color:#fff;line-height:60px;font-weight:normal}.header-nav .jetpack-logo a span{text-indent:-9999px;visibility:hidden}.header-nav .jetpack-logo a:before{content:'';position:absolute;top:0;right:0;width:100%;height:100%;background-size:183px 32px}.header-nav .jetpack-modules+.jetpack-modules{margin-right:15px}.main-nav{float:right}.main-nav li{margin:0}@media (max-width: 900px){.main-nav{font-size:13px}}.user-nav{float:left}.user-nav li{margin:0}.jetpack-pagestyles #screen-meta{margin:0}.jetpack-pagestyles #screen-meta-links .screen-meta-toggle{z-index:2}.jetpack-pagestyles #screen-options-link-wrap,.jetpack-pagestyles #contextual-help-link-wrap{border:none}.jetpack-pagestyles .update-nag{display:none}.masthead{position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #8eb74e)}.masthead.hasbutton .flyer{bottom:-270px}.masthead.hasbutton .subhead{margin-top:175px}@media (max-width: 530px){.masthead.hasbutton .subhead{margin-top:105px;padding:0}}.masthead h1,.masthead h2{margin:0 auto}.masthead h1{padding:2.5em 0 1.11111em;max-width:21.94444em;color:#fff;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;text-shadow:0 -1px 1px rgba(0,0,0,0.12);z-index:3}.masthead h1+.flyby{margin-top:180px}@media (max-width: 1147px){.masthead h1{padding-top:1.83333em;font-size:2.14286em}}@media (max-width: 782px){.masthead h1{max-width:600px;font-size:28px}}@media (max-width: 530px){.masthead h1{margin:0 15px;padding:31px 0 15px 0;font-size:21px;font-weight:400}}.jetpack-connected .masthead h1{margin-bottom:33px;max-width:600px}.flyby{position:relative;max-width:1200px;margin:0 auto}@media (max-width: 900px){.flyby{display:none}}.flyer{position:absolute;bottom:-200px;right:4%;z-index:1;-webkit-animation:flyer 3.4s 2s ease-in-out;animation:flyer 3.4s 2s ease-in-out}.flyer:nth-child(2){right:49%;width:120px;height:131px;-webkit-animation-delay:4.6s;animation-delay:4.6s;-webkit-animation-duration:2.4s;animation-duration:2.4s}.flyer:nth-child(3){right:23%;width:60px;height:66px;-webkit-animation-delay:5.8s;animation-delay:5.8s;-webkit-animation-duration:4.5s;animation-duration:4.5s}.subhead{position:relative;margin-top:105px;padding:4em 0;background:#f9f9f9;z-index:2}.subhead h2{max-width:460px;color:#5d6d74;font:400 1.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 900px){.subhead h2{max-width:428px;font-size:20px}}@media (max-width: 530px){.subhead h2{display:none}}.subhead:after{content:'';position:absolute;bottom:100%;right:0;margin-bottom:-1px;width:100%;height:228px;background:url("../images/the-cloud.svg") center bottom repeat-x;pointer-events:none;z-index:-1}@media (max-width: 1147px){.subhead{margin-top:122px;padding:70px 0 49px}.subhead:after{background-size:160% auto}}@media (max-width: 900px){.subhead{margin-top:122px;padding:70px 0 49px}}@media (max-width: 530px){.subhead{margin-top:83px;padding:47px 15px 39px}}.clouds-sm{height:100px;position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #89b348)}.clouds-sm:after{content:'';position:absolute;bottom:0;right:0;margin-bottom:-1px;width:100%;height:137px;background:url("../images/the-cloud-sm.svg") center bottom repeat-x;pointer-events:none;z-index:2}@media (max-width: 530px){.clouds-sm{height:90px}}.featured{border-top:1px solid #d6d6d6;border-bottom:1px solid #d6d6d6;background:#fff;position:relative;padding:2.0em 1em 4.6em 1em;text-align:center;z-index:1}.featured:before{content:"";display:block;position:absolute;top:0;height:100%;z-index:-1}.featured .features,.featured .modules{margin:0 auto;display:inline-block}@media (max-width: 530px){.featured{display:none}}.featured h2,.module-grid h2{margin-top:1em;color:#5d6d74;font:300 2em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-align:center}@media (max-width: 900px){.featured h2,.module-grid h2{font-size:30px}}@media (max-width: 782px){.featured h2,.module-grid h2{font-size:28px}}.features,.modules{margin:0 -5px}.feature,.module{position:relative;float:right;margin:0 5px 10px;width:310px;transition:all .2s ease-in-out}@media (max-width: 1147px){.feature,.module{margin:.75% 1.5% .75% 0;width:32.333333%;transition:none}.feature:nth-child(3n+1),.module:nth-child(3n+1){margin-right:0}.feature:hover,.module:hover{top:0;box-shadow:none}}.feature{-webkit-transform:translateZ(0);transform:translateZ(0)}.feature h3{margin:0 0 0.58824em;color:#697b84;font-size:1.21429em;line-height:1em;font-weight:800}.feature p{margin:0;color:#6e818a}.feature:before{content:'';position:absolute;bottom:0;right:0;width:100%;height:10px;background:rgba(0,0,0,0.02);z-index:-1;-webkit-transform:translateZ(0);transform:translateZ(0);transition:all .2s ease-in-out}.feature:hover{-webkit-transform:translateY(-5px);-ms-transform:translateY(-5px);transform:translateY(-5px)}.feature:hover h3{color:#1a8dba}.feature:hover .feature-img{border:1px solid #ccc;border-bottom:none}.feature:hover .no-border{border:none}.feature:hover:before{-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px)}@media (max-width: 1147px){.feature:hover h3{color:#6e818a}.feature:hover .feature-img{border:1px solid #ddd;border-bottom:none}.feature:hover .no-border{border:none}}.feature .feature-img{padding-top:52%;width:100%;height:auto;border:1px solid #ddd;border-bottom:none}.feature .feature-img.custom-css{background:url("../images/custom-css.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.custom-css{background-image:url("../images/custom-css@2x.jpg")}}.feature .feature-img.wordpress-connect{background:url("../images/wordpress-connect.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-connect{background-image:url("../images/wordpress-connect@2x.jpg")}}.feature .feature-img.wordpress-stats{background:url("../images/wordpress-stats.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-stats{background-image:url("../images/wordpress-stats@2x.jpg")}}.feature .feature-img.no-border{border:none;padding-bottom:1px}.feature-description{display:block;padding:1em 1.07143em 1.07143em;border:1px solid #ddd;background:#f5f5f5}.feature:hover .feature-description{background:#fff;border-color:#ccc}@media (max-width: 1147px){.feature:hover .feature-description{border:1px solid #ddd;background:#f5f5f5}}@media (max-width: 900px){.feature-description{min-height:115px}}.cat{clear:both;margin-bottom:23px}.cat h3{font-size:24px;font-weight:300;margin:0 6px 13px 0;text-align:right}.cat .clear{clear:both}.module-grid{text-align:center}.module-grid h2{margin:1em 0}@media (max-width: 530px){.module-grid h2{padding-top:16px;margin-top:0;font-size:25px}}#module-search{position:relative;width:100%;max-width:40.71429em;margin:0 auto 1.07143em;overflow:hidden}#jetpack-search{margin:0;padding:11px 16px 11px 16px;width:100%;border:1px solid #c9ced0;border-radius:3px;background:#fff;color:#5c6671;line-height:1.3}#jetpack-search:focus{color:#5c6671;outline:none}#jetpack-search:focus+label{background:transparent;opacity:0}#jetpack-search::-webkit-input-placeholder{color:#a8acae}#jetpack-search :-moz-placeholder{color:#a8acae}#jetpack-search::-moz-placeholder{color:#a8acae}#jetpack-search:-ms-input-placeholder{color:#a8acae}#jetpack-search+label{position:absolute;top:1px;left:1px;bottom:1px;width:48px;color:#abafb1;text-indent:-9999px;pointer-events:none;border-radius:3px;transition:all .2s ease-in-out}#jetpack-search+label:after{content:'\f400';position:absolute;left:11px;text-align:left;top:4px;font-size:1.71429em;font-weight:normal;font-family:"genericons"}.jp-filter{margin-bottom:2.85714em;color:#6f7476}.jp-filter a{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#aaa;font:600 0.92857em/1 "Open Sans", Helvetica, Arial, sans-serif;text-shadow:0 -1px 1px rgba(255,255,255,0.2);background:#eee;border-radius:3px;background-clip:padding-box}.jp-filter a.selected,.jp-filter a:hover,.jp-filter a:focus{color:#efefef;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476}@media (max-width: 530px){.jp-filter a{padding:0.76em 1em}}.module{display:block;padding:0.71429em 1.07143em 1em;text-align:right;border:1px solid #dae0e2;background:#fff;box-shadow:0 0 0 rgba(0,0,0,0.03);transition:opacity 2s ease-in}.module:hover{border-color:#8ac9e8;background:#f8fcfe}.module h3{cursor:pointer;margin:0 0 0.5em;color:#1a8dba;font-size:1.14286em;line-height:1.4em;font-weight:700}.module p{margin:0;color:#686f72;font-size:0.85714em}.module:hover,.module:focus{border-color:#8ac9e8;background:#f8fcfe}.module.active{border-color:#2ea2cc;box-shadow:inset -4px 0 0 #2ea2cc}.module.active:hover{border-color:#69bedd;box-shadow:inset -4px 0 0 #69bedd}@media (max-width: 1147px){.cat .module:nth-child(3n+1){margin:.75% 1.5% .75% 0}.cat .module:nth-child(3n - 1){margin-right:0}}@media (max-width: 900px){.cat .module{margin:1% 2% 1% 0}.cat .module:nth-child(2n+1){margin:1% 2% 1% 0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 530px){.cat .module{margin:5px 0}.cat .module:nth-child(2n+1){margin-right:0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 900px){.module{margin:1% 2% 1% 0;width:49%}.module:nth-child(3n+1){margin-right:2%}.module:nth-child(2n+1){margin-right:0}}@media (max-width: 530px){.module{margin:5px 0;width:100%}.module:nth-child(3n+1){margin-right:0}.module:nth-child(2n+1){margin-right:0}}.new{position:relative}.new:after{content:'NEW';position:absolute;top:-8px;left:-8px;padding-top:10px;width:32px;height:32px;color:#fff;font-size:8px;font-weight:800;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,0.2);background:url("../images/new-badge.svg") center center no-repeat;background-size:100%;border-radius:50%}.paid{display:inline-block;position:relative;top:5px;margin-right:10px;padding:1px 4px 0 6px;height:13px;color:#fff;font:700 10px/1 "Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 0 rgba(0,0,0,0.05);background:#d0d0d0;vertical-align:top}.paid:before,.paid:after{position:absolute;top:0;left:100%;font:normal 14px/14px "genericons"}.paid:before{content:'\f503';color:#d0d0d0;text-shadow:none}.paid:after{content:'\f428';margin-left:-5px;font-size:11px}.rtl .paid:before{content:'\f501'}.load-more{margin:2.71429em 0 6.15385em}.set{display:none}.show.set{display:block}.loading{bottom:50%;position:absolute;top:50%;width:100%}.loading span{color:#999}.modal{background:#fff;position:fixed;top:52px;bottom:20px;left:20px;right:20px;margin-right:160px;display:none;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1);z-index:500}.modal .close{position:absolute;top:0;left:0;font:300 1.71429em "genericons" !important;color:#777;content:'\f405';display:inline-block;padding:0.28571em 0.71429em 0.42857em;z-index:5}.modal .close:hover{background:#eee;opacity:0.8}.modal .close:active{background:#eee;opacity:0.4}.modal #jp-post-flair{display:none}.modal .content-container{position:absolute;top:0;left:0;bottom:0;right:0;overflow:auto;padding:2.14286em}.modal .content{margin:0 auto;max-width:900px;text-align:right}.modal h2{text-align:right;margin-top:0;color:#5d6d74;font:300 32px "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.modal h2{font-size:26px}}.modal h5{clear:right}.modal p{font-size:1.23077em}.modal footer{position:absolute;right:0;bottom:0;width:100%;padding:12px 20px;border-top:1px solid #ddd;background:#fff;text-align:left}.modal footer ul{margin:0}.modal footer li{display:inline-block;margin:0}.modal .button-secondary,.modal .button-primary:active{vertical-align:baseline}@media (max-width: 900px){.modal{bottom:5%;margin-right:36px;font-size:80%}.modal .content{top:38px}}@media (max-width: 782px){.modal{top:66px;margin-right:0}}@media (max-width: 600px){.modal{top:10px;left:10px;bottom:10px;right:10px}}.jp-info-img{float:left;margin:0 30px 30px 0}.jp-info-img img{border:1px solid #ddd;max-width:100%;height:auto}.jp-info-img img:first-child{margin-top:0}@media (max-width: 782px){.jp-info-img{float:none;margin:0 0 15px}}.content-container.modal-footer{bottom:53px}.shade{background:#000;bottom:0;cursor:pointer;display:none;right:0;opacity:0.2;position:fixed;left:0;top:0;z-index:11}.entry-title,.page-template-default h1{margin-top:0.61111em;color:#5d6d74;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.entry-title,.page-template-default h1{font-size:2em}}.blog h3,.single h3,.page-template-default h2{margin-top:0.61111em;color:#5d6d74;font:300 1.9em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.blog h3,.single h3,.page-template-default h2{font-size:1.4em}}.page-template-default p{line-height:1.71429em}.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{float:right;width:70%}.footer{margin-top:1.42857em;position:relative;padding:10em 0 4.28571em;text-align:center}.footer:before,.footer:after{content:'';position:absolute;right:0;pointer-events:none}.footer:before{top:0;margin-top:-1px;width:100%;height:195px}.footer:after{bottom:0;width:100%;height:50px;background:url("../images/the-footcloud.svg") center bottom no-repeat;background-size:auto 45px;z-index:1}.footer .download-jetpack{margin-bottom:33px}@media (max-width: 1147px){.footer{padding-top:165px;padding-bottom:0}.footer:before{background-size:160% auto}.footer:after{display:none}.footer ul{float:none;overflow:hidden}}@media (max-width: 900px){.footer{padding-top:146px}}@media (max-width: 782px){.footer{margin-top:0}}@media (max-width: 530px){.footer{margin-top:0;padding-top:135px}}@media (max-width: 320px){.footer{padding-top:76px}}.footer nav{max-width:100%}.footer nav a,.footer nav a:visited{padding:4px 6px;color:#999}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81A844}@media (max-width: 1147px){.footer nav{border:none;padding:0}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#fff}}@media (max-width: 530px){.footer nav li{display:block;float:none;margin:0;text-align:right}.footer nav a{display:block;padding:0 16px;line-height:44px}}.primary{padding:25px 15px 10px 15px;border-bottom:1px solid #eee}.secondary-footer{margin:0 auto}.secondary-footer li{margin-left:5px}@media (max-width: 1147px){.secondary-footer{margin:0 30px;padding:8px 15px 30px}}@media (max-width: 530px){.secondary-footer{margin:0;padding:0;border:none;font-weight:400}.secondary-footer a{border-top:1px solid #eee}}.footer .a8c-attribution{margin:0;padding:0 6px;color:#bbb;font-size:0.78571em;font-family:"Gill Sans","Gill Sans MT","Open Sans",Helvetica,Arial,sans-serif;text-transform:uppercase}.footer .a8c-attribution a{display:inline-block;position:relative;padding:4px 16px;left:9999px;outline:0}.footer .a8c-attribution a:after{content:'A';position:absolute;top:2px;left:-9999px;height:100%;color:#999;font-size:1.54545em;font-family:"automatticons";text-align:center}.footer .a8c-attribution a:hover:after{-webkit-animation:candy .4s ease-in-out;animation:candy .4s ease-in-out}.secondary{padding:10px 15px 0 15px}.jetpack-message{background:#8eb74e;border:1px solid #73963d;margin:33px auto 0;max-width:90%;position:relative;z-index:2}.jetpack-message.is-opt-in{margin:50px 0 0;max-width:100%;padding:10px 15px;background:#fff;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);font-size:13px;text-align:center}.subhead .jetpack-message.is-opt-in{margin:0;padding-bottom:0;background:transparent;box-shadow:none}.subhead .jetpack-message.is-opt-in .jp-button,.subhead .jetpack-message.is-opt-in .jp-button--settings{display:inline-block}.jetpack-message.is-opt-in p{color:#3c4549}.jetpack-message.is-opt-in .jp-button,.jetpack-message.is-opt-in .jp-button--settings{margin-top:15px;display:none}.jetpack-message h4{color:#fff;margin:0}.jetpack-message p{color:#fff;margin:0;opacity:0.7}.jetpack-message .squeezer{padding:23px 80px 23px 23px;position:relative;text-align:right}.jetpack-message .squeezer:before{color:#fff;content:'\f418';font-family:'Genericons';font-size:33px;height:33px;right:25px;opacity:0.6;position:absolute;top:23px;top:calc( 50% - 22px )}@media (max-width: 530px){.jetpack-message .squeezer{padding:23px}.jetpack-message .squeezer:before{display:none}}.jetpack-message .squeezer a{color:#FFF;border-bottom:1px solid #D5E4BD}.jetpack-message .squeezer a:hover{border-bottom:1px solid #F1F6E9}.jetpack-message.error .squeezer:before,.jetpack-message.jetpack-err .squeezer:before{content:'\f414'}.configure-module .jetpack-message{max-width:100%}.modules h3.icon,.jetpack-modules .info a{width:auto}.modules h3.icon:before,.jetpack-modules .info a:before{display:inline-block;position:relative;top:1px;right:-3px;margin-left:2px;opacity:0.8;font:normal 20px "genericons";vertical-align:top}.jetpack-modules .info a:before{margin-top:1px}.latex:before,.jetpack-modules #latex .info a:before{content:'\f408'}.carousel:before,.jetpack-modules #carousel .info a:before{content:'\f102'}.modules h3.contact-form:before,.jetpack-modules #contact-form .info a:before{content:'\f175';font:normal 20px "dashicons"}.modules h3.custom-css:before,.jetpack-modules #custom-css .info a:before{content:'\f100';font:normal 20px "dashicons"}.modules h3.enhanced-distribution:before,.jetpack-modules #enhanced-distribution .info a:before{content:'\f237';font:normal 20px "dashicons"}.modules h3.widgets:before,.jetpack-modules #widgets .info a:before{content:'\f116';font:normal 20px "dashicons"}.modules h3.gravatar-hovercards:before,.jetpack-modules #gravatar-hovercards .info a:before{content:'G';font-family:"automatticons"}.infinite-scroll:before,.jetpack-modules #infinite-scroll .info a:before{content:'\f408'}.comments:before,.jetpack-modules #comments .info a:before{content:'\f108'}.sso:before,.jetpack-modules #sso .info a:before{content:'\f205'}.json-api:before,.jetpack-modules #json-api .info a:before{content:'\f415'}.likes:before,.jetpack-modules #likes .info a:before{content:'\f408'}.markdown:before,.jetpack-modules #markdown .info a:before{content:'\f462'}.minileven:before,.jetpack-modules #minileven .info a:before{content:'\f453'}.manage:before,.jetpack-modules #manage .info a:before{content:'\f205'}.monitor:before,.jetpack-modules #monitor .info a:before{content:'\f468'}.notes:before,.jetpack-modules #notes .info a:before{content:'\f300'}.omnisearch:before,.jetpack-modules #omnisearch .info a:before{content:'\f400'}.photon:before,.jetpack-modules #photon .info a:before{content:'\f403'}.post-by-email:before,.jetpack-modules #post-by-email .info a:before{content:'\f410'}.protect:before,.jetpack-modules #protect .info a:before{content:'\f470';position:relative;top:-1px}.modules h3.publicize:before,.jetpack-modules #publicize .info a:before{content:'\f237';font:normal 20px "dashicons"}.related-posts:before,.jetpack-modules #related-posts .info a:before{content:'\f420'}.sharedaddy:before,.jetpack-modules #sharedaddy .info a:before{content:'\f415'}.shortcodes:before,.jetpack-modules #shortcodes .info a:before{content:'\f100'}.verification-tools:before,.jetpack-modules #verification-tools .info a:before{content:'\f425'}.after-the-deadline:before,.jetpack-modules #after-the-deadline .info a:before{content:'\f411'}.subscriptions:before,.jetpack-modules #subscriptions .info a:before{content:'\f410'}.tiled-gallery:before,.jetpack-modules #tiled-gallery .info a:before{content:'\f103'}.modules h3.vaultpress:before,.jetpack-modules #vaultpress .info a:before{content:'V';font-family:"automatticons"}.videopress:before,.jetpack-modules #videopress .info a:before{content:'\f104'}.modules h3.widget-visibility:before,.jetpack-modules #widget-visibility .info a:before{content:'\f116';font:normal 20px "dashicons"}.stats:before,.jetpack-modules #stats .info a:before{content:'\f205'}.shortlinks:before,.jetpack-modules #shortlinks .info a:before{content:'\f107'}.modules h3.custom-content-types:before,.jetpack-modules #custom-content-types .info a:before{content:'\f498';font:normal 20px "dashicons"}.modules h3.site-icon:before,.jetpack-modules #site-icon .info a:before{content:'\f475'}@media (max-width: 782px){.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{width:100%}}@media (max-width: 600px){.clouds-sm{display:none}}@media (max-width: 530px){.wrap.inner.jp-support .jp-support-column-left{width:100%}.wrap.inner.jp-support .jp-support-column-left .widget-text{margin-left:0;width:100%}.wrap.inner.jp-support .jp-support-column-right{width:100%}}@media screen and (max-width: 400px){.jp-frame .header-nav{padding-bottom:10px}.jp-frame .header-nav li{line-height:30px}.jp-frame .header-nav .jetpack-logo{width:100%;text-align:center}.jp-frame .header-nav .jetpack-modules{margin:0;width:50%;text-align:left;padding:0 5px}.jp-frame .header-nav .jetpack-modules+.jetpack-modules{text-align:right}}@media (max-width: 320px){.jetpack_page_jetpack_modules .wrap{padding:0 0 1em}}.page-content.configure{margin-top:0}.configure .frame.top{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}.configure .frame.top.fixed{background:#f9f9f9;border-bottom:1px solid #e9e9e9;padding-right:160px;margin-top:-6px;position:fixed;left:0;top:32px;width:100%;z-index:4;box-shadow:0 2px 2px -2px #eee}@media (max-width: 782px){.configure .frame.top.fixed{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}}@media (max-width: 600px){.configure .frame.top.fixed{top:0}}.configure .frame.top .tablenav.top{float:right}@media (max-width: 900px){.configure .frame.top .tablenav.top .actions{display:block}}@media (max-width: 782px){.configure .frame.top .tablenav.top .actions{margin-top:6px}}.jp-frame-top-fixed .configure{padding-top:94px}.filter-search{display:none;float:left;margin-top:10px}@media (max-width: 782px){.filter-search{display:block}}@media (max-width: 530px){.filter-search{display:none}}.module-actions.landing-page{float:left;margin-left:15px}.module-actions.landing-page a{font-size:0.6em}.table-bordered.jetpack-modules{border:none;margin-bottom:0}.table-bordered.jetpack-modules tr.jetpack-module th{border-right:0;padding:14px 4px 0}.table-bordered.jetpack-modules tr.jetpack-module th input{display:block}.table-bordered.jetpack-modules tr.jetpack-module:hover .genericon{display:inline-block}.table-bordered.jetpack-modules tr.jetpack-module:hover td .row-actions span a{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.active th,.table-bordered.jetpack-modules tr.jetpack-module.active td{background:#f7fcfe}.table-bordered.jetpack-modules tr.jetpack-module.active th{border-right:4px solid #2ea2cc;padding-right:0px}.table-bordered.jetpack-modules tr.jetpack-module.active td:first-child{border-right:4px solid #2ea2cc}.table-bordered.jetpack-modules tr.jetpack-module.unavailable{opacity:0.3}.table-bordered.jetpack-modules tr.jetpack-module.unavailable input{display:none}.table-bordered.jetpack-modules tr.jetpack-module#vaultpress{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module th,.table-bordered.jetpack-modules tr.jetpack-module td{background:#fff;margin:0;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1)}.table-bordered.jetpack-modules tr.jetpack-module td{padding:10px 14px 8px 10px;line-height:25px}.table-bordered.jetpack-modules tr.jetpack-module td:first-child{border-right:4px solid #fff}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{float:left;padding:0 0 1px;visibility:visible}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span{margin-right:5px}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a{opacity:0}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a:focus{opacity:1}@media (max-width: 530px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}}@media (max-width: 782px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:block;padding-right:10px;visibility:visible}}.table-bordered.jetpack-modules>thead>tr>th{border:0;vertical-align:middle}.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-left:0}@media (max-width: 782px){.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-right:0}}.table-bordered.jetpack-modules td{background:#fff}.table-bordered.jetpack-modules #doaction{margin-top:0}@media (max-width: 782px){.table-bordered.jetpack-modules #doaction{padding:10px 7px}}.table-bordered.jetpack-modules .checkall{margin-top:1px}.table-bordered.jetpack-modules .filter-search{margin-top:8px}.table-bordered.jetpack-modules .genericon{color:#999;display:none;margin:7px 3px 0}@media (max-width: 900px){.table-bordered.jetpack-modules .genericon{display:inline-block}}.table-bordered.jetpack-modules .med{width:70px}.table-bordered.jetpack-modules .sm{width:30px}@media (max-width: 782px){.table-bordered.jetpack-modules .check-column{width:50px}}.fixed-top .check-column{padding:8px 10px 0 10px;width:2.2em}.wrap{margin:0;padding:0 1.5em 1em;overflow:hidden}.wrap h2{font-size:24px;font-weight:400}.wrap .manage-left{float:right;margin:0;padding:0;width:63%}.wrap .manage-left table{width:100%}.wrap .manage-left th{font-weight:400}@media (max-width: 782px){.wrap .manage-left{width:100%}}.wrap .manage-right{margin:0;padding:0;float:left;width:35%;z-index:1}.wrap .manage-right p{font-size:12px;font-weight:bold;color:#bbb;padding-top:2px;text-transform:uppercase;letter-spacing:1px;clear:right}.wrap .manage-right .bumper{margin-right:33px}.wrap .manage-right.show{display:block;position:fixed;overflow-y:auto;overflow-x:hidden;position:absolute}.wrap .manage-right .search-bar{margin-bottom:18px;max-width:300px}.wrap .manage-right p.search-box{float:none;height:auto;margin-bottom:0;position:relative}.wrap .manage-right p.search-box input[type='search']{padding:0 8px;width:90%;line-height:initial}@media (max-width: 782px){.wrap .manage-right p.search-box input[type='search']{float:right;padding:9px 8px}}.wrap .manage-left p.search-box input[type="submit"]{display:none}.wrap .manage-right .button-group .button{outline:none}.wrap .manage-right .subsubsub{margin:0;padding:0}.wrap .manage-right .subsubsub a{padding:0;line-height:inherit}.wrap .manage-right .subsubsub .current{padding:1px 5px;border-radius:2px;margin-right:-5px;background:#0D72B2;color:#FFF}.wrap .manage-right .subsubsub .current .count{color:#BCD7E7;font-weight:200}.wrap .manage-right .subsubsub li{display:block;text-align:right}@media (max-width: 782px){.wrap .manage-right{background:#fff;bottom:0;display:none;min-width:300px;position:fixed;left:0;top:0;z-index:13;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1)}.wrap .manage-right .bumper{margin:13px}.wrap .manage-right .navbar-form{margin:0;padding:0}}.configure-module p{font-size:14px}.configure-module p.success,.configure-module p.error{color:#fff;padding:10px}.configure-module p.success{background-color:#81a844}.configure-module p.error{background-color:#d94f4f}.protect-status p{font-size:16px}.protect-status strong{display:inline-block;margin-top:10px;background:#fff;padding:10px;border:1px #ddd solid;font-size:16px;color:#000;max-width:100%}.protect-status.attn{color:#d94f4f}.protect-status.working{color:#81a844}#non-editable-whitelist{margin-top:15px}.protect-whitelist textarea{width:100%;min-height:150px}#editable-whitelist .whitelist-table{width:100%}.configure-module input[disabled]{opacity:.5}.configure-module input.button-primary{font-weight:bold}.whitelist-table{border-top:1px solid;border-left:1px solid;border-color:#ddd;background-color:#fff}.whitelist-table td,.whitelist-table th{padding:10px;margin:0;border-bottom:1px solid;border-right:1px solid;border-color:#ddd;font-size:14px}.whitelist-table th.heading{font-weight:bold;color:#5d6d74;text-align:right;background-color:#eee}.whitelist-table td.item-actions{border-right:none;text-align:left}.whitelist-table .toolbar{padding:0}.whitelist-table .add-btn{text-align:center;width:10%;border-right:1px #ddd solid}.ip-address,.enter-ip{width:90%;text-align:right;vertical-align:middle}.delete-ip-address{text-align:center;border:0;background:transparent;color:#6f7476;box-shadow:none;font-size:20px;margin:0;padding:0;cursor:pointer;border-radius:2px}.delete-ip-address:hover{background:#eee}.toolbar div{float:right;padding:10px}@media only screen and (min-width: 1100px){#non-editable-whitelist{width:28%;float:left;margin-top:0}.protect-whitelist{width:65%;float:right}}@media only screen and (max-width: 1130px){.enter-ip input[type="text"]{max-width:175px}}@media only screen and (max-width: 1250px) and (min-width: 1065px), (max-width: 730px) and (min-width: 600px){.enter-ip{width:85%}.add-btn{width:15%}}@media only screen and (max-width: 782px){.add-btn{text-align:left}.add-btn .ip-add{margin-top:4px;margin-bottom:3px}}@media only screen and (max-width: 730px){.add-btn{text-align:center}}@media only screen and (max-width: 665px) and (min-width: 600px){.enter-ip input[type="text"]{max-width:165px}}@media only screen and (max-width: 600px){.toolbar div{width:100%}.add-btn{border-top:1px #ddd solid}.enter-ip{text-align:center}.enter-ip strong{display:block;margin-bottom:5px}.enter-ip input[type="text"]{width:100%;max-width:100%}.add-btn input,.enter-ip .button{width:50%;margin:0 auto}.enter-ip .button{margin-top:10px}}@media only screen and (max-width: 400px){.protect-status strong{font-size:12px;overflow:auto}.add-btn input,.enter-ip .button{width:100%}}.jp-content .hide{display:none}.jp-content .pointer{cursor:pointer}.jp-content .landing{margin:0 auto;z-index:2;position:relative}.jp-content h1{font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;z-index:3;width:100%;text-align:center}.jp-content h1.success{color:#81a844}.jp-content .footer{padding-top:0;margin-top:0;background-image:none}.jp-content .footer:before{height:inherit}.jp-content .more-info:before{content:none}.landing .wpcom-connect{min-height:400px}.wpcom-connect .j-col{padding:0}.wpcom-connect .connect-desc{padding-left:25px}.wpcom-connect .connect-btn{text-align:center}.module-grid h2{color:#000;font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif}.download-jetpack{margin-top:1em !important}#jump-start-area{margin-top:35px;padding-right:60px;padding-left:60px;background:#fefefe;border:1px #dae0e2 solid;padding-bottom:20px}#jump-start-area #jumpstart-cta,#jump-start-area .jumpstart-desc{padding:0}#jump-start-area p{font-size:14px;line-height:185%}#jump-start-area .spinner{float:none;margin:0 auto;position:absolute;bottom:0;height:100%;width:100%;background-position:50% 56%;background-color:rgba(254,254,254,0.99);display:block;opacity:.9}.jumpstart-message p{padding-left:25px}.jumpstart-desc{text-align:right}#jumpstart-cta{text-align:center}.dismiss-jumpstart{color:#999;font-size:14px}#jumpstart-cta .button,#jumpstart-cta .button-primary{margin:1em;font-size:18px;height:45px !important;padding:8px 15px 1px}#jumpstart-cta .button-primary{display:block;margin:35px 20px 5px 20px}#jp-config-list{position:relative;padding-top:15px;padding-bottom:15px;margin-right:-15px;margin-left:-15px}#jp-config-list .j-col{padding:15px}#jp-config-list strong{display:inline-block}#jp-config-list small{display:block;margin-top:5px;line-height:150%}#jp-config-list .close{position:absolute;top:10px;left:0;text-transform:uppercase;font-weight:bold;display:block;z-index:5}.jp-config-status{text-transform:uppercase;font-size:10px;font-weight:bold;line-height:100%;color:#fff;background:#9fbd72;border-radius:2px;padding:2px 4px;display:inline-block}.miguel{display:none;position:fixed;opacity:.35;bottom:-200px;right:0;z-index:1;-webkit-animation:miguel 3.4s 0s ease-in-out;animation:miguel 3.4s 0s ease-in-out}.miguel:nth-child(2){right:49%;width:120px;height:131px;-webkit-animation-duration:2.4s;animation-duration:2.4s;-webkit-animation-delay:0s;animation-delay:0s}.miguel:nth-child(3){right:23%;width:60px;height:66px;-webkit-animation-duration:4.5s;animation-duration:4.5s;-webkit-animation-delay:0s;animation-delay:0s}@-webkit-keyframes "miguel"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(900px, -900px, 0px);transform:translate3d(900px, -900px, 0px)}}@keyframes "miguel"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(900px, -900px, 0px);transform:translate3d(900px, -900px, 0px)}}@media (max-width: 1147px){.jp-content .landing{padding:0 2em}.jp-content .footer{padding-top:1.5em}}@media (max-width: 782px){#jumpstart-cta .button-primary{margin:10px 0 5px 0}#jump-start-area .spinner{background-position:50% 35%}}@media (max-width: 530px){.jp-content .landing{padding:0 .5em}#jump-start-area{padding:0 1em}.jumpstart-message p{padding-left:0}#jumpstart-cta .button-primary{margin:0 0 5px 0;padding-bottom:10px}.footer .a8c-attribution a:after{top:6px}}.nav-horizontal:before,.features:before,.modules:before,.load-more:before,.nav-horizontal:after,.features:after,.modules:after,.load-more:after{content:"";display:table}.nav-horizontal:after,.features:after,.modules:after,.load-more:after{clear:both}
+.j-row{width:100%;margin:0 auto}.j-row:before,.j-row:after{content:" ";display:table}.j-row:after{clear:both}.j-col{padding:0.85em;width:100%;float:right;position:relative}@media only screen{.j-sm-1{width:8.33333%}.j-sm-2{width:16.66667%}.j-sm-3{width:25%}.j-sm-4{width:33.33333%}.j-sm-5{width:41.66667%}.j-sm-6{width:50%}.j-sm-7{width:58.33333%}.j-sm-8{width:66.66667%}.j-sm-9{width:75%}.j-sm-10{width:83.33333%}.j-sm-11{width:91.66667%}.j-sm-12{width:100%}}@media (min-width: 530px){.j-md-1{width:8.33333%}.j-md-2{width:16.66667%}.j-md-3{width:25%}.j-md-4{width:33.33333%}.j-md-5{width:41.66667%}.j-md-6{width:50%}.j-md-7{width:58.33333%}.j-md-8{width:66.66667%}.j-md-9{width:75%}.j-md-10{width:83.33333%}.j-md-11{width:91.66667%}.j-md-12{width:100%}}@media (min-width: 782px){.j-lrg-1{width:8.33333%}.j-lrg-2{width:16.66667%}.j-lrg-3{width:25%}.j-lrg-4{width:33.33333%}.j-lrg-5{width:41.66667%}.j-lrg-6{width:50%}.j-lrg-7{width:58.33333%}.j-lrg-8{width:66.66667%}.j-lrg-9{width:75%}.j-lrg-10{width:83.33333%}.j-lrg-11{width:91.66667%}.j-lrg-12{width:100%}}body,button,input,select,textarea{color:#222;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{color:#222;clear:both}a{color:#0d72b2;transition:color .2s;text-decoration:none}a:visited{color:#0d72b2}a:hover{color:#0f92e5}a:focus{outline:thin dotted}address{margin:0 0 1.5em}abbr[title],acronym{cursor:help}ins{background:#eee;text-decoration:none}dt{font-weight:700}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}@-webkit-keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}@keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}.button,.download-jetpack{transition:all .1s ease-in-out}.jp-button,.jp-button--settings{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#efefef;font:800 0.9285714286em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;border-radius:3px}.jp-button:visited,.jp-button--settings:visited{color:#efefef}.jp-button:hover,.jp-button--settings:hover,.jp-button:focus,.jp-button--settings:focus{color:#fff;background:#57972d}.jp-button:active,.jp-button--settings:active{background:#57972d;opacity:0.8}.jp-button--settings{background:#93b45f;color:#e8eedf}.jp-button--settings:visited{color:#e8eedf}.jp-button--settings:hover,.jp-button--settings:focus{background:#9fbd72;color:#fff}.jp-button--settings.current{background:#3c6621;color:#fff;box-shadow:inset 0 2px 0 #365A1F, inset 0 1px 3px #3c6621}.download-jetpack{display:inline-block;position:relative;padding:0.64286em 0.85714em 0.53571em;color:#fff;font:400 20px/1 "proxima-nova", 'Open Sans', Helvetica, sans-serif;background:#518d2a;z-index:3;border-radius:6px;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:visited{color:#fff}.download-jetpack:hover,.download-jetpack:focus{color:#fff;background:#57972d;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:active{top:6px;box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.4)}.download-jetpack:active:after{top:-6px}.download-jetpack:before{content:'';display:inline-block;position:relative;top:-2px;margin-left:13px;width:30px;height:30px;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%}.download-jetpack:after{content:'';position:absolute;top:0;right:0;width:100%;height:100%}@media (max-width: 1147px){.download-jetpack{font-size:1.28571em}.download-jetpack:before{top:-1px;width:23px;height:23px}}@media (max-width: 900px){.download-jetpack:active{top:0}}@media (max-width: 530px){.download-jetpack{font-size:1.21429em;font-weight:600}.download-jetpack:before{width:19px;height:19px;margin-left:9px}}#searchsubmit{display:inline-block;border:none;position:relative;padding:0.71429em 1.5em;color:#efefef;font:800 0.8em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;outline:none;border-radius:3px}#searchsubmit:visited{color:#efefef}#searchsubmit:hover,#searchsubmit:focus{color:#fff;background:#2aa0d5}#searchsubmit:active{opacity:0.7}@font-face{font-family:'automatticons';src:url("../_inc/fonts/automatticons/automatticons.eot");src:url("../_inc/fonts/automatticons/automatticons.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/automatticons/automatticons.woff") format("woff"),url("../_inc/fonts/automatticons/automatticons.ttf") format("truetype"),url("../_inc/fonts/automatticons/automatticons.svg#automatticonsregular") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.eot");src:url("../_inc/fonts/jetpack/jetpack.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/jetpack/jetpack.woff") format("woff"),url("../_inc/fonts/jetpack/jetpack.ttf") format("truetype"),url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg");font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio: 0){@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg")}}.nav-horizontal a{display:inline-block}.nav-horizontal li{position:relative;float:right}.nav-horizontal ul{margin:0;padding:0}*,*:before,*:after{-moz-box-sizing:border-box;box-sizing:border-box}::-moz-selection{background:#91bd51;color:#fff;text-shadow:none}::selection{background:#91bd51;color:#fff;text-shadow:none}#wpbody-content{padding-bottom:0}#wpcontent{margin-right:160px;padding:0}ul#adminmenu a.toplevel_page_jetpack:after{border-left-color:#81a844}.folded #wpcontent{margin-right:36px}.jp-content{background:#f9f9f9;margin:0;height:auto;min-height:100%;width:100%;width:100%;-webkit-font-smoothing:antialiased}.jp-content .wrapper{background:#f9f9f9}@media (max-width: 900px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:36px;padding-right:0}}@media (max-width: 782px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:0}}@media (max-width: 782px){.configure .frame.top.fixed{padding-right:0}}.wrap.inner,.page-content{max-width:950px;margin:0 auto}.wrap.inner li,.page-content li{line-height:23px}@media (max-width: 530px){.page-content{margin-top:0}}@media (max-width: 1147px){.wrap.inner{background:#f9f9f9;padding:15px}}@media (max-width: 530px){.wrap.inner{margin-top:1.71429em}}.jetpack_page_jetpack_modules .header-nav{margin:0}.jetpack_page_jetpack_modules .page-content{max-width:1200px;min-height:500px;margin:0}.page-content.about{position:relative;z-index:10}@media (max-width: 1147px){.page-content.about{background:#f9f9f9;padding:15px}}@media (max-width: 1147px){.page-content.configure{background:#f9f9f9}}.footer nav{max-width:550px;margin:0 auto}.header{right:0;left:0;background:#81a844}.header-nav li{line-height:60px}.header-nav a{padding:0 0.71429em;line-height:24px}.header-nav .jetpack-logo a{display:inline-block;position:relative;width:214px;margin-left:6px;background:url(../images/jetpack-logo.png) center center no-repeat;background:url(../images/jetpack-logo.svg) center center no-repeat,none;background-size:183px auto;color:#fff;line-height:60px;font-weight:normal}.header-nav .jetpack-logo a span{text-indent:-9999px;visibility:hidden}.header-nav .jetpack-logo a:before{content:'';position:absolute;top:0;right:0;width:100%;height:100%;background-size:183px 32px}.header-nav .jetpack-modules+.jetpack-modules{margin-right:15px}.main-nav{float:right}.main-nav li{margin:0}@media (max-width: 900px){.main-nav{font-size:13px}}.user-nav{float:left}.user-nav li{margin:0}.jetpack-pagestyles #screen-meta{margin:0}.jetpack-pagestyles #screen-meta-links .screen-meta-toggle{z-index:2}.jetpack-pagestyles #screen-options-link-wrap,.jetpack-pagestyles #contextual-help-link-wrap{border:none}.jetpack-pagestyles .update-nag{display:none}.masthead{position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #8eb74e)}.masthead.hasbutton .flyer{bottom:-270px}.masthead.hasbutton .subhead{margin-top:175px}@media (max-width: 530px){.masthead.hasbutton .subhead{margin-top:105px;padding:0}}.masthead h1,.masthead h2{margin:0 auto}.masthead h1{padding:2.5em 0 1.11111em;max-width:21.94444em;color:#fff;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;text-shadow:0 -1px 1px rgba(0,0,0,0.12);z-index:3}.masthead h1+.flyby{margin-top:180px}@media (max-width: 1147px){.masthead h1{padding-top:1.83333em;font-size:2.14286em}}@media (max-width: 782px){.masthead h1{max-width:600px;font-size:28px}}@media (max-width: 530px){.masthead h1{margin:0 15px;padding:31px 0 15px 0;font-size:21px;font-weight:400}}.jetpack-connected .masthead h1{margin-bottom:33px;max-width:600px}.flyer{position:absolute;bottom:-200px;right:4%;z-index:1;-webkit-animation:flyer 3.4s 2s ease-in-out;animation:flyer 3.4s 2s ease-in-out}.flyer:nth-child(2){right:49%;width:120px;height:131px;-webkit-animation-delay:4.6s;animation-delay:4.6s;-webkit-animation-duration:2.4s;animation-duration:2.4s}.flyer:nth-child(3){right:23%;width:60px;height:66px;-webkit-animation-delay:5.8s;animation-delay:5.8s;-webkit-animation-duration:4.5s;animation-duration:4.5s}.subhead{position:relative;margin-top:105px;padding:4em 0;background:#f9f9f9;z-index:2}.subhead h2{max-width:460px;color:#5d6d74;font:400 1.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 900px){.subhead h2{max-width:428px;font-size:20px}}@media (max-width: 530px){.subhead h2{display:none}}.subhead:after{content:'';position:absolute;bottom:100%;right:0;margin-bottom:-1px;width:100%;height:228px;background:url("../images/the-cloud.svg") center bottom repeat-x;pointer-events:none;z-index:-1}@media (max-width: 1147px){.subhead{margin-top:122px;padding:70px 0 49px}.subhead:after{background-size:160% auto}}@media (max-width: 900px){.subhead{margin-top:122px;padding:70px 0 49px}}@media (max-width: 530px){.subhead{margin-top:83px;padding:47px 15px 39px}}.clouds-sm{height:100px;position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #89b348)}.clouds-sm:after{content:'';position:absolute;bottom:0;right:0;margin-bottom:-1px;width:100%;height:137px;background:url("../images/the-cloud-sm.svg") center bottom repeat-x;pointer-events:none;z-index:2}@media (max-width: 530px){.clouds-sm{height:90px}}.featured{border-top:1px solid #d6d6d6;border-bottom:1px solid #d6d6d6;background:#fff;position:relative;padding:2.0em 1em 4.6em 1em;text-align:center;z-index:1}.featured:before{content:"";display:block;position:absolute;top:0;height:100%;z-index:-1}.featured .features,.featured .modules{margin:0 auto;display:inline-block}@media (max-width: 530px){.featured{display:none}}.featured h2,.module-grid h2{margin-top:1em;color:#5d6d74;font:300 2em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-align:center}@media (max-width: 900px){.featured h2,.module-grid h2{font-size:30px}}@media (max-width: 782px){.featured h2,.module-grid h2{font-size:28px}}.features,.modules{margin:0 -5px}.feature,.module{position:relative;float:right;margin:0 5px 10px;width:310px;transition:all .2s ease-in-out}@media (max-width: 1147px){.feature,.module{margin:.75% 1.5% .75% 0;width:32.333333%;transition:none}.feature:nth-child(3n+1),.module:nth-child(3n+1){margin-right:0}.feature:hover,.module:hover{top:0;box-shadow:none}}.feature{-webkit-transform:translateZ(0);transform:translateZ(0)}.feature h3{margin:0 0 0.58824em;color:#697b84;font-size:1.21429em;line-height:1em;font-weight:800}.feature p{margin:0;color:#6e818a}.feature:before{content:'';position:absolute;bottom:0;right:0;width:100%;height:10px;background:rgba(0,0,0,0.02);z-index:-1;-webkit-transform:translateZ(0);transform:translateZ(0);transition:all .2s ease-in-out}.feature:hover{-webkit-transform:translateY(-5px);-ms-transform:translateY(-5px);transform:translateY(-5px)}.feature:hover h3{color:#1a8dba}.feature:hover .feature-img{border:1px solid #ccc;border-bottom:none}.feature:hover .no-border{border:none}.feature:hover:before{-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px)}@media (max-width: 1147px){.feature:hover h3{color:#6e818a}.feature:hover .feature-img{border:1px solid #ddd;border-bottom:none}.feature:hover .no-border{border:none}}.feature .feature-img{padding-top:52%;width:100%;height:auto;border:1px solid #ddd;border-bottom:none}.feature .feature-img.custom-css{background:url("../images/custom-css.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.custom-css{background-image:url("../images/custom-css@2x.jpg")}}.feature .feature-img.wordpress-connect{background:url("../images/wordpress-connect.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-connect{background-image:url("../images/wordpress-connect@2x.jpg")}}.feature .feature-img.wordpress-stats{background:url("../images/wordpress-stats.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-stats{background-image:url("../images/wordpress-stats@2x.jpg")}}.feature .feature-img.no-border{border:none;padding-bottom:1px}.feature-description{display:block;padding:1em 1.07143em 1.07143em;border:1px solid #ddd;background:#f5f5f5}.feature:hover .feature-description{background:#fff;border-color:#ccc}@media (max-width: 1147px){.feature:hover .feature-description{border:1px solid #ddd;background:#f5f5f5}}@media (max-width: 900px){.feature-description{min-height:115px}}.cat{clear:both;margin-bottom:23px}.cat h3{font-size:24px;font-weight:300;margin:0 6px 13px 0;text-align:right}.cat .clear{clear:both}.module-grid{text-align:center}.module-grid h2{margin:1em 0}@media (max-width: 530px){.module-grid h2{padding-top:16px;margin-top:0;font-size:25px}}#module-search{position:relative;width:100%;max-width:40.71429em;margin:0 auto 1.07143em;overflow:hidden}#jetpack-search{margin:0;padding:11px 16px 11px 16px;width:100%;border:1px solid #c9ced0;border-radius:3px;background:#fff;color:#5c6671;line-height:1.3}#jetpack-search:focus{color:#5c6671;outline:none}#jetpack-search:focus+label{background:transparent;opacity:0}#jetpack-search::-webkit-input-placeholder{color:#a8acae}#jetpack-search :-moz-placeholder{color:#a8acae}#jetpack-search::-moz-placeholder{color:#a8acae}#jetpack-search:-ms-input-placeholder{color:#a8acae}#jetpack-search+label{position:absolute;top:1px;left:1px;bottom:1px;width:48px;color:#abafb1;text-indent:-9999px;pointer-events:none;border-radius:3px;transition:all .2s ease-in-out}#jetpack-search+label:after{content:'\f400';position:absolute;left:11px;text-align:left;top:4px;font-size:1.71429em;font-weight:normal;font-family:"genericons"}.jp-filter{margin-bottom:2.85714em;color:#6f7476}.jp-filter a{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#aaa;font:600 0.92857em/1 "Open Sans", Helvetica, Arial, sans-serif;text-shadow:0 -1px 1px rgba(255,255,255,0.2);background:#eee;border-radius:3px;background-clip:padding-box}.jp-filter a.selected,.jp-filter a:hover,.jp-filter a:focus{color:#efefef;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476}@media (max-width: 530px){.jp-filter a{padding:0.76em 1em}}.module{display:block;padding:0.71429em 1.07143em 1em;text-align:right;border:1px solid #dae0e2;background:#fff;box-shadow:0 0 0 rgba(0,0,0,0.03);transition:opacity 2s ease-in}.module:hover{border-color:#8ac9e8;background:#f8fcfe}.module h3{cursor:pointer;margin:0 0 0.5em;color:#1a8dba;font-size:1.14286em;line-height:1.4em;font-weight:700}.module p{margin:0;color:#686f72;font-size:0.85714em}.module:hover,.module:focus{border-color:#8ac9e8;background:#f8fcfe}.module.active{border-color:#2ea2cc;box-shadow:inset -4px 0 0 #2ea2cc}.module.active:hover{border-color:#69bedd;box-shadow:inset -4px 0 0 #69bedd}.module .button,.module .button-primary{margin-top:15px}@media (max-width: 530px){.module .configure,.module .activate{display:block;width:100%;text-align:center}.module .button,.module .button-primary{width:50%}.module .button-primary{line-height:normal;padding:6px 14px;height:auto;font-size:14px}}@media screen and (max-width: 450px){.module .button,.module .button-primary{margin:20px auto 0 auto}.module .button.alignright,.module .button-primary.alignright{float:none}}@media (max-width: 1147px){.cat .module:nth-child(3n+1){margin:.75% 1.5% .75% 0}.cat .module:nth-child(3n - 1){margin-right:0}}@media (max-width: 900px){.cat .module{margin:1% 2% 1% 0}.cat .module:nth-child(2n+1){margin:1% 2% 1% 0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 530px){.cat .module{margin:5px 0}.cat .module:nth-child(2n+1){margin-right:0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 900px){.module{margin:1% 2% 1% 0;width:49%}.module:nth-child(3n+1){margin-right:2%}.module:nth-child(2n+1){margin-right:0}}@media (max-width: 530px){.module{margin:5px 0;width:100%}.module:nth-child(3n+1){margin-right:0}.module:nth-child(2n+1){margin-right:0}}.new{position:relative}.new:after{content:'NEW';position:absolute;top:-8px;left:-8px;padding-top:10px;width:32px;height:32px;color:#fff;font-size:8px;font-weight:800;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,0.2);background:url("../images/new-badge.svg") center center no-repeat;background-size:100%;border-radius:50%}.paid{display:inline-block;position:relative;top:5px;margin-right:10px;padding:1px 4px 0 6px;height:13px;color:#fff;font:700 10px/1 "Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 0 rgba(0,0,0,0.05);background:#d0d0d0;vertical-align:top}.paid:before,.paid:after{position:absolute;top:0;left:100%;font:normal 14px/14px "genericons"}.paid:before{content:'\f503';color:#d0d0d0;text-shadow:none}.paid:after{content:'\f428';margin-left:-5px;font-size:11px}.rtl .paid:before{content:'\f501'}.load-more{margin:2.71429em 0 6.15385em}.set{display:none}.show.set{display:block}.loading{bottom:50%;position:absolute;top:50%;width:100%}.loading span{color:#999}.modal{background:#fff;position:fixed;top:52px;bottom:20px;left:20px;right:20px;margin-right:160px;display:none;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1);z-index:500}.modal .close{position:absolute;top:0;left:0;font:300 1.71429em "genericons" !important;color:#777;content:'\f405';display:inline-block;padding:0.28571em 0.71429em 0.42857em;z-index:5}.modal .close:hover{background:#eee;opacity:0.8}.modal .close:active{background:#eee;opacity:0.4}.modal #jp-post-flair{display:none}.modal .content-container{position:absolute;top:0;left:0;bottom:0;right:0;overflow:auto;padding:2.14286em}.modal .content{margin:0 auto;max-width:900px;text-align:right}.modal h2{text-align:right;margin-top:0;color:#5d6d74;font:300 32px "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.modal h2{font-size:26px}}.modal h5{clear:right}.modal p{font-size:1.23077em}.modal footer{position:absolute;right:0;bottom:0;width:100%;padding:12px 20px;border-top:1px solid #ddd;background:#fff;text-align:left}.modal footer ul{margin:0}.modal footer li{display:inline-block;margin:0}.modal .button-secondary,.modal .button-primary:active{vertical-align:baseline}@media (max-width: 900px){.modal{bottom:5%;margin-right:36px;font-size:80%}.modal .content{top:38px}}@media (max-width: 782px){.modal{top:66px;margin-right:0}}@media (max-width: 600px){.modal{top:10px;left:10px;bottom:10px;right:10px}}.jp-info-img{float:left;margin:0 30px 30px 0}.jp-info-img img{border:1px solid #ddd;max-width:100%;height:auto}.jp-info-img img:first-child{margin-top:0}@media (max-width: 782px){.jp-info-img{float:none;margin:0 0 15px}}.content-container.modal-footer{bottom:53px}.shade{background:#000;bottom:0;cursor:pointer;display:none;right:0;opacity:0.2;position:fixed;left:0;top:0;z-index:11}.entry-title,.page-template-default h1{margin-top:0.61111em;color:#5d6d74;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.entry-title,.page-template-default h1{font-size:2em}}.blog h3,.single h3,.page-template-default h2{margin-top:0.61111em;color:#5d6d74;font:300 1.9em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.blog h3,.single h3,.page-template-default h2{font-size:1.4em}}.page-template-default p{line-height:1.71429em}.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{float:right;width:70%}.footer{margin-top:1.42857em;position:relative;padding:10em 0 4.28571em;text-align:center}.footer:before,.footer:after{content:'';position:absolute;right:0;pointer-events:none}.footer:before{top:0;margin-top:-1px;width:100%;height:195px}.footer:after{display:none}.footer .download-jetpack{margin-bottom:33px}@media (min-width: 1147px){.footer{padding-bottom:35px}}@media (max-width: 1147px){.footer{padding-top:165px;padding-bottom:0}.footer:before{background-size:160% auto}.footer ul{float:none;overflow:hidden}}@media (max-width: 900px){.footer{padding-top:146px}}@media (max-width: 782px){.footer{margin-top:0}}@media (max-width: 530px){.footer{margin-top:0;padding-top:135px}}@media (max-width: 320px){.footer{padding-top:76px}}.footer nav{max-width:100%}.footer nav a,.footer nav a:visited{padding:4px 6px;color:#999}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81A844}@media (max-width: 1147px){.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81a844}}@media (max-width: 530px){.footer nav li{display:block;float:none;margin:0;text-align:right}.footer nav a{display:block;padding:0 16px;line-height:44px}}.primary{padding:25px 15px 10px 15px;border-bottom:1px solid #eee}.secondary-footer{margin:0 auto}.secondary-footer li{margin-left:5px}@media (min-width: 782px){.secondary-footer{padding:8px 15px 10px;margin-bottom:30px;border-bottom:1px solid #eee}}@media (min-width: 1147px){.secondary-footer{margin-bottom:0}}@media (max-width: 782px){.secondary-footer{padding:8px 15px 8px;border-bottom:none}}@media (max-width: 530px){.secondary-footer{margin:0;padding:0;border:none;font-weight:400}.secondary-footer a{border-top:1px solid #eee}}.footer .a8c-attribution{margin:0;padding:0 6px;color:#bbb;font-size:0.78571em;font-family:"Gill Sans","Gill Sans MT","Open Sans",Helvetica,Arial,sans-serif;text-transform:uppercase}.footer .a8c-attribution a{display:inline-block;position:relative;padding:4px 16px;left:9999px;outline:0}.footer .a8c-attribution a:after{content:'A';position:absolute;top:2px;left:-9999px;height:100%;color:#999;font-size:1.54545em;font-family:"automatticons";text-align:center}.footer .a8c-attribution a:hover:after{-webkit-animation:candy .4s ease-in-out;animation:candy .4s ease-in-out}@media (min-width: 782px){.secondary{padding:0 15px 10px 15px;border-bottom:1px solid #eee}}@media (min-width: 1147px){.secondary{padding:0 15px 10px 15px;border-bottom:none}}.jetpack-message{background:#8eb74e;border:1px solid #73963d;margin:33px auto 0;max-width:90%;position:relative;z-index:2}.jetpack-message.is-opt-in{margin:50px 0 0;max-width:100%;padding:10px 15px;background:#fff;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);font-size:13px;text-align:center}.subhead .jetpack-message.is-opt-in{margin:0;padding-bottom:0;background:transparent;box-shadow:none}.subhead .jetpack-message.is-opt-in .jp-button,.subhead .jetpack-message.is-opt-in .jp-button--settings{display:inline-block}.jetpack-message.is-opt-in p{color:#3c4549}.jetpack-message.is-opt-in .jp-button,.jetpack-message.is-opt-in .jp-button--settings{margin-top:15px;display:none}.jetpack-message .squeezer h2{font-size:1em}.jetpack-message h2{color:#fff;margin:0}.jetpack-message p{color:#fff;margin:0;opacity:0.7}.jetpack-message .squeezer{padding:23px 80px 23px 23px;position:relative;text-align:right}.jetpack-message .squeezer:before{color:#fff;content:'\f418';font-family:'Genericons';font-size:33px;height:33px;right:25px;opacity:0.6;position:absolute;top:23px;top:calc( 50% - 22px )}@media (max-width: 530px){.jetpack-message .squeezer{padding:23px}.jetpack-message .squeezer:before{display:none}}.jetpack-message .squeezer a{color:#FFF;border-bottom:1px solid #D5E4BD}.jetpack-message .squeezer a:hover{border-bottom:1px solid #F1F6E9}.jetpack-message.error .squeezer:before,.jetpack-message.jetpack-err .squeezer:before{content:'\f414'}.configure-module .jetpack-message{max-width:100%}.jetpack-modules #site-icon-deprecated .info,.modules h3.icon,.jetpack-modules .info a{width:auto}.jetpack-modules #site-icon-deprecated .info:before,.modules h3.icon:before,.jetpack-modules .info a:before{display:inline-block;position:relative;top:1px;right:-3px;margin-left:2px;opacity:0.8;font:normal 20px "genericons";vertical-align:top}.jetpack-modules .info a:before{margin-top:1px}.latex:before,.jetpack-modules #latex .info a:before{content:'\f408'}.carousel:before,.jetpack-modules #carousel .info a:before{content:'\f102'}.modules h3.contact-form:before,.jetpack-modules #contact-form .info a:before{content:'\f175';font:normal 20px "dashicons"}.modules h3.custom-css:before,.jetpack-modules #custom-css .info a:before{content:'\f100';font:normal 20px "dashicons"}.modules h3.enhanced-distribution:before,.jetpack-modules #enhanced-distribution .info a:before{content:'\f237';font:normal 20px "dashicons"}.modules h3.widgets:before,.jetpack-modules #widgets .info a:before{content:'\f116';font:normal 20px "dashicons"}.modules h3.gravatar-hovercards:before,.jetpack-modules #gravatar-hovercards .info a:before{content:'G';font-family:"automatticons"}.infinite-scroll:before,.jetpack-modules #infinite-scroll .info a:before{content:'\f408'}.comments:before,.jetpack-modules #comments .info a:before{content:'\f108'}.sso:before,.jetpack-modules #sso .info a:before{content:'\f205'}.json-api:before,.jetpack-modules #json-api .info a:before{content:'\f415'}.likes:before,.jetpack-modules #likes .info a:before{content:'\f408'}.markdown:before,.jetpack-modules #markdown .info a:before{content:'\f462'}.minileven:before,.jetpack-modules #minileven .info a:before{content:'\f453'}.manage:before,.jetpack-modules #manage .info a:before{content:'\f205'}.monitor:before,.jetpack-modules #monitor .info a:before{content:'\f468'}.notes:before,.jetpack-modules #notes .info a:before{content:'\f300'}.omnisearch:before,.jetpack-modules #omnisearch .info a:before{content:'\f400'}.photon:before,.jetpack-modules #photon .info a:before{content:'\f403'}.post-by-email:before,.jetpack-modules #post-by-email .info a:before{content:'\f410'}.protect:before,.jetpack-modules #protect .info a:before{content:'\f470';position:relative;top:-1px}.modules h3.publicize:before,.jetpack-modules #publicize .info a:before{content:'\f237';font:normal 20px "dashicons"}.related-posts:before,.jetpack-modules #related-posts .info a:before{content:'\f420'}.sharedaddy:before,.jetpack-modules #sharedaddy .info a:before{content:'\f415'}.shortcodes:before,.jetpack-modules #shortcodes .info a:before{content:'\f100'}.verification-tools:before,.jetpack-modules #verification-tools .info a:before{content:'\f425'}.after-the-deadline:before,.jetpack-modules #after-the-deadline .info a:before{content:'\f411'}.subscriptions:before,.jetpack-modules #subscriptions .info a:before{content:'\f410'}.tiled-gallery:before,.jetpack-modules #tiled-gallery .info a:before{content:'\f103'}.modules h3.vaultpress:before,.jetpack-modules #vaultpress .info a:before{content:'V';font-family:"automatticons"}.videopress:before,.jetpack-modules #videopress .info a:before{content:'\f104'}.modules h3.widget-visibility:before,.jetpack-modules #widget-visibility .info a:before{content:'\f116';font:normal 20px "dashicons"}.stats:before,.jetpack-modules #stats .info a:before{content:'\f205'}.shortlinks:before,.jetpack-modules #shortlinks .info a:before{content:'\f107'}.modules h3.custom-content-types:before,.jetpack-modules #custom-content-types .info a:before{content:'\f498';font:normal 20px "dashicons"}.modules h3.site-icon:before,.jetpack-modules #site-icon .info a:before{content:'\f475'}.jetpack-modules #site-icon-deprecated .info:before{content:'\f475'}.jetpack-modules #sitemaps .info a:before{content:'\f507'}@media (max-width: 782px){.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{width:100%}}@media (max-width: 600px){.clouds-sm{display:none}}@media (max-width: 530px){.wrap.inner.jp-support .jp-support-column-left{width:100%}.wrap.inner.jp-support .jp-support-column-left .widget-text{margin-left:0;width:100%}.wrap.inner.jp-support .jp-support-column-right{width:100%}}@media screen and (max-width: 515px){.jp-frame .header-nav{padding-bottom:10px}.jp-frame .header-nav li{line-height:30px}.jp-frame .header-nav .jetpack-logo{width:100%;text-align:center}.jp-frame .header-nav .jetpack-modules{margin:0;width:50%;text-align:left;padding:0 5px}.jp-frame .header-nav .jetpack-modules+.jetpack-modules{text-align:right}.jp-frame .header-nav .jetpack-modules:nth-child(4){text-align:center;margin:0 auto;width:100%}.jp-frame .header-nav .jetpack-modules:nth-child(4) a{padding:0 10px}}@media (max-width: 320px){.jetpack_page_jetpack_modules .wrap{padding:0 0 1em}}.page-content.configure{margin-top:0}.configure .frame.top{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}.configure .frame.top.fixed{background:#f9f9f9;border-bottom:1px solid #e9e9e9;padding-right:160px;margin-top:-6px;position:fixed;left:0;top:32px;width:100%;z-index:4;box-shadow:0 2px 2px -2px #eee}@media (max-width: 782px){.configure .frame.top.fixed{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}}@media (max-width: 600px){.configure .frame.top.fixed{top:0}}.configure .frame.top .tablenav.top{float:right}@media (max-width: 900px){.configure .frame.top .tablenav.top .actions{display:block}}@media (max-width: 782px){.configure .frame.top .tablenav.top .actions{margin-top:6px}}.jp-frame-top-fixed .configure{padding-top:94px}.filter-search{display:none;float:left;margin-top:10px}@media (max-width: 782px){.filter-search{display:block}}@media (max-width: 530px){.filter-search{display:none}}.module-actions.landing-page{float:left;margin-left:15px}.module-actions.landing-page a{font-size:0.6em}.table-bordered.jetpack-modules{border:none;margin-bottom:0}.table-bordered.jetpack-modules tr.jetpack-module th{border-right:0;padding:14px 4px 0}.table-bordered.jetpack-modules tr.jetpack-module th input{display:block}.table-bordered.jetpack-modules tr.jetpack-module:hover .genericon{display:inline-block}.table-bordered.jetpack-modules tr.jetpack-module:hover td .row-actions span a{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.active th,.table-bordered.jetpack-modules tr.jetpack-module.active td{background:#f7fcfe}.table-bordered.jetpack-modules tr.jetpack-module.active th{border-right:4px solid #2ea2cc;padding-right:0px}.table-bordered.jetpack-modules tr.jetpack-module.active td:first-child{border-right:4px solid #2ea2cc}.table-bordered.jetpack-modules tr.jetpack-module.unavailable{opacity:0.3}.table-bordered.jetpack-modules tr.jetpack-module.unavailable input{display:none}.table-bordered.jetpack-modules tr.jetpack-module#vaultpress{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.deprecated span{color:#888}.table-bordered.jetpack-modules tr.jetpack-module.deprecated .dep-msg{margin-left:10px;color:#555}.table-bordered.jetpack-modules tr.jetpack-module th,.table-bordered.jetpack-modules tr.jetpack-module td{background:#fff;margin:0;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1)}.table-bordered.jetpack-modules tr.jetpack-module td{padding:10px 14px 8px 10px;line-height:25px}.table-bordered.jetpack-modules tr.jetpack-module td:first-child{border-right:4px solid #fff}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{float:left;padding:0 0 1px;visibility:visible}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span{margin-right:5px}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a{opacity:0}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a:focus{opacity:1}@media (max-width: 530px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}}@media (max-width: 782px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:block;padding-right:10px;visibility:visible}}.table-bordered.jetpack-modules>thead>tr>th{border:0;vertical-align:middle}.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-left:0}@media (max-width: 782px){.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-right:0}}.table-bordered.jetpack-modules td{background:#fff}.table-bordered.jetpack-modules #doaction{margin-top:0}@media (max-width: 782px){.table-bordered.jetpack-modules #doaction{padding:10px 7px}}.table-bordered.jetpack-modules .checkall{margin-top:1px}.table-bordered.jetpack-modules .filter-search{margin-top:8px}.table-bordered.jetpack-modules .genericon{color:#999;display:none;margin:7px 3px 0}@media (max-width: 900px){.table-bordered.jetpack-modules .genericon{display:inline-block}}.table-bordered.jetpack-modules .med{width:70px}.table-bordered.jetpack-modules .sm{width:30px}@media (max-width: 782px){.table-bordered.jetpack-modules .check-column{width:50px}}.fixed-top .check-column{padding:8px 10px 0 10px;width:2.2em}.wrap{margin:0;padding:0 1.5em 1em;overflow:hidden}.wrap h2{font-size:24px;font-weight:400}.wrap .manage-left{float:right;margin:0;padding:0;width:63%}.wrap .manage-left table{width:100%}.wrap .manage-left th{font-weight:400}@media (max-width: 782px){.wrap .manage-left{width:100%}}.wrap .manage-right{margin:0;padding:0;float:left;width:35%;z-index:1}.wrap .manage-right p{font-size:12px;font-weight:bold;color:#bbb;padding-top:2px;text-transform:uppercase;letter-spacing:1px;clear:right}.wrap .manage-right .bumper{margin-right:33px}.wrap .manage-right.show{display:block;overflow-y:auto;overflow-x:hidden;position:absolute;z-index:100000}.wrap .manage-right .search-bar{margin-bottom:18px;max-width:300px}.wrap .manage-right p.search-box{float:none;height:auto;margin-bottom:0;position:relative}.wrap .manage-right p.search-box input[type='search']{padding:0 8px;width:90%;line-height:initial}@media (max-width: 782px){.wrap .manage-right p.search-box input[type='search']{float:right;padding:9px 8px}}.wrap .manage-left p.search-box input[type="submit"]{display:none}.wrap .manage-right .button-group .button{outline:none}.wrap .manage-right .subsubsub{margin:0;padding:0}.wrap .manage-right .subsubsub a{padding:0;line-height:inherit}.wrap .manage-right .subsubsub .current{padding:1px 5px;border-radius:2px;margin-right:-5px;background:#0D72B2;color:#fff}.wrap .manage-right .subsubsub .current .count{color:#BCD7E7;font-weight:200}.wrap .manage-right .subsubsub li{display:block;text-align:right}@media (max-width: 782px){.wrap .manage-right{background:#fff;bottom:0;display:none;min-width:300px;position:fixed;left:0;top:0;z-index:13;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1)}.wrap .manage-right .bumper{margin:13px}.wrap .manage-right .navbar-form{margin:0;padding:0}}@media (max-width: 782px){.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary):not(.check-column){padding:11px 10px;display:block}.jetpack_page_jetpack_modules #doaction{padding:7px 14px}.jetpack_page_jetpack_modules .fixed-top thead .check-column{padding:28px 10px 0 10px}.jetpack_page_jetpack_modules .filter-search{margin-top:28px}.jetpack_page_jetpack_modules .filter-search .button{padding:7px 14px}.manage-right.show .subsubsub li{padding:5px}}@media (max-width: 650px){.table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions{float:none;padding-right:18px}}@media (max-width: 430px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}.table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions{display:block}}.configure-module p{font-size:14px}.configure-module p.success,.configure-module p.error{color:#fff;padding:10px}.configure-module p.success{background-color:#81a844}.configure-module p.error{background-color:#d94f4f}.protect-status p{font-size:16px}.protect-status strong{display:inline-block;margin-top:10px;background:#fff;padding:10px;border:1px #ddd solid;font-size:16px;color:#000;max-width:100%}.protect-status.attn{color:#d94f4f}.protect-status.working{color:#81a844}#non-editable-whitelist{margin-top:15px}.protect-whitelist textarea{width:100%;min-height:150px}#editable-whitelist .whitelist-table{width:100%}.configure-module input[disabled]{opacity:.5}.configure-module input.button-primary{font-weight:bold}.whitelist-table{border-top:1px solid;border-left:1px solid;border-color:#ddd;background-color:#fff}.whitelist-table td,.whitelist-table th{padding:10px;margin:0;border-bottom:1px solid;border-right:1px solid;border-color:#ddd;font-size:14px}.whitelist-table th.heading{font-weight:bold;color:#5d6d74;text-align:right;background-color:#eee}.whitelist-table td.item-actions{border-right:none;text-align:left}.whitelist-table .toolbar{padding:0}.whitelist-table .add-btn{text-align:center;width:10%;border-right:1px #ddd solid}.ip-address,.enter-ip{width:90%;text-align:right;vertical-align:middle}.delete-ip-address{text-align:center;border:0;background:transparent;color:#6f7476;box-shadow:none;font-size:20px;margin:0;padding:0;cursor:pointer;border-radius:2px}.delete-ip-address:hover{background:#eee}.toolbar div{float:right;padding:10px}@media only screen and (min-width: 1100px){#non-editable-whitelist{width:28%;float:left;margin-top:0}.protect-whitelist{width:65%;float:right}}@media only screen and (max-width: 1130px){.enter-ip input[type="text"]{max-width:175px}}@media only screen and (max-width: 1250px) and (min-width: 1065px), (max-width: 730px) and (min-width: 600px){.enter-ip{width:85%}.add-btn{width:15%}}@media only screen and (max-width: 782px){.add-btn{text-align:left}.add-btn .ip-add{margin-top:4px;margin-bottom:3px}}@media only screen and (max-width: 730px){.add-btn{text-align:center}}@media only screen and (max-width: 665px) and (min-width: 600px){.enter-ip input[type="text"]{max-width:165px}}@media only screen and (max-width: 600px){.toolbar div{width:100%}.add-btn{border-top:1px #ddd solid}.enter-ip{text-align:center}.enter-ip strong{display:block;margin-bottom:5px}.enter-ip input[type="text"]{width:100%;max-width:100%}.add-btn input,.enter-ip .button{width:50%;margin:0 auto}.enter-ip .button{margin-top:10px}}@media only screen and (max-width: 400px){.protect-status strong{font-size:12px;overflow:auto}.add-btn input,.enter-ip .button{width:100%}}.my-jetpack-actions{margin:0 0 40px 0}.my-jetpack-actions .j-col{padding:0;text-align:center}.my-jetpack-actions #user-list{height:30px;margin-top:-1px;margin-right:-3px}#jetpack-disconnect-content{display:none;text-align:center}#jetpack-disconnect-content .cancel-disconnect{display:block;margin-top:10px}.connection-details{border:1px #ddd solid}.connection-details.local-user{margin-bottom:10px}.connection-details .user-01,.connection-details .wpuser-02,.connection-details .action-btns{padding:10px}.connection-details .user-01 .button,.connection-details .user-01 select,.connection-details .wpuser-02 .button,.connection-details .wpuser-02 select,.connection-details .action-btns .button,.connection-details .action-btns select{margin-top:5px}.connection-details .wpuser-02{margin-top:10px}.connection-details h3{padding:10px;margin:0;background:#eee;border-bottom:1px #ddd solid;font-size:14px}.jp-user img{margin-left:10px;border-radius:50%}.jp-user div,.wp-user div,.wp-action div{display:inline-block;width:100%}.j-col.jp-user,.j-col.wp-user,.j-col.wp-action{padding:0}.my-jetpack-actions select{max-width:150px}.j-actions .button:nth-child(3){margin-left:5px}.j-row.disconnect{text-align:center}.j-row.disconnect .button{margin:0 auto}a.what-is-primary{color:#b4b9be;margin-right:4px}@media (max-width: 782px){.wp-action{border-top:1px #ddd solid}.wp-action h3{display:none}}@media screen and (max-width: 500px){.connection-details{font-size:11px}.connection-details h3{font-size:12px;padding:5px}.connection-details .user-01,.connection-details .wpuser-02{padding:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.connection-details .action-btns{text-align:center}}@media (max-width: 530px){.connection-details .wpuser-02{margin-top:0;padding:12px}}@media screen and (max-width: 450px){.j-actions .button{width:100%;margin-bottom:5px;text-align:center}.j-actions .button.alignright{float:none}}@media screen and (max-width: 350px){.user-01,.wpuser-02{max-width:100px}}.manage__icon{width:155px;height:155px;margin:20px auto}.manage-page .manage__description{max-width:600px;text-align:center;font-size:22px;color:#999;margin:20px auto}.manage-page .manage__button{font-size:16px;padding:0 20px;height:40px;line-height:40px}.manage__title .genericon{font-size:38px;color:#81A944}.manage__link{font-size:16px;padding:0 20px;height:40px;line-height:40px;font-weight:normal}.manage__link .genericon{font-size:28px;vertical-align:middle;margin-top:-6px}.jp-content .hide{display:none}.jp-content .pointer{cursor:pointer}.jp-content .landing{margin:0 auto;z-index:2;position:relative}.jp-content h1{font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;z-index:3;width:100%;text-align:center}.jp-content h1.success{color:#81a844}.jp-content .footer{padding-top:0;margin-top:0;background-image:none}.jp-content .footer:before{height:inherit}.jp-content .more-info:before{content:none}.landing .wpcom-connect{min-height:400px}.wpcom-connect .j-col{padding:0}.wpcom-connect .connect-desc{padding-left:25px}.wpcom-connect .connect-btn{text-align:center}.module-grid h2{color:#000;font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif}.download-jetpack{margin-top:1em !important}#jump-start-area{margin-top:35px;padding-right:60px;padding-left:60px;background:#fefefe;border:1px #dae0e2 solid;padding-bottom:20px;text-align:center}#jump-start-area .connect-btn{text-align:center}#jump-start-area #jumpstart-cta,#jump-start-area .jumpstart-desc{padding:0}#jump-start-area p{font-size:14px;line-height:185%}#jump-start-area .spinner{float:none;margin:0 auto;position:absolute;bottom:0;height:100%;width:100%;background-position:50% 56%;background-color:rgba(254,254,254,0.99);display:block;opacity:.9}.jumpstart-message p{padding-left:25px}.jumpstart-desc{text-align:right}#jumpstart-cta{text-align:center;display:inline-block;float:none}.dismiss-jumpstart{color:#999;font-size:14px}#jumpstart-cta .button,#jumpstart-cta .button-primary{margin:1em;font-size:18px;height:45px !important;padding:8px 15px 1px}#jumpstart-cta .button-primary{display:block;margin:35px 20px 5px 20px}#jp-config-list{position:relative;padding-top:15px;padding-bottom:15px;margin-right:-15px;margin-left:-15px}#jp-config-list .j-col{padding:15px}#jp-config-list strong{display:inline-block}#jp-config-list small{display:block;margin-top:5px;line-height:150%}#jp-config-list .close{position:absolute;top:10px;left:0;text-transform:uppercase;font-weight:bold;display:block;z-index:5}.jp-config-status{text-transform:uppercase;font-size:10px;font-weight:bold;line-height:100%;color:#fff;background:#9fbd72;border-radius:2px;padding:2px 4px;display:inline-block}.nux-intro h3{background:#81a844;color:#fff;font-weight:600;padding:.75em;margin:0}.nux-intro h4{margin:0 0 2px 0}.nux-intro p{text-align:center;font-size:1.24em;line-height:175%}.nux-intro a{transition:all .4s ease}.nux-intro .j-col{padding:0 0.5em}.nux-intro .j-col:first-of-type{padding-right:0}.nux-intro .j-col:last-of-type{padding-left:0}.nux-intro .nux-in{background:#ececec;-webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.nux-intro .nux-in h3{font-size:1.10em;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;border-top-left-radius:6px}.nux-intro .nux-in h3 .dashicons{float:left;color:#658435;font-size:1.25em;padding-right:0}.nux-intro .nux-in h3 .dashicons:hover{color:#57722e}.nux-intro .nux-in p{font-size:.9em;line-height:150%;margin:0;text-align:right;color:#686f72}.nux-intro .nux-in .j-row{border-bottom:1px #f9f9f9 solid;padding:5px 0;position:relative;min-height:70px}.nux-intro .nux-in .j-row:hover{background:#e0e0e0}.nux-intro .nux-in .unavailable{opacity:0.5}.nux-intro .nux-in .unavailable .act{display:none}.nux-intro .nux-in .paid{top:4px;margin-right:12px}.nux-intro .nux-in .dashicons{color:#81a844;font-size:1em;position:relative;top:3px;padding-right:6px}.nux-intro .nux-in .dashicons:hover{color:#57722e}.nux-intro .nux-in .dashicons-external{font-size:1.5em;top:2px;padding-right:3px}.nux-intro .nux-in .lmore{font-size:11px;color:#81a844}.nux-intro .nux-in .lmore:hover{color:#57722e}.nux-intro .feat.j-col{padding:10px 10px 10px 2px}.nux-intro .feat .dashicons{display:none}.nux-intro .activated .feat .dashicons{display:inline-block}.nux-intro .act{position:absolute;top:50%;-ms-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%);left:8px;float:left}.nux-intro .act.j-col{padding:5px;text-align:left}.nux-intro .module-action{text-transform:uppercase;font-size:.85em;font-weight:600}.nux-intro .wpcom h3{background:#0087be}.nux-intro .wpcom h3 .dashicons{color:#00638b}.nux-intro .wpcom h3 .dashicons:hover{color:#005172}.nux-intro .wpcom .j-col{padding:10px}.nux-intro .wpcom .goto{text-align:center;padding:1em}.nux-intro .wpcom .goto:hover{background:#ececec}.nux-intro .wpcom .goto .j-col{padding:0 5px}.nux-intro .wpcom .goto a{width:100%;padding:.25em;height:auto}.nux-intro .wpcom .goto .button{height:auto;min-height:28px;line-height:18px;white-space:normal;max-width:200px;margin-bottom:0;padding-top:4px;padding-bottom:5px}.nux-intro .wpcom .goto .feat{position:absolute;top:50%;-ms-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.nux-intro .nux-foot .j-col{padding:1em}.nux-foot{margin-top:2em;background:#ececec;border-radius:6px}.nux-foot .j-col{min-height:75px;padding:1em}@media (max-width: 650px){.nux-foot .j-col{width:100%}}.nux-foot .j-col+.j-col{border-right:1px #f9f9f9 solid}@media (max-width: 650px){.nux-foot .j-col+.j-col{border-right:none;border-top:1px #f9f9f9 solid}}.nux-foot .actions{margin-top:1em}.nux-foot a{text-decoration:underline}.nux-foot img{float:left;margin-right:1em;width:75px;border-radius:4px}.nux-foot p{font-size:.9em;text-align:right;font-weight:600;margin-top:0}.nux-foot p+p{font-weight:400;margin-bottom:0}.nux-foot ul{font-size:.9em;margin-bottom:0}.nux-foot ul li{margin-left:.875em;margin-bottom:0;line-height:175%;display:inline-block;vertical-align:middle}.form-toggle[type="checkbox"]{opacity:0;position:absolute}.form-toggle__switch{position:relative;display:inline-block;border-radius:12px;-moz-box-sizing:border-box;box-sizing:border-box;padding:2px;width:40px;height:24px;background:#b9b9b9;vertical-align:middle;outline:0;cursor:pointer;transition:all .4s ease}.form-toggle__switch:before,.form-toggle__switch:after{position:relative;display:block;content:"";width:20px;height:20px}.form-toggle__switch:after{right:0;border-radius:50%;background:#fff;transition:all .2s ease}.form-toggle__switch:before{display:none}.form-toggle__switch:hover{background:#bdd597}.form-toggle__label{cursor:pointer}.plugin-action__label{padding-left:5px;top:-1px;position:relative;color:#8e9598}.activated .plugin-action__label{color:#81a844}.form-toggle:focus+.form-toggle__label .form-toggle__switch,.form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #0087be}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#81a844}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{right:16px}.form-toggle:checked:hover+.form-toggle__label .form-toggle__switch{background:#bdd597}.form-toggle:disabled+.form-toggle__label .form-toggle__switch,.form-toggle:disabled:hover+.form-toggle__label .form-toggle__switch{background:#e9eff3}.form-toggle.is-toggling+.form-toggle__label .form-toggle__switch{background:#81a844}.form-toggle.is-toggling:checked+.form-toggle__label .form-toggle__switch{background:#bdd597}.form-toggle.is-compact+.form-toggle__label .form-toggle__switch{border-radius:8px;width:24px;height:16px}.form-toggle.is-compact+.form-toggle__label .form-toggle__switch:before,.form-toggle.is-compact+.form-toggle__label .form-toggle__switch:after{width:12px;height:12px}.form-toggle.is-compact:checked+.form-toggle__label .form-toggle__switch:after{right:8px}@media (max-width: 1147px){.jp-content .landing{padding:0 2em}.jp-content .footer{padding-top:1.5em}.nux-intro .main-col{width:50%;margin-bottom:2em}.nux-intro .main-col.wpcom{width:100%}.nux-intro .main-col+.main-col{padding-left:0}.nux-intro .wpcom{padding:0}.nux-intro .wpcom .j-row{width:50%;float:right;border-bottom:1px #f9f9f9 solid;border-left:1px #f9f9f9 solid}.nux-intro .wpcom .j-row:last-of-type{width:100%;float:none;clear:both;border:none;border-top:1px #f9f9f9 solid;position:relative;top:-1px}.nux-intro .wpcom .goto .feat a{float:right}.nux-foot .j-col{border:none}}@media (max-width: 900px){.nux-intro .main-col{width:100%;padding:0;margin-bottom:2em}.nux-intro .wpcom .j-row{width:100%;float:none}}@media (max-width: 782px){#jumpstart-cta .button-primary{margin:10px 0 5px 0}#jump-start-area .spinner{background-position:50% 35%}}@media (max-width: 600px){.nux-intro h1{font-size:1.75em}.nux-intro p{font-size:1em}}@media (max-width: 530px){.jp-content .landing{padding:0 .5em}#jump-start-area{padding:0 1em}.jumpstart-message p{padding-left:0}#jumpstart-cta .button-primary{margin:0 0 5px 0;padding-bottom:10px}.footer .a8c-attribution a:after{top:6px}}.nav-horizontal:before,.features:before,.modules:before,.load-more:before,.nav-horizontal:after,.features:after,.modules:after,.load-more:after{content:"";display:table}.nav-horizontal:after,.features:after,.modules:after,.load-more:after{clear:both}
/*# sourceMappingURL=jetpack-admin.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin-rtl.min.css b/plugins/jetpack/css/jetpack-admin-rtl.min.css
index 7063e583..7b2d6e3e 100644
--- a/plugins/jetpack/css/jetpack-admin-rtl.min.css
+++ b/plugins/jetpack/css/jetpack-admin-rtl.min.css
@@ -1,3 +1,3 @@
-.j-row{width:100%;margin:0 auto}.j-row:before,.j-row:after{content:" ";display:table}.j-row:after{clear:both}.j-col{padding:0.85em;width:100%;float:right;position:relative}@media only screen{.j-sm-1{width:8.33333%}.j-sm-2{width:16.66667%}.j-sm-3{width:25%}.j-sm-4{width:33.33333%}.j-sm-5{width:41.66667%}.j-sm-6{width:50%}.j-sm-7{width:58.33333%}.j-sm-8{width:66.66667%}.j-sm-9{width:75%}.j-sm-10{width:83.33333%}.j-sm-11{width:91.66667%}.j-sm-12{width:100%}}@media (min-width: 530px){.j-md-1{width:8.33333%}.j-md-2{width:16.66667%}.j-md-3{width:25%}.j-md-4{width:33.33333%}.j-md-5{width:41.66667%}.j-md-6{width:50%}.j-md-7{width:58.33333%}.j-md-8{width:66.66667%}.j-md-9{width:75%}.j-md-10{width:83.33333%}.j-md-11{width:91.66667%}.j-md-12{width:100%}}@media (min-width: 782px){.j-lrg-1{width:8.33333%}.j-lrg-2{width:16.66667%}.j-lrg-3{width:25%}.j-lrg-4{width:33.33333%}.j-lrg-5{width:41.66667%}.j-lrg-6{width:50%}.j-lrg-7{width:58.33333%}.j-lrg-8{width:66.66667%}.j-lrg-9{width:75%}.j-lrg-10{width:83.33333%}.j-lrg-11{width:91.66667%}.j-lrg-12{width:100%}}body,button,input,select,textarea{color:#222;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{color:#222;clear:both}a{color:#0d72b2;transition:color .2s;text-decoration:none}a:visited{color:#0d72b2}a:hover{color:#0f92e5}a:focus{outline:thin dotted}address{margin:0 0 1.5em}abbr[title],acronym{cursor:help}ins{background:#eee;text-decoration:none}dt{font-weight:700}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}@-webkit-keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}@keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}.button,.download-jetpack{transition:all .1s ease-in-out}.jp-button,.jp-button--settings{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#efefef;font:800 0.9285714286em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;border-radius:3px}.jp-button:visited,.jp-button--settings:visited{color:#efefef}.jp-button:hover,.jp-button--settings:hover,.jp-button:focus,.jp-button--settings:focus{color:#fff;background:#57972d}.jp-button:active,.jp-button--settings:active{background:#57972d;opacity:0.8}.jp-button--settings{background:#93b45f;color:#e8eedf}.jp-button--settings:visited{color:#e8eedf}.jp-button--settings:hover,.jp-button--settings:focus{background:#9fbd72;color:#fff}.jp-button--settings.current{background:#3c6621;color:#fff;box-shadow:inset 0 2px 0 #365A1F, inset 0 1px 3px #3c6621}.download-jetpack{display:inline-block;position:relative;padding:0.64286em 0.85714em 0.53571em;color:#fff;font:400 20px/1 "proxima-nova", 'Open Sans', Helvetica, sans-serif;background:#518d2a;z-index:3;border-radius:6px;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:visited{color:#fff}.download-jetpack:hover,.download-jetpack:focus{color:#fff;background:#57972d;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:active{top:6px;box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.4)}.download-jetpack:active:after{top:-6px}.download-jetpack:before{content:'';display:inline-block;position:relative;top:-2px;margin-left:13px;width:30px;height:30px;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%}.download-jetpack:after{content:'';position:absolute;top:0;right:0;width:100%;height:100%}@media (max-width: 1147px){.download-jetpack{font-size:1.28571em}.download-jetpack:before{top:-1px;width:23px;height:23px}}@media (max-width: 900px){.download-jetpack:active{top:0}}@media (max-width: 530px){.download-jetpack{font-size:1.21429em;font-weight:600}.download-jetpack:before{width:19px;height:19px;margin-left:9px}}#searchsubmit{display:inline-block;border:none;position:relative;padding:0.71429em 1.5em;color:#efefef;font:800 0.8em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;outline:none;border-radius:3px}#searchsubmit:visited{color:#efefef}#searchsubmit:hover,#searchsubmit:focus{color:#fff;background:#2aa0d5}#searchsubmit:active{opacity:0.7}@font-face{font-family:'automatticons';src:url("../_inc/fonts/automatticons/automatticons.eot");src:url("../_inc/fonts/automatticons/automatticons.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/automatticons/automatticons.woff") format("woff"),url("../_inc/fonts/automatticons/automatticons.ttf") format("truetype"),url("../_inc/fonts/automatticons/automatticons.svg#automatticonsregular") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.eot");src:url("../_inc/fonts/jetpack/jetpack.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/jetpack/jetpack.woff") format("woff"),url("../_inc/fonts/jetpack/jetpack.ttf") format("truetype"),url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg");font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio: 0){@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg")}}.nav-horizontal a{display:inline-block}.nav-horizontal li{position:relative;float:right}.nav-horizontal ul{margin:0;padding:0}*,*:before,*:after{-moz-box-sizing:border-box;box-sizing:border-box}::-moz-selection{background:#91bd51;color:#fff;text-shadow:none}::selection{background:#91bd51;color:#fff;text-shadow:none}#wpbody-content{padding-bottom:0}#wpcontent{margin-right:160px;padding:0}ul#adminmenu a.toplevel_page_jetpack:after{border-left-color:#81a844}.folded #wpcontent{margin-right:36px}#wpfooter{display:none}.jp-content{background:#f9f9f9;margin:0;height:auto;min-height:100%;width:100%;width:100%;-webkit-font-smoothing:antialiased}.jp-content .wrapper{background:#f9f9f9}@media (max-width: 900px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:36px;padding-right:0}}@media (max-width: 782px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:0}}@media (max-width: 782px){.configure .frame.top.fixed{padding-right:0}}.wrap.inner,.page-content{max-width:950px;margin:0 auto}.wrap.inner li,.page-content li{line-height:23px}@media (max-width: 530px){.page-content{margin-top:0}}@media (max-width: 1147px){.wrap.inner{background:#f9f9f9;padding:15px}}@media (max-width: 530px){.wrap.inner{margin-top:1.71429em}}.jetpack_page_jetpack_modules .header-nav{margin:0}.jetpack_page_jetpack_modules .page-content{max-width:1200px;min-height:500px;margin:0}.page-content.about{position:relative;z-index:10}@media (max-width: 1147px){.page-content.about{background:#f9f9f9;padding:15px}}@media (max-width: 1147px){.page-content.configure{background:#f9f9f9}}.footer nav{max-width:550px;margin:0 auto}.header{right:0;left:0;background:#81a844}.header-nav li{line-height:60px}.header-nav a{padding:0 0.71429em;line-height:24px}.header-nav .jetpack-logo a{display:inline-block;position:relative;width:214px;margin-left:6px;background:url(../images/jetpack-logo.png) center center no-repeat;background:url(../images/jetpack-logo.svg) center center no-repeat,none;background-size:183px auto;color:#fff;line-height:60px;font-weight:normal}.header-nav .jetpack-logo a span{text-indent:-9999px;visibility:hidden}.header-nav .jetpack-logo a:before{content:'';position:absolute;top:0;right:0;width:100%;height:100%;background-size:183px 32px}.header-nav .jetpack-modules+.jetpack-modules{margin-right:15px}.main-nav{float:right}.main-nav li{margin:0}@media (max-width: 900px){.main-nav{font-size:13px}}.user-nav{float:left}.user-nav li{margin:0}.jetpack-pagestyles #screen-meta{margin:0}.jetpack-pagestyles #screen-meta-links .screen-meta-toggle{z-index:2}.jetpack-pagestyles #screen-options-link-wrap,.jetpack-pagestyles #contextual-help-link-wrap{border:none}.jetpack-pagestyles .update-nag{display:none}.masthead{position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #8eb74e)}.masthead.hasbutton .flyer{bottom:-270px}.masthead.hasbutton .subhead{margin-top:175px}@media (max-width: 530px){.masthead.hasbutton .subhead{margin-top:105px;padding:0}}.masthead h1,.masthead h2{margin:0 auto}.masthead h1{padding:2.5em 0 1.11111em;max-width:21.94444em;color:#fff;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;text-shadow:0 -1px 1px rgba(0,0,0,0.12);z-index:3}.masthead h1+.flyby{margin-top:180px}@media (max-width: 1147px){.masthead h1{padding-top:1.83333em;font-size:2.14286em}}@media (max-width: 782px){.masthead h1{max-width:600px;font-size:28px}}@media (max-width: 530px){.masthead h1{margin:0 15px;padding:31px 0 15px 0;font-size:21px;font-weight:400}}.jetpack-connected .masthead h1{margin-bottom:33px;max-width:600px}.flyby{position:relative;max-width:1200px;margin:0 auto}@media (max-width: 900px){.flyby{display:none}}.flyer{position:absolute;bottom:-200px;right:4%;z-index:1;-webkit-animation:flyer 3.4s 2s ease-in-out;animation:flyer 3.4s 2s ease-in-out}.flyer:nth-child(2){right:49%;width:120px;height:131px;-webkit-animation-delay:4.6s;animation-delay:4.6s;-webkit-animation-duration:2.4s;animation-duration:2.4s}.flyer:nth-child(3){right:23%;width:60px;height:66px;-webkit-animation-delay:5.8s;animation-delay:5.8s;-webkit-animation-duration:4.5s;animation-duration:4.5s}.subhead{position:relative;margin-top:105px;padding:4em 0;background:#f9f9f9;z-index:2}.subhead h2{max-width:460px;color:#5d6d74;font:400 1.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 900px){.subhead h2{max-width:428px;font-size:20px}}@media (max-width: 530px){.subhead h2{display:none}}.subhead:after{content:'';position:absolute;bottom:100%;right:0;margin-bottom:-1px;width:100%;height:228px;background:url("../images/the-cloud.svg") center bottom repeat-x;pointer-events:none;z-index:-1}@media (max-width: 1147px){.subhead{margin-top:122px;padding:70px 0 49px}.subhead:after{background-size:160% auto}}@media (max-width: 900px){.subhead{margin-top:122px;padding:70px 0 49px}}@media (max-width: 530px){.subhead{margin-top:83px;padding:47px 15px 39px}}.clouds-sm{height:100px;position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #89b348)}.clouds-sm:after{content:'';position:absolute;bottom:0;right:0;margin-bottom:-1px;width:100%;height:137px;background:url("../images/the-cloud-sm.svg") center bottom repeat-x;pointer-events:none;z-index:2}@media (max-width: 530px){.clouds-sm{height:90px}}.featured{border-top:1px solid #d6d6d6;border-bottom:1px solid #d6d6d6;background:#fff;position:relative;padding:2.0em 1em 4.6em 1em;text-align:center;z-index:1}.featured:before{content:"";display:block;position:absolute;top:0;height:100%;z-index:-1}.featured .features,.featured .modules{margin:0 auto;display:inline-block}@media (max-width: 530px){.featured{display:none}}.featured h2,.module-grid h2{margin-top:1em;color:#5d6d74;font:300 2em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-align:center}@media (max-width: 900px){.featured h2,.module-grid h2{font-size:30px}}@media (max-width: 782px){.featured h2,.module-grid h2{font-size:28px}}.features,.modules{margin:0 -5px}.feature,.module{position:relative;float:right;margin:0 5px 10px;width:310px;transition:all .2s ease-in-out}@media (max-width: 1147px){.feature,.module{margin:.75% 1.5% .75% 0;width:32.333333%;transition:none}.feature:nth-child(3n+1),.module:nth-child(3n+1){margin-right:0}.feature:hover,.module:hover{top:0;box-shadow:none}}.feature{-webkit-transform:translateZ(0);transform:translateZ(0)}.feature h3{margin:0 0 0.58824em;color:#697b84;font-size:1.21429em;line-height:1em;font-weight:800}.feature p{margin:0;color:#6e818a}.feature:before{content:'';position:absolute;bottom:0;right:0;width:100%;height:10px;background:rgba(0,0,0,0.02);z-index:-1;-webkit-transform:translateZ(0);transform:translateZ(0);transition:all .2s ease-in-out}.feature:hover{-webkit-transform:translateY(-5px);-ms-transform:translateY(-5px);transform:translateY(-5px)}.feature:hover h3{color:#1a8dba}.feature:hover .feature-img{border:1px solid #ccc;border-bottom:none}.feature:hover .no-border{border:none}.feature:hover:before{-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px)}@media (max-width: 1147px){.feature:hover h3{color:#6e818a}.feature:hover .feature-img{border:1px solid #ddd;border-bottom:none}.feature:hover .no-border{border:none}}.feature .feature-img{padding-top:52%;width:100%;height:auto;border:1px solid #ddd;border-bottom:none}.feature .feature-img.custom-css{background:url("../images/custom-css.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.custom-css{background-image:url("../images/custom-css@2x.jpg")}}.feature .feature-img.wordpress-connect{background:url("../images/wordpress-connect.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-connect{background-image:url("../images/wordpress-connect@2x.jpg")}}.feature .feature-img.wordpress-stats{background:url("../images/wordpress-stats.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-stats{background-image:url("../images/wordpress-stats@2x.jpg")}}.feature .feature-img.no-border{border:none;padding-bottom:1px}.feature-description{display:block;padding:1em 1.07143em 1.07143em;border:1px solid #ddd;background:#f5f5f5}.feature:hover .feature-description{background:#fff;border-color:#ccc}@media (max-width: 1147px){.feature:hover .feature-description{border:1px solid #ddd;background:#f5f5f5}}@media (max-width: 900px){.feature-description{min-height:115px}}.cat{clear:both;margin-bottom:23px}.cat h3{font-size:24px;font-weight:300;margin:0 6px 13px 0;text-align:right}.cat .clear{clear:both}.module-grid{text-align:center}.module-grid h2{margin:1em 0}@media (max-width: 530px){.module-grid h2{padding-top:16px;margin-top:0;font-size:25px}}#module-search{position:relative;width:100%;max-width:40.71429em;margin:0 auto 1.07143em;overflow:hidden}#jetpack-search{margin:0;padding:11px 16px 11px 16px;width:100%;border:1px solid #c9ced0;border-radius:3px;background:#fff;color:#5c6671;line-height:1.3}#jetpack-search:focus{color:#5c6671;outline:none}#jetpack-search:focus+label{background:transparent;opacity:0}#jetpack-search::-webkit-input-placeholder{color:#a8acae}#jetpack-search :-moz-placeholder{color:#a8acae}#jetpack-search::-moz-placeholder{color:#a8acae}#jetpack-search:-ms-input-placeholder{color:#a8acae}#jetpack-search+label{position:absolute;top:1px;left:1px;bottom:1px;width:48px;color:#abafb1;text-indent:-9999px;pointer-events:none;border-radius:3px;transition:all .2s ease-in-out}#jetpack-search+label:after{content:'\f400';position:absolute;left:11px;text-align:left;top:4px;font-size:1.71429em;font-weight:normal;font-family:"genericons"}.jp-filter{margin-bottom:2.85714em;color:#6f7476}.jp-filter a{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#aaa;font:600 0.92857em/1 "Open Sans", Helvetica, Arial, sans-serif;text-shadow:0 -1px 1px rgba(255,255,255,0.2);background:#eee;border-radius:3px;background-clip:padding-box}.jp-filter a.selected,.jp-filter a:hover,.jp-filter a:focus{color:#efefef;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476}@media (max-width: 530px){.jp-filter a{padding:0.76em 1em}}.module{display:block;padding:0.71429em 1.07143em 1em;text-align:right;border:1px solid #dae0e2;background:#fff;box-shadow:0 0 0 rgba(0,0,0,0.03);transition:opacity 2s ease-in}.module:hover{border-color:#8ac9e8;background:#f8fcfe}.module h3{cursor:pointer;margin:0 0 0.5em;color:#1a8dba;font-size:1.14286em;line-height:1.4em;font-weight:700}.module p{margin:0;color:#686f72;font-size:0.85714em}.module:hover,.module:focus{border-color:#8ac9e8;background:#f8fcfe}.module.active{border-color:#2ea2cc;box-shadow:inset -4px 0 0 #2ea2cc}.module.active:hover{border-color:#69bedd;box-shadow:inset -4px 0 0 #69bedd}@media (max-width: 1147px){.cat .module:nth-child(3n+1){margin:.75% 1.5% .75% 0}.cat .module:nth-child(3n - 1){margin-right:0}}@media (max-width: 900px){.cat .module{margin:1% 2% 1% 0}.cat .module:nth-child(2n+1){margin:1% 2% 1% 0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 530px){.cat .module{margin:5px 0}.cat .module:nth-child(2n+1){margin-right:0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 900px){.module{margin:1% 2% 1% 0;width:49%}.module:nth-child(3n+1){margin-right:2%}.module:nth-child(2n+1){margin-right:0}}@media (max-width: 530px){.module{margin:5px 0;width:100%}.module:nth-child(3n+1){margin-right:0}.module:nth-child(2n+1){margin-right:0}}.new{position:relative}.new:after{content:'NEW';position:absolute;top:-8px;left:-8px;padding-top:10px;width:32px;height:32px;color:#fff;font-size:8px;font-weight:800;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,0.2);background:url("../images/new-badge.svg") center center no-repeat;background-size:100%;border-radius:50%}.paid{display:inline-block;position:relative;top:5px;margin-right:10px;padding:1px 4px 0 6px;height:13px;color:#fff;font:700 10px/1 "Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 0 rgba(0,0,0,0.05);background:#d0d0d0;vertical-align:top}.paid:before,.paid:after{position:absolute;top:0;left:100%;font:normal 14px/14px "genericons"}.paid:before{content:'\f503';color:#d0d0d0;text-shadow:none}.paid:after{content:'\f428';margin-left:-5px;font-size:11px}.rtl .paid:before{content:'\f501'}.load-more{margin:2.71429em 0 6.15385em}.set{display:none}.show.set{display:block}.loading{bottom:50%;position:absolute;top:50%;width:100%}.loading span{color:#999}.modal{background:#fff;position:fixed;top:52px;bottom:20px;left:20px;right:20px;margin-right:160px;display:none;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1);z-index:500}.modal .close{position:absolute;top:0;left:0;font:300 1.71429em "genericons" !important;color:#777;content:'\f405';display:inline-block;padding:0.28571em 0.71429em 0.42857em;z-index:5}.modal .close:hover{background:#eee;opacity:0.8}.modal .close:active{background:#eee;opacity:0.4}.modal #jp-post-flair{display:none}.modal .content-container{position:absolute;top:0;left:0;bottom:0;right:0;overflow:auto;padding:2.14286em}.modal .content{margin:0 auto;max-width:900px;text-align:right}.modal h2{text-align:right;margin-top:0;color:#5d6d74;font:300 32px "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.modal h2{font-size:26px}}.modal h5{clear:right}.modal p{font-size:1.23077em}.modal footer{position:absolute;right:0;bottom:0;width:100%;padding:12px 20px;border-top:1px solid #ddd;background:#fff;text-align:left}.modal footer ul{margin:0}.modal footer li{display:inline-block;margin:0}.modal .button-secondary,.modal .button-primary:active{vertical-align:baseline}@media (max-width: 900px){.modal{bottom:5%;margin-right:36px;font-size:80%}.modal .content{top:38px}}@media (max-width: 782px){.modal{top:66px;margin-right:0}}@media (max-width: 600px){.modal{top:10px;left:10px;bottom:10px;right:10px}}.jp-info-img{float:left;margin:0 30px 30px 0}.jp-info-img img{border:1px solid #ddd;max-width:100%;height:auto}.jp-info-img img:first-child{margin-top:0}@media (max-width: 782px){.jp-info-img{float:none;margin:0 0 15px}}.content-container.modal-footer{bottom:53px}.shade{background:#000;bottom:0;cursor:pointer;display:none;right:0;opacity:0.2;position:fixed;left:0;top:0;z-index:11}.entry-title,.page-template-default h1{margin-top:0.61111em;color:#5d6d74;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.entry-title,.page-template-default h1{font-size:2em}}.blog h3,.single h3,.page-template-default h2{margin-top:0.61111em;color:#5d6d74;font:300 1.9em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.blog h3,.single h3,.page-template-default h2{font-size:1.4em}}.page-template-default p{line-height:1.71429em}.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{float:right;width:70%}.footer{margin-top:1.42857em;position:relative;padding:10em 0 4.28571em;text-align:center}.footer:before,.footer:after{content:'';position:absolute;right:0;pointer-events:none}.footer:before{top:0;margin-top:-1px;width:100%;height:195px}.footer:after{bottom:0;width:100%;height:50px;background:url("../images/the-footcloud.svg") center bottom no-repeat;background-size:auto 45px;z-index:1}.footer .download-jetpack{margin-bottom:33px}@media (max-width: 1147px){.footer{padding-top:165px;padding-bottom:0}.footer:before{background-size:160% auto}.footer:after{display:none}.footer ul{float:none;overflow:hidden}}@media (max-width: 900px){.footer{padding-top:146px}}@media (max-width: 782px){.footer{margin-top:0}}@media (max-width: 530px){.footer{margin-top:0;padding-top:135px}}@media (max-width: 320px){.footer{padding-top:76px}}.footer nav{max-width:100%}.footer nav a,.footer nav a:visited{padding:4px 6px;color:#999}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81A844}@media (max-width: 1147px){.footer nav{border:none;padding:0}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#fff}}@media (max-width: 530px){.footer nav li{display:block;float:none;margin:0;text-align:right}.footer nav a{display:block;padding:0 16px;line-height:44px}}.primary{padding:25px 15px 10px 15px;border-bottom:1px solid #eee}.secondary-footer{margin:0 auto}.secondary-footer li{margin-left:5px}@media (max-width: 1147px){.secondary-footer{margin:0 30px;padding:8px 15px 30px}}@media (max-width: 530px){.secondary-footer{margin:0;padding:0;border:none;font-weight:400}.secondary-footer a{border-top:1px solid #eee}}.footer .a8c-attribution{margin:0;padding:0 6px;color:#bbb;font-size:0.78571em;font-family:"Gill Sans","Gill Sans MT","Open Sans",Helvetica,Arial,sans-serif;text-transform:uppercase}.footer .a8c-attribution a{display:inline-block;position:relative;padding:4px 16px;left:9999px;outline:0}.footer .a8c-attribution a:after{content:'A';position:absolute;top:2px;left:-9999px;height:100%;color:#999;font-size:1.54545em;font-family:"automatticons";text-align:center}.footer .a8c-attribution a:hover:after{-webkit-animation:candy .4s ease-in-out;animation:candy .4s ease-in-out}.secondary{padding:10px 15px 0 15px}.jetpack-message{background:#8eb74e;border:1px solid #73963d;margin:33px auto 0;max-width:90%;position:relative;z-index:2}.jetpack-message.is-opt-in{margin:50px 0 0;max-width:100%;padding:10px 15px;background:#fff;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);font-size:13px;text-align:center}.subhead .jetpack-message.is-opt-in{margin:0;padding-bottom:0;background:transparent;box-shadow:none}.subhead .jetpack-message.is-opt-in .jp-button,.subhead .jetpack-message.is-opt-in .jp-button--settings{display:inline-block}.jetpack-message.is-opt-in p{color:#3c4549}.jetpack-message.is-opt-in .jp-button,.jetpack-message.is-opt-in .jp-button--settings{margin-top:15px;display:none}.jetpack-message h4{color:#fff;margin:0}.jetpack-message p{color:#fff;margin:0;opacity:0.7}.jetpack-message .squeezer{padding:23px 80px 23px 23px;position:relative;text-align:right}.jetpack-message .squeezer:before{color:#fff;content:'\f418';font-family:'Genericons';font-size:33px;height:33px;right:25px;opacity:0.6;position:absolute;top:23px;top:calc( 50% - 22px )}@media (max-width: 530px){.jetpack-message .squeezer{padding:23px}.jetpack-message .squeezer:before{display:none}}.jetpack-message .squeezer a{color:#FFF;border-bottom:1px solid #D5E4BD}.jetpack-message .squeezer a:hover{border-bottom:1px solid #F1F6E9}.jetpack-message.error .squeezer:before,.jetpack-message.jetpack-err .squeezer:before{content:'\f414'}.configure-module .jetpack-message{max-width:100%}.modules h3.icon,.jetpack-modules .info a{width:auto}.modules h3.icon:before,.jetpack-modules .info a:before{display:inline-block;position:relative;top:1px;right:-3px;margin-left:2px;opacity:0.8;font:normal 20px "genericons";vertical-align:top}.jetpack-modules .info a:before{margin-top:1px}.latex:before,.jetpack-modules #latex .info a:before{content:'\f408'}.carousel:before,.jetpack-modules #carousel .info a:before{content:'\f102'}.modules h3.contact-form:before,.jetpack-modules #contact-form .info a:before{content:'\f175';font:normal 20px "dashicons"}.modules h3.custom-css:before,.jetpack-modules #custom-css .info a:before{content:'\f100';font:normal 20px "dashicons"}.modules h3.enhanced-distribution:before,.jetpack-modules #enhanced-distribution .info a:before{content:'\f237';font:normal 20px "dashicons"}.modules h3.widgets:before,.jetpack-modules #widgets .info a:before{content:'\f116';font:normal 20px "dashicons"}.modules h3.gravatar-hovercards:before,.jetpack-modules #gravatar-hovercards .info a:before{content:'G';font-family:"automatticons"}.infinite-scroll:before,.jetpack-modules #infinite-scroll .info a:before{content:'\f408'}.comments:before,.jetpack-modules #comments .info a:before{content:'\f108'}.sso:before,.jetpack-modules #sso .info a:before{content:'\f205'}.json-api:before,.jetpack-modules #json-api .info a:before{content:'\f415'}.likes:before,.jetpack-modules #likes .info a:before{content:'\f408'}.markdown:before,.jetpack-modules #markdown .info a:before{content:'\f462'}.minileven:before,.jetpack-modules #minileven .info a:before{content:'\f453'}.manage:before,.jetpack-modules #manage .info a:before{content:'\f205'}.monitor:before,.jetpack-modules #monitor .info a:before{content:'\f468'}.notes:before,.jetpack-modules #notes .info a:before{content:'\f300'}.omnisearch:before,.jetpack-modules #omnisearch .info a:before{content:'\f400'}.photon:before,.jetpack-modules #photon .info a:before{content:'\f403'}.post-by-email:before,.jetpack-modules #post-by-email .info a:before{content:'\f410'}.protect:before,.jetpack-modules #protect .info a:before{content:'\f470';position:relative;top:-1px}.modules h3.publicize:before,.jetpack-modules #publicize .info a:before{content:'\f237';font:normal 20px "dashicons"}.related-posts:before,.jetpack-modules #related-posts .info a:before{content:'\f420'}.sharedaddy:before,.jetpack-modules #sharedaddy .info a:before{content:'\f415'}.shortcodes:before,.jetpack-modules #shortcodes .info a:before{content:'\f100'}.verification-tools:before,.jetpack-modules #verification-tools .info a:before{content:'\f425'}.after-the-deadline:before,.jetpack-modules #after-the-deadline .info a:before{content:'\f411'}.subscriptions:before,.jetpack-modules #subscriptions .info a:before{content:'\f410'}.tiled-gallery:before,.jetpack-modules #tiled-gallery .info a:before{content:'\f103'}.modules h3.vaultpress:before,.jetpack-modules #vaultpress .info a:before{content:'V';font-family:"automatticons"}.videopress:before,.jetpack-modules #videopress .info a:before{content:'\f104'}.modules h3.widget-visibility:before,.jetpack-modules #widget-visibility .info a:before{content:'\f116';font:normal 20px "dashicons"}.stats:before,.jetpack-modules #stats .info a:before{content:'\f205'}.shortlinks:before,.jetpack-modules #shortlinks .info a:before{content:'\f107'}.modules h3.custom-content-types:before,.jetpack-modules #custom-content-types .info a:before{content:'\f498';font:normal 20px "dashicons"}.modules h3.site-icon:before,.jetpack-modules #site-icon .info a:before{content:'\f475'}@media (max-width: 782px){.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{width:100%}}@media (max-width: 600px){.clouds-sm{display:none}}@media (max-width: 530px){.wrap.inner.jp-support .jp-support-column-left{width:100%}.wrap.inner.jp-support .jp-support-column-left .widget-text{margin-left:0;width:100%}.wrap.inner.jp-support .jp-support-column-right{width:100%}}@media screen and (max-width: 400px){.jp-frame .header-nav{padding-bottom:10px}.jp-frame .header-nav li{line-height:30px}.jp-frame .header-nav .jetpack-logo{width:100%;text-align:center}.jp-frame .header-nav .jetpack-modules{margin:0;width:50%;text-align:left;padding:0 5px}.jp-frame .header-nav .jetpack-modules+.jetpack-modules{text-align:right}}@media (max-width: 320px){.jetpack_page_jetpack_modules .wrap{padding:0 0 1em}}.page-content.configure{margin-top:0}.configure .frame.top{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}.configure .frame.top.fixed{background:#f9f9f9;border-bottom:1px solid #e9e9e9;padding-right:160px;margin-top:-6px;position:fixed;left:0;top:32px;width:100%;z-index:4;box-shadow:0 2px 2px -2px #eee}@media (max-width: 782px){.configure .frame.top.fixed{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}}@media (max-width: 600px){.configure .frame.top.fixed{top:0}}.configure .frame.top .tablenav.top{float:right}@media (max-width: 900px){.configure .frame.top .tablenav.top .actions{display:block}}@media (max-width: 782px){.configure .frame.top .tablenav.top .actions{margin-top:6px}}.jp-frame-top-fixed .configure{padding-top:94px}.filter-search{display:none;float:left;margin-top:10px}@media (max-width: 782px){.filter-search{display:block}}@media (max-width: 530px){.filter-search{display:none}}.module-actions.landing-page{float:left;margin-left:15px}.module-actions.landing-page a{font-size:0.6em}.table-bordered.jetpack-modules{border:none;margin-bottom:0}.table-bordered.jetpack-modules tr.jetpack-module th{border-right:0;padding:14px 4px 0}.table-bordered.jetpack-modules tr.jetpack-module th input{display:block}.table-bordered.jetpack-modules tr.jetpack-module:hover .genericon{display:inline-block}.table-bordered.jetpack-modules tr.jetpack-module:hover td .row-actions span a{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.active th,.table-bordered.jetpack-modules tr.jetpack-module.active td{background:#f7fcfe}.table-bordered.jetpack-modules tr.jetpack-module.active th{border-right:4px solid #2ea2cc;padding-right:0px}.table-bordered.jetpack-modules tr.jetpack-module.active td:first-child{border-right:4px solid #2ea2cc}.table-bordered.jetpack-modules tr.jetpack-module.unavailable{opacity:0.3}.table-bordered.jetpack-modules tr.jetpack-module.unavailable input{display:none}.table-bordered.jetpack-modules tr.jetpack-module#vaultpress{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module th,.table-bordered.jetpack-modules tr.jetpack-module td{background:#fff;margin:0;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1)}.table-bordered.jetpack-modules tr.jetpack-module td{padding:10px 14px 8px 10px;line-height:25px}.table-bordered.jetpack-modules tr.jetpack-module td:first-child{border-right:4px solid #fff}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{float:left;padding:0 0 1px;visibility:visible}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span{margin-right:5px}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a{opacity:0}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a:focus{opacity:1}@media (max-width: 530px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}}@media (max-width: 782px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:block;padding-right:10px;visibility:visible}}.table-bordered.jetpack-modules>thead>tr>th{border:0;vertical-align:middle}.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-left:0}@media (max-width: 782px){.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-right:0}}.table-bordered.jetpack-modules td{background:#fff}.table-bordered.jetpack-modules #doaction{margin-top:0}@media (max-width: 782px){.table-bordered.jetpack-modules #doaction{padding:10px 7px}}.table-bordered.jetpack-modules .checkall{margin-top:1px}.table-bordered.jetpack-modules .filter-search{margin-top:8px}.table-bordered.jetpack-modules .genericon{color:#999;display:none;margin:7px 3px 0}@media (max-width: 900px){.table-bordered.jetpack-modules .genericon{display:inline-block}}.table-bordered.jetpack-modules .med{width:70px}.table-bordered.jetpack-modules .sm{width:30px}@media (max-width: 782px){.table-bordered.jetpack-modules .check-column{width:50px}}.fixed-top .check-column{padding:8px 10px 0 10px;width:2.2em}.wrap{margin:0;padding:0 1.5em 1em;overflow:hidden}.wrap h2{font-size:24px;font-weight:400}.wrap .manage-left{float:right;margin:0;padding:0;width:63%}.wrap .manage-left table{width:100%}.wrap .manage-left th{font-weight:400}@media (max-width: 782px){.wrap .manage-left{width:100%}}.wrap .manage-right{margin:0;padding:0;float:left;width:35%;z-index:1}.wrap .manage-right p{font-size:12px;font-weight:bold;color:#bbb;padding-top:2px;text-transform:uppercase;letter-spacing:1px;clear:right}.wrap .manage-right .bumper{margin-right:33px}.wrap .manage-right.show{display:block;position:fixed;overflow-y:auto;overflow-x:hidden;position:absolute}.wrap .manage-right .search-bar{margin-bottom:18px;max-width:300px}.wrap .manage-right p.search-box{float:none;height:auto;margin-bottom:0;position:relative}.wrap .manage-right p.search-box input[type='search']{padding:0 8px;width:90%;line-height:initial}@media (max-width: 782px){.wrap .manage-right p.search-box input[type='search']{float:right;padding:9px 8px}}.wrap .manage-left p.search-box input[type="submit"]{display:none}.wrap .manage-right .button-group .button{outline:none}.wrap .manage-right .subsubsub{margin:0;padding:0}.wrap .manage-right .subsubsub a{padding:0;line-height:inherit}.wrap .manage-right .subsubsub .current{padding:1px 5px;border-radius:2px;margin-right:-5px;background:#0D72B2;color:#FFF}.wrap .manage-right .subsubsub .current .count{color:#BCD7E7;font-weight:200}.wrap .manage-right .subsubsub li{display:block;text-align:right}@media (max-width: 782px){.wrap .manage-right{background:#fff;bottom:0;display:none;min-width:300px;position:fixed;left:0;top:0;z-index:13;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1)}.wrap .manage-right .bumper{margin:13px}.wrap .manage-right .navbar-form{margin:0;padding:0}}.configure-module p{font-size:14px}.configure-module p.success,.configure-module p.error{color:#fff;padding:10px}.configure-module p.success{background-color:#81a844}.configure-module p.error{background-color:#d94f4f}.protect-status p{font-size:16px}.protect-status strong{display:inline-block;margin-top:10px;background:#fff;padding:10px;border:1px #ddd solid;font-size:16px;color:#000;max-width:100%}.protect-status.attn{color:#d94f4f}.protect-status.working{color:#81a844}#non-editable-whitelist{margin-top:15px}.protect-whitelist textarea{width:100%;min-height:150px}#editable-whitelist .whitelist-table{width:100%}.configure-module input[disabled]{opacity:.5}.configure-module input.button-primary{font-weight:bold}.whitelist-table{border-top:1px solid;border-left:1px solid;border-color:#ddd;background-color:#fff}.whitelist-table td,.whitelist-table th{padding:10px;margin:0;border-bottom:1px solid;border-right:1px solid;border-color:#ddd;font-size:14px}.whitelist-table th.heading{font-weight:bold;color:#5d6d74;text-align:right;background-color:#eee}.whitelist-table td.item-actions{border-right:none;text-align:left}.whitelist-table .toolbar{padding:0}.whitelist-table .add-btn{text-align:center;width:10%;border-right:1px #ddd solid}.ip-address,.enter-ip{width:90%;text-align:right;vertical-align:middle}.delete-ip-address{text-align:center;border:0;background:transparent;color:#6f7476;box-shadow:none;font-size:20px;margin:0;padding:0;cursor:pointer;border-radius:2px}.delete-ip-address:hover{background:#eee}.toolbar div{float:right;padding:10px}@media only screen and (min-width: 1100px){#non-editable-whitelist{width:28%;float:left;margin-top:0}.protect-whitelist{width:65%;float:right}}@media only screen and (max-width: 1130px){.enter-ip input[type="text"]{max-width:175px}}@media only screen and (max-width: 1250px) and (min-width: 1065px), (max-width: 730px) and (min-width: 600px){.enter-ip{width:85%}.add-btn{width:15%}}@media only screen and (max-width: 782px){.add-btn{text-align:left}.add-btn .ip-add{margin-top:4px;margin-bottom:3px}}@media only screen and (max-width: 730px){.add-btn{text-align:center}}@media only screen and (max-width: 665px) and (min-width: 600px){.enter-ip input[type="text"]{max-width:165px}}@media only screen and (max-width: 600px){.toolbar div{width:100%}.add-btn{border-top:1px #ddd solid}.enter-ip{text-align:center}.enter-ip strong{display:block;margin-bottom:5px}.enter-ip input[type="text"]{width:100%;max-width:100%}.add-btn input,.enter-ip .button{width:50%;margin:0 auto}.enter-ip .button{margin-top:10px}}@media only screen and (max-width: 400px){.protect-status strong{font-size:12px;overflow:auto}.add-btn input,.enter-ip .button{width:100%}}.jp-content .hide{display:none}.jp-content .pointer{cursor:pointer}.jp-content .landing{margin:0 auto;z-index:2;position:relative}.jp-content h1{font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;z-index:3;width:100%;text-align:center}.jp-content h1.success{color:#81a844}.jp-content .footer{padding-top:0;margin-top:0;background-image:none}.jp-content .footer:before{height:inherit}.jp-content .more-info:before{content:none}.landing .wpcom-connect{min-height:400px}.wpcom-connect .j-col{padding:0}.wpcom-connect .connect-desc{padding-left:25px}.wpcom-connect .connect-btn{text-align:center}.module-grid h2{color:#000;font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif}.download-jetpack{margin-top:1em !important}#jump-start-area{margin-top:35px;padding-right:60px;padding-left:60px;background:#fefefe;border:1px #dae0e2 solid;padding-bottom:20px}#jump-start-area #jumpstart-cta,#jump-start-area .jumpstart-desc{padding:0}#jump-start-area p{font-size:14px;line-height:185%}#jump-start-area .spinner{float:none;margin:0 auto;position:absolute;bottom:0;height:100%;width:100%;background-position:50% 56%;background-color:rgba(254,254,254,0.99);display:block;opacity:.9}.jumpstart-message p{padding-left:25px}.jumpstart-desc{text-align:right}#jumpstart-cta{text-align:center}.dismiss-jumpstart{color:#999;font-size:14px}#jumpstart-cta .button,#jumpstart-cta .button-primary{margin:1em;font-size:18px;height:45px !important;padding:8px 15px 1px}#jumpstart-cta .button-primary{display:block;margin:35px 20px 5px 20px}#jp-config-list{position:relative;padding-top:15px;padding-bottom:15px;margin-right:-15px;margin-left:-15px}#jp-config-list .j-col{padding:15px}#jp-config-list strong{display:inline-block}#jp-config-list small{display:block;margin-top:5px;line-height:150%}#jp-config-list .close{position:absolute;top:10px;left:0;text-transform:uppercase;font-weight:bold;display:block;z-index:5}.jp-config-status{text-transform:uppercase;font-size:10px;font-weight:bold;line-height:100%;color:#fff;background:#9fbd72;border-radius:2px;padding:2px 4px;display:inline-block}.miguel{display:none;position:fixed;opacity:.35;bottom:-200px;right:0;z-index:1;-webkit-animation:miguel 3.4s 0s ease-in-out;animation:miguel 3.4s 0s ease-in-out}.miguel:nth-child(2){right:49%;width:120px;height:131px;-webkit-animation-duration:2.4s;animation-duration:2.4s;-webkit-animation-delay:0s;animation-delay:0s}.miguel:nth-child(3){right:23%;width:60px;height:66px;-webkit-animation-duration:4.5s;animation-duration:4.5s;-webkit-animation-delay:0s;animation-delay:0s}@-webkit-keyframes "miguel"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(900px, -900px, 0px);transform:translate3d(900px, -900px, 0px)}}@keyframes "miguel"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(900px, -900px, 0px);transform:translate3d(900px, -900px, 0px)}}@media (max-width: 1147px){.jp-content .landing{padding:0 2em}.jp-content .footer{padding-top:1.5em}}@media (max-width: 782px){#jumpstart-cta .button-primary{margin:10px 0 5px 0}#jump-start-area .spinner{background-position:50% 35%}}@media (max-width: 530px){.jp-content .landing{padding:0 .5em}#jump-start-area{padding:0 1em}.jumpstart-message p{padding-left:0}#jumpstart-cta .button-primary{margin:0 0 5px 0;padding-bottom:10px}.footer .a8c-attribution a:after{top:6px}}.nav-horizontal:before,.features:before,.modules:before,.load-more:before,.nav-horizontal:after,.features:after,.modules:after,.load-more:after{content:"";display:table}.nav-horizontal:after,.features:after,.modules:after,.load-more:after{clear:both}
+.j-row{width:100%;margin:0 auto}.j-row:before,.j-row:after{content:" ";display:table}.j-row:after{clear:both}.j-col{padding:0.85em;width:100%;float:right;position:relative}@media only screen{.j-sm-1{width:8.33333%}.j-sm-2{width:16.66667%}.j-sm-3{width:25%}.j-sm-4{width:33.33333%}.j-sm-5{width:41.66667%}.j-sm-6{width:50%}.j-sm-7{width:58.33333%}.j-sm-8{width:66.66667%}.j-sm-9{width:75%}.j-sm-10{width:83.33333%}.j-sm-11{width:91.66667%}.j-sm-12{width:100%}}@media (min-width: 530px){.j-md-1{width:8.33333%}.j-md-2{width:16.66667%}.j-md-3{width:25%}.j-md-4{width:33.33333%}.j-md-5{width:41.66667%}.j-md-6{width:50%}.j-md-7{width:58.33333%}.j-md-8{width:66.66667%}.j-md-9{width:75%}.j-md-10{width:83.33333%}.j-md-11{width:91.66667%}.j-md-12{width:100%}}@media (min-width: 782px){.j-lrg-1{width:8.33333%}.j-lrg-2{width:16.66667%}.j-lrg-3{width:25%}.j-lrg-4{width:33.33333%}.j-lrg-5{width:41.66667%}.j-lrg-6{width:50%}.j-lrg-7{width:58.33333%}.j-lrg-8{width:66.66667%}.j-lrg-9{width:75%}.j-lrg-10{width:83.33333%}.j-lrg-11{width:91.66667%}.j-lrg-12{width:100%}}body,button,input,select,textarea{color:#222;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{color:#222;clear:both}a{color:#0d72b2;transition:color .2s;text-decoration:none}a:visited{color:#0d72b2}a:hover{color:#0f92e5}a:focus{outline:thin dotted}address{margin:0 0 1.5em}abbr[title],acronym{cursor:help}ins{background:#eee;text-decoration:none}dt{font-weight:700}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}@-webkit-keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}@keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}.button,.download-jetpack{transition:all .1s ease-in-out}.jp-button,.jp-button--settings{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#efefef;font:800 0.9285714286em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;border-radius:3px}.jp-button:visited,.jp-button--settings:visited{color:#efefef}.jp-button:hover,.jp-button--settings:hover,.jp-button:focus,.jp-button--settings:focus{color:#fff;background:#57972d}.jp-button:active,.jp-button--settings:active{background:#57972d;opacity:0.8}.jp-button--settings{background:#93b45f;color:#e8eedf}.jp-button--settings:visited{color:#e8eedf}.jp-button--settings:hover,.jp-button--settings:focus{background:#9fbd72;color:#fff}.jp-button--settings.current{background:#3c6621;color:#fff;box-shadow:inset 0 2px 0 #365A1F, inset 0 1px 3px #3c6621}.download-jetpack{display:inline-block;position:relative;padding:0.64286em 0.85714em 0.53571em;color:#fff;font:400 20px/1 "proxima-nova", 'Open Sans', Helvetica, sans-serif;background:#518d2a;z-index:3;border-radius:6px;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:visited{color:#fff}.download-jetpack:hover,.download-jetpack:focus{color:#fff;background:#57972d;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:active{top:6px;box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.4)}.download-jetpack:active:after{top:-6px}.download-jetpack:before{content:'';display:inline-block;position:relative;top:-2px;margin-left:13px;width:30px;height:30px;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%}.download-jetpack:after{content:'';position:absolute;top:0;right:0;width:100%;height:100%}@media (max-width: 1147px){.download-jetpack{font-size:1.28571em}.download-jetpack:before{top:-1px;width:23px;height:23px}}@media (max-width: 900px){.download-jetpack:active{top:0}}@media (max-width: 530px){.download-jetpack{font-size:1.21429em;font-weight:600}.download-jetpack:before{width:19px;height:19px;margin-left:9px}}#searchsubmit{display:inline-block;border:none;position:relative;padding:0.71429em 1.5em;color:#efefef;font:800 0.8em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476;outline:none;border-radius:3px}#searchsubmit:visited{color:#efefef}#searchsubmit:hover,#searchsubmit:focus{color:#fff;background:#2aa0d5}#searchsubmit:active{opacity:0.7}@font-face{font-family:'automatticons';src:url("../_inc/fonts/automatticons/automatticons.eot");src:url("../_inc/fonts/automatticons/automatticons.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/automatticons/automatticons.woff") format("woff"),url("../_inc/fonts/automatticons/automatticons.ttf") format("truetype"),url("../_inc/fonts/automatticons/automatticons.svg#automatticonsregular") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.eot");src:url("../_inc/fonts/jetpack/jetpack.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/jetpack/jetpack.woff") format("woff"),url("../_inc/fonts/jetpack/jetpack.ttf") format("truetype"),url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg");font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio: 0){@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg")}}.nav-horizontal a{display:inline-block}.nav-horizontal li{position:relative;float:right}.nav-horizontal ul{margin:0;padding:0}*,*:before,*:after{-moz-box-sizing:border-box;box-sizing:border-box}::-moz-selection{background:#91bd51;color:#fff;text-shadow:none}::selection{background:#91bd51;color:#fff;text-shadow:none}#wpbody-content{padding-bottom:0}#wpcontent{margin-right:160px;padding:0}ul#adminmenu a.toplevel_page_jetpack:after{border-left-color:#81a844}.folded #wpcontent{margin-right:36px}.jp-content{background:#f9f9f9;margin:0;height:auto;min-height:100%;width:100%;width:100%;-webkit-font-smoothing:antialiased}.jp-content .wrapper{background:#f9f9f9}@media (max-width: 900px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:36px;padding-right:0}}@media (max-width: 782px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-right:0}}@media (max-width: 782px){.configure .frame.top.fixed{padding-right:0}}.wrap.inner,.page-content{max-width:950px;margin:0 auto}.wrap.inner li,.page-content li{line-height:23px}@media (max-width: 530px){.page-content{margin-top:0}}@media (max-width: 1147px){.wrap.inner{background:#f9f9f9;padding:15px}}@media (max-width: 530px){.wrap.inner{margin-top:1.71429em}}.jetpack_page_jetpack_modules .header-nav{margin:0}.jetpack_page_jetpack_modules .page-content{max-width:1200px;min-height:500px;margin:0}.page-content.about{position:relative;z-index:10}@media (max-width: 1147px){.page-content.about{background:#f9f9f9;padding:15px}}@media (max-width: 1147px){.page-content.configure{background:#f9f9f9}}.footer nav{max-width:550px;margin:0 auto}.header{right:0;left:0;background:#81a844}.header-nav li{line-height:60px}.header-nav a{padding:0 0.71429em;line-height:24px}.header-nav .jetpack-logo a{display:inline-block;position:relative;width:214px;margin-left:6px;background:url(../images/jetpack-logo.png) center center no-repeat;background:url(../images/jetpack-logo.svg) center center no-repeat,none;background-size:183px auto;color:#fff;line-height:60px;font-weight:normal}.header-nav .jetpack-logo a span{text-indent:-9999px;visibility:hidden}.header-nav .jetpack-logo a:before{content:'';position:absolute;top:0;right:0;width:100%;height:100%;background-size:183px 32px}.header-nav .jetpack-modules+.jetpack-modules{margin-right:15px}.main-nav{float:right}.main-nav li{margin:0}@media (max-width: 900px){.main-nav{font-size:13px}}.user-nav{float:left}.user-nav li{margin:0}.jetpack-pagestyles #screen-meta{margin:0}.jetpack-pagestyles #screen-meta-links .screen-meta-toggle{z-index:2}.jetpack-pagestyles #screen-options-link-wrap,.jetpack-pagestyles #contextual-help-link-wrap{border:none}.jetpack-pagestyles .update-nag{display:none}.masthead{position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #8eb74e)}.masthead.hasbutton .flyer{bottom:-270px}.masthead.hasbutton .subhead{margin-top:175px}@media (max-width: 530px){.masthead.hasbutton .subhead{margin-top:105px;padding:0}}.masthead h1,.masthead h2{margin:0 auto}.masthead h1{padding:2.5em 0 1.11111em;max-width:21.94444em;color:#fff;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;text-shadow:0 -1px 1px rgba(0,0,0,0.12);z-index:3}.masthead h1+.flyby{margin-top:180px}@media (max-width: 1147px){.masthead h1{padding-top:1.83333em;font-size:2.14286em}}@media (max-width: 782px){.masthead h1{max-width:600px;font-size:28px}}@media (max-width: 530px){.masthead h1{margin:0 15px;padding:31px 0 15px 0;font-size:21px;font-weight:400}}.jetpack-connected .masthead h1{margin-bottom:33px;max-width:600px}.flyer{position:absolute;bottom:-200px;right:4%;z-index:1;-webkit-animation:flyer 3.4s 2s ease-in-out;animation:flyer 3.4s 2s ease-in-out}.flyer:nth-child(2){right:49%;width:120px;height:131px;-webkit-animation-delay:4.6s;animation-delay:4.6s;-webkit-animation-duration:2.4s;animation-duration:2.4s}.flyer:nth-child(3){right:23%;width:60px;height:66px;-webkit-animation-delay:5.8s;animation-delay:5.8s;-webkit-animation-duration:4.5s;animation-duration:4.5s}.subhead{position:relative;margin-top:105px;padding:4em 0;background:#f9f9f9;z-index:2}.subhead h2{max-width:460px;color:#5d6d74;font:400 1.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 900px){.subhead h2{max-width:428px;font-size:20px}}@media (max-width: 530px){.subhead h2{display:none}}.subhead:after{content:'';position:absolute;bottom:100%;right:0;margin-bottom:-1px;width:100%;height:228px;background:url("../images/the-cloud.svg") center bottom repeat-x;pointer-events:none;z-index:-1}@media (max-width: 1147px){.subhead{margin-top:122px;padding:70px 0 49px}.subhead:after{background-size:160% auto}}@media (max-width: 900px){.subhead{margin-top:122px;padding:70px 0 49px}}@media (max-width: 530px){.subhead{margin-top:83px;padding:47px 15px 39px}}.clouds-sm{height:100px;position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #89b348)}.clouds-sm:after{content:'';position:absolute;bottom:0;right:0;margin-bottom:-1px;width:100%;height:137px;background:url("../images/the-cloud-sm.svg") center bottom repeat-x;pointer-events:none;z-index:2}@media (max-width: 530px){.clouds-sm{height:90px}}.featured{border-top:1px solid #d6d6d6;border-bottom:1px solid #d6d6d6;background:#fff;position:relative;padding:2.0em 1em 4.6em 1em;text-align:center;z-index:1}.featured:before{content:"";display:block;position:absolute;top:0;height:100%;z-index:-1}.featured .features,.featured .modules{margin:0 auto;display:inline-block}@media (max-width: 530px){.featured{display:none}}.featured h2,.module-grid h2{margin-top:1em;color:#5d6d74;font:300 2em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-align:center}@media (max-width: 900px){.featured h2,.module-grid h2{font-size:30px}}@media (max-width: 782px){.featured h2,.module-grid h2{font-size:28px}}.features,.modules{margin:0 -5px}.feature,.module{position:relative;float:right;margin:0 5px 10px;width:310px;transition:all .2s ease-in-out}@media (max-width: 1147px){.feature,.module{margin:.75% 1.5% .75% 0;width:32.333333%;transition:none}.feature:nth-child(3n+1),.module:nth-child(3n+1){margin-right:0}.feature:hover,.module:hover{top:0;box-shadow:none}}.feature{-webkit-transform:translateZ(0);transform:translateZ(0)}.feature h3{margin:0 0 0.58824em;color:#697b84;font-size:1.21429em;line-height:1em;font-weight:800}.feature p{margin:0;color:#6e818a}.feature:before{content:'';position:absolute;bottom:0;right:0;width:100%;height:10px;background:rgba(0,0,0,0.02);z-index:-1;-webkit-transform:translateZ(0);transform:translateZ(0);transition:all .2s ease-in-out}.feature:hover{-webkit-transform:translateY(-5px);-ms-transform:translateY(-5px);transform:translateY(-5px)}.feature:hover h3{color:#1a8dba}.feature:hover .feature-img{border:1px solid #ccc;border-bottom:none}.feature:hover .no-border{border:none}.feature:hover:before{-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px)}@media (max-width: 1147px){.feature:hover h3{color:#6e818a}.feature:hover .feature-img{border:1px solid #ddd;border-bottom:none}.feature:hover .no-border{border:none}}.feature .feature-img{padding-top:52%;width:100%;height:auto;border:1px solid #ddd;border-bottom:none}.feature .feature-img.custom-css{background:url("../images/custom-css.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.custom-css{background-image:url("../images/custom-css@2x.jpg")}}.feature .feature-img.wordpress-connect{background:url("../images/wordpress-connect.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-connect{background-image:url("../images/wordpress-connect@2x.jpg")}}.feature .feature-img.wordpress-stats{background:url("../images/wordpress-stats.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-stats{background-image:url("../images/wordpress-stats@2x.jpg")}}.feature .feature-img.no-border{border:none;padding-bottom:1px}.feature-description{display:block;padding:1em 1.07143em 1.07143em;border:1px solid #ddd;background:#f5f5f5}.feature:hover .feature-description{background:#fff;border-color:#ccc}@media (max-width: 1147px){.feature:hover .feature-description{border:1px solid #ddd;background:#f5f5f5}}@media (max-width: 900px){.feature-description{min-height:115px}}.cat{clear:both;margin-bottom:23px}.cat h3{font-size:24px;font-weight:300;margin:0 6px 13px 0;text-align:right}.cat .clear{clear:both}.module-grid{text-align:center}.module-grid h2{margin:1em 0}@media (max-width: 530px){.module-grid h2{padding-top:16px;margin-top:0;font-size:25px}}#module-search{position:relative;width:100%;max-width:40.71429em;margin:0 auto 1.07143em;overflow:hidden}#jetpack-search{margin:0;padding:11px 16px 11px 16px;width:100%;border:1px solid #c9ced0;border-radius:3px;background:#fff;color:#5c6671;line-height:1.3}#jetpack-search:focus{color:#5c6671;outline:none}#jetpack-search:focus+label{background:transparent;opacity:0}#jetpack-search::-webkit-input-placeholder{color:#a8acae}#jetpack-search :-moz-placeholder{color:#a8acae}#jetpack-search::-moz-placeholder{color:#a8acae}#jetpack-search:-ms-input-placeholder{color:#a8acae}#jetpack-search+label{position:absolute;top:1px;left:1px;bottom:1px;width:48px;color:#abafb1;text-indent:-9999px;pointer-events:none;border-radius:3px;transition:all .2s ease-in-out}#jetpack-search+label:after{content:'\f400';position:absolute;left:11px;text-align:left;top:4px;font-size:1.71429em;font-weight:normal;font-family:"genericons"}.jp-filter{margin-bottom:2.85714em;color:#6f7476}.jp-filter a{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#aaa;font:600 0.92857em/1 "Open Sans", Helvetica, Arial, sans-serif;text-shadow:0 -1px 1px rgba(255,255,255,0.2);background:#eee;border-radius:3px;background-clip:padding-box}.jp-filter a.selected,.jp-filter a:hover,.jp-filter a:focus{color:#efefef;text-shadow:0 -1px 1px rgba(0,0,0,0.2);background:#6f7476}@media (max-width: 530px){.jp-filter a{padding:0.76em 1em}}.module{display:block;padding:0.71429em 1.07143em 1em;text-align:right;border:1px solid #dae0e2;background:#fff;box-shadow:0 0 0 rgba(0,0,0,0.03);transition:opacity 2s ease-in}.module:hover{border-color:#8ac9e8;background:#f8fcfe}.module h3{cursor:pointer;margin:0 0 0.5em;color:#1a8dba;font-size:1.14286em;line-height:1.4em;font-weight:700}.module p{margin:0;color:#686f72;font-size:0.85714em}.module:hover,.module:focus{border-color:#8ac9e8;background:#f8fcfe}.module.active{border-color:#2ea2cc;box-shadow:inset -4px 0 0 #2ea2cc}.module.active:hover{border-color:#69bedd;box-shadow:inset -4px 0 0 #69bedd}.module .button,.module .button-primary{margin-top:15px}@media (max-width: 530px){.module .configure,.module .activate{display:block;width:100%;text-align:center}.module .button,.module .button-primary{width:50%}.module .button-primary{line-height:normal;padding:6px 14px;height:auto;font-size:14px}}@media screen and (max-width: 450px){.module .button,.module .button-primary{margin:20px auto 0 auto}.module .button.alignright,.module .button-primary.alignright{float:none}}@media (max-width: 1147px){.cat .module:nth-child(3n+1){margin:.75% 1.5% .75% 0}.cat .module:nth-child(3n - 1){margin-right:0}}@media (max-width: 900px){.cat .module{margin:1% 2% 1% 0}.cat .module:nth-child(2n+1){margin:1% 2% 1% 0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 530px){.cat .module{margin:5px 0}.cat .module:nth-child(2n+1){margin-right:0}.cat .module:nth-child(2n+0){margin-right:0}}@media (max-width: 900px){.module{margin:1% 2% 1% 0;width:49%}.module:nth-child(3n+1){margin-right:2%}.module:nth-child(2n+1){margin-right:0}}@media (max-width: 530px){.module{margin:5px 0;width:100%}.module:nth-child(3n+1){margin-right:0}.module:nth-child(2n+1){margin-right:0}}.new{position:relative}.new:after{content:'NEW';position:absolute;top:-8px;left:-8px;padding-top:10px;width:32px;height:32px;color:#fff;font-size:8px;font-weight:800;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,0.2);background:url("../images/new-badge.svg") center center no-repeat;background-size:100%;border-radius:50%}.paid{display:inline-block;position:relative;top:5px;margin-right:10px;padding:1px 4px 0 6px;height:13px;color:#fff;font:700 10px/1 "Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 0 rgba(0,0,0,0.05);background:#d0d0d0;vertical-align:top}.paid:before,.paid:after{position:absolute;top:0;left:100%;font:normal 14px/14px "genericons"}.paid:before{content:'\f503';color:#d0d0d0;text-shadow:none}.paid:after{content:'\f428';margin-left:-5px;font-size:11px}.rtl .paid:before{content:'\f501'}.load-more{margin:2.71429em 0 6.15385em}.set{display:none}.show.set{display:block}.loading{bottom:50%;position:absolute;top:50%;width:100%}.loading span{color:#999}.modal{background:#fff;position:fixed;top:52px;bottom:20px;left:20px;right:20px;margin-right:160px;display:none;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1);z-index:500}.modal .close{position:absolute;top:0;left:0;font:300 1.71429em "genericons" !important;color:#777;content:'\f405';display:inline-block;padding:0.28571em 0.71429em 0.42857em;z-index:5}.modal .close:hover{background:#eee;opacity:0.8}.modal .close:active{background:#eee;opacity:0.4}.modal #jp-post-flair{display:none}.modal .content-container{position:absolute;top:0;left:0;bottom:0;right:0;overflow:auto;padding:2.14286em}.modal .content{margin:0 auto;max-width:900px;text-align:right}.modal h2{text-align:right;margin-top:0;color:#5d6d74;font:300 32px "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.modal h2{font-size:26px}}.modal h5{clear:right}.modal p{font-size:1.23077em}.modal footer{position:absolute;right:0;bottom:0;width:100%;padding:12px 20px;border-top:1px solid #ddd;background:#fff;text-align:left}.modal footer ul{margin:0}.modal footer li{display:inline-block;margin:0}.modal .button-secondary,.modal .button-primary:active{vertical-align:baseline}@media (max-width: 900px){.modal{bottom:5%;margin-right:36px;font-size:80%}.modal .content{top:38px}}@media (max-width: 782px){.modal{top:66px;margin-right:0}}@media (max-width: 600px){.modal{top:10px;left:10px;bottom:10px;right:10px}}.jp-info-img{float:left;margin:0 30px 30px 0}.jp-info-img img{border:1px solid #ddd;max-width:100%;height:auto}.jp-info-img img:first-child{margin-top:0}@media (max-width: 782px){.jp-info-img{float:none;margin:0 0 15px}}.content-container.modal-footer{bottom:53px}.shade{background:#000;bottom:0;cursor:pointer;display:none;right:0;opacity:0.2;position:fixed;left:0;top:0;z-index:11}.entry-title,.page-template-default h1{margin-top:0.61111em;color:#5d6d74;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.entry-title,.page-template-default h1{font-size:2em}}.blog h3,.single h3,.page-template-default h2{margin-top:0.61111em;color:#5d6d74;font:300 1.9em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 1px #fff}@media (max-width: 530px){.blog h3,.single h3,.page-template-default h2{font-size:1.4em}}.page-template-default p{line-height:1.71429em}.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{float:right;width:70%}.footer{margin-top:1.42857em;position:relative;padding:10em 0 4.28571em;text-align:center}.footer:before,.footer:after{content:'';position:absolute;right:0;pointer-events:none}.footer:before{top:0;margin-top:-1px;width:100%;height:195px}.footer:after{display:none}.footer .download-jetpack{margin-bottom:33px}@media (min-width: 1147px){.footer{padding-bottom:35px}}@media (max-width: 1147px){.footer{padding-top:165px;padding-bottom:0}.footer:before{background-size:160% auto}.footer ul{float:none;overflow:hidden}}@media (max-width: 900px){.footer{padding-top:146px}}@media (max-width: 782px){.footer{margin-top:0}}@media (max-width: 530px){.footer{margin-top:0;padding-top:135px}}@media (max-width: 320px){.footer{padding-top:76px}}.footer nav{max-width:100%}.footer nav a,.footer nav a:visited{padding:4px 6px;color:#999}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81A844}@media (max-width: 1147px){.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81a844}}@media (max-width: 530px){.footer nav li{display:block;float:none;margin:0;text-align:right}.footer nav a{display:block;padding:0 16px;line-height:44px}}.primary{padding:25px 15px 10px 15px;border-bottom:1px solid #eee}.secondary-footer{margin:0 auto}.secondary-footer li{margin-left:5px}@media (min-width: 782px){.secondary-footer{padding:8px 15px 10px;margin-bottom:30px;border-bottom:1px solid #eee}}@media (min-width: 1147px){.secondary-footer{margin-bottom:0}}@media (max-width: 782px){.secondary-footer{padding:8px 15px 8px;border-bottom:none}}@media (max-width: 530px){.secondary-footer{margin:0;padding:0;border:none;font-weight:400}.secondary-footer a{border-top:1px solid #eee}}.footer .a8c-attribution{margin:0;padding:0 6px;color:#bbb;font-size:0.78571em;font-family:"Gill Sans","Gill Sans MT","Open Sans",Helvetica,Arial,sans-serif;text-transform:uppercase}.footer .a8c-attribution a{display:inline-block;position:relative;padding:4px 16px;left:9999px;outline:0}.footer .a8c-attribution a:after{content:'A';position:absolute;top:2px;left:-9999px;height:100%;color:#999;font-size:1.54545em;font-family:"automatticons";text-align:center}.footer .a8c-attribution a:hover:after{-webkit-animation:candy .4s ease-in-out;animation:candy .4s ease-in-out}@media (min-width: 782px){.secondary{padding:0 15px 10px 15px;border-bottom:1px solid #eee}}@media (min-width: 1147px){.secondary{padding:0 15px 10px 15px;border-bottom:none}}.jetpack-message{background:#8eb74e;border:1px solid #73963d;margin:33px auto 0;max-width:90%;position:relative;z-index:2}.jetpack-message.is-opt-in{margin:50px 0 0;max-width:100%;padding:10px 15px;background:#fff;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);font-size:13px;text-align:center}.subhead .jetpack-message.is-opt-in{margin:0;padding-bottom:0;background:transparent;box-shadow:none}.subhead .jetpack-message.is-opt-in .jp-button,.subhead .jetpack-message.is-opt-in .jp-button--settings{display:inline-block}.jetpack-message.is-opt-in p{color:#3c4549}.jetpack-message.is-opt-in .jp-button,.jetpack-message.is-opt-in .jp-button--settings{margin-top:15px;display:none}.jetpack-message .squeezer h2{font-size:1em}.jetpack-message h2{color:#fff;margin:0}.jetpack-message p{color:#fff;margin:0;opacity:0.7}.jetpack-message .squeezer{padding:23px 80px 23px 23px;position:relative;text-align:right}.jetpack-message .squeezer:before{color:#fff;content:'\f418';font-family:'Genericons';font-size:33px;height:33px;right:25px;opacity:0.6;position:absolute;top:23px;top:calc( 50% - 22px )}@media (max-width: 530px){.jetpack-message .squeezer{padding:23px}.jetpack-message .squeezer:before{display:none}}.jetpack-message .squeezer a{color:#FFF;border-bottom:1px solid #D5E4BD}.jetpack-message .squeezer a:hover{border-bottom:1px solid #F1F6E9}.jetpack-message.error .squeezer:before,.jetpack-message.jetpack-err .squeezer:before{content:'\f414'}.configure-module .jetpack-message{max-width:100%}.jetpack-modules #site-icon-deprecated .info,.modules h3.icon,.jetpack-modules .info a{width:auto}.jetpack-modules #site-icon-deprecated .info:before,.modules h3.icon:before,.jetpack-modules .info a:before{display:inline-block;position:relative;top:1px;right:-3px;margin-left:2px;opacity:0.8;font:normal 20px "genericons";vertical-align:top}.jetpack-modules .info a:before{margin-top:1px}.latex:before,.jetpack-modules #latex .info a:before{content:'\f408'}.carousel:before,.jetpack-modules #carousel .info a:before{content:'\f102'}.modules h3.contact-form:before,.jetpack-modules #contact-form .info a:before{content:'\f175';font:normal 20px "dashicons"}.modules h3.custom-css:before,.jetpack-modules #custom-css .info a:before{content:'\f100';font:normal 20px "dashicons"}.modules h3.enhanced-distribution:before,.jetpack-modules #enhanced-distribution .info a:before{content:'\f237';font:normal 20px "dashicons"}.modules h3.widgets:before,.jetpack-modules #widgets .info a:before{content:'\f116';font:normal 20px "dashicons"}.modules h3.gravatar-hovercards:before,.jetpack-modules #gravatar-hovercards .info a:before{content:'G';font-family:"automatticons"}.infinite-scroll:before,.jetpack-modules #infinite-scroll .info a:before{content:'\f408'}.comments:before,.jetpack-modules #comments .info a:before{content:'\f108'}.sso:before,.jetpack-modules #sso .info a:before{content:'\f205'}.json-api:before,.jetpack-modules #json-api .info a:before{content:'\f415'}.likes:before,.jetpack-modules #likes .info a:before{content:'\f408'}.markdown:before,.jetpack-modules #markdown .info a:before{content:'\f462'}.minileven:before,.jetpack-modules #minileven .info a:before{content:'\f453'}.manage:before,.jetpack-modules #manage .info a:before{content:'\f205'}.monitor:before,.jetpack-modules #monitor .info a:before{content:'\f468'}.notes:before,.jetpack-modules #notes .info a:before{content:'\f300'}.omnisearch:before,.jetpack-modules #omnisearch .info a:before{content:'\f400'}.photon:before,.jetpack-modules #photon .info a:before{content:'\f403'}.post-by-email:before,.jetpack-modules #post-by-email .info a:before{content:'\f410'}.protect:before,.jetpack-modules #protect .info a:before{content:'\f470';position:relative;top:-1px}.modules h3.publicize:before,.jetpack-modules #publicize .info a:before{content:'\f237';font:normal 20px "dashicons"}.related-posts:before,.jetpack-modules #related-posts .info a:before{content:'\f420'}.sharedaddy:before,.jetpack-modules #sharedaddy .info a:before{content:'\f415'}.shortcodes:before,.jetpack-modules #shortcodes .info a:before{content:'\f100'}.verification-tools:before,.jetpack-modules #verification-tools .info a:before{content:'\f425'}.after-the-deadline:before,.jetpack-modules #after-the-deadline .info a:before{content:'\f411'}.subscriptions:before,.jetpack-modules #subscriptions .info a:before{content:'\f410'}.tiled-gallery:before,.jetpack-modules #tiled-gallery .info a:before{content:'\f103'}.modules h3.vaultpress:before,.jetpack-modules #vaultpress .info a:before{content:'V';font-family:"automatticons"}.videopress:before,.jetpack-modules #videopress .info a:before{content:'\f104'}.modules h3.widget-visibility:before,.jetpack-modules #widget-visibility .info a:before{content:'\f116';font:normal 20px "dashicons"}.stats:before,.jetpack-modules #stats .info a:before{content:'\f205'}.shortlinks:before,.jetpack-modules #shortlinks .info a:before{content:'\f107'}.modules h3.custom-content-types:before,.jetpack-modules #custom-content-types .info a:before{content:'\f498';font:normal 20px "dashicons"}.modules h3.site-icon:before,.jetpack-modules #site-icon .info a:before{content:'\f475'}.jetpack-modules #site-icon-deprecated .info:before{content:'\f475'}.jetpack-modules #sitemaps .info a:before{content:'\f507'}@media (max-width: 782px){.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{width:100%}}@media (max-width: 600px){.clouds-sm{display:none}}@media (max-width: 530px){.wrap.inner.jp-support .jp-support-column-left{width:100%}.wrap.inner.jp-support .jp-support-column-left .widget-text{margin-left:0;width:100%}.wrap.inner.jp-support .jp-support-column-right{width:100%}}@media screen and (max-width: 515px){.jp-frame .header-nav{padding-bottom:10px}.jp-frame .header-nav li{line-height:30px}.jp-frame .header-nav .jetpack-logo{width:100%;text-align:center}.jp-frame .header-nav .jetpack-modules{margin:0;width:50%;text-align:left;padding:0 5px}.jp-frame .header-nav .jetpack-modules+.jetpack-modules{text-align:right}.jp-frame .header-nav .jetpack-modules:nth-child(4){text-align:center;margin:0 auto;width:100%}.jp-frame .header-nav .jetpack-modules:nth-child(4) a{padding:0 10px}}@media (max-width: 320px){.jetpack_page_jetpack_modules .wrap{padding:0 0 1em}}.page-content.configure{margin-top:0}.configure .frame.top{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}.configure .frame.top.fixed{background:#f9f9f9;border-bottom:1px solid #e9e9e9;padding-right:160px;margin-top:-6px;position:fixed;left:0;top:32px;width:100%;z-index:4;box-shadow:0 2px 2px -2px #eee}@media (max-width: 782px){.configure .frame.top.fixed{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}}@media (max-width: 600px){.configure .frame.top.fixed{top:0}}.configure .frame.top .tablenav.top{float:right}@media (max-width: 900px){.configure .frame.top .tablenav.top .actions{display:block}}@media (max-width: 782px){.configure .frame.top .tablenav.top .actions{margin-top:6px}}.jp-frame-top-fixed .configure{padding-top:94px}.filter-search{display:none;float:left;margin-top:10px}@media (max-width: 782px){.filter-search{display:block}}@media (max-width: 530px){.filter-search{display:none}}.module-actions.landing-page{float:left;margin-left:15px}.module-actions.landing-page a{font-size:0.6em}.table-bordered.jetpack-modules{border:none;margin-bottom:0}.table-bordered.jetpack-modules tr.jetpack-module th{border-right:0;padding:14px 4px 0}.table-bordered.jetpack-modules tr.jetpack-module th input{display:block}.table-bordered.jetpack-modules tr.jetpack-module:hover .genericon{display:inline-block}.table-bordered.jetpack-modules tr.jetpack-module:hover td .row-actions span a{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.active th,.table-bordered.jetpack-modules tr.jetpack-module.active td{background:#f7fcfe}.table-bordered.jetpack-modules tr.jetpack-module.active th{border-right:4px solid #2ea2cc;padding-right:0px}.table-bordered.jetpack-modules tr.jetpack-module.active td:first-child{border-right:4px solid #2ea2cc}.table-bordered.jetpack-modules tr.jetpack-module.unavailable{opacity:0.3}.table-bordered.jetpack-modules tr.jetpack-module.unavailable input{display:none}.table-bordered.jetpack-modules tr.jetpack-module#vaultpress{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.deprecated span{color:#888}.table-bordered.jetpack-modules tr.jetpack-module.deprecated .dep-msg{margin-left:10px;color:#555}.table-bordered.jetpack-modules tr.jetpack-module th,.table-bordered.jetpack-modules tr.jetpack-module td{background:#fff;margin:0;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1)}.table-bordered.jetpack-modules tr.jetpack-module td{padding:10px 14px 8px 10px;line-height:25px}.table-bordered.jetpack-modules tr.jetpack-module td:first-child{border-right:4px solid #fff}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{float:left;padding:0 0 1px;visibility:visible}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span{margin-right:5px}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a{opacity:0}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a:focus{opacity:1}@media (max-width: 530px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}}@media (max-width: 782px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:block;padding-right:10px;visibility:visible}}.table-bordered.jetpack-modules>thead>tr>th{border:0;vertical-align:middle}.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-left:0}@media (max-width: 782px){.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-right:0}}.table-bordered.jetpack-modules td{background:#fff}.table-bordered.jetpack-modules #doaction{margin-top:0}@media (max-width: 782px){.table-bordered.jetpack-modules #doaction{padding:10px 7px}}.table-bordered.jetpack-modules .checkall{margin-top:1px}.table-bordered.jetpack-modules .filter-search{margin-top:8px}.table-bordered.jetpack-modules .genericon{color:#999;display:none;margin:7px 3px 0}@media (max-width: 900px){.table-bordered.jetpack-modules .genericon{display:inline-block}}.table-bordered.jetpack-modules .med{width:70px}.table-bordered.jetpack-modules .sm{width:30px}@media (max-width: 782px){.table-bordered.jetpack-modules .check-column{width:50px}}.fixed-top .check-column{padding:8px 10px 0 10px;width:2.2em}.wrap{margin:0;padding:0 1.5em 1em;overflow:hidden}.wrap h2{font-size:24px;font-weight:400}.wrap .manage-left{float:right;margin:0;padding:0;width:63%}.wrap .manage-left table{width:100%}.wrap .manage-left th{font-weight:400}@media (max-width: 782px){.wrap .manage-left{width:100%}}.wrap .manage-right{margin:0;padding:0;float:left;width:35%;z-index:1}.wrap .manage-right p{font-size:12px;font-weight:bold;color:#bbb;padding-top:2px;text-transform:uppercase;letter-spacing:1px;clear:right}.wrap .manage-right .bumper{margin-right:33px}.wrap .manage-right.show{display:block;overflow-y:auto;overflow-x:hidden;position:absolute;z-index:100000}.wrap .manage-right .search-bar{margin-bottom:18px;max-width:300px}.wrap .manage-right p.search-box{float:none;height:auto;margin-bottom:0;position:relative}.wrap .manage-right p.search-box input[type='search']{padding:0 8px;width:90%;line-height:initial}@media (max-width: 782px){.wrap .manage-right p.search-box input[type='search']{float:right;padding:9px 8px}}.wrap .manage-left p.search-box input[type="submit"]{display:none}.wrap .manage-right .button-group .button{outline:none}.wrap .manage-right .subsubsub{margin:0;padding:0}.wrap .manage-right .subsubsub a{padding:0;line-height:inherit}.wrap .manage-right .subsubsub .current{padding:1px 5px;border-radius:2px;margin-right:-5px;background:#0D72B2;color:#fff}.wrap .manage-right .subsubsub .current .count{color:#BCD7E7;font-weight:200}.wrap .manage-right .subsubsub li{display:block;text-align:right}@media (max-width: 782px){.wrap .manage-right{background:#fff;bottom:0;display:none;min-width:300px;position:fixed;left:0;top:0;z-index:13;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1)}.wrap .manage-right .bumper{margin:13px}.wrap .manage-right .navbar-form{margin:0;padding:0}}@media (max-width: 782px){.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary):not(.check-column){padding:11px 10px;display:block}.jetpack_page_jetpack_modules #doaction{padding:7px 14px}.jetpack_page_jetpack_modules .fixed-top thead .check-column{padding:28px 10px 0 10px}.jetpack_page_jetpack_modules .filter-search{margin-top:28px}.jetpack_page_jetpack_modules .filter-search .button{padding:7px 14px}.manage-right.show .subsubsub li{padding:5px}}@media (max-width: 650px){.table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions{float:none;padding-right:18px}}@media (max-width: 430px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}.table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions{display:block}}.configure-module p{font-size:14px}.configure-module p.success,.configure-module p.error{color:#fff;padding:10px}.configure-module p.success{background-color:#81a844}.configure-module p.error{background-color:#d94f4f}.protect-status p{font-size:16px}.protect-status strong{display:inline-block;margin-top:10px;background:#fff;padding:10px;border:1px #ddd solid;font-size:16px;color:#000;max-width:100%}.protect-status.attn{color:#d94f4f}.protect-status.working{color:#81a844}#non-editable-whitelist{margin-top:15px}.protect-whitelist textarea{width:100%;min-height:150px}#editable-whitelist .whitelist-table{width:100%}.configure-module input[disabled]{opacity:.5}.configure-module input.button-primary{font-weight:bold}.whitelist-table{border-top:1px solid;border-left:1px solid;border-color:#ddd;background-color:#fff}.whitelist-table td,.whitelist-table th{padding:10px;margin:0;border-bottom:1px solid;border-right:1px solid;border-color:#ddd;font-size:14px}.whitelist-table th.heading{font-weight:bold;color:#5d6d74;text-align:right;background-color:#eee}.whitelist-table td.item-actions{border-right:none;text-align:left}.whitelist-table .toolbar{padding:0}.whitelist-table .add-btn{text-align:center;width:10%;border-right:1px #ddd solid}.ip-address,.enter-ip{width:90%;text-align:right;vertical-align:middle}.delete-ip-address{text-align:center;border:0;background:transparent;color:#6f7476;box-shadow:none;font-size:20px;margin:0;padding:0;cursor:pointer;border-radius:2px}.delete-ip-address:hover{background:#eee}.toolbar div{float:right;padding:10px}@media only screen and (min-width: 1100px){#non-editable-whitelist{width:28%;float:left;margin-top:0}.protect-whitelist{width:65%;float:right}}@media only screen and (max-width: 1130px){.enter-ip input[type="text"]{max-width:175px}}@media only screen and (max-width: 1250px) and (min-width: 1065px), (max-width: 730px) and (min-width: 600px){.enter-ip{width:85%}.add-btn{width:15%}}@media only screen and (max-width: 782px){.add-btn{text-align:left}.add-btn .ip-add{margin-top:4px;margin-bottom:3px}}@media only screen and (max-width: 730px){.add-btn{text-align:center}}@media only screen and (max-width: 665px) and (min-width: 600px){.enter-ip input[type="text"]{max-width:165px}}@media only screen and (max-width: 600px){.toolbar div{width:100%}.add-btn{border-top:1px #ddd solid}.enter-ip{text-align:center}.enter-ip strong{display:block;margin-bottom:5px}.enter-ip input[type="text"]{width:100%;max-width:100%}.add-btn input,.enter-ip .button{width:50%;margin:0 auto}.enter-ip .button{margin-top:10px}}@media only screen and (max-width: 400px){.protect-status strong{font-size:12px;overflow:auto}.add-btn input,.enter-ip .button{width:100%}}.my-jetpack-actions{margin:0 0 40px 0}.my-jetpack-actions .j-col{padding:0;text-align:center}.my-jetpack-actions #user-list{height:30px;margin-top:-1px;margin-right:-3px}#jetpack-disconnect-content{display:none;text-align:center}#jetpack-disconnect-content .cancel-disconnect{display:block;margin-top:10px}.connection-details{border:1px #ddd solid}.connection-details.local-user{margin-bottom:10px}.connection-details .user-01,.connection-details .wpuser-02,.connection-details .action-btns{padding:10px}.connection-details .user-01 .button,.connection-details .user-01 select,.connection-details .wpuser-02 .button,.connection-details .wpuser-02 select,.connection-details .action-btns .button,.connection-details .action-btns select{margin-top:5px}.connection-details .wpuser-02{margin-top:10px}.connection-details h3{padding:10px;margin:0;background:#eee;border-bottom:1px #ddd solid;font-size:14px}.jp-user img{margin-left:10px;border-radius:50%}.jp-user div,.wp-user div,.wp-action div{display:inline-block;width:100%}.j-col.jp-user,.j-col.wp-user,.j-col.wp-action{padding:0}.my-jetpack-actions select{max-width:150px}.j-actions .button:nth-child(3){margin-left:5px}.j-row.disconnect{text-align:center}.j-row.disconnect .button{margin:0 auto}a.what-is-primary{color:#b4b9be;margin-right:4px}@media (max-width: 782px){.wp-action{border-top:1px #ddd solid}.wp-action h3{display:none}}@media screen and (max-width: 500px){.connection-details{font-size:11px}.connection-details h3{font-size:12px;padding:5px}.connection-details .user-01,.connection-details .wpuser-02{padding:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.connection-details .action-btns{text-align:center}}@media (max-width: 530px){.connection-details .wpuser-02{margin-top:0;padding:12px}}@media screen and (max-width: 450px){.j-actions .button{width:100%;margin-bottom:5px;text-align:center}.j-actions .button.alignright{float:none}}@media screen and (max-width: 350px){.user-01,.wpuser-02{max-width:100px}}.manage__icon{width:155px;height:155px;margin:20px auto}.manage-page .manage__description{max-width:600px;text-align:center;font-size:22px;color:#999;margin:20px auto}.manage-page .manage__button{font-size:16px;padding:0 20px;height:40px;line-height:40px}.manage__title .genericon{font-size:38px;color:#81A944}.manage__link{font-size:16px;padding:0 20px;height:40px;line-height:40px;font-weight:normal}.manage__link .genericon{font-size:28px;vertical-align:middle;margin-top:-6px}.jp-content .hide{display:none}.jp-content .pointer{cursor:pointer}.jp-content .landing{margin:0 auto;z-index:2;position:relative}.jp-content h1{font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;z-index:3;width:100%;text-align:center}.jp-content h1.success{color:#81a844}.jp-content .footer{padding-top:0;margin-top:0;background-image:none}.jp-content .footer:before{height:inherit}.jp-content .more-info:before{content:none}.landing .wpcom-connect{min-height:400px}.wpcom-connect .j-col{padding:0}.wpcom-connect .connect-desc{padding-left:25px}.wpcom-connect .connect-btn{text-align:center}.module-grid h2{color:#000;font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif}.download-jetpack{margin-top:1em !important}#jump-start-area{margin-top:35px;padding-right:60px;padding-left:60px;background:#fefefe;border:1px #dae0e2 solid;padding-bottom:20px;text-align:center}#jump-start-area .connect-btn{text-align:center}#jump-start-area #jumpstart-cta,#jump-start-area .jumpstart-desc{padding:0}#jump-start-area p{font-size:14px;line-height:185%}#jump-start-area .spinner{float:none;margin:0 auto;position:absolute;bottom:0;height:100%;width:100%;background-position:50% 56%;background-color:rgba(254,254,254,0.99);display:block;opacity:.9}.jumpstart-message p{padding-left:25px}.jumpstart-desc{text-align:right}#jumpstart-cta{text-align:center;display:inline-block;float:none}.dismiss-jumpstart{color:#999;font-size:14px}#jumpstart-cta .button,#jumpstart-cta .button-primary{margin:1em;font-size:18px;height:45px !important;padding:8px 15px 1px}#jumpstart-cta .button-primary{display:block;margin:35px 20px 5px 20px}#jp-config-list{position:relative;padding-top:15px;padding-bottom:15px;margin-right:-15px;margin-left:-15px}#jp-config-list .j-col{padding:15px}#jp-config-list strong{display:inline-block}#jp-config-list small{display:block;margin-top:5px;line-height:150%}#jp-config-list .close{position:absolute;top:10px;left:0;text-transform:uppercase;font-weight:bold;display:block;z-index:5}.jp-config-status{text-transform:uppercase;font-size:10px;font-weight:bold;line-height:100%;color:#fff;background:#9fbd72;border-radius:2px;padding:2px 4px;display:inline-block}.nux-intro h3{background:#81a844;color:#fff;font-weight:600;padding:.75em;margin:0}.nux-intro h4{margin:0 0 2px 0}.nux-intro p{text-align:center;font-size:1.24em;line-height:175%}.nux-intro a{transition:all .4s ease}.nux-intro .j-col{padding:0 0.5em}.nux-intro .j-col:first-of-type{padding-right:0}.nux-intro .j-col:last-of-type{padding-left:0}.nux-intro .nux-in{background:#ececec;-webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.nux-intro .nux-in h3{font-size:1.10em;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;border-top-left-radius:6px}.nux-intro .nux-in h3 .dashicons{float:left;color:#658435;font-size:1.25em;padding-right:0}.nux-intro .nux-in h3 .dashicons:hover{color:#57722e}.nux-intro .nux-in p{font-size:.9em;line-height:150%;margin:0;text-align:right;color:#686f72}.nux-intro .nux-in .j-row{border-bottom:1px #f9f9f9 solid;padding:5px 0;position:relative;min-height:70px}.nux-intro .nux-in .j-row:hover{background:#e0e0e0}.nux-intro .nux-in .unavailable{opacity:0.5}.nux-intro .nux-in .unavailable .act{display:none}.nux-intro .nux-in .paid{top:4px;margin-right:12px}.nux-intro .nux-in .dashicons{color:#81a844;font-size:1em;position:relative;top:3px;padding-right:6px}.nux-intro .nux-in .dashicons:hover{color:#57722e}.nux-intro .nux-in .dashicons-external{font-size:1.5em;top:2px;padding-right:3px}.nux-intro .nux-in .lmore{font-size:11px;color:#81a844}.nux-intro .nux-in .lmore:hover{color:#57722e}.nux-intro .feat.j-col{padding:10px 10px 10px 2px}.nux-intro .feat .dashicons{display:none}.nux-intro .activated .feat .dashicons{display:inline-block}.nux-intro .act{position:absolute;top:50%;-ms-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%);left:8px;float:left}.nux-intro .act.j-col{padding:5px;text-align:left}.nux-intro .module-action{text-transform:uppercase;font-size:.85em;font-weight:600}.nux-intro .wpcom h3{background:#0087be}.nux-intro .wpcom h3 .dashicons{color:#00638b}.nux-intro .wpcom h3 .dashicons:hover{color:#005172}.nux-intro .wpcom .j-col{padding:10px}.nux-intro .wpcom .goto{text-align:center;padding:1em}.nux-intro .wpcom .goto:hover{background:#ececec}.nux-intro .wpcom .goto .j-col{padding:0 5px}.nux-intro .wpcom .goto a{width:100%;padding:.25em;height:auto}.nux-intro .wpcom .goto .button{height:auto;min-height:28px;line-height:18px;white-space:normal;max-width:200px;margin-bottom:0;padding-top:4px;padding-bottom:5px}.nux-intro .wpcom .goto .feat{position:absolute;top:50%;-ms-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.nux-intro .nux-foot .j-col{padding:1em}.nux-foot{margin-top:2em;background:#ececec;border-radius:6px}.nux-foot .j-col{min-height:75px;padding:1em}@media (max-width: 650px){.nux-foot .j-col{width:100%}}.nux-foot .j-col+.j-col{border-right:1px #f9f9f9 solid}@media (max-width: 650px){.nux-foot .j-col+.j-col{border-right:none;border-top:1px #f9f9f9 solid}}.nux-foot .actions{margin-top:1em}.nux-foot a{text-decoration:underline}.nux-foot img{float:left;margin-right:1em;width:75px;border-radius:4px}.nux-foot p{font-size:.9em;text-align:right;font-weight:600;margin-top:0}.nux-foot p+p{font-weight:400;margin-bottom:0}.nux-foot ul{font-size:.9em;margin-bottom:0}.nux-foot ul li{margin-left:.875em;margin-bottom:0;line-height:175%;display:inline-block;vertical-align:middle}.form-toggle[type="checkbox"]{opacity:0;position:absolute}.form-toggle__switch{position:relative;display:inline-block;border-radius:12px;-moz-box-sizing:border-box;box-sizing:border-box;padding:2px;width:40px;height:24px;background:#b9b9b9;vertical-align:middle;outline:0;cursor:pointer;transition:all .4s ease}.form-toggle__switch:before,.form-toggle__switch:after{position:relative;display:block;content:"";width:20px;height:20px}.form-toggle__switch:after{right:0;border-radius:50%;background:#fff;transition:all .2s ease}.form-toggle__switch:before{display:none}.form-toggle__switch:hover{background:#bdd597}.form-toggle__label{cursor:pointer}.plugin-action__label{padding-left:5px;top:-1px;position:relative;color:#8e9598}.activated .plugin-action__label{color:#81a844}.form-toggle:focus+.form-toggle__label .form-toggle__switch,.form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #0087be}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#81a844}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{right:16px}.form-toggle:checked:hover+.form-toggle__label .form-toggle__switch{background:#bdd597}.form-toggle:disabled+.form-toggle__label .form-toggle__switch,.form-toggle:disabled:hover+.form-toggle__label .form-toggle__switch{background:#e9eff3}.form-toggle.is-toggling+.form-toggle__label .form-toggle__switch{background:#81a844}.form-toggle.is-toggling:checked+.form-toggle__label .form-toggle__switch{background:#bdd597}.form-toggle.is-compact+.form-toggle__label .form-toggle__switch{border-radius:8px;width:24px;height:16px}.form-toggle.is-compact+.form-toggle__label .form-toggle__switch:before,.form-toggle.is-compact+.form-toggle__label .form-toggle__switch:after{width:12px;height:12px}.form-toggle.is-compact:checked+.form-toggle__label .form-toggle__switch:after{right:8px}@media (max-width: 1147px){.jp-content .landing{padding:0 2em}.jp-content .footer{padding-top:1.5em}.nux-intro .main-col{width:50%;margin-bottom:2em}.nux-intro .main-col.wpcom{width:100%}.nux-intro .main-col+.main-col{padding-left:0}.nux-intro .wpcom{padding:0}.nux-intro .wpcom .j-row{width:50%;float:right;border-bottom:1px #f9f9f9 solid;border-left:1px #f9f9f9 solid}.nux-intro .wpcom .j-row:last-of-type{width:100%;float:none;clear:both;border:none;border-top:1px #f9f9f9 solid;position:relative;top:-1px}.nux-intro .wpcom .goto .feat a{float:right}.nux-foot .j-col{border:none}}@media (max-width: 900px){.nux-intro .main-col{width:100%;padding:0;margin-bottom:2em}.nux-intro .wpcom .j-row{width:100%;float:none}}@media (max-width: 782px){#jumpstart-cta .button-primary{margin:10px 0 5px 0}#jump-start-area .spinner{background-position:50% 35%}}@media (max-width: 600px){.nux-intro h1{font-size:1.75em}.nux-intro p{font-size:1em}}@media (max-width: 530px){.jp-content .landing{padding:0 .5em}#jump-start-area{padding:0 1em}.jumpstart-message p{padding-left:0}#jumpstart-cta .button-primary{margin:0 0 5px 0;padding-bottom:10px}.footer .a8c-attribution a:after{top:6px}}.nav-horizontal:before,.features:before,.modules:before,.load-more:before,.nav-horizontal:after,.features:after,.modules:after,.load-more:after{content:"";display:table}.nav-horizontal:after,.features:after,.modules:after,.load-more:after{clear:both}
/*# sourceMappingURL=jetpack-admin.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin.css b/plugins/jetpack/css/jetpack-admin.css
index 9c4df5dc..9c08c32a 100644
--- a/plugins/jetpack/css/jetpack-admin.css
+++ b/plugins/jetpack/css/jetpack-admin.css
@@ -539,10 +539,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
margin-left: 36px;
}
-#wpfooter {
- display: none;
-}
-
.jp-content {
background: #f9f9f9;
margin: 0;
@@ -776,17 +772,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
max-width: 600px;
}
-.flyby {
- position: relative;
- max-width: 1200px;
- margin: 0 auto;
-}
-@media (max-width: 900px) {
- .flyby {
- display: none;
- }
-}
-
.flyer {
position: absolute;
bottom: -200px;
@@ -1249,6 +1234,37 @@ ul#adminmenu a.toplevel_page_jetpack:after {
border-color: #69bedd;
box-shadow: inset 4px 0 0 #69bedd;
}
+.module .button,
+.module .button-primary {
+ margin-top: 15px;
+}
+@media (max-width: 530px) {
+ .module .configure, .module .activate {
+ display: block;
+ width: 100%;
+ text-align: center;
+ }
+ .module .button,
+ .module .button-primary {
+ width: 50%;
+ }
+ .module .button-primary {
+ line-height: normal;
+ padding: 6px 14px;
+ height: auto;
+ font-size: 14px;
+ }
+}
+@media screen and (max-width: 450px) {
+ .module .button,
+ .module .button-primary {
+ margin: 20px auto 0 auto;
+ }
+ .module .button.alignright,
+ .module .button-primary.alignright {
+ float: none;
+ }
+}
@media (max-width: 1147px) {
.cat .module:nth-child(3n + 1) {
margin: .75% 0 .75% 1.5%;
@@ -1590,27 +1606,27 @@ ul#adminmenu a.toplevel_page_jetpack:after {
height: 195px;
}
.footer:after {
- bottom: 0;
- width: 100%;
- height: 50px;
- background: url("../images/the-footcloud.svg") center bottom no-repeat;
- background-size: auto 45px;
- z-index: 1;
+ display: none;
}
.footer .download-jetpack {
margin-bottom: 33px;
}
+@media (min-width: 1147px) {
+ .footer {
+ padding-bottom: 35px;
+ }
+}
@media (max-width: 1147px) {
.footer {
padding-top: 165px;
padding-bottom: 0;
+ /*&:after {
+ display: none;
+ }*/
}
.footer:before {
background-size: 160% auto;
}
- .footer:after {
- display: none;
- }
.footer ul {
float: none;
overflow: hidden;
@@ -1652,14 +1668,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
color: #81A844;
}
@media (max-width: 1147px) {
- .footer nav {
- border: none;
- padding: 0;
- }
.footer nav a:hover, .footer nav a:focus,
.footer nav a:visited:hover,
.footer nav a:visited:focus {
- color: #fff;
+ color: #81a844;
}
}
@media (max-width: 530px) {
@@ -1687,10 +1699,22 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.secondary-footer li {
margin-right: 5px;
}
-@media (max-width: 1147px) {
+@media (min-width: 782px) {
+ .secondary-footer {
+ padding: 8px 15px 10px;
+ margin-bottom: 30px;
+ border-bottom: 1px solid #eee;
+ }
+}
+@media (min-width: 1147px) {
.secondary-footer {
- margin: 0 30px;
- padding: 8px 15px 30px;
+ margin-bottom: 0;
+ }
+}
+@media (max-width: 782px) {
+ .secondary-footer {
+ padding: 8px 15px 8px;
+ border-bottom: none;
}
}
@media (max-width: 530px) {
@@ -1712,9 +1736,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
font-size: 0.78571em;
font-family: "Gill Sans", "Gill Sans MT", "Open Sans", Helvetica, Arial, sans-serif;
text-transform: uppercase;
- /*@include breakpoint(large-desktop){
- display: none;
- };*/
}
.footer .a8c-attribution a {
display: inline-block;
@@ -1739,8 +1760,17 @@ ul#adminmenu a.toplevel_page_jetpack:after {
animation: candy .4s ease-in-out;
}
-.secondary {
- padding: 10px 15px 0 15px;
+@media (min-width: 782px) {
+ .secondary {
+ padding: 0 15px 10px 15px;
+ border-bottom: 1px solid #eee;
+ }
+}
+@media (min-width: 1147px) {
+ .secondary {
+ padding: 0 15px 10px 15px;
+ border-bottom: none;
+ }
}
.jetpack-message {
@@ -1777,7 +1807,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
margin-top: 15px;
display: none;
}
-.jetpack-message h4 {
+.jetpack-message .squeezer h2 {
+ font-size: 1em;
+}
+.jetpack-message h2 {
color: #fff;
margin: 0;
}
@@ -1826,10 +1859,12 @@ ul#adminmenu a.toplevel_page_jetpack:after {
max-width: 100%;
}
+.jetpack-modules #site-icon-deprecated .info,
.modules h3.icon,
.jetpack-modules .info a {
width: auto;
}
+.jetpack-modules #site-icon-deprecated .info:before,
.modules h3.icon:before,
.jetpack-modules .info a:before {
display: inline-block;
@@ -2037,6 +2072,14 @@ ul#adminmenu a.toplevel_page_jetpack:after {
content: '\f475';
}
+.jetpack-modules #site-icon-deprecated .info:before {
+ content: '\f475';
+}
+
+.jetpack-modules #sitemaps .info a:before {
+ content: '\f507';
+}
+
@media (max-width: 782px) {
.blog .type-post,
.page-template-default .type-page,
@@ -2062,7 +2105,7 @@ ul#adminmenu a.toplevel_page_jetpack:after {
width: 100%;
}
}
-@media screen and (max-width: 400px) {
+@media screen and (max-width: 515px) {
.jp-frame .header-nav {
padding-bottom: 10px;
}
@@ -2082,6 +2125,14 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.jp-frame .header-nav .jetpack-modules + .jetpack-modules {
text-align: left;
}
+ .jp-frame .header-nav .jetpack-modules:nth-child(4) {
+ text-align: center;
+ margin: 0 auto;
+ width: 100%;
+ }
+ .jp-frame .header-nav .jetpack-modules:nth-child(4) a {
+ padding: 0 10px;
+ }
}
@media (max-width: 320px) {
.jetpack_page_jetpack_modules .wrap {
@@ -2205,6 +2256,13 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.table-bordered.jetpack-modules tr.jetpack-module#vaultpress {
opacity: 1;
}
+.table-bordered.jetpack-modules tr.jetpack-module.deprecated span {
+ color: #888;
+}
+.table-bordered.jetpack-modules tr.jetpack-module.deprecated .dep-msg {
+ margin-right: 10px;
+ color: #555;
+}
.table-bordered.jetpack-modules tr.jetpack-module th,
.table-bordered.jetpack-modules tr.jetpack-module td {
background: #fff;
@@ -2349,10 +2407,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
}
.wrap .manage-right.show {
display: block;
- position: fixed;
overflow-y: auto;
overflow-x: hidden;
position: absolute;
+ z-index: 100000;
}
.wrap .manage-right .search-bar {
margin-bottom: 18px;
@@ -2394,7 +2452,7 @@ ul#adminmenu a.toplevel_page_jetpack:after {
border-radius: 2px;
margin-left: -5px;
background: #0D72B2;
- color: #FFF;
+ color: #fff;
}
.wrap .manage-right .subsubsub .current .count {
color: #BCD7E7;
@@ -2425,6 +2483,44 @@ ul#adminmenu a.toplevel_page_jetpack:after {
}
}
+@media (max-width: 782px) {
+ .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary):not(.check-column) {
+ padding: 11px 10px;
+ display: block;
+ }
+
+ .jetpack_page_jetpack_modules #doaction {
+ padding: 7px 14px;
+ }
+ .jetpack_page_jetpack_modules .fixed-top thead .check-column {
+ padding: 28px 10px 0 10px;
+ }
+ .jetpack_page_jetpack_modules .filter-search {
+ margin-top: 28px;
+ }
+ .jetpack_page_jetpack_modules .filter-search .button {
+ padding: 7px 14px;
+ }
+
+ .manage-right.show .subsubsub li {
+ padding: 5px;
+ }
+}
+@media (max-width: 650px) {
+ .table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions {
+ float: none;
+ padding-left: 18px;
+ }
+}
+@media (max-width: 430px) {
+ .table-bordered.jetpack-modules tr.jetpack-module td .row-actions {
+ display: none;
+ }
+
+ .table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions {
+ display: block;
+ }
+}
/* 'Pages' is a temporary location for these styles, until we can break them up into their proper atmoic locations */
.configure-module p {
font-size: 14px;
@@ -2641,6 +2737,183 @@ ul#adminmenu a.toplevel_page_jetpack:after {
}
}
/* end < 400px */
+.my-jetpack-actions {
+ margin: 0 0 40px 0;
+}
+.my-jetpack-actions .j-col {
+ padding: 0;
+ text-align: center;
+}
+.my-jetpack-actions #user-list {
+ height: 30px;
+ margin-top: -1px;
+ margin-left: -3px;
+}
+
+#jetpack-disconnect-content {
+ display: none;
+ text-align: center;
+}
+#jetpack-disconnect-content .cancel-disconnect {
+ display: block;
+ margin-top: 10px;
+}
+
+.connection-details {
+ border: 1px #ddd solid;
+}
+.connection-details.local-user {
+ margin-bottom: 10px;
+}
+.connection-details .user-01,
+.connection-details .wpuser-02,
+.connection-details .action-btns {
+ padding: 10px;
+}
+.connection-details .user-01 .button, .connection-details .user-01 select,
+.connection-details .wpuser-02 .button,
+.connection-details .wpuser-02 select,
+.connection-details .action-btns .button,
+.connection-details .action-btns select {
+ margin-top: 5px;
+}
+.connection-details .wpuser-02 {
+ margin-top: 10px;
+}
+.connection-details h3 {
+ padding: 10px;
+ margin: 0;
+ background: #eee;
+ border-bottom: 1px #ddd solid;
+ font-size: 14px;
+}
+
+.jp-user img {
+ margin-right: 10px;
+ border-radius: 50%;
+}
+
+.jp-user div,
+.wp-user div,
+.wp-action div {
+ display: inline-block;
+ width: 100%;
+}
+
+.j-col.jp-user,
+.j-col.wp-user,
+.j-col.wp-action {
+ padding: 0;
+}
+
+.my-jetpack-actions select {
+ max-width: 150px;
+}
+
+.j-actions .button:nth-child(3) {
+ margin-right: 5px;
+}
+
+.j-row.disconnect {
+ text-align: center;
+}
+.j-row.disconnect .button {
+ margin: 0 auto;
+}
+
+a.what-is-primary {
+ color: #b4b9be;
+ margin-left: 4px;
+}
+
+@media (max-width: 782px) {
+ .wp-action {
+ border-top: 1px #ddd solid;
+ }
+ .wp-action h3 {
+ display: none;
+ }
+}
+@media screen and (max-width: 500px) {
+ .connection-details {
+ font-size: 11px;
+ }
+ .connection-details h3 {
+ font-size: 12px;
+ padding: 5px;
+ }
+ .connection-details .user-01,
+ .connection-details .wpuser-02 {
+ padding: 6px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 200px;
+ }
+ .connection-details .action-btns {
+ text-align: center;
+ }
+}
+@media (max-width: 530px) {
+ .connection-details .wpuser-02 {
+ margin-top: 0;
+ padding: 12px;
+ }
+}
+@media screen and (max-width: 450px) {
+ .j-actions .button {
+ width: 100%;
+ margin-bottom: 5px;
+ text-align: center;
+ }
+ .j-actions .button.alignright {
+ float: none;
+ }
+}
+@media screen and (max-width: 350px) {
+ .user-01,
+ .wpuser-02 {
+ max-width: 100px;
+ }
+}
+.manage__icon {
+ width: 155px;
+ height: 155px;
+ margin: 20px auto;
+}
+
+.manage-page .manage__description {
+ max-width: 600px;
+ text-align: center;
+ font-size: 22px;
+ color: #999;
+ margin: 20px auto;
+}
+.manage-page .manage__button {
+ font-size: 16px;
+ padding: 0 20px;
+ height: 40px;
+ line-height: 40px;
+}
+
+.manage__title .genericon {
+ font-size: 38px;
+ color: #81A944;
+}
+
+.manage__link {
+ font-size: 16px;
+ padding: 0 20px;
+ height: 40px;
+ line-height: 40px;
+ font-weight: normal;
+}
+.manage__link .genericon {
+ font-size: 28px;
+ vertical-align: middle;
+ margin-top: -6px;
+}
+
.jp-content .hide {
display: none;
}
@@ -2704,6 +2977,10 @@ ul#adminmenu a.toplevel_page_jetpack:after {
background: #fefefe;
border: 1px #dae0e2 solid;
padding-bottom: 20px;
+ text-align: center;
+}
+#jump-start-area .connect-btn {
+ text-align: center;
}
#jump-start-area #jumpstart-cta,
#jump-start-area .jumpstart-desc {
@@ -2736,6 +3013,8 @@ ul#adminmenu a.toplevel_page_jetpack:after {
#jumpstart-cta {
text-align: center;
+ display: inline-block;
+ float: none;
}
.dismiss-jumpstart {
@@ -2796,57 +3075,338 @@ ul#adminmenu a.toplevel_page_jetpack:after {
display: inline-block;
}
-.miguel {
+.nux-intro h3 {
+ background: #81a844;
+ color: #fff;
+ font-weight: 600;
+ padding: .75em;
+ margin: 0;
+}
+.nux-intro h4 {
+ margin: 0 0 2px 0;
+}
+.nux-intro p {
+ text-align: center;
+ font-size: 1.24em;
+ line-height: 175%;
+}
+.nux-intro a {
+ transition: all .4s ease;
+}
+.nux-intro .j-col {
+ padding: 0 0.5em;
+}
+.nux-intro .j-col:first-of-type {
+ padding-left: 0;
+}
+.nux-intro .j-col:last-of-type {
+ padding-right: 0;
+}
+.nux-intro .nux-in {
+ background: #ececec;
+ -webkit-border-bottom-right-radius: 6px;
+ -webkit-border-bottom-left-radius: 6px;
+ -moz-border-radius-bottomright: 6px;
+ -moz-border-radius-bottomleft: 6px;
+ border-bottom-right-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+.nux-intro .nux-in h3 {
+ font-size: 1.10em;
+ -webkit-border-top-left-radius: 6px;
+ -webkit-border-top-right-radius: 6px;
+ -moz-border-radius-topleft: 6px;
+ -moz-border-radius-topright: 6px;
+ border-top-left-radius: 6px;
+ border-top-right-radius: 6px;
+}
+.nux-intro .nux-in h3 .dashicons {
+ float: right;
+ color: #658435;
+ font-size: 1.25em;
+ padding-left: 0;
+}
+.nux-intro .nux-in h3 .dashicons:hover {
+ color: #57722e;
+}
+.nux-intro .nux-in p {
+ font-size: .9em;
+ line-height: 150%;
+ margin: 0;
+ text-align: left;
+ color: #686f72;
+}
+.nux-intro .nux-in .j-row {
+ border-bottom: 1px #f9f9f9 solid;
+ padding: 5px 0;
+ position: relative;
+ min-height: 70px;
+}
+.nux-intro .nux-in .j-row:hover {
+ background: #e0e0e0;
+}
+.nux-intro .nux-in .unavailable {
+ opacity: 0.5;
+}
+.nux-intro .nux-in .unavailable .act {
display: none;
- position: fixed;
- opacity: .35;
- bottom: -200px;
+}
+.nux-intro .nux-in .paid {
+ top: 4px;
+ margin-left: 12px;
+}
+.nux-intro .nux-in .dashicons {
+ color: #81a844;
+ font-size: 1em;
+ position: relative;
+ top: 3px;
+ padding-left: 6px;
+}
+.nux-intro .nux-in .dashicons:hover {
+ color: #57722e;
+}
+.nux-intro .nux-in .dashicons-external {
+ font-size: 1.5em;
+ top: 2px;
+ padding-left: 3px;
+}
+.nux-intro .nux-in .lmore {
+ font-size: 11px;
+ color: #81a844;
+}
+.nux-intro .nux-in .lmore:hover {
+ color: #57722e;
+}
+.nux-intro .feat.j-col {
+ padding: 10px 2px 10px 10px;
+}
+.nux-intro .feat .dashicons {
+ display: none;
+}
+.nux-intro .activated .feat .dashicons {
+ display: inline-block;
+}
+.nux-intro .act {
+ position: absolute;
+ top: 50%;
+ -ms-transform: translate(0, -50%);
+ -webkit-transform: translate(0, -50%);
+ transform: translate(0, -50%);
+ right: 8px;
+ float: right;
+}
+.nux-intro .act.j-col {
+ padding: 5px;
+ text-align: right;
+}
+.nux-intro .module-action {
+ text-transform: uppercase;
+ font-size: .85em;
+ font-weight: 600;
+}
+.nux-intro .wpcom h3 {
+ background: #0087be;
+}
+.nux-intro .wpcom h3 .dashicons {
+ color: #00638b;
+}
+.nux-intro .wpcom h3 .dashicons:hover {
+ color: #005172;
+}
+.nux-intro .wpcom .j-col {
+ padding: 10px;
+}
+.nux-intro .wpcom .goto {
+ text-align: center;
+ padding: 1em;
+}
+.nux-intro .wpcom .goto:hover {
+ background: #ececec;
+}
+.nux-intro .wpcom .goto .j-col {
+ padding: 0 5px;
+}
+.nux-intro .wpcom .goto a {
+ width: 100%;
+ padding: .25em;
+ height: auto;
+}
+.nux-intro .wpcom .goto .button {
+ height: auto;
+ min-height: 28px;
+ line-height: 18px;
+ white-space: normal;
+ max-width: 200px;
+ margin-bottom: 0;
+ padding-top: 4px;
+ padding-bottom: 5px;
+}
+.nux-intro .wpcom .goto .feat {
+ position: absolute;
+ top: 50%;
+ -ms-transform: translate(0, -50%);
+ -webkit-transform: translate(0, -50%);
+ transform: translate(0, -50%);
+}
+.nux-intro .nux-foot .j-col {
+ padding: 1em;
+}
+
+.nux-foot {
+ margin-top: 2em;
+ background: #ececec;
+ border-radius: 6px;
+}
+.nux-foot .j-col {
+ min-height: 75px;
+ padding: 1em;
+}
+@media (max-width: 650px) {
+ .nux-foot .j-col {
+ width: 100%;
+ }
+}
+.nux-foot .j-col + .j-col {
+ border-left: 1px #f9f9f9 solid;
+}
+@media (max-width: 650px) {
+ .nux-foot .j-col + .j-col {
+ border-left: none;
+ border-top: 1px #f9f9f9 solid;
+ }
+}
+.nux-foot .actions {
+ margin-top: 1em;
+}
+.nux-foot a {
+ text-decoration: underline;
+}
+.nux-foot img {
+ float: right;
+ margin-left: 1em;
+ width: 75px;
+ border-radius: 4px;
+}
+.nux-foot p {
+ font-size: .9em;
+ text-align: left;
+ font-weight: 600;
+ margin-top: 0;
+}
+.nux-foot p + p {
+ font-weight: 400;
+ margin-bottom: 0;
+}
+.nux-foot ul {
+ font-size: .9em;
+ margin-bottom: 0;
+}
+.nux-foot ul li {
+ margin-right: .875em;
+ margin-bottom: 0;
+ line-height: 175%;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.form-toggle[type="checkbox"] {
+ opacity: 0;
+ position: absolute;
+}
+
+.form-toggle__switch {
+ position: relative;
+ display: inline-block;
+ border-radius: 12px;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 2px;
+ width: 40px;
+ height: 24px;
+ background: #b9b9b9;
+ vertical-align: middle;
+ outline: 0;
+ cursor: pointer;
+ transition: all .4s ease;
+}
+.form-toggle__switch:before, .form-toggle__switch:after {
+ position: relative;
+ display: block;
+ content: "";
+ width: 20px;
+ height: 20px;
+}
+.form-toggle__switch:after {
left: 0;
- z-index: 1;
- -webkit-animation: miguel 3.4s 0s ease-in-out;
- animation: miguel 3.4s 0s ease-in-out;
+ border-radius: 50%;
+ background: #fff;
+ transition: all .2s ease;
+}
+.form-toggle__switch:before {
+ display: none;
+}
+.form-toggle__switch:hover {
+ background: #bdd597;
}
-.miguel:nth-child(2) {
- left: 49%;
- width: 120px;
- height: 131px;
- -webkit-animation-duration: 2.4s;
- animation-duration: 2.4s;
- -webkit-animation-delay: 0s;
- animation-delay: 0s;
+.form-toggle__label {
+ cursor: pointer;
}
-.miguel:nth-child(3) {
- left: 23%;
- width: 60px;
- height: 66px;
- -webkit-animation-duration: 4.5s;
- animation-duration: 4.5s;
- -webkit-animation-delay: 0s;
- animation-delay: 0s;
+.plugin-action__label {
+ padding-right: 5px;
+ top: -1px;
+ position: relative;
+ color: #8e9598;
}
-@-webkit-keyframes "miguel" {
- 0% {
- -webkit-transform: translate3d(0px, 0px, 0px);
- transform: translate3d(0px, 0px, 0px);
- }
- 100% {
- -webkit-transform: translate3d(900px, -900px, 0px);
- transform: translate3d(900px, -900px, 0px);
- }
+.activated .plugin-action__label {
+ color: #81a844;
}
-@keyframes "miguel" {
- 0% {
- -webkit-transform: translate3d(0px, 0px, 0px);
- transform: translate3d(0px, 0px, 0px);
- }
- 100% {
- -webkit-transform: translate3d(900px, -900px, 0px);
- transform: translate3d(900px, -900px, 0px);
- }
+
+.form-toggle:focus + .form-toggle__label .form-toggle__switch,
+.form-toggle:focus:checked + .form-toggle__label .form-toggle__switch {
+ box-shadow: 0 0 0 2px #0087be;
+}
+
+.form-toggle:checked + .form-toggle__label .form-toggle__switch {
+ background: #81a844;
+}
+.form-toggle:checked + .form-toggle__label .form-toggle__switch:after {
+ left: 16px;
+}
+
+.form-toggle:checked:hover + .form-toggle__label .form-toggle__switch {
+ background: #bdd597;
+}
+
+.form-toggle:disabled + .form-toggle__label .form-toggle__switch,
+.form-toggle:disabled:hover + .form-toggle__label .form-toggle__switch {
+ background: #e9eff3;
+}
+
+.form-toggle.is-toggling + .form-toggle__label .form-toggle__switch {
+ background: #81a844;
+}
+
+.form-toggle.is-toggling:checked + .form-toggle__label .form-toggle__switch {
+ background: #bdd597;
+}
+
+.form-toggle.is-compact + .form-toggle__label .form-toggle__switch {
+ border-radius: 8px;
+ width: 24px;
+ height: 16px;
+}
+.form-toggle.is-compact + .form-toggle__label .form-toggle__switch:before, .form-toggle.is-compact + .form-toggle__label .form-toggle__switch:after {
+ width: 12px;
+ height: 12px;
+}
+
+.form-toggle.is-compact:checked + .form-toggle__label .form-toggle__switch:after {
+ left: 8px;
}
+
@media (max-width: 1147px) {
.jp-content .landing {
padding: 0 2em;
@@ -2854,6 +3414,53 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.jp-content .footer {
padding-top: 1.5em;
}
+
+ .nux-intro .main-col {
+ width: 50%;
+ margin-bottom: 2em;
+ }
+ .nux-intro .main-col.wpcom {
+ width: 100%;
+ }
+ .nux-intro .main-col + .main-col {
+ padding-right: 0;
+ }
+ .nux-intro .wpcom {
+ padding: 0;
+ }
+ .nux-intro .wpcom .j-row {
+ width: 50%;
+ float: left;
+ border-bottom: 1px #f9f9f9 solid;
+ border-right: 1px #f9f9f9 solid;
+ }
+ .nux-intro .wpcom .j-row:last-of-type {
+ width: 100%;
+ float: none;
+ clear: both;
+ border: none;
+ border-top: 1px #f9f9f9 solid;
+ position: relative;
+ top: -1px;
+ }
+ .nux-intro .wpcom .goto .feat a {
+ float: left;
+ }
+
+ .nux-foot .j-col {
+ border: none;
+ }
+}
+@media (max-width: 900px) {
+ .nux-intro .main-col {
+ width: 100%;
+ padding: 0;
+ margin-bottom: 2em;
+ }
+ .nux-intro .wpcom .j-row {
+ width: 100%;
+ float: none;
+ }
}
@media (max-width: 782px) {
#jumpstart-cta .button-primary {
@@ -2864,6 +3471,14 @@ ul#adminmenu a.toplevel_page_jetpack:after {
background-position: 50% 35%;
}
}
+@media (max-width: 600px) {
+ .nux-intro h1 {
+ font-size: 1.75em;
+ }
+ .nux-intro p {
+ font-size: 1em;
+ }
+}
@media (max-width: 530px) {
.jp-content .landing {
padding: 0 .5em;
diff --git a/plugins/jetpack/css/jetpack-admin.css.map b/plugins/jetpack/css/jetpack-admin.css.map
index d3857a2c..d61736ac 100644
--- a/plugins/jetpack/css/jetpack-admin.css.map
+++ b/plugins/jetpack/css/jetpack-admin.css.map
@@ -1 +1 @@
-{"version":3,"sources":["../scss/_utilities/_grid.scss","jetpack-admin.css","../scss/_utilities/mixins/_breakpoint.scss","../scss/atoms/typography/_typography.scss","../scss/atoms/typography/_variables.scss","../scss/atoms/_media.scss","../scss/atoms/_animations.scss","../scss/atoms/_buttons.scss","../scss/atoms/icons/_automatticons.scss","../scss/atoms/icons/_jetpack.scss","../scss/molecules/_nav-horizontal.scss","../scss/templates/_main.scss","../scss/atoms/colors/_colors.scss","../scss/templates/_settings.scss","../scss/pages/_protect.scss","../scss/templates/_module-overhaul.scss","../scss/_utilities/_clearings.scss"],"names":[],"mappings":"AAKA;;;GCFE;ADKD;EAEC,aAAY;EACZ,gBAAc;ECJf;ADOA;EACC,cAAW;ECLX,gBAAe;EAChB;ADQD;EACC,aAAS;ECNT;;AAED;EACE,iBAAgB;EAChB,aAAY;EDSd,aAAA;EACC,oBAAS;ECPT;;AAED;EDMC;IAAU,iBAAgB;ICHxB;;EDIF;IAAU,kBAAU;ICAlB;;EDCF;IAAU,YAAO;ICGf;;EDFF;IAAU,kBAAgB;ICMxB;;EDLF;IAAU,kBAAU;ICSlB;;EDRF;IAAU,YAAO;ICYf;;EDXF;IAAU,kBAAgB;ICexB;;EDdF;IAAU,kBAAU;ICkBlB;;EDjBF;IAAU,YAAO;ICqBf;;EDpBF;IAAU,kBAAgB;ICwBxB;;EDvBF;IAAU,kBAAW;IC2BnB;;EC1BA;IFKF,aAAS;ICyBP;EACF;AACD;ED1BC;IAAU,iBAAgB;IC6BxB;;ED5BF;IAAU,kBAAU;ICgClB;;ED/BF;IAAU,YAAO;ICmCf;;EDlCF;IAAU,kBAAgB;ICsCxB;;EDrCF;IAA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;IACC,iBAAc;Idm/Eb;;Ec/+ED;IACC,gBAAe;Idk/Ef;;Ec9+EF;IACC,kBAAiB;Idi/EhB;;EAED;Ic/+ED,mBAAA;IACC,sBAAQ;Idi/EP;;Ee3vFF;IACC,UAAW;IACX;Ef8vFD;Ae5vFA;EACC,aAAW;Ef8vFX,gBAAe;EAChB;AACD;EACE,aAAY;EACb","file":"jetpack-admin.css"} \ No newline at end of file
+{"version":3,"sources":["../scss/_utilities/_grid.scss","jetpack-admin.css","../scss/_utilities/mixins/_breakpoint.scss","../scss/atoms/typography/_typography.scss","../scss/atoms/typography/_variables.scss","../scss/atoms/_media.scss","../scss/atoms/_animations.scss","../scss/atoms/_buttons.scss","../scss/atoms/icons/_automatticons.scss","../scss/atoms/icons/_jetpack.scss","../scss/molecules/_nav-horizontal.scss","../scss/templates/_main.scss","../scss/atoms/colors/_colors.scss","../scss/templates/_settings.scss","../scss/pages/_protect.scss","../scss/pages/_connection.scss","../scss/pages/_manage.scss","../scss/templates/_nux-landing-2015.scss","../scss/_utilities/_clearings.scss"],"names":[],"mappings":"AAKA;;;GCFE;ADKD;EAEC,aAAY;EACZ,gBAAc;ECJf;ADOA;EACC,cAAW;ECLX,gBAAe;EAChB;ADQD;EACC,aAAS;ECNT;;AAED;EACE,iBAAgB;EAChB,aAAY;EDSd,aAAA;EACC,oBAAS;ECPT;;AAED;EDMC;IAAU,iBAAgB;ICHxB;;EDIF;IAAU,kBAAU;ICAlB;;EDCF;IAAU,YAAO;ICGf;;EDFF;IAAU,kBAAgB;ICMxB;;EDLF;IAAU,kBAAU;ICSlB;;EDRF;IAAU,YAAO;ICYf;;EDXF;IAAU,kBAAgB;ICexB;;EDdF;IAAU,kBAAU;ICkBlB;;EDjBF;IAAU,YAAO;ICqBf;;EDpBF;IAAU,kBAAgB;ICwBxB;;EDvBF;IAAU,kBAAW;IC2BnB;;EC1BA;IFKF,aAAS;ICyBP;EACF;AACD;ED1BC;IAAU,iBAAgB;IC6BxB;;ED5BF;I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ACD;EACE;IgBvsFC,aAAA;IACC,YAAW;IACX,oBAAW;IhBysFZ;EACD;ICvyGC,aAAA;IesmBF,aAAA;IhBosFE;EACF;AACD;EgBlsFC;IACC,sBAAqB;IhBosFpB;;EC/yGA;IemnBD,8BAAG;IhBgsFF;EACF;AACD;EACE;IACE,mBAAkB;IACnB;ECxzGA;IegoBD,gBAAA;IhB2rFC;EACF;AACD;EgBxrFC;IACC,iBAAc;IhB0rFb;;EgBtrFD;IACC,gBAAe;IhByrFf;;EgBrrFF;IACC,kBAAiB;IhBwrFhB;;EAED;IgBtrFD,mBAAA;IACC,sBAAQ;IhBwrFP;;EiBj2GF;IACC,UAAW;IACX;EjBo2GD;AiBl2GA;EACC,aAAW;EjBo2GX,gBAAe;EAChB;AACD;EACE,aAAY;EACb","file":"jetpack-admin.css"} \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin.min.css b/plugins/jetpack/css/jetpack-admin.min.css
index d69738be..06a1ddf9 100644
--- a/plugins/jetpack/css/jetpack-admin.min.css
+++ b/plugins/jetpack/css/jetpack-admin.min.css
@@ -1,3 +1,3 @@
-.j-row{width:100%;margin:0 auto}.j-row:before,.j-row:after{content:" ";display:table}.j-row:after{clear:both}.j-col{padding:0.85em;width:100%;float:left;position:relative}@media only screen{.j-sm-1{width:8.33333%}.j-sm-2{width:16.66667%}.j-sm-3{width:25%}.j-sm-4{width:33.33333%}.j-sm-5{width:41.66667%}.j-sm-6{width:50%}.j-sm-7{width:58.33333%}.j-sm-8{width:66.66667%}.j-sm-9{width:75%}.j-sm-10{width:83.33333%}.j-sm-11{width:91.66667%}.j-sm-12{width:100%}}@media (min-width: 530px){.j-md-1{width:8.33333%}.j-md-2{width:16.66667%}.j-md-3{width:25%}.j-md-4{width:33.33333%}.j-md-5{width:41.66667%}.j-md-6{width:50%}.j-md-7{width:58.33333%}.j-md-8{width:66.66667%}.j-md-9{width:75%}.j-md-10{width:83.33333%}.j-md-11{width:91.66667%}.j-md-12{width:100%}}@media (min-width: 782px){.j-lrg-1{width:8.33333%}.j-lrg-2{width:16.66667%}.j-lrg-3{width:25%}.j-lrg-4{width:33.33333%}.j-lrg-5{width:41.66667%}.j-lrg-6{width:50%}.j-lrg-7{width:58.33333%}.j-lrg-8{width:66.66667%}.j-lrg-9{width:75%}.j-lrg-10{width:83.33333%}.j-lrg-11{width:91.66667%}.j-lrg-12{width:100%}}body,button,input,select,textarea{color:#222;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{color:#222;clear:both}a{color:#0d72b2;transition:color .2s;text-decoration:none}a:visited{color:#0d72b2}a:hover{color:#0f92e5}a:focus{outline:thin dotted}address{margin:0 0 1.5em}abbr[title],acronym{cursor:help}ins{background:#eee;text-decoration:none}dt{font-weight:700}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}@-webkit-keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}@keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}.button,.download-jetpack{transition:all .1s ease-in-out}.jp-button,.jp-button--settings{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#efefef;font:800 0.9285714286em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 1px 1px rgba(0,0,0,0.2);background:#6f7476;border-radius:3px}.jp-button:visited,.jp-button--settings:visited{color:#efefef}.jp-button:hover,.jp-button--settings:hover,.jp-button:focus,.jp-button--settings:focus{color:#fff;background:#57972d}.jp-button:active,.jp-button--settings:active{background:#57972d;opacity:0.8}.jp-button--settings{background:#93b45f;color:#e8eedf}.jp-button--settings:visited{color:#e8eedf}.jp-button--settings:hover,.jp-button--settings:focus{background:#9fbd72;color:#fff}.jp-button--settings.current{background:#3c6621;color:#fff;box-shadow:inset 0 2px 0 #365A1F, inset 0 1px 3px #3c6621}.download-jetpack{display:inline-block;position:relative;padding:0.64286em 0.85714em 0.53571em;color:#fff;font:400 20px/1 "proxima-nova", 'Open Sans', Helvetica, sans-serif;background:#518d2a;z-index:3;border-radius:6px;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:visited{color:#fff}.download-jetpack:hover,.download-jetpack:focus{color:#fff;background:#57972d;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:active{top:6px;box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.4)}.download-jetpack:active:after{top:-6px}.download-jetpack:before{content:'';display:inline-block;position:relative;top:-2px;margin-right:13px;width:30px;height:30px;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%}.download-jetpack:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}@media (max-width: 1147px){.download-jetpack{font-size:1.28571em}.download-jetpack:before{top:-1px;width:23px;height:23px}}@media (max-width: 900px){.download-jetpack:active{top:0}}@media (max-width: 530px){.download-jetpack{font-size:1.21429em;font-weight:600}.download-jetpack:before{width:19px;height:19px;margin-right:9px}}#searchsubmit{display:inline-block;border:none;position:relative;padding:0.71429em 1.5em;color:#efefef;font:800 0.8em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 1px 1px rgba(0,0,0,0.2);background:#6f7476;outline:none;border-radius:3px}#searchsubmit:visited{color:#efefef}#searchsubmit:hover,#searchsubmit:focus{color:#fff;background:#2aa0d5}#searchsubmit:active{opacity:0.7}@font-face{font-family:'automatticons';src:url("../_inc/fonts/automatticons/automatticons.eot");src:url("../_inc/fonts/automatticons/automatticons.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/automatticons/automatticons.woff") format("woff"),url("../_inc/fonts/automatticons/automatticons.ttf") format("truetype"),url("../_inc/fonts/automatticons/automatticons.svg#automatticonsregular") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.eot");src:url("../_inc/fonts/jetpack/jetpack.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/jetpack/jetpack.woff") format("woff"),url("../_inc/fonts/jetpack/jetpack.ttf") format("truetype"),url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg");font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio: 0){@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg")}}.nav-horizontal a{display:inline-block}.nav-horizontal li{position:relative;float:left}.nav-horizontal ul{margin:0;padding:0}*,*:before,*:after{-moz-box-sizing:border-box;box-sizing:border-box}::-moz-selection{background:#91bd51;color:#fff;text-shadow:none}::selection{background:#91bd51;color:#fff;text-shadow:none}#wpbody-content{padding-bottom:0}#wpcontent{margin-left:160px;padding:0}ul#adminmenu a.toplevel_page_jetpack:after{border-right-color:#81a844}.folded #wpcontent{margin-left:36px}#wpfooter{display:none}.jp-content{background:#f9f9f9;margin:0;height:auto;min-height:100%;width:100%;width:100%;-webkit-font-smoothing:antialiased}.jp-content .wrapper{background:#f9f9f9}@media (max-width: 900px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-left:36px;padding-left:0}}@media (max-width: 782px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-left:0}}@media (max-width: 782px){.configure .frame.top.fixed{padding-left:0}}.wrap.inner,.page-content{max-width:950px;margin:0 auto}.wrap.inner li,.page-content li{line-height:23px}@media (max-width: 530px){.page-content{margin-top:0}}@media (max-width: 1147px){.wrap.inner{background:#f9f9f9;padding:15px}}@media (max-width: 530px){.wrap.inner{margin-top:1.71429em}}.jetpack_page_jetpack_modules .header-nav{margin:0}.jetpack_page_jetpack_modules .page-content{max-width:1200px;min-height:500px;margin:0}.page-content.about{position:relative;z-index:10}@media (max-width: 1147px){.page-content.about{background:#f9f9f9;padding:15px}}@media (max-width: 1147px){.page-content.configure{background:#f9f9f9}}.footer nav{max-width:550px;margin:0 auto}.header{left:0;right:0;background:#81a844}.header-nav li{line-height:60px}.header-nav a{padding:0 0.71429em;line-height:24px}.header-nav .jetpack-logo a{display:inline-block;position:relative;width:214px;margin-right:6px;background:url(../images/jetpack-logo.png) center center no-repeat;background:url(../images/jetpack-logo.svg) center center no-repeat,none;background-size:183px auto;color:#fff;line-height:60px;font-weight:normal}.header-nav .jetpack-logo a span{text-indent:-9999px;visibility:hidden}.header-nav .jetpack-logo a:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-size:183px 32px}.header-nav .jetpack-modules+.jetpack-modules{margin-left:15px}.main-nav{float:left}.main-nav li{margin:0}@media (max-width: 900px){.main-nav{font-size:13px}}.user-nav{float:right}.user-nav li{margin:0}.jetpack-pagestyles #screen-meta{margin:0}.jetpack-pagestyles #screen-meta-links .screen-meta-toggle{z-index:2}.jetpack-pagestyles #screen-options-link-wrap,.jetpack-pagestyles #contextual-help-link-wrap{border:none}.jetpack-pagestyles .update-nag{display:none}.masthead{position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #8eb74e)}.masthead.hasbutton .flyer{bottom:-270px}.masthead.hasbutton .subhead{margin-top:175px}@media (max-width: 530px){.masthead.hasbutton .subhead{margin-top:105px;padding:0}}.masthead h1,.masthead h2{margin:0 auto}.masthead h1{padding:2.5em 0 1.11111em;max-width:21.94444em;color:#fff;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;text-shadow:0 1px 1px rgba(0,0,0,0.12);z-index:3}.masthead h1+.flyby{margin-top:180px}@media (max-width: 1147px){.masthead h1{padding-top:1.83333em;font-size:2.14286em}}@media (max-width: 782px){.masthead h1{max-width:600px;font-size:28px}}@media (max-width: 530px){.masthead h1{margin:0 15px;padding:31px 0 15px 0;font-size:21px;font-weight:400}}.jetpack-connected .masthead h1{margin-bottom:33px;max-width:600px}.flyby{position:relative;max-width:1200px;margin:0 auto}@media (max-width: 900px){.flyby{display:none}}.flyer{position:absolute;bottom:-200px;left:4%;z-index:1;-webkit-animation:flyer 3.4s 2s ease-in-out;animation:flyer 3.4s 2s ease-in-out}.flyer:nth-child(2){left:49%;width:120px;height:131px;-webkit-animation-delay:4.6s;animation-delay:4.6s;-webkit-animation-duration:2.4s;animation-duration:2.4s}.flyer:nth-child(3){left:23%;width:60px;height:66px;-webkit-animation-delay:5.8s;animation-delay:5.8s;-webkit-animation-duration:4.5s;animation-duration:4.5s}.subhead{position:relative;margin-top:105px;padding:4em 0;background:#f9f9f9;z-index:2}.subhead h2{max-width:460px;color:#5d6d74;font:400 1.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 900px){.subhead h2{max-width:428px;font-size:20px}}@media (max-width: 530px){.subhead h2{display:none}}.subhead:after{content:'';position:absolute;bottom:100%;left:0;margin-bottom:-1px;width:100%;height:228px;background:url("../images/the-cloud.svg") center bottom repeat-x;pointer-events:none;z-index:-1}@media (max-width: 1147px){.subhead{margin-top:122px;padding:70px 0 49px}.subhead:after{background-size:160% auto}}@media (max-width: 900px){.subhead{margin-top:122px;padding:70px 0 49px}}@media (max-width: 530px){.subhead{margin-top:83px;padding:47px 15px 39px}}.clouds-sm{height:100px;position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #89b348)}.clouds-sm:after{content:'';position:absolute;bottom:0;left:0;margin-bottom:-1px;width:100%;height:137px;background:url("../images/the-cloud-sm.svg") center bottom repeat-x;pointer-events:none;z-index:2}@media (max-width: 530px){.clouds-sm{height:90px}}.featured{border-top:1px solid #d6d6d6;border-bottom:1px solid #d6d6d6;background:#fff;position:relative;padding:2.0em 1em 4.6em 1em;text-align:center;z-index:1}.featured:before{content:"";display:block;position:absolute;top:0;height:100%;z-index:-1}.featured .features,.featured .modules{margin:0 auto;display:inline-block}@media (max-width: 530px){.featured{display:none}}.featured h2,.module-grid h2{margin-top:1em;color:#5d6d74;font:300 2em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-align:center}@media (max-width: 900px){.featured h2,.module-grid h2{font-size:30px}}@media (max-width: 782px){.featured h2,.module-grid h2{font-size:28px}}.features,.modules{margin:0 -5px}.feature,.module{position:relative;float:left;margin:0 5px 10px;width:310px;transition:all .2s ease-in-out}@media (max-width: 1147px){.feature,.module{margin:.75% 0 .75% 1.5%;width:32.333333%;transition:none}.feature:nth-child(3n+1),.module:nth-child(3n+1){margin-left:0}.feature:hover,.module:hover{top:0;box-shadow:none}}.feature{-webkit-transform:translateZ(0);transform:translateZ(0)}.feature h3{margin:0 0 0.58824em;color:#697b84;font-size:1.21429em;line-height:1em;font-weight:800}.feature p{margin:0;color:#6e818a}.feature:before{content:'';position:absolute;bottom:0;left:0;width:100%;height:10px;background:rgba(0,0,0,0.02);z-index:-1;-webkit-transform:translateZ(0);transform:translateZ(0);transition:all .2s ease-in-out}.feature:hover{-webkit-transform:translateY(-5px);-ms-transform:translateY(-5px);transform:translateY(-5px)}.feature:hover h3{color:#1a8dba}.feature:hover .feature-img{border:1px solid #ccc;border-bottom:none}.feature:hover .no-border{border:none}.feature:hover:before{-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px)}@media (max-width: 1147px){.feature:hover h3{color:#6e818a}.feature:hover .feature-img{border:1px solid #ddd;border-bottom:none}.feature:hover .no-border{border:none}}.feature .feature-img{padding-top:52%;width:100%;height:auto;border:1px solid #ddd;border-bottom:none}.feature .feature-img.custom-css{background:url("../images/custom-css.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.custom-css{background-image:url("../images/custom-css@2x.jpg")}}.feature .feature-img.wordpress-connect{background:url("../images/wordpress-connect.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-connect{background-image:url("../images/wordpress-connect@2x.jpg")}}.feature .feature-img.wordpress-stats{background:url("../images/wordpress-stats.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-stats{background-image:url("../images/wordpress-stats@2x.jpg")}}.feature .feature-img.no-border{border:none;padding-bottom:1px}.feature-description{display:block;padding:1em 1.07143em 1.07143em;border:1px solid #ddd;background:#f5f5f5}.feature:hover .feature-description{background:#fff;border-color:#ccc}@media (max-width: 1147px){.feature:hover .feature-description{border:1px solid #ddd;background:#f5f5f5}}@media (max-width: 900px){.feature-description{min-height:115px}}.cat{clear:both;margin-bottom:23px}.cat h3{font-size:24px;font-weight:300;margin:0 0 13px 6px;text-align:left}.cat .clear{clear:both}.module-grid{text-align:center}.module-grid h2{margin:1em 0}@media (max-width: 530px){.module-grid h2{padding-top:16px;margin-top:0;font-size:25px}}#module-search{position:relative;width:100%;max-width:40.71429em;margin:0 auto 1.07143em;overflow:hidden}#jetpack-search{margin:0;padding:11px 16px 11px 16px;width:100%;border:1px solid #c9ced0;border-radius:3px;background:#fff;color:#5c6671;line-height:1.3}#jetpack-search:focus{color:#5c6671;outline:none}#jetpack-search:focus+label{background:transparent;opacity:0}#jetpack-search::-webkit-input-placeholder{color:#a8acae}#jetpack-search :-moz-placeholder{color:#a8acae}#jetpack-search::-moz-placeholder{color:#a8acae}#jetpack-search:-ms-input-placeholder{color:#a8acae}#jetpack-search+label{position:absolute;top:1px;right:1px;bottom:1px;width:48px;color:#abafb1;text-indent:-9999px;pointer-events:none;border-radius:3px;transition:all .2s ease-in-out}#jetpack-search+label:after{content:'\f400';position:absolute;right:11px;text-align:right;top:4px;font-size:1.71429em;font-weight:normal;font-family:"genericons"}.jp-filter{margin-bottom:2.85714em;color:#6f7476}.jp-filter a{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#aaa;font:600 0.92857em/1 "Open Sans", Helvetica, Arial, sans-serif;text-shadow:0 1px 1px rgba(255,255,255,0.2);background:#eee;border-radius:3px;background-clip:padding-box}.jp-filter a.selected,.jp-filter a:hover,.jp-filter a:focus{color:#efefef;text-shadow:0 1px 1px rgba(0,0,0,0.2);background:#6f7476}@media (max-width: 530px){.jp-filter a{padding:0.76em 1em}}.module{display:block;padding:0.71429em 1.07143em 1em;text-align:left;border:1px solid #dae0e2;background:#fff;box-shadow:0 0 0 rgba(0,0,0,0.03);transition:opacity 2s ease-in}.module:hover{border-color:#8ac9e8;background:#f8fcfe}.module h3{cursor:pointer;margin:0 0 0.5em;color:#1a8dba;font-size:1.14286em;line-height:1.4em;font-weight:700}.module p{margin:0;color:#686f72;font-size:0.85714em}.module:hover,.module:focus{border-color:#8ac9e8;background:#f8fcfe}.module.active{border-color:#2ea2cc;box-shadow:inset 4px 0 0 #2ea2cc}.module.active:hover{border-color:#69bedd;box-shadow:inset 4px 0 0 #69bedd}@media (max-width: 1147px){.cat .module:nth-child(3n+1){margin:.75% 0 .75% 1.5%}.cat .module:nth-child(3n - 1){margin-left:0}}@media (max-width: 900px){.cat .module{margin:1% 0 1% 2%}.cat .module:nth-child(2n+1){margin:1% 0 1% 2%}.cat .module:nth-child(2n+0){margin-left:0}}@media (max-width: 530px){.cat .module{margin:5px 0}.cat .module:nth-child(2n+1){margin-left:0}.cat .module:nth-child(2n+0){margin-left:0}}@media (max-width: 900px){.module{margin:1% 0 1% 2%;width:49%}.module:nth-child(3n+1){margin-left:2%}.module:nth-child(2n+1){margin-left:0}}@media (max-width: 530px){.module{margin:5px 0;width:100%}.module:nth-child(3n+1){margin-left:0}.module:nth-child(2n+1){margin-left:0}}.new{position:relative}.new:after{content:'NEW';position:absolute;top:-8px;right:-8px;padding-top:10px;width:32px;height:32px;color:#fff;font-size:8px;font-weight:800;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background:url("../images/new-badge.svg") center center no-repeat;background-size:100%;border-radius:50%}.paid{display:inline-block;position:relative;top:5px;margin-left:10px;padding:1px 6px 0 4px;height:13px;color:#fff;font:700 10px/1 "Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 0 rgba(0,0,0,0.05);background:#d0d0d0;vertical-align:top}.paid:before,.paid:after{position:absolute;top:0;right:100%;font:normal 14px/14px "genericons"}.paid:before{content:'\f503';color:#d0d0d0;text-shadow:none}.paid:after{content:'\f428';margin-right:-5px;font-size:11px}.rtl .paid:before{content:'\f501'}.load-more{margin:2.71429em 0 6.15385em}.set{display:none}.show.set{display:block}.loading{bottom:50%;position:absolute;top:50%;width:100%}.loading span{color:#999}.modal{background:#fff;position:fixed;top:52px;bottom:20px;right:20px;left:20px;margin-left:160px;display:none;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1);z-index:500}.modal .close{position:absolute;top:0;right:0;font:300 1.71429em "genericons" !important;color:#777;content:'\f405';display:inline-block;padding:0.28571em 0.71429em 0.42857em;z-index:5}.modal .close:hover{background:#eee;opacity:0.8}.modal .close:active{background:#eee;opacity:0.4}.modal #jp-post-flair{display:none}.modal .content-container{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto;padding:2.14286em}.modal .content{margin:0 auto;max-width:900px;text-align:left}.modal h2{text-align:left;margin-top:0;color:#5d6d74;font:300 32px "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 530px){.modal h2{font-size:26px}}.modal h5{clear:left}.modal p{font-size:1.23077em}.modal footer{position:absolute;left:0;bottom:0;width:100%;padding:12px 20px;border-top:1px solid #ddd;background:#fff;text-align:right}.modal footer ul{margin:0}.modal footer li{display:inline-block;margin:0}.modal .button-secondary,.modal .button-primary:active{vertical-align:baseline}@media (max-width: 900px){.modal{bottom:5%;margin-left:36px;font-size:80%}.modal .content{top:38px}}@media (max-width: 782px){.modal{top:66px;margin-left:0}}@media (max-width: 600px){.modal{top:10px;right:10px;bottom:10px;left:10px}}.jp-info-img{float:right;margin:0 0 30px 30px}.jp-info-img img{border:1px solid #ddd;max-width:100%;height:auto}.jp-info-img img:first-child{margin-top:0}@media (max-width: 782px){.jp-info-img{float:none;margin:0 0 15px}}.content-container.modal-footer{bottom:53px}.shade{background:#000;bottom:0;cursor:pointer;display:none;left:0;opacity:0.2;position:fixed;right:0;top:0;z-index:11}.entry-title,.page-template-default h1{margin-top:0.61111em;color:#5d6d74;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 530px){.entry-title,.page-template-default h1{font-size:2em}}.blog h3,.single h3,.page-template-default h2{margin-top:0.61111em;color:#5d6d74;font:300 1.9em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 530px){.blog h3,.single h3,.page-template-default h2{font-size:1.4em}}.page-template-default p{line-height:1.71429em}.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{float:left;width:70%}.footer{margin-top:1.42857em;position:relative;padding:10em 0 4.28571em;text-align:center}.footer:before,.footer:after{content:'';position:absolute;left:0;pointer-events:none}.footer:before{top:0;margin-top:-1px;width:100%;height:195px}.footer:after{bottom:0;width:100%;height:50px;background:url("../images/the-footcloud.svg") center bottom no-repeat;background-size:auto 45px;z-index:1}.footer .download-jetpack{margin-bottom:33px}@media (max-width: 1147px){.footer{padding-top:165px;padding-bottom:0}.footer:before{background-size:160% auto}.footer:after{display:none}.footer ul{float:none;overflow:hidden}}@media (max-width: 900px){.footer{padding-top:146px}}@media (max-width: 782px){.footer{margin-top:0}}@media (max-width: 530px){.footer{margin-top:0;padding-top:135px}}@media (max-width: 320px){.footer{padding-top:76px}}.footer nav{max-width:100%}.footer nav a,.footer nav a:visited{padding:4px 6px;color:#999}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81A844}@media (max-width: 1147px){.footer nav{border:none;padding:0}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#fff}}@media (max-width: 530px){.footer nav li{display:block;float:none;margin:0;text-align:left}.footer nav a{display:block;padding:0 16px;line-height:44px}}.primary{padding:25px 15px 10px 15px;border-bottom:1px solid #eee}.secondary-footer{margin:0 auto}.secondary-footer li{margin-right:5px}@media (max-width: 1147px){.secondary-footer{margin:0 30px;padding:8px 15px 30px}}@media (max-width: 530px){.secondary-footer{margin:0;padding:0;border:none;font-weight:400}.secondary-footer a{border-top:1px solid #eee}}.footer .a8c-attribution{margin:0;padding:0 6px;color:#bbb;font-size:0.78571em;font-family:"Gill Sans","Gill Sans MT","Open Sans",Helvetica,Arial,sans-serif;text-transform:uppercase}.footer .a8c-attribution a{display:inline-block;position:relative;padding:4px 16px;right:9999px;outline:0}.footer .a8c-attribution a:after{content:'A';position:absolute;top:2px;right:-9999px;height:100%;color:#999;font-size:1.54545em;font-family:"automatticons";text-align:center}.footer .a8c-attribution a:hover:after{-webkit-animation:candy .4s ease-in-out;animation:candy .4s ease-in-out}.secondary{padding:10px 15px 0 15px}.jetpack-message{background:#8eb74e;border:1px solid #73963d;margin:33px auto 0;max-width:90%;position:relative;z-index:2}.jetpack-message.is-opt-in{margin:50px 0 0;max-width:100%;padding:10px 15px;background:#fff;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);font-size:13px;text-align:center}.subhead .jetpack-message.is-opt-in{margin:0;padding-bottom:0;background:transparent;box-shadow:none}.subhead .jetpack-message.is-opt-in .jp-button,.subhead .jetpack-message.is-opt-in .jp-button--settings{display:inline-block}.jetpack-message.is-opt-in p{color:#3c4549}.jetpack-message.is-opt-in .jp-button,.jetpack-message.is-opt-in .jp-button--settings{margin-top:15px;display:none}.jetpack-message h4{color:#fff;margin:0}.jetpack-message p{color:#fff;margin:0;opacity:0.7}.jetpack-message .squeezer{padding:23px 23px 23px 80px;position:relative;text-align:left}.jetpack-message .squeezer:before{color:#fff;content:'\f418';font-family:'Genericons';font-size:33px;height:33px;left:25px;opacity:0.6;position:absolute;top:23px;top:calc( 50% - 22px )}@media (max-width: 530px){.jetpack-message .squeezer{padding:23px}.jetpack-message .squeezer:before{display:none}}.jetpack-message .squeezer a{color:#FFF;border-bottom:1px solid #D5E4BD}.jetpack-message .squeezer a:hover{border-bottom:1px solid #F1F6E9}.jetpack-message.error .squeezer:before,.jetpack-message.jetpack-err .squeezer:before{content:'\f414'}.configure-module .jetpack-message{max-width:100%}.modules h3.icon,.jetpack-modules .info a{width:auto}.modules h3.icon:before,.jetpack-modules .info a:before{display:inline-block;position:relative;top:1px;left:-3px;margin-right:2px;opacity:0.8;font:normal 20px "genericons";vertical-align:top}.jetpack-modules .info a:before{margin-top:1px}.latex:before,.jetpack-modules #latex .info a:before{content:'\f408'}.carousel:before,.jetpack-modules #carousel .info a:before{content:'\f102'}.modules h3.contact-form:before,.jetpack-modules #contact-form .info a:before{content:'\f175';font:normal 20px "dashicons"}.modules h3.custom-css:before,.jetpack-modules #custom-css .info a:before{content:'\f100';font:normal 20px "dashicons"}.modules h3.enhanced-distribution:before,.jetpack-modules #enhanced-distribution .info a:before{content:'\f237';font:normal 20px "dashicons"}.modules h3.widgets:before,.jetpack-modules #widgets .info a:before{content:'\f116';font:normal 20px "dashicons"}.modules h3.gravatar-hovercards:before,.jetpack-modules #gravatar-hovercards .info a:before{content:'G';font-family:"automatticons"}.infinite-scroll:before,.jetpack-modules #infinite-scroll .info a:before{content:'\f408'}.comments:before,.jetpack-modules #comments .info a:before{content:'\f108'}.sso:before,.jetpack-modules #sso .info a:before{content:'\f205'}.json-api:before,.jetpack-modules #json-api .info a:before{content:'\f415'}.likes:before,.jetpack-modules #likes .info a:before{content:'\f408'}.markdown:before,.jetpack-modules #markdown .info a:before{content:'\f462'}.minileven:before,.jetpack-modules #minileven .info a:before{content:'\f453'}.manage:before,.jetpack-modules #manage .info a:before{content:'\f205'}.monitor:before,.jetpack-modules #monitor .info a:before{content:'\f468'}.notes:before,.jetpack-modules #notes .info a:before{content:'\f300'}.omnisearch:before,.jetpack-modules #omnisearch .info a:before{content:'\f400'}.photon:before,.jetpack-modules #photon .info a:before{content:'\f403'}.post-by-email:before,.jetpack-modules #post-by-email .info a:before{content:'\f410'}.protect:before,.jetpack-modules #protect .info a:before{content:'\f470';position:relative;top:-1px}.modules h3.publicize:before,.jetpack-modules #publicize .info a:before{content:'\f237';font:normal 20px "dashicons"}.related-posts:before,.jetpack-modules #related-posts .info a:before{content:'\f420'}.sharedaddy:before,.jetpack-modules #sharedaddy .info a:before{content:'\f415'}.shortcodes:before,.jetpack-modules #shortcodes .info a:before{content:'\f100'}.verification-tools:before,.jetpack-modules #verification-tools .info a:before{content:'\f425'}.after-the-deadline:before,.jetpack-modules #after-the-deadline .info a:before{content:'\f411'}.subscriptions:before,.jetpack-modules #subscriptions .info a:before{content:'\f410'}.tiled-gallery:before,.jetpack-modules #tiled-gallery .info a:before{content:'\f103'}.modules h3.vaultpress:before,.jetpack-modules #vaultpress .info a:before{content:'V';font-family:"automatticons"}.videopress:before,.jetpack-modules #videopress .info a:before{content:'\f104'}.modules h3.widget-visibility:before,.jetpack-modules #widget-visibility .info a:before{content:'\f116';font:normal 20px "dashicons"}.stats:before,.jetpack-modules #stats .info a:before{content:'\f205'}.shortlinks:before,.jetpack-modules #shortlinks .info a:before{content:'\f107'}.modules h3.custom-content-types:before,.jetpack-modules #custom-content-types .info a:before{content:'\f498';font:normal 20px "dashicons"}.modules h3.site-icon:before,.jetpack-modules #site-icon .info a:before{content:'\f475'}@media (max-width: 782px){.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{width:100%}}@media (max-width: 600px){.clouds-sm{display:none}}@media (max-width: 530px){.wrap.inner.jp-support .jp-support-column-left{width:100%}.wrap.inner.jp-support .jp-support-column-left .widget-text{margin-right:0;width:100%}.wrap.inner.jp-support .jp-support-column-right{width:100%}}@media screen and (max-width: 400px){.jp-frame .header-nav{padding-bottom:10px}.jp-frame .header-nav li{line-height:30px}.jp-frame .header-nav .jetpack-logo{width:100%;text-align:center}.jp-frame .header-nav .jetpack-modules{margin:0;width:50%;text-align:right;padding:0 5px}.jp-frame .header-nav .jetpack-modules+.jetpack-modules{text-align:left}}@media (max-width: 320px){.jetpack_page_jetpack_modules .wrap{padding:0 0 1em}}.page-content.configure{margin-top:0}.configure .frame.top{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}.configure .frame.top.fixed{background:#f9f9f9;border-bottom:1px solid #e9e9e9;padding-left:160px;margin-top:-6px;position:fixed;right:0;top:32px;width:100%;z-index:4;box-shadow:0 2px 2px -2px #eee}@media (max-width: 782px){.configure .frame.top.fixed{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}}@media (max-width: 600px){.configure .frame.top.fixed{top:0}}.configure .frame.top .tablenav.top{float:left}@media (max-width: 900px){.configure .frame.top .tablenav.top .actions{display:block}}@media (max-width: 782px){.configure .frame.top .tablenav.top .actions{margin-top:6px}}.jp-frame-top-fixed .configure{padding-top:94px}.filter-search{display:none;float:right;margin-top:10px}@media (max-width: 782px){.filter-search{display:block}}@media (max-width: 530px){.filter-search{display:none}}.module-actions.landing-page{float:right;margin-right:15px}.module-actions.landing-page a{font-size:0.6em}.table-bordered.jetpack-modules{border:none;margin-bottom:0}.table-bordered.jetpack-modules tr.jetpack-module th{border-left:0;padding:14px 4px 0}.table-bordered.jetpack-modules tr.jetpack-module th input{display:block}.table-bordered.jetpack-modules tr.jetpack-module:hover .genericon{display:inline-block}.table-bordered.jetpack-modules tr.jetpack-module:hover td .row-actions span a{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.active th,.table-bordered.jetpack-modules tr.jetpack-module.active td{background:#f7fcfe}.table-bordered.jetpack-modules tr.jetpack-module.active th{border-left:4px solid #2ea2cc;padding-left:0px}.table-bordered.jetpack-modules tr.jetpack-module.active td:first-child{border-left:4px solid #2ea2cc}.table-bordered.jetpack-modules tr.jetpack-module.unavailable{opacity:0.3}.table-bordered.jetpack-modules tr.jetpack-module.unavailable input{display:none}.table-bordered.jetpack-modules tr.jetpack-module#vaultpress{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module th,.table-bordered.jetpack-modules tr.jetpack-module td{background:#fff;margin:0;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1)}.table-bordered.jetpack-modules tr.jetpack-module td{padding:10px 10px 8px 14px;line-height:25px}.table-bordered.jetpack-modules tr.jetpack-module td:first-child{border-left:4px solid #fff}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{float:right;padding:0 0 1px;visibility:visible}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span{margin-left:5px}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a{opacity:0}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a:focus{opacity:1}@media (max-width: 530px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}}@media (max-width: 782px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:block;padding-left:10px;visibility:visible}}.table-bordered.jetpack-modules>thead>tr>th{border:0;vertical-align:middle}.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-right:0}@media (max-width: 782px){.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-left:0}}.table-bordered.jetpack-modules td{background:#fff}.table-bordered.jetpack-modules #doaction{margin-top:0}@media (max-width: 782px){.table-bordered.jetpack-modules #doaction{padding:10px 7px}}.table-bordered.jetpack-modules .checkall{margin-top:1px}.table-bordered.jetpack-modules .filter-search{margin-top:8px}.table-bordered.jetpack-modules .genericon{color:#999;display:none;margin:7px 3px 0}@media (max-width: 900px){.table-bordered.jetpack-modules .genericon{display:inline-block}}.table-bordered.jetpack-modules .med{width:70px}.table-bordered.jetpack-modules .sm{width:30px}@media (max-width: 782px){.table-bordered.jetpack-modules .check-column{width:50px}}.fixed-top .check-column{padding:8px 10px 0 10px;width:2.2em}.wrap{margin:0;padding:0 1.5em 1em;overflow:hidden}.wrap h2{font-size:24px;font-weight:400}.wrap .manage-left{float:left;margin:0;padding:0;width:63%}.wrap .manage-left table{width:100%}.wrap .manage-left th{font-weight:400}@media (max-width: 782px){.wrap .manage-left{width:100%}}.wrap .manage-right{margin:0;padding:0;float:right;width:35%;z-index:1}.wrap .manage-right p{font-size:12px;font-weight:bold;color:#bbb;padding-top:2px;text-transform:uppercase;letter-spacing:1px;clear:left}.wrap .manage-right .bumper{margin-left:33px}.wrap .manage-right.show{display:block;position:fixed;overflow-y:auto;overflow-x:hidden;position:absolute}.wrap .manage-right .search-bar{margin-bottom:18px;max-width:300px}.wrap .manage-right p.search-box{float:none;height:auto;margin-bottom:0;position:relative}.wrap .manage-right p.search-box input[type='search']{padding:0 8px;width:90%;line-height:initial}@media (max-width: 782px){.wrap .manage-right p.search-box input[type='search']{float:left;padding:9px 8px}}.wrap .manage-right p.search-box input[type="submit"]{display:none}.wrap .manage-right .button-group .button{outline:none}.wrap .manage-right .subsubsub{margin:0;padding:0}.wrap .manage-right .subsubsub a{padding:0;line-height:inherit}.wrap .manage-right .subsubsub .current{padding:1px 5px;border-radius:2px;margin-left:-5px;background:#0D72B2;color:#FFF}.wrap .manage-right .subsubsub .current .count{color:#BCD7E7;font-weight:200}.wrap .manage-right .subsubsub li{display:block;text-align:left}@media (max-width: 782px){.wrap .manage-right{background:#fff;bottom:0;display:none;min-width:300px;position:fixed;right:0;top:0;z-index:13;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1)}.wrap .manage-right .bumper{margin:13px}.wrap .manage-right .navbar-form{margin:0;padding:0}}.configure-module p{font-size:14px}.configure-module p.success,.configure-module p.error{color:#fff;padding:10px}.configure-module p.success{background-color:#81a844}.configure-module p.error{background-color:#d94f4f}.protect-status p{font-size:16px}.protect-status strong{display:inline-block;margin-top:10px;background:#fff;padding:10px;border:1px #ddd solid;font-size:16px;color:#000;max-width:100%}.protect-status.attn{color:#d94f4f}.protect-status.working{color:#81a844}#non-editable-whitelist{margin-top:15px}.protect-whitelist textarea{width:100%;min-height:150px}#editable-whitelist .whitelist-table{width:100%}.configure-module input[disabled]{opacity:.5}.configure-module input.button-primary{font-weight:bold}.whitelist-table{border-top:1px solid;border-right:1px solid;border-color:#ddd;background-color:#fff}.whitelist-table td,.whitelist-table th{padding:10px;margin:0;border-bottom:1px solid;border-left:1px solid;border-color:#ddd;font-size:14px}.whitelist-table th.heading{font-weight:bold;color:#5d6d74;text-align:left;background-color:#eee}.whitelist-table td.item-actions{border-left:none;text-align:right}.whitelist-table .toolbar{padding:0}.whitelist-table .add-btn{text-align:center;width:10%;border-left:1px #ddd solid}.ip-address,.enter-ip{width:90%;text-align:left;vertical-align:middle}.delete-ip-address{text-align:center;border:0;background:transparent;color:#6f7476;box-shadow:none;font-size:20px;margin:0;padding:0;cursor:pointer;border-radius:2px}.delete-ip-address:hover{background:#eee}.toolbar div{float:left;padding:10px}@media only screen and (min-width: 1100px){#non-editable-whitelist{width:28%;float:right;margin-top:0}.protect-whitelist{width:65%;float:left}}@media only screen and (max-width: 1130px){.enter-ip input[type="text"]{max-width:175px}}@media only screen and (max-width: 1250px) and (min-width: 1065px), (max-width: 730px) and (min-width: 600px){.enter-ip{width:85%}.add-btn{width:15%}}@media only screen and (max-width: 782px){.add-btn{text-align:right}.add-btn .ip-add{margin-top:4px;margin-bottom:3px}}@media only screen and (max-width: 730px){.add-btn{text-align:center}}@media only screen and (max-width: 665px) and (min-width: 600px){.enter-ip input[type="text"]{max-width:165px}}@media only screen and (max-width: 600px){.toolbar div{width:100%}.add-btn{border-top:1px #ddd solid}.enter-ip{text-align:center}.enter-ip strong{display:block;margin-bottom:5px}.enter-ip input[type="text"]{width:100%;max-width:100%}.add-btn input,.enter-ip .button{width:50%;margin:0 auto}.enter-ip .button{margin-top:10px}}@media only screen and (max-width: 400px){.protect-status strong{font-size:12px;overflow:auto}.add-btn input,.enter-ip .button{width:100%}}.jp-content .hide{display:none}.jp-content .pointer{cursor:pointer}.jp-content .landing{margin:0 auto;z-index:2;position:relative}.jp-content h1{font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;z-index:3;width:100%;text-align:center}.jp-content h1.success{color:#81a844}.jp-content .footer{padding-top:0;margin-top:0;background-image:none}.jp-content .footer:before{height:inherit}.jp-content .more-info:before{content:none}.landing .wpcom-connect{min-height:400px}.wpcom-connect .j-col{padding:0}.wpcom-connect .connect-desc{padding-right:25px}.wpcom-connect .connect-btn{text-align:center}.module-grid h2{color:#000;font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif}.download-jetpack{margin-top:1em !important}#jump-start-area{margin-top:35px;padding-left:60px;padding-right:60px;background:#fefefe;border:1px #dae0e2 solid;padding-bottom:20px}#jump-start-area #jumpstart-cta,#jump-start-area .jumpstart-desc{padding:0}#jump-start-area p{font-size:14px;line-height:185%}#jump-start-area .spinner{float:none;margin:0 auto;position:absolute;bottom:0;height:100%;width:100%;background-position:50% 56%;background-color:rgba(254,254,254,0.99);display:block;opacity:.9}.jumpstart-message p{padding-right:25px}.jumpstart-desc{text-align:left}#jumpstart-cta{text-align:center}.dismiss-jumpstart{color:#999;font-size:14px}#jumpstart-cta .button,#jumpstart-cta .button-primary{margin:1em;font-size:18px;height:45px !important;padding:8px 15px 1px}#jumpstart-cta .button-primary{display:block;margin:35px 20px 5px 20px}#jp-config-list{position:relative;padding-top:15px;padding-bottom:15px;margin-left:-15px;margin-right:-15px}#jp-config-list .j-col{padding:15px}#jp-config-list strong{display:inline-block}#jp-config-list small{display:block;margin-top:5px;line-height:150%}#jp-config-list .close{position:absolute;top:10px;right:0;text-transform:uppercase;font-weight:bold;display:block;z-index:5}.jp-config-status{text-transform:uppercase;font-size:10px;font-weight:bold;line-height:100%;color:#fff;background:#9fbd72;border-radius:2px;padding:2px 4px;display:inline-block}.miguel{display:none;position:fixed;opacity:.35;bottom:-200px;left:0;z-index:1;-webkit-animation:miguel 3.4s 0s ease-in-out;animation:miguel 3.4s 0s ease-in-out}.miguel:nth-child(2){left:49%;width:120px;height:131px;-webkit-animation-duration:2.4s;animation-duration:2.4s;-webkit-animation-delay:0s;animation-delay:0s}.miguel:nth-child(3){left:23%;width:60px;height:66px;-webkit-animation-duration:4.5s;animation-duration:4.5s;-webkit-animation-delay:0s;animation-delay:0s}@-webkit-keyframes "miguel"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(900px, -900px, 0px);transform:translate3d(900px, -900px, 0px)}}@keyframes "miguel"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(900px, -900px, 0px);transform:translate3d(900px, -900px, 0px)}}@media (max-width: 1147px){.jp-content .landing{padding:0 2em}.jp-content .footer{padding-top:1.5em}}@media (max-width: 782px){#jumpstart-cta .button-primary{margin:10px 0 5px 0}#jump-start-area .spinner{background-position:50% 35%}}@media (max-width: 530px){.jp-content .landing{padding:0 .5em}#jump-start-area{padding:0 1em}.jumpstart-message p{padding-right:0}#jumpstart-cta .button-primary{margin:0 0 5px 0;padding-bottom:10px}.footer .a8c-attribution a:after{top:6px}}.nav-horizontal:before,.features:before,.modules:before,.load-more:before,.nav-horizontal:after,.features:after,.modules:after,.load-more:after{content:"";display:table}.nav-horizontal:after,.features:after,.modules:after,.load-more:after{clear:both}
+.j-row{width:100%;margin:0 auto}.j-row:before,.j-row:after{content:" ";display:table}.j-row:after{clear:both}.j-col{padding:0.85em;width:100%;float:left;position:relative}@media only screen{.j-sm-1{width:8.33333%}.j-sm-2{width:16.66667%}.j-sm-3{width:25%}.j-sm-4{width:33.33333%}.j-sm-5{width:41.66667%}.j-sm-6{width:50%}.j-sm-7{width:58.33333%}.j-sm-8{width:66.66667%}.j-sm-9{width:75%}.j-sm-10{width:83.33333%}.j-sm-11{width:91.66667%}.j-sm-12{width:100%}}@media (min-width: 530px){.j-md-1{width:8.33333%}.j-md-2{width:16.66667%}.j-md-3{width:25%}.j-md-4{width:33.33333%}.j-md-5{width:41.66667%}.j-md-6{width:50%}.j-md-7{width:58.33333%}.j-md-8{width:66.66667%}.j-md-9{width:75%}.j-md-10{width:83.33333%}.j-md-11{width:91.66667%}.j-md-12{width:100%}}@media (min-width: 782px){.j-lrg-1{width:8.33333%}.j-lrg-2{width:16.66667%}.j-lrg-3{width:25%}.j-lrg-4{width:33.33333%}.j-lrg-5{width:41.66667%}.j-lrg-6{width:50%}.j-lrg-7{width:58.33333%}.j-lrg-8{width:66.66667%}.j-lrg-9{width:75%}.j-lrg-10{width:83.33333%}.j-lrg-11{width:91.66667%}.j-lrg-12{width:100%}}body,button,input,select,textarea{color:#222;font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.4;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{color:#222;clear:both}a{color:#0d72b2;transition:color .2s;text-decoration:none}a:visited{color:#0d72b2}a:hover{color:#0f92e5}a:focus{outline:thin dotted}address{margin:0 0 1.5em}abbr[title],acronym{cursor:help}ins{background:#eee;text-decoration:none}dt{font-weight:700}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}@-webkit-keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "grow"{0%{-webkit-transform:scale(0.3);transform:scale(0.3)}60%{-webkit-transform:scale(1.15);transform:scale(1.15)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes "candy"{0%{-webkit-transform:scale(1);transform:scale(1)}20%{-webkit-transform:scale(1.15);transform:scale(1.15)}60%{-webkit-transform:scale(0.95);transform:scale(0.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}@keyframes "flyer"{0%{-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}100%{-webkit-transform:translate3d(680px, -680px, 0px);transform:translate3d(680px, -680px, 0px)}}.button,.download-jetpack{transition:all .1s ease-in-out}.jp-button,.jp-button--settings{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#efefef;font:800 0.9285714286em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 1px 1px rgba(0,0,0,0.2);background:#6f7476;border-radius:3px}.jp-button:visited,.jp-button--settings:visited{color:#efefef}.jp-button:hover,.jp-button--settings:hover,.jp-button:focus,.jp-button--settings:focus{color:#fff;background:#57972d}.jp-button:active,.jp-button--settings:active{background:#57972d;opacity:0.8}.jp-button--settings{background:#93b45f;color:#e8eedf}.jp-button--settings:visited{color:#e8eedf}.jp-button--settings:hover,.jp-button--settings:focus{background:#9fbd72;color:#fff}.jp-button--settings.current{background:#3c6621;color:#fff;box-shadow:inset 0 2px 0 #365A1F, inset 0 1px 3px #3c6621}.download-jetpack{display:inline-block;position:relative;padding:0.64286em 0.85714em 0.53571em;color:#fff;font:400 20px/1 "proxima-nova", 'Open Sans', Helvetica, sans-serif;background:#518d2a;z-index:3;border-radius:6px;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:visited{color:#fff}.download-jetpack:hover,.download-jetpack:focus{color:#fff;background:#57972d;box-shadow:0 6px 0 #3e6c20,0 6px 3px rgba(0,0,0,0.4)}.download-jetpack:active{top:6px;box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.4)}.download-jetpack:active:after{top:-6px}.download-jetpack:before{content:'';display:inline-block;position:relative;top:-2px;margin-right:13px;width:30px;height:30px;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%}.download-jetpack:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}@media (max-width: 1147px){.download-jetpack{font-size:1.28571em}.download-jetpack:before{top:-1px;width:23px;height:23px}}@media (max-width: 900px){.download-jetpack:active{top:0}}@media (max-width: 530px){.download-jetpack{font-size:1.21429em;font-weight:600}.download-jetpack:before{width:19px;height:19px;margin-right:9px}}#searchsubmit{display:inline-block;border:none;position:relative;padding:0.71429em 1.5em;color:#efefef;font:800 0.8em/1 'Open Sans', Helvetica, sans-serif;text-shadow:0 1px 1px rgba(0,0,0,0.2);background:#6f7476;outline:none;border-radius:3px}#searchsubmit:visited{color:#efefef}#searchsubmit:hover,#searchsubmit:focus{color:#fff;background:#2aa0d5}#searchsubmit:active{opacity:0.7}@font-face{font-family:'automatticons';src:url("../_inc/fonts/automatticons/automatticons.eot");src:url("../_inc/fonts/automatticons/automatticons.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/automatticons/automatticons.woff") format("woff"),url("../_inc/fonts/automatticons/automatticons.ttf") format("truetype"),url("../_inc/fonts/automatticons/automatticons.svg#automatticonsregular") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.eot");src:url("../_inc/fonts/jetpack/jetpack.eot?#iefix") format("embedded-opentype"),url("../_inc/fonts/jetpack/jetpack.woff") format("woff"),url("../_inc/fonts/jetpack/jetpack.ttf") format("truetype"),url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg");font-weight:normal;font-style:normal}@media screen and (-webkit-min-device-pixel-ratio: 0){@font-face{font-family:"jetpack";src:url("../_inc/fonts/jetpack/jetpack.svg#jetpack") format("svg")}}.nav-horizontal a{display:inline-block}.nav-horizontal li{position:relative;float:left}.nav-horizontal ul{margin:0;padding:0}*,*:before,*:after{-moz-box-sizing:border-box;box-sizing:border-box}::-moz-selection{background:#91bd51;color:#fff;text-shadow:none}::selection{background:#91bd51;color:#fff;text-shadow:none}#wpbody-content{padding-bottom:0}#wpcontent{margin-left:160px;padding:0}ul#adminmenu a.toplevel_page_jetpack:after{border-right-color:#81a844}.folded #wpcontent{margin-left:36px}.jp-content{background:#f9f9f9;margin:0;height:auto;min-height:100%;width:100%;width:100%;-webkit-font-smoothing:antialiased}.jp-content .wrapper{background:#f9f9f9}@media (max-width: 900px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-left:36px;padding-left:0}}@media (max-width: 782px){#wpcontent,.auto-fold #wpcontent,.auto-fold #wpfooter,.modal,.configure .frame.top.fixed{margin-left:0}}@media (max-width: 782px){.configure .frame.top.fixed{padding-left:0}}.wrap.inner,.page-content{max-width:950px;margin:0 auto}.wrap.inner li,.page-content li{line-height:23px}@media (max-width: 530px){.page-content{margin-top:0}}@media (max-width: 1147px){.wrap.inner{background:#f9f9f9;padding:15px}}@media (max-width: 530px){.wrap.inner{margin-top:1.71429em}}.jetpack_page_jetpack_modules .header-nav{margin:0}.jetpack_page_jetpack_modules .page-content{max-width:1200px;min-height:500px;margin:0}.page-content.about{position:relative;z-index:10}@media (max-width: 1147px){.page-content.about{background:#f9f9f9;padding:15px}}@media (max-width: 1147px){.page-content.configure{background:#f9f9f9}}.footer nav{max-width:550px;margin:0 auto}.header{left:0;right:0;background:#81a844}.header-nav li{line-height:60px}.header-nav a{padding:0 0.71429em;line-height:24px}.header-nav .jetpack-logo a{display:inline-block;position:relative;width:214px;margin-right:6px;background:url(../images/jetpack-logo.png) center center no-repeat;background:url(../images/jetpack-logo.svg) center center no-repeat,none;background-size:183px auto;color:#fff;line-height:60px;font-weight:normal}.header-nav .jetpack-logo a span{text-indent:-9999px;visibility:hidden}.header-nav .jetpack-logo a:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-size:183px 32px}.header-nav .jetpack-modules+.jetpack-modules{margin-left:15px}.main-nav{float:left}.main-nav li{margin:0}@media (max-width: 900px){.main-nav{font-size:13px}}.user-nav{float:right}.user-nav li{margin:0}.jetpack-pagestyles #screen-meta{margin:0}.jetpack-pagestyles #screen-meta-links .screen-meta-toggle{z-index:2}.jetpack-pagestyles #screen-options-link-wrap,.jetpack-pagestyles #contextual-help-link-wrap{border:none}.jetpack-pagestyles .update-nag{display:none}.masthead{position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #8eb74e)}.masthead.hasbutton .flyer{bottom:-270px}.masthead.hasbutton .subhead{margin-top:175px}@media (max-width: 530px){.masthead.hasbutton .subhead{margin-top:105px;padding:0}}.masthead h1,.masthead h2{margin:0 auto}.masthead h1{padding:2.5em 0 1.11111em;max-width:21.94444em;color:#fff;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;text-shadow:0 1px 1px rgba(0,0,0,0.12);z-index:3}.masthead h1+.flyby{margin-top:180px}@media (max-width: 1147px){.masthead h1{padding-top:1.83333em;font-size:2.14286em}}@media (max-width: 782px){.masthead h1{max-width:600px;font-size:28px}}@media (max-width: 530px){.masthead h1{margin:0 15px;padding:31px 0 15px 0;font-size:21px;font-weight:400}}.jetpack-connected .masthead h1{margin-bottom:33px;max-width:600px}.flyer{position:absolute;bottom:-200px;left:4%;z-index:1;-webkit-animation:flyer 3.4s 2s ease-in-out;animation:flyer 3.4s 2s ease-in-out}.flyer:nth-child(2){left:49%;width:120px;height:131px;-webkit-animation-delay:4.6s;animation-delay:4.6s;-webkit-animation-duration:2.4s;animation-duration:2.4s}.flyer:nth-child(3){left:23%;width:60px;height:66px;-webkit-animation-delay:5.8s;animation-delay:5.8s;-webkit-animation-duration:4.5s;animation-duration:4.5s}.subhead{position:relative;margin-top:105px;padding:4em 0;background:#f9f9f9;z-index:2}.subhead h2{max-width:460px;color:#5d6d74;font:400 1.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 900px){.subhead h2{max-width:428px;font-size:20px}}@media (max-width: 530px){.subhead h2{display:none}}.subhead:after{content:'';position:absolute;bottom:100%;left:0;margin-bottom:-1px;width:100%;height:228px;background:url("../images/the-cloud.svg") center bottom repeat-x;pointer-events:none;z-index:-1}@media (max-width: 1147px){.subhead{margin-top:122px;padding:70px 0 49px}.subhead:after{background-size:160% auto}}@media (max-width: 900px){.subhead{margin-top:122px;padding:70px 0 49px}}@media (max-width: 530px){.subhead{margin-top:83px;padding:47px 15px 39px}}.clouds-sm{height:100px;position:relative;text-align:center;z-index:1;background-color:#81a844;background-image:linear-gradient(top, #81a844, #89b348)}.clouds-sm:after{content:'';position:absolute;bottom:0;left:0;margin-bottom:-1px;width:100%;height:137px;background:url("../images/the-cloud-sm.svg") center bottom repeat-x;pointer-events:none;z-index:2}@media (max-width: 530px){.clouds-sm{height:90px}}.featured{border-top:1px solid #d6d6d6;border-bottom:1px solid #d6d6d6;background:#fff;position:relative;padding:2.0em 1em 4.6em 1em;text-align:center;z-index:1}.featured:before{content:"";display:block;position:absolute;top:0;height:100%;z-index:-1}.featured .features,.featured .modules{margin:0 auto;display:inline-block}@media (max-width: 530px){.featured{display:none}}.featured h2,.module-grid h2{margin-top:1em;color:#5d6d74;font:300 2em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-align:center}@media (max-width: 900px){.featured h2,.module-grid h2{font-size:30px}}@media (max-width: 782px){.featured h2,.module-grid h2{font-size:28px}}.features,.modules{margin:0 -5px}.feature,.module{position:relative;float:left;margin:0 5px 10px;width:310px;transition:all .2s ease-in-out}@media (max-width: 1147px){.feature,.module{margin:.75% 0 .75% 1.5%;width:32.333333%;transition:none}.feature:nth-child(3n+1),.module:nth-child(3n+1){margin-left:0}.feature:hover,.module:hover{top:0;box-shadow:none}}.feature{-webkit-transform:translateZ(0);transform:translateZ(0)}.feature h3{margin:0 0 0.58824em;color:#697b84;font-size:1.21429em;line-height:1em;font-weight:800}.feature p{margin:0;color:#6e818a}.feature:before{content:'';position:absolute;bottom:0;left:0;width:100%;height:10px;background:rgba(0,0,0,0.02);z-index:-1;-webkit-transform:translateZ(0);transform:translateZ(0);transition:all .2s ease-in-out}.feature:hover{-webkit-transform:translateY(-5px);-ms-transform:translateY(-5px);transform:translateY(-5px)}.feature:hover h3{color:#1a8dba}.feature:hover .feature-img{border:1px solid #ccc;border-bottom:none}.feature:hover .no-border{border:none}.feature:hover:before{-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px)}@media (max-width: 1147px){.feature:hover h3{color:#6e818a}.feature:hover .feature-img{border:1px solid #ddd;border-bottom:none}.feature:hover .no-border{border:none}}.feature .feature-img{padding-top:52%;width:100%;height:auto;border:1px solid #ddd;border-bottom:none}.feature .feature-img.custom-css{background:url("../images/custom-css.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.custom-css{background-image:url("../images/custom-css@2x.jpg")}}.feature .feature-img.wordpress-connect{background:url("../images/wordpress-connect.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-connect{background-image:url("../images/wordpress-connect@2x.jpg")}}.feature .feature-img.wordpress-stats{background:url("../images/wordpress-stats.jpg") no-repeat;background-size:100% auto}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5 / 4), (min-resolution: 120dpi){.feature .feature-img.wordpress-stats{background-image:url("../images/wordpress-stats@2x.jpg")}}.feature .feature-img.no-border{border:none;padding-bottom:1px}.feature-description{display:block;padding:1em 1.07143em 1.07143em;border:1px solid #ddd;background:#f5f5f5}.feature:hover .feature-description{background:#fff;border-color:#ccc}@media (max-width: 1147px){.feature:hover .feature-description{border:1px solid #ddd;background:#f5f5f5}}@media (max-width: 900px){.feature-description{min-height:115px}}.cat{clear:both;margin-bottom:23px}.cat h3{font-size:24px;font-weight:300;margin:0 0 13px 6px;text-align:left}.cat .clear{clear:both}.module-grid{text-align:center}.module-grid h2{margin:1em 0}@media (max-width: 530px){.module-grid h2{padding-top:16px;margin-top:0;font-size:25px}}#module-search{position:relative;width:100%;max-width:40.71429em;margin:0 auto 1.07143em;overflow:hidden}#jetpack-search{margin:0;padding:11px 16px 11px 16px;width:100%;border:1px solid #c9ced0;border-radius:3px;background:#fff;color:#5c6671;line-height:1.3}#jetpack-search:focus{color:#5c6671;outline:none}#jetpack-search:focus+label{background:transparent;opacity:0}#jetpack-search::-webkit-input-placeholder{color:#a8acae}#jetpack-search :-moz-placeholder{color:#a8acae}#jetpack-search::-moz-placeholder{color:#a8acae}#jetpack-search:-ms-input-placeholder{color:#a8acae}#jetpack-search+label{position:absolute;top:1px;right:1px;bottom:1px;width:48px;color:#abafb1;text-indent:-9999px;pointer-events:none;border-radius:3px;transition:all .2s ease-in-out}#jetpack-search+label:after{content:'\f400';position:absolute;right:11px;text-align:right;top:4px;font-size:1.71429em;font-weight:normal;font-family:"genericons"}.jp-filter{margin-bottom:2.85714em;color:#6f7476}.jp-filter a{display:inline-block;position:relative;padding:0.76923em 1.46154em;color:#aaa;font:600 0.92857em/1 "Open Sans", Helvetica, Arial, sans-serif;text-shadow:0 1px 1px rgba(255,255,255,0.2);background:#eee;border-radius:3px;background-clip:padding-box}.jp-filter a.selected,.jp-filter a:hover,.jp-filter a:focus{color:#efefef;text-shadow:0 1px 1px rgba(0,0,0,0.2);background:#6f7476}@media (max-width: 530px){.jp-filter a{padding:0.76em 1em}}.module{display:block;padding:0.71429em 1.07143em 1em;text-align:left;border:1px solid #dae0e2;background:#fff;box-shadow:0 0 0 rgba(0,0,0,0.03);transition:opacity 2s ease-in}.module:hover{border-color:#8ac9e8;background:#f8fcfe}.module h3{cursor:pointer;margin:0 0 0.5em;color:#1a8dba;font-size:1.14286em;line-height:1.4em;font-weight:700}.module p{margin:0;color:#686f72;font-size:0.85714em}.module:hover,.module:focus{border-color:#8ac9e8;background:#f8fcfe}.module.active{border-color:#2ea2cc;box-shadow:inset 4px 0 0 #2ea2cc}.module.active:hover{border-color:#69bedd;box-shadow:inset 4px 0 0 #69bedd}.module .button,.module .button-primary{margin-top:15px}@media (max-width: 530px){.module .configure,.module .activate{display:block;width:100%;text-align:center}.module .button,.module .button-primary{width:50%}.module .button-primary{line-height:normal;padding:6px 14px;height:auto;font-size:14px}}@media screen and (max-width: 450px){.module .button,.module .button-primary{margin:20px auto 0 auto}.module .button.alignright,.module .button-primary.alignright{float:none}}@media (max-width: 1147px){.cat .module:nth-child(3n+1){margin:.75% 0 .75% 1.5%}.cat .module:nth-child(3n - 1){margin-left:0}}@media (max-width: 900px){.cat .module{margin:1% 0 1% 2%}.cat .module:nth-child(2n+1){margin:1% 0 1% 2%}.cat .module:nth-child(2n+0){margin-left:0}}@media (max-width: 530px){.cat .module{margin:5px 0}.cat .module:nth-child(2n+1){margin-left:0}.cat .module:nth-child(2n+0){margin-left:0}}@media (max-width: 900px){.module{margin:1% 0 1% 2%;width:49%}.module:nth-child(3n+1){margin-left:2%}.module:nth-child(2n+1){margin-left:0}}@media (max-width: 530px){.module{margin:5px 0;width:100%}.module:nth-child(3n+1){margin-left:0}.module:nth-child(2n+1){margin-left:0}}.new{position:relative}.new:after{content:'NEW';position:absolute;top:-8px;right:-8px;padding-top:10px;width:32px;height:32px;color:#fff;font-size:8px;font-weight:800;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background:url("../images/new-badge.svg") center center no-repeat;background-size:100%;border-radius:50%}.paid{display:inline-block;position:relative;top:5px;margin-left:10px;padding:1px 6px 0 4px;height:13px;color:#fff;font:700 10px/1 "Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 -1px 0 rgba(0,0,0,0.05);background:#d0d0d0;vertical-align:top}.paid:before,.paid:after{position:absolute;top:0;right:100%;font:normal 14px/14px "genericons"}.paid:before{content:'\f503';color:#d0d0d0;text-shadow:none}.paid:after{content:'\f428';margin-right:-5px;font-size:11px}.rtl .paid:before{content:'\f501'}.load-more{margin:2.71429em 0 6.15385em}.set{display:none}.show.set{display:block}.loading{bottom:50%;position:absolute;top:50%;width:100%}.loading span{color:#999}.modal{background:#fff;position:fixed;top:52px;bottom:20px;right:20px;left:20px;margin-left:160px;display:none;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1);z-index:500}.modal .close{position:absolute;top:0;right:0;font:300 1.71429em "genericons" !important;color:#777;content:'\f405';display:inline-block;padding:0.28571em 0.71429em 0.42857em;z-index:5}.modal .close:hover{background:#eee;opacity:0.8}.modal .close:active{background:#eee;opacity:0.4}.modal #jp-post-flair{display:none}.modal .content-container{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto;padding:2.14286em}.modal .content{margin:0 auto;max-width:900px;text-align:left}.modal h2{text-align:left;margin-top:0;color:#5d6d74;font:300 32px "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 530px){.modal h2{font-size:26px}}.modal h5{clear:left}.modal p{font-size:1.23077em}.modal footer{position:absolute;left:0;bottom:0;width:100%;padding:12px 20px;border-top:1px solid #ddd;background:#fff;text-align:right}.modal footer ul{margin:0}.modal footer li{display:inline-block;margin:0}.modal .button-secondary,.modal .button-primary:active{vertical-align:baseline}@media (max-width: 900px){.modal{bottom:5%;margin-left:36px;font-size:80%}.modal .content{top:38px}}@media (max-width: 782px){.modal{top:66px;margin-left:0}}@media (max-width: 600px){.modal{top:10px;right:10px;bottom:10px;left:10px}}.jp-info-img{float:right;margin:0 0 30px 30px}.jp-info-img img{border:1px solid #ddd;max-width:100%;height:auto}.jp-info-img img:first-child{margin-top:0}@media (max-width: 782px){.jp-info-img{float:none;margin:0 0 15px}}.content-container.modal-footer{bottom:53px}.shade{background:#000;bottom:0;cursor:pointer;display:none;left:0;opacity:0.2;position:fixed;right:0;top:0;z-index:11}.entry-title,.page-template-default h1{margin-top:0.61111em;color:#5d6d74;font:300 2.57143em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 530px){.entry-title,.page-template-default h1{font-size:2em}}.blog h3,.single h3,.page-template-default h2{margin-top:0.61111em;color:#5d6d74;font:300 1.9em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;text-shadow:0 1px 1px #fff}@media (max-width: 530px){.blog h3,.single h3,.page-template-default h2{font-size:1.4em}}.page-template-default p{line-height:1.71429em}.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{float:left;width:70%}.footer{margin-top:1.42857em;position:relative;padding:10em 0 4.28571em;text-align:center}.footer:before,.footer:after{content:'';position:absolute;left:0;pointer-events:none}.footer:before{top:0;margin-top:-1px;width:100%;height:195px}.footer:after{display:none}.footer .download-jetpack{margin-bottom:33px}@media (min-width: 1147px){.footer{padding-bottom:35px}}@media (max-width: 1147px){.footer{padding-top:165px;padding-bottom:0}.footer:before{background-size:160% auto}.footer ul{float:none;overflow:hidden}}@media (max-width: 900px){.footer{padding-top:146px}}@media (max-width: 782px){.footer{margin-top:0}}@media (max-width: 530px){.footer{margin-top:0;padding-top:135px}}@media (max-width: 320px){.footer{padding-top:76px}}.footer nav{max-width:100%}.footer nav a,.footer nav a:visited{padding:4px 6px;color:#999}.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81A844}@media (max-width: 1147px){.footer nav a:hover,.footer nav a:focus,.footer nav a:visited:hover,.footer nav a:visited:focus{color:#81a844}}@media (max-width: 530px){.footer nav li{display:block;float:none;margin:0;text-align:left}.footer nav a{display:block;padding:0 16px;line-height:44px}}.primary{padding:25px 15px 10px 15px;border-bottom:1px solid #eee}.secondary-footer{margin:0 auto}.secondary-footer li{margin-right:5px}@media (min-width: 782px){.secondary-footer{padding:8px 15px 10px;margin-bottom:30px;border-bottom:1px solid #eee}}@media (min-width: 1147px){.secondary-footer{margin-bottom:0}}@media (max-width: 782px){.secondary-footer{padding:8px 15px 8px;border-bottom:none}}@media (max-width: 530px){.secondary-footer{margin:0;padding:0;border:none;font-weight:400}.secondary-footer a{border-top:1px solid #eee}}.footer .a8c-attribution{margin:0;padding:0 6px;color:#bbb;font-size:0.78571em;font-family:"Gill Sans","Gill Sans MT","Open Sans",Helvetica,Arial,sans-serif;text-transform:uppercase}.footer .a8c-attribution a{display:inline-block;position:relative;padding:4px 16px;right:9999px;outline:0}.footer .a8c-attribution a:after{content:'A';position:absolute;top:2px;right:-9999px;height:100%;color:#999;font-size:1.54545em;font-family:"automatticons";text-align:center}.footer .a8c-attribution a:hover:after{-webkit-animation:candy .4s ease-in-out;animation:candy .4s ease-in-out}@media (min-width: 782px){.secondary{padding:0 15px 10px 15px;border-bottom:1px solid #eee}}@media (min-width: 1147px){.secondary{padding:0 15px 10px 15px;border-bottom:none}}.jetpack-message{background:#8eb74e;border:1px solid #73963d;margin:33px auto 0;max-width:90%;position:relative;z-index:2}.jetpack-message.is-opt-in{margin:50px 0 0;max-width:100%;padding:10px 15px;background:#fff;border:0;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);font-size:13px;text-align:center}.subhead .jetpack-message.is-opt-in{margin:0;padding-bottom:0;background:transparent;box-shadow:none}.subhead .jetpack-message.is-opt-in .jp-button,.subhead .jetpack-message.is-opt-in .jp-button--settings{display:inline-block}.jetpack-message.is-opt-in p{color:#3c4549}.jetpack-message.is-opt-in .jp-button,.jetpack-message.is-opt-in .jp-button--settings{margin-top:15px;display:none}.jetpack-message .squeezer h2{font-size:1em}.jetpack-message h2{color:#fff;margin:0}.jetpack-message p{color:#fff;margin:0;opacity:0.7}.jetpack-message .squeezer{padding:23px 23px 23px 80px;position:relative;text-align:left}.jetpack-message .squeezer:before{color:#fff;content:'\f418';font-family:'Genericons';font-size:33px;height:33px;left:25px;opacity:0.6;position:absolute;top:23px;top:calc( 50% - 22px )}@media (max-width: 530px){.jetpack-message .squeezer{padding:23px}.jetpack-message .squeezer:before{display:none}}.jetpack-message .squeezer a{color:#FFF;border-bottom:1px solid #D5E4BD}.jetpack-message .squeezer a:hover{border-bottom:1px solid #F1F6E9}.jetpack-message.error .squeezer:before,.jetpack-message.jetpack-err .squeezer:before{content:'\f414'}.configure-module .jetpack-message{max-width:100%}.jetpack-modules #site-icon-deprecated .info,.modules h3.icon,.jetpack-modules .info a{width:auto}.jetpack-modules #site-icon-deprecated .info:before,.modules h3.icon:before,.jetpack-modules .info a:before{display:inline-block;position:relative;top:1px;left:-3px;margin-right:2px;opacity:0.8;font:normal 20px "genericons";vertical-align:top}.jetpack-modules .info a:before{margin-top:1px}.latex:before,.jetpack-modules #latex .info a:before{content:'\f408'}.carousel:before,.jetpack-modules #carousel .info a:before{content:'\f102'}.modules h3.contact-form:before,.jetpack-modules #contact-form .info a:before{content:'\f175';font:normal 20px "dashicons"}.modules h3.custom-css:before,.jetpack-modules #custom-css .info a:before{content:'\f100';font:normal 20px "dashicons"}.modules h3.enhanced-distribution:before,.jetpack-modules #enhanced-distribution .info a:before{content:'\f237';font:normal 20px "dashicons"}.modules h3.widgets:before,.jetpack-modules #widgets .info a:before{content:'\f116';font:normal 20px "dashicons"}.modules h3.gravatar-hovercards:before,.jetpack-modules #gravatar-hovercards .info a:before{content:'G';font-family:"automatticons"}.infinite-scroll:before,.jetpack-modules #infinite-scroll .info a:before{content:'\f408'}.comments:before,.jetpack-modules #comments .info a:before{content:'\f108'}.sso:before,.jetpack-modules #sso .info a:before{content:'\f205'}.json-api:before,.jetpack-modules #json-api .info a:before{content:'\f415'}.likes:before,.jetpack-modules #likes .info a:before{content:'\f408'}.markdown:before,.jetpack-modules #markdown .info a:before{content:'\f462'}.minileven:before,.jetpack-modules #minileven .info a:before{content:'\f453'}.manage:before,.jetpack-modules #manage .info a:before{content:'\f205'}.monitor:before,.jetpack-modules #monitor .info a:before{content:'\f468'}.notes:before,.jetpack-modules #notes .info a:before{content:'\f300'}.omnisearch:before,.jetpack-modules #omnisearch .info a:before{content:'\f400'}.photon:before,.jetpack-modules #photon .info a:before{content:'\f403'}.post-by-email:before,.jetpack-modules #post-by-email .info a:before{content:'\f410'}.protect:before,.jetpack-modules #protect .info a:before{content:'\f470';position:relative;top:-1px}.modules h3.publicize:before,.jetpack-modules #publicize .info a:before{content:'\f237';font:normal 20px "dashicons"}.related-posts:before,.jetpack-modules #related-posts .info a:before{content:'\f420'}.sharedaddy:before,.jetpack-modules #sharedaddy .info a:before{content:'\f415'}.shortcodes:before,.jetpack-modules #shortcodes .info a:before{content:'\f100'}.verification-tools:before,.jetpack-modules #verification-tools .info a:before{content:'\f425'}.after-the-deadline:before,.jetpack-modules #after-the-deadline .info a:before{content:'\f411'}.subscriptions:before,.jetpack-modules #subscriptions .info a:before{content:'\f410'}.tiled-gallery:before,.jetpack-modules #tiled-gallery .info a:before{content:'\f103'}.modules h3.vaultpress:before,.jetpack-modules #vaultpress .info a:before{content:'V';font-family:"automatticons"}.videopress:before,.jetpack-modules #videopress .info a:before{content:'\f104'}.modules h3.widget-visibility:before,.jetpack-modules #widget-visibility .info a:before{content:'\f116';font:normal 20px "dashicons"}.stats:before,.jetpack-modules #stats .info a:before{content:'\f205'}.shortlinks:before,.jetpack-modules #shortlinks .info a:before{content:'\f107'}.modules h3.custom-content-types:before,.jetpack-modules #custom-content-types .info a:before{content:'\f498';font:normal 20px "dashicons"}.modules h3.site-icon:before,.jetpack-modules #site-icon .info a:before{content:'\f475'}.jetpack-modules #site-icon-deprecated .info:before{content:'\f475'}.jetpack-modules #sitemaps .info a:before{content:'\f507'}@media (max-width: 782px){.blog .type-post,.page-template-default .type-page,.single .type-post,.single .type-jetpack_support{width:100%}}@media (max-width: 600px){.clouds-sm{display:none}}@media (max-width: 530px){.wrap.inner.jp-support .jp-support-column-left{width:100%}.wrap.inner.jp-support .jp-support-column-left .widget-text{margin-right:0;width:100%}.wrap.inner.jp-support .jp-support-column-right{width:100%}}@media screen and (max-width: 515px){.jp-frame .header-nav{padding-bottom:10px}.jp-frame .header-nav li{line-height:30px}.jp-frame .header-nav .jetpack-logo{width:100%;text-align:center}.jp-frame .header-nav .jetpack-modules{margin:0;width:50%;text-align:right;padding:0 5px}.jp-frame .header-nav .jetpack-modules+.jetpack-modules{text-align:left}.jp-frame .header-nav .jetpack-modules:nth-child(4){text-align:center;margin:0 auto;width:100%}.jp-frame .header-nav .jetpack-modules:nth-child(4) a{padding:0 10px}}@media (max-width: 320px){.jetpack_page_jetpack_modules .wrap{padding:0 0 1em}}.page-content.configure{margin-top:0}.configure .frame.top{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}.configure .frame.top.fixed{background:#f9f9f9;border-bottom:1px solid #e9e9e9;padding-left:160px;margin-top:-6px;position:fixed;right:0;top:32px;width:100%;z-index:4;box-shadow:0 2px 2px -2px #eee}@media (max-width: 782px){.configure .frame.top.fixed{border:none;box-shadow:none;padding-top:1.42857em;position:relative;top:auto}}@media (max-width: 600px){.configure .frame.top.fixed{top:0}}.configure .frame.top .tablenav.top{float:left}@media (max-width: 900px){.configure .frame.top .tablenav.top .actions{display:block}}@media (max-width: 782px){.configure .frame.top .tablenav.top .actions{margin-top:6px}}.jp-frame-top-fixed .configure{padding-top:94px}.filter-search{display:none;float:right;margin-top:10px}@media (max-width: 782px){.filter-search{display:block}}@media (max-width: 530px){.filter-search{display:none}}.module-actions.landing-page{float:right;margin-right:15px}.module-actions.landing-page a{font-size:0.6em}.table-bordered.jetpack-modules{border:none;margin-bottom:0}.table-bordered.jetpack-modules tr.jetpack-module th{border-left:0;padding:14px 4px 0}.table-bordered.jetpack-modules tr.jetpack-module th input{display:block}.table-bordered.jetpack-modules tr.jetpack-module:hover .genericon{display:inline-block}.table-bordered.jetpack-modules tr.jetpack-module:hover td .row-actions span a{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.active th,.table-bordered.jetpack-modules tr.jetpack-module.active td{background:#f7fcfe}.table-bordered.jetpack-modules tr.jetpack-module.active th{border-left:4px solid #2ea2cc;padding-left:0px}.table-bordered.jetpack-modules tr.jetpack-module.active td:first-child{border-left:4px solid #2ea2cc}.table-bordered.jetpack-modules tr.jetpack-module.unavailable{opacity:0.3}.table-bordered.jetpack-modules tr.jetpack-module.unavailable input{display:none}.table-bordered.jetpack-modules tr.jetpack-module#vaultpress{opacity:1}.table-bordered.jetpack-modules tr.jetpack-module.deprecated span{color:#888}.table-bordered.jetpack-modules tr.jetpack-module.deprecated .dep-msg{margin-right:10px;color:#555}.table-bordered.jetpack-modules tr.jetpack-module th,.table-bordered.jetpack-modules tr.jetpack-module td{background:#fff;margin:0;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1)}.table-bordered.jetpack-modules tr.jetpack-module td{padding:10px 10px 8px 14px;line-height:25px}.table-bordered.jetpack-modules tr.jetpack-module td:first-child{border-left:4px solid #fff}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{float:right;padding:0 0 1px;visibility:visible}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span{margin-left:5px}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a{opacity:0}.table-bordered.jetpack-modules tr.jetpack-module td .row-actions span a:focus{opacity:1}@media (max-width: 530px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}}@media (max-width: 782px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:block;padding-left:10px;visibility:visible}}.table-bordered.jetpack-modules>thead>tr>th{border:0;vertical-align:middle}.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-right:0}@media (max-width: 782px){.table-bordered.jetpack-modules>thead>tr>th:last-child{padding-left:0}}.table-bordered.jetpack-modules td{background:#fff}.table-bordered.jetpack-modules #doaction{margin-top:0}@media (max-width: 782px){.table-bordered.jetpack-modules #doaction{padding:10px 7px}}.table-bordered.jetpack-modules .checkall{margin-top:1px}.table-bordered.jetpack-modules .filter-search{margin-top:8px}.table-bordered.jetpack-modules .genericon{color:#999;display:none;margin:7px 3px 0}@media (max-width: 900px){.table-bordered.jetpack-modules .genericon{display:inline-block}}.table-bordered.jetpack-modules .med{width:70px}.table-bordered.jetpack-modules .sm{width:30px}@media (max-width: 782px){.table-bordered.jetpack-modules .check-column{width:50px}}.fixed-top .check-column{padding:8px 10px 0 10px;width:2.2em}.wrap{margin:0;padding:0 1.5em 1em;overflow:hidden}.wrap h2{font-size:24px;font-weight:400}.wrap .manage-left{float:left;margin:0;padding:0;width:63%}.wrap .manage-left table{width:100%}.wrap .manage-left th{font-weight:400}@media (max-width: 782px){.wrap .manage-left{width:100%}}.wrap .manage-right{margin:0;padding:0;float:right;width:35%;z-index:1}.wrap .manage-right p{font-size:12px;font-weight:bold;color:#bbb;padding-top:2px;text-transform:uppercase;letter-spacing:1px;clear:left}.wrap .manage-right .bumper{margin-left:33px}.wrap .manage-right.show{display:block;overflow-y:auto;overflow-x:hidden;position:absolute;z-index:100000}.wrap .manage-right .search-bar{margin-bottom:18px;max-width:300px}.wrap .manage-right p.search-box{float:none;height:auto;margin-bottom:0;position:relative}.wrap .manage-right p.search-box input[type='search']{padding:0 8px;width:90%;line-height:initial}@media (max-width: 782px){.wrap .manage-right p.search-box input[type='search']{float:left;padding:9px 8px}}.wrap .manage-right p.search-box input[type="submit"]{display:none}.wrap .manage-right .button-group .button{outline:none}.wrap .manage-right .subsubsub{margin:0;padding:0}.wrap .manage-right .subsubsub a{padding:0;line-height:inherit}.wrap .manage-right .subsubsub .current{padding:1px 5px;border-radius:2px;margin-left:-5px;background:#0D72B2;color:#fff}.wrap .manage-right .subsubsub .current .count{color:#BCD7E7;font-weight:200}.wrap .manage-right .subsubsub li{display:block;text-align:left}@media (max-width: 782px){.wrap .manage-right{background:#fff;bottom:0;display:none;min-width:300px;position:fixed;right:0;top:0;z-index:13;box-shadow:0 1px 20px 5px rgba(0,0,0,0.1)}.wrap .manage-right .bumper{margin:13px}.wrap .manage-right .navbar-form{margin:0;padding:0}}@media (max-width: 782px){.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary):not(.check-column){padding:11px 10px;display:block}.jetpack_page_jetpack_modules #doaction{padding:7px 14px}.jetpack_page_jetpack_modules .fixed-top thead .check-column{padding:28px 10px 0 10px}.jetpack_page_jetpack_modules .filter-search{margin-top:28px}.jetpack_page_jetpack_modules .filter-search .button{padding:7px 14px}.manage-right.show .subsubsub li{padding:5px}}@media (max-width: 650px){.table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions{float:none;padding-left:18px}}@media (max-width: 430px){.table-bordered.jetpack-modules tr.jetpack-module td .row-actions{display:none}.table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions{display:block}}.configure-module p{font-size:14px}.configure-module p.success,.configure-module p.error{color:#fff;padding:10px}.configure-module p.success{background-color:#81a844}.configure-module p.error{background-color:#d94f4f}.protect-status p{font-size:16px}.protect-status strong{display:inline-block;margin-top:10px;background:#fff;padding:10px;border:1px #ddd solid;font-size:16px;color:#000;max-width:100%}.protect-status.attn{color:#d94f4f}.protect-status.working{color:#81a844}#non-editable-whitelist{margin-top:15px}.protect-whitelist textarea{width:100%;min-height:150px}#editable-whitelist .whitelist-table{width:100%}.configure-module input[disabled]{opacity:.5}.configure-module input.button-primary{font-weight:bold}.whitelist-table{border-top:1px solid;border-right:1px solid;border-color:#ddd;background-color:#fff}.whitelist-table td,.whitelist-table th{padding:10px;margin:0;border-bottom:1px solid;border-left:1px solid;border-color:#ddd;font-size:14px}.whitelist-table th.heading{font-weight:bold;color:#5d6d74;text-align:left;background-color:#eee}.whitelist-table td.item-actions{border-left:none;text-align:right}.whitelist-table .toolbar{padding:0}.whitelist-table .add-btn{text-align:center;width:10%;border-left:1px #ddd solid}.ip-address,.enter-ip{width:90%;text-align:left;vertical-align:middle}.delete-ip-address{text-align:center;border:0;background:transparent;color:#6f7476;box-shadow:none;font-size:20px;margin:0;padding:0;cursor:pointer;border-radius:2px}.delete-ip-address:hover{background:#eee}.toolbar div{float:left;padding:10px}@media only screen and (min-width: 1100px){#non-editable-whitelist{width:28%;float:right;margin-top:0}.protect-whitelist{width:65%;float:left}}@media only screen and (max-width: 1130px){.enter-ip input[type="text"]{max-width:175px}}@media only screen and (max-width: 1250px) and (min-width: 1065px), (max-width: 730px) and (min-width: 600px){.enter-ip{width:85%}.add-btn{width:15%}}@media only screen and (max-width: 782px){.add-btn{text-align:right}.add-btn .ip-add{margin-top:4px;margin-bottom:3px}}@media only screen and (max-width: 730px){.add-btn{text-align:center}}@media only screen and (max-width: 665px) and (min-width: 600px){.enter-ip input[type="text"]{max-width:165px}}@media only screen and (max-width: 600px){.toolbar div{width:100%}.add-btn{border-top:1px #ddd solid}.enter-ip{text-align:center}.enter-ip strong{display:block;margin-bottom:5px}.enter-ip input[type="text"]{width:100%;max-width:100%}.add-btn input,.enter-ip .button{width:50%;margin:0 auto}.enter-ip .button{margin-top:10px}}@media only screen and (max-width: 400px){.protect-status strong{font-size:12px;overflow:auto}.add-btn input,.enter-ip .button{width:100%}}.my-jetpack-actions{margin:0 0 40px 0}.my-jetpack-actions .j-col{padding:0;text-align:center}.my-jetpack-actions #user-list{height:30px;margin-top:-1px;margin-left:-3px}#jetpack-disconnect-content{display:none;text-align:center}#jetpack-disconnect-content .cancel-disconnect{display:block;margin-top:10px}.connection-details{border:1px #ddd solid}.connection-details.local-user{margin-bottom:10px}.connection-details .user-01,.connection-details .wpuser-02,.connection-details .action-btns{padding:10px}.connection-details .user-01 .button,.connection-details .user-01 select,.connection-details .wpuser-02 .button,.connection-details .wpuser-02 select,.connection-details .action-btns .button,.connection-details .action-btns select{margin-top:5px}.connection-details .wpuser-02{margin-top:10px}.connection-details h3{padding:10px;margin:0;background:#eee;border-bottom:1px #ddd solid;font-size:14px}.jp-user img{margin-right:10px;border-radius:50%}.jp-user div,.wp-user div,.wp-action div{display:inline-block;width:100%}.j-col.jp-user,.j-col.wp-user,.j-col.wp-action{padding:0}.my-jetpack-actions select{max-width:150px}.j-actions .button:nth-child(3){margin-right:5px}.j-row.disconnect{text-align:center}.j-row.disconnect .button{margin:0 auto}a.what-is-primary{color:#b4b9be;margin-left:4px}@media (max-width: 782px){.wp-action{border-top:1px #ddd solid}.wp-action h3{display:none}}@media screen and (max-width: 500px){.connection-details{font-size:11px}.connection-details h3{font-size:12px;padding:5px}.connection-details .user-01,.connection-details .wpuser-02{padding:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.connection-details .action-btns{text-align:center}}@media (max-width: 530px){.connection-details .wpuser-02{margin-top:0;padding:12px}}@media screen and (max-width: 450px){.j-actions .button{width:100%;margin-bottom:5px;text-align:center}.j-actions .button.alignright{float:none}}@media screen and (max-width: 350px){.user-01,.wpuser-02{max-width:100px}}.manage__icon{width:155px;height:155px;margin:20px auto}.manage-page .manage__description{max-width:600px;text-align:center;font-size:22px;color:#999;margin:20px auto}.manage-page .manage__button{font-size:16px;padding:0 20px;height:40px;line-height:40px}.manage__title .genericon{font-size:38px;color:#81A944}.manage__link{font-size:16px;padding:0 20px;height:40px;line-height:40px;font-weight:normal}.manage__link .genericon{font-size:28px;vertical-align:middle;margin-top:-6px}.jp-content .hide{display:none}.jp-content .pointer{cursor:pointer}.jp-content .landing{margin:0 auto;z-index:2;position:relative}.jp-content h1{font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;position:relative;z-index:3;width:100%;text-align:center}.jp-content h1.success{color:#81a844}.jp-content .footer{padding-top:0;margin-top:0;background-image:none}.jp-content .footer:before{height:inherit}.jp-content .more-info:before{content:none}.landing .wpcom-connect{min-height:400px}.wpcom-connect .j-col{padding:0}.wpcom-connect .connect-desc{padding-right:25px}.wpcom-connect .connect-btn{text-align:center}.module-grid h2{color:#000;font:300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif}.download-jetpack{margin-top:1em !important}#jump-start-area{margin-top:35px;padding-left:60px;padding-right:60px;background:#fefefe;border:1px #dae0e2 solid;padding-bottom:20px;text-align:center}#jump-start-area .connect-btn{text-align:center}#jump-start-area #jumpstart-cta,#jump-start-area .jumpstart-desc{padding:0}#jump-start-area p{font-size:14px;line-height:185%}#jump-start-area .spinner{float:none;margin:0 auto;position:absolute;bottom:0;height:100%;width:100%;background-position:50% 56%;background-color:rgba(254,254,254,0.99);display:block;opacity:.9}.jumpstart-message p{padding-right:25px}.jumpstart-desc{text-align:left}#jumpstart-cta{text-align:center;display:inline-block;float:none}.dismiss-jumpstart{color:#999;font-size:14px}#jumpstart-cta .button,#jumpstart-cta .button-primary{margin:1em;font-size:18px;height:45px !important;padding:8px 15px 1px}#jumpstart-cta .button-primary{display:block;margin:35px 20px 5px 20px}#jp-config-list{position:relative;padding-top:15px;padding-bottom:15px;margin-left:-15px;margin-right:-15px}#jp-config-list .j-col{padding:15px}#jp-config-list strong{display:inline-block}#jp-config-list small{display:block;margin-top:5px;line-height:150%}#jp-config-list .close{position:absolute;top:10px;right:0;text-transform:uppercase;font-weight:bold;display:block;z-index:5}.jp-config-status{text-transform:uppercase;font-size:10px;font-weight:bold;line-height:100%;color:#fff;background:#9fbd72;border-radius:2px;padding:2px 4px;display:inline-block}.nux-intro h3{background:#81a844;color:#fff;font-weight:600;padding:.75em;margin:0}.nux-intro h4{margin:0 0 2px 0}.nux-intro p{text-align:center;font-size:1.24em;line-height:175%}.nux-intro a{transition:all .4s ease}.nux-intro .j-col{padding:0 0.5em}.nux-intro .j-col:first-of-type{padding-left:0}.nux-intro .j-col:last-of-type{padding-right:0}.nux-intro .nux-in{background:#ececec;-webkit-border-bottom-right-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-bottomleft:6px;border-bottom-right-radius:6px;border-bottom-left-radius:6px}.nux-intro .nux-in h3{font-size:1.10em;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border-top-left-radius:6px;border-top-right-radius:6px}.nux-intro .nux-in h3 .dashicons{float:right;color:#658435;font-size:1.25em;padding-left:0}.nux-intro .nux-in h3 .dashicons:hover{color:#57722e}.nux-intro .nux-in p{font-size:.9em;line-height:150%;margin:0;text-align:left;color:#686f72}.nux-intro .nux-in .j-row{border-bottom:1px #f9f9f9 solid;padding:5px 0;position:relative;min-height:70px}.nux-intro .nux-in .j-row:hover{background:#e0e0e0}.nux-intro .nux-in .unavailable{opacity:0.5}.nux-intro .nux-in .unavailable .act{display:none}.nux-intro .nux-in .paid{top:4px;margin-left:12px}.nux-intro .nux-in .dashicons{color:#81a844;font-size:1em;position:relative;top:3px;padding-left:6px}.nux-intro .nux-in .dashicons:hover{color:#57722e}.nux-intro .nux-in .dashicons-external{font-size:1.5em;top:2px;padding-left:3px}.nux-intro .nux-in .lmore{font-size:11px;color:#81a844}.nux-intro .nux-in .lmore:hover{color:#57722e}.nux-intro .feat.j-col{padding:10px 2px 10px 10px}.nux-intro .feat .dashicons{display:none}.nux-intro .activated .feat .dashicons{display:inline-block}.nux-intro .act{position:absolute;top:50%;-ms-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%);right:8px;float:right}.nux-intro .act.j-col{padding:5px;text-align:right}.nux-intro .module-action{text-transform:uppercase;font-size:.85em;font-weight:600}.nux-intro .wpcom h3{background:#0087be}.nux-intro .wpcom h3 .dashicons{color:#00638b}.nux-intro .wpcom h3 .dashicons:hover{color:#005172}.nux-intro .wpcom .j-col{padding:10px}.nux-intro .wpcom .goto{text-align:center;padding:1em}.nux-intro .wpcom .goto:hover{background:#ececec}.nux-intro .wpcom .goto .j-col{padding:0 5px}.nux-intro .wpcom .goto a{width:100%;padding:.25em;height:auto}.nux-intro .wpcom .goto .button{height:auto;min-height:28px;line-height:18px;white-space:normal;max-width:200px;margin-bottom:0;padding-top:4px;padding-bottom:5px}.nux-intro .wpcom .goto .feat{position:absolute;top:50%;-ms-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.nux-intro .nux-foot .j-col{padding:1em}.nux-foot{margin-top:2em;background:#ececec;border-radius:6px}.nux-foot .j-col{min-height:75px;padding:1em}@media (max-width: 650px){.nux-foot .j-col{width:100%}}.nux-foot .j-col+.j-col{border-left:1px #f9f9f9 solid}@media (max-width: 650px){.nux-foot .j-col+.j-col{border-left:none;border-top:1px #f9f9f9 solid}}.nux-foot .actions{margin-top:1em}.nux-foot a{text-decoration:underline}.nux-foot img{float:right;margin-left:1em;width:75px;border-radius:4px}.nux-foot p{font-size:.9em;text-align:left;font-weight:600;margin-top:0}.nux-foot p+p{font-weight:400;margin-bottom:0}.nux-foot ul{font-size:.9em;margin-bottom:0}.nux-foot ul li{margin-right:.875em;margin-bottom:0;line-height:175%;display:inline-block;vertical-align:middle}.form-toggle[type="checkbox"]{opacity:0;position:absolute}.form-toggle__switch{position:relative;display:inline-block;border-radius:12px;-moz-box-sizing:border-box;box-sizing:border-box;padding:2px;width:40px;height:24px;background:#b9b9b9;vertical-align:middle;outline:0;cursor:pointer;transition:all .4s ease}.form-toggle__switch:before,.form-toggle__switch:after{position:relative;display:block;content:"";width:20px;height:20px}.form-toggle__switch:after{left:0;border-radius:50%;background:#fff;transition:all .2s ease}.form-toggle__switch:before{display:none}.form-toggle__switch:hover{background:#bdd597}.form-toggle__label{cursor:pointer}.plugin-action__label{padding-right:5px;top:-1px;position:relative;color:#8e9598}.activated .plugin-action__label{color:#81a844}.form-toggle:focus+.form-toggle__label .form-toggle__switch,.form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #0087be}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#81a844}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{left:16px}.form-toggle:checked:hover+.form-toggle__label .form-toggle__switch{background:#bdd597}.form-toggle:disabled+.form-toggle__label .form-toggle__switch,.form-toggle:disabled:hover+.form-toggle__label .form-toggle__switch{background:#e9eff3}.form-toggle.is-toggling+.form-toggle__label .form-toggle__switch{background:#81a844}.form-toggle.is-toggling:checked+.form-toggle__label .form-toggle__switch{background:#bdd597}.form-toggle.is-compact+.form-toggle__label .form-toggle__switch{border-radius:8px;width:24px;height:16px}.form-toggle.is-compact+.form-toggle__label .form-toggle__switch:before,.form-toggle.is-compact+.form-toggle__label .form-toggle__switch:after{width:12px;height:12px}.form-toggle.is-compact:checked+.form-toggle__label .form-toggle__switch:after{left:8px}@media (max-width: 1147px){.jp-content .landing{padding:0 2em}.jp-content .footer{padding-top:1.5em}.nux-intro .main-col{width:50%;margin-bottom:2em}.nux-intro .main-col.wpcom{width:100%}.nux-intro .main-col+.main-col{padding-right:0}.nux-intro .wpcom{padding:0}.nux-intro .wpcom .j-row{width:50%;float:left;border-bottom:1px #f9f9f9 solid;border-right:1px #f9f9f9 solid}.nux-intro .wpcom .j-row:last-of-type{width:100%;float:none;clear:both;border:none;border-top:1px #f9f9f9 solid;position:relative;top:-1px}.nux-intro .wpcom .goto .feat a{float:left}.nux-foot .j-col{border:none}}@media (max-width: 900px){.nux-intro .main-col{width:100%;padding:0;margin-bottom:2em}.nux-intro .wpcom .j-row{width:100%;float:none}}@media (max-width: 782px){#jumpstart-cta .button-primary{margin:10px 0 5px 0}#jump-start-area .spinner{background-position:50% 35%}}@media (max-width: 600px){.nux-intro h1{font-size:1.75em}.nux-intro p{font-size:1em}}@media (max-width: 530px){.jp-content .landing{padding:0 .5em}#jump-start-area{padding:0 1em}.jumpstart-message p{padding-right:0}#jumpstart-cta .button-primary{margin:0 0 5px 0;padding-bottom:10px}.footer .a8c-attribution a:after{top:6px}}.nav-horizontal:before,.features:before,.modules:before,.load-more:before,.nav-horizontal:after,.features:after,.modules:after,.load-more:after{content:"";display:table}.nav-horizontal:after,.features:after,.modules:after,.load-more:after{clear:both}
/*# sourceMappingURL=jetpack-admin.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-admin.min.css.map b/plugins/jetpack/css/jetpack-admin.min.css.map
index 14405feb..c6ec2e68 100644
--- a/plugins/jetpack/css/jetpack-admin.min.css.map
+++ b/plugins/jetpack/css/jetpack-admin.min.css.map
@@ -1 +1 @@
-{"version":3,"sources":["../scss/_utilities/_grid.scss","../scss/_utilities/mixins/_breakpoint.scss","../scss/atoms/typography/_typography.scss","../scss/atoms/_media.scss","../scss/atoms/_animations.scss","../scss/atoms/_buttons.scss","../scss/atoms/icons/_automatticons.scss","../scss/atoms/icons/_jetpack.scss","../scss/molecules/_nav-horizontal.scss","../scss/templates/_main.scss","../scss/atoms/colors/_colors.scss","../scss/templates/_settings.scss","../scss/pages/_protect.scss","../scss/templates/_module-overhaul.scss","../scss/_utilities/_clearings.scss"],"names":[],"mappings":"AAKA,OACC,WACA,CAAA,aACA,CAAA,0BAEC,YACA,CAAA,aAGD,CAAA,YACC,WAIF,CAAA,MACC,eACA,CAAA,UACA,CAAA,UACA,CAAA,iBAID,CAAA,kBACC,QAAU,eACV,CAAA,OAAU,gBACV,CAAA,OAAU,UACV,CAA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,CAAA,cACA,CAAA,gBAED,CAAA,sBACC,kBACA,CAAA,QACA,CAAA,OACA,CAAA,wBACA,CAAA,gBACA,CAAA,aACA,CAAA,SAIF,CAAA,iBACC,yBACA,CAAA,cACA,CAAA,gBACA,CAAA,gBACA,CAAA,UACA,CAAA,kBACA,CAAA,iBACA,CAAA,eACA,CAAA,oBAGD,CAAA,OACC,aACA,CAAA,cACA,CAAA,WACA,CAAA,aACA,CAAA,MACA,CAAA,SACA,CAAA,4CACA,CAAA,oCAGD,CAAA,oBACC,SACA,CAAA,WACA,CAAA,YACA,CAAA,+BACA,CAAA,uBACA,CAAA,0BACA,CAAA,kBAGD,CAAA,oBACC,SACA,CAAA,UACA,CAAA,WACA,CAAA,+BACA,CAAA,uBACA,CAAA,0BACA,CAAA,kBAGD,CAAA,2BACC,GACC,6CACA,CAAA,oCAED,CAAA,IACC,kDACA,CAAA,yCAA0C,CAAA,AAG5C,CAAA,mBACC,GACC,6CACA,CAAA,oCAED,CAAA,IACC,kDACA,CAAA,yCAA0C,CZhMzC,AYgMyC,CZhMzC,0BYwMD,qBACC,cAED,CAAA,mBACC,kBAAkB,CZ5MlB,AY4MkB,CZ5MlB,yBYoNF,+BACC,oBAGD,CAAA,yBACC,4BAA4B,CZzN3B,AYyN2B,CZzN3B,yBYiOD,qBACC,eAIF,CAAA,gBACC,cAIA,CAAA,oBACC,gBAIF,CAAA,8BACC,iBACA,CAAA,mBAGD,CAAA,gCACC,QAAQ,CC1QT,AD0QS,CC1QT,+IACC,WACA,CAAA,aAED,CAAA,qEACC,WAAW,CAAA","file":"jetpack-admin.min.css"} \ No newline at end of file
+{"version":3,"sources":["../scss/_utilities/_grid.scss","../scss/_utilities/mixins/_breakpoint.scss","../scss/atoms/typography/_typography.scss","../scss/atoms/_media.scss","../scss/atoms/_animations.scss","../scss/atoms/_buttons.scss","../scss/atoms/icons/_automatticons.scss","../scss/atoms/icons/_jetpack.scss","../scss/molecules/_nav-horizontal.scss","../scss/templates/_main.scss","../scss/atoms/colors/_colors.scss","../scss/templates/_settings.scss","../scss/pages/_protect.scss","../scss/pages/_connection.scss","../scss/pages/_manage.scss","../scss/templates/_nux-landing-2015.scss","../scss/_utilities/_clearings.scss"],"names":[],"mappings":"AAKA,OACC,WACA,CAAA,aACA,CAAA,0BAEC,YACA,CAAA,aAGD,CAAA,YACC,WAIF,CAAA,MACC,eACA,CAAA,UACA,CAAA,UACA,CAAA,iBAID,CAAA,kBACC,QAAU,eACV,CAAA,OAAU,gBACV,CAAA,OAAU,UACV,CAAA,OAAU,gBACV,CAAA,OAAU,gBACV,CAAA,OAAU,UACV,CAAA,OAAU,gBACV,CAAA,OAAU,gBACV,CAAA,OAAU,UACV,CAAA,QAAU,gBACV,CAAA,QAAU,gBACV,CAAA,QAAU,WAAW,CAAA,ACCnB,CAAA,yBDKF,QAAU,eACV,CAAA,OAAU,gBACV,CAAA,OAAU,UACV,CAAA,OAAU,gBACV,CAAA,OAAU,gBACV,CAAA,OAAU,UACV,CAAA,OAAU,gBACV,CAAA,OAAU,gBACV,CAAA,OAAU,UACV,CAAA,QAAU,gBACV,CAAA,QAAU,gBACV,CAAA,QAAU,WAAW,CAAA,AChBnB,CAAA,yBDsBF,SAAU,eACV,CAAA,QAAU,gBACV,CAAA,QAAU,UACV,CAAA,QAAU,gBACV,CAAA,QAAU,gBACV,CAAA,QAAU,UACV,CAAA,QAAU,gBACV,CAAA,QAAU,gBACV,CAAA,QAAU,UACV,CAAA,SAAW,gBACX,CAAA,SAAW,gBACX,CAAA,SAAW,WAAW,CAAA,AEjEvB,CAAA,iCAKC,WACA,CAAA,kDACA,CAAA,cACA,CAAA,eACA,CAAA,kCAQD,CAAA,iBAMC,WACA,CAAA,UAQD,CAAA,CACC,cACA,CAAA,oBACA,CAAA,oBAEA,CAAA,SACC,cAED,CAAA,OACC,cAED,CAAA,OACC,oBASF,CAAA,OACC,iBAOD,CAAA,mBAEC,YAGD,CAAA,GACC,gBACA,CAAA,oBAOD,CAAA,EACC,gB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AAA,WACA,CAAA,8IACC,WACA,CAAA,WAIF,CAAA,8EACC,SdjhBE,CAAA,0Bc4hBD,qBACC,cAED,CAAA,mBACC,kBAKD,CAAA,oBACC,UACA,CAAA,iBACA,CAAA,0BACC,WAGF,CAAA,8BACC,gBAED,CAAA,iBACC,UAEA,CAAA,wBACC,UACA,CAAA,UACA,CAAA,+BACA,CAAA,8BACA,CAAA,qCACC,WACA,CAAA,UACA,CAAA,UACA,CAAA,WACA,CAAA,4BACA,CAAA,iBACA,CAAA,QAID,CAAA,+BACC,WAOH,CAAA,gBACC,YAAY,Cd3kBZ,Ac2kBY,Cd3kBZ,yBcqlBD,qBACC,WACA,CAAA,SACA,CAAA,iBAGA,CAAA,wBACC,WACA,CAAA,UAAW,Cd7lBZ,Ac6lBY,Cd7lBZ,yBcsmBF,+BACC,oBAGD,CAAA,yBACC,4BAA4B,Cd3mB3B,Ac2mB2B,Cd3mB3B,yBcmnBD,cACC,iBAED,CAAA,YACC,cAAc,CdvnBd,AcunBc,CdvnBd,yBcgoBD,qBACC,eAIF,CAAA,gBACC,cAIA,CAAA,oBACC,gBAIF,CAAA,8BACC,iBACA,CAAA,mBAGD,CAAA,gCACC,QAAQ,CCzqBT,ADyqBS,CCzqBT,+IACC,WACA,CAAA,aAED,CAAA,qEACC,WAAW,CAAA","file":"jetpack-admin.min.css"} \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-banners-rtl.css b/plugins/jetpack/css/jetpack-banners-rtl.css
index 5a52066c..9a6388f7 100644
--- a/plugins/jetpack/css/jetpack-banners-rtl.css
+++ b/plugins/jetpack/css/jetpack-banners-rtl.css
@@ -2,6 +2,74 @@
* Do not modify this file directly. It is compiled Sass code.
* @see: jetpack/_inc/jetpack.scss
*/
+#message.jp-identity-crisis {
+ display: table;
+ padding: 0;
+ background: #d94f4f;
+ border: none;
+ color: #fff;
+}
+#message.jp-identity-crisis .service-mark {
+ display: table-cell;
+ vertical-align: middle;
+ padding: 0 20px;
+}
+#message.jp-identity-crisis .service-mark:before {
+ font-family: "jetpack" !important;
+ content: "\f102";
+ font-size: 40px;
+ line-height: 1;
+ color: #fff;
+}
+#message.jp-identity-crisis .jp-id-banner__content {
+ display: table;
+ padding: 10px 0 10px 10px;
+}
+#message.jp-identity-crisis .jp-id-banner__content .success-notice {
+ color: #fff;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content {
+ display: table-row;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content p {
+ margin: 0;
+ font-size: 13px;
+ color: #fff;
+ opacity: 1.0;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content p strong {
+ text-decoration: none;
+ font-weight: 600;
+ color: #fff;
+ opacity: 1.0;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content a {
+ display: inline-block;
+ color: rgba(255, 255, 255, 0.8);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ -webkit-transform: all 1s ease;
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group {
+ display: table-row;
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a {
+ display: inline-block;
+ margin: 10px 0 0 0;
+ padding: 0 0 1px 0;
+ color: rgba(255, 255, 255, 0.8);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ -webkit-transform: all 1s ease;
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a:hover {
+ color: white;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.8);
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group .idc-separator {
+ margin: 0 6px;
+}
+
#message.jp-banner {
position: relative;
margin-bottom: 26px;
@@ -32,7 +100,7 @@
#message.jp-banner a {
color: #fff;
}
-#message.jp-banner h4 {
+#message.jp-banner h2 {
display: block;
margin: 0;
padding: 0;
@@ -41,7 +109,7 @@
line-height: 1.3;
font-weight: normal;
}
-#message.jp-banner h4 + p {
+#message.jp-banner h2 + p {
margin-top: 10px;
}
@@ -54,9 +122,6 @@
padding: 0 20px 0 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
- width: 75%;
-}
-#message .jp-banner__content.is-connection {
width: 50%;
}
@media (max-width: 768px) {
@@ -68,16 +133,19 @@
}
}
#message .jp-banner__content a {
- background-image: linear-gradient(to bottom, transparent 75%, #fff 50%);
- background-repeat: repeat-x;
- background-size: 2px 2px;
- background-position: 0 1.2em;
-}
-@media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2) {
- #message .jp-banner__content a {
- background-image: linear-gradient(to bottom, transparent 75%, #fff 75%);
- background-repeat: repeat-x;
- }
+ text-decoration: underline;
+ /* Medium.com text underline hack - doesn't work well on small mobile devices... reverting to traditional underline
+ background-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #fff 50%);
+ background-repeat: repeat-x;
+ background-size: 2px 2px;
+ background-position: 0 95%;
+ display: inline-block;
+
+ @media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2) {
+ background-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #fff 75%);
+ background-repeat: repeat-x;
+ }
+ */
}
#message .jp-banner__content p {
margin: 0;
@@ -90,7 +158,7 @@
top: 0;
left: 0;
padding-right: 20px;
- width: 25%;
+ width: 50%;
height: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
@@ -108,15 +176,24 @@
width: 100%;
height: auto;
}
-#message .jp-banner__action-container.is-connection {
- width: 50%;
-}
@media (max-width: 768px) {
#message .jp-banner__action-container.is-connection {
width: 100%;
}
}
+#message.is-opt-in .jp-banner__content {
+ width: 60%;
+}
+#message.is-opt-in .jp-banner__action-container {
+ width: 40%;
+}
+@media (max-width: 768px) {
+ #message.is-opt-in .jp-banner__content, #message.is-opt-in .jp-banner__action-container {
+ width: 100%;
+ }
+}
+
#message .jp-banner__button {
display: inline-block;
position: absolute;
@@ -132,7 +209,7 @@
font: 400 1.5em/1 'Open Sans', Helvetica, sans-serif;
transition: all .1s ease-in-out;
}
-@media (max-width: 1080px) {
+@media (max-width: 1175px) {
#message .jp-banner__button {
font-size: 1.25em;
left: 110px;
@@ -224,7 +301,35 @@
outline: none;
}
+#message.jp-banner.protect-error {
+ background: #fff;
+ border-right: 4px #d94f4f solid;
+}
+#message.jp-banner.protect-error .jp-banner__content {
+ color: #444;
+}
+#message.jp-banner.protect-error .jp-banner__content h2, #message.jp-banner.protect-error .jp-banner__content a {
+ color: #d94f4f;
+}
+#message.jp-banner.protect-error .jp-banner__content a:hover {
+ color: #d43a3a;
+}
+#message.jp-banner.protect-error .jp-banner__button {
+ background: #d94f4f;
+ box-shadow: none;
+ color: #fff;
+}
+#message.jp-banner.protect-error .jp-banner__button:hover, #message.jp-banner.protect-error .jp-banner__button:focus, #message.jp-banner.protect-error .jp-banner__button:active {
+ box-shadow: none;
+}
+#message.jp-banner.protect-error .jp-banner__button:hover {
+ background: #d43a3a;
+}
+#message.jp-banner.protect-error .jp-banner__dismiss:before {
+ color: #a0a5aa;
+}
+
/*# sourceMappingURL=jetpack-banners.css.map */
-#message.jp-banner{position:relative;margin-bottom:26px;padding:17px 0 17px 44px;border:none;background:#81a844;color:#fff;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}#message.jp-banner:after{content:'';position:absolute;bottom:0;left:-100px;width:100%;height:50px;background:url("../images/the-footcloud.svg") left bottom no-repeat;pointer-events:none;z-index:1}@media (max-width: 830px){#message.jp-banner:after{display:none}}#message.jp-banner a{color:#fff}#message.jp-banner h4{display:block;margin:0;padding:0;color:#fff;font-size:20px;line-height:1.3;font-weight:normal}#message.jp-banner h4+p{margin-top:10px}.jp-banner a{padding:0}#message .jp-banner__content{color:#dfffcc;padding:0 20px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;width:75%}#message .jp-banner__content.is-connection{width:50%}@media (max-width: 768px){#message .jp-banner__content{width:100%}#message .jp-banner__content.is-connection{width:100%}}#message .jp-banner__content a{background-image:linear-gradient(to bottom, transparent 75%, #fff 50%);background-repeat:repeat-x;background-size:2px 2px;background-position:0 1.2em}@media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2){#message .jp-banner__content a{background-image:linear-gradient(to bottom, transparent 75%, #fff 75%);background-repeat:repeat-x}}#message .jp-banner__content p{margin:0;padding:0;line-height:1.5}#message .jp-banner__action-container{position:absolute;top:0;left:0;padding-right:20px;width:25%;height:100%;-moz-box-sizing:border-box;box-sizing:border-box}@media (max-width: 768px){#message .jp-banner__action-container{position:static;margin:14px 0 9px;width:100%}}#message .jp-banner__action-container.is-full-width{position:static;margin:14px 0 9px;width:100%;height:auto}#message .jp-banner__action-container.is-connection{width:50%}@media (max-width: 768px){#message .jp-banner__action-container.is-connection{width:100%}}#message .jp-banner__button{display:inline-block;position:absolute;top:50%;left:125px;margin-top:-23px;padding:0.57143em 0.57143em 0.38095em 0.85714em;border-radius:6px;-moz-box-sizing:border-box;box-sizing:border-box;background:#518d2a;box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2);font:400 1.5em/1 'Open Sans', Helvetica, sans-serif;transition:all .1s ease-in-out}@media (max-width: 1080px){#message .jp-banner__button{font-size:1.25em;left:110px}}@media (max-width: 830px){#message .jp-banner__button{left:45px}}@media (max-width: 768px){#message .jp-banner__button{position:static;margin:0}}@media (max-width: 420px){#message .jp-banner__button{display:block;width:100%;text-align:center;font-size:1.1em;left:0}}#message .jp-banner__button:hover,#message .jp-banner__button:focus{box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2)}#message .jp-banner__button:active{outline:none;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px);box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.2)}#message .jp-banner__button:active:after{top:-2px}#message .jp-banner__button:before{content:'';display:inline-block;position:relative;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%;top:-2px;margin-left:13px;width:22px;height:22px}@media (max-width: 420px){#message .jp-banner__button:before{display:none}}#message .is-full-width .jp-banner__button{position:static;margin:0}#message .is-opt-in .jp-banner__button:before{content:"\f147";width:20px;height:20px;background:none;font:normal 20px/1 Dashicons}#message .jp-banner__dismiss{position:absolute;top:0;left:0;width:44px;height:44px;text-align:center;z-index:99}#message .jp-banner__dismiss:before{color:#a7c979;content:'\f158';font:normal 20px/44px 'dashicons'}#message .jp-banner__dismiss:hover{opacity:0.8}#message .jp-banner__dismiss:active{opacity:1;outline:none}
+#message.jp-identity-crisis{display:table;padding:0;background:#d94f4f;border:none;color:#fff}#message.jp-identity-crisis .service-mark{display:table-cell;vertical-align:middle;padding:0 20px}#message.jp-identity-crisis .service-mark:before{font-family:"jetpack" !important;content:"\f102";font-size:40px;line-height:1;color:#fff}#message.jp-identity-crisis .jp-id-banner__content{display:table;padding:10px 0 10px 10px}#message.jp-identity-crisis .jp-id-banner__content .success-notice{color:#fff}#message.jp-identity-crisis .jp-id-banner__content .banner-content{display:table-row}#message.jp-identity-crisis .jp-id-banner__content .banner-content p{margin:0;font-size:13px;color:#fff;opacity:1.0}#message.jp-identity-crisis .jp-id-banner__content .banner-content p strong{text-decoration:none;font-weight:600;color:#fff;opacity:1.0}#message.jp-identity-crisis .jp-id-banner__content .banner-content a{display:inline-block;color:rgba(255,255,255,0.8);border-bottom:1px solid rgba(255,255,255,0.5);text-decoration:none;-webkit-transform:all 1s ease}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group{display:table-row}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a{display:inline-block;margin:10px 0 0 0;padding:0 0 1px 0;color:rgba(255,255,255,0.8);border-bottom:1px solid rgba(255,255,255,0.5);text-decoration:none;-webkit-transform:all 1s ease}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a:hover{color:#fff;border-bottom:1px solid rgba(255,255,255,0.8)}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group .idc-separator{margin:0 6px}#message.jp-banner{position:relative;margin-bottom:26px;padding:17px 0 17px 44px;border:none;background:#81a844;color:#fff;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}#message.jp-banner:after{content:'';position:absolute;bottom:0;left:-100px;width:100%;height:50px;background:url("../images/the-footcloud.svg") left bottom no-repeat;pointer-events:none;z-index:1}@media (max-width: 830px){#message.jp-banner:after{display:none}}#message.jp-banner a{color:#fff}#message.jp-banner h2{display:block;margin:0;padding:0;color:#fff;font-size:20px;line-height:1.3;font-weight:normal}#message.jp-banner h2+p{margin-top:10px}.jp-banner a{padding:0}#message .jp-banner__content{color:#dfffcc;padding:0 20px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}@media (max-width: 768px){#message .jp-banner__content{width:100%}#message .jp-banner__content.is-connection{width:100%}}#message .jp-banner__content a{text-decoration:underline}#message .jp-banner__content p{margin:0;padding:0;line-height:1.5}#message .jp-banner__action-container{position:absolute;top:0;left:0;padding-right:20px;width:50%;height:100%;-moz-box-sizing:border-box;box-sizing:border-box}@media (max-width: 768px){#message .jp-banner__action-container{position:static;margin:14px 0 9px;width:100%}}#message .jp-banner__action-container.is-full-width{position:static;margin:14px 0 9px;width:100%;height:auto}@media (max-width: 768px){#message .jp-banner__action-container.is-connection{width:100%}}#message.is-opt-in .jp-banner__content{width:60%}#message.is-opt-in .jp-banner__action-container{width:40%}@media (max-width: 768px){#message.is-opt-in .jp-banner__content,#message.is-opt-in .jp-banner__action-container{width:100%}}#message .jp-banner__button{display:inline-block;position:absolute;top:50%;left:125px;margin-top:-23px;padding:0.57143em 0.57143em 0.38095em 0.85714em;border-radius:6px;-moz-box-sizing:border-box;box-sizing:border-box;background:#518d2a;box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2);font:400 1.5em/1 'Open Sans', Helvetica, sans-serif;transition:all .1s ease-in-out}@media (max-width: 1175px){#message .jp-banner__button{font-size:1.25em;left:110px}}@media (max-width: 830px){#message .jp-banner__button{left:45px}}@media (max-width: 768px){#message .jp-banner__button{position:static;margin:0}}@media (max-width: 420px){#message .jp-banner__button{display:block;width:100%;text-align:center;font-size:1.1em;left:0}}#message .jp-banner__button:hover,#message .jp-banner__button:focus{box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2)}#message .jp-banner__button:active{outline:none;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px);box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.2)}#message .jp-banner__button:active:after{top:-2px}#message .jp-banner__button:before{content:'';display:inline-block;position:relative;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%;top:-2px;margin-left:13px;width:22px;height:22px}@media (max-width: 420px){#message .jp-banner__button:before{display:none}}#message .is-full-width .jp-banner__button{position:static;margin:0}#message .is-opt-in .jp-banner__button:before{content:"\f147";width:20px;height:20px;background:none;font:normal 20px/1 Dashicons}#message .jp-banner__dismiss{position:absolute;top:0;left:0;width:44px;height:44px;text-align:center;z-index:99}#message .jp-banner__dismiss:before{color:#a7c979;content:'\f158';font:normal 20px/44px 'dashicons'}#message .jp-banner__dismiss:hover{opacity:0.8}#message .jp-banner__dismiss:active{opacity:1;outline:none}#message.jp-banner.protect-error{background:#fff;border-right:4px #d94f4f solid}#message.jp-banner.protect-error .jp-banner__content{color:#444}#message.jp-banner.protect-error .jp-banner__content h2,#message.jp-banner.protect-error .jp-banner__content a{color:#d94f4f}#message.jp-banner.protect-error .jp-banner__content a:hover{color:#d43a3a}#message.jp-banner.protect-error .jp-banner__button{background:#d94f4f;box-shadow:none;color:#fff}#message.jp-banner.protect-error .jp-banner__button:hover,#message.jp-banner.protect-error .jp-banner__button:focus,#message.jp-banner.protect-error .jp-banner__button:active{box-shadow:none}#message.jp-banner.protect-error .jp-banner__button:hover{background:#d43a3a}#message.jp-banner.protect-error .jp-banner__dismiss:before{color:#a0a5aa}
/*# sourceMappingURL=jetpack-banners.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-banners-rtl.min.css b/plugins/jetpack/css/jetpack-banners-rtl.min.css
index b7a00569..ab3f37b8 100644
--- a/plugins/jetpack/css/jetpack-banners-rtl.min.css
+++ b/plugins/jetpack/css/jetpack-banners-rtl.min.css
@@ -1,3 +1,3 @@
-#message.jp-banner{position:relative;margin-bottom:26px;padding:17px 0 17px 44px;border:none;background:#81a844;color:#fff;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}#message.jp-banner:after{content:'';position:absolute;bottom:0;left:-100px;width:100%;height:50px;background:url("../images/the-footcloud.svg") left bottom no-repeat;pointer-events:none;z-index:1}@media (max-width: 830px){#message.jp-banner:after{display:none}}#message.jp-banner a{color:#fff}#message.jp-banner h4{display:block;margin:0;padding:0;color:#fff;font-size:20px;line-height:1.3;font-weight:normal}#message.jp-banner h4+p{margin-top:10px}.jp-banner a{padding:0}#message .jp-banner__content{color:#dfffcc;padding:0 20px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;width:75%}#message .jp-banner__content.is-connection{width:50%}@media (max-width: 768px){#message .jp-banner__content{width:100%}#message .jp-banner__content.is-connection{width:100%}}#message .jp-banner__content a{background-image:linear-gradient(to bottom, transparent 75%, #fff 50%);background-repeat:repeat-x;background-size:2px 2px;background-position:0 1.2em}@media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2){#message .jp-banner__content a{background-image:linear-gradient(to bottom, transparent 75%, #fff 75%);background-repeat:repeat-x}}#message .jp-banner__content p{margin:0;padding:0;line-height:1.5}#message .jp-banner__action-container{position:absolute;top:0;left:0;padding-right:20px;width:25%;height:100%;-moz-box-sizing:border-box;box-sizing:border-box}@media (max-width: 768px){#message .jp-banner__action-container{position:static;margin:14px 0 9px;width:100%}}#message .jp-banner__action-container.is-full-width{position:static;margin:14px 0 9px;width:100%;height:auto}#message .jp-banner__action-container.is-connection{width:50%}@media (max-width: 768px){#message .jp-banner__action-container.is-connection{width:100%}}#message .jp-banner__button{display:inline-block;position:absolute;top:50%;left:125px;margin-top:-23px;padding:0.57143em 0.57143em 0.38095em 0.85714em;border-radius:6px;-moz-box-sizing:border-box;box-sizing:border-box;background:#518d2a;box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2);font:400 1.5em/1 'Open Sans', Helvetica, sans-serif;transition:all .1s ease-in-out}@media (max-width: 1080px){#message .jp-banner__button{font-size:1.25em;left:110px}}@media (max-width: 830px){#message .jp-banner__button{left:45px}}@media (max-width: 768px){#message .jp-banner__button{position:static;margin:0}}@media (max-width: 420px){#message .jp-banner__button{display:block;width:100%;text-align:center;font-size:1.1em;left:0}}#message .jp-banner__button:hover,#message .jp-banner__button:focus{box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2)}#message .jp-banner__button:active{outline:none;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px);box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.2)}#message .jp-banner__button:active:after{top:-2px}#message .jp-banner__button:before{content:'';display:inline-block;position:relative;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%;top:-2px;margin-left:13px;width:22px;height:22px}@media (max-width: 420px){#message .jp-banner__button:before{display:none}}#message .is-full-width .jp-banner__button{position:static;margin:0}#message .is-opt-in .jp-banner__button:before{content:"\f147";width:20px;height:20px;background:none;font:normal 20px/1 Dashicons}#message .jp-banner__dismiss{position:absolute;top:0;left:0;width:44px;height:44px;text-align:center;z-index:99}#message .jp-banner__dismiss:before{color:#a7c979;content:'\f158';font:normal 20px/44px 'dashicons'}#message .jp-banner__dismiss:hover{opacity:0.8}#message .jp-banner__dismiss:active{opacity:1;outline:none}
+#message.jp-identity-crisis{display:table;padding:0;background:#d94f4f;border:none;color:#fff}#message.jp-identity-crisis .service-mark{display:table-cell;vertical-align:middle;padding:0 20px}#message.jp-identity-crisis .service-mark:before{font-family:"jetpack" !important;content:"\f102";font-size:40px;line-height:1;color:#fff}#message.jp-identity-crisis .jp-id-banner__content{display:table;padding:10px 0 10px 10px}#message.jp-identity-crisis .jp-id-banner__content .success-notice{color:#fff}#message.jp-identity-crisis .jp-id-banner__content .banner-content{display:table-row}#message.jp-identity-crisis .jp-id-banner__content .banner-content p{margin:0;font-size:13px;color:#fff;opacity:1.0}#message.jp-identity-crisis .jp-id-banner__content .banner-content p strong{text-decoration:none;font-weight:600;color:#fff;opacity:1.0}#message.jp-identity-crisis .jp-id-banner__content .banner-content a{display:inline-block;color:rgba(255,255,255,0.8);border-bottom:1px solid rgba(255,255,255,0.5);text-decoration:none;-webkit-transform:all 1s ease}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group{display:table-row}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a{display:inline-block;margin:10px 0 0 0;padding:0 0 1px 0;color:rgba(255,255,255,0.8);border-bottom:1px solid rgba(255,255,255,0.5);text-decoration:none;-webkit-transform:all 1s ease}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a:hover{color:#fff;border-bottom:1px solid rgba(255,255,255,0.8)}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group .idc-separator{margin:0 6px}#message.jp-banner{position:relative;margin-bottom:26px;padding:17px 0 17px 44px;border:none;background:#81a844;color:#fff;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}#message.jp-banner:after{content:'';position:absolute;bottom:0;left:-100px;width:100%;height:50px;background:url("../images/the-footcloud.svg") left bottom no-repeat;pointer-events:none;z-index:1}@media (max-width: 830px){#message.jp-banner:after{display:none}}#message.jp-banner a{color:#fff}#message.jp-banner h2{display:block;margin:0;padding:0;color:#fff;font-size:20px;line-height:1.3;font-weight:normal}#message.jp-banner h2+p{margin-top:10px}.jp-banner a{padding:0}#message .jp-banner__content{color:#dfffcc;padding:0 20px 0 0;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}@media (max-width: 768px){#message .jp-banner__content{width:100%}#message .jp-banner__content.is-connection{width:100%}}#message .jp-banner__content a{text-decoration:underline}#message .jp-banner__content p{margin:0;padding:0;line-height:1.5}#message .jp-banner__action-container{position:absolute;top:0;left:0;padding-right:20px;width:50%;height:100%;-moz-box-sizing:border-box;box-sizing:border-box}@media (max-width: 768px){#message .jp-banner__action-container{position:static;margin:14px 0 9px;width:100%}}#message .jp-banner__action-container.is-full-width{position:static;margin:14px 0 9px;width:100%;height:auto}@media (max-width: 768px){#message .jp-banner__action-container.is-connection{width:100%}}#message.is-opt-in .jp-banner__content{width:60%}#message.is-opt-in .jp-banner__action-container{width:40%}@media (max-width: 768px){#message.is-opt-in .jp-banner__content,#message.is-opt-in .jp-banner__action-container{width:100%}}#message .jp-banner__button{display:inline-block;position:absolute;top:50%;left:125px;margin-top:-23px;padding:0.57143em 0.57143em 0.38095em 0.85714em;border-radius:6px;-moz-box-sizing:border-box;box-sizing:border-box;background:#518d2a;box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2);font:400 1.5em/1 'Open Sans', Helvetica, sans-serif;transition:all .1s ease-in-out}@media (max-width: 1175px){#message .jp-banner__button{font-size:1.25em;left:110px}}@media (max-width: 830px){#message .jp-banner__button{left:45px}}@media (max-width: 768px){#message .jp-banner__button{position:static;margin:0}}@media (max-width: 420px){#message .jp-banner__button{display:block;width:100%;text-align:center;font-size:1.1em;left:0}}#message .jp-banner__button:hover,#message .jp-banner__button:focus{box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2)}#message .jp-banner__button:active{outline:none;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px);box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.2)}#message .jp-banner__button:active:after{top:-2px}#message .jp-banner__button:before{content:'';display:inline-block;position:relative;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%;top:-2px;margin-left:13px;width:22px;height:22px}@media (max-width: 420px){#message .jp-banner__button:before{display:none}}#message .is-full-width .jp-banner__button{position:static;margin:0}#message .is-opt-in .jp-banner__button:before{content:"\f147";width:20px;height:20px;background:none;font:normal 20px/1 Dashicons}#message .jp-banner__dismiss{position:absolute;top:0;left:0;width:44px;height:44px;text-align:center;z-index:99}#message .jp-banner__dismiss:before{color:#a7c979;content:'\f158';font:normal 20px/44px 'dashicons'}#message .jp-banner__dismiss:hover{opacity:0.8}#message .jp-banner__dismiss:active{opacity:1;outline:none}#message.jp-banner.protect-error{background:#fff;border-right:4px #d94f4f solid}#message.jp-banner.protect-error .jp-banner__content{color:#444}#message.jp-banner.protect-error .jp-banner__content h2,#message.jp-banner.protect-error .jp-banner__content a{color:#d94f4f}#message.jp-banner.protect-error .jp-banner__content a:hover{color:#d43a3a}#message.jp-banner.protect-error .jp-banner__button{background:#d94f4f;box-shadow:none;color:#fff}#message.jp-banner.protect-error .jp-banner__button:hover,#message.jp-banner.protect-error .jp-banner__button:focus,#message.jp-banner.protect-error .jp-banner__button:active{box-shadow:none}#message.jp-banner.protect-error .jp-banner__button:hover{background:#d43a3a}#message.jp-banner.protect-error .jp-banner__dismiss:before{color:#a0a5aa}
/*# sourceMappingURL=jetpack-banners.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-banners.css b/plugins/jetpack/css/jetpack-banners.css
index e230ba18..e6488660 100644
--- a/plugins/jetpack/css/jetpack-banners.css
+++ b/plugins/jetpack/css/jetpack-banners.css
@@ -2,6 +2,74 @@
* Do not modify this file directly. It is compiled Sass code.
* @see: jetpack/_inc/jetpack.scss
*/
+#message.jp-identity-crisis {
+ display: table;
+ padding: 0;
+ background: #d94f4f;
+ border: none;
+ color: #fff;
+}
+#message.jp-identity-crisis .service-mark {
+ display: table-cell;
+ vertical-align: middle;
+ padding: 0 20px;
+}
+#message.jp-identity-crisis .service-mark:before {
+ font-family: "jetpack" !important;
+ content: "\f102";
+ font-size: 40px;
+ line-height: 1;
+ color: #fff;
+}
+#message.jp-identity-crisis .jp-id-banner__content {
+ display: table;
+ padding: 10px 10px 10px 0;
+}
+#message.jp-identity-crisis .jp-id-banner__content .success-notice {
+ color: #fff;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content {
+ display: table-row;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content p {
+ margin: 0;
+ font-size: 13px;
+ color: #fff;
+ opacity: 1.0;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content p strong {
+ text-decoration: none;
+ font-weight: 600;
+ color: #fff;
+ opacity: 1.0;
+}
+#message.jp-identity-crisis .jp-id-banner__content .banner-content a {
+ display: inline-block;
+ color: rgba(255, 255, 255, 0.8);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ -webkit-transform: all 1s ease;
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group {
+ display: table-row;
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a {
+ display: inline-block;
+ margin: 10px 0 0 0;
+ padding: 0 0 1px 0;
+ color: rgba(255, 255, 255, 0.8);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ -webkit-transform: all 1s ease;
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a:hover {
+ color: white;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.8);
+}
+#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group .idc-separator {
+ margin: 0 6px;
+}
+
#message.jp-banner {
position: relative;
margin-bottom: 26px;
@@ -32,7 +100,7 @@
#message.jp-banner a {
color: #fff;
}
-#message.jp-banner h4 {
+#message.jp-banner h2 {
display: block;
margin: 0;
padding: 0;
@@ -41,7 +109,7 @@
line-height: 1.3;
font-weight: normal;
}
-#message.jp-banner h4 + p {
+#message.jp-banner h2 + p {
margin-top: 10px;
}
@@ -54,9 +122,6 @@
padding: 0 0 0 20px;
-moz-box-sizing: border-box;
box-sizing: border-box;
- width: 75%;
-}
-#message .jp-banner__content.is-connection {
width: 50%;
}
@media (max-width: 768px) {
@@ -68,16 +133,19 @@
}
}
#message .jp-banner__content a {
- background-image: linear-gradient(to bottom, transparent 75%, #fff 50%);
- background-repeat: repeat-x;
- background-size: 2px 2px;
- background-position: 0 1.2em;
-}
-@media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2) {
- #message .jp-banner__content a {
- background-image: linear-gradient(to bottom, transparent 75%, #fff 75%);
- background-repeat: repeat-x;
- }
+ text-decoration: underline;
+ /* Medium.com text underline hack - doesn't work well on small mobile devices... reverting to traditional underline
+ background-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #fff 50%);
+ background-repeat: repeat-x;
+ background-size: 2px 2px;
+ background-position: 0 95%;
+ display: inline-block;
+
+ @media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2) {
+ background-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #fff 75%);
+ background-repeat: repeat-x;
+ }
+ */
}
#message .jp-banner__content p {
margin: 0;
@@ -90,7 +158,7 @@
top: 0;
right: 0;
padding-left: 20px;
- width: 25%;
+ width: 50%;
height: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
@@ -108,15 +176,24 @@
width: 100%;
height: auto;
}
-#message .jp-banner__action-container.is-connection {
- width: 50%;
-}
@media (max-width: 768px) {
#message .jp-banner__action-container.is-connection {
width: 100%;
}
}
+#message.is-opt-in .jp-banner__content {
+ width: 60%;
+}
+#message.is-opt-in .jp-banner__action-container {
+ width: 40%;
+}
+@media (max-width: 768px) {
+ #message.is-opt-in .jp-banner__content, #message.is-opt-in .jp-banner__action-container {
+ width: 100%;
+ }
+}
+
#message .jp-banner__button {
display: inline-block;
position: absolute;
@@ -132,7 +209,7 @@
font: 400 1.5em/1 'Open Sans', Helvetica, sans-serif;
transition: all .1s ease-in-out;
}
-@media (max-width: 1080px) {
+@media (max-width: 1175px) {
#message .jp-banner__button {
font-size: 1.25em;
right: 110px;
@@ -224,4 +301,32 @@
outline: none;
}
+#message.jp-banner.protect-error {
+ background: #fff;
+ border-left: 4px #d94f4f solid;
+}
+#message.jp-banner.protect-error .jp-banner__content {
+ color: #444;
+}
+#message.jp-banner.protect-error .jp-banner__content h2, #message.jp-banner.protect-error .jp-banner__content a {
+ color: #d94f4f;
+}
+#message.jp-banner.protect-error .jp-banner__content a:hover {
+ color: #d43a3a;
+}
+#message.jp-banner.protect-error .jp-banner__button {
+ background: #d94f4f;
+ box-shadow: none;
+ color: #fff;
+}
+#message.jp-banner.protect-error .jp-banner__button:hover, #message.jp-banner.protect-error .jp-banner__button:focus, #message.jp-banner.protect-error .jp-banner__button:active {
+ box-shadow: none;
+}
+#message.jp-banner.protect-error .jp-banner__button:hover {
+ background: #d43a3a;
+}
+#message.jp-banner.protect-error .jp-banner__dismiss:before {
+ color: #a0a5aa;
+}
+
/*# sourceMappingURL=jetpack-banners.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-banners.css.map b/plugins/jetpack/css/jetpack-banners.css.map
index 8fe8bdae..b3731059 100644
--- a/plugins/jetpack/css/jetpack-banners.css.map
+++ b/plugins/jetpack/css/jetpack-banners.css.map
@@ -1 +1 @@
-{"version":3,"sources":["../scss/organisms/_banners.scss","jetpack-banners.css"],"names":[],"mappings":"AAAA;;;GAGC;ACCD;EDCC,oBAAmB;EACnB,qBAAW;EACX,2BAAgB;EAChB,cAAY;ECCX,qBAAoB;EDCrB,aAAA;EACC,kBAAW;EACX,6BAAkB;EAAlB,wBAAkB;ECCnB;AACD;EDCE,aAAW;EACX,oBAAY;EACZ,WAAU;EACV,eAAc;EACd,aAAU;ECCV,cAAa;EDCb,uEAA4B;EAX7B,sBAAA;ECaC,YDDU;ECEX;AACD;EDAC;IACC,eAAW;ICEV;EDAF;ACED;EDAE,aAAS;ECEV;AACD;EDAE,gBAAe;EACf,WAAA;EACA,YAAW;ECEX,aAAY;EDAZ,iBAAA;EACC,kBAAgB;ECEjB,qBAAoB;EACrB;ADED;EACC,kBAAU;ECAV;;ADGD;EACC,YAAO;ECAP;;AAED;EACE,gBAAe;EDEhB,qBAAA;EACC,6BAAU;EAAV,wBAAU;ECAV,YAAW;EDGZ;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C;ECHA;;AAED;EDMA,kBAAA;EACC,WAAS;ECJT;;AAED;EDMC,kBAAM;ECJL,aAAY;EACZ,cAAa;EDMf,kBAAA;EACC,+BAAkB;ECJlB;;AAED;EDMC,oBAAY;EACZ,QAAA;EACA,UAAS;ECJR,aAAY;EDMb,cAAA;EACC,oBAAc;EACd,aAAS;ECJV;AACD;EDMC,gBAAA;EACC,kBAAY;ECJZ,oCAAmC;EDMpC;ACJD;EDME,cAAa;ECJd;AACD;EACE,YAAW;EACX,eAAc;EACf","file":"jetpack-banners.css"} \ No newline at end of file
+{"version":3,"sources":["../scss/organisms/_banners.scss","jetpack-banners.css"],"names":[],"mappings":"AAAA;;;GAGC;ACCD;EDCC,gBAAW;ECCV,YAAW;EDCZ,qBAAA;EACC,cAAS;EACT,aAAA;ECCD;AACD;EDAE,qBAAA;EACC,wBAAa;EACb,iBAAgB;ECElB;AACD;EDAG,mCAAW;ECEZ,kBAAiB;EDClB,iBAAA;EACC,gBAAc;EACd,aAAS;ECCV;ADCC;EACC,gBAAW;ECCZ,2BAA0B;EDE1B;ACAF;EACE,aAAY;EDEX;ACAH;EDEI,oBAAe;ECAlB;AACD;EACE,WAAU;EDER,iBAAA;EACC,aAAA;EACA,cAAa;ECAjB;AACD;EACE,uBAAsB;EDIrB,kBAAA;EACC,aAAS;EACT,cAAO;ECFV;AACD;EDII,uBAAmB;ECFrB,iCAAgC;EDKhC,mDAAA;EACC,uBAAkB;ECHnB,gCAA+B;EDK9B;ACHH;EDKI,oBAAkB;ECHrB;AACD;EDKI,uBAAe;EACf,oBAAiB;EACjB,oBAAmB;ECHrB,iCAAgC;EDK9B,mDAAA;EACC,uBAA+B;EAC/B,gCAAe;ECHnB;ADOE;EACC,cAAa;ECLf,mDAAkD;EACnD;ADUD;EACC,eAAU;ECRV;;AAED;EDUC,oBAAmB;EACnB,qBAAW;EACX,2BAAgB;EAChB,cAAY;ECRX,qBAAoB;EDUrB,aAAA;EACC,kBAAW;EACX,6BAAkB;EAAlB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AA;ICgBG;EACF;AACD;EACE;IDeA,gBAAQ;ICbN,aAAY;IACZ,oBAAmB;IDctB,kBAAA;IAEC,UAAU;ICbT;EDiBF;ACfD;EDiBE,2DAA0B;ECf3B;AACD;EDmBE,eAAA;EAEC,oCAAS;EAAT,gCAAS;EAAT,4BAAS;EClBV,uDAAsD;EDqBvD;ACnBD;EDqBE,WAAS;ECnBV;AACD;EDqBE,aAAY;EACZ,uBAAqB;EACrB,oBAAS;EACT,wBAAkB;EAClB,uEAAW;EACX,uBAAY;ECnBZ,WAAU;EDqBV,oBAAA;EAZD,aAAA;ECNC,cDmBU;EClBX;AACD;EACE;IDqBF,eAAA;IACC;ECnBA;;AAED;EDsBA,kBAAA;EACC,WAAS;ECpBT;;AAED;EDsBC,kBAAM;ECpBL,aAAY;EACZ,cAAa;EDsBf,kBAAA;EACC,+BAAkB;ECpBlB;;AAED;EDsBC,oBAAY;EACZ,QAAA;EACA,UAAS;ECpBR,aAAY;EDsBb,cAAA;EACC,oBAAc;EACd,aAAS;ECpBV;AACD;EDsBC,gBAAA;EACC,kBAAY;ECpBZ,oCAAmC;EDsBpC;ACpBD;EDsBE,cAAa;ECpBd;AACD;EDyBA,YAAA;EACC,eAAY;ECvBZ;;AD0BA;EACC,kBAAW;ECvBX,gCAA+B;EDwB/B;ACtBF;EACE,aAAY;EDwBZ;ACtBF;EACE,gBAAe;ED0BhB;ACxBD;ED0BE,gBAAY;ECxBb;AACD;ED0BE,qBAAA;EAGC,kBAAgB;EC1BjB,aAAY;ED4BZ;AC1BF;EACE,kBAAiB;ED8BlB;AC5BD;EACE,qBAAoB;EACrB;AACD;EACE,gBAAe;EAChB","file":"jetpack-banners.css"} \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-banners.min.css b/plugins/jetpack/css/jetpack-banners.min.css
index d94a087e..0fd17a8f 100644
--- a/plugins/jetpack/css/jetpack-banners.min.css
+++ b/plugins/jetpack/css/jetpack-banners.min.css
@@ -1,3 +1,3 @@
-#message.jp-banner{position:relative;margin-bottom:26px;padding:17px 44px 17px 0;border:none;background:#81a844;color:#fff;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}#message.jp-banner:after{content:'';position:absolute;bottom:0;right:-100px;width:100%;height:50px;background:url("../images/the-footcloud.svg") right bottom no-repeat;pointer-events:none;z-index:1}@media (max-width: 830px){#message.jp-banner:after{display:none}}#message.jp-banner a{color:#fff}#message.jp-banner h4{display:block;margin:0;padding:0;color:#fff;font-size:20px;line-height:1.3;font-weight:normal}#message.jp-banner h4+p{margin-top:10px}.jp-banner a{padding:0}#message .jp-banner__content{color:#dfffcc;padding:0 0 0 20px;-moz-box-sizing:border-box;box-sizing:border-box;width:75%}#message .jp-banner__content.is-connection{width:50%}@media (max-width: 768px){#message .jp-banner__content{width:100%}#message .jp-banner__content.is-connection{width:100%}}#message .jp-banner__content a{background-image:linear-gradient(to bottom, transparent 75%, #fff 50%);background-repeat:repeat-x;background-size:2px 2px;background-position:0 1.2em}@media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2){#message .jp-banner__content a{background-image:linear-gradient(to bottom, transparent 75%, #fff 75%);background-repeat:repeat-x}}#message .jp-banner__content p{margin:0;padding:0;line-height:1.5}#message .jp-banner__action-container{position:absolute;top:0;right:0;padding-left:20px;width:25%;height:100%;-moz-box-sizing:border-box;box-sizing:border-box}@media (max-width: 768px){#message .jp-banner__action-container{position:static;margin:14px 0 9px;width:100%}}#message .jp-banner__action-container.is-full-width{position:static;margin:14px 0 9px;width:100%;height:auto}#message .jp-banner__action-container.is-connection{width:50%}@media (max-width: 768px){#message .jp-banner__action-container.is-connection{width:100%}}#message .jp-banner__button{display:inline-block;position:absolute;top:50%;right:125px;margin-top:-23px;padding:0.57143em 0.85714em 0.38095em 0.57143em;border-radius:6px;-moz-box-sizing:border-box;box-sizing:border-box;background:#518d2a;box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2);font:400 1.5em/1 'Open Sans', Helvetica, sans-serif;transition:all .1s ease-in-out}@media (max-width: 1080px){#message .jp-banner__button{font-size:1.25em;right:110px}}@media (max-width: 830px){#message .jp-banner__button{right:45px}}@media (max-width: 768px){#message .jp-banner__button{position:static;margin:0}}@media (max-width: 420px){#message .jp-banner__button{display:block;width:100%;text-align:center;font-size:1.1em;right:0}}#message .jp-banner__button:hover,#message .jp-banner__button:focus{box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2)}#message .jp-banner__button:active{outline:none;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px);box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.2)}#message .jp-banner__button:active:after{top:-2px}#message .jp-banner__button:before{content:'';display:inline-block;position:relative;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%;top:-2px;margin-right:13px;width:22px;height:22px}@media (max-width: 420px){#message .jp-banner__button:before{display:none}}#message .is-full-width .jp-banner__button{position:static;margin:0}#message .is-opt-in .jp-banner__button:before{content:"\f147";width:20px;height:20px;background:none;font:normal 20px/1 Dashicons}#message .jp-banner__dismiss{position:absolute;top:0;right:0;width:44px;height:44px;text-align:center;z-index:99}#message .jp-banner__dismiss:before{color:#a7c979;content:'\f158';font:normal 20px/44px 'dashicons'}#message .jp-banner__dismiss:hover{opacity:0.8}#message .jp-banner__dismiss:active{opacity:1;outline:none}
+#message.jp-identity-crisis{display:table;padding:0;background:#d94f4f;border:none;color:#fff}#message.jp-identity-crisis .service-mark{display:table-cell;vertical-align:middle;padding:0 20px}#message.jp-identity-crisis .service-mark:before{font-family:"jetpack" !important;content:"\f102";font-size:40px;line-height:1;color:#fff}#message.jp-identity-crisis .jp-id-banner__content{display:table;padding:10px 10px 10px 0}#message.jp-identity-crisis .jp-id-banner__content .success-notice{color:#fff}#message.jp-identity-crisis .jp-id-banner__content .banner-content{display:table-row}#message.jp-identity-crisis .jp-id-banner__content .banner-content p{margin:0;font-size:13px;color:#fff;opacity:1.0}#message.jp-identity-crisis .jp-id-banner__content .banner-content p strong{text-decoration:none;font-weight:600;color:#fff;opacity:1.0}#message.jp-identity-crisis .jp-id-banner__content .banner-content a{display:inline-block;color:rgba(255,255,255,0.8);border-bottom:1px solid rgba(255,255,255,0.5);text-decoration:none;-webkit-transform:all 1s ease}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group{display:table-row}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a{display:inline-block;margin:10px 0 0 0;padding:0 0 1px 0;color:rgba(255,255,255,0.8);border-bottom:1px solid rgba(255,255,255,0.5);text-decoration:none;-webkit-transform:all 1s ease}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group a:hover{color:#fff;border-bottom:1px solid rgba(255,255,255,0.8)}#message.jp-identity-crisis .jp-id-banner__content .jp-btn-group .idc-separator{margin:0 6px}#message.jp-banner{position:relative;margin-bottom:26px;padding:17px 44px 17px 0;border:none;background:#81a844;color:#fff;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box}#message.jp-banner:after{content:'';position:absolute;bottom:0;right:-100px;width:100%;height:50px;background:url("../images/the-footcloud.svg") right bottom no-repeat;pointer-events:none;z-index:1}@media (max-width: 830px){#message.jp-banner:after{display:none}}#message.jp-banner a{color:#fff}#message.jp-banner h2{display:block;margin:0;padding:0;color:#fff;font-size:20px;line-height:1.3;font-weight:normal}#message.jp-banner h2+p{margin-top:10px}.jp-banner a{padding:0}#message .jp-banner__content{color:#dfffcc;padding:0 0 0 20px;-moz-box-sizing:border-box;box-sizing:border-box;width:50%}@media (max-width: 768px){#message .jp-banner__content{width:100%}#message .jp-banner__content.is-connection{width:100%}}#message .jp-banner__content a{text-decoration:underline}#message .jp-banner__content p{margin:0;padding:0;line-height:1.5}#message .jp-banner__action-container{position:absolute;top:0;right:0;padding-left:20px;width:50%;height:100%;-moz-box-sizing:border-box;box-sizing:border-box}@media (max-width: 768px){#message .jp-banner__action-container{position:static;margin:14px 0 9px;width:100%}}#message .jp-banner__action-container.is-full-width{position:static;margin:14px 0 9px;width:100%;height:auto}@media (max-width: 768px){#message .jp-banner__action-container.is-connection{width:100%}}#message.is-opt-in .jp-banner__content{width:60%}#message.is-opt-in .jp-banner__action-container{width:40%}@media (max-width: 768px){#message.is-opt-in .jp-banner__content,#message.is-opt-in .jp-banner__action-container{width:100%}}#message .jp-banner__button{display:inline-block;position:absolute;top:50%;right:125px;margin-top:-23px;padding:0.57143em 0.85714em 0.38095em 0.57143em;border-radius:6px;-moz-box-sizing:border-box;box-sizing:border-box;background:#518d2a;box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2);font:400 1.5em/1 'Open Sans', Helvetica, sans-serif;transition:all .1s ease-in-out}@media (max-width: 1175px){#message .jp-banner__button{font-size:1.25em;right:110px}}@media (max-width: 830px){#message .jp-banner__button{right:45px}}@media (max-width: 768px){#message .jp-banner__button{position:static;margin:0}}@media (max-width: 420px){#message .jp-banner__button{display:block;width:100%;text-align:center;font-size:1.1em;right:0}}#message .jp-banner__button:hover,#message .jp-banner__button:focus{box-shadow:0 4px 0 #3e6c20,0 2px 3px rgba(0,0,0,0.2)}#message .jp-banner__button:active{outline:none;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px);box-shadow:0 0px 0 #3e6c20,0 0 0 rgba(0,0,0,0.2)}#message .jp-banner__button:active:after{top:-2px}#message .jp-banner__button:before{content:'';display:inline-block;position:relative;vertical-align:middle;background:url("../images/connect-plug.svg") center center no-repeat;background-size:100%;top:-2px;margin-right:13px;width:22px;height:22px}@media (max-width: 420px){#message .jp-banner__button:before{display:none}}#message .is-full-width .jp-banner__button{position:static;margin:0}#message .is-opt-in .jp-banner__button:before{content:"\f147";width:20px;height:20px;background:none;font:normal 20px/1 Dashicons}#message .jp-banner__dismiss{position:absolute;top:0;right:0;width:44px;height:44px;text-align:center;z-index:99}#message .jp-banner__dismiss:before{color:#a7c979;content:'\f158';font:normal 20px/44px 'dashicons'}#message .jp-banner__dismiss:hover{opacity:0.8}#message .jp-banner__dismiss:active{opacity:1;outline:none}#message.jp-banner.protect-error{background:#fff;border-left:4px #d94f4f solid}#message.jp-banner.protect-error .jp-banner__content{color:#444}#message.jp-banner.protect-error .jp-banner__content h2,#message.jp-banner.protect-error .jp-banner__content a{color:#d94f4f}#message.jp-banner.protect-error .jp-banner__content a:hover{color:#d43a3a}#message.jp-banner.protect-error .jp-banner__button{background:#d94f4f;box-shadow:none;color:#fff}#message.jp-banner.protect-error .jp-banner__button:hover,#message.jp-banner.protect-error .jp-banner__button:focus,#message.jp-banner.protect-error .jp-banner__button:active{box-shadow:none}#message.jp-banner.protect-error .jp-banner__button:hover{background:#d43a3a}#message.jp-banner.protect-error .jp-banner__dismiss:before{color:#a0a5aa}
/*# sourceMappingURL=jetpack-banners.min.css.map */ \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-banners.min.css.map b/plugins/jetpack/css/jetpack-banners.min.css.map
index 9df6e4c9..502e50d5 100644
--- a/plugins/jetpack/css/jetpack-banners.min.css.map
+++ b/plugins/jetpack/css/jetpack-banners.min.css.map
@@ -1 +1 @@
-{"version":3,"sources":["../scss/organisms/_banners.scss"],"names":[],"mappings":"AAAA,mBACC,kBACA,CAAA,kBACA,CAAA,wBACA,CAAA,WACA,CAAA,kBACA,CAAA,UACA,CAAA,eACA,CAAA,0BAAA,CAEA,qBAAA,CAAA,wBACC,WACA,CAAA,iBACA,CAAA,QACA,CAAA,YACA,CAAA,UACA,CAAA,WACA,CAAA,oEACA,CAAA,mBACA,CAAA,SAEA,CAAA,yBAXD,yBAYE,aAAa,CAAA,AAGf,CAAA,oBACC,WAED,CAAA,qBACC,cACA,CAAA,QACA,CAAA,SACA,CAAA,UACA,CAAA,cACA,CAAA,eACA,CAAA,kBAEA,CAAA,uBACC,gBAKH,CAAA,YACC,UAGD,CAAA,4BACC,cACA,CAAA,kBACA,CAAA,0BAAA,CACA,qBAAA,CAAA,SAEA,CAAA,0CACC,UAGD,CAAA,yBAVD,6BAWE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CAAA,KACA,CAAA,OACD,CAAA,UACA,CAAA,WACA,CAAA,iBACA,CAAA,UAEA,CAAA,mCACC,cACA,CAAA,eACA,CAAA,iCAED,CAAA,kCACC,YAED,CAAA,mCACC,UACA,CAAA,YAAa,CAAA","file":"jetpack-banners.min.css"} \ No newline at end of file
+{"version":3,"sources":["../scss/organisms/_banners.scss"],"names":[],"mappings":"AAAA,4BACC,cACA,CAAA,SACA,CAAA,kBACA,CAAA,WACA,CAAA,UAEA,CAAA,yCACC,mBACA,CAAA,qBACA,CAAA,cACA,CAAA,gDACC,iCACA,CAAA,eACA,CAAA,cACA,CAAA,aACA,CAAA,UAGF,CAAA,kDACC,cACA,CAAA,wBAEA,CAAA,kEACC,WAGD,CAAA,kEACC,kBAEA,CAAA,oEACC,SACA,CAAA,cACA,CAAA,UACA,CAAA,WAEA,CAAA,2EACC,qBACA,CAAA,eACA,CAAA,UACA,CAAA,WAIF,CAAA,oEACC,qBACA,CAAA,2BACA,CAAA,6CACA,CAAA,oBACA,CAAA,6BAGF,CAAA,gEACC,kBAEA,CAAA,kEACC,qBACA,CAAA,iBACA,CAAA,iBACA,CAAA,2BACA,CAAA,6CACA,CAAA,oBACA,CAAA,6BAEA,CAAA,wEACC,WACA,CAAA,6CAIF,CAAA,+EACC,aAMJ,CAAA,kBACC,kBACA,CAAA,kBACA,CAAA,wBACA,CAAA,WACA,CAAA,kBACA,CAAA,UACA,CAAA,eACA,CAAA,0BAAA,CAEA,qBAAA,CAAA,wBACC,WACA,CAAA,iBACA,CAAA,QACA,CAAA,YACA,CAAA,UACA,CAAA,WACA,CAAA,oEACA,CAAA,mBACA,CAAA,SAEA,CAAA,yBAXD,yBAYE,aAAa,CAAA,AAGf,CAAA,oBACC,WAED,CAAA,qBACC,cACA,CAAA,QACA,CAAA,SACA,CAAA,UACA,CAAA,cACA,CAAA,eACA,CAAA,kBAEA,CAAA,uBACC,gBAKH,CAAA,YACC,UAGD,CAAA,4BACC,cACA,CAAA,kBACA,CAAA,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,4BACC,kBACC,CAAA,KACA,CAAA,OACD,CAAA,UACA,CAAA,WACA,CAAA,iBACA,CAAA,UAEA,CAAA,mCACC,cACA,CAAA,eACA,CAAA,iCAED,CAAA,kCACC,YAED,CAAA,mCACC,UACA,CAAA,YAMF,CAAA,gCACC,gBACA,CAAA,6BAEA,CAAA,oDACC,WACA,CAAA,8GACC,cAED,CAAA,4DACC,cAIF,CAAA,mDACC,mBACA,CAAA,eACA,CAAA,UAEA,CAAA,8KAGC,gBAED,CAAA,yDACC,mBAIF,CAAA,2DACC,cAAc,CAAA","file":"jetpack-banners.min.css"} \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack-rtl.css b/plugins/jetpack/css/jetpack-rtl.css
index b2997c92..ee6dbb75 100644
--- a/plugins/jetpack/css/jetpack-rtl.css
+++ b/plugins/jetpack/css/jetpack-rtl.css
@@ -1,4 +1,4 @@
/*!
* Do not modify this file directly. It is concatenated from individual module CSS files.
*/
-.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}@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-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(opacity=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-carousel-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: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-like,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-like.liked,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;padding-left:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{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}div.jp-carousel-buttons a.jp-carousel-like{background-position:5px 5px;padding-right:24px!important}div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px}@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-like,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../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;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:#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-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-download 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;clear: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-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 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-comments-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-carousel-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-like.liked,.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-like,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px;padding-right:23px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-position:5px -36px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like.liked{background-position:5px 5px}.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:#ccc}.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-shadow: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;width: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}.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{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-footer .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%}#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-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-widget{width:100%;float:none;position:absolute;top:0}.comment-likes-widget{width:100%}.pd-rating{display:block!important}.sd-gplus .sd-title{display:none}div#jp-relatedposts{display:none;padding-top:1em;margin:1em 0;position:relative}div.jp-relatedposts:after{content:'';display:block;clear:both}div#jp-relatedposts h3.jp-relatedposts-headline{margin:0 0 1em;display:inline-block;float:right;font-size:9pt;font-weight:700;font-family:inherit}div#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}div#jp-relatedposts h3.jp-relatedposts-headline em{font-style:normal;font-weight:700}div#jp-relatedposts div.jp-relatedposts-items{clear:right}div#jp-relatedposts div.jp-relatedposts-items-visual{margin-left:-20px}div#jp-relatedposts div.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:border-box}div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post{padding-left:20px;filter:alpha(opacity=80);-moz-opacity:.8;opacity:.8}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+4),div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+4){clear:both}div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover .jp-relatedposts-post-title a{text-decoration:underline}div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover{filter:alpha(opacity=100);-moz-opacity:1;opacity:1}div#jp-relatedposts div.jp-relatedposts-items p,div#jp-relatedposts div.jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:14px;line-height:20px;margin:0}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs{position:relative}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay{position:absolute;top:0;bottom:0;right:0;left:0;display:block}div#jp-relatedposts div.jp-relatedposts-items p{margin-bottom:0}div#jp-relatedposts div.jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}div#jp-relatedposts div.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}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover{text-decoration:underline}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post span{display:block;max-width:90%;overflow:hidden;text-overflow:ellipsis}div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post span{max-width:100%}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context,div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{opacity:.6}.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date,div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt{display:none}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt{overflow:hidden}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs span{margin-bottom:1em}@media only screen and (max-width:640px){div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post{width:50%}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n){clear:right}div#jp-relatedposts div.jp-relatedposts-items-visual{margin-left:20px}}@media only screen and (max-width:320px){div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post{width:100%;clear:both;margin:0 0 1em}}#jp-post-flair{padding-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 .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 .inner>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 .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;top:0}.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: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 16px/1 Genericons;vertical-align:top;position:relative;top:3px;text-align:center}.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:2px}.sd-social-icon .sd-content ul li a.share-more span{margin-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-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:'\f214'}.sd-content ul li.share-stumbleupon div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-stumbleupon a:before,.sd-social-icon-text .sd-content li.share-stumbleupon a:before,.sd-social-text .sd-content ul li.share-stumbleupon a:before{content:'\f223'}.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-social-icon-text .sd-content li.share-pinterest a:before,.sd-social-text .sd-content ul li.share-pinterest a:before{content:'\f209'}.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:'\f204'}.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:'\f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.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-social-official .sd-content a.share-more:before{color:#2ba1cb}.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 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}.sd-social-official .sd-content .twitter_button iframe{width:96px}.reddit_button iframe,.stumbleupon_button iframe{margin-top:1px}.googleplus1_button iframe,.linkedin_button>span,.pinterest_button,.pocket_button iframe,.twitter_button{margin:0!important}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 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}body .sd-social-icon .sd-content li.share-custom a span{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;height:0}.sharing-hidden .inner:after,.sharing-hidden .inner: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:8px;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-button:before{top:0}.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-stumbleupon a.sd-button{background:#ea4b24;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-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-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}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);position: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 input[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:11px;-moz-border-radius:11px;-webkit-border-radius:11px;-khtml-border-radius:11px;margin-bottom:20px;height:410px;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{border-width:0!important;margin-left:auto!important;margin-right:auto!important;padding:0!important;background-color:transparent!important;background-image:none!important;max-width:100%}.slideshow-loading img{vertical-align:middle}.slideshow-slide{height:100%;width:100%;text-align:center;margin:auto;display:none}.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=0)";opacity:0;direction:rtl}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 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-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-right{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%;padding:1px 2px}.comment-subscription-form .subscribe-label{display:inline!important}.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-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:none;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-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{width: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}.widgets-grid-layout{width:100%}.widgets-grid-layout:after,.widgets-grid-layout: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-style-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} \ No newline at end of file
+.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-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(opacity=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-carousel-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: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-like,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-like.liked,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;padding-left:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{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}div.jp-carousel-buttons a.jp-carousel-like{background-position:5px 5px;padding-right:24px!important}div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px}@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-like,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../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;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:#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-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-download 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;clear: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-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 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-comments-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-carousel-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-like.liked,.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-like,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px;padding-right:23px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-position:5px -36px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like.liked{background-position:5px 5px}.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:#ccc}.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-shadow: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;width: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}#jetpack-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-footer .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%}#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-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-widget{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:border-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}#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 .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{padding-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 .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 .inner>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 .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;top:0}.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: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 16px/1 Genericons;vertical-align:top;position:relative;top:3px;text-align:center}.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:2px}.sd-social-icon .sd-content ul li a.share-more span{margin-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-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:'\f214'}.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-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.share-pinterest div.option.option-smart-off a:before,.sd-social-icon .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:'\f209'}.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:'\f204'}.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:'\f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.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-social-official .sd-content a.share-more:before{color:#2ba1cb}.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 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}.sd-social-official .sd-content .skypeShare{width:55px}.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}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 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}body .sd-social-icon .sd-content li.share-custom a span{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;height:0}.sharing-hidden .inner:after,.sharing-hidden .inner: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:8px;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-button:before{top:0}.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;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-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-skype a.sd-button{background:#00AFF0;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-reddit a.sd-button{background:#cee3f8;color:#555!important}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);position: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 input[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;border-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(Opacity=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)!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-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-right{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%;padding:1px 2px}.comment-subscription-form .subscribe-label{display: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"]: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-navigation 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-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-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{width: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 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-layout: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-style-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} \ No newline at end of file
diff --git a/plugins/jetpack/css/jetpack.css b/plugins/jetpack/css/jetpack.css
index 75a2816e..6a6033a5 100644
--- a/plugins/jetpack/css/jetpack.css
+++ b/plugins/jetpack/css/jetpack.css
@@ -1,4 +1,4 @@
/*!
* Do not modify this file directly. It is concatenated from individual module CSS files.
*/
-.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}@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-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=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-carousel-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:left;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-like,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-like.liked,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;padding-right:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{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}div.jp-carousel-buttons a.jp-carousel-like{background-position:5px 5px;padding-left:24px!important}div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px}@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-like,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../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:3px 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-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-image-meta 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.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;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: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;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 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-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 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-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-left:24px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like.liked,.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-like,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px;padding-left:23px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-position:5px -36px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like.liked{background-position:5px 5px}.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 #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,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}}.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-left:4px;font-weight:400}.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{margin: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: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: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-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-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: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;position:absolute;top:0}.comment-likes-widget{width:100%}.pd-rating{display:block!important}.sd-gplus .sd-title{display:none}div#jp-relatedposts{display:none;padding-top:1em;margin:1em 0;position:relative}div.jp-relatedposts:after{content:'';display:block;clear:both}div#jp-relatedposts h3.jp-relatedposts-headline{margin:0 0 1em;display:inline-block;float:left;font-size:9pt;font-weight:700;font-family:inherit}div#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}div#jp-relatedposts h3.jp-relatedposts-headline em{font-style:normal;font-weight:700}div#jp-relatedposts div.jp-relatedposts-items{clear:left}div#jp-relatedposts div.jp-relatedposts-items-visual{margin-right:-20px}div#jp-relatedposts div.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}div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post{padding-right:20px;filter:alpha(opacity=80);-moz-opacity:.8;opacity:.8}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+4),div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+4){clear:both}div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover .jp-relatedposts-post-title a{text-decoration:underline}div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover{filter:alpha(opacity=100);-moz-opacity:1;opacity:1}div#jp-relatedposts div.jp-relatedposts-items p,div#jp-relatedposts div.jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:14px;line-height:20px;margin:0}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs{position:relative}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay{position:absolute;top:0;bottom:0;left:0;right:0;display:block}div#jp-relatedposts div.jp-relatedposts-items p{margin-bottom:0}div#jp-relatedposts div.jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}div#jp-relatedposts div.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}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover{text-decoration:underline}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post span{display:block;max-width:90%;overflow:hidden;text-overflow:ellipsis}div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post span{max-width:100%}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context,div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{opacity:.6}.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date,div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt{display:none}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt{overflow:hidden}div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs span{margin-bottom:1em}@media only screen and (max-width:640px){div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post{width:50%}div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n){clear:left}div#jp-relatedposts div.jp-relatedposts-items-visual{margin-right:20px}}@media only screen and (max-width:320px){div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post{width:100%;clear:both;margin:0 0 1em}}#jp-post-flair{padding-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 .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 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-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 .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;top:0}.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: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 16px/1 Genericons;vertical-align:top;position:relative;top:3px;text-align:center}.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:2px}.sd-social-icon .sd-content ul li a.share-more span{margin-left: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-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:'\f214'}.sd-content ul li.share-stumbleupon div.option.option-smart-off a:before,.sd-social-icon .sd-content ul li.share-stumbleupon a:before,.sd-social-icon-text .sd-content li.share-stumbleupon a:before,.sd-social-text .sd-content ul li.share-stumbleupon a:before{content:'\f223'}.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-social-icon-text .sd-content li.share-pinterest a:before,.sd-social-text .sd-content ul li.share-pinterest a:before{content:'\f209'}.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:'\f204'}.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:'\f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.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-social-official .sd-content a.share-more:before{color:#2ba1cb}.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 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}.sd-social-official .sd-content .twitter_button iframe{width:96px}.reddit_button iframe,.stumbleupon_button iframe{margin-top:1px}.googleplus1_button iframe,.linkedin_button>span,.pinterest_button,.pocket_button iframe,.twitter_button{margin:0!important}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 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}body .sd-social-icon .sd-content li.share-custom a span{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;height:0}.sharing-hidden .inner:after,.sharing-hidden .inner:before{position:absolute;z-index: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:8px;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-button:before{top:0}.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-stumbleupon a.sd-button{background:#ea4b24;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-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-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}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);position: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;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-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:11px;-moz-border-radius:11px;-webkit-border-radius:11px;-khtml-border-radius:11px;margin-bottom:20px;height:410px;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{border-width:0!important;margin-right:auto!important;margin-left:auto!important;padding:0!important;background-color:transparent!important;background-image:none!important;max-width:100%}.slideshow-loading img{vertical-align:middle}.slideshow-slide{height:100%;width:100%;text-align:center;margin:auto;display:none}.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=0)";opacity:0;direction:ltr}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 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;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-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%}.presentation .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%;padding:1px 2px}.comment-subscription-form .subscribe-label{display:inline!important}.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;width:inherit}.tiled-gallery .gallery-row{overflow:hidden}.tiled-gallery .tiled-gallery-item a{background:0 0;border:none;color:none;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-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-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}.widgets-grid-layout{width:100%}.widgets-grid-layout:after,.widgets-grid-layout:before{content:" ";display:table}.widgets-grid-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 .widgets-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} \ No newline at end of file
+.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-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=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-carousel-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:left;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-like,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-like.liked,div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;padding-right:8px!important;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{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}div.jp-carousel-buttons a.jp-carousel-like{background-position:5px 5px;padding-left:24px!important}div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px}@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-like,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../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:3px 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-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-image-meta 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.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;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: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;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 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-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 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-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-left:24px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like.liked,.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-like,.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like:hover{background-position:5px -15px;padding-left:23px!important}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-position:5px -36px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like.liked{background-position:5px 5px}.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 #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,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}}.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-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{margin: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: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: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-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-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: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;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: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-relatedposts-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}#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 .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: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.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 .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 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-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 .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;top:0}.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: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 16px/1 Genericons;vertical-align:top;position:relative;top:3px;text-align:center}.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:2px}.sd-social-icon .sd-content ul li a.share-more span{margin-left: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-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:'\f214'}.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-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.share-pinterest div.option.option-smart-off a:before,.sd-social-icon .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:'\f209'}.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:'\f204'}.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:'\f205'}.sd-social-official .sd-content li.share-press-this a:before{color:#2ba1cb}.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-social-official .sd-content a.share-more:before{color:#2ba1cb}.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 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}.sd-social-official .sd-content .skypeShare{width:55px}.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}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 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}body .sd-social-icon .sd-content li.share-custom a span{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;height:0}.sharing-hidden .inner:after,.sharing-hidden .inner:before{position:absolute;z-index: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:8px;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-button:before{top:0}.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-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-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-skype a.sd-button{background:#00AFF0;color:#fff!important}.sd-social-icon .sd-content ul li[class*=share-].share-reddit a.sd-button{background:#cee3f8;color:#555!important}.sharing-screen-reader-text{clip:rect(1px,1px,1px,1px);position: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;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-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: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-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 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;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-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%}.presentation .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%;padding:1px 2px}.comment-subscription-form .subscribe-label{display: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"]: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-navigation 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:left;position:relative}.tiled-gallery .tiled-gallery-item{float:left;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;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-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-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_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-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 .widgets-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} \ No newline at end of file
diff --git a/plugins/jetpack/functions.compat.php b/plugins/jetpack/functions.compat.php
index e3ee26e5..8f6f4a13 100644
--- a/plugins/jetpack/functions.compat.php
+++ b/plugins/jetpack/functions.compat.php
@@ -17,8 +17,9 @@ function jetpack_shortcode_get_youtube_id( $url ) {
*/
function jetpack_get_youtube_id( $url ) {
// Do we have an $atts array? Get first att
- if ( is_array( $url ) )
- $url = $url[0];
+ if ( is_array( $url ) ) {
+ $url = reset( $url );
+ }
$url = youtube_sanitize_url( $url );
$url = parse_url( $url );
diff --git a/plugins/jetpack/functions.gallery.php b/plugins/jetpack/functions.gallery.php
index 891ecfca..74fb01a9 100644
--- a/plugins/jetpack/functions.gallery.php
+++ b/plugins/jetpack/functions.gallery.php
@@ -9,6 +9,16 @@ class Jetpack_Gallery_Settings {
}
function admin_init() {
+ /**
+ * Filter the available gallery types.
+ *
+ * @module shortcodes, tiled-gallery
+ *
+ * @since 2.5.1
+ *
+ * @param array $value Array of the default thumbnail grid gallery type. Default array contains one key, ‘default’.
+ *
+ */
$this->gallery_types = apply_filters( 'jetpack_gallery_types', array( 'default' => __( 'Thumbnail Grid', 'jetpack' ) ) );
// Enqueue the media UI only if needed.
@@ -30,25 +40,23 @@ class Jetpack_Gallery_Settings {
wp_register_script( 'jetpack-gallery-settings', plugins_url( 'gallery-settings/gallery-settings.js', __FILE__ ), array( 'media-views' ), '20121225' );
}
- /*
- * Register Gallery's admin.js here so we can upload images in the customizer
- */
- if ( ! wp_script_is( 'gallery-widget-admin', 'registered' ) ) {
- wp_register_script( 'gallery-widget-admin', plugins_url( 'modules/widgets/gallery/js/admin.js', __FILE__ ), array(
- 'media-models',
- 'media-views'
- ) );
- }
-
wp_enqueue_script( 'jetpack-gallery-settings' );
-
- wp_enqueue_script( 'gallery-widget-admin' );
}
/**
* Outputs a view template which can be used with wp.media.template
*/
function print_media_templates() {
+ /**
+ * Filter the default gallery type.
+ *
+ * @module tiled-gallery
+ *
+ * @since 2.5.1
+ *
+ * @param string $value A string of the gallery type. Default is ‘default’.
+ *
+ */
$default_gallery_type = apply_filters( 'jetpack_default_gallery_type', 'default' );
?>
diff --git a/plugins/jetpack/functions.opengraph.php b/plugins/jetpack/functions.opengraph.php
index 96a40082..296762a2 100644
--- a/plugins/jetpack/functions.opengraph.php
+++ b/plugins/jetpack/functions.opengraph.php
@@ -11,6 +11,16 @@
add_action( 'wp_head', 'jetpack_og_tags' );
function jetpack_og_tags() {
+ /**
+ * Allow Jetpack to output Open Graph Meta Tags.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 2.0.0
+ * @deprecated 2.0.3 Duplicative filter. Use `jetpack_enable_open_graph`.
+ *
+ * @param bool true Should Jetpack's Open Graph Meta Tags be enabled. Default to true.
+ */
if ( false === apply_filters( 'jetpack_enable_opengraph', true ) ) {
_deprecated_function( 'jetpack_enable_opengraph', '2.0.3', 'jetpack_enable_open_graph' );
return;
@@ -22,7 +32,25 @@ function jetpack_og_tags() {
$og_output = "\n<!-- Jetpack Open Graph Tags -->\n";
$tags = array();
+ /**
+ * Filter the minimum width of the images used in Jetpack Open Graph Meta Tags.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 2.0.0
+ *
+ * @param int 200 Minimum image width used in Jetpack Open Graph Meta Tags.
+ */
$image_width = absint( apply_filters( 'jetpack_open_graph_image_width', 200 ) );
+ /**
+ * Filter the minimum height of the images used in Jetpack Open Graph Meta Tags.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 2.0.0
+ *
+ * @param int 200 Minimum image height used in Jetpack Open Graph Meta Tags.
+ */
$image_height = absint( apply_filters( 'jetpack_open_graph_image_height', 200 ) );
$description_length = 197;
@@ -62,39 +90,92 @@ function jetpack_og_tags() {
global $post;
$data = $post; // so that we don't accidentally explode the global
- $tags['og:type'] = 'article';
- $tags['og:title'] = empty( $data->post_title ) ? ' ' : wp_kses( $data->post_title, array() ) ;
+ $tags['og:type'] = 'article';
+ if ( empty( $data->post_title ) ) {
+ $tags['og:title'] = ' ';
+ } else {
+ /** This filter is documented in core/src/wp-includes/post-template.php */
+ $tags['og:title'] = wp_kses( apply_filters( 'the_title', $data->post_title, $data->ID ), array() );
+ }
+
$tags['og:url'] = get_permalink( $data->ID );
- if ( !post_password_required() )
- $tags['og:description'] = ! empty( $data->post_excerpt ) ? preg_replace( '@https?://[\S]+@', '', strip_shortcodes( wp_kses( $data->post_excerpt, array() ) ) ): wp_trim_words( preg_replace( '@https?://[\S]+@', '', strip_shortcodes( wp_kses( $data->post_content, array() ) ) ) );
- if ( empty( $tags['og:description'] ) )
- $tags['og:description'] = __('Visit the post for more.', 'jetpack');
+ if ( ! post_password_required() ) {
+ if ( ! empty( $data->post_excerpt ) ) {
+ $tags['og:description'] = preg_replace( '@https?://[\S]+@', '', strip_shortcodes( wp_kses( $data->post_excerpt, array() ) ) );
+ } else {
+ $exploded_content_on_more_tag = explode( '<!--more-->', $data->post_content );
+ $tags['og:description'] = wp_trim_words( preg_replace( '@https?://[\S]+@', '', strip_shortcodes( wp_kses( $exploded_content_on_more_tag[0], array() ) ) ) );
+ }
+ }
+ if ( empty( $tags['og:description'] ) ) {
+ /**
+ * Filter the fallback `og:description` used when no excerpt information is provided.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 3.9.0
+ *
+ * @param string $var Fallback og:description. Default is translated `Visit the post for more'.
+ * @param object $data Post object for the current post.
+ */
+ $tags['og:description'] = apply_filters( 'jetpack_open_graph_fallback_description', __( 'Visit the post for more.', 'jetpack' ), $data );
+ } else {
+ // Intentionally not using a filter to prevent pollution. @see https://github.com/Automattic/jetpack/pull/2899#issuecomment-151957382
+ $tags['og:description'] = wp_kses( trim( convert_chars( wptexturize( $tags['og:description'] ) ) ), array() );
+ }
+
$tags['article:published_time'] = date( 'c', strtotime( $data->post_date_gmt ) );
$tags['article:modified_time'] = date( 'c', strtotime( $data->post_modified_gmt ) );
if ( post_type_supports( get_post_type( $data ), 'author' ) && isset( $data->post_author ) ) {
$publicize_facebook_user = get_post_meta( $data->ID, '_publicize_facebook_user', true );
if ( ! empty( $publicize_facebook_user ) ) {
$tags['article:author'] = esc_url( $publicize_facebook_user );
- } else {
- $tags['article:author'] = get_author_posts_url( $data->post_author );
}
}
}
- // Allow plugins to inject additional template-specific open graph tags
+ /**
+ * Allow plugins to inject additional template-specific Open Graph tags.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 3.0.0
+ *
+ * @param array $tags Array of Open Graph Meta tags.
+ * @param array $args Array of image size parameters.
+ */
$tags = apply_filters( 'jetpack_open_graph_base_tags', $tags, compact( 'image_width', 'image_height' ) );
// Re-enable widont if we had disabled it
if ( $disable_widont )
add_filter( 'the_title', 'widont' );
+ /**
+ * Do not return any Open Graph Meta tags if we don't have any info about a post.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 3.0.0
+ *
+ * @param bool true Do not return any Open Graph Meta tags if we don't have any info about a post.
+ */
if ( empty( $tags ) && apply_filters( 'jetpack_open_graph_return_if_empty', true ) )
return;
$tags['og:site_name'] = get_bloginfo( 'name' );
- if ( !post_password_required() )
- $tags['og:image'] = jetpack_og_get_image( $image_width, $image_height );
+ // Get image info and build tags
+ if ( ! post_password_required() ) {
+ $image_info = jetpack_og_get_image( $image_width, $image_height );
+ $tags['og:image'] = $image_info['src'];
+
+ if ( ! empty( $image_info['width'] ) ) {
+ $tags['og:image:width'] = $image_info['width'];
+ }
+ if ( ! empty( $image_info['height'] ) ) {
+ $tags['og:image:height'] = $image_info['height'];
+ }
+ }
// Facebook whines if you give it an empty title
if ( empty( $tags['og:title'] ) )
@@ -102,7 +183,7 @@ function jetpack_og_tags() {
// Shorten the description if it's too long
if ( isset( $tags['og:description'] ) ) {
- $tags['og:description'] = strlen( $tags['og:description'] ) > $description_length ? mb_substr( $tags['og:description'], 0, $description_length ) . '...' : $tags['og:description'];
+ $tags['og:description'] = strlen( $tags['og:description'] ) > $description_length ? mb_substr( $tags['og:description'], 0, $description_length ) . '…' : $tags['og:description'];
}
// Try to add OG locale tag if the WP->FB data mapping exists
@@ -110,7 +191,7 @@ function jetpack_og_tags() {
require_once JETPACK__GLOTPRESS_LOCALES_PATH;
$_locale = get_locale();
- // We have to account for WP.org vs WP.com locale divergence
+ // We have to account for w.org vs WP.com locale divergence
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
$gp_locale = GP_Locales::by_field( 'slug', $_locale );
} else {
@@ -122,7 +203,16 @@ function jetpack_og_tags() {
$tags['og:locale'] = $gp_locale->facebook_locale;
}
- // Add any additional tags here, or modify what we've come up with
+ /**
+ * Allow the addition of additional Open Graph Meta tags, or modify the existing tags.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 2.0.0
+ *
+ * @param array $tags Array of Open Graph Meta tags.
+ * @param array $args Array of image size parameters.
+ */
$tags = apply_filters( 'jetpack_open_graph_tags', $tags, compact( 'image_width', 'image_height' ) );
// secure_urls need to go right after each og:image to work properly so we will abstract them here
@@ -139,16 +229,27 @@ function jetpack_og_tags() {
if ( empty( $tag_content_single ) )
continue; // Don't ever output empty tags
$og_tag = sprintf( '<meta property="%s" content="%s" />', esc_attr( $tag_property ), esc_attr( $tag_content_single ) );
+ /**
+ * Filter the HTML Output of each Open Graph Meta tag.
+ *
+ * @module sharedaddy, publicize
+ *
+ * @since 2.0.0
+ *
+ * @param string $og_tag HTML HTML Output of each Open Graph Meta tag.
+ */
$og_output .= apply_filters( 'jetpack_open_graph_output', $og_tag );
$og_output .= "\n";
if ( 'og:image' == $tag_property ) {
if ( is_array( $secure ) && !empty( $secure[$secure_image_num] ) ) {
$og_tag = sprintf( '<meta property="og:image:secure_url" content="%s" />', esc_url( $secure[ $secure_image_num ] ) );
+ /** This filter is documented in functions.opengraph.php */
$og_output .= apply_filters( 'jetpack_open_graph_output', $og_tag );
$og_output .= "\n";
} else if ( !is_array( $secure ) && !empty( $secure ) ) {
$og_tag = sprintf( '<meta property="og:image:secure_url" content="%s" />', esc_url( $secure ) );
+ /** This filter is documented in functions.opengraph.php */
$og_output .= apply_filters( 'jetpack_open_graph_output', $og_tag );
$og_output .= "\n";
}
@@ -162,17 +263,26 @@ function jetpack_og_tags() {
function jetpack_og_get_image( $width = 200, $height = 200, $max_images = 4 ) { // Facebook requires thumbnails to be a minimum of 200x200
$image = '';
- if ( is_singular() && !is_home() ) {
+ if ( is_singular() && ! is_home() ) {
global $post;
$image = '';
+ // Grab obvious image if $post is an attachment page for an image
+ if ( is_attachment( $post->ID ) && 'image' == substr( $post->post_mime_type, 0, 5 ) ) {
+ $image = wp_get_attachment_url( $post->ID );
+ }
+
// Attempt to find something good for this post using our generalized PostImages code
- if ( class_exists( 'Jetpack_PostImages' ) ) {
+ if ( ! $image && class_exists( 'Jetpack_PostImages' ) ) {
$post_images = Jetpack_PostImages::get_images( $post->ID, array( 'width' => $width, 'height' => $height ) );
- if ( $post_images && !is_wp_error( $post_images ) ) {
+ if ( $post_images && ! is_wp_error( $post_images ) ) {
$image = array();
foreach ( (array) $post_images as $post_image ) {
- $image[] = $post_image['src'];
+ $image['src'] = $post_image['src'];
+ if ( isset( $post_image['src_width'], $post_image['src_height'] ) ) {
+ $image['width'] = $post_image['src_width'];
+ $image['height'] = $post_image['src_height'];
+ }
}
}
}
@@ -180,50 +290,75 @@ function jetpack_og_get_image( $width = 200, $height = 200, $max_images = 4 ) {
$author = get_queried_object();
if ( function_exists( 'get_avatar_url' ) ) {
// Prefer the core function get_avatar_url() if available, WP 4.2+
- $image = get_avatar_url( $author->user_email, array( 'size' => $width ) );
+ $image['src'] = get_avatar_url( $author->user_email, array( 'size' => $width ) );
}
else {
$has_filter = has_filter( 'pre_option_show_avatars', '__return_true' );
- if ( !$has_filter ) {
+ if ( ! $has_filter ) {
add_filter( 'pre_option_show_avatars', '__return_true' );
}
$avatar = get_avatar( $author->user_email, $width );
- if ( !$has_filter ) {
+ if ( ! $has_filter ) {
remove_filter( 'pre_option_show_avatars', '__return_true' );
}
- if ( !empty( $avatar ) && !is_wp_error( $avatar ) ) {
+ if ( ! empty( $avatar ) && ! is_wp_error( $avatar ) ) {
if ( preg_match( '/src=["\']([^"\']+)["\']/', $avatar, $matches ) );
- $image = wp_specialchars_decode( $matches[1], ENT_QUOTES );
+ $image['src'] = wp_specialchars_decode( $matches[1], ENT_QUOTES );
}
}
}
- if ( empty( $image ) )
+ if ( empty( $image ) ) {
$image = array();
- else if ( !is_array( $image ) )
- $image = array( $image );
+ } else if ( ! is_array( $image ) ) {
+ $image = array(
+ 'src' => $image
+ );
+ }
// First fall back, blavatar
if ( empty( $image ) && function_exists( 'blavatar_domain' ) ) {
$blavatar_domain = blavatar_domain( site_url() );
- if ( blavatar_exists( $blavatar_domain ) )
- $image[] = blavatar_url( $blavatar_domain, 'img', $width );
+ if ( blavatar_exists( $blavatar_domain ) ) {
+ $image['src'] = blavatar_url( $blavatar_domain, 'img', $width, false, true );
+ $image['width'] = $width;
+ $image['height'] = $height;
+ }
}
// Second fall back, Site Logo
if ( empty( $image ) && ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) ) {
- $image[] = jetpack_get_site_logo( 'url' );
+ $image['src'] = jetpack_get_site_logo( 'url' );
+ $image_dimensions = jetpack_get_site_logo_dimensions();
+ if ( ! empty( $image_dimensions ) ) {
+ $image['width'] = $image_dimensions['width'];
+ $image['height'] = $image_dimensions['height'];
+ }
}
// Third fall back, Site Icon
if ( empty( $image ) && ( function_exists( 'jetpack_has_site_icon' ) && jetpack_has_site_icon() ) ) {
- $image[] = jetpack_site_icon_url( null, '512' );
+ $image['src'] = jetpack_site_icon_url( null, '512' );
+ $image['width'] = '512';
+ $image['height'] = '512';
+ }
+
+ // Fourth fall back, Core Site Icon. Added in WP 4.3.
+ if ( empty( $image ) && ( function_exists( 'has_site_icon') && has_site_icon() ) ) {
+ $image['src'] = get_site_icon_url( null, '512' );
}
- // Fourth fall back, blank image
+ // Finally fall back, blank image
if ( empty( $image ) ) {
- $image[] = apply_filters( 'jetpack_open_graph_image_default', 'https://s0.wp.com/i/blank.jpg' );
+ /**
+ * Filter the default Open Graph Image tag, used when no Image can be found in a post.
+ *
+ * @since 3.0.0
+ *
+ * @param string $str Default Image URL.
+ */
+ $image['src'] = apply_filters( 'jetpack_open_graph_image_default', 'https://s0.wp.com/i/blank.jpg' );
}
return $image;
@@ -237,7 +372,7 @@ function jetpack_og_get_image( $width = 200, $height = 200, $max_images = 4 ) {
function jetpack_og_get_image_gravatar( $email, $width ) {
$image = '';
if ( function_exists( 'get_avatar_url' ) ) {
- $avatar = get_avatar_url($email, $width);
+ $avatar = get_avatar_url( $email, $width );
if ( ! empty( $avatar ) ) {
if ( is_array( $avatar ) )
$image = $avatar[0];
diff --git a/plugins/jetpack/functions.photon.php b/plugins/jetpack/functions.photon.php
index a75ef52b..4566e311 100644
--- a/plugins/jetpack/functions.photon.php
+++ b/plugins/jetpack/functions.photon.php
@@ -12,11 +12,45 @@
function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
$image_url = trim( $image_url );
+ /**
+ * Allow specific image URls to avoid going through Photon.
+ *
+ * @module photon
+ *
+ * @since 3.2.0
+ *
+ * @param bool false Should the image be returned as is, without going through Photon. Default to false.
+ * @param string $image_url Image URL.
+ * @param array|string $args Array of Photon arguments.
+ * @param string|null $scheme Image scheme. Default to null.
+ */
if ( false !== apply_filters( 'jetpack_photon_skip_for_url', false, $image_url, $args, $scheme ) ) {
return $image_url;
}
+ /**
+ * Filter the original image URL before it goes through Photon.
+ *
+ * @module photon
+ *
+ * @since 1.9.0
+ *
+ * @param string $image_url Image URL.
+ * @param array|string $args Array of Photon arguments.
+ * @param string|null $scheme Image scheme. Default to null.
+ */
$image_url = apply_filters( 'jetpack_photon_pre_image_url', $image_url, $args, $scheme );
+ /**
+ * Filter the original Photon image parameters before Photon is applied to an image.
+ *
+ * @module photon
+ *
+ * @since 1.9.0
+ *
+ * @param array|string $args Array of Photon arguments.
+ * @param string $image_url Image URL.
+ * @param string|null $scheme Image scheme. Default to null.
+ */
$args = apply_filters( 'jetpack_photon_pre_args', $args, $image_url, $scheme );
if ( empty( $image_url ) )
@@ -41,15 +75,32 @@ function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
$args = rawurlencode_deep( $args );
}
+ /** This filter is documented below. */
+ $custom_photon_url = apply_filters( 'jetpack_photon_domain', '', $image_url );
+ $custom_photon_url = esc_url( $custom_photon_url );
+
// You can't run a Photon URL through Photon again because query strings are stripped.
// So if the image is already a Photon URL, append the new arguments to the existing URL.
- if ( in_array( $image_url_parts['host'], array( 'i0.wp.com', 'i1.wp.com', 'i2.wp.com' ) ) ) {
+ if (
+ in_array( $image_url_parts['host'], array( 'i0.wp.com', 'i1.wp.com', 'i2.wp.com' ) )
+ || $image_url_parts['host'] === parse_url( $custom_photon_url, PHP_URL_HOST )
+ ) {
$photon_url = add_query_arg( $args, $image_url );
-
return jetpack_photon_url_scheme( $photon_url, $scheme );
}
- // This setting is Photon Server dependent
+ /**
+ * Allow Photon to use query strings as well.
+ * By default, Photon doesn't support query strings so we ignore them and look only at the path.
+ * This setting is Photon Server dependent.
+ *
+ * @module photon
+ *
+ * @since 1.9.0
+ *
+ * @param bool false Should images using query strings go through Photon. Default is false.
+ * @param string $image_url_parts['host'] Image URL's host.
+ */
if ( ! apply_filters( 'jetpack_photon_any_extension_for_domain', false, $image_url_parts['host'] ) ) {
// Photon doesn't support query strings so we ignore them and look only at the path.
// However some source images are served via PHP so check the no-query-string extension.
@@ -69,16 +120,29 @@ function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
/**
* Filters the domain used by the Photon module.
*
+ * @module photon
+ *
* @since 3.4.2
*
* @param string http://i{$subdomain}.wp.com Domain used by Photon. $subdomain is a random number between 0 and 2.
* @param string $image_url URL of the image to be photonized.
*/
$photon_domain = apply_filters( 'jetpack_photon_domain', "http://i{$subdomain}.wp.com", $image_url );
- $photon_domain = trailingslashit( $photon_domain );
+ $photon_domain = trailingslashit( esc_url( $photon_domain ) );
$photon_url = $photon_domain . $image_host_path;
- // This setting is Photon Server dependent
+ /**
+ * Add query strings to Photon URL.
+ * By default, Photon doesn't support query strings so we ignore them.
+ * This setting is Photon Server dependent.
+ *
+ * @module photon
+ *
+ * @since 1.9.0
+ *
+ * @param bool false Should query strings be added to the image URL. Default is false.
+ * @param string $image_url_parts['host'] Image URL's host.
+ */
if ( isset( $image_url_parts['query'] ) && apply_filters( 'jetpack_photon_add_query_string_to_domain', false, $image_url_parts['host'] ) ) {
$photon_url .= '?q=' . rawurlencode( $image_url_parts['query'] );
}
diff --git a/plugins/jetpack/images/custom-css.jpg b/plugins/jetpack/images/custom-css.jpg
index 3faad92b..635e8bc9 100644
--- a/plugins/jetpack/images/custom-css.jpg
+++ b/plugins/jetpack/images/custom-css.jpg
Binary files differ
diff --git a/plugins/jetpack/images/custom-css@2x.jpg b/plugins/jetpack/images/custom-css@2x.jpg
index b059ba19..bbadf846 100644
--- a/plugins/jetpack/images/custom-css@2x.jpg
+++ b/plugins/jetpack/images/custom-css@2x.jpg
Binary files differ
diff --git a/plugins/jetpack/images/jetpack-icon.jpg b/plugins/jetpack/images/jetpack-icon.jpg
new file mode 100644
index 00000000..fd5f3b53
--- /dev/null
+++ b/plugins/jetpack/images/jetpack-icon.jpg
Binary files differ
diff --git a/plugins/jetpack/images/jetpack-logo.png b/plugins/jetpack/images/jetpack-logo.png
index fa564736..122ae761 100644
--- a/plugins/jetpack/images/jetpack-logo.png
+++ b/plugins/jetpack/images/jetpack-logo.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/blue-large.png b/plugins/jetpack/images/rss/blue-large.png
index fd623278..aa01d8ff 100644
--- a/plugins/jetpack/images/rss/blue-large.png
+++ b/plugins/jetpack/images/rss/blue-large.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/blue-medium.png b/plugins/jetpack/images/rss/blue-medium.png
index 94110185..27be48d4 100644
--- a/plugins/jetpack/images/rss/blue-medium.png
+++ b/plugins/jetpack/images/rss/blue-medium.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/green-large.png b/plugins/jetpack/images/rss/green-large.png
index a9c2c83c..101dade9 100644
--- a/plugins/jetpack/images/rss/green-large.png
+++ b/plugins/jetpack/images/rss/green-large.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/green-medium.png b/plugins/jetpack/images/rss/green-medium.png
index f8e8fbc0..2f1bc04b 100644
--- a/plugins/jetpack/images/rss/green-medium.png
+++ b/plugins/jetpack/images/rss/green-medium.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/green-small.png b/plugins/jetpack/images/rss/green-small.png
index 299905b8..06b29da7 100644
--- a/plugins/jetpack/images/rss/green-small.png
+++ b/plugins/jetpack/images/rss/green-small.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/orange-large.png b/plugins/jetpack/images/rss/orange-large.png
index 12503492..97d75a7d 100644
--- a/plugins/jetpack/images/rss/orange-large.png
+++ b/plugins/jetpack/images/rss/orange-large.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/orange-medium.png b/plugins/jetpack/images/rss/orange-medium.png
index 7c47f764..35d74cbf 100644
--- a/plugins/jetpack/images/rss/orange-medium.png
+++ b/plugins/jetpack/images/rss/orange-medium.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/orange-small.png b/plugins/jetpack/images/rss/orange-small.png
index 4f326d56..16c40703 100644
--- a/plugins/jetpack/images/rss/orange-small.png
+++ b/plugins/jetpack/images/rss/orange-small.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/pink-large.png b/plugins/jetpack/images/rss/pink-large.png
index 1273b773..c8aa9567 100644
--- a/plugins/jetpack/images/rss/pink-large.png
+++ b/plugins/jetpack/images/rss/pink-large.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/pink-medium.png b/plugins/jetpack/images/rss/pink-medium.png
index feb154c7..0ee36802 100644
--- a/plugins/jetpack/images/rss/pink-medium.png
+++ b/plugins/jetpack/images/rss/pink-medium.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/pink-small.png b/plugins/jetpack/images/rss/pink-small.png
index c25376d0..4666aee7 100644
--- a/plugins/jetpack/images/rss/pink-small.png
+++ b/plugins/jetpack/images/rss/pink-small.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/purple-large.png b/plugins/jetpack/images/rss/purple-large.png
index 704765ee..42556a67 100644
--- a/plugins/jetpack/images/rss/purple-large.png
+++ b/plugins/jetpack/images/rss/purple-large.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/purple-medium.png b/plugins/jetpack/images/rss/purple-medium.png
index f785cbb2..5cde343c 100644
--- a/plugins/jetpack/images/rss/purple-medium.png
+++ b/plugins/jetpack/images/rss/purple-medium.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/purple-small.png b/plugins/jetpack/images/rss/purple-small.png
index d21d59be..d2b24d52 100644
--- a/plugins/jetpack/images/rss/purple-small.png
+++ b/plugins/jetpack/images/rss/purple-small.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/red-large.png b/plugins/jetpack/images/rss/red-large.png
index 5e03f141..fd4745f1 100644
--- a/plugins/jetpack/images/rss/red-large.png
+++ b/plugins/jetpack/images/rss/red-large.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/red-medium.png b/plugins/jetpack/images/rss/red-medium.png
index d01e0d8d..117edc5a 100644
--- a/plugins/jetpack/images/rss/red-medium.png
+++ b/plugins/jetpack/images/rss/red-medium.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/red-small.png b/plugins/jetpack/images/rss/red-small.png
index d42b135d..12ff9d20 100644
--- a/plugins/jetpack/images/rss/red-small.png
+++ b/plugins/jetpack/images/rss/red-small.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/silver-large.png b/plugins/jetpack/images/rss/silver-large.png
index d10b8849..40f5066a 100644
--- a/plugins/jetpack/images/rss/silver-large.png
+++ b/plugins/jetpack/images/rss/silver-large.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/silver-medium.png b/plugins/jetpack/images/rss/silver-medium.png
index 34552319..eb0a7b2e 100644
--- a/plugins/jetpack/images/rss/silver-medium.png
+++ b/plugins/jetpack/images/rss/silver-medium.png
Binary files differ
diff --git a/plugins/jetpack/images/rss/silver-small.png b/plugins/jetpack/images/rss/silver-small.png
index ef8be0eb..f050bd3d 100644
--- a/plugins/jetpack/images/rss/silver-small.png
+++ b/plugins/jetpack/images/rss/silver-small.png
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/beautifulmath.jpg b/plugins/jetpack/images/screenshots/beautifulmath.jpg
new file mode 100644
index 00000000..3e46f689
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/beautifulmath.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/beautifulmath.png b/plugins/jetpack/images/screenshots/beautifulmath.png
deleted file mode 100644
index 12e8c763..00000000
--- a/plugins/jetpack/images/screenshots/beautifulmath.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/carousel.jpg b/plugins/jetpack/images/screenshots/carousel.jpg
new file mode 100644
index 00000000..93ad7458
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/carousel.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/carousel.png b/plugins/jetpack/images/screenshots/carousel.png
deleted file mode 100644
index c198d292..00000000
--- a/plugins/jetpack/images/screenshots/carousel.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/comments.jpg b/plugins/jetpack/images/screenshots/comments.jpg
new file mode 100644
index 00000000..8318444a
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/comments.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/comments.png b/plugins/jetpack/images/screenshots/comments.png
deleted file mode 100644
index 699e94c4..00000000
--- a/plugins/jetpack/images/screenshots/comments.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/contactform.jpg b/plugins/jetpack/images/screenshots/contactform.jpg
new file mode 100644
index 00000000..fc0f4e7a
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/contactform.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/contactform.png b/plugins/jetpack/images/screenshots/contactform.png
deleted file mode 100644
index b7045aac..00000000
--- a/plugins/jetpack/images/screenshots/contactform.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/custom-content-types.jpg b/plugins/jetpack/images/screenshots/custom-content-types.jpg
new file mode 100644
index 00000000..0558d8db
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/custom-content-types.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/custom-content-types.png b/plugins/jetpack/images/screenshots/custom-content-types.png
deleted file mode 100644
index a4d3e581..00000000
--- a/plugins/jetpack/images/screenshots/custom-content-types.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/custom-css.jpg b/plugins/jetpack/images/screenshots/custom-css.jpg
new file mode 100644
index 00000000..8a814915
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/custom-css.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/custom-css.png b/plugins/jetpack/images/screenshots/custom-css.png
deleted file mode 100644
index 6f9126d4..00000000
--- a/plugins/jetpack/images/screenshots/custom-css.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/google-plus.jpg b/plugins/jetpack/images/screenshots/google-plus.jpg
new file mode 100644
index 00000000..b326ea14
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/google-plus.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/google-plus.png b/plugins/jetpack/images/screenshots/google-plus.png
deleted file mode 100644
index 95a68e40..00000000
--- a/plugins/jetpack/images/screenshots/google-plus.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/hovercards.jpg b/plugins/jetpack/images/screenshots/hovercards.jpg
new file mode 100644
index 00000000..f2688594
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/hovercards.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/hovercards.png b/plugins/jetpack/images/screenshots/hovercards.png
deleted file mode 100644
index 21132a5e..00000000
--- a/plugins/jetpack/images/screenshots/hovercards.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/likes.jpg b/plugins/jetpack/images/screenshots/likes.jpg
new file mode 100644
index 00000000..662895af
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/likes.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/likes.png b/plugins/jetpack/images/screenshots/likes.png
deleted file mode 100644
index a01dacc1..00000000
--- a/plugins/jetpack/images/screenshots/likes.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/manage-sm.png b/plugins/jetpack/images/screenshots/manage-sm.png
deleted file mode 100644
index 93cebde3..00000000
--- a/plugins/jetpack/images/screenshots/manage-sm.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/manage.jpg b/plugins/jetpack/images/screenshots/manage.jpg
new file mode 100644
index 00000000..a3ffd6be
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/manage.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/manage.png b/plugins/jetpack/images/screenshots/manage.png
deleted file mode 100644
index 01b6e415..00000000
--- a/plugins/jetpack/images/screenshots/manage.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/mobile-push-notifications.jpg b/plugins/jetpack/images/screenshots/mobile-push-notifications.jpg
index 257c5767..df0b8d18 100644
--- a/plugins/jetpack/images/screenshots/mobile-push-notifications.jpg
+++ b/plugins/jetpack/images/screenshots/mobile-push-notifications.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/mobile-theme.jpg b/plugins/jetpack/images/screenshots/mobile-theme.jpg
new file mode 100644
index 00000000..9acd30f4
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/mobile-theme.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/mobile-theme.png b/plugins/jetpack/images/screenshots/mobile-theme.png
deleted file mode 100644
index 7dd4a397..00000000
--- a/plugins/jetpack/images/screenshots/mobile-theme.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/notes.jpg b/plugins/jetpack/images/screenshots/notes.jpg
new file mode 100644
index 00000000..0966ce5d
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/notes.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/notes.png b/plugins/jetpack/images/screenshots/notes.png
deleted file mode 100644
index f082ae95..00000000
--- a/plugins/jetpack/images/screenshots/notes.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/post-by-email.jpg b/plugins/jetpack/images/screenshots/post-by-email.jpg
new file mode 100644
index 00000000..3d97e468
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/post-by-email.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/post-by-email.png b/plugins/jetpack/images/screenshots/post-by-email.png
deleted file mode 100644
index 11ffff60..00000000
--- a/plugins/jetpack/images/screenshots/post-by-email.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/publicize.jpg b/plugins/jetpack/images/screenshots/publicize.jpg
new file mode 100644
index 00000000..fc455c43
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/publicize.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/publicize.png b/plugins/jetpack/images/screenshots/publicize.png
deleted file mode 100644
index e673725f..00000000
--- a/plugins/jetpack/images/screenshots/publicize.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/related-posts.jpg b/plugins/jetpack/images/screenshots/related-posts.jpg
new file mode 100644
index 00000000..ff1b6ae8
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/related-posts.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/related-posts.png b/plugins/jetpack/images/screenshots/related-posts.png
deleted file mode 100644
index 6eafc3a8..00000000
--- a/plugins/jetpack/images/screenshots/related-posts.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/sharing.jpg b/plugins/jetpack/images/screenshots/sharing.jpg
new file mode 100644
index 00000000..009f1d8a
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/sharing.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/sharing.png b/plugins/jetpack/images/screenshots/sharing.png
deleted file mode 100644
index c673bf22..00000000
--- a/plugins/jetpack/images/screenshots/sharing.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/shortcodes.jpg b/plugins/jetpack/images/screenshots/shortcodes.jpg
new file mode 100644
index 00000000..d88f34c2
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/shortcodes.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/shortcodes.png b/plugins/jetpack/images/screenshots/shortcodes.png
deleted file mode 100644
index 16107414..00000000
--- a/plugins/jetpack/images/screenshots/shortcodes.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/shortlinks.jpg b/plugins/jetpack/images/screenshots/shortlinks.jpg
new file mode 100644
index 00000000..8e05f24e
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/shortlinks.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/shortlinks.png b/plugins/jetpack/images/screenshots/shortlinks.png
deleted file mode 100644
index 4f1bb83c..00000000
--- a/plugins/jetpack/images/screenshots/shortlinks.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/site-icon.png b/plugins/jetpack/images/screenshots/site-icon.png
deleted file mode 100644
index f202bddc..00000000
--- a/plugins/jetpack/images/screenshots/site-icon.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/spelling.jpg b/plugins/jetpack/images/screenshots/spelling.jpg
new file mode 100644
index 00000000..93b20c47
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/spelling.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/spelling.png b/plugins/jetpack/images/screenshots/spelling.png
deleted file mode 100644
index fc5fa89f..00000000
--- a/plugins/jetpack/images/screenshots/spelling.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/stats.jpg b/plugins/jetpack/images/screenshots/stats.jpg
new file mode 100644
index 00000000..7196362e
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/stats.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/stats.png b/plugins/jetpack/images/screenshots/stats.png
deleted file mode 100644
index a7b75f07..00000000
--- a/plugins/jetpack/images/screenshots/stats.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/subscriptions.jpg b/plugins/jetpack/images/screenshots/subscriptions.jpg
new file mode 100644
index 00000000..2ed5f81f
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/subscriptions.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/subscriptions.png b/plugins/jetpack/images/screenshots/subscriptions.png
deleted file mode 100644
index 7744dbac..00000000
--- a/plugins/jetpack/images/screenshots/subscriptions.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/tiled-gallery.jpg b/plugins/jetpack/images/screenshots/tiled-gallery.jpg
new file mode 100644
index 00000000..faf986d9
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/tiled-gallery.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/tiled-gallery.png b/plugins/jetpack/images/screenshots/tiled-gallery.png
deleted file mode 100644
index 0cbba6e4..00000000
--- a/plugins/jetpack/images/screenshots/tiled-gallery.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/vaultpress.jpg b/plugins/jetpack/images/screenshots/vaultpress.jpg
new file mode 100644
index 00000000..bd243118
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/vaultpress.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/vaultpress.png b/plugins/jetpack/images/screenshots/vaultpress.png
deleted file mode 100644
index 33b42267..00000000
--- a/plugins/jetpack/images/screenshots/vaultpress.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/widgets.jpg b/plugins/jetpack/images/screenshots/widgets.jpg
new file mode 100644
index 00000000..36c240c6
--- /dev/null
+++ b/plugins/jetpack/images/screenshots/widgets.jpg
Binary files differ
diff --git a/plugins/jetpack/images/screenshots/widgets.png b/plugins/jetpack/images/screenshots/widgets.png
deleted file mode 100644
index b6864291..00000000
--- a/plugins/jetpack/images/screenshots/widgets.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/images/the-footcloud.svg b/plugins/jetpack/images/the-footcloud.svg
index 5ca0dd0c..3a83f655 100644
--- a/plugins/jetpack/images/the-footcloud.svg
+++ b/plugins/jetpack/images/the-footcloud.svg
@@ -2,8 +2,8 @@
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="-162 228 173.4 45" enable-background="new -162 228 173.4 45" xml:space="preserve">
-<path fill="#EEEEEE" d="M11.4,273c-2.7-9.3-11.2-16-21.4-16c-2.7,0-5.3,0.5-7.7,1.4c-6.4-10-17.6-16.6-30.3-16.6
- c-4.5,0-8.8,0.8-12.8,2.3c-7.8-9.8-19.9-16.1-33.4-16.1c-16.1,0-30.1,8.9-37.4,22c-1.2-0.2-2.5-0.3-3.7-0.3
- c-13.6,0-24.9,10.1-26.7,23.3H11.4z"/>
+ viewBox="0 370.2 500 129.8" enable-background="new 0 370.2 500 129.8" xml:space="preserve">
+<path fill="#F1F1F1" d="M500,500c-7.8-26.8-32.3-46.1-61.7-46.1c-7.8,0-15.3,1.4-22.2,4c-18.5-28.8-50.7-47.9-87.4-47.9
+ c-13,0-25.4,2.3-36.9,6.6c-22.5-28.3-57.4-46.4-96.3-46.4c-46.4,0-86.8,25.7-107.8,63.4c-3.5-0.6-7.2-0.9-10.7-0.9
+ c-39.2,0-71.8,29.1-77,67.2L500,500L500,500z"/>
</svg>
diff --git a/plugins/jetpack/images/wordpress-connect.jpg b/plugins/jetpack/images/wordpress-connect.jpg
index 3caad424..3fbb2629 100644
--- a/plugins/jetpack/images/wordpress-connect.jpg
+++ b/plugins/jetpack/images/wordpress-connect.jpg
Binary files differ
diff --git a/plugins/jetpack/images/wordpress-connect@2x.jpg b/plugins/jetpack/images/wordpress-connect@2x.jpg
index 6dbfee31..1ede03c8 100644
--- a/plugins/jetpack/images/wordpress-connect@2x.jpg
+++ b/plugins/jetpack/images/wordpress-connect@2x.jpg
Binary files differ
diff --git a/plugins/jetpack/images/wordpress-stats.jpg b/plugins/jetpack/images/wordpress-stats.jpg
index 67ea6a46..aa049165 100644
--- a/plugins/jetpack/images/wordpress-stats.jpg
+++ b/plugins/jetpack/images/wordpress-stats.jpg
Binary files differ
diff --git a/plugins/jetpack/images/wordpress-stats@2x.jpg b/plugins/jetpack/images/wordpress-stats@2x.jpg
index 19c3df1a..86801327 100644
--- a/plugins/jetpack/images/wordpress-stats@2x.jpg
+++ b/plugins/jetpack/images/wordpress-stats@2x.jpg
Binary files differ
diff --git a/plugins/jetpack/images/wpspin_light-2x.gif b/plugins/jetpack/images/wpspin_light-2x.gif
deleted file mode 100644
index bc1686df..00000000
--- a/plugins/jetpack/images/wpspin_light-2x.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/jetpack.php b/plugins/jetpack/jetpack.php
index c78d7ec1..a22a6257 100644
--- a/plugins/jetpack/jetpack.php
+++ b/plugins/jetpack/jetpack.php
@@ -2,19 +2,19 @@
/*
* Plugin Name: Jetpack by WordPress.com
- * Plugin URI: http://wordpress.org/extend/plugins/jetpack/
+ * Plugin URI: http://jetpack.me
* 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.
* Author: Automattic
- * Version: 3.5.3
+ * Version: 3.9.1
* Author URI: http://jetpack.me
* License: GPL2+
* Text Domain: jetpack
* Domain Path: /languages/
*/
-define( 'JETPACK__MINIMUM_WP_VERSION', '4.0' );
+define( 'JETPACK__MINIMUM_WP_VERSION', '4.3' );
-define( 'JETPACK__VERSION', '3.5.3' );
+define( 'JETPACK__VERSION', '3.9.1' );
define( 'JETPACK_MASTER_USER', true );
define( 'JETPACK__API_VERSION', 1 );
define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
@@ -48,9 +48,11 @@ require_once( JETPACK__PLUGIN_DIR . 'functions.compat.php' );
require_once( JETPACK__PLUGIN_DIR . 'functions.gallery.php' );
require_once( JETPACK__PLUGIN_DIR . 'require-lib.php' );
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-autoupdate.php' );
+require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-tracks.php' );
if ( is_admin() ) {
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php' );
+ require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-jitm.php' );
}
// Play nice with http://wp-cli.org/
diff --git a/plugins/jetpack/json-api-config.php b/plugins/jetpack/json-api-config.php
index e75c7c5b..d268049d 100644
--- a/plugins/jetpack/json-api-config.php
+++ b/plugins/jetpack/json-api-config.php
@@ -2,6 +2,7 @@
define( 'WPCOM_JSON_API__CURRENT_VERSION', '1.1' );
+global $wpcom_json_api_production_versions, $wpcom_json_api_dev_versions;
$wpcom_json_api_production_versions = array(
'1',
diff --git a/plugins/jetpack/json-endpoints.php b/plugins/jetpack/json-endpoints.php
index 43c3b27d..f119bafd 100644
--- a/plugins/jetpack/json-endpoints.php
+++ b/plugins/jetpack/json-endpoints.php
@@ -34,14 +34,16 @@ require_once( $json_endpoints_dir . 'class.wpcom-json-api-get-taxonomy-endpoint.
require_once( $json_endpoints_dir . 'class.wpcom-json-api-list-comments-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-list-media-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-list-posts-endpoint.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-list-roles-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-list-users-endpoint.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-site-user-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-comment-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-media-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-post-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-taxonomy-endpoint.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-user-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-upload-media-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-site-settings-endpoint.php' );
-require_once( $json_endpoints_dir . 'class.wpcom-json-api-publicize-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-sharing-buttons-endpoint.php' );
// **********
@@ -59,10 +61,21 @@ require_once( $json_endpoints_dir . 'class.wpcom-json-api-upload-media-v1-1-endp
require_once( $json_endpoints_dir . 'class.wpcom-json-api-get-post-v1-1-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-list-posts-v1-1-endpoint.php' );
require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-post-v1-1-endpoint.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-get-autosave-v1-1-endpoint.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-autosave-post-v1-1-endpoint.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-get-post-counts-v1-1-endpoint.php' );
// Custom Menus
require_once( $json_endpoints_dir . 'class.wpcom-json-api-menus-v1-1-endpoint.php' );
+// Users
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-list-invites-endpoint.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-invites-endpoint.php' );
+
+// Custom CSS
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-get-customcss.php' );
+require_once( $json_endpoints_dir . 'class.wpcom-json-api-update-customcss.php' );
+
// **********
// v1.2
// **********
@@ -95,9 +108,39 @@ new WPCOM_JSON_API_GET_Site_Endpoint( array(
'response_format' => WPCOM_JSON_API_GET_Site_Endpoint::$site_format,
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/?pretty=1',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/',
+) );
+
+new WPCOM_JSON_API_GET_Post_Counts_V1_1_Endpoint( array(
+ 'description' => 'Get number of posts in the post type groups by post status',
+ 'group' => '__do_not_document',
+ 'stat' => 'sites:X:post-counts:X',
+ 'force' => 'wpcom',
+ 'method' => 'GET',
+ 'min_version' => '1.1',
+ 'max_version' => '1.2',
+ 'path' => '/sites/%s/post-counts/%s',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$post_type' => '(string) Post Type',
+ ),
+
+ 'query_parameters' => array(
+ 'context' => false,
+ 'author' => '(int) author ID',
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/en.blog.wordpress.com/post-counts/page',
+
+ 'response_format' => array(
+ 'counts' => array(
+ 'all' => '(array) Number of posts by any author in the post type grouped by post status',
+ 'mine' => '(array) Number of posts by the current user in the post type grouped by post status'
+ )
+ )
) );
+
new WPCOM_JSON_API_List_Post_Formats_Endpoint( array(
'description' => 'Get a list of post formats supported by a site.',
'group' => '__do_not_document',
@@ -120,7 +163,7 @@ new WPCOM_JSON_API_List_Post_Formats_Endpoint( array(
new WPCOM_JSON_API_List_Page_Templates_Endpoint( array(
'description' => 'Get a list of page templates supported by a site.',
- 'group' => '__do_not_document',
+ 'group' => 'sites',
'stat' => 'sites:X:post-templates',
'method' => 'GET',
@@ -173,30 +216,12 @@ new WPCOM_JSON_API_List_Shortcodes_Endpoint( array(
'response_format' => array(
'shortcodes' => '(array) A list of supported shortcodes by their handle.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.com/shortcodes',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/shortcodes',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
- ),
- 'example_response' => '
- {
- "shortcodes": [
- "wp_caption",
- "caption",
- "gallery",
- "playlist",
- "audio",
- "video",
- "flickr",
- "github-buttons",
- "gist",
- "gravatar",
- "gravatar_profile",
- "polldaddy",
- "simplenote",
- ],
- } ',
+ )
) );
new WPCOM_JSON_API_Render_Shortcode_Endpoint( array(
@@ -217,38 +242,12 @@ new WPCOM_JSON_API_Render_Shortcode_Endpoint( array(
'scripts' => '(array) An array of JavaScript files needed to render the shortcode. Returned in the format of <code>{ "script-slug" : { "src": "http://example.com/file.js", "extra" : "" } }</code> where extra contains any neccessary extra JS for initializing the source file and src contains the script to load. Omitted if no scripts are neccessary.',
'styles' => '(array) An array of CSS files needed to render the shortcode. Returned in the format of <code>{ "style-slug" : { "src": "http://example.com/file.css", "media" : "all" } }</code>. Omitted if no styles are neccessary.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/shortcodes/render?shortcode=%5Bgallery%20ids%3D%22729%2C732%2C731%2C720%22%5D',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/shortcodes/render?shortcode=%5Bgallery%20ids%3D%22729%2C732%2C731%2C720%22%5D',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
- ),
- 'example_response' => '
- {
- "shortcode": "[[gallery ids=\"729,732,731,720\"]]",
- "result": "\n\t\t<style type="text/css">\n\t\t\t#gallery-0-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-0-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 33%;\n\t\t\t}\n\t\t\t#gallery-0-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-0-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t/* see gallery_shortcode() in wp-includes/media.php */\n\t\t</style>\n\t\t<div id="gallery-0-1" class="gallery galleryid-0 gallery-columns-3 gallery-size-thumbnail"><dl class="gallery-item">\n\t\t\t<dt class="gallery-icon landscape">\n\t\t\t\t<a href="http://en.blog.wordpress.com/2007/07/10/submit-for-review/submit-for-review/"><img width=\"150\" height=\"61\" src=\"https://wpcom.files.wordpress.com/2007/07/submit-for-review.jpg?w=150\" class=\"attachment-thumbnail\" alt=\"Submit for Review\" data-attachment-id=\"731\" data-orig-file=\"https://wpcom.files.wordpress.com/2007/07/submit-for-review.jpg\" data-orig-size=\"921,372\" data-comments-opened=\"1\" data-image-meta=\"[]\" data-image-title=\"Submit for Review\" data-image-description=\"\" data-medium-file=\"https://wpcom.files.wordpress.com/2007/07/submit-for-review.jpg?w=300\" data-large-file=\"https://wpcom.files.wordpress.com/2007/07/submit-for-review.jpg?w=921\" /></a>\n\t\t\t</dt></dl>\n\t\t\t<br style="clear: both" />\n\t\t</div>\n",
- "scripts": {
- "spin": {
- "src": "https://en.blog.wordpress.com/wp-includes/js/spin.js?ver=1.3"
- },
- "jquery.spin": {
- "src": "https://en.blog.wordpress.com/wp-includes/js/jquery/jquery.spin.js?ver=1.3"
- },
- "jetpack-carousel": {
- "src": "https://s1.wp.com/wp-content/mu-plugins/carousel/jetpack-carousel.js?ver=1738091679",
- }
- },
- "styles": {
- "jetpack-carousel": {
- "src": "https://s1.wp.com/wp-content/mu-plugins/carousel/jetpack-carousel.css?ver=1201731771",
- "media": "all"
- },
- "jetpack-carousel-ie8fix": {
- "src": "https://s1.wp.com/wp-content/mu-plugins/carousel/jetpack-carousel-ie8fix.css?ver=1777576104",
- "media": "all"
- }
- },
- } '
+ )
) );
/*
@@ -266,25 +265,12 @@ new WPCOM_JSON_API_List_Embeds_Endpoint( array(
'response_format' => array(
'embeds' => '(array) A list of supported embeds by their regex pattern.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.com/embeds',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/embeds',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
- ),
- 'example_response' => '
- {
- "embeds": [
- "#https?://gist\\.github\\.com/([a-zA-Z0-9]+)#",
- "#https?://(www.)?youtube\\.com/embed/([^/]+)#i",
- "/^https?:\\/\\/(?:app.simplenote.com|simp.ly)\\/publish\\/(\\w+)/i",
- "#https?://(www\\.)?flickr\\.com/.*#i",
- "#https?://flic\\.kr/.*#i",
- "#https?://wordpress.tv/.*#i",
- "#https?://(.+\\.)?polldaddy\\.com/.*#i",
- "#https?://cloudup\\.com/([^/.]+)#",
- ],
- } '
+ )
) );
new WPCOM_JSON_API_Render_Embed_Endpoint( array(
@@ -303,17 +289,12 @@ new WPCOM_JSON_API_Render_Embed_Endpoint( array(
'embed_url' => '(string) The embed_url that was passed in for rendering.',
'result' => '(html) The rendered HTML result of the embed.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/embeds/render?embed_url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSQEQr7c0-dw',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/apiexamples.wordpress.com/embeds/render?embed_url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSQEQr7c0-dw',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
- ),
- 'example_response' => '
- {
- "embed_url": "https://www.youtube.com/watch?v=SQEQr7c0-dw",
- "result": "<span class="embed-youtube" style="text-align:center; display: block;""><​iframe class="youtube-player" type="text/html" width="640" height="390" src="https://www.youtube.com/embed/SQEQr7c0-dw?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent" frameborder="0" allowfullscreen="true"></iframe></span>",
- } '
+ )
) );
new WPCOM_JSON_API_Render_Embed_Reversal_Endpoint( array(
@@ -337,7 +318,7 @@ new WPCOM_JSON_API_Render_Embed_Reversal_Endpoint( array(
'scripts' => '(array) An array of JavaScript files needed to render the embed or shortcode. Returned in the format of <code>{ "script-slug" : { "src": "http://example.com/file.js", "extra" : "" } }</code> where extra contains any neccessary extra JS for initializing the source file and src contains the script to load. Omitted if no scripts are neccessary.',
'styles' => '(array) An array of CSS files needed to render the embed or shortcode. Returned in the format of <code>{ "style-slug" : { "src": "http://example.com/file.css", "media" : "all" } }</code>. Omitted if no styles are neccessary.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/shortcode-reversals/render/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/shortcode-reversals/render/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -347,13 +328,6 @@ new WPCOM_JSON_API_Render_Embed_Reversal_Endpoint( array(
'maybe_embed' => '<iframe width="480" height="302" src="http://www.ustream.tv/embed/recorded/26370522/highlight/299667?v=3&amp;wmode=direct" scrolling="no" frameborder="0"></iframe>',
)
),
-
- 'example_response' => array(
- 'maybe_embed' => '<iframe width="480" height="302" src="http://www.ustream.tv/embed/recorded/26370522/highlight/299667?v=3&amp;wmode=direct" scrolling="no" frameborder="0"></iframe>',
- 'render_result' => '<iframe src="https://www.ustream.tv/embed/recorded/26370522/highlight/299667?v=3&#038;wmode=direct" width="480" height="302" scrolling="no" frameborder="0" style="border: 0px none transparent;"></iframe>',
- 'reversal_type' => 'shortcode',
- 'result' => '[ustream id=26370522 highlight=299667 hwaccel=1 version=3 width=480 height=302]',
- ),
) );
@@ -415,7 +389,7 @@ new WPCOM_JSON_API_List_Posts_Endpoint( array(
'meta_value' => '(string) Metadata value that the post should contain. Will only be applied if a `meta_key` is also given',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/?number=5&pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/?number=5'
) );
new WPCOM_JSON_API_List_Posts_v1_1_Endpoint( array(
@@ -470,7 +444,7 @@ new WPCOM_JSON_API_List_Posts_v1_1_Endpoint( array(
'meta_value' => '(string) Metadata value that the post should contain. Will only be applied if a `meta_key` is also given',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/?number=2&pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/?number=2'
) );
new WPCOM_JSON_API_Get_Post_Endpoint( array(
@@ -486,7 +460,7 @@ new WPCOM_JSON_API_Get_Post_Endpoint( array(
'$post_ID' => '(int) The post ID',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/7/?pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/7'
) );
new WPCOM_JSON_API_Get_Post_v1_1_Endpoint( array(
@@ -501,7 +475,7 @@ new WPCOM_JSON_API_Get_Post_v1_1_Endpoint( array(
'$site' => '(int|string) Site ID or domain',
'$post_ID' => '(int) The post ID',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/7/?pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/7'
) );
new WPCOM_JSON_API_Get_Post_Endpoint( array(
@@ -531,7 +505,7 @@ new WPCOM_JSON_API_Get_Post_Endpoint( array(
'$post_slug' => '(string) The post slug (a.k.a. sanitized name)',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/slug:blogging-and-stuff?pretty=1',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/slug:blogging-and-stuff',
) );
new WPCOM_JSON_API_Get_Post_v1_1_Endpoint( array(
@@ -546,7 +520,7 @@ new WPCOM_JSON_API_Get_Post_v1_1_Endpoint( array(
'$site' => '(int|string) Site ID or domain',
'$post_slug' => '(string) The post slug (a.k.a. sanitized name)',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/slug:blogging-and-stuff?pretty=1',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/en.blog.wordpress.com/posts/slug:blogging-and-stuff',
) );
new WPCOM_JSON_API_Update_Post_Endpoint( array(
@@ -587,7 +561,7 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'type' => "(string) The post type. Defaults to 'post'. Post types besides post and page need to be whitelisted using the <code>rest_api_allowed_post_types</code> filter.",
'categories' => "(array|string) Comma-separated list or array of categories (name or id)",
'tags' => "(array|string) Comma-separated list or array of tags (name or id)",
- 'format' => get_post_format_strings(),
+ 'format' => array_merge( array( 'default' => 'Use default post format' ), get_post_format_strings() ),
'featured_image' => "(string) The post ID of an existing attachment to set as the featured image. Pass an empty string to delete the existing image.",
'media' => "(media) An array of files to attach to the post. To upload media, the entire request should be multipart/form-data encoded. Multiple media items will be displayed in a gallery. Accepts jpg, jpeg, png, gif, pdf, doc, ppt, odt, pptx, docx, pps, ppsx, xls, xlsx, key. Audio and Video may also be available. See <code>allowed_file_types</code> in the options response of the site endpoint. <br /><br /><strong>Example</strong>:<br />" .
"<code>curl \<br />--form 'title=Image' \<br />--form 'media[]=@/path/to/file.jpg' \<br />-H 'Authorization: BEARER your-token' \<br />'https://public-api.wordpress.com/rest/v1/sites/123/posts/new'</code>",
@@ -600,7 +574,7 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'menu_order' => "(int) (Pages Only) the order pages should appear in. Use 0 to maintain alphabetical order.",
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/posts/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/posts/new/',
'example_request_data' => array(
'headers' => array(
@@ -613,104 +587,7 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'tags' => 'tests',
'categories' => 'API'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1270,
- "author": {
- "ID": 18342963,
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- "date": "2012-04-11T19:42:44+00:00",
- "modified": "2012-04-11T19:42:44+00:00",
- "title": "Hello World",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-3\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-ku",
- "content": "<p>Hello. I am a test post. I was created by the API<\/p>\n",
- "excerpt": "<p>Hello. I am a test post. I was created by the API<\/p>\n",
- "status": "publish",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "comments_open": true,
- "pings_open": true,
- "likes_enabled": true,
- "sharing_enabled": true,
- "comment_count": 0,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "format": "standard",
- "geo": false,
- "current_user_can": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 1,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 1,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1270",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1270\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1270\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1270\/likes\/"
- }
- }
-}'
+ )
) );
new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
@@ -740,6 +617,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'private' => 'Privately publish the post.',
'draft' => 'Save the post as a draft.',
'pending' => 'Mark the post as pending editorial approval.',
+ 'future' => 'Schedule the post (alias for publish; you must also set a future date).',
'auto-draft' => 'Save a placeholder for a newly created post, with no content.',
),
'sticky' => array(
@@ -751,7 +629,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'type' => "(string) The post type. Defaults to 'post'. Post types besides post and page need to be whitelisted using the <code>rest_api_allowed_post_types</code> filter.",
'categories' => "(array|string) Comma-separated list or array of categories (name or id)",
'tags' => "(array|string) Comma-separated list or array of tags (name or id)",
- 'format' => get_post_format_strings(),
+ 'format' => array_merge( array( 'default' => 'Use default post format' ), get_post_format_strings() ),
'featured_image' => "(string) The post ID of an existing attachment to set as the featured image. Pass an empty string to delete the existing image.",
'media' => "(media) An array of files to attach to the post. To upload media, the entire request should be multipart/form-data encoded. Multiple media items will be displayed in a gallery. Accepts jpg, jpeg, png, gif, pdf, doc, ppt, odt, pptx, docx, pps, ppsx, xls, xlsx, key. Audio and Video may also be available. See <code>allowed_file_types</code> in the options response of the site endpoint. Errors produced by media uploads, if any, will be in `media_errors` in the response. <br /><br /><strong>Example</strong>:<br />" .
"<code>curl \<br />--form 'title=Image Post' \<br />--form 'media[0]=@/path/to/file.jpg' \<br />--form 'media_attrs[0][caption]=My Great Photo' \<br />-H 'Authorization: BEARER your-token' \<br />'https://public-api.wordpress.com/rest/v1/sites/123/posts/new'</code>",
@@ -766,7 +644,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'page_template' => '(string) (Pages Only) The page template this page should use.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/30434183/posts/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/new/',
'example_request_data' => array(
'headers' => array(
@@ -779,103 +657,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'tags' => 'tests',
'categories' => 'API'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1270,
- "author": {
- "ID": 18342963,
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- "date": "2012-04-11T19:42:44+00:00",
- "modified": "2012-04-11T19:42:44+00:00",
- "title": "Hello World",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-3\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-ku",
- "content": "<p>Hello. I am a test post. I was created by the API<\/p>\n",
- "excerpt": "<p>Hello. I am a test post. I was created by the API<\/p>\n",
- "status": "publish",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "discussion": {
- "comments_open": true,
- "comment_status": "open",
- "pings_open": true,
- "ping_status": "open",
- "comment_count": 0
- },
- "likes_enabled": true,
- "sharing_enabled": true,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "format": "standard",
- "geo": false,
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 1,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 1,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1270",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1270\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1270\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1270\/likes\/"
- }
- }
-}'
+ )
) );
new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
@@ -905,6 +687,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'private' => 'Privately publish the post.',
'draft' => 'Save the post as a draft.',
'pending' => 'Mark the post as pending editorial approval.',
+ 'future' => 'Schedule the post (alias for publish; you must also set a future date).',
'auto-draft' => 'Save a placeholder for a newly created post, with no content.',
),
'sticky' => array(
@@ -918,7 +701,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'tags' => "(array|string) Comma-separated list or array of tag names",
'categories_by_id' => "(array|string) Comma-separated list or array of category IDs",
'tags_by_id' => "(array|string) Comma-separated list or array of tag IDs",
- 'format' => get_post_format_strings(),
+ 'format' => array_merge( array( 'default' => 'Use default post format' ), get_post_format_strings() ),
'featured_image' => "(string) The post ID of an existing attachment to set as the featured image. Pass an empty string to delete the existing image.",
'media' => "(media) An array of files to attach to the post. To upload media, the entire request should be multipart/form-data encoded. Multiple media items will be displayed in a gallery. Accepts jpg, jpeg, png, gif, pdf, doc, ppt, odt, pptx, docx, pps, ppsx, xls, xlsx, key. Audio and Video may also be available. See <code>allowed_file_types</code> in the options response of the site endpoint. Errors produced by media uploads, if any, will be in `media_errors` in the response. <br /><br /><strong>Example</strong>:<br />" .
"<code>curl \<br />--form 'title=Image Post' \<br />--form 'media[0]=@/path/to/file.jpg' \<br />--form 'media_attrs[0][caption]=My Great Photo' \<br />-H 'Authorization: BEARER your-token' \<br />'https://public-api.wordpress.com/rest/v1/sites/123/posts/new'</code>",
@@ -933,7 +716,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'page_template' => '(string) (Pages Only) The page template this page should use.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/30434183/posts/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/82974409/posts/new/',
'example_request_data' => array(
'headers' => array(
@@ -946,103 +729,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'tags' => 'tests',
'categories' => 'API'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1270,
- "author": {
- "ID": 18342963,
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- "date": "2012-04-11T19:42:44+00:00",
- "modified": "2012-04-11T19:42:44+00:00",
- "title": "Hello World",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-3\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-ku",
- "content": "<p>Hello. I am a test post. I was created by the API<\/p>\n",
- "excerpt": "<p>Hello. I am a test post. I was created by the API<\/p>\n",
- "status": "publish",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "discussion": {
- "comments_open": true,
- "comment_status": "open",
- "pings_open": true,
- "ping_status": "open",
- "comment_count": 0
- },
- "likes_enabled": true,
- "sharing_enabled": true,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "format": "standard",
- "geo": false,
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 1,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183"
- }
- }
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 1,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1270",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1270\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1270\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1270\/likes\/"
- }
- }
-}'
+ )
) );
new WPCOM_JSON_API_Update_Post_Endpoint( array(
@@ -1081,7 +768,7 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'parent' => "(int) The post ID of the new post's parent.",
'categories' => "(array|string) Comma-separated list or array of categories (name or id)",
'tags' => "(array|string) Comma-separated list or array of tags (name or id)",
- 'format' => get_post_format_strings(),
+ 'format' => array_merge( array( 'default' => 'Use default post format' ), get_post_format_strings() ),
'comments_open' => '(bool) Should the post be open to comments?',
'pings_open' => '(bool) Should the post be open to comments?',
'likes_enabled' => "(bool) Should the post be open to likes?",
@@ -1094,7 +781,7 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'metadata' => "(array) Array of metadata objects containing the following properties: `key` (metadata key), `id` (meta ID), `previous_value` (if set, the action will only occur for the provided previous value), `value` (the new value to set the meta to), `operation` (the operation to perform: `update` or `add`; defaults to `update`). All unprotected meta keys are available by default for read requests. Both unprotected and protected meta keys are available for authenticated requests with proper capabilities. Protected meta keys can be made available with the <code>rest_api_allowed_public_metadata</code> filter.",
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/posts/1222/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/posts/881',
'example_request_data' => array(
'headers' => array(
@@ -1107,106 +794,7 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'tags' => 'tests',
'categories' => 'API'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1222,
- "author": {
- "ID": 422,
- "email": false,
- "name": "Justin Shreve",
- "URL": "http:\/\/justin.wordpress.com",
- "avatar_URL": "http:\/\/1.gravatar.com\/avatar\/9ea5b460afb2859968095ad3afe4804b?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/justin"
- },
- "date": "2012-04-11T15:53:52+00:00",
- "modified": "2012-04-11T19:44:35+00:00",
- "title": "Hello World (Again)",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI",
- "content": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "excerpt": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "status": "publish",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "comments_open": true,
- "pings_open": true,
- "likes_enabled": true,
- "sharing_enabled": true,
- "comment_count": 5,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "post_thumbnail": null,
- "format": "standard",
- "geo": false,
- "current_user_can": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 2,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 2,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/likes\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
@@ -1235,6 +823,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'publish' => 'Publish the post.',
'private' => 'Privately publish the post.',
'draft' => 'Save the post as a draft.',
+ 'future' => 'Schedule the post (alias for publish; you must also set a future date).',
'pending' => 'Mark the post as pending editorial approval.',
),
'sticky' => array(
@@ -1245,7 +834,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'parent' => "(int) The post ID of the new post's parent.",
'categories' => "(array|string) Comma-separated list or array of categories (name or id)",
'tags' => "(array|string) Comma-separated list or array of tags (name or id)",
- 'format' => get_post_format_strings(),
+ 'format' => array_merge( array( 'default' => 'Use default post format' ), get_post_format_strings() ),
'discussion' => '(object) A hash containing one or more of the following boolean values, which default to the blog\'s discussion preferences: `comments_open`, `pings_open`',
'likes_enabled' => "(bool) Should the post be open to likes?",
'menu_order' => "(int) (Pages only) the order pages should appear in. Use 0 to maintain alphabetical order.",
@@ -1258,7 +847,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'metadata' => "(array) Array of metadata objects containing the following properties: `key` (metadata key), `id` (meta ID), `previous_value` (if set, the action will only occur for the provided previous value), `value` (the new value to set the meta to), `operation` (the operation to perform: `update` or `add`; defaults to `update`). All unprotected meta keys are available by default for read requests. Both unprotected and protected meta keys are available for authenticated requests with proper capabilities. Protected meta keys can be made available with the <code>rest_api_allowed_public_metadata</code> filter.",
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/30434183/posts/1222/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/881',
'example_request_data' => array(
'headers' => array(
@@ -1271,105 +860,7 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'tags' => 'tests',
'categories' => 'API'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1222,
- "author": {
- "ID": 422,
- "email": false,
- "name": "Justin Shreve",
- "URL": "http:\/\/justin.wordpress.com",
- "avatar_URL": "http:\/\/1.gravatar.com\/avatar\/9ea5b460afb2859968095ad3afe4804b?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/justin"
- },
- "date": "2012-04-11T15:53:52+00:00",
- "modified": "2012-04-11T19:44:35+00:00",
- "title": "Hello World (Again)",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI",
- "content": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "excerpt": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "status": "publish",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "discussion": {
- "comments_open": true,
- "comment_status": "open",
- "pings_open": true,
- "ping_status": "open",
- "comment_count": 5
- },
- "likes_enabled": true,
- "sharing_enabled": true,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "post_thumbnail": null,
- "format": "standard",
- "geo": false,
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 2,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 2,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/likes\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
@@ -1398,6 +889,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'publish' => 'Publish the post.',
'private' => 'Privately publish the post.',
'draft' => 'Save the post as a draft.',
+ 'future' => 'Schedule the post (alias for publish; you must also set a future date).',
'pending' => 'Mark the post as pending editorial approval.',
),
'sticky' => array(
@@ -1410,7 +902,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'categories_by_id' => "(array|string) Comma-separated list or array of category IDs",
'tags' => "(array|string) Comma-separated list or array of tag names",
'tags_by_id' => "(array|string) Comma-separated list or array of tag IDs",
- 'format' => get_post_format_strings(),
+ 'format' => array_merge( array( 'default' => 'Use default post format' ), get_post_format_strings() ),
'discussion' => '(object) A hash containing one or more of the following boolean values, which default to the blog\'s discussion preferences: `comments_open`, `pings_open`',
'likes_enabled' => "(bool) Should the post be open to likes?",
'menu_order' => "(int) (Pages only) the order pages should appear in. Use 0 to maintain alphabetical order.",
@@ -1423,7 +915,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'metadata' => "(array) Array of metadata objects containing the following properties: `key` (metadata key), `id` (meta ID), `previous_value` (if set, the action will only occur for the provided previous value), `value` (the new value to set the meta to), `operation` (the operation to perform: `update` or `add`; defaults to `update`). All unprotected meta keys are available by default for read requests. Both unprotected and protected meta keys are available for authenticated requests with proper capabilities. Protected meta keys can be made available with the <code>rest_api_allowed_public_metadata</code> filter.",
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/30434183/posts/1222/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.2/sites/82974409/posts/881',
'example_request_data' => array(
'headers' => array(
@@ -1436,105 +928,7 @@ new WPCOM_JSON_API_Update_Post_v1_2_Endpoint( array(
'tags' => 'tests',
'categories' => 'API'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1222,
- "author": {
- "ID": 422,
- "email": false,
- "name": "Justin Shreve",
- "URL": "http:\/\/justin.wordpress.com",
- "avatar_URL": "http:\/\/1.gravatar.com\/avatar\/9ea5b460afb2859968095ad3afe4804b?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/justin"
- },
- "date": "2012-04-11T15:53:52+00:00",
- "modified": "2012-04-11T19:44:35+00:00",
- "title": "Hello World (Again)",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI",
- "content": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "excerpt": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "status": "publish",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "discussion": {
- "comments_open": true,
- "comment_status": "open",
- "pings_open": true,
- "ping_status": "open",
- "comment_count": 5
- },
- "likes_enabled": true,
- "sharing_enabled": true,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "post_thumbnail": null,
- "format": "standard",
- "geo": false,
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 2,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183"
- }
- }
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 2,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1222",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1222\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1222\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1.2\/sites\/30434183\/posts\/1222\/likes\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Post_Endpoint( array(
@@ -1550,112 +944,13 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'$post_ID' => '(int) The post ID',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/posts/1222/delete/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/posts/$post_ID/delete/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1222,
- "author": {
- "ID": 422,
- "email": false,
- "name": "Justin Shreve",
- "URL": "http:\/\/justin.wordpress.com",
- "avatar_URL": "http:\/\/1.gravatar.com\/avatar\/9ea5b460afb2859968095ad3afe4804b?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/justin"
- },
- "date": "2012-04-11T15:53:52+00:00",
- "modified": "2012-04-11T19:49:42+00:00",
- "title": "Hello World (Again)",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI",
- "content": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "excerpt": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "status": "trash",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "comments_open": true,
- "pings_open": true,
- "likes_enabled": true,
- "sharing_enabled": true,
- "comment_count": 5,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "post_thumbnail": null,
- "format": "standard",
- "geo": false,
- "current_user_can": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 1,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 1,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/likes\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
@@ -1671,111 +966,13 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'$post_ID' => '(int) The post ID',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/30434183/posts/1222/delete/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/$post_ID/delete/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1222,
- "author": {
- "ID": 422,
- "email": false,
- "name": "Justin Shreve",
- "URL": "http:\/\/justin.wordpress.com",
- "avatar_URL": "http:\/\/1.gravatar.com\/avatar\/9ea5b460afb2859968095ad3afe4804b?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/justin"
- },
- "date": "2012-04-11T15:53:52+00:00",
- "modified": "2012-04-11T19:49:42+00:00",
- "title": "Hello World (Again)",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI",
- "content": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "excerpt": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "status": "trash",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "discussion": {
- "comments_open": true,
- "comment_status": "open",
- "pings_open": true,
- "ping_status": "open",
- "comment_count": 5
- },
- "likes_enabled": true,
- "sharing_enabled": true,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "post_thumbnail": null,
- "format": "standard",
- "geo": false,
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 1,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 1,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/likes\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Post_Endpoint( array(
@@ -1792,112 +989,13 @@ new WPCOM_JSON_API_Update_Post_Endpoint( array(
'$post_ID' => '(int) The post ID',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/posts/1222/restore/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/posts/$post_ID/restore/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
)
- ),
-
- 'example_response' => '
-{
- "ID": 1222,
- "author": {
- "ID": 422,
- "email": false,
- "name": "Justin Shreve",
- "URL": "http:\/\/justin.wordpress.com",
- "avatar_URL": "http:\/\/1.gravatar.com\/avatar\/9ea5b460afb2859968095ad3afe4804b?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/justin"
- },
- "date": "2012-04-11T15:53:52+00:00",
- "modified": "2012-04-11T19:49:42+00:00",
- "title": "Hello World (Again)",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI",
- "content": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "excerpt": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "status": "draft",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "comments_open": true,
- "pings_open": true,
- "likes_enabled": true,
- "sharing_enabled": true,
- "comment_count": 5,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "post_thumbnail": null,
- "format": "standard",
- "geo": false,
- "current_user_can": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 1,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 1,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222\/likes\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
@@ -1913,107 +1011,75 @@ new WPCOM_JSON_API_Update_Post_v1_1_Endpoint( array(
'$post_ID' => '(int) The post ID',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/30434183/posts/1222/restore/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/$post_ID/restore/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
)
+ )
+) );
+
+new WPCOM_JSON_API_Get_Autosave_v1_1_Endpoint( array(
+ 'description' => 'Get the most recent autosave for a post.',
+ 'group' => '__do_not_document',
+ 'stat' => 'posts:autosave',
+ 'min_version' => '1.1',
+ 'method' => 'GET',
+ 'path' => '/sites/%s/posts/%d/autosave',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$post_ID' => '(int) The post ID',
+ ),
+ 'response_format' => array(
+ 'ID' => '(int) autodraft post ID',
+ 'post_ID' => '(int) post ID',
+ 'author_ID' => '(int) author ID',
+ 'title' => '(HTML) The post title.',
+ 'content' => '(HTML) The post content.',
+ 'excerpt' => '(HTML) The post excerpt.',
+ 'preview_URL' => '(string) preview URL for the post',
+ 'modified' => '(ISO 8601 datetime) modified time',
),
- 'example_response' => '
-{
- "ID": 1222,
- "author": {
- "ID": 422,
- "email": false,
- "name": "Justin Shreve",
- "URL": "http:\/\/justin.wordpress.com",
- "avatar_URL": "http:\/\/1.gravatar.com\/avatar\/9ea5b460afb2859968095ad3afe4804b?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/justin"
- },
- "date": "2012-04-11T15:53:52+00:00",
- "modified": "2012-04-11T19:49:42+00:00",
- "title": "Hello World (Again)",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI",
- "content": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "excerpt": "<p>Hello. I am an edited post. I was edited by the API<\/p>\n",
- "status": "draft",
- "sticky": false,
- "password": "",
- "parent": false,
- "type": "post",
- "comments_open": true,
- "pings_open": true,
- "likes_enabled": true,
- "sharing_enabled": true,
- "comment_count": 5,
- "like_count": 0,
- "i_like": false,
- "is_reblogged": false,
- "is_following": false,
- "featured_image": "",
- "post_thumbnail": null,
- "format": "standard",
- "geo": false,
- "capabilities": {
- "publish_post": true,
- "delete_post": true,
- "edit_post": true,
- },
- "publicize_URLs": [
-
- ],
- "tags": {
- "tests": {
- "name": "tests",
- "slug": "tests",
- "description": "",
- "post_count": 1,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/tags\/tests\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "metadata": {
- {
- "id" : 123,
- "key" : "test_meta_key",
- "value" : "test_value",
- }
- },
- "categories": {
- "API": {
- "name": "API",
- "slug": "api",
- "description": "",
- "post_count": 1,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/categories\/api\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183"
- }
- }
- }
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/replies\/",
- "likes": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/posts\/1222\/likes\/"
- }
- }
-}'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/1/autosave',
+) );
+new WPCOM_JSON_API_Autosave_Post_v1_1_Endpoint( array(
+ 'description' => 'Create a post autosave.',
+ 'group' => '__do_not_document',
+ 'stat' => 'posts:autosave',
+ 'min_version' => '1.1',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/posts/%d/autosave',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$post_ID' => '(int) The post ID',
+ ),
+ 'request_format' => array(
+ 'content' => '(HTML) The post content.',
+ 'title' => '(HTML) The post title.',
+ 'excerpt' => '(HTML) The post excerpt.',
+ ),
+ 'response_format' => array(
+ 'ID' => '(int) autodraft post ID',
+ 'post_ID' => '(int) post ID',
+ 'preview_URL' => '(string) preview URL for the post',
+ 'modified' => '(ISO 8601 datetime) modified time',
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/posts/1/autosave',
+
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+
+ 'body' => array(
+ 'title' => 'Howdy',
+ 'content' => 'Hello. I am a test post. I was created by the API',
+ )
+ )
) );
/*
@@ -2045,7 +1111,12 @@ new WPCOM_JSON_API_List_Media_Endpoint( array(
'found' => '(int) The number of total results found'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.com/media/?number=2&pretty=true',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/media/?number=2',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ )
+ )
) );
new WPCOM_JSON_API_List_Media_v1_1_Endpoint( array(
@@ -2086,91 +1157,12 @@ new WPCOM_JSON_API_List_Media_v1_1_Endpoint( array(
'found' => '(int) The number of total results found'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/opossumapi.wordpress.com/media',
- 'example_request_data' => array(
- 'headers' => array(
- 'authorization' => 'Bearer YOUR_API_TOKEN'
- )
- ),
-
- 'example_response' => '
- {
- "found": 5549,
- "media": [
- {
- "ID": "880165",
- "URL": "https:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "guid": "http:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "date": "2014-10-14T22:22:41+00:00",
- "post_ID": 0,
- "file": "screen-shot-2014-10-14-at-3-22-19-pm.png",
- "mime_type": "image\/png",
- "extension": "png",
- "title": "Screen Shot 2014-10-14 at 3.22.19 PM",
- "caption": "",
- "description": "",
- "alt": "",
- "height": 602,
- "width": 764,
- "exif": {
- "aperture": 0,
- "credit": "",
- "camera": "",
- "caption": "",
- "created_timestamp": 0,
- "copyright": "",
- "focal_length": 0,
- "iso": 0,
- "shutter_speed": 0,
- "title": "",
- "orientation": 0
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- },
- {
- "ID": "880156",
- "URL": "https:\/\/opossumapi.files.wordpress.com\/2014\/10\/encdrtnnuk-3000x30001530.jpeg",
- "guid": "http:\/\/opossumapi.files.wordpress.com\/2014\/10\/encdrtnnuk-3000x30001530.jpeg",
- "date": "2014-10-14T22:08:30+00:00",
- "post_ID": 880155,
- "file": "encdrtnnuk-3000x30001530.jpeg",
- "mime_type": "image\/jpeg",
- "extension": "jpeg",
- "title": "encdrtnnuk-3000x30001530",
- "caption": "",
- "description": "",
- "height": 1536,
- "width": 2048,
- "exif": {
- "aperture": 0,
- "credit": "",
- "camera": "",
- "caption": "",
- "created_timestamp": 0,
- "copyright": "",
- "focal_length": 0,
- "iso": 0,
- "shutter_speed": 0,
- "title": "",
- "orientation": 0
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880156",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880156\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "parent": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/880155"
- }
- }
- },
- ]
- }',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ )
+ )
) );
new WPCOM_JSON_API_Get_Media_Endpoint( array(
@@ -2197,7 +1189,12 @@ new WPCOM_JSON_API_Get_Media_Endpoint( array(
'metadata' => '(array) Array of metadata about the file, such as Exif data or sizes',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.com/media/36',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/media/934',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ )
+ )
) );
new WPCOM_JSON_API_Get_Media_v1_1_Endpoint( array(
@@ -2228,57 +1225,18 @@ new WPCOM_JSON_API_Get_Media_v1_1_Endpoint( array(
'thumbnails' => '(object) Media item thumbnail URL options',
'height' => '(int) (Image & video only) Height of the media item',
'width' => '(int) (Image & video only) Width of the media item',
+ 'length' => '(int) (Video & audio only) Duration of the media item, in seconds',
'exif' => '(array) (Image & audio only) Exif (meta) information about the media item',
'videopress_guid' => '(string) (Video only) VideoPress GUID of the video when uploaded on a blog with VideoPress',
'videopress_processing_done' => '(bool) (Video only) If the video is uploaded on a blog with VideoPress, this will return the status of processing on the video.'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/opossumapi.wordpress.com/media/880165',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media/934',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
)
- ),
-
- 'example_response' => '
- {
- "ID": "880165",
- "URL": "https:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "guid": "http:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "date": "2014-10-14T22:22:41+00:00",
- "post_ID": 0,
- "file": "screen-shot-2014-10-14-at-3-22-19-pm.png",
- "mime_type": "image\/png",
- "extension": "png",
- "title": "Screen Shot 2014-10-14 at 3.22.19 PM",
- "caption": "",
- "description": "",
- "alt": "",
- "thumbnails": {},
- "height": 602,
- "width": 764,
- "exif": {
- "aperture": 0,
- "credit": "",
- "camera": "",
- "caption": "",
- "created_timestamp": 0,
- "copyright": "",
- "focal_length": 0,
- "iso": 0,
- "shutter_speed": 0,
- "title": "",
- "orientation": 0
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
-',
+ )
) );
new WPCOM_JSON_API_Upload_Media_Endpoint( array(
@@ -2300,12 +1258,20 @@ new WPCOM_JSON_API_Upload_Media_Endpoint( array(
'media_urls' => "(array) An array of URLs to upload to the post."
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/media/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/media/new/',
'response_format' => array(
'media' => '(array) Array of uploaded media',
'errors' => '(array) Array of error messages of uploading media failures'
),
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ 'body' => array(
+ 'media_urls' => "https://s.w.org/about/images/logos/codeispoetry-rgb.png"
+ )
+ )
) );
new WPCOM_JSON_API_Upload_Media_v1_1_Endpoint( array(
@@ -2333,56 +1299,15 @@ new WPCOM_JSON_API_Upload_Media_v1_1_Endpoint( array(
'errors' => '(array) Array of error messages of uploading media failures'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/33534099/media/new',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media/new',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
'body' => array(
- 'media_urls[]' => "https://s.w.org/about/images/logos/codeispoetry-rgb.png"
+ 'media_urls' => "https://s.w.org/about/images/logos/codeispoetry-rgb.png"
)
- ),
- 'example_response' => '
- {
- "media": [
- {
- "ID": 25378,
- "URL": "https://developer.files.wordpress.com/2015/01/codeispoetry-rgb.png",
- "guid": "http://developer.files.wordpress.com/2015/01/codeispoetry-rgb.png",
- "date": "2015-01-14T22:55:33+00:00",
- "post_ID": 0,
- "file": "codeispoetry-rgb.png",
- "mime_type": "image/png",
- "extension": "png",
- "title": "codeispoetry-rgb",
- "caption": "",
- "description": "",
- "alt": "",
- "height": 34,
- "width": 500,
- "exif": {
- "aperture": 0,
- "credit": "",
- "camera": "",
- "caption": "",
- "created_timestamp": 0,
- "copyright": "",
- "focal_length": 0,
- "iso": 0,
- "shutter_speed": 0,
- "title": "",
- "orientation": 0
- },
- "meta": {
- "links": {
- "self": "https://public-api.wordpress.com/rest/v1/sites/33534099/media/25378",
- "help": "https://public-api.wordpress.com/rest/v1/sites/33534099/media/25378/help",
- "site": "https://public-api.wordpress.com/rest/v1/sites/33534099"
- }
- }
- }
- ]
- } '
+ )
) );
new WPCOM_JSON_API_Update_Media_Endpoint( array(
@@ -2413,6 +1338,15 @@ new WPCOM_JSON_API_Update_Media_Endpoint( array(
'caption' => '(string) User provided caption of the file',
'description' => '(string) Description of the file',
'metadata' => '(array) Array of metadata about the file, such as Exif data or sizes',
+ ),
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media/446',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ 'body' => array(
+ 'title' => 'Updated Title'
+ )
)
) );
@@ -2455,12 +1389,13 @@ new WPCOM_JSON_API_Update_Media_v1_1_Endpoint( array(
'thumbnails' => '(object) Media item thumbnail URL options',
'height' => '(int) (Image & video only) Height of the media item',
'width' => '(int) (Image & video only) Width of the media item',
+ 'length' => '(int) (Video & audio only) Duration of the media item, in seconds',
'exif' => '(array) (Image & audio only) Exif (meta) information about the media item',
'videopress_guid' => '(string) (Video only) VideoPress GUID of the video when uploaded on a blog with VideoPress',
'videopress_processing_done' => '(bool) (Video only) If the video is uploaded on a blog with VideoPress, this will return the status of processing on the video.'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/opossumapi.wordpress.com/media/880165',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media/446',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -2468,47 +1403,7 @@ new WPCOM_JSON_API_Update_Media_v1_1_Endpoint( array(
'body' => array(
'title' => 'Updated Title'
)
- ),
-
- 'example_response' => '
- {
- "ID": "880165",
- "URL": "https:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "guid": "http:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "date": "2014-10-14T22:22:41+00:00",
- "post_ID": 0,
- "file": "screen-shot-2014-10-14-at-3-22-19-pm.png",
- "mime_type": "image\/png",
- "extension": "png",
- "title": "Updated Title",
- "caption": "",
- "description": "",
- "alt": "",
- "thumbnails": {},
- "height": 602,
- "width": 764,
- "exif": {
- "aperture": 0,
- "credit": "",
- "camera": "",
- "caption": "",
- "created_timestamp": 0,
- "copyright": "",
- "focal_length": 0,
- "iso": 0,
- "shutter_speed": 0,
- "title": "",
- "orientation": 0
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
-',
+ )
) );
@@ -2536,6 +1431,13 @@ new WPCOM_JSON_API_Delete_Media_Endpoint( array(
'caption' => '(string) User provided caption of the file',
'description' => '(string) Description of the file',
'metadata' => '(array) Misc array of information about the file, such as exif data or sizes',
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media/$media_ID/delete',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ )
)
) );
@@ -2569,58 +1471,18 @@ new WPCOM_JSON_API_Delete_Media_v1_1_Endpoint( array(
'thumbnails' => '(object) Media item thumbnail URL options',
'height' => '(int) (Image & video only) Height of the media item',
'width' => '(int) (Image & video only) Width of the media item',
+ 'length' => '(int) (Video & audio only) Duration of the media item, in seconds',
'exif' => '(array) (Image & audio only) Exif (meta) information about the media item',
'videopress_guid' => '(string) (Video only) VideoPress GUID of the video when uploaded on a blog with VideoPress',
'videopress_processing_done' => '(bool) (Video only) If the video is Uuploaded on a blog with VideoPress, this will return the status of processing on the Video'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/opossumapi.wordpress.com/media/880165/delete',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media/$media_ID/delete',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
)
- ),
-
- 'example_response' => '
- {
- "status": "deleted",
- "ID": "880165",
- "URL": "https:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "guid": "http:\/\/opossumapi.files.wordpress.com\/2014\/10\/screen-shot-2014-10-14-at-3-22-19-pm.png",
- "date": "2014-10-14T22:22:41+00:00",
- "post_ID": 0,
- "file": "screen-shot-2014-10-14-at-3-22-19-pm.png",
- "mime_type": "image\/png",
- "extension": "png",
- "title": "Screen Shot 2014-10-14 at 3.22.19 PM",
- "caption": "",
- "description": "",
- "alt": "",
- "thumbnails": {},
- "height": 602,
- "width": 764,
- "exif": {
- "aperture": 0,
- "credit": "",
- "camera": "",
- "caption": "",
- "created_timestamp": 0,
- "copyright": "",
- "focal_length": 0,
- "iso": 0,
- "shutter_speed": 0,
- "title": "",
- "orientation": 0
- },
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1.1\/sites\/30434183\/media\/880165\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
- }
-',
+ )
) );
/*
@@ -2637,7 +1499,7 @@ new WPCOM_JSON_API_List_Comments_Endpoint( array(
'$site' => '(int|string) Site ID or domain',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/comments/?number=2&pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/comments/?number=2'
) );
new WPCOM_JSON_API_List_Comments_Endpoint( array(
@@ -2652,7 +1514,7 @@ new WPCOM_JSON_API_List_Comments_Endpoint( array(
'$post_ID' => '(int) The post ID',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/7/replies/?number=2&pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/7/replies/?number=2'
) );
new WPCOM_JSON_API_Get_Comment_Endpoint( array(
@@ -2667,7 +1529,7 @@ new WPCOM_JSON_API_Get_Comment_Endpoint( array(
'$comment_ID' => '(int) The comment ID'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/comments/147564/?pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/comments/147564'
) );
new WPCOM_JSON_API_Update_Comment_Endpoint( array(
@@ -2692,7 +1554,7 @@ new WPCOM_JSON_API_Update_Comment_Endpoint( array(
'pass_wpcom_user_details' => true,
'can_use_user_details_instead_of_blog_membership' => true,
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/posts/1222/replies/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/posts/843/replies/new/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -2700,45 +1562,7 @@ new WPCOM_JSON_API_Update_Comment_Endpoint( array(
'body' => array(
'content' => 'Your reply is very interesting. This is a reply.'
)
- ),
-
- 'example_response' => '
-{
- "ID": 9,
- "post": {
- "ID": 1222,
- "type": "post",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222"
- },
- "author": {
- "ID": 18342963,
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- "date": "2012-04-11T18:09:41+00:00",
- "URL": "http:\/\/opossumapi.wordpress.com\/2012\/04\/11\/hello-world-2\/#comment-9",
- "short_URL": "http:\/\/wp.me\/p23HjV-jI%23comment-9",
- "content": "<p>Your reply is very interesting. This is a reply.<\/p>\n",
- "status": "approved",
- "parent": {
- "ID":8,
- "type": "comment",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/8"
- },
- "type": "comment",
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/9",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/9\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "post": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1222",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/9\/replies\/"
- }
- }
-}',
+ )
) );
new WPCOM_JSON_API_Update_Comment_Endpoint( array(
@@ -2762,7 +1586,7 @@ new WPCOM_JSON_API_Update_Comment_Endpoint( array(
'pass_wpcom_user_details' => true,
'can_use_user_details_instead_of_blog_membership' => true,
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/comments/8/replies/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/comments/29/replies/new',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -2770,45 +1594,7 @@ new WPCOM_JSON_API_Update_Comment_Endpoint( array(
'body' => array(
'content' => 'This reply is very interesting. This is editing a comment reply via the API.',
)
- ),
- 'example_response' => '
-{
- "ID": 13,
- "post": {
- "ID": 1,
- "type": "post",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1"
- },
- "author": {
- "ID": 18342963,
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- "date": "2012-04-11T20:16:28+00:00",
- "URL": "http:\/\/opossumapi.wordpress.com\/2011\/12\/13\/hello-world\/#comment-13",
- "short_URL": "http:\/\/wp.me\/p23HjV-1%23comment-13",
- "content": "<p>This reply is very interesting. This is editing a comment reply via the API.<\/p>\n",
- "status": "approved",
- "parent": {
- "ID": 1,
- "type": "comment",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/1"
- },
- "type": "comment",
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "post": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13\/replies\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Comment_Endpoint( array(
@@ -2836,7 +1622,7 @@ new WPCOM_JSON_API_Update_Comment_Endpoint( array(
),
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/comments/8/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/comments/29',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -2845,45 +1631,7 @@ new WPCOM_JSON_API_Update_Comment_Endpoint( array(
'content' => 'This reply is now edited via the API.',
'status' => 'approved',
)
- ),
- 'example_response' => '
-{
- "ID": 13,
- "post": {
- "ID": 1,
- "type": "post",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1"
- },
- "author": {
- "ID": 18342963,
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- "date": "2012-04-11T20:16:28+00:00",
- "URL": "http:\/\/opossumapi.wordpress.com\/2011\/12\/13\/hello-world\/#comment-13",
- "short_URL": "http:\/\/wp.me\/p23HjV-1%23comment-13",
- "content": "<p>This reply is very interesting. This is editing a comment reply via the API.<\/p>\n",
- "status": "approved",
- "parent": {
- "ID": 1,
- "type": "comment",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/1"
- },
- "type": "comment",
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "post": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13\/replies\/"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Comment_Endpoint( array(
@@ -2898,51 +1646,12 @@ new WPCOM_JSON_API_Update_Comment_Endpoint( array(
'$comment_ID' => '(int) The comment ID'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/comments/8/delete/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/comments/$comment_ID/delete',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
)
- ),
-
- 'example_response' => '
-{
- "ID": 13,
- "post": {
- "ID": 1,
- "type": "post",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1"
- },
- "author": {
- "ID": 18342963,
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- "date": "2012-04-11T20:16:28+00:00",
- "URL": "http:\/\/opossumapi.wordpress.com\/2011\/12\/13\/hello-world\/#comment-13",
- "short_URL": "http:\/\/wp.me\/p23HjV-1%23comment-13",
- "content": "<p>This reply is very interesting. This is editing a comment reply via the API.<\/p>\n",
- "status": "deleted",
- "parent": {
- "ID": 1,
- "type": "comment",
- "link": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/1"
- },
- "type": "comment",
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183",
- "post": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/posts\/1",
- "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/comments\/13\/replies\/"
- }
- }
-}'
-
+ )
) );
/**
@@ -2960,7 +1669,7 @@ new WPCOM_JSON_API_Get_Taxonomy_Endpoint( array(
'$category' => '(string) The category slug'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/categories/slug:community?pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/categories/slug:community'
) );
new WPCOM_JSON_API_Get_Taxonomies_Endpoint( array(
@@ -2990,7 +1699,7 @@ new WPCOM_JSON_API_Get_Taxonomies_Endpoint( array(
'found' => '(int) The number of categories returned.',
'categories' => '(array) Array of category objects.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/categories/?number=5&pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/categories/?number=5'
) );
new WPCOM_JSON_API_Get_Taxonomies_Endpoint( array(
@@ -3020,7 +1729,7 @@ new WPCOM_JSON_API_Get_Taxonomies_Endpoint( array(
'found' => '(int) The number of tags returned.',
'tags' => '(array) Array of tag objects.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/tags/?number=5&pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/tags/?number=5'
) );
new WPCOM_JSON_API_Get_Taxonomy_Endpoint( array(
@@ -3035,7 +1744,7 @@ new WPCOM_JSON_API_Get_Taxonomy_Endpoint( array(
'$tag' => '(string) The tag slug'
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/tags/slug:wordpresscom?pretty=1'
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/tags/slug:wordpresscom'
) );
new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
@@ -3055,7 +1764,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'parent' => '(int) ID of the parent category',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/categories/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/categories/new/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -3063,22 +1772,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'body' => array(
'name' => 'Puppies',
)
- ),
- 'example_response' => '
-{
- "name": "Puppies",
- "slug": "puppies",
- "description": "",
- "post_count": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/puppies",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/puppies\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
@@ -3097,7 +1791,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'description' => '(string) A description of the tag',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/tags/new/',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/tags/new/',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -3105,22 +1799,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'body' => array(
'name' => 'Kitties'
)
- ),
- 'example_response' => '
-{
- "name": "Kitties",
- "slug": "kitties",
- "description": "",
- "post_count": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/kitties",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/kitties\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
@@ -3140,7 +1819,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'description' => '(string) A description of the tag',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/tags/slug:testing-tag',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/tags/slug:testing-tag',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -3148,22 +1827,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'body' => array(
'description' => 'Kitties are awesome!'
)
- ),
- 'example_response' => '
-{
- "name": "testing tag",
- "slug": "testing-tag",
- "description": "Kitties are awesome!",
- "post_count": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/testing-tag",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/tags\/testing-tag\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
@@ -3184,7 +1848,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'parent' => '(int) ID of the parent category',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/categories/slug:testing-category',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/categories/slug:testing-category',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
@@ -3192,23 +1856,7 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'body' => array(
'description' => 'Puppies are great!'
)
- ),
- 'example_response' => '
-{
- "name": "testing category",
- "slug": "testing-category",
- "description": "Puppies are great!",
- "post_count": 0,
- "parent": 0,
- "meta": {
- "links": {
- "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/testing-category",
- "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183\/categories\/testing-category\/help",
- "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/30434183"
- }
- }
-}'
-
+ )
) );
new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
@@ -3227,16 +1875,12 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'success' => '(bool) Was the operation successful?',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/categories/slug:some-category-name/delete',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/categories/slug:$category/delete',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
- ),
- 'example_response' => '{
- "slug": "some-category-name",
- "success": "true"
-}'
+ )
) );
new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
@@ -3255,16 +1899,38 @@ new WPCOM_JSON_API_Update_Taxonomy_Endpoint( array(
'success' => '(bool) Was the operation successful?',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/tags/slug:some-tag-name/delete',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/tags/slug:$tag/delete',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
+ )
+) );
+
+new WPCOM_JSON_API_List_Roles_Endpoint( array(
+ 'description' => 'List the user roles of a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'roles:list',
+
+ 'method' => 'GET',
+ 'path' => '/sites/%s/roles',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
),
- 'example_response' => '{
- "slug": "some-tag-name",
- "success": "true"
-}'
+
+ 'query_parameters' => array(
+ ),
+
+ 'response_format' => array(
+ 'roles' => '(array:role) Array of role objects.',
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/roles',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ )
) );
new WPCOM_JSON_API_List_Users_Endpoint( array(
@@ -3295,8 +1961,11 @@ new WPCOM_JSON_API_List_Users_Endpoint( array(
'display_name' => 'Order by display name.',
'post_count' => 'Order by number of posts published.',
),
- 'authors_only' => "(bool) Set to true to fetch authors only",
+ 'authors_only' => '(bool) Set to true to fetch authors only',
'type' => "(string) Specify the post type to query authors for. Only works when combined with the `authors_only` flag. Defaults to 'post'. Post types besides post and page need to be whitelisted using the <code>rest_api_allowed_post_types</code> filter.",
+ 'search' => '(string) Find matching users.',
+ 'search_columns' => "(array) Specify which columns to check for matching users. Can be any of 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename', and 'display_name'. Only works when combined with `search` parameter.",
+ 'role' => '(string) Specify a specific user role to fetch.',
),
'response_format' => array(
@@ -3304,28 +1973,378 @@ new WPCOM_JSON_API_List_Users_Endpoint( array(
'authors' => '(array:author) Array of author objects.',
),
- 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/users',
+ 'example_response' => '{
+ "found": 1,
+ "users": [
+ {
+ "ID": 78972699,
+ "login": "apiexamples",
+ "email": "justin+apiexamples@a8c.com",
+ "name": "apiexamples",
+ "first_name": "",
+ "last_name": "",
+ "nice_name": "apiexamples",
+ "URL": "http://apiexamples.wordpress.com",
+ "avatar_URL": "https://1.gravatar.com/avatar/a2afb7b6c0e23e5d363d8612fb1bd5ad?s=96&d=identicon&r=G",
+ "profile_URL": "http://en.gravatar.com/apiexamples",
+ "site_ID": 82974409,
+ "roles": [
+ "administrator"
+ ],
+ "is_super_admin": false
+ }
+ ]
+ }',
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/users',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ )
+) );
+
+new WPCOM_JSON_API_Update_User_Endpoint( array(
+ 'description' => 'Deletes or removes a user of a site.',
+ 'group' => 'users',
+ 'stat' => 'users:delete',
+
+ 'method' => 'POST',
+ 'path' => '/sites/%s/users/%d/delete',
+ 'path_labels' => array(
+ '$site' => '(int|string) The site ID or domain.',
+ '$user_ID' => '(int) The user\'s ID'
+ ),
+
+ 'request_format' => array(
+ 'reassign' => '(int) An optional id of a user to reassign posts to.',
+ ),
+
+ 'response_format' => array(
+ 'success' => '(bool) Was the deletion of user successful?',
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/users/1/delete',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ )
+) );
+
+new WPCOM_JSON_API_List_Invites_Endpoint( array(
+ 'description' => 'List the invites of a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'invites:list',
+
+ 'method' => 'GET',
+ 'path' => '/sites/%s/invites',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ ),
+
+ 'query_parameters' => array(
+ 'number' => '(int=25) Limit the total number of invites to be returned.',
+ 'offset' => '(int=0) The first n invites to be skipped in the returned array.',
+ 'status' => array(
+ 'pending' => 'Return only pending invites.',
+ 'all' => 'Return all invites, pending and accepted, that have not been deleted.',
+ )
+ ),
+
+ 'response_format' => array(
+ 'found' => '(int) The total number of invites found that match the request (ignoring limits and offsets).',
+ 'invites' => '(array) Array of invites.',
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/82974409/invites',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ ),
+) );
+
+new WPCOM_JSON_API_Site_User_Endpoint( array(
+ 'description' => 'Get details of a user of a site by ID.',
+ 'group' => '__do_not_document', //'users'
+ 'stat' => 'sites:1:user',
+ 'method' => 'GET',
+ 'path' => '/sites/%s/users/%d',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$user_id' => '(int) User ID',
+ ),
+ 'response_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/user/23',
'example_request_data' => array(
'headers' => array(
'authorization' => 'Bearer YOUR_API_TOKEN'
),
),
'example_response' => '{
- "found": 1,
- "users": [
- {
- "ID": 18342963,
- "login": "binarysmash"
- "email": false,
- "name": "binarysmash",
- "URL": "http:\/\/binarysmash.wordpress.com",
- "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
- "profile_URL": "http:\/\/en.gravatar.com\/binarysmash"
- },
- ]
+ "ID": 18342963,
+ "login": "binarysmash"
+ "email": false,
+ "name": "binarysmash",
+ "URL": "http:\/\/binarysmash.wordpress.com",
+ "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
+ "profile_URL": "http:\/\/en.gravatar.com\/binarysmash",
+ "roles": [ "administrator" ]
+ }'
+) );
+
+new WPCOM_JSON_API_Site_User_Endpoint( array(
+ 'description' => 'Get details of a user of a site by login.',
+ 'group' => '__do_not_document', //'users'
+ 'stat' => 'sites:1:user',
+ 'method' => 'GET',
+ 'path' => '/sites/%s/users/login:%s',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$user_id' => '(string) User login',
+ ),
+ 'response_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/user/login:binarysmash',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ ),
+ 'example_response' => '{
+ "ID": 18342963,
+ "login": "binarysmash"
+ "email": false,
+ "name": "binarysmash",
+ "URL": "http:\/\/binarysmash.wordpress.com",
+ "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
+ "profile_URL": "http:\/\/en.gravatar.com\/binarysmash",
+ "roles": [ "administrator" ]
+ }'
+) );
+
+new WPCOM_JSON_API_Site_User_Endpoint( array(
+ 'description' => 'Update details of a users of a site.',
+ 'group' => '__do_not_document', //'users'
+ 'stat' => 'sites:1:user',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/users/%d',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$user_id' => '(int) User ID',
+ ),
+ 'request_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'response_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/user/23',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ 'body' => array(
+ 'roles' => array(
+ array(
+ 'administrator',
+ )
+ ),
+ 'first_name' => 'Rocco',
+ 'last_name' => 'Tripaldi',
+ )
+ ),
+ 'example_response' => '{
+ "ID": 18342963,
+ "login": "binarysmash"
+ "email": false,
+ "name": "binarysmash",
+ "URL": "http:\/\/binarysmash.wordpress.com",
+ "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
+ "profile_URL": "http:\/\/en.gravatar.com\/binarysmash",
+ "roles": [ "administrator" ]
+ }'
+) );
+
+new WPCOM_JSON_API_Update_Invites_Endpoint( array(
+ 'description' => 'Delete an invite for a user to join a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'invites:1:delete',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/invites/%s/delete',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$invite_id' => '(string) The ID of the invite'
+ ),
+ 'response_format' => array(
+ 'invite_key' => '(string) Identifier for the deleted invite',
+ 'deleted' => '(bool) Was the invitation removed?'
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/invites/123523562/delete',
+
+ 'example_request_data' => array(
+ 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ ),
+) );
+
+new WPCOM_JSON_API_Update_Invites_Endpoint( array(
+ 'description' => 'Resend invitation for a user to join a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'invites:1',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/invites/%s',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$invite_id' => '(string) The ID of the invite'
+ ),
+ 'response_format' => array(
+ 'result' => '(bool) Was the invitation resent?'
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/invites/123523562',
+
+ 'example_request_data' => array(
+ 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ ),
+) );
+
+new WPCOM_JSON_API_Site_User_Endpoint( array(
+ 'description' => 'Get details of a user of a site by ID.',
+ 'group' => 'users',
+ 'stat' => 'sites:1:user',
+ 'method' => 'GET',
+ 'path' => '/sites/%s/users/%d',
+ 'path_labels' => array(
+ '$site' => '(int|string) The site ID or domain.',
+ '$user_id' => '(int) The user\'s ID.',
+ ),
+ 'response_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/user/23',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ ),
+ 'example_response' => '{
+ "ID": 18342963,
+ "login": "binarysmash"
+ "email": false,
+ "name": "binarysmash",
+ "URL": "http:\/\/binarysmash.wordpress.com",
+ "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
+ "profile_URL": "http:\/\/en.gravatar.com\/binarysmash",
+ "roles": [ "administrator" ]
}'
) );
+new WPCOM_JSON_API_Site_User_Endpoint( array(
+ 'description' => 'Get details of a user of a site by login.',
+ 'group' => 'users',
+ 'stat' => 'sites:1:user',
+ 'method' => 'GET',
+ 'path' => '/sites/%s/users/login:%s',
+ 'path_labels' => array(
+ '$site' => '(int|string) The site ID or domain.',
+ '$user_id' => '(string) The user\'s login.',
+ ),
+ 'response_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/user/login:binarysmash',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ ),
+ 'example_response' => '{
+ "ID": 18342963,
+ "login": "binarysmash"
+ "email": false,
+ "name": "binarysmash",
+ "URL": "http:\/\/binarysmash.wordpress.com",
+ "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
+ "profile_URL": "http:\/\/en.gravatar.com\/binarysmash",
+ "roles": [ "administrator" ]
+ }'
+) );
+
+new WPCOM_JSON_API_Site_User_Endpoint( array(
+ 'description' => 'Update details of a user of a site.',
+ 'group' => 'users',
+ 'stat' => 'sites:1:user',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/users/%d',
+ 'path_labels' => array(
+ '$site' => '(int|string) The site ID or domain.',
+ '$user_id' => '(int) The user\'s ID.',
+ ),
+ 'request_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'response_format' => WPCOM_JSON_API_Site_User_Endpoint::$user_format,
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/user/23',
+ 'example_request_data' => array(
+ 'headers' => array(
+ 'authorization' => 'Bearer YOUR_API_TOKEN'
+ ),
+ 'body' => array(
+ 'roles' => array(
+ array(
+ 'administrator',
+ )
+ ),
+ 'first_name' => 'Rocco',
+ 'last_name' => 'Tripaldi',
+ )
+ ),
+ 'example_response' => '{
+ "ID": 18342963,
+ "login": "binarysmash"
+ "email": false,
+ "name": "binarysmash",
+ "URL": "http:\/\/binarysmash.wordpress.com",
+ "avatar_URL": "http:\/\/0.gravatar.com\/avatar\/a178ebb1731d432338e6bb0158720fcc?s=96&d=identicon&r=G",
+ "profile_URL": "http:\/\/en.gravatar.com\/binarysmash",
+ "roles": [ "administrator" ]
+ }'
+) );
+
+new WPCOM_JSON_API_Update_Invites_Endpoint( array(
+ 'description' => 'Delete an invite for a user to join a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'invites:1:delete',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/invites/%s/delete',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$invite_id' => '(string) The ID of the invite'
+ ),
+ 'response_format' => array(
+ 'invite_key' => '(string) Identifier for the deleted invite',
+ 'deleted' => '(bool) Was the invitation removed?'
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/invites/123523562/delete',
+
+ 'example_request_data' => array(
+ 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ ),
+) );
+
+new WPCOM_JSON_API_Update_Invites_Endpoint( array(
+ 'description' => 'Resend invitation for a user to join a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'invites:1',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/invites/%s/resend',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ '$invite_id' => '(string) The ID of the invite'
+ ),
+ 'response_format' => array(
+ 'result' => '(bool) Was the invitation resent?'
+ ),
+
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/30434183/invites/123523562',
+
+ 'example_request_data' => array(
+ 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ ),
+) );
+
new WPCOM_JSON_API_Site_Settings_Endpoint( array(
'description' => 'Get detailed settings information about a site.',
'group' => '__do_not_document',
@@ -3403,6 +2422,8 @@ new WPCOM_JSON_API_Site_Settings_Endpoint( array(
'sharing_open_links' => '(string) Link target for sharing buttons (same or new)',
'twitter_via' => '(string) Twitter username to include in tweets when people share using the Twitter button',
'jetpack-twitter-cards-site-tag' => '(string) The Twitter username of the owner of the site\'s domain.',
+ 'eventbrite_api_token' => '(int) The Keyring token ID for an Eventbrite token to associate with the site',
+ 'holidaysnow' => '(bool) Enable snowfall on frontend of site?'
),
'response_format' => array(
@@ -3413,80 +2434,12 @@ new WPCOM_JSON_API_Site_Settings_Endpoint( array(
) );
/**
- * Publicize Endpoints
- */
-
-new WPCOM_JSON_API_Get_Connections_Endpoint( array(
- 'description' => 'Get a list of a site\'s current Publicize connections to third-party services for the current user (personal or shared).',
- 'group' => 'Publicize',
- 'stat' => 'connections',
- 'method' => 'GET',
- 'path' => '/sites/%s/connections/',
- 'path_labels' => array(
- '$site' => '(int|string) Site ID or domain',
- ),
- 'query_parameters' => array(
- 'service' => "(string) Get Publicize connections for a specific service only. Default is 'all' but you can enter 'facebook', 'twitter', etc."
- ),
- 'response_format' => array(
- 'connections' => '(array:object) List of Publicize connections'
- )
-) );
-
-new WPCOM_JSON_API_Get_Connection_Endpoint( array(
- 'description' => 'Get information about a specific Publicize connection.',
- 'group' => 'Publicize',
- 'stat' => 'connections:1',
- 'method' => 'GET',
- 'path' => '/sites/%s/connections/%d',
- 'path_labels' => array(
- '$site' => '(int|string) Site ID or domain',
- '$connection_id' => '(int) The ID of the Publicize connection',
- ),
- 'response_format' => array(
- 'ID' => '(int) Identifier for the Publicize connection',
- 'token_ID' => '(int) Identifier for the Keyring token',
- 'conn_ID' => '(int) Identifier for the Publicize connection',
- 'site_ID' => '(int) Identifier for the Site',
- 'user_ID' => '(int) Identifier for the Publicize connection user, or 0 if the connection is shared',
- 'shared' => '(bool) Is this connection specific to the current user, or a shared one for the site?',
- 'service' => '(string) An identifier for the type of service (facebook, linkedin, path, tumblr, etc)',
- 'label' => '(string) Formatted nicename for the service.',
- 'issued' => '(ISO 8601 datetime) When the conncetion was created',
- 'expires' => '(ISO 8601 datetime) When the connection expires and needs to be refreshed',
- 'external_ID' => '(string) An identifier for the user on the third-party service',
- 'external_name' => '(string) Usually a username or login name.',
- 'external_display' => '(string) How the user prefers their name to be displayed on the third-party service.',
- 'URL' => '(string|null) URL to the user\'s profile. NULL if there is no URL to link to.',
- 'status' => '(string) The current status of the connection. "ok" for connections with no problems, and "broken" for connections that need fixed.',
- 'refresh_url' => '(string) The URL to refresh a token if it is broken.',
- 'meta' => '(object) Extra and optional metadata for the current Publicize connection',
- )
-) );
-
-new WPCOM_JSON_API_Delete_Connection_Endpoint( array(
- 'description' => 'Delete a publicize connection.',
- 'group' => 'Publicize',
- 'stat' => 'connections:1:delete',
- 'method' => 'POST',
- 'path' => '/sites/%s/connections/%d/delete',
- 'path_labels' => array(
- '$site' => '(int|string) Site ID or domain',
- '$connection_id' => 'The ID of the connection',
- ),
- 'response_format' => array(
- 'ID' => '(int) Identifier for the connection',
- 'deleted' => '(bool) Confirmation that the connection has been removed'
- )
-) );
-
-/**
* Sharing Button Endpoints
*/
new WPCOM_JSON_API_Get_Sharing_Buttons_Endpoint( array(
'description' => 'Get a list of a site\'s sharing buttons.',
- 'group' => '__do_not_document',
+ 'group' => 'sharing',
'stat' => 'sharing-buttons',
'method' => 'GET',
'path' => '/sites/%s/sharing-buttons/',
@@ -3559,7 +2512,7 @@ new WPCOM_JSON_API_Get_Sharing_Button_Endpoint( array(
new WPCOM_JSON_API_Update_Sharing_Buttons_Endpoint( array(
'description' => 'Edit all sharing buttons for a site.',
- 'group' => '__do_not_document',
+ 'group' => 'sharing',
'stat' => 'sharing-buttons:X:POST',
'method' => 'POST',
'path' => '/sites/%s/sharing-buttons',
@@ -3728,6 +2681,71 @@ new WPCOM_JSON_API_Delete_Sharing_Button_Endpoint( array(
) );
/*
+ * Custom CSS endpoints
+ */
+new WPCOM_JSON_API_Get_CustomCss_Endpoint( array (
+ 'description' => 'Retrieve custom-css data for a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'customcss:1:get',
+ 'method' => 'GET',
+ 'min_version' => '1.1',
+ 'path' => '/sites/%s/customcss',
+ 'path_labels' => array(
+ '$site' => '(string) Site ID or domain.',
+ ),
+ 'response_format' => array(
+ 'css' => '(string) The raw CSS.',
+ 'preprocessor' => '(string) The name of the preprocessor if any.',
+ 'add_to_existing' => '(bool) False to skip the existing styles.',
+ ),
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/12345678/customcss',
+ 'example_response' => array(
+ array(
+ 'css' => '.stie-title { color: #fff; }',
+ 'preprocessor' => 'sass',
+ 'add_to_existing' => 'true',
+ )
+ )
+) );
+
+new WPCOM_JSON_API_Update_CustomCss_Endpoint( array (
+ 'description' => 'Set custom-css data for a site.',
+ 'group' => '__do_not_document',
+ 'stat' => 'customcss:1:update',
+ 'method' => 'POST',
+ 'min_version' => '1.1',
+ 'path' => '/sites/%s/customcss',
+ 'path_labels' => array(
+ '$site' => '(string) Site ID or domain.',
+ ),
+ 'request_format' => array(
+ 'css' => '(string) Optional. The raw CSS.',
+ 'preprocessor' => '(string) Optional. The name of the preprocessor if any.',
+ 'add_to_existing' => '(bool) Optional. False to skip the existing styles.',
+ ),
+ 'response_format' => array(
+ 'css' => '(string) The raw CSS.',
+ 'preprocessor' => '(string) The name of the preprocessor if any.',
+ 'add_to_existing' => '(bool) False to skip the existing styles.',
+ ),
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/12345678/customcss',
+ 'example_request_data' => array(
+ 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ 'body' => array(
+ 'css' => '.stie-title { color: #fff; }',
+ 'preprocessor' => 'sass'
+ ),
+ ),
+ 'example_response' => array(
+ array(
+ 'css' => '.stie-title { color: #fff; }',
+ 'preprocessor' => 'sass',
+ 'add_to_existing' => 'true',
+ )
+ )
+) );
+
+/*
* Custom Menus endpoints
*/
new WPCOM_JSON_API_Menus_New_Menu_Endpoint( array (
@@ -3745,9 +2763,12 @@ new WPCOM_JSON_API_Menus_New_Menu_Endpoint( array (
'response_format' => array(
'id' => '(int) Newly created menu ID',
),
- 'example_request' => 'https://public-api.wordpress.com/sites/example.com/menus/new',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/menus/new',
'example_request_data' => array(
'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ 'body' => array(
+ 'name' => 'Menu 1'
+ )
),
) );
@@ -3762,9 +2783,8 @@ new WPCOM_JSON_API_Menus_Update_Menu_Endpoint( array (
'$menu_id' => '(int) Menu ID',
),
'request_format' => array(
- 'menu' => '(object) Updated menu object.<br/><br/>
- A menu object contains a name, items, locations, etc.
- Check the example response for the full structure.
+ 'name' => '(string) Name of menu',
+ 'items' => '(array) A list of menu item objects.
<br/><br/>
Item objects contain fields relating to that item, e.g. id, type, content_id,
but they can also contain other items objects - this nesting represents parents
@@ -3773,60 +2793,13 @@ new WPCOM_JSON_API_Menus_Update_Menu_Endpoint( array (
'response_format' => array(
'menu' => '(object) Updated menu object',
),
- 'example_request' => 'https://public-api.wordpress.com/sites/example.com/menus/3433',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/menus/347757165',
'example_request_data' => array(
'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ 'body' => array(
+ 'name' => 'Menu 1'
+ ),
),
- 'example_response' => '
- {
- "menu": {
- "id": 123,
- "name": "Menu 1",
- "description": "",
-
- "items": [
- {
- "id": 1,
- "content_id": 321,
- "type": "page",
- "type_family": "post_type",
- "type_label": "Page",
- "url": "https://example.com/products/",
- "name": "Products",
- "link_target": "",
- "link_title": "",
- "description": "",
- "classes": [
- ""
- ],
- "xfn": "",
-
- "items": [
- {
- "id": 2,
- "content_id": 322,
- "type": "page",
- "type_family": "post_type",
- "type_label": "Page",
- "url": "https://example.com/products/socks/",
- "name": "Socks",
- "link_target": "",
- "link_title": "",
- "description": "",
- "classes": [
- ""
- ],
- "xfn": ""
- }
- ]
- }
- ],
-
- "locations": [
- "primary"
- ]
- }
- }',
) );
new WPCOM_JSON_API_Menus_List_Menus_Endpoint( array (
@@ -3834,7 +2807,7 @@ new WPCOM_JSON_API_Menus_List_Menus_Endpoint( array (
'description' => 'Get a list of all navigation menus.',
'group' => 'menus',
'stat' => 'menus:list-menu',
- 'path' => '/sites/%s/menus/',
+ 'path' => '/sites/%s/menus',
'path_labels' => array(
'$site' => '(int|string) Site ID or domain',
),
@@ -3848,41 +2821,10 @@ new WPCOM_JSON_API_Menus_List_Menus_Endpoint( array (
and child items in the item tree.',
'locations' => '(array) Locations where menus can be placed. List of objects, one per location.'
),
- 'example_request' => 'https://public-api.wordpress.com/sites/example.com/menus',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/menus',
'example_request_data' => array(
'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
),
- 'example_response' => '
- {
- "menus": [
- {
- "id": 1,
- "name": "Main pages",
- "description": "",
- "items": [],
- "locations": []
- },
- {
- "id": 2,
- "name": "Social media",
- "description": "",
- "items": [],
- "locations": [
- "primary"
- ]
- }
- ],
- "locations": [
- {
- "name": "primary",
- "description": "Primary Menu"
- },
- {
- "name": "social",
- "description": "Social Links"
- }
- ]
- }',
) );
new WPCOM_JSON_API_Menus_Get_Menu_Endpoint( array (
@@ -3904,53 +2846,10 @@ new WPCOM_JSON_API_Menus_Get_Menu_Endpoint( array (
but they can also contain other items objects - this nesting represents parents
and child items in the item tree.'
),
- 'example_request' => 'https://public-api.wordpress.com/sites/example.com/menus/3433',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/menus/347757165',
'example_request_data' => array(
'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
),
- 'example_response' => '
- {
- "id": 3433,
- "name": "Main",
- "description": "",
- "items": [
- {
- "id": 9,
- "content_id": 1,
- "type": "page",
- "type_family": "post_type",
- "type_label": "Page",
- "url": "https://example.com/about/",
- "name": "About",
- "link_target": "",
- "link_title": "",
- "description": "",
- "classes": [
- ""
- ],
- "xfn": ""
- },
- {
- "id": 10,
- "content_id": 8,
- "type": "jetpack-portfolio",
- "type_family": "post_type",
- "type_label": "Project",
- "url": "https://example.com/portfolio/projects/",
- "name": "Projects",
- "link_target": "",
- "link_title": "",
- "description": "",
- "classes": [
- ""
- ],
- "xfn": ""
- }
- ],
- "locations": [
- "primary"
- ]
- }',
) );
new WPCOM_JSON_API_Menus_Delete_Menu_Endpoint( array (
@@ -3966,7 +2865,7 @@ new WPCOM_JSON_API_Menus_Delete_Menu_Endpoint( array (
'response_format' => array(
'deleted' => '(bool) Has the menu been deleted?',
),
- 'example_request' => 'https://public-api.wordpress.com/sites/example.com/menus/3433/delete',
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/menus/$menu_id/delete',
'example_request_data' => array(
'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
),
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php
new file mode 100644
index 00000000..2db3931a
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-autosave-post-v1-1-endpoint.php
@@ -0,0 +1,68 @@
+<?php
+class WPCOM_JSON_API_Autosave_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_Endpoint {
+ function __construct( $args ) {
+ parent::__construct( $args );
+ }
+
+ // /sites/%s/posts/%d/autosave -> $blog_id, $post_id
+ function callback( $path = '', $blog_id = 0, $post_id = 0 ) {
+
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ $args = $this->query_args();
+
+ $input = $this->input( false );
+
+ if ( ! is_array( $input ) || ! $input ) {
+ return new WP_Error( 'invalid_input', 'Invalid request input', 400 );
+ }
+
+ $post = get_post( $post_id );
+
+ if ( ! $post || is_wp_error( $post ) ) {
+ return new WP_Error( 'unknown_post', 'Unknown post', 404 );
+ }
+
+ if ( ! current_user_can( 'edit_post', $post->ID ) ) {
+ return new WP_Error( 'unauthorized', 'User cannot edit post', 403 );
+ }
+
+ $post_data = array (
+ 'post_ID' => $post_id,
+ 'post_title' => $input['title'],
+ 'post_content' => $input['content'],
+ 'post_excerpt' => $input['excerpt'],
+ );
+
+ $preview_url = add_query_arg( 'preview', 'true', get_permalink( $post->ID ) );
+
+ if ( ! wp_check_post_lock( $post->ID ) &&
+ get_current_user_id() == $post->post_author &&
+ ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status )
+ ) {
+ // Drafts and auto-drafts are just overwritten by autosave for the same user if the post is not locked
+ $auto_ID = edit_post( wp_slash( $post_data ) );
+ } else {
+ // Non drafts or other users drafts are not overwritten. The autosave is stored in a special post revision for each user.
+ $auto_ID = wp_create_post_autosave( wp_slash( $post_data ) );
+ $nonce = wp_create_nonce( 'post_preview_' . $post->ID );
+ $preview_url = add_query_arg( array( 'preview_id' => $auto_ID, 'preview_nonce' => $nonce ), $preview_url );
+ }
+
+ $updated_post = get_post( $auto_ID );
+
+ if ( $updated_post && $updated_post->ID && $updated_post->post_modified ) {
+ return array(
+ 'ID' => $auto_ID,
+ 'post_ID' => $post->ID,
+ 'modified' => $this->format_date( $updated_post->post_modified ),
+ 'preview_URL' => $preview_url
+ );
+ } else {
+ return new WP_Error( 'autosave_error', __( 'Autosave encountered an unexpected error', 'jetpack' ), 500 );
+ }
+ }
+}
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
index 0d1b01cf..82359f63 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-comment-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-comment-endpoint.php
@@ -2,7 +2,7 @@
abstract class WPCOM_JSON_API_Comment_Endpoint extends WPCOM_JSON_API_Endpoint {
- var $comment_object_format = array(
+ public $comment_object_format = array(
// explicitly document and cast all output
'ID' => '(int) The comment ID.',
'post' => "(object>post_reference) A reference to the comment's post.",
@@ -28,7 +28,7 @@ abstract class WPCOM_JSON_API_Comment_Endpoint extends WPCOM_JSON_API_Endpoint {
'meta' => '(object) Meta data',
);
- // var $response_format =& $this->comment_object_format;
+ // public $response_format =& $this->comment_object_format;
function __construct( $args ) {
if ( !$this->response_format ) {
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-autosave-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-autosave-v1-1-endpoint.php
new file mode 100644
index 00000000..806d7fa2
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-autosave-v1-1-endpoint.php
@@ -0,0 +1,46 @@
+<?php
+class WPCOM_JSON_API_Get_Autosave_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_Endpoint {
+ function __construct( $args ) {
+ parent::__construct( $args );
+ }
+
+ // /sites/%s/posts/%d/autosave -> $blog_id, $post_id
+ function callback( $path = '', $blog_id = 0, $post_id = 0 ) {
+
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ $post = get_post( $post_id );
+
+ if ( ! $post || is_wp_error( $post ) ) {
+ return new WP_Error( 'unknown_post', 'Unknown post', 404 );
+ }
+
+ if ( ! current_user_can( 'edit_post', $post->ID ) ) {
+ return new WP_Error( 'unauthorized', 'User cannot edit post', 403 );
+ }
+
+ $autosave = wp_get_post_autosave( $post->ID );
+
+ if ( $autosave ) {
+ $preview_url = add_query_arg( 'preview', 'true', get_permalink( $post->ID ) );
+ $nonce = wp_create_nonce( 'post_preview_' . $post->ID );
+ $preview_url = add_query_arg( array( 'preview_id' => $auto_ID, 'preview_nonce' => $nonce ), $preview_url );
+
+ return array(
+ 'ID' => $autosave->ID,
+ 'author_ID' => $autosave->post_author,
+ 'post_ID' => $autosave->post_parent,
+ 'title' => $autosave->post_title,
+ 'content' => $autosave->post_content,
+ 'excerpt' => $autosave->post_excerpt,
+ 'preview_URL' => $preview_url,
+ 'modified' => $this->format_date( $autosave->post_modified )
+ );
+ } else {
+ return new WP_Error( 'not_found', 'No autosaves exist for this post', 404 );
+ }
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-comment-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-comment-endpoint.php
index af167e0a..97a129e3 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-comment-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-comment-endpoint.php
@@ -15,6 +15,7 @@ class WPCOM_JSON_API_Get_Comment_Endpoint extends WPCOM_JSON_API_Comment_Endpoin
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'comments' );
return $return;
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-customcss.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-customcss.php
new file mode 100644
index 00000000..b3063cd8
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-customcss.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Custom Css endpoint
+ *
+ * https://public-api.wordpress.com/rest/v1.1/sites/$site/customcss/
+ */
+
+class WPCOM_JSON_API_Get_CustomCss_Endpoint extends WPCOM_JSON_API_Endpoint {
+ /**
+ * API callback.
+ */
+ function callback( $path = '', $blog_id = 0 ) {
+ // Switch to the given blog.
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ $args = array(
+ 'css' => Jetpack_Custom_CSS::get_css(),
+ 'preprocessor' => Jetpack_Custom_CSS::get_preprocessor_key(),
+ 'add_to_existing' => ! Jetpack_Custom_CSS::skip_stylesheet(),
+ );
+
+ $defaults = array(
+ 'css' => '',
+ 'preprocessor' => '',
+ 'add_to_existing' => true,
+ );
+ return wp_parse_args( $args, $defaults );
+ }
+}
+
+
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-media-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-media-v1-1-endpoint.php
index 11976509..861cf5de 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-media-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-media-v1-1-endpoint.php
@@ -7,6 +7,10 @@ class WPCOM_JSON_API_Get_Media_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint {
return $blog_id;
}
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ $this->load_theme_functions();
+ }
+
//upload_files can probably be used for other endpoints but we want contributors to be able to use media too
if ( ! current_user_can( 'edit_posts', $media_id ) ) {
return new WP_Error( 'unauthorized', 'User cannot view media', 403 );
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-counts-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-counts-v1-1-endpoint.php
new file mode 100644
index 00000000..6770b2cc
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-counts-v1-1-endpoint.php
@@ -0,0 +1,107 @@
+<?php
+
+class WPCOM_JSON_API_GET_Post_Counts_V1_1_Endpoint extends WPCOM_JSON_API_Endpoint {
+
+ private $whitelist = array( 'publish' );
+
+ /**
+ * Build SQL query
+ *
+ * @param {String} type - post type
+ * @param {Number} [author]
+ * @return {String} SQL query
+ */
+ private function buildCountsQuery( $post_type = 'post', $user_id = null ) {
+ global $wpdb;
+
+ $query = "SELECT post_status as status, count(*) as count ";
+ $query .= "FROM {$wpdb->posts} ";
+ $query .= "WHERE post_type = %s ";
+ if ( isset( $user_id ) ) {
+ $query .= "AND post_author = %d ";
+ }
+
+ $query .= "GROUP BY status";
+
+ return $wpdb->prepare( $query, $post_type, $user_id );
+ }
+
+ /**
+ * Retrive counts using wp_cache
+ *
+ * @param {String} $post_type
+ * @param {Number} [$id]
+ */
+ private function retrieveCounts( $post_type, $id = null) {
+ if ( ! isset( $id ) ) {
+ $counts = array();
+ foreach( (array) wp_count_posts( $post_type ) as $status => $count ) {
+ if ( in_array( $status, $this->whitelist ) && $count > 0 ) {
+ $counts[ $status ] = (int) $count;
+ }
+ };
+
+ return $counts;
+ }
+
+ global $wpdb;
+ $key = 'rest-api-' . $id . '-' . _count_posts_cache_key( $post_type );
+ $counts = wp_cache_get( $key, 'counts' );
+
+ if ( false === $counts ) {
+ $results = $wpdb->get_results( $this->buildCountsQuery( $post_type, $id ) );
+ $counts = $this->filterStatusesByWhiteslist( $results );
+ wp_cache_set( $key, $counts, 'counts' );
+ }
+
+ return $counts;
+ }
+
+ private function filterStatusesByWhiteslist( $in ) {
+ $return = array();
+ foreach( $in as $result) {
+ if ( in_array( $result->status, $this->whitelist ) ) {
+ $return[ $result->status ] = (int) $result->count;
+ }
+ };
+ return $return;
+ }
+
+ public function callback( $path = '', $blog_id = 0, $post_type = 'post' ) {
+ if ( ! get_current_user_id() ) {
+ return new WP_Error( 'authorization_required', __( 'An active access token must be used to retrieve post counts.', 'jetpack' ), 403 );
+ }
+
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ), false );
+
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ if ( ! post_type_exists( $post_type ) ) {
+ return new WP_Error( 'unknown_post_type', __( 'Unknown post type requested.', 'jetpack' ), 404 );
+ }
+
+ $args = $this->query_args();
+ $mine_ID = get_current_user_id();
+
+ if ( current_user_can( 'edit_posts' ) ) {
+ array_push( $this->whitelist, 'draft', 'future', 'pending', 'private', 'trash' );
+ }
+
+ $return = array(
+ 'counts' => (array) array(
+ 'all' => (object) $this->retrieveCounts( $post_type ),
+ 'mine' => (object) $this->retrieveCounts( $post_type, $mine_ID ),
+ )
+ );
+
+ // AUTHOR
+ if ( isset( $args['author'] ) ) {
+ $author_ID = $args['author'];
+ $return['counts']['author'] = (object) $this->retrieveCounts( $post_type, $author_ID );
+ }
+
+ return (object) $return;
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-endpoint.php
index 43b05032..556149e2 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-endpoint.php
@@ -22,6 +22,7 @@ class WPCOM_JSON_API_Get_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
return $return;
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-v1-1-endpoint.php
index 5194daa5..e81c8bae 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-post-v1-1-endpoint.php
@@ -21,6 +21,7 @@ class WPCOM_JSON_API_Get_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_End
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
return $return;
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
index 934f7e3d..2054e1bf 100644
--- 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
@@ -17,6 +17,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
'is_private' => '(bool) If the site is a private site or not',
'is_following' => '(bool) If the current user is subscribed to this site in the reader',
'options' => '(array) An array of options/settings for the blog. Only viewable by users with post editing rights to the site. Note: Post formats is deprecated, please see /sites/$id/post-formats/',
+ 'updates' => '(array) An array of available updates for plugins, themes, wordpress, and languages.',
'meta' => '(object) Meta data',
);
@@ -39,6 +40,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
$response = $this->build_current_site_response();
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'sites' );
return $response;
@@ -70,6 +72,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
$blog_id = (int) $this->api->get_blog_id_for_output();
+ /** This filter is documented in class.json-api-endpoints.php */
$is_jetpack = true === apply_filters( 'is_jetpack_site', false, $blog_id );
$site_url = get_option( 'siteurl' );
@@ -111,7 +114,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
if ( $is_user_logged_in ){
$is_visible = true;
if ( isset( $visible[$blog_id] ) ) {
- $is_visible = $visible[$blog_id];
+ $is_visible = (bool) $visible[$blog_id];
}
// null and true are visible
$response[$key] = $is_visible;
@@ -198,8 +201,9 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
} else {
if ( class_exists( 'Jetpack_Options' ) ) {
$videopress = Jetpack_Options::get_option( 'videopress', array() );
- if ( $videopress['blog_id'] > 0 )
+ if ( isset( $videopress['blog_id'] ) && $videopress['blog_id'] > 0 ) {
$has_videopress = true;
+ }
}
}
@@ -265,6 +269,16 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
$upgraded_filetypes_enabled = true;
}
+ $wordads = false;
+ if ( function_exists( 'has_any_blog_stickers' ) ) {
+ $wordads = has_any_blog_stickers( array( 'wordads-approved', 'wordads-approved-misfits' ), $blog_id );
+ }
+
+ $publicize_permanently_disabled = false;
+ if ( function_exists( 'is_publicize_permanently_disabled' ) ) {
+ $publicize_permanently_disabled = is_publicize_permanently_disabled( $blog_id );
+ }
+
$response[$key] = array(
'timezone' => (string) get_option( 'timezone_string' ),
'gmt_offset' => (float) get_option( 'gmt_offset' ),
@@ -287,15 +301,21 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
'image_medium_height' => (int) get_option( 'medium_size_h' ),
'image_large_width' => (int) get_option( 'large_size_w' ),
'image_large_height' => (int) get_option( 'large_size_h' ),
+ 'permalink_structure' => get_option( 'permalink_structure' ),
'post_formats' => $supported_formats,
+ 'default_post_format' => get_option( 'default_post_format' ),
+ 'default_category' => (int) get_option( 'default_category' ),
'allowed_file_types' => $allowed_file_types,
'show_on_front' => get_option( 'show_on_front' ),
+ /** This filter is documented in modules/likes.php */
'default_likes_enabled' => (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) ),
'default_sharing_status' => (bool) $default_sharing_status,
'default_comment_status' => ( 'closed' == get_option( 'default_comment_status' ) ? false : true ),
'default_ping_status' => ( 'closed' == get_option( 'default_ping_status' ) ? false : true ),
'software_version' => $wp_version,
- 'created_at' => ! empty( $registered_date ) ? $this->format_date( $registered_date ) : '0000-00-00T00:00:00+00:00',
+ 'created_at' => ! empty( $registered_date ) ? $this->format_date( $registered_date ) : '0000-00-00T00:00:00+00:00',
+ 'wordads' => $wordads,
+ 'publicize_permanently_disabled' => $publicize_permanently_disabled,
);
if ( 'page' === get_option( 'show_on_front' ) ) {
@@ -306,21 +326,67 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
if ( $is_jetpack ) {
$response['options']['jetpack_version'] = get_option( 'jetpack_version' );
- if( get_option( 'jetpack_main_network_site' ) ) {
- $response['options']['main_network_site'] = (string) rtrim( get_option( 'jetpack_main_network_site' ), '/' );
- }
+ if ( get_option( 'jetpack_main_network_site' ) ) {
+ $response['options']['main_network_site'] = (string) rtrim( get_option( 'jetpack_main_network_site' ), '/' );
+ }
+
+ if ( is_array( Jetpack_Options::get_option( 'active_modules' ) ) ) {
+ $response['options']['active_modules'] = (array) array_values( Jetpack_Options::get_option( 'active_modules' ) );
+ }
+
+ if ( $jetpack_wp_version = get_option( 'jetpack_wp_version' ) ) {
+ $response['options']['software_version'] = (string) $jetpack_wp_version;
+ } else if ( $jetpack_update = get_option( 'jetpack_updates' ) ) {
+ if ( is_array( $jetpack_update ) && isset( $jetpack_update['wp_version'] ) ) {
+ $response['options']['software_version'] = (string) $jetpack_update['wp_version'];
+ } else {
+ $response[ 'options' ][ 'software_version' ] = null;
+ }
+ } else {
+ $response['options']['software_version'] = null;
+ }
+
+ $response['options']['max_upload_size'] = get_option( 'jetpack_max_upload_size', false );
// Sites have to prove that they are not main_network site.
// If the sync happends right then we should be able to see that we are not dealing with a network site
$response['options']['is_multi_network'] = (bool) get_option( 'jetpack_is_main_network', true );
$response['options']['is_multi_site'] = (bool) get_option( 'jetpack_is_multi_site', true );
+ $file_mod_denied_reason = array();
+ $file_mod_denied_reason['automatic_updater_disabled'] = (bool) get_option( 'jetpack_constant_AUTOMATIC_UPDATER_DISABLED' );
+
+ // WP AUTO UPDATE CORE defaults to minor, '1' if true and '0' if set to false.
+ $file_mod_denied_reason['wp_auto_update_core_disabled'] = ! ( (bool) get_option( 'jetpack_constant_WP_AUTO_UPDATE_CORE', 'minor' ) );
+ $file_mod_denied_reason['is_version_controlled'] = (bool) get_option( 'jetpack_is_version_controlled' );
+
+ // By default we assume that site does have system write access if the value is not set yet.
+ $file_mod_denied_reason['has_no_file_system_write_access'] = ! (bool)( get_option( 'jetpack_has_file_system_write_access', true ) );
+
+ $file_mod_denied_reason['disallow_file_mods'] = (bool) get_option( 'jetpack_constant_DISALLOW_FILE_MODS' );
+
+ $file_mod_disabled_reasons = array();
+ foreach( $file_mod_denied_reason as $reason => $set ) {
+ if ( $set ) {
+ $file_mod_disabled_reasons[] = $reason;
+ }
+ }
+ $response['options']['file_mod_disabled'] = empty( $file_mod_disabled_reasons ) ? false : $file_mod_disabled_reasons;
}
if ( ! current_user_can( 'edit_posts' ) )
unset( $response[$key] );
break;
case 'meta' :
+ /**
+ * Filters the URL scheme used when querying your site's REST API endpoint.
+ *
+ * @module json-api
+ *
+ * @since 3.2.0
+ *
+ * @param string parse_url( get_option( 'home' ), PHP_URL_SCHEME ) URL scheme parsed from home URL.
+ */
$xmlrpc_scheme = apply_filters( 'wpcom_json_api_xmlrpc_scheme', parse_url( get_option( 'home' ), PHP_URL_SCHEME ) );
$xmlrpc_url = site_url( 'xmlrpc.php', $xmlrpc_scheme );
$response[$key] = (object) array(
@@ -335,7 +401,26 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
break;
}
}
+
if ( $is_jetpack ) {
+
+ // Add the updates only make them visible if the user has manage options permission.
+ $jetpack_update = (array) get_option( 'jetpack_updates' );
+ if ( ! empty( $jetpack_update ) && current_user_can( 'manage_options' ) ) {
+
+ if ( isset( $jetpack_update['wp_version'] ) ) {
+ // In previous version of Jetpack 3.4, 3.5, 3.6 we synced the wp_version into to jetpack_updates
+ unset( $jetpack_update['wp_version'] );
+ }
+
+ if ( isset( $jetpack_update['site_is_version_controlled'] ) ) {
+ // In previous version of Jetpack 3.4, 3.5, 3.6 we synced the site_is_version_controlled into to jetpack_updates
+ unset( $jetpack_update['site_is_version_controlled'] );
+ }
+
+ $response['updates'] = (array) $jetpack_update;
+ }
+
add_filter( 'option_stylesheet', 'fix_theme_location' );
if ( 'https' !== parse_url( $site_url, PHP_URL_SCHEME ) ) {
remove_filter( 'set_url_scheme', array( $this, 'force_http' ), 10, 3 );
@@ -376,7 +461,7 @@ class WPCOM_JSON_API_List_Post_Formats_Endpoint extends WPCOM_JSON_API_Endpoint
}
}
- $response['formats'] = $supported_formats;
+ $response['formats'] = (object) $supported_formats;
return $response;
}
@@ -414,7 +499,14 @@ class WPCOM_JSON_API_List_Page_Templates_Endpoint extends WPCOM_JSON_API_Endpoin
}
class WPCOM_JSON_API_List_Post_Types_Endpoint extends WPCOM_JSON_API_Endpoint {
- static $post_type_keys_to_include = array( 'name', 'label', 'description', 'map_meta_cap' );
+ static $post_type_keys_to_include = array(
+ 'name' => 'name',
+ 'label' => 'label',
+ 'labels' => 'labels',
+ 'description' => 'description',
+ 'map_meta_cap' => 'map_meta_cap',
+ 'cap' => 'capabilities',
+ );
// /sites/%s/post-types -> $blog_id
function callback( $path = '', $blog_id = 0 ) {
@@ -446,11 +538,14 @@ class WPCOM_JSON_API_List_Post_Types_Endpoint extends WPCOM_JSON_API_Endpoint {
$formatted_post_type_object = array();
// Include only the desired keys in the response
- foreach ( self::$post_type_keys_to_include as $key ) {
- $formatted_post_type_object[ $key ] = $post_type_object->{ $key };
+ foreach ( self::$post_type_keys_to_include as $key => $value ) {
+ $formatted_post_type_object[ $value ] = $post_type_object->{ $key };
}
$formatted_post_type_object['api_queryable'] = $is_queryable;
-
+ $formatted_post_type_object['supports'] = get_all_post_type_supports( $post_type );
+ if ( $this->post_type_supports_tags( $post_type ) ) {
+ $formatted_post_type_object['supports']['tags'] = true;
+ }
$formatted_post_type_objects[] = $formatted_post_type_object;
}
@@ -459,4 +554,21 @@ class WPCOM_JSON_API_List_Post_Types_Endpoint extends WPCOM_JSON_API_Endpoint {
'post_types' => $formatted_post_type_objects
);
}
+
+ function post_type_supports_tags( $post_type ) {
+ if ( in_array( 'post_tag', get_object_taxonomies( $post_type ) ) ) {
+ return true;
+ }
+
+ // the featured content module adds post_tag support
+ // to the post types that are registered for it
+ // however it does so in a way that isn't available
+ // to get_object_taxonomies
+ $featured_content = get_theme_support( 'featured-content' );
+ if ( ! $featured_content || empty( $featured_content[0] ) || empty( $featured_content[0]['post_types'] ) ) {
+ return false;
+ }
+
+ return in_array( $post_type, $featured_content[0]['post_types'] );
+ }
}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php
index 6843c254..c97089b4 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-taxonomy-endpoint.php
@@ -20,6 +20,7 @@ class WPCOM_JSON_API_Get_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_Endpo
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'taxonomies' );
return $return;
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-comments-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-comments-endpoint.php
index 942d6962..9b80601d 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-comments-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-comments-endpoint.php
@@ -59,8 +59,9 @@ class WPCOM_JSON_API_List_Comments_Walker extends Walker {
// @todo permissions
class WPCOM_JSON_API_List_Comments_Endpoint extends WPCOM_JSON_API_Comment_Endpoint {
- var $response_format = array(
+ public $response_format = array(
'found' => '(int) The total number of comments found that match the request (ignoring limits, offsets, and pagination).',
+ 'site_ID' => '(int) The site ID',
'comments' => '(array:comment) An array of comment objects.',
);
@@ -236,7 +237,10 @@ class WPCOM_JSON_API_List_Comments_Endpoint extends WPCOM_JSON_API_Comment_Endpo
foreach ( array_keys( $this->response_format ) as $key ) {
switch ( $key ) {
case 'found' :
- $return[$key] = (int) $found;
+ $return[ $key ] = (int) $found;
+ break;
+ case 'site_ID' :
+ $return[ $key ] = (int) $blog_id;
break;
case 'comments' :
$return_comments = array();
@@ -248,10 +252,11 @@ class WPCOM_JSON_API_List_Comments_Endpoint extends WPCOM_JSON_API_Comment_Endpo
}
if ( $return_comments ) {
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'comments', count( $return_comments ) );
}
- $return[$key] = $return_comments;
+ $return[ $key ] = $return_comments;
break;
}
}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-embeds-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-embeds-endpoint.php
index 761ca165..e5cfd7f3 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-embeds-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-embeds-endpoint.php
@@ -14,7 +14,11 @@ class WPCOM_JSON_API_List_Embeds_Endpoint extends WPCOM_JSON_API_Endpoint {
// list em
$output = array( 'embeds' => array() );
-
+
+ if ( ! function_exists( '_wp_oembed_get_object' ) ) {
+ require_once( ABSPATH . WPINC . '/class-oembed.php' );
+ }
+
global $wp_embed;
$oembed = _wp_oembed_get_object();
@@ -32,4 +36,4 @@ class WPCOM_JSON_API_List_Embeds_Endpoint extends WPCOM_JSON_API_Endpoint {
return $output;
}
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-invites-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-invites-endpoint.php
new file mode 100644
index 00000000..1df7cfc8
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-invites-endpoint.php
@@ -0,0 +1,124 @@
+<?php
+class WPCOM_JSON_API_List_Invites_Endpoint extends WPCOM_JSON_API_Endpoint {
+ var $blog_id;
+ var $is_wpcom;
+
+ function callback( $path = '', $blog_id = 0 ) {
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ if ( ! is_multisite() ) {
+ return new WP_Error( 'forbidden', 'To query invites, site must be on a multisite installation.', 403 );
+ }
+
+ if ( ! current_user_can( 'promote_users' ) ) {
+ return new WP_Error( 'unauthorized', 'Your token must have permission to promote users on this blog.', 401 );
+ }
+
+ $this->blog_id = $blog_id;
+ $this->args = $this->query_args();
+ $this->is_wpcom = defined( 'IS_WPCOM' ) && IS_WPCOM;
+ $this->found = $this->get_found();
+
+ return array(
+ 'found' => $this->found,
+ 'invites' => $this->get_invites(),
+ );
+ }
+
+ /**
+ * Returns the total number of invites, ignoring limits and offsets.
+ * @return int
+ */
+ function get_found() {
+ global $wpdb, $wpcom_invite_users;
+
+ $total = 0;
+ if ( $this->is_wpcom ) {
+ $total = $wpcom_invite_users->count_blog_invitiations( $this->blog_id, null, 'pending' == $this->args['status'] );
+ } else {
+ $total = $invites = $wpdb->get_var(
+ $wpdb->prepare(
+ "SELECT count( option_id ) FROM $wpdb->options WHERE option_name LIKE %s",
+ 'new_user_%'
+ )
+ );
+ }
+
+ return intval( $total );
+ }
+
+ /**
+ * Returns the invitations for a given site.
+ * @return array
+ */
+ function get_invites() {
+ global $wpdb, $wpcom_invite_users;
+
+ $invites = array();
+ if ( $this->is_wpcom ) {
+ $invites = $wpcom_invite_users->get_blog_invitations(
+ $this->blog_id,
+ null,
+ array(
+ 'offset' => intval( $this->args['offset'] ),
+ 'per_page' => intval( $this->args['number'] ),
+ 'pending_only' => ( 'pending' == $this->args['status'] ),
+ )
+ );
+ } else {
+ $invites = $wpdb->get_results(
+ $wpdb->prepare(
+ "SELECT * FROM $wpdb->options WHERE option_name LIKE %s ORDER BY option_id DESC LIMIT %d, %d",
+ 'new_user_%',
+ intval( $this->args['offset'] ),
+ intval( $this->args['number'] )
+ )
+ );
+ }
+
+ return empty( $invites ) ? array() : array_map( array( $this, 'build_invite' ), $invites );
+ }
+
+ /**
+ * Given an invite, returns an array with expected shape.
+ * @param array $invite
+ * @return array
+ */
+ function build_invite( $invite ) {
+ $invite_key = $this->is_wpcom ? $invite->invite_slug : $invite->option_name;
+ $invite = $this->is_wpcom ? (array) $invite : (array) unserialize( $invite->option_value );
+
+ return array(
+ 'invite_key' => $invite_key,
+ 'role' => $this->is_wpcom ? $invite['meta']['role'] : $invite['role'],
+ 'user' => $this->get_user( $invite ),
+ );
+ }
+
+ /**
+ * Given an invite, returns a user object using the get_author() method in class.json-api-endpoints.php.
+ * @param array $invite
+ * @return array|string
+ */
+ function get_user( $invite ) {
+ if ( ! $this->is_wpcom ) {
+ return $this->get_author( $invite['user_id'] );
+ }
+
+ $user = get_user_by( 'login', $invite['meta']['sent_to'] );
+
+ // If a user did not exist, mock a user to pass to get_author()
+ $no_user = false === $user;
+ if( $no_user ) {
+ $user = new stdClass();
+ $user->comment_author = '';
+ $user->comment_author_url = '';
+ $user->comment_author_email = $invite['meta']['sent_to'];
+ }
+
+ return $this->get_author( $user, $no_user );
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php
index e53f2c4b..a5b2354c 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php
@@ -2,8 +2,8 @@
class WPCOM_JSON_API_List_Media_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint {
- var $date_range = array();
- var $page_handle = array();
+ public $date_range = array();
+ public $page_handle = array();
function callback( $path = '', $blog_id = 0 ) {
$blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
@@ -25,6 +25,10 @@ class WPCOM_JSON_API_List_Media_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint {
return new WP_Error( 'invalid_number', 'The NUMBER parameter must be less than or equal to 100.', 400 );
}
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ $this->load_theme_functions();
+ }
+
if ( isset( $args['before'] ) ) {
$this->date_range['before'] = $args['before'];
}
@@ -32,12 +36,10 @@ class WPCOM_JSON_API_List_Media_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint {
$this->date_range['after'] = $args['after'];
}
-
-
- $query = array(
+ $query = array(
'post_type' => 'attachment',
'post_status' => 'inherit',
- 'post_parent' => isset( $args['parent_id'] ) ? $args['parent_id'] : null,
+ 'post_parent' => isset( $args['post_ID'] ) ? $args['post_ID'] : null,
'offset' => isset( $args['offset'] ) ? $args['offset'] : null,
'posts_per_page' => $args['number'],
'post_mime_type' => isset( $args['mime_type'] ) ? $args['mime_type'] : null,
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-endpoint.php
index d1400282..ca1c5a10 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-endpoint.php
@@ -1,9 +1,9 @@
<?php
class WPCOM_JSON_API_List_Posts_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
- var $date_range = array();
+ public $date_range = array();
- var $response_format = array(
+ public $response_format = array(
'found' => '(int) The total number of posts found that match the request (ignoring limits, offsets, and pagination).',
'posts' => '(array:post) An array of post objects.',
);
@@ -232,6 +232,7 @@ class WPCOM_JSON_API_List_Posts_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
}
if ( $posts ) {
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts', count( $posts ) );
}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php
index 257e6dfa..1f009365 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php
@@ -1,14 +1,15 @@
<?php
class WPCOM_JSON_API_List_Posts_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_Endpoint {
- var $date_range = array();
- var $modified_range = array();
- var $page_handle = array();
- var $performed_query = null;
+ public $date_range = array();
+ public $modified_range = array();
+ public $page_handle = array();
+ public $performed_query = null;
- var $response_format = array(
+ public $response_format = array(
'found' => '(int) The total number of posts found that match the request (ignoring limits, offsets, and pagination).',
'posts' => '(array:post) An array of post objects.',
+ 'meta' => '(object) Meta data',
);
// /sites/%s/posts/ -> $blog_id
@@ -41,8 +42,7 @@ class WPCOM_JSON_API_List_Posts_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_E
}
// determine statuses
- $status = $args['status'];
- $status = ( $status ) ? explode( ',', $status ) : array( 'publish' );
+ $status = ( ! empty( $args['status'] ) ) ? explode( ',', $args['status'] ) : array( 'publish' );
if ( is_user_logged_in() ) {
$statuses_whitelist = array(
'publish',
@@ -285,21 +285,33 @@ class WPCOM_JSON_API_List_Posts_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_E
}
if ( $posts ) {
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts', count( $posts ) );
}
$return[$key] = $posts;
break;
- }
- }
- if ( $is_eligible_for_page_handle && $return['posts'] ) {
- $last_post = end( $return['posts'] );
- reset( $return['posts'] );
+ case 'meta' :
+ if ( ! is_array( $args['type'] ) ) {
+ $return[$key] = (object) array(
+ 'links' => (object) array(
+ 'counts' => (string) $this->get_site_link( $blog_id, 'post-counts/' . $args['type'] ),
+ )
+ );
+ }
- if ( ( $return['found'] > count( $return['posts'] ) ) && $last_post ) {
- $return['meta'] = array();
- $return['meta']['next_page'] = $this->build_page_handle( $last_post, $query );
+ if ( $is_eligible_for_page_handle && $return['posts'] ) {
+ $last_post = end( $return['posts'] );
+ reset( $return['posts'] );
+ if ( ( $return['found'] > count( $return['posts'] ) ) && $last_post ) {
+ if ( ! isset( $return[$key] ) ) {
+ $return[$key] = (object) array();
+ }
+ $return[$key]->next_page = $this->build_page_handle( $last_post, $query );
+ }
+ }
+ break;
}
}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-roles-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-roles-endpoint.php
new file mode 100644
index 00000000..82464c3f
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-roles-endpoint.php
@@ -0,0 +1,64 @@
+<?php
+class WPCOM_JSON_API_List_Roles_Endpoint extends WPCOM_JSON_API_Endpoint {
+
+ var $response_format = array(
+ 'roles' => '(array:role) Array of role objects',
+ );
+
+ static function role_sort( $a, $b ) {
+ $core_role_names = array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' );
+ $a_is_core_role = in_array( $a->name, $core_role_names );
+ $b_is_core_role = in_array( $b->name, $core_role_names );
+
+ // if $a is a core_role and $b is not, $a always comes first
+ if ( $a_is_core_role && ! $b_is_core_role ) {
+ return -1;
+ }
+
+ // if $b is a core_role and $a is not, $b always comes first
+ if ( $b_is_core_role && ! $a_is_core_role ) {
+ return 1;
+ }
+
+ // otherwise the one with the > number of capabilities comes first
+ $a_cap_count = count( $a->capabilities );
+ $b_cap_count = count( $b->capabilities );
+
+ if ( $a_cap_count === $b_cap_count ) {
+ return 0;
+ }
+
+ return ( $a_cap_count > $b_cap_count ) ? -1 : 1;
+ }
+
+ // /sites/%s/roles/ -> $blog_id
+ function callback( $path = '', $blog_id = 0 ) {
+
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ if ( ! current_user_can( 'list_users' ) ) {
+ return new WP_Error( 'unauthorized', 'User cannot view roles for specified site', 403 );
+ }
+
+ $roles = array();
+
+ global $wp_roles;
+ $wp_roles->reinit();
+ $role_names = $wp_roles->get_names();
+ $role_keys = array_keys( $role_names );
+
+ foreach ( (array) $role_keys as $role_key ) {
+ $role_details = get_role( $role_key );
+ $role_details->display_name = $role_names[$role_key];
+ $roles[] = $role_details;
+ }
+
+ // Sort the array so roles with the most number of capabilities comes first, then the next role, and so on
+ usort( $roles, array( 'self', 'role_sort' ) );
+
+ return array( 'roles' => $roles );
+ }
+} \ No newline at end of file
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-shortcodes-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-shortcodes-endpoint.php
index 9b2fc1aa..28a42350 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-shortcodes-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-shortcodes-endpoint.php
@@ -19,9 +19,9 @@ class WPCOM_JSON_API_List_Shortcodes_Endpoint extends WPCOM_JSON_API_Endpoint {
foreach ( $shortcode_tags as $tag => $class ) {
if ( '__return_false' == $class )
continue;
- $output['shortcodes'][] = $tag;
+ $output['shortcodes'][] = $tag;
}
return $output;
}
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-users-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-users-endpoint.php
index 21d2c777..225bfa0a 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-users-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-users-endpoint.php
@@ -2,8 +2,7 @@
class WPCOM_JSON_API_List_Users_Endpoint extends WPCOM_JSON_API_Endpoint {
var $response_format = array(
- 'found' => '(int) The total number of authors found that match the request (i
-gnoring limits and offsets).',
+ 'found' => '(int) The total number of authors found that match the request (ignoring limits and offsets).',
'users' => '(array:author) Array of user objects',
);
@@ -51,8 +50,24 @@ gnoring limits and offsets).',
if ( $authors_only )
$query['who'] = 'authors';
+ if ( ! empty( $args['search'] ) ) {
+ $query['search'] = $args['search'];
+ }
+
+ if ( ! empty( $args['search_columns'] ) ) {
+ // this `user_search_columns` filter is necessary because WP_User_Query does not allow `display_name` as a search column
+ $this->search_columns = array_intersect( $args['search_columns'], array( 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename', 'display_name' ) );
+ add_filter( 'user_search_columns', array( $this, 'api_user_override_search_columns' ), 10, 3 );
+ }
+
+ if ( ! empty( $args['role'] ) ) {
+ $query['role'] = $args['role'];
+ }
+
$user_query = new WP_User_Query( $query );
+ remove_filter( 'user_search_columns', array( $this, 'api_user_override_search_columns' ) );
+
$return = array();
foreach ( array_keys( $this->response_format ) as $key ) {
switch ( $key ) {
@@ -61,9 +76,15 @@ gnoring limits and offsets).',
break;
case 'users' :
$users = array();
+ $is_multisite = is_multisite();
foreach ( $user_query->get_results() as $u ) {
$the_user = $this->get_author( $u, true );
if ( $the_user && ! is_wp_error( $the_user ) ) {
+ $userdata = get_userdata( $u );
+ $the_user->roles = ! is_wp_error( $userdata ) ? $userdata->roles : array();
+ if ( $is_multisite ) {
+ $the_user->is_super_admin = user_can( $the_user->ID, 'manage_network' );
+ }
$users[] = $the_user;
}
}
@@ -75,4 +96,8 @@ gnoring limits and offsets).',
return $return;
}
+
+ function api_user_override_search_columns( $search_columns, $search ) {
+ return $this->search_columns;
+ }
}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-menus-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-menus-v1-1-endpoint.php
index 9d08935a..c77ce8d3 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-menus-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-menus-v1-1-endpoint.php
@@ -497,6 +497,7 @@ class WPCOM_JSON_API_Menus_Update_Menu_Endpoint extends WPCOM_JSON_API_Menus_Abs
}
$data = $this->input( true, false );
+ $data['id'] = $menu_id;
$data = $this->complexify( array( $data ) );
if ( is_wp_error( $data ) ) {
return $data;
@@ -652,7 +653,7 @@ class WPCOM_JSON_API_Menus_Get_Menu_Endpoint extends WPCOM_JSON_API_Menus_Abstra
$menu->items = $items;
- return $this->simplify( $menu );
+ return array( 'menu' => $this->simplify( $menu ) );
}
}
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
index 6366354a..744eaf0a 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-endpoint.php
@@ -1,7 +1,7 @@
<?php
abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint {
- var $post_object_format = array(
+ public $post_object_format = array(
// explicitly document and cast all output
'ID' => '(int) The post ID.',
'site_ID' => '(int) The site ID.',
@@ -53,7 +53,7 @@ abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint {
'capabilities' => '(object) List of post-specific permissions for the user; publish_post, edit_post, delete_post',
);
- // var $response_format =& $this->post_object_format;
+ // public $response_format =& $this->post_object_format;
function __construct( $args ) {
if ( is_array( $this->post_object_format ) && isset( $this->post_object_format['format'] ) ) {
@@ -72,7 +72,16 @@ abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint {
// Default whitelisted meta keys.
$whitelisted_meta = array( '_thumbnail_id' );
- // whitelist of metadata that can be accessed
+ /**
+ * Filters the meta keys accessible by the REST API.
+ * @see https://developer.wordpress.com/2013/04/26/custom-post-type-and-metadata-support-in-the-rest-api/
+ *
+ * @module json-api
+ *
+ * @since 2.2.3
+ *
+ * @param array $whitelisted_meta Array of metadata that is accessible by the REST API.
+ */
if ( in_array( $key, apply_filters( 'rest_api_allowed_public_metadata', $whitelisted_meta ) ) )
return true;
@@ -100,6 +109,7 @@ abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint {
function get_post_by( $field, $field_value, $context = 'display' ) {
global $blog_id;
+ /** This filter is documented in class.json-api-endpoints.php */
$is_jetpack = true === apply_filters( 'is_jetpack_site', false, $blog_id );
if ( defined( 'GEO_LOCATION__CLASS' ) && class_exists( GEO_LOCATION__CLASS ) ) {
@@ -170,7 +180,15 @@ abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint {
$response = array();
+ $fields = null;
+ if ( 'display' === $context && ! empty( $this->api->query['fields'] ) ) {
+ $fields = array_fill_keys( array_map( 'trim', explode( ',', $this->api->query['fields'] ) ), true );
+ }
+
foreach ( array_keys( $this->post_object_format ) as $key ) {
+ if ( $fields !== null && ! isset( $fields[$key] ) ) {
+ continue;
+ }
switch ( $key ) {
case 'ID' :
// explicitly cast all output
@@ -271,6 +289,7 @@ abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint {
$response[$key] = (bool) pings_open( $post->ID );
break;
case 'likes_enabled' :
+ /** This filter is documented in modules/likes.php */
$sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
$post_likes_switched = (bool) get_post_meta( $post->ID, 'switch_like_status', true );
$post_likes_enabled = $sitewide_likes_enabled;
@@ -613,6 +632,7 @@ abstract class WPCOM_JSON_API_Post_Endpoint extends WPCOM_JSON_API_Endpoint {
$result['duration'] = (int) $metadata['duration'];
}
+ /** This filter is documented in class.jetpack-sync.php */
return (object) apply_filters( 'get_attachment', $result );
}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php
index 94574f92..b5f3cf8e 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php
@@ -1,7 +1,7 @@
<?php
abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint {
- var $post_object_format = array(
+ public $post_object_format = array(
// explicitly document and cast all output
'ID' => '(int) The post ID.',
'site_ID' => '(int) The site ID.',
@@ -50,9 +50,10 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
'metadata' => '(array) Array of post metadata keys and values. All unprotected meta keys are available by default for read requests. Both unprotected and protected meta keys are available for authenticated requests with access. Protected meta keys can be made available with the <code>rest_api_allowed_public_metadata</code> filter.',
'meta' => '(object) API result meta data',
'capabilities' => '(object) List of post-specific permissions for the user; publish_post, edit_post, delete_post',
+ 'other_URLs' => '(object) List of URLs for this post. Permalink and slug suggestions.',
);
- // var $response_format =& $this->post_object_format;
+ // public $response_format =& $this->post_object_format;
function __construct( $args ) {
if ( is_array( $this->post_object_format ) && isset( $this->post_object_format['format'] ) ) {
@@ -72,7 +73,8 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
$whitelisted_meta = array( '_thumbnail_id' );
// whitelist of metadata that can be accessed
- if ( in_array( $key, apply_filters( 'rest_api_allowed_public_metadata', $whitelisted_meta ) ) )
+ /** This filter is documented in json-endpoints/class.wpcom-json-api-post-endpoint.php */
+ if ( in_array( $key, apply_filters( 'rest_api_allowed_public_metadata', $whitelisted_meta ) ) )
return true;
if ( 0 === strpos( $key, 'geo_' ) )
@@ -81,8 +83,8 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
if ( 0 === strpos( $key, '_wpas_' ) )
return true;
- return false;
- }
+ return false;
+ }
function the_password_form() {
return __( 'This post is password protected.', 'jetpack' );
@@ -99,6 +101,7 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
function get_post_by( $field, $field_value, $context = 'display' ) {
global $blog_id;
+ /** This filter is documented in class.json-api-endpoints.php */
$is_jetpack = true === apply_filters( 'is_jetpack_site', false, $blog_id );
if ( defined( 'GEO_LOCATION__CLASS' ) && class_exists( GEO_LOCATION__CLASS ) ) {
@@ -272,6 +275,7 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
);
break;
case 'likes_enabled' :
+ /** This filter is documented in modules/likes.php */
$sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
$post_likes_switched = (bool) get_post_meta( $post->ID, 'switch_like_status', true );
$post_likes_enabled = $sitewide_likes_enabled;
@@ -459,11 +463,27 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
'likes' => (string) $this->get_post_link( $this->api->get_blog_id_for_output(), $post->ID, 'likes/' ),
),
);
+
+ // add autosave link if a more recent autosave exists
+ if ( 'edit' === $context ) {
+ $autosave = wp_get_post_autosave( $post_id );
+ if ( $autosave && $autosave->post_modified > $post->post_modified )
+ $response[$key]->links->autosave = (string) $this->get_post_link( $this->api->get_blog_id_for_output(), $post->ID ) . '/autosave';
+ }
+
break;
case 'capabilities' :
$response[$key] = $capabilities;
break;
+ case 'other_URLs' :
+ $other_urls = array();
+ if ( 'publish' !== $post->post_status ) {
+ $other_urls = $this->get_post_permalink_suggestions( $post->ID, $post->post_title );
+ }
+
+ $response[$key] = (object) $other_urls;
+ break;
}
}
@@ -612,6 +632,7 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
$result['duration'] = (int) $metadata['duration'];
}
+ /** This filter is documented in class.jetpack-sync.php */
return (object) apply_filters( 'get_attachment', $result );
}
@@ -629,6 +650,18 @@ abstract class WPCOM_JSON_API_Post_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
}
/**
+ * Get extra post permalink suggestions
+ * @param int $postID
+ * @param string $title
+ * @return array array of permalink suggestions: 'permalink_URL', 'suggested_slug'
+ */
+ function get_post_permalink_suggestions( $postID, $title ) {
+ $suggestions = array();
+ list( $suggestions['permalink_URL'], $suggestions['suggested_slug'] ) = get_sample_permalink( $postID, $title );
+ return $suggestions;
+ }
+
+ /**
* Get post ID by name
*
* Attempts to match name on post title and page path
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-publicize-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-publicize-endpoint.php
index 5220e112..bccfa84d 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-publicize-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-publicize-endpoint.php
@@ -115,11 +115,11 @@ class WPCOM_JSON_API_Get_Connection_Endpoint extends WPCOM_JSON_API_Endpoint {
// Verify that user has permission to view this connection
if ( $current_user->ID != $connection['user_ID'] && 0 != $connection['user_ID'] ) {
- return new WP_Error( 'authorization_required', 'You do not have permission to access this resource.', 403 );
- }
+ return new WP_Error( 'authorization_required', 'You do not have permission to access this resource.', 403 );
+ }
if ( empty( $connection ) ) {
- return new WP_Error( 'unknown_connection', 'Connection not found.', 404 );
+ return new WP_Error( 'unknown_connection', 'Connection not found.', 404 );
}
return $connection;
@@ -148,19 +148,28 @@ class WPCOM_JSON_API_Delete_Connection_Endpoint extends WPCOM_JSON_API_Endpoint
$connection = WPCOM_JSON_API_Get_Connection_Endpoint::get_connection_by_id( $connection_id );
if ( empty( $connection ) ) {
- return new WP_Error( 'unknown_connection', 'Connection not found.', 404 );
+ return new WP_Error( 'unknown_connection', 'Connection not found.', 404 );
}
// Verify that user has permission to view this connection
if ( $current_user->ID != $connection['user_ID'] && 0 != $connection['user_ID'] ) {
- return new WP_Error( 'authorization_required', 'You do not have permission to access this resource.', 403 );
- }
+ return new WP_Error( 'authorization_required', 'You do not have permission to access this resource.', 403 );
+ }
// Remove publicize connections related to the connection
$publicize = new Publicize();
$is_deleted = ( false !== $publicize->disconnect( $connection['service'], $connection_id ) );
if ( $is_deleted ) {
+ /**
+ * Fires when a Publicize connection is deleted.
+ *
+ * @module json-api
+ *
+ * @since 3.2.0
+ *
+ * @param int $connection_id Publicize connection ID.
+ */
do_action( 'rest_api_delete_publicize_connection', $connection_id );
}
@@ -169,4 +178,4 @@ class WPCOM_JSON_API_Delete_Connection_Endpoint extends WPCOM_JSON_API_Endpoint
'deleted' => $is_deleted
);
}
-} \ No newline at end of file
+}
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
index 1918182b..7588da17 100644
--- 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
@@ -30,6 +30,15 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
}
if ( 'GET' === $this->api->method ) {
+ /**
+ * Fires on each GET request to a specific endpoint.
+ *
+ * @module json-api
+ *
+ * @since 3.2.0
+ *
+ * @param string sites.
+ */
do_action( 'wpcom_json_api_objects', 'sites' );
return $this->get_settings_response();
} else if ( 'POST' === $this->api->method ) {
@@ -76,6 +85,7 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
$response_format = self::$site_format;
$blog_id = (int) $this->api->get_blog_id_for_output();
+ /** This filter is documented in class.json-api-endpoints.php */
$is_jetpack = true === apply_filters( 'is_jetpack_site', false, $blog_id );
foreach ( array_keys( $response_format ) as $key ) {
@@ -111,6 +121,16 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
)
);
+ $eventbrite_api_token = (int) get_option( 'eventbrite_api_token' );
+ if ( 0 === $eventbrite_api_token ) {
+ $eventbrite_api_token = null;
+ }
+
+ $holiday_snow = false;
+ if ( function_exists( 'jetpack_holiday_snow_option_name' ) ) {
+ $holiday_snow = (bool) get_option( jetpack_holiday_snow_option_name() );
+ }
+
$response[$key] = array(
// also exists as "options"
@@ -125,7 +145,7 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
'jetpack_relatedposts_enabled' => (bool) $jetpack_relatedposts_options[ 'enabled' ],
'jetpack_relatedposts_show_headline' => (bool) $jetpack_relatedposts_options[ 'show_headline' ],
'jetpack_relatedposts_show_thumbnails' => (bool) $jetpack_relatedposts_options[ 'show_thumbnails' ],
- 'default_category' => get_option('default_category'),
+ 'default_category' => (int) get_option('default_category'),
'post_categories' => (array) $post_categories,
'default_post_format' => get_option( 'default_post_format' ),
'default_pingback_flag' => (bool) get_option( 'default_pingback_flag' ),
@@ -156,6 +176,8 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
'jetpack_comment_likes_enabled' => (bool) get_option( 'jetpack_comment_likes_enabled', false ),
'twitter_via' => (string) get_option( 'twitter_via' ),
'jetpack-twitter-cards-site-tag' => (string) get_option( 'jetpack-twitter-cards-site-tag' ),
+ 'eventbrite_api_token' => $eventbrite_api_token,
+ 'holidaysnow' => $holiday_snow
);
if ( class_exists( 'Sharing_Service' ) ) {
@@ -190,7 +212,16 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
// $this->input() retrieves posted arguments whitelisted and casted to the $request_format
// specs that get passed in when this class is instantiated
- $input = $this->input();
+ /**
+ * Filters the settings to be updated on the site.
+ *
+ * @module json-api
+ *
+ * @since 3.6.0
+ *
+ * @param array $input Associative array of site settings to be updated.
+ */
+ $input = apply_filters( 'rest_api_update_site_settings', $this->input() );
$jetpack_relatedposts_options = array();
$sharing_options = array();
@@ -267,7 +298,9 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
}
$enabled_or_disabled = $wga['code'] ? 'enabled' : 'disabled';
- bump_stats_extras( 'google-analytics', $enabled_or_disabled );
+
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'google-analytics', $enabled_or_disabled );
$business_plugins = WPCOM_Business_Plugins::instance();
$business_plugins->activate_plugin( 'wp-google-analytics' );
@@ -291,6 +324,30 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
$sharing_options[ $key ] = $value;
break;
+ // Keyring token option
+ case 'eventbrite_api_token':
+ // These options can only be updated for sites hosted on WordPress.com
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ if ( empty( $value ) || WPCOM_JSON_API::is_falsy( $value ) ) {
+ if ( delete_option( $key ) ) {
+ $updated[ $key ] = null;
+ }
+ } else if ( update_option( $key, $value ) ) {
+ $updated[ $key ] = (int) $value;
+ }
+ }
+ break;
+
+ case 'holidaysnow':
+ if ( empty( $value ) || WPCOM_JSON_API::is_falsy( $value ) ) {
+ if ( function_exists( 'jetpack_holiday_snow_option_name' ) && delete_option( jetpack_holiday_snow_option_name() ) ) {
+ $updated[ $key ] = false;
+ }
+ } else if ( function_exists( 'jetpack_holiday_snow_option_name' ) && update_option( jetpack_holiday_snow_option_name(), 'letitsnow' ) ) {
+ $updated[ $key ] = true;
+ }
+ break;
+
// no worries, we've already whitelisted and casted arguments above
default:
if ( update_option( $key, $value ) ) {
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-user-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-user-endpoint.php
new file mode 100644
index 00000000..84a83849
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-user-endpoint.php
@@ -0,0 +1,107 @@
+<?php
+
+class WPCOM_JSON_API_Site_User_Endpoint extends WPCOM_JSON_API_Endpoint {
+
+ public static $user_format = array(
+ 'ID' => '(int) The ID of the user',
+ 'login' => '(string) The login username of the user',
+ 'email' => '(string) The email of the user',
+ 'name' => '(string) The name to display for the user',
+ 'first_name' => '(string) The first name of the user',
+ 'last_name' => '(string) The last name of the user',
+ 'nice_name' => '(string) The nice_name to display for the user',
+ 'URL' => '(string) The primary blog of the user',
+ 'avatar_URL' => '(url) Gravatar image URL',
+ 'profile_URL' => '(url) Gravatar Profile URL',
+ 'site_ID' => '(int) ID of the user\'s primary blog',
+ 'roles' => '(array) The roles of the user',
+ );
+
+ // /sites/%s/users/%d -> $blog_id, $user_id
+ function callback( $path = '', $blog_id = 0, $user_id = 0 ) {
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+ if ( ! current_user_can_for_blog( $blog_id, 'list_users' ) ) {
+ return new WP_Error( 'unauthorized', 'User cannot view users for specified site', 403 );
+ }
+
+ // Get the user by ID or login
+ $get_by = false !== strpos( $path, '/users/login:' ) ? 'login' : 'id';
+ $user = get_user_by( $get_by, $user_id );
+
+ if ( ! $user ) {
+ return new WP_Error( 'unknown_user', 'Unknown user', 404 );
+ }
+
+ if ( ! is_user_member_of_blog( $user->ID, $blog_id ) ) {
+ return new WP_Error( 'unknown_user_for_site', 'Unknown user for site', 404 );
+ }
+
+ if ( 'GET' === $this->api->method ) {
+ return $this->get_user( $user->ID );
+ } else if ( 'POST' === $this->api->method ) {
+ if ( ! current_user_can_for_blog( $blog_id, 'promote_users' ) ) {
+ return new WP_Error( 'unauthorized', 'User cannot promote users for specified site', 403 );
+ }
+ if ( get_current_user_id() == $user_id ) {
+ return new WP_Error( 'unauthorized', 'You cannot change your own role', 403 );
+ }
+ return $this->update_user( $user_id );
+ } else {
+ return new WP_Error( 'bad_request', 'An unsupported request method was used.' );
+ }
+ }
+
+ public function get_user( $user_id ) {
+ $the_user = $this->get_author( $user_id, true );
+ if ( $the_user && ! is_wp_error( $the_user ) ) {
+ $userdata = get_userdata( $user_id );
+ $the_user->roles = ! is_wp_error( $userdata ) ? $userdata->roles : array();
+ }
+
+ return $the_user;
+ }
+
+ /**
+ * Updates user data
+ *
+ * @return (array)
+ */
+ public function update_user( $user_id ) {
+ $input = $this->input();
+ $user['ID'] = $user_id;
+ if ( ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) {
+ foreach ( $input as $key => $value ) {
+ if ( ! is_array( $value ) ) {
+ $value = trim( $value );
+ }
+ $value = wp_unslash( $value );
+ switch ( $key ) {
+ case 'first_name':
+ case 'last_name':
+ $user[ $key ] = $value;
+ break;
+ case 'display_name':
+ case 'name':
+ $user[ 'display_name' ] = $value;
+ break;
+ }
+ }
+ }
+ if ( isset( $input[ 'roles' ] ) ) {
+ if ( is_array( $input['roles'] ) ) {
+ $user['role'] = $input['roles'][0];
+ } else {
+ $user['role'] = $input['roles'];
+ }
+ }
+ $result = wp_update_user( $user );
+ if ( is_wp_error( $result ) ) {
+ return $result;
+ }
+ return $this->get_user( $user_id );
+ }
+
+}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-taxonomy-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-taxonomy-endpoint.php
index 483c0b70..bac3a4f4 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-taxonomy-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-taxonomy-endpoint.php
@@ -1,6 +1,6 @@
<?php
abstract class WPCOM_JSON_API_Taxonomy_Endpoint extends WPCOM_JSON_API_Endpoint {
- var $category_object_format = array(
+ public $category_object_format = array(
'ID' => '(int) The category ID.',
'name' => "(string) The name of the category.",
'slug' => "(string) The slug of the category.",
@@ -10,7 +10,7 @@ abstract class WPCOM_JSON_API_Taxonomy_Endpoint extends WPCOM_JSON_API_Endpoint
'meta' => '(object) Meta data',
);
- var $tag_object_format = array(
+ public $tag_object_format = array(
'ID' => '(int) The tag ID.',
'name' => "(string) The name of the tag.",
'slug' => "(string) The slug of the tag.",
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
index 9c96d422..517e6710 100644
--- 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
@@ -50,7 +50,20 @@ class WPCOM_JSON_API_Update_Comment_Endpoint extends WPCOM_JSON_API_Comment_Endp
return new WP_Error( 'unknown_post', 'Unknown post', 404 );
}
- if ( -1 == get_option( 'blog_public' ) && ! apply_filters( 'wpcom_json_api_user_is_member_of_blog', is_user_member_of_blog() ) && ! is_super_admin() ) {
+ if (
+ -1 == get_option( 'blog_public' ) &&
+ /**
+ * Filter allowing non-registered users on the site to comment.
+ *
+ * @module json-api
+ *
+ * @since 3.4.0
+ *
+ * @param bool is_user_member_of_blog() Is the user member of the site.
+ */
+ ! apply_filters( 'wpcom_json_api_user_is_member_of_blog', is_user_member_of_blog() ) &&
+ ! is_super_admin()
+ ) {
return new WP_Error( 'unauthorized', 'User cannot create comments', 403 );
}
@@ -127,6 +140,7 @@ class WPCOM_JSON_API_Update_Comment_Endpoint extends WPCOM_JSON_API_Comment_Endp
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'comments' );
return $return;
}
@@ -215,6 +229,7 @@ class WPCOM_JSON_API_Update_Comment_Endpoint extends WPCOM_JSON_API_Comment_Endp
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'comments' );
return $return;
}
@@ -236,6 +251,7 @@ class WPCOM_JSON_API_Update_Comment_Endpoint extends WPCOM_JSON_API_Comment_Endp
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'comments' );
wp_delete_comment( $comment->comment_ID );
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-customcss.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-customcss.php
new file mode 100644
index 00000000..954de00b
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-customcss.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Custom Css update endpoint
+ *
+ * https://public-api.wordpress.com/rest/v1.1/sites/$site/customcss/
+ */
+
+class WPCOM_JSON_API_Update_CustomCss_Endpoint extends WPCOM_JSON_API_Endpoint {
+ /**
+ * API callback.
+ */
+ function callback( $path = '', $blog_id = 0 ) {
+ // Switch to the given blog.
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ if ( ! current_user_can( 'edit_theme_options' ) ) {
+ return new WP_Error( 'unauthorized', 'User is not authorized to access custom css', 403 );
+ }
+
+ $args = $this->input();
+ if ( empty( $args ) || ! is_array( $args ) ) {
+ return new WP_Error( 'no_data', 'No data was provided.', 400 );
+ }
+ $save_args = array(
+ 'css' => $args['css'],
+ 'preprocessor' => $args['preprocessor'],
+ 'add_to_existing' => $args['add_to_existing'],
+ );
+ Jetpack_Custom_CSS::save( $save_args );
+
+ $current = array(
+ 'css' => Jetpack_Custom_CSS::get_css(),
+ 'preprocessor' => Jetpack_Custom_CSS::get_preprocessor_key(),
+ 'add_to_existing' => ! Jetpack_Custom_CSS::skip_stylesheet(),
+ );
+
+ $defaults = array(
+ 'css' => '',
+ 'preprocessor' => '',
+ 'add_to_existing' => true,
+ );
+ return wp_parse_args( $current, $defaults );
+ }
+}
+
+
+
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-invites-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-invites-endpoint.php
new file mode 100644
index 00000000..85a1ab92
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-invites-endpoint.php
@@ -0,0 +1,141 @@
+<?php
+class WPCOM_JSON_API_Update_Invites_Endpoint extends WPCOM_JSON_API_Endpoint {
+ public $blog_id;
+ public $invite_id;
+ public $is_wpcom;
+ public $invite;
+
+ function callback( $path = '', $blog_id = 0, $invite_id = 0 ) {
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ if ( ! is_multisite() ) {
+ return new WP_Error( 'forbidden', 'To modify invites, site must be on a multisite installation.', 403 );
+ }
+
+ if ( ! current_user_can( 'promote_users' ) ) {
+ return new WP_Error( 'unauthorized', 'Your token must have permission to promote users on this blog.', 401 );
+ }
+
+ $this->blog_id = $blog_id;
+ $this->invite_id = $invite_id;
+ $this->is_wpcom = defined( 'IS_WPCOM' ) && IS_WPCOM;
+
+ $invite = $this->get_invite();
+ if ( false === $invite ) {
+ return new WP_Error( 'unknown_invite', 'Requested invite was not found.', 404 );
+ }
+
+ $this->invite = $invite;
+
+ $returnValue = false;
+ if ( $this->api->ends_with( $this->path, '/delete' ) ) {
+ $returnValue = array(
+ 'invite_key' => $invite_id,
+ 'deleted' => $this->delete_invite(),
+ );
+ } else {
+ $returnValue = array(
+ 'result' => $this->is_wpcom ? $this->resend_wpcom_invite() : $this->resend_self_hosted_invite()
+ );
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * Returns an invite if found or false if not found.
+ *
+ * @return bool|object
+ */
+ function get_invite() {
+ global $wpdb, $wpcom_invite_users;
+
+ $invite = false;
+ if ( $this->is_wpcom ) {
+ $invite = $wpcom_invite_users->get_invitation( $this->invite_id );
+ } else {
+ $query = $wpdb->prepare( "SELECT * FROM $wpdb->options WHERE option_name = %s LIMIT 1", $this->invite_id );
+ $invite = $wpdb->get_results( $query );
+
+ $invite = empty( $invite ) ? false : $invite;
+ }
+
+ return $invite;
+ }
+
+ /**
+ * Deletes an invitation.
+ *
+ * @return bool Whether the invite was deleted successfully.
+ */
+ function delete_invite() {
+ global $wpdb, $wpcom_invite_users;
+
+ if ( $this->is_wpcom ) {
+ return (bool) $wpcom_invite_users->delete_invitation( $this->invite_id );
+ } else {
+ $query = $wpdb->prepare( "DELETE FROM $wpdb->options WHERE option_name = %s", $this->invite_id );
+ return 0 < $wpdb->query( $query );
+ }
+ }
+
+ /**
+ * Sends an invitation email to a user to join a self-hosted site.
+ *
+ * This method duplicates the invitation email functionality that is present
+ * in wp-admin/user-new.php. Ideally, we should factor out the functionality
+ * in wp-admin/user-new.php that actually invites a user and sends the invite
+ * from the data validation checks that expect $_POST and $_REQUEST.
+ *
+ * @return bool Whether the email was sent successfully.
+ */
+ function resend_self_hosted_invite() {
+ $invite = (array) unserialize( $this->invite[0]->option_value );
+ $roles = get_editable_roles();
+ $role = $roles[ $invite['role'] ];
+ $newuser_key = str_replace( 'new_user_', '', $this->invite_id );
+
+ /* translators: 1: Site title 2: Site URL 3: Role name 4: URL to accept invitation */
+ $message = __( 'Hi,
+
+You\'ve been invited to join \'%1$s\' at
+%2$s with the role of %3$s.
+
+Please click the following link to confirm the invite:
+%4$s', 'jetpack' );
+
+ return wp_mail(
+ $invite['email'],
+ sprintf( __( '[%s] Joining confirmation', 'jetpack' ), wp_specialchars_decode( get_option( 'blogname' ) ) ),
+ sprintf(
+ $message,
+ get_option( 'blogname' ),
+ home_url(),
+ wp_specialchars_decode( translate_user_role( $role['name'] ) ),
+ home_url( "/newbloguser/$newuser_key/" )
+ )
+ );
+ }
+
+ /**
+ * Sends an invitation email to a user to join a WordPress.com site.
+ *
+ * @return bool Whether the invitation was sent successfully.
+ */
+ function resend_wpcom_invite() {
+ global $wpcom_invite_users;
+
+ $wpcom_invite_users->update_invitation( $this->invite->invite_slug, array( 'invite_date' => gmdate( 'Y-m-d H:i:s' ) ) );
+
+ if ( 'follower' == $this->invite->meta['role'] && ! is_private_blog() ) {
+ $wpcom_invite_users->invite_followers( $this->invite->meta['sent_to'] );
+ } else {
+ $wpcom_invite_users->send_invitation( $this->invite->invite_slug );
+ }
+
+ return true;
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-media-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-media-v1-1-endpoint.php
index 8a7c8c74..c4a34caf 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-media-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-media-v1-1-endpoint.php
@@ -20,23 +20,23 @@ class WPCOM_JSON_API_Update_Media_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
$input = $this->input( true );
$insert = array();
- if ( ! empty( $input['title'] ) ) {
+ if ( isset( $input['title'] ) ) {
$insert['post_title'] = $input['title'];
}
- if ( ! empty( $input['caption'] ) ) {
+ if ( isset( $input['caption'] ) ) {
$insert['post_excerpt'] = $input['caption'];
}
- if ( ! empty( $input['description'] ) ) {
+ if ( isset( $input['description'] ) ) {
$insert['post_content'] = $input['description'];
}
- if ( ! empty( $input['parent_id'] ) ) {
+ if ( isset( $input['parent_id'] ) ) {
$insert['post_parent'] = $input['parent_id'];
}
- if ( ! empty( $input['alt'] ) ) {
+ if ( isset( $input['alt'] ) ) {
$alt = wp_strip_all_tags( $input['alt'], true );
update_post_meta( $media_id, '_wp_attachment_image_alt', $alt );
}
@@ -57,7 +57,7 @@ class WPCOM_JSON_API_Update_Media_v1_1_Endpoint extends WPCOM_JSON_API_Endpoint
);
foreach ( $id3_keys as $key => $label ) {
- if ( ! empty( $input[ $key ] ) ) {
+ if ( isset( $input[ $key ] ) ) {
$changed = true;
$id3data[ $key ] = wp_strip_all_tags( $input[ $key ], true );
}
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-endpoint.php
index 7e5f9dd0..04fae801 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-endpoint.php
@@ -107,16 +107,20 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
return $author_id;
}
- if ( 'publish' === $input['status'] && 'publish' !== $post->post_status && !current_user_can( 'publish_post', $post->ID ) ) {
+ if ( ( isset( $input['status'] ) && 'publish' === $input['status'] ) && 'publish' !== $post->post_status && !current_user_can( 'publish_post', $post->ID ) ) {
$input['status'] = 'pending';
}
$last_status = $post->post_status;
- $new_status = $input['status'];
+ $new_status = isset( $input['status'] ) ? $input['status'] : $last_status;
+
+ // Make sure that drafts get the current date when transitioning to publish if not supplied in the post.
+ $date_in_past = ( strtotime($post->post_date_gmt) < time() );
+ if ( 'publish' === $new_status && 'draft' === $last_status && ! isset( $input['date_gmt'] ) && $date_in_past ) {
+ $input['date_gmt'] = gmdate( 'Y-m-d H:i:s' );
+ }
}
- // Fix for https://iorequests.wordpress.com/2014/08/13/scheduled-posts-made-in-the/
- // See: https://a8c.slack.com/archives/io/p1408047082000273
- // If date was set, $this->input will set date_gmt, date still needs to be adjusted for the blog's offset
+ // If date is set, $this->input will set date_gmt, date still needs to be adjusted for the blog's offset
if ( isset( $input['date_gmt'] ) ) {
$gmt_offset = get_option( 'gmt_offset' );
$time_with_offset = strtotime( $input['date_gmt'] ) + $gmt_offset * HOUR_IN_SECONDS;
@@ -173,7 +177,11 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
}
// only add a new tag/cat if the user has access to
$tax = get_taxonomy( $taxonomy );
- if ( !current_user_can( $tax->cap->edit_terms ) ) {
+
+ // see https://core.trac.wordpress.org/ticket/26409
+ if ( 'category' === $taxonomy && ! current_user_can( $tax->cap->edit_terms ) ) {
+ continue;
+ } else if ( ! current_user_can( $tax->cap->assign_terms ) ) {
continue;
}
@@ -210,42 +218,43 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
unset( $input['slug'] );
}
- if ( true === $input['comments_open'] )
- $insert['comment_status'] = 'open';
- else if ( false === $input['comments_open'] )
- $insert['comment_status'] = 'closed';
+ if ( isset( $input['comments_open'] ) ) {
+ $insert['comment_status'] = ( true === $input['comments_open'] ) ? 'open' : 'closed';
+ }
- if ( true === $input['pings_open'] )
- $insert['ping_status'] = 'open';
- else if ( false === $input['pings_open'] )
- $insert['ping_status'] = 'closed';
+ if ( isset( $input['pings_open'] ) ) {
+ $insert['ping_status'] = ( true === $input['pings_open'] ) ? 'open' : 'closed';
+ }
unset( $input['comments_open'], $input['pings_open'] );
- $insert['menu_order'] = $input['menu_order'];
- unset( $input['menu_order'] );
+ if ( isset( $input['menu_order'] ) ) {
+ $insert['menu_order'] = $input['menu_order'];
+ unset( $input['menu_order'] );
+ }
+
+ $publicize = isset( $input['publicize'] ) ? $input['publicize'] : null;
+ unset( $input['publicize'] );
- $publicize = $input['publicize'];
- $publicize_custom_message = $input['publicize_message'];
- unset( $input['publicize'], $input['publicize_message'] );
+ $publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
+ unset( $input['publicize_message'] );
if ( isset( $input['featured_image'] ) ) {
$featured_image = trim( $input['featured_image'] );
$delete_featured_image = empty( $featured_image );
- $featured_image = $input['featured_image'];
unset( $input['featured_image'] );
}
- $metadata = $input['metadata'];
+ $metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
unset( $input['metadata'] );
- $likes = $input['likes_enabled'];
- $sharing = $input['sharing_enabled'];
-
+ $likes = isset( $input['likes_enabled'] ) ? $input['likes_enabled'] : null;
unset( $input['likes_enabled'] );
+
+ $sharing = isset( $input['sharing_enabled'] ) ? $input['sharing_enabled'] : null;
unset( $input['sharing_enabled'] );
- $sticky = $input['sticky'];
+ $sticky = isset( $input['sticky'] ) ? $input['sticky'] : null;
unset( $input['sticky'] );
foreach ( $input as $key => $value ) {
@@ -265,7 +274,7 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
if ( $new ) {
- if ( false === strpos( $input['content'], '[gallery' ) && ( $has_media || $has_media_by_url ) ) {
+ if ( isset( $input['content'] ) && ! has_shortcode( $input['content'], 'gallery' ) && ( $has_media || $has_media_by_url ) ) {
switch ( ( $has_media + $has_media_by_url ) ) {
case 0 :
// No images - do nothing.
@@ -325,6 +334,7 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
}
// Set like status for the post
+ /** This filter is documented in modules/likes.php */
$sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
if ( $new ) {
if ( $sitewide_likes_enabled ) {
@@ -373,17 +383,29 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
}
}
- if ( true === $sticky ) {
- stick_post( $post_id );
- } else {
- unstick_post( $post_id );
+ if ( isset( $sticky ) ) {
+ if ( true === $sticky ) {
+ stick_post( $post_id );
+ } else {
+ unstick_post( $post_id );
+ }
}
// WPCOM Specific (Jetpack's will get bumped elsewhere
- // Tracks how many posts are published and sets meta so we can track some other cool stats (like likes & comments on posts published)
- if ( ( $new && 'publish' == $input['status'] ) || ( !$new && isset( $last_status ) && 'publish' != $last_status && isset( $new_status ) && 'publish' == $new_status ) ) {
- if ( function_exists( 'bump_stats_extras' ) ) {
- bump_stats_extras( 'api-insights-posts', $this->api->token_details['client_id'] );
+ // Tracks how many posts are published and sets meta
+ // so we can track some other cool stats (like likes & comments on posts published)
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ if (
+ ( $new && 'publish' == $input['status'] )
+ || (
+ ! $new && isset( $last_status )
+ && 'publish' != $last_status
+ && isset( $new_status )
+ && 'publish' == $new_status
+ )
+ ) {
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'api-insights-posts', $this->api->token_details['client_id'] );
update_post_meta( $post_id, '_rest_api_published', 1 );
update_post_meta( $post_id, '_rest_api_client_id', $this->api->token_details['client_id'] );
}
@@ -393,7 +415,7 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
// We ask the user/dev to pass Publicize services he/she wants activated for the post, but Publicize expects us
// to instead flag the ones we don't want to be skipped. proceed with said logic.
// any posts coming from Path (client ID 25952) should also not publicize
- if ( $publicize === false || 25952 == $this->api->token_details['client_id'] ) {
+ if ( $publicize === false || ( isset( $this->api->token_details['client_id'] ) && 25952 == $this->api->token_details['client_id'] ) ) {
// No publicize at all, skip all by ID
foreach ( $GLOBALS['publicize_ui']->publicize->get_services( 'all' ) as $name => $service ) {
delete_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_SKIP . $name );
@@ -459,10 +481,22 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
}
}
- if ( !empty( $publicize_custom_message ) )
- update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
+ if ( ! is_null( $publicize_custom_message ) ) {
+ if ( empty( $publicize_custom_message ) ) {
+ delete_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS );
+ } else {
+ update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
+ }
+ }
- set_post_format( $post_id, $insert['post_format'] );
+ if ( ! empty( $insert['post_format'] ) ) {
+ if ( 'default' !== strtolower( $insert['post_format'] ) ) {
+ set_post_format( $post_id, $insert['post_format'] );
+ }
+ else {
+ set_post_format( $post_id, get_option( 'default_post_format' ) );
+ }
+ }
if ( isset( $featured_image ) ) {
$this->parse_and_set_featured_image( $post_id, $delete_featured_image, $featured_image );
@@ -542,6 +576,17 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
}
}
+ /**
+ * Fires when a post is created via the REST API.
+ *
+ * @module json-api
+ *
+ * @since 2.3.0
+ *
+ * @param int $post_id Post ID.
+ * @param array $insert Data used to build the post.
+ * @param string $new New post URL suffix.
+ */
do_action( 'rest_api_inserted_post', $post_id, $insert, $new );
$return = $this->get_post_by( 'ID', $post_id, $args['context'] );
@@ -549,13 +594,16 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
return $return;
}
- if ( 'revision' === $input['type'] ) {
+ if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
}
- // workaround for sticky test occasionally failing, maybe a race condition with stick_post() above
- $return['sticky'] = ( true === $sticky );
+ if ( isset( $sticky ) ) {
+ // workaround for sticky test occasionally failing, maybe a race condition with stick_post() above
+ $return['sticky'] = ( true === $sticky );
+ }
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
return $return;
@@ -582,6 +630,7 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
wp_delete_post( $post->ID );
@@ -608,6 +657,7 @@ class WPCOM_JSON_API_Update_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint {
return new WP_Error( 'unauthorized', 'User cannot restore trashed posts', 403 );
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
wp_untrash_post( $post->ID );
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php
index 7b4cf2e7..d0aef8bf 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php
@@ -38,6 +38,11 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
add_action( 'rest_api_inserted_post', array( $GLOBALS['publicize_ui']->publicize, 'async_publicize_post' ) );
}
+ // 'future' is an alias for 'publish' for now
+ if ( 'future' === $input['status'] ) {
+ $input['status'] = 'publish';
+ }
+
if ( $new ) {
$input = $this->input( true );
@@ -107,16 +112,20 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
return $author_id;
}
- if ( 'publish' === $input['status'] && 'publish' !== $post->post_status && !current_user_can( 'publish_post', $post->ID ) ) {
+ if ( ( isset( $input['status'] ) && 'publish' === $input['status'] ) && 'publish' !== $post->post_status && !current_user_can( 'publish_post', $post->ID ) ) {
$input['status'] = 'pending';
}
$last_status = $post->post_status;
- $new_status = $input['status'];
+ $new_status = isset( $input['status'] ) ? $input['status'] : $last_status;
+
+ // Make sure that drafts get the current date when transitioning to publish if not supplied in the post.
+ $date_in_past = ( strtotime($post->post_date_gmt) < time() );
+ if ( 'publish' === $new_status && 'draft' === $last_status && ! isset( $input['date_gmt'] ) && $date_in_past ) {
+ $input['date_gmt'] = gmdate( 'Y-m-d H:i:s' );
+ }
}
- // Fix for https://iorequests.wordpress.com/2014/08/13/scheduled-posts-made-in-the/
- // See: https://a8c.slack.com/archives/io/p1408047082000273
- // If date was set, $this->input will set date_gmt, date still needs to be adjusted for the blog's offset
+ // If date is set, $this->input will set date_gmt, date still needs to be adjusted for the blog's offset
if ( isset( $input['date_gmt'] ) ) {
$gmt_offset = get_option( 'gmt_offset' );
$time_with_offset = strtotime( $input['date_gmt'] ) + $gmt_offset * HOUR_IN_SECONDS;
@@ -173,7 +182,11 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
}
// only add a new tag/cat if the user has access to
$tax = get_taxonomy( $taxonomy );
- if ( !current_user_can( $tax->cap->edit_terms ) ) {
+
+ // see https://core.trac.wordpress.org/ticket/26409
+ if ( 'category' === $taxonomy && ! current_user_can( $tax->cap->edit_terms ) ) {
+ continue;
+ } else if ( ! current_user_can( $tax->cap->assign_terms ) ) {
continue;
}
@@ -229,12 +242,16 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
unset( $input['discussion'] );
- $insert['menu_order'] = $input['menu_order'];
- unset( $input['menu_order'] );
+ if ( isset( $input['menu_order'] ) ) {
+ $insert['menu_order'] = $input['menu_order'];
+ unset( $input['menu_order'] );
+ }
+
+ $publicize = isset( $input['publicize'] ) ? $input['publicize'] : null;
+ unset( $input['publicize'] );
- $publicize = $input['publicize'];
- $publicize_custom_message = $input['publicize_message'];
- unset( $input['publicize'], $input['publicize_message'] );
+ $publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
+ unset( $input['publicize_message'] );
if ( isset( $input['featured_image'] ) ) {
$featured_image = trim( $input['featured_image'] );
@@ -242,16 +259,16 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
unset( $input['featured_image'] );
}
- $metadata = $input['metadata'];
+ $metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
unset( $input['metadata'] );
- $likes = $input['likes_enabled'];
- $sharing = $input['sharing_enabled'];
-
+ $likes = isset( $input['likes_enabled'] ) ? $input['likes_enabled'] : null;
unset( $input['likes_enabled'] );
+
+ $sharing = isset( $input['sharing_enabled'] ) ? $input['sharing_enabled'] : null;
unset( $input['sharing_enabled'] );
- $sticky = $input['sticky'];
+ $sticky = isset( $input['sticky'] ) ? $input['sticky'] : null;
unset( $input['sticky'] );
foreach ( $input as $key => $value ) {
@@ -271,7 +288,7 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
if ( $new ) {
- if ( false === strpos( $input['content'], '[gallery' ) && ( $has_media || $has_media_by_url ) ) {
+ if ( isset( $input['content'] ) && ! has_shortcode( $input['content'], 'gallery' ) && ( $has_media || $has_media_by_url ) ) {
switch ( ( $has_media + $has_media_by_url ) ) {
case 0 :
// No images - do nothing.
@@ -330,6 +347,7 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
}
// Set like status for the post
+ /** This filter is documented in modules/likes.php */
$sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
if ( $new ) {
if ( $sitewide_likes_enabled ) {
@@ -378,17 +396,29 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
}
}
- if ( true === $sticky ) {
- stick_post( $post_id );
- } else {
- unstick_post( $post_id );
+ if ( isset( $sticky ) ) {
+ if ( true === $sticky ) {
+ stick_post( $post_id );
+ } else {
+ unstick_post( $post_id );
+ }
}
// WPCOM Specific (Jetpack's will get bumped elsewhere
- // Tracks how many posts are published and sets meta so we can track some other cool stats (like likes & comments on posts published)
- if ( ( $new && 'publish' == $input['status'] ) || ( !$new && isset( $last_status ) && 'publish' != $last_status && isset( $new_status ) && 'publish' == $new_status ) ) {
- if ( function_exists( 'bump_stats_extras' ) ) {
- bump_stats_extras( 'api-insights-posts', $this->api->token_details['client_id'] );
+ // Tracks how many posts are published and sets meta
+ // so we can track some other cool stats (like likes & comments on posts published)
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ if (
+ ( $new && 'publish' == $input['status'] )
+ || (
+ ! $new && isset( $last_status )
+ && 'publish' != $last_status
+ && isset( $new_status )
+ && 'publish' == $new_status
+ )
+ ) {
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'api-insights-posts', $this->api->token_details['client_id'] );
update_post_meta( $post_id, '_rest_api_published', 1 );
update_post_meta( $post_id, '_rest_api_client_id', $this->api->token_details['client_id'] );
}
@@ -398,7 +428,7 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
// We ask the user/dev to pass Publicize services he/she wants activated for the post, but Publicize expects us
// to instead flag the ones we don't want to be skipped. proceed with said logic.
// any posts coming from Path (client ID 25952) should also not publicize
- if ( $publicize === false || 25952 == $this->api->token_details['client_id'] ) {
+ if ( $publicize === false || ( isset( $this->api->token_details['client_id'] ) && 25952 == $this->api->token_details['client_id'] ) ) {
// No publicize at all, skip all by ID
foreach ( $GLOBALS['publicize_ui']->publicize->get_services( 'all' ) as $name => $service ) {
delete_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_SKIP . $name );
@@ -465,10 +495,22 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
}
}
- if ( !empty( $publicize_custom_message ) )
- update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
+ if ( ! is_null( $publicize_custom_message ) ) {
+ if ( empty( $publicize_custom_message ) ) {
+ delete_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS );
+ } else {
+ update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
+ }
+ }
- set_post_format( $post_id, $insert['post_format'] );
+ if ( ! empty( $insert['post_format'] ) ) {
+ if ( 'default' !== strtolower( $insert['post_format'] ) ) {
+ set_post_format( $post_id, $insert['post_format'] );
+ }
+ else {
+ set_post_format( $post_id, get_option( 'default_post_format' ) );
+ }
+ }
if ( isset( $featured_image ) ) {
$this->parse_and_set_featured_image( $post_id, $delete_featured_image, $featured_image );
@@ -548,6 +590,7 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
}
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-update-post-endpoint.php */
do_action( 'rest_api_inserted_post', $post_id, $insert, $new );
$return = $this->get_post_by( 'ID', $post_id, $args['context'] );
@@ -555,16 +598,23 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
return $return;
}
- if ( 'revision' === $input['type'] ) {
+ if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
}
- // workaround for sticky test occasionally failing, maybe a race condition with stick_post() above
- $return['sticky'] = ( true === $sticky );
+ if ( isset( $sticky ) ) {
+ // workaround for sticky test occasionally failing, maybe a race condition with stick_post() above
+ $return['sticky'] = ( true === $sticky );
+ }
if ( ! empty( $media_results['errors'] ) )
$return['media_errors'] = $media_results['errors'];
+ if ( 'publish' !== $post->post_status ) {
+ $return['other_URLs'] = (object) $this->get_post_permalink_suggestions( $post_id, $input['title'] );
+ }
+
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
return $return;
@@ -591,6 +641,7 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
wp_delete_post( $post->ID );
@@ -617,6 +668,7 @@ class WPCOM_JSON_API_Update_Post_v1_1_Endpoint extends WPCOM_JSON_API_Post_v1_1_
return new WP_Error( 'unauthorized', 'User cannot restore trashed posts', 403 );
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
wp_untrash_post( $post->ID );
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php
index 2d50168b..22838146 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php
@@ -13,6 +13,11 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
add_action( 'rest_api_inserted_post', array( $GLOBALS['publicize_ui']->publicize, 'async_publicize_post' ) );
}
+ // 'future' is an alias for 'publish' for now
+ if ( isset( $input['status'] ) && 'future' === $input['status'] ) {
+ $input['status'] = 'publish';
+ }
+
if ( $new ) {
$input = $this->input( true );
@@ -82,16 +87,20 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
return $author_id;
}
- if ( 'publish' === $input['status'] && 'publish' !== $post->post_status && !current_user_can( 'publish_post', $post->ID ) ) {
+ if ( ( isset( $input['status'] ) && 'publish' === $input['status'] ) && 'publish' !== $post->post_status && !current_user_can( 'publish_post', $post->ID ) ) {
$input['status'] = 'pending';
}
$last_status = $post->post_status;
- $new_status = $input['status'];
+ $new_status = isset( $input['status'] ) ? $input['status'] : $last_status;
+
+ // Make sure that drafts get the current date when transitioning to publish if not supplied in the post.
+ $date_in_past = ( strtotime($post->post_date_gmt) < time() );
+ if ( 'publish' === $new_status && 'draft' === $last_status && ! isset( $input['date_gmt'] ) && $date_in_past ) {
+ $input['date_gmt'] = gmdate( 'Y-m-d H:i:s' );
+ }
}
- // Fix for https://iorequests.wordpress.com/2014/08/13/scheduled-posts-made-in-the/
- // See: https://a8c.slack.com/archives/io/p1408047082000273
- // If date was set, $this->input will set date_gmt, date still needs to be adjusted for the blog's offset
+ // If date is set, $this->input will set date_gmt, date still needs to be adjusted for the blog's offset
if ( isset( $input['date_gmt'] ) ) {
$gmt_offset = get_option( 'gmt_offset' );
$time_with_offset = strtotime( $input['date_gmt'] ) + $gmt_offset * HOUR_IN_SECONDS;
@@ -138,7 +147,11 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
if ( ! $term_info ) {
// only add a new tag/cat if the user has access to
$tax = get_taxonomy( $taxonomy );
- if ( ! current_user_can( $tax->cap->edit_terms ) ) {
+
+ // see https://core.trac.wordpress.org/ticket/26409
+ if ( 'category' === $taxonomy && ! current_user_can( $tax->cap->edit_terms ) ) {
+ continue;
+ } else if ( ! current_user_can( $tax->cap->assign_terms ) ) {
continue;
}
@@ -164,7 +177,7 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
}
// combine with any previous selections
- if ( ! is_array( $tax_input[ $taxonomy ] ) ) {
+ if ( ! isset( $tax_input[ $taxonomy ] ) || ! is_array( $tax_input[ $taxonomy ] ) ) {
$tax_input[ $taxonomy ] = array();
}
@@ -229,12 +242,16 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
unset( $input['discussion'] );
- $insert['menu_order'] = $input['menu_order'];
- unset( $input['menu_order'] );
+ if ( isset( $input['menu_order'] ) ) {
+ $insert['menu_order'] = $input['menu_order'];
+ unset( $input['menu_order'] );
+ }
+
+ $publicize = isset( $input['publicize'] ) ? $input['publicize'] : null;
+ unset( $input['publicize'] );
- $publicize = $input['publicize'];
- $publicize_custom_message = $input['publicize_message'];
- unset( $input['publicize'], $input['publicize_message'] );
+ $publicize_custom_message = isset( $input['publicize_message'] ) ? $input['publicize_message'] : null;
+ unset( $input['publicize_message'] );
if ( isset( $input['featured_image'] ) ) {
$featured_image = trim( $input['featured_image'] );
@@ -242,16 +259,16 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
unset( $input['featured_image'] );
}
- $metadata = $input['metadata'];
+ $metadata = isset( $input['metadata'] ) ? $input['metadata'] : null;
unset( $input['metadata'] );
- $likes = $input['likes_enabled'];
- $sharing = $input['sharing_enabled'];
-
+ $likes = isset( $input['likes_enabled'] ) ? $input['likes_enabled'] : null;
unset( $input['likes_enabled'] );
+
+ $sharing = isset( $input['sharing_enabled'] ) ? $input['sharing_enabled'] : null;
unset( $input['sharing_enabled'] );
- $sticky = $input['sticky'];
+ $sticky = isset( $input['sticky'] ) ? $input['sticky'] : null;
unset( $input['sticky'] );
foreach ( $input as $key => $value ) {
@@ -271,7 +288,7 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
if ( $new ) {
- if ( false === strpos( $input['content'], '[gallery' ) && ( $has_media || $has_media_by_url ) ) {
+ if ( isset( $input['content'] ) && ! has_shortcode( $input['content'], 'gallery' ) && ( $has_media || $has_media_by_url ) ) {
switch ( ( $has_media + $has_media_by_url ) ) {
case 0 :
// No images - do nothing.
@@ -330,6 +347,7 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
}
// Set like status for the post
+ /** This filter is documented in modules/likes.php */
$sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
if ( $new ) {
if ( $sitewide_likes_enabled ) {
@@ -378,17 +396,29 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
}
}
- if ( true === $sticky ) {
- stick_post( $post_id );
- } else {
- unstick_post( $post_id );
+ if ( isset( $sticky ) ) {
+ if ( true === $sticky ) {
+ stick_post( $post_id );
+ } else {
+ unstick_post( $post_id );
+ }
}
// WPCOM Specific (Jetpack's will get bumped elsewhere
- // Tracks how many posts are published and sets meta so we can track some other cool stats (like likes & comments on posts published)
- if ( ( $new && 'publish' == $input['status'] ) || ( !$new && isset( $last_status ) && 'publish' != $last_status && isset( $new_status ) && 'publish' == $new_status ) ) {
- if ( function_exists( 'bump_stats_extras' ) ) {
- bump_stats_extras( 'api-insights-posts', $this->api->token_details['client_id'] );
+ // Tracks how many posts are published and sets meta
+ // so we can track some other cool stats (like likes & comments on posts published)
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ if (
+ ( $new && 'publish' == $input['status'] )
+ || (
+ !$new && isset( $last_status )
+ && 'publish' != $last_status
+ && isset( $new_status )
+ && 'publish' == $new_status
+ )
+ ) {
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'api-insights-posts', $this->api->token_details['client_id'] );
update_post_meta( $post_id, '_rest_api_published', 1 );
update_post_meta( $post_id, '_rest_api_client_id', $this->api->token_details['client_id'] );
}
@@ -398,7 +428,7 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
// We ask the user/dev to pass Publicize services he/she wants activated for the post, but Publicize expects us
// to instead flag the ones we don't want to be skipped. proceed with said logic.
// any posts coming from Path (client ID 25952) should also not publicize
- if ( $publicize === false || 25952 == $this->api->token_details['client_id'] ) {
+ if ( $publicize === false || ( isset( $this->api->token_details['client_id'] ) && 25952 == $this->api->token_details['client_id'] ) ) {
// No publicize at all, skip all by ID
foreach ( $GLOBALS['publicize_ui']->publicize->get_services( 'all' ) as $name => $service ) {
delete_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_SKIP . $name );
@@ -465,10 +495,22 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
}
}
- if ( !empty( $publicize_custom_message ) )
- update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
+ if ( ! is_null( $publicize_custom_message ) ) {
+ if ( empty( $publicize_custom_message ) ) {
+ delete_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS );
+ } else {
+ update_post_meta( $post_id, $GLOBALS['publicize_ui']->publicize->POST_MESS, trim( $publicize_custom_message ) );
+ }
+ }
- set_post_format( $post_id, $insert['post_format'] );
+ if ( ! empty( $insert['post_format'] ) ) {
+ if ( 'default' !== strtolower( $insert['post_format'] ) ) {
+ set_post_format( $post_id, $insert['post_format'] );
+ }
+ else {
+ set_post_format( $post_id, get_option( 'default_post_format' ) );
+ }
+ }
if ( isset( $featured_image ) ) {
parent::parse_and_set_featured_image( $post_id, $delete_featured_image, $featured_image );
@@ -548,6 +590,7 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
}
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-update-post-endpoint.php */
do_action( 'rest_api_inserted_post', $post_id, $insert, $new );
$return = $this->get_post_by( 'ID', $post_id, $args['context'] );
@@ -555,16 +598,23 @@ class WPCOM_JSON_API_Update_Post_v1_2_Endpoint extends WPCOM_JSON_API_Update_Pos
return $return;
}
- if ( 'revision' === $input['type'] ) {
+ if ( isset( $input['type'] ) && 'revision' === $input['type'] ) {
$return['preview_nonce'] = wp_create_nonce( 'post_preview_' . $input['parent'] );
}
- // workaround for sticky test occasionally failing, maybe a race condition with stick_post() above
- $return['sticky'] = ( true === $sticky );
+ if ( isset( $sticky ) ) {
+ // workaround for sticky test occasionally failing, maybe a race condition with stick_post() above
+ $return['sticky'] = ( true === $sticky );
+ }
if ( ! empty( $media_results['errors'] ) )
$return['media_errors'] = $media_results['errors'];
+ if ( 'publish' !== $post->post_status && isset( $input['title'] )) {
+ $return['other_URLs'] = (object) $this->get_post_permalink_suggestions( $post_id, $input['title'] );
+ }
+
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'posts' );
return $return;
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-taxonomy-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-taxonomy-endpoint.php
index 850eb14b..3c3ae564 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-taxonomy-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-taxonomy-endpoint.php
@@ -43,13 +43,17 @@ class WPCOM_JSON_API_Update_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_En
return new WP_Error( 'unauthorized', 'User cannot edit taxonomy', 403 );
}
- if ( term_exists( $input['name'], $taxonomy_type ) ) {
- return new WP_Error( 'duplicate', 'A taxonomy with that name already exists', 400 );
- }
-
- if ( 'category' !== $taxonomy_type )
+ if ( 'category' !== $taxonomy_type || ! isset( $input['parent'] ) )
$input['parent'] = 0;
+ if ( $term = get_term_by( 'name', $input['name'], $taxonomy_type ) ) {
+ // get_term_by is not case-sensitive, but a name with different casing is allowed
+ // also, the exact same name is allowed as long as the parents are different
+ if ( $input['name'] === $term->name && $input['parent'] === $term->parent ) {
+ return new WP_Error( 'duplicate', 'A taxonomy with that name already exists', 400 );
+ }
+ }
+
$data = wp_insert_term( addslashes( $input['name'] ), $taxonomy_type,
array(
'description' => addslashes( $input['description'] ),
@@ -67,6 +71,7 @@ class WPCOM_JSON_API_Update_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_En
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'taxonomies' );
return $return;
}
@@ -111,6 +116,7 @@ class WPCOM_JSON_API_Update_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_En
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'taxonomies' );
return $return;
}
@@ -136,6 +142,7 @@ class WPCOM_JSON_API_Update_Taxonomy_Endpoint extends WPCOM_JSON_API_Taxonomy_En
return $return;
}
+ /** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
do_action( 'wpcom_json_api_objects', 'taxonomies' );
wp_delete_term( $taxonomy->term_id, $taxonomy_type );
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-user-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-user-endpoint.php
new file mode 100644
index 00000000..f5915aff
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-user-endpoint.php
@@ -0,0 +1,101 @@
+<?php
+
+class WPCOM_JSON_API_Update_User_Endpoint extends WPCOM_JSON_API_Endpoint {
+
+ function callback( $path = '', $blog_id = 0, $user_id = 0 ) {
+ $blog_id = $this->api->switch_to_blog_and_validate_user( $this->api->get_blog_id( $blog_id ) );
+ if ( is_wp_error( $blog_id ) ) {
+ return $blog_id;
+ }
+
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ if ( wpcom_get_blog_owner( $blog_id ) == $user_id ) {
+ return new WP_Error( 'forbidden', 'A site owner can not be removed through this endpoint.', 403 );
+ }
+ }
+
+ if ( $this->api->ends_with( $path, '/delete' ) ) {
+ return $this->delete_or_remove_user( $user_id );
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if a user exists by checking to see if a WP_User object exists for a user ID.
+ * @param int $user_id
+ * @return bool
+ */
+ function user_exists( $user_id ) {
+ $user = get_user_by( 'id', $user_id );
+
+ return false != $user && is_a( $user, 'WP_User' );
+ }
+
+ /**
+ * Validates user input and then decides whether to remove or delete a user.
+ * @param int $user_id
+ * @return array|WP_Error
+ */
+ function delete_or_remove_user( $user_id ) {
+ if ( 0 == $user_id ) {
+ return new WP_Error( 'invalid_input', 'A valid user ID must be specified.', 400 );
+ }
+
+ if ( get_current_user_id() == $user_id ) {
+ return new WP_Error( 'invalid_input', 'User can not remove or delete self through this endpoint.', 400 );
+ }
+
+ if ( ! $this->user_exists( $user_id ) ) {
+ return new WP_Error( 'invalid_input', 'A user does not exist with that ID.', 400 );
+ }
+
+ return is_multisite() ? $this->remove_user( $user_id ) : $this->delete_user( $user_id );
+ }
+
+ /**
+ * Removes a user from the current site.
+ * @param int $user_id
+ * @return array|WP_Error
+ */
+ function remove_user( $user_id ) {
+ if ( ! current_user_can( 'remove_users' ) ) {
+ return new WP_Error( 'unauthorized', 'User cannot remove users for specified site.', 403 );
+ }
+
+ if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) {
+ return new WP_Error( 'invalid_input', 'User is not a member of the specified site.', 400 );
+ }
+
+ return array(
+ 'success' => remove_user_from_blog( $user_id, get_current_blog_id() )
+ );
+ }
+
+ /**
+ * Deletes a user and optionally reassigns posts to another user.
+ * @param int $user_id
+ * @return array|WP_Error
+ */
+ function delete_user( $user_id ) {
+ if ( ! current_user_can( 'delete_users' ) ) {
+ return new WP_Error( 'unauthorized', 'User cannot delete users for specified site.', 403 );
+ }
+
+ $input = (array) $this->input();
+
+ if ( isset( $input['reassign'] ) ) {
+ if ( $user_id == $input['reassign'] ) {
+ return new WP_Error( 'invalid_input', 'Can not reassign posts to user being deleted.', 400 );
+ }
+
+ if ( ! $this->user_exists( $input['reassign'] ) ) {
+ return new WP_Error( 'invalid_input', 'User specified in reassign argument is not a member of the specified site.', 400 );
+ }
+ }
+
+ return array(
+ 'success' => wp_delete_user( $user_id, intval( $input['reassign'] ) ),
+ );
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php
new file mode 100644
index 00000000..f1d0f4da
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php
@@ -0,0 +1,16 @@
+<?php
+
+class Jetpack_JSON_API_Jetpack_Log_Endpoint extends Jetpack_JSON_API_Endpoint {
+ // GET /sites/%s/jetpack-log
+ protected $needed_capabilities = 'manage_options';
+
+ protected function result() {
+ $args = $this->input();
+ $event = ( isset( $args['event'] ) && is_string( $args['event'] ) ) ? $code : false;
+ $num = ( isset( $args['num'] ) ) ? intval( $num ) : false;
+
+ return array(
+ 'log' => Jetpack::get_log( $event, $num )
+ );
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-maybe-auto-update-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-maybe-auto-update-endpoint.php
new file mode 100644
index 00000000..5b368760
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-maybe-auto-update-endpoint.php
@@ -0,0 +1,32 @@
+<?php
+
+class Jetpack_JSON_API_Maybe_Auto_Update_Endpoint extends Jetpack_JSON_API_Endpoint {
+ // POST /sites/%s/maybe_auto_update
+ protected $needed_capabilities = array( 'update_core', 'update_plugins', 'update_themes' );
+
+ protected $update_results = array();
+
+ protected function result() {
+ add_action( 'automatic_updates_complete', array( $this, 'get_update_results' ), 100, 1 );
+
+ wp_maybe_auto_update();
+
+ $result['log'] = $this->update_results;
+
+ if ( empty( $result['log'] ) ) {
+ $possible_reasons_for_failure = Jetpack_Autoupdate::get_possible_failures();
+
+ if ( $possible_reasons_for_failure ) {
+ $result['log']['error'] = $possible_reasons_for_failure;
+ }
+
+ }
+
+ return $result;
+ }
+
+ public function get_update_results( $results ) {
+ $this->update_results = $results;
+ }
+
+}
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-modules-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-modules-endpoint.php
index 0d9d54a8..79b637b3 100644
--- a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-modules-endpoint.php
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-modules-endpoint.php
@@ -93,11 +93,8 @@ abstract class Jetpack_JSON_API_Modules_Endpoint extends Jetpack_JSON_API_Endpoi
// Fetch the HTML formatted long description
ob_start();
- if ( Jetpack::is_active() && has_action( 'jetpack_module_more_info_connected_' . $module_slug ) ) {
- do_action( 'jetpack_module_more_info_connected_' . $module_slug );
- } else {
- do_action( 'jetpack_module_more_info_' . $module_slug );
- }
+ /** This action is documented in class.jetpack-modules-list-table.php */
+ do_action( 'jetpack_module_more_info_' . $module_slug );
$module['description'] = ob_get_clean();
return $module;
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
index 9fb4fc28..1b546471 100644
--- 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
@@ -27,6 +27,7 @@ abstract class Jetpack_JSON_API_Plugins_Endpoint extends Jetpack_JSON_API_Endpoi
'autoupdate' => '(boolean) Whether the plugin is automatically updated',
'next_autoupdate' => '(string) Y-m-d H:i:s for next scheduled update event',
'log' => '(array:safehtml) An array of update log strings.',
+ 'uninstallable' => '(boolean) Whether the plugin is unistallable.',
);
protected function result() {
@@ -110,6 +111,7 @@ abstract class Jetpack_JSON_API_Plugins_Endpoint extends Jetpack_JSON_API_Endpoi
$plugin['update'] = $this->get_plugin_updates( $plugin_file );
$plugin['next_autoupdate'] = date( 'Y-m-d H:i:s', wp_next_scheduled( 'wp_maybe_auto_update' ) );
$plugin['autoupdate'] = in_array( $plugin_file, Jetpack_Options::get_option( 'autoupdate_plugins', array() ) );
+ $plugin['uninstallable'] = is_uninstallable_plugin( $plugin_file );
if ( ! empty ( $this->log[ $plugin_file ] ) ) {
$plugin['log'] = $this->log[ $plugin_file ];
}
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
index 081a5add..110c257f 100644
--- 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
@@ -5,38 +5,46 @@ include_once ABSPATH . 'wp-admin/includes/file.php';
class Jetpack_JSON_API_Plugins_Install_Endpoint extends Jetpack_JSON_API_Plugins_Endpoint {
- // POST /sites/%s/plugins/%s/new
+ // POST /sites/%s/plugins/%s/install
protected $needed_capabilities = 'install_plugins';
protected $action = 'install';
- protected $download_links = array();
protected function install() {
foreach ( $this->plugins as $index => $slug ) {
- $skin = new Automatic_Upgrader_Skin();
+ $skin = new Jetpack_Automatic_Plugin_Install_Skin();
$upgrader = new Plugin_Upgrader( $skin );
+ $zip_url = self::generate_wordpress_org_plugin_download_link( $slug );
- $result = $upgrader->install( $this->download_links[ $slug ] );
+ $result = $upgrader->install( $zip_url );
if ( ! $this->bulk && is_wp_error( $result ) ) {
return $result;
}
$plugin = self::get_plugin_id_by_slug( $slug );
-
+ $error_code = 'install_error';
if ( ! $plugin ) {
$error = $this->log[ $slug ]['error'] = __( 'There was an error installing your plugin', 'jetpack' );
}
if ( ! $this->bulk && ! $result ) {
- $error = $this->log[ $slug ]['error'] = __( 'An unknown error occurred during installation', 'jetpack' );
+ $error_code = $upgrader->skin->get_main_error_code();
+ $message = $upgrader->skin->get_main_error_message();
+ $error = $this->log[ $slug ]['error'] = $message ? $message : __( 'An unknown error occurred during installation' , 'jetpack' );
}
$this->log[ $plugin ][] = $upgrader->skin->get_upgrade_messages();
}
if ( ! $this->bulk && isset( $error ) ) {
- return new WP_Error( 'install_error', $this->log[ $slug ]['error'], 400 );
+
+ if ( 'download_failed' === $error_code ) {
+ // For backwards compatibility: versions prior to 3.9 would return no_package instead of download_failed.
+ $error_code = 'no_package';
+ }
+
+ return new WP_Error( $error_code, $this->log[ $slug ]['error'], 400 );
}
// replace the slug with the actual plugin id
@@ -50,34 +58,141 @@ class Jetpack_JSON_API_Plugins_Install_Endpoint extends Jetpack_JSON_API_Plugins
return new WP_Error( 'missing_plugins', __( 'No plugins found.', 'jetpack' ) );
}
foreach( $this->plugins as $index => $slug ) {
-
// make sure it is not already installed
if ( self::get_plugin_id_by_slug( $slug ) ) {
return new WP_Error( 'plugin_already_installed', __( 'The plugin is already installed', 'jetpack' ) );
}
- $response = wp_remote_get( "http://api.wordpress.org/plugins/info/1.0/$slug" );
- $plugin_data = unserialize( $response['body'] );
- if ( is_wp_error( $plugin_data ) ) {
- return $plugin_data;
- }
-
- $this->download_links[ $slug ] = $plugin_data->download_link;
-
}
return true;
}
+ protected static function generate_wordpress_org_plugin_download_link( $plugin_slug ) {
+ return "https://downloads.wordpress.org/plugin/{$plugin_slug}.latest-stable.zip";
+ }
+
protected static function get_plugin_id_by_slug( $slug ) {
$plugins = get_plugins();
- if( ! is_array( $plugins ) ) {
+ if ( ! is_array( $plugins ) ) {
return false;
}
- foreach( $plugins as $id => $plugin_data ) {
- if( strpos( $id, $slug ) !== false ) {
- return $id;
+ foreach( $plugins as $plugin_file => $plugin_data ) {
+ if ( self::get_slug_from_file_path( $plugin_file ) === $slug ) {
+ return $plugin_file;
}
}
return false;
}
+
+ protected static function get_slug_from_file_path( $plugin_file ) {
+ // Simular to get_plugin_slug() method.
+ $slug = dirname( $plugin_file );
+ if ( '.' === $slug ) {
+ $slug = preg_replace("/(.+)\.php$/", "$1", $plugin_file );
+ }
+ return $slug;
+ }
+}
+/**
+ * Allows us to capture that the site doesn't have proper file system access.
+ * In order to update the plugin.
+ */
+class Jetpack_Automatic_Plugin_Install_Skin extends Automatic_Upgrader_Skin {
+ /**
+ * Stores the last error key;
+ **/
+ protected $main_error_code = 'install_error';
+
+ /**
+ * Stores the last error message.
+ **/
+ protected $main_error_message = 'An unknown error occurred during installation';
+
+ /**
+ * Overwrites the set_upgrader to be able to tell if we e ven have the ability to write to the files.
+ *
+ * @param WP_Upgrader $upgrader
+ *
+ */
+ public function set_upgrader( &$upgrader ) {
+ parent::set_upgrader( $upgrader );
+
+ // Check if we even have permission to.
+ $result = $upgrader->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) );
+ if ( ! $result ) {
+ // set the string here since they are not available just yet
+ $upgrader->generic_strings();
+ $this->feedback( 'fs_unavailable' );
+ }
+ }
+
+ /**
+ * Overwrites the error function
+ */
+ public function error( $error ) {
+ if ( is_wp_error( $error ) ) {
+ $this->feedback( $error );
+ }
+ }
+
+ private function set_main_error_code( $code ) {
+ // Don't set the process_failed as code since it is not that helpful unless we don't have one already set.
+ $this->main_error_code = ( $code === 'process_failed' && $this->main_error_code ? $this->main_error_code : $code );
+ }
+
+ private function set_main_error_message( $message, $code ) {
+ // Don't set the process_failed as message since it is not that helpful unless we don't have one already set.
+ $this->main_error_message = ( $code === 'process_failed' && $this->main_error_code ? $this->main_error_code : $message );
+ }
+
+ public function get_main_error_code() {
+ return $this->main_error_code;
+ }
+
+ public function get_main_error_message() {
+ return $this->main_error_message;
+ }
+
+ /**
+ * Overwrites the feedback function
+ */
+ public function feedback( $data ) {
+
+ $current_error = null;
+ if ( is_wp_error( $data ) ) {
+ $this->set_main_error_code( $data->get_error_code() );
+ $string = $data->get_error_message();
+ } elseif ( is_array( $data ) ) {
+ return;
+ } else {
+ $string = $data;
+ }
+
+ if ( ! empty( $this->upgrader->strings[ $string ] ) ) {
+ $this->set_main_error_code( $string );
+
+ $current_error = $string;
+ $string = $this->upgrader->strings[ $string ];
+ }
+
+ if ( strpos( $string, '%' ) !== false ) {
+ $args = func_get_args();
+ $args = array_splice( $args, 1 );
+ if ( ! empty( $args ) )
+ $string = vsprintf( $string, $args );
+ }
+
+ $string = trim( $string );
+ $string = wp_kses( $string, array(
+ 'a' => array(
+ 'href' => true
+ ),
+ 'br' => true,
+ 'em' => true,
+ 'strong' => true,
+ ) );
+
+ $this->set_main_error_message( $string, $current_error );
+ $this->messages[] = $string;
+ }
}
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php
index 4fbddaba..13534128 100644
--- a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php
@@ -49,7 +49,7 @@ class Jetpack_JSON_API_Plugins_Modify_Endpoint extends Jetpack_JSON_API_Plugins_
protected function autoupdate_on() {
$autoupdate_plugins = Jetpack_Options::get_option( 'autoupdate_plugins', array() );
- $autoupdate_plugins = array_unique( array_merge( $autoupdate_plugins, $this->plugins) );
+ $autoupdate_plugins = array_unique( array_merge( $autoupdate_plugins, $this->plugins ) );
Jetpack_Options::update_option( 'autoupdate_plugins', $autoupdate_plugins );
}
@@ -67,7 +67,7 @@ class Jetpack_JSON_API_Plugins_Modify_Endpoint extends Jetpack_JSON_API_Plugins_
continue;
}
- if( ! $this->network_wide && is_network_only_plugin( $plugin ) ) {
+ if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) {
$this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' );
$has_errors = true;
continue;
@@ -82,7 +82,7 @@ class Jetpack_JSON_API_Plugins_Modify_Endpoint extends Jetpack_JSON_API_Plugins_
}
$success = Jetpack::is_plugin_active( $plugin );
- if ( $success && $this->network_wide ) {
+ if ( $success && $this->network_wide ) {
$success &= is_plugin_active_for_network( $plugin );
}
@@ -100,7 +100,7 @@ class Jetpack_JSON_API_Plugins_Modify_Endpoint extends Jetpack_JSON_API_Plugins_
}
protected function deactivate() {
- foreach( $this->plugins as $plugin ) {
+ foreach ( $this->plugins as $plugin ) {
if ( ! Jetpack::is_plugin_active( $plugin ) ) {
$error = $this->log[ $plugin ]['error'] = __( 'The Plugin is already deactivated.', 'jetpack' );
continue;
@@ -109,7 +109,7 @@ class Jetpack_JSON_API_Plugins_Modify_Endpoint extends Jetpack_JSON_API_Plugins_
deactivate_plugins( $plugin, false, $this->network_wide );
$success = ! Jetpack::is_plugin_active( $plugin );
- if ( $success && $this->network_wide ) {
+ if ( $success && $this->network_wide ) {
$success &= ! is_plugin_active_for_network( $plugin );
}
@@ -166,7 +166,7 @@ class Jetpack_JSON_API_Plugins_Modify_Endpoint extends Jetpack_JSON_API_Plugins_
defined( 'DOING_CRON' ) or define( 'DOING_CRON', true );
$result = $upgrader->upgrade( $plugin );
- $this->log[ $plugin ][] = $upgrader->skin->get_upgrade_messages();
+ $this->log[ $plugin ][] = $upgrader->skin->get_upgrade_messages();
}
if ( ! $this->bulk && ! $result && $update_attempted ) {
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
index 8f6b1dd6..f2a98fb9 100644
--- 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
@@ -6,6 +6,7 @@ class Jetpack_JSON_API_Sync_Endpoint extends Jetpack_JSON_API_Endpoint {
protected function result() {
Jetpack::init();
+ /** This action is documented in class.jetpack.php */
do_action( 'jetpack_sync_all_registered_options' );
$result['scheduled'] = true;
return $result;
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-themes-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-themes-endpoint.php
index c479a4c4..4e6cf42e 100644
--- a/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-themes-endpoint.php
+++ b/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-themes-endpoint.php
@@ -12,12 +12,16 @@ abstract class Jetpack_JSON_API_Themes_Endpoint extends Jetpack_JSON_API_Endpoin
protected $bulk = true;
protected $log;
+ protected $current_theme_id;
static $_response_format = array(
'id' => '(string) The theme\'s ID.',
'screenshot' => '(string) A theme screenshot URL',
'name' => '(string) The name of the theme.',
+ 'theme_uri' => '(string) The URI of the theme\'s webpage.',
'description' => '(string) A description of the theme.',
+ 'author' => '(string) The author of the theme.',
+ 'author_uri' => '(string) The website of the theme author.',
'tags' => '(array) Tags indicating styles and features of the theme.',
'log' => '(array) An array of log strings',
'autoupdate' => '(bool) Whether the theme is automatically updated',
@@ -92,7 +96,10 @@ abstract class Jetpack_JSON_API_Themes_Endpoint extends Jetpack_JSON_API_Endpoin
$fields = array(
'name' => 'Name',
+ 'theme_uri' => 'ThemeURI',
'description' => 'Description',
+ 'author' => 'Author',
+ 'author_uri' => 'AuthorURI',
'tags' => 'Tags',
'version' => 'Version'
);
@@ -100,7 +107,8 @@ abstract class Jetpack_JSON_API_Themes_Endpoint extends Jetpack_JSON_API_Endpoin
$id = $theme->get_stylesheet();
$formatted_theme = array(
'id' => $id,
- 'screenshot' => jetpack_photon_url( $theme->get_screenshot(), array(), 'network_path' )
+ 'screenshot' => jetpack_photon_url( $theme->get_screenshot(), array(), 'network_path' ),
+ 'active' => $id === $this->current_theme_id,
);
foreach( $fields as $key => $field ) {
@@ -152,6 +160,8 @@ abstract class Jetpack_JSON_API_Themes_Endpoint extends Jetpack_JSON_API_Endpoin
if ( isset( $args['limit'] ) )
$themes = array_slice( $themes, 0, (int) $args['limit'] );
+ $this->current_theme_id = wp_get_theme()->get_stylesheet();
+
return array_map( array( $this, 'format_theme' ), $themes );
}
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php
new file mode 100644
index 00000000..d4a291de
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php
@@ -0,0 +1,39 @@
+<?php
+
+class WPCOM_JSON_API_Get_Option_Endpoint extends Jetpack_JSON_API_Endpoint {
+
+ protected $needed_capabilities = 'manage_options';
+
+ public $option_name;
+ public $site_option;
+
+ function result() {
+ if ( $this->site_option ) {
+ return array( 'option_value' => get_site_option( $this->option_name ) );
+ }
+ return array( 'option_value' => get_option( $this->option_name ) );
+ }
+
+ function validate_input( $object ) {
+ $query_args = $this->query_args();
+ $this->option_name = isset( $query_args['option_name'] ) ? $query_args['option_name'] : false;
+ if ( ! $this->option_name ) {
+ return new WP_Error( 'option_name_not_set', __( 'You must specify an option_name', 'jetpack' ) );
+ }
+ $this->site_option = isset( $query_args['site_option'] ) ? $query_args['site_option'] : false;
+ /**
+ * Filter the list of options that are manageable via the JSON API.
+ *
+ * @module json-api
+ *
+ * @since 3.8.2
+ *
+ * @param array The default list of site options.
+ * @param bool Is the option a site option.
+ */
+ if ( ! in_array( $this->option_name, apply_filters( 'jetpack_options_whitelist', array(), $this->site_option ) ) ) {
+ return new WP_Error( 'option_name_not_in_whitelist', __( 'You must specify a whitelisted option_name', 'jetpack' ) );
+ }
+ return true;
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-update-option-endpoint.php b/plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-update-option-endpoint.php
new file mode 100644
index 00000000..20f8895c
--- /dev/null
+++ b/plugins/jetpack/json-endpoints/jetpack/class.wpcom-json-api-update-option-endpoint.php
@@ -0,0 +1,31 @@
+<?php
+
+class WPCOM_JSON_API_Update_Option_Endpoint extends WPCOM_JSON_API_Get_Option_Endpoint {
+ public $option_value;
+
+ function result() {
+ if ( $this->site_option ) {
+ update_site_option( $this->option_name, $this->option_value );
+ } else {
+ update_option( $this->option_name, $this->option_value );
+ }
+ return parent::result();
+ }
+
+ function validate_input( $object ) {
+ $input = $this->input();
+ $query_args = $this->query_args();
+ if ( ! isset( $input['option_value'] ) || is_array( $input['option_value'] ) ) {
+ return new WP_Error( 'option_value_not_set', __( 'You must specify an option_value', 'jetpack' ) );
+ }
+ if ( $query_args['is_array'] ) {
+ // When converted back from JSON, the value is an object.
+ // Cast it to an array for options that expect arrays.
+ $this->option_value = (array) $input['option_value'];
+ } else {
+ $this->option_value = $input['option_value'];
+ }
+
+ return parent::validate_input( $object );
+ }
+}
diff --git a/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php b/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php
index b5f9c3e2..2424d075 100644
--- a/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php
+++ b/plugins/jetpack/json-endpoints/jetpack/json-api-jetpack-endpoints.php
@@ -578,3 +578,96 @@ new Jetpack_JSON_API_Sync_Endpoint( array(
),
'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/sync'
) );
+
+require_once( $json_jetpack_endpoints_dir . 'class.jetpack-json-api-log-endpoint.php' );
+
+new Jetpack_JSON_API_Jetpack_Log_Endpoint( array(
+ 'description' => 'Get the Jetpack log',
+ 'method' => 'GET',
+ 'path' => '/sites/%s/jetpack-log',
+ 'stat' => 'log',
+ 'path_labels' => array(
+ '$site' => '(int|string) The site ID, The site domain'
+ ),
+ 'request_format' => array(
+ 'event' => '(string) The event to filter by, by default all entries are returned',
+ 'num' => '(int) The number of entries to get, by default all entries are returned'
+ ),
+ 'response_format' => array(
+ 'log' => '(array) An array of jetpack log entries'
+ ),
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/jetpack-log'
+) );
+
+require_once( $json_jetpack_endpoints_dir . 'class.jetpack-json-api-maybe-auto-update-endpoint.php' );
+
+new Jetpack_JSON_API_Maybe_Auto_Update_Endpoint( array(
+ 'description' => 'Maybe Auto Update Core, Plugins, Themes and Languages',
+ 'method' => 'POST',
+ 'path' => '/sites/%s/maybe-auto-update',
+ 'stat' => 'maybe-auto-update',
+ 'path_labels' => array(
+ '$site' => '(int|string) The site ID, The site domain'
+ ),
+ 'response_format' => array(
+ 'log' => '(array) Results of running the update job'
+ ),
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/example.wordpress.org/maybe-auto-update'
+
+) );
+
+// Options
+require_once( $json_jetpack_endpoints_dir . 'class.wpcom-json-api-get-option-endpoint.php' );
+
+new WPCOM_JSON_API_Get_Option_Endpoint( array (
+ 'method' => 'GET',
+ 'description' => 'Fetches an option.',
+ 'group' => '__do_not_document',
+ 'stat' => 'option',
+ 'path' => '/sites/%s/option',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ ),
+ 'query_parameters' => array(
+ 'option_name' => '(string) The name of the option to fetch.',
+ 'site_option' => '(bool=false) True if the option is a site option.',
+ ),
+ 'response_format' => array(
+ 'option_value' => '(string|object) The value of the option.',
+ ),
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/option?option_name=blogname',
+ 'example_request_data' => array(
+ 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ ),
+) );
+
+require_once( $json_jetpack_endpoints_dir . 'class.wpcom-json-api-update-option-endpoint.php' );
+
+new WPCOM_JSON_API_Update_Option_Endpoint( array (
+ 'method' => 'POST',
+ 'description' => 'Updates an option.',
+ 'group' => '__do_not_document',
+ 'stat' => 'option:update',
+ 'path' => '/sites/%s/option',
+ 'path_labels' => array(
+ '$site' => '(int|string) Site ID or domain',
+ ),
+ 'query_parameters' => array(
+ 'option_name' => '(string) The name of the option to fetch.',
+ 'site_option' => '(bool=false) True if the option is a site option.',
+ 'is_array' => '(bool=false) True if the value should be converted to an array before saving.',
+ ),
+ 'request_format' => array(
+ 'option_value' => '(string|object) The new value of the option.',
+ ),
+ 'response_format' => array(
+ 'option_value' => '(string|object) The value of the updated option.',
+ ),
+ 'example_request' => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/option',
+ 'example_request_data' => array(
+ 'headers' => array( 'authorization' => 'Bearer YOUR_API_TOKEN' ),
+ 'body' => array(
+ 'option_value' => 'My new blog name'
+ ),
+ ),
+) );
diff --git a/plugins/jetpack/languages/jetpack-af.mo b/plugins/jetpack/languages/jetpack-af.mo
index ceec5aab..dfafd422 100644
--- a/plugins/jetpack/languages/jetpack-af.mo
+++ b/plugins/jetpack/languages/jetpack-af.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ar.mo b/plugins/jetpack/languages/jetpack-ar.mo
deleted file mode 100644
index 1dbd1eae..00000000
--- a/plugins/jetpack/languages/jetpack-ar.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-az.mo b/plugins/jetpack/languages/jetpack-az.mo
index 268e51be..d8b234b9 100644
--- a/plugins/jetpack/languages/jetpack-az.mo
+++ b/plugins/jetpack/languages/jetpack-az.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-bg_BG.mo b/plugins/jetpack/languages/jetpack-bg_BG.mo
index 1ca5fd7b..8c2d6f98 100644
--- a/plugins/jetpack/languages/jetpack-bg_BG.mo
+++ b/plugins/jetpack/languages/jetpack-bg_BG.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-bs_BA.mo b/plugins/jetpack/languages/jetpack-bs_BA.mo
index acd42ea4..a7f4eb25 100644
--- a/plugins/jetpack/languages/jetpack-bs_BA.mo
+++ b/plugins/jetpack/languages/jetpack-bs_BA.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ca.mo b/plugins/jetpack/languages/jetpack-ca.mo
index 8c4e3df3..0971f683 100644
--- a/plugins/jetpack/languages/jetpack-ca.mo
+++ b/plugins/jetpack/languages/jetpack-ca.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ckb.mo b/plugins/jetpack/languages/jetpack-ckb.mo
index 2bd22d16..e57c16a8 100644
--- a/plugins/jetpack/languages/jetpack-ckb.mo
+++ b/plugins/jetpack/languages/jetpack-ckb.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-cs_CZ.mo b/plugins/jetpack/languages/jetpack-cs_CZ.mo
index 9ab537b9..ed9b3bed 100644
--- a/plugins/jetpack/languages/jetpack-cs_CZ.mo
+++ b/plugins/jetpack/languages/jetpack-cs_CZ.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-cy.mo b/plugins/jetpack/languages/jetpack-cy.mo
index 4192bfbb..a995dd90 100644
--- a/plugins/jetpack/languages/jetpack-cy.mo
+++ b/plugins/jetpack/languages/jetpack-cy.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-da_DK.mo b/plugins/jetpack/languages/jetpack-da_DK.mo
index 43547179..27870812 100644
--- a/plugins/jetpack/languages/jetpack-da_DK.mo
+++ b/plugins/jetpack/languages/jetpack-da_DK.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-de_DE.mo b/plugins/jetpack/languages/jetpack-de_DE.mo
deleted file mode 100644
index f71f5eb6..00000000
--- a/plugins/jetpack/languages/jetpack-de_DE.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-el.mo b/plugins/jetpack/languages/jetpack-el.mo
index a27fe704..22e8091f 100644
--- a/plugins/jetpack/languages/jetpack-el.mo
+++ b/plugins/jetpack/languages/jetpack-el.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-es_CL.mo b/plugins/jetpack/languages/jetpack-es_CL.mo
new file mode 100644
index 00000000..bb2e6055
--- /dev/null
+++ b/plugins/jetpack/languages/jetpack-es_CL.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-es_ES.mo b/plugins/jetpack/languages/jetpack-es_ES.mo
deleted file mode 100644
index 0f4d23cb..00000000
--- a/plugins/jetpack/languages/jetpack-es_ES.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-fa_IR.mo b/plugins/jetpack/languages/jetpack-fa_IR.mo
index 1cbf5856..51b244fa 100644
--- a/plugins/jetpack/languages/jetpack-fa_IR.mo
+++ b/plugins/jetpack/languages/jetpack-fa_IR.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-fi.mo b/plugins/jetpack/languages/jetpack-fi.mo
index 49bb7dcf..ec2e9ed7 100644
--- a/plugins/jetpack/languages/jetpack-fi.mo
+++ b/plugins/jetpack/languages/jetpack-fi.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-fr_FR.mo b/plugins/jetpack/languages/jetpack-fr_FR.mo
deleted file mode 100644
index bf49071b..00000000
--- a/plugins/jetpack/languages/jetpack-fr_FR.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-gd.mo b/plugins/jetpack/languages/jetpack-gd.mo
new file mode 100644
index 00000000..28adbf4a
--- /dev/null
+++ b/plugins/jetpack/languages/jetpack-gd.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-gl_ES.mo b/plugins/jetpack/languages/jetpack-gl_ES.mo
index c9c9d69f..5dddeddf 100644
--- a/plugins/jetpack/languages/jetpack-gl_ES.mo
+++ b/plugins/jetpack/languages/jetpack-gl_ES.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-he_IL.mo b/plugins/jetpack/languages/jetpack-he_IL.mo
deleted file mode 100644
index 33cc23da..00000000
--- a/plugins/jetpack/languages/jetpack-he_IL.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-hr.mo b/plugins/jetpack/languages/jetpack-hr.mo
index b3e79038..ff6c9a57 100644
--- a/plugins/jetpack/languages/jetpack-hr.mo
+++ b/plugins/jetpack/languages/jetpack-hr.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-hu_HU.mo b/plugins/jetpack/languages/jetpack-hu_HU.mo
index b8f5cfb5..b5f4f183 100644
--- a/plugins/jetpack/languages/jetpack-hu_HU.mo
+++ b/plugins/jetpack/languages/jetpack-hu_HU.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-id_ID.mo b/plugins/jetpack/languages/jetpack-id_ID.mo
deleted file mode 100644
index 0668b267..00000000
--- a/plugins/jetpack/languages/jetpack-id_ID.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-is_IS.mo b/plugins/jetpack/languages/jetpack-is_IS.mo
new file mode 100644
index 00000000..add470e2
--- /dev/null
+++ b/plugins/jetpack/languages/jetpack-is_IS.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-it_IT.mo b/plugins/jetpack/languages/jetpack-it_IT.mo
deleted file mode 100644
index 6dc82dcf..00000000
--- a/plugins/jetpack/languages/jetpack-it_IT.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ja.mo b/plugins/jetpack/languages/jetpack-ja.mo
deleted file mode 100644
index cf2410d9..00000000
--- a/plugins/jetpack/languages/jetpack-ja.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ka_GE.mo b/plugins/jetpack/languages/jetpack-ka_GE.mo
index e7675fe8..116b1b12 100644
--- a/plugins/jetpack/languages/jetpack-ka_GE.mo
+++ b/plugins/jetpack/languages/jetpack-ka_GE.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ko_KR.mo b/plugins/jetpack/languages/jetpack-ko_KR.mo
deleted file mode 100644
index 9b378395..00000000
--- a/plugins/jetpack/languages/jetpack-ko_KR.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-lt_LT.mo b/plugins/jetpack/languages/jetpack-lt_LT.mo
index 645f6eac..5a9f2103 100644
--- a/plugins/jetpack/languages/jetpack-lt_LT.mo
+++ b/plugins/jetpack/languages/jetpack-lt_LT.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-lv.mo b/plugins/jetpack/languages/jetpack-lv.mo
new file mode 100644
index 00000000..bec869da
--- /dev/null
+++ b/plugins/jetpack/languages/jetpack-lv.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-mk_MK.mo b/plugins/jetpack/languages/jetpack-mk_MK.mo
index 53bcdee0..8c31f251 100644
--- a/plugins/jetpack/languages/jetpack-mk_MK.mo
+++ b/plugins/jetpack/languages/jetpack-mk_MK.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ms_MY.mo b/plugins/jetpack/languages/jetpack-ms_MY.mo
index 0f313a46..a7b1f5c6 100644
--- a/plugins/jetpack/languages/jetpack-ms_MY.mo
+++ b/plugins/jetpack/languages/jetpack-ms_MY.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-my_MM.mo b/plugins/jetpack/languages/jetpack-my_MM.mo
index b5b215c0..2e6674f2 100644
--- a/plugins/jetpack/languages/jetpack-my_MM.mo
+++ b/plugins/jetpack/languages/jetpack-my_MM.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-nb_NO.mo b/plugins/jetpack/languages/jetpack-nb_NO.mo
index abb0992c..11e078ee 100644
--- a/plugins/jetpack/languages/jetpack-nb_NO.mo
+++ b/plugins/jetpack/languages/jetpack-nb_NO.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-nl_NL.mo b/plugins/jetpack/languages/jetpack-nl_NL.mo
deleted file mode 100644
index 5f6eba0b..00000000
--- a/plugins/jetpack/languages/jetpack-nl_NL.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-nn_NO.mo b/plugins/jetpack/languages/jetpack-nn_NO.mo
index 8459772e..20b7cba1 100644
--- a/plugins/jetpack/languages/jetpack-nn_NO.mo
+++ b/plugins/jetpack/languages/jetpack-nn_NO.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-pl_PL.mo b/plugins/jetpack/languages/jetpack-pl_PL.mo
index 8fe18975..7046fe73 100644
--- a/plugins/jetpack/languages/jetpack-pl_PL.mo
+++ b/plugins/jetpack/languages/jetpack-pl_PL.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-pt_BR.mo b/plugins/jetpack/languages/jetpack-pt_BR.mo
deleted file mode 100644
index 54f68f00..00000000
--- a/plugins/jetpack/languages/jetpack-pt_BR.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-pt_PT.mo b/plugins/jetpack/languages/jetpack-pt_PT.mo
index 9510df6d..19ee0101 100644
--- a/plugins/jetpack/languages/jetpack-pt_PT.mo
+++ b/plugins/jetpack/languages/jetpack-pt_PT.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ro_RO.mo b/plugins/jetpack/languages/jetpack-ro_RO.mo
deleted file mode 100644
index f28e904c..00000000
--- a/plugins/jetpack/languages/jetpack-ro_RO.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ru_RU.mo b/plugins/jetpack/languages/jetpack-ru_RU.mo
deleted file mode 100644
index 63481092..00000000
--- a/plugins/jetpack/languages/jetpack-ru_RU.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-sa_IN.mo b/plugins/jetpack/languages/jetpack-sa_IN.mo
index 28a0b97a..f8283df4 100644
--- a/plugins/jetpack/languages/jetpack-sa_IN.mo
+++ b/plugins/jetpack/languages/jetpack-sa_IN.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-si_LK.mo b/plugins/jetpack/languages/jetpack-si_LK.mo
index f4062fc0..5617ad46 100644
--- a/plugins/jetpack/languages/jetpack-si_LK.mo
+++ b/plugins/jetpack/languages/jetpack-si_LK.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-sk_SK.mo b/plugins/jetpack/languages/jetpack-sk_SK.mo
index 11b324f4..03502827 100644
--- a/plugins/jetpack/languages/jetpack-sk_SK.mo
+++ b/plugins/jetpack/languages/jetpack-sk_SK.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-sl_SI.mo b/plugins/jetpack/languages/jetpack-sl_SI.mo
index e40690a5..46e1d159 100644
--- a/plugins/jetpack/languages/jetpack-sl_SI.mo
+++ b/plugins/jetpack/languages/jetpack-sl_SI.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-sq.mo b/plugins/jetpack/languages/jetpack-sq.mo
deleted file mode 100644
index 69a50c93..00000000
--- a/plugins/jetpack/languages/jetpack-sq.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-sr_RS.mo b/plugins/jetpack/languages/jetpack-sr_RS.mo
index 6aa87402..40c4d54c 100644
--- a/plugins/jetpack/languages/jetpack-sr_RS.mo
+++ b/plugins/jetpack/languages/jetpack-sr_RS.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-sv_SE.mo b/plugins/jetpack/languages/jetpack-sv_SE.mo
deleted file mode 100644
index 64f86bd4..00000000
--- a/plugins/jetpack/languages/jetpack-sv_SE.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-te.mo b/plugins/jetpack/languages/jetpack-te.mo
index 493fa400..089b5da3 100644
--- a/plugins/jetpack/languages/jetpack-te.mo
+++ b/plugins/jetpack/languages/jetpack-te.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-th.mo b/plugins/jetpack/languages/jetpack-th.mo
index 6bb4a66c..dae82a74 100644
--- a/plugins/jetpack/languages/jetpack-th.mo
+++ b/plugins/jetpack/languages/jetpack-th.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-tr_TR.mo b/plugins/jetpack/languages/jetpack-tr_TR.mo
deleted file mode 100644
index e2e58893..00000000
--- a/plugins/jetpack/languages/jetpack-tr_TR.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-uk.mo b/plugins/jetpack/languages/jetpack-uk.mo
index 3d7d19f0..11e161aa 100644
--- a/plugins/jetpack/languages/jetpack-uk.mo
+++ b/plugins/jetpack/languages/jetpack-uk.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-ur.mo b/plugins/jetpack/languages/jetpack-ur.mo
index b4af7dc4..65dab600 100644
--- a/plugins/jetpack/languages/jetpack-ur.mo
+++ b/plugins/jetpack/languages/jetpack-ur.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-vi.mo b/plugins/jetpack/languages/jetpack-vi.mo
index c01ff940..d179008e 100644
--- a/plugins/jetpack/languages/jetpack-vi.mo
+++ b/plugins/jetpack/languages/jetpack-vi.mo
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-zh_CN.mo b/plugins/jetpack/languages/jetpack-zh_CN.mo
deleted file mode 100644
index de8cd75a..00000000
--- a/plugins/jetpack/languages/jetpack-zh_CN.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/jetpack-zh_TW.mo b/plugins/jetpack/languages/jetpack-zh_TW.mo
deleted file mode 100644
index 98e084bc..00000000
--- a/plugins/jetpack/languages/jetpack-zh_TW.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/languages/readme.txt b/plugins/jetpack/languages/readme.txt
index e0638f64..54e30e10 100644
--- a/plugins/jetpack/languages/readme.txt
+++ b/plugins/jetpack/languages/readme.txt
@@ -2,18 +2,14 @@
== Who translates Jetpack? How can I get involved? ==
-Anyone can help by suggesting new translations [here](http://translate.wordpress.com/projects/jetpack/). No need to use a Translation Editor, you can do it all from [GlotPress](http://translate.wordpress.com/projects/jetpack/)!
+Anyone can help by suggesting new translations [here](https://translate.wordpress.org/projects/wp-plugins/jetpack/).
-Once you've suggested a new translation, a GlotPress validator will review it. They will then approve, reject, or change your suggestions. Once your changes get approved, they are automatically included in the next Jetpack release.
+Once you've suggested a new translation, a GlotPress validator will review it. They will then approve, reject, or change your suggestions. Once your changes get approved, they are automatically shipped to all Jetpack users using WordPress in your language.
== How does GlotPress work? ==
You can find detailed GlotPress documentation on [this page](https://en.support.wordpress.com/glotpress/).
-== Who decides which languages are available? I want my language added ==
-
-If you can't find your language in GlotPress, [send us an email](http://jetpack.me/contact-support/) and we'll add it for you.
-
== I want to change translations locally. Where can I download the .PO file for my language? ==
You'll find options to create a .PO file and export translations at the bottom of each language page in GlotPress.
diff --git a/plugins/jetpack/locales.php b/plugins/jetpack/locales.php
index 17ad1b47..c0f4192b 100644
--- a/plugins/jetpack/locales.php
+++ b/plugins/jetpack/locales.php
@@ -1,22 +1,22 @@
<?php
class GP_Locale {
- var $english_name;
- var $native_name;
- var $text_direction = 'ltr';
- var $lang_code_iso_639_1 = null;
- var $lang_code_iso_639_2 = null;
- var $lang_code_iso_639_3 = null;
- var $country_code;
- var $wp_locale;
- var $slug;
- var $nplurals = 2;
- var $plural_expression = 'n != 1';
- var $google_code = null;
- var $preferred_sans_serif_font_family = null;
- var $facebook_locale = null;
+ public $english_name;
+ public $native_name;
+ public $text_direction = 'ltr';
+ public $lang_code_iso_639_1 = null;
+ public $lang_code_iso_639_2 = null;
+ public $lang_code_iso_639_3 = null;
+ public $country_code;
+ public $wp_locale;
+ public $slug;
+ public $nplurals = 2;
+ public $plural_expression = 'n != 1';
+ public $google_code = null;
+ public $preferred_sans_serif_font_family = null;
+ public $facebook_locale = null;
// TODO: days, months, decimals, quotes
- public function GP_Locale( $args = array() ) {
+ public function __construct( $args = array() ) {
foreach( $args as $key => $value ) {
$this->$key = $value;
}
@@ -26,6 +26,30 @@ class GP_Locale {
return new GP_Locale( $state );
}
+ /**
+ * Make deprecated properties checkable for backwards compatibility.
+ *
+ * @param string $name Property to check if set.
+ * @return bool Whether the property is set.
+ */
+ public function __isset( $name ) {
+ if ( 'rtl' == $name ) {
+ return isset( $this->text_direction );
+ }
+ }
+
+ /**
+ * Make deprecated properties readable for backwards compatibility.
+ *
+ * @param string $name Property to get.
+ * @return mixed Property.
+ */
+ public function __get( $name ) {
+ if ( 'rtl' == $name ) {
+ return ( 'rtl' === $this->text_direction );
+ }
+ }
+
public function combined_name() {
/* translators: combined name for locales: 1: name in English, 2: native name */
return sprintf( _x( '%1$s/%2$s', 'locales', 'jetpack' ), $this->english_name, $this->native_name );
@@ -33,30 +57,39 @@ class GP_Locale {
public function numbers_for_index( $index, $how_many = 3, $test_up_to = 1000 ) {
$numbers = array();
+
for( $number = 0; $number < $test_up_to; ++$number ) {
if ( $this->index_for_number( $number ) == $index ) {
$numbers[] = $number;
- if ( count( $numbers ) >= $how_many ) break;
+
+ if ( count( $numbers ) >= $how_many ) {
+ break;
+ }
}
}
+
return $numbers;
}
public function index_for_number( $number ) {
- if ( !isset( $this->_index_for_number ) ) {
- $expression = Gettext_Translations::parenthesize_plural_exression( $this->plural_expression );
- $this->_index_for_number = Gettext_Translations::make_plural_form_function( $this->nplurals, $expression );
+ if ( ! isset( $this->_index_for_number ) ) {
+ $gettext = new Gettext_Translations;
+ $expression = $gettext->parenthesize_plural_exression( $this->plural_expression );
+ $this->_index_for_number = $gettext->make_plural_form_function( $this->nplurals, $expression );
}
+
$f = $this->_index_for_number;
+
return $f( $number );
}
+
}
class GP_Locales {
- var $locales = array();
+ public $locales = array();
- public function GP_Locales() {
+ public function __construct() {
$aa = new GP_Locale();
$aa->english_name = 'Afar';
$aa->native_name = 'Afaraf';
@@ -98,7 +131,6 @@ class GP_Locales {
$am->country_code = 'et';
$am->wp_locale = 'am';
$am->slug = 'am';
- $am->google_code = 'am';
$an = new GP_Locale();
$an->english_name = 'Aragonese';
@@ -119,19 +151,42 @@ class GP_Locales {
$ar->facebook_locale = 'ar_AR';
$ar->nplurals = 6;
$ar->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5';
- $ar->rtl = true;
+ $ar->text_direction = 'rtl';
$ar->preferred_sans_serif_font_family = 'Tahoma';
+ $arq = new GP_Locale();
+ $arq->english_name = 'Algerian Arabic';
+ $arq->native_name = 'الدارجة الجزايرية';
+ $arq->lang_code_iso_639_1 = 'ar_DZ';
+ $arq->lang_code_iso_639_3 = 'arq';
+ $arq->country_code = 'dz';
+ $arq->wp_locale = 'arq';
+ $arq->slug = 'arq';
+ $arq->nplurals = 6;
+ $arq->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5';
+ $arq->text_direction = 'rtl';
+
+ $ary = new GP_Locale();
+ $ary->english_name = 'Moroccan Arabic';
+ $ary->native_name = 'العربية المغربية';
+ $ary->lang_code_iso_639_1 = 'ar_MA';
+ $ary->lang_code_iso_639_3 = 'ary';
+ $ary->country_code = 'ma';
+ $ary->wp_locale = 'ary';
+ $ary->slug = 'ary';
+ $ary->nplurals = 6;
+ $ary->plural_expression = 'n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5';
+ $ary->text_direction = 'rtl';
+
$as = new GP_Locale();
$as->english_name = 'Assamese';
$as->native_name = 'অসমীয়া';
- $as->lang_code_iso_639_1 = 'asm';
- $as->lang_code_iso_639_2 = 'as';
+ $as->lang_code_iso_639_1 = 'as';
+ $as->lang_code_iso_639_2 = 'asm';
+ $as->lang_code_iso_639_3 = 'asm';
$as->country_code = 'in';
$as->wp_locale = 'as';
$as->slug = 'as';
- $as->nplurals = 2;
- $as->plural_expression = '(n != 1)';
$ast = new GP_Locale();
$ast->english_name = 'Asturian';
@@ -170,12 +225,11 @@ class GP_Locales {
$azb = new GP_Locale();
$azb->english_name = 'South Azerbaijani';
$azb->native_name = 'گؤنئی آذربایجان';
- $azb->lang_code_iso_639_1 = 'az';
- $azb->lang_code_iso_639_2 = 'azb';
+ $azb->lang_code_iso_639_3 = 'azb';
$azb->country_code = 'az';
$azb->wp_locale = 'azb';
$azb->slug = 'azb';
- $azb->rtl = true;
+ $azb->text_direction = 'rtl';
$az_tr = new GP_Locale();
$az_tr->english_name = 'Azerbaijani (Turkey)';
@@ -185,7 +239,7 @@ class GP_Locales {
$az_tr->country_code = 'tr';
$az_tr->wp_locale = 'az_TR';
$az_tr->slug = 'az-tr';
- $az_tr->rtl = true;
+ $az_tr->text_direction = true;
$ba = new GP_Locale();
$ba->english_name = 'Bashkir';
@@ -203,6 +257,17 @@ class GP_Locales {
$bal->wp_locale = 'bal';
$bal->slug = 'bal';
+ $bcc = new GP_Locale();
+ $bcc->english_name = 'Balochi Southern';
+ $bcc->native_name = 'بلوچی مکرانی';
+ $bcc->lang_code_iso_639_3 = 'bcc';
+ $bcc->country_code = 'pk';
+ $bcc->wp_locale = 'bcc';
+ $bcc->slug = 'bcc';
+ $bcc->nplurals = 1;
+ $bcc->plural_expression = 0;
+ $bcc->text_direction = 'rtl';
+
$be = new GP_Locale();
$be->english_name = 'Belarusian';
$be->native_name = 'Беларуская мова';
@@ -210,7 +275,7 @@ class GP_Locales {
$be->lang_code_iso_639_2 = 'bel';
$be->country_code = 'by';
$be->wp_locale = 'bel';
- $be->slug = 'bel';
+ $be->slug = 'be';
$be->google_code = 'be';
$be->facebook_locale = 'be_BY';
$be->nplurals = 3;
@@ -266,7 +331,6 @@ class GP_Locales {
$bo->lang_code_iso_639_2 = 'tib';
$bo->wp_locale = 'bo';
$bo->slug = 'bo';
- $bo->google_code = 'bo';
$bo->nplurals = 1;
$bo->plural_expression = '0';
@@ -275,7 +339,9 @@ class GP_Locales {
$br->native_name = 'Brezhoneg';
$br->lang_code_iso_639_1 = 'br';
$br->lang_code_iso_639_2 = 'bre';
+ $br->lang_code_iso_639_3 = 'bre';
$br->country_code = 'fr';
+ $br->wp_locale = 'bre';
$br->slug = 'br';
$br->nplurals = 2;
$br->plural_expression = '(n > 1)';
@@ -325,6 +391,7 @@ class GP_Locales {
$ckb->country_code = 'ku';
$ckb->wp_locale = 'ckb';
$ckb->slug = 'ckb';
+ $ckb->text_direction = 'rtl';
$co = new GP_Locale();
$co->english_name = 'Corsican';
@@ -415,7 +482,7 @@ class GP_Locales {
$de_ch = new GP_Locale();
$de_ch->english_name = 'German (Switzerland)';
- $de_ch->native_name = 'Schweizer Hochdeutsch';
+ $de_ch->native_name = 'Deutsch (Schweiz)';
$de_ch->lang_code_iso_639_1 = 'de';
$de_ch->country_code = 'ch';
$de_ch->wp_locale = 'de_CH';
@@ -430,18 +497,18 @@ class GP_Locales {
$dv->country_code = 'mv';
$dv->wp_locale = 'dv';
$dv->slug = 'dv';
- $dv->google_code = 'dv';
- $dv->rtl = true;
-
- $dz = new GP_Locale();
- $dz->english_name = 'Dzongkha';
- $dz->native_name = 'རྫོང་ཁ';
- $dz->lang_code_iso_639_1 = 'dz';
- $dz->lang_code_iso_639_2 = 'dzo';
- $dz->country_code = 'bt';
- $dz->slug = 'dz';
- $dz->nplurals = 1;
- $dz->plural_expression = '0';
+ $dv->text_direction = 'rtl';
+
+ $dzo = new GP_Locale();
+ $dzo->english_name = 'Dzongkha';
+ $dzo->native_name = 'རྫོང་ཁ';
+ $dzo->lang_code_iso_639_1 = 'dz';
+ $dzo->lang_code_iso_639_2 = 'dzo';
+ $dzo->country_code = 'bt';
+ $dzo->wp_locale = 'dzo';
+ $dzo->slug = 'dzo';
+ $dzo->nplurals = 1;
+ $dzo->plural_expression = '0';
$ee = new GP_Locale();
$ee->english_name = 'Ewe';
@@ -487,6 +554,7 @@ class GP_Locales {
$en_au->wp_locale = 'en_AU';
$en_au->slug = 'en-au';
$en_au->google_code = 'en';
+ $en_au->facebook_locale = 'en_AU';
$en_ca = new GP_Locale();
$en_ca->english_name = 'English (Canada)';
@@ -498,6 +566,7 @@ class GP_Locales {
$en_ca->wp_locale = 'en_CA';
$en_ca->slug = 'en-ca';
$en_ca->google_code = 'en';
+ $en_ca->facebook_locale = 'en_CA';
$en_gb = new GP_Locale();
$en_gb->english_name = 'English (UK)';
@@ -511,6 +580,28 @@ class GP_Locales {
$en_gb->google_code = 'en';
$en_gb->facebook_locale = 'en_GB';
+ $en_nz = new GP_Locale();
+ $en_nz->english_name = 'English (New Zealand)';
+ $en_nz->native_name = 'English (New Zealand)';
+ $en_nz->lang_code_iso_639_1 = 'en';
+ $en_nz->lang_code_iso_639_2 = 'eng';
+ $en_nz->lang_code_iso_639_3 = 'eng';
+ $en_nz->country_code = 'nz';
+ $en_nz->wp_locale = 'en_NZ';
+ $en_nz->slug = 'en-nz';
+ $en_nz->google_code = 'en';
+
+ $en_za = new GP_Locale();
+ $en_za->english_name = 'English (South Africa)';
+ $en_za->native_name = 'English (South Africa)';
+ $en_za->lang_code_iso_639_1 = 'en';
+ $en_za->lang_code_iso_639_2 = 'eng';
+ $en_za->lang_code_iso_639_3 = 'eng';
+ $en_za->country_code = 'za';
+ $en_za->wp_locale = 'en_ZA';
+ $en_za->slug = 'en-za';
+ $en_za->google_code = 'en';
+
$eo = new GP_Locale();
$eo->english_name = 'Esperanto';
$eo->native_name = 'Esperanto';
@@ -641,7 +732,7 @@ class GP_Locales {
$fa->facebook_locale = 'fa_IR';
$fa->nplurals = 1;
$fa->plural_expression = '0';
- $fa->rtl = true;
+ $fa->text_direction = 'rtl';
$fa_af = new GP_Locale();
$fa_af->english_name = 'Persian (Afghanistan)';
@@ -653,7 +744,7 @@ class GP_Locales {
$fa_af->google_code = 'fa';
$fa_af->nplurals = 1;
$fa_af->plural_expression = '0';
- $fa_af->rtl = true;
+ $fa_af->text_direction = 'rtl';
$ff_sn = new GP_Locale();
$ff_sn->english_name = 'Fulah';
@@ -733,6 +824,25 @@ class GP_Locales {
$fr_ch->country_code = 'ch';
$fr_ch->slug = 'fr-ch';
+ $frp = new GP_Locale();
+ $frp->english_name = 'Arpitan';
+ $frp->native_name = 'Arpitan';
+ $frp->lang_code_iso_639_3 = 'frp';
+ $frp->country_code = 'fr';
+ $frp->wp_locale = 'frp';
+ $frp->slug = 'frp';
+ $frp->nplurals = 2;
+ $frp->plural_expression = 'n > 1';
+
+ $fur = new GP_Locale();
+ $fur->english_name = 'Friulian';
+ $fur->native_name = 'Friulian';
+ $fur->lang_code_iso_639_2 = 'fur';
+ $fur->lang_code_iso_639_3 = 'fur';
+ $fur->country_code = 'it';
+ $fur->wp_locale = 'fur';
+ $fur->slug = 'fur';
+
$fy = new GP_Locale();
$fy->english_name = 'Frisian';
$fy->native_name = 'Frysk';
@@ -779,6 +889,7 @@ class GP_Locales {
$gl->slug = 'gl';
$gl->google_code = 'gl';
$gl->facebook_locale = 'gl_ES';
+ $gl->google_code = 'gl';
$gn = new GP_Locale();
$gn->english_name = 'Guaraní';
@@ -787,7 +898,6 @@ class GP_Locales {
$gn->lang_code_iso_639_2 = 'grn';
$gn->wp_locale = 'gn';
$gn->slug = 'gn';
- $gn->google_code = 'gn';
$gsw = new GP_Locale();
$gsw->english_name = 'Swiss German';
@@ -810,10 +920,11 @@ class GP_Locales {
$ha = new GP_Locale();
$ha->english_name = 'Hausa';
$ha->native_name = 'هَوُسَ';
- $ha->lang_code_iso_639_1 = 'he';
+ $ha->lang_code_iso_639_1 = 'ha';
$ha->lang_code_iso_639_2 = 'hau';
$ha->slug = 'ha';
- $ha->rtl = true;
+ $ha->text_direction = 'rtl';
+ $ha->google_code = 'ha';
$haw = new GP_Locale();
$haw->english_name = 'Hawaiian';
@@ -826,11 +937,11 @@ class GP_Locales {
$haz = new GP_Locale();
$haz->english_name = 'Hazaragi';
$haz->native_name = 'هزاره گی';
- $haz->lang_code_iso_639_2 = 'haz';
+ $haz->lang_code_iso_639_3 = 'haz';
$haz->country_code = 'af';
$haz->wp_locale = 'haz';
$haz->slug = 'haz';
- $haz->rtl = true;
+ $haz->text_direction = 'rtl';
$he = new GP_Locale();
$he->english_name = 'Hebrew';
@@ -841,7 +952,7 @@ class GP_Locales {
$he->slug = 'he';
$he->google_code = 'iw';
$he->facebook_locale = 'he_IL';
- $he->rtl = true;
+ $he->text_direction = 'rtl';
$hi = new GP_Locale();
$hi->english_name = 'Hindi';
@@ -913,7 +1024,7 @@ class GP_Locales {
$ido = new GP_Locale();
$ido->english_name = 'Ido';
$ido->native_name = 'Ido';
- $ido->lang_code_iso_639_1 = 'id';
+ $ido->lang_code_iso_639_1 = 'io';
$ido->lang_code_iso_639_2 = 'ido';
$ido->lang_code_iso_639_3 = 'ido';
$ido->wp_locale = 'ido';
@@ -993,6 +1104,17 @@ class GP_Locales {
$ka->nplurals = 1;
$ka->plural_expression = '0';
+ $kab = new GP_Locale();
+ $kab->english_name = 'Kabyle';
+ $kab->native_name = 'Taqbaylit';
+ $kab->lang_code_iso_639_2 = 'kab';
+ $kab->lang_code_iso_639_3 = 'kab';
+ $kab->country_code = 'dz';
+ $kab->wp_locale = 'kab';
+ $kab->slug = 'kab';
+ $kab->nplurals = 2;
+ $kab->plural_expression = '(n > 1)';
+
$kin = new GP_Locale();
$kin->english_name = 'Kinyarwanda';
$kin->native_name = 'Ikinyarwanda';
@@ -1063,7 +1185,6 @@ class GP_Locales {
$ku->lang_code_iso_639_2 = 'kur';
$ku->country_code = 'ku';
$ku->slug = 'ku';
- $ku->google_code = 'ku';
$ku->facebook_locale = 'ku_TR';
$ky = new GP_Locale();
@@ -1084,6 +1205,7 @@ class GP_Locales {
$la->lang_code_iso_639_2 = 'lat';
$la->slug = 'la';
$la->facebook_locale = 'la_VA';
+ $la->google_code = 'la';
$lb = new GP_Locale();
$lb->english_name = 'Luxembourgish';
@@ -1102,7 +1224,6 @@ class GP_Locales {
$li->country_code = 'nl';
$li->wp_locale = 'li';
$li->slug = 'li';
- $li->google_code = 'li';
$lin = new GP_Locale();
$lin->english_name = 'Lingala';
@@ -1157,7 +1278,6 @@ class GP_Locales {
$me->lang_code_iso_639_1 = 'me';
$me->country_code = 'me';
$me->wp_locale = 'me_ME';
- $me->google_code = 'srp';
$me->slug = 'me';
$me->nplurals = 3;
$me->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)';
@@ -1170,6 +1290,7 @@ class GP_Locales {
$mg->country_code = 'mg';
$mg->wp_locale = 'mg_MG';
$mg->slug = 'mg';
+ $mg->google_code = 'mg';
$mhr = new GP_Locale();
$mhr->english_name = 'Mari (Meadow)';
@@ -1177,7 +1298,6 @@ class GP_Locales {
$mhr->lang_code_iso_639_3 = 'mhr';
$mhr->country_code = 'ru';
$mhr->slug = 'mhr';
- $mhr->google_code = 'chm';
$mk = new GP_Locale();
$mk->english_name = 'Macedonian';
@@ -1228,8 +1348,10 @@ class GP_Locales {
$mri->lang_code_iso_639_3 = 'mri';
$mri->country_code = 'nz';
$mri->slug = 'mri';
+ $mri->wp_locale = 'mri';
$mri->nplurals = 2;
$mri->plural_expression = '(n > 1)';
+ $mri->google_code = 'mi';
$mrj = new GP_Locale();
$mrj->english_name = 'Mari (Hill)';
@@ -1237,7 +1359,6 @@ class GP_Locales {
$mrj->lang_code_iso_639_3 = 'mrj';
$mrj->country_code = 'ru';
$mrj->slug = 'mrj';
- $mrj->google_code = 'chm';
$ms = new GP_Locale();
$ms->english_name = 'Malay';
@@ -1258,7 +1379,7 @@ class GP_Locales {
$mwl->slug = 'mwl';
$my = new GP_Locale();
- $my->english_name = 'Burmese';
+ $my->english_name = 'Myanmar (Burmese)';
$my->native_name = 'ဗမာစာ';
$my->lang_code_iso_639_1 = 'my';
$my->lang_code_iso_639_2 = 'mya';
@@ -1276,6 +1397,7 @@ class GP_Locales {
$ne->wp_locale = 'ne_NP';
$ne->slug = 'ne';
$ne->facebook_locale = 'ne_NP';
+ $ne->google_code = 'ne';
$nb = new GP_Locale();
$nb->english_name = 'Norwegian (Bokmål)';
@@ -1318,6 +1440,7 @@ class GP_Locales {
$nn->wp_locale = 'nn_NO';
$nn->slug = 'nn';
$nn->facebook_locale = 'nn_NO';
+ $nn->google_code = 'no';
$no = new GP_Locale();
$no->english_name = 'Norwegian';
@@ -1328,12 +1451,25 @@ class GP_Locales {
$no->slug = 'no';
$no->google_code = 'no';
- $oc = new GP_Locale();
- $oc->english_name = 'Occitan';
- $oc->native_name = 'Occitan';
- $oc->lang_code_iso_639_1 = 'oc';
- $oc->lang_code_iso_639_2 = 'oci';
- $oc->slug = 'oc';
+ $oci = new GP_Locale();
+ $oci->english_name = 'Occitan';
+ $oci->native_name = 'Occitan';
+ $oci->lang_code_iso_639_1 = 'oc';
+ $oci->lang_code_iso_639_2 = 'oci';
+ $oci->country_code = 'fr';
+ $oci->wp_locale = 'oci';
+ $oci->slug = 'oc';
+ $oci->nplurals = 2;
+ $oci->plural_expression = '(n > 1)';
+
+ $orm = new GP_Locale();
+ $orm->english_name = 'Oromo';
+ $orm->native_name = 'Afaan Oromo';
+ $orm->lang_code_iso_639_1 = 'om';
+ $orm->lang_code_iso_639_2 = 'orm';
+ $orm->lang_code_iso_639_3 = 'orm';
+ $orm->slug = 'orm';
+ $orm->plural_expression = '(n > 1)';
$ory = new GP_Locale();
$ory->english_name = 'Oriya';
@@ -1362,6 +1498,7 @@ class GP_Locales {
$pa->wp_locale = 'pa_IN';
$pa->slug = 'pa';
$pa->facebook_locale = 'pa_IN';
+ $pa->google_code = 'pa';
$pl = new GP_Locale();
$pl->english_name = 'Polish';
@@ -1376,7 +1513,6 @@ class GP_Locales {
$pl->nplurals = 3;
$pl->plural_expression = '(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)';
-
$pt_br = new GP_Locale();
$pt_br->english_name = 'Portuguese (Brazil)';
$pt_br->native_name = 'Português do Brasil';
@@ -1385,7 +1521,7 @@ class GP_Locales {
$pt_br->country_code = 'br';
$pt_br->wp_locale = 'pt_BR';
$pt_br->slug = 'pt-br';
- $pt_br->google_code = 'pt-PT';
+ $pt_br->google_code = 'pt-BR';
$pt_br->facebook_locale = 'pt_BR';
$pt_br->nplurals = 2;
$pt_br->plural_expression = '(n > 1)';
@@ -1404,16 +1540,17 @@ class GP_Locales {
$ps->english_name = 'Pashto';
$ps->native_name = 'پښتو';
$ps->lang_code_iso_639_1 = 'ps';
+ $ps->lang_code_iso_639_2 = 'pus';
+ $ps->country_code = 'af';
$ps->wp_locale = 'ps';
$ps->slug = 'ps';
- $ps->google_code = 'ps';
$ps->facebook_locale = 'ps_AF';
- $ps->rtl = true;
+ $ps->text_direction = 'rtl';
$rhg = new GP_Locale();
$rhg->english_name = 'Rohingya';
$rhg->native_name = 'Ruáinga';
- $rhg->lang_code_iso_639_2 = 'rhg';
+ $rhg->lang_code_iso_639_3 = 'rhg';
$rhg->country_code = 'mm';
$rhg->wp_locale = 'rhg';
$rhg->slug = 'rhg';
@@ -1433,6 +1570,15 @@ class GP_Locales {
$ro->nplurals = 3;
$ro->plural_expression = '(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2)';
+ $roh = new GP_Locale();
+ $roh->english_name = 'Romansh Vallader';
+ $roh->native_name = 'Rumantsch Vallader';
+ $roh->lang_code_iso_639_2 = 'rm';
+ $roh->lang_code_iso_639_3 = 'roh';
+ $roh->country_code = 'ch';
+ $roh->wp_locale = 'roh';
+ $roh->slug = 'roh';
+
$ru = new GP_Locale();
$ru->english_name = 'Russian';
$ru->native_name = 'Русский';
@@ -1488,6 +1634,7 @@ class GP_Locales {
$sa_in = new GP_Locale();
$sa_in->english_name = 'Sanskrit';
$sa_in->native_name = 'भारतम्';
+ $sa_in->lang_code_iso_639_1 = 'sa';
$sa_in->lang_code_iso_639_2 = 'san';
$sa_in->lang_code_iso_639_3 = 'san';
$sa_in->country_code = 'in';
@@ -1502,7 +1649,6 @@ class GP_Locales {
$sd->country_code = 'pk';
$sd->wp_locale = 'sd_PK';
$sd->slug = 'sd';
- $sd->google_code = 'sd';
$si = new GP_Locale();
$si->english_name = 'Sinhala';
@@ -1594,6 +1740,7 @@ class GP_Locales {
$su->slug = 'su';
$su->nplurals = 1;
$su->plural_expression = '0';
+ $su->google_code = 'su';
$sv = new GP_Locale();
$sv->english_name = 'Swedish';
@@ -1616,6 +1763,16 @@ class GP_Locales {
$sw->google_code = 'sw';
$sw->facebook_locale = 'sw_KE';
+ $szl = new GP_Locale();
+ $szl->english_name = 'Silesian';
+ $szl->native_name = 'Ślōnskŏ gŏdka';
+ $szl->lang_code_iso_639_3 = 'szl';
+ $szl->country_code = 'pl';
+ $szl->wp_locale = 'szl';
+ $szl->slug = 'szl';
+ $szl->nplurals = 3;
+ $szl->plural_expression = '(n==1 ? 0 : n%10>=2 && n%10<=4 && n%100==20 ? 1 : 2)';
+
$ta = new GP_Locale();
$ta->english_name = 'Tamil';
$ta->native_name = 'தமிழ்';
@@ -1655,8 +1812,6 @@ class GP_Locales {
$tg->wp_locale = 'tg';
$tg->slug = 'tg';
$tg->google_code = 'tg';
- $tg->nplurals = 2;
- $tg->plural_expression = 'n != 1;';
$th = new GP_Locale();
$th->english_name = 'Thai';
@@ -1721,7 +1876,6 @@ class GP_Locales {
$tt_ru->country_code = 'tt';
$tt_ru->wp_locale = 'tt_RU';
$tt_ru->slug = 'tt';
- $tt_ru->google_code = 'tt';
$tt_ru->nplurals = 3;
$tt_ru->plural_expression = '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)';
@@ -1760,7 +1914,7 @@ class GP_Locales {
$ug->country_code = 'cn';
$ug->wp_locale = 'ug_CN';
$ug->slug = 'ug';
- $ug->google_code = 'ug';
+ $ug->text_direction = 'rtl';
$uk = new GP_Locale();
$uk->english_name = 'Ukrainian';
@@ -1783,6 +1937,7 @@ class GP_Locales {
$ur->wp_locale = 'ur';
$ur->slug = 'ur';
$ur->google_code = 'ur';
+ $ur->text_direction = 'rtl';
$uz = new GP_Locale();
$uz->english_name = 'Uzbek';
@@ -1800,7 +1955,8 @@ class GP_Locales {
$vec->english_name = 'Venetian';
$vec->native_name = 'Vèneta';
$vec->lang_code_iso_639_2 = 'roa';
- $vec->country_code = 'uz';
+ $vec->lang_code_iso_639_3 = 'vec';
+ $vec->country_code = 'it';
$vec->slug = 'vec';
$vi = new GP_Locale();
@@ -1840,14 +1996,18 @@ class GP_Locales {
$yi->lang_code_iso_639_2 = 'yid';
$yi->slug = 'yi';
$yi->google_code = 'yi';
- $yi->rtl = true;
-
- $yo = new GP_Locale();
- $yo->english_name = 'Yorùbá';
- $yo->native_name = 'Èdè Yorùbá';
- $yo->lang_code_iso_639_1 = 'yo';
- $yo->lang_code_iso_639_2 = 'yor';
- $yo->slug = 'yo';
+ $yi->text_direction = 'rtl';
+
+ $yor = new GP_Locale();
+ $yor->english_name = 'Yoruba';
+ $yor->native_name = 'Yorùbá';
+ $yor->lang_code_iso_639_1 = 'yo';
+ $yor->lang_code_iso_639_2 = 'yor';
+ $yor->lang_code_iso_639_3 = 'yor';
+ $yor->country_code = 'ng';
+ $yor->wp_locale = 'yor';
+ $yor->slug = 'yor';
+ $yor->google_code = 'yo';
$zh_cn = new GP_Locale();
$zh_cn->english_name = 'Chinese (China)';
diff --git a/plugins/jetpack/modules/after-the-deadline.php b/plugins/jetpack/modules/after-the-deadline.php
index b4e89036..967a9ce6 100644
--- a/plugins/jetpack/modules/after-the-deadline.php
+++ b/plugins/jetpack/modules/after-the-deadline.php
@@ -7,6 +7,7 @@
* Requires Connection: Yes
* Auto Activate: Yes
* Module Tags: Writing
+ * Additional Search Queries: after the deadline, afterthedeadline, spell, spellchecker, spelling, grammar, proofreading, style, language, cliche
*/
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
@@ -17,7 +18,8 @@ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
}
add_filter( 'atd_http_post_timeout', 'AtD_http_post_timeout_action' );
function AtD_http_post_error_action( $code ) {
- bump_stats_extras( 'atd-remote-error', $code );
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'atd-remote-error', $code );
}
add_action( 'atd_http_post_error', 'AtD_http_post_error_action' );
function AtD_service_domain_action() {
@@ -63,7 +65,7 @@ include( dirname( __FILE__ ) . '/after-the-deadline/config-options.php' );
include( dirname( __FILE__ ) . '/after-the-deadline/config-unignore.php' );
include( dirname( __FILE__ ) . '/after-the-deadline/proxy.php' );
-define( 'ATD_VERSION', '20140527' );
+define( 'ATD_VERSION', '20150715' );
/*
* Display the AtD configuration options
@@ -297,6 +299,8 @@ function AtD_should_load_on_page() {
*
* By default, AtD only enqueues JS on certain admin pages to reduce bloat. The filter allows additional pages to have AtD JS.
*
+ * @module after-the-deadline
+ *
* @since 1.2.3
*
* @param bool false Boolean to load or not load AtD scripts in admin.
diff --git a/plugins/jetpack/modules/after-the-deadline/atd-nonvis-editor-plugin.js b/plugins/jetpack/modules/after-the-deadline/atd-nonvis-editor-plugin.js
index 1e33a0c8..9ca642a6 100644
--- a/plugins/jetpack/modules/after-the-deadline/atd-nonvis-editor-plugin.js
+++ b/plugins/jetpack/modules/after-the-deadline/atd-nonvis-editor-plugin.js
@@ -4,9 +4,9 @@
var AtD_qtbutton, autosave;
/* convienence method to restore the text area from the preview div */
-function AtD_restore_text_area()
-{
+function AtD_restore_text_area() {
var content;
+
/* swap the preview div for the textarea, notice how I have to restore the appropriate class/id/style attributes */
if( jQuery('#atd-content').get(0) ) {
AtD.remove('atd-content');
@@ -20,6 +20,22 @@ function AtD_restore_text_area()
content = content.replace(/<BR.*?class.*?atd_remove_me.*?>/gi, '\n');
}
+ // Remove emoji replacement images
+ if ( typeof window.twemoji !== 'undefined' ) {
+ content = content.replace( /<img [^>]+>/g, function( img ) {
+ // The images should have class containing 'emoji'
+ if ( img.indexOf( 'emoji' ) !== -1 ) {
+ var alt = img.match( /alt="([^"]+)"/ );
+
+ if ( alt && alt[1] && window.twemoji.test( alt[1] ) ) {
+ return alt[1];
+ }
+ }
+
+ return img;
+ });
+ }
+
// jQuery('#content').replaceWith( AtD.content_canvas );
jQuery('#content').val( content.replace(/\&lt\;/g, '<').replace(/\&gt\;/g, '>').replace(/\&amp;/g, '&') )
.height(AtD.height)
diff --git a/plugins/jetpack/modules/after-the-deadline/atd.core.js b/plugins/jetpack/modules/after-the-deadline/atd.core.js
index 099dd159..9ebf52e8 100644
--- a/plugins/jetpack/modules/after-the-deadline/atd.core.js
+++ b/plugins/jetpack/modules/after-the-deadline/atd.core.js
@@ -359,13 +359,67 @@ AtDCore.prototype.markMyWords = function(container_nodes, errors) {
ecount = 0, /* track number of highlighted errors */
parent = this,
bogus = this._isTinyMCE ? ' data-mce-bogus="1"' : '',
- emptySpan = '<span class="mceItemHidden"' + bogus + '>&nbsp;</span>';
+ emptySpan = '<span class="mceItemHidden"' + bogus + '>&nbsp;</span>',
+ textOnlyMode;
+
+ /**
+ * Split a text node into an ordered list of siblings:
+ * - text node to the left of the match
+ * - the element replacing the match
+ * - text node to the right of the match
+ *
+ * We have to leave the text to the left and right of the match alone
+ * in order to prevent XSS
+ *
+ * @return array
+ */
+ function splitTextNode( textnode, regexp, replacement ) {
+ var text = textnode.nodeValue,
+ index = text.search( regexp ),
+ match = text.match( regexp ),
+ captured = [],
+ cursor;
+
+ if ( index < 0 || ! match.length ) {
+ return [ textnode ];
+ }
+
+ if ( index > 0 ) {
+ // capture left text node
+ captured.push( document.createTextNode( text.substr( 0, index ) ) );
+ }
+
+ // capture the replacement of the matched string
+ captured.push( parent.create( match[0].replace( regexp, replacement ) ) );
+
+ cursor = index + match[0].length;
+
+ if ( cursor < text.length ) {
+ // capture right text node
+ captured.push( document.createTextNode( text.substr( cursor ) ) );
+ }
+
+ return captured;
+ }
+
+ function _isInPre( node ) {
+ if ( node ) {
+ while ( node.parentNode ) {
+ if ( node.nodeName === 'PRE' ) {
+ return true;
+ }
+ node = node.parentNode;
+ }
+ }
+
+ return false;
+ }
/* Collect all text nodes */
/* Our goal--ignore nodes that are already wrapped */
this._walk( container_nodes, function( n ) {
- if ( n.nodeType === 3 && ! parent.isMarkedNode( n ) ) {
+ if ( n.nodeType === 3 && ! parent.isMarkedNode( n ) && ! _isInPre( n ) ) {
nl.push( n );
}
});
@@ -439,6 +493,8 @@ AtDCore.prototype.markMyWords = function(container_nodes, errors) {
because eventually the whole thing gets wrapped in an mceItemHidden span and from there it's necessary to
handle each node individually. */
var bringTheHurt = function( node ) {
+ var span, splitNodes;
+
if ( node.nodeType === 3 ) {
ecount++;
@@ -447,7 +503,28 @@ AtDCore.prototype.markMyWords = function(container_nodes, errors) {
if ( parent.isIE() && node.nodeValue.length > 0 && node.nodeValue.substr(0, 1) === ' ' ) {
return parent.create( emptySpan + node.nodeValue.substr( 1, node.nodeValue.length - 1 ).replace( regexp, result ), false );
} else {
- return parent.create( node.nodeValue.replace( regexp, result ), false );
+ if ( textOnlyMode ) {
+ return parent.create( node.nodeValue.replace( regexp, result ), false );
+ }
+
+ span = parent.create( '<span />' );
+ if ( typeof textOnlyMode === 'undefined' ) {
+ // cache this to avoid adding / removing nodes unnecessarily
+ textOnlyMode = typeof span.appendChild !== 'function';
+ if ( textOnlyMode ) {
+ parent.remove( span );
+ return parent.create( node.nodeValue.replace( regexp, result ), false );
+ }
+ }
+
+ // "Visual" mode
+ splitNodes = splitTextNode( node, regexp, result );
+ for ( var i = 0; i < splitNodes.length; i++ ) {
+ span.appendChild( splitNodes[i] );
+ }
+
+ node = span;
+ return node;
}
}
else {
diff --git a/plugins/jetpack/modules/after-the-deadline/proxy.php b/plugins/jetpack/modules/after-the-deadline/proxy.php
index c0299da1..08630235 100644
--- a/plugins/jetpack/modules/after-the-deadline/proxy.php
+++ b/plugins/jetpack/modules/after-the-deadline/proxy.php
@@ -19,6 +19,8 @@ function AtD_http_post( $request, $host, $path, $port = 80 ) {
/**
* Change the timeout time for AtD post.
*
+ * @module after-the-deadline
+ *
* @since 1.2.3
*
* @param int $var Timeout time in seconds, default 15.
@@ -40,6 +42,8 @@ function AtD_http_post( $request, $host, $path, $port = 80 ) {
/**
* Fires when there is a post error to AtD.
*
+ * @module after-the-deadline
+ *
* @since 1.2.3
*
* @param int|string http-error The error that AtD runs into.
@@ -47,7 +51,7 @@ function AtD_http_post( $request, $host, $path, $port = 80 ) {
do_action( 'atd_http_post_error', 'http-error' );
return array();
} elseif ( 200 != $code ) {
- /** This action is documented in modules/after-the-deadline/proxy.php */
+ /** This action is documented in modules/after-the-deadline/proxy.php */
do_action( 'atd_http_post_error', $code );
}
@@ -70,6 +74,8 @@ function AtD_redirect_call() {
/**
* Change the AtD service domain.
*
+ * @module after-the-deadline
+ *
* @since 1.2.3
*
* @param string $var The URL for AtD service domain, default is service.afterthedeadline.com.
diff --git a/plugins/jetpack/modules/carousel.php b/plugins/jetpack/modules/carousel.php
index 75302cc5..378e9b12 100644
--- a/plugins/jetpack/modules/carousel.php
+++ b/plugins/jetpack/modules/carousel.php
@@ -3,7 +3,7 @@
/**
* Module Name: Carousel
* Module Description: Transform standard image galleries into full-screen slideshows.
- * Jumpstart Description: brings your photos and images to life as full-size, easily navigable galleries.
+ * Jumpstart Description: Brings your photos and images to life as full-size, easily navigable galleries.
* Sort Order: 22
* Recommendation Order: 12
* First Introduced: 1.5
@@ -11,6 +11,7 @@
* Auto Activate: No
* Module Tags: Photos and Videos
* Feature: Jumpstart
+ * Additional Search Queries: gallery, carousel, diaporama, slideshow, images, lightbox, exif, metadata, image
*/
include dirname( __FILE__ ) . '/carousel/jetpack-carousel.php';
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.css b/plugins/jetpack/modules/carousel/jetpack-carousel.css
index 7d99a68f..7d24d047 100644
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.css
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.css
@@ -22,6 +22,21 @@ div.jp-carousel-fadeaway {
background-size: 200px 126px;
}
+.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;
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
+ box-shadow: 0 1px 1px 0 rgba(0,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),
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.js b/plugins/jetpack/modules/carousel/jetpack-carousel.js
index a7e27c74..95b6c4b0 100644
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.js
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.js
@@ -8,7 +8,7 @@ jQuery(document).ready(function($) {
var overlay, comments, gallery, container, nextButton, previousButton, info, transitionBegin,
caption, resizeTimeout, photo_info, close_hint, commentInterval, lastSelectedSlide,
screenPadding = 110, originalOverflow = $('body').css('overflow'), originalHOverflow = $('html').css('overflow'), proportion = 85,
- last_known_location_hash = '', imageMeta, titleAndDescription, commentForm, leftColWrapper;
+ last_known_location_hash = '', imageMeta, titleAndDescription, commentForm, leftColWrapper, scrollPos;
if ( window.innerWidth <= 760 ) {
screenPadding = Math.round( ( window.innerWidth / 760 ) * 110 );
@@ -18,6 +18,13 @@ jQuery(document).ready(function($) {
}
}
+ // Adding a polyfill for browsers that do not have Date.now
+ if ( 'undefined' === typeof Date.now ) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+ }
+
var keyListener = function(e){
switch(e.which){
case 38: // up
@@ -106,7 +113,7 @@ jQuery(document).ready(function($) {
var commentFormMarkup = '<div id="jp-carousel-comment-form-container">';
if ( jetpackCarouselStrings.local_comments_commenting_as && jetpackCarouselStrings.local_comments_commenting_as.length ) {
- // Jetpack comments not enabled, fallback to local comments
+ // Comments not enabled, fallback to local comments
if ( 1 !== Number( jetpackCarouselStrings.is_logged_in ) && 1 === Number( jetpackCarouselStrings.comment_registration ) ) {
commentFormMarkup += '<div id="jp-carousel-comment-form-commenting-as">' + jetpackCarouselStrings.local_comments_commenting_as + '</div>';
@@ -382,9 +389,9 @@ jQuery(document).ready(function($) {
if ( history.pushState ) {
history.pushState('', document.title, window.location.pathname + window.location.search);
} else {
- last_known_location_hash = '';
window.location.hash = '';
}
+ last_known_location_hash = '';
gallery.opened = false;
})
.on( 'transitionend.jp-carousel ', '.jp-carousel-slide', function ( e ) {
@@ -478,6 +485,7 @@ jQuery(document).ready(function($) {
// prevent html from overflowing on some of the new themes.
originalHOverflow = $('html').css('overflow');
$('html').css('overflow', 'hidden');
+ scrollPos = $( window ).scrollTop();
// Re-apply inline-block style here and give an initial value for the width
// This value will get replaced with a more appropriate value once the slide is loaded
@@ -527,6 +535,7 @@ jQuery(document).ready(function($) {
.trigger('jp_carousel.beforeClose')
.fadeOut('fast', function(){
container.trigger('jp_carousel.afterClose');
+ $( window ).scrollTop( scrollPos );
});
},
@@ -871,7 +880,7 @@ jQuery(document).ready(function($) {
thumb_size = { width : src_item[0].naturalWidth, height : src_item[0].naturalHeight },
title = src_item.data('image-title') || '',
description = src_item.data('image-description') || '',
- caption = src_item.parents('dl').find('dd.gallery-caption').html() || '',
+ caption = src_item.parents('.gallery-item').find('.gallery-caption').html() || '',
src = src_item.data('gallery-src') || '',
medium_file = src_item.data('medium-file') || '',
large_file = src_item.data('large-file') || '',
@@ -950,14 +959,20 @@ jQuery(document).ready(function($) {
return args.orig_file;
}
- var medium_size = args.medium_file.replace(/-([\d]+x[\d]+)\..+$/, '$1'),
- medium_size_parts = (medium_size !== args.medium_file) ? medium_size.split('x') : [args.orig_width, 0],
+ // Check if the image is being served by Photon (using a regular expression on the hostname).
+
+ var imageLinkParser = document.createElement( 'a' );
+ imageLinkParser.href = args.large_file;
+
+ var isPhotonUrl = ( imageLinkParser.hostname.match( /^i[\d]{1}.wp.com$/i ) != null );
+
+ var medium_size_parts = gallery.jp_carousel( 'getImageSizeParts', args.medium_file, args.orig_width, isPhotonUrl );
+ var large_size_parts = gallery.jp_carousel( 'getImageSizeParts', args.large_file, args.orig_width, isPhotonUrl );
+
+ var large_width = parseInt( large_size_parts[0], 10 ),
+ large_height = parseInt( large_size_parts[1], 10 ),
medium_width = parseInt( medium_size_parts[0], 10 ),
- medium_height = parseInt( medium_size_parts[1], 10 ),
- large_size = args.large_file.replace(/-([\d]+x[\d]+)\..+$/, '$1'),
- large_size_parts = (large_size !== args.large_file) ? large_size.split('x') : [args.orig_width, 0],
- large_width = parseInt( large_size_parts[0], 10 ),
- large_height = parseInt( large_size_parts[1], 10 );
+ medium_height = parseInt( medium_size_parts[1], 10 );
// Give devices with a higher devicePixelRatio higher-res images (Retina display = 2, Android phones = 1.5, etc)
if ( 'undefined' !== typeof window.devicePixelRatio && window.devicePixelRatio > 1 ) {
@@ -972,10 +987,43 @@ jQuery(document).ready(function($) {
if ( medium_width >= args.max_width || medium_height >= args.max_height ) {
return args.medium_file;
}
+
+ if ( isPhotonUrl ) {
+ // args.orig_file doesn't point to a Photon url, so in this case we use args.large_file
+ // to return the photon url of the original image.
+ var largeFileIndex = args.large_file.lastIndexOf( '?' );
+ var origPhotonUrl = args.large_file;
+ if ( -1 !== largeFileIndex ) {
+ origPhotonUrl = args.large_file.substring( 0, largeFileIndex );
+ }
+ return origPhotonUrl;
+ }
return args.orig_file;
},
+ getImageSizeParts: function( file, orig_width, isPhotonUrl ) {
+ var size = isPhotonUrl ?
+ file.replace( /.*=([\d]+%2C[\d]+).*$/, '$1' ) :
+ file.replace( /.*-([\d]+x[\d]+)\..+$/, '$1' );
+
+ var size_parts = ( size !== file ) ?
+ ( isPhotonUrl ? size.split( '%2C' ) : size.split( 'x' ) ) :
+ [ orig_width, 0 ];
+
+ // If one of the dimensions is set to 9999, then the actual value of that dimension can't be retrieved from the url.
+ // In that case, we set the value to 0.
+ if ( '9999' === size_parts[0] ) {
+ size_parts[0] = '0';
+ }
+
+ if ( '9999' === size_parts[1] ) {
+ size_parts[1] = '0';
+ }
+
+ return size_parts;
+ },
+
originalDimensions: function() {
var splitted = $(this).data('orig-size').split(',');
return {width: parseInt(splitted[0], 10), height: parseInt(splitted[1], 10)};
@@ -996,31 +1044,26 @@ jQuery(document).ready(function($) {
});
},
- shutterSpeed: function(d) {
- if (d >= 1) {
- return Math.round(d*10)/10 + 's'; // round to one decimal if value > 1s by multiplying it by 10, rounding, then dividing by 10 again
- }
- var df = 1, top = 1, bot = 1;
- var tol = 1e-8;
- // iterate while value not reached and difference (positive or negative, hence the Math.abs) between value
- // and approximated value greater than given tolerance
- while (df !== d && Math.abs(df-d) > tol) {
- if (df < d) {
- top += 1;
- } else {
- bot += 1;
- top = parseInt(d * bot, 10);
- }
- df = top / bot;
+ /**
+ * Returns a number in a fraction format that represents the shutter speed.
+ * @param Number speed
+ * @return String
+ */
+ shutterSpeed: function( speed ) {
+ var denominator;
+
+ // round to one decimal if value > 1s by multiplying it by 10, rounding, then dividing by 10 again
+ if ( speed >= 1 ) {
+ return Math.round( speed * 10 ) / 10 + 's';
}
- if (top > 1) {
- bot = Math.round(bot / top);
- top = 1;
- }
- if (bot <= 1) {
- return '1s';
- }
- return top + '/' + bot + 's';
+
+ // If the speed is less than one, we find the denominator by inverting
+ // the number. Since cameras usually use rational numbers as shutter
+ // speeds, we should get a nice round number. Or close to one in cases
+ // like 1/30. So we round it.
+ denominator = Math.round( 1 / speed );
+
+ return '1/' + denominator + 's';
},
parseTitleDesc: function( value ) {
@@ -1425,19 +1468,28 @@ jQuery(document).ready(function($) {
return;
}
e.preventDefault();
+
+ // Stopping propagation in case there are parent elements
+ // with .gallery or .tiled-gallery class
+ e.stopPropagation();
$(this).jp_carousel('open', {start_index: $(this).find('.gallery-item, .tiled-gallery-item').index($(e.target).parents('.gallery-item, .tiled-gallery-item'))});
});
// Makes carousel work on page load and when back button leads to same URL with carousel hash (ie: no actual document.ready trigger)
$( window ).on( 'hashchange', function () {
+
var hashRegExp = /jp-carousel-(\d+)/,
matches, attachmentId, galleries, selectedThumbnail;
if ( ! window.location.hash || ! hashRegExp.test( window.location.hash ) ) {
+ if ( gallery.opened ) {
+ container.jp_carousel('close');
+ }
+
return;
}
- if ( window.location.hash === last_known_location_hash ) {
+ if ( ( window.location.hash === last_known_location_hash ) && gallery.opened ) {
return;
}
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.php b/plugins/jetpack/modules/carousel/jetpack-carousel.php
index cfa2ec45..f34e70b1 100644
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.php
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.php
@@ -16,13 +16,13 @@ GNU General Public License for more details.
*/
class Jetpack_Carousel {
- var $prebuilt_widths = array( 370, 700, 1000, 1200, 1400, 2000 );
+ public $prebuilt_widths = array( 370, 700, 1000, 1200, 1400, 2000 );
- var $first_run = true;
+ public $first_run = true;
- var $in_gallery = false;
+ public $in_gallery = false;
- var $in_jetpack = true;
+ public $in_jetpack = true;
function __construct() {
add_action( 'init', array( $this, 'init' ) );
@@ -52,6 +52,15 @@ class Jetpack_Carousel {
return; // Carousel disabled, abort early
}
// If on front-end, do the Carousel thang.
+ /**
+ * Filter the array of default prebuilt widths used in Carousel.
+ *
+ * @module carousel
+ *
+ * @since 1.6.0
+ *
+ * @param array $this->prebuilt_widths Array of default widths.
+ */
$this->prebuilt_widths = apply_filters( 'jp_carousel_widths', $this->prebuilt_widths );
add_filter( 'post_gallery', array( $this, 'enqueue_assets' ), 1000, 2 ); // load later than other callbacks hooked it
add_filter( 'post_gallery', array( $this, 'set_in_gallery' ), -1000 );
@@ -66,6 +75,15 @@ class Jetpack_Carousel {
}
function maybe_disable_jp_carousel() {
+ /**
+ * Allow third-party plugins or themes to disable Carousel.
+ *
+ * @module carousel
+ *
+ * @since 1.6.0
+ *
+ * @param bool false Should Carousel be disabled? Default to fase.
+ */
return apply_filters( 'jp_carousel_maybe_disable', false );
}
@@ -75,22 +93,61 @@ class Jetpack_Carousel {
}
function asset_version( $version ) {
+ /**
+ * Filter the version string used when enqueuing Carousel assets.
+ *
+ * @module carousel
+ *
+ * @since 1.6.0
+ *
+ * @param string $version Asset version.
+ */
return apply_filters( 'jp_carousel_asset_version', $version );
}
+ function display_bail_message( $output= '' ) {
+ // Displays a message on top of gallery if carousel has bailed
+ $message = '<div class="jp-carousel-msg"><p>';
+ $message .= __( 'Jetpack\'s Carousel has been disabled, because another plugin or your theme is overriding the [gallery] shortcode.', 'jetpack' );
+ $message .= '</p></div>';
+ // put before gallery output
+ $output = $message . $output;
+ return $output;
+ }
+
function enqueue_assets( $output ) {
- if ( ! empty( $output ) && ! apply_filters( 'jp_carousel_force_enable', false ) ) {
+ if (
+ ! empty( $output ) &&
+ /**
+ * Allow third-party plugins or themes to force-enable Carousel.
+ *
+ * @module carousel
+ *
+ * @since 1.9.0
+ *
+ * @param bool false Should we force enable Carousel? Default to false.
+ */
+ ! apply_filters( 'jp_carousel_force_enable', false )
+ ) {
// Bail because someone is overriding the [gallery] shortcode.
remove_filter( 'gallery_style', array( $this, 'add_data_to_container' ) );
remove_filter( 'wp_get_attachment_image_attributes', array( $this, 'add_data_to_images' ) );
+ // Display message that carousel has bailed, if user is super_admin, and if we're not on WordPress.com.
+ if (
+ is_super_admin() &&
+ ! ( defined( 'IS_WPCOM' ) && IS_WPCOM )
+ ) {
+ add_filter( 'post_gallery', array( $this, 'display_bail_message' ) );
+ }
return $output;
}
/**
* Fires when thumbnails are shown in Carousel.
*
- * @since ?
- * @module Carousel
+ * @module carousel
+ *
+ * @since 1.6.0
**/
do_action( 'jp_carousel_thumbnails_shown' );
@@ -129,11 +186,12 @@ class Jetpack_Carousel {
'focal_length' => __( 'Focal Length', 'jetpack' ),
'comment_registration' => $comment_registration,
'require_name_email' => $require_name_email,
+ /** This action is documented in core/src/wp-includes/link-template.php */
'login_url' => wp_login_url( apply_filters( 'the_permalink', get_permalink() ) ),
);
if ( ! isset( $localize_strings['jetpack_comments_iframe_src'] ) || empty( $localize_strings['jetpack_comments_iframe_src'] ) ) {
- // We're not using Jetpack comments after all, so fallback to standard local comments.
+ // We're not using Comments after all, so fallback to standard local comments.
if ( $is_logged_in ) {
$localize_strings['local_comments_commenting_as'] = '<p id="jp-carousel-commenting-as">' . sprintf( __( 'Commenting as %s', 'jetpack' ), $current_user->data->display_name ) . '</p>';
@@ -153,6 +211,15 @@ class Jetpack_Carousel {
}
}
+ /**
+ * Filter the strings passed to the Carousel's js file.
+ *
+ * @module carousel
+ *
+ * @since 1.6.0
+ *
+ * @param array $localize_strings Array of strings passed to the Jetpack js file.
+ */
$localize_strings = apply_filters( 'jp_carousel_localize_strings', $localize_strings );
wp_localize_script( 'jetpack-carousel', 'jetpackCarouselStrings', $localize_strings );
if( is_rtl() ) {
@@ -164,16 +231,18 @@ class Jetpack_Carousel {
wp_register_style( 'jetpack-carousel-ie8fix', plugins_url( 'jetpack-carousel-ie8fix.css', __FILE__ ), array(), $this->asset_version( '20121024' ) );
$GLOBALS['wp_styles']->add_data( 'jetpack-carousel-ie8fix', 'conditional', 'lte IE 8' );
wp_enqueue_style( 'jetpack-carousel-ie8fix' );
-
+
/**
* Fires after carousel assets are enqueued for the first time.
* Allows for adding additional assets to the carousel page.
*
- * @since ?
- * @module Carousel
- * @param boolean $first_run
- * @param array $localized_strings
- **/
+ * @module carousel
+ *
+ * @since 1.6.0
+ *
+ * @param bool $first_run First load if Carousel on the page.
+ * @param array $localized_strings Array of strings passed to the Jetpack js file.
+ */
do_action( 'jp_carousel_enqueue_assets', $this->first_run, $localize_strings );
$this->first_run = false;
@@ -235,6 +304,11 @@ class Jetpack_Carousel {
}
}
+ // See https://github.com/Automattic/jetpack/issues/2765
+ if ( isset( $img_meta['keywords'] ) ) {
+ unset( $img_meta['keywords'] );
+ }
+
$img_meta = json_encode( array_map( 'strval', $img_meta ) );
$attr['data-attachment-id'] = $attachment_id;
@@ -270,6 +344,15 @@ class Jetpack_Carousel {
)
);
+ /**
+ * Filter the data added to the Gallery container.
+ *
+ * @module carousel
+ *
+ * @since 1.6.0
+ *
+ * @param array $extra_data Array of data about the site and the post.
+ */
$extra_data = apply_filters( 'jp_carousel_add_data_to_container', $extra_data );
foreach ( (array) $extra_data as $data_key => $data_values ) {
$html = str_replace( '<div ', '<div ' . esc_attr( $data_key ) . "='" . json_encode( $data_values ) . "' ", $html );
@@ -285,13 +368,13 @@ class Jetpack_Carousel {
/**
* Allows for the checking of privileges of the blog user before comments
- * are packaged as JSON and sent back from the get_attachment_comments
+ * are packaged as JSON and sent back from the get_attachment_comments
* AJAX endpoint
*
- * @duplicate yes
- * @since ?
- * @module Carousel
- **/
+ * @module carousel
+ *
+ * @since 1.6.0
+ */
do_action('jp_carousel_check_blog_user_privileges');
$attachment_id = ( isset( $_REQUEST['id'] ) ) ? (int) $_REQUEST['id'] : 0;
@@ -360,11 +443,7 @@ class Jetpack_Carousel {
$switched = true;
}
- /**
- * @duplicate yes
- * @since ?
- * @module Carousel
- **/
+ /** This action is documented in modules/carousel/jetpack-carousel.php */
do_action('jp_carousel_check_blog_user_privileges');
if ( ! comments_open( $_post_id ) )
@@ -414,12 +493,12 @@ class Jetpack_Carousel {
$comment_id = wp_new_comment( $comment_data );
/**
- * Fires before adding a new comment to the database via the get_attachment_comments
- * ajax endpoint
+ * Fires before adding a new comment to the database via the get_attachment_comments ajax endpoint.
*
- * @since ?
- * @module Carousel
- **/
+ * @module carousel
+ *
+ * @since 1.6.0
+ */
do_action( 'jp_carousel_post_attachment_comment' );
$comment_status = wp_get_comment_status( $comment_id );
diff --git a/plugins/jetpack/modules/carousel/rtl/jetpack-carousel-rtl.css b/plugins/jetpack/modules/carousel/rtl/jetpack-carousel-rtl.css
index 373ee501..a4c64b4a 100644
--- a/plugins/jetpack/modules/carousel/rtl/jetpack-carousel-rtl.css
+++ b/plugins/jetpack/modules/carousel/rtl/jetpack-carousel-rtl.css
@@ -1,4 +1,4 @@
-/* This file was automatically generated on Oct 06 2014 18:02:19 */
+/* This file was automatically generated on Jul 30 2015 22:37:09 */
.jp-carousel-wrap * {
line-height:inherit; /* prevent declarations of line-height in the universal selector */
@@ -24,6 +24,21 @@ div.jp-carousel-fadeaway {
background-size: 200px 126px;
}
+.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;
+ -webkit-box-shadow: 0 0 1px 1px rgba(0,0,0,0.1);
+ box-shadow: 0 0 1px 1px rgba(0,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),
@@ -284,14 +299,13 @@ div.jp-carousel-buttons a.jp-carousel-commentlink {
div.jp-carousel-buttons a.jp-carousel-reblog.reblogged,
div.jp-carousel-buttons a.jp-carousel-like.liked {
background-color: #303030;
- padding-right: auto;
padding-left: 8px !important;
border-radius: 2px;
border-radius: 2px;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- -ms-border-radius: 2px;
- -o-border-radius: 2px;
+ -webkit-border-radius:2px;
+ -moz-border-radius:2px;
+ -ms-border-radius:2px;
+ -o-border-radius:2px;
}
div.jp-carousel-buttons a.jp-carousel-reblog.reblogged {
@@ -300,13 +314,14 @@ div.jp-carousel-buttons a.jp-carousel-reblog.reblogged {
div.jp-carousel-buttons a.jp-carousel-reblog,
div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover {
- background-position: 98% -36px;
+ background-position: 6px -36px;
+ padding-left: auto !important;
padding-right: 26px !important;
color: #999;
}
div.jp-carousel-buttons a.jp-carousel-commentlink {
- background-position: 100% -156px;
+ background-position: 0px -156px;
padding-right: 19px !important;
}
@@ -315,7 +330,7 @@ div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover {
}
div.jp-carousel-buttons a.jp-carousel-reblog:hover {
- background-position: 98% -56px;
+ background-position: 6px -56px;
color: #68c9e8;
}
@@ -574,7 +589,7 @@ a.jp-carousel-image-download {
font-weight: 400;
font-size: 13px;
text-decoration: none;
- background-position: 100% -82px;
+ background-position: 0 -82px;
}
a.jp-carousel-image-download span.photo-size {
@@ -589,7 +604,7 @@ a.jp-carousel-image-download span.photo-size-times {
}
a.jp-carousel-image-download:hover {
- background-position: 100% -122px;
+ background-position: 0 -122px;
color: #68c9e8;
border: none !important;
}
@@ -932,7 +947,7 @@ textarea#jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder
}
.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-commentlink {
- background-position: 100% -176px;
+ background-position: 0px -176px;
}
.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like,
@@ -942,7 +957,7 @@ textarea#jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder
}
.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged {
- background-position: 96% -36px;
+ background-position: 5px -36px;
}
.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-like.liked {
@@ -1022,11 +1037,11 @@ textarea#jp-carousel-comment-form-comment-field:focus::-webkit-input-placeholder
}
.jp-carousel-light a.jp-carousel-image-download {
- background-position: 100% -122px;
+ background-position: 0 -122px;
}
.jp-carousel-light a.jp-carousel-image-download:hover {
- background-position: 100% -122px;
+ background-position: 0 -122px;
color: #f1831e;
}
diff --git a/plugins/jetpack/modules/comments.php b/plugins/jetpack/modules/comments.php
index 3b83acf3..c8456770 100644
--- a/plugins/jetpack/modules/comments.php
+++ b/plugins/jetpack/modules/comments.php
@@ -1,13 +1,14 @@
<?php
/**
- * Module Name: Jetpack Comments
+ * Module Name: Comments
* Module Description: Let readers comment with WordPress.com, Twitter, Facebook, or Google+ accounts.
* First Introduced: 1.4
* Sort Order: 20
* Requires Connection: Yes
* Auto Activate: No
* Module Tags: Social
+ * Additional Search Queries: comments, comment, facebook, twitter, google+, social
*/
require dirname( __FILE__ ) . '/comments/comments.php';
diff --git a/plugins/jetpack/modules/comments/admin.php b/plugins/jetpack/modules/comments/admin.php
index 946f4733..a92a5f50 100644
--- a/plugins/jetpack/modules/comments/admin.php
+++ b/plugins/jetpack/modules/comments/admin.php
@@ -7,19 +7,19 @@ class Jetpack_Comments_Settings {
/**
* The Jetpack Coments singleton
*/
- var $jetpack_comments;
+ public $jetpack_comments;
/**
* The default comment form greeting
* @var string
*/
- var $default_greeting = ''; // Set in constructor
+ public $default_greeting = ''; // Set in constructor
/**
* The default comment form color scheme
* @var string
*/
- var $color_schemes = array();
+ public $color_schemes = array();
public static function init() {
static $instance = false;
@@ -69,7 +69,7 @@ class Jetpack_Comments_Settings {
// Create the section
add_settings_section(
'jetpack_comment_form',
- __( 'Jetpack Comments', 'jetpack' ),
+ __( 'Comments', 'jetpack' ),
array( $this, 'comment_form_settings_section' ),
'discussion'
);
@@ -115,7 +115,7 @@ class Jetpack_Comments_Settings {
public function comment_form_settings_section() {
?>
- <p id="jetpack-comments-settings"><?php _e( 'Adjust your Jetpack Comments form with a clever greeting and color-scheme.', 'jetpack' ); ?></p>
+ <p id="jetpack-comments-settings"><?php _e( 'Adjust your Comments form with a clever greeting and color-scheme.', 'jetpack' ); ?></p>
<?php
}
diff --git a/plugins/jetpack/modules/comments/base.php b/plugins/jetpack/modules/comments/base.php
index 92b4320b..29de94be 100644
--- a/plugins/jetpack/modules/comments/base.php
+++ b/plugins/jetpack/modules/comments/base.php
@@ -270,13 +270,7 @@ class Highlander_Comments_Base {
// Set comment author cookies
if ( ( 'wordpress' != $id_source ) && is_user_logged_in() ) {
- /**
- * Changes the duration of a cookie.
- *
- * @since 1.4.0
- *
- * @param int comment_cookie_lifetime Cookie lifteime, default is 30000000 seconds (just over a year).
- */
+ /** This filter is already documented in core/wp-includes/comment-functions.php */
$comment_cookie_lifetime = apply_filters( 'comment_cookie_lifetime', 30000000 );
setcookie( 'comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN );
setcookie( 'comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN );
diff --git a/plugins/jetpack/modules/comments/comments.php b/plugins/jetpack/modules/comments/comments.php
index d4744560..493c749b 100644
--- a/plugins/jetpack/modules/comments/comments.php
+++ b/plugins/jetpack/modules/comments/comments.php
@@ -3,7 +3,7 @@
require dirname( __FILE__ ) . '/base.php';
/**
- * Main Jetpack Comments class
+ * Main Comments class
*
* @package JetpackComments
* @version 1.4
@@ -17,20 +17,20 @@ class Jetpack_Comments extends Highlander_Comments_Base {
* Possible comment form sources
* @var array
*/
- var $id_sources = array();
+ public $id_sources = array();
/**
* URL
* @var string
*/
- var $signed_url = '';
+ public $signed_url = '';
/**
* The default comment form color scheme
* @var string
* @see ::set_default_color_theme_based_on_theme_settings()
*/
- var $default_color_scheme = 'light';
+ public $default_color_scheme = 'light';
/** Methods ***************************************************************/
@@ -45,18 +45,20 @@ class Jetpack_Comments extends Highlander_Comments_Base {
}
/**
- * Main constructor for Jetpack Comments
+ * Main constructor for Comments
*
* @since JetpackComments (1.4)
*/
public function __construct() {
parent::__construct();
- // Jetpack Comments is loaded
+ // Comments is loaded
/**
* Fires after the Jetpack_Comments object has been instantiated
*
+ * @module comments
+ *
* @since 1.4.0
*
* @param array $jetpack_comments_loaded First element in array of type Jetpack_Comments
@@ -173,6 +175,20 @@ class Jetpack_Comments extends Highlander_Comments_Base {
* @since JetpackComments (1.4)
*/
public function comment_form_before() {
+ /**
+ * Filters the setting that determines if Jetpagk comments should be enabled for
+ * the current post type.
+ *
+ * @module comments
+ *
+ * @since 3.8.1
+ *
+ * @param boolean $return Should comments be enabled?
+ */
+ if ( ! apply_filters( 'jetpack_comment_form_enabled_for_' . get_post_type(), true ) ) {
+ return;
+ }
+
// Add some JS to the footer
add_action( 'wp_footer', array( $this, 'watch_comment_parent' ), 100 );
@@ -186,6 +202,10 @@ class Jetpack_Comments extends Highlander_Comments_Base {
* @since JetpackComments (1.4)
*/
public function comment_form_after() {
+ /** This filter is documented in modules/comments/comments.php */
+ if ( ! apply_filters( 'jetpack_comment_form_enabled_for_' . get_post_type(), true ) ) {
+ return;
+ }
// Throw it all out and drop in our replacement
ob_end_clean();
@@ -195,6 +215,8 @@ class Jetpack_Comments extends Highlander_Comments_Base {
/**
* Changes the log in to comment prompt.
*
+ * @module comments
+ *
* @since 1.4.0
*
* @param string $var Default is "You must log in to post a comment."
@@ -227,6 +249,8 @@ class Jetpack_Comments extends Highlander_Comments_Base {
/**
* Changes the comment form prompt.
*
+ * @module comments
+ *
* @since 2.3.0
*
* @param string $var Default is "Leave a Reply to %s."
@@ -407,6 +431,14 @@ class Jetpack_Comments extends Highlander_Comments_Base {
// Bail if token is expired or not valid
if ( $check !== $post_array['sig'] )
wp_die( __( 'Invalid security token.', 'jetpack' ) );
+
+ /** This filter is documented in modules/comments/comments.php */
+ if ( ! apply_filters( 'jetpack_comment_form_enabled_for_' . get_post_type( $post_array['comment_post_ID'] ), true ) ) {
+ // In case the comment POST is legit, but the comments are
+ // now disabled, we don't allow the comment
+
+ wp_die( __( 'Comments are not allowed.', 'jetpack' ) );
+ }
}
/** Capabilities **********************************************************/
diff --git a/plugins/jetpack/modules/contact-form.php b/plugins/jetpack/modules/contact-form.php
index 88abf0dd..6c0dff96 100644
--- a/plugins/jetpack/modules/contact-form.php
+++ b/plugins/jetpack/modules/contact-form.php
@@ -2,7 +2,7 @@
/**
* Module Name: Contact Form
* Module Description: Insert a contact form anywhere on your site.
- * Jumpstart Description: adds a button to your post and page editors, allowing you to build simple forms to help visitors stay in touch.
+ * Jumpstart Description: Adds a button to your post and page editors, allowing you to build simple forms to help visitors stay in touch.
* Sort Order: 15
* Recommendation Order: 14
* First Introduced: 1.3
@@ -10,6 +10,7 @@
* Auto Activate: Yes
* Module Tags: Other
* Feature: Jumpstart
+ * Additional Search Queries: contact, form, grunion, feedback, submission
*/
include dirname( __FILE__ ) . '/contact-form/grunion-contact-form.php';
diff --git a/plugins/jetpack/modules/contact-form/admin.php b/plugins/jetpack/modules/contact-form/admin.php
index 78452c17..7332e8f5 100644
--- a/plugins/jetpack/modules/contact-form/admin.php
+++ b/plugins/jetpack/modules/contact-form/admin.php
@@ -45,8 +45,12 @@ function grunion_display_form_view() {
add_action( 'admin_print_styles', 'grunion_admin_css' );
function grunion_admin_css() {
global $current_screen;
- if ( ! in_array( $current_screen->id, array( 'edit-feedback', 'jetpack_page_omnisearch', 'dashboard_page_omnisearch' ) ) )
+ if ( is_null( $current_screen ) ) {
return;
+ }
+ if ( ! in_array( $current_screen->id, array( 'edit-feedback', 'jetpack_page_omnisearch', 'dashboard_page_omnisearch' ) ) ) {
+ return;
+ }
wp_enqueue_script( 'wp-lists' );
?>
@@ -82,7 +86,7 @@ color: #D98500;
}
#icon-edit.icon32-posts-feedback, #icon-post.icon32-posts-feedback { background: url("<?php echo GRUNION_PLUGIN_URL; ?>images/grunion-menu-big.png") no-repeat !important; }
-@media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
+@media only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
#icon-edit.icon32-posts-feedback, #icon-post.icon32-posts-feedback { background: url("<?php echo GRUNION_PLUGIN_URL; ?>images/grunion-menu-big-2x.png") no-repeat !important; background-size: 30px 31px !important; }
}
@@ -105,6 +109,10 @@ function grunion_add_bulk_edit_option() {
$screen = get_current_screen();
+ if ( is_null( $screen ) ) {
+ return;
+ }
+
if ( 'edit-feedback' != $screen->id ) {
return;
}
@@ -142,6 +150,10 @@ add_action( 'admin_head', 'grunion_add_empty_spam_button' );
function grunion_add_empty_spam_button() {
$screen = get_current_screen();
+ if ( is_null( $screen ) ) {
+ return;
+ }
+
// Only add to feedback, only to spam view
if ( 'edit-feedback' != $screen->id
|| empty( $_GET['post_status'] )
@@ -192,8 +204,9 @@ function grunion_handle_bulk_spam() {
$post_ids = array_map( 'intval', $_REQUEST['post'] );
foreach( $post_ids as $post_id ) {
- if ( ! current_user_can( "edit_page", $post_id ) )
+ if ( ! current_user_can( "edit_page", $post_id ) ) {
wp_die( __( 'You are not allowed to manage this item.', 'jetpack' ) );
+ }
$post = array(
'ID' => $post_id,
@@ -203,14 +216,17 @@ function grunion_handle_bulk_spam() {
wp_update_post( $post );
/**
- * Fires after a comment has been marked by Akismet. Typically this
- * means the comment is spam.
+ * Fires after a comment has been marked by Akismet.
+ *
+ * Typically this means the comment is spam.
*
- * @duplicate yes
- * @since ?
- * @param string $comment_status Usually 'spam'
+ * @module contact-form
+ *
+ * @since 2.2.0
+ *
+ * @param string $comment_status Usually is 'spam', otherwise 'ham'.
* @param array $akismet_values From '_feedback_akismet_values' in comment meta
- **/
+ */
do_action( 'contact_form_akismet', 'spam', $akismet_values );
}
@@ -282,10 +298,10 @@ function grunion_manage_post_columns( $col, $post_id ) {
switch ( $col ) {
case 'feedback_from':
- $author_name = $content_fields['_feedback_author'];
- $author_email = $content_fields['_feedback_author_email'];
- $author_url = $content_fields['_feedback_author_url'];
- $author_ip = $content_fields['_feedback_ip'];
+ $author_name = isset( $content_fields['_feedback_author'] ) ? $content_fields['_feedback_author'] : '';
+ $author_email = isset( $content_fields['_feedback_author_email'] ) ? $content_fields['_feedback_author_email'] : '';
+ $author_url = isset( $content_fields['_feedback_author_url'] ) ? $content_fields['_feedback_author_url'] : '';
+ $author_ip = isset( $content_fields['_feedback_ip'] ) ? $content_fields['_feedback_ip'] : '';
$form_url = isset( $post->post_parent ) ? get_permalink( $post->post_parent ) : null;
$author_name_line = '';
@@ -293,27 +309,24 @@ function grunion_manage_post_columns( $col, $post_id ) {
if ( !empty( $author_email ) )
$author_name_line = get_avatar( $author_email, 32 );
- $author_name_line .= "<strong>{$author_name}</strong><br />";
+ $author_name_line .= sprintf( "<strong>%s</strong><br />", esc_html( $author_name ) );
}
$author_email_line = '';
if ( !empty( $author_email ) ) {
- $author_email_line = "<a href='mailto:{$author_email}'>";
- $author_email_line .= "{$author_email}</a><br />";
+ $author_email_line = sprintf( "<a href='%1\$s'>%2\$s</a><br />", esc_url( "mailto:" . $author_email ) , esc_html( $author_email ) );
}
$author_url_line = '';
if ( !empty( $author_url ) ) {
- $author_url_line = "<a href='{$author_url}'>";
- $author_url_line .= "{$author_url}</a><br />";
-
+ $author_url_line = sprintf( "<a href='%1\$s'>%1\$s</a><br />", esc_url( $author_url ) );
}
echo $author_name_line;
echo $author_email_line;
echo $author_url_line;
- echo "<a href='edit.php?post_type=feedback&s={$author_ip}";
- echo "&mode=detail'>{$author_ip}</a><br />";
+ echo "<a href='edit.php?post_type=feedback&s=" . urlencode( $author_ip );
+ echo "&mode=detail'>" . esc_html( $author_ip ) . "</a><br />";
if ( $form_url ) {
echo '<a href="' . esc_url( $form_url ) . '">' . esc_html( $form_url ) . '</a>';
}
@@ -321,9 +334,12 @@ function grunion_manage_post_columns( $col, $post_id ) {
case 'feedback_message':
$post_type_object = get_post_type_object( $post->post_type );
- echo '<strong>';
- echo esc_html( $content_fields['_feedback_subject'] );
- echo '</strong><br />';
+ if ( isset( $content_fields['_feedback_subject'] ) ) {
+ echo '<strong>';
+ echo esc_html( $content_fields['_feedback_subject'] );
+ echo '</strong>';
+ echo '<br />';
+ }
echo sanitize_text_field( get_the_content( '' ) );
echo '<br />';
@@ -602,24 +618,29 @@ add_action( 'wp_ajax_grunion_ajax_spam', 'grunion_ajax_spam' );
function grunion_ajax_spam() {
global $wpdb;
- if ( empty( $_POST['make_it'] ) )
+ if ( empty( $_POST['make_it'] ) ) {
return;
+ }
$post_id = (int) $_POST['post_id'];
check_ajax_referer( 'grunion-post-status-' . $post_id );
- if ( !current_user_can("edit_page", $post_id) )
+ if ( ! current_user_can( "edit_page", $post_id ) ) {
wp_die( __( 'You are not allowed to manage this item.', 'jetpack' ) );
+ }
require_once dirname( __FILE__ ) . '/grunion-contact-form.php';
$current_menu = '';
- if ( preg_match( '|post_type=feedback|', $_POST['sub_menu'] ) ) {
- if ( preg_match( '|post_status=spam|', $_POST['sub_menu'] ) )
+ if ( isset( $_POST['sub_menu'] ) && preg_match( '|post_type=feedback|', $_POST['sub_menu'] ) ) {
+ if ( preg_match( '|post_status=spam|', $_POST['sub_menu'] ) ) {
$current_menu = 'spam';
- else if ( preg_match( '|post_status=trash|', $_POST['sub_menu'] ) )
+ }
+ elseif ( preg_match( '|post_status=trash|', $_POST['sub_menu'] ) ) {
$current_menu = 'trash';
- else
+ }
+ else {
$current_menu = 'messages';
+ }
}
@@ -630,26 +651,16 @@ function grunion_ajax_spam() {
$post->post_status = 'spam';
$status = wp_insert_post( $post );
wp_transition_post_status( 'spam', 'publish', $post );
-
- /**
- * @duplicate yes
- * @since ?
- * @param string $comment_status Usually 'spam'
- * @param array $akismet_values From '_feedback_akismet_values' in comment meta
- **/
+
+ /** This action is already documented in modules/contact-form/admin.php */
do_action( 'contact_form_akismet', 'spam', $akismet_values );
} elseif ( $_POST['make_it'] == 'ham' ) {
$post->post_status = 'publish';
$status = wp_insert_post( $post );
wp_transition_post_status( 'publish', 'spam', $post );
-
- /**
- * @duplicate yes
- * @since ?
- * @param string $comment_status Usually 'spam'
- * @param array $akismet_values From '_feedback_akismet_values' in comment meta
- **/
- do_action( 'contact_form_akismet', 'spam', $akismet_values );
+
+ /** This action is already documented in modules/contact-form/admin.php */
+ do_action( 'contact_form_akismet', 'ham', $akismet_values );
$comment_author_email = $reply_to_addr = $message = $to = $headers = false;
$blog_url = parse_url( site_url() );
@@ -658,49 +669,70 @@ function grunion_ajax_spam() {
$email = get_post_meta( $post_id, '_feedback_email', TRUE );
$content_fields = Grunion_Contact_Form_Plugin::parse_fields_from_content( $post_id );
- if ( !empty( $email ) && !empty( $content_fields ) ) {
- if ( isset( $content_fields['_feedback_author_email'] ) )
+ if ( ! empty( $email ) && !empty( $content_fields ) ) {
+ if ( isset( $content_fields['_feedback_author_email'] ) ) {
$comment_author_email = $content_fields['_feedback_author_email'];
+ }
- if ( isset( $email['to'] ) )
+ if ( isset( $email['to'] ) ) {
$to = $email['to'];
+ }
- if ( isset( $email['message'] ) )
+ if ( isset( $email['message'] ) ) {
$message = $email['message'];
+ }
- if ( isset( $email['headers'] ) )
+ if ( isset( $email['headers'] ) ) {
$headers = $email['headers'];
+ }
else {
$headers = 'From: "' . $content_fields['_feedback_author'] .'" <wordpress@' . $blog_url['host'] . ">\r\n";
- if ( !empty( $comment_author_email ) )
+ if ( ! empty( $comment_author_email ) ){
$reply_to_addr = $comment_author_email;
- elseif ( is_array( $to ) )
+ }
+ elseif ( is_array( $to ) ) {
$reply_to_addr = $to[0];
+ }
- if ( $reply_to_addr )
+ if ( $reply_to_addr ) {
$headers .= 'Reply-To: "' . $content_fields['_feedback_author'] .'" <' . $reply_to_addr . ">\r\n";
+ }
$headers .= "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"";
}
+ /**
+ * Filters the subject of the email sent after a contact form submission.
+ *
+ * @module contact-form
+ *
+ * @since 3.0.0
+ *
+ * @param string $content_fields['_feedback_subject'] Feedback's subject line.
+ * @param array $content_fields['_feedback_all_fields'] Feedback's data from old fields.
+ */
$subject = apply_filters( 'contact_form_subject', $content_fields['_feedback_subject'], $content_fields['_feedback_all_fields'] );
wp_mail( $to, $subject, $message, $headers );
}
} elseif( $_POST['make_it'] == 'publish' ) {
- if ( !current_user_can($post_type_object->cap->delete_post, $post_id) )
+ if ( ! current_user_can($post_type_object->cap->delete_post, $post_id) ) {
wp_die( __( 'You are not allowed to move this item out of the Trash.', 'jetpack' ) );
+ }
- if ( ! wp_untrash_post($post_id) )
+ if ( ! wp_untrash_post($post_id) ) {
wp_die( __( 'Error in restoring from Trash.', 'jetpack' ) );
+ }
} elseif( $_POST['make_it'] == 'trash' ) {
- if ( !current_user_can($post_type_object->cap->delete_post, $post_id) )
+ if ( ! current_user_can($post_type_object->cap->delete_post, $post_id) ) {
wp_die( __( 'You are not allowed to move this item to the Trash.', 'jetpack' ) );
+ }
- if ( ! wp_trash_post($post_id) )
+ if ( ! wp_trash_post($post_id) ) {
wp_die( __( 'Error in moving to Trash.', 'jetpack' ) );
+ }
}
@@ -721,8 +753,9 @@ function grunion_ajax_spam() {
if ( isset( $status['publish'] ) ) {
$status_html .= '<li><a href="edit.php?post_type=feedback"';
- if ( $current_menu == 'messages' )
+ if ( $current_menu == 'messages' ) {
$status_html .= ' class="current"';
+ }
$status_html .= '>' . __( 'Messages', 'jetpack' ) . ' <span class="count">';
$status_html .= '(' . number_format( $status['publish'] ) . ')';
@@ -802,7 +835,7 @@ function grunion_check_for_spam_button() {
'secondary',
'jetpack-check-feedback-spam',
false,
- array( 'class' => 'jetpack-check-feedback-spam' )
+ array( 'class' => 'jetpack-check-feedback-spam' )
);
$button_html .= '<span class="jetpack-check-feedback-spam-spinner"></span>';
@@ -833,10 +866,21 @@ function grunion_recheck_queue() {
foreach ( $approved_feedbacks as $feedback ) {
$meta = get_post_meta( $feedback->ID, '_feedback_akismet_values', true );
+ /**
+ * Filter whether the submitted feedback is considered as spam.
+ *
+ * @module contact-form
+ *
+ * @since 3.4.0
+ *
+ * @param bool false Is the submitted feedback spam? Default to false.
+ * @param array $meta Feedack values returned by the Akismet plugin.
+ */
$is_spam = apply_filters( 'jetpack_contact_form_is_spam', false, $meta );
if ( $is_spam ) {
wp_update_post( array( 'ID' => $feedback->ID, 'post_status' => 'spam' ) );
+ /** This action is already documented in modules/contact-form/admin.php */
do_action( 'contact_form_akismet', 'spam', $akismet_values );
}
}
diff --git a/plugins/jetpack/modules/contact-form/css/grunion.css b/plugins/jetpack/modules/contact-form/css/grunion.css
index 6d0ea277..d0835755 100644
--- a/plugins/jetpack/modules/contact-form/css/grunion.css
+++ b/plugins/jetpack/modules/contact-form/css/grunion.css
@@ -6,6 +6,8 @@
.contact-form label { margin-bottom: 3px; float: none; font-weight: bold; display: block; }
.contact-form label.checkbox, .contact-form label.radio { margin-bottom: 3px; float: none; font-weight: bold; display: inline-block; }
.contact-form label span { color: #AAA; margin-left: 4px; font-weight: normal; }
+.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='text'], .textwidget .contact-form input[type='email'], .textwidget .contact-form textarea { width: 250px; max-width: 100%; box-sizing: border-box; }
#jetpack-check-feedback-spam { margin: 1px 8px 0px 0px; }
diff --git a/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.css b/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.css
index 161313b1..4c7b9636 100644
--- a/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.css
+++ b/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.css
@@ -50,7 +50,7 @@
display: none;
}
-@media only screen and (-moz-min-device-pixel-ratio: 1.5),
+@media only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {
diff --git a/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.min.css b/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.min.css
index afd563d1..3c870491 100644
--- a/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.min.css
+++ b/plugins/jetpack/modules/contact-form/css/menu-alter-rtl.min.css
@@ -1 +1 @@
-#menu-posts-feedback .wp-menu-image img{display:none}#adminmenu .menu-icon-feedback div.wp-menu-image{background:none!important}#adminmenu .menu-icon-feedback div.wp-menu-image:before{content:'\f175';margin-right:-1px}.jetpack-contact-form-icon:before{content:'\f175';color:#888;vertical-align:text-bottom;font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background:url(../images/grunion-menu-hover.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background:url(../images/grunion-menu.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image:before{display:none}.pre-mp6 .jetpack-contact-form-icon{background:url(../images/grunion-form.png) no-repeat;width:16px;height:16px;display:inline-block;vertical-align:middle;background-size:13px 12px!important}.pre-mp6 .jetpack-contact-form-icon:before{display:none}@media only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background-image:url(../images/grunion-menu-hover-2x.png)}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background-image:url(../images/grunion-menu-2x.png)}.pre-mp6 .jetpack-contact-form-icon{background-image:url(../images/grunion-form-2x.png);vertical-align:bottom}} \ No newline at end of file
+#menu-posts-feedback .wp-menu-image img{display:none}#adminmenu .menu-icon-feedback div.wp-menu-image{background:none!important}#adminmenu .menu-icon-feedback div.wp-menu-image:before{content:'\f175';margin-right:-1px}.jetpack-contact-form-icon:before{content:'\f175';color:#888;vertical-align:text-bottom;font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background:url(../images/grunion-menu-hover.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background:url(../images/grunion-menu.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image:before{display:none}.pre-mp6 .jetpack-contact-form-icon{background:url(../images/grunion-form.png) no-repeat;width:16px;height:16px;display:inline-block;vertical-align:middle;background-size:13px 12px!important}.pre-mp6 .jetpack-contact-form-icon:before{display:none}@media only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background-image:url(../images/grunion-menu-hover-2x.png)}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background-image:url(../images/grunion-menu-2x.png)}.pre-mp6 .jetpack-contact-form-icon{background-image:url(../images/grunion-form-2x.png);vertical-align:bottom}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/contact-form/css/menu-alter.css b/plugins/jetpack/modules/contact-form/css/menu-alter.css
index 46c1d506..47ac09ce 100644
--- a/plugins/jetpack/modules/contact-form/css/menu-alter.css
+++ b/plugins/jetpack/modules/contact-form/css/menu-alter.css
@@ -50,7 +50,7 @@
display: none;
}
-@media only screen and (-moz-min-device-pixel-ratio: 1.5),
+@media only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {
diff --git a/plugins/jetpack/modules/contact-form/css/menu-alter.min.css b/plugins/jetpack/modules/contact-form/css/menu-alter.min.css
index a0929a22..fe338a42 100644
--- a/plugins/jetpack/modules/contact-form/css/menu-alter.min.css
+++ b/plugins/jetpack/modules/contact-form/css/menu-alter.min.css
@@ -1 +1 @@
-#menu-posts-feedback .wp-menu-image img{display:none}#adminmenu .menu-icon-feedback div.wp-menu-image{background:none!important}#adminmenu .menu-icon-feedback div.wp-menu-image:before{content:'\f175';margin-left:-1px}.jetpack-contact-form-icon:before{content:'\f175';color:#888;vertical-align:text-bottom;font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background:url(../images/grunion-menu-hover.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background:url(../images/grunion-menu.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image:before{display:none}.pre-mp6 .jetpack-contact-form-icon{background:url(../images/grunion-form.png) no-repeat;width:16px;height:16px;display:inline-block;vertical-align:middle;background-size:13px 12px!important}.pre-mp6 .jetpack-contact-form-icon:before{display:none}@media only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background-image:url(../images/grunion-menu-hover-2x.png)}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background-image:url(../images/grunion-menu-2x.png)}.pre-mp6 .jetpack-contact-form-icon{background-image:url(../images/grunion-form-2x.png);vertical-align:bottom}} \ No newline at end of file
+#menu-posts-feedback .wp-menu-image img{display:none}#adminmenu .menu-icon-feedback div.wp-menu-image{background:none!important}#adminmenu .menu-icon-feedback div.wp-menu-image:before{content:'\f175';margin-left:-1px}.jetpack-contact-form-icon:before{content:'\f175';color:#888;vertical-align:text-bottom;font:400 18px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background:url(../images/grunion-menu-hover.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background:url(../images/grunion-menu.png) 7px 7px/15px 16px no-repeat!important}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image:before{display:none}.pre-mp6 .jetpack-contact-form-icon{background:url(../images/grunion-form.png) no-repeat;width:16px;height:16px;display:inline-block;vertical-align:middle;background-size:13px 12px!important}.pre-mp6 .jetpack-contact-form-icon:before{display:none}@media only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image{background-image:url(../images/grunion-menu-hover-2x.png)}.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image{background-image:url(../images/grunion-menu-2x.png)}.pre-mp6 .jetpack-contact-form-icon{background-image:url(../images/grunion-form-2x.png);vertical-align:bottom}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/contact-form/css/rtl/grunion-rtl.css b/plugins/jetpack/modules/contact-form/css/rtl/grunion-rtl.css
index b456c2de..dfbb668e 100644
--- a/plugins/jetpack/modules/contact-form/css/rtl/grunion-rtl.css
+++ b/plugins/jetpack/modules/contact-form/css/rtl/grunion-rtl.css
@@ -1,4 +1,4 @@
-/* This file was automatically generated on Feb 02 2015 20:24:19 */
+/* This file was automatically generated on Oct 02 2015 21:49:32 */
.contact-form .clear-form { clear: both; }
.contact-form input[type='text'], .contact-form input[type='email'] { width: 300px; max-width: 98%; margin-bottom: 13px; }
@@ -8,6 +8,8 @@
.contact-form label { margin-bottom: 3px; float: none; font-weight: bold; display: block; }
.contact-form label.checkbox, .contact-form label.radio { margin-bottom: 3px; float: none; font-weight: bold; display: inline-block; }
.contact-form label span { color: #AAA; margin-right: 4px; font-weight: normal; }
+.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='text'], .textwidget .contact-form input[type='email'], .textwidget .contact-form textarea { width: 250px; max-width: 100%; box-sizing: border-box; }
#jetpack-check-feedback-spam { margin: 1px 0px 0px 8px; }
diff --git a/plugins/jetpack/modules/contact-form/css/rtl/menu-alter-rtl.css b/plugins/jetpack/modules/contact-form/css/rtl/menu-alter-rtl.css
index 200c90d9..d18a7575 100644
--- a/plugins/jetpack/modules/contact-form/css/rtl/menu-alter-rtl.css
+++ b/plugins/jetpack/modules/contact-form/css/rtl/menu-alter-rtl.css
@@ -1,4 +1,4 @@
-/* This file was automatically generated on Aug 26 2014 19:31:54 */
+/* This file was automatically generated on Oct 02 2015 21:49:32 */
#menu-posts-feedback .wp-menu-image img {
display: none;
@@ -22,3 +22,54 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
+
+.pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image,
+.pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,
+.pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image {
+ background: url(../../images/grunion-menu-hover.png) no-repeat 7px 7px !important;
+ background-size: 15px 16px !important;
+}
+
+.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image {
+ background: url(../../images/grunion-menu.png) no-repeat 7px 7px !important;
+ background-size: 15px 16px !important;
+}
+
+.pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image:before {
+ display: none;
+}
+
+.pre-mp6 .jetpack-contact-form-icon {
+ background: url(../../images/grunion-form.png) no-repeat;
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+ vertical-align: middle;
+ background-size: 13px 12px !important;
+}
+
+.pre-mp6 .jetpack-contact-form-icon:before {
+ display: none;
+}
+
+@media only screen and (min--moz-device-pixel-ratio: 1.5),
+ only screen and (-o-min-device-pixel-ratio: 3/2),
+ only screen and (-webkit-min-device-pixel-ratio: 1.5),
+ only screen and (min-device-pixel-ratio: 1.5) {
+
+ .pre-mp6 #adminmenu .menu-icon-feedback:hover div.wp-menu-image,
+ .pre-mp6 #adminmenu .menu-icon-feedback.wp-has-current-submenu div.wp-menu-image,
+ .pre-mp6 #adminmenu .menu-icon-feedback.current div.wp-menu-image {
+ background-image: url(../../images/grunion-menu-hover-2x.png);
+ }
+
+ .pre-mp6 #adminmenu .menu-icon-feedback div.wp-menu-image {
+ background-image: url(../../images/grunion-menu-2x.png);
+ }
+
+ .pre-mp6 .jetpack-contact-form-icon {
+ background-image: url(../../images/grunion-form-2x.png);
+ vertical-align: bottom;
+ }
+
+}
diff --git a/plugins/jetpack/modules/contact-form/grunion-contact-form.php b/plugins/jetpack/modules/contact-form/grunion-contact-form.php
index a18de9cd..b8161e97 100644
--- a/plugins/jetpack/modules/contact-form/grunion-contact-form.php
+++ b/plugins/jetpack/modules/contact-form/grunion-contact-form.php
@@ -24,7 +24,7 @@ class Grunion_Contact_Form_Plugin {
/**
* @var string The Widget ID of the widget currently being processed. Used to build the unique contact-form ID for forms embedded in widgets.
*/
- var $current_widget_id;
+ public $current_widget_id;
static $using_contact_form_field = false;
@@ -41,12 +41,24 @@ class Grunion_Contact_Form_Plugin {
/**
* Strips HTML tags from input. Output is NOT HTML safe.
*
- * @param string $string
- * @return string
+ * @param mixed $data_with_tags
+ * @return mixed
*/
- public static function strip_tags( $string ) {
- $string = wp_kses( $string, array() );
- return str_replace( '&amp;', '&', $string ); // undo damage done by wp_kses_normalize_entities()
+ public static function strip_tags( $data_with_tags ) {
+ if ( is_array( $data_with_tags ) ) {
+ foreach ( $data_with_tags as $index => $value ) {
+ $index = sanitize_text_field( strval( $index ) );
+ $value = wp_kses( strval( $value ), array() );
+ $value = str_replace( '&amp;', '&', $value ); // undo damage done by wp_kses_normalize_entities()
+
+ $data_without_tags[ $index ] = $value;
+ }
+ } else {
+ $data_without_tags = wp_kses( $data_with_tags, array() );
+ $data_without_tags = str_replace( '&amp;', '&', $data_without_tags ); // undo damage done by wp_kses_normalize_entities()
+ }
+
+ return $data_without_tags;
}
function __construct() {
@@ -94,7 +106,20 @@ class Grunion_Contact_Form_Plugin {
'public' => FALSE,
'rewrite' => FALSE,
'query_var' => FALSE,
- 'capability_type' => 'page'
+ 'capability_type' => 'page',
+ 'capabilities' => array(
+ 'create_posts' => false,
+ 'publish_posts' => 'publish_pages',
+ 'edit_posts' => 'edit_pages',
+ 'edit_others_posts' => 'edit_others_pages',
+ 'delete_posts' => 'delete_pages',
+ 'delete_others_posts' => 'delete_others_pages',
+ 'read_private_posts' => 'read_private_pages',
+ 'edit_post' => 'edit_page',
+ 'delete_post' => 'delete_page',
+ 'read_post' => 'read_page',
+ ),
+ 'map_meta_cap' => true,
) );
// Add to REST API post type whitelist
@@ -188,6 +213,7 @@ class Grunion_Contact_Form_Plugin {
$post = get_post( $id );
// Process the content to populate Grunion_Contact_Form::$last
+ /** This filter is already documented in core. wp-includes/post-template.php */
apply_filters( 'the_content', $post->post_content );
}
@@ -289,6 +315,12 @@ class Grunion_Contact_Form_Plugin {
// Sanitize all values
$sanitized_values = array_map( array( 'Grunion_Contact_Form_Plugin', 'sanitize_value' ), array_values( $field_values ) );
+ foreach ( $sanitized_values as $k => $sanitized_value ) {
+ if ( is_array( $sanitized_value ) ) {
+ $sanitized_values[ $k ] = implode( ', ', $sanitized_value );
+ }
+ }
+
// Search for all valid tokens (based on existing fields) and replace with the field's value
$subject = str_ireplace( $wrapped_labels, $sanitized_values, $subject );
return $subject;
@@ -399,9 +431,9 @@ class Grunion_Contact_Form_Plugin {
$query_string = http_build_query( $form );
if ( method_exists( 'Akismet', 'http_post' ) ) {
- $response = Akismet::http_post( $query_string, 'comment-check' );
+ $response = Akismet::http_post( $query_string, 'comment-check' );
} else {
- $response = akismet_http_post( $query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port );
+ $response = akismet_http_post( $query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port );
}
$result = false;
@@ -411,6 +443,16 @@ class Grunion_Contact_Form_Plugin {
elseif ( isset( $response[1] ) && 'true' == trim( $response[1] ) ) // 'true' is spam
$result = true;
+ /**
+ * Filter the results returned by Akismet for each submitted contact form.
+ *
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
+ * @param WP_Error|bool $result Is the submitted feedback spam.
+ * @param array|bool $form Submitted feedback.
+ */
return apply_filters( 'contact_form_is_spam_akismet', $result, $form );
}
@@ -486,6 +528,200 @@ class Grunion_Contact_Form_Plugin {
}
/**
+ * Fetch post content for a post and extract just the comment.
+ *
+ * @param int $post_id The post id to fetch the content for.
+ *
+ * @return string Trimmed post comment.
+ *
+ * @codeCoverageIgnore
+ */
+ public function get_post_content_for_csv_export( $post_id ) {
+ $post_content = get_post_field( 'post_content', $post_id );
+ $content = explode( '<!--more-->', $post_content );
+
+ return trim( $content[0] );
+ }
+
+ /**
+ * Get `_feedback_extra_fields` field from post meta data.
+ *
+ * @param int $post_id Id of the post to fetch meta data for.
+ *
+ * @return mixed
+ *
+ * @codeCoverageIgnore - No need to be covered.
+ */
+ public function get_post_meta_for_csv_export( $post_id ) {
+ return get_post_meta( $post_id, '_feedback_extra_fields', true );
+ }
+
+ /**
+ * Get parsed feedback post fields.
+ *
+ * @param int $post_id Id of the post to fetch parsed contents for.
+ *
+ * @return array
+ *
+ * @codeCoverageIgnore - No need to be covered.
+ */
+ public function get_parsed_field_contents_of_post( $post_id ) {
+ return self::parse_fields_from_content( $post_id );
+ }
+
+ /**
+ * Properly maps fields that are missing from the post meta data
+ * to names, that are similar to those of the post meta.
+ *
+ * @param array $parsed_post_content Parsed post content
+ *
+ * @see parse_fields_from_content for how the input data is generated.
+ *
+ * @return array Mapped fields.
+ */
+ public function map_parsed_field_contents_of_post_to_field_names( $parsed_post_content ) {
+
+ $mapped_fields = array();
+
+ $field_mapping = array(
+ '_feedback_subject' => __( 'Contact Form', 'jetpack' ),
+ '_feedback_author' => '1_Name',
+ '_feedback_author_email' => '2_Email',
+ '_feedback_author_url' => '3_Website',
+ '_feedback_main_comment' => '4_Comment',
+ );
+
+ foreach ( $field_mapping as $parsed_field_name => $field_name ) {
+ if (
+ isset( $parsed_post_content[ $parsed_field_name ] )
+ && ! empty( $parsed_post_content[ $parsed_field_name ] )
+ ) {
+ $mapped_fields[ $field_name ] = $parsed_post_content[ $parsed_field_name ];
+ }
+ }
+
+ return $mapped_fields;
+ }
+
+
+ /**
+ * Prepares feedback post data for CSV export.
+ *
+ * @param array $post_ids Post IDs to fetch the data for. These need to be Feedback posts.
+ *
+ * @return array
+ */
+ public function get_export_data_for_posts( $post_ids ) {
+
+ $posts_data = array();
+ $field_names = array();
+ $result = array();
+
+ /**
+ * Fetch posts and get the possible field names for later use
+ */
+ foreach ( $post_ids as $post_id ) {
+
+ /**
+ * Fetch post meta data.
+ */
+ $post_meta_data = $this->get_post_meta_for_csv_export( $post_id );
+
+ /**
+ * If `$post_meta_data` is not an array or if it is empty, then there is no
+ * feedback to work with. Skip it.
+ */
+ if ( ! is_array( $post_meta_data ) || empty( $post_meta_data ) ) {
+ continue;
+ }
+
+ /**
+ * Fetch post main data, because we need the subject and author data for the feedback form.
+ */
+ $post_real_data = $this->get_parsed_field_contents_of_post( $post_id );
+
+ /**
+ * If `$post_real_data` is not an array or there is no `_feedback_subject` set,
+ * then something must be wrong with the feedback post. Skip it.
+ */
+ if ( ! is_array( $post_real_data ) || ! isset( $post_real_data['_feedback_subject'] ) ) {
+ continue;
+ }
+
+ /**
+ * Fetch main post comment. This is from the default textarea fields.
+ * If it is non-empty, then we add it to data, otherwise skip it.
+ */
+ $post_comment_content = $this->get_post_content_for_csv_export( $post_id );
+ if ( ! empty( $post_comment_content ) ) {
+ $post_real_data['_feedback_main_comment'] = $post_comment_content;
+ }
+
+ /**
+ * Map parsed fields to proper field names
+ */
+ $mapped_fields = $this->map_parsed_field_contents_of_post_to_field_names( $post_real_data );
+
+ /**
+ * Prepend the feedback subject to the list of fields.
+ */
+ $post_meta_data = array_merge(
+ $mapped_fields,
+ $post_meta_data
+ );
+
+
+ /**
+ * Save post metadata for later usage.
+ */
+ $posts_data[ $post_id ] = $post_meta_data;
+
+ /**
+ * Save field names, so we can use them as header fields later in the CSV.
+ */
+ $field_names = array_merge( $field_names, array_keys( $post_meta_data ) );
+ }
+
+ /**
+ * Make sure the field names are unique, because we don't want duplicate data.
+ */
+ $field_names = array_unique( $field_names );
+
+
+ /**
+ * Sort the field names by the field id number
+ */
+ sort( $field_names, SORT_NUMERIC );
+
+ /**
+ * Loop through every post, which is essentially CSV row.
+ */
+ foreach ( $posts_data as $post_id => $single_post_data ) {
+
+ /**
+ * Go through all the possible fields and check if the field is available
+ * in the current post.
+ *
+ * If it is - add the data as a value.
+ * If it is not - add an empty string, which is just a placeholder in the CSV.
+ */
+ foreach ( $field_names as $single_field_name ) {
+ if (
+ isset( $single_post_data[ $single_field_name ] )
+ && ! empty( $single_post_data[ $single_field_name ] )
+ ) {
+ $result[ $single_field_name ][] = trim( $single_post_data[ $single_field_name ] );
+ }
+ else {
+ $result[ $single_field_name ][] = '';
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ /**
* download as a csv a contact form or all of them in a csv file
*/
function download_feedback_as_csv() {
@@ -516,13 +752,35 @@ class Grunion_Contact_Form_Plugin {
}
$feedbacks = get_posts( $args );
+
+ if ( empty( $feedbacks ) ) {
+ return;
+ }
+
$filename = sanitize_file_name( $filename );
- $fields = $this->get_field_names( $feedbacks );
- array_unshift( $fields, __( 'Contact Form', 'jetpack' ) );
+ /**
+ * Prepare data for export.
+ */
+ $data = $this->get_export_data_for_posts( $feedbacks );
- if ( empty( $feedbacks ) )
+ /**
+ * If `$data` is empty, there's nothing we can do below.
+ */
+ if ( ! is_array( $data ) || empty( $data ) ) {
return;
+ }
+
+ /**
+ * Extract field names from `$data` for later use.
+ */
+ $fields = array_keys( $data );
+
+ /**
+ * Count how many rows will be exported.
+ */
+ $row_count = count( reset( $data ) );
+
// Forces the download of the CSV instead of echoing
header( 'Content-Disposition: attachment; filename=' . $filename );
@@ -532,12 +790,30 @@ class Grunion_Contact_Form_Plugin {
$output = fopen( 'php://output', 'w' );
- // Prints the header
+ /**
+ * Print CSV headers
+ */
fputcsv( $output, $fields );
- // Create the csv string from the array of post ids
- foreach ( $feedbacks as $feedback ) {
- fputcsv( $output, self::make_csv_row_from_feedback( $feedback, $fields ) );
+
+ /**
+ * Print rows to the output.
+ */
+ for ( $i = 0; $i < $row_count; $i ++ ) {
+
+ $current_row = array();
+
+ /**
+ * Put all the fields in `$current_row` array.
+ */
+ foreach ( $fields as $single_field_name ) {
+ $current_row[] = $data[ $single_field_name ][ $i ];
+ }
+
+ /**
+ * Output the complete CSV row
+ */
+ fputcsv( $output, $current_row );
}
fclose( $output );
@@ -581,7 +857,10 @@ class Grunion_Contact_Form_Plugin {
* Get the names of all the form's fields
*
* @param array|int $posts the post we want the fields of
+ *
* @return array the array of fields
+ *
+ * @deprecated As this is no longer necessary as of the CSV export rewrite. - 2015-12-29
*/
protected function get_field_names( $posts ) {
$posts = (array) $posts;
@@ -659,6 +938,8 @@ class Grunion_Contact_Form_Plugin {
* @param int $post_id The id of the post
* @param array $fields An array containing the names of all the fields of the csv
* @return String The csv row
+ *
+ * @deprecated This is no longer needed, as of the CSV export rewrite.
*/
protected static function make_csv_row_from_feedback( $post_id, $fields ) {
$content_fields = self::parse_fields_from_content( $post_id );
@@ -704,32 +985,32 @@ class Crunion_Contact_Form_Shortcode {
/**
* @var string the name of the shortcode: [$shortcode_name /]
*/
- var $shortcode_name;
+ public $shortcode_name;
/**
* @var array key => value pairs for the shortcode's attributes: [$shortcode_name key="value" ... /]
*/
- var $attributes;
+ public $attributes;
/**
* @var array key => value pair for attribute defaults
*/
- var $defaults = array();
+ public $defaults = array();
/**
* @var null|string Null for selfclosing shortcodes. Hhe inner content of otherwise: [$shortcode_name]$content[/$shortcode_name]
*/
- var $content;
+ public $content;
/**
* @var array Associative array of inner "child" shortcodes equivalent to the $content: [$shortcode_name][child 1/][child 2/][/$shortcode_name]
*/
- var $fields;
+ public $fields;
/**
* @var null|string The HTML of the parsed inner "child" shortcodes". Null for selfclosing shortcodes.
*/
- var $body;
+ public $body;
/**
* @param array $attributes An associative array of shortcode attributes. @see shortcode_atts()
@@ -869,12 +1150,12 @@ class Crunion_Contact_Form_Shortcode {
* Sends email and stores the contact form response (a.k.a. "feedback")
*/
class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
- var $shortcode_name = 'contact-form';
+ public $shortcode_name = 'contact-form';
/**
* @var WP_Error stores form submission errors
*/
- var $errors;
+ public $errors;
/**
* @var Grunion_Contact_Form The most recent (inclusive) contact-form shortcode processed
@@ -1067,6 +1348,15 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$r_success_message .= self::success_message( $feedback_id, $form );
}
+ /**
+ * Filter the message returned after a successfull contact form submission.
+ *
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
+ * @param string $r_success_message Success message.
+ */
$r .= apply_filters( 'grunion_contact_form_success_message', $r_success_message );
} else {
// Nothing special - show the normal contact form
@@ -1083,6 +1373,17 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$url = set_url_scheme( $url );
// May eventually want to send this to admin-post.php...
+ /**
+ * Filter the contact form action URL.
+ *
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
+ * @param string $contact_form_id Contact form post URL.
+ * @param $post $GLOBALS['post'] Post global variable.
+ * @param int $id Contact Form ID.
+ */
$url = apply_filters( 'grunion_contact_form_form_action', "{$url}#contact-form-{$id}", $GLOBALS['post'], $id );
$r .= "<form action='" . esc_url( $url ) . "' method='post' class='contact-form commentsblock'>\n";
@@ -1103,9 +1404,32 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
return $r;
}
+ /**
+ * Returns a success message to be returned if the form is sent via AJAX.
+ *
+ * @param int $feedback_id
+ * @param object Grunion_Contact_Form $form
+ *
+ * @return string $message
+ */
static function success_message( $feedback_id, $form ) {
- $r_success_message = '';
+ return wp_kses(
+ '<blockquote class="contact-form-submission">'
+ . '<p>' . join( self::get_compiled_form( $feedback_id, $form ), '</p><p>' ) . '</p>'
+ . '</blockquote>',
+ array( 'br' => array(), 'blockquote' => array( 'class' => array() ), 'p' => array() )
+ );
+ }
+ /**
+ * Returns a compiled form with labels and values in a form of an array
+ * of lines.
+ * @param int $feedback_id
+ * @param object Grunion_Contact_Form $form
+ *
+ * @return array $lines
+ */
+ static function get_compiled_form( $feedback_id, $form ) {
$feedback = get_post( $feedback_id );
$field_ids = $form->get_field_ids();
$content_fields = Grunion_Contact_Form_Plugin::parse_fields_from_content( $feedback_id );
@@ -1119,7 +1443,7 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
'textarea' => false, // not a post_meta key. This is stored in post_content
);
- $contact_form_message = "<blockquote>\n";
+ $compiled_form = array();
// "Standard" field whitelist
foreach ( $field_value_map as $type => $meta_key ) {
@@ -1136,11 +1460,12 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$value = trim( $value );
}
- $contact_form_message .= sprintf(
- _x( '%1$s: %2$s', '%1$s = form field label, %2$s = form field value', 'jetpack' ),
+ $field_index = array_search( $field_ids[ $type ], $field_ids['all'] );
+ $compiled_form[ $field_index ] = sprintf(
+ '<b>%1$s:</b> %2$s<br /><br />',
wp_kses( $field->get_attribute( 'label' ), array() ),
- wp_kses( $value, array() )
- ) . '<br />';
+ nl2br( wp_kses( $value, array() ) )
+ );
}
}
@@ -1153,24 +1478,24 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$i = 0;
foreach ( $field_ids['extra'] as $field_id ) {
$field = $form->fields[$field_id];
+ $field_index = array_search( $field_id, $field_ids['all'] );
$label = $field->get_attribute( 'label' );
- $contact_form_message .= sprintf(
- _x( '%1$s: %2$s', '%1$s = form field label, %2$s = form field value', 'jetpack' ),
+ $compiled_form[ $field_index ] = sprintf(
+ '<b>%1$s:</b> %2$s<br /><br />',
wp_kses( $label, array() ),
- wp_kses( $extra_fields[$extra_field_keys[$i]], array() )
- ) . '<br />';
+ nl2br( wp_kses( $extra_fields[$extra_field_keys[$i]], array() ) )
+ );
$i++;
}
}
- $contact_form_message .= "</blockquote><br /><br />";
+ // Sorting lines by the field index
+ ksort( $compiled_form );
- $r_success_message .= wp_kses( $contact_form_message, array( 'br' => array(), 'blockquote' => array() ) );
-
- return $r_success_message;
+ return $compiled_form;
}
/**
@@ -1342,19 +1667,34 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
if ( isset( $field_ids['name'] ) ) {
$field = $this->fields[$field_ids['name']];
- $comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );
+ $comment_author = Grunion_Contact_Form_Plugin::strip_tags(
+ stripslashes(
+ /** This filter is already documented in core/wp-includes/comment-functions.php */
+ apply_filters( 'pre_comment_author_name', addslashes( $field->value ) )
+ )
+ );
$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );
}
if ( isset( $field_ids['email'] ) ) {
$field = $this->fields[$field_ids['email']];
- $comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );
+ $comment_author_email = Grunion_Contact_Form_Plugin::strip_tags(
+ stripslashes(
+ /** This filter is already documented in core/wp-includes/comment-functions.php */
+ apply_filters( 'pre_comment_author_email', addslashes( $field->value ) )
+ )
+ );
$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );
}
if ( isset( $field_ids['url'] ) ) {
$field = $this->fields[$field_ids['url']];
- $comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );
+ $comment_author_url = Grunion_Contact_Form_Plugin::strip_tags(
+ stripslashes(
+ /** This filter is already documented in core/wp-includes/comment-functions.php */
+ apply_filters( 'pre_comment_author_url', addslashes( $field->value ) )
+ )
+ );
if ( 'http://' == $comment_author_url ) {
$comment_author_url = '';
}
@@ -1394,6 +1734,10 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$label = $i . '_' . $field->get_attribute( 'label' );
$value = $field->value;
+ if ( is_array( $value ) ) {
+ $value = implode( ', ', $value );
+ }
+
$extra_values[$label] = $value;
$i++; // Increment prefix counter for the next extra field
}
@@ -1424,7 +1768,7 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
'-'
);
- $field_value = trim( $field->value );
+ $field_value = ( is_array( $field->value ) ) ? trim( implode( ', ', $field->value ) ) : trim( $field->value );
// Skip any values that are already in the array we're sending.
if ( $field_value && in_array( $field_value, $akismet_vars ) ) {
@@ -1432,12 +1776,13 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
}
$akismet_vars[ 'contact_form_field_' . $field_slug ] = $field_value;
- }
+ }
$spam = '';
$akismet_values = $plugin->prepare_for_akismet( $akismet_vars );
// Is it spam?
+ /** This filter is already documented in modules/contact-form/admin.php */
$is_spam = apply_filters( 'jetpack_contact_form_is_spam', false, $akismet_values );
if ( is_wp_error( $is_spam ) ) // WP_Error to abort
return $is_spam; // abort
@@ -1447,6 +1792,15 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
if ( !$comment_author )
$comment_author = $comment_author_email;
+ /**
+ * Filter the email where a submitted feedback is sent.
+ *
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
+ * @param string|array $to Array of valid email addresses, or single email address.
+ */
$to = (array) apply_filters( 'contact_form_to', $to );
foreach ( $to as $to_key => $to_value ) {
$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );
@@ -1462,8 +1816,9 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$headers = 'From: "' . $comment_author .'" <' . $from_email_addr . ">\r\n" .
'Reply-To: "' . $comment_author . '" <' . $reply_to_addr . ">\r\n" .
- "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"";
+ "Content-Type: text/html; charset=\"" . get_option('blog_charset') . "\"";
+ /** This filter is already documented in modules/contact-form/admin.php */
$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );
$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );
@@ -1471,39 +1826,6 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );
$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );
- $message = "$comment_author_label: $comment_author\n";
- if ( !empty( $comment_author_email ) ) {
- $message .= "$comment_author_email_label: $comment_author_email\n";
- }
- if ( !empty( $comment_author_url ) ) {
- $message .= "$comment_author_url_label: $comment_author_url\n";
- }
- if ( !empty( $comment_content_label ) ) {
- $message .= "$comment_content_label: $comment_content\n";
- }
- if ( !empty( $extra_values ) ) {
- foreach ( $extra_values as $label => $value ) {
- $message .= preg_replace( '#^\d+_#i', '', $label ) . ': ' . trim( $value ) . "\n";
- }
- }
- $message .= "\n";
- $message .= __( 'Time:', 'jetpack' ) . ' ' . $time . "\n";
- $message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . "\n";
- $message .= __( 'Contact Form URL:', 'jetpack' ) . " $url\n";
-
- if ( is_user_logged_in() ) {
- $message .= "\n";
- $message .= sprintf(
- __( 'Sent by a verified %s user.', 'jetpack' ),
- isset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '"' . get_option( 'blogname' ) . '"'
- );
- } else {
- $message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );
- }
-
- $message = apply_filters( 'contact_form_message', $message );
- $message = Grunion_Contact_Form_Plugin::strip_tags( $message );
-
// keep a copy of the feedback as a custom post type
$feedback_time = current_time( 'mysql' );
$feedback_title = "{$comment_author} - {$feedback_time}";
@@ -1546,28 +1868,92 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
update_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );
update_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );
+
+ $message = self::get_compiled_form( $post_id, $this );
+
+ array_push(
+ $message,
+ "", // Empty line left intentionally
+ __( 'Time:', 'jetpack' ) . ' ' . $time . '<br />',
+ __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . '<br />',
+ __( 'Contact Form URL:', 'jetpack' ) . " " . $url . '<br />'
+ );
+
+ if ( is_user_logged_in() ) {
+ array_push(
+ $message,
+ "",
+ sprintf(
+ __( 'Sent by a verified %s user.', 'jetpack' ),
+ isset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ?
+ $GLOBALS['current_site']->site_name : '"' . get_option( 'blogname' ) . '"'
+ )
+ );
+ } else {
+ array_push( $message, __( 'Sent by an unverified visitor to your site.', 'jetpack' ) );
+ }
+
+ $message = join( $message, "" );
+ /**
+ * Filters the message sent via email after a successfull form submission.
+ *
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
+ * @param string $message Feedback email message.
+ */
+ $message = apply_filters( 'contact_form_message', $message );
+
update_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );
/**
* Fires right before the contact form message is sent via email to
* the recipient specified in the contact form.
*
- * @since ?
- * @module Contact_Forms
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
* @param integer $post_id Post contact form lives on
* @param array $all_values Contact form fields
* @param array $extra_values Contact form fields not included in $all_values
- **/
+ */
do_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );
// schedule deletes of old spam feedbacks
- if ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {
+ if ( ! wp_next_scheduled( 'grunion_scheduled_delete' ) ) {
wp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );
}
- if ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {
+ if (
+ $is_spam !== TRUE &&
+ /**
+ * Filter to choose whether an email should be sent after each successfull contact form submission.
+ *
+ * @module contact-form
+ *
+ * @since 2.6.0
+ *
+ * @param bool true Should an email be sent after a form submission. Default to true.
+ * @param int $post_id Post ID.
+ */
+ true === apply_filters( 'grunion_should_send_email', true, $post_id )
+ ) {
wp_mail( $to, "{$spam}{$subject}", $message, $headers );
- } elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.
+ } elseif (
+ true === $is_spam &&
+ /**
+ * Choose whether an email should be sent for each spam contact form submission.
+ *
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
+ * @param bool false Should an email be sent after a spam form submission. Default to false.
+ */
+ apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE
+ ) { // don't send spam by default. Filterable.
wp_mail( $to, "{$spam}{$subject}", $message, $headers );
}
@@ -1586,6 +1972,17 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
'_wpnonce' => wp_create_nonce( "contact-form-sent-{$post_id}" ), // wp_nonce_url HTMLencodes :(
) ), $redirect );
+ /**
+ * Filter the URL where the reader is redirected after submitting a form.
+ *
+ * @module contact-form
+ *
+ * @since 1.9.0
+ *
+ * @param string $redirect Post submission URL.
+ * @param int $id Contact Form ID.
+ * @param int $post_id Post ID.
+ */
$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );
wp_safe_redirect( $redirect );
@@ -1613,22 +2010,22 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
* Validates input.
*/
class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
- var $shortcode_name = 'contact-field';
+ public $shortcode_name = 'contact-field';
/**
* @var Grunion_Contact_Form parent form
*/
- var $form;
+ public $form;
/**
* @var string default or POSTed value
*/
- var $value;
+ public $value;
/**
* @var bool Is the input invalid?
*/
- var $error = false;
+ public $error = false;
/**
* @param array $attributes An associative array of shortcode attributes. @see shortcode_atts()
@@ -1644,6 +2041,7 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
'id' => null,
'default' => null,
'placeholder' => null,
+ 'class' => null,
), $attributes, 'contact-field' );
// special default for subject field
@@ -1657,7 +2055,7 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
else
$attributes['required'] = false;
- // parse out comma-separated options list (for selects and radios)
+ // parse out comma-separated options list (for selects, radios, and checkbox-multiples)
if ( !empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) {
$attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) );
}
@@ -1674,7 +2072,7 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
if ( empty( $id ) ) {
$id = sanitize_title_with_dashes( 'g' . $form_id . '-' . $unescaped_label );
$i = 0;
- $max_tries = 24;
+ $max_tries = 99;
while ( isset( $form->fields[$id] ) ) {
$i++;
$id = sanitize_title_with_dashes( 'g' . $form_id . '-' . $unescaped_label . '-' . $i );
@@ -1733,7 +2131,15 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
$field_type = $this->get_attribute( 'type' );
$field_label = $this->get_attribute( 'label' );
- $field_value = isset( $_POST[$field_id] ) ? stripslashes( $_POST[$field_id] ) : '';
+ if ( isset( $_POST[ $field_id ] ) ) {
+ if ( is_array( $_POST[ $field_id ] ) ) {
+ $field_value = array_map( 'stripslashes', $_POST[ $field_id ] );
+ } else {
+ $field_value = stripslashes( $_POST[ $field_id ] );
+ }
+ } else {
+ $field_value = '';
+ }
switch ( $field_type ) {
case 'email' :
@@ -1742,6 +2148,12 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
$this->add_error( sprintf( __( '%s requires a valid email address', 'jetpack' ), $field_label ) );
}
break;
+ case 'checkbox-multiple' :
+ // Check that there is at least one option selected
+ if ( empty( $field_value ) ) {
+ $this->add_error( sprintf( __( '%s requires at least one selection', 'jetpack' ), $field_label ) );
+ }
+ break;
default :
// Just check for presence of any text
if ( !strlen( trim( $field_value ) ) ) {
@@ -1765,14 +2177,31 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
$field_label = $this->get_attribute( 'label' );
$field_required = $this->get_attribute( 'required' );
$placeholder = $this->get_attribute( 'placeholder' );
+ $class = $this->get_attribute( 'class' );
$field_placeholder = ( ! empty( $placeholder ) ) ? "placeholder='" . esc_attr( $placeholder ) . "'" : '';
+ $field_class = "class='" . trim( esc_attr( $field_type ) . " " . esc_attr( $class ) ) . "' ";
- if ( isset( $_POST[$field_id] ) ) {
- $this->value = stripslashes( (string) $_POST[$field_id] );
+ if ( isset( $_POST[ $field_id ] ) ) {
+ if ( is_array( $_POST[ $field_id ] ) ) {
+ $this->value = array_map( 'stripslashes', $_POST[ $field_id ] );
+ } else {
+ $this->value = stripslashes( (string) $_POST[ $field_id ] );
+ }
+ } elseif ( isset( $_GET[ $field_id ] ) ) {
+ $this->value = stripslashes( (string) $_GET[ $field_id ] );
} elseif (
- is_user_logged_in()
- && ( ( defined( 'IS_WPCOM' ) && IS_WPCOM )
- || true === apply_filters( 'jetpack_auto_fill_logged_in_user', false )
+ is_user_logged_in() &&
+ ( ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ||
+ /**
+ * Allow third-party tools to prefill the contact form with the user's details when they're logged in.
+ *
+ * @module contact-form
+ *
+ * @since 3.2.0
+ *
+ * @param bool false Should the Contact Form be prefilled with your details when you're logged in. Default to false.
+ */
+ true === apply_filters( 'jetpack_auto_fill_logged_in_user', false )
)
) {
// Special defaults for logged-in users
@@ -1796,29 +2225,40 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
$field_value = Grunion_Contact_Form_Plugin::strip_tags( $this->value );
$field_label = Grunion_Contact_Form_Plugin::strip_tags( $field_label );
+ /**
+ * Filter the Contact Form required field text
+ *
+ * @module contact-form
+ *
+ * @since 3.8.0
+ *
+ * @param string $var Required field text. Default is "(required)".
+ */
+ $required_field_text = esc_html( apply_filters( 'jetpack_required_field_text', __( "(required)", 'jetpack' ) ) );
+
switch ( $field_type ) {
case 'email' :
$r .= "\n<div>\n";
- $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label email" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
- $r .= "\t\t<input type='email' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' class='email' " . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/>\n";
+ $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label email" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
+ $r .= "\t\t<input type='email' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' " . $field_class . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/>\n";
$r .= "\t</div>\n";
break;
case 'telephone' :
$r .= "\n<div>\n";
- $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label telephone" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
- $r .= "\t\t<input type='tel' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' class='telephone' " . $field_placeholder . "/>\n";
+ $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label telephone" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
+ $r .= "\t\t<input type='tel' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' " . $field_class . $field_placeholder . "/>\n";
case 'textarea' :
$r .= "\n<div>\n";
- $r .= "\t\t<label for='contact-form-comment-" . esc_attr( $field_id ) . "' class='grunion-field-label textarea" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
- $r .= "\t\t<textarea name='" . esc_attr( $field_id ) . "' id='contact-form-comment-" . esc_attr( $field_id ) . "' rows='20' " . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . ">" . esc_textarea( $field_value ) . "</textarea>\n";
+ $r .= "\t\t<label for='contact-form-comment-" . esc_attr( $field_id ) . "' class='grunion-field-label textarea" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
+ $r .= "\t\t<textarea name='" . esc_attr( $field_id ) . "' id='contact-form-comment-" . esc_attr( $field_id ) . "' rows='20' " . $field_class . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . ">" . esc_textarea( $field_value ) . "</textarea>\n";
$r .= "\t</div>\n";
break;
case 'radio' :
- $r .= "\t<div><label class='grunion-field-label" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
+ $r .= "\t<div><label class='grunion-field-label" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
foreach ( $this->get_attribute( 'options' ) as $option ) {
$option = Grunion_Contact_Form_Plugin::strip_tags( $option );
$r .= "\t\t<label class='grunion-radio-label radio" . ( $this->is_error() ? ' form-error' : '' ) . "'>";
- $r .= "<input type='radio' name='" . esc_attr( $field_id ) . "' value='" . esc_attr( $option ) . "' class='radio' " . checked( $option, $field_value, false ) . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/> ";
+ $r .= "<input type='radio' name='" . esc_attr( $field_id ) . "' value='" . esc_attr( $option ) . "' " . $field_class . checked( $option, $field_value, false ) . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/> ";
$r .= esc_html( $option ) . "</label>\n";
$r .= "\t\t<div class='clear-form'></div>\n";
}
@@ -1827,15 +2267,26 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
case 'checkbox' :
$r .= "\t<div>\n";
$r .= "\t\t<label class='grunion-field-label checkbox" . ( $this->is_error() ? ' form-error' : '' ) . "'>\n";
- $r .= "\t\t<input type='checkbox' name='" . esc_attr( $field_id ) . "' value='" . esc_attr__( 'Yes', 'jetpack' ) . "' class='checkbox' " . checked( (bool) $field_value, true, false ) . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/> \n";
- $r .= "\t\t" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
+ $r .= "\t\t<input type='checkbox' name='" . esc_attr( $field_id ) . "' value='" . esc_attr__( 'Yes', 'jetpack' ) . "' " . $field_class . checked( (bool) $field_value, true, false ) . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/> \n";
+ $r .= "\t\t" . esc_html( $field_label ) . ( $field_required ? '<span>'. $required_field_text . '</span>' : '' ) . "</label>\n";
$r .= "\t\t<div class='clear-form'></div>\n";
$r .= "\t</div>\n";
break;
+ case 'checkbox-multiple' :
+ $r .= "\t<div><label class='grunion-field-label" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
+ foreach ( $this->get_attribute( 'options' ) as $option ) {
+ $option = Grunion_Contact_Form_Plugin::strip_tags( $option );
+ $r .= "\t\t<label class='grunion-checkbox-multiple-label checkbox-multiple" . ( $this->is_error() ? ' form-error' : '' ) . "'>";
+ $r .= "<input type='checkbox' name='" . esc_attr( $field_id ) . "[]' value='" . esc_attr( $option ) . "' " . $field_class . checked( in_array( $option, (array) $field_value ), true, false ) . " /> ";
+ $r .= esc_html( $option ) . "</label>\n";
+ $r .= "\t\t<div class='clear-form'></div>\n";
+ }
+ $r .= "\t\t</div>\n";
+ break;
case 'select' :
$r .= "\n<div>\n";
- $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label select" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
- $r .= "\t<select name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' class='select' " . ( $field_required ? "required aria-required='true'" : "" ) . ">\n";
+ $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label select" . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>'. $required_field_text . '</span>' : '' ) . "</label>\n";
+ $r .= "\t<select name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' " . $field_class . ( $field_required ? "required aria-required='true'" : "" ) . ">\n";
foreach ( $this->get_attribute( 'options' ) as $option ) {
$option = Grunion_Contact_Form_Plugin::strip_tags( $option );
$r .= "\t\t<option" . selected( $option, $field_value, false ) . ">" . esc_html( $option ) . "</option>\n";
@@ -1845,8 +2296,8 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
break;
case 'date' :
$r .= "\n<div>\n";
- $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label " . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
- $r .= "\t\t<input type='date' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' class='" . esc_attr( $field_type ) . "' " . ( $field_required ? "required aria-required='true'" : "" ) . "/>\n";
+ $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label " . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
+ $r .= "\t\t<input type='date' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' " . $field_class . ( $field_required ? "required aria-required='true'" : "" ) . "/>\n";
$r .= "\t</div>\n";
wp_enqueue_script( 'grunion-frontend', plugins_url( 'js/grunion-frontend.js', __FILE__ ), array( 'jquery', 'jquery-ui-datepicker' ) );
@@ -1855,11 +2306,22 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
// note that any unknown types will produce a text input, so we can use arbitrary type names to handle
// input fields like name, email, url that require special validation or handling at POST
$r .= "\n<div>\n";
- $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label " . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( "(required)", 'jetpack' ) . '</span>' : '' ) . "</label>\n";
- $r .= "\t\t<input type='text' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' class='" . esc_attr( $field_type ) . "' " . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/>\n";
+ $r .= "\t\t<label for='" . esc_attr( $field_id ) . "' class='grunion-field-label " . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . "'>" . esc_html( $field_label ) . ( $field_required ? '<span>' . $required_field_text . '</span>' : '' ) . "</label>\n";
+ $r .= "\t\t<input type='text' name='" . esc_attr( $field_id ) . "' id='" . esc_attr( $field_id ) . "' value='" . esc_attr( $field_value ) . "' " . $field_class . $field_placeholder . " " . ( $field_required ? "required aria-required='true'" : "" ) . "/>\n";
$r .= "\t</div>\n";
}
+ /**
+ * Filter the HTML of the Contact Form.
+ *
+ * @module contact-form
+ *
+ * @since 2.6.0
+ *
+ * @param string $r Contact Form HTML output.
+ * @param string $field_label Field label.
+ * @param int|null $id Post ID.
+ */
return apply_filters( 'grunion_contact_form_field_html', $r, $field_label, ( in_the_loop() ? get_the_ID() : null ) );
}
}
@@ -1896,7 +2358,18 @@ function grunion_delete_old_spam() {
# nothing special about 5000 or 11
# just trying to periodically recover deleted rows
$random_num = mt_rand( 1, 5000 );
- if ( apply_filters( 'grunion_optimize_table', ( $random_num == 11 ) ) ) {
+ if (
+ /**
+ * Filter how often the module run OPTIMIZE TABLE on the core WP tables.
+ *
+ * @module contact-form
+ *
+ * @since 1.3.1
+ *
+ * @param int $random_num Random number.
+ */
+ apply_filters( 'grunion_optimize_table', ( $random_num == 11 ) )
+ ) {
$wpdb->query( "OPTIMIZE TABLE $wpdb->posts" );
}
diff --git a/plugins/jetpack/modules/contact-form/grunion-form-view.php b/plugins/jetpack/modules/contact-form/grunion-form-view.php
index b9eee53b..54617fc9 100644
--- a/plugins/jetpack/modules/contact-form/grunion-form-view.php
+++ b/plugins/jetpack/modules/contact-form/grunion-form-view.php
@@ -20,6 +20,15 @@ wp_localize_script( 'grunion', 'GrunionFB_i18n', array(
'savedMessage' => esc_attr__( 'Saved successfully', 'jetpack' ),
'requiredLabel' => esc_attr( _x( '(required)', 'This HTML form field is marked as required by the user in contact form builder', 'jetpack' ) ),
'exitConfirmMessage' => esc_attr__( 'Are you sure you want to exit the form editor without saving? Any changes you have made will be lost.', 'jetpack' ),
+ /**
+ * Filter to modify the limit of 5 additional contact form fields.
+ *
+ * @module contact-form
+ *
+ * @since 3.2.0
+ *
+ * @param int 5 Maximum number of additional fields.
+ */
'maxNewFields' => intval( apply_filters( 'grunion_max_new_fields', 5 ) ),
) );
@@ -57,8 +66,7 @@ wp_localize_script( 'grunion', 'GrunionFB_i18n', array(
input { width: 301px; }
input[type='text'] { padding: 3px 5px; margin-right: 4px; -moz-border-radius:3px; border-radius:3px; -webkit-border-radius:3px; }
input[type='text']:focus { border: 2px solid #80B8D9; outline: 0 !important; }
- input[type='checkbox'], input[type='radio'] { width: auto !important; float: left; margin-top: 3px; }
- input[type='radio'] { margin-right: 8px; }
+ input[type='checkbox'], input[type='radio'] { width: auto !important; float: left; margin-top: 3px; margin-right: 8px; }
input.fieldError, select.fieldError, textarea.fieldError { border: 2px solid #D56F55; }
img { border: none; }
label { color: #222; font-weight: bold; display: block; margin-bottom: 4px; }
@@ -84,7 +92,7 @@ wp_localize_script( 'grunion', 'GrunionFB_i18n', array(
.fb-form-case { background: #FFF; padding: 13px; border: 1px solid #E2E2E2; width: 336px; -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px }
.fb-form-case a { outline: none; }
.fb-form-case input[type='text'], .fb-form-case textarea { background: #E1E1E1; }
- .fb-radio-label { display: inline-block; margin-left: 8px; float: left; width: 290px; }
+ .fb-radio-label { display: inline-block; float: left; width: 290px; }
.fb-new-fields { position: relative; border: 1px dashed #FFF; background: #FFF; padding: 4px 10px 10px; cursor: default; }
.fb-new-fields:hover { border: 1px dashed #BBDBEA; background: #F7FBFD; }
.fb-options { width: 170px !important; }
@@ -99,7 +107,7 @@ wp_localize_script( 'grunion', 'GrunionFB_i18n', array(
.fb-right .fb-new-fields { border: none; background: #F9F9F9; padding: 0; }
.fb-right input[type='text'] { width: 195px; margin-bottom: 14px; }
.fb-right label { color: #444; width: 100px; float: left; font-weight: normal; }
- .fb-right select { width: 150px !important; margin-bottom: 14px; }
+ .fb-right select { width: 195px !important; margin-bottom: 14px; }
.fb-right textarea { margin-bottom: 13px; }
.fb-right p { color: #999; line-height: 19px; }
.fb-settings input[type='text'], .fb-settings textarea { background-image: none !important; }
@@ -124,7 +132,7 @@ wp_localize_script( 'grunion', 'GrunionFB_i18n', array(
.rtl .fb-right label { float: right; }
.rtl .fb-success { right: auto; left: 100px;}
.rtl .right { float: left; }
- @media only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
+ @media only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5) {
.fb-remove { background: url('<?php echo GRUNION_PLUGIN_URL; ?>/images/grunion-remove-field-2x.png') no-repeat; background-size: 20px 23px; }
.fb-remove:hover { background: url('<?php echo GRUNION_PLUGIN_URL; ?>/images/grunion-remove-field-hover-2x.png') no-repeat; background-size: 20px 23px; }
.fb-remove-option { background: url('<?php echo GRUNION_PLUGIN_URL; ?>/images/grunion-remove-option-2x.png') no-repeat; background-size: 20px 23px; }
@@ -173,6 +181,7 @@ wp_localize_script( 'grunion', 'GrunionFB_i18n', array(
<label for="fb-new-label"><?php esc_html_e( 'Field type', 'jetpack' ); ?></label>
<select id="fb-new-type">
<option value="checkbox"><?php esc_html_e( 'Checkbox', 'jetpack' ); ?></option>
+ <option value="checkbox-multiple"><?php esc_html_e( 'Checkbox with Multiple Items', 'jetpack' ); ?></option>
<option value="select"><?php esc_html_e( 'Drop down', 'jetpack' ); ?></option>
<option value="email"><?php esc_html_e( 'Email', 'jetpack' ); ?></option>
<option value="name"><?php esc_html_e( 'Name', 'jetpack' ); ?></option>
diff --git a/plugins/jetpack/modules/contact-form/grunion-omnisearch.php b/plugins/jetpack/modules/contact-form/grunion-omnisearch.php
index b3471007..3f0a4133 100644
--- a/plugins/jetpack/modules/contact-form/grunion-omnisearch.php
+++ b/plugins/jetpack/modules/contact-form/grunion-omnisearch.php
@@ -5,7 +5,7 @@ if( ! class_exists( 'WP_List_Table' ) )
class Jetpack_Omnisearch_Grunion extends WP_List_Table {
static $instance;
- var $post_type = 'feedback';
+ public $post_type = 'feedback';
function __construct() {
self::$instance = $this;
@@ -48,6 +48,7 @@ class Jetpack_Omnisearch_Grunion extends WP_List_Table {
function prepare_items( $search_term = '' ) {
$this->_column_headers = array( $this->get_columns(), array(), array() );
+ /** This action is documented in modules/omnisearch/omnisearch-core.php */
$num_results = apply_filters( 'omnisearch_num_results', 5 );
$this->items = get_posts( array(
's' => $search_term,
diff --git a/plugins/jetpack/modules/contact-form/js/grunion.js b/plugins/jetpack/modules/contact-form/js/grunion.js
index 727cea2f..2f34b594 100644
--- a/plugins/jetpack/modules/contact-form/js/grunion.js
+++ b/plugins/jetpack/modules/contact-form/js/grunion.js
@@ -21,7 +21,8 @@ GrunionFB_i18n = jQuery.extend( {
savedMessage: 'Saved successfully',
requiredLabel: '(required)',
exitConfirmMessage: 'Are you sure you want to exit the form editor without saving? Any changes you have made will be lost.',
- maxNewFields: 5
+ maxNewFields: 5,
+ invalidEmail: ' is an invalid email address.'
}, GrunionFB_i18n );
GrunionFB_i18n.moveInstructions = GrunionFB_i18n.moveInstructions.replace( '\n', '<br />' );
@@ -126,6 +127,11 @@ FB.ContactForm = (function() {
jQuery('#fb-new-options').append('<div id="fb-option-box-' + optionsCount + '" class="fb-new-fields"><span optionid="' + optionsCount + '" class="fb-remove-option"></span><label></label><input type="text" id="fb-option' + optionsCount + '" optionid="' + optionsCount + '" value="' + GrunionFB_i18n.optionLabel + '" class="fb-options" /><div>');
// Add to preview
jQuery('#fb-new-field' + thisId + ' .fb-fields').append('<div id="fb-radio-' + thisId + '-' + optionsCount + '"><input type="radio" disabled="disabled" id="fb-field' + thisId + '" name="radio-' + thisId + '" /><span>' + GrunionFB_i18n.optionLabel + '</span><div class="clear"></div></div>');
+ } else if ( 'checkbox-multiple' === thisType ) {
+ // Add to right col
+ jQuery('#fb-new-options').append('<div id="fb-option-box-' + optionsCount + '" class="fb-new-fields"><span optionid="' + optionsCount + '" class="fb-remove-option"></span><label></label><input type="text" id="fb-option' + optionsCount + '" optionid="' + optionsCount + '" value="' + GrunionFB_i18n.optionLabel + '" class="fb-options" /><div>');
+ // Add to preview
+ jQuery('#fb-new-field' + thisId + ' .fb-fields').append('<div id="fb-checkbox-multiple-' + thisId + '-' + optionsCount + '"><input type="checkbox" disabled="disabled" id="fb-field' + thisId + '" name="checkbox-multiple-' + thisId + '" /><span>' + GrunionFB_i18n.optionLabel + '</span><div class="clear"></div></div>');
} else {
// Add to right col
jQuery('#fb-new-options').append('<div id="fb-option-box-' + optionsCount + '" class="fb-new-fields"><span optionid="' + optionsCount + '" class="fb-remove-option"></span><label></label><input type="text" id="fb-option' + optionsCount + '" optionid="' + optionsCount + '" value="" class="fb-options" /><div>');
@@ -152,7 +158,7 @@ FB.ContactForm = (function() {
jQuery('#fb-field-id').val(index);
optionsCache[index] = {};
optionsCache[index].options = [];
- if (value.type === 'radio' || value.type === 'select') {
+ if ( 'radio' === value.type || 'select' === value.type || 'checkbox-multiple' === value.type ) {
jQuery.each(value.options, function(i, value) {
optionsCache[index].options[i] = value;
});
@@ -172,6 +178,8 @@ FB.ContactForm = (function() {
if (optionsCache[id].options[i] !== undefined) {
if (thisType === 'radio') {
thisOptions = thisOptions + '<div id="fb-radio-' + id + '-' + i + '"><input type="radio" id="fb-field' + id + '" name="radio-' + id + '" /><span>' + FB.esc_html( optionsCache[id].options[i] ) + '</span><div class="clear"></div></div>';
+ } else if ( 'checkbox-multiple' === thisType ) {
+ thisOptions = thisOptions + '<div id="fb-checkbox-multiple-' + id + '-' + i + '"><input type="checkbox" id="fb-field' + id + '" name="checkbox-multiple-' + id + '" /><span>' + FB.esc_html( optionsCache[id].options[i] ) + '</span><div class="clear"></div></div>';
} else {
thisOptions = thisOptions + '<option id="fb-' + id + '-' + i + '" value="' + id + '-' + i + '">' + FB.esc_html( optionsCache[id].options[i] ) + '</option>';
}
@@ -284,7 +292,7 @@ FB.ContactForm = (function() {
jQuery('#fb-new-required').prop('checked', false);
}
// Load options if there are any
- if (thisType === 'select' || thisType === 'radio') {
+ if ( 'select' === thisType || 'radio' === thisType || 'checkbox-multiple' === thisType ) {
var thisOptions = fbForm.fields[id].options;
jQuery('#fb-options').show();
jQuery('#fb-new-options').html(''); // Clear it all out
@@ -339,6 +347,8 @@ FB.ContactForm = (function() {
// Remove from preview
if (thisType === 'radio') {
jQuery('#fb-radio-' + thisId + '-' + optionId).remove();
+ } else if ( 'checkbox-multiple' === thisType ) {
+ jQuery('#fb-checkbox-multiple-' + thisId + '-' + optionId).remove();
} else {
jQuery('#fb-' + thisId + '-' + optionId).remove();
}
@@ -395,7 +405,7 @@ FB.ContactForm = (function() {
// Remove new lines that cause BR tags to show up
response = response.replace(/\n/g,' ');
// Convert characters to comma
- response = response.replace( '%26#x002c;' , ',' );
+ response = response.replace( /%26#x002c;/g , ',' );
// Add new shortcode
if (currentCode.match(regexp)) {
@@ -448,10 +458,15 @@ FB.ContactForm = (function() {
function switchTabs (whichType) {
try {
if (whichType === 'preview') {
+ if ( ! validateEmails( jQuery( '#fb-field-my-email' ).val() ) ) {
+ return;
+ }
jQuery('#tab-preview a').addClass('current');
jQuery('#tab-settings a').removeClass('current');
jQuery('#fb-preview-form, #fb-desc').show();
jQuery('#fb-email-settings, #fb-email-desc').hide();
+ showAndHideMessage( GrunionFB_i18n.savedMessage );
+
} else {
jQuery('#tab-preview a').removeClass('current');
jQuery('#tab-settings a').addClass('current');
@@ -465,6 +480,28 @@ FB.ContactForm = (function() {
}
}
}
+ function validateEmails( emails ) {
+ // Field is allwed to be empty :)
+ if ( 0 === emails.length ) {
+ return true;
+ }
+
+ var $e, emailList = emails.split( ',' );
+
+ for ( $e = 0 ; $e < emailList.length ; $e++ ) {
+ if ( false === validateEmail( emailList[ $e ] ) ) {
+ alert( emailList[ $e ] + GrunionFB_i18n.invalidEmail );
+ return false;
+ }
+ }
+
+ return true;
+ }
+ /* Uses The Official Standard: RFC 5322 -- http://www.regular-expressions.info/email.html */
+ function validateEmail( email ) {
+ var re = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
+ return re.test( email );
+ }
function updateLabel () {
try {
var thisId = jQuery('#fb-field-id').val();
@@ -502,6 +539,8 @@ FB.ContactForm = (function() {
// Update preview
if (thisType === 'radio') {
jQuery('#fb-radio-' + thisId + '-' + thisOptionid + ' span').text(thisOptionValue);
+ } else if ( 'checkbox-multiple' === thisType ) {
+ jQuery('#fb-checkbox-multiple-' + thisId + '-' + thisOptionid + ' span').text(thisOptionValue);
} else {
jQuery('#fb-' + thisId + '-' + thisOptionid).text(thisOptionValue);
}
@@ -553,6 +592,8 @@ FB.ContactForm = (function() {
var thisRadioRemove = '<div class="fb-remove fb-remove-small" id="' + thisId + '"></div>';
var thisRemove = '<div class="fb-remove" id="' + thisId + '"></div>';
var thisCheckbox = '<input type="checkbox" id="fb-field' + thisId + '" "disabled="disabled" />';
+ var thisCheckboxMultiple = '<input type="checkbox" id="fb-field' + thisId + '" "disabled="disabled" />';
+ var thisCheckboxMultipleRemove = '<div class="fb-remove fb-remove-small" id="' + thisId + '"></div>';
var thisText = '<input type="text" id="fb-field' + thisId + '" "disabled="disabled" />';
var thisTextarea = '<textarea id="fb-field' + thisId + '" "disabled="disabled"></textarea>';
var thisClear = '<div class="clear"></div>';
@@ -562,6 +603,19 @@ FB.ContactForm = (function() {
removeOptions();
jQuery('#fb-new-field' + thisId + ' .fb-fields').html(thisRadioRemove + thisCheckbox + thisRadioLabel + thisClear);
break;
+ case 'checkbox-multiple':
+ jQuery('#fb-new-field' + thisId + ' .fb-fields').html(thisLabel + thisCheckboxMultipleRemove + '<div fieldid="' + thisId + '" id="fb-custom-checkbox-multiple' + thisId + '"></div>');
+ if (optionsCache[thisId] !== undefined && optionsCache[thisId].options.length !== 0) {
+ fbForm.fields[thisId].options = optionsCache[thisId].options;
+ jQuery('#fb-custom-checkbox-multiple' + thisId).append(customOptions(thisId, thisType));
+ } else {
+ jQuery('#fb-new-options').html('<label for="fb-option0">' + GrunionFB_i18n.optionsLabel + '</label><input type="text" id="fb-option0" optionid="0" value="' + GrunionFB_i18n.firstOptionLabel + '" class="fb-options" />');
+ jQuery('#fb-custom-checkbox-multiple' + thisId).append('<div id="fb-checkbox-multiple-' + thisId + '-0">' + thisCheckboxMultiple + '<span>' + GrunionFB_i18n.firstOptionLabel + '</span>' + thisClear + '</div>');
+ fbForm.fields[thisId].options[optionsCount] = GrunionFB_i18n.firstOptionLabel;
+ }
+ jQuery('#fb-options').show();
+ setTimeout(function () { jQuery('#fb-option0').focus().select(); }, 100);
+ break;
case 'email':
removeOptions();
jQuery('#fb-new-field' + thisId + ' .fb-fields').html(thisRemove + thisLabel + thisText);
@@ -705,7 +759,6 @@ FB.ContactForm = (function() {
});
jQuery('#fb-prev-form').click(function () {
switchTabs('preview');
- showAndHideMessage( GrunionFB_i18n.savedMessage );
return false;
});
jQuery('#tab-settings a').click(function () {
diff --git a/plugins/jetpack/modules/contact-form/readme.txt b/plugins/jetpack/modules/contact-form/readme.txt
deleted file mode 100644
index 4285dec9..00000000
--- a/plugins/jetpack/modules/contact-form/readme.txt
+++ /dev/null
@@ -1,132 +0,0 @@
-=== Grunion Contact Form ===
-Contributors: mdawaffe, automattic, nickmomrik
-Tags: WordPress.com, contact form, email
-Stable tag: 2.3
-Requires at least: 3.0
-Tested up to: 3.3
-
-Add a contact form to any post, page or text widget. Messages will be sent to any email address you choose. As seen on WordPress.com.
-
-== Description ==
-
-Add a contact form to any post or page by inserting `[contact-form]` in the post. Messages will be sent to the post's author or any email address you choose.
-
-Or add a contact form ta a text widget. Messages will be sent to the email address set in your Settings -> General admin panel or any email address you choose.
-
-Your email address is never shown, and the sender never learns it (unless you reply to the email).
-
-As seen on WordPress.com.
-
-= Configuration =
-
-The `[contact-form]` shortcode has the following parameters:
-
-* `to`: A comma separated list of email addresses to which the messages will be sent.
- If you leave this blank: contact forms in posts and pages will send messages to the post or page's author; and
- contact forms in text widgets will send messages to the email address set in Settings -> General.
-
- Example: `[contact-form to="you@me.com"]`
-
- Example: `[contact-form to="you@me.com,me@you.com,us@them.com"]`
-
-* `subject`: The e-mail subject of the message defaults to `[{Blog Title}] {Sidebar}` for text widgets
- and `[{Blog Title}] {Post Title}` for posts and pages. Set your own default with the subject option.
-
- Example: `[contact-form subject="My Contact Form"]`
-
-* `show_subject`: You can allow the user to edit the subject by showing a new field on the form. The
- field will be populated with the default subject or the subject you have set with the previous option.
-
- Example: `[contact-form subject="My Contact Form" show_subject="yes"]`
-
-== Frequently Asked Questions ==
-
-= What's a Grunion? =
-
-The plugin was written in Southern California, home of an unusual fish call the [Grunion](http://en.wikipedia.org/wiki/Grunion).
-There's no correlation between fish and contact forms as far as I can tell; it's just a fun sounding word that's geographically apropos.
-
-= What about spam? Will I get a lot from the contact form? =
-
-If you have [Akismet](http://akismet.com/) installed on your blog, you shouldn't get much spam.
-All the messages people send to you through the contact form will be filtered through Akismet.
-
-= Anyone can put whatever they want in the name and email boxes. How can I know who's really sending the message? =
-
-If a logged member of your site sends you a message, the end of the email will let you know that the message was sent by a verified user.
-Otherwise, you can't trust anything... just like a blog comment.
-
-Anonymity is both a curse and a blessing :)
-
-= My blog has multiple authors. Who gets the email? =
-
-By default, the email is sent to the author of the post with the contact form in it. So each author on your blog can have his or her own contact form.
-
-In the contact form shortcode, you can specify what email address(es) messages should be sent to with the `to` parameter.
-
-= Great! But how will my visitors know who they're sending a message to? =
-
-Just make the title of your post "Contact Mary" or put "Hey, drop John a line with the form below" in the body of your post.
-
-== Changelog ==
-
-= 2.4 =
-* Support forms with no email address
-* Don't include *** SPAM *** in the subject line of unspammed items
-* Fix form processing when there is more than one form on a page (Koff)
-* Retina images added
-
-= 2.3 =
-* Fix for Chrome going 'oh snap' when inserting a new contact form
-* Fix for export/import issue that created users incorrectly
-* Add 'grunion_pre_message_sent' action (dimadin)
-* Updates to work with WordPress 3.3+ changes to wp-admin UI
-
-= 2.2 =
-* Only load grunion.css on pages with a contact form
-* Be better about checking for valid email addresses
-* Track the permalink for the contact form that was used and provide that detail in the email and Feedbacks page
-* Fix for the problem where every feedback would be marked as spam if the Akismet plugin wasn't activated
-* Make sure wp_kses only gets used on strings
-* New filter: grunion_still_email_spam, for those that want to still gets emails even when a feedback has been flagged as spam
-
-= 2.1 =
-* Fix error where the form builder wouldn't load correctly when using mapped domains
-* Don't attempt to check form submission for spam unless the Akismet plugin is active
-* Fixed form styles so that they wouldn't affect forms outside grunion container
-* Fixed "Add form to post" button in IE7
-* Fixed "re-arrange" in drag and drop so that it doesn't hard return
-* Hid "re-arrange" once you start dragging
-* Fixed issue where if you had content in the post, and added a form the content disappeared
-* Fixed form field width for when form is in the sidebar
-* Fixed First textarea label is always missing in email
-* Fixed Name, Email, Web site are always shown in default labels
-* Fixed Result page only shows the first textarea message
-* Fixed Results missing in the email notification
-* Limit form field submissions to valid text
-* Fixed broken path to button-grad-active.png
-* Encode drop down options so that quotes and commas work correctly
-* Encode quotes in field labels so that they show up correctly
-* Fix the from address formatting in the email headers
-* Use the correct bulk action filter to limit the list to supported actions only
-* Removed inline styles
-* Moved basic form CSS to include
-* Changed HTML shortcode insert from .html() to .val()
-* Fixed HTML encoding of option values for select fields
-
-= 1.2 =
-* Fix a PHP Warning in some CGI evironments.
-
-= 1.1 =
-* Move to shortcode API.
-* Add `to`, `subject` and `show-subject` options.
-* Allow use in text widgets.
-* Move spam check to a filter.
-
-== Upgrade Notice ==
-
-= 1.2 =
-Fixes a PHP Warning.
-
-= 1.1 =
-Now with more options!
diff --git a/plugins/jetpack/modules/custom-content-types.php b/plugins/jetpack/modules/custom-content-types.php
index 9b938b52..df4eabd4 100644
--- a/plugins/jetpack/modules/custom-content-types.php
+++ b/plugins/jetpack/modules/custom-content-types.php
@@ -8,6 +8,7 @@
* Auto Activate: Yes
* Module Tags: Writing
* Sort Order: 34
+ * Additional Search Queries: cpt, custom post types, portfolio, portfolios, testimonial, testimonials
*/
function jetpack_load_custom_post_types() {
diff --git a/plugins/jetpack/modules/custom-css.php b/plugins/jetpack/modules/custom-css.php
index ef7a3454..95e27c18 100644
--- a/plugins/jetpack/modules/custom-css.php
+++ b/plugins/jetpack/modules/custom-css.php
@@ -8,6 +8,7 @@
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Appearance
+ * Additional Search Queries: css, customize, custom, style, editor, less, sass, preprocessor, font, mobile, appearance, theme, stylesheet
*/
function jetpack_load_custom_css() {
@@ -26,4 +27,4 @@ function custom_css_configuration_load() {
exit;
}
-jetpack_load_custom_css(); \ No newline at end of file
+jetpack_load_custom_css();
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
index a672204e..59e33551 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
@@ -77,57 +77,57 @@ class csstidy {
* @var array
* @access public
*/
- var $css = array();
+ public $css = array();
/**
* Saves the parsed CSS (raw)
* @var array
* @access private
*/
- var $tokens = array();
+ public $tokens = array();
/**
* Printer class
* @see csstidy_print
* @var object
* @access public
*/
- var $print;
+ public $print;
/**
* Optimiser class
* @see csstidy_optimise
* @var object
* @access private
*/
- var $optimise;
+ public $optimise;
/**
* Saves the CSS charset (@charset)
* @var string
* @access private
*/
- var $charset = '';
+ public $charset = '';
/**
* Saves all @import URLs
* @var array
* @access private
*/
- var $import = array();
+ public $import = array();
/**
* Saves the namespace
* @var string
* @access private
*/
- var $namespace = '';
+ public $namespace = '';
/**
* Contains the version of csstidy
* @var string
* @access private
*/
- var $version = '1.3';
+ public $version = '1.3';
/**
* Stores the settings
* @var array
* @access private
*/
- var $settings = array();
+ public $settings = array();
/**
* Saves the parser-status.
*
@@ -142,37 +142,37 @@ class csstidy {
* @var string
* @access private
*/
- var $status = 'is';
+ public $status = 'is';
/**
* Saves the current at rule (@media)
* @var string
* @access private
*/
- var $at = '';
+ public $at = '';
/**
* Saves the current selector
* @var string
* @access private
*/
- var $selector = '';
+ public $selector = '';
/**
* Saves the current property
* @var string
* @access private
*/
- var $property = '';
+ public $property = '';
/**
* Saves the position of , in selectors
* @var array
* @access private
*/
- var $sel_separate = array();
+ public $sel_separate = array();
/**
* Saves the current value
* @var string
* @access private
*/
- var $value = '';
+ public $value = '';
/**
* Saves the current sub-value
*
@@ -183,64 +183,64 @@ class csstidy {
* @var string
* @access private
*/
- var $sub_value = '';
+ public $sub_value = '';
/**
* Array which saves all subvalues for a property.
* @var array
* @see sub_value
* @access private
*/
- var $sub_value_arr = array();
+ public $sub_value_arr = array();
/**
* Saves the stack of characters that opened the current strings
* @var array
* @access private
*/
- var $str_char = array();
- var $cur_string = array();
+ public $str_char = array();
+ public $cur_string = array();
/**
* Status from which the parser switched to ic or instr
* @var array
* @access private
*/
- var $from = array();
+ public $from = array();
/**
/**
* =true if in invalid at-rule
* @var bool
* @access private
*/
- var $invalid_at = false;
+ public $invalid_at = false;
/**
* =true if something has been added to the current selector
* @var bool
* @access private
*/
- var $added = false;
+ public $added = false;
/**
* Array which saves the message log
* @var array
* @access private
*/
- var $log = array();
+ public $log = array();
/**
* Saves the line number
* @var integer
* @access private
*/
- var $line = 1;
+ public $line = 1;
/**
* Marks if we need to leave quotes for a string
* @var array
* @access private
*/
- var $quoted_string = array();
+ public $quoted_string = array();
/**
* List of tokens
* @var string
*/
- var $tokens_list = "";
+ public $tokens_list = "";
/**
* Loads standard template and sets default settings
* @access private
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php
index e2ed97e7..080a368f 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php
@@ -46,19 +46,19 @@ class csstidy_print {
* @var string
* @access private
*/
- var $input_css = '';
+ public $input_css = '';
/**
* Saves the formatted CSS string
* @var string
* @access public
*/
- var $output_css = '';
+ public $output_css = '';
/**
* Saves the formatted CSS string (plain text)
* @var string
* @access public
*/
- var $output_css_plain = '';
+ public $output_css_plain = '';
/**
* Constructor
diff --git a/plugins/jetpack/modules/custom-css/csstidy/data.inc.php b/plugins/jetpack/modules/custom-css/csstidy/data.inc.php
index ef8a6fe8..9b604417 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/data.inc.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/data.inc.php
@@ -293,7 +293,9 @@ $GLOBALS['csstidy']['shorthands']['-moz-border-radius'] = 0;
* @version 1.0
* @see csstidy::property_is_next()
*/
+$GLOBALS['csstidy']['all_properties']['align-content'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['align-items'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['align-self'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['alignment-adjust'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['alignment-baseline'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['animation'] = 'CSS3.0';
@@ -399,11 +401,17 @@ $GLOBALS['csstidy']['all_properties']['elevation'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['empty-cells'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['fit'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['fit-position'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['flex'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['flex-align'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['flex-basis'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['flex-direction'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['flex-flow'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['flex-grow'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['flex-line-pack'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['flex-order'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['flex-pack'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['flex-shrink'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['flex-wrap'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['float'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['float-offset'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['font'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';
@@ -465,6 +473,7 @@ $GLOBALS['csstidy']['all_properties']['nav-left'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['nav-right'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['nav-up'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['opacity'] = 'CSS3.0';
+$GLOBALS['csstidy']['all_properties']['order'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['orphans'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['outline'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['outline-color'] = 'CSS2.0,CSS2.1,CSS3.0';
diff --git a/plugins/jetpack/modules/custom-css/custom-css.php b/plugins/jetpack/modules/custom-css/custom-css.php
index 0ec6b016..bcd66293 100644
--- a/plugins/jetpack/modules/custom-css/custom-css.php
+++ b/plugins/jetpack/modules/custom-css/custom-css.php
@@ -6,42 +6,57 @@ class Jetpack_Custom_CSS {
add_action( 'wp_restore_post_revision', array( __CLASS__, 'restore_revision' ), 10, 2 );
// Save revisions for posts of type safecss.
- add_filter( 'revision_redirect', array( __CLASS__, 'revision_redirect' ) );
+ add_action( 'load-revision.php', array( __CLASS__, 'add_revision_redirect' ) );
// Override the edit link, the default link causes a redirect loop
add_filter( 'get_edit_post_link', array( __CLASS__, 'revision_post_link' ), 10, 3 );
- // Overwrite the content width global variable if one is set in the custom css
+ // Overwrite the content width global variable if one is set in the custom css
add_action( 'template_redirect', array( __CLASS__, 'set_content_width' ) );
add_action( 'admin_init', array( __CLASS__, 'set_content_width' ) );
if ( ! is_admin() )
add_filter( 'stylesheet_uri', array( __CLASS__, 'style_filter' ) );
- define( 'SAFECSS_USE_ACE', ! jetpack_is_mobile() && ! Jetpack_User_Agent_Info::is_ipad() && apply_filters( 'safecss_use_ace', true ) );
+ define(
+ 'SAFECSS_USE_ACE',
+ ! jetpack_is_mobile() &&
+ ! Jetpack_User_Agent_Info::is_ipad() &&
+ /**
+ * Should the Custom CSS module use ACE to process CSS.
+ * @see http://ace.c9.io/
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param bool true Use ACE to process the Custom CSS. Default to true.
+ */
+ apply_filters( 'safecss_use_ace', true )
+ );
- // Register safecss as a custom post_type
- // Explicit capability definitions are largely unnecessary because the posts are manipulated in code via an options page, managing CSS revisions does check the capabilities, so let's ensure that the proper caps are checked.
- register_post_type( 'safecss', array(
+ // Register safecss as a custom post_type
+ // Explicit capability definitions are largely unnecessary because the posts are manipulated in code via an options page, managing CSS revisions does check the capabilities, so let's ensure that the proper caps are checked.
+ register_post_type( 'safecss', array(
// These are the defaults
// 'exclude_from_search' => true,
// 'public' => false,
// 'publicly_queryable' => false,
// 'show_ui' => false,
- 'supports' => array( 'revisions' ),
- 'label' => 'Custom CSS',
- 'can_export' => false,
- 'rewrite' => false,
- 'capabilities' => array(
- 'edit_post' => 'edit_theme_options',
- 'read_post' => 'read',
- 'delete_post' => 'edit_theme_options',
- 'edit_posts' => 'edit_theme_options',
- 'edit_others_posts' => 'edit_theme_options',
- 'publish_posts' => 'edit_theme_options',
- 'read_private_posts' => 'read'
- )
- ) );
+ 'supports' => array( 'revisions' ),
+ 'label' => 'Custom CSS',
+ 'can_export' => false,
+ 'rewrite' => false,
+ 'capabilities' => array(
+ 'edit_post' => 'edit_theme_options',
+ 'read_post' => 'read',
+ 'delete_post' => 'edit_theme_options',
+ 'edit_posts' => 'edit_theme_options',
+ 'edit_others_posts' => 'edit_theme_options',
+ 'publish_posts' => 'edit_theme_options',
+ 'read_private_posts' => 'read'
+ )
+ ) );
// Short-circuit WP if this is a CSS stylesheet request
if ( isset( $_GET['custom-css'] ) ) {
@@ -60,9 +75,10 @@ class Jetpack_Custom_CSS {
/**
* Allows additional work when migrating safecss from wp_options to wp_post.
*
- * @since ?
- * @module Custom_CSS
- **/
+ * @module custom-css
+ *
+ * @since 1.7.0
+ */
do_action( 'safecss_migrate_post' );
}
@@ -163,11 +179,19 @@ class Jetpack_Custom_CSS {
* - content_save_pre
* - content_filtered_save_pre
*
- * @since ?
- * @module Custom_CSS
- * @see self::save() for proper $args fields
- * @param array $args See Jetpack_Custom_CSS::save() docblock for more
- **/
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param array $args {
+ * Array of custom CSS arguments.
+ * @type string $css The CSS (or LESS or Sass).
+ * @type bool $is_preview Whether this CSS is preview or published.
+ * @type string preprocessor Which CSS preprocessor to use.
+ * @type bool $add_to_existing Whether this CSS replaces the theme's CSS or supplements it.
+ * @type int $content_width A custom $content_width to go along with this CSS.
+ * }
+ */
do_action( 'safecss_save_pre', $args );
$warnings = array();
@@ -210,28 +234,32 @@ class Jetpack_Custom_CSS {
/**
* Fires before parsing the css with CSSTidy, but only if
- * the preprocessor is not configured for use
+ * the preprocessor is not configured for use.
*
- * @since ?
- * @module Custom_CSS
- * @param csstidy The csstidy object
- * @param string $css
- * @param array $args. See self::save() docblock for proper $args fields
- **/
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param obj $csstidy The csstidy object.
+ * @param string $css Custom CSS.
+ * @param array $args Array of custom CSS arguments.
+ */
do_action( 'safecss_parse_pre', $csstidy, $css, $args );
$csstidy->parse( $css );
/**
- * Fires after parsing the css with CSSTidy, but only if
- * the preprocessor is not cinfigured for use
+ * Fires after parsing the css with CSSTidy, but only if
+ * the preprocessor is not cinfigured for use.
*
- * @since ?
- * @module Custom_CSS
- * @param csstidy $csstidy The csstidy object
- * @param array $warnings
- * @param array $args - See self::save() docblock for proper $args fields
- **/
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param obj $csstidy The csstidy object.
+ * @param array $warnings Array of warnings.
+ * @param array $args Array of custom CSS arguments.
+ */
do_action( 'safecss_parse_post', $csstidy, $warnings, $args );
$css = $csstidy->print->plain();
@@ -260,11 +288,13 @@ class Jetpack_Custom_CSS {
return $safecss_revision_id;
}
- // Freetrial only.
-
/**
- * @todo figure out what this is
- **/
+ * Fires after saving Custom CSS.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ */
do_action( 'safecss_save_preview_post' );
}
@@ -311,6 +341,23 @@ class Jetpack_Custom_CSS {
* @return int|bool The post ID if it exists; false otherwise.
*/
static function post_id() {
+ /**
+ * Filter the ID of the post where Custom CSS is stored, before the ID is retrieved.
+ *
+ * If the callback function returns a non-null value, then post_id() will immediately
+ * return that value, instead of retrieving the normal post ID.
+ *
+ * @module custom-css
+ *
+ * @since 3.8.1
+ *
+ * @param null null The ID to return instead of the normal ID.
+ */
+ $custom_css_post_id = apply_filters( 'jetpack_custom_css_pre_post_id', null );
+ if ( ! is_null( $custom_css_post_id ) ) {
+ return $custom_css_post_id;
+ }
+
$custom_css_post_id = wp_cache_get( 'custom_css_post_id' );
if ( false === $custom_css_post_id ) {
@@ -434,6 +481,15 @@ class Jetpack_Custom_CSS {
}
static function skip_stylesheet() {
+ /**
+ * Prevent the Custom CSS stylesheet from being enqueued.
+ *
+ * @module custom-css
+ *
+ * @since 2.2.1
+ *
+ * @param null Should the stylesheet be skipped. Default to null. Anything else will force the stylesheet to be skipped.
+ */
$skip_stylesheet = apply_filters( 'safecss_skip_stylesheet', null );
if ( null !== $skip_stylesheet ) {
@@ -472,7 +528,7 @@ class Jetpack_Custom_CSS {
}
/**
- * Currently this filter function gets called on
+ * Currently this filter function gets called on
* 'template_redirect' action and
* 'admin_init' action
*/
@@ -490,10 +546,43 @@ class Jetpack_Custom_CSS {
* Used only on WordPress.com.
*/
static function is_freetrial() {
+ /**
+ * Determine if a WordPress.com site uses a Free trial of the Custom Design Upgrade.
+ * Used only on WordPress.com.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param bool false Does the site use a Free trial of the Custom Design Upgrade. Default to false.
+ */
return apply_filters( 'safecss_is_freetrial', false );
}
+ static function get_preprocessor_key() {
+ $safecss_post = Jetpack_Custom_CSS::get_current_revision();
+ return get_post_meta( $safecss_post['ID'], 'custom_css_preprocessor', true );
+ }
+
+ static function get_preprocessor() {
+ /** This filter is documented in modules/custom-css/custom-css.php */
+ $preprocessors = apply_filters( 'jetpack_custom_css_preprocessors', array() );
+ $selected_preprocessor_key = self::get_preprocessor_key();
+ $selected_preprocessor = isset( $preprocessors[ $selected_preprocessor_key ] ) ? $preprocessors[ $selected_preprocessor_key ] : null;
+ return $selected_preprocessor;
+ }
+
static function get_css( $compressed = false ) {
+ /**
+ * Filter the Custom CSS returned.
+ * Can be used to return an error, or no CSS at all.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param bool false Should we return an error instead of the Custom CSS. Default to false.
+ */
$default_css = apply_filters( 'safecss_get_css_error', false );
if ( $default_css !== false )
@@ -538,6 +627,15 @@ class Jetpack_Custom_CSS {
if ( empty( $css ) ) {
$css = "/*\n"
. wordwrap(
+ /**
+ * Filter the default message displayed in the Custom CSS editor.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param string $str Default Custom CSS editor content.
+ */
apply_filters(
'safecss_default_css',
__(
@@ -549,6 +647,15 @@ class Jetpack_Custom_CSS {
. "\n*/";
}
+ /**
+ * Filter the Custom CSS returned from the editor.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param string $css Custom CSS.
+ */
$css = apply_filters( 'safecss_css', $css );
return $css;
@@ -564,13 +671,14 @@ class Jetpack_Custom_CSS {
}
static function print_css() {
-
+
/**
- * Fires right before printing the custom CSS inside the <head> element
+ * Fires right before printing the custom CSS inside the <head> element.
*
- * @since ?
- * @module Custom_CSS
- **/
+ * @module custom-css
+ *
+ * @since 1.7.0
+ */
do_action( 'safecss_print_pre' );
$css = Jetpack_Custom_CSS::get_css( true );
echo self::replace_insecure_urls( $css );
@@ -584,8 +692,21 @@ class Jetpack_Custom_CSS {
static function link_tag() {
global $blog_id, $current_blog;
- if ( apply_filters( 'safecss_style_error', false ) )
+ if (
+ /**
+ * Do not include any CSS on the page if the CSS includes an error.
+ * Setting this filter to true stops any Custom CSS from being enqueued.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param bool false Does the CSS include an error. Default to false.
+ */
+ apply_filters( 'safecss_style_error', false )
+ ) {
return;
+ }
if ( ! is_super_admin() && isset( $current_blog ) && ( 1 == $current_blog->spam || 1 == $current_blog->deleted ) )
return;
@@ -633,7 +754,19 @@ class Jetpack_Custom_CSS {
if ( $css == '' )
return;
- if ( apply_filters( 'safecss_embed_style', false, $css ) ) {
+ if (
+ /**
+ * Allow inserting CSS inline instead of through a separate file.
+ *
+ * @module custom-css
+ *
+ * @since 3.4.0
+ *
+ * @param bool false Should the CSS be added inline instead of through a separate file. Default to false.
+ * @param string $css Custom CSS.
+ */
+ apply_filters( 'safecss_embed_style', false, $css )
+ ) {
echo "\r\n" . '<style id="custom-css-css">' . Jetpack_Custom_CSS::get_css( true ) . "</style>\r\n";
@@ -645,6 +778,16 @@ class Jetpack_Custom_CSS {
$href = add_query_arg( 'cscache', 6, $href );
$href = add_query_arg( 'csrev', (int) get_option( $option . '_rev' ), $href );
+ /**
+ * Filter the Custom CSS link enqueued in the head.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param string $href Custom CSS link enqueued in the head.
+ * @param string $blog_id Blog ID.
+ */
$href = apply_filters( 'safecss_href', $href, $blog_id );
if ( Jetpack_Custom_CSS::is_preview() )
@@ -657,12 +800,12 @@ class Jetpack_Custom_CSS {
}
/**
- * Fires after creating the <link> in the <head> element
- * for the custom css stylesheet
+ * Fires after creating the <link> in the <head> element for the custom css stylesheet.
*
- * @since ?
- * @module Custom_CSS
- **/
+ * @module custom-css
+ *
+ * @since 2.2.2
+ */
do_action( 'safecss_link_tag_post' );
}
@@ -670,7 +813,16 @@ class Jetpack_Custom_CSS {
if ( Jetpack_Custom_CSS::is_freetrial() && ( ! Jetpack_Custom_CSS::is_preview() || ! current_user_can( 'switch_themes' ) ) )
return $current;
else if ( Jetpack_Custom_CSS::skip_stylesheet() )
- return apply_filters( 'safecss_style_filter_url', plugins_url( 'custom-css/blank.css', __FILE__ ) );
+ /**
+ * Filter the default blank Custom CSS URL.
+ *
+ * @module custom-css
+ *
+ * @since 2.2.1
+ *
+ * @param string $url Default blank Custom CSS URL.
+ */
+ return apply_filters( 'safecss_style_filter_url', plugins_url( 'custom-css/css/blank.css', __FILE__ ) );
return $current;
}
@@ -698,6 +850,15 @@ class Jetpack_Custom_CSS {
return;
$message = esc_html__( 'Preview: changes must be saved or they will be lost', 'jetpack' );
+ /**
+ * Filter the Preview message displayed on the site when previewing custom CSS, before to save it.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param string $message Custom CSS preview message.
+ */
$message = apply_filters( 'safecss_preview_message', $message );
$preview_flag_js = "var flag = document.createElement('div');
@@ -707,11 +868,20 @@ class Jetpack_Custom_CSS {
flag.style.textAlign = 'center';
flag.style.fontSize = '15px';
flag.style.padding = '2px';
- flag.style.fontFamily = 'sans-serif';
+ flag.style.fontFamily = 'sans-serif';
document.body.style.paddingTop = '0px';
document.body.insertBefore(flag, document.body.childNodes[0]);
";
+ /**
+ * Filter the Custom CSS preview message JS styling.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param string $preview_flag_js Custom CSS preview message JS styling.
+ */
$preview_flag_js = apply_filters( 'safecss_preview_flag_js', $preview_flag_js );
if ( $preview_flag_js ) {
$preview_flag_js = '<script type="text/javascript">
@@ -793,28 +963,41 @@ class Jetpack_Custom_CSS {
add_meta_box( 'revisionsdiv', __( 'CSS Revisions', 'jetpack' ), array( __CLASS__, 'revisions_meta_box' ), 'editcss', 'side' );
?>
<div class="wrap">
- <?php
-
+ <?php
+
/**
- * Fire right before the custom css page begins
+ * Fires right before the custom css page begins.
*
- * @since ?
- * @module Custom_CSS
- **/
- do_action( 'custom_design_header' );
-
+ * @module custom-css
+ *
+ * @since 1.7.0
+ */
+ do_action( 'custom_design_header' );
+
?>
- <h2><?php _e( 'CSS Stylesheet Editor', 'jetpack' ); ?></h2>
+ <h1><?php _e( 'CSS Stylesheet Editor', 'jetpack' ); ?></h1>
<form id="safecssform" action="" method="post">
<?php wp_nonce_field( 'safecss' ) ?>
<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
<input type="hidden" name="action" value="save" />
<div id="poststuff">
- <p class="css-support"><?php echo apply_filters( 'safecss_intro_text', __( 'New to CSS? Start with a <a href="http://www.htmldog.com/guides/cssbeginner/">beginner tutorial</a>. Questions?
- Ask in the <a href="http://wordpress.org/support/forum/themes-and-templates">Themes and Templates forum</a>.', 'jetpack' ) ); ?></p>
+ <p class="css-support">
+ <?php
+ /**
+ * Filter the intro text appearing above the Custom CSS Editor.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param string $str Intro text appearing above the Custom CSS editor.
+ */
+ echo apply_filters( 'safecss_intro_text', __( 'New to CSS? Start with a <a href="http://www.htmldog.com/guides/cssbeginner/">beginner tutorial</a>. Questions?
+ Ask in the <a href="http://wordpress.org/support/forum/themes-and-templates">Themes and Templates forum</a>.', 'jetpack' ) );
+ ?></p>
<p class="css-support"><?php echo __( 'Note: Custom CSS will be reset when changing themes.', 'jetpack' ); ?></p>
-
+
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<div class="postarea">
@@ -859,8 +1042,17 @@ class Jetpack_Custom_CSS {
<?php
printf(
- __( 'Limit width to %1$s pixels for videos, full size images, and other shortcodes. (<a href="%2$s">More info</a>.)', 'jetpack' ),
+ __( 'Limit width to %1$s pixels for full size images. (<a href="%2$s">More info</a>.)', 'jetpack' ),
'<input type="text" id="custom_content_width_visible" value="' . esc_attr( $custom_content_width ) . '" size="4" />',
+ /**
+ * Filter the Custom CSS limited width's support doc URL.
+ *
+ * @module custom-css
+ *
+ * @since 2.2.3
+ *
+ * @param string $url Custom CSS limited width's support doc URL.
+ */
apply_filters( 'safecss_limit_width_link', 'http://jetpack.me/support/custom-css/#limited-width' )
);
@@ -936,6 +1128,15 @@ class Jetpack_Custom_CSS {
<div id="misc-publishing-actions">
<?php
+ /**
+ * Filter the array of available Custom CSS preprocessors.
+ *
+ * @module custom-css
+ *
+ * @since 2.0.3
+ *
+ * @param array array() Empty by default.
+ */
$preprocessors = apply_filters( 'jetpack_custom_css_preprocessors', array() );
if ( ! empty( $preprocessors ) ) {
@@ -988,24 +1189,36 @@ class Jetpack_Custom_CSS {
<br />
<label>
<input type="radio" name="add_to_existing_display" value="false" <?php checked( ! $add_css ); ?>/>
- <?php printf( __( 'Replace <a href="%s">theme\'s CSS</a> <b>(Advanced)</b>', 'jetpack' ), apply_filters( 'safecss_theme_stylesheet_url', get_stylesheet_uri() ) ); ?>
+ <?php printf(
+ __( 'Replace <a href="%s">theme\'s CSS</a> <b>(Advanced)</b>', 'jetpack' ),
+ /**
+ * Filter the theme's stylesheet URL.
+ *
+ * @module custom-css
+ *
+ * @since 1.7.0
+ *
+ * @param string $url Active theme's stylesheet URL. Default to get_stylesheet_uri().
+ */
+ apply_filters( 'safecss_theme_stylesheet_url', get_stylesheet_uri() )
+ ); ?>
</label>
</p>
<a class="save-css-mode hide-if-no-js button" href="#css-mode"><?php esc_html_e( 'OK', 'jetpack' ); ?></a>
<a class="cancel-css-mode hide-if-no-js" href="#css-mode"><?php esc_html_e( 'Cancel', 'jetpack' ); ?></a>
</div>
</div>
- <?php
-
+ <?php
+
/**
- * Allows addition of elements to the submit box for custom css
- * on the wp-admin side
+ * Allows addition of elements to the submit box for custom css on the wp-admin side.
*
- * @since ?
- * @module Custom_CSS
- **/
- do_action( 'custom_css_submitbox_misc_actions' );
-
+ * @module custom-css
+ *
+ * @since 2.0.3
+ */
+ do_action( 'custom_css_submitbox_misc_actions' );
+
?>
</div>
</div>
@@ -1078,7 +1291,7 @@ class Jetpack_Custom_CSS {
if ( $revisions->found_posts > 6 && !$show_all_revisions ) {
?>
<br>
- <a href="<?php echo add_query_arg( 'show_all_rev', 'true', menu_page_url( 'editcss', false ) ); ?>"><?php esc_html_e( 'Show more', 'jetpack' ); ?></a>
+ <a href="<?php echo add_query_arg( 'show_all_rev', 'true', menu_page_url( 'editcss', false ) ); ?>"><?php esc_html_e( 'Show all', 'jetpack' ); ?></a>
<?php
}
}
@@ -1130,6 +1343,7 @@ class Jetpack_Custom_CSS {
return '';
if ( $preprocessor ) {
+ /** This filter is documented in modules/custom-css/custom-css.php */
$preprocessors = apply_filters( 'jetpack_custom_css_preprocessors', array() );
if ( isset( $preprocessors[$preprocessor] ) ) {
@@ -1268,20 +1482,31 @@ class Jetpack_Custom_CSS {
}
}
- static function revision_redirect( $redirect ) {
- global $post;
+ /**
+ * Adds a filter to the redirect location in `wp-admin/revisions.php`.
+ */
+ static function add_revision_redirect() {
+ add_filter( 'wp_redirect', array( __CLASS__, 'revision_redirect' ) );
+ }
- if ( 'safecss' == $post->post_type ) {
- if ( strstr( $redirect, 'action=edit' ) ) {
- return 'themes.php?page=editcss';
- }
+ /**
+ * Filters the redirect location in `wp-admin/revisions.php`.
+ *
+ * @param string $location The path to redirect to.
+ * @return string
+ */
+ static function revision_redirect( $location ) {
+ $post = get_post();
- if ( 'edit.php' == $redirect ) {
- return '';
+ if ( ! empty( $post->post_type ) && 'safecss' == $post->post_type ) {
+ $location = 'themes.php?page=editcss';
+
+ if ( 'edit.php' == $location ) {
+ $location = '';
}
}
- return $redirect;
+ return $location;
}
static function revision_post_link( $post_link, $post_id, $context ) {
@@ -1584,19 +1809,21 @@ function safecss_class() {
require_once( dirname( __FILE__ ) . '/csstidy/class.csstidy.php' );
class safecss extends csstidy_optimise {
- function safecss( &$css ) {
+ function __construct( &$css ) {
return $this->csstidy_optimise( $css );
}
function postparse() {
-
+
/**
- * Do actions after parsing the css
+ * Fires after parsing the css.
*
- * @since ?
- * @module Custom_CSS
- * @param safecss $obj
- **/
+ * @module custom-css
+ *
+ * @since 1.8.0
+ *
+ * @param obj $this CSSTidy object.
+ */
do_action( 'csstidy_optimize_postparse', $this );
return parent::postparse();
@@ -1605,11 +1832,13 @@ function safecss_class() {
function subvalue() {
/**
- * Do action before optimizing the subvalue
+ * Fires before optimizing the Custom CSS subvalue.
+ *
+ * @module custom-css
+ *
+ * @since 1.8.0
*
- * @since ?
- * @module Custom_CSS
- * @param safecss $obj
+ * @param obj $this CSSTidy object.
**/
do_action( 'csstidy_optimize_subvalue', $this );
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/blank.css b/plugins/jetpack/modules/custom-css/custom-css/css/blank.css
new file mode 100644
index 00000000..c84ecefc
--- /dev/null
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/blank.css
@@ -0,0 +1 @@
+/* */ \ No newline at end of file
diff --git a/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php b/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php
index 48e4f82d..424591e7 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php
+++ b/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php
@@ -1,18 +1,18 @@
<?php
/**
- * lessphp v0.4.0
+ * lessphp v0.5.0
* http://leafo.net/lessphp
*
- * LESS css compiler, adapted from http://lesscss.org
+ * LESS CSS compiler, adapted from http://lesscss.org
*
- * Copyright 2012, Leaf Corcoran <leafot@gmail.com>
+ * Copyright 2013, Leaf Corcoran <leafot@gmail.com>
* Licensed under MIT or GPLv3, see LICENSE
*/
/**
- * The less compiler and parser.
+ * The LESS compiler and parser.
*
* Converting LESS to CSS is a three stage process. The incoming file is parsed
* by `lessc_parser` into a syntax tree, then it is compiled into another tree
@@ -27,7 +27,7 @@
*
* In summary:
*
- * The `lessc` class creates an intstance of the parser, feeds it LESS code,
+ * The `lessc` class creates an instance of the parser, feeds it LESS code,
* then transforms the resulting tree to a CSS tree. This class also holds the
* evaluation context, such as all available mixins and variables at any given
* time.
@@ -38,9 +38,10 @@
* handling things like indentation.
*/
class lessc {
- static public $VERSION = "v0.4.0";
- static protected $TRUE = array("keyword", "true");
- static protected $FALSE = array("keyword", "false");
+ static public $VERSION = "v0.5.0";
+
+ static public $TRUE = array("keyword", "true");
+ static public $FALSE = array("keyword", "false");
protected $libFunctions = array();
protected $registeredVars = array();
@@ -62,8 +63,6 @@ class lessc {
protected $sourceParser = null;
protected $sourceLoc = null;
- static public $defaultValue = array("keyword", "");
-
static protected $nextImportId = 0; // uniquely identify imports
// attempts to find the path of an import url, returns null for css files
@@ -283,39 +282,73 @@ class lessc {
foreach ($this->sortProps($block->props) as $prop) {
$this->compileProp($prop, $block, $out);
}
+ $out->lines = $this->deduplicate($out->lines);
+ }
+
+ /**
+ * Deduplicate lines in a block. Comments are not deduplicated. If a
+ * duplicate rule is detected, the comments immediately preceding each
+ * occurence are consolidated.
+ */
+ protected function deduplicate($lines) {
+ $unique = array();
+ $comments = array();
- $out->lines = array_values(array_unique($out->lines));
+ foreach($lines as $line) {
+ if (strpos($line, '/*') === 0) {
+ $comments[] = $line;
+ continue;
+ }
+ if (!in_array($line, $unique)) {
+ $unique[] = $line;
+ }
+ array_splice($unique, array_search($line, $unique), 0, $comments);
+ $comments = array();
+ }
+ return array_merge($unique, $comments);
}
protected function sortProps($props, $split = false) {
$vars = array();
$imports = array();
$other = array();
+ $stack = array();
foreach ($props as $prop) {
switch ($prop[0]) {
+ case "comment":
+ $stack[] = $prop;
+ break;
case "assign":
+ $stack[] = $prop;
if (isset($prop[1][0]) && $prop[1][0] == $this->vPrefix) {
- $vars[] = $prop;
+ $vars = array_merge($vars, $stack);
} else {
- $other[] = $prop;
+ $other = array_merge($other, $stack);
}
+ $stack = array();
break;
case "import":
$id = self::$nextImportId++;
$prop[] = $id;
- $imports[] = $prop;
+ $stack[] = $prop;
+ $imports = array_merge($imports, $stack);
$other[] = array("import_mixin", $id);
+ $stack = array();
break;
default:
- $other[] = $prop;
+ $stack[] = $prop;
+ $other = array_merge($other, $stack);
+ $stack = array();
+ break;
}
}
+ $other = array_merge($other, $stack);
if ($split) {
- return array(array_merge($vars, $imports), $other);
+ return array(array_merge($imports, $vars), $other);
} else {
- return array_merge($vars, $imports, $other);
+ return array_merge($imports, $vars, $other);
}
}
@@ -537,7 +570,7 @@ class lessc {
return true; // not having enough is handled above
} else {
$numMatched = $i + 1;
- // greater than because default values always match
+ // greater than becuase default values always match
return $numMatched >= count($orderedArgs);
}
}
@@ -684,8 +717,7 @@ class lessc {
$mixins = $this->findBlocks($block, $path, $orderedArgs, $keywordArgs);
if ($mixins === null) {
- // fwrite(STDERR,"failed to find block: ".implode(" > ", $path)."\n");
- break; // throw error here??
+ $this->throwError("{$prop[1][0]} is undefined");
}
foreach ($mixins as $mixin) {
@@ -787,7 +819,7 @@ class lessc {
* The input is expected to be reduced. This function will not work on
* things like expressions and variables.
*/
- protected function compileValue($value) {
+ public function compileValue($value) {
switch ($value[0]) {
case 'list':
// [1] - delimiter
@@ -951,6 +983,39 @@ class lessc {
return $this->lib_rgbahex($color);
}
+ /**
+ * Given an url, decide whether to output a regular link or the base64-encoded contents of the file
+ *
+ * @param array $value either an argument list (two strings) or a single string
+ * @return string formatted url(), either as a link or base64-encoded
+ */
+ protected function lib_data_uri($value) {
+ $mime = ($value[0] === 'list') ? $value[2][0][2] : null;
+ $url = ($value[0] === 'list') ? $value[2][1][2][0] : $value[2][0];
+
+ $fullpath = $this->findImport($url);
+
+ if($fullpath && ($fsize = filesize($fullpath)) !== false) {
+ // IE8 can't handle data uris larger than 32KB
+ if($fsize/1024 < 32) {
+ if(is_null($mime)) {
+ if(class_exists('finfo')) { // php 5.3+
+ $finfo = new finfo(FILEINFO_MIME);
+ $mime = explode('; ', $finfo->file($fullpath));
+ $mime = $mime[0];
+ } elseif(function_exists('mime_content_type')) { // PHP 5.2
+ $mime = mime_content_type($fullpath);
+ }
+ }
+
+ if(!is_null($mime)) // fallback if the mime type is still unknown
+ $url = sprintf('data:%s;base64,%s', $mime, base64_encode(file_get_contents($fullpath)));
+ }
+ }
+
+ return 'url("'.$url.'")';
+ }
+
// utility func to unquote a string
protected function lib_e($arg) {
switch ($arg[0]) {
@@ -959,7 +1024,7 @@ class lessc {
if (isset($items[0])) {
return $this->lib_e($items[0]);
}
- return self::$defaultValue;
+ $this->throwError("unrecognised input");
case "string":
$arg[1] = "";
return $arg;
@@ -1009,8 +1074,14 @@ class lessc {
}
protected function lib_round($arg) {
- $value = $this->assertNumber($arg);
- return array("number", round($value), $arg[2]);
+ if($arg[0] != "list") {
+ $value = $this->assertNumber($arg);
+ return array("number", round($value), $arg[2]);
+ } else {
+ $value = $this->assertNumber($arg[2][0]);
+ $precision = $this->assertNumber($arg[2][1]);
+ return array("number", round($value, $precision), $arg[2][0][2]);
+ }
}
protected function lib_unit($arg) {
@@ -1027,7 +1098,7 @@ class lessc {
* Helper function to get arguments for color manipulation functions.
* takes a list that contains a color like thing and a percentage
*/
- protected function colorArgs($args) {
+ public function colorArgs($args) {
if ($args[0] != 'list' || count($args[2]) < 2) {
return array(array('color', 0, 0, 0), 0);
}
@@ -1168,36 +1239,56 @@ class lessc {
}
protected function lib_contrast($args) {
- if ($args[0] != 'list' || count($args[2]) < 3) {
- return array(array('color', 0, 0, 0), 0);
- }
+ $darkColor = array('color', 0, 0, 0);
+ $lightColor = array('color', 255, 255, 255);
+ $threshold = 0.43;
- list($inputColor, $darkColor, $lightColor) = $args[2];
+ if ( $args[0] == 'list' ) {
+ $inputColor = ( isset($args[2][0]) ) ? $this->assertColor($args[2][0]) : $lightColor;
+ $darkColor = ( isset($args[2][1]) ) ? $this->assertColor($args[2][1]) : $darkColor;
+ $lightColor = ( isset($args[2][2]) ) ? $this->assertColor($args[2][2]) : $lightColor;
+ $threshold = ( isset($args[2][3]) ) ? $this->assertNumber($args[2][3]) : $threshold;
+ }
+ else {
+ $inputColor = $this->assertColor($args);
+ }
- $inputColor = $this->assertColor($inputColor);
- $darkColor = $this->assertColor($darkColor);
- $lightColor = $this->assertColor($lightColor);
- $hsl = $this->toHSL($inputColor);
+ $inputColor = $this->coerceColor($inputColor);
+ $darkColor = $this->coerceColor($darkColor);
+ $lightColor = $this->coerceColor($lightColor);
- if ($hsl[3] > 50) {
- return $darkColor;
- }
+ //Figure out which is actually light and dark!
+ if ( $this->lib_luma($darkColor) > $this->lib_luma($lightColor) ) {
+ $t = $lightColor;
+ $lightColor = $darkColor;
+ $darkColor = $t;
+ }
- return $lightColor;
+ $inputColor_alpha = $this->lib_alpha($inputColor);
+ if ( ( $this->lib_luma($inputColor) * $inputColor_alpha) < $threshold) {
+ return $lightColor;
+ }
+ return $darkColor;
}
- protected function assertColor($value, $error = "expected color value") {
+ protected function lib_luma($color) {
+ $color = $this->coerceColor($color);
+ return (0.2126 * $color[0] / 255) + (0.7152 * $color[1] / 255) + (0.0722 * $color[2] / 255);
+ }
+
+
+ public function assertColor($value, $error = "expected color value") {
$color = $this->coerceColor($value);
if (is_null($color)) $this->throwError($error);
return $color;
}
- protected function assertNumber($value, $error = "expecting number") {
+ public function assertNumber($value, $error = "expecting number") {
if ($value[0] == "number") return $value[1];
$this->throwError($error);
}
- protected function assertArgs($value, $expectedArgs, $name="") {
+ public function assertArgs($value, $expectedArgs, $name="") {
if ($expectedArgs == 1) {
return $value;
} else {
@@ -1381,7 +1472,7 @@ class lessc {
}
$seen[$key] = true;
- $out = $this->reduce($this->get($key, self::$defaultValue));
+ $out = $this->reduce($this->get($key));
$seen[$key] = false;
return $out;
case "list":
@@ -1409,8 +1500,9 @@ class lessc {
list(, $name, $args) = $value;
if ($name == "%") $name = "_sprintf";
+
$f = isset($this->libFunctions[$name]) ?
- $this->libFunctions[$name] : array($this, 'lib_'.$name);
+ $this->libFunctions[$name] : array($this, 'lib_'.str_replace('-', '_', $name));
if (is_callable($f)) {
if ($args[0] == 'list')
@@ -1517,7 +1609,7 @@ class lessc {
return $value;
}
- protected function toBool($a) {
+ public function toBool($a) {
if ($a) return self::$TRUE;
else return self::$FALSE;
}
@@ -1740,7 +1832,7 @@ class lessc {
// get the highest occurrence entry for a name
- protected function get($name, $default=null) {
+ protected function get($name) {
$current = $this->env;
$isArguments = $name == $this->vPrefix . 'arguments';
@@ -1757,7 +1849,7 @@ class lessc {
}
}
- return $default;
+ $this->throwError("variable $name is undefined");
}
// inject array of unparsed strings into environment as variables
@@ -1993,14 +2085,14 @@ class lessc {
return $this->allParsedFiles;
}
- protected function addParsedFile($file) {
+ public function addParsedFile($file) {
$this->allParsedFiles[realpath($file)] = filemtime($file);
}
/**
* Uses the current value of $this->count to show line and line number
*/
- protected function throwError($msg = null) {
+ public function throwError($msg = null) {
if ($this->sourceLoc >= 0) {
$this->sourceParser->throwError($msg, $this->sourceLoc);
}
@@ -2204,7 +2296,7 @@ class lessc_parser {
// regex string to match any of the operators
static protected $operatorString;
- // these properties will suppress division unless it's inside parenthases
+ // these properties will supress division unless it's inside parenthases
static protected $supressDivisionProps =
array('/border-radius$/i', '/^font$/i');
@@ -2266,14 +2358,13 @@ class lessc_parser {
$this->whitespace();
// parse the entire file
- $lastCount = $this->count;
while (false !== $this->parseChunk());
if ($this->count != strlen($this->buffer))
$this->throwError();
// TODO report where the block was opened
- if (!is_null($this->env->parent))
+ if ( !property_exists($this->env, 'parent') || !is_null($this->env->parent) )
throw new exception('parse error: unclosed block');
return $this->env;
@@ -2319,6 +2410,10 @@ class lessc_parser {
if (empty($this->buffer)) return false;
$s = $this->seek();
+ if ($this->whitespace()) {
+ return true;
+ }
+
// setting a property
if ($this->keyword($key) && $this->assign() &&
$this->propertyValue($value, $key) && $this->end())
@@ -2399,7 +2494,7 @@ class lessc_parser {
}
// opening a simple block
- if ($this->tags($tags) && $this->literal('{')) {
+ if ($this->tags($tags) && $this->literal('{', false)) {
$tags = $this->fixTags($tags);
$this->pushBlock($tags);
return true;
@@ -2674,7 +2769,6 @@ class lessc_parser {
// an import statement
protected function import(&$out) {
- $s = $this->seek();
if (!$this->literal('@import')) return false;
// @import "something.css" media;
@@ -3034,7 +3128,6 @@ class lessc_parser {
// list of tags of specifying mixin path
// optionally separated by > (lazy, accepts extra >)
protected function mixinTags(&$tags) {
- $s = $this->seek();
$tags = array();
while ($this->tag($tt, true)) {
$tags[] = $tt;
@@ -3262,7 +3355,7 @@ class lessc_parser {
// consume an end of statement delimiter
protected function end() {
- if ($this->literal(';')) {
+ if ($this->literal(';', false)) {
return true;
} elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
// if there is end of file or a closing block next then we don't need a ;
@@ -3411,9 +3504,9 @@ class lessc_parser {
if ($this->writeComments) {
$gotWhite = false;
while (preg_match(self::$whitePattern, $this->buffer, $m, null, $this->count)) {
- if (isset($m[1]) && empty($this->commentsSeen[$this->count])) {
+ if (isset($m[1]) && empty($this->seenComments[$this->count])) {
$this->append(array("comment", $m[1]));
- $this->commentsSeen[$this->count] = true;
+ $this->seenComments[$this->count] = true;
}
$this->count += strlen($m[0]);
$gotWhite = true;
diff --git a/plugins/jetpack/modules/custom-post-types/comics.php b/plugins/jetpack/modules/custom-post-types/comics.php
index 0170512b..97e1a980 100644
--- a/plugins/jetpack/modules/custom-post-types/comics.php
+++ b/plugins/jetpack/modules/custom-post-types/comics.php
@@ -217,18 +217,21 @@ class Jetpack_Comic {
register_post_type( self::POST_TYPE, array(
'description' => __( 'Comics', 'jetpack' ),
'labels' => array(
- 'name' => esc_html__( 'Comics', 'jetpack' ),
- 'singular_name' => esc_html__( 'Comic', 'jetpack' ),
- 'menu_name' => esc_html__( 'Comics', 'jetpack' ),
- 'all_items' => esc_html__( 'All Comics', 'jetpack' ),
- 'add_new' => esc_html__( 'Add New', 'jetpack' ),
- 'add_new_item' => esc_html__( 'Add New Comic', 'jetpack' ),
- 'edit_item' => esc_html__( 'Edit Comic', 'jetpack' ),
- 'new_item' => esc_html__( 'New Comic', 'jetpack' ),
- 'view_item' => esc_html__( 'View Comic', 'jetpack' ),
- 'search_items' => esc_html__( 'Search Comics', 'jetpack' ),
- 'not_found' => esc_html__( 'No Comics found', 'jetpack' ),
- 'not_found_in_trash' => esc_html__( 'No Comics found in Trash', 'jetpack' ),
+ 'name' => esc_html__( 'Comics', 'jetpack' ),
+ 'singular_name' => esc_html__( 'Comic', 'jetpack' ),
+ 'menu_name' => esc_html__( 'Comics', 'jetpack' ),
+ 'all_items' => esc_html__( 'All Comics', 'jetpack' ),
+ 'add_new' => esc_html__( 'Add New', 'jetpack' ),
+ 'add_new_item' => esc_html__( 'Add New Comic', 'jetpack' ),
+ 'edit_item' => esc_html__( 'Edit Comic', 'jetpack' ),
+ 'new_item' => esc_html__( 'New Comic', 'jetpack' ),
+ 'view_item' => esc_html__( 'View Comic', 'jetpack' ),
+ 'search_items' => esc_html__( 'Search Comics', 'jetpack' ),
+ 'not_found' => esc_html__( 'No Comics found', 'jetpack' ),
+ 'not_found_in_trash' => esc_html__( 'No Comics found in Trash', 'jetpack' ),
+ 'filter_items_list' => esc_html__( 'Filter comics list', 'jetpack' ),
+ 'items_list_navigation' => esc_html__( 'Comics list navigation', 'jetpack' ),
+ 'items_list' => esc_html__( 'Comics list', 'jetpack' ),
),
'supports' => array(
'title',
@@ -331,8 +334,9 @@ class Jetpack_Comic {
|| current_theme_supports( self::POST_TYPE )
|| get_stylesheet() == 'pub/panel' );
restore_current_blog();
- /** This action is documented in modules/custom-post-types/nova.php */
- return (bool) apply_filters( 'jetpack_enable_cpt', $supports_comics, self::POST_TYPE );
+
+ /** This action is documented in modules/custom-post-types/nova.php */
+ return (bool) apply_filters( 'jetpack_enable_cpt', $supports_comics, self::POST_TYPE );
}
$supports_comics = false;
@@ -352,11 +356,11 @@ class Jetpack_Comic {
$supports_comics = true;
}
- /**
+ /**
* Filter it in case something else knows better.
*/
- /** This action is documented in modules/custom-post-types/nova.php */
- return (bool) apply_filters( 'jetpack_enable_cpt', $supports_comics, self::POST_TYPE );
+ /** This action is documented in modules/custom-post-types/nova.php */
+ return (bool) apply_filters( 'jetpack_enable_cpt', $supports_comics, self::POST_TYPE );
}
/**
diff --git a/plugins/jetpack/modules/custom-post-types/css/nova-font.css b/plugins/jetpack/modules/custom-post-types/css/nova-font.css
index 5358f8f6..ac1b9067 100644
--- a/plugins/jetpack/modules/custom-post-types/css/nova-font.css
+++ b/plugins/jetpack/modules/custom-post-types/css/nova-font.css
@@ -11,7 +11,8 @@
}
#menu-posts-nova_menu_item:before,
-#dashboard_right_now .nova-menu-count a:before {
+#dashboard_right_now .nova-menu-count a:before,
+#dashboard_right_now .nova-menu-count span:before {
font-family: 'nova-font';
speak: none;
font-style: normal;
@@ -24,6 +25,6 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
-#dashboard_right_now .nova-menu-count a:before {
+#dashboard_right_now .nova-menu-count a:before, #dashboard_right_now .nova-menu-count span:before {
content: '\e603';
} \ No newline at end of file
diff --git a/plugins/jetpack/modules/custom-post-types/css/testimonial-shortcode.css b/plugins/jetpack/modules/custom-post-types/css/testimonial-shortcode.css
index 1955e0ed..57a35bc8 100644
--- a/plugins/jetpack/modules/custom-post-types/css/testimonial-shortcode.css
+++ b/plugins/jetpack/modules/custom-post-types/css/testimonial-shortcode.css
@@ -79,6 +79,7 @@
font-weight: 700;
margin: 0;
padding: 0;
+ display: block;
}
.testimonial-featured-image + .testimonial-entry-title {
diff --git a/plugins/jetpack/modules/custom-post-types/nova.php b/plugins/jetpack/modules/custom-post-types/nova.php
index 58b931ae..7419cbd2 100644
--- a/plugins/jetpack/modules/custom-post-types/nova.php
+++ b/plugins/jetpack/modules/custom-post-types/nova.php
@@ -1,16 +1,6 @@
<?php
/*
- * Plugin Name: Nova - Restaurant Websites Shouldn't Suck
- * Plugin URI: http://wordpress.org/extend/plugins/nova/
- * Author: Automattic
- * Version: 0.1
- * License: GPL2+
- * Text Domain: nova
- * Domain Path: /languages/
- */
-
-/*
* Put the following code in your theme's Food Menu Page Template to customize the markup of the menu.
if ( class_exists( 'Nova_Restaurant' ) ) {
@@ -40,7 +30,7 @@ class Nova_Restaurant {
const MENU_ITEM_LABEL_TAX = 'nova_menu_item_label';
const MENU_TAX = 'nova_menu';
- var $version = '0.1';
+ public $version = '0.1';
protected $default_menu_item_loop_markup = array(
'menu_tag' => 'section',
@@ -117,6 +107,8 @@ class Nova_Restaurant {
/**
* Allow something else to hook in and enable this CPT.
*
+ * @module custom-content-types
+ *
* @since 2.6.0
*
* @param bool false Whether or not to enable this CPT.
@@ -131,70 +123,83 @@ class Nova_Restaurant {
* Register Taxonomies and Post Type
*/
function register_taxonomies() {
- register_taxonomy( self::MENU_ITEM_LABEL_TAX, self::MENU_ITEM_POST_TYPE, array(
- 'labels' => array(
- 'name' => __( 'Menu Item Labels', 'jetpack' ),
- 'singular_name' => __( 'Menu Item Label', 'jetpack' ),
- 'search_items' => __( 'Search Menu Item Labels', 'jetpack' ),
- 'popular_items' => __( 'Popular Labels', 'jetpack' ),
- 'all_items' => __( 'All Menu Item Labels', 'jetpack' ),
- 'edit_item' => __( 'Edit Menu Item Label', 'jetpack' ),
- 'view_item' => __( 'View Menu Item Label', 'jetpack' ),
- 'update_item' => __( 'Update Menu Item Label', 'jetpack' ),
- 'add_new_item' => __( 'Add New Menu Item Label', 'jetpack' ),
- 'new_item_name' => __( 'New Menu Item Label Name', 'jetpack' ),
- 'separate_items_with_commas' => __( 'For example, spicy, favorite, etc. <br /> Separate Labels with commas', 'jetpack' ),
- 'add_or_remove_items' => __( 'Add or remove Labels', 'jetpack' ),
- 'choose_from_most_used' => __( 'Choose from the most used Labels', 'jetpack' ),
- ),
- 'no_tagcloud' => __( 'No Labels found', 'jetpack' ),
-
- 'hierarchical' => false,
- ) );
-
- register_taxonomy( self::MENU_TAX, self::MENU_ITEM_POST_TYPE, array(
- 'labels' => array(
- 'name' => __( 'Menu Sections', 'jetpack' ),
- 'singular_name' => __( 'Menu Section', 'jetpack' ),
- 'search_items' => __( 'Search Menu Sections', 'jetpack' ),
- 'all_items' => __( 'All Menu Sections', 'jetpack' ),
- 'parent_item' => __( 'Parent Menu Section', 'jetpack' ),
- 'parent_item_colon' => __( 'Parent Menu Section:', 'jetpack' ),
- 'edit_item' => __( 'Edit Menu Section', 'jetpack' ),
- 'view_item' => __( 'View Menu Section', 'jetpack' ),
- 'update_item' => __( 'Update Menu Section', 'jetpack' ),
- 'add_new_item' => __( 'Add New Menu Section', 'jetpack' ),
- 'new_item_name' => __( 'New Menu Sections Name', 'jetpack' ),
- ),
- 'rewrite' => array(
- 'slug' => 'menu',
- 'with_front' => false,
- 'hierarchical' => true,
- ),
+ if ( ! taxonomy_exists( self::MENU_ITEM_LABEL_TAX ) ) {
+ register_taxonomy( self::MENU_ITEM_LABEL_TAX, self::MENU_ITEM_POST_TYPE, array(
+ 'labels' => array(
+ 'name' => __( 'Menu Item Labels', 'jetpack' ),
+ 'singular_name' => __( 'Menu Item Label', 'jetpack' ),
+ 'search_items' => __( 'Search Menu Item Labels', 'jetpack' ),
+ 'popular_items' => __( 'Popular Labels', 'jetpack' ),
+ 'all_items' => __( 'All Menu Item Labels', 'jetpack' ),
+ 'edit_item' => __( 'Edit Menu Item Label', 'jetpack' ),
+ 'view_item' => __( 'View Menu Item Label', 'jetpack' ),
+ 'update_item' => __( 'Update Menu Item Label', 'jetpack' ),
+ 'add_new_item' => __( 'Add New Menu Item Label', 'jetpack' ),
+ 'new_item_name' => __( 'New Menu Item Label Name', 'jetpack' ),
+ 'separate_items_with_commas' => __( 'For example, spicy, favorite, etc. <br /> Separate Labels with commas', 'jetpack' ),
+ 'add_or_remove_items' => __( 'Add or remove Labels', 'jetpack' ),
+ 'choose_from_most_used' => __( 'Choose from the most used Labels', 'jetpack' ),
+ 'items_list_navigation' => __( 'Menu item label list navigation', 'jetpack' ),
+ 'items_list' => __( 'Menu item labels list', 'jetpack' ),
+ ),
+ 'no_tagcloud' => __( 'No Labels found', 'jetpack' ),
+ 'hierarchical' => false,
+ ) );
+ }
- 'hierarchical' => true,
- 'show_tagcloud' => false,
- 'query_var' => 'menu',
- ) );
+ if ( ! taxonomy_exists( self::MENU_TAX ) ) {
+ register_taxonomy( self::MENU_TAX, self::MENU_ITEM_POST_TYPE, array(
+ 'labels' => array(
+ 'name' => __( 'Menu Sections', 'jetpack' ),
+ 'singular_name' => __( 'Menu Section', 'jetpack' ),
+ 'search_items' => __( 'Search Menu Sections', 'jetpack' ),
+ 'all_items' => __( 'All Menu Sections', 'jetpack' ),
+ 'parent_item' => __( 'Parent Menu Section', 'jetpack' ),
+ 'parent_item_colon' => __( 'Parent Menu Section:', 'jetpack' ),
+ 'edit_item' => __( 'Edit Menu Section', 'jetpack' ),
+ 'view_item' => __( 'View Menu Section', 'jetpack' ),
+ 'update_item' => __( 'Update Menu Section', 'jetpack' ),
+ 'add_new_item' => __( 'Add New Menu Section', 'jetpack' ),
+ 'new_item_name' => __( 'New Menu Sections Name', 'jetpack' ),
+ 'items_list_navigation' => __( 'Menu section list navigation', 'jetpack' ),
+ 'items_list' => __( 'Menu section list', 'jetpack' ),
+ ),
+ 'rewrite' => array(
+ 'slug' => 'menu',
+ 'with_front' => false,
+ 'hierarchical' => true,
+ ),
+ 'hierarchical' => true,
+ 'show_tagcloud' => false,
+ 'query_var' => 'menu',
+ ) );
+ }
}
function register_post_types() {
+ if ( post_type_exists( self::MENU_ITEM_POST_TYPE ) ) {
+ return;
+ }
+
register_post_type( self::MENU_ITEM_POST_TYPE, array(
'description' => __( "Items on your restaurant's menu", 'jetpack' ),
'labels' => array(
- 'name' => __( 'Menu Items', 'jetpack' ),
- 'singular_name' => __( 'Menu Item', 'jetpack' ),
- 'menu_name' => __( 'Food Menus', 'jetpack' ),
- 'all_items' => __( 'Menu Items', 'jetpack' ),
- 'add_new' => __( 'Add One Item', 'jetpack' ),
- 'add_new_item' => __( 'Add Menu Item', 'jetpack' ),
- 'edit_item' => __( 'Edit Menu Item', 'jetpack' ),
- 'new_item' => __( 'New Menu Item', 'jetpack' ),
- 'view_item' => __( 'View Menu Item', 'jetpack' ),
- 'search_items' => __( 'Search Menu Items', 'jetpack' ),
- 'not_found' => __( 'No Menu Items found', 'jetpack' ),
- 'not_found_in_trash' => __( 'No Menu Items found in Trash', 'jetpack' ),
+ 'name' => __( 'Menu Items', 'jetpack' ),
+ 'singular_name' => __( 'Menu Item', 'jetpack' ),
+ 'menu_name' => __( 'Food Menus', 'jetpack' ),
+ 'all_items' => __( 'Menu Items', 'jetpack' ),
+ 'add_new' => __( 'Add One Item', 'jetpack' ),
+ 'add_new_item' => __( 'Add Menu Item', 'jetpack' ),
+ 'edit_item' => __( 'Edit Menu Item', 'jetpack' ),
+ 'new_item' => __( 'New Menu Item', 'jetpack' ),
+ 'view_item' => __( 'View Menu Item', 'jetpack' ),
+ 'search_items' => __( 'Search Menu Items', 'jetpack' ),
+ 'not_found' => __( 'No Menu Items found', 'jetpack' ),
+ 'not_found_in_trash' => __( 'No Menu Items found in Trash', 'jetpack' ),
+ 'filter_items_list' => __( 'Filter menu items list', 'jetpack' ),
+ 'items_list_navigation' => __( 'Menu item list navigation', 'jetpack' ),
+ 'items_list' => __( 'Menu items list', 'jetpack' ),
),
'supports' => array(
'title',
@@ -281,16 +286,16 @@ class Nova_Restaurant {
*/
function add_to_dashboard() {
$number_menu_items = wp_count_posts( self::MENU_ITEM_POST_TYPE );
- $number_menu_items_published = sprintf( '%1s %2s',
- number_format_i18n( $number_menu_items->publish ),
- _n( 'Food Menu Item', 'Food Menu Items', intval( $number_menu_items->publish ), 'jetpack' )
- );
if ( current_user_can( 'administrator' ) ) {
- $number_menu_items_published = sprintf( '<a href="%1s">%2s %3s</a>',
+ $number_menu_items_published = sprintf( '<a href="%1$s">%2$s</a>',
esc_url( get_admin_url( get_current_blog_id(), 'edit.php?post_type=' . self::MENU_ITEM_POST_TYPE ) ),
- number_format_i18n( $number_menu_items->publish ),
- _n( 'Food Menu Item', 'Food Menu Items', intval( $number_menu_items->publish ), 'jetpack' )
+ sprintf( _n( '%1$d Food Menu Item', '%1$d Food Menu Items', intval( $number_menu_items->publish ), 'jetpack' ), number_format_i18n( $number_menu_items->publish ) )
+ );
+ }
+ else {
+ $number_menu_items_published = sprintf( '<span>%1$s</span>',
+ sprintf( _n( '%1$d Food Menu Item', '%1$d Food Menu Items', intval( $number_menu_items->publish ), 'jetpack' ), number_format_i18n( $number_menu_items->publish ) )
);
}
diff --git a/plugins/jetpack/modules/custom-post-types/portfolios.php b/plugins/jetpack/modules/custom-post-types/portfolios.php
index c38fd00b..1c299341 100644
--- a/plugins/jetpack/modules/custom-post-types/portfolios.php
+++ b/plugins/jetpack/modules/custom-post-types/portfolios.php
@@ -1,13 +1,4 @@
<?php
-/**
- * Plugin Name: Jetpack Portfolio
- * Plugin URI:
- * Author: Automattic
- * Version: 0.1
- * License: GPL v2 or later
- * Text Domain: jetpack
- * Domain Path: /languages/
- */
class Jetpack_Portfolio {
const CUSTOM_POST_TYPE = 'jetpack-portfolio';
@@ -16,7 +7,7 @@ class Jetpack_Portfolio {
const OPTION_NAME = 'jetpack_portfolio';
const OPTION_READING_SETTING = 'jetpack_portfolio_posts_per_page';
- var $version = '0.1';
+ public $version = '0.1';
static function init() {
static $instance = false;
@@ -74,6 +65,14 @@ class Jetpack_Portfolio {
add_shortcode( 'portfolio', array( $this, 'portfolio_shortcode' ) );
add_shortcode( 'jetpack_portfolio', array( $this, 'portfolio_shortcode' ) );
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ // Add to Dotcom XML sitemaps
+ add_filter( 'wpcom_sitemap_post_types', array( $this, 'add_to_sitemap' ) );
+ } else {
+ // Add to Jetpack XML sitemap
+ add_filter( 'jetpack_sitemap_post_types', array( $this, 'add_to_sitemap' ) );
+ }
+
// Adjust CPT archive and custom taxonomies to obey CPT reading setting
add_filter( 'pre_get_posts', array( $this, 'query_reading_setting' ) );
@@ -224,23 +223,27 @@ class Jetpack_Portfolio {
register_post_type( self::CUSTOM_POST_TYPE, array(
'description' => __( 'Portfolio Items', 'jetpack' ),
'labels' => array(
- 'name' => esc_html__( 'Projects', 'jetpack' ),
- 'singular_name' => esc_html__( 'Project', 'jetpack' ),
- 'menu_name' => esc_html__( 'Portfolio', 'jetpack' ),
- 'all_items' => esc_html__( 'All Projects', 'jetpack' ),
- 'add_new' => esc_html__( 'Add New', 'jetpack' ),
- 'add_new_item' => esc_html__( 'Add New Project', 'jetpack' ),
- 'edit_item' => esc_html__( 'Edit Project', 'jetpack' ),
- 'new_item' => esc_html__( 'New Project', 'jetpack' ),
- 'view_item' => esc_html__( 'View Project', 'jetpack' ),
- 'search_items' => esc_html__( 'Search Projects', 'jetpack' ),
- 'not_found' => esc_html__( 'No Projects found', 'jetpack' ),
- 'not_found_in_trash' => esc_html__( 'No Projects found in Trash', 'jetpack' ),
+ 'name' => esc_html__( 'Projects', 'jetpack' ),
+ 'singular_name' => esc_html__( 'Project', 'jetpack' ),
+ 'menu_name' => esc_html__( 'Portfolio', 'jetpack' ),
+ 'all_items' => esc_html__( 'All Projects', 'jetpack' ),
+ 'add_new' => esc_html__( 'Add New', 'jetpack' ),
+ 'add_new_item' => esc_html__( 'Add New Project', 'jetpack' ),
+ 'edit_item' => esc_html__( 'Edit Project', 'jetpack' ),
+ 'new_item' => esc_html__( 'New Project', 'jetpack' ),
+ 'view_item' => esc_html__( 'View Project', 'jetpack' ),
+ 'search_items' => esc_html__( 'Search Projects', 'jetpack' ),
+ 'not_found' => esc_html__( 'No Projects found', 'jetpack' ),
+ 'not_found_in_trash' => esc_html__( 'No Projects found in Trash', 'jetpack' ),
+ 'filter_items_list' => esc_html__( 'Filter projects list', 'jetpack' ),
+ 'items_list_navigation' => esc_html__( 'Project list navigation', 'jetpack' ),
+ 'items_list' => esc_html__( 'Projects list', 'jetpack' ),
),
'supports' => array(
'title',
'editor',
'thumbnail',
+ 'author',
'comments',
'publicize',
'wpcom-markdown',
@@ -265,18 +268,20 @@ class Jetpack_Portfolio {
register_taxonomy( self::CUSTOM_TAXONOMY_TYPE, self::CUSTOM_POST_TYPE, array(
'hierarchical' => true,
'labels' => array(
- 'name' => esc_html__( 'Project Types', 'jetpack' ),
- 'singular_name' => esc_html__( 'Project Type', 'jetpack' ),
- 'menu_name' => esc_html__( 'Project Types', 'jetpack' ),
- 'all_items' => esc_html__( 'All Project Types', 'jetpack' ),
- 'edit_item' => esc_html__( 'Edit Project Type', 'jetpack' ),
- 'view_item' => esc_html__( 'View Project Type', 'jetpack' ),
- 'update_item' => esc_html__( 'Update Project Type', 'jetpack' ),
- 'add_new_item' => esc_html__( 'Add New Project Type', 'jetpack' ),
- 'new_item_name' => esc_html__( 'New Project Type Name', 'jetpack' ),
- 'parent_item' => esc_html__( 'Parent Project Type', 'jetpack' ),
- 'parent_item_colon' => esc_html__( 'Parent Project Type:', 'jetpack' ),
- 'search_items' => esc_html__( 'Search Project Types', 'jetpack' ),
+ 'name' => esc_html__( 'Project Types', 'jetpack' ),
+ 'singular_name' => esc_html__( 'Project Type', 'jetpack' ),
+ 'menu_name' => esc_html__( 'Project Types', 'jetpack' ),
+ 'all_items' => esc_html__( 'All Project Types', 'jetpack' ),
+ 'edit_item' => esc_html__( 'Edit Project Type', 'jetpack' ),
+ 'view_item' => esc_html__( 'View Project Type', 'jetpack' ),
+ 'update_item' => esc_html__( 'Update Project Type', 'jetpack' ),
+ 'add_new_item' => esc_html__( 'Add New Project Type', 'jetpack' ),
+ 'new_item_name' => esc_html__( 'New Project Type Name', 'jetpack' ),
+ 'parent_item' => esc_html__( 'Parent Project Type', 'jetpack' ),
+ 'parent_item_colon' => esc_html__( 'Parent Project Type:', 'jetpack' ),
+ 'search_items' => esc_html__( 'Search Project Types', 'jetpack' ),
+ 'items_list_navigation' => esc_html__( 'Project type list navigation', 'jetpack' ),
+ 'items_list' => esc_html__( 'Project type list', 'jetpack' ),
),
'public' => true,
'show_ui' => true,
@@ -304,6 +309,8 @@ class Jetpack_Portfolio {
'add_or_remove_items' => esc_html__( 'Add or remove tags', 'jetpack' ),
'choose_from_most_used' => esc_html__( 'Choose from the most used tags', 'jetpack' ),
'not_found' => esc_html__( 'No tags found.', 'jetpack' ),
+ 'items_list_navigation' => esc_html__( 'Project tag list navigation', 'jetpack' ),
+ 'items_list' => esc_html__( 'Project tag list', 'jetpack' ),
),
'public' => true,
'show_ui' => true,
@@ -391,6 +398,15 @@ class Jetpack_Portfolio {
}
/**
+ * Add CPT to Dotcom sitemap
+ */
+ function add_to_sitemap( $post_types ) {
+ $post_types[] = self::CUSTOM_POST_TYPE;
+
+ return $post_types;
+ }
+
+ /**
* Our [portfolio] shortcode.
* Prints Portfolio data styled to look good on *any* theme.
*
@@ -402,6 +418,7 @@ class Jetpack_Portfolio {
'display_types' => true,
'display_tags' => true,
'display_content' => true,
+ 'display_author' => false,
'show_filter' => false,
'include_type' => false,
'include_tag' => false,
@@ -420,7 +437,11 @@ class Jetpack_Portfolio {
$atts['display_tags'] = false;
}
- if ( $atts['display_content'] && 'true' != $atts['display_content'] ) {
+ if ( $atts['display_author'] && 'true' != $atts['display_author'] ) {
+ $atts['display_author'] = false;
+ }
+
+ if ( $atts['display_content'] && 'true' != $atts['display_content'] && 'full' != $atts['display_content'] ) {
$atts['display_content'] = false;
}
@@ -565,6 +586,10 @@ class Jetpack_Portfolio {
if ( false != $atts['display_tags'] ) {
echo self::get_project_tags( $post_id );
}
+
+ if ( false != $atts['display_author'] ) {
+ echo self::get_project_author( $post_id );
+ }
?>
</div>
@@ -572,12 +597,20 @@ class Jetpack_Portfolio {
<?php
// The content
- if ( false != $atts['display_content'] ): ?>
- <div class="portfolio-entry-content"><?php the_excerpt(); ?></div>
- <?php endif; ?>
+ if ( false !== $atts['display_content'] ) {
+ if ( 'full' === $atts['display_content'] ) {
+ ?>
+ <div class="portfolio-entry-content"><?php the_content(); ?></div>
+ <?php
+ } else {
+ ?>
+ <div class="portfolio-entry-content"><?php the_excerpt(); ?></div>
+ <?php
+ }
+ }
+ ?>
</div><!-- close .portfolio-entry -->
- <?php
- $portfolio_index_number++;
+ <?php $portfolio_index_number++;
} // end of while loop
wp_reset_postdata();
@@ -632,6 +665,8 @@ class Jetpack_Portfolio {
/**
* Filter the class applied to project div in the portfolio
*
+ * @module custom-content-types
+ *
* @since 3.1.0
*
* @param string $class class name of the div.
@@ -705,6 +740,23 @@ class Jetpack_Portfolio {
}
/**
+ * Displays the author of the current portfolio project.
+ *
+ * @return html
+ */
+ static function get_project_author() {
+ $html = '<div class="project-author">';
+ /* translators: %1$s is link to author posts, %2$s is author display name */
+ $html .= sprintf( __( '<span>Author:</span> <a href="%1$s">%2$s</a>', 'jetpack' ),
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
+ esc_html( get_the_author() )
+ );
+ $html .= '</div>';
+
+ return $html;
+ }
+
+ /**
* Display the featured image if it's available
*
* @return html
@@ -714,6 +766,8 @@ class Jetpack_Portfolio {
/**
* Change the Portfolio thumbnail size.
*
+ * @module custom-content-types
+ *
* @since 3.4.0
*
* @param string|array $var Either a registered size keyword or size array.
diff --git a/plugins/jetpack/modules/custom-post-types/testimonial.php b/plugins/jetpack/modules/custom-post-types/testimonial.php
index d90c3287..780ba0be 100644
--- a/plugins/jetpack/modules/custom-post-types/testimonial.php
+++ b/plugins/jetpack/modules/custom-post-types/testimonial.php
@@ -1,26 +1,18 @@
<?php
-/*
- * Plugin Name: Jetpack Testimonial
- * Plugin URI:
- * Author: Automattic
- * Version: 0.1
- * License: GPL v2 or later
- * Text Domain: jetpack
- * Domain Path: /languages/
- */
class Jetpack_Testimonial {
const CUSTOM_POST_TYPE = 'jetpack-testimonial';
const OPTION_NAME = 'jetpack_testimonial';
const OPTION_READING_SETTING = 'jetpack_testimonial_posts_per_page';
- var $version = '0.1';
+ public $version = '0.1';
static function init() {
static $instance = false;
- if ( ! $instance )
+ if ( ! $instance ) {
$instance = new Jetpack_Testimonial;
+ }
return $instance;
}
@@ -28,21 +20,32 @@ class Jetpack_Testimonial {
/**
* Conditionally hook into WordPress.
*
- * Themes must declare that they support this module by adding
- * add_theme_support( 'jetpack-testimonial' ); during after_setup_theme.
- *
- * If no theme support is found there is no need to hook into
- * WordPress. We'll just return early instead.
+ * Setup user option for enabling CPT.
+ * If user has CPT enabled, show in admin.
*/
function __construct() {
+ // Make sure the post types are loaded for imports
+ add_action( 'import_start', array( $this, 'register_post_types' ) );
+
+ // If called via REST API, we need to register later in lifecycle
+ add_action( 'restapi_theme_init', array( $this, 'maybe_register_cpt' ) );
+
+ // Add to REST API post type whitelist
+ add_filter( 'rest_api_allowed_post_types', array( $this, 'allow_cpt_rest_api_type' ) );
+
+ $this->maybe_register_cpt();
+ }
+
+ /**
+ * Registers the custom post types and adds action/filter handlers, but
+ * only if the site supports it
+ */
+ function maybe_register_cpt() {
// Add an option to enable the CPT
add_action( 'admin_init', array( $this, 'settings_api_init' ) );
// Check on theme switch if theme supports CPT and setting is disabled
- add_action( 'after_switch_theme', array( $this, 'activation_post_type_support' ) );
-
- // Make sure the post types are loaded for imports
- add_action( 'import_start', array( $this, 'register_post_types' ) );
+ add_action( 'after_switch_theme', array( $this, 'activation_post_type_support' ) );
$setting = get_option( self::OPTION_NAME, '0' );
@@ -51,46 +54,57 @@ class Jetpack_Testimonial {
return;
}
- // Enable Omnisearch for Testimonials.
- if ( class_exists( 'Jetpack_Omnisearch_Posts' ) )
+ // Enable Omnisearch for CPT.
+ if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) {
new Jetpack_Omnisearch_Posts( self::CUSTOM_POST_TYPE );
+ }
// CPT magic
$this->register_post_types();
- add_action( sprintf( 'add_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );
- add_action( sprintf( 'update_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );
- add_action( sprintf( 'publish_%s', self::CUSTOM_POST_TYPE ), array( $this, 'flush_rules_on_first_testimonial' ) );
- add_action( 'after_switch_theme', array( $this, 'flush_rules_on_switch' ) );
+ add_action( sprintf( 'add_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );
+ add_action( sprintf( 'update_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );
+ add_action( sprintf( 'publish_%s', self::CUSTOM_POST_TYPE ), array( $this, 'flush_rules_on_first_testimonial' ) );
+ add_action( 'after_switch_theme', array( $this, 'flush_rules_on_switch' ) );
// Admin Customization
- add_filter( 'enter_title_here', array( $this, 'change_default_title' ) );
- add_filter( sprintf( 'manage_%s_posts_columns', self::CUSTOM_POST_TYPE), array( $this, 'edit_title_column_label' ) );
- add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) );
- add_action( 'customize_register', array( $this, 'customize_register' ) );
+ add_filter( 'enter_title_here', array( $this, 'change_default_title' ) );
+ add_filter( sprintf( 'manage_%s_posts_columns', self::CUSTOM_POST_TYPE), array( $this, 'edit_title_column_label' ) );
+ add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) );
+ add_action( 'customize_register', array( $this, 'customize_register' ) );
+ // Only add the 'Customize' sub-menu if the theme supports it.
$num_testimonials = self::count_testimonials();
- if ( ! empty( $num_testimonials ) )
- add_action( 'admin_menu', array( $this, 'add_customize_page' ) );
+ if ( ! empty( $num_testimonials ) && current_theme_supports( self::CUSTOM_POST_TYPE ) ) {
+ add_action( 'admin_menu', array( $this, 'add_customize_page' ) );
+ }
- add_action( 'after_switch_theme', array( $this, 'flush_rules_on_switch' ) );
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ // Track all the things
+ add_action( sprintf( 'add_option_%s', self::OPTION_NAME ), array( $this, 'new_activation_stat_bump' ) );
+ add_action( sprintf( 'update_option_%s', self::OPTION_NAME ), array( $this, 'update_option_stat_bump' ), 11, 2 );
+ add_action( sprintf( 'publish_%s', self::CUSTOM_POST_TYPE), array( $this, 'new_testimonial_stat_bump' ) );
+
+ // Add to Dotcom XML sitemaps
+ add_filter( 'wpcom_sitemap_post_types', array( $this, 'add_to_sitemap' ) );
+ } else {
+ // Add to Jetpack XML sitemap
+ add_filter( 'jetpack_sitemap_post_types', array( $this, 'add_to_sitemap' ) );
+ }
// Adjust CPT archive and custom taxonomies to obey CPT reading setting
- add_filter( 'pre_get_posts', array( $this, 'query_reading_setting' ) );
-
- // If called via REST API, we need to register later in lifecycle
- add_action( 'restapi_theme_init', array( $this, 'maybe_register_cpt' ) );
+ add_filter( 'pre_get_posts', array( $this, 'query_reading_setting' ), 20 );
// Register [jetpack_testimonials] always and
// register [testimonials] if [testimonials] isn't already set
- add_shortcode( 'jetpack_testimonials', array( $this, 'jetpack_testimonial_shortcode' ) );
+ add_shortcode( 'jetpack_testimonials', array( $this, 'jetpack_testimonial_shortcode' ) );
if ( ! shortcode_exists( 'testimonials' ) ) {
- add_shortcode( 'testimonials', array( $this, 'jetpack_testimonial_shortcode' ) );
+ add_shortcode( 'testimonials', array( $this, 'jetpack_testimonial_shortcode' ) );
}
// If CPT was enabled programatically and no CPT items exist when user switches away, disable
if ( $setting && $this->site_supports_custom_post_type() ) {
- add_action( 'switch_theme', array( $this, 'deactivation_post_type_support' ) );
+ add_action( 'switch_theme', array( $this, 'deactivation_post_type_support' ) );
}
}
@@ -108,6 +122,7 @@ class Jetpack_Testimonial {
'writing',
'jetpack_cpt_section'
);
+
register_setting(
'writing',
self::OPTION_NAME,
@@ -115,7 +130,7 @@ class Jetpack_Testimonial {
);
// Check if CPT is enabled first so that intval doesn't get set to NULL on re-registering
- if ( get_option( self::OPTION_NAME, '0' ) || current_theme_supports( self::CUSTOM_POST_TYPE ) ) {
+ if ( $this->site_supports_custom_post_type() ) {
register_setting(
'writing',
self::OPTION_READING_SETTING,
@@ -124,17 +139,15 @@ class Jetpack_Testimonial {
}
}
-
-
/**
* HTML code to display a checkbox true/false option
- * for the Testimonial CPT setting.
+ * for the CPT setting.
*
* @return html
*/
function setting_html() {
if ( current_theme_supports( self::CUSTOM_POST_TYPE ) ) : ?>
- <p><?php printf( __( 'Your theme supports <strong>%s</strong>', 'jetpack' ), self::CUSTOM_POST_TYPE ); ?></p>
+ <p><?php printf( __( 'Your theme supports Testimonials', 'jetpack' ) ); ?></p>
<?php else : ?>
<label for="<?php echo esc_attr( self::OPTION_NAME ); ?>">
<input name="<?php echo esc_attr( self::OPTION_NAME ); ?>" id="<?php echo esc_attr( self::OPTION_NAME ); ?>" <?php echo checked( get_option( self::OPTION_NAME, '0' ), true, false ); ?> type="checkbox" value="1" />
@@ -143,7 +156,7 @@ class Jetpack_Testimonial {
</label>
<?php endif;
- if ( get_option( self::OPTION_NAME, '0' ) || current_theme_supports( self::CUSTOM_POST_TYPE ) ) :
+ if ( $this->site_supports_custom_post_type() ) :
printf( '<p><label for="%1$s">%2$s</label></p>',
esc_attr( self::OPTION_READING_SETTING ),
sprintf( __( 'Testimonial pages display at most %1$s testimonials', 'jetpack' ),
@@ -170,6 +183,46 @@ class Jetpack_Testimonial {
return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE );
}
+ /**
+ * Add to REST API post type whitelist
+ */
+ function allow_cpt_rest_api_type( $post_types ) {
+ $post_types[] = self::CUSTOM_POST_TYPE;
+
+ return $post_types;
+ }
+
+ /**
+ * Bump Testimonial > New Activation stat
+ */
+ function new_activation_stat_bump() {
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'testimonials', 'new-activation' );
+ }
+
+ /**
+ * Bump Testimonial > Option On/Off stats to get total active
+ */
+ function update_option_stat_bump( $old, $new ) {
+ if ( empty( $old ) && ! empty( $new ) ) {
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'testimonials', 'option-on' );
+ }
+
+ if ( ! empty( $old ) && empty( $new ) ) {
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'testimonials', 'option-off' );
+ }
+ }
+
+ /**
+ * Bump Testimonial > Published Testimonials stat when testimonials are published
+ */
+ function new_testimonial_stat_bump() {
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action ( 'jetpack_bump_stats_extras', 'testimonials', 'published-testimonials' );
+ }
+
/*
* Flush permalinks when CPT option is turned on/off
*/
@@ -227,7 +280,9 @@ class Jetpack_Testimonial {
}
}
- /* Setup */
+ /**
+ * Register Post Type
+ */
function register_post_types() {
if ( post_type_exists( self::CUSTOM_POST_TYPE ) ) {
return;
@@ -236,18 +291,21 @@ class Jetpack_Testimonial {
register_post_type( self::CUSTOM_POST_TYPE, array(
'description' => __( 'Customer Testimonials', 'jetpack' ),
'labels' => array(
- 'name' => esc_html__( 'Testimonials', 'jetpack' ),
- 'singular_name' => esc_html__( 'Testimonial', 'jetpack' ),
- 'menu_name' => esc_html__( 'Testimonials', 'jetpack' ),
- 'all_items' => esc_html__( 'All Testimonials', 'jetpack' ),
- 'add_new' => esc_html__( 'Add New', 'jetpack' ),
- 'add_new_item' => esc_html__( 'Add New Testimonial', 'jetpack' ),
- 'edit_item' => esc_html__( 'Edit Testimonial', 'jetpack' ),
- 'new_item' => esc_html__( 'New Testimonial', 'jetpack' ),
- 'view_item' => esc_html__( 'View Testimonial', 'jetpack' ),
- 'search_items' => esc_html__( 'Search Testimonials', 'jetpack' ),
- 'not_found' => esc_html__( 'No Testimonials found', 'jetpack' ),
- 'not_found_in_trash' => esc_html__( 'No Testimonials found in Trash', 'jetpack' ),
+ 'name' => esc_html__( 'Testimonials', 'jetpack' ),
+ 'singular_name' => esc_html__( 'Testimonial', 'jetpack' ),
+ 'menu_name' => esc_html__( 'Testimonials', 'jetpack' ),
+ 'all_items' => esc_html__( 'All Testimonials', 'jetpack' ),
+ 'add_new' => esc_html__( 'Add New', 'jetpack' ),
+ 'add_new_item' => esc_html__( 'Add New Testimonial', 'jetpack' ),
+ 'edit_item' => esc_html__( 'Edit Testimonial', 'jetpack' ),
+ 'new_item' => esc_html__( 'New Testimonial', 'jetpack' ),
+ 'view_item' => esc_html__( 'View Testimonial', 'jetpack' ),
+ 'search_items' => esc_html__( 'Search Testimonials', 'jetpack' ),
+ 'not_found' => esc_html__( 'No Testimonials found', 'jetpack' ),
+ 'not_found_in_trash' => esc_html__( 'No Testimonials found in Trash', 'jetpack' ),
+ 'filter_items_list' => esc_html__( 'Filter Testimonials list', 'jetpack' ),
+ 'items_list_navigation' => esc_html__( 'Testimonial list navigation', 'jetpack' ),
+ 'items_list' => esc_html__( 'Testimonials list', 'jetpack' ),
),
'supports' => array(
'title',
@@ -264,6 +322,7 @@ class Jetpack_Testimonial {
'public' => true,
'show_ui' => true,
'menu_position' => 20, // below Pages
+ 'menu_icon' => 'dashicons-testimonial',
'capability_type' => 'page',
'map_meta_cap' => true,
'has_archive' => true,
@@ -272,33 +331,12 @@ class Jetpack_Testimonial {
}
/**
- * Change ‘Enter Title Here’ text for the Testimonial.
- */
- function change_default_title( $title ) {
- $screen = get_current_screen();
-
- if ( 'jetpack-testimonial' == $screen->post_type )
- $title = esc_html__( "Enter the customer's name here", 'jetpack' );
-
- return $title;
- }
-
- /**
- * Change ‘Title’ column label on all Testimonials page.
- */
- function edit_title_column_label( $columns ) {
- $columns['title'] = esc_html__( 'Customer Name', 'jetpack' );
-
- return $columns;
- }
-
- /**
* Update messages for the Testimonial admin.
*/
function updated_messages( $messages ) {
global $post;
- $messages['jetpack-testimonial'] = array(
+ $messages[ self::CUSTOM_POST_TYPE ] = array(
0 => '', // Unused. Messages start at index 1.
1 => sprintf( __( 'Testimonial updated. <a href="%s">View testimonial</a>', 'jetpack'), esc_url( get_permalink( $post->ID ) ) ),
2 => esc_html__( 'Custom field updated.', 'jetpack' ),
@@ -310,8 +348,8 @@ class Jetpack_Testimonial {
7 => esc_html__( 'Testimonial saved.', 'jetpack' ),
8 => sprintf( __( 'Testimonial submitted. <a target="_blank" href="%s">Preview testimonial</a>', 'jetpack'), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
9 => sprintf( __( 'Testimonial scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview testimonial</a>', 'jetpack' ),
- // translators: Publish box date format, see http://php.net/date
- date_i18n( __( 'M j, Y @ G:i', 'jetpack' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ),
+ // translators: Publish box date format, see http://php.net/date
+ date_i18n( __( 'M j, Y @ G:i', 'jetpack' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ),
10 => sprintf( __( 'Testimonial draft updated. <a target="_blank" href="%s">Preview testimonial</a>', 'jetpack' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
);
@@ -319,31 +357,59 @@ class Jetpack_Testimonial {
}
/**
+ * Change ‘Enter Title Here’ text for the Testimonial.
+ */
+ function change_default_title( $title ) {
+ $screen = get_current_screen();
+
+ if ( self::CUSTOM_POST_TYPE == $screen->post_type )
+ $title = esc_html__( "Enter the customer's name here", 'jetpack' );
+
+ return $title;
+ }
+
+ /**
+ * Change ‘Title’ column label on all Testimonials page.
+ */
+ function edit_title_column_label( $columns ) {
+ $columns['title'] = esc_html__( 'Customer Name', 'jetpack' );
+
+ return $columns;
+ }
+
+ /**
* Follow CPT reading setting on CPT archive page
*/
function query_reading_setting( $query ) {
- if ( ! is_admin() &&
- $query->is_main_query() &&
- ( $query->is_post_type_archive( self::CUSTOM_POST_TYPE ) )
+ if ( ! is_admin()
+ && $query->is_main_query()
+ && $query->is_post_type_archive( self::CUSTOM_POST_TYPE )
) {
$query->set( 'posts_per_page', get_option( self::OPTION_READING_SETTING, '10' ) );
}
}
- function set_testimonial_option() {
- $testimonials_option = get_option( 'jetpack_testimonial' );
+ /**
+ * Add CPT to Dotcom sitemap
+ */
+ function add_to_sitemap( $post_types ) {
+ $post_types[] = self::CUSTOM_POST_TYPE;
+
+ return $post_types;
+ }
- $testimonials = wp_count_posts( 'jetpack-testimonial' );
+ function set_testimonial_option() {
+ $testimonials = wp_count_posts( self::CUSTOM_POST_TYPE );
$published_testimonials = $testimonials->publish;
- update_option( 'jetpack_testimonial', $published_testimonials );
+ update_option( self::OPTION_NAME, $published_testimonials );
}
function count_testimonials() {
$testimonials = get_transient( 'jetpack-testimonial-count-cache' );
if ( false === $testimonials ) {
- $testimonials = (int) wp_count_posts( 'jetpack-testimonial' )->publish;
+ $testimonials = (int) wp_count_posts( self::CUSTOM_POST_TYPE )->publish;
if ( ! empty( $testimonials ) ) {
set_transient( 'jetpack-testimonial-count-cache', $testimonials, 60*60*12 );
@@ -358,11 +424,14 @@ class Jetpack_Testimonial {
*/
function add_customize_page() {
add_submenu_page(
- 'edit.php?post_type=jetpack-testimonial',
+ 'edit.php?post_type=' . self::CUSTOM_POST_TYPE,
esc_html__( 'Customize Testimonials Archive', 'jetpack' ),
esc_html__( 'Customize', 'jetpack' ),
'edit_theme_options',
- add_query_arg( array( 'url' => urlencode( home_url( 'testimonial' ) ) ), 'customize.php' ) . '#accordion-section-jetpack_testimonials'
+ add_query_arg( array(
+ 'url' => urlencode( home_url( '/testimonial/' ) ),
+ 'autofocus[section]' => 'jetpack_testimonials'
+ ), 'customize.php' )
);
}
@@ -374,7 +443,7 @@ class Jetpack_Testimonial {
$wp_customize->add_section( 'jetpack_testimonials', array(
'title' => esc_html__( 'Testimonials', 'jetpack' ),
- 'theme_supports' => 'jetpack-testimonial',
+ 'theme_supports' => self::CUSTOM_POST_TYPE,
'priority' => 130,
) );
@@ -410,8 +479,27 @@ class Jetpack_Testimonial {
'section' => 'jetpack_testimonials',
'label' => esc_html__( 'Testimonial Page Featured Image', 'jetpack' ),
) ) );
+
+ // The featured image control doesn't display properly in the Customizer unless we coerce
+ // it back into a URL sooner, since that's what WP_Customize_Upload_Control::to_json() expects
+ if ( is_admin() ) {
+ add_filter( 'theme_mod_jetpack_testimonials', array( $this, 'coerce_testimonial_image_to_url' ) );
+ }
}
+ public function coerce_testimonial_image_to_url( $opt ) {
+ if ( ! $opt || ! is_array( $opt ) ) {
+ return $opt;
+ }
+ if ( ! isset( $opt['featured-image'] ) || ! is_scalar( $opt['featured-image'] ) ) {
+ return $opt;
+ }
+ $url = wp_get_attachment_url( $opt['featured-image'] );
+ if ( $url ) {
+ $opt['featured-image'] = $url;
+ }
+ return $opt;
+ }
/**
* Our [testimonial] shortcode.
@@ -431,7 +519,7 @@ class Jetpack_Testimonial {
), $atts, 'testimonial' );
// A little sanitization
- if ( $atts['display_content'] && 'true' != $atts['display_content'] ) {
+ if ( $atts['display_content'] && 'true' != $atts['display_content'] && 'full' != $atts['display_content'] ) {
$atts['display_content'] = false;
}
@@ -443,7 +531,6 @@ class Jetpack_Testimonial {
$atts['showposts'] = intval( $atts['showposts'] );
-
if ( $atts['order'] ) {
$atts['order'] = urldecode( $atts['order'] );
$atts['order'] = strtoupper( $atts['order'] );
@@ -502,7 +589,7 @@ class Jetpack_Testimonial {
// If we have testimonials, create the html
if ( $query->have_posts() ) {
- ?>
+ ?>
<div class="jetpack-testimonial-shortcode column-<?php echo esc_attr( $atts['columns'] ); ?>">
<?php // open .jetpack-testimonial-shortcode
@@ -514,10 +601,18 @@ class Jetpack_Testimonial {
<div class="testimonial-entry <?php echo esc_attr( self::get_testimonial_class( $testimonial_index_number, $atts['columns'] ) ); ?>">
<?php
// The content
- if ( false !== $atts['display_content'] ): ?>
- <div class="testimonial-entry-content"><?php the_excerpt(); ?></div>
- <?php endif; ?>
-
+ if ( false !== $atts['display_content'] ) {
+ if ( 'full' === $atts['display_content'] ) {
+ ?>
+ <div class="testimonial-entry-content"><?php the_content(); ?></div>
+ <?php
+ } else {
+ ?>
+ <div class="testimonial-entry-content"><?php the_excerpt(); ?></div>
+ <?php
+ }
+ }
+ ?>
<span class="testimonial-entry-title">&#8213; <a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo esc_attr( the_title_attribute( ) ); ?>"><?php the_title(); ?></a></span>
<?php
// Featured image
@@ -573,6 +668,8 @@ class Jetpack_Testimonial {
/**
* Filter the class applied to testimonial div in the testimonial
*
+ * @module custom-content-types
+ *
* @since 3.4.0
*
* @param string $class class name of the div.
@@ -593,6 +690,8 @@ class Jetpack_Testimonial {
/**
* Change the thumbnail size for the Testimonial CPT.
*
+ * @module custom-content-types
+ *
* @since 3.4.0
*
* @param string|array $var Either a registered size keyword or size array.
@@ -618,10 +717,10 @@ function jetpack_testimonial_custom_control_classes() {
public function render_content() {
?>
<label>
- <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
- <textarea rows="5" style="width:100%;" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
+ <textarea rows="5" style="width:100%;" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
</label>
- <?php
+ <?php
}
public static function sanitize_content( $value ) {
diff --git a/plugins/jetpack/modules/enhanced-distribution.php b/plugins/jetpack/modules/enhanced-distribution.php
index 5a447890..dd2fdab0 100644
--- a/plugins/jetpack/modules/enhanced-distribution.php
+++ b/plugins/jetpack/modules/enhanced-distribution.php
@@ -1,12 +1,14 @@
<?php
/**
* Module Name: Enhanced Distribution
- * Module Description: Share your public posts and comments to search engines and other services.
+ * Module Description: Increase reach and traffic.
* Sort Order: 5
* First Introduced: 1.2
* Requires Connection: Yes
* Auto Activate: Public
* Module Tags: Writing
+ * Feature: Traffic
+ * Additional Search Queries: google, seo, firehose, search, broadcast, broadcasting
*/
Jetpack_Sync::sync_posts( __FILE__ );
diff --git a/plugins/jetpack/modules/gravatar-hovercards.php b/plugins/jetpack/modules/gravatar-hovercards.php
index b3df9839..33897ee1 100644
--- a/plugins/jetpack/modules/gravatar-hovercards.php
+++ b/plugins/jetpack/modules/gravatar-hovercards.php
@@ -2,7 +2,7 @@
/**
* Module Name: Gravatar Hovercards
* Module Description: Enable pop-up business cards over commenters’ Gravatars.
- * Jumpstart Description: let commenters link their profiles to their Gravatar accounts, making it easy for your visitors to learn more about your community.
+ * Jumpstart Description: Let commenters link their profiles to their Gravatar accounts, making it easy for your visitors to learn more about your community.
* Sort Order: 11
* Recommendation Order: 13
* First Introduced: 1.1
@@ -10,6 +10,7 @@
* Auto Activate: Yes
* Module Tags: Social, Appearance
* Feature: Jumpstart
+ * Additional Search Queries: gravatar, hovercards
*/
define( 'GROFILES__CACHE_BUSTER', gmdate( 'YM' ) . 'aa' ); // Break CDN cache, increment when gravatar.com/js/gprofiles.js changes
@@ -258,6 +259,15 @@ function grofiles_hovercards_data_html( $author ) {
* @return array( data_key => data_callback, ... )
*/
function grofiles_hovercards_data_callbacks() {
+ /**
+ * Filter the Gravatar Hovercard PHP callbacks.
+ *
+ * @module gravatar-hovercards
+ *
+ * @since 1.1.0
+ *
+ * @param array $args Array of data callbacks.
+ */
return apply_filters( 'grofiles_hovercards_data_callbacks', array() );
}
diff --git a/plugins/jetpack/modules/holiday-snow.php b/plugins/jetpack/modules/holiday-snow.php
index 0ab74cad..f33714db 100644
--- a/plugins/jetpack/modules/holiday-snow.php
+++ b/plugins/jetpack/modules/holiday-snow.php
@@ -31,16 +31,53 @@ class Jetpack_Holiday_Snow_Settings {
}
public function holiday_snow_option_updated() {
+
+ /**
+ * Fires when the holiday snow option is updated.
+ *
+ * @module theme-tools
+ *
+ * @since 2.0.3
+ */
do_action( 'jetpack_holiday_snow_option_updated' );
}
}
function jetpack_holiday_snow_script() {
+
+ /**
+ * Allow holiday snow.
+ *
+ * Note: there's no actual randomness involved in whether it snows
+ * or not, despite the filter mentioning a "chance of snow."
+ *
+ * @module theme-tools
+ *
+ * @since 2.0.3
+ *
+ * @param bool True to allow snow, false to disable it.
+ */
if ( ! apply_filters( 'jetpack_holiday_chance_of_snow', true ) )
return;
+ /**
+ * Fires when it's snowing.
+ *
+ * @module theme-tools
+ *
+ * @since 2.0.3
+ */
do_action( 'jetpack_holiday_snowing' );
+ /**
+ * Filter the holiday snow JavaScript URL.
+ *
+ * @module theme-tools
+ *
+ * @since 2.0.3
+ *
+ * @param str URL to the holiday snow JavaScript file.
+ */
$snowstorm_url = apply_filters( 'jetpack_holiday_snow_js_url', plugins_url( 'holiday-snow/snowstorm.js', __FILE__ ) );
wp_enqueue_script( 'snowstorm', $snowstorm_url, array(), '1.43.20111201' );
}
@@ -58,6 +95,16 @@ function jetpack_maybe_holiday_snow() {
}
function jetpack_holiday_snow_option_name() {
+
+ /**
+ * Filter the holiday snow option name.
+ *
+ * @module theme-tools
+ *
+ * @since 2.0.3
+ *
+ * @param str The holiday snow option name.
+ */
return apply_filters( 'jetpack_holiday_snow_option_name', 'jetpack_holiday_snow_enabled' );
}
@@ -68,6 +115,19 @@ function jetpack_is_holiday_snow_season() {
$snow = ( $today >= $first_snow_day || $today < $last_snow_day );
+ /**
+ * Filter whether it's winter or not.
+ *
+ * You can use this filter if, for example, you live in the
+ * Southern Hemisphere. In that case, the dates for winter
+ * above are incorrect for your location.
+ *
+ * @module theme-tools
+ *
+ * @since 2.1.0
+ *
+ * @param bool $snow True if it's snow season, false if not.
+ */
return apply_filters( 'jetpack_is_holiday_snow_season', $snow );
}
diff --git a/plugins/jetpack/modules/infinite-scroll.php b/plugins/jetpack/modules/infinite-scroll.php
index b4f09260..81cb271c 100644
--- a/plugins/jetpack/modules/infinite-scroll.php
+++ b/plugins/jetpack/modules/infinite-scroll.php
@@ -7,6 +7,7 @@
* Requires Connection: No
* Auto Activate: No
* Module Tags: Appearance
+ * Additional Search Queries: scroll, infinite, infinite scroll
*/
/**
@@ -123,6 +124,7 @@ class Jetpack_Infinite_Scroll_Extras {
if ( ! is_a( $theme, 'WP_Theme' ) && ! is_array( $theme ) )
return;
+ /** This filter is already documented in modules/infinite-scroll/infinity.php */
$customization_file = apply_filters( 'infinite_scroll_customization_file', dirname( __FILE__ ) . "/infinite-scroll/themes/{$theme['Stylesheet']}.php", $theme['Stylesheet'] );
if ( is_readable( $customization_file ) ) {
@@ -187,8 +189,20 @@ class Jetpack_Infinite_Scroll_Extras {
public function action_wp_enqueue_scripts() {
// Do not load scripts and styles on singular pages and static pages
$load_scripts_and_styles = ! ( is_singular() || is_page() );
- if ( ! apply_filters( 'jetpack_infinite_scroll_load_scripts_and_styles', $load_scripts_and_styles ) )
+ if (
+ /**
+ * Allow plugins to enqueue all Infinite Scroll scripts and styles on singular pages as well.
+ *
+ * @module infinite-scroll
+ *
+ * @since 3.1.0
+ *
+ * @param bool $load_scripts_and_styles Should scripts and styles be loaded on singular pahes and static pages. Default to false.
+ */
+ ! apply_filters( 'jetpack_infinite_scroll_load_scripts_and_styles', $load_scripts_and_styles )
+ ) {
return;
+ }
// VideoPress stand-alone plugin
global $videopress;
@@ -198,11 +212,12 @@ class Jetpack_Infinite_Scroll_Extras {
// VideoPress Jetpack module
if ( Jetpack::is_module_active( 'videopress' ) ) {
- Jetpack_VideoPress_Shortcode::enqueue_scripts();
+ wp_enqueue_script( 'videopress' );
}
// Fire the post_gallery action early so Carousel scripts are present.
if ( Jetpack::is_module_active( 'carousel' ) ) {
+ /** This filter is already documented in core/wp-includes/media.php */
do_action( 'post_gallery', '', '' );
}
@@ -212,12 +227,18 @@ class Jetpack_Infinite_Scroll_Extras {
}
// Core's Audio and Video Shortcodes
- if ( 'mediaelement' === apply_filters( 'wp_audio_shortcode_library', 'mediaelement' ) ) {
+ if (
+ /** This filter is already documented in core/wp-includes/media.php */
+ 'mediaelement' === apply_filters( 'wp_audio_shortcode_library', 'mediaelement' )
+ ) {
wp_enqueue_style( 'wp-mediaelement' );
wp_enqueue_script( 'wp-mediaelement' );
}
- if ( 'mediaelement' === apply_filters( 'wp_video_shortcode_library', 'mediaelement' ) ) {
+ if (
+ /** This filter is already documented in core/wp-includes/media.php */
+ 'mediaelement' === apply_filters( 'wp_video_shortcode_library', 'mediaelement' )
+ ) {
wp_enqueue_style( 'wp-mediaelement' );
wp_enqueue_script( 'wp-mediaelement' );
}
diff --git a/plugins/jetpack/modules/infinite-scroll/infinity.js b/plugins/jetpack/modules/infinite-scroll/infinity.js
index 55b69ad2..e4095fa2 100644
--- a/plugins/jetpack/modules/infinite-scroll/infinity.js
+++ b/plugins/jetpack/modules/infinite-scroll/infinity.js
@@ -137,7 +137,7 @@ Scroller.prototype.query = function() {
scripts : window.infiniteScroll.settings.scripts,
styles : window.infiniteScroll.settings.styles,
query_args : window.infiniteScroll.settings.query_args,
- last_post_date : window.infiniteScroll.settings.last_post_date,
+ last_post_date : window.infiniteScroll.settings.last_post_date
};
};
@@ -315,7 +315,7 @@ Scroller.prototype.refresh = function() {
}
// stash the response in the page cache
- self.pageCache[self.page] = response;
+ self.pageCache[self.page] = response;
// Increment the page number
self.page++;
diff --git a/plugins/jetpack/modules/infinite-scroll/infinity.php b/plugins/jetpack/modules/infinite-scroll/infinity.php
index ee8aef0d..2c00f448 100644
--- a/plugins/jetpack/modules/infinite-scroll/infinity.php
+++ b/plugins/jetpack/modules/infinite-scroll/infinity.php
@@ -194,7 +194,15 @@ class The_Neverending_Home_Page {
$settings['footer_widgets'] = (bool) is_active_sidebar( $settings['footer_widgets'] );
}
- // For complex logic, let themes filter the `footer_widgets` parameter.
+ /**
+ * Filter Infinite Scroll's `footer_widgets` parameter.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param bool $settings['footer_widgets'] Does the current theme have Footer Widgets.
+ */
$settings['footer_widgets'] = apply_filters( 'infinite_scroll_has_footer_widgets', $settings['footer_widgets'] );
// Finally, after all of the sidebar checks and filtering, ensure that a boolean value is present, otherwise set to default of `false`.
@@ -211,13 +219,15 @@ class The_Neverending_Home_Page {
$settings['type'] = 'click';
}
- // Ignore posts_per_page theme setting for [click] type
- if ( 'click' == $settings['type'] )
- $settings['posts_per_page'] = (int) get_option( 'posts_per_page' );
-
- // Backwards compatibility for posts_per_page setting
- elseif ( false === $settings['posts_per_page'] )
- $settings['posts_per_page'] = 7;
+ // posts_per_page defaults to 7 for scroll, posts_per_page option for click
+ if ( false === $settings['posts_per_page'] ) {
+ if ( 'scroll' === $settings['type'] ) {
+ $settings['posts_per_page'] = 7;
+ }
+ else {
+ $settings['posts_per_page'] = (int) get_option( 'posts_per_page' );
+ }
+ }
// Force display of the click handler and attendant bits when the type isn't `click`
if ( 'click' !== $settings['type'] ) {
@@ -225,6 +235,15 @@ class The_Neverending_Home_Page {
}
// Store final settings in a class static to avoid reparsing
+ /**
+ * Filter the array of Infinite Scroll settings.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param array $settings Array of Infinite Scroll settings.
+ */
self::$settings = apply_filters( 'infinite_scroll_settings', $settings );
}
@@ -240,6 +259,15 @@ class The_Neverending_Home_Page {
*/
static function wp_query() {
global $wp_the_query;
+ /**
+ * Filter the Infinite Scroll query object.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.2.1
+ *
+ * @param WP_Query $wp_the_query WP Query.
+ */
return apply_filters( 'infinite_scroll_query_object', $wp_the_query );
}
@@ -247,7 +275,16 @@ class The_Neverending_Home_Page {
* Has infinite scroll been triggered?
*/
static function got_infinity() {
- return isset( $_GET[ 'infinity' ] );
+ /**
+ * Filter the parameter used to check if Infinite Scroll has been triggered.
+ *
+ * @module infinite-scroll
+ *
+ * @since 3.9.0
+ *
+ * @param bool isset( $_GET[ 'infinity' ] ) Return true if the "infinity" parameter is set.
+ */
+ return apply_filters( 'infinite_scroll_got_infinity', isset( $_GET[ 'infinity' ] ) );
}
/**
@@ -359,7 +396,7 @@ class The_Neverending_Home_Page {
$disabled = '' === get_option( self::$option_name_enabled ) ? true : false;
if ( ! $disabled || 'click' == self::get_settings()->type ) {
$classes[] = 'infinite-scroll';
-
+
if ( 'scroll' == self::get_settings()->type )
$classes[] = 'neverending';
}
@@ -404,7 +441,7 @@ class The_Neverending_Home_Page {
* @return array
*/
function get_query_vars() {
-
+
$query_vars = self::wp_query()->query_vars;
//applies to search page only
if ( true === self::wp_query()->is_search() ) {
@@ -428,7 +465,7 @@ class The_Neverending_Home_Page {
* @return bool
*/
function has_only_title_matching_posts() {
-
+
//apply following logic for search page results only
if ( false === self::wp_query()->is_search() ) {
return false;
@@ -436,10 +473,10 @@ class The_Neverending_Home_Page {
//grab the last posts in the stack as if the last one is title-matching the rest is title-matching as well
$post = end( self::wp_query()->posts );
-
+
//code inspired by WP_Query class
if ( preg_match_all( '/".*?("|$)|((?<=[\t ",+])|^)[^\t ",+]+/', self::wp_query()->get( 's' ), $matches ) ) {
- $search_terms = self::wp_query()->parse_search_terms( $matches[0] );
+ $search_terms = self::wp_query()->query_vars['search_terms'];
// if the search string has only short terms or stopwords, or is 10+ terms long, match it as sentence
if ( empty( $search_terms ) || count( $search_terms ) > 9 ) {
$search_terms = array( self::wp_query()->get( 's' ) );
@@ -449,9 +486,11 @@ class The_Neverending_Home_Page {
}
//actual testing. As search query combines multiple keywords with AND, it's enough to check if any of the keywords is present in the title
- if ( false !== strpos( $post->post_title, current( $search_terms ) ) ) {
+ $term = current( $search_terms );
+ if ( ! empty( $term ) && false !== strpos( $post->post_title, $term ) ) {
return true;
}
+
return false;
}
@@ -549,6 +588,18 @@ class The_Neverending_Home_Page {
// Construct the date query using our timestamp
$clause = $wpdb->prepare( " AND {$wpdb->posts}.{$sort_field} {$operator} %s", $last_post_date );
+ /**
+ * Filter Infinite Scroll's SQL date query making sure post queries
+ * will always return results prior to (descending sort)
+ * or before (ascending sort) the last post date.
+ *
+ * @module infinite-scroll
+ *
+ * @param string $clause SQL Date query.
+ * @param object $query Query.
+ * @param string $operator Query operator.
+ * @param string $last_post_date Last Post Date timestamp.
+ */
$where .= apply_filters( 'infinite_scroll_posts_where', $clause, $query, $operator, $last_post_date );
}
@@ -590,6 +641,15 @@ class The_Neverending_Home_Page {
$ajaxurl = add_query_arg( array( 'infinity' => 'scrolling' ), $base_url );
+ /**
+ * Filter the Infinite Scroll Ajax URL.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param string $ajaxurl Infinite Scroll Ajax URL.
+ */
return apply_filters( 'infinite_scroll_ajax_url', $ajaxurl );
}
@@ -609,6 +669,13 @@ class The_Neverending_Home_Page {
@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
send_nosniff_header();
+ /**
+ * Fires at the end of the Infinite Scroll Ajax response.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ */
do_action( 'custom_ajax_infinite_scroll' );
die( '0' );
}
@@ -695,8 +762,24 @@ class The_Neverending_Home_Page {
$js_settings['order'] = $order;
}
+ /**
+ * Filter the Infinite Scroll JS settings outputted in the head.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param array $js_settings Infinite Scroll JS settings.
+ */
$js_settings = apply_filters( 'infinite_scroll_js_settings', $js_settings );
+ /**
+ * Fires before Infinite Scroll outputs inline JavaScript in the head.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ */
do_action( 'infinite_scroll_wp_head' );
?>
@@ -776,9 +859,27 @@ class The_Neverending_Home_Page {
global $wp_scripts, $wp_styles;
$scripts = is_a( $wp_scripts, 'WP_Scripts' ) ? $wp_scripts->done : array();
+ /**
+ * Filter the list of scripts already present on the page.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.1.2
+ *
+ * @param array $scripts Array of scripts present on the page.
+ */
$scripts = apply_filters( 'infinite_scroll_existing_scripts', $scripts );
$styles = is_a( $wp_styles, 'WP_Styles' ) ? $wp_styles->done : array();
+ /**
+ * Filter the list of styles already present on the page.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.1.2
+ *
+ * @param array $styles Array of styles present on the page.
+ */
$styles = apply_filters( 'infinite_scroll_existing_stylesheets', $styles );
?><script type="text/javascript">
@@ -854,7 +955,27 @@ class The_Neverending_Home_Page {
if ( ! isset( $results['scripts'] ) )
$results['scripts'] = array();
- $results['scripts'] = apply_filters( 'infinite_scroll_additional_scripts', $results['scripts'], $initial_scripts, $results, $query_args, $wp_query );
+ /**
+ * Filter the additional scripts required by the latest set of IS posts.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.1.2
+ *
+ * @param array $results['scripts'] Additional scripts required by the latest set of IS posts.
+ * @param array|bool $initial_scripts Set of scripts loaded on each page.
+ * @param array $results Array of Infinite Scroll results.
+ * @param array $query_args Array of Query arguments.
+ * @param WP_Query $wp_query WP Query.
+ */
+ $results['scripts'] = apply_filters(
+ 'infinite_scroll_additional_scripts',
+ $results['scripts'],
+ $initial_scripts,
+ $results,
+ $query_args,
+ $wp_query
+ );
if ( empty( $results['scripts'] ) )
unset( $results['scripts' ] );
@@ -938,7 +1059,27 @@ class The_Neverending_Home_Page {
if ( ! isset( $results['styles'] ) )
$results['styles'] = array();
- $results['styles'] = apply_filters( 'infinite_scroll_additional_stylesheets', $results['styles'], $initial_styles, $results, $query_args, $wp_query );
+ /**
+ * Filter the additional styles required by the latest set of IS posts.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.1.2
+ *
+ * @param array $results['styles'] Additional styles required by the latest set of IS posts.
+ * @param array|bool $initial_styles Set of styles loaded on each page.
+ * @param array $results Array of Infinite Scroll results.
+ * @param array $query_args Array of Query arguments.
+ * @param WP_Query $wp_query WP Query.
+ */
+ $results['styles'] = apply_filters(
+ 'infinite_scroll_additional_stylesheets',
+ $results['styles'],
+ $initial_styles,
+ $results,
+ $query_args,
+ $wp_query
+ );
if ( empty( $results['styles'] ) )
unset( $results['styles' ] );
@@ -1003,6 +1144,15 @@ class The_Neverending_Home_Page {
// Since IS is only used on archives, we should always display the first page of any paged content.
unset( $query_args['page'] );
+ /**
+ * Filter the array of main query arguments.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.1
+ *
+ * @param array $query_args Array of Query arguments.
+ */
$query_args = apply_filters( 'infinite_scroll_query_args', $query_args );
// Add query filter that checks for posts below the date
@@ -1018,12 +1168,21 @@ class The_Neverending_Home_Page {
// Fire wp_head to ensure that all necessary scripts are enqueued. Output isn't used, but scripts are extracted in self::action_wp_footer.
ob_start();
wp_head();
- ob_end_clean();
+ while ( ob_get_length() ) {
+ ob_end_clean();
+ }
$results['type'] = 'success';
// First, try theme's specified rendering handler, either specified via `add_theme_support` or by hooking to this action directly.
ob_start();
+ /**
+ * Fires when rendering Infinite Scroll posts.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ */
do_action( 'infinite_scroll_render' );
$results['html'] = ob_get_clean();
@@ -1033,6 +1192,7 @@ class The_Neverending_Home_Page {
rewind_posts();
ob_start();
+ /** This action is already documented in modules/infinite-scroll/infinity.php */
do_action( 'infinite_scroll_render' );
$results['html'] = ob_get_clean();
}
@@ -1040,6 +1200,13 @@ class The_Neverending_Home_Page {
// If primary and fallback rendering methods fail, prevent further IS rendering attempts. Otherwise, wrap the output if requested.
if ( empty( $results['html'] ) ) {
unset( $results['html'] );
+ /**
+ * Fires when Infinite Scoll doesn't render any posts.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ */
do_action( 'infinite_scroll_empty' );
$results['type'] = 'empty';
} elseif ( $this->has_wrapper() ) {
@@ -1053,7 +1220,9 @@ class The_Neverending_Home_Page {
// Fire wp_footer to ensure that all necessary scripts are enqueued. Output isn't used, but scripts are extracted in self::action_wp_footer.
ob_start();
wp_footer();
- ob_end_clean();
+ while ( ob_get_length() ) {
+ ob_end_clean();
+ }
if ( 'success' == $results['type'] ) {
global $currentday;
@@ -1074,11 +1243,25 @@ class The_Neverending_Home_Page {
$results['postflair'] = array_flip( $jetpack_sharing_counts );
}
} else {
+ /** This action is already documented in modules/infinite-scroll/infinity.php */
do_action( 'infinite_scroll_empty' );
$results['type'] = 'empty';
}
- echo wp_json_encode( apply_filters( 'infinite_scroll_results', $results, $query_args, self::wp_query() ) );
+ echo wp_json_encode(
+ /**
+ * Filter the Infinite Scroll results.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param array $results Array of Infinite Scroll results.
+ * @param array $query_args Array of main query arguments.
+ * @param WP_Query $wp_query WP Query.
+ */
+ apply_filters( 'infinite_scroll_results', $results, $query_args, self::wp_query() )
+ );
die;
}
@@ -1134,6 +1317,16 @@ class The_Neverending_Home_Page {
* @return array
*/
function inject_query_args( $query_args ) {
+ /**
+ * Filter the array of allowed Infinite Scroll query arguments.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.6.0
+ *
+ * @param array $args Array of allowed Infinite Scroll query arguments.
+ * @param array $query_args Array of query arguments.
+ */
$allowed_vars = apply_filters( 'infinite_scroll_allowed_vars', array(), $query_args );
$query_args = array_merge( $query_args, array(
@@ -1173,11 +1366,22 @@ class The_Neverending_Home_Page {
*/
public static function archive_supports_infinity() {
$supported = current_theme_supports( 'infinite-scroll' ) && ( is_home() || is_archive() || is_search() );
- // Disable infinite scroll in customizer previews
- if ( isset( $_REQUEST[ 'wp_customize' ] ) && 'on' === $_REQUEST[ 'wp_customize' ] ) {
+
+ // Disable when previewing a non-active theme in the customizer
+ if ( is_customize_preview() && ! $GLOBALS['wp_customize']->is_theme_active() ) {
return false;
}
+ /**
+ * Allow plugins to filter what archives Infinite Scroll supports.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param bool $supported Does the Archive page support Infinite Scroll.
+ * @param object self::get_settings() IS settings provided by theme.
+ */
return (bool) apply_filters( 'infinite_scroll_archive_supported', $supported, self::get_settings() );
}
@@ -1210,8 +1414,23 @@ class The_Neverending_Home_Page {
* @return string
*/
private function default_footer() {
- $credits = '<a href="http://wordpress.org/" rel="generator">Proudly powered by WordPress</a> ';
- $credits .= sprintf( __( 'Theme: %1$s.', 'jetpack' ), function_exists( 'wp_get_theme' ) ? wp_get_theme()->Name : get_current_theme() );
+ $credits = sprintf(
+ '<a href="http://wordpress.org/" rel="generator">%1$s</a> ',
+ __( 'Proudly powered by WordPress', 'jetpack' )
+ );
+ $credits .= sprintf(
+ __( 'Theme: %1$s.', 'jetpack' ),
+ function_exists( 'wp_get_theme' ) ? wp_get_theme()->Name : get_current_theme()
+ );
+ /**
+ * Filter Infinite Scroll's credit text.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param string $credits Infinite Scroll credits.
+ */
$credits = apply_filters( 'infinite_scroll_credit', $credits );
?>
@@ -1274,6 +1493,16 @@ add_action( 'init', 'the_neverending_home_page_init', 20 );
function the_neverending_home_page_theme_support() {
$theme_name = get_stylesheet();
+ /**
+ * Filter the path to the Infinite Scroll compatibility file.
+ *
+ * @module infinite-scroll
+ *
+ * @since 2.0.0
+ *
+ * @param string $str IS compatibility file path.
+ * @param string $theme_name Theme name.
+ */
$customization_file = apply_filters( 'infinite_scroll_customization_file', dirname( __FILE__ ) . "/themes/{$theme_name}.php", $theme_name );
if ( is_readable( $customization_file ) )
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen-rtl.css b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen-rtl.css
new file mode 100644
index 00000000..0b650cee
--- /dev/null
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen-rtl.css
@@ -0,0 +1,161 @@
+.infinite-scroll .pagination {
+ display: none;
+}
+
+.infinite-wrap > article:before,
+.infinite-wrap > article:after {
+ content: "";
+ display: table;
+}
+
+.infinite-wrap > article:after {
+ clear: both;
+}
+
+.infinite-wrap > article {
+ margin-bottom: 3.5em;
+}
+
+/* Spinner */
+.site-main .infinite-loader {
+ clear: both;
+ color: currentColor;
+ height: 42px;
+ margin-bottom: 3.5em;
+}
+
+.infinite-loader .spinner {
+ right: 50% !important;
+ top: 50% !important;
+}
+
+/* Click-to-load */
+#infinite-handle {
+ clear: both;
+ margin-right: 7.6923%;
+ margin-left: 7.6923%;
+ text-align: center;
+}
+
+.site-main #infinite-handle span {
+ background: #1a1a1a;
+ border-radius: 2px;
+ color: #fff;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: inherit;
+ font-weight: 700;
+ letter-spacing: 0.046875em;
+ line-height: 1;
+ padding: 0.84375em 0.875em 0.78125em;
+ text-transform: uppercase;
+}
+
+#infinite-handle span:hover,
+#infinite-handle span:focus {
+ background: #007acc;
+}
+
+#infinite-handle button:focus {
+ outline-offset: 0.375em;
+}
+
+/* Footer */
+body #infinite-footer {
+ display: none;
+ z-index: 999;
+}
+
+body #infinite-footer .container {
+ background-color: #fff;
+ background-color: rgba(255, 255, 255, 0.8);
+ border-color: #d1d1d1;
+ padding: 0 7.6923%;
+ width: 100% !important;
+}
+
+body #infinite-footer .blog-info {
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ height: 2.1875em;
+ line-height: 2.1875em;
+}
+
+body #infinite-footer .blog-info a {
+ color: #1a1a1a;
+ font-size: inherit
+}
+
+body #infinite-footer .blog-credits {
+ font-size: 13px;
+ font-size: 0.8125rem;
+ height: 2.692307692em;
+ line-height: 2.692307692em;
+}
+
+body #infinite-footer .blog-credits,
+body #infinite-footer .blog-credits a {
+ color: #686868;
+}
+
+body #infinite-footer .blog-info a:hover,
+body #infinite-footer .blog-info a:focus,
+body #infinite-footer .blog-credits a:hover,
+body #infinite-footer .blog-credits a:focus {
+ color: #007acc;
+ text-decoration: none;
+}
+
+@media screen and (min-width: 44.375em) {
+ .infinite-wrap > article,
+ .site-main .infinite-loader {
+ margin-bottom: 5.25em;
+ }
+
+ .infinite-loader .spinner {
+ right: 7.6923% !important;
+ margin-right: 12px;
+ }
+
+ #infinite-handle {
+ text-align: right;
+ }
+
+ .site-main #infinite-handle span {
+ display: inline-block;
+ }
+
+ body #infinite-footer .container {
+ padding: 0 0.761904762em;
+ width: -webkit-calc(100% - 42px) !important;
+ width: calc(100% - 42px) !important;
+ }
+
+ body:not(.custom-background-image) #infinite-footer {
+ bottom: 21px !important;
+ }
+}
+
+@media screen and (min-width: 56.875em) {
+ .infinite-loader .spinner {
+ right: 0 !important;
+ }
+
+ #infinite-handle {
+ margin: 0;
+ }
+
+ .no-sidebar .infinite-loader .spinner {
+ right: 50% !important;
+ margin: 0;
+ }
+
+ .no-sidebar #infinite-handle {
+ text-align: center;
+ }
+}
+
+@media screen and (min-width: 61.5625em) {
+ .infinite-wrap > article,
+ .site-main .infinite-loader {
+ margin-bottom: 7.0em;
+ }
+}
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.css b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.css
new file mode 100644
index 00000000..3d2cd8f2
--- /dev/null
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.css
@@ -0,0 +1,161 @@
+.infinite-scroll .pagination {
+ display: none;
+}
+
+.infinite-wrap > article:before,
+.infinite-wrap > article:after {
+ content: "";
+ display: table;
+}
+
+.infinite-wrap > article:after {
+ clear: both;
+}
+
+.infinite-wrap > article {
+ margin-bottom: 3.5em;
+}
+
+/* Spinner */
+.site-main .infinite-loader {
+ clear: both;
+ color: currentColor;
+ height: 42px;
+ margin-bottom: 3.5em;
+}
+
+.infinite-loader .spinner {
+ left: 50% !important;
+ top: 50% !important;
+}
+
+/* Click-to-load */
+#infinite-handle {
+ clear: both;
+ margin-right: 7.6923%;
+ margin-left: 7.6923%;
+ text-align: center;
+}
+
+.site-main #infinite-handle span {
+ background: #1a1a1a;
+ border-radius: 2px;
+ color: #fff;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: inherit;
+ font-weight: 700;
+ letter-spacing: 0.046875em;
+ line-height: 1;
+ padding: 0.84375em 0.875em 0.78125em;
+ text-transform: uppercase;
+}
+
+#infinite-handle span:hover,
+#infinite-handle span:focus {
+ background: #007acc;
+}
+
+#infinite-handle button:focus {
+ outline-offset: 0.375em;
+}
+
+/* Footer */
+body #infinite-footer {
+ display: none;
+ z-index: 999;
+}
+
+body #infinite-footer .container {
+ background-color: #fff;
+ background-color: rgba(255, 255, 255, 0.8);
+ border-color: #d1d1d1;
+ padding: 0 7.6923%;
+ width: 100% !important;
+}
+
+body #infinite-footer .blog-info {
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ height: 2.1875em;
+ line-height: 2.1875em;
+}
+
+body #infinite-footer .blog-info a {
+ color: #1a1a1a;
+ font-size: inherit
+}
+
+body #infinite-footer .blog-credits {
+ font-size: 13px;
+ font-size: 0.8125rem;
+ height: 2.692307692em;
+ line-height: 2.692307692em;
+}
+
+body #infinite-footer .blog-credits,
+body #infinite-footer .blog-credits a {
+ color: #686868;
+}
+
+body #infinite-footer .blog-info a:hover,
+body #infinite-footer .blog-info a:focus,
+body #infinite-footer .blog-credits a:hover,
+body #infinite-footer .blog-credits a:focus {
+ color: #007acc;
+ text-decoration: none;
+}
+
+@media screen and (min-width: 44.375em) {
+ .infinite-wrap > article,
+ .site-main .infinite-loader {
+ margin-bottom: 5.25em;
+ }
+
+ .infinite-loader .spinner {
+ left: 7.6923% !important;
+ margin-left: 12px;
+ }
+
+ #infinite-handle {
+ text-align: left;
+ }
+
+ .site-main #infinite-handle span {
+ display: inline-block;
+ }
+
+ body #infinite-footer .container {
+ padding: 0 0.761904762em;
+ width: -webkit-calc(100% - 42px) !important;
+ width: calc(100% - 42px) !important;
+ }
+
+ body:not(.custom-background-image) #infinite-footer {
+ bottom: 21px !important;
+ }
+}
+
+@media screen and (min-width: 56.875em) {
+ .infinite-loader .spinner {
+ left: 0 !important;
+ }
+
+ #infinite-handle {
+ margin: 0;
+ }
+
+ .no-sidebar .infinite-loader .spinner {
+ left: 50% !important;
+ margin: 0;
+ }
+
+ .no-sidebar #infinite-handle {
+ text-align: center;
+ }
+}
+
+@media screen and (min-width: 61.5625em) {
+ .infinite-wrap > article,
+ .site-main .infinite-loader {
+ margin-bottom: 7.0em;
+ }
+}
diff --git a/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php
new file mode 100644
index 00000000..99af00ef
--- /dev/null
+++ b/plugins/jetpack/modules/infinite-scroll/themes/twentysixteen.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Infinite Scroll Theme Assets
+ *
+ * Register support for Twenty Sixteen.
+ */
+
+/**
+ * Add theme support for infinite scroll
+ */
+function twentysixteen_infinite_scroll_init() {
+ add_theme_support( 'infinite-scroll', array(
+ 'container' => 'main',
+ 'render' => 'twentysixteen_infinite_scroll_render',
+ 'footer' => 'content',
+ ) );
+}
+add_action( 'after_setup_theme', 'twentysixteen_infinite_scroll_init' );
+
+/**
+ * Custom render function for Infinite Scroll.
+ */
+function twentysixteen_infinite_scroll_render() {
+ while ( have_posts() ) {
+ the_post();
+ if ( is_search() ) {
+ get_template_part( 'template-parts/content', 'search' );
+ } else {
+ get_template_part( 'template-parts/content', get_post_format() );
+ }
+ }
+}
+
+/**
+ * Enqueue CSS stylesheet with theme styles for Infinite Scroll.
+ */
+function twentysixteen_infinite_scroll_enqueue_styles() {
+ wp_enqueue_style( 'infinity-twentysixteen', plugins_url( 'twentysixteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20151102' );
+ wp_style_add_data( 'infinity-twentysixteen', 'rtl', 'replace' );
+}
+add_action( 'wp_enqueue_scripts', 'twentysixteen_infinite_scroll_enqueue_styles', 25 );
diff --git a/plugins/jetpack/modules/json-api.php b/plugins/jetpack/modules/json-api.php
index 87b4d702..aff55d00 100644
--- a/plugins/jetpack/modules/json-api.php
+++ b/plugins/jetpack/modules/json-api.php
@@ -7,6 +7,7 @@
* Requires Connection: Yes
* Auto Activate: Public
* Module Tags: Writing, Developers
+ * Additional Search Queries: api, rest, develop, developers, json, klout, oauth
*/
add_action( 'jetpack_activate_module_json-api', array( Jetpack::init(), 'toggle_module_on_wpcom' ) );
diff --git a/plugins/jetpack/modules/latex.php b/plugins/jetpack/modules/latex.php
index 5841257f..cec2065c 100644
--- a/plugins/jetpack/modules/latex.php
+++ b/plugins/jetpack/modules/latex.php
@@ -7,6 +7,7 @@
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Writing
+ * Additional Search Queries: latex, math, equation, equations, formula, code
*/
/**
@@ -103,4 +104,3 @@ add_filter( 'no_texturize_shortcodes', 'latex_no_texturize' );
add_filter( 'the_content', 'latex_markup', 9 ); // before wptexturize
add_filter( 'comment_text', 'latex_markup', 9 ); // before wptexturize
add_shortcode( 'latex', 'latex_shortcode' );
-
diff --git a/plugins/jetpack/modules/likes.php b/plugins/jetpack/modules/likes.php
index e9bd71c5..cb9c4779 100644
--- a/plugins/jetpack/modules/likes.php
+++ b/plugins/jetpack/modules/likes.php
@@ -7,6 +7,7 @@
* Requires Connection: Yes
* Auto Activate: No
* Module Tags: Social
+ * Additional Search Queries: like, likes, wordpress.com
*/
Jetpack::dns_prefetch( array(
@@ -18,7 +19,7 @@ Jetpack::dns_prefetch( array(
) );
class Jetpack_Likes {
- var $version = '20141028';
+ public $version = '20151215';
public static function init() {
static $instance = NULL;
@@ -40,6 +41,8 @@ class Jetpack_Likes {
add_action( 'jetpack_activate_module_likes', array( $this, 'maybe_sync_content' ) );
add_action( 'jetpack_activate_module_likes', array( $this, 'module_toggle' ) );
add_action( 'jetpack_deactivate_module_likes', array( $this, 'module_toggle' ) );
+ add_action( 'jetpack_activate_module_likes', array( $this, 'set_social_notifications_like' ) );
+ add_action( 'jetpack_deactivate_module_likes', array( $this, 'delete_social_notifications_like' ) );
Jetpack::enable_module_configurable( __FILE__ );
Jetpack::module_configuration_load( __FILE__, array( $this, 'configuration_redirect' ) );
@@ -101,6 +104,28 @@ class Jetpack_Likes {
}
/**
+ * Set the social_notifications_like option to `on` when the Likes module is activated.
+ *
+ * @since 3.7.0
+ *
+ * @return null
+ */
+ function set_social_notifications_like() {
+ update_option( 'social_notifications_like', 'on' );
+ }
+
+ /**
+ * Delete the social_notifications_like option that was set to `on` on module activation.
+ *
+ * @since 3.7.0
+ *
+ * @return null
+ */
+ function delete_social_notifications_like() {
+ delete_option( 'social_notifications_like' );
+ }
+
+ /**
* Redirects to the likes section of the sharing page.
*/
function configuration_redirect() {
@@ -149,10 +174,31 @@ class Jetpack_Likes {
* Adds a metabox to the post screen if the sharing one doesn't currently exist.
*/
function add_meta_box() {
- if ( apply_filters( 'post_flair_disable', false ) )
+ if (
+ /**
+ * Allow disabling of the Likes metabox on the post editor screen.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool false Should the Likes metabox be disabled? Default to false.
+ */
+ apply_filters( 'post_flair_disable', false )
+ ) {
return;
+ }
$post_types = get_post_types( array( 'public' => true ) );
+ /**
+ * Filters the Likes metabox title.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param string Likes metabox title. Default to "Likes".
+ */
$title = apply_filters( 'likes_meta_box_title', __( 'Likes', 'jetpack' ) );
foreach( $post_types as $post_type ) {
add_meta_box( 'likes_meta', $title, array( $this, 'meta_box_content' ), $post_type, 'advanced', 'high' );
@@ -207,6 +253,15 @@ class Jetpack_Likes {
if ( $disabled && empty( $switched_status ) || false == $disabled && !empty( $switched_status ) )
$checked = false;
+ /**
+ * Fires before the Likes meta box content in the post editor.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param WP_Post|array|null $post Post data.
+ */
do_action( 'start_likes_meta_box_content', $post );
?>
@@ -217,6 +272,15 @@ class Jetpack_Likes {
</label>
<input type="hidden" name="wpl_like_status_hidden" value="1" />
</p> <?php
+ /**
+ * Fires after the Likes meta box content in the post editor.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param WP_Post|array|null $post Post data.
+ */
do_action( 'end_likes_meta_box_content', $post );
}
@@ -358,8 +422,11 @@ class Jetpack_Likes {
* If sharedaddy is not loaded, we don't have the "Show buttons on" yet, so we need to add that since it affects likes too.
*/
function admin_settings_showbuttonon_init() { ?>
- <?php echo apply_filters( 'sharing_show_buttons_on_row_start', '<tr valign="top">' ); ?>
- <th scope="row"><label><?php _e( 'Show buttons on', 'jetpack' ); ?></label></th>
+ <?php
+ /** This action is documented in modules/sharedaddy/sharing.php */
+ echo apply_filters( 'sharing_show_buttons_on_row_start', '<tr valign="top">' );
+ ?>
+ <th scope="row"><label><?php _e( 'Show buttons on', 'jetpack' ); ?></label></th>
<td>
<?php
$br = false;
@@ -377,7 +444,10 @@ class Jetpack_Likes {
<?php if ( $br ) echo '<br />'; ?><label><input type="checkbox"<?php checked( in_array( $show, $global['show'] ) ); ?> name="show[]" value="<?php echo esc_attr( $show ); ?>" /> <?php echo esc_html( $label ); ?></label>
<?php $br = true; endforeach; ?>
</td>
- <?php echo apply_filters( 'sharing_show_buttons_on_row_end', '</tr>' ); ?>
+ <?php
+ /** This action is documented in modules/sharedaddy/sharing.php */
+ echo apply_filters( 'sharing_show_buttons_on_row_end', '</tr>' );
+ ?>
<?php }
@@ -518,8 +588,11 @@ class Jetpack_Likes {
$this->updated_message(); ?>
<div class="wrap">
<div class="icon32" id="icon-options-general"><br /></div>
- <h2><?php esc_html_e( 'Sharing Settings', 'jetpack' ); ?></h2>
- <?php do_action( 'pre_admin_screen_sharing' ) ?>
+ <h1><?php esc_html_e( 'Sharing Settings', 'jetpack' ); ?></h1>
+ <?php
+ /** This action is documented in modules/sharedaddy/sharing.php */
+ do_action( 'pre_admin_screen_sharing' );
+ ?>
<?php $this->sharing_block(); ?>
</div> <?php
}
@@ -536,7 +609,7 @@ class Jetpack_Likes {
* Returns just the "sharing buttons" w/ like option block, so it can be inserted into different sharing page contexts
*/
function sharing_block() { ?>
- <h3><?php esc_html_e( 'Sharing Buttons', 'jetpack' ); ?></h3>
+ <h2><?php esc_html_e( 'Sharing Buttons', 'jetpack' ); ?></h2>
<form method="post" action="">
<table class="form-table">
<tbody>
@@ -563,8 +636,14 @@ class Jetpack_Likes {
add_action( 'admin_print_styles-edit.php', array( $this, 'load_admin_css' ) );
add_action( "admin_print_scripts-edit.php", array( $this, 'enqueue_admin_scripts' ) );
+
if ( $this->in_jetpack ) {
- Jetpack_Sync::sync_posts( __FILE__ );
+ $post_stati = get_post_stati( array( 'public' => true ) ); // All public post stati
+ $post_stati[] = 'private'; // Content from private stati will be redacted
+ Jetpack_Sync::sync_posts( __FILE__, array(
+ 'post_types' => get_post_types( array( 'public' => true ) ),
+ 'post_stati' => $post_stati,
+ ) );
}
}
@@ -595,14 +674,7 @@ class Jetpack_Likes {
wp_enqueue_script( 'postmessage', '/wp-content/js/postmessage.js', array( 'jquery' ), JETPACK__VERSION, false );
wp_enqueue_script( 'jquery_inview', '/wp-content/js/jquery/jquery.inview.js', array( 'jquery' ), JETPACK__VERSION, false );
wp_enqueue_script( 'jetpack_resize', '/wp-content/js/jquery/jquery.jetpack-resize.js', array( 'jquery' ), JETPACK__VERSION, false );
-
-
- // @todo: Remove this opt-out filter in the future
- if ( apply_filters( 'wpl_sharing_2014_1', true ) ) {
- wp_enqueue_style( 'jetpack_likes', plugins_url( 'jetpack-likes.css', __FILE__ ), array(), JETPACK__VERSION );
- } else {
- wp_enqueue_style( 'jetpack_likes', plugins_url( 'jetpack-likes-legacy.css', __FILE__ ), array(), JETPACK__VERSION );
- }
+ wp_enqueue_style( 'jetpack_likes', plugins_url( 'jetpack-likes.css', __FILE__ ), array(), JETPACK__VERSION );
}
}
@@ -622,27 +694,65 @@ class Jetpack_Likes {
*/
function load_admin_css() {
?>
- <style type="text/css">
- .fixed .column-likes { width: 5em; padding-top: 8px; text-align: center !important; }
- .fixed .column-stats { width: 5em; }
- .fixed .column-likes .post-com-count { background-image: none; }
- .fixed .column-likes .post-com-count::after { border: none !important; }
- .fixed .column-likes .comment-count { background-color: #bbb; }
- .fixed .column-likes .comment-count:hover { background-color: #2ea2cc; }
- .fixed .column-likes .vers img { display: none; }
- .fixed .column-likes .vers:before {
- font: normal 20px/1 dashicons;
- content: '\f155';
- speak: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- }
- @media screen and (max-width: 782px) {
- .fixed .column-likes {
- display: none;
+ <?php if ( version_compare( $GLOBALS['wp_version'], '4.3-alpha', '>=' ) ) : ?>
+ <style type="text/css">
+ .vers img { display: none; }
+ .metabox-prefs .vers img { display: inline; }
+ .fixed .column-likes { width: 5.5em; padding: 8px 0; text-align: left; }
+ .fixed .column-stats { width: 5em; }
+ .fixed .column-likes .post-com-count {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ display: inline-block;
+ padding: 0 8px;
+ height: 2em;
+ margin-top: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ background-color: #72777C;
+ color: #FFF;
+ font-size: 11px;
+ line-height: 21px;
}
- }
- </style>
+ .fixed .column-likes .post-com-count::after { border: none !important; }
+ .fixed .column-likes .post-com-count:hover { background-color: #0073AA; }
+ .fixed .column-likes .vers:before {
+ font: normal 20px/1 dashicons;
+ content: '\f155';
+ speak: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+ @media screen and (max-width: 782px) {
+ .fixed .column-likes {
+ display: none;
+ }
+ }
+ </style>
+ <?php else : // @todo Remove when 4.3 is minimum ?>
+ <style type="text/css">
+ .fixed .column-likes { width: 5em; padding-top: 8px; text-align: center !important; }
+ .fixed .column-stats { width: 5em; }
+ .fixed .column-likes .post-com-count { background-image: none; }
+ .fixed .column-likes .post-com-count::after { border: none !important; }
+ .fixed .column-likes .comment-count { background-color: #bbb; }
+ .fixed .column-likes .comment-count:hover { background-color: #2ea2cc; }
+ .fixed .column-likes .vers img { display: none; }
+ .fixed .column-likes .vers:before {
+ font: normal 20px/1 dashicons;
+ content: '\f155';
+ speak: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+ @media screen and (max-width: 782px) {
+ .fixed .column-likes {
+ display: none;
+ }
+ }
+ </style>
+ <?php endif; ?>
<?php
}
@@ -827,13 +937,9 @@ class Jetpack_Likes {
if ( is_ssl() )
$protocol = 'https';
- if ( version_compare( $GLOBALS['wp_version'], '3.8-alpha', '>=' ) ) {
- add_filter( 'mp6_enabled', '__return_true', 97 );
- }
-
$_locale = get_locale();
- // We have to account for WP.org vs WP.com locale divergence
+ // We have to account for w.org vs WP.com locale divergence
if ( $this->in_jetpack ) {
if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
return false;
@@ -847,12 +953,12 @@ class Jetpack_Likes {
$likes_locale = ( '' == $_locale || 'en' == $_locale ) ? '' : '&amp;lang=' . strtolower( $_locale );
- // @todo: Remove this opt-out filter in the future
- if ( apply_filters( 'wpl_sharing_2014_1', true ) ) {
- $src = sprintf( '%1$s://widgets.wp.com/likes/master.html?ver=%2$s#ver=%2$s%3$s&amp;mp6=%4$d', $protocol, $this->version, $likes_locale, apply_filters( 'mp6_enabled', 0 ) );
- } else {
- $src = sprintf( '%1$s://widgets.wp.com/likes/master-legacy.html?ver=%2$s#ver=%2$s%3$s&amp;mp6=%4$d', $protocol, $this->version, $likes_locale, apply_filters( 'mp6_enabled', 0 ) );
- }
+ $src = sprintf(
+ '%1$s://widgets.wp.com/likes/master.html?ver=%2$s#ver=%2$s%3$s',
+ $protocol,
+ $this->version,
+ $likes_locale
+ );
$likersText = wp_kses( __( '<span>%d</span> bloggers like this:', 'jetpack' ), array( 'span' => array() ) );
?>
@@ -893,6 +999,15 @@ class Jetpack_Likes {
// Ensure it's always an array (even if not previously empty or scalar)
$setting['show'] = !empty( $sharing['global']['show'] ) ? (array) $sharing['global']['show'] : array();
+ /**
+ * Filters where the Likes are displayed.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param array $setting Array of Likes display settings.
+ */
return apply_filters( 'wpl_get_options', $setting );
}
@@ -906,10 +1021,17 @@ class Jetpack_Likes {
*/
function is_likes_visible() {
- global $post; // Used to apply 'sharing_show' filter
+ global $post, $wp_current_filter; // Used to apply 'sharing_show' filter
+ // @todo: Remove this block when 4.5 is the minimum
+ global $wp_version;
+ $comment_popup = false;
+ if ( version_compare( $wp_version, '4.5-alpha', '<=' ) ) {
+ $comment_popup = is_comments_popup();
+ }
+ // End 4.5 conditional block.
// Never show on feeds or previews
- if ( is_feed() || is_preview() || is_comments_popup() ) {
+ if ( is_feed() || is_preview() || $comment_popup ) { // @todo: Remove $comment_popup when 4.5 is minimum.
$enabled = false;
// Not a feed or preview, so what is it?
@@ -926,6 +1048,10 @@ class Jetpack_Likes {
if ( post_password_required() )
$enabled = false;
+ if ( in_array( 'get_the_excerpt', (array) $wp_current_filter ) ) {
+ $enabled = false;
+ }
+
// Sharing Setting Overrides ****************************************
// Single post including custom post types
@@ -935,7 +1061,7 @@ class Jetpack_Likes {
}
// Single page
- } elseif ( is_page() ) {
+ } elseif ( is_page() && ! is_front_page() ) {
if ( ! $this->is_single_page_enabled() ) {
$enabled = false;
}
@@ -968,6 +1094,16 @@ class Jetpack_Likes {
/** This filter is documented in modules/sharedaddy/sharing-service.php */
$enabled = apply_filters( 'sharing_show', $enabled, $post );
+ /**
+ * Filters whether the Likes should be visible or not.
+ * Allows overwriting the options set in Settings > Sharing.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool $enabled Should the Likes be visible?
+ */
return (bool) apply_filters( 'wpl_is_likes_visible', $enabled );
}
@@ -976,6 +1112,16 @@ class Jetpack_Likes {
* @return boolean true if enabled sitewide, false if not
*/
function is_enabled_sitewide() {
+ /**
+ * Filters whether Likes are enabled by default on all posts.
+ * true if enabled sitewide, false if not.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool $option Are Likes enabled sitewide.
+ */
return (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
}
@@ -984,6 +1130,16 @@ class Jetpack_Likes {
* @return boolean true if enabled sitewide, false if not
*/
function reblogs_enabled_sitewide() {
+ /**
+ * Filters whether Reblogs are enabled by default on all posts.
+ * true if enabled sitewide, false if not.
+ *
+ * @module likes
+ *
+ * @since 3.0.0
+ *
+ * @param bool $option Are Reblogs enabled sitewide.
+ */
return (bool) apply_filters( 'wpl_reblogging_enabled_sitewide', ! get_option( 'disabled_reblogs' ) );
}
@@ -993,6 +1149,16 @@ class Jetpack_Likes {
* @return boolean true if we should show comment likes, false if not
*/
function is_comments_enabled() {
+ /**
+ * Filters whether Comment Likes are enabled.
+ * true if enabled, false if not.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool $option Are Comment Likes enabled sitewide.
+ */
return (bool) apply_filters( 'jetpack_comment_likes_enabled', get_option( 'jetpack_comment_likes_enabled', false ) );
}
@@ -1011,6 +1177,15 @@ class Jetpack_Likes {
if ( ! $this->is_post_likeable() )
return false;
+ /**
+ * Filters whether the Like button is enabled in the admin bar.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool true Should the Like button be visible in the Admin bar. Default to true.
+ */
return (bool) apply_filters( 'jetpack_admin_bar_likes_enabled', true );
}
@@ -1044,6 +1219,15 @@ class Jetpack_Likes {
*/
function is_index_enabled() {
$options = $this->get_options();
+ /**
+ * Filters whether Likes should be enabled on archive/front/search pages.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool $enabled Are Post Likes enabled on archive/front/search pages?
+ */
return (bool) apply_filters( 'wpl_is_index_disabled', (bool) in_array( 'index', $options['show'] ) );
}
@@ -1056,6 +1240,17 @@ class Jetpack_Likes {
function is_single_post_enabled( $post_type = 'post' ) {
$options = $this->get_options();
return (bool) apply_filters(
+ /**
+ * Filters whether Likes should be enabled on single posts.
+ *
+ * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool $enabled Are Post Likes enabled on single posts?
+ */
"wpl_is_single_{$post_type}_disabled",
(bool) in_array( $post_type, $options['show'] )
);
@@ -1068,6 +1263,15 @@ class Jetpack_Likes {
*/
function is_single_page_enabled() {
$options = $this->get_options();
+ /**
+ * Filters whether Likes should be enabled on single pages.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool $enabled Are Post Likes enabled on single pages?
+ */
return (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) );
}
@@ -1078,6 +1282,15 @@ class Jetpack_Likes {
*/
function is_attachment_enabled() {
$options = $this->get_options();
+ /**
+ * Filters whether Likes should be enabled on attachment pages.
+ *
+ * @module likes
+ *
+ * @since 2.2.0
+ *
+ * @param bool $enabled Are Post Likes enabled on attachment pages?
+ */
return (bool) apply_filters( 'wpl_is_attachment_disabled', (bool) in_array( 'attachment', $options['show'] ) );
}
}
diff --git a/plugins/jetpack/modules/manage.php b/plugins/jetpack/modules/manage.php
index 9baa4322..f9249144 100644
--- a/plugins/jetpack/modules/manage.php
+++ b/plugins/jetpack/modules/manage.php
@@ -2,7 +2,7 @@
/**
* Module Name: Manage
* Module Description: Manage all your sites from a centralized place, https://wordpress.com/sites.
- * Jumpstart Description: helps you remotely manage plugins, turn on automated updates, and more from <a href="https://wordpress.com/plugins/" target="_blank">wordpress.com</a>.
+ * Jumpstart Description: Helps you remotely manage plugins, turn on automated updates, and more from <a href="https://wordpress.com/plugins/" target="_blank">wordpress.com</a>.
* Sort Order: 1
* Recommendation Order: 3
* First Introduced: 3.4
@@ -10,7 +10,41 @@
* Auto Activate: No
* Module Tags: Centralized Management, Recommended
* Feature: Recommended, Jumpstart
+ * Additional Search Queries: manage, management, remote
*/
add_action( 'jetpack_activate_module_manage', array( Jetpack::init(), 'toggle_module_on_wpcom' ) );
-add_action( 'jetpack_deactivate_module_manage', array( Jetpack::init(), 'toggle_module_on_wpcom' ) );
+add_action( 'jetpack_deactivate_module_manage', array( Jetpack::init(), 'toggle_module_on_wpcom' ) );
+add_action( 'customize_register', 'add_wpcom_to_allowed_redirect_hosts' );
+
+// Add wordpress.com to the safe redirect whitelist if the Manage module is enabled
+// so the customizer can `return` to wordpress.com if invoked from there.
+function add_wpcom_to_allowed_redirect_hosts( $domains ) {
+ if ( Jetpack::is_module_active( 'manage' ) ) {
+ add_filter( 'allowed_redirect_hosts', 'allow_wpcom_domain' );
+ }
+}
+
+// Return $domains, with 'wordpress.com' appended.
+function allow_wpcom_domain( $domains ) {
+ if ( empty( $domains ) ) {
+ $domains = array();
+ }
+ $domains[] = 'wordpress.com';
+ return array_unique( $domains );
+}
+
+// Re add sync for non public posts when the optin is selected in Calypso.
+// This will only work if you have manage enabled as well.
+if ( Jetpack_Options::get_option( 'sync_non_public_post_stati' ) ) {
+ $sync_options = array(
+ 'post_types' => get_post_types( array( 'public' => true ) ),
+ 'post_stati' => get_post_stati(),
+ );
+ Jetpack_Sync::sync_posts( __FILE__, $sync_options );
+}
+
+Jetpack::module_configuration_screen( 'manage', 'jetpack_manage_config_screen' );
+function jetpack_manage_config_screen() {
+ include ( JETPACK__PLUGIN_DIR . 'modules/manage/confirm-admin.php' );
+}
diff --git a/plugins/jetpack/modules/manage/activate-admin.php b/plugins/jetpack/modules/manage/activate-admin.php
new file mode 100644
index 00000000..20b758b2
--- /dev/null
+++ b/plugins/jetpack/modules/manage/activate-admin.php
@@ -0,0 +1,95 @@
+<?php
+
+$activate_url = wp_nonce_url(
+ Jetpack::admin_url(
+ array(
+ 'page' => 'jetpack',
+ 'action' => 'activate',
+ 'module' => 'manage',
+ )
+ ),
+ 'jetpack_activate-manage'
+ );
+
+$section = isset( $_GET['section'] ) ? $_GET['section'] : null;
+
+switch( $section ) {
+ case 'plugins':
+ $description = __( 'Just one more step before your plugins can be managed with WordPress.com. Click the button below and you\'ll be managing all of your plugins in one place.', 'jetpack' );
+ break;
+
+ case 'themes':
+ $description = __( 'Just one more step before your themes can be managed with WordPress.com. Click the button below and you\'ll be managing your themes with our newly-redesigned user interface.', 'jetpack' );
+ break;
+
+ case 'security-settings':
+ $description = __( 'Just one more step before your site can be secured by Jetpack and WordPress.com. Click the button below and you\'ll be safe and secure.', 'jetpack' );
+ break;
+
+ case 'menus':
+ $description = __( 'Just one more step before your menus can be managed with WordPress.com. Click the button below and you\'ll be managing your menus with our newly-redesigned user interface.', 'jetpack' );
+ break;
+
+ default:
+ $description = __( 'Just one more step before you can manage your site from WordPress.com! Click the button below and you will be good to go.', 'jetpack' );
+ break;
+}
+?>
+<div class="page-content landing manage-page">
+ <div class="manage__icon">
+ <svg width="149px" height="152px" viewBox="0 0 149 152" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
+ <defs>
+ <path id="path-1" d="M0,71.073 C0,76.696 0.677,82.16 1.919,87.407 L1.919,87.407 C3.934,87.957 6.074,88.157 8.155,88.025 L8.155,88.025 C24.965,86.955 36.859,74.293 47.988,63.218 L47.988,63.218 C48.289,62.92 53.255,57.979 53.255,57.979 L53.255,57.979 L59.009,63.704 C57.815,65.8 56.424,67.737 54.931,69.599 L54.931,69.599 L62.616,77.245 L25.84,113.838 L27.16,115.152 L20.938,121.344 C33.862,134.197 51.711,142.146 71.428,142.146 L71.428,142.146 C110.876,142.146 142.855,110.324 142.855,71.073 L142.855,71.073 C142.855,31.82 110.876,0 71.428,0 L71.428,0 C31.981,0 0,31.82 0,71.073 L0,71.073 Z"></path>
+ <path id="path-3" d="M86.3139508,20.091 C86.3139508,20.091 79.5099508,25.071 79.0589508,25.741 L79.0589508,25.741 C78.6099508,26.414 80.8579508,31.113 81.3339508,31.311 L81.3339508,31.311 C81.8099508,31.511 90.6089508,31.19 90.6089508,31.19 L90.6089508,31.19 L93.5729508,25.793 L87.6959508,20 L86.3139508,20.091 Z"></path>
+ <path id="path-5" d="M66.647,37.5820009 L45,59.1230009 L56.227,70.2960009 L84.141,42.5210009 L79.239,37.6450009 L79.176,37.5810009 C77.447,35.8600009 75.18,35.0000009 72.913,35.0000009 L72.913,35.0000009 C70.645,34.9990009 68.378,35.8600009 66.647,37.5820009 L66.647,37.5820009 Z"></path>
+ <path id="path-7" d="M66.647,37.583 L45,59.124 L56.227,70.297 L84.141,42.522 L79.239,37.646 L79.176,37.582 C77.446,35.861 75.179,35 72.913,35 L72.913,35 C70.645,35 68.378,35.862 66.647,37.583 L66.647,37.583 Z"></path>
+ <path id="path-9" d="M120.282,10.301 L120.282,13.022 L110.081,18.113 C104.759,20.77 100.242,24.716 96.875,29.537 L96.875,29.537 L92.488,25.171 L92.483,25.176 L89.051,28.591 C87.765,29.87 85.678,29.87 84.391,28.591 L84.391,28.591 L83.012,27.218 C82.346,26.556 82.346,25.48 83.012,24.818 L83.012,24.818 L87.547,20.305 C87.542,20.301 87.534,20.295 87.528,20.291 L87.528,20.291 L87.524,20.287 L87.524,20.287 C84.951,18.223 81.176,18.38 78.786,20.757 L78.786,20.757 L70.383,29.12 L78.874,37.568 C72.917,38.942 67.877,42.912 65.183,48.41 L65.183,48.41 L56.378,66.386 C49.275,69.043 43.6,74.775 41.15,82.172 L41.15,82.172 L34.145,103.322 L32.701,104.036 C25.038,107.817 18.832,113.993 15.03,121.619 L15.03,121.619 L9.602,132.506 L5.467,131.505 C3.76,131.093 2.039,132.136 1.625,133.835 L1.625,133.835 L-2,148.679 L5.021,141.693 L5.021,141.695 L53.777,93.18 C55.035,94.022 56.367,94.764 57.768,95.395 L57.768,95.395 L77.103,104.096 C71.971,104.937 67.023,106.788 62.568,109.584 L62.568,109.584 L52.321,116.022 L49.487,113.199 C48.348,112.067 46.503,112.067 45.365,113.199 L45.365,113.199 L34.877,123.636 L43.525,121.545 L43.522,121.548 L75.442,113.837 L83.03,112.004 C84.574,111.623 85.867,110.861 86.869,109.863 L86.869,109.863 C89.91,106.837 90.282,101.634 86.872,98.24 L86.872,98.24 L67.993,79.456 L73.85,75.054 L96.733,75.055 L96.732,75.054 L96.858,75.054 C97.996,75.055 99.003,74.501 99.628,73.652 L99.628,73.652 C99.637,73.639 99.648,73.628 99.658,73.617 L99.658,73.617 L99.655,73.615 C100.053,73.057 100.291,72.376 100.291,71.639 L100.291,71.639 L100.291,68.398 C100.291,67.355 99.442,66.509 98.393,66.509 L98.393,66.509 L95.136,66.509 C93.24,66.509 91.703,68.039 91.704,69.926 L91.704,69.926 L91.704,70.989 L85.174,68.831 C84.449,68.592 83.717,68.383 82.981,68.191 L82.981,68.191 L85.502,66.297 C89.664,63.17 92.118,58.29 92.14,53.1 L92.14,53.1 L92.176,44.73 L131.098,6.001 L124.605,6 C122.219,6.001 120.282,7.926 120.282,10.301 L120.282,10.301 Z"></path>
+ </defs>
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
+ <g id="Artboard-1-Copy" sketch:type="MSArtboardGroup">
+ <g id="Group" sketch:type="MSLayerGroup" transform="translate(3.000000, 5.000000)">
+ <path d="M71.427,0 C31.98,0 0,31.82 0,71.073 C0,76.696 0.676,82.16 1.918,87.408 C3.933,87.958 6.074,88.158 8.154,88.025 C24.965,86.955 36.858,74.294 47.987,63.219 C48.289,62.92 53.254,57.979 53.254,57.979 L59.009,63.705 C57.814,65.8 56.423,67.737 54.93,69.6 L62.615,77.245 L25.839,113.838 L27.159,115.153 L20.937,121.344 C33.861,134.197 51.711,142.146 71.427,142.146 C110.875,142.146 142.854,110.324 142.854,71.073 C142.854,31.82 110.875,0 71.427,0" id="Fill-1" sketch:type="MSShapeGroup"></path>
+ <mask id="mask-2" sketch:name="Clip 4" fill="white">
+ <use xlink:href="#path-1"></use>
+ </mask>
+ <g id="Clip-4"></g>
+ <path d="M-163,194 L305,194 L305,-285 L-163,-285 L-163,194 Z" id="Fill-3" fill="#8CC257" sketch:type="MSShapeGroup" mask="url(#mask-2)"></path>
+ <path d="M-5,-5 L147.855,-5 L147.855,147.146 L-5,147.146 L-5,-5 Z" id="Fill-5" fill="#8CC257" sketch:type="MSShapeGroup" mask="url(#mask-2)"></path>
+ <mask id="mask-4" sketch:name="Clip 8" fill="white">
+ <use xlink:href="#path-3"></use>
+ </mask>
+ <g id="Clip-8"></g>
+ <path d="M74,15 L98.572,15 L98.572,36.377 L74,36.377 L74,15 Z" id="Fill-7" fill="#FFFFFF" sketch:type="MSShapeGroup" mask="url(#mask-4)"></path>
+ <path d="M66.648,37.582375 L45,59.123375 L56.227,70.295375 L84.141,42.520375 L79.24,37.645375 L79.177,37.581375 C75.717,34.139375 70.108,34.139375 66.648,37.582375" id="Fill-10" fill="#B2B2B2" sketch:type="MSShapeGroup" mask="url(#mask-4)"></path>
+ <mask id="mask-6" sketch:name="Clip 13" fill="white">
+ <use xlink:href="#path-5"></use>
+ </mask>
+ <g id="Clip-13"></g>
+ <path d="M-163,194 L305,194 L305,-285 L-163,-285 L-163,194 Z" id="Fill-12" fill="#B2B2B2" sketch:type="MSShapeGroup" mask="url(#mask-6)"></path>
+ <mask id="mask-8" sketch:name="Clip 16" fill="white">
+ <use xlink:href="#path-7"></use>
+ </mask>
+ <g id="Clip-16"></g>
+ <path d="M40,30 L89.141,30 L89.141,75.295 L40,75.295 L40,30 Z" id="Fill-15" fill="#498E0B" sketch:type="MSShapeGroup" mask="url(#mask-8)"></path>
+ <path d="M124.606,6 C122.219,6.001 120.283,7.926 120.283,10.302 L120.283,13.023 L110.082,18.113 C104.761,20.77 100.243,24.717 96.876,29.538 L92.488,25.172 L92.484,25.176 L89.052,28.591 C87.765,29.871 85.679,29.871 84.392,28.591 L83.013,27.219 C82.347,26.556 82.347,25.481 83.013,24.819 L87.548,20.306 C87.542,20.301 87.535,20.296 87.529,20.291 L87.526,20.288 L87.524,20.288 C84.951,18.224 81.176,18.38 78.787,20.758 L70.384,29.12 L78.875,37.569 C72.917,38.943 67.877,42.913 65.184,48.411 L56.379,66.386 C49.276,69.044 43.601,74.776 41.151,82.173 L34.147,103.323 L32.702,104.036 C25.039,107.818 18.833,113.994 15.031,121.619 L9.603,132.507 L5.468,131.506 C3.761,131.094 2.04,132.137 1.625,133.835 L-2,148.68 L5.021,141.693 L5.021,141.696 L53.778,93.181 C55.035,94.023 56.368,94.765 57.769,95.395 L77.104,104.096 C71.971,104.937 67.024,106.788 62.569,109.585 L52.322,116.022 L49.487,113.2 C48.349,112.068 46.504,112.068 45.366,113.2 L34.878,123.637 L43.526,121.546 L43.523,121.548 L75.443,113.837 L83.03,112.005 C84.575,111.624 85.867,110.862 86.87,109.864 C89.911,106.838 90.283,101.634 86.873,98.241 L67.994,79.456 L73.85,75.054 L96.734,75.055 L96.733,75.054 L96.859,75.054 C97.997,75.055 99.004,74.502 99.628,73.652 C99.638,73.639 99.649,73.629 99.659,73.617 L99.655,73.616 C100.054,73.057 100.292,72.377 100.292,71.64 L100.292,68.399 C100.292,67.356 99.443,66.51 98.394,66.51 L95.137,66.51 C93.241,66.51 91.704,68.04 91.705,69.926 L91.705,70.989 L85.174,68.832 C84.45,68.592 83.718,68.383 82.982,68.192 L85.503,66.298 C89.665,63.171 92.119,58.29 92.141,53.101 L92.176,44.731 L131.099,6.001 L124.606,6" id="Fill-18" sketch:type="MSShapeGroup" mask="url(#mask-8)"></path>
+ <mask id="mask-10" sketch:name="Clip 21" fill="white">
+ <use xlink:href="#path-9"></use>
+ </mask>
+ <g id="Clip-21"></g>
+ <path d="M-163,194 L305,194 L305,-285 L-163,-285 L-163,194 Z" id="Fill-20" fill="#214703" sketch:type="MSShapeGroup" mask="url(#mask-10)"></path>
+ <path d="M-7,1 L136.099,1 L136.099,153.68 L-7,153.68 L-7,1 Z" id="Fill-22" sketch:type="MSShapeGroup" mask="url(#mask-10)"></path>
+ </g>
+ </g>
+ </g>
+ </svg>
+ </div>
+ <h1 class="manage__title"><?php esc_html_e( __( 'Enable Jetpack Manage', 'jetpack' ) ); ?></h1>
+ <p class="manage__description">
+ <?php esc_html_e( $description, 'jetpack' ); ?>
+ </p>
+ <p class="manage__description">
+ <a class="button-primary manage__button" href="<?php echo esc_url( $activate_url ) ?>">
+ <?php esc_html_e( __( 'Enable Jetpack Manage Now', 'jetpack' ) ); ?>
+ </a>
+ </p>
+</div>
diff --git a/plugins/jetpack/modules/manage/confirm-admin.php b/plugins/jetpack/modules/manage/confirm-admin.php
new file mode 100644
index 00000000..4020e6b1
--- /dev/null
+++ b/plugins/jetpack/modules/manage/confirm-admin.php
@@ -0,0 +1,107 @@
+<?php
+
+$activate_url = wp_nonce_url(
+ Jetpack::admin_url(
+ array(
+ 'page' => 'jetpack',
+ 'action' => 'activate',
+ 'module' => 'manage',
+ )
+ ),
+ 'jetpack_activate-manage'
+ );
+
+$section = isset( $_GET['section'] ) ? $_GET['section'] : null;
+$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
+
+$description = __( 'Well that was easy. You can now manage all of your sites in one convenient place on WordPress.com', 'jetpack' );
+
+switch( $section ) {
+ case 'plugins':
+ $link = 'https://wordpress.com/plugins/' . $normalized_site_url;
+ $link_title = __( 'Manage Your Plugins', 'jetpack' );
+ break;
+
+ case 'themes':
+ $link = 'https://wordpress.com/plugins/' . $normalized_site_url;
+ $link_title = __( 'Manage Your Themes', 'jetpack' );
+ break;
+
+ case 'security-settings':
+ $link = 'https://wordpress.com/settings/security/' . $normalized_site_url;
+ $link_title = __( 'Manage Your Security Settings', 'jetpack' );
+ break;
+
+ case 'menus':
+ $link = 'https://wordpress.com/menus/' . $normalized_site_url;
+ $link_title = __( 'Manage Your Menus', 'jetpack' );
+ break;
+
+ default:
+ $link = 'https://wordpress.com/stats/day/' . $normalized_site_url;
+ $link_title = __( 'Manage Your Site', 'jetpack' );
+ break;
+}
+?>
+<div class="page-content landing manage-page">
+ <div class="manage__icon">
+ <svg width="149px" height="152px" viewBox="0 0 149 152" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
+ <defs>
+ <path id="path-1" d="M0,71.073 C0,76.696 0.677,82.16 1.919,87.407 L1.919,87.407 C3.934,87.957 6.074,88.157 8.155,88.025 L8.155,88.025 C24.965,86.955 36.859,74.293 47.988,63.218 L47.988,63.218 C48.289,62.92 53.255,57.979 53.255,57.979 L53.255,57.979 L59.009,63.704 C57.815,65.8 56.424,67.737 54.931,69.599 L54.931,69.599 L62.616,77.245 L25.84,113.838 L27.16,115.152 L20.938,121.344 C33.862,134.197 51.711,142.146 71.428,142.146 L71.428,142.146 C110.876,142.146 142.855,110.324 142.855,71.073 L142.855,71.073 C142.855,31.82 110.876,0 71.428,0 L71.428,0 C31.981,0 0,31.82 0,71.073 L0,71.073 Z"></path>
+ <path id="path-3" d="M86.3139508,20.091 C86.3139508,20.091 79.5099508,25.071 79.0589508,25.741 L79.0589508,25.741 C78.6099508,26.414 80.8579508,31.113 81.3339508,31.311 L81.3339508,31.311 C81.8099508,31.511 90.6089508,31.19 90.6089508,31.19 L90.6089508,31.19 L93.5729508,25.793 L87.6959508,20 L86.3139508,20.091 Z"></path>
+ <path id="path-5" d="M66.647,37.5820009 L45,59.1230009 L56.227,70.2960009 L84.141,42.5210009 L79.239,37.6450009 L79.176,37.5810009 C77.447,35.8600009 75.18,35.0000009 72.913,35.0000009 L72.913,35.0000009 C70.645,34.9990009 68.378,35.8600009 66.647,37.5820009 L66.647,37.5820009 Z"></path>
+ <path id="path-7" d="M66.647,37.583 L45,59.124 L56.227,70.297 L84.141,42.522 L79.239,37.646 L79.176,37.582 C77.446,35.861 75.179,35 72.913,35 L72.913,35 C70.645,35 68.378,35.862 66.647,37.583 L66.647,37.583 Z"></path>
+ <path id="path-9" d="M120.282,10.301 L120.282,13.022 L110.081,18.113 C104.759,20.77 100.242,24.716 96.875,29.537 L96.875,29.537 L92.488,25.171 L92.483,25.176 L89.051,28.591 C87.765,29.87 85.678,29.87 84.391,28.591 L84.391,28.591 L83.012,27.218 C82.346,26.556 82.346,25.48 83.012,24.818 L83.012,24.818 L87.547,20.305 C87.542,20.301 87.534,20.295 87.528,20.291 L87.528,20.291 L87.524,20.287 L87.524,20.287 C84.951,18.223 81.176,18.38 78.786,20.757 L78.786,20.757 L70.383,29.12 L78.874,37.568 C72.917,38.942 67.877,42.912 65.183,48.41 L65.183,48.41 L56.378,66.386 C49.275,69.043 43.6,74.775 41.15,82.172 L41.15,82.172 L34.145,103.322 L32.701,104.036 C25.038,107.817 18.832,113.993 15.03,121.619 L15.03,121.619 L9.602,132.506 L5.467,131.505 C3.76,131.093 2.039,132.136 1.625,133.835 L1.625,133.835 L-2,148.679 L5.021,141.693 L5.021,141.695 L53.777,93.18 C55.035,94.022 56.367,94.764 57.768,95.395 L57.768,95.395 L77.103,104.096 C71.971,104.937 67.023,106.788 62.568,109.584 L62.568,109.584 L52.321,116.022 L49.487,113.199 C48.348,112.067 46.503,112.067 45.365,113.199 L45.365,113.199 L34.877,123.636 L43.525,121.545 L43.522,121.548 L75.442,113.837 L83.03,112.004 C84.574,111.623 85.867,110.861 86.869,109.863 L86.869,109.863 C89.91,106.837 90.282,101.634 86.872,98.24 L86.872,98.24 L67.993,79.456 L73.85,75.054 L96.733,75.055 L96.732,75.054 L96.858,75.054 C97.996,75.055 99.003,74.501 99.628,73.652 L99.628,73.652 C99.637,73.639 99.648,73.628 99.658,73.617 L99.658,73.617 L99.655,73.615 C100.053,73.057 100.291,72.376 100.291,71.639 L100.291,71.639 L100.291,68.398 C100.291,67.355 99.442,66.509 98.393,66.509 L98.393,66.509 L95.136,66.509 C93.24,66.509 91.703,68.039 91.704,69.926 L91.704,69.926 L91.704,70.989 L85.174,68.831 C84.449,68.592 83.717,68.383 82.981,68.191 L82.981,68.191 L85.502,66.297 C89.664,63.17 92.118,58.29 92.14,53.1 L92.14,53.1 L92.176,44.73 L131.098,6.001 L124.605,6 C122.219,6.001 120.282,7.926 120.282,10.301 L120.282,10.301 Z"></path>
+ </defs>
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
+ <g id="Artboard-1-Copy" sketch:type="MSArtboardGroup">
+ <g id="Group" sketch:type="MSLayerGroup" transform="translate(3.000000, 5.000000)">
+ <path d="M71.427,0 C31.98,0 0,31.82 0,71.073 C0,76.696 0.676,82.16 1.918,87.408 C3.933,87.958 6.074,88.158 8.154,88.025 C24.965,86.955 36.858,74.294 47.987,63.219 C48.289,62.92 53.254,57.979 53.254,57.979 L59.009,63.705 C57.814,65.8 56.423,67.737 54.93,69.6 L62.615,77.245 L25.839,113.838 L27.159,115.153 L20.937,121.344 C33.861,134.197 51.711,142.146 71.427,142.146 C110.875,142.146 142.854,110.324 142.854,71.073 C142.854,31.82 110.875,0 71.427,0" id="Fill-1" sketch:type="MSShapeGroup"></path>
+ <mask id="mask-2" sketch:name="Clip 4" fill="white">
+ <use xlink:href="#path-1"></use>
+ </mask>
+ <g id="Clip-4"></g>
+ <path d="M-163,194 L305,194 L305,-285 L-163,-285 L-163,194 Z" id="Fill-3" fill="#8CC257" sketch:type="MSShapeGroup" mask="url(#mask-2)"></path>
+ <path d="M-5,-5 L147.855,-5 L147.855,147.146 L-5,147.146 L-5,-5 Z" id="Fill-5" fill="#8CC257" sketch:type="MSShapeGroup" mask="url(#mask-2)"></path>
+ <mask id="mask-4" sketch:name="Clip 8" fill="white">
+ <use xlink:href="#path-3"></use>
+ </mask>
+ <g id="Clip-8"></g>
+ <path d="M74,15 L98.572,15 L98.572,36.377 L74,36.377 L74,15 Z" id="Fill-7" fill="#FFFFFF" sketch:type="MSShapeGroup" mask="url(#mask-4)"></path>
+ <path d="M66.648,37.582375 L45,59.123375 L56.227,70.295375 L84.141,42.520375 L79.24,37.645375 L79.177,37.581375 C75.717,34.139375 70.108,34.139375 66.648,37.582375" id="Fill-10" fill="#B2B2B2" sketch:type="MSShapeGroup" mask="url(#mask-4)"></path>
+ <mask id="mask-6" sketch:name="Clip 13" fill="white">
+ <use xlink:href="#path-5"></use>
+ </mask>
+ <g id="Clip-13"></g>
+ <path d="M-163,194 L305,194 L305,-285 L-163,-285 L-163,194 Z" id="Fill-12" fill="#B2B2B2" sketch:type="MSShapeGroup" mask="url(#mask-6)"></path>
+ <mask id="mask-8" sketch:name="Clip 16" fill="white">
+ <use xlink:href="#path-7"></use>
+ </mask>
+ <g id="Clip-16"></g>
+ <path d="M40,30 L89.141,30 L89.141,75.295 L40,75.295 L40,30 Z" id="Fill-15" fill="#498E0B" sketch:type="MSShapeGroup" mask="url(#mask-8)"></path>
+ <path d="M124.606,6 C122.219,6.001 120.283,7.926 120.283,10.302 L120.283,13.023 L110.082,18.113 C104.761,20.77 100.243,24.717 96.876,29.538 L92.488,25.172 L92.484,25.176 L89.052,28.591 C87.765,29.871 85.679,29.871 84.392,28.591 L83.013,27.219 C82.347,26.556 82.347,25.481 83.013,24.819 L87.548,20.306 C87.542,20.301 87.535,20.296 87.529,20.291 L87.526,20.288 L87.524,20.288 C84.951,18.224 81.176,18.38 78.787,20.758 L70.384,29.12 L78.875,37.569 C72.917,38.943 67.877,42.913 65.184,48.411 L56.379,66.386 C49.276,69.044 43.601,74.776 41.151,82.173 L34.147,103.323 L32.702,104.036 C25.039,107.818 18.833,113.994 15.031,121.619 L9.603,132.507 L5.468,131.506 C3.761,131.094 2.04,132.137 1.625,133.835 L-2,148.68 L5.021,141.693 L5.021,141.696 L53.778,93.181 C55.035,94.023 56.368,94.765 57.769,95.395 L77.104,104.096 C71.971,104.937 67.024,106.788 62.569,109.585 L52.322,116.022 L49.487,113.2 C48.349,112.068 46.504,112.068 45.366,113.2 L34.878,123.637 L43.526,121.546 L43.523,121.548 L75.443,113.837 L83.03,112.005 C84.575,111.624 85.867,110.862 86.87,109.864 C89.911,106.838 90.283,101.634 86.873,98.241 L67.994,79.456 L73.85,75.054 L96.734,75.055 L96.733,75.054 L96.859,75.054 C97.997,75.055 99.004,74.502 99.628,73.652 C99.638,73.639 99.649,73.629 99.659,73.617 L99.655,73.616 C100.054,73.057 100.292,72.377 100.292,71.64 L100.292,68.399 C100.292,67.356 99.443,66.51 98.394,66.51 L95.137,66.51 C93.241,66.51 91.704,68.04 91.705,69.926 L91.705,70.989 L85.174,68.832 C84.45,68.592 83.718,68.383 82.982,68.192 L85.503,66.298 C89.665,63.171 92.119,58.29 92.141,53.101 L92.176,44.731 L131.099,6.001 L124.606,6" id="Fill-18" sketch:type="MSShapeGroup" mask="url(#mask-8)"></path>
+ <mask id="mask-10" sketch:name="Clip 21" fill="white">
+ <use xlink:href="#path-9"></use>
+ </mask>
+ <g id="Clip-21"></g>
+ <path d="M-163,194 L305,194 L305,-285 L-163,-285 L-163,194 Z" id="Fill-20" fill="#214703" sketch:type="MSShapeGroup" mask="url(#mask-10)"></path>
+ <path d="M-7,1 L136.099,1 L136.099,153.68 L-7,153.68 L-7,1 Z" id="Fill-22" sketch:type="MSShapeGroup" mask="url(#mask-10)"></path>
+ </g>
+ </g>
+ </g>
+ </svg>
+ </div>
+ <h1 class="manage__title"><span class="genericon genericon-checkmark"></span><?php esc_html_e( __( 'Jetpack Manage Enabled', 'jetpack' ) ); ?></h1>
+ <p class="manage__description">
+ <?php esc_html_e( $description, 'jetpack' ); ?>
+ </p>
+ <p class="manage__description">
+ <a class="manage__link" href="<?php echo esc_url( $link ); ?>">
+ <span class="genericon genericon-previous"></span>
+ <?php esc_html_e( $link_title, 'jetpack' ); ?>
+ </a>
+ </p>
+</div>
+<style >
+ #jp-settings-screen h3{ display: none; }
+</style>
diff --git a/plugins/jetpack/modules/markdown.php b/plugins/jetpack/modules/markdown.php
index ce44b57d..a9fd4364 100644
--- a/plugins/jetpack/modules/markdown.php
+++ b/plugins/jetpack/modules/markdown.php
@@ -8,6 +8,7 @@
* Requires Connection: No
* Auto Activate: No
* Module Tags: Writing
+ * Additional Search Queries: md, markdown
*/
include dirname( __FILE__ ) . '/markdown/easy-markdown.php';
@@ -22,4 +23,4 @@ function jetpack_markdown_posting_always_on() {
unset( $wp_settings_fields['writing']['default'][ WPCom_Markdown::POST_OPTION ] );
}
}
-add_action( 'admin_init', 'jetpack_markdown_posting_always_on', 11 ); \ No newline at end of file
+add_action( 'admin_init', 'jetpack_markdown_posting_always_on', 11 );
diff --git a/plugins/jetpack/modules/markdown/easy-markdown.php b/plugins/jetpack/modules/markdown/easy-markdown.php
index d218a664..43b41c20 100644
--- a/plugins/jetpack/modules/markdown/easy-markdown.php
+++ b/plugins/jetpack/modules/markdown/easy-markdown.php
@@ -294,6 +294,15 @@ class WPCom_Markdown {
* @return string support url
*/
protected function get_support_url() {
+ /**
+ * Filter the Markdown support URL.
+ *
+ * @module markdown
+ *
+ * @since 2.8.0
+ *
+ * @param string $url Markdown support URL.
+ */
return apply_filters( 'easy_markdown_support_url', 'http://en.support.wordpress.com/markdown-quick-reference/' );
}
@@ -429,13 +438,25 @@ class WPCom_Markdown {
}
// rejigger post_content and post_content_filtered
// revisions are already in the right place, except when we're restoring, but that's taken care of elsewhere
- if ( 'revision' !== $post_data['post_type'] ) {
+ // also prevent quick edit feature from overriding already-saved markdown (issue https://github.com/Automattic/jetpack/issues/636)
+ if ( 'revision' !== $post_data['post_type'] && ! isset( $_POST['_inline_edit'] ) ) {
+ /**
+ * Filter the original post content passed to Markdown.
+ *
+ * @module markdown
+ *
+ * @since 2.8.0
+ *
+ * @param string $post_data['post_content'] Untransformed post content.
+ */
$post_data['post_content_filtered'] = apply_filters( 'wpcom_untransformed_content', $post_data['post_content'] );
$post_data['post_content'] = $this->transform( $post_data['post_content'], array( 'id' => $post_id ) );
+ /** This filter is already documented in core/wp-includes/default-filters.php */
$post_data['post_content'] = apply_filters( 'content_save_pre', $post_data['post_content'] );
} elseif ( 0 === strpos( $post_data['post_name'], $post_data['post_parent'] . '-autosave' ) ) {
// autosaves for previews are weird
$post_data['post_content'] = $this->transform( $post_data['post_content'], array( 'id' => $post_data['post_parent'] ) );
+ /** This filter is already documented in core/wp-includes/default-filters.php */
$post_data['post_content'] = apply_filters( 'content_save_pre', $post_data['post_content'] );
}
@@ -508,6 +529,16 @@ class WPCom_Markdown {
if ( $args['unslash'] )
$text = wp_unslash( $text );
+ /**
+ * Filter the content to be run through Markdown, before it's transformed by Markdown.
+ *
+ * @module markdown
+ *
+ * @since 2.8.0
+ *
+ * @param string $text Content to be run through Markdown
+ * @param array $args Array of Markdown options.
+ */
$text = apply_filters( 'wpcom_markdown_transform_pre', $text, $args );
// ensure our paragraphs are separated
$text = str_replace( array( '</p><p>', "</p>\n<p>" ), "</p>\n\n<p>", $text );
@@ -527,6 +558,16 @@ class WPCom_Markdown {
$text = preg_replace( '/((id|href)="#?fn(ref)?):/', "$1-", $text );
// Markdown inserts extra spaces to make itself work. Buh-bye.
$text = rtrim( $text );
+ /**
+ * Filter the content to be run through Markdown, after it was transformed by Markdown.
+ *
+ * @module markdown
+ *
+ * @since 2.8.0
+ *
+ * @param string $text Content to be run through Markdown
+ * @param array $args Array of Markdown options.
+ */
$text = apply_filters( 'wpcom_markdown_transform_post', $text, $args );
// probably need to re-slash
diff --git a/plugins/jetpack/modules/minileven.php b/plugins/jetpack/modules/minileven.php
index 7e2486bb..909ec7c1 100644
--- a/plugins/jetpack/modules/minileven.php
+++ b/plugins/jetpack/modules/minileven.php
@@ -10,6 +10,7 @@
* Auto Activate: No
* Module Tags: Appearance, Mobile, Recommended
* Feature: Recommended
+ * Additional Search Queries: mobile, theme, minileven
*/
function jetpack_load_minileven() {
diff --git a/plugins/jetpack/modules/minileven/minileven.php b/plugins/jetpack/modules/minileven/minileven.php
index 15f3628b..16559472 100644
--- a/plugins/jetpack/modules/minileven/minileven.php
+++ b/plugins/jetpack/modules/minileven/minileven.php
@@ -41,6 +41,15 @@ function jetpack_check_mobile() {
$is_mobile = jetpack_is_mobile();
+ /**
+ * Filter the Mobile check results.
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ *
+ * @param bool $is_mobile Is the reader on a mobile device.
+ */
return apply_filters( 'jetpack_check_mobile', $is_mobile );
}
@@ -82,15 +91,33 @@ function wp_mobile_get_main_stylesheet() {
}
function jetpack_mobile_stylesheet( $theme ) {
+ /**
+ * Filter Jetpack's Mobile stylesheet.
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ *
+ * @param string $theme Theme.
+ */
return apply_filters( 'jetpack_mobile_stylesheet', 'pub/minileven', $theme );
}
function jetpack_mobile_template( $theme ) {
+ /**
+ * Filter Jetpack's Mobile template.
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ *
+ * @param string $theme Theme.
+ */
return apply_filters( 'jetpack_mobile_template', 'pub/minileven', $theme );
}
function jetpack_mobile_available() {
- echo '<div style="text-align:center;margin:10px 0;"><a href="'. home_url( '?ak_action=accept_mobile' ) . '">' . __( 'View Mobile Site', 'jetpack' ) . '</a></div>';
+ echo '<div class="jetpack-mobile-link" style="text-align:center;margin:10px 0;"><a href="'. home_url( '?ak_action=accept_mobile' ) . '">' . __( 'View Mobile Site', 'jetpack' ) . '</a></div>';
}
function jetpack_mobile_request_handler() {
@@ -116,6 +143,13 @@ function jetpack_mobile_request_handler() {
);
$redirect = true;
+ /**
+ * In Jetpack's Mobile theme, fires after the user taps on the link to display a full version of the site.
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ */
do_action( 'mobile_reject_mobile' );
break;
case 'force_mobile':
@@ -129,6 +163,13 @@ function jetpack_mobile_request_handler() {
);
$redirect = true;
+ /**
+ * In Jetpack's Mobile theme, fires after the user taps on the link to go back from full site to mobile site.
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ */
do_action( 'mobile_force_mobile' );
break;
}
@@ -152,6 +193,15 @@ function jetpack_mobile_theme_setup() {
if ( jetpack_check_mobile() ) {
// Redirect to download page if user clicked mobile app promo link in mobile footer
if ( isset( $_GET['app-download'] ) ) {
+ /**
+ * Fires before you're redirected to download page if you clicked the mobile app promo link in mobile footer
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ *
+ * @param string $_GET['app-download'] app-download URL parameter.
+ */
do_action( 'mobile_app_promo_download', $_GET['app-download'] );
switch ( $_GET['app-download'] ) {
@@ -178,6 +228,13 @@ function jetpack_mobile_theme_setup() {
if ( class_exists( 'Jetpack_Custom_CSS' ) && method_exists( 'Jetpack_Custom_CSS', 'disable' ) && ! get_option( 'wp_mobile_custom_css' ) )
add_action( 'init', array( 'Jetpack_Custom_CSS', 'disable' ), 11 );
+ /**
+ * Fires after Jetpack's mobile theme has been setup.
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ */
do_action( 'mobile_setup' );
}
}
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php
index fd8697ea..85f69359 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php
@@ -11,6 +11,11 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<div class="entry-heading">
+ <?php if ( '1' == get_option( 'wp_mobile_featured_images' ) && minileven_show_featured_images() ) : ?>
+ <div class="entry-thumbnail">
+ <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'jetpack' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="minileven-featured-thumbnail"><?php the_post_thumbnail(); ?></a>
+ </div><!-- .entry-thumbnail -->
+ <?php endif; ?>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Gallery', 'jetpack' ); ?></h3>
</div>
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php
index b820b34f..5737040b 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php
@@ -14,6 +14,17 @@
</div><!-- #wrapper -->
+<?php
+ /**
+ * Fires before the Mobile Theme's <footer> tag.
+ *
+ * @module minileven
+ *
+ * @since 3.7.0
+ */
+ do_action( 'jetpack_mobile_footer_before' );
+?>
+
<footer id="colophon" role="contentinfo">
<div id="site-generator">
@@ -29,6 +40,8 @@
*
* By default, a promo to download the native apps is added to this action.
*
+ * @module minileven
+ *
* @since 1.8.0
*/
do_action( 'wp_mobile_theme_footer' );
@@ -36,6 +49,8 @@
/**
* Fires before the credit links in the Mobile Theme's footer.
*
+ * @module minilven
+ *
* @since 1.8.0
*/
do_action( 'minileven_credits' );
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/functions.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/functions.php
index 5904a0ae..5e0119e7 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/functions.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/functions.php
@@ -156,6 +156,16 @@ function minileven_get_menu_location() {
$mods = get_option( "theme_mods_{$theme_slug}" );
if ( has_filter( 'jetpack_mobile_theme_menu' ) ) {
+
+ /**
+ * Filter the menu displayed in the Mobile Theme.
+ *
+ * @module minileven
+ *
+ * @since 3.4.0
+ *
+ * @param int $menu_id ID of the menu to display.
+ */
return array( 'primary' => apply_filters( 'jetpack_mobile_theme_menu', $menu_id ) );
}
@@ -237,5 +247,17 @@ function minileven_get_gallery_images() {
function minileven_show_featured_images() {
$enabled = ( is_home() || is_search() || is_archive() ) ? true : false;
+ /**
+ * Filter where featured images are displayed in the Mobile Theme.
+ *
+ * By setting $enabled to true or false using functions like is_home() or
+ * is_archive(), you can control where featured images are be displayed.
+ *
+ * @module minileven
+ *
+ * @since 3.2.0
+ *
+ * @param bool $enabled True if featured images should be displayed, false if not.
+ */
return (bool) apply_filters( 'minileven_show_featured_images', $enabled );
}
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/header.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/header.php
index 4273be0a..2488a47f 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/header.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/header.php
@@ -47,6 +47,8 @@
/**
* Fires before Minileven header.
*
+ * @module minileven
+ *
* @since 3.4.0
*/
do_action( 'jetpack_mobile_header_before' );
@@ -57,6 +59,8 @@
/**
* Fires after Minileven header.
*
+ * @module minilven
+ *
* @since 3.4.0
*/
do_action( 'jetpack_mobile_header_after' );
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/image.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/image.php
index 15c5f1d5..b63cd70f 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/image.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/image.php
@@ -46,6 +46,16 @@ get_header(); ?>
}
?>
<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
+
+ /**
+ * Filter the Mobile Theme image size.
+ *
+ * @module minileven
+ *
+ * @since 1.8.0
+ *
+ * @param int Image size in pixels.
+ */
$attachment_size = apply_filters( 'minileven_attachment_size', 848 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
?></a>
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/page.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/page.php
index 785137ef..0b09197b 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/page.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/page.php
@@ -19,6 +19,11 @@ get_header(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
+ <?php if ( '1' == get_option( 'wp_mobile_featured_images' ) && minileven_show_featured_images() ) : ?>
+ <div class="entry-thumbnail">
+ <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'jetpack' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="minileven-featured-thumbnail"><?php the_post_thumbnail(); ?></a>
+ </div><!-- .entry-thumbnail -->
+ <?php endif; ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
diff --git a/plugins/jetpack/modules/module-extras.php b/plugins/jetpack/modules/module-extras.php
index 1402ea09..0d4dd1d2 100644
--- a/plugins/jetpack/modules/module-extras.php
+++ b/plugins/jetpack/modules/module-extras.php
@@ -14,12 +14,21 @@ $tools = array(
'theme-tools/responsive-videos.php',
'theme-tools/site-logo.php',
'theme-tools/site-breadcrumbs.php',
+ 'theme-tools/social-menu.php',
'custom-post-types/comics.php',
'custom-post-types/testimonial.php',
'custom-post-types/nova.php',
'theme-tools.php',
);
-$jetpack_tools_to_include = apply_filters( 'jetpack-tools-to-include', $tools );
+
+/**
+ * Filter extra tools (not modules) to include.
+ *
+ * @since 2.4.0
+ *
+ * @param array $tools Array of extra tools to include.
+ */
+$jetpack_tools_to_include = apply_filters( 'jetpack_tools_to_include', $tools );
if ( ! empty( $jetpack_tools_to_include ) ) {
foreach ( $jetpack_tools_to_include as $tool ) {
diff --git a/plugins/jetpack/modules/module-headings.php b/plugins/jetpack/modules/module-headings.php
index 836e9ca4..9c6821aa 100644
--- a/plugins/jetpack/modules/module-headings.php
+++ b/plugins/jetpack/modules/module-headings.php
@@ -15,16 +15,16 @@ _x( 'Check your spelling, style, and grammar with the After the Deadline proofre
// modules/carousel.php
_x( 'Carousel', 'Module Name', 'jetpack' );
_x( 'Transform standard image galleries into full-screen slideshows.', 'Module Description', 'jetpack' );
-_x( 'brings your photos and images to life as full-size, easily navigable galleries.', 'Jumpstart Description', 'jetpack' );
+_x( 'Brings your photos and images to life as full-size, easily navigable galleries.', 'Jumpstart Description', 'jetpack' );
// modules/comments.php
-_x( 'Jetpack Comments', 'Module Name', 'jetpack' );
+_x( 'Comments', 'Module Name', 'jetpack' );
_x( 'Let readers comment with WordPress.com, Twitter, Facebook, or Google+ accounts.', 'Module Description', 'jetpack' );
// modules/contact-form.php
_x( 'Contact Form', 'Module Name', 'jetpack' );
_x( 'Insert a contact form anywhere on your site.', 'Module Description', 'jetpack' );
-_x( 'adds a button to your post and page editors, allowing you to build simple forms to help visitors stay in touch.', 'Jumpstart Description', 'jetpack' );
+_x( 'Adds a button to your post and page editors, allowing you to build simple forms to help visitors stay in touch.', 'Jumpstart Description', 'jetpack' );
// modules/custom-content-types.php
_x( 'Custom Content Types', 'Module Name', 'jetpack' );
@@ -36,12 +36,12 @@ _x( 'Customize your site’s CSS without modifying your theme.', 'Module Descrip
// modules/enhanced-distribution.php
_x( 'Enhanced Distribution', 'Module Name', 'jetpack' );
-_x( 'Share your public posts and comments to search engines and other services.', 'Module Description', 'jetpack' );
+_x( 'Increase reach and traffic.', 'Module Description', 'jetpack' );
// modules/gravatar-hovercards.php
_x( 'Gravatar Hovercards', 'Module Name', 'jetpack' );
_x( 'Enable pop-up business cards over commenters’ Gravatars.', 'Module Description', 'jetpack' );
-_x( 'let commenters link their profiles to their Gravatar accounts, making it easy for your visitors to learn more about your community.', 'Jumpstart Description', 'jetpack' );
+_x( 'Let commenters link their profiles to their Gravatar accounts, making it easy for your visitors to learn more about your community.', 'Jumpstart Description', 'jetpack' );
// modules/infinite-scroll.php
_x( 'Infinite Scroll', 'Module Name', 'jetpack' );
@@ -62,7 +62,7 @@ _x( 'Give visitors an easy way to show their appreciation for your content.', 'M
// modules/manage.php
_x( 'Manage', 'Module Name', 'jetpack' );
_x( 'Manage all your sites from a centralized place, https://wordpress.com/sites.', 'Module Description', 'jetpack' );
-_x( 'helps you remotely manage plugins, turn on automated updates, and more from <a href="https://wordpress.com/plugins/" target="_blank">wordpress.com</a>.', 'Jumpstart Description', 'jetpack' );
+_x( 'Helps you remotely manage plugins, turn on automated updates, and more from <a href="https://wordpress.com/plugins/" target="_blank">wordpress.com</a>.', 'Jumpstart Description', 'jetpack' );
// modules/markdown.php
_x( 'Markdown', 'Module Name', 'jetpack' );
@@ -74,7 +74,7 @@ _x( 'Optimize your site with a mobile-friendly theme for smartphones.', 'Module
// modules/monitor.php
_x( 'Monitor', 'Module Name', 'jetpack' );
-_x( 'Receive notifications from Jetpack if your site goes offline — and when it it returns.', 'Module Description', 'jetpack' );
+_x( 'Reports on site downtime.', 'Module Description', 'jetpack' );
// modules/notes.php
_x( 'Notifications', 'Module Name', 'jetpack' );
@@ -86,8 +86,8 @@ _x( 'Search your entire database from a single field in your Dashboard.', 'Modul
// modules/photon.php
_x( 'Photon', 'Module Name', 'jetpack' );
-_x( 'Accelerate your site by loading images from the WordPress.com CDN.', 'Module Description', 'jetpack' );
-_x( 'mirrors and serves your images from our free and fast image CDN, improving your site’s performance with no additional load on your servers.', 'Jumpstart Description', 'jetpack' );
+_x( 'Speed up images and photos.', 'Module Description', 'jetpack' );
+_x( 'Mirrors and serves your images from our free and fast image CDN, improving your site’s performance with no additional load on your servers.', 'Jumpstart Description', 'jetpack' );
// modules/post-by-email.php
_x( 'Post by Email', 'Module Name', 'jetpack' );
@@ -95,20 +95,20 @@ _x( 'Publish posts by email, using any device and email client.', 'Module Descri
// modules/protect.php
_x( 'Protect', 'Module Name', 'jetpack' );
-_x( 'Adds brute force protection to your login page. Formerly BruteProtect.', 'Module Description', 'jetpack' );
+_x( 'Prevent brute force attacks.', 'Module Description', 'jetpack' );
// modules/publicize.php
_x( 'Publicize', 'Module Name', 'jetpack' );
-_x( 'Share new posts on social media networks automatically.', 'Module Description', 'jetpack' );
+_x( 'Automatically promote content.', 'Module Description', 'jetpack' );
// modules/related-posts.php
_x( 'Related Posts', 'Module Name', 'jetpack' );
-_x( 'Display links to your related content under posts and pages.', 'Module Description', 'jetpack' );
-_x( 'keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post.', 'Jumpstart Description', 'jetpack' );
+_x( 'Display similar content.', 'Module Description', 'jetpack' );
+_x( 'Keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post.', 'Jumpstart Description', 'jetpack' );
// modules/sharedaddy.php
_x( 'Sharing', 'Module Name', 'jetpack' );
-_x( 'Allow visitors to share your content on Facebook, Twitter, and more with a click.', 'Module Description', 'jetpack' );
+_x( 'Visitors can share your content.', 'Module Description', 'jetpack' );
_x( 'Twitter, Facebook and Google+ buttons at the bottom of each post, making it easy for visitors to share your content.', 'Jumpstart Description', 'jetpack' );
// modules/shortcodes.php
@@ -123,31 +123,35 @@ _x( 'Enable WP.me-powered shortlinks for all posts and pages.', 'Module Descript
_x( 'Site Icon', 'Module Name', 'jetpack' );
_x( 'Add a site icon to your site.', 'Module Description', 'jetpack' );
+// modules/sitemaps.php
+_x( 'Sitemaps', 'Module Name', 'jetpack' );
+_x( 'Creates sitemaps to allow your site to be easily indexed by search engines.', 'Module Description', 'jetpack' );
+
// modules/sso.php
-_x( 'Jetpack Single Sign On', 'Module Name', 'jetpack' );
-_x( 'Allow your users to log in using their WordPress.com accounts.', 'Module Description', 'jetpack' );
-_x( 'lets you login to all your Jetpack-enabled sites with one click using your WordPress.com account.', 'Jumpstart Description', 'jetpack' );
+_x( 'Single Sign On', 'Module Name', 'jetpack' );
+_x( 'Secure user authentication.', 'Module Description', 'jetpack' );
+_x( 'Lets you log in to all your Jetpack-enabled sites with one click using your WordPress.com account.', 'Jumpstart Description', 'jetpack' );
// modules/stats.php
-_x( 'WordPress.com Stats', 'Module Name', 'jetpack' );
-_x( 'Monitor your stats with clear, concise reports and no additional load on your server.', 'Module Description', 'jetpack' );
+_x( 'Site Stats', 'Module Name', 'jetpack' );
+_x( 'Collect traffic stats and insights.', 'Module Description', 'jetpack' );
// modules/subscriptions.php
_x( 'Subscriptions', 'Module Name', 'jetpack' );
_x( 'Allow users to subscribe to your posts and comments and receive notifications via email.', 'Module Description', 'jetpack' );
-_x( 'give visitors two easy subscription options — while commenting, or via a separate email subscription widget you can display.', 'Jumpstart Description', 'jetpack' );
+_x( 'Give visitors two easy subscription options — while commenting, or via a separate email subscription widget you can display.', 'Jumpstart Description', 'jetpack' );
// modules/tiled-gallery.php
_x( 'Tiled Galleries', 'Module Name', 'jetpack' );
_x( 'Display your image galleries in a variety of sleek, graphic arrangements.', 'Module Description', 'jetpack' );
// modules/vaultpress.php
-_x( 'VaultPress', 'Module Name', 'jetpack' );
-_x( 'Protect your site with automatic backups and security scans. (Subscription required.)', 'Module Description', 'jetpack' );
+_x( 'Data Backups', 'Module Name', 'jetpack' );
+_x( 'Daily or real-time backups.', 'Module Description', 'jetpack' );
// modules/verification-tools.php
_x( 'Site Verification', 'Module Name', 'jetpack' );
-_x( 'Verify your site or domain with Google Webmaster Tools, Pinterest, and others.', 'Module Description', 'jetpack' );
+_x( 'Verify your site or domain with Google Search Console, Pinterest, and others.', 'Module Description', 'jetpack' );
// modules/videopress.php
_x( 'VideoPress', 'Module Name', 'jetpack' );
@@ -228,6 +232,7 @@ _x( 'Centralized Management', 'Module Tag', 'jetpack' );
// - modules/publicize.php
// - modules/related-posts.php
// - modules/sharedaddy.php
+// - modules/sitemaps.php
// - modules/stats.php
_x( 'Recommended', 'Module Tag', 'jetpack' );
@@ -235,6 +240,10 @@ _x( 'Recommended', 'Module Tag', 'jetpack' );
// - modules/minileven.php
_x( 'Mobile', 'Module Tag', 'jetpack' );
-// Modules with `WordPress.com Stats` tag:
+// Modules with `Traffic` tag:
+// - modules/sitemaps.php
+_x( 'Traffic', 'Module Tag', 'jetpack' );
+
+// Modules with `Site Stats` tag:
// - modules/stats.php
-_x( 'WordPress.com Stats', 'Module Tag', 'jetpack' );
+_x( 'Site Stats', 'Module Tag', 'jetpack' );
diff --git a/plugins/jetpack/modules/module-info.php b/plugins/jetpack/modules/module-info.php
index d78f3cf5..b5b75350 100644
--- a/plugins/jetpack/modules/module-info.php
+++ b/plugins/jetpack/modules/module-info.php
@@ -2,14 +2,26 @@
/**
* "Learn More" information blocks for all modules live in this file.
*
- * jetpack_module_more_info_<module-slug> hooks are for pre-connection information
- * jetpack_module_more_info_connected_<module-slug> hooks are used once the user
- * is connected to show them links to admin panels, usage info etc.
- * jetpack_search_terms_<module-slug> filters are searchable from the settings page.
- * Separate your search terms by comma, and please send translation context with _x()
+ * Each module must include 2 functions:
+ * - The first one creates a button where users can find more information about the module.
+ * It is hooked into `jetpack_learn_more_button_ . $module`
+ * - The second creates a information block.
+ * It is hooked into `jetpack_module_more_info_ . $module`
*/
-// VaultPress (stub)
+/**
+ * VaultPress (stub)
+ */
+function vaultpress_jetpack_load_more_link() {
+ if ( function_exists( 'is_multisite' ) && is_multisite() ) {
+ $vaultpress_url = 'http://vaultpress.com/jetpack-ms/';
+ } else {
+ $vaultpress_url = 'http://vaultpress.com/jetpack/';
+ }
+
+ echo '<a class="button-secondary more-info-link" href="' . $vaultpress_url . '">' . __( "Learn More", 'jetpack' ) . '</a>';
+}
+add_filter( 'jetpack_learn_more_button_vaultpress', 'vaultpress_jetpack_load_more_link' );
function vaultpress_jetpack_more_info() {
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
@@ -21,7 +33,7 @@ function vaultpress_jetpack_more_info() {
<div class="jp-info-img">
<a href="<?php echo $vaultpress_url?>">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/vaultpress.png' ) ?>" alt="<?php esc_attr_e( 'VaultPress', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/vaultpress.jpg' ) ?>" alt="<?php esc_attr_e( 'VaultPress', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
@@ -34,38 +46,19 @@ function vaultpress_jetpack_more_info() {
<?php endif;
}
add_action( 'jetpack_module_more_info_vaultpress', 'vaultpress_jetpack_more_info' );
-add_action( 'jetpack_module_more_info_connected_vaultpress', 'vaultpress_jetpack_more_info' );
-function vaultpress_jetpack_load_more_link() {
- if ( function_exists( 'is_multisite' ) && is_multisite() ) {
- $vaultpress_url = 'http://vaultpress.com/jetpack-ms/';
- } else {
- $vaultpress_url = 'http://vaultpress.com/jetpack/';
- }
-
- echo '<a class="button-secondary more-info-link" href="' . $vaultpress_url . '">' . __( "Learn More", 'jetpack' ) . '</a>';
+/**
+ * Gravatar Hovercards
+ */
+function grofiles_load_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://blog.gravatar.com/2010/10/06/gravatar-hovercards-on-wordpress-com/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_vaultpress', 'vaultpress_jetpack_load_more_link' );
+add_filter( 'jetpack_learn_more_button_gravatar-hovercards', 'grofiles_load_more_link' );
-// Gravatar Hovercards
function grofiles_more_info() { ?>
<div class="jp-info-img">
<a href="http://blog.gravatar.com/2010/10/06/gravatar-hovercards-on-wordpress-com/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/hovercards.png' ) ?>" alt="<?php esc_attr_e( 'Gravatar Hovercard', 'jetpack' ) ?>" width="300" height="150" />
- </a>
- </div>
-
- <h5><?php esc_html_e( "What&#8217;s a Hovercard?", 'jetpack' ) ?></h5>
- <p><?php esc_html_e( 'Hovercards enhance plain Gravatar images with information about a person: name, bio, pictures, their contact info, and other services they use on the web like Twitter, Facebook, or LinkedIn.', 'jetpack' ); ?></p>
- <p><?php esc_html_e( 'Hovercards offer a great way to show your internet presence and help people find your own blog.', 'jetpack' ); ?></p>
-<?php
-}
-add_action( 'jetpack_module_more_info_gravatar-hovercards', 'grofiles_more_info' );
-
-function grofiles_more_info_connected() { ?>
- <div class="jp-info-img">
- <a href="http://blog.gravatar.com/2010/10/06/gravatar-hovercards-on-wordpress-com/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/hovercards.png' ) ?>" alt="<?php esc_attr_e( 'Gravatar Hovercard', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/hovercards.jpg' ) ?>" alt="<?php esc_attr_e( 'Gravatar Hovercard', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
@@ -74,31 +67,20 @@ function grofiles_more_info_connected() { ?>
<p><?php esc_html_e( 'To see hovercards, look at any blog post on your blog that has comments. If the commenter has a hovercard associated with their gravatar, mouse over their image and the hovercard will appear. To turn hovercards off, click the Deactivate button above.', 'jetpack' ); ?></p>
<?php
}
-add_action( 'jetpack_module_more_info_connected_gravatar-hovercards', 'grofiles_more_info_connected' );
+add_action( 'jetpack_module_more_info_gravatar-hovercards', 'grofiles_more_info' );
-function grofiles_load_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://blog.gravatar.com/2010/10/06/gravatar-hovercards-on-wordpress-com/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Shortcodes
+ */
+function jetpack_shortcodes_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/shortcodes/">' . esc_html__( 'Learn More' , 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_gravatar-hovercards', 'grofiles_load_more_link' );
-
+add_filter( 'jetpack_learn_more_button_shortcodes', 'jetpack_shortcodes_load_more_link' );
-// Shortcodes
function jetpack_shortcodes_more_info() { ?>
<div class="jp-info-img">
<a href="http://en.support.wordpress.com/shortcodes/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortcodes.png' ) ?>" alt="<?php esc_attr_e( 'Shortcode Embeds', 'jetpack' ) ?>" width="300" height="150" />
- </a>
- </div>
-
- <p><?php esc_html_e( 'Shortcodes allow you to easily and safely embed media from other places in your site. With just one simple code, you can tell WordPress to embed YouTube, Flickr, and other media.', 'jetpack' ) ?></p>
-<?php
-}
-add_action( 'jetpack_module_more_info_shortcodes', 'jetpack_shortcodes_more_info' );
-
-function jetpack_shortcodes_more_info_connected() { ?>
- <div class="jp-info-img">
- <a href="http://en.support.wordpress.com/shortcodes/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortcodes.png' ) ?>" alt="<?php esc_attr_e( 'Shortcode Embeds', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortcodes.jpg' ) ?>" alt="<?php esc_attr_e( 'Shortcode Embeds', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
@@ -113,6 +95,7 @@ function jetpack_shortcodes_more_info_connected() { ?>
'flickr' => 'http://support.wordpress.com/videos/flickr-video/',
'gist' => 'http://en.support.wordpress.com/gist/',
'googlemaps' => 'http://support.wordpress.com/google-maps/',
+ 'instagram' => 'https://en.support.wordpress.com/instagram/instagram-images/',
'jetpack_subscription_form' => 'http://jetpack.me/support/subscriptions/#display',
'polldaddy' => 'http://support.polldaddy.com/wordpress-shortcodes/',
'presentation' => 'http://en.support.wordpress.com/presentations/',
@@ -140,89 +123,63 @@ function jetpack_shortcodes_more_info_connected() { ?>
<p><?php echo wp_sprintf( esc_html__( 'Available shortcodes are: %l.', 'jetpack' ), $available ); ?></p>
<?php
}
-add_action( 'jetpack_module_more_info_connected_shortcodes', 'jetpack_shortcodes_more_info_connected' );
+add_action( 'jetpack_module_more_info_shortcodes', 'jetpack_shortcodes_more_info' );
-function jetpack_shortcodes_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/shortcodes/">' . esc_html__( 'Learn More' , 'jetpack' ) . '</a>';
+/**
+ * Shortlinks
+ */
+function wpme_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://wp.me/sf2B5-shorten">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_shortcodes', 'jetpack_shortcodes_load_more_link' );
-
+add_filter( 'jetpack_learn_more_button_shortlinks', 'wpme_load_more_link' );
-// Shortlinks
function wpme_more_info() { ?>
<div class="jp-info-img">
<a href="http://wp.me/sf2B5-shorten">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortlinks.png' ) ?>" alt="<?php esc_attr_e( 'WP.me Shortlinks', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortlinks.jpg' ) ?>" alt="<?php esc_attr_e( 'WP.me Shortlinks', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
<p><?php esc_html_e( "Instead of typing or copy-pasting long URLs, you can now get a short and simple link to your posts and pages. This uses the super compact wp.me domain name, and gives you a unique URL you can use that will be safe and reliable.", 'jetpack' ) ?></p>
<p><?php esc_html_e( "It&#8217;s perfect for use on Twitter, Facebook, and cell phone text messages where every character counts.", 'jetpack' ) ?></p>
-<?php
-}
-add_action( 'jetpack_module_more_info_shortlinks', 'wpme_more_info' );
-
-function wpme_more_info_connected() { ?>
- <div class="jp-info-img">
- <a href="http://wp.me/sf2B5-shorten">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/shortlinks.png' ) ?>" alt="<?php esc_attr_e( 'WP.me Shortlinks', 'jetpack' ) ?>" width="300" height="150" />
- </a>
- </div>
-
- <p><?php esc_html_e( "Instead of typing or copy-pasting long URLs, you can now get a short and simple link to your posts and pages. This uses the super compact wp.me domain name, and gives you a unique URL you can use that will be safe and reliable.", 'jetpack' ) ?></p>
<p><?php esc_html_e( "To use shortlinks, go to any already published post (or publish something new!). A &#8220;Get Shortlink&#8221; button will be visible under the Post title. When you click it, a dialog box will appear with the shortlink and you can copy and paste to Twitter, Facebook or wherever your heart desires.", 'jetpack' ) ?></p>
<?php
}
-add_action( 'jetpack_module_more_info_connected_shortlinks', 'wpme_more_info_connected' );
+add_action( 'jetpack_module_more_info_shortlinks', 'wpme_more_info' );
-function wpme_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://wp.me/sf2B5-shorten">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Site Stats
+ */
+function stats_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/stats/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_shortlinks', 'wpme_load_more_link' );
-
+add_filter( 'jetpack_learn_more_button_stats', 'stats_load_more_link' );
-// WordPress.com Stats
function stats_more_info() { ?>
<div class="jp-info-img">
<a href="http://en.support.wordpress.com/stats/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/stats.png' ) ?>" alt="<?php esc_attr_e( 'WordPress.com Stats', 'jetpack' ) ?>" width="300" height="150" />
- </a>
- </div>
-
- <p><?php esc_html_e( 'There are many plugins and services that provide statistics, but data can be overwhelming. WordPress.com Stats makes the most popular metrics easy to understand through a clear and attractive interface.', 'jetpack' ) ?></p>
-<?php
-}
-add_action( 'jetpack_module_more_info_stats', 'stats_more_info' );
-
-function stats_more_info_connected() { ?>
- <div class="jp-info-img">
- <a href="http://en.support.wordpress.com/stats/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/stats.png' ) ?>" alt="<?php esc_attr_e( 'WordPress.com Stats', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/stats.jpg' ) ?>" alt="<?php esc_attr_e( 'Site Stats', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
- <p><?php esc_html_e( 'There are many plugins and services that provide statistics, but data can be overwhelming. WordPress.com Stats makes the most popular metrics easy to understand through a clear and attractive interface.', 'jetpack' ) ?></p>
+ <p><?php esc_html_e( 'There are many plugins and services that provide statistics, but data can be overwhelming. Site Stats makes the most popular metrics easy to understand through a clear and attractive interface.', 'jetpack' ) ?></p>
<p><?php printf( __( 'You can <a href="%s">view your stats dashboard here</a>.', 'jetpack' ), admin_url( 'admin.php?page=stats' ) ); ?></p>
<?php
}
-add_action( 'jetpack_module_more_info_connected_stats', 'stats_more_info_connected' );
-
-function stats_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/stats/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
-}
-add_filter( 'jetpack_learn_more_button_stats', 'stats_load_more_link' );
+add_action( 'jetpack_module_more_info_stats', 'stats_more_info' );
-function jetpack_stats_search_terms( $terms ) {
- $terms = _x( 'statistics, tracking, analytics, views, traffic', 'search terms', 'jetpack' );
- return $terms;
+/**
+ * Publicize
+ */
+function publicize_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/publicize/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_search_terms_stats', 'jetpack_stats_search_terms' );
+add_filter( 'jetpack_learn_more_button_publicize', 'publicize_load_more_link' );
-// Publicize
function publicize_more_info() { ?>
<div class="jp-info-img">
<a href="http://en.support.wordpress.com/publicize/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/publicize.png' ) ?>" alt="<?php esc_attr_e( 'Publicize', 'jetpack' ) ?>" width="328" height="123" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/publicize.jpg' ) ?>" alt="<?php esc_attr_e( 'Publicize', 'jetpack' ) ?>" width="328" height="123" />
</a>
</div>
@@ -238,32 +195,20 @@ function publicize_more_info() { ?>
<p>&rarr; <a href="http://jetpack.me/support/publicize/"><?php esc_html_e( 'More information on using Publicize.', 'jetpack' ); ?></a></p>
<?php
}
-
add_action( 'jetpack_module_more_info_publicize', 'publicize_more_info' );
-add_action( 'jetpack_module_more_info_connected_publicize', 'publicize_more_info' );
-function publicize_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/publicize/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Notifications
+ */
+function notes_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/notifications/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_publicize', 'publicize_load_more_link' );
+add_filter( 'jetpack_learn_more_button_notes', 'notes_load_more_link' );
-// Notifications
function notes_more_info() { ?>
<div class="jp-info-img">
<a href="http://support.wordpress.com/notifications/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/notes.png' ) ?>" alt="<?php esc_attr_e( 'Notifications', 'jetpack' ) ?>" width="300" height="150" />
- </a>
- </div>
-
- <p><?php esc_html_e( 'Keep up with the latest happenings on all your WordPress sites and interact with other WordPress.com users.', 'jetpack' ) ?></p>
-<?php
-}
-add_action( 'jetpack_module_more_info_notes', 'notes_more_info' );
-
-function notes_more_info_connected() { ?>
- <div class="jp-info-img">
- <a href="http://support.wordpress.com/notifications/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/notes.png' ) ?>" alt="<?php esc_attr_e( 'Notifications', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/notes.jpg' ) ?>" alt="<?php esc_attr_e( 'Notifications', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
@@ -271,75 +216,53 @@ function notes_more_info_connected() { ?>
<p><?php printf( __( 'You can view your notifications in the Toolbar and <a href="%s">on WordPress.com</a>.', 'jetpack' ), 'http://wordpress.com/#!/notifications/' ); ?></p>
<?php
}
-add_filter( 'jetpack_module_more_info_connected_notes', 'notes_more_info_connected' );
+add_filter( 'jetpack_module_more_info_notes', 'notes_more_info' );
-function notes_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/notifications/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * LaTeX
+ */
+function latex_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/latex/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_notes', 'notes_load_more_link' );
-
+add_filter( 'jetpack_learn_more_button_latex', 'latex_load_more_link' );
-// LaTeX
function latex_more_info() { ?>
<div class="jp-info-img">
<a href="http://support.wordpress.com/latex/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/beautifulmath.png' ) ?>" alt="<?php esc_attr_e( 'LaTeX', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/beautifulmath.jpg' ) ?>" alt="<?php esc_attr_e( 'LaTeX', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
<p><?php printf( esc_html__( '%s is a powerful markup language for writing complex mathematical equations, formulas, etc.', 'jetpack' ), '<a href="http://www.latex-project.org/" target="_blank"><img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" /></a>' ); ?></p>
<p><?php printf( esc_html__( 'Jetpack combines the power of %s and the simplicity of WordPress to give you the ultimate in math blogging platforms.', 'jetpack' ), '<img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" />' ); ?></p>
+ <p><?php printf( __( 'Use <code>$latex your latex code here$</code> or <code>[latex]your latex code here[/latex]</code> to include %s in your posts and comments. There are <a href="%s" target="_blank">all sorts of options</a> available.', 'jetpack' ), '<img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" />', 'http://support.wordpress.com/latex/' ); ?></p>
<p><?php esc_html_e( 'Wow, that sounds nerdy.', 'jetpack' ) ?></p>
<?php
}
add_action( 'jetpack_module_more_info_latex', 'latex_more_info' );
-function latex_more_info_connected() { ?>
- <div class="jp-info-img">
- <a href="http://support.wordpress.com/latex/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/beautifulmath.png' ) ?>" alt="<?php esc_attr_e( 'LaTeX', 'jetpack' ) ?>" width="300" height="150" />
- </a>
- </div>
-
- <p><?php printf( esc_html__( '%s is a powerful markup language for writing complex mathematical equations, formulas, etc.', 'jetpack' ), '<a href="http://www.latex-project.org/" target="_blank"><img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" /></a>' ); ?></p>
- <p><?php printf( __( 'Use <code>$latex your latex code here$</code> or <code>[latex]your latex code here[/latex]</code> to include %s in your posts and comments. There are <a href="%s" target="_blank">all sorts of options</a> available.', 'jetpack' ), '<img src="//s0.wp.com/latex.php?latex=%5CLaTeX&amp;bg=transparent&amp;fg=000&amp;s=-1" alt="LaTeX logo" title="LaTeX" style="vertical-align: -25%" />', 'http://support.wordpress.com/latex/' ); ?></p>
-<?php
-}
-add_action( 'jetpack_module_more_info_connected_latex', 'latex_more_info_connected' );
-
-function latex_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/latex/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Sharing
+ */
+function sharedaddy_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/sharing/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_latex', 'latex_load_more_link' );
-
+add_filter( 'jetpack_learn_more_button_sharedaddy', 'sharedaddy_load_more_link' );
-// Sharedaddy
function sharedaddy_more_info() { ?>
<div class="jp-info-img">
- <a href="http://en.support.wordpress.com/sharing/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/sharing.png' ) ?>" alt="<?php esc_attr_e( 'Sharing', 'jetpack' ) ?>" width="300" height="150" />
- </a>
+ <embed type="application/x-shockwave-flash" src="http://s0.videopress.com/player.swf?v=1.02" height="190" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=WV0JOwY2"></embed>
</div>
<p><?php esc_html_e( 'Share your posts with Twitter, Facebook, and a host of other services. You can configure services to appear as icons, text, or both. Some services have additional options to display smart buttons, such as Twitter, which will update the number of times the post has been shared.', 'jetpack' ); ?></p>
<p><?php
if ( is_multisite() ) {
- esc_html_e( 'The following services are included: Twitter, Facebook, Reddit, StumbleUpon, PressThis, Digg, LinkedIn, Google +1, Print, and Email.' , 'jetpack' );
+ esc_html_e( 'The following services are included: Twitter, Facebook, Reddit, PressThis, Digg, LinkedIn, Google +1, Print, and Email.' , 'jetpack' );
} else {
- esc_html_e( 'The following services are included: Twitter, Facebook, Reddit, StumbleUpon, Digg, LinkedIn, Google +1, Print, and Email.' , 'jetpack' );
+ esc_html_e( 'The following services are included: Twitter, Facebook, Reddit, Digg, LinkedIn, Google +1, Print, and Email.' , 'jetpack' );
}
?></p>
- <p><?php esc_html_e( 'Additionally you can define your own custom services.', 'jetpack' ); ?></p>
-<?php
-}
-add_action( 'jetpack_module_more_info_sharedaddy', 'sharedaddy_more_info' );
-
-function sharedaddy_more_info_connected() { ?>
- <div class="jp-info-img">
- <embed type="application/x-shockwave-flash" src="http://s0.videopress.com/player.swf?v=1.02" height="190" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=WV0JOwY2"></embed>
- </div>
-
<?php
if ( class_exists( 'Sharing_Admin' ) ) {
?>
@@ -354,19 +277,20 @@ function sharedaddy_more_info_connected() { ?>
<p><?php printf( __( 'Full details can be found on the <a href="%s">Sharing support page</a>. This video also gives a swish run-down of how to use the Sharing feature. Watch it in HD for extra snazz!', 'jetpack' ), 'http://support.wordpress.com/sharing/' ); ?></p>
<?php
}
-add_action( 'jetpack_module_more_info_connected_sharedaddy', 'sharedaddy_more_info_connected' );
+add_action( 'jetpack_module_more_info_sharedaddy', 'sharedaddy_more_info' );
-function sharedaddy_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/sharing/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * After The Deadline
+ */
+function jpatd_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/proofreading/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_sharedaddy', 'sharedaddy_load_more_link' );
-
+add_filter( 'jetpack_learn_more_button_after-the-deadline', 'jpatd_load_more_link' );
-// After The Deadline
function jpatd_more_info() { ?>
<div class="jp-info-img">
<a href="http://en.support.wordpress.com/proofreading/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/spelling.png' ) ?>" alt="<?php esc_attr_e( 'Spelling and Grammar', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/spelling.jpg' ) ?>" alt="<?php esc_attr_e( 'Spelling and Grammar', 'jetpack' ) ?>" width="300" height="150" />
</a>
</div>
@@ -376,28 +300,17 @@ function jpatd_more_info() { ?>
}
add_action( 'jetpack_module_more_info_after-the-deadline', 'jpatd_more_info' );
-function jpatd_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/proofreading/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Extra Sidebar Widgets
+ */
+function jetpack_widgets_load_more_link( $description ) {
+ echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/widgets/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_after-the-deadline', 'jpatd_load_more_link' );
-
+add_filter( 'jetpack_learn_more_button_widgets', 'jetpack_widgets_load_more_link' );
-// RSS Links Widget, Image Widget, Twitter Widget
function jetpack_widgets_more_info() { ?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/widgets.png' ) ?>" alt="<?php esc_attr_e( 'Widgets Screenshot', 'jetpack' ) ?>" width="300" height="150" />
- </div>
-
- <p><strong><?php esc_html_e( 'The RSS Links Widget ', 'jetpack' ); ?></strong> <?php esc_html_e( "allows you to add links to your blog&#8217;s post and comment RSS feeds in your sidebar. This makes it easy for your readers to stay updated when you post new content or receive new comments.", 'jetpack' ) ?></p>
- <p><strong><?php esc_html_e( 'The Twitter Widget ', 'jetpack' ); ?></strong> <?php esc_html_e( "shows your latest tweets within a sidebar on your theme. It&#8217;s an easy way to add more activity to your site. There are also a number of customization options.", 'jetpack' ) ?> <strong><?php esc_html_e( 'The Facebook Like Box Widget ', 'jetpack' ); ?></strong> <?php esc_html_e( "shows your Facebook Like Box within a sidebar on your theme. It&#8217;s a great way to let your readers show their support.", 'jetpack' ) ?> <strong><?php esc_html_e( 'The Image Widget ', 'jetpack' ); ?></strong><?php esc_html_e( "allows you to easily add images to widget areas in your theme. It&#8217;s an easy way to add more visual interest to your site.", 'jetpack' ) ?></p>
-
-<?php
-}
-add_action( 'jetpack_module_more_info_widgets', 'jetpack_widgets_more_info' );
-
-function jetpack_widgets_more_info_connected() { ?>
- <div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/widgets.png' ) ?>" alt="<?php esc_attr_e( 'Widgets Screenshot', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/widgets.jpg' ) ?>" alt="<?php esc_attr_e( 'Widgets Screenshot', 'jetpack' ) ?>" width="300" height="150" />
</div>
<p><?php printf( __( '<strong>The Twitter Widget</strong> shows your latest tweets within a sidebar on your theme.', 'jetpack' ) ); ?></p>
@@ -406,82 +319,87 @@ function jetpack_widgets_more_info_connected() { ?>
<p><?php printf( __( '<strong>The Gravatar Widget</strong> allows you to pull in your Gravatar image along with some of your Gravatar profile data.', 'jetpack' ) ); ?></p>
<p><?php printf( __( '<strong>The Gallery Widget</strong> provides you with a simple way to display a photo gallery or slideshow in your blog’s sidebar. Requires the Tiled Gallery module.', 'jetpack' ) ); ?></p>
<p><?php printf( __( '<strong>The Display WordPress Posts Widget</strong> lets you display up to ten recent posts from another WordPress.com blog, or a self-hosted WordPress site with Jetpack enabled.', 'jetpack' ) ); ?></p>
- <p><?php printf( __( '<strong>The Upcoming Events Widget</strong> allows you to use an iCalendar link to display a list of events on your site.', 'jetpack' ) ); ?></p>
+ <p><?php printf( __( '<strong>The Social Media Icons Widget</strong> lets you add icons for the most popular social networks to your sidebar or other widget area.', 'jetpack' ) ); ?></p>
+ <!--<p><?php printf( __( '<strong>The Upcoming Events Widget</strong> allows you to use an iCalendar link to display a list of events on your site.', 'jetpack' ) ); ?></p>-->
<p><?php esc_html_e( 'Each of these widgets has a number of customization options.', 'jetpack' ); ?> <?php printf( __( 'To use the widgets, go to Appearance &#8594; <a href="%s">Widgets</a>. Drag them into one of your sidebars and configure away.', 'jetpack' ), admin_url( 'widgets.php' ) ); ?></p>
<?php
}
-add_action( 'jetpack_module_more_info_connected_widgets', 'jetpack_widgets_more_info_connected' );
+add_action( 'jetpack_module_more_info_widgets', 'jetpack_widgets_more_info' );
-function jetpack_widgets_load_more_link( $description ) {
- echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/widgets/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Subscriptions
+ */
+function jetpack_subscriptions_load_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/following/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_learn_more_button_widgets', 'jetpack_widgets_load_more_link' );
+add_action( 'jetpack_learn_more_button_subscriptions', 'jetpack_subscriptions_load_more_link' );
-// Subscriptions
function jetpack_subscriptions_more_info() { ?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/subscriptions.png' ) ?>" alt="<?php esc_attr_e( 'Subsriptions Screenshot', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/subscriptions.jpg' ) ?>" alt="<?php esc_attr_e( 'Subsriptions Screenshot', 'jetpack' ) ?>" width="300" height="150" />
</div>
<p><?php esc_html_e( 'Easily allow any visitor to subscribe to all of your posts via email through a widget in your blog&#8217;s sidebar. Every time you publish a post, WordPress.com will send a notification to all your subscribers.', 'jetpack' ); ?></p>
<p><?php esc_html_e( 'When leaving comments, your visitors can also subscribe to a post&#8217;s comments to keep up with the conversation.', 'jetpack' ); ?></p>
+ <p><?php printf(
+ __( 'To use the Subscriptions widget, go to Appearance &#8594; <a href="%s">Widgets</a>. Drag the widget labeled &#8220;Blog Subscriptions (Jetpack)&#8221; into one of your sidebars and configure away.', 'jetpack' ),
+ admin_url( 'widgets.php' )
+ ); ?></p>
+ <p><?php printf(
+ __( 'You can also make changes to your Subscription settings at the bottom of the <a href="%s">Discussion Settings</a> page.', 'jetpack' ),
+ admin_url( 'options-discussion.php#jetpack-subscriptions-settings' )
+ ); ?></p>
+ <p><?php printf(
+ __( 'To customize the emails sent from your blog to your followers, check the settings at the bottom of the <a href="%s">Reading Settings</a> page.', 'jetpack' ),
+ admin_url( 'options-reading.php#follower-settings' )
+ ); ?></p>
<?php
-
- if ( 'jetpack_module_more_info_connected_subscriptions' == current_filter() )
- printf( '<p>' . __( 'To use the Subscriptions widget, go to Appearance &#8594; <a href="%s">Widgets</a>. Drag the widget labeled &#8220;Blog Subscriptions (Jetpack)&#8221; into one of your sidebars and configure away.', 'jetpack' ) . '</p>', admin_url( 'widgets.php' ) );
- printf( '<p>' . __( 'You can also make changes to your Subscription settings at the bottom of the <a href="%s">Discussion Settings</a> page.', 'jetpack' ) . '</p>', admin_url( 'options-discussion.php#jetpack-subscriptions-settings' ) );
- printf( '<p>' . __( 'To customize the emails sent from your blog to your followers, check the settings at the bottom of the <a href="%s">Reading Settings</a> page.', 'jetpack' ) . '</p>', admin_url( 'options-reading.php#follower-settings' ) );
}
add_action( 'jetpack_module_more_info_subscriptions', 'jetpack_subscriptions_more_info' );
-add_action( 'jetpack_module_more_info_connected_subscriptions', 'jetpack_subscriptions_more_info' );
-function jetpack_subscriptions_load_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/following/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Enhanced Distribution
+ */
+function jetpack_enhanced_distribution_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://en.wordpress.com/firehose/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_subscriptions', 'jetpack_subscriptions_load_more_link' );
-
-// Enhanced Distribution
+add_action( 'jetpack_learn_more_button_enhanced-distribution', 'jetpack_enhanced_distribution_more_link' );
function jetpack_enhanced_distribution_more_info() { ?>
<p><?php esc_html_e( 'Jetpack will automatically take the great published content from your blog or website and share it instantly with third party services like search engines, increasing your reach and traffic.', 'jetpack' ); ?></p>
-
<?php
}
-
add_action( 'jetpack_module_more_info_enhanced-distribution', 'jetpack_enhanced_distribution_more_info' );
-add_action( 'jetpack_module_more_info_connected_enhanced-distribution', 'jetpack_enhanced_distribution_more_info' );
-function jetpack_enhanced_distribution_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://en.wordpress.com/firehose/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+
+/**
+ * Protect
+ */
+function jetpack_protect_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/protect/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_enhanced-distribution', 'jetpack_enhanced_distribution_more_link' );
+add_action( 'jetpack_learn_more_button_protect', 'jetpack_protect_more_link' );
-// Protect
function jetpack_protect_more_info() { ?>
- <p><?php esc_html_e( 'Jetpack Protect is a cloud-powered brute force attack prevention tool. We leverage the millions of WordPress sites to identify and block malicious IPs.
+ <p><?php esc_html_e( 'Protect is a cloud-powered brute force attack prevention tool. We leverage the millions of WordPress sites to identify and block malicious IPs.
-Jetpack Protect tracks failed login attempts across all installed users of the plugin. If any single IP has too many failed attempts in a short period of time, they are blocked from logging in to any site with this plugin installed.
+Protect tracks failed login attempts across all Jetpack-connected sites using the Protect module. If any single IP has too many failed attempts in a short period of time, they are blocked from logging in to any site with this plugin installed.
-Jetpack Protect is derived from BruteProtect, and will disable BruteProtect on your site if it is currently enabled.', 'jetpack' ); ?></p><?php
+Protect is derived from BruteProtect, and will disable BruteProtect on your site if it is currently enabled.', 'jetpack' ); ?></p><?php
}
add_action( 'jetpack_module_more_info_protect', 'jetpack_protect_more_info' );
-add_action( 'jetpack_module_more_info_connected_protect', 'jetpack_protect_more_info' );
-function jetpack_protect_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/protect/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
-}
-add_action( 'jetpack_learn_more_button_protect', 'jetpack_protect_more_link' );
-
-function jetpack_protect_search_terms( $terms ) {
- $terms = _x( 'security, secure, protection, botnet, brute force', 'search terms', 'jetpack' );
- return $terms;
+/**
+ * JSON API
+ */
+function jetpack_json_api_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/json-api/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_filter( 'jetpack_search_terms_protect', 'jetpack_protect_search_terms' );
+add_action( 'jetpack_learn_more_button_json-api', 'jetpack_json_api_more_link' );
-// JSON API
function jetpack_json_api_more_info() { ?>
<p><?php esc_html_e( 'Jetpack will allow you to authorize applications and services to securely connect to your blog and allow them to use your content in new ways and offer you new functionality.', 'jetpack' ); ?>
@@ -489,24 +407,21 @@ function jetpack_json_api_more_info() { ?>
<?php
}
-
add_action( 'jetpack_module_more_info_json-api', 'jetpack_json_api_more_info' );
-add_action( 'jetpack_module_more_info_connected_json-api', 'jetpack_json_api_more_info' );
-function jetpack_json_api_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/json-api/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
-}
-add_action( 'jetpack_learn_more_button_json-api', 'jetpack_json_api_more_link' );
-// Contact Form: START
+/**
+ * Contact Form
+ */
function jetpack_contact_form_learn_more_button() {
- echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/contact-form/">' . __( 'Learn More', 'jetpack' ) . '</a>';
+ echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/contact-form/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
+add_action( 'jetpack_learn_more_button_contact-form', 'jetpack_contact_form_learn_more_button' );
function jetpack_contact_form_more_info() {
echo '<div class="jp-info-img">';
echo '<a href="http://support.wordpress.com/contact-form/">';
- echo '<img class="jp-info-img" src="' . plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/contactform.png' ) . '" alt="' . esc_attr__( 'Contact Form', 'jetpack' ) . '" width="300" height="150" />';
+ echo '<img class="jp-info-img" src="' . plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/contactform.jpg' ) . '" alt="' . esc_attr__( 'Contact Form', 'jetpack' ) . '" width="300" height="150" />';
echo '</a>';
echo '</div>';
@@ -518,107 +433,99 @@ function jetpack_contact_form_more_info() {
_e( 'Each contact form can easily be customized to fit your needs. When a user submits your contact form, the feedback will be filtered through <a href="http://akismet.com/">Akismet</a> (if it is active on your site) to make sure it’s not spam. Any legitimate feedback will then be emailed to you, and added to your feedback management area.', 'jetpack' );
echo '</p>';
}
-
-add_action( 'jetpack_learn_more_button_contact-form', 'jetpack_contact_form_learn_more_button' );
add_action( 'jetpack_module_more_info_contact-form', 'jetpack_contact_form_more_info' );
-add_action( 'jetpack_module_more_info_connected_contact-form', 'jetpack_contact_form_more_info' );
-// Contact Form: STOP
-// Jetpack Comments: START
+
+/**
+ * Comments
+ */
function jetpack_comments_learn_more_button() {
- echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+ echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
+add_action( 'jetpack_learn_more_button_comments', 'jetpack_comments_learn_more_button' );
function jetpack_comments_more_info() {
?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/comments.png' ) ?>" alt="<?php esc_attr_e( 'Jetpack Comments Screenshot', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/comments.jpg' ) ?>" alt="<?php esc_attr_e( 'Comments Screenshot', 'jetpack' ) ?>" width="300" height="150" />
</div>
- <p><?php esc_html_e( 'Jetpack Comments enables your visitors to use their WordPress.com, Twitter, or Facebook accounts when commenting on your site.', 'jetpack' ); ?></p>
-
-<?php if ( 'jetpack_module_more_info_connected_comments' == current_filter() ) : ?>
+ <p><?php esc_html_e( 'Comments enables your visitors to use their WordPress.com, Twitter, or Facebook accounts when commenting on your site.', 'jetpack' ); ?></p>
<p><?php printf(
__( "Jetpack tries to match your site's color scheme automatically, but you can make manual adjustments at the bottom of the <a href='%s'>Discussion Settings</a> page.", 'jetpack' ),
admin_url( 'options-discussion.php#jetpack-comments-settings' )
); ?></p>
-
-<?php endif; ?>
<?php
}
-
-add_action( 'jetpack_learn_more_button_comments', 'jetpack_comments_learn_more_button' );
add_action( 'jetpack_module_more_info_comments', 'jetpack_comments_more_info' );
-add_action( 'jetpack_module_more_info_connected_comments', 'jetpack_comments_more_info' );
-// Jetpack Comments: STOP
-// Gallery Carousel: START
+/**
+ * Carousel
+ */
function jetpack_carousel_learn_more_button() {
echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
+add_action( 'jetpack_learn_more_button_carousel', 'jetpack_carousel_learn_more_button' );
function jetpack_carousel_more_info() {
?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/carousel.png' ) ?>" alt="<?php esc_attr_e( 'Gallery Carousel Screenshot', 'jetpack' ) ?>" width="300" height="188" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/carousel.jpg' ) ?>" alt="<?php esc_attr_e( 'Gallery Carousel Screenshot', 'jetpack' ) ?>" width="300" height="188" />
</div>
<p><?php esc_html_e( 'With Carousel active, any standard WordPress galleries you have embedded in posts or pages will launch a gorgeous full-screen photo browsing experience with comments and EXIF metadata.', 'jetpack' ); ?></p>
<?php
}
-
-add_action( 'jetpack_learn_more_button_carousel', 'jetpack_carousel_learn_more_button' );
add_action( 'jetpack_module_more_info_carousel', 'jetpack_carousel_more_info' );
-add_action( 'jetpack_module_more_info_connected_carousel', 'jetpack_carousel_more_info' );
-// Gallery Carousel: STOP
-// Custom CSS: START
-function jetpack_custom_css_more_info() {
- ?>
+/**
+ * Custom CSS
+ */
+function jetpack_custom_css_more_button() {
+ echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+}
+add_action( 'jetpack_learn_more_button_custom-css', 'jetpack_custom_css_more_button' );
+
+function jetpack_custom_css_more_info() { ?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/custom-css.png' ) ?>" alt="<?php esc_attr_e( 'Custom CSS', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/custom-css.jpg' ) ?>" alt="<?php esc_attr_e( 'Custom CSS', 'jetpack' ) ?>" width="300" height="150" />
</div>
<p><?php esc_html_e( "The Custom CSS editor gives you the ability to add to or replace your theme's CSS, all while supplying syntax coloring, auto-indentation, and immediate feedback on the validity of the CSS you're writing.", 'jetpack' ); ?></p>
<p><?php printf( __( 'To use the CSS editor, go to Appearance &#8594; <a href="%s">Edit CSS</a>.', 'jetpack' ), admin_url( 'themes.php?page=editcss' ) ); ?></p>
-
- <?php
+<?php
}
+add_action( 'jetpack_module_more_info_custom-css', 'jetpack_custom_css_more_info' );
-function jetpack_custom_css_more_button() {
+/**
+ * Mobile Theme
+ */
+function jetpack_minileven_more_button() {
echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
+add_action( 'jetpack_learn_more_button_minileven', 'jetpack_minileven_more_button' );
-add_action( 'jetpack_learn_more_button_custom-css', 'jetpack_custom_css_more_button' );
-add_action( 'jetpack_module_more_info_custom-css', 'jetpack_custom_css_more_info' );
-// Custom CSS: STOP
-
-// Minileven: START
-function jetpack_minileven_more_info() {
- ?>
+function jetpack_minileven_more_info() { ?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/mobile-theme.png' ) ?>" alt="<?php esc_attr_e( 'Mobile Theme', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/mobile-theme.jpg' ) ?>" alt="<?php esc_attr_e( 'Mobile Theme', 'jetpack' ) ?>" width="300" height="150" />
</div>
<p><?php esc_html_e( "There's a good chance that visitors to your site will be using a smartphone, and it's important to provide them with a great reading experience while on the small screen.", 'jetpack' ); ?></p>
<p><?php esc_html_e( "Jetpack's mobile theme is optimized for small screens. It uses the header image, background, and widgets from your current theme for a great custom look. Post format support is included, so your photos and galleries will look fantastic on a smartphone.", 'jetpack' ); ?></p>
<p><?php esc_html_e( 'Visitors on iPhone, Android, Windows Phone, and other mobile devices will automatically see the mobile theme, with the option to view the full site. You can enable or disable the mobile theme by clicking the "Activate" or "Deactive" button above.', 'jetpack' ); ?></p>
- <?php
-}
-
-function jetpack_minileven_more_button() {
- echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+<?php
}
-
-add_action( 'jetpack_learn_more_button_minileven', 'jetpack_minileven_more_button' );
add_action( 'jetpack_module_more_info_minileven', 'jetpack_minileven_more_info' );
-// Minileven: STOP
-// Infinite Scroll: START
/**
- *
+ * Infinite Scroll
*/
+function jetpack_infinite_scroll_more_button() {
+ echo '<a class="button more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+}
+add_action( 'jetpack_learn_more_button_infinite-scroll', 'jetpack_infinite_scroll_more_button' );
+
function jetpack_infinite_scroll_more_info() {
$support_text = sprintf( __( 'If you are a theme author, you can learn about adding support for Infinite Scroll at <a href="%1$s">%1$s</a>.', 'jetpack' ), 'http://jetpack.me/support/infinite-scroll/' );
@@ -654,48 +561,36 @@ function jetpack_infinite_scroll_more_info() {
add_action( 'jetpack_module_more_info_infinite-scroll', 'jetpack_infinite_scroll_more_info' );
/**
- *
+ * Post by Email
*/
-function jetpack_infinite_scroll_more_button() {
- echo '<a class="button more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+function jetpack_post_by_email_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/post-by-email/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_infinite-scroll', 'jetpack_infinite_scroll_more_button' );
-// Infinite Scroll: STOP
-
+add_action( 'jetpack_learn_more_button_post-by-email', 'jetpack_post_by_email_more_link' );
-// Post by Email: START
function jetpack_post_by_email_more_info() { ?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/post-by-email.png' ) ?>" alt="<?php esc_attr_e( 'Post by Email', 'jetpack' ) ?>" width="300" height="115" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/post-by-email.jpg' ) ?>" alt="<?php esc_attr_e( 'Post by Email', 'jetpack' ) ?>" width="300" height="115" />
</div>
<p><?php esc_html_e( 'Post by Email is a way of publishing posts on your blog by email. Any email client can be used to send the email, allowing you to publish quickly and easily from devices such as cell phones.', 'jetpack' ); ?></p>
-<?php if ( 'jetpack_module_more_info_connected_post-by-email' == current_filter() ) : ?>
-
<p><?php printf( __( 'Manage your Post By Email address from your <a href="%s">profile settings</a>.', 'jetpack' ), esc_url( get_edit_profile_url( get_current_user_id() ) . '#post-by-email' ) ); ?>
-<?php endif; ?>
-
<p>&rarr; <a href="http://jetpack.me/support/post-by-email/"><?php esc_html_e( 'More information on sending emails, attachments, and customizing your posts.', 'jetpack' ); ?></a></p>
<?php
}
-
-function jetpack_post_by_email_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/post-by-email/">' . __( 'Learn More', 'jetpack' ) . '</a>';
-}
-
add_action( 'jetpack_module_more_info_post-by-email', 'jetpack_post_by_email_more_info' );
-add_action( 'jetpack_module_more_info_connected_post-by-email', 'jetpack_post_by_email_more_info' );
-add_action( 'jetpack_learn_more_button_post-by-email', 'jetpack_post_by_email_more_link' );
-// Post by Email: STOP
-
-// Photon: START
/**
- *
+ * Photon
*/
+function jetpack_photon_more_link() {
+ echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+}
+add_action( 'jetpack_learn_more_button_photon', 'jetpack_photon_more_link' );
+
function jetpack_photon_more_info() { ?>
<p><?php esc_html_e( "Give your site a boost by loading images in posts from the WordPress.com content delivery network. We cache your images and serve them from our super-fast network, reducing the burden on your Web host with the click of a button.", 'jetpack' ); ?></p>
<?php
@@ -703,21 +598,16 @@ function jetpack_photon_more_info() { ?>
add_action( 'jetpack_module_more_info_photon', 'jetpack_photon_more_info' );
/**
- * Display "Learn More" button for Photon module
- * @uses __
- * @action jetpack_learn_more_button_photon
- * @return string
+ * Tiled Galleries
*/
-function jetpack_photon_more_link() {
+function jetpack_tiled_gallery_more_link() {
echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_photon', 'jetpack_photon_more_link' );
-// Photon: STOP
+add_action( 'jetpack_learn_more_button_tiled-gallery', 'jetpack_tiled_gallery_more_link' );
-// Tiled Galleries: START
function jetpack_tiled_gallery_more_info() { ?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/tiled-gallery.png' ) ?>" alt="<?php esc_attr_e( 'Tiled Galleries', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/tiled-gallery.jpg' ) ?>" alt="<?php esc_attr_e( 'Tiled Galleries', 'jetpack' ) ?>" width="300" height="150" />
</div>
<p><?php esc_html_e( 'Create elegant magazine-style mosaic layouts for your photos without having to use an external graphic editor.', 'jetpack' ); ?></p>
@@ -727,39 +617,47 @@ function jetpack_tiled_gallery_more_info() { ?>
}
add_action( 'jetpack_module_more_info_tiled-gallery', 'jetpack_tiled_gallery_more_info' );
-function jetpack_tiled_gallery_more_link() {
+/**
+ * Likes
+ */
+function jetpack_likes_more_link() {
echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_tiled-gallery', 'jetpack_tiled_gallery_more_link' );
-// Tiled Galleries: STOP
+add_action( 'jetpack_learn_more_button_likes', 'jetpack_likes_more_link' );
-// Likes: START
function jetpack_likes_more_info() { ?>
<div class="jp-info-img">
<a href="http://jetpack.me/support/likes/">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/likes.png' ) ?>" alt="<?php esc_attr_e( 'Likes', 'jetpack' ) ?>" width="323" height="69" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/likes.jpg' ) ?>" alt="<?php esc_attr_e( 'Likes', 'jetpack' ) ?>" width="323" height="69" />
</a>
</div>
<p><?php esc_html_e( 'Likes allow your readers to show their appreciation for your posts and other published content using their WordPress.com accounts. Your readers will then be able to review their liked posts from WordPress.com.', 'jetpack' ) ?></p>
<p><?php esc_html_e( 'Displayed below your posts will be how many people have liked your posts and the Gravatars of those who have liked them.', 'jetpack' ); ?></p>
-
+ <?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?>
+ <p><?php esc_html_e( 'You can turn Likes on by following these steps:', 'jetpack' ); ?></p>
+ <ol>
+ <li><?php esc_html_e( 'Make sure the module is activated by clicking on "Activate" at the bottom of this page.', 'jetpack' ); ?></li>
+ <li><?php esc_html_e( 'Go to Settings > Sharing in your Dashboard.', 'jetpack' ); ?></li>
+ <li><?php esc_html_e( 'Ensure that "WordPress.com Likes are…" is set to "On for all posts"', 'jetpack' ); ?></li>
+ </ol>
+ <?php endif; ?>
<p>&rarr; <a href="http://jetpack.me/support/likes/"><?php esc_html_e( 'More information on using Likes.', 'jetpack' ); ?></a></p>
<?php
}
add_action( 'jetpack_module_more_info_likes', 'jetpack_likes_more_info' );
-function jetpack_likes_more_link() {
- echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Omnisearch
+ */
+function jetpack_omnisearch_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/omnisearch/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_likes', 'jetpack_likes_more_link' );
-// Likes: STOP
+add_action( 'jetpack_learn_more_button_omnisearch', 'jetpack_omnisearch_more_link' );
-// Omnisearch: START
-function jetpack_omnisearch_more_info() {
- ?>
+function jetpack_omnisearch_more_info() { ?>
<p><?php esc_html_e( 'Search once, get results from everything! Currently supports searching posts, pages, comments, media, and plugins.', 'jetpack' ); ?></p>
@@ -769,18 +667,18 @@ function jetpack_omnisearch_more_info() {
<?php echo Jetpack_Omnisearch::get_omnisearch_form(); ?>
<?php endif; ?>
- <?php
+<?php
}
+add_action( 'jetpack_module_more_info_omnisearch', 'jetpack_omnisearch_more_info' );
-function jetpack_omnisearch_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/omnisearch/">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Widget Visibility
+ */
+function jetpack_widget_visibility_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/widget-visibility/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
+add_action( 'jetpack_learn_more_button_widget-visibility', 'jetpack_widget_visibility_more_link' );
-add_action( 'jetpack_module_more_info_omnisearch', 'jetpack_omnisearch_more_info' );
-add_action( 'jetpack_learn_more_button_omnisearch', 'jetpack_omnisearch_more_link' );
-// Omnisearch: STOP
-
-// Widget Visibility: START
function jetpack_widget_visibility_more_info() { ?>
<p><?php esc_html_e( 'Control which pages your widgets appear on with Widget Visibility.', 'jetpack' ); ?></p>
<p><?php esc_html_e( 'To control visibility, expand the widget and click the Visibility button next to the Save button, and then, choose a set of visibility options.', 'jetpack' ); ?></p>
@@ -788,51 +686,51 @@ function jetpack_widget_visibility_more_info() { ?>
<p><?php esc_html_e( 'You can also hide widgets based on the current page. For example, if you don\'t want the Archives widget to appear on search results pages, choose "Hide" and "Page is Search results."', 'jetpack' ); ?></p>
<?php
}
+add_action( 'jetpack_module_more_info_widget-visibility', 'jetpack_widget_visibility_more_info' );
-function jetpack_widget_visibility_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/widget-visibility/">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * VideoPress
+ */
+function jetpack_videopress_more_link() {
+ echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
+add_action( 'jetpack_learn_more_button_videopress', 'jetpack_videopress_more_link' );
-add_action( 'jetpack_module_more_info_widget-visibility', 'jetpack_widget_visibility_more_info' );
-add_action( 'jetpack_learn_more_button_widget-visibility', 'jetpack_widget_visibility_more_link' );
-// Widget Visibility: STOP
-
-// VideoPress: START
-function jetpack_videopress_more_info() {
- ?>
+function jetpack_videopress_more_info() { ?>
<p><?php printf(
__( 'With the VideoPress module you can easily upload videos to your WordPress site and embed them in your posts and pages. This module requires a WordPress.com account with an active <a href="%1$s" target="_blank">VideoPress subscription</a>. Once you have purchased a VideoPress subscription, <a href="%2$s">click here to configure VideoPress</a>.', 'jetpack' ),
'http://store.wordpress.com/premium-upgrades/videopress/',
Jetpack::admin_url( 'page=jetpack&configure=videopress' )
); ?></p>
- <?php
+<?php
}
add_action( 'jetpack_module_more_info_videopress', 'jetpack_videopress_more_info' );
-function jetpack_videopress_more_link() {
- echo '<a class="button-secondary more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * SSO
+ */
+function jetpack_sso_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/sso/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_videopress', 'jetpack_videopress_more_link' );
-// VideoPress: STOP
+add_action( 'jetpack_learn_more_button_sso', 'jetpack_sso_more_link' );
-// SSO: START
function jetpack_sso_more_info() { ?>
- <p><?php esc_html_e( 'With WordPress.com Single Sign On, your users will be able to log in to or register for your WordPress site with the same credentials they use on WordPress.com. It\'s safe and secure.' , 'jetpack' ); ?></p>
+ <p><?php esc_html_e( 'With Single Sign On, your users will be able to log in to or register for your WordPress site with the same credentials they use on WordPress.com. It\'s safe and secure.' , 'jetpack' ); ?></p>
<p><?php esc_html_e( 'Once enabled, a "Log in with WordPress.com" option will be added to your existing log in form.' , 'jetpack' ); ?></p>
<?php
}
+add_action( 'jetpack_module_more_info_sso', 'jetpack_sso_more_info' );
-function jetpack_sso_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/sso/">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Monitor
+ */
+function jetpack_monitor_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/monitor/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
+add_action( 'jetpack_learn_more_button_monitor', 'jetpack_monitor_more_link' );
-add_action( 'jetpack_module_more_info_sso', 'jetpack_sso_more_info' );
-add_action( 'jetpack_learn_more_button_sso', 'jetpack_sso_more_link' );
-// SSO: STOP
-
-// Monitor: START
function jetpack_monitor_more_info() { ?>
<p><?php esc_html_e( 'Nobody likes downtime, and that\'s why Jetpack Monitor is on the job, keeping tabs on your site by checking it every five minutes. As soon as any downtime is detected, you will receive an email notification alerting you to the issue. That way you can act quickly, to get your site back online again!', 'jetpack' ); ?>
@@ -843,13 +741,14 @@ function jetpack_monitor_more_info() { ?>
}
add_action( 'jetpack_module_more_info_monitor', 'jetpack_monitor_more_info' );
-function jetpack_monitor_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/monitor/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Related Posts
+ */
+function jetpack_related_posts_more_button() {
+ echo '<a class="button more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_monitor', 'jetpack_monitor_more_link' );
-// Monitor: STOP
+add_action( 'jetpack_learn_more_button_related-posts', 'jetpack_related_posts_more_button' );
-// Related Posts: START
function jetpack_related_posts_more_info() {
$template = <<<EOT
<div class="jp-info-img">
@@ -860,33 +759,12 @@ function jetpack_related_posts_more_info() {
<p>%s</p>
<p>&rarr; <a href="http://jetpack.me/support/related-posts/">%s</a></p>
-EOT;
- printf(
- $template,
- plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/related-posts.png' ),
- esc_attr__( 'Related Posts', 'jetpack' ),
- esc_html__( '"Related Posts" shows additional relevant links from your site under your posts. If the feature is enabled, links appear underneath your Sharing Buttons and WordPress.com Likes (if you’ve turned these on).', 'jetpack' ),
- esc_html__( 'More information on using Related Posts.', 'jetpack' )
- );
-}
-add_action( 'jetpack_module_more_info_related-posts', 'jetpack_related_posts_more_info' );
-
-function jetpack_related_posts_more_info_connected() {
- $template = <<<EOT
- <div class="jp-info-img">
- <a href="http://jetpack.me/support/related-posts/">
- <img class="jp-info-img" src="%s" alt="%s" width="300" height="98" />
- </a>
- </div>
-
- <p>%s</p>
- <p>&rarr; <a href="http://jetpack.me/support/related-posts/">%s</a></p>
<hr />
<p><a href="%s#sync-related-posts">%s</a></p>
EOT;
printf(
$template,
- plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/related-posts.png' ),
+ plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/related-posts.jpg' ),
esc_attr__( 'Related Posts', 'jetpack' ),
esc_html__( '"Related Posts" shows additional relevant links from your site under your posts. If the feature is enabled, links appear underneath your Sharing Buttons and WordPress.com Likes (if you’ve turned these on).', 'jetpack' ),
esc_html__( 'More information on using Related Posts.', 'jetpack' ),
@@ -894,15 +772,16 @@ EOT;
esc_html__( 'This feature uses the WordPress.com infrastructure and requires that your public content be mirrored there. If you see intermittent issues only affecting certain posts, request a reindex of your posts.', 'jetpack' )
);
}
-add_action( 'jetpack_module_more_info_connected_related-posts', 'jetpack_related_posts_more_info_connected' );
+add_action( 'jetpack_module_more_info_related-posts', 'jetpack_related_posts_more_info' );
-function jetpack_related_posts_more_button() {
- echo '<a class="button more-info-link" href="#">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Markdown
+ */
+function jetpack_markdown_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/markdown/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_related-posts', 'jetpack_related_posts_more_button' );
-// Related Posts: STOP
+add_action( 'jetpack_learn_more_button_markdown', 'jetpack_markdown_more_link' );
-// Markdown: START
function jetpack_markdown_more_info() { ?>
<p><?php esc_html_e( 'Markdown lets you compose posts and comments with links, lists, and other styles using regular characters and punctuation marks. Markdown is used by writers and bloggers who want a quick and easy way to write rich text, without having to take their hands off the keyboard, and without learning a lot of complicated codes and shortcuts.', 'jetpack' ); ?></p>
@@ -910,50 +789,63 @@ function jetpack_markdown_more_info() { ?>
}
add_action( 'jetpack_module_more_info_markdown', 'jetpack_markdown_more_info' );
-function jetpack_markdown_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://en.support.wordpress.com/markdown/">' . esc_html__( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Site Verification Tools
+ */
+function jetpack_verification_tools_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/webmaster-tools/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_markdown', 'jetpack_markdown_more_link' );
-// Markdown: STOP
+add_action( 'jetpack_learn_more_button_verification-tools', 'jetpack_verification_tools_more_link' );
-// Site Verification Tools: START
function jetpack_verification_tools_more_info() { ?>
<p><?php esc_html_e( 'Use these tools to verify that you own/control your website with other external services like Google, Bing and Pinterest.', 'jetpack' ); ?></p>
- <p><?php printf( __( "Verifying your site allows you to access advanced features on these other services (e.g. Webmaster tools, or getting a verified badge). We'll just add an invisible %s tag to the source code of your homepage.", 'jetpack' ), '<code>meta</code>' ); ?></p>
+ <p><?php printf( __( "Verifying your site allows you to access advanced features on these other services (e.g. Webmaster tools, Google Search Console, or getting a verified badge). We'll just add an invisible %s tag to the source code of your homepage.", 'jetpack' ), '<code>meta</code>' ); ?></p>
<?php
}
add_action( 'jetpack_module_more_info_verification-tools', 'jetpack_verification_tools_more_info' );
-function jetpack_verification_tools_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/webmaster-tools/">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Custom Content Types
+ */
+function jetpack_custom_content_types_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/portfolios/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_verification-tools', 'jetpack_verification_tools_more_link' );
-// Site Verification Tools: STOP
+add_action( 'jetpack_learn_more_button_custom-content-types', 'jetpack_custom_content_types_more_link' );
-// Custom Content Types: START
function jetpack_custom_content_types_more_info() { ?>
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/custom-content-types.png' ) ?>" alt="<?php esc_attr_e( 'Custom Content Type', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/custom-content-types.jpg' ) ?>" alt="<?php esc_attr_e( 'Custom Content Type', 'jetpack' ) ?>" width="300" height="150" />
</div>
<p><?php esc_html_e( 'Organize and display different types of content on your site, separate from posts and pages.', 'jetpack' ); ?></p>
<p><?php printf( __( 'To enable a custom content type, head over to <a href="%s">Settings &rarr; Writing &rarr; Your Custom Content Types</a> to activate either "Portfolio Projects” or “Testimonials” by checking the corresponding checkbox. You can now add projects and testimonials under the new "Portfolio” or “Testimonials” menu item in your sidebar.', 'jetpack' ), admin_url( 'options-writing.php#cpt-options' ) ); ?></p>
- <p><?php printf( __( 'Once added, your custom content will be visible on your website at %s/portfolio/ or %s/testimonial/, or you may add them with <a href="http://jetpack.me/support/custom-content-types/" target="_blank">shortcodes</a>.', 'jetpack' ), get_site_url(), get_site_url() ); ?></p>
+ <p><?php
+ /* translators: all variables are URLs */
+ printf(
+ __(
+ 'Once added, your custom content will be visible on your website at %1$s or %2$s, or you may add them with <a href="%3$s" target="_blank">shortcodes</a>.',
+ 'jetpack'
+ ),
+ get_site_url() . '/portfolio/',
+ get_site_url() . '/testimonial/',
+ 'http://jetpack.me/support/custom-content-types/'
+ );
+ ?></p>
<?php
}
add_action( 'jetpack_module_more_info_custom-content-types', 'jetpack_custom_content_types_more_info' );
-function jetpack_custom_content_types_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://support.wordpress.com/portfolios/">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Site Icon
+ */
+function jetpack_site_icon_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/site-icon">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_custom-content-types', 'jetpack_custom_content_types_more_link' );
-// Custom Content Types: STOP
+add_action( 'jetpack_learn_more_button_site-icon', 'jetpack_site_icon_more_link' );
-// Site Icon: START
function jetpack_custom_site_icon() { ?>
-
<div class="jp-info-img">
<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/site-icon.png' ) ?>" alt="<?php esc_attr_e( 'Site Icon', 'jetpack' ) ?>" width="300" height="150" />
</div>
@@ -965,33 +857,43 @@ function jetpack_custom_site_icon() { ?>
}
add_action( 'jetpack_module_more_info_site-icon', 'jetpack_custom_site_icon' );
-function jetpack_site_icon_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/site-icon">' . __( 'Learn More', 'jetpack' ) . '</a>';
+/**
+ * Manage
+ */
+function jetpack_manage_more_link() {
+ echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/site-management/">' . __( 'Learn More', 'jetpack' ) . '</a>';
}
-add_action( 'jetpack_learn_more_button_site-icon', 'jetpack_site_icon_more_link' );
-// Site Icon: STOP
+add_action( 'jetpack_learn_more_button_manage', 'jetpack_manage_more_link' );
-// Manage: Start
function jetpack_custom_jetpack_manage() { ?>
-
<div class="jp-info-img">
- <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/manage.png' ) ?>" alt="<?php esc_attr_e( 'Manage all of your WordPress sites, self-hosted or not, from WordPress.com', 'jetpack' ) ?>" width="300" height="150" />
+ <img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/images/screenshots/manage.jpg' ) ?>" alt="<?php esc_attr_e( 'Manage all of your WordPress sites, self-hosted or not, from WordPress.com', 'jetpack' ) ?>" width="300" height="150" />
</div>
<p><em><?php esc_html_e( 'Enabling Manage allows you to update your self-hosted WordPress sites along with any WordPress.com sites you have, all in one simple dashboard.', 'jetpack' ); ?></em></p>
<p><strong><?php _e( 'Plugins', 'jetpack' ); ?></strong><br />
<?php printf( __( 'Now you can update plugins, set plugins to automatically update, and activate or deactivate plugins on a per-site basis or in bulk from <a href="%s">wordpress.com/plugins</a>.', 'jetpack' ), 'https://wordpress.com/plugins' ); ?></p>
- <p><strong><?php _e( 'Posts and Pages', 'jetpack' ); ?></strong><br />
- <?php printf( __( 'Add a new post or page to any of your sites from a single interface.', 'jetpack' ) ); ?></p>
+ <p><strong><?php _e( 'Themes', 'jetpack' ); ?></strong><br />
+ <?php printf( __( 'List your installed themes, search, and activate them from <a href="%s">wordpress.com/design</a>.', 'jetpack' ), 'https://wordpress.com/design' ); ?></p>
+
+ <p><strong><?php _e( 'Menus', 'jetpack' ); ?></strong><br />
+ <?php printf( __( 'Create a new menu for your site, or edit existing menus from <a href="%s">wordpress.com/menus</a>.', 'jetpack' ), 'https://wordpress.com/menus' ); ?></p>
<?php
}
add_action( 'jetpack_module_more_info_manage', 'jetpack_custom_jetpack_manage' );
-function jetpack_manage_more_link() {
- echo '<a class="button-secondary more-info-link" href="http://jetpack.me/support/site-management/">' . __( 'Learn More', 'jetpack' ) . '</a>';
+// XML Sitemap: START
+function jetpack_xml_sitemap_more_info() { ?>
+ <p><?php esc_html_e( 'This module creates an XML sitemap file that lists the URLs of posts and pages in your site with important information about each one.', 'jetpack' ); ?></p>
+ <p><?php esc_html_e( 'This file is accessed by search engines like Google or Bing so they can crawl and understand your site.', 'jetpack' ); ?></p>
+ <p>&rarr; <a href="http://jetpack.me/support/sitemaps/"><?php esc_html_e( 'More information on Sitemaps.', 'jetpack' ); ?></a></p>
+ <?php if ( '0' == get_option( 'blog_public' ) ) : ?>
+ <p><strong><?php esc_html_e( 'Your site is currently set to discourage search engines from indexing it so the sitemap will not be accesible.', 'jetpack' ); ?></strong></p>
+ <?php endif; ?>
+ <?php
}
-add_action( 'jetpack_learn_more_button_manage', 'jetpack_manage_more_link' );
-// Manage: STOP
+add_action( 'jetpack_module_more_info_sitemaps', 'jetpack_xml_sitemap_more_info' );
+// XML Sitemap: STOP \ No newline at end of file
diff --git a/plugins/jetpack/modules/monitor.php b/plugins/jetpack/modules/monitor.php
index ecfa853c..4fd2d671 100644
--- a/plugins/jetpack/modules/monitor.php
+++ b/plugins/jetpack/modules/monitor.php
@@ -1,14 +1,15 @@
<?php
/**
* Module Name: Monitor
- * Module Description: Receive notifications from Jetpack if your site goes offline — and when it it returns.
+ * Module Description: Reports on site downtime.
* Sort Order: 28
* Recommendation Order: 10
* First Introduced: 2.6
* Requires Connection: Yes
* Auto Activate: No
* Module Tags: Recommended
- * Feature: Recommended
+ * Feature: Recommended, Performance-Security
+ * Additional Search Queries: monitor, uptime, downtime, monitoring
*/
add_action( 'jetpack_activate_module_monitor', array( Jetpack::init(), 'toggle_module_on_wpcom' ) );
@@ -95,7 +96,7 @@ class Jetpack_Monitor {
}
return $xml->getResponse();
}
-
+
public function update_option_receive_jetpack_monitor_notification( $value ) {
Jetpack::load_xml_rpc_client();
$xml = new Jetpack_IXR_Client( array(
@@ -153,4 +154,3 @@ class Jetpack_Monitor {
}
new Jetpack_Monitor;
-
diff --git a/plugins/jetpack/modules/notes.php b/plugins/jetpack/modules/notes.php
index 353bf6d0..d37e5de3 100644
--- a/plugins/jetpack/modules/notes.php
+++ b/plugins/jetpack/modules/notes.php
@@ -7,6 +7,7 @@
* Requires Connection: Yes
* Auto Activate: Yes
* Module Tags: Other
+ * Additional Search Queries: notification, notifications, toolbar, adminbar, push, comments
*/
if ( !defined( 'JETPACK_NOTES__CACHE_BUSTER' ) ) define( 'JETPACK_NOTES__CACHE_BUSTER', JETPACK__VERSION . '-' . gmdate( 'oW' ) );
@@ -25,7 +26,7 @@ Jetpack_Sync::sync_options( __FILE__,
);
class Jetpack_Notifications {
- var $jetpack = false;
+ public $jetpack = false;
/**
* Singleton
@@ -41,7 +42,7 @@ class Jetpack_Notifications {
return $instance[0];
}
- function Jetpack_Notifications() {
+ function __construct() {
$this->jetpack = Jetpack::init();
add_action( 'init', array( &$this, 'action_init' ) );
@@ -125,7 +126,11 @@ class Jetpack_Notifications {
}
function styles_and_scripts() {
- wp_enqueue_style( 'wpcom-notes-admin-bar', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-v2.css' ), array(), JETPACK_NOTES__CACHE_BUSTER );
+ if ( !is_rtl() ) {
+ wp_enqueue_style( 'wpcom-notes-admin-bar', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-v2.css' ), array(), JETPACK_NOTES__CACHE_BUSTER );
+ } else {
+ wp_enqueue_style( 'wpcom-notes-admin-bar', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/rtl/admin-bar-v2-rtl.css' ), array(), JETPACK_NOTES__CACHE_BUSTER );
+ }
wp_enqueue_style( 'noticons', $this->wpcom_static_url( '/i/noticons/noticons.css' ), array(), JETPACK_NOTES__CACHE_BUSTER );
$this->print_js();
@@ -141,7 +146,7 @@ class Jetpack_Notifications {
wp_register_script( 'backbone', $this->wpcom_static_url( '/wp-includes/js/backbone.min.js' ), array( 'underscore' ), JETPACK_NOTES__CACHE_BUSTER );
}
- wp_register_script( 'wpcom-notes-common', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/notes-common-v2.js' ), array( 'jquery', 'underscore', 'backbone', 'mustache', 'jquery.spin' ), JETPACK_NOTES__CACHE_BUSTER );
+ wp_register_script( 'wpcom-notes-common', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/notes-common-v2.js' ), array( 'jquery', 'underscore', 'backbone', 'mustache' ), JETPACK_NOTES__CACHE_BUSTER );
wp_enqueue_script( 'wpcom-notes-admin-bar', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-v2.js' ), array( 'wpcom-notes-common' ), JETPACK_NOTES__CACHE_BUSTER );
}
@@ -151,6 +156,21 @@ class Jetpack_Notifications {
if ( !is_object( $wp_admin_bar ) )
return;
+ $wpcom_locale = get_locale();
+
+ if ( !class_exists( 'GP_Locales' ) ) {
+ if ( defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) && file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
+ require JETPACK__GLOTPRESS_LOCALES_PATH;
+ }
+ }
+
+ if ( class_exists( 'GP_Locales' ) ) {
+ $wpcom_locale_object = GP_Locales::by_field( 'wp_locale', get_locale() );
+ if ( $wpcom_locale_object instanceof GP_Locale ) {
+ $wpcom_locale = $wpcom_locale_object->slug;
+ }
+ }
+
$classes = 'wpnt-loading wpn-read';
$wp_admin_bar->add_menu( array(
'id' => 'notes',
@@ -158,7 +178,7 @@ class Jetpack_Notifications {
<span class="noticon noticon-notification"></span>
</span>',
'meta' => array(
- 'html' => '<div id="wpnt-notes-panel" style="display:none" lang="'. esc_attr( get_locale() ) . '" dir="' . ( is_rtl() ? 'rtl' : 'ltr' ) . '"><div class="wpnt-notes-panel-header"><span class="wpnt-notes-header">' . __( 'Notifications', 'jetpack' ) . '</span><span class="wpnt-notes-panel-link"></span></div></div>',
+ 'html' => '<div id="wpnt-notes-panel2" style="display:none" lang="'. esc_attr( $wpcom_locale ) . '" dir="' . ( is_rtl() ? 'rtl' : 'ltr' ) . '"><div class="wpnt-notes-panel-header"><span class="wpnt-notes-header">' . __( 'Notifications', 'jetpack' ) . '</span><span class="wpnt-notes-panel-link"></span></div></div>',
'class' => 'menupop',
),
'parent' => 'top-secondary',
@@ -171,6 +191,7 @@ class Jetpack_Notifications {
<script type="text/javascript">
/* <![CDATA[ */
var wpNotesIsJetpackClient = true;
+ var wpNotesIsJetpackClientV2 = true;
<?php if ( $link_accounts_url ) : ?>
var wpNotesLinkAccountsURL = '<?php print $link_accounts_url; ?>';
<?php endif; ?>
diff --git a/plugins/jetpack/modules/omnisearch.php b/plugins/jetpack/modules/omnisearch.php
index 2d47a0aa..8e1dbc8c 100644
--- a/plugins/jetpack/modules/omnisearch.php
+++ b/plugins/jetpack/modules/omnisearch.php
@@ -8,6 +8,7 @@
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Developers
+ * Additional Search Queries: search
*/
// Only do Jetpack Omnisearch if there isn't already a Core WP_Omnisearch Class.
diff --git a/plugins/jetpack/modules/omnisearch/omnisearch-comments.php b/plugins/jetpack/modules/omnisearch/omnisearch-comments.php
index 7f770ef6..e5336c5b 100644
--- a/plugins/jetpack/modules/omnisearch/omnisearch-comments.php
+++ b/plugins/jetpack/modules/omnisearch/omnisearch-comments.php
@@ -5,7 +5,7 @@ if( ! class_exists( 'WP_Comments_List_Table' ) )
class Jetpack_Omnisearch_Comments extends WP_Comments_List_Table {
static $instance;
- var $checkbox = false;
+ public $checkbox = false;
function __construct() {
self::$instance = $this;
@@ -30,6 +30,7 @@ class Jetpack_Omnisearch_Comments extends WP_Comments_List_Table {
}
function get_per_page( $comment_status = 'all' ) {
+ /** This action is documented in modules/omnisearch/omnisearch-core.php */
return apply_filters( 'omnisearch_num_results', 5 );
}
@@ -45,4 +46,3 @@ class Jetpack_Omnisearch_Comments extends WP_Comments_List_Table {
function extra_tablenav( $which ) {}
}
-
diff --git a/plugins/jetpack/modules/omnisearch/omnisearch-core.php b/plugins/jetpack/modules/omnisearch/omnisearch-core.php
index 32afdacf..9b82a7da 100644
--- a/plugins/jetpack/modules/omnisearch/omnisearch-core.php
+++ b/plugins/jetpack/modules/omnisearch/omnisearch-core.php
@@ -37,6 +37,15 @@ class Jetpack_Omnisearch {
new Jetpack_Omnisearch_Plugins;
}
+ /**
+ * Fires after each default omnisearch provider has been required.
+ *
+ * Can be used to add your own Omnisearch provider.
+ *
+ * @module minileven
+ *
+ * @since 2.3.2
+ */
do_action( 'omnisearch_add_providers' );
}
@@ -54,17 +63,17 @@ class Jetpack_Omnisearch {
} else {
wp_register_style( 'omnisearch-admin', plugins_url( 'omnisearch.css', __FILE__ ), $deps );
}
-
+
}
function jetpack_admin_menu() {
remove_submenu_page( 'index.php', 'omnisearch' );
- $this->slug = add_submenu_page( 'jetpack', __('Omnisearch', 'jetpack'), __('Omnisearch', 'jetpack'), 'edit_posts', 'omnisearch', array( $this, 'omnisearch_page' ) );
+ $this->slug = add_submenu_page( 'jetpack', __( 'Omnisearch', 'jetpack' ), __( 'Omnisearch', 'jetpack' ), 'edit_posts', 'omnisearch', array( $this, 'omnisearch_page' ) );
add_action( "admin_print_styles-{$this->slug}", array( $this, 'admin_print_styles_jetpack' ) );
}
function admin_menu() {
- $this->slug = add_dashboard_page( __('Omnisearch', 'jetpack'), __('Omnisearch', 'jetpack'), 'edit_posts', 'omnisearch', array( $this, 'omnisearch_page' ) );
+ $this->slug = add_dashboard_page( __( 'Omnisearch', 'jetpack' ), __( 'Omnisearch', 'jetpack' ), 'edit_posts', 'omnisearch', array( $this, 'omnisearch_page' ) );
add_action( "admin_print_styles-{$this->slug}", array( $this, 'admin_print_styles' ) );
}
@@ -80,12 +89,32 @@ class Jetpack_Omnisearch {
function omnisearch_page() {
$results = array();
$s = isset( $_GET['s'] ) ? $_GET['s'] : '';
- if( $s ) {
+ if ( $s ) {
+ /**
+ * Filter the results returned for a given Omnisearch search query.
+ *
+ * @module minileven
+ *
+ * @since 2.3.0
+ *
+ * @param array $results Array of Omnisearch results.
+ * @param string $s Search parameter.
+ */
$results = apply_filters( 'omnisearch_results', $results, $s );
}
+ /**
+ * Filter the number of results displayed for each Omnisearch searched section.
+ *
+ * @module minileven
+ *
+ * @since 2.3.0
+ *
+ * @param int 5 Number of results displayed for each Omnisearch searched section.
+ */
+ $num_results = intval( apply_filters( 'omnisearch_num_results', 5 ) );
?>
<div class="wrap">
- <h2 class="page-title"><?php esc_html_e('Omnisearch', 'jetpack'); ?> <small><?php esc_html_e('search everything', 'jetpack'); ?></small></h2>
+ <h2 class="page-title"><?php esc_html_e( 'Omnisearch', 'jetpack' ); ?> <small><?php esc_html_e( 'search everything', 'jetpack' ); ?></small></h2>
<br class="clear" />
<?php echo self::get_omnisearch_form( array(
'form_class' => 'omnisearch-form',
@@ -95,19 +124,19 @@ class Jetpack_Omnisearch {
'alternate_submit' => true,
) ); ?>
<?php if( ! empty( $results ) ): ?>
- <h3 id="results-title"><?php esc_html_e('Results:', 'jetpack'); ?></h3>
- <div class="jump-to"><strong><?php esc_html_e('Jump to:', 'jetpack'); ?></strong>
+ <h3 id="results-title"><?php esc_html_e( 'Results:', 'jetpack' ); ?></h3>
+ <div class="jump-to"><strong><?php esc_html_e( 'Jump to:', 'jetpack' ); ?></strong>
<?php foreach( $results as $label => $result ) : ?>
<a href="#result-<?php echo sanitize_title( $label ); ?>"><?php echo esc_html( $label ); ?></a>
<?php endforeach; ?>
</div>
<br class="clear" />
- <script>var search_term = '<?php echo esc_js( $s ); ?>', num_results = <?php echo intval( apply_filters( 'omnisearch_num_results', 5 ) ); ?>;</script>
+ <script>var search_term = '<?php echo esc_js( $s ); ?>', num_results = <?php echo $num_results; ?>;</script>
<ul class="omnisearch-results">
<?php foreach( $results as $label => $result ) : ?>
<li id="result-<?php echo sanitize_title( $label ); ?>" data-label="<?php echo esc_attr( $label ); ?>">
<?php echo $result; ?>
- <a class="back-to-top" href="#results-title"><?php esc_html_e('Back to Top &uarr;', 'jetpack'); ?></a>
+ <a class="back-to-top" href="#results-title"><?php esc_html_e( 'Back to Top &uarr;', 'jetpack' ); ?></a>
</li>
<?php endforeach; ?>
</ul>
@@ -117,7 +146,14 @@ class Jetpack_Omnisearch {
}
function admin_bar_search( $wp_admin_bar ) {
- if( ! is_admin() || ! current_user_can( 'edit_posts' ) )
+ if(
+ ! is_admin() ||
+ ! current_user_can( 'edit_posts' ) ||
+ (
+ function_exists( 'wpcom_use_wpadmin_flows' ) &&
+ ! wpcom_use_wpadmin_flows()
+ )
+ )
return;
$form = self::get_omnisearch_form( array(
@@ -181,9 +217,19 @@ class Jetpack_Omnisearch {
</form>
<?php
+ /**
+ * Filters the Omnisearch search form output.
+ *
+ * @module minileven
+ *
+ * @since 2.3.0
+ *
+ * @param string ob_get_clean() Omnisearch search form output.
+ * @param array $args Array of arguments to pass to the form to overwrite the default form parameters.
+ * @param array $defaults Array of default form parameters.
+ */
return apply_filters( 'get_omnisearch_form', ob_get_clean(), $args, $defaults );
}
}
new Jetpack_Omnisearch;
-
diff --git a/plugins/jetpack/modules/omnisearch/omnisearch-media.php b/plugins/jetpack/modules/omnisearch/omnisearch-media.php
index 17899a0a..94b62039 100644
--- a/plugins/jetpack/modules/omnisearch/omnisearch-media.php
+++ b/plugins/jetpack/modules/omnisearch/omnisearch-media.php
@@ -8,13 +8,13 @@ class Jetpack_Omnisearch_Media extends WP_Media_List_Table {
function __construct() {
self::$instance = $this;
- add_filter( 'omnisearch_results', array( $this, 'search'), 10, 2 );
+ add_filter( 'omnisearch_results', array( $this, 'search' ), 10, 2 );
}
function search( $results, $search_term ) {
$search_url = esc_url( add_query_arg( 's', $search_term, admin_url( 'upload.php' ) ) );
- $search_link = sprintf( ' <a href="%s" class="add-new-h2">%s</a>', $search_url, esc_html__('Search Media', 'jetpack') );
- $html = '<h2>' . esc_html__('Media', 'jetpack') . $search_link . '</h2>';
+ $search_link = sprintf( ' <a href="%s" class="add-new-h2">%s</a>', $search_url, esc_html__( 'Search Media', 'jetpack' ) );
+ $html = '<h2>' . esc_html__( 'Media', 'jetpack' ) . $search_link . '</h2>';
parent::__construct();
ob_start();
@@ -42,5 +42,3 @@ class Jetpack_Omnisearch_Media extends WP_Media_List_Table {
function extra_tablenav( $which ) {}
}
-
-
diff --git a/plugins/jetpack/modules/omnisearch/omnisearch-plugins.php b/plugins/jetpack/modules/omnisearch/omnisearch-plugins.php
index 76df6081..c876e902 100644
--- a/plugins/jetpack/modules/omnisearch/omnisearch-plugins.php
+++ b/plugins/jetpack/modules/omnisearch/omnisearch-plugins.php
@@ -36,6 +36,7 @@ class Jetpack_Omnisearch_Plugins extends WP_Plugin_Install_List_Table {
ob_start();
$this->prepare_items();
+ /** This action is documented in modules/omnisearch/omnisearch-core.php */
$num_results = intval( $num_results ) ? intval( $num_results ) : apply_filters( 'omnisearch_num_results', 5 );
$this->items = array_slice( $this->items, 0, $num_results );
remove_action( 'install_plugins_table_header', 'install_search_form' );
@@ -58,4 +59,3 @@ class Jetpack_Omnisearch_Plugins extends WP_Plugin_Install_List_Table {
function pagination( $which ) {}
}
-
diff --git a/plugins/jetpack/modules/omnisearch/omnisearch-posts.php b/plugins/jetpack/modules/omnisearch/omnisearch-posts.php
index 55c875a2..7193f1ae 100644
--- a/plugins/jetpack/modules/omnisearch/omnisearch-posts.php
+++ b/plugins/jetpack/modules/omnisearch/omnisearch-posts.php
@@ -4,7 +4,7 @@ if( ! class_exists( 'WP_List_Table' ) )
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
class Jetpack_Omnisearch_Posts extends WP_List_Table {
- var $post_type = 'post',
+ public $post_type = 'post',
$post_type_object;
function __construct( $post_type = 'post' ) {
@@ -30,6 +30,7 @@ class Jetpack_Omnisearch_Posts extends WP_List_Table {
$search_link = sprintf( ' <a href="%s" class="add-new-h2">%s</a>', $search_url, esc_html( $this->post_type_obj->labels->search_items ) );
$html = '<h2>' . esc_html( $this->post_type_obj->labels->name ) . $search_link .'</h2>';
+ /** This action is documented in modules/omnisearch/omnisearch-core.php */
$num_results = apply_filters( 'omnisearch_num_results', 5 );
$this->posts = get_posts( array(
@@ -71,13 +72,16 @@ class Jetpack_Omnisearch_Posts extends WP_List_Table {
function column_post_title( $post ) {
$actions = array();
if ( current_user_can( $this->post_type_obj->cap->edit_post, $post ) ) {
+ $post_title = sprintf( '<a href="%s">%s</a>', esc_url( get_edit_post_link( $post->ID ) ), wptexturize( $post->post_title ) );
$actions['edit'] = sprintf( '<a href="%s">%s</a>', esc_url( get_edit_post_link( $post->ID ) ), esc_html( $this->post_type_obj->labels->edit_item ) );
+ } else {
+ $post_title = wptexturize( $post->post_title );
}
if ( current_user_can( $this->post_type_obj->cap->delete_post, $post ) ) {
$actions['delete'] = sprintf( '<a href="%s">%s</a>', esc_url( get_delete_post_link( $post->ID ) ), esc_html__('Trash', 'jetpack') );
}
$actions['view'] = sprintf( '<a href="%s">%s</a>', esc_url( get_permalink( $post->ID ) ), esc_html( $this->post_type_obj->labels->view_item ) );
- return wptexturize( $post->post_title ) . $this->row_actions( $actions );
+ return $post_title . $this->row_actions( $actions );
}
function column_date( $post ) {
@@ -131,4 +135,3 @@ class Jetpack_Omnisearch_Posts extends WP_List_Table {
}
}
}
-
diff --git a/plugins/jetpack/modules/photon.php b/plugins/jetpack/modules/photon.php
index d2e9c934..cddc14e9 100644
--- a/plugins/jetpack/modules/photon.php
+++ b/plugins/jetpack/modules/photon.php
@@ -1,15 +1,16 @@
<?php
/**
* Module Name: Photon
- * Module Description: Accelerate your site by loading images from the WordPress.com CDN.
- * Jumpstart Description: mirrors and serves your images from our free and fast image CDN, improving your site’s performance with no additional load on your servers.
+ * Module Description: Speed up images and photos.
+ * Jumpstart Description: Mirrors and serves your images from our free and fast image CDN, improving your site’s performance with no additional load on your servers.
* Sort Order: 25
* Recommendation Order: 1
* First Introduced: 2.0
* Requires Connection: Yes
* Auto Activate: No
* Module Tags: Photos and Videos, Appearance, Recommended
- * Feature: Recommended, Jumpstart
+ * Feature: Recommended, Jumpstart, Performance-Security
+ * Additional Search Queries: photon, image, cdn, performance, speed
*/
Jetpack::dns_prefetch( array(
@@ -18,4 +19,4 @@ Jetpack::dns_prefetch( array(
'//i2.wp.com',
) );
-Jetpack_Photon::instance(); \ No newline at end of file
+Jetpack_Photon::instance();
diff --git a/plugins/jetpack/modules/post-by-email.php b/plugins/jetpack/modules/post-by-email.php
index 2184cefb..fff3f186 100644
--- a/plugins/jetpack/modules/post-by-email.php
+++ b/plugins/jetpack/modules/post-by-email.php
@@ -8,19 +8,10 @@
* Requires Connection: Yes
* Auto Activate: Yes
* Module Tags: Writing
+ * Additional Search Queries: post by email, email
*/
add_action( 'jetpack_modules_loaded', array( 'Jetpack_Post_By_Email', 'init' ) );
-
-Jetpack_Sync::sync_options( __FILE__,
- 'large_size_w',
- 'large_size_h',
- 'thumbnail_size_w',
- 'thumbnail_size_h',
- 'medium_size_w',
- 'medium_size_h'
-);
-
add_action( 'jetpack_activate_module_post-by-email', array( 'Jetpack_Post_By_Email', 'module_toggle' ) );
add_action( 'jetpack_deactivate_module_post-by-email', array( 'Jetpack_Post_By_Email', 'module_toggle' ) );
diff --git a/plugins/jetpack/modules/protect.php b/plugins/jetpack/modules/protect.php
index af0759d2..400328f7 100644
--- a/plugins/jetpack/modules/protect.php
+++ b/plugins/jetpack/modules/protect.php
@@ -1,14 +1,15 @@
<?php
/**
* Module Name: Protect
- * Module Description: Adds brute force protection to your login page. Formerly BruteProtect.
+ * Module Description: Prevent brute force attacks.
* Sort Order: 1
* Recommendation Order: 4
* First Introduced: 3.4
* Requires Connection: Yes
* Auto Activate: Yes
* Module Tags: Recommended
- * Feature: Recommended
+ * Feature: Recommended, Performance-Security
+ * Additional Search Queries: security, secure, protection, botnet, brute force, protect, login
*/
include_once JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php';
@@ -16,17 +17,18 @@ include_once JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php';
class Jetpack_Protect_Module {
private static $__instance = null;
- public $api_key;
- public $api_key_error;
- public $whitelist;
- public $whitelist_error;
- public $whitelist_saved;
+ public $api_key;
+ public $api_key_error;
+ public $whitelist;
+ public $whitelist_error;
+ public $whitelist_saved;
private $user_ip;
private $local_host;
private $api_endpoint;
- public $last_request;
- public $last_response_raw;
- public $last_response;
+ public $last_request;
+ public $last_response_raw;
+ public $last_response;
+ private $block_login_with_math;
/**
* Singleton implementation
@@ -34,8 +36,9 @@ class Jetpack_Protect_Module {
* @return object
*/
public static function instance() {
- if ( ! is_a( self::$__instance, 'Jetpack_Protect_Module' ) )
+ if ( ! is_a( self::$__instance, 'Jetpack_Protect_Module' ) ) {
self::$__instance = new Jetpack_Protect_Module();
+ }
return self::$__instance;
}
@@ -44,39 +47,144 @@ class Jetpack_Protect_Module {
* Registers actions
*/
private function __construct() {
- add_action( 'jetpack_activate_module_protect', array( $this, 'on_activation' ) );
- add_action( 'init', array( $this, 'maybe_get_protect_key' ) );
- add_action( 'jetpack_modules_loaded', array( $this, 'modules_loaded' ) );
- add_action( 'login_head', array( $this, 'check_use_math' ) );
- add_filter( 'authenticate', array( $this, 'check_preauth' ), 10, 3 );
- add_action( 'wp_login', array( $this, 'log_successful_login' ), 10, 2 );
- add_action( 'wp_login_failed', array( $this, 'log_failed_attempt' ) );
+ add_action( 'jetpack_activate_module_protect', array ( $this, 'on_activation' ) );
+ add_action( 'jetpack_deactivate_module_protect', array ( $this, 'on_deactivation' ) );
+ add_action( 'init', array ( $this, 'maybe_get_protect_key' ) );
+ add_action( 'jetpack_modules_loaded', array ( $this, 'modules_loaded' ) );
+ add_action( 'login_head', array ( $this, 'check_use_math' ) );
+ add_filter( 'authenticate', array ( $this, 'check_preauth' ), 10, 3 );
+ add_action( 'wp_login', array ( $this, 'log_successful_login' ), 10, 2 );
+ add_action( 'wp_login_failed', array ( $this, 'log_failed_attempt' ) );
+ add_action( 'admin_init', array ( $this, 'maybe_update_headers' ) );
+ add_action( 'admin_init', array ( $this, 'maybe_display_security_warning' ) );
// This is a backup in case $pagenow fails for some reason
- add_action( 'login_head', array( $this, 'check_login_ability' ) );
+ add_action( 'login_head', array ( $this, 'check_login_ability' ) );
// Runs a script every day to clean up expired transients so they don't
// clog up our users' databases
require_once( JETPACK__PLUGIN_DIR . '/modules/protect/transient-cleanup.php' );
+
+ //this should move into on_activation in 3.8, but, for now, we want to make sure all sites get this option set
+ if ( is_multisite() && is_main_site() ) {
+ update_site_option( 'jetpack_protect_active', 1 );
+ }
+
+
}
/**
* On module activation, try to get an api key
*/
public function on_activation() {
- update_site_option('jetpack_protect_activating', 'activating');
+ update_site_option( 'jetpack_protect_activating', 'activating' );
+
// Get BruteProtect's counter number
Jetpack_Protect_Module::protect_call( 'check_key' );
}
+ /**
+ * On module deactivation, unset protect_active
+ */
+ public function on_deactivation() {
+ if ( is_multisite() && is_main_site() ) {
+ update_site_option( 'jetpack_protect_active', 0 );
+ }
+ }
+
public function maybe_get_protect_key() {
- if ( get_site_option('jetpack_protect_activating', false ) && ! get_site_option('jetpack_protect_key', false ) ) {
+ if ( get_site_option( 'jetpack_protect_activating', false ) && ! get_site_option( 'jetpack_protect_key', false ) ) {
$this->get_protect_key();
delete_site_option( 'jetpack_protect_activating' );
}
}
/**
+ * Sends a "check_key" API call once a day. This call allows us to track IP-related
+ * headers for this server via the Protect API, in order to better identify the source
+ * IP for login attempts
+ */
+ public function maybe_update_headers( $force = false ) {
+ $updated_recently = $this->get_transient( 'jpp_headers_updated_recently' );
+
+ if ( ! $force ) {
+ if ( isset( $_GET['protect_update_headers'] ) ) {
+ $force = true;
+ }
+ }
+
+ // check that current user is admin so we prevent a lower level user from adding
+ // a trusted header, allowing them to brute force an admin account
+ if ( ( $updated_recently && ! $force ) || ! current_user_can( 'update_plugins' ) ) {
+ return;
+ }
+
+ $response = Jetpack_Protect_Module::protect_call( 'check_key' );
+ $this->set_transient( 'jpp_headers_updated_recently', 1, DAY_IN_SECONDS );
+
+ if ( isset( $response['msg'] ) && $response['msg'] ) {
+ update_site_option( 'trusted_ip_header', json_decode( $response['msg'] ) );
+ }
+
+ }
+
+ public function maybe_display_security_warning() {
+ if ( is_multisite() && current_user_can( 'manage_network' ) ) {
+ if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
+ }
+
+ if ( ! is_plugin_active_for_network( 'jetpack/jetpack.php' ) ) {
+ add_action( 'load-index.php', array ( $this, 'prepare_jetpack_protect_multisite_notice' ) );
+ }
+ }
+ }
+
+ public function prepare_jetpack_protect_multisite_notice() {
+ add_action( 'admin_print_styles', array ( $this, 'admin_banner_styles' ) );
+ add_action( 'admin_notices', array ( $this, 'admin_jetpack_manage_notice' ) );
+ }
+
+ public function admin_banner_styles() {
+ global $wp_styles;
+
+ $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
+
+ wp_enqueue_style( 'jetpack', plugins_url( "css/jetpack-banners{$min}.css", JETPACK__PLUGIN_FILE ), false, JETPACK__VERSION );
+ $wp_styles->add_data( 'jetpack', 'rtl', true );
+ }
+
+ public function admin_jetpack_manage_notice() {
+
+ $dismissed = get_site_option( 'jetpack_dismissed_protect_multisite_banner' );
+
+ if ( $dismissed ) {
+ return;
+ }
+
+ $referer = '&_wp_http_referer=' . add_query_arg( '_wp_http_referer', null );
+ $opt_out_url = wp_nonce_url( Jetpack::admin_url( 'jetpack-notice=jetpack-protect-multisite-opt-out' . $referer ), 'jetpack_protect_multisite_banner_opt_out' );
+
+ ?>
+ <div id="message" class="updated jetpack-message jp-banner is-opt-in protect-error"
+ style="display:block !important;">
+ <a class="jp-banner__dismiss" href="<?php echo esc_url( $opt_out_url ); ?>"
+ title="<?php esc_attr_e( 'Dismiss this notice.', 'jetpack' ); ?>"></a>
+
+ <div class="jp-banner__content">
+ <h2><?php esc_html_e( 'Protect cannot keep your site secure.', 'jetpack' ); ?></h2>
+
+ <p><?php printf( __( 'Thanks for activating Protect! To start protecting your site, please network activate Jetpack on your Multisite installation and activate Protect on your primary site. Due to the way logins are handled on WordPress Multisite, Jetpack must be network-enabled in order for Protect to work properly. <a href="%s" target="_blank">Learn More</a>', 'jetpack' ), 'http://jetpack.me/support/multisite-protect' ); ?></p>
+ </div>
+ <div class="jp-banner__action-container is-opt-in">
+ <a href="<?php echo network_admin_url( 'plugins.php' ); ?>" class="jp-banner__button"
+ id="wpcom-connect"><?php _e( 'View Network Admin', 'jetpack' ); ?></a>
+ </div>
+ </div>
+ <?php
+ }
+
+ /**
* Request an api key from wordpress.com
*
* @return bool | string
@@ -89,10 +197,11 @@ class Jetpack_Protect_Module {
// the protect api key is linked to the main blog id - instruct the user to connect their main blog
if ( ! $protect_blog_id ) {
$this->api_key_error = __( 'Your main blog is not connected to WordPress.com. Please connect to get an API key.', 'jetpack' );
+
return false;
}
- $request = array(
+ $request = array (
'jetpack_blog_id' => $protect_blog_id,
'bruteprotect_api_key' => get_site_option( 'bruteprotect_api_key' ),
'multisite' => '0',
@@ -101,7 +210,7 @@ class Jetpack_Protect_Module {
// Send the number of blogs on the network if we are on multisite
if ( is_multisite() ) {
$request['multisite'] = get_blog_count();
- if( ! $request['multisite'] ) {
+ if ( ! $request['multisite'] ) {
global $wpdb;
$request['multisite'] = $wpdb->get_var( "SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0'" );
}
@@ -109,16 +218,17 @@ class Jetpack_Protect_Module {
// Request the key
Jetpack::load_xml_rpc_client();
- $xml = new Jetpack_IXR_Client( array(
+ $xml = new Jetpack_IXR_Client( array (
'user_id' => get_current_user_id()
) );
$xml->query( 'jetpack.protect.requestKey', $request );
// Hmm, can't talk to wordpress.com
if ( $xml->isError() ) {
- $code = $xml->getErrorCode();
- $message = $xml->getErrorMessage();
- $this->api_key_error = sprintf( __( 'Error connecting to WordPress.com. Code: %1$s, %2$s', 'jetpack'), $code, $message );
+ $code = $xml->getErrorCode();
+ $message = $xml->getErrorMessage();
+ $this->api_key_error = sprintf( __( 'Error connecting to WordPress.com. Code: %1$s, %2$s', 'jetpack' ), $code, $message );
+
return false;
}
@@ -127,12 +237,14 @@ class Jetpack_Protect_Module {
// Hmm. Can't talk to the protect servers ( api.bruteprotect.com )
if ( ! isset( $response['data'] ) ) {
$this->api_key_error = __( 'No reply from Jetpack servers', 'jetpack' );
+
return false;
}
// There was an issue generating the key
if ( empty( $response['success'] ) ) {
$this->api_key_error = $response['data'];
+
return false;
}
@@ -146,6 +258,7 @@ class Jetpack_Protect_Module {
$key = $response['data'];
update_site_option( 'jetpack_protect_key', $key );
+
return $key;
}
@@ -160,20 +273,22 @@ class Jetpack_Protect_Module {
/**
* Fires before every failed login attempt.
*
+ * @module protect
+ *
* @since 3.4.0
*
- * @param string jetpack_protect_get_ip IP stored by Jetpack Protect.
+ * @param string jetpack_protect_get_ip IP stored by Protect.
*/
do_action( 'jpp_log_failed_attempt', jetpack_protect_get_ip() );
- if( isset( $_COOKIE['jpp_math_pass'] ) ) {
+ if ( isset( $_COOKIE['jpp_math_pass'] ) ) {
$transient = $this->get_transient( 'jpp_math_pass_' . $_COOKIE['jpp_math_pass'] );
$transient--;
- if( !$transient || $transient < 1 ) {
+ if ( ! $transient || $transient < 1 ) {
$this->delete_transient( 'jpp_math_pass_' . $_COOKIE['jpp_math_pass'] );
- setcookie('jpp_math_pass', 0, time() - DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN, false);
+ setcookie( 'jpp_math_pass', 0, time() - DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN, false );
} else {
$this->set_transient( 'jpp_math_pass_' . $_COOKIE['jpp_math_pass'], $transient, DAY_IN_SECONDS );
}
@@ -187,9 +302,9 @@ class Jetpack_Protect_Module {
*/
public function modules_loaded() {
Jetpack::enable_module_configurable( __FILE__ );
- Jetpack::module_configuration_load( __FILE__, array( $this, 'configuration_load' ) );
- Jetpack::module_configuration_head( __FILE__, array( $this, 'configuration_head' ) );
- Jetpack::module_configuration_screen( __FILE__, array( $this, 'configuration_screen' ) );
+ Jetpack::module_configuration_load( __FILE__, array ( $this, 'configuration_load' ) );
+ Jetpack::module_configuration_head( __FILE__, array ( $this, 'configuration_head' ) );
+ Jetpack::module_configuration_screen( __FILE__, array ( $this, 'configuration_screen' ) );
}
/**
@@ -198,8 +313,7 @@ class Jetpack_Protect_Module {
* to the ip address whitelist
*/
public function log_successful_login( $user_login, $user ) {
- // TODO: update whitelist
- $this->protect_call( 'successful_login', array( 'roles' => $user->roles ) );
+ $this->protect_call( 'successful_login', array ( 'roles' => $user->roles ) );
}
@@ -215,11 +329,14 @@ class Jetpack_Protect_Module {
* @return string $user
*/
function check_preauth( $user = 'Not Used By Protect', $username = 'Not Used By Protect', $password = 'Not Used By Protect' ) {
+ $allow_login = $this->check_login_ability( true );
+ $use_math = $this->get_transient( 'brute_use_math' );
- $this->check_login_ability( true );
- $use_math = $this->get_transient( 'brute_use_math' );
+ if ( ! $allow_login ) {
+ $this->block_with_math();
+ }
- if ( 1 == $use_math && isset( $_POST['log'] ) ) {
+ if ( ( 1 == $use_math || 1 == $this->block_login_with_math ) && isset( $_POST['log'] ) ) {
include_once dirname( __FILE__ ) . '/protect/math-fallback.php';
Jetpack_Protect_Math_Authenticate::math_authenticate();
}
@@ -233,7 +350,7 @@ class Jetpack_Protect_Module {
* @return string
*/
function get_headers() {
- $ip_related_headers = array(
+ $ip_related_headers = array (
'GD_PHP_HANDLER',
'HTTP_AKAMAI_ORIGIN_HOP',
'HTTP_CF_CONNECTING_IP',
@@ -253,7 +370,7 @@ class Jetpack_Protect_Module {
'REMOTE_ADDR'
);
- foreach( $ip_related_headers as $header) {
+ foreach ( $ip_related_headers as $header ) {
if ( isset( $_SERVER[ $header ] ) ) {
$output[ $header ] = $_SERVER[ $header ];
}
@@ -275,7 +392,11 @@ class Jetpack_Protect_Module {
return true;
}
- $whitelist = get_site_option( 'jetpack_protect_whitelist', array() );
+ $whitelist = jetpack_protect_get_local_whitelist();
+
+ if ( is_multisite() ) {
+ $whitelist = array_merge( $whitelist, get_site_option( 'jetpack_protect_global_whitelist', array () ) );
+ }
if ( ! empty( $whitelist ) ) :
foreach ( $whitelist as $item ) :
@@ -285,7 +406,7 @@ class Jetpack_Protect_Module {
}
if ( $item->range && isset( $item->range_low ) && isset( $item->range_high ) ) {
- if ( $this->ip_address_is_in_range( $ip, $item->range_low, $item->range_high ) ) {
+ if ( jetpack_protect_ip_address_is_in_range( $ip, $item->range_low, $item->range_high ) ) {
return true;
}
}
@@ -296,60 +417,23 @@ class Jetpack_Protect_Module {
}
/**
- * Checks that a given IP address is within a given low - high range.
- * Servers that support inet_pton will use that function to convert the ip to number,
- * while other servers will use ip2long.
- *
- * NOTE: servers that do not support inet_pton cannot support ipv6.
- *
- * @param $ip
- * @param $range_low
- * @param $range_high
- *
- * @return bool
- */
- function ip_address_is_in_range( $ip, $range_low, $range_high ) {
- // inet_pton will give us binary string of an ipv4 or ipv6
- // we can then use strcmp to see if the address is in range
- if ( function_exists( 'inet_pton' ) ) {
- $ip_num = inet_pton( $ip );
- $ip_low = inet_pton( $range_low );
- $ip_high = inet_pton( $range_high );
- if ( $ip_num && $ip_low && $ip_high && strcmp( $ip_num, $ip_low ) >= 0 && strcmp( $ip_num, $ip_high ) <= 0 ) {
- return true;
- }
- // ip2long will give us an integer of an ipv4 address only. it will produce FALSE for ipv6
- } else {
- $ip_num = ip2long( $ip );
- $ip_low = ip2long( $range_low );
- $ip_high = ip2long( $range_high );
- if ( $ip_num && $ip_low && $ip_high && $ip_num >= $ip_low && $ip_num <= $ip_high ) {
- return true;
- }
- }
-
- return false;
-
- }
-
- /**
* Checks the status for a given IP. API results are cached as transients
*
* @param bool $preauth Whether or not we are checking prior to authorization
*
- * @return bool Either returns true, fires $this->kill_login, or includes a math fallback
+ * @return bool Either returns true, fires $this->kill_login, or includes a math fallback and returns false
*/
function check_login_ability( $preauth = false ) {
- $headers = $this->get_headers();
- $header_hash = md5( json_encode( $headers ) );
- $transient_name = 'jpp_li_' . $header_hash;
- $transient_value = $this->get_transient( $transient_name );
- $ip = jetpack_protect_get_ip();
+ $headers = $this->get_headers();
+ $header_hash = md5( json_encode( $headers ) );
+ $transient_name = 'jpp_li_' . $header_hash;
+ $transient_value = $this->get_transient( $transient_name );
+ $ip = jetpack_protect_get_ip();
- if( jetpack_protect_ip_is_private( $ip ) ) {
+ if ( jetpack_protect_ip_is_private( $ip ) ) {
return true;
}
-
+
if ( $this->ip_is_whitelisted( $ip ) ) {
return true;
}
@@ -360,7 +444,10 @@ class Jetpack_Protect_Module {
}
if ( isset( $transient_value ) && 'blocked' == $transient_value['status'] ) {
- // There is a current block -- prevent login
+ $this->block_with_math();
+ }
+
+ if ( isset( $transient_value ) && 'blocked-hard' == $transient_value['status'] ) {
$this->kill_login();
}
@@ -370,15 +457,56 @@ class Jetpack_Protect_Module {
if ( isset( $response['math'] ) && ! function_exists( 'brute_math_authenticate' ) ) {
include_once dirname( __FILE__ ) . '/protect/math-fallback.php';
+ new Jetpack_Protect_Math_Authenticate;
+
+ return false;
}
if ( 'blocked' == $response['status'] ) {
+ $this->block_with_math();
+ }
+
+ if ( 'blocked-hard' == $response['status'] ) {
$this->kill_login();
}
return true;
}
+ function block_with_math() {
+ /**
+ * By default, Protect will allow a user who has been blocked for too
+ * many failed logins to start answering math questions to continue logging in
+ *
+ * For added security, you can disable this.
+ *
+ * @module protect
+ *
+ * @since 3.6.0
+ *
+ * @param bool Whether to allow math for blocked users or not.
+ */
+
+ $this->block_login_with_math = 1;
+ /**
+ * Allow Math fallback for blocked IPs.
+ *
+ * @module protect
+ *
+ * @since 3.6.0
+ *
+ * @param bool true Should we fallback to the Math questions when an IP is blocked. Default to true.
+ */
+ $allow_math_fallback_on_fail = apply_filters( 'jpp_use_captcha_when_blocked', true );
+ if ( ! $allow_math_fallback_on_fail ) {
+ $this->kill_login();
+ }
+ include_once dirname( __FILE__ ) . '/protect/math-fallback.php';
+ new Jetpack_Protect_Math_Authenticate;
+
+ return false;
+ }
+
/*
* Kill a login attempt
*/
@@ -387,17 +515,25 @@ class Jetpack_Protect_Module {
/**
* Fires before every killed login.
*
+ * @module protect
+ *
* @since 3.4.0
*
- * @param string $ip IP flagged by Jetpack Protect.
+ * @param string $ip IP flagged by Protect.
*/
do_action( 'jpp_kill_login', $ip );
$help_url = 'http://jetpack.me/support/security/';
+ $die_string = sprintf( __( 'Your IP (%1$s) has been flagged for potential security violations. <a href="%2$s">Find out more...</a>', 'jetpack' ), str_replace( 'http://', '', esc_url( 'http://' . $ip ) ), esc_url( $help_url ) );
+
+ if( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) {
+ $die_string = sprintf( __( 'Your IP (%1$s) has been flagged for potential security violations.', 'jetpack' ), str_replace( 'http://', '', esc_url( 'http://' . $ip ) ) );
+ }
+
wp_die(
- sprintf( __( 'Your IP (%1$s) has been flagged for potential security violations. <a href="%2$s">Find out more...</a>', 'jetpack' ), str_replace( 'http://', '', esc_url( 'http://' . $ip ) ), esc_url( $help_url ) ),
+ $die_string,
__( 'Login Blocked by Jetpack', 'jetpack' ),
- array( 'response' => 403 )
+ array ( 'response' => 403 )
);
}
@@ -418,11 +554,11 @@ class Jetpack_Protect_Module {
public function configuration_load() {
if ( isset( $_POST['action'] ) && $_POST['action'] == 'jetpack_protect_save_whitelist' && wp_verify_nonce( $_POST['_wpnonce'], 'jetpack-protect' ) ) {
- $whitelist = str_replace( ' ', '', $_POST['whitelist'] );
- $whitelist = explode( PHP_EOL, $whitelist);
- $result = jetpack_protect_save_whitelist( $whitelist );
- $this->whitelist_saved = ! is_wp_error( $result );
- $this->whitelist_error = is_wp_error( $result );
+ $whitelist = str_replace( ' ', '', $_POST['whitelist'] );
+ $whitelist = explode( PHP_EOL, $whitelist );
+ $result = jetpack_protect_save_whitelist( $whitelist );
+ $this->whitelist_saved = ! is_wp_error( $result );
+ $this->whitelist_error = is_wp_error( $result );
}
if ( isset( $_POST['action'] ) && 'get_protect_key' == $_POST['action'] && wp_verify_nonce( $_POST['_wpnonce'], 'jetpack-protect' ) ) {
@@ -434,9 +570,8 @@ class Jetpack_Protect_Module {
}
}
- $this->api_key = get_site_option( 'jetpack_protect_key', false );
- $this->whitelist = get_site_option( 'jetpack_protect_whitelist', array() );
- $this->user_ip = jetpack_protect_get_ip();
+ $this->api_key = get_site_option( 'jetpack_protect_key', false );
+ $this->user_ip = jetpack_protect_get_ip();
}
public function configuration_head() {
@@ -456,7 +591,7 @@ class Jetpack_Protect_Module {
* @return int
*/
public function get_main_blog_id() {
- if( ! is_multisite() ) {
+ if ( ! is_multisite() ) {
return false;
}
@@ -479,6 +614,7 @@ class Jetpack_Protect_Module {
} else {
$id = Jetpack::get_option( 'id' );
}
+
return $id;
}
@@ -491,16 +627,17 @@ class Jetpack_Protect_Module {
if ( isset( $response['error'] ) ) {
- if ( $response[ 'error' ] == 'Invalid API Key' ) {
+ if ( $response['error'] == 'Invalid API Key' ) {
$this->api_key_error = __( 'Your API key is invalid', 'jetpack' );
}
- if ( $response[ 'error' ] == 'API Key Required' ) {
+ if ( $response['error'] == 'API Key Required' ) {
$this->api_key_error = __( 'No API key', 'jetpack' );
}
}
$this->api_key_error = __( 'There was an error contacting Jetpack servers.', 'jetpack' );
+
return false;
}
@@ -508,11 +645,11 @@ class Jetpack_Protect_Module {
* Calls over to the api using wp_remote_post
*
* @param string $action 'check_ip', 'check_key', or 'failed_attempt'
- * @param array $request Any custom data to post to the api
+ * @param array $request Any custom data to post to the api
*
* @return array
*/
- function protect_call( $action = 'check_ip', $request = array() ) {
+ function protect_call( $action = 'check_ip', $request = array () ) {
global $wp_version, $wpdb, $current_user;
$api_key = get_site_option( 'jetpack_protect_key' );
@@ -532,7 +669,7 @@ class Jetpack_Protect_Module {
$request['multisite'] = get_blog_count();
}
- $args = array(
+ $args = array (
'body' => $request,
'user-agent' => $user_agent,
'httpversion' => '1.0',
@@ -550,7 +687,7 @@ class Jetpack_Protect_Module {
$response = json_decode( $response_json['body'], true );
}
- if( isset( $response['blocked_attempts'] ) && $response['blocked_attempts'] ) {
+ if ( isset( $response['blocked_attempts'] ) && $response['blocked_attempts'] ) {
update_site_option( 'jetpack_protect_blocked_attempts', $response['blocked_attempts'] );
}
@@ -574,7 +711,6 @@ class Jetpack_Protect_Module {
}
-
/**
* Wrapper for WordPress set_transient function, our version sets
* the transient on the main site in the network if this is a multisite network
@@ -583,21 +719,23 @@ class Jetpack_Protect_Module {
* sitewide transients are always autoloaded
* https://core.trac.wordpress.org/ticket/22846
*
- * @param string $transient Transient name. Expected to not be SQL-escaped. Must be
+ * @param string $transient Transient name. Expected to not be SQL-escaped. Must be
* 45 characters or fewer in length.
- * @param mixed $value Transient value. Must be serializable if non-scalar.
+ * @param mixed $value Transient value. Must be serializable if non-scalar.
* Expected to not be SQL-escaped.
- * @param int $expiration Optional. Time until expiration in seconds. Default 0.
+ * @param int $expiration Optional. Time until expiration in seconds. Default 0.
*
- * @return bool False if value was not set and true if value was set.
+ * @return bool False if value was not set and true if value was set.
*/
function set_transient( $transient, $value, $expiration ) {
if ( is_multisite() && ! is_main_site() ) {
switch_to_blog( $this->get_main_blog_id() );
$return = set_transient( $transient, $value, $expiration );
restore_current_blog();
+
return $return;
}
+
return set_transient( $transient, $value, $expiration );
}
@@ -605,16 +743,19 @@ class Jetpack_Protect_Module {
* Wrapper for WordPress delete_transient function, our version deletes
* the transient on the main site in the network if this is a multisite network
*
- * @param string $transient Transient name. Expected to not be SQL-escaped.
- * @return bool true if successful, false otherwise
+ * @param string $transient Transient name. Expected to not be SQL-escaped.
+ *
+ * @return bool true if successful, false otherwise
*/
function delete_transient( $transient ) {
if ( is_multisite() && ! is_main_site() ) {
switch_to_blog( $this->get_main_blog_id() );
$return = delete_transient( $transient );
restore_current_blog();
+
return $return;
}
+
return delete_transient( $transient );
}
@@ -623,15 +764,18 @@ class Jetpack_Protect_Module {
* the transient on the main site in the network if this is a multisite network
*
* @param string $transient Transient name. Expected to not be SQL-escaped.
- * @return mixed Value of transient.
+ *
+ * @return mixed Value of transient.
*/
function get_transient( $transient ) {
if ( is_multisite() && ! is_main_site() ) {
switch_to_blog( $this->get_main_blog_id() );
$return = get_transient( $transient );
restore_current_blog();
+
return $return;
}
+
return get_transient( $transient );
}
@@ -663,9 +807,9 @@ class Jetpack_Protect_Module {
// If we still don't have the site_url, get it
if ( ! $domain ) {
- $uri = get_site_url( 1 );
+ $uri = get_site_url( 1 );
$uridata = parse_url( $uri );
- $domain = $uridata['host'];
+ $domain = $uridata['host'];
}
$this->local_host = $domain;
@@ -678,5 +822,5 @@ class Jetpack_Protect_Module {
Jetpack_Protect_Module::instance();
if ( isset( $pagenow ) && 'wp-login.php' == $pagenow ) {
- Jetpack_Protect_Module::check_login_ability();
+ Jetpack_Protect_Module::check_login_ability();
}
diff --git a/plugins/jetpack/modules/protect/config-ui.php b/plugins/jetpack/modules/protect/config-ui.php
index ff9b2569..46ee37f9 100644
--- a/plugins/jetpack/modules/protect/config-ui.php
+++ b/plugins/jetpack/modules/protect/config-ui.php
@@ -12,7 +12,7 @@
<?php wp_nonce_field( 'jetpack-protect' ); ?>
<input type='hidden' name='action' value='get_protect_key' />
<p class="submit">
- <?php _e( 'An API key is needed for Jetpack Protect.', 'jetpack' ); ?>
+ <?php _e( 'An API key is needed for Protect.', 'jetpack' ); ?>
<br /><br /><input type='submit' class='button-primary' value='<?php echo esc_attr( __( 'Get an API Key', 'jetpack' ) ); ?>' />
</p>
</form>
@@ -22,7 +22,7 @@
<?php
global $current_user;
- $whitelist = jetpack_protect_format_whitelist( $this->whitelist ); // todo remove 'local' from schema when we merge next iteration on calypso
+ $whitelist = jetpack_protect_format_whitelist();
?>
<div class="protect-whitelist">
@@ -30,17 +30,30 @@
<h3><?php _e( 'Whitelist Management', 'jetpack' ); ?></h3>
<?php if( ! empty( $this->whitelist_error ) ) : ?>
- <p class="error"><?php _e('One of your IP addresses was not valid.', 'jetpack'); ?></p>
+ <p class="error"><?php _e( 'One of your IP addresses was not valid.', 'jetpack' ); ?></p>
<?php endif; ?>
<?php if( $this->whitelist_saved === true ) : ?>
- <p class="success"><?php _e('Whitelist saved.', 'jetpack'); ?></p>
+ <p class="success"><?php _e( 'Whitelist saved.', 'jetpack' ); ?></p>
<?php endif; ?>
<p>
- <?php _e( 'Whitelisting an IP address prevents it from ever being blocked by Jetpack.', 'jetpack' ); ?><br />
- <strong><?php printf( __( 'Your current IP: %s', 'jetpack' ), $this->user_ip ); ?></strong>
+ <?php _e( 'Whitelisting an IP address prevents it from ever being blocked by Jetpack. ', 'jetpack' ); ?><br />
+
+ <?php if ( is_multisite() && current_user_can( 'manage_network' ) ) : ?>
+ <a href="<?php echo network_admin_url( 'admin.php?page=jetpack-settings' ); ?>">
+ <?php _e( 'You can manage your network-wide whitelist via the network admin.', 'jetpack' ); ?>
+ </a><br />
+ <?php endif; ?>
+
+ <small>
+ <?php _e( 'Make sure to add your most frequently used IP addresses as they can change between your home, office or other locations. Removing an IP address from the list below will remove it from your whitelist.', 'jetpack' ); ?>
+ </small>
</p>
+
+
+
+ <p><strong><?php printf( __( 'Your current IP: %s', 'jetpack' ), $this->user_ip ); ?></strong></p>
<?php wp_nonce_field( 'jetpack-protect' ); ?>
<input type='hidden' name='action' value='jetpack_protect_save_whitelist' />
<textarea name="whitelist"><?php echo implode( PHP_EOL, $whitelist['local'] ); ?></textarea>
diff --git a/plugins/jetpack/modules/protect/math-fallback.php b/plugins/jetpack/modules/protect/math-fallback.php
index ce99b699..8c0b1ce9 100644
--- a/plugins/jetpack/modules/protect/math-fallback.php
+++ b/plugins/jetpack/modules/protect/math-fallback.php
@@ -6,8 +6,18 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
*/
class Jetpack_Protect_Math_Authenticate {
+ static $loaded;
+
function __construct() {
+
+ if ( self::$loaded ) {
+ return;
+ }
+
+ self::$loaded = 1;
+
add_action( 'login_form', array( $this, 'math_form' ) );
+
if( isset( $_POST[ 'jetpack_protect_process_math_form' ] ) ) {
add_action( 'init', array( $this, 'process_generate_math_page' ) );
}
@@ -37,7 +47,11 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
if ( ! $correct_ans || !$_POST['jetpack_protect_num'] ) {
Jetpack_Protect_Math_Authenticate::generate_math_page();
} elseif ( $salted_ans != $correct_ans ) {
- wp_die( __( '<strong>You failed to correctly answer the math problem.</strong> This is used to combat spam when the Jetpack Protect API is unavailable. Please use your browser\'s back button to return to the login form, press the "refresh" button to generate a new math problem, and try to log in again.', 'jetpack' ) );
+ wp_die(
+ __( '<strong>You failed to correctly answer the math problem.</strong> This is used to combat spam when the Protect API is unavailable. Please use your browser\'s back button to return to the login form, press the "refresh" button to generate a new math problem, and try to log in again.', 'jetpack' ),
+ '',
+ 401
+ );
} else {
return true;
}
@@ -61,10 +75,10 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
<h3><?php _e( 'Your answer was incorrect, please try again.', 'jetpack' ); ?></h3>
<?php endif ?>
- <form action="<?php echo home_url(); ?>" method="post" accept-charset="utf-8">
+ <form action="<?php echo wp_login_url(); ?>" method="post" accept-charset="utf-8">
<?php Jetpack_Protect_Math_Authenticate::math_form(); ?>
<input type="hidden" name="jetpack_protect_process_math_form" value="1" id="jetpack_protect_process_math_form" />
- <p><input type="submit" value="Continue &rarr;"></p>
+ <p><input type="submit" value="<?php esc_html_e( 'Continue &rarr;', 'jetpack' ); ?>"></p>
</form>
<?php
$mathage = ob_get_contents();
@@ -101,7 +115,7 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
$ans = sha1( $salt . $sum );
?>
<div style="margin: 5px 0 20px;">
- <strong>Prove your humanity: </strong>
+ <strong><?php esc_html_e( 'Prove your humanity:', 'jetpack' ); ?> </strong>
<?php echo $num1 ?> &nbsp; + &nbsp; <?php echo $num2 ?> &nbsp; = &nbsp;
<input type="input" name="jetpack_protect_num" value="" size="2" />
<input type="hidden" name="jetpack_protect_answer" value="<?php echo $ans; ?>" />
@@ -110,4 +124,4 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/protect/shared-functions.php b/plugins/jetpack/modules/protect/shared-functions.php
index 67c6ae58..3313bf0f 100644
--- a/plugins/jetpack/modules/protect/shared-functions.php
+++ b/plugins/jetpack/modules/protect/shared-functions.php
@@ -3,17 +3,23 @@
* These functions are shared by the Protect module and its related json-endpoints
*/
-function jetpack_protect_format_whitelist( $whitelist = null ) {
+/**
+ * Returns an array of IP objects that will never be blocked by the Protect module
+ *
+ * The array is segmented into a local whitelist which applies only to the current site
+ * and a global whitelist which, for multisite installs, applies to the entire networko
+ *
+ * @return array
+ */
+function jetpack_protect_format_whitelist() {
- if( ! $whitelist ) {
- $whitelist = get_site_option( 'jetpack_protect_whitelist', array() );
- }
+ $local_whitelist = jetpack_protect_get_local_whitelist();
- $formatted = array(
- 'local' => array(), // todo remove 'local' when we merge next iteration on calypso
+ $formatted = array (
+ 'local' => array (),
);
- foreach( $whitelist as $item ) {
+ foreach ( $local_whitelist as $item ) {
if ( $item->range ) {
$formatted['local'][] = $item->range_low . ' - ' . $item->range_high;
} else {
@@ -21,19 +27,90 @@ function jetpack_protect_format_whitelist( $whitelist = null ) {
}
}
+ if ( is_multisite() && current_user_can( 'manage_network' ) ) {
+ $formatted['global'] = array ();
+ $global_whitelist = jetpack_protect_get_global_whitelist();
+
+ if ( false === $global_whitelist ) {
+ // if the global whitelist has never been set, check for a legacy option set prior to 3.6
+ $global_whitelist = get_site_option( 'jetpack_protect_whitelist', array () );
+ }
+
+ foreach ( $global_whitelist as $item ) {
+ if ( $item->range ) {
+ $formatted['global'][] = $item->range_low . ' - ' . $item->range_high;
+ } else {
+ $formatted['global'][] = $item->ip_address;
+ }
+ }
+ }
+
return $formatted;
}
-function jetpack_protect_save_whitelist( $whitelist ) {
- $whitelist_error = false;
- $new_items = array();
+/**
+ * Gets the local Protect whitelist
+ *
+ * The 'local' part of the whitelist only really applies to multisite installs,
+ * which can have a network wide whitelist, as well as a local list that applies
+ * only to the current site. On single site installs, there will only be a local
+ * whitelist.
+ *
+ * @return array A list of IP Address objects or an empty array
+ */
+function jetpack_protect_get_local_whitelist() {
+ $whitelist = Jetpack_Options::get_option( 'protect_whitelist' );
+
+ if ( false === $whitelist ) {
+ // The local whitelist has never been set
+ if ( is_multisite() ) {
+ // On a multisite, we can check for a legacy site_option that existed prior to v 3.6, or default to an empty array
+ $whitelist = get_site_option( 'jetpack_protect_whitelist', array () );
+ } else {
+ // On a single site, we can just use an empty array
+ $whitelist = array ();
+ }
+ }
+
+ return $whitelist;
+}
+
+/**
+ * Get the global, network-wide whitelist
+ *
+ * It will revert to the legacy site_option if jetpack_protect_global_whitelist has never been set
+ *
+ * @return array
+ */
+function jetpack_protect_get_global_whitelist() {
+ $whitelist = get_site_option( 'jetpack_protect_global_whitelist' );
+
+ if ( false === $whitelist ) {
+ // The global whitelist has never been set. Check for legacy site_option, or default to an empty array
+ $whitelist = get_site_option( 'jetpack_protect_whitelist', array () );
+ }
+
+ return $whitelist;
+}
+
+function jetpack_protect_save_whitelist( $whitelist, $global = false ) {
+ $whitelist_error = false;
+ $new_items = array ();
if ( ! is_array( $whitelist ) ) {
return new WP_Error( 'invalid_parameters', __( 'Expecting an array', 'jetpack' ) );
}
+ if ( $global && ! is_multisite() ) {
+ return new WP_Error( 'invalid_parameters', __( 'Cannot use global flag on non-multisites', 'jetpack' ) );
+ }
+
+ if ( $global && ! current_user_can( 'manage_network' ) ) {
+ return new WP_Error( 'permission_denied', __( 'Only super admins can edit the global whitelist', 'jetpack' ) );
+ }
+
// validate each item
- foreach( $whitelist as $item ) {
+ foreach ( $whitelist as $item ) {
$item = trim( $item );
@@ -42,16 +119,16 @@ function jetpack_protect_save_whitelist( $whitelist ) {
}
$range = false;
- if ( strpos( $item, '-') ) {
- $item = explode( '-', $item );
+ if ( strpos( $item, '-' ) ) {
+ $item = explode( '-', $item );
$range = true;
}
- $new_item = new stdClass();
- $new_item->range = $range;
+ $new_item = new stdClass();
+ $new_item->range = $range;
if ( ! empty( $range ) ) {
- $low = trim( $item[0] );
+ $low = trim( $item[0] );
$high = trim( $item[1] );
if ( ! filter_var( $low, FILTER_VALIDATE_IP ) || ! filter_var( $high, FILTER_VALIDATE_IP ) ) {
@@ -64,8 +141,8 @@ function jetpack_protect_save_whitelist( $whitelist ) {
break;
}
- $new_item->range_low = $low;
- $new_item->range_high = $high;
+ $new_item->range_low = $low;
+ $new_item->range_high = $high;
} else {
@@ -89,46 +166,64 @@ function jetpack_protect_save_whitelist( $whitelist ) {
return new WP_Error( 'invalid_ip', __( 'One of your IP addresses was not valid.', 'jetpack' ) );
}
- update_site_option( 'jetpack_protect_whitelist', $new_items );
+ if ( $global ) {
+ update_site_option( 'jetpack_protect_global_whitelist', $new_items );
+ // once a user has saved their global whitelist, we can permanently remove the legacy option
+ delete_site_option( 'jetpack_protect_whitelist' );
+ } else {
+ Jetpack_Options::update_option( 'protect_whitelist', $new_items );
+ }
+
return true;
}
function jetpack_protect_get_ip() {
- $server_headers = array(
- 'HTTP_CLIENT_IP',
- 'HTTP_CF_CONNECTING_IP',
- 'HTTP_X_FORWARDED_FOR',
- 'HTTP_X_FORWARDED',
- 'HTTP_X_CLUSTER_CLIENT_IP',
- 'HTTP_FORWARDED_FOR',
- 'HTTP_FORWARDED',
- 'REMOTE_ADDR'
- );
+ $trusted_header_data = get_site_option( 'trusted_ip_header' );
- foreach( $server_headers as $key ) {
+ if ( isset( $trusted_header_data->trusted_header ) && isset( $_SERVER[ $trusted_header_data->trusted_header ] ) ) {
+ $ip = $_SERVER[ $trusted_header_data->trusted_header ];
+ $segments = $trusted_header_data->segments;
+ $reverse_order = $trusted_header_data->reverse;
+ } else {
+ $ip = $_SERVER['REMOTE_ADDR'];
+ }
- if ( ! array_key_exists( $key, $_SERVER ) ) {
- continue;
- }
+ $ips = explode( ',', $ip );
- foreach( explode( ',', $_SERVER[ $key ] ) as $ip ) {
- $ip = trim( $ip ); // just to be safe
+ if ( ! isset( $segments ) || ! $segments ) {
+ $segments = 1;
+ }
+ if ( isset( $reverse_order ) && $reverse_order ) {
+ $ips = array_reverse( $ips );
+ }
- // Check for IPv4 IP cast as IPv6
- if ( preg_match('/^::ffff:(\d+\.\d+\.\d+\.\d+)$/', $ip, $matches ) ) {
- $ip = $matches[1];
- }
- // If the IP is in a private or reserved range, return REMOTE_ADDR to help prevent spoofing
- if ( $ip == '127.0.0.1' || $ip == '::1' || jetpack_protect_ip_is_private( $ip ) ) {
- return $_SERVER[ 'REMOTE_ADDR' ];
- }
- return $ip;
- }
+
+ $ip_count = count( $ips );
+
+ if ( 1 == $ip_count ) {
+ return jetpack_clean_ip( $ips[0] );
+ } elseif ( $ip_count >= $segments ) {
+ $the_one = $ip_count - $segments;
+
+ return jetpack_clean_ip( $ips[ $the_one ] );
+ } else {
+ return jetpack_clean_ip( $_SERVER['REMOTE_ADDR'] );
}
}
+function jetpack_clean_ip( $ip ) {
+ $ip = trim( $ip );
+
+ // Check for IPv4 IP cast as IPv6
+ if ( preg_match( '/^::ffff:(\d+\.\d+\.\d+\.\d+)$/', $ip, $matches ) ) {
+ $ip = $matches[1];
+ }
+
+ return $ip;
+}
+
/**
* Checks an IP to see if it is within a private range
*
@@ -140,18 +235,18 @@ function jetpack_protect_ip_is_private( $ip ) {
// we are dealing with ipv6, so we can simply rely on filter_var
if ( false === strpos( $ip, '.' ) ) {
- return !filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
+ return ! filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
}
// we are dealing with ipv4
- $private_ip4_addresses = array(
+ $private_ip4_addresses = array (
'10.0.0.0|10.255.255.255', // single class A network
'172.16.0.0|172.31.255.255', // 16 contiguous class B network
'192.168.0.0|192.168.255.255', // 256 contiguous class C network
'169.254.0.0|169.254.255.255', // Link-local address also referred to as Automatic Private IP Addressing
'127.0.0.0|127.255.255.255' // localhost
);
- $long_ip = ip2long( $ip );
+ $long_ip = ip2long( $ip );
if ( -1 != $long_ip ) {
foreach ( $private_ip4_addresses as $pri_addr ) {
list ( $start, $end ) = explode( '|', $pri_addr );
@@ -160,6 +255,7 @@ function jetpack_protect_ip_is_private( $ip ) {
}
}
}
+
return false;
}
@@ -179,5 +275,43 @@ function jetpack_convert_ip_address( $ip ) {
if ( function_exists( 'inet_pton' ) ) {
return inet_pton( $ip );
}
+
return ip2long( $ip );
+}
+
+/**
+ * Checks that a given IP address is within a given low - high range.
+ * Servers that support inet_pton will use that function to convert the ip to number,
+ * while other servers will use ip2long.
+ *
+ * NOTE: servers that do not support inet_pton cannot support ipv6.
+ *
+ * @param $ip
+ * @param $range_low
+ * @param $range_high
+ *
+ * @return bool
+ */
+function jetpack_protect_ip_address_is_in_range( $ip, $range_low, $range_high ) {
+ // inet_pton will give us binary string of an ipv4 or ipv6
+ // we can then use strcmp to see if the address is in range
+ if ( function_exists( 'inet_pton' ) ) {
+ $ip_num = inet_pton( $ip );
+ $ip_low = inet_pton( $range_low );
+ $ip_high = inet_pton( $range_high );
+ if ( $ip_num && $ip_low && $ip_high && strcmp( $ip_num, $ip_low ) >= 0 && strcmp( $ip_num, $ip_high ) <= 0 ) {
+ return true;
+ }
+ // ip2long will give us an integer of an ipv4 address only. it will produce FALSE for ipv6
+ } else {
+ $ip_num = ip2long( $ip );
+ $ip_low = ip2long( $range_low );
+ $ip_high = ip2long( $range_high );
+ if ( $ip_num && $ip_low && $ip_high && $ip_num >= $ip_low && $ip_num <= $ip_high ) {
+ return true;
+ }
+ }
+
+ return false;
+
} \ No newline at end of file
diff --git a/plugins/jetpack/modules/protect/transient-cleanup.php b/plugins/jetpack/modules/protect/transient-cleanup.php
index 4bb7e6a2..0cc4f19c 100644
--- a/plugins/jetpack/modules/protect/transient-cleanup.php
+++ b/plugins/jetpack/modules/protect/transient-cleanup.php
@@ -5,7 +5,7 @@ https://github.com/Seebz/Snippets/tree/master/Wordpress/plugins/purge-transients
*/
if ( ! function_exists('jp_purge_transients') ) {
- function jp_purge_transients( $older_than = '7 days' ) {
+ function jp_purge_transients( $older_than = '1 hour' ) {
global $wpdb;
$older_than_time = strtotime( '-' . $older_than );
@@ -30,15 +30,15 @@ if ( ! function_exists('jp_purge_transients') ) {
}
if ($options_names) {
- $option_names_string = implode( ', ', array_fill( 0, count( $options_names ), '%s') );
- $delete_sql = "DELETE FROM {$wpdb->options} WHERE option_name IN ($option_names_string)";
+ $option_names_string = implode( ', ', array_fill( 0, count( $options_names ), '%s') );
+ $delete_sql = "DELETE FROM {$wpdb->options} WHERE option_name IN ($option_names_string)";
- $delete_sql = call_user_func_array( array($wpdb, 'prepare'), array_merge( array( $delete_sql ), $options_names ) );
+ $delete_sql = call_user_func_array( array($wpdb, 'prepare'), array_merge( array( $delete_sql ), $options_names ) );
- $result = $wpdb->query( $delete_sql );
- if ( !$result ) {
- return false;
- }
+ $result = $wpdb->query( $delete_sql );
+ if ( !$result ) {
+ return false;
+ }
}
return;
@@ -47,7 +47,7 @@ if ( ! function_exists('jp_purge_transients') ) {
function jp_purge_transients_activation() {
- if ( !wp_next_scheduled( 'jp_purge_transients_cron' ) ) {
+ if ( !wp_next_scheduled( 'jp_purge_transients_cron' ) ) {
wp_schedule_event( time(), 'daily', 'jp_purge_transients_cron' );
}
}
diff --git a/plugins/jetpack/modules/publicize.php b/plugins/jetpack/modules/publicize.php
index 5cf7a8b5..9709e300 100644
--- a/plugins/jetpack/modules/publicize.php
+++ b/plugins/jetpack/modules/publicize.php
@@ -1,19 +1,20 @@
<?php
/**
* Module Name: Publicize
- * Module Description: Share new posts on social media networks automatically.
+ * Module Description: Automatically promote content.
* Sort Order: 10
* Recommendation Order: 7
* First Introduced: 2.0
* Requires Connection: Yes
* Auto Activate: Yes
* Module Tags: Social, Recommended
- * Feature: Recommended
+ * Feature: Recommended, Traffic
+ * Additional Search Queries: facebook, twitter, google+, googleplus, google, path, tumblr, linkedin, social, tweet, connections, sharing
*/
class Jetpack_Publicize {
- var $in_jetpack = true;
+ public $in_jetpack = true;
function __construct() {
global $publicize_ui;
@@ -289,8 +290,8 @@ class Publicize_Util {
}
$done[$post_id] = true;
- if ( function_exists( 'bump_stats_extras' ) )
- bump_stats_extras( 'publicize_url', $bin );
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'publicize_url', $bin );
}
public static function build_sprintf( $args ) {
@@ -337,4 +338,3 @@ function publicize_init() {
}
}
-
diff --git a/plugins/jetpack/modules/publicize/assets/publicize-rtl.css b/plugins/jetpack/modules/publicize/assets/publicize-rtl.css
index a713089e..fb86ab55 100644
--- a/plugins/jetpack/modules/publicize/assets/publicize-rtl.css
+++ b/plugins/jetpack/modules/publicize/assets/publicize-rtl.css
@@ -94,21 +94,6 @@ div.publicize-service-right li {
font-size: 14px;
}
-.publicize-info {
- display: inline-block;
- width: 16px;
- height: 16px;
- background-image: url( info-2x.png );
- background-size: 16px 16px;
- text-indent: -99999px;
- float: right;
- cursor: help;
- text-decoration: none;
- margin-left: 10px;
- margin-top:3px;
- font-size: 10%;
-}
-
.pub-disconnect-button {
-webkit-border-image: none;
border-bottom-color: #CCC;
diff --git a/plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css b/plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css
index 0653d716..f4028c60 100644
--- a/plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css
+++ b/plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css
@@ -1 +1 @@
-div#publicize-services-block{display:block;clear:both;margin-bottom:25px;background-color:#fff;padding:25px 20px 5px 25px;overflow:hidden;max-width:1200px}span.pub-logos{float:right;display:block;width:130px;height:75px;margin-top:-18px;margin-right:5px;vertical-align:top}.left,.right{width:50%;float:right}div#facebook{background:url(publicize-fb-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#twitter{background:url(publicize-twitter-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#linkedin{background:url(publicize-linkedin-2x.png)no-repeat 0 0/32px 32px;padding-right:42px;padding-top:5px}div#tumblr{background:url(publicize-tumblr-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#path{background:url(publicize-path-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#google_plus{background:url(publicize-google-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}a.publicize-profile-link,a.publicize-profile-link:visited{text-decoration:none;font-weight:700}a.publicize-profile-link:hover{color:#f1831e}a.publicize-add-connection,a.publicize-add-connection:visited{text-decoration:none}a.publicize-add-connection:hover{color:#f1831e}div.publicize-service-entry{clear:both;margin-bottom:10px;padding:10px 0 25px;border-bottom:1px #eee solid;margin-left:40px;overflow:hidden}div.publicize-service-entry:last-of-type{border-width:0}div.publicize-service-left{display:inline-block;width:150px;vertical-align:top;min-height:35px}div.publicize-service-left a{font-size:24px;text-decoration:none}div.publicize-service-left a:hover{text-decoration:underline}div.publicize-service-right{display:inline-block;text-align:left;float:left;padding-top:5px}div.publicize-service-right ul{margin-top:0}div.publicize-service-right li{list-style-type:none;font-size:14px}.publicize-info{display:inline-block;width:16px;height:16px;background-image:url(info-2x.png);background-size:16px 16px;text-indent:-99999px;float:right;cursor:help;text-decoration:none;margin-left:10px;margin-top:3px;font-size:10%}.pub-disconnect-button{-webkit-border-image:none;border-color:#CCC;border-style:none;border-width:0;color:#CCC;cursor:auto;display:inline;font-family:sans-serif;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style:none;margin:0;outline:#CCC 0;overflow-y:visible;padding:0;position:static;left:auto;text-align:right;text-decoration:none;top:auto;vertical-align:baseline;width:auto;z-index:auto}.pub-disconnect-button:hover{color:#f1831e}table#option-profile{padding-bottom:8px}table#option-profile td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-profile td.radio,table#option-profile td.thumbnail{padding-left:20px}table#option-profile td.details{font-weight:700;color:#333}table#option-fanpage td,table#option-fb-fanpage td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-fanpage td.thumbnail,table#option-fb-fanpage td.thumbnail{padding:5px 20px}table#option-fanpage td.details,table#option-fb-fanpage td.details{width:130px;padding-left:10px}table#option-fanpage td.details span.name,table#option-fb-fanpage td.details span.name{font-weight:700;color:#333}table#option-fanpage td.details span.category,table#option-fb-fanpage td.details span.category{font-size:10px;color:#888}input.fb-options{font-family:"Lucida Grande",Verdana,Arial,sans-serif;font-size:12px}.pub-connection-error{color:red} \ No newline at end of file
+div#publicize-services-block{display:block;clear:both;margin-bottom:25px;background-color:#fff;padding:25px 20px 5px 25px;overflow:hidden;max-width:1200px}span.pub-logos{float:right;display:block;width:130px;height:75px;margin-top:-18px;margin-right:5px;vertical-align:top}.left,.right{width:50%;float:right}div#facebook{background:url(publicize-fb-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#twitter{background:url(publicize-twitter-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#linkedin{background:url(publicize-linkedin-2x.png)no-repeat 0 0/32px 32px;padding-right:42px;padding-top:5px}div#tumblr{background:url(publicize-tumblr-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#path{background:url(publicize-path-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}div#google_plus{background:url(publicize-google-2x.png) 0 0/32px 32px no-repeat;padding-right:42px;padding-top:5px}a.publicize-profile-link,a.publicize-profile-link:visited{text-decoration:none;font-weight:700}a.publicize-profile-link:hover{color:#f1831e}a.publicize-add-connection,a.publicize-add-connection:visited{text-decoration:none}a.publicize-add-connection:hover{color:#f1831e}div.publicize-service-entry{clear:both;margin-bottom:10px;padding:10px 0 25px;border-bottom:1px #eee solid;margin-left:40px;overflow:hidden}div.publicize-service-entry:last-of-type{border-width:0}div.publicize-service-left{display:inline-block;width:150px;vertical-align:top;min-height:35px}div.publicize-service-left a{font-size:24px;text-decoration:none}div.publicize-service-left a:hover{text-decoration:underline}div.publicize-service-right{display:inline-block;text-align:left;float:left;padding-top:5px}div.publicize-service-right ul{margin-top:0}div.publicize-service-right li{list-style-type:none;font-size:14px}.pub-disconnect-button{-webkit-border-image:none;border-color:#CCC;border-style:none;border-width:0;color:#CCC;cursor:auto;display:inline;font-family:sans-serif;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style:none;margin:0;outline:#CCC 0;overflow-y:visible;padding:0;position:static;left:auto;text-align:right;text-decoration:none;top:auto;vertical-align:baseline;width:auto;z-index:auto}.pub-disconnect-button:hover{color:#f1831e}table#option-profile{padding-bottom:8px}table#option-profile td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-profile td.radio,table#option-profile td.thumbnail{padding-left:20px}table#option-profile td.details{font-weight:700;color:#333}table#option-fanpage td,table#option-fb-fanpage td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-fanpage td.thumbnail,table#option-fb-fanpage td.thumbnail{padding:5px 20px}table#option-fanpage td.details,table#option-fb-fanpage td.details{width:130px;padding-left:10px}table#option-fanpage td.details span.name,table#option-fb-fanpage td.details span.name{font-weight:700;color:#333}table#option-fanpage td.details span.category,table#option-fb-fanpage td.details span.category{font-size:10px;color:#888}input.fb-options{font-family:"Lucida Grande",Verdana,Arial,sans-serif;font-size:12px}.pub-connection-error{color:red} \ No newline at end of file
diff --git a/plugins/jetpack/modules/publicize/assets/publicize.css b/plugins/jetpack/modules/publicize/assets/publicize.css
index d9346edc..ecc096a8 100644
--- a/plugins/jetpack/modules/publicize/assets/publicize.css
+++ b/plugins/jetpack/modules/publicize/assets/publicize.css
@@ -94,21 +94,6 @@ div.publicize-service-right li {
font-size: 14px;
}
-.publicize-info {
- display: inline-block;
- width: 16px;
- height: 16px;
- background-image: url( info-2x.png );
- background-size: 16px 16px;
- text-indent: -99999px;
- float: left;
- cursor: help;
- text-decoration: none;
- margin-right: 10px;
- margin-top:3px;
- font-size: 10%;
-}
-
.pub-disconnect-button {
-webkit-border-image: none;
border-bottom-color: #CCC;
diff --git a/plugins/jetpack/modules/publicize/assets/publicize.min.css b/plugins/jetpack/modules/publicize/assets/publicize.min.css
index 5c6d7e0a..ec3b8c0e 100644
--- a/plugins/jetpack/modules/publicize/assets/publicize.min.css
+++ b/plugins/jetpack/modules/publicize/assets/publicize.min.css
@@ -1 +1 @@
-div#publicize-services-block{display:block;clear:both;margin-bottom:25px;background-color:#fff;padding:25px 25px 5px 20px;overflow:hidden;max-width:1200px}span.pub-logos{float:left;display:block;width:130px;height:75px;margin-top:-18px;margin-left:5px;vertical-align:top}.left,.right{width:50%;float:left}div#facebook{background:url(publicize-fb-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#twitter{background:url(publicize-twitter-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#linkedin{background:url(publicize-linkedin-2x.png)no-repeat 0 0/32px 32px;padding-left:42px;padding-top:5px}div#tumblr{background:url(publicize-tumblr-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#path{background:url(publicize-path-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#google_plus{background:url(publicize-google-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}a.publicize-profile-link,a.publicize-profile-link:visited{text-decoration:none;font-weight:700}a.publicize-profile-link:hover{color:#f1831e}a.publicize-add-connection,a.publicize-add-connection:visited{text-decoration:none}a.publicize-add-connection:hover{color:#f1831e}div.publicize-service-entry{clear:both;margin-bottom:10px;padding:10px 0 25px;border-bottom:1px #eee solid;margin-right:40px;overflow:hidden}div.publicize-service-entry:last-of-type{border-width:0}div.publicize-service-left{display:inline-block;width:150px;vertical-align:top;min-height:35px}div.publicize-service-left a{font-size:24px;text-decoration:none}div.publicize-service-left a:hover{text-decoration:underline}div.publicize-service-right{display:inline-block;text-align:right;float:right;padding-top:5px}div.publicize-service-right ul{margin-top:0}div.publicize-service-right li{list-style-type:none;font-size:14px}.publicize-info{display:inline-block;width:16px;height:16px;background-image:url(info-2x.png);background-size:16px 16px;text-indent:-99999px;float:left;cursor:help;text-decoration:none;margin-right:10px;margin-top:3px;font-size:10%}.pub-disconnect-button{-webkit-border-image:none;border-color:#CCC;border-style:none;border-width:0;color:#CCC;cursor:auto;display:inline;font-family:sans-serif;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style:none;margin:0;outline:#CCC 0;overflow-y:visible;padding:0;position:static;right:auto;text-align:left;text-decoration:none;top:auto;vertical-align:baseline;width:auto;z-index:auto}.pub-disconnect-button:hover{color:#f1831e}table#option-profile{padding-bottom:8px}table#option-profile td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-profile td.radio,table#option-profile td.thumbnail{padding-right:20px}table#option-profile td.details{font-weight:700;color:#333}table#option-fanpage td,table#option-fb-fanpage td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-fanpage td.thumbnail,table#option-fb-fanpage td.thumbnail{padding:5px 20px}table#option-fanpage td.details,table#option-fb-fanpage td.details{width:130px;padding-right:10px}table#option-fanpage td.details span.name,table#option-fb-fanpage td.details span.name{font-weight:700;color:#333}table#option-fanpage td.details span.category,table#option-fb-fanpage td.details span.category{font-size:10px;color:#888}input.fb-options{font-family:"Lucida Grande",Verdana,Arial,sans-serif;font-size:12px}.pub-connection-error{color:red} \ No newline at end of file
+div#publicize-services-block{display:block;clear:both;margin-bottom:25px;background-color:#fff;padding:25px 25px 5px 20px;overflow:hidden;max-width:1200px}span.pub-logos{float:left;display:block;width:130px;height:75px;margin-top:-18px;margin-left:5px;vertical-align:top}.left,.right{width:50%;float:left}div#facebook{background:url(publicize-fb-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#twitter{background:url(publicize-twitter-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#linkedin{background:url(publicize-linkedin-2x.png)no-repeat 0 0/32px 32px;padding-left:42px;padding-top:5px}div#tumblr{background:url(publicize-tumblr-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#path{background:url(publicize-path-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}div#google_plus{background:url(publicize-google-2x.png) 0 0/32px 32px no-repeat;padding-left:42px;padding-top:5px}a.publicize-profile-link,a.publicize-profile-link:visited{text-decoration:none;font-weight:700}a.publicize-profile-link:hover{color:#f1831e}a.publicize-add-connection,a.publicize-add-connection:visited{text-decoration:none}a.publicize-add-connection:hover{color:#f1831e}div.publicize-service-entry{clear:both;margin-bottom:10px;padding:10px 0 25px;border-bottom:1px #eee solid;margin-right:40px;overflow:hidden}div.publicize-service-entry:last-of-type{border-width:0}div.publicize-service-left{display:inline-block;width:150px;vertical-align:top;min-height:35px}div.publicize-service-left a{font-size:24px;text-decoration:none}div.publicize-service-left a:hover{text-decoration:underline}div.publicize-service-right{display:inline-block;text-align:right;float:right;padding-top:5px}div.publicize-service-right ul{margin-top:0}div.publicize-service-right li{list-style-type:none;font-size:14px}.pub-disconnect-button{-webkit-border-image:none;border-color:#CCC;border-style:none;border-width:0;color:#CCC;cursor:auto;display:inline;font-family:sans-serif;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style:none;margin:0;outline:#CCC 0;overflow-y:visible;padding:0;position:static;right:auto;text-align:left;text-decoration:none;top:auto;vertical-align:baseline;width:auto;z-index:auto}.pub-disconnect-button:hover{color:#f1831e}table#option-profile{padding-bottom:8px}table#option-profile td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-profile td.radio,table#option-profile td.thumbnail{padding-right:20px}table#option-profile td.details{font-weight:700;color:#333}table#option-fanpage td,table#option-fb-fanpage td{font-family:"Lucida Grande",Verdana,Arial,sans-serif;vertical-align:middle}table#option-fanpage td.thumbnail,table#option-fb-fanpage td.thumbnail{padding:5px 20px}table#option-fanpage td.details,table#option-fb-fanpage td.details{width:130px;padding-right:10px}table#option-fanpage td.details span.name,table#option-fb-fanpage td.details span.name{font-weight:700;color:#333}table#option-fanpage td.details span.category,table#option-fb-fanpage td.details span.category{font-size:10px;color:#888}input.fb-options{font-family:"Lucida Grande",Verdana,Arial,sans-serif;font-size:12px}.pub-connection-error{color:red} \ No newline at end of file
diff --git a/plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css b/plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css
index 622c43ff..9a8f314c 100644
--- a/plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css
+++ b/plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css
@@ -96,21 +96,6 @@ div.publicize-service-right li {
font-size: 14px;
}
-.publicize-info {
- display: inline-block;
- width: 16px;
- height: 16px;
- background-image: url( ../info-2x.png );
- background-size: 16px 16px;
- text-indent: -99999px;
- float: right;
- cursor: help;
- text-decoration: none;
- margin-left: 10px;
- margin-top:3px;
- font-size: 10%;
-}
-
.pub-disconnect-button {
-webkit-border-image: none;
border-bottom-color: #CCC;
diff --git a/plugins/jetpack/modules/publicize/publicize-jetpack.php b/plugins/jetpack/modules/publicize/publicize-jetpack.php
index 50746b49..f21ca16e 100644
--- a/plugins/jetpack/modules/publicize/publicize-jetpack.php
+++ b/plugins/jetpack/modules/publicize/publicize-jetpack.php
@@ -68,13 +68,11 @@ class Publicize extends Publicize_Base {
<div id="message" class="updated jetpack-message jp-connect">
<div class="jetpack-wrap-container">
<div class="jetpack-text-container">
- <h4>
<p><?php printf(
esc_html( wptexturize( __( "To use Publicize, you'll need to link your %s account to your WordPress.com account using the link below.", 'jetpack' ) ) ),
'<strong>' . esc_html( $blog_name ) . '</strong>'
); ?></p>
<p><?php echo esc_html( wptexturize( __( "If you don't have a WordPress.com account yet, you can sign up for free in just a few seconds.", 'jetpack' ) ) ); ?></p>
- </h4>
</div>
<div class="jetpack-install-container">
<p class="submit"><a href="<?php echo $jetpack->build_connect_url( false, menu_page_url( 'sharing', false ) ); ?>" class="button-connector" id="wpcom-connect"><?php esc_html_e( 'Link account with WordPress.com', 'jetpack' ); ?></a></p>
@@ -239,7 +237,7 @@ class Publicize extends Publicize_Base {
?>
<div id="message" class="jetpack-message jetpack-err">
<div class="squeezer">
- <h4><?php echo wp_kses( $error, array( 'a' => array( 'href' => true ), 'code' => true, 'strong' => true, 'br' => true, 'b' => true ) ); ?></h4>
+ <h2><?php echo wp_kses( $error, array( 'a' => array( 'href' => true ), 'code' => true, 'strong' => true, 'br' => true, 'b' => true ) ); ?></h2>
<?php if ( $code ) : ?>
<p><?php printf( __( 'Error code: %s', 'jetpack' ), esc_html( stripslashes( $code ) ) ); ?></p>
<?php endif; ?>
@@ -280,6 +278,15 @@ class Publicize extends Publicize_Base {
*/
// on WordPress.com this is/calls Keyring::admin_url
function api_url( $service = false, $params = array() ) {
+ /**
+ * Filters the API URL used to interact with WordPress.com.
+ *
+ * @module publicize
+ *
+ * @since 2.0.0
+ *
+ * @param string https://public-api.wordpress.com/connect/?jetpack=publicize Default Publicize API URL.
+ */
$url = apply_filters( 'publicize_api_url', 'https://public-api.wordpress.com/connect/?jetpack=publicize' );
if ( $service )
diff --git a/plugins/jetpack/modules/publicize/publicize.php b/plugins/jetpack/modules/publicize/publicize.php
index 6a4afecb..f78bdd9f 100644
--- a/plugins/jetpack/modules/publicize/publicize.php
+++ b/plugins/jetpack/modules/publicize/publicize.php
@@ -6,65 +6,105 @@ abstract class Publicize_Base {
* Services that are currently connected to the given user
* through publicize.
*/
- var $connected_services = array();
+ public $connected_services = array();
/**
- * Sservices that are supported by publicize. They don't
- * neccessarly need to be connected to the current user.
+ * Services that are supported by publicize. They don't
+ * necessarily need to be connected to the current user.
*/
- var $services;
+ public $services;
/**
* key names for post meta
*/
- var $ADMIN_PAGE = 'wpas';
- var $POST_MESS = '_wpas_mess';
- var $POST_SKIP = '_wpas_skip_'; // connection id appended to indicate that a connection should NOT be publicized to
- var $POST_DONE = '_wpas_done_'; // connection id appended to indicate a connection has already been publicized to
- var $USER_AUTH = 'wpas_authorize';
- var $USER_OPT = 'wpas_';
- var $PENDING = '_publicize_pending'; // ready for Publicize to do its thing
- var $POST_SERVICE_DONE = '_publicize_done_external'; // array of external ids where we've Publicized
+ public $ADMIN_PAGE = 'wpas';
+ public $POST_MESS = '_wpas_mess';
+ public $POST_SKIP = '_wpas_skip_'; // connection id appended to indicate that a connection should NOT be publicized to
+ public $POST_DONE = '_wpas_done_'; // connection id appended to indicate a connection has already been publicized to
+ public $USER_AUTH = 'wpas_authorize';
+ public $USER_OPT = 'wpas_';
+ public $PENDING = '_publicize_pending'; // ready for Publicize to do its thing
+ public $POST_SERVICE_DONE = '_publicize_done_external'; // array of external ids where we've Publicized
/**
* default pieces of the message used in constructing the
* content pushed out to other social networks
*/
- var $default_prefix = '';
- var $default_message = '%title%';
- var $default_suffix = ' %url%';
+
+ public $default_prefix = '';
+ public $default_message = '%title%';
+ public $default_suffix = ' ';
/**
* What WP capability is require to create/delete global connections?
- * All users with this cap can unglobalize all other global connections, and globalize any of their own
+ * All users with this cap can un-globalize all other global connections, and globalize any of their own
* Globalized connections cannot be unselected by users without this capability when publishing
*/
- var $GLOBAL_CAP = 'edit_others_posts';
+ public $GLOBAL_CAP = 'edit_others_posts';
/**
* Sets up the basics of Publicize
*/
function __construct() {
$this->default_message = Publicize_Util::build_sprintf( array(
+ /**
+ * Filter the default Publicize message.
+ *
+ * @module publicize
+ *
+ * @since 2.0.0
+ *
+ * @param string $this->default_message Publicize's default message. Default is the post title.
+ */
apply_filters( 'wpas_default_message', $this->default_message ),
'title',
'url',
) );
$this->default_prefix = Publicize_Util::build_sprintf( array(
+ /**
+ * Filter the message prepended to the Publicize custom message.
+ *
+ * @module publicize
+ *
+ * @since 2.0.0
+ *
+ * @param string $this->default_prefix String prepended to the Publicize custom message.
+ */
apply_filters( 'wpas_default_prefix', $this->default_prefix ),
'url',
) );
$this->default_suffix = Publicize_Util::build_sprintf( array(
+ /**
+ * Filter the message appended to the Publicize custom message.
+ *
+ * @module publicize
+ *
+ * @since 2.0.0
+ *
+ * @param string $this->default_suffix String appended to the Publicize custom message.
+ */
apply_filters( 'wpas_default_suffix', $this->default_suffix ),
'url',
) );
+ /**
+ * Filter the capability to change global Publicize connection options.
+ *
+ * All users with this cap can un-globalize all other global connections, and globalize any of their own
+ * Globalized connections cannot be unselected by users without this capability when publishing.
+ *
+ * @module publicize
+ *
+ * @since 2.2.1
+ *
+ * @param string $this->GLOBAL_CAP default capability in control of global Publicize connection options. Default to edit_others_posts.
+ */
$this->GLOBAL_CAP = apply_filters( 'jetpack_publicize_global_connections_cap', $this->GLOBAL_CAP );
// stage 1 and 2 of 3-stage Publicize. Flag for Publicize on creation, save meta,
- // then check meta and publicze based on that. stage 3 implemented on wpcom
+ // then check meta and publicize based on that. stage 3 implemented on wpcom
add_action( 'transition_post_status', array( $this, 'flag_post_for_publicize' ), 10, 3 );
add_action( 'save_post', array( &$this, 'save_meta' ), 20, 2 );
@@ -104,7 +144,7 @@ abstract class Publicize_Base {
return $cmeta['connection_data']['meta']['link'];
} elseif ( 'facebook' == $service_name && isset( $cmeta['connection_data']['meta']['facebook_page'] ) ) {
- return 'https://www.facebook.com/' . $cmeta['connection_data']['meta']['facebook_page'];
+ return 'https://facebook.com/' . $cmeta['connection_data']['meta']['facebook_page'];
} elseif ( 'tumblr' == $service_name && isset( $cmeta['connection_data']['meta']['tumblr_base_hostname'] ) ) {
return 'http://' . $cmeta['connection_data']['meta']['tumblr_base_hostname'];
} elseif ( 'twitter' == $service_name ) {
@@ -182,7 +222,7 @@ abstract class Publicize_Base {
if ( 'tumblr' == $service_name && empty ( $cmeta['connection_data']['meta']['tumblr_base_hostname'] ) )
return true;
- // if we have the specific conncetion info..
+ // if we have the specific connection info..
if ( isset( $_GET['id'] ) ) {
if ( $cmeta['connection_data']['id'] == $_GET['id'] )
return true;
@@ -232,8 +272,9 @@ abstract class Publicize_Base {
// Don't Publicize during certain contexts:
// - import
- if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING )
+ if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
$submit_post = false;
+ }
// - on quick edit, autosave, etc but do fire on p2, quickpress, and instapost ajax
if (
@@ -253,8 +294,9 @@ abstract class Publicize_Base {
}
// - bulk edit
- if ( isset( $_GET['bulk_edit'] ) )
+ if ( isset( $_GET['bulk_edit'] ) ) {
$submit_post = false;
+ }
// - API/XML-RPC Test Posts
if (
@@ -274,18 +316,25 @@ abstract class Publicize_Base {
}
// only work with certain statuses (avoids inherits, auto drafts etc)
- if ( !in_array( $post->post_status, array( 'publish', 'draft', 'future' ) ) )
+ if ( !in_array( $post->post_status, array( 'publish', 'draft', 'future' ) ) ) {
$submit_post = false;
+ }
// don't publish password protected posts
- if ( '' !== $post->post_password )
+ if ( '' !== $post->post_password ) {
$submit_post = false;
+ }
// Did this request happen via wp-admin?
$from_web = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST[$this->ADMIN_PAGE] );
- if ( ( $from_web || defined( 'POST_BY_EMAIL' ) ) && !empty( $_POST['wpas_title'] ) )
- update_post_meta( $post_id, $this->POST_MESS, trim( stripslashes( $_POST['wpas_title'] ) ) );
+ if ( ( $from_web || defined( 'POST_BY_EMAIL' ) ) && isset( $_POST['wpas_title'] ) ) {
+ if ( empty( $_POST['wpas_title'] ) ) {
+ delete_post_meta( $post_id, $this->POST_MESS );
+ } else {
+ update_post_meta( $post_id, $this->POST_MESS, trim( stripslashes( $_POST['wpas_title'] ) ) );
+ }
+ }
// change current user to provide context for get_services() if we're running during cron
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
@@ -305,6 +354,7 @@ abstract class Publicize_Base {
elseif ( ! empty( $connection['connection_data'] ) )
$connection_data = $connection['connection_data'];
+ /** This action is documented in modules/publicize/ui.php */
if ( false == apply_filters( 'wpas_submit_post?', $submit_post, $post_id, $service_name, $connection_data ) ) {
delete_post_meta( $post_id, $this->PENDING );
continue;
@@ -319,7 +369,7 @@ abstract class Publicize_Base {
if ( $from_web ) {
// delete stray service-based post meta
delete_post_meta( $post_id, $this->POST_SKIP . $service_name );
-
+
// We *unchecked* this stream from the admin page, or it's set to readonly, or it's a new addition
if ( empty( $_POST[$this->ADMIN_PAGE]['submit'][$unique_id] ) ) {
// Also make sure that the service-specific input isn't there.
@@ -339,8 +389,18 @@ abstract class Publicize_Base {
}
}
- // Users may hook in here and do anything else they need to after meta is written,
- // and before the post is processed for Publicize.
+ /**
+ * Fires right before the post is processed for Publicize.
+ * Users may hook in here and do anything else they need to after meta is written,
+ * and before the post is processed for Publicize.
+ *
+ * @since 2.1.2
+ *
+ * @param bool $submit_post Should the post be publicized.
+ * @param int $post->ID Post ID.
+ * @param string $service_name Service name.
+ * @param array $connection Array of connection details.
+ */
do_action( 'publicize_save_meta', $submit_post, $post_id, $service_name, $connection );
}
}
diff --git a/plugins/jetpack/modules/publicize/ui.php b/plugins/jetpack/modules/publicize/ui.php
index 7d946766..6847c6d4 100644
--- a/plugins/jetpack/modules/publicize/ui.php
+++ b/plugins/jetpack/modules/publicize/ui.php
@@ -8,7 +8,7 @@ class Publicize_UI {
/**
* Contains an instance of class 'publicize' which loads Keyring, sets up services, etc.
*/
- var $publicize;
+ public $publicize;
/**
* Hooks into WordPress to display the various pieces of UI and load our assets
@@ -18,6 +18,15 @@ class Publicize_UI {
$this->publicize = $publicize = new Publicize;
+ add_action( 'init', array( $this, 'init' ) );
+ }
+
+ function init() {
+ // Show only to users with the capability required to create/delete global connections.
+ if ( ! current_user_can( $this->publicize->GLOBAL_CAP ) ) {
+ return;
+ }
+
// assets (css, js)
add_action( 'load-settings_page_sharing', array( &$this, 'load_assets' ) );
add_action( 'admin_head-post.php', array( &$this, 'post_page_metabox_assets' ) );
@@ -42,9 +51,12 @@ class Publicize_UI {
function management_page() { ?>
<div class="wrap">
<div class="icon32" id="icon-options-general"><br /></div>
- <h2><?php _e( 'Sharing Settings', 'jetpack' ); ?></h2>
+ <h1><?php _e( 'Sharing Settings', 'jetpack' ); ?></h1>
- <?php do_action( 'pre_admin_screen_sharing' ) ?>
+ <?php
+ /** This action is documented in modules/sharedaddy/sharing.php */
+ do_action( 'pre_admin_screen_sharing' );
+ ?>
</div> <?php
}
@@ -102,53 +114,55 @@ class Publicize_UI {
$_blog_id = get_current_blog_id();
?>
- <form action="" id="publicize-form">
- <h3 id="publicize"><?php _e( 'Publicize', 'jetpack' ) ?></h3>
-
- <?php
- if ( !empty( $_GET['action'] ) && 'deny' == $_GET['action'] )
- $this->denied_notice();
- ?>
-
- <p>
- <?php esc_html_e( 'Connect your blog to popular social networking sites and automatically share new posts with your friends.', 'jetpack' ) ?>
- <?php esc_html_e( 'You can make a connection for just yourself or for all users on your blog. Shared connections are marked with the (Shared) text.', 'jetpack' ); ?>
- </p>
-
- <?php
- if ( $this->in_jetpack )
- $doc_link = "http://jetpack.me/support/publicize/";
- else
- $doc_link = "http://en.support.wordpress.com/publicize/";
- ?>
-
- <p>&rarr; <a href="<?php echo esc_url( $doc_link ); ?>" target="_blank"><?php esc_html_e( 'More information on using Publicize.', 'jetpack' ); ?></a></p>
-
- <div id="publicize-services-block">
- <?php
- $services = $this->publicize->get_services( 'all' );
- $total_num_of_services = count ( $services );
- $service_num = 0;?>
-
- <div class='left'>
-
- <?php
- foreach ( $services as $name => $service ) :
- $connect_url = $this->publicize->connect_url( $name );
- if ( $service_num == ( round ( ( $total_num_of_services / 2 ), 0 ) ) )
- echo "</div><div class='right'>";
- $service_num++;
- ?>
- <div class="publicize-service-entry" <?php if ( $service_num > 0 ): ?>class="connected"<?php endif; ?> >
- <div id="<?php echo esc_attr( $name ); ?>" class="publicize-service-left">
- <a href="<?php echo esc_url( $connect_url ); ?>" id="service-link-<?php echo esc_attr( $name ); ?>" target="_top"><?php echo $this->publicize->get_service_label( $name ); ?></a>
- </div>
+ <form action="" id="publicize-form">
+ <h2 id="publicize"><?php _e( 'Publicize', 'jetpack' ) ?></h2>
+
+ <?php
+ if ( ! empty( $_GET['action'] ) && 'deny' == $_GET['action'] ) {
+ $this->denied_notice();
+ }
+ ?>
+
+ <p>
+ <?php esc_html_e( 'Connect your blog to popular social networking sites and automatically share new posts with your friends.', 'jetpack' ) ?>
+ <?php esc_html_e( 'You can make a connection for just yourself or for all users on your blog. Shared connections are marked with the (Shared) text.', 'jetpack' ); ?>
+ </p>
+
+ <?php
+ if ( $this->in_jetpack ) {
+ $doc_link = "http://jetpack.me/support/publicize/";
+ } else {
+ $doc_link = "http://en.support.wordpress.com/publicize/";
+ }
+ ?>
+
+ <p>&rarr; <a href="<?php echo esc_url( $doc_link ); ?>" target="_blank"><?php esc_html_e( 'More information on using Publicize.', 'jetpack' ); ?></a></p>
+
+ <div id="publicize-services-block">
+ <?php
+ $services = $this->publicize->get_services( 'all' );
+ $total_num_of_services = count ( $services );
+ $service_num = 0;?>
+ <div class='left'>
- <div class="publicize-service-right">
- <?php if ( $this->publicize->is_enabled( $name ) && $connections = $this->publicize->get_connections( $name ) ) : ?>
- <ul>
- <?php
+ <?php
+ foreach ( $services as $name => $service ) :
+ $connect_url = $this->publicize->connect_url( $name );
+ if ( $service_num == ( round ( ( $total_num_of_services / 2 ), 0 ) ) )
+ echo "</div><div class='right'>";
+ $service_num++;
+ ?>
+ <div class="publicize-service-entry" <?php if ( $service_num > 0 ): ?>class="connected"<?php endif; ?> >
+ <div id="<?php echo esc_attr( $name ); ?>" class="publicize-service-left">
+ <a href="<?php echo esc_url( $connect_url ); ?>" id="service-link-<?php echo esc_attr( $name ); ?>" target="_top"><?php echo $this->publicize->get_service_label( $name ); ?></a>
+ </div>
+
+
+ <div class="publicize-service-right">
+ <?php if ( $this->publicize->is_enabled( $name ) && $connections = $this->publicize->get_connections( $name ) ) : ?>
+ <ul>
+ <?php
foreach( $connections as $c ) :
$id = $this->publicize->get_connection_id( $c );
$disconnect_url = $this->publicize->disconnect_url( $name, $id );
@@ -202,47 +216,39 @@ class Publicize_UI {
<?php
endforeach;
- ?>
- </ul>
- <?php endif; ?>
+ ?>
+ </ul>
+ <?php endif; ?>
- <?php
- $connections = $this->publicize->get_connections( $name );
- if ( empty ( $connections ) ) { ?>
+ <?php
+ $connections = $this->publicize->get_connections( $name );
+ if ( empty ( $connections ) ) { ?>
<a id="<?php echo esc_attr( $name ); ?>" class="publicize-add-connection button" href="<?php echo esc_url( $connect_url ); ?>" target="_top"><?php echo esc_html( __( 'Connect', 'jetpack' ) ); ?></a>
- <?php } else { ?>
+ <?php } else { ?>
<a id="<?php echo esc_attr( $name ); ?>" class="publicize-add-connection button add-new" href="<?php echo esc_url( $connect_url ); ?>" target="_top"><?php echo esc_html( __( 'Add New', 'jetpack' ) ); ?></a>
<?php } ?>
-
-
- <?php
- $help = apply_filters( 'publicize_help_text_' . $name, false );
- if ( $help ) {
- echo ' <a href="javascript:void(0);" title="' . esc_attr( $help ) . '" class="publicize-info">?</a>';
- }
- ?>
</div>
</div>
<?php endforeach; ?>
</div>
<script>
- (function($){
- $('.pub-disconnect-button').on('click', function(e){ if ( confirm( '<?php echo esc_js( __( 'Are you sure you want to stop Publicizing posts to this connection?', 'jetpack' ) ); ?>' ) ) {
+ (function($){
+ $('.pub-disconnect-button').on('click', function(e){ if ( confirm( '<?php echo esc_js( __( 'Are you sure you want to stop Publicizing posts to this connection?', 'jetpack' ) ); ?>' ) ) {
return true;
} else {
- e.preventDefault();
- return false;
- }
- })
- })(jQuery);
- </script>
- </div>
+ e.preventDefault();
+ return false;
+ }
+ })
+ })(jQuery);
+ </script>
+ </div>
<?php wp_nonce_field( "wpas_posts_{$_blog_id}", "_wpas_posts_{$_blog_id}_nonce" ); ?>
<input type="hidden" id="wpas_ajax_blog_id" name="wpas_ajax_blog_id" value="<?php echo $_blog_id; ?>" />
- </form><?php
+ </form><?php
}
@@ -288,7 +294,7 @@ class Publicize_UI {
/**
* CSS for styling the publicize message box and counter that displays on the post page.
- * There is also some Javascript for length counting and some basic display effects.
+ * There is also some JavaScript for length counting and some basic display effects.
*/
function post_page_metabox_assets() {
global $post;
@@ -306,8 +312,8 @@ class Publicize_UI {
<script type="text/javascript">
jQuery( function($) {
var wpasTitleCounter = $( '#wpas-title-counter' ),
- wpasTwitterCheckbox = $( '.wpas-submit-twitter' ).size(),
- wpasTitle = $('#wpas-title').keyup( function() {
+ wpasTwitterCheckbox = $( '.wpas-submit-twitter' ).size(),
+ wpasTitle = $('#wpas-title').keyup( function() {
var length = wpasTitle.val().length;
wpasTitleCounter.text( length );
if ( wpasTwitterCheckbox && length > 140 ) {
@@ -315,8 +321,8 @@ jQuery( function($) {
} else {
wpasTitleCounter.removeClass( 'wpas-twitter-length-limit' );
}
- } ),
- authClick = false;
+ } ),
+ authClick = false;
$('#publicize-disconnected-form-show').click( function() {
$('#publicize-form').slideDown( 'fast' );
@@ -391,7 +397,7 @@ jQuery( function($) {
$( '.pub-service' ).click( function() {
var service = $(this).data( 'service' ),
- fakebox = '<input id="wpas-submit-' + service + '" type="hidden" value="1" name="wpas[submit][' + service + ']" />';
+ fakebox = '<input id="wpas-submit-' + service + '" type="hidden" value="1" name="wpas[submit][' + service + ']" />';
$( '#add-publicize-check' ).append( fakebox );
} );
@@ -553,13 +559,27 @@ jQuery( function($) {
elseif ( ! empty( $connection['connection_data'] ) )
$connection_data = $connection['connection_data'];
- if ( !$continue = apply_filters( 'wpas_submit_post?', true, $post->ID, $name, $connection_data ) )
+ /**
+ * Filter whether a post should be publicized to a given service.
+ *
+ * @module publicize
+ *
+ * @since 2.0.0
+ *
+ * @param bool true Should the post be publicized to a given service? Default to true.
+ * @param int $post->ID Post ID.
+ * @param string $name Service name.
+ * @param array $connection_data Array of information about all Publicize details for the site.
+ */
+ if ( ! $continue = apply_filters( 'wpas_submit_post?', true, $post->ID, $name, $connection_data ) ) {
continue;
+ }
- if ( !empty( $connection->unique_id ) )
+ if ( ! empty( $connection->unique_id ) ) {
$unique_id = $connection->unique_id;
- else if ( !empty( $connection['connection_data']['token_id'] ) )
+ } else if ( ! empty( $connection['connection_data']['token_id'] ) ) {
$unique_id = $connection['connection_data']['token_id'];
+ }
// Should we be skipping this one?
$skip = (
@@ -595,20 +615,46 @@ jQuery( function($) {
$hidden_checkbox = false;
if ( !$done && ( 0 == $cmeta['connection_data']['user_id'] && !current_user_can( $this->publicize->GLOBAL_CAP ) ) ) {
$disabled = ' disabled="disabled"';
- $hidden_checkbox = true;
+ /**
+ * Filters the checkboxes for global connections with non-prilvedged users.
+ *
+ * @module publicize
+ *
+ * @since 3.7.0
+ *
+ * @param bool $checked Indicates if this connection should be enabled. Default true.
+ * @param int $post->ID ID of the current post
+ * @param string $name Name of the connection (Facebook, Twitter, etc)
+ * @param array $connection Array of data about the connection.
+ */
+ $hidden_checkbox = apply_filters( 'publicize_checkbox_global_default', true, $post->ID, $name, $connection );
}
// Determine the state of the checkbox (on/off) and allow filtering
$checked = $skip != 1 || $done;
+ /**
+ * Filter the checkbox state of each Publicize connection appearing in the post editor.
+ *
+ * @module publicize
+ *
+ * @since 2.0.1
+ *
+ * @param bool $checked Should the Publicize checkbox be enabled for a given service.
+ * @param int $post->ID Post ID.
+ * @param string $name Service name.
+ * @param array $connection Array of connection details.
+ */
$checked = apply_filters( 'publicize_checkbox_default', $checked, $post->ID, $name, $connection );
// Force the checkbox to be checked if the post was DONE, regardless of what the filter does
- if ( $done )
+ if ( $done ) {
$checked = true;
+ }
// This post has been handled, so disable everything
- if ( $all_done )
+ if ( $all_done ) {
$disabled = ' disabled="disabled"';
+ }
$label = sprintf(
_x( '%1$s: %2$s', 'Service: Account connected as', 'jetpack' ),
@@ -638,11 +684,12 @@ jQuery( function($) {
}
}
- if ( $title = get_post_meta( $post->ID, $this->publicize->POST_MESS, true ) )
+ if ( $title = get_post_meta( $post->ID, $this->publicize->POST_MESS, true ) ) {
$title = esc_html( $title );
- else
+ } else {
$title = '';
- ?>
+ }
+ ?>
</ul>
@@ -698,7 +745,18 @@ jQuery( function($) {
<a href="#" id="publicize-disconnected-form-show"><?php _e( 'Show', 'jetpack' ); ?></a><br />
<?php endif; ?>
- <?php echo apply_filters( 'publicize_form', $publicize_form ); ?>
+ <?php
+ /**
+ * Filter the Publicize details form.
+ *
+ * @module publicize
+ *
+ * @since 2.0.0
+ *
+ * @param string $publicize_form Publicize Details form appearing above Publish button in the editor.
+ */
+ echo apply_filters( 'publicize_form', $publicize_form );
+ ?>
</div> <?php // #publicize
}
diff --git a/plugins/jetpack/modules/related-posts.php b/plugins/jetpack/modules/related-posts.php
index 6aac9d22..ac6ccbf7 100644
--- a/plugins/jetpack/modules/related-posts.php
+++ b/plugins/jetpack/modules/related-posts.php
@@ -1,15 +1,16 @@
<?php
/**
* Module Name: Related Posts
- * Module Description: Display links to your related content under posts and pages.
- * Jumpstart Description: keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post.
+ * Module Description: Display similar content.
+ * Jumpstart Description: Keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post.
* First Introduced: 2.9
* Sort Order: 29
* Recommendation Order: 9
* Requires Connection: Yes
* Auto Activate: No
* Module Tags: Recommended
- * Feature: Recommended, Jumpstart
+ * Feature: Recommended, Jumpstart, Traffic
+ * Additional Search Queries: related, related posts
*/
class Jetpack_RelatedPosts_Module {
/**
diff --git a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
index 4be69953..565759be 100644
--- a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
+++ b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
@@ -180,6 +180,15 @@ class Jetpack_RelatedPosts {
$headline = '';
}
+ /**
+ * Filter the Related Posts headline.
+ *
+ * @module related-posts
+ *
+ * @since 3.0.0
+ *
+ * @param string $headline Related Posts heading.
+ */
$headline = apply_filters( 'jetpack_relatedposts_filter_headline', $headline );
if ( $this->_previous_post_id ) {
@@ -219,17 +228,26 @@ EOT;
public function get_options() {
if ( null === $this->_options ) {
$this->_options = Jetpack_Options::get_option( 'relatedposts' );
- if ( !is_array( $this->_options ) )
+ if ( ! is_array( $this->_options ) )
$this->_options = array();
- if ( !isset( $this->_options['enabled'] ) )
+ if ( ! isset( $this->_options['enabled'] ) )
$this->_options['enabled'] = true;
- if ( !isset( $this->_options['show_headline'] ) )
+ if ( ! isset( $this->_options['show_headline'] ) )
$this->_options['show_headline'] = true;
- if ( !isset( $this->_options['show_thumbnails'] ) )
+ if ( ! isset( $this->_options['show_thumbnails'] ) )
$this->_options['show_thumbnails'] = false;
if ( empty( $this->_options['size'] ) || (int)$this->_options['size'] < 1 )
$this->_options['size'] = 3;
+ /**
+ * Filter Related Posts basic options.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array $this->_options Array of basic Related Posts options.
+ */
$this->_options = apply_filters( 'jetpack_relatedposts_filter_options', $this->_options );
}
@@ -495,12 +513,42 @@ EOT;
'exclude_post_ids' => array(),
);
$args = wp_parse_args( $args, $defaults );
+ /**
+ * Filter the arguments used to retrieve a list of Related Posts.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array $args Array of options to retrieve Related Posts.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$args = apply_filters( 'jetpack_relatedposts_filter_args', $args, $post_id );
$filters = $this->_get_es_filters_from_args( $post_id, $args );
+ /**
+ * Filter ElasticSearch options used to calculate Related Posts.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array $filters Array of ElasticSearch filters based on the post_id and args.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$filters = apply_filters( 'jetpack_relatedposts_filter_filters', $filters, $post_id );
$results = $this->_get_related_posts( $post_id, $args['size'], $filters );
+ /**
+ * Filter the array of related posts matched by ElasticSearch.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array $results Array of related posts matched by ElasticSearch.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
return apply_filters( 'jetpack_relatedposts_returned_results', $results, $post_id );
}
@@ -521,6 +569,16 @@ EOT;
protected function _get_es_filters_from_args( $post_id, array $args ) {
$filters = array();
+ /**
+ * Filter the terms used to search for Related Posts.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array $args['has_terms'] Array of terms associated to the Related Posts.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$args['has_terms'] = apply_filters( 'jetpack_relatedposts_filter_has_terms', $args['has_terms'], $post_id );
if ( ! empty( $args['has_terms'] ) ) {
foreach( (array)$args['has_terms'] as $term ) {
@@ -541,6 +599,16 @@ EOT;
}
}
+ /**
+ * Filter the Post Types where we search Related Posts.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array $args['post_type'] Array of Post Types.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$args['post_type'] = apply_filters( 'jetpack_relatedposts_filter_post_type', $args['post_type'], $post_id );
$valid_post_types = get_post_types();
if ( is_array( $args['post_type'] ) ) {
@@ -555,6 +623,16 @@ EOT;
$filters[] = array( 'term' => array( 'post_type' => $args['post_type'] ) );
}
+ /**
+ * Filter the Post Formats where we search Related Posts.
+ *
+ * @module related-posts
+ *
+ * @since 3.3.0
+ *
+ * @param array $args['post_formats'] Array of Post Formats.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$args['post_formats'] = apply_filters( 'jetpack_relatedposts_filter_post_formats', $args['post_formats'], $post_id );
$valid_post_formats = get_post_format_strings();
$sanitized_post_formats = array();
@@ -567,6 +645,16 @@ EOT;
$filters[] = array( 'terms' => array( 'post_format' => $sanitized_post_formats ) );
}
+ /**
+ * Filter the date range used to search Related Posts.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array $args['date_range'] Array of a month interval where we search Related Posts.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$args['date_range'] = apply_filters( 'jetpack_relatedposts_filter_date_range', $args['date_range'], $post_id );
if ( is_array( $args['date_range'] ) && ! empty( $args['date_range'] ) ) {
$args['date_range'] = array_map( 'intval', $args['date_range'] );
@@ -579,6 +667,16 @@ EOT;
}
}
+ /**
+ * Filter the Post IDs excluded from appearing in Related Posts.
+ *
+ * @module related-posts
+ *
+ * @since 2.9.0
+ *
+ * @param array $args['exclude_post_ids'] Array of Post IDs.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$args['exclude_post_ids'] = apply_filters( 'jetpack_relatedposts_filter_exclude_post_ids', $args['exclude_post_ids'], $post_id );
if ( !empty( $args['exclude_post_ids'] ) && is_array( $args['exclude_post_ids'] ) ) {
foreach ( $args['exclude_post_ids'] as $exclude_post_id) {
@@ -674,13 +772,49 @@ EOT;
'title' => $this->_to_utf8( $this->_get_title( $post->post_title, $post->post_content ) ),
'date' => get_the_date( '', $post->ID ),
'format' => get_post_format( $post->ID ),
- 'excerpt' => $this->_to_utf8( $this->_get_excerpt( $post->post_excerpt, $post->post_content ) ),
+ 'excerpt' => html_entity_decode( $this->_to_utf8( $this->_get_excerpt( $post->post_excerpt, $post->post_content ) ), ENT_QUOTES, 'UTF-8' ),
+ /**
+ * Filters the rel attribute for the Related Posts' links.
+ *
+ * @module related-posts
+ *
+ * @since 3.7.0
+ *
+ * @param string nofollow Link rel attribute for Related Posts' link. Default is nofollow.
+ * @param int $post->ID Post ID.
+ */
+ 'rel' => apply_filters( 'jetpack_relatedposts_filter_post_link_rel', 'nofollow', $post->ID ),
+ /**
+ * Filter the context displayed below each Related Post.
+ *
+ * @module related-posts
+ *
+ * @since 3.0.0
+ *
+ * @param string $this->_to_utf8( $this->_generate_related_post_context( $post->ID ) ) Context displayed below each related post.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
'context' => apply_filters(
'jetpack_relatedposts_filter_post_context',
$this->_to_utf8( $this->_generate_related_post_context( $post->ID ) ),
$post->ID
),
'img' => $this->_generate_related_post_image_params( $post->ID ),
+ /**
+ * Filter the post css classes added on HTML markup.
+ *
+ * @module related-posts
+ *
+ * @since 3.8.0
+ *
+ * @param array array() CSS classes added on post HTML markup.
+ * @param string $post_id Post ID.
+ */
+ 'classes' => apply_filters(
+ 'jetpack_relatedposts_filter_post_css_classes',
+ array(),
+ $post->ID
+ ),
);
}
@@ -742,6 +876,15 @@ EOT;
return $image_params;
}
+ /**
+ * Filter the size of the Related Posts images.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param array array( 'width' => 350, 'height' => 200 ) Size of the images displayed below each Related Post.
+ */
$thumbnail_size = apply_filters(
'jetpack_relatedposts_filter_thumbnail_size',
array( 'width' => 350, 'height' => 200 )
@@ -823,6 +966,16 @@ EOT;
)
);
+ /**
+ * Filter the Related Posts matched by ElasticSearch.
+ *
+ * @module related-posts
+ *
+ * @since 2.9.0
+ *
+ * @param array $hits Array of Post IDs matched by ElasticSearch.
+ * @param string $post_id Post ID of the post for which we are retrieving Related Posts.
+ */
$hits = apply_filters( 'jetpack_relatedposts_filter_hits', $hits, $post_id );
$related_posts = array();
@@ -902,7 +1055,7 @@ EOT;
}
// Set new cache value if valid
- if ( !empty( $related_posts ) ) {
+ if ( ! empty( $related_posts ) ) {
$new_cache[ $cache_key ] = array(
'expires' => 12 * HOUR_IN_SECONDS + $now_ts,
'payload' => $related_posts,
@@ -954,6 +1107,16 @@ EOT;
_x( 'In "%s"', 'in {category/tag name}', 'jetpack' ),
$category->name
);
+ /**
+ * Filter the "In Category" line displayed in the post context below each Related Post.
+ *
+ * @module related-posts
+ *
+ * @since 3.2.0
+ *
+ * @param string $post_cat_context "In Category" line displayed in the post context below each Related Post.
+ * @param array $category Array containing information about the category.
+ */
return apply_filters( 'jetpack_relatedposts_post_category_context', $post_cat_context, $category );
}
}
@@ -967,6 +1130,16 @@ EOT;
_x( 'In "%s"', 'in {category/tag name}', 'jetpack' ),
$tag->name
);
+ /**
+ * Filter the "In Tag" line displayed in the post context below each Related Post.
+ *
+ * @module related-posts
+ *
+ * @since 3.2.0
+ *
+ * @param string $post_tag_context "In Tag" line displayed in the post context below each Related Post.
+ * @param array $tag Array containing information about the tag.
+ */
return apply_filters( 'jetpack_relatedposts_post_tag_context', $post_tag_context, $tag );
}
}
@@ -1018,7 +1191,15 @@ EOT;
$enabled = false;
}
- // Allow filters to override
+ /**
+ * Filter the Enabled value to allow related posts to be shown on pages as well.
+ *
+ * @module related-posts
+ *
+ * @since 3.3.0
+ *
+ * @param bool $enabled Should Related Posts be enabled on the current page.
+ */
return apply_filters( 'jetpack_relatedposts_filter_enabled_for_request', $enabled );
}
@@ -1067,6 +1248,15 @@ EOT;
protected function _allow_feature_toggle() {
if ( null === $this->_allow_feature_toggle ) {
+ /**
+ * Filter the display of the Related Posts toggle in Settings > Reading.
+ *
+ * @module related-posts
+ *
+ * @since 2.8.0
+ *
+ * @param bool false Display a feature toggle. Default to false.
+ */
$this->_allow_feature_toggle = apply_filters( 'jetpack_relatedposts_filter_allow_feature_toggle', false );
}
return $this->_allow_feature_toggle;
@@ -1121,6 +1311,9 @@ class Jetpack_RelatedPosts_Raw extends Jetpack_RelatedPosts {
)
);
+ /** This filter is already documented in modules/related-posts/related-posts.php */
+ $hits = apply_filters( 'jetpack_relatedposts_filter_hits', $hits, $post_id );
+
return $hits;
}
}
diff --git a/plugins/jetpack/modules/related-posts/related-posts.css b/plugins/jetpack/modules/related-posts/related-posts.css
index e0ba3ac2..987b45db 100644
--- a/plugins/jetpack/modules/related-posts/related-posts.css
+++ b/plugins/jetpack/modules/related-posts/related-posts.css
@@ -1,17 +1,18 @@
/**
- * Styles for Jetpack related posts
+ * Jetpack related posts
*/
/* Container */
-div#jp-relatedposts {
+#jp-relatedposts {
display: none;
padding-top: 1em;
margin: 1em 0;
position: relative;
+ clear: both;
}
-div.jp-relatedposts:after {
+.jp-relatedposts:after {
content: '';
display: block;
clear: both;
@@ -19,7 +20,7 @@ div.jp-relatedposts:after {
/* Headline above related posts section, labeled "Related" */
-div#jp-relatedposts h3.jp-relatedposts-headline {
+#jp-relatedposts h3.jp-relatedposts-headline {
margin: 0 0 1em 0;
display: inline-block;
float: left;
@@ -28,7 +29,7 @@ div#jp-relatedposts h3.jp-relatedposts-headline {
font-family: inherit;
}
-div#jp-relatedposts h3.jp-relatedposts-headline em:before {
+#jp-relatedposts h3.jp-relatedposts-headline em:before {
content: "";
display: block;
width: 100%;
@@ -38,24 +39,24 @@ div#jp-relatedposts h3.jp-relatedposts-headline em:before {
margin-bottom: 1em;
}
-div#jp-relatedposts h3.jp-relatedposts-headline em {
+#jp-relatedposts h3.jp-relatedposts-headline em {
font-style: normal;
font-weight: bold;
}
/* Related posts items (wrapping items) */
-div#jp-relatedposts div.jp-relatedposts-items {
+#jp-relatedposts .jp-relatedposts-items {
clear: left;
}
-div#jp-relatedposts div.jp-relatedposts-items-visual {
+#jp-relatedposts .jp-relatedposts-items-visual {
margin-right: -20px;
}
/* Related posts item */
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post {
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
float: left;
width: 33%;
margin: 0 0 1em; /* Needs to be same as the main outer wrapper for Related Posts */
@@ -64,24 +65,23 @@ div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post {
-webkit-box-sizing: border-box;
}
-div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post {
+#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post {
padding-right: 20px;
- /*cursor: pointer;*/
filter: alpha(opacity=80);
-moz-opacity: .8;
opacity: .8;
}
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+4),
-div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+4) {
+#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;
}
-div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover .jp-relatedposts-post-title a {
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a {
text-decoration: underline;
}
-div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover {
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover {
filter: alpha(opacity=100);
-moz-opacity: 1;
opacity: 1;
@@ -89,16 +89,16 @@ div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover {
/* Related posts item content */
-div#jp-relatedposts div.jp-relatedposts-items-visual h4.jp-relatedposts-post-title,
-div#jp-relatedposts div.jp-relatedposts-items p {
+#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title,
+#jp-relatedposts .jp-relatedposts-items p {
font-size: 14px;
line-height: 20px;
margin: 0;
}
-div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs {
+#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs {
position:relative;
}
-div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay {
+#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay {
position:absolute;
top:0;
bottom:0;
@@ -107,11 +107,11 @@ div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-no
display:block;
}
-div#jp-relatedposts div.jp-relatedposts-items p {
+#jp-relatedposts .jp-relatedposts-items p {
margin-bottom: 0;
}
-div#jp-relatedposts div.jp-relatedposts-items-visual h4.jp-relatedposts-post-title {
+#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title {
text-transform: none;
margin: 0;
font-family: inherit;
@@ -119,7 +119,7 @@ div#jp-relatedposts div.jp-relatedposts-items-visual h4.jp-relatedposts-post-tit
max-width: 100%;
}
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a {
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a {
font-size: inherit;
font-weight: normal;
text-decoration: none;
@@ -128,25 +128,25 @@ div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedp
opacity: 1;
}
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover {
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover {
text-decoration: underline;
}
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post span {
+#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;
}
-div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,
-div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post span {
+#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%;
}
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date,
-div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context {
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date,
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context {
opacity: .6;
}
@@ -156,44 +156,42 @@ div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post .jp-relatedp
}
/* Behavior when there are thumbnails in visual mode */
-div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt {
+#jp-relatedposts .jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt {
display: none;
}
/* Behavior when there are no thumbnails in visual mode */
-div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt {
+#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs p.jp-relatedposts-post-excerpt {
overflow: hidden;
}
-div#jp-relatedposts div.jp-relatedposts-items-visual div.jp-relatedposts-post-nothumbs span {
+#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs span {
margin-bottom: 1em;
}
-/**
+/*
* Responsive
*/
@media only screen and (max-width: 640px) {
- div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post {
+ #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
width: 50%;
}
- div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n) {
+ #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:nth-child(3n) {
clear: left;
}
- div#jp-relatedposts div.jp-relatedposts-items-visual {
+ #jp-relatedposts .jp-relatedposts-items-visual {
margin-right: 20px;
}
-
}
@media only screen and (max-width: 320px) {
- div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post {
+ #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
width: 100%;
clear: both;
margin: 0 0 1em;
}
-
}
diff --git a/plugins/jetpack/modules/related-posts/related-posts.js b/plugins/jetpack/modules/related-posts/related-posts.js
index 45a8db8c..4c7f314c 100644
--- a/plugins/jetpack/modules/related-posts/related-posts.js
+++ b/plugins/jetpack/modules/related-posts/related-posts.js
@@ -22,7 +22,7 @@
}
var args = 'relatedposts=1';
- if ( ! $( '#jp-relatedposts' ).data( 'exclude' ) ) {
+ if ( $( '#jp-relatedposts' ).data( 'exclude' ) ) {
args += '&relatedposts_exclude=' + $( '#jp-relatedposts' ).data( 'exclude' );
}
@@ -50,7 +50,7 @@
'class': classNames,
'href': post.url,
'title': anchor_title,
- 'rel': 'nofollow',
+ 'rel': post.rel,
'data-origin': post.url_meta.origin,
'data-position': post.url_meta.position
});
@@ -70,6 +70,10 @@
var anchor = self.getAnchor( post, 'jp-relatedposts-post-a' );
var classes = 'jp-relatedposts-post jp-relatedposts-post' + index;
+ if ( post.classes.length > 0 ) {
+ classes += ' ' + post.classes.join( ' ' );
+ }
+
html += '<p class="' + classes + '" data-post-id="' + post.id + '" data-post-format="' + post.format + '">';
html += '<span class="jp-relatedposts-post-title">' + anchor[0] + post.title + anchor[1] + '</span>';
html += '<span class="jp-relatedposts-post-date">' + post.date + '</span>';
@@ -86,6 +90,11 @@
$.each( posts, function( index, post ) {
var anchor = self.getAnchor( post, 'jp-relatedposts-post-a' );
var classes = 'jp-relatedposts-post jp-relatedposts-post' + index;
+
+ if ( post.classes.length > 0 ) {
+ classes += ' ' + post.classes.join( ' ' );
+ }
+
if ( ! post.img.src ) {
classes += ' jp-relatedposts-post-nothumbs';
} else {
@@ -100,7 +109,7 @@
html += anchor_overlay[0] + anchor_overlay[1];
}
html += '<h4 class="jp-relatedposts-post-title">' + anchor[0] + post.title + anchor[1] + '</h4>';
- html += '<p class="jp-relatedposts-post-excerpt">' + post.excerpt + '</p>';
+ html += '<p class="jp-relatedposts-post-excerpt">' + $( '<p>' ).text( post.excerpt ).html() + '</p>';
html += '<p class="jp-relatedposts-post-date">' + post.date + '</p>';
html += '<p class="jp-relatedposts-post-context">' + post.context + '</p>';
html += '</div>';
diff --git a/plugins/jetpack/modules/sharedaddy.php b/plugins/jetpack/modules/sharedaddy.php
index e7613e12..57b285ff 100644
--- a/plugins/jetpack/modules/sharedaddy.php
+++ b/plugins/jetpack/modules/sharedaddy.php
@@ -1,7 +1,7 @@
<?php
/**
* Module Name: Sharing
- * Module Description: Allow visitors to share your content on Facebook, Twitter, and more with a click.
+ * Module Description: Visitors can share your content.
* Jumpstart Description: Twitter, Facebook and Google+ buttons at the bottom of each post, making it easy for visitors to share your content.
* Sort Order: 7
* Recommendation Order: 6
@@ -10,7 +10,8 @@
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Social, Recommended
- * Feature: Recommended, Jumpstart
+ * Feature: Recommended, Jumpstart, Traffic
+ * Additional Search Queries: share, sharing, sharedaddy, buttons, icons, email, facebook, twitter, google+, linkedin, pinterest, pocket, press this, print, reddit, tumblr
*/
if ( !function_exists( 'sharing_init' ) )
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
index bd429ef7..f4e1b366 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
@@ -30,7 +30,7 @@
}
#enabled-services {
- padding-bottom: 20px;
+ padding-bottom: 20px;
}
#available-services, #enabled-services {
@@ -131,12 +131,12 @@ li.service.share-reddit span:before {
li.service.share-tumblr span:before {
content: '\f214';
}
-li.service.share-stumbleupon span:before {
- content: '\f223';
-}
li.service.share-pocket span:before {
content: '\f224';
}
+li.service.share-skype span:before {
+ content: '\f220';
+}
li.service.share-pinterest span:before {
content: '\f209';
}
@@ -172,7 +172,7 @@ div.sd-social-icon .inner li.preview-item a span {
div.sd-social-icon ul.preview li.preview-item.preview-custom a span {
display: inline-block;
-
+
}
.services .preview li.share-custom a {
@@ -293,14 +293,6 @@ body.settings_page_sharing .advanced input[type=submit] {
height:21px;
}
-.preview-stumbleupon .option-smart-on {
- background: url(images/smart-stumbleupon.png) no-repeat top right;
- background-size: 74px 18px;
- width: 74px;
- height: 18px;
- margin-top: 1px;
-}
-
.preview-facebook .option-smart-on {
background: url(images/smart-like.png) no-repeat top right;
background-size: 85px 20px;
@@ -310,8 +302,8 @@ body.settings_page_sharing .advanced input[type=submit] {
.preview-twitter .option-smart-on {
background: url(images/smart-twitter.png?1) no-repeat top right;
- background-size: 92px 20px;
- width:92px;
+ background-size: 60px 20px;
+ width:60px;
height:20px;
}
@@ -351,6 +343,13 @@ body.settings_page_sharing .advanced input[type=submit] {
height: 20px;
}
+.preview-skype .option-smart-on {
+ background: url(images/smart-skype.png) no-repeat top right;
+ background-size: 60px 20px;
+ width: 60px;
+ height: 20px;
+}
+
/**
* Overflow sharing dialog
@@ -399,4 +398,3 @@ body.settings_page_sharing .advanced input[type=submit] {
width: 0;
text-indent: 100%;
}
-
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css
index 6272dc02..1807d0a6 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css
@@ -1 +1 @@
-#services-config{min-width:700px;width:100%;float:right}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:right;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-left:10px;padding:5px 5px 5px 10px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-left:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-stumbleupon span:before{content:'\f223'}li.service.share-pocket span:before{content:'\f224'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:right;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:right}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 10px 8px 14px;margin-right:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:left;padding-top:10px;padding-left:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:right;margin-top:10px;margin-left:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-left:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 0 0 5px}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top right/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top right/104px 21px no-repeat;width:104px;height:21px}.preview-stumbleupon .option-smart-on{background:url(images/smart-stumbleupon.png) top right/74px 18px no-repeat;width:74px;height:18px;margin-top:1px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top right/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top right/92px 20px no-repeat;width:92px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top right/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top right/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top right/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top right/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 0 0 6px}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
+#services-config{min-width:700px;width:100%;float:right}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:right;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-left:10px;padding:5px 5px 5px 10px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-left:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-pocket span:before{content:'\f224'}li.service.share-skype span:before{content:'\f220'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:right;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:right}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 10px 8px 14px;margin-right:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:left;padding-top:10px;padding-left:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:right;margin-top:10px;margin-left:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-left:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 0 0 5px}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top right/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top right/104px 21px no-repeat;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top right/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top right/60px 20px no-repeat;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top right/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top right/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top right/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top right/60px 20px no-repeat;width:60px;height:20px}.preview-skype .option-smart-on{background:url(images/smart-skype.png) top right/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 0 0 6px}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing.css b/plugins/jetpack/modules/sharedaddy/admin-sharing.css
index dd4982e4..c61df08e 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.css
@@ -30,7 +30,7 @@
}
#enabled-services {
- padding-bottom: 20px;
+ padding-bottom: 20px;
}
#available-services, #enabled-services {
@@ -131,12 +131,12 @@ li.service.share-reddit span:before {
li.service.share-tumblr span:before {
content: '\f214';
}
-li.service.share-stumbleupon span:before {
- content: '\f223';
-}
li.service.share-pocket span:before {
content: '\f224';
}
+li.service.share-skype span:before {
+ content: '\f220';
+}
li.service.share-pinterest span:before {
content: '\f209';
}
@@ -172,7 +172,7 @@ div.sd-social-icon .inner li.preview-item a span {
div.sd-social-icon ul.preview li.preview-item.preview-custom a span {
display: inline-block;
-
+
}
.services .preview li.share-custom a {
@@ -293,14 +293,6 @@ body.settings_page_sharing .advanced input[type=submit] {
height:21px;
}
-.preview-stumbleupon .option-smart-on {
- background: url(images/smart-stumbleupon.png) no-repeat top left;
- background-size: 74px 18px;
- width: 74px;
- height: 18px;
- margin-top: 1px;
-}
-
.preview-facebook .option-smart-on {
background: url(images/smart-like.png) no-repeat top left;
background-size: 85px 20px;
@@ -310,8 +302,8 @@ body.settings_page_sharing .advanced input[type=submit] {
.preview-twitter .option-smart-on {
background: url(images/smart-twitter.png?1) no-repeat top left;
- background-size: 92px 20px;
- width:92px;
+ background-size: 60px 20px;
+ width:60px;
height:20px;
}
@@ -351,6 +343,13 @@ body.settings_page_sharing .advanced input[type=submit] {
height: 20px;
}
+.preview-skype .option-smart-on {
+ background: url(images/smart-skype.png) no-repeat top left;
+ background-size: 60px 20px;
+ width: 60px;
+ height: 20px;
+}
+
/**
* Overflow sharing dialog
@@ -399,4 +398,3 @@ body.settings_page_sharing .advanced input[type=submit] {
width: 0;
text-indent: 100%;
}
-
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css b/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
index 3ce68a3c..ca0413da 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
@@ -1 +1 @@
-#services-config{min-width:700px;width:100%;float:left}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:left;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-right:10px;padding:5px 10px 5px 5px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-right:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-stumbleupon span:before{content:'\f223'}li.service.share-pocket span:before{content:'\f224'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:left;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:left}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 14px 8px 10px;margin-left:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:right;padding-top:10px;padding-right:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:left;margin-top:10px;margin-right:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-right:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 5px 0 0}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top left/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top left/104px 21px no-repeat;width:104px;height:21px}.preview-stumbleupon .option-smart-on{background:url(images/smart-stumbleupon.png) top left/74px 18px no-repeat;width:74px;height:18px;margin-top:1px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top left/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top left/92px 20px no-repeat;width:92px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top left/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top left/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top left/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top left/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 6px 0 0}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
+#services-config{min-width:700px;width:100%;float:left}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:left;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-right:10px;padding:5px 10px 5px 5px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-right:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-pocket span:before{content:'\f224'}li.service.share-skype span:before{content:'\f220'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:left;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:left}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 14px 8px 10px;margin-left:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:right;padding-top:10px;padding-right:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:left;margin-top:10px;margin-right:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-right:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 5px 0 0}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top left/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top left/104px 21px no-repeat;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top left/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top left/60px 20px no-repeat;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top left/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top left/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top left/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top left/60px 20px no-repeat;width:60px;height:20px}.preview-skype .option-smart-on{background:url(images/smart-skype.png) top left/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 6px 0 0}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-skype.png b/plugins/jetpack/modules/sharedaddy/images/smart-skype.png
new file mode 100644
index 00000000..dd496692
--- /dev/null
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-skype.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.png b/plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.png
new file mode 100644
index 00000000..a6d0a961
--- /dev/null
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png b/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png
index a5537328..dcbee893 100644
--- a/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png b/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png
index 929bf63c..7015cf60 100644
--- a/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/stumbleupon.png b/plugins/jetpack/modules/sharedaddy/images/stumbleupon.png
deleted file mode 100644
index 5b4858f7..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/stumbleupon.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.png b/plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.png
deleted file mode 100644
index 49e479fc..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/readme.txt b/plugins/jetpack/modules/sharedaddy/readme.txt
deleted file mode 100644
index b2fd2bd3..00000000
--- a/plugins/jetpack/modules/sharedaddy/readme.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-=== Sharedaddy ===
-Contributors: eoigal, johnny5, donncha, polldaddy, automattic
-Tags: share, sharing, email, twitter, facebook, print, reddit, stumbleupon, digg
-Requires at least: 3.0
-Tested up to: 3.1
-Stable tag: trunk
-
-Share your posts with Twitter, Facebook, and a host of other services
-
-== Description ==
-
-Share your posts with Twitter, Facebook, and a host of other services. You can configure services to appear as icons, text, or both. Some services have additional options to display smart buttons, such as Twitter, which will update the number of times the post has been shared.
-
-The following services are included:
-
-* Twitter
-* Facebook
-* Reddit
-* StumbleUpon
-* PressThis
-* Digg
-* Print
-* Email
-
-Additionally you can define your own custom services.
-
-[wpvideo WV0JOwY2]
-
-The plugin is available in the following languages:
-
-* English
-* Japanese, thanks to Naoko McCracken
-* Portuguese, thanks to WordPress Portugal
-* Spanish, thanks to elarequi
-* German, thanks to Jott und die Welt
-* French, thanks to Dario Spagnolo / Aurélie Rochelle
-* Brazilian Portuguese, thanks to Gabriel Reguly
-* Dutch, thanks to Chantal Coolsma
-* Serbian, thanks to Milan Dinić
-
-If you have a translation please send it us and we would be glad to include it for everyone to use!
-
-The following plugins extend Sharedaddy:
-
-* [Mixi Check](http://wordpress.org/extend/plugins/mixi-check/) - support for Mixi
-
-For more detailed information about using this plugin you can refer to these pages:
-
-* http://support.wordpress.com/sharing/
-* http://ryanmarkel.com/2010/08/26/adding-a-custom-sharing-service-to-wordpress-com/
-* http://ryanmarkel.com/2010/08/31/adding-specific-sharing-services-to-sharedaddy/
-* http://wpgarage.com/tips/how-to-add-a-linkedin-share-button-to-sharedaddy/
-
-Note: You will need PHP5 to use this plugin
-
-== Installation ==
-
-Upload the plugin to your blog and activate it. Configure your sharing services from the Settings > Sharing dashboard page
-
-== Screenshots ==
-
-1. Manage sharing services
-2. Share posts
-
-== Changelog ==
-= 0.1 =
-* Initial release
-
-= 0.2 =
-* Fix incorrect link in plugin page
-* Remove debug from JS code
-
-= 0.2.1 =
-* Add Japanese translation, thanks Naoko!
-
-= 0.2.2 =
-* Add Portuguese translation, thanks WordPress Portugal!
-
-= 0.2.3 =
-* Add Spanish, thanks to elarequi!
-
-= 0.2.4 =
-* Fix incorrect icon reference
-
-= 0.2.5 =
-* Add German, thanks to Jott und die Welt!
-* Optimize loading of Digg JS
-
-= 0.2.6 =
-* Add French, thanks to Dario Spagnolo / Aurélie Rochelle!
-
-= 0.2.7 =
-* Add Brazilian Portuguese, thanks to Gabriel
-* Add Dutch, thanks to Chantal
-
-= 0.2.8 =
-* Update Spanish translation (thanks to elarequi)
-* Change CSS link to use wp_enqueue (props to Barry)
-* Add %post_full_url% to custom service tags
-* Fixed removal of sharing option in quickedit (props to dimadin)
-* Add service ID to sharing_permalink filter (props to dimadin)
-* Email service loading.gif is included in the plugin
-* Better RTL support, cleanup style issues in some themes (props to Lance)
-
-= 0.2.9 =
-* Add Serbian translation (thanks to Milan Dinić)
-* Fix double = in Facebook share and rawurlencode like button for better theme compat (props to Lance)
-* Add %post_tags% to custom service tags
-* Allow Facebook like button width to change
-* Language domain fixes (props to dimadin)
-* Add language context to service names
-* Add 'sharing_show' filter to allow custom determination of whether to show sharing links
-* Add option to disable CSS and JS (so it can be moved in theme, if required)
-* Better support for non-multibyte blogs
-
-= 0.2.10 =
-* Restore fixes to Twitter link
-
-= 0.2.11 =
-* Updated German language (thanks to infected)
-* Further improvements to localisation (thanks to Milan Dinić)
-
-= 0.2.12 =
-* Theme placement improvements
-* Add Danish width to Facebook
-* Fix invalid HTML in Twitter iframe
-
-= 0.2.13 =
-* Add Google+1 button
diff --git a/plugins/jetpack/modules/sharedaddy/recaptcha.php b/plugins/jetpack/modules/sharedaddy/recaptcha.php
new file mode 100644
index 00000000..3e4fc915
--- /dev/null
+++ b/plugins/jetpack/modules/sharedaddy/recaptcha.php
@@ -0,0 +1,179 @@
+<?php
+
+/**
+ * Class that handles reCAPTCHA.
+ */
+class Jetpack_ReCaptcha {
+
+ /**
+ * URL to which requests are POSTed.
+ *
+ * @const string
+ */
+ const VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
+
+ /**
+ * Site key to use in HTML code.
+ *
+ * @var string
+ */
+ private $site_key;
+
+ /**
+ * Shared secret for the site.
+ *
+ * @var string
+ */
+ private $secret_key;
+
+ /**
+ * Config for reCAPTCHA instance.
+ *
+ * @var array
+ */
+ private $config;
+
+ /**
+ * Error codes returned from reCAPTCHA API.
+ *
+ * @see https://developers.google.com/recaptcha/docs/verify
+ *
+ * @var array
+ */
+ private $error_codes;
+
+ /**
+ * Create a configured instance to use the reCAPTCHA service.
+ *
+ * @param string $site_key Site key to use in HTML code.
+ * @param string $secret_key Shared secret between site and reCAPTCHA server.
+ * @param array $config Config array to optionally configure reCAPTCHA instance.
+ */
+ public function __construct( $site_key, $secret_key, $config = array() ) {
+ $this->site_key = $site_key;
+ $this->secret_key = $secret_key;
+ $this->config = wp_parse_args( $config, $this->get_default_config() );
+
+ $this->error_codes = array(
+ 'missing-input-secret' => __( 'The secret parameter is missing', 'jetpack' ),
+ 'invalid-input-secret' => __( 'The secret parameter is invalid or malformed', 'jetpack' ),
+ 'missing-input-response' => __( 'The response parameter is missing', 'jetpack' ),
+ 'invalid-input-response' => __( 'The response parameter is invalid or malformed', 'jetpack' ),
+ 'invalid-json' => __( 'Invalid JSON', 'jetpack' ),
+ 'unexpected-response' => __( 'Unexpected response', 'jetpack' ),
+ );
+ }
+
+ /**
+ * Get default config for this reCAPTCHA instance.
+ *
+ * @return array Default config
+ */
+ public function get_default_config() {
+ return array(
+ 'language' => get_locale(),
+ 'script_async' => true,
+ 'tag_class' => 'g-recaptcha',
+ 'tag_attributes' => array(
+ 'theme' => 'light',
+ 'type' => 'image',
+ 'tabindex' => 0,
+ ),
+ );
+ }
+
+ /**
+ * Calls the reCAPTCHA siteverify API to verify whether the user passes
+ * CAPTCHA test.
+ *
+ * @param string $response The value of 'g-recaptcha-response' in the submitted
+ * form.
+ * @param string $remote_ip The end user's IP address.
+ *
+ * @return bool|WP_Error Returns true if verified. Otherwise WP_Error is returned.
+ */
+ public function verify( $response, $remote_ip ) {
+ // No need make a request if response is empty.
+ if ( empty( $response ) ) {
+ return new WP_Error( 'missing-input-response', $this->error_codes['missing-input-response'], 400 );
+ }
+
+ $resp = wp_remote_post( self::VERIFY_URL, $this->get_verify_request_params( $response, $remote_ip ) );
+ if ( is_wp_error( $resp ) ) {
+ return $resp;
+ }
+
+ $resp_decoded = json_decode( wp_remote_retrieve_body( $resp ), true );
+ if ( ! $resp_decoded ) {
+ return new WP_Error( 'invalid-json', $this->error_codes['invalid-json'], 400 );
+ }
+
+ // Default error code and message.
+ $error_code = 'unexpected-response';
+ $error_message = $this->error_codes['unexpected-response'];
+
+ // Use the first error code if exists.
+ if ( isset( $resp_decoded['error-codes'] ) && is_array( $resp_decoded['error-codes'] ) ) {
+ if ( isset( $resp_decoded['error-codes'][0] ) && isset( $this->error_codes[ $resp_decoded['error-codes'][0] ] ) ) {
+ $error_message = $this->error_codes[ $resp_decoded['error-codes'][0] ];
+ $error_code = $resp_decoded['error-codes'][0];
+ }
+ }
+
+ if ( ! isset( $resp_decoded['success'] ) ) {
+ return new WP_Error( $error_code, $error_message );
+ }
+
+ if ( true !== $resp_decoded['success'] ) {
+ return new WP_Error( $error_code, $error_message );
+ }
+
+ return true;
+ }
+
+ /**
+ * Get siteverify request parameters.
+ *
+ * @param string $response The value of 'g-recaptcha-response' in the submitted
+ * form.
+ * @param string $remote_ip The end user's IP address.
+ *
+ * @return array
+ */
+ public function get_verify_request_params( $response, $remote_ip ) {
+ return array(
+ 'body' => array(
+ 'secret' => $this->secret_key,
+ 'response' => $response,
+ 'remoteip' => $remote_ip,
+ ),
+ 'sslverify' => true,
+ );
+ }
+
+ /**
+ * Get reCAPTCHA HTML to render.
+ *
+ * @return string
+ */
+ public function get_recaptcha_html() {
+ return sprintf(
+ '
+ <div
+ class="%s"
+ data-sitekey="%s"
+ data-theme="%s"
+ data-type="%s"
+ data-tabindex="%s"></div>
+ <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=%s"%s></script>
+ ',
+ esc_attr( $this->config['tag_class'] ),
+ esc_attr( $this->site_key ),
+ esc_attr( $this->config['tag_attributes']['theme'] ),
+ esc_attr( $this->config['tag_attributes']['type'] ),
+ esc_attr( $this->config['tag_attributes']['tabindex'] ),
+ rawurlencode( $this->config['language'] ),
+ $this->config['script_async'] ? ' async' : ''
+ );
+ }
+}
diff --git a/plugins/jetpack/modules/sharedaddy/recaptchalib.php b/plugins/jetpack/modules/sharedaddy/recaptchalib.php
deleted file mode 100644
index 205a4a2d..00000000
--- a/plugins/jetpack/modules/sharedaddy/recaptchalib.php
+++ /dev/null
@@ -1,277 +0,0 @@
-<?php
-/*
- * This is a PHP library that handles calling reCAPTCHA.
- * - Documentation and latest version
- * http://recaptcha.net/plugins/php/
- * - Get a reCAPTCHA API Key
- * https://www.google.com/recaptcha/admin/create
- * - Discussion group
- * http://groups.google.com/group/recaptcha
- *
- * Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
- * AUTHORS:
- * Mike Crawford
- * Ben Maurer
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-/**
- * The reCAPTCHA server URL's
- */
-define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
-define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
-define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
-
-/**
- * Encodes the given data into a query string format
- * @param $data - array of string elements to be encoded
- * @return string - encoded request
- */
-function _recaptcha_qsencode ($data) {
- $req = "";
- foreach ( $data as $key => $value )
- $req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
-
- // Cut the last '&'
- $req=substr($req,0,strlen($req)-1);
- return $req;
-}
-
-
-
-/**
- * Submits an HTTP POST to a reCAPTCHA server
- * @param string $host
- * @param string $path
- * @param array $data
- * @param int port
- * @return array response
- */
-function _recaptcha_http_post($host, $path, $data, $port = 80) {
-
- $req = _recaptcha_qsencode ($data);
-
- $http_request = "POST $path HTTP/1.0\r\n";
- $http_request .= "Host: $host\r\n";
- $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
- $http_request .= "Content-Length: " . strlen($req) . "\r\n";
- $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
- $http_request .= "\r\n";
- $http_request .= $req;
-
- $response = '';
- if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
- die ('Could not open socket');
- }
-
- fwrite($fs, $http_request);
-
- while ( !feof($fs) )
- $response .= fgets($fs, 1160); // One TCP-IP packet
- fclose($fs);
- $response = explode("\r\n\r\n", $response, 2);
-
- return $response;
-}
-
-
-
-/**
- * Gets the challenge HTML (javascript and non-javascript version).
- * This is called from the browser, and the resulting reCAPTCHA HTML widget
- * is embedded within the HTML form it was called from.
- * @param string $pubkey A public key for reCAPTCHA
- * @param string $error The error given by reCAPTCHA (optional, default is null)
- * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
-
- * @return string - The HTML to be embedded in the user's form.
- */
-function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
-{
- if ($pubkey == null || $pubkey == '') {
- die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
- }
-
- if ($use_ssl) {
- $server = RECAPTCHA_API_SECURE_SERVER;
- } else {
- $server = RECAPTCHA_API_SERVER;
- }
-
- $errorpart = "";
- if ($error) {
- $errorpart = "&amp;error=" . $error;
- }
- return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
-
- <noscript>
- <iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
- <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
- <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
- </noscript>';
-}
-
-
-
-
-/**
- * A ReCaptchaResponse is returned from recaptcha_check_answer()
- */
-class ReCaptchaResponse {
- var $is_valid;
- var $error;
-}
-
-
-/**
- * Calls an HTTP POST function to verify if the user's guess was correct
- * @param string $privkey
- * @param string $remoteip
- * @param string $challenge
- * @param string $response
- * @param array $extra_params an array of extra variables to post to the server
- * @return ReCaptchaResponse
- */
-function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
-{
- if ($privkey == null || $privkey == '') {
- die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
- }
-
- if ($remoteip == null || $remoteip == '') {
- die ("For security reasons, you must pass the remote ip to reCAPTCHA");
- }
-
-
-
- //discard spam submissions
- if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
- $recaptcha_response = new ReCaptchaResponse();
- $recaptcha_response->is_valid = false;
- $recaptcha_response->error = 'incorrect-captcha-sol';
- return $recaptcha_response;
- }
-
- $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
- array (
- 'privatekey' => $privkey,
- 'remoteip' => $remoteip,
- 'challenge' => $challenge,
- 'response' => $response
- ) + $extra_params
- );
-
- $answers = explode ("\n", $response [1]);
- $recaptcha_response = new ReCaptchaResponse();
-
- if (trim ($answers [0]) == 'true') {
- $recaptcha_response->is_valid = true;
- }
- else {
- $recaptcha_response->is_valid = false;
- $recaptcha_response->error = $answers [1];
- }
- return $recaptcha_response;
-
-}
-
-/**
- * gets a URL where the user can sign up for reCAPTCHA. If your application
- * has a configuration page where you enter a key, you should provide a link
- * using this function.
- * @param string $domain The domain where the page is hosted
- * @param string $appname The name of your application
- */
-function recaptcha_get_signup_url ($domain = null, $appname = null) {
- return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
-}
-
-function _recaptcha_aes_pad($val) {
- $block_size = 16;
- $numpad = $block_size - (strlen ($val) % $block_size);
- return str_pad($val, strlen ($val) + $numpad, chr($numpad));
-}
-
-/* Mailhide related code */
-
-function _recaptcha_aes_encrypt($val,$ky) {
- if (! function_exists ("mcrypt_encrypt")) {
- die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
- }
- $mode=MCRYPT_MODE_CBC;
- $enc=MCRYPT_RIJNDAEL_128;
- $val=_recaptcha_aes_pad($val);
- return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
-}
-
-
-function _recaptcha_mailhide_urlbase64 ($x) {
- return strtr(base64_encode ($x), '+/', '-_');
-}
-
-/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
-function recaptcha_mailhide_url($pubkey, $privkey, $email) {
- if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
- die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
- "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
- }
-
-
- $ky = pack('H*', $privkey);
- $cryptmail = _recaptcha_aes_encrypt ($email, $ky);
-
- return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
-}
-
-/**
- * gets the parts of the email to expose to the user.
- * eg, given johndoe@example,com return ["john", "example.com"].
- * the email is then displayed as john...@example.com
- */
-function _recaptcha_mailhide_email_parts ($email) {
- $arr = preg_split("/@/", $email );
-
- if (strlen ($arr[0]) <= 4) {
- $arr[0] = substr ($arr[0], 0, 1);
- } else if (strlen ($arr[0]) <= 6) {
- $arr[0] = substr ($arr[0], 0, 3);
- } else {
- $arr[0] = substr ($arr[0], 0, 4);
- }
- return $arr;
-}
-
-/**
- * Gets html to display an email address given a public an private key.
- * to get a key, go to:
- *
- * http://www.google.com/recaptcha/mailhide/apikey
- */
-function recaptcha_mailhide_html($pubkey, $privkey, $email) {
- $emailparts = _recaptcha_mailhide_email_parts ($email);
- $url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
-
- return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
- "' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
-
-}
-
-
-?> \ No newline at end of file
diff --git a/plugins/jetpack/modules/sharedaddy/screenshot-1.jpg b/plugins/jetpack/modules/sharedaddy/screenshot-1.jpg
deleted file mode 100644
index dd4becc7..00000000
--- a/plugins/jetpack/modules/sharedaddy/screenshot-1.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/screenshot-2.jpg b/plugins/jetpack/modules/sharedaddy/screenshot-2.jpg
deleted file mode 100644
index dabb35e3..00000000
--- a/plugins/jetpack/modules/sharedaddy/screenshot-2.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/sharedaddy.php b/plugins/jetpack/modules/sharedaddy/sharedaddy.php
index 56b1cd41..c6b71a5e 100644
--- a/plugins/jetpack/modules/sharedaddy/sharedaddy.php
+++ b/plugins/jetpack/modules/sharedaddy/sharedaddy.php
@@ -54,6 +54,7 @@ function sharing_email_check_for_spam_via_akismet( $data ) {
}
function sharing_email_send_post_content( $data ) {
+ /* translators: included in e-mail when post is shared via e-mail. First item is sender's name. Second is sender's e-mail address. */
$content = sprintf( __( '%1$s (%2$s) thinks you may be interested in the following post:', 'jetpack' ), $data['name'], $data['source'] );
$content .= "\n\n";
$content .= $data['post']->post_title."\n";
@@ -62,24 +63,50 @@ function sharing_email_send_post_content( $data ) {
}
function sharing_add_meta_box() {
+ global $post;
+ if ( empty( $post ) ) { // If a current post is not defined, such as when editing a comment.
+ return;
+ }
+
+ /**
+ * Filter whether to display the Sharing Meta Box or not.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.8.0
+ *
+ * @param bool true Display Sharing Meta Box.
+ * @param $post Post.
+ */
+ if ( ! apply_filters( 'sharing_meta_box_show', true, $post ) ) {
+ return;
+ }
+
$post_types = get_post_types( array( 'public' => true ) );
/**
* Filter the Sharing Meta Box title.
*
+ * @module sharedaddy
+ *
* @since 2.2.0
*
* @param string $var Sharing Meta Box title. Default is "Sharing".
*/
$title = apply_filters( 'sharing_meta_box_title', __( 'Sharing', 'jetpack' ) );
- foreach( $post_types as $post_type ) {
- add_meta_box( 'sharing_meta', $title, 'sharing_meta_box_content', $post_type, 'advanced', 'high' );
+ if ( $post->ID !== get_option( 'page_for_posts' ) ) {
+ foreach( $post_types as $post_type ) {
+ add_meta_box( 'sharing_meta', $title, 'sharing_meta_box_content', $post_type, 'advanced', 'high' );
+ }
}
}
+
function sharing_meta_box_content( $post ) {
/**
* Fires before the sharing meta box content.
*
+ * @module sharedaddy
+ *
* @since 2.2.0
*
* @param WP_Post $post The post to share.
@@ -100,6 +127,8 @@ function sharing_meta_box_content( $post ) {
/**
* Fires after the sharing meta box content.
*
+ * @module sharedaddy
+ *
* @since 2.2.0
*
* @param WP_Post $post The post to share.
@@ -188,19 +217,24 @@ function sharing_global_resources_save() {
}
function sharing_email_dialog() {
- echo '<div class="recaptcha" id="sharing_recaptcha"></div><input type="hidden" name="recaptcha_public_key" id="recaptcha_public_key" value="'.(defined( 'RECAPTCHA_PUBLIC_KEY' ) ? esc_attr( RECAPTCHA_PUBLIC_KEY ) : '').'" />';
+ require_once plugin_dir_path( __FILE__ ) . 'recaptcha.php';
+
+ $recaptcha = new Jetpack_ReCaptcha( RECAPTCHA_PUBLIC_KEY, RECAPTCHA_PRIVATE_KEY );
+ echo $recaptcha->get_recaptcha_html(); // xss ok
}
function sharing_email_check( $true, $post, $data ) {
- require_once plugin_dir_path( __FILE__ ).'recaptchalib.php';
+ require_once plugin_dir_path( __FILE__ ) . 'recaptcha.php';
- $recaptcha_result = recaptcha_check_answer( RECAPTCHA_PRIVATE_KEY, $_SERVER["REMOTE_ADDR"], $data["recaptcha_challenge_field"], $data["recaptcha_response_field"] );
+ $recaptcha = new Jetpack_ReCaptcha( RECAPTCHA_PUBLIC_KEY, RECAPTCHA_PRIVATE_KEY );
+ $response = ! empty( $_POST['g-recaptcha-response'] ) ? $_POST['g-recaptcha-response'] : '';
+ $result = $recaptcha->verify( $response, $_SERVER['REMOTE_ADDR'] );
- return $recaptcha_result->is_valid;
+ return ( true === $result );
}
add_action( 'init', 'sharing_init' );
-add_action( 'admin_init', 'sharing_add_meta_box' );
+add_action( 'add_meta_boxes', 'sharing_add_meta_box' );
add_action( 'save_post', 'sharing_meta_box_save' );
add_action( 'sharing_email_send_post', 'sharing_email_send_post' );
add_filter( 'sharing_email_can_send', 'sharing_email_check_for_spam_via_akismet' );
@@ -210,7 +244,7 @@ add_filter( 'sharing_services', 'sharing_restrict_to_single' );
add_action( 'plugin_action_links_'.basename( dirname( __FILE__ ) ).'/'.basename( __FILE__ ), 'sharing_plugin_settings', 10, 4 );
add_filter( 'plugin_row_meta', 'sharing_add_plugin_settings', 10, 2 );
-if ( defined( 'RECAPTCHA_PRIVATE_KEY' ) ) {
+if ( defined( 'RECAPTCHA_PUBLIC_KEY' ) && defined( 'RECAPTCHA_PRIVATE_KEY' ) ) {
add_action( 'sharing_email_dialog', 'sharing_email_dialog' );
add_filter( 'sharing_email_check', 'sharing_email_check', 10, 3 );
}
diff --git a/plugins/jetpack/modules/sharedaddy/sharedaddy.pot b/plugins/jetpack/modules/sharedaddy/sharedaddy.pot
deleted file mode 100644
index 7af247cb..00000000
--- a/plugins/jetpack/modules/sharedaddy/sharedaddy.pot
+++ /dev/null
@@ -1,404 +0,0 @@
-# Translation of the WordPress plugin Sharedaddy 0.2.9 by Automattic, Inc..
-# Copyright (C) 2010 Automattic, Inc.
-# This file is distributed under the same license as the Sharedaddy package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: Sharedaddy 0.2.9\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/sharedaddy\n"
-"POT-Creation-Date: 2010-12-16 16:35+0000\n"
-"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: sharedaddy.php:14
-#, php-format
-msgid ""
-"%1$s (%2$s) thinks you may be interested in the following post:\n"
-"\n"
-msgstr ""
-
-#: sharedaddy.php:18
-msgid "Shared Post"
-msgstr ""
-
-#: sharedaddy.php:22 sharedaddy.php:23 sharing.php:49
-msgid "Sharing"
-msgstr ""
-
-#: sharedaddy.php:34
-msgid "Show sharing buttons on this post."
-msgstr ""
-
-#: sharedaddy.php:57 sharedaddy.php:64
-msgid "Settings"
-msgstr ""
-
-#: sharedaddy.php:65
-msgid "Support"
-msgstr ""
-
-#: sharedaddy.php:97
-msgid "Disable CSS and JS"
-msgstr ""
-
-#: sharedaddy.php:99
-msgid "Advanced - you must include these in your theme for Sharedaddy to work"
-msgstr ""
-
-#: sharing-service.php:194
-msgid "Share this:"
-msgstr ""
-
-#: sharing-service.php:434 sharing-sources.php:620 sharing.php:230
-#: sharing.php:271
-msgid "Share"
-msgstr ""
-
-#: sharing-sources.php:127
-msgid "Email"
-msgstr ""
-
-#: sharing-sources.php:169
-msgid "This post has been shared!"
-msgstr ""
-
-#: sharing-sources.php:170
-#, php-format
-msgid "You have shared this post with %s"
-msgstr ""
-
-#: sharing-sources.php:171
-msgid "Close"
-msgstr ""
-
-#: sharing-sources.php:193
-msgctxt "share to"
-msgid "Email"
-msgstr ""
-
-#: sharing-sources.php:193
-msgid "Click to email this to a friend"
-msgstr ""
-
-#: sharing-sources.php:207
-msgid "Send to Email Address"
-msgstr ""
-
-#: sharing-sources.php:215
-msgid "Your Name"
-msgstr ""
-
-#: sharing-sources.php:218
-msgid "Your Email Address"
-msgstr ""
-
-#: sharing-sources.php:226
-msgid "Send Email"
-msgstr ""
-
-#: sharing-sources.php:227
-msgid "Cancel"
-msgstr ""
-
-#: sharing-sources.php:230
-msgid "Post was not sent - check your email addresses!"
-msgstr ""
-
-#: sharing-sources.php:234
-msgid "Email check failed, please try again"
-msgstr ""
-
-#: sharing-sources.php:238
-msgid "Sorry, your blog cannot share posts by email."
-msgstr ""
-
-#: sharing-sources.php:257
-msgid "Twitter"
-msgstr ""
-
-#: sharing-sources.php:264
-msgctxt "share to"
-msgid "Twitter"
-msgstr ""
-
-#: sharing-sources.php:264
-msgid "Click to share on Twitter"
-msgstr ""
-
-#: sharing-sources.php:334 sharing-sources.php:411 sharing-sources.php:462
-#: sharing-sources.php:568
-msgid "Use smart button"
-msgstr ""
-
-#: sharing-sources.php:352
-msgid "StumbleUpon"
-msgstr ""
-
-#: sharing-sources.php:363
-msgctxt "share to"
-msgid "StumbleUpon"
-msgstr ""
-
-#: sharing-sources.php:363
-msgid "Click to share on StumbleUpon"
-msgstr ""
-
-#: sharing-sources.php:429 sharing-sources.php:436
-msgid "Reddit"
-msgstr ""
-
-#: sharing-sources.php:436
-msgid "Click to share on Reddit"
-msgstr ""
-
-#: sharing-sources.php:506
-msgid "Digg"
-msgstr ""
-
-#: sharing-sources.php:515 sharing-sources.php:519
-msgid "Click to Digg this post"
-msgstr ""
-
-#: sharing-sources.php:519
-msgctxt "share to"
-msgid "Digg"
-msgstr ""
-
-#: sharing-sources.php:601
-msgid "Facebook"
-msgstr ""
-
-#: sharing-sources.php:651
-msgctxt "share to"
-msgid "Facebook"
-msgstr ""
-
-#: sharing-sources.php:651
-msgid "Share on Facebook"
-msgstr ""
-
-#: sharing-sources.php:673
-msgid "Default button"
-msgstr ""
-
-#: sharing-sources.php:674
-msgid "Share button"
-msgstr ""
-
-#: sharing-sources.php:675
-msgid "Like button"
-msgstr ""
-
-#: sharing-sources.php:720
-msgid "Print"
-msgstr ""
-
-#: sharing-sources.php:724
-msgctxt "share to"
-msgid "Print"
-msgstr ""
-
-#: sharing-sources.php:724
-msgid "Click to print"
-msgstr ""
-
-#: sharing-sources.php:730
-msgid "Press This"
-msgstr ""
-
-#: sharing-sources.php:758
-msgctxt "share to"
-msgid "Press This"
-msgstr ""
-
-#: sharing-sources.php:758
-msgid "Click to Press This!"
-msgstr ""
-
-#: sharing-sources.php:789
-msgid "Click to share"
-msgstr ""
-
-#: sharing-sources.php:839
-msgid "Label"
-msgstr ""
-
-#: sharing-sources.php:844
-msgid "URL"
-msgstr ""
-
-#: sharing-sources.php:849
-msgid "Icon"
-msgstr ""
-
-#: sharing-sources.php:856
-msgid "Save"
-msgstr ""
-
-#: sharing-sources.php:857
-msgid "Remove Service"
-msgstr ""
-
-#: sharing.php:49 sharing.php:154
-msgid "Sharing Settings"
-msgstr ""
-
-#: sharing.php:144
-msgid "Warning! Multibyte support missing!"
-msgstr ""
-
-#: sharing.php:145
-#, php-format
-msgid ""
-"This plugin will work without it, but multibyte support is used <a href=\"%s"
-"\">if available</a>. You may see minor problems with Tweets and other "
-"sharing services."
-msgstr ""
-
-#: sharing.php:149
-msgid "Settings have been saved"
-msgstr ""
-
-#: sharing.php:160
-msgid "Available Services"
-msgstr ""
-
-#: sharing.php:161
-msgid "Drag and drop the services you'd like to enable into the box below."
-msgstr ""
-
-#: sharing.php:162
-msgid "Add a new service"
-msgstr ""
-
-#: sharing.php:182
-msgid "Enabled Services"
-msgstr ""
-
-#: sharing.php:185
-msgid "Services dragged here will appear individually."
-msgstr ""
-
-#: sharing.php:188
-msgid "Drag and drop available services here"
-msgstr ""
-
-#: sharing.php:199
-msgid "Services dragged here will be hidden behind a share button."
-msgstr ""
-
-#: sharing.php:214
-msgid "Live Preview"
-msgstr ""
-
-#: sharing.php:217
-msgid "Sharing is off. Please add services above to enable"
-msgstr ""
-
-#: sharing.php:299
-msgid "Default button style"
-msgstr ""
-
-#: sharing.php:302
-msgid "Icon + text"
-msgstr ""
-
-#: sharing.php:303
-msgid "Icon only"
-msgstr ""
-
-#: sharing.php:304
-msgid "Text only"
-msgstr ""
-
-#: sharing.php:309
-msgid "Sharing label"
-msgstr ""
-
-#: sharing.php:315
-msgid "Open links in"
-msgstr ""
-
-#: sharing.php:318
-msgid "New window"
-msgstr ""
-
-#: sharing.php:319
-msgid "Same window"
-msgstr ""
-
-#: sharing.php:324
-msgid "Show sharing buttons on"
-msgstr ""
-
-#: sharing.php:327
-msgid "Posts, pages, and index pages"
-msgstr ""
-
-#: sharing.php:328
-msgid "Posts and pages only"
-msgstr ""
-
-#: sharing.php:329
-msgid "Index pages only"
-msgstr ""
-
-#: sharing.php:339
-msgid "Save Changes"
-msgstr ""
-
-#: sharing.php:350
-msgid "Service name"
-msgstr ""
-
-#: sharing.php:356
-msgid "Sharing URL"
-msgstr ""
-
-#: sharing.php:360
-msgid "You can add the following variables to your service sharing URL:"
-msgstr ""
-
-#: sharing.php:365
-msgid "Icon URL"
-msgstr ""
-
-#: sharing.php:368
-msgid "Enter the URL of a 16x16px icon you want to use for this service."
-msgstr ""
-
-#: sharing.php:374
-msgid "Create Share"
-msgstr ""
-
-#: sharing.php:384
-msgid ""
-"An error occurred creating your new sharing service - please check you gave "
-"valid details."
-msgstr ""
-
-#. Plugin Name of the plugin/theme
-msgid "Sharedaddy"
-msgstr ""
-
-#. Plugin URI of the plugin/theme
-msgid "http://en.blog.wordpress.com/2010/08/24/more-ways-to-share/"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid "The most super duper sharing tool on the interwebs."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "Automattic, Inc."
-msgstr ""
-
-#. Author URI of the plugin/theme
-msgid "http://automattic.com/"
-msgstr ""
diff --git a/plugins/jetpack/modules/sharedaddy/sharing-service.php b/plugins/jetpack/modules/sharedaddy/sharing-service.php
index 6fcd9939..8966600a 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing-service.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing-service.php
@@ -6,7 +6,7 @@ define( 'WP_SHARING_PLUGIN_VERSION', JETPACK__VERSION );
class Sharing_Service {
private $global = false;
- var $default_sharing_label = '';
+ public $default_sharing_label = '';
public function __construct() {
$this->default_sharing_label = __( 'Share this:', 'jetpack' );
@@ -49,13 +49,13 @@ class Sharing_Service {
'facebook' => 'Share_Facebook',
'linkedin' => 'Share_LinkedIn',
'reddit' => 'Share_Reddit',
- 'stumbleupon' => 'Share_Stumbleupon',
'twitter' => 'Share_Twitter',
'press-this' => 'Share_PressThis',
'google-plus-1' => 'Share_GooglePlus1',
'tumblr' => 'Share_Tumblr',
'pinterest' => 'Share_Pinterest',
'pocket' => 'Share_Pocket',
+ 'skype' => 'Share_Skype',
);
if ( $include_custom ) {
@@ -69,6 +69,8 @@ class Sharing_Service {
/**
* Filters the list of available Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $services Array of all available Sharing Services.
@@ -136,6 +138,8 @@ class Sharing_Service {
/**
* Control the state of the list of sharing services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $args {
@@ -179,6 +183,8 @@ class Sharing_Service {
/**
* Filters the list of default Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $enabled Array of default Sharing Services.
@@ -204,6 +210,8 @@ class Sharing_Service {
/**
* Filters the list of enabled Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $blog Array of enabled Sharing Services.
@@ -240,7 +248,7 @@ class Sharing_Service {
// Defaults
$options['global'] = array(
- 'button_style' => 'icon',
+ 'button_style' => 'icon-text',
'sharing_label' => $this->default_sharing_label,
'open_links' => 'same',
'show' => array(),
@@ -250,6 +258,8 @@ class Sharing_Service {
/**
* Filters global sharing settings.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $options['global'] Array of global sharing settings.
@@ -342,6 +352,8 @@ class Sharing_Service {
/**
* Get the state of a sharing button.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $args {
@@ -411,12 +423,12 @@ class Sharing_Service {
}
class Sharing_Service_Total {
- var $id = '';
- var $name = '';
- var $service = '';
- var $total = 0;
+ public $id = '';
+ public $name = '';
+ public $service = '';
+ public $total = 0;
- public function Sharing_Service_Total( $id, $total ) {
+ public function __construct( $id, $total ) {
$services = new Sharing_Service();
$this->id = esc_html( $id );
$this->service = $services->get_service( $id );
@@ -433,12 +445,12 @@ class Sharing_Service_Total {
}
class Sharing_Post_Total {
- var $id = 0;
- var $total = 0;
- var $title = '';
- var $url = '';
+ public $id = 0;
+ public $total = 0;
+ public $title = '';
+ public $url = '';
- public function Sharing_Post_Total( $id, $total ) {
+ public function __construct( $id, $total ) {
$this->id = (int) $id;
$this->total = (int) $total;
$this->title = get_the_title( $this->id );
@@ -475,6 +487,8 @@ function sharing_maybe_enqueue_scripts() {
/**
* Filter to decide when sharing scripts should be enqueued.
*
+ * @module sharedaddy
+ *
* @since 3.2.0
*
* @param bool $enqueue Decide if the sharing scripts should be enqueued.
@@ -486,17 +500,21 @@ function sharing_add_footer() {
global $jetpack_sharing_counts;
/**
- * Filter all Javascript output by the sharing module.
+ * Filter all JavaScript output by the sharing module.
+ *
+ * @module sharedaddy
*
* @since 1.1.0
*
- * @param bool true Control whether the sharing module should add any Javascript to the site. Default to true.
+ * @param bool true Control whether the sharing module should add any JavaScript to the site. Default to true.
*/
if ( apply_filters( 'sharing_js', true ) && sharing_maybe_enqueue_scripts() ) {
/**
* Filter the display of sharing counts next to the sharing buttons.
*
+ * @module sharedaddy
+ *
* @since 3.2.0
*
* @param bool true Control the display of counters next to the sharing buttons. Default to true.
@@ -504,16 +522,10 @@ function sharing_add_footer() {
if ( apply_filters( 'jetpack_sharing_counts', true ) && is_array( $jetpack_sharing_counts ) && count( $jetpack_sharing_counts ) ) :
$sharing_post_urls = array_filter( $jetpack_sharing_counts );
if ( $sharing_post_urls ) :
- $is_jetpack = true === apply_filters( 'is_jetpack_site', false, get_current_blog_id() );
- $site_id = $is_jetpack ? Jetpack_Options::get_option( 'id' ) : get_current_blog_id();
?>
<script type="text/javascript">
window.WPCOM_sharing_counts = <?php echo json_encode( array_flip( $sharing_post_urls ) ); ?>;
- window.WPCOM_jetpack = <?php echo var_export( $is_jetpack, true ); ?>;
- <?php if ( is_int( $site_id ) ): ?>
- window.WPCOM_site_ID = <?php echo $site_id ?>;
- <?php endif; ?>
</script>
<?php
endif;
@@ -544,13 +556,8 @@ function sharing_add_header() {
}
if ( count( $enabled['all'] ) > 0 && sharing_maybe_enqueue_scripts() ) {
- // @todo: Remove this opt-out filter in the future
- if ( ( ! defined( 'IS_WPCOM' ) ) || ( ! IS_WPCOM ) || apply_filters( 'wpl_sharing_2014_1', true ) ) {
- wp_enqueue_style( 'sharedaddy', plugin_dir_url( __FILE__ ) .'sharing.css', array(), JETPACK__VERSION );
- wp_enqueue_style( 'genericons' );
- } else {
- wp_enqueue_style( 'sharedaddy', plugin_dir_url( __FILE__ ) .'sharing-legacy.css', array(), JETPACK__VERSION );
- }
+ wp_enqueue_style( 'sharedaddy', plugin_dir_url( __FILE__ ) .'sharing.css', array(), JETPACK__VERSION );
+ wp_enqueue_style( 'genericons' );
}
}
@@ -577,7 +584,7 @@ function sharing_display( $text = '', $echo = false ) {
if ( empty( $post ) )
return $text;
- if ( is_preview() || is_admin() ) {
+ if ( ( is_preview() || is_admin() ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
return $text;
}
@@ -617,7 +624,7 @@ function sharing_display( $text = '', $echo = false ) {
if ( !is_feed() ) {
if ( is_singular() && in_array( get_post_type(), $global['show'] ) ) {
$show = true;
- } elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) {
+ } elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) {
$show = true;
}
}
@@ -625,9 +632,11 @@ function sharing_display( $text = '', $echo = false ) {
/**
* Filter to decide if sharing buttons should be displayed.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
- * @param
+ * @param bool $show Should the sharing buttons be displayed.
* @param WP_Post $post The post to share.
*/
$show = apply_filters( 'sharing_show', $show, $post );
@@ -641,7 +650,7 @@ function sharing_display( $text = '', $echo = false ) {
// Private post?
$post_status = get_post_status( $post->ID );
- if ( $post_status == 'private' ) {
+ if ( 'private' === $post_status ) {
$show = false;
}
@@ -655,6 +664,8 @@ function sharing_display( $text = '', $echo = false ) {
/**
* Filters the list of enabled Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 2.2.3
*
* @param array $sharer->get_blog_services() Array of Sharing Services currently enabled.
@@ -738,10 +749,21 @@ function sharing_display( $text = '', $echo = false ) {
}
}
+ /**
+ * Filters the content markup of the Jetpack sharing links
+ *
+ * @module sharedaddy
+ *
+ * @since 3.8.0
+ *
+ * @param string $sharing_content Content markup of the Jetpack sharing links
+ */
+ $sharing_markup = apply_filters( 'jetpack_sharing_display_markup', $sharing_content );
+
if ( $echo )
- echo $text.$sharing_content;
+ echo $text . $sharing_markup;
else
- return $text.$sharing_content;
+ return $text . $sharing_markup;
}
add_filter( 'the_content', 'sharing_display', 19 );
diff --git a/plugins/jetpack/modules/sharedaddy/sharing-sources.php b/plugins/jetpack/modules/sharedaddy/sharing-sources.php
index 69148877..5edb4c09 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing-sources.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing-sources.php
@@ -8,6 +8,17 @@ abstract class Sharing_Source {
public function __construct( $id, array $settings ) {
$this->id = $id;
+ /**
+ * Filter the way sharing links open.
+ *
+ * By default, sharing links open in a new window.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param bool true Should Sharing links open in a new window. Default to true.
+ */
$this->open_link_in_new = apply_filters( 'jetpack_open_sharing_in_new_window', true );
if ( isset( $settings['button_style'] ) )
@@ -30,11 +41,33 @@ abstract class Sharing_Source {
}
public function get_share_url( $post_id ) {
+ /**
+ * Filter the sharing permalink.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.2.0
+ *
+ * @param string get_permalink( $post_id ) Post Permalink.
+ * @param int $post_id Post ID.
+ * @param int $this->id Sharing ID.
+ */
return apply_filters( 'sharing_permalink', get_permalink( $post_id ), $post_id, $this->id );
}
public function get_share_title( $post_id ) {
$post = get_post( $post_id );
+ /**
+ * Filter the sharing title.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $post->post_title Post Title.
+ * @param int $post_id Post ID.
+ * @param int $this->id Sharing ID.
+ */
$title = apply_filters( 'sharing_title', $post->post_title, $post_id, $this->id );
return html_entity_decode( wp_kses( $title, null ) );
@@ -59,9 +92,56 @@ abstract class Sharing_Source {
$text .= __( ' (Opens in new window)', 'jetpack' );
}
+ /**
+ * Filter the sharing display ID.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param int|false $id Sharing ID.
+ * @param object $this Sharing service properties.
+ * @param array $args Array of sharing service options.
+ */
$id = apply_filters( 'jetpack_sharing_display_id', $id, $this, $args );
+ /**
+ * Filter the sharing display link.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $url Post URL.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$url = apply_filters( 'sharing_display_link', $url, $this, $id, $args ); // backwards compatibility
+ /**
+ * Filter the sharing display link.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $url Post URL.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$url = apply_filters( 'jetpack_sharing_display_link', $url, $this, $id, $args );
+ /**
+ * Filter the sharing display query.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $query Sharing service URL parameter.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$query = apply_filters( 'jetpack_sharing_display_query', $query, $this, $id, $args );
if ( !empty( $query ) ) {
@@ -74,8 +154,44 @@ abstract class Sharing_Source {
if ( 'text' == $this->button_style )
$klasses[] = 'no-icon';
+ /**
+ * Filter the sharing display classes.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param array $klasses Sharing service classes.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$klasses = apply_filters( 'jetpack_sharing_display_classes', $klasses, $this, $id, $args );
+ /**
+ * Filter the sharing display title.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param string $title Sharing service title.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$title = apply_filters( 'jetpack_sharing_display_title', $title, $this, $id, $args );
+ /**
+ * Filter the sharing display text.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param string $text Sharing service text.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$text = apply_filters( 'jetpack_sharing_display_text', $text, $this, $id, $args );
return sprintf(
@@ -91,6 +207,20 @@ abstract class Sharing_Source {
);
}
+ /**
+ * Get an unfiltered post permalink to use when generating a sharing URL with get_link.
+ * Use instead of get_share_url for non-official styles as get_permalink ensures that process_request
+ * will be executed more reliably, in the case that the filtered URL uses a service that strips query parameters.
+ *
+ * @since 3.7.0
+ * @param int $post_id Post ID.
+ * @uses get_permalink
+ * @return string get_permalink( $post_id ) Post permalink.
+ */
+ public function get_process_request_url( $post_id ) {
+ return get_permalink( $post_id );
+ }
+
abstract public function get_name();
abstract public function get_display( $post );
@@ -123,7 +253,7 @@ abstract class Sharing_Source {
$klasses[] = 'no-icon';
$link = sprintf(
- '<a rel="nofollow" class="%s" href="javascript:void(0);return false;" title="%s"><span>%s</span></a>',
+ '<a rel="nofollow" class="%s" href="javascript:void(0)" title="%s"><span>%s</span></a>',
implode( ' ', $klasses ),
$this->get_name(),
$text
@@ -169,6 +299,15 @@ abstract class Sharing_Source {
}
public function process_request( $post, array $post_data ) {
+ /**
+ * Fires when a post is shared via one of the sharing buttons.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param array $args Aray of information about the sharing service.
+ */
do_action( 'sharing_bump_stats', array( 'service' => $this, 'post' => $post ) );
}
@@ -217,8 +356,8 @@ abstract class Sharing_Advanced_Source extends Sharing_Source {
class Share_Email extends Sharing_Source {
- var $shortname = 'email';
- var $genericon = '\f410';
+ public $shortname = 'email';
+ public $genericon = '\f410';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -257,6 +396,17 @@ class Share_Email extends Sharing_Source {
// Test email
$error = 1; // Failure in data
if ( empty( $post_data['source_f_name'] ) && $source_email && $target_email && $source_name ) {
+ /**
+ * Allow plugins to stop the email sharing button from running the shared message through Akismet.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param bool true Should we check if the message isn't spam?
+ * @param object $post Post information.
+ * @param array $post_data Information about the shared message.
+ */
if ( apply_filters( 'sharing_email_check', true, $post, $post_data ) ) {
$data = array(
'post' => $post,
@@ -265,10 +415,28 @@ class Share_Email extends Sharing_Source {
'name' => $source_name
);
// todo: implement an error message when email doesn't get sent.
+ /**
+ * Filter whether an email can be sent from the Email sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param array $data Array of information about the shared message.
+ */
if ( ( $data = apply_filters( 'sharing_email_can_send', $data ) ) !== false ) {
// Record stats
parent::process_request( $data['post'], $post_data );
+ /**
+ * Fires when an email is sent via the Email sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param array $data Array of information about the shared message.
+ */
do_action( 'sharing_email_send_post', $data );
}
@@ -300,7 +468,7 @@ class Share_Email extends Sharing_Source {
}
public function get_display( $post ) {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Email', 'share to', 'jetpack' ), __( 'Click to email this to a friend', 'jetpack' ), 'share=email' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Email', 'share to', 'jetpack' ), __( 'Click to email this to a friend', 'jetpack' ), 'share=email' );
}
/**
@@ -330,7 +498,18 @@ class Share_Email extends Sharing_Source {
<?php endif; ?>
<input type="text" id="jetpack-source_f_name" name="source_f_name" class="input" value="" size="25" autocomplete="off" />
<script> document.getElementById('jetpack-source_f_name').value = ''; </script>
- <?php do_action( 'sharing_email_dialog', 'jetpack' ); ?>
+ <?php
+ /**
+ * Fires when the Email sharing dialog is loaded.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param string jetpack Eail sharing source.
+ */
+ do_action( 'sharing_email_dialog', 'jetpack' );
+ ?>
<img style="float: right; display: none" class="loading" src="<?php
/** This filter is documented in modules/shortcodes/audio.php */
@@ -356,10 +535,10 @@ class Share_Email extends Sharing_Source {
}
class Share_Twitter extends Sharing_Source {
- var $shortname = 'twitter';
- var $genericon = '\f202';
+ public $shortname = 'twitter';
+ public $genericon = '\f202';
// 'https://dev.twitter.com/rest/reference/get/help/configuration' ( 2015/02/06 ) short_url_length is 22, short_url_length_https is 23
- var $short_url_length = 24;
+ public $short_url_length = 24;
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -375,7 +554,16 @@ class Share_Twitter extends Sharing_Source {
}
function sharing_twitter_via( $post ) {
- // Allow themes to customize the via
+ /**
+ * Allow third-party plugins to customize the Twitter username used as "twitter:site" Twitter Card Meta Tag.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.0.0
+ *
+ * @param string $string Twitter Username.
+ * @param array $args Array of Open Graph Meta Tags and Twitter Cards tags.
+ */
$twitter_site_tag_value = apply_filters( 'jetpack_twitter_cards_site_tag', '', array() );
/*
@@ -387,17 +575,34 @@ class Share_Twitter extends Sharing_Source {
$twitter_site_tag_value = '';
}
+ /**
+ * Filters the Twitter username used as "via" in the Twitter sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.7.0
+ *
+ * @param string $twitter_site_tag_value Twitter Username.
+ * @param int $post->ID Post ID.
+ */
$twitter_site_tag_value = apply_filters( 'jetpack_sharing_twitter_via', $twitter_site_tag_value, $post->ID );
// Strip out anything other than a letter, number, or underscore.
// This will prevent the inadvertent inclusion of an extra @, as well as normalizing the handle.
- $twitter_site_tag_value = preg_replace( '/[^\da-z_]+/i', '', $twitter_site_tag_value );
-
- return $twitter_site_tag_value;
+ return preg_replace( '/[^\da-z_]+/i', '', $twitter_site_tag_value );
}
public function get_related_accounts( $post ) {
- // Format is 'username' => 'Optional description'
+ /**
+ * Filter the list of related Twitter accounts added to the Twitter sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.7.0
+ *
+ * @param array $args Array of Twitter usernames. Format is 'username' => 'Optional description'
+ * @param int $post->ID Post ID.
+ */
$related_accounts = apply_filters( 'jetpack_sharing_twitter_related', array(), $post->ID );
// Example related string: account1,account2:Account 2 description,account3
@@ -418,26 +623,46 @@ class Share_Twitter extends Sharing_Source {
$via = $this->sharing_twitter_via( $post );
if ( $via ) {
- $via = '&via=' . rawurlencode( $via );
+ $via = 'data-via="' . esc_attr( $via ) . '"';
} else {
$via = '';
}
$related = $this->get_related_accounts( $post );
if ( ! empty( $related ) && $related !== $via ) {
- $via .= '&related=' . rawurlencode( $related );
+ $related = 'data-related="' . esc_attr( $related ) . '"';
+ } else {
+ $related = '';
}
if ( $this->smart ) {
$share_url = $this->get_share_url( $post->ID );
$post_title = $this->get_share_title( $post->ID );
-
- return '<div class="twitter_button"><iframe allowtransparency="true" frameborder="0" scrolling="no" src="' . esc_url( $this->http() . '://platform.twitter.com/widgets/tweet_button.html?url=' . rawurlencode( $share_url ) . '&counturl=' . rawurlencode( get_permalink( $post->ID ) ) . '&count=horizontal&text=' . rawurlencode( $post_title . ':' ) . $via ) . '" style="width:101px; height:20px;"></iframe></div>';
+ return sprintf(
+ '<a href="https://twitter.com/share" class="twitter-share-button" data-url="%1$s" data-text="%2$s" %3$s %4$s>Tweet</a>',
+ esc_url( $share_url ),
+ esc_attr( $post_title ),
+ $via,
+ $related
+ );
} else {
- if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'twitter' ) ) {
+ if (
+ /**
+ * Allow plugins to disable sharing counts for specific sharing services.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.0.0
+ *
+ * @param bool true Should sharing counts be enabled for this specific service. Default to true.
+ * @param int $post->ID Post ID.
+ * @param string $str Sharing service name.
+ */
+ apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'twitter' )
+ ) {
sharing_register_post_for_share_counts( $post->ID );
}
- return $this->get_link( get_permalink( $post->ID ), _x( 'Twitter', 'share to', 'jetpack' ), __( 'Click to share on Twitter', 'jetpack' ), 'share=twitter', 'sharing-twitter-' . $post->ID );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Twitter', 'share to', 'jetpack' ), __( 'Click to share on Twitter', 'jetpack' ), 'share=twitter', 'sharing-twitter-' . $post->ID );
}
}
@@ -480,7 +705,7 @@ class Share_Twitter extends Sharing_Source {
$url = $post_link;
$twitter_url = add_query_arg(
- urlencode_deep( array_filter( compact( 'via', 'related', 'text', 'url' ) ) ),
+ rawurlencode_deep( array_filter( compact( 'via', 'related', 'text', 'url' ) ) ),
'https://twitter.com/intent/tweet'
);
@@ -494,52 +719,20 @@ class Share_Twitter extends Sharing_Source {
}
public function display_footer() {
- $this->js_dialog( $this->shortname, array( 'height' => 350 ) );
+ if ( $this->smart ) {
+ ?>
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
+ <?php
+ } else {
+ $this->js_dialog( $this->shortname, array( 'height' => 350 ) );
+ }
}
}
-class Share_Stumbleupon extends Sharing_Source {
- var $shortname = 'stumbleupon';
- var $genericon = '\f223';
- public function __construct( $id, array $settings ) {
- parent::__construct( $id, $settings );
-
- if ( 'official' == $this->button_style )
- $this->smart = true;
- else
- $this->smart = false;
- }
-
- public function get_name() {
- return __( 'StumbleUpon', 'jetpack' );
- }
-
- public function has_custom_button_style() {
- return $this->smart;
- }
-
- public function get_display( $post ) {
- if ( $this->smart )
- return '<div class="stumbleupon_button"><iframe src="http://www.stumbleupon.com/badge/embed/1/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&amp;title=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:74px; height: 18px;" allowTransparency="true"></iframe></div>';
- else
- return $this->get_link( get_permalink( $post->ID ), _x( 'StumbleUpon', 'share to', 'jetpack' ), __( 'Click to share on StumbleUpon', 'jetpack' ), 'share=stumbleupon' );
- }
-
- public function process_request( $post, array $post_data ) {
- $stumbleupon_url = $this->http() . '://www.stumbleupon.com/submit?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) );
-
- // Record stats
- parent::process_request( $post, $post_data );
-
- // Redirect to Stumbleupon
- wp_redirect( $stumbleupon_url );
- die();
- }
-}
class Share_Reddit extends Sharing_Source {
- var $shortname = 'reddit';
- var $genericon = '\f222';
+ public $shortname = 'reddit';
+ public $genericon = '\f222';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -555,9 +748,9 @@ class Share_Reddit extends Sharing_Source {
public function get_display( $post ) {
if ( $this->smart )
- return '<div class="reddit_button"><iframe src="' . $this->http() . '://www.reddit.com/static/button/button1.html?width=120&amp;url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&amp;title=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" height="22" width="120" scrolling="no" frameborder="0"></iframe></div>';
+ return '<div class="reddit_button"><iframe src="' . $this->http() . '://www.reddit.com/static/button/button1.html?newwindow=true&width=120&amp;url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&amp;title=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" height="22" width="120" scrolling="no" frameborder="0"></iframe></div>';
else
- return $this->get_link( get_permalink( $post->ID ), _x( 'Reddit', 'share to', 'jetpack' ), __( 'Click to share on Reddit', 'jetpack' ), 'share=reddit' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Reddit', 'share to', 'jetpack' ), __( 'Click to share on Reddit', 'jetpack' ), 'share=reddit' );
}
public function process_request( $post, array $post_data ) {
@@ -573,8 +766,8 @@ class Share_Reddit extends Sharing_Source {
}
class Share_LinkedIn extends Sharing_Source {
- var $shortname = 'linkedin';
- var $genericon = '\f207';
+ public $shortname = 'linkedin';
+ public $genericon = '\f207';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -599,9 +792,10 @@ class Share_LinkedIn extends Sharing_Source {
$share_url = $this->get_share_url( $post->ID );
$display .= sprintf( '<div class="linkedin_button"><script type="in/share" data-url="%s" data-counter="right"></script></div>', esc_url( $share_url ) );
} else {
- $display = $this->get_link( get_permalink( $post->ID ), _x( 'LinkedIn', 'share to', 'jetpack' ), __( 'Click to share on LinkedIn', 'jetpack' ), 'share=linkedin', 'sharing-linkedin-' . $post->ID );
+ $display = $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'LinkedIn', 'share to', 'jetpack' ), __( 'Click to share on LinkedIn', 'jetpack' ), 'share=linkedin', 'sharing-linkedin-' . $post->ID );
}
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'linkedin' ) ) {
sharing_register_post_for_share_counts( $post->ID );
}
@@ -648,8 +842,8 @@ class Share_LinkedIn extends Sharing_Source {
}
class Share_Facebook extends Sharing_Source {
- var $shortname = 'facebook';
- var $genericon = '\f204';
+ public $shortname = 'facebook';
+ public $genericon = '\f204';
private $share_type = 'default';
public function __construct( $id, array $settings ) {
@@ -692,23 +886,47 @@ class Share_Facebook extends Sharing_Source {
$locale = GP_Locales::by_field( 'wp_locale', $lang );
}
- if ( !$locale || empty( $locale->facebook_locale ) ) {
+ if ( ! $locale ) {
return false;
}
+ if ( empty( $locale->facebook_locale ) ) {
+ if ( empty( $locale->wp_locale ) ) {
+ return false;
+ } else {
+ // Facebook SDK is smart enough to fall back to en_US if a
+ // locale isn't supported. Since supported Facebook locales
+ // can fall out of sync, we'll attempt to use the known
+ // wp_locale value and rely on said fallback.
+ return $locale->wp_locale;
+ }
+ }
+
return $locale->facebook_locale;
}
public function get_display( $post ) {
if ( $this->smart ) {
$share_url = $this->get_share_url( $post->ID );
- return '<div class="fb-share-button" data-href="' . esc_attr( $share_url ) . '" data-layout="button_count"></div>';
+ $fb_share_html = '<div class="fb-share-button" data-href="' . esc_attr( $share_url ) . '" data-layout="button_count"></div>';
+ /**
+ * Filter the output of the Facebook Sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $fb_share_html Facebook Sharing button HTML.
+ * @param string $share_url URL of the post to share.
+ */
+ return apply_filters( 'jetpack_sharing_facebook_official_button_output', $fb_share_html, $share_url );
}
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'facebook' ) ) {
sharing_register_post_for_share_counts( $post->ID );
}
- return $this->get_link( get_permalink( $post->ID ), _x( 'Facebook', 'share to', 'jetpack' ), __( 'Share on Facebook', 'jetpack' ), 'share=facebook', 'sharing-facebook-' . $post->ID );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Facebook', 'share to', 'jetpack' ), __( 'Click to share on Facebook', 'jetpack' ), 'share=facebook', 'sharing-facebook-' . $post->ID );
}
public function process_request( $post, array $post_data ) {
@@ -726,14 +944,39 @@ class Share_Facebook extends Sharing_Source {
$this->js_dialog( $this->shortname );
if ( $this->smart ) {
$locale = $this->guess_locale_from_lang( get_locale() );
- ?><div id="fb-root"></div><script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = '//connect.facebook.net/<?php echo $locale; ?>/sdk.js#xfbml=1&appId=249643311490&version=v2.3'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script><?php
+ if ( ! $locale ) {
+ $locale = 'en_US';
+ }
+ /**
+ * Filter the App ID used in the official Facebook Share button.
+ *
+ * @since 3.8.0
+ *
+ * @param int $fb_app_id Facebook App ID. Default to 249643311490 (WordPress.com's App ID).
+ */
+ $fb_app_id = apply_filters( 'jetpack_sharing_facebook_app_id', '249643311490' );
+ if ( is_numeric( $fb_app_id ) ) {
+ $fb_app_id = '&appId=' . $fb_app_id;
+ } else {
+ $fb_app_id = '';
+ }
+ ?><div id="fb-root"></div>
+ <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = '//connect.facebook.net/<?php echo $locale; ?>/sdk.js#xfbml=1<?php echo $fb_app_id; ?>&version=v2.3'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
+ <script>
+ jQuery( document.body ).on( 'post-load', function() {
+ if ( 'undefined' !== typeof FB ) {
+ FB.XFBML.parse();
+ }
+ } );
+ </script>
+ <?php
}
}
}
class Share_Print extends Sharing_Source {
- var $shortname = 'print';
- var $genericon = '\f469';
+ public $shortname = 'print';
+ public $genericon = '\f469';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -748,13 +991,13 @@ class Share_Print extends Sharing_Source {
}
public function get_display( $post ) {
- return $this->get_link( get_permalink( $post->ID ) . ( ( is_single() || is_page() ) ? '#print': '' ), _x( 'Print', 'share to', 'jetpack' ), __( 'Click to print', 'jetpack' ) );
+ return $this->get_link( $this->get_process_request_url( $post->ID ) . ( ( is_single() || is_page() ) ? '#print': '' ), _x( 'Print', 'share to', 'jetpack' ), __( 'Click to print', 'jetpack' ) );
}
}
class Share_PressThis extends Sharing_Source {
- var $shortname = 'pressthis';
- var $genericon = '\f205';
+ public $shortname = 'pressthis';
+ public $genericon = '\f205';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -810,13 +1053,13 @@ class Share_PressThis extends Sharing_Source {
}
public function get_display( $post ) {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Press This', 'share to', 'jetpack' ), __( 'Click to Press This!', 'jetpack' ), 'share=press-this' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Press This', 'share to', 'jetpack' ), __( 'Click to Press This!', 'jetpack' ), 'share=press-this' );
}
}
class Share_GooglePlus1 extends Sharing_Source {
- var $shortname = 'googleplus1';
- var $genericon = '\f218';
+ public $shortname = 'googleplus1';
+ public $genericon = '\f218';
private $state = false;
public function __construct( $id, array $settings ) {
@@ -837,11 +1080,12 @@ class Share_GooglePlus1 extends Sharing_Source {
}
public function get_display( $post ) {
+
if ( $this->smart ) {
$share_url = $this->get_share_url( $post->ID );
return '<div class="googleplus1_button"><div class="g-plus" data-action="share" data-annotation="bubble" data-href="' . esc_url( $share_url ) . '"></div></div>';
} else {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Google', 'share to', 'jetpack' ), __( 'Click to share on Google+', 'jetpack' ), 'share=google-plus-1', 'sharing-google-' . $post->ID );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Google', 'share to', 'jetpack' ), __( 'Click to share on Google+', 'jetpack' ), 'share=google-plus-1', 'sharing-google-' . $post->ID );
}
}
@@ -867,12 +1111,36 @@ class Share_GooglePlus1 extends Sharing_Source {
global $post;
if ( $this->smart ) { ?>
- <script type="text/javascript">
- (function() {
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
- po.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
- })();
+ <script>
+ function renderGooglePlus1() {
+ if ( 'undefined' === typeof gapi ) {
+ return;
+ }
+
+ jQuery( '.g-plus' ).each(function() {
+ var $button = jQuery( this );
+
+ if ( ! $button.data( 'gplus-rendered' ) ) {
+ gapi.plusone.render( this, {
+ href: $button.attr( 'data-href' ),
+ size: $button.attr( 'data-size' ),
+ annotation: $button.attr( 'data-annotation' )
+ });
+
+ $button.data( 'gplus-rendered', true );
+ }
+ });
+ }
+
+ (function() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js';
+ po.innerHTML = '{"parsetags": "explicit"}';
+ po.onload = renderGooglePlus1;
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+ })();
+
+ jQuery( document.body ).on( 'post-load', renderGooglePlus1 );
</script>
<?php
} else {
@@ -900,7 +1168,7 @@ class Share_Custom extends Sharing_Advanced_Source {
private $icon;
private $url;
public $smart = true;
- var $shortname;
+ public $shortname;
public function get_class() {
return 'custom share-custom-' . sanitize_html_class( strtolower( $this->name ) );
@@ -942,7 +1210,7 @@ class Share_Custom extends Sharing_Advanced_Source {
}
public function get_display( $post ) {
- $str = $this->get_link( get_permalink( $post->ID ), esc_html( $this->name ), sprintf( __( 'Click to share on %s', 'jetpack' ), esc_attr( $this->name ) ), 'share='.$this->id );
+ $str = $this->get_link( $this->get_process_request_url( $post->ID ), esc_html( $this->name ), sprintf( __( 'Click to share on %s', 'jetpack' ), esc_attr( $this->name ) ), 'share='.$this->id );
return str_replace( '<span>', '<span style="' . esc_attr( 'background-image:url("' . addcslashes( esc_url_raw( $this->icon ), '"' ) . '");' ) . '">', $str );
}
@@ -1064,7 +1332,7 @@ class Share_Custom extends Sharing_Advanced_Source {
$klasses[] = 'no-icon';
$link = sprintf(
- '<a rel="nofollow" class="%s" href="javascript:void(0);return false;" title="%s"><span style="background-image:url(&quot;%s&quot;) !important;background-position:left center;background-repeat:no-repeat;">%s</span></a>',
+ '<a rel="nofollow" class="%s" href="javascript:void(0)" title="%s"><span style="background-image:url(&quot;%s&quot;) !important;background-position:left center;background-repeat:no-repeat;">%s</span></a>',
implode( ' ', $klasses ),
$this->get_name(),
addcslashes( esc_url_raw( $opts['icon'] ), '"' ),
@@ -1078,8 +1346,8 @@ class Share_Custom extends Sharing_Advanced_Source {
}
class Share_Tumblr extends Sharing_Source {
- var $shortname = 'tumblr';
- var $genericon = '\f214';
+ public $shortname = 'tumblr';
+ public $genericon = '\f214';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
if ( 'official' == $this->button_style )
@@ -1100,7 +1368,7 @@ class Share_Tumblr extends Sharing_Source {
return '<a target="' . $target . '" href="http://www.tumblr.com/share/link/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&name=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" title="' . __( 'Share on Tumblr', 'jetpack' ) . '" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:62px; height:20px; background:url(\'//platform.tumblr.com/v1/share_2.png\') top left no-repeat transparent;">' . __( 'Share on Tumblr', 'jetpack' ) . '</a>';
} else {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Tumblr', 'share to', 'jetpack' ), __( 'Click to share on Tumblr', 'jetpack' ), 'share=tumblr' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Tumblr', 'share to', 'jetpack' ), __( 'Click to share on Tumblr', 'jetpack' ), 'share=tumblr' );
}
}
@@ -1124,12 +1392,11 @@ class Share_Tumblr extends Sharing_Source {
}
class Share_Pinterest extends Sharing_Source {
- var $shortname = 'pinterest';
- var $genericon = '\f209';
+ public $shortname = 'pinterest';
+ public $genericon = '\f209';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
-
if ( 'official' == $this->button_style )
$this->smart = true;
else
@@ -1140,16 +1407,70 @@ class Share_Pinterest extends Sharing_Source {
return __( 'Pinterest', 'jetpack' );
}
+ public function get_image( $post ) {
+ if ( class_exists( 'Jetpack_PostImages' ) ) {
+ $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) );
+ if ( ! empty( $image ) ) {
+ return $image['src'];
+ }
+ }
+
+ /**
+ * Filters the default image used by the Pinterest Pin It share button.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $url Default image URL.
+ */
+ return apply_filters( 'jetpack_sharing_pinterest_default_image', 'https://s0.wp.com/i/blank.jpg' );
+ }
+
+ public function get_external_url( $post ) {
+ $url = 'https://www.pinterest.com/pin/create/button/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&media=' . rawurlencode( $this->get_image( $post ) ) . '&description=' . rawurlencode( $post->post_title );
+
+ /**
+ * Filters the Pinterest share URL used in sharing button output.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $url Pinterest share URL.
+ */
+ return apply_filters( 'jetpack_sharing_pinterest_share_url', $url );
+ }
+
+ public function get_widget_type() {
+ /**
+ * Filters the Pinterest widget type.
+ *
+ * @see https://business.pinterest.com/en/widget-builder
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $type Pinterest widget type. Default of 'buttonPin' for single-image selection. 'buttonBookmark' for multi-image modal.
+ */
+ return apply_filters( 'jetpack_sharing_pinterest_widget_type', 'buttonPin' );
+ }
+
public function get_display( $post ) {
$display = '';
if ( $this->smart ) {
- $share_url = 'http://pinterest.com/pin/create/button/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&description=' . rawurlencode( $post->post_title );
- $display .= sprintf( '<div class="pinterest_button"><a href="%s" data-pin-do="buttonBookmark" data-pin-config="beside"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a></div>', esc_url( $share_url ) );
+ $display = sprintf(
+ '<div class="pinterest_button"><a href="%s" data-pin-do="%s" data-pin-config="beside"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a></div>',
+ esc_url( $this->get_external_url( $post ) ),
+ esc_attr( $this->get_widget_type() )
+ );
} else {
- $display = $this->get_link( get_permalink( $post->ID ), _x( 'Pinterest', 'share to', 'jetpack' ), __( 'Click to share on Pinterest', 'jetpack' ), 'share=pinterest', 'sharing-pinterest-' . $post->ID );
+ $display = $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Pinterest', 'share to', 'jetpack' ), __( 'Click to share on Pinterest', 'jetpack' ), 'share=pinterest', 'sharing-pinterest-' . $post->ID );
}
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'linkedin' ) ) {
sharing_register_post_for_share_counts( $post->ID );
}
@@ -1160,19 +1481,27 @@ class Share_Pinterest extends Sharing_Source {
public function process_request( $post, array $post_data ) {
// Record stats
parent::process_request( $post, $post_data );
-
// If we're triggering the multi-select panel, then we don't need to redirect to Pinterest
if ( !isset( $_GET['js_only'] ) ) {
- $pinterest_url = esc_url_raw( 'http://pinterest.com/pin/create/button/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&description=' . rawurlencode( $this->get_share_title( $post->ID ) ) );
+ $pinterest_url = esc_url_raw( $this->get_external_url( $post ) );
wp_redirect( $pinterest_url );
} else {
echo '// share count bumped';
}
-
die();
}
public function display_footer() {
+ /**
+ * Filter the Pin it button appearing when hovering over images when using the official button style.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param bool $jetpack_pinit_over True by default, displays the Pin it button when hovering over images.
+ */
+ $jetpack_pinit_over = apply_filters( 'jetpack_pinit_over_button', true );
?>
<?php if ( $this->smart ) : ?>
<script type="text/javascript">
@@ -1180,42 +1509,40 @@ class Share_Pinterest extends Sharing_Source {
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
- s.setAttribute('data-pin-hover', true);
+ <?php if ( $jetpack_pinit_over ) echo "s.setAttribute('data-pin-hover', true);"; ?>
s.src = window.location.protocol + "//assets.pinterest.com/js/pinit.js";
var x = document.getElementsByTagName("script")[0];
x.parentNode.insertBefore(s, x);
// if 'Pin it' button has 'counts' make container wider
jQuery(window).load( function(){ jQuery( 'li.share-pinterest a span:visible' ).closest( '.share-pinterest' ).width( '80px' ); } );
</script>
- <?php else : ?>
+ <?php elseif ( 'buttonPin' != $this->get_widget_type() ) : ?>
<script type="text/javascript">
- jQuery(document).on('ready', function(){
- jQuery('body').on('click', 'a.share-pinterest', function(e){
- e.preventDefault();
-
- // Load Pinterest Bookmarklet code
- var s = document.createElement("script");
- s.type = "text/javascript";
- s.src = window.location.protocol + "//assets.pinterest.com/js/pinmarklet.js?r=" + ( Math.random() * 99999999 );
- var x = document.getElementsByTagName("script")[0];
- x.parentNode.insertBefore(s, x);
-
- // Trigger Stats
- var s = document.createElement("script");
- s.type = "text/javascript";
- s.src = this + ( this.toString().indexOf( '?' ) ? '&' : '?' ) + 'js_only=1';
- var x = document.getElementsByTagName("script")[0];
- x.parentNode.insertBefore(s, x);
+ jQuery(document).on('ready', function(){
+ jQuery('body').on('click', 'a.share-pinterest', function(e){
+ e.preventDefault();
+ // Load Pinterest Bookmarklet code
+ var s = document.createElement("script");
+ s.type = "text/javascript";
+ s.src = window.location.protocol + "//assets.pinterest.com/js/pinmarklet.js?r=" + ( Math.random() * 99999999 );
+ var x = document.getElementsByTagName("script")[0];
+ x.parentNode.insertBefore(s, x);
+ // Trigger Stats
+ var s = document.createElement("script");
+ s.type = "text/javascript";
+ s.src = this + ( this.toString().indexOf( '?' ) ? '&' : '?' ) + 'js_only=1';
+ var x = document.getElementsByTagName("script")[0];
+ x.parentNode.insertBefore(s, x);
+ });
});
- });
</script>
<?php endif;
}
}
class Share_Pocket extends Sharing_Source {
- var $shortname = 'pocket';
- var $genericon = '\f224';
+ public $shortname = 'pocket';
+ public $genericon = '\f224';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -1250,7 +1577,7 @@ class Share_Pocket extends Sharing_Source {
return $button;
} else {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Pocket', 'share to', 'jetpack' ), __( 'Click to share on Pocket', 'jetpack' ), 'share=pocket' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Pocket', 'share to', 'jetpack' ), __( 'Click to share on Pocket', 'jetpack' ), 'share=pocket' );
}
}
@@ -1275,3 +1602,86 @@ class Share_Pocket extends Sharing_Source {
}
+class Share_Skype extends Sharing_Source {
+ public $shortname = 'skype';
+ public $genericon = '\f220';
+ private $share_type = 'default';
+
+ public function __construct( $id, array $settings ) {
+ parent::__construct( $id, $settings );
+
+ if ( isset( $settings['share_type'] ) ) {
+ $this->share_type = $settings['share_type'];
+ }
+
+ if ( 'official' == $this->button_style ) {
+ $this->smart = true;
+ } else {
+ $this->smart = false;
+ }
+ }
+
+ public function get_name() {
+ return __( 'Skype', 'jetpack' );
+ }
+
+ public function get_display( $post ) {
+ if ( $this->smart ) {
+ $skype_share_html = sprintf(
+ '<div class="skype-share" data-href="%1$s" data-lang="%2$s" data-style="small" data-source="jetpack" ></div>',
+ esc_attr( $this->get_share_url( $post->ID ) ),
+ 'en-US'
+ );
+ return $skype_share_html;
+ }
+
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
+ if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'skype' ) ) {
+ sharing_register_post_for_share_counts( $post->ID );
+ }
+ return $this->get_link(
+ $this->get_process_request_url( $post->ID ), _x( 'Skype', 'share to', 'jetpack' ), __( 'Share on Skype', 'jetpack' ), 'share=skype', 'sharing-skype-' . $post->ID );
+ }
+
+ public function process_request( $post, array $post_data ) {
+ $skype_url = sprintf(
+ 'https://web.skype.com/share?url=%1$s&lang=%2$s=&source=jetpack',
+ rawurlencode( $this->get_share_url( $post->ID ) ),
+ 'en-US'
+ );
+
+ // Record stats
+ parent::process_request( $post, $post_data );
+
+ // Redirect to Skype
+ wp_redirect( $skype_url );
+ die();
+ }
+
+ public function display_footer() {
+ if ( $this->smart ) :
+ ?>
+ <script>
+ (function(r, d, s) {
+ r.loadSkypeWebSdkAsync = r.loadSkypeWebSdkAsync || function(p) {
+ var js, sjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(p.id)) { return; }
+ js = d.createElement(s);
+ js.id = p.id;
+ js.src = p.scriptToLoad;
+ js.onload = p.callback
+ sjs.parentNode.insertBefore(js, sjs);
+ };
+ var p = {
+ scriptToLoad: 'https://swx.cdn.skype.com/shared/v/latest/skypewebsdk.js',
+ id: 'skype_web_sdk'
+ };
+ r.loadSkypeWebSdkAsync(p);
+ })(window, document, 'script');
+ </script>
+ <?php
+ else :
+ $this->js_dialog( $this->shortname, array( 'width' => 305, 'height' => 665 ) );
+ endif;
+ }
+}
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.css b/plugins/jetpack/modules/sharedaddy/sharing.css
index 3b8bbaad..3d6565bf 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.css
+++ b/plugins/jetpack/modules/sharedaddy/sharing.css
@@ -237,18 +237,18 @@ body .sd-content ul li.share-custom.no-icon a span {
.sd-social-icon-text .sd-content li.share-tumblr a:before {
content: '\f214';
}
-.sd-social-icon .sd-content ul li.share-stumbleupon a:before,
-.sd-social-text .sd-content ul li.share-stumbleupon a:before,
-.sd-content ul li.share-stumbleupon div.option.option-smart-off a:before,
-.sd-social-icon-text .sd-content li.share-stumbleupon a:before {
- content: '\f223';
-}
.sd-social-icon .sd-content ul li.share-pocket a:before,
.sd-social-text .sd-content ul li.share-pocket a:before,
.sd-content ul li.share-pocket div.option.option-smart-off a:before,
.sd-social-icon-text .sd-content li.share-pocket a:before {
content: '\f224';
}
+.sd-social-icon .sd-content ul li.share-skype a:before,
+.sd-social-text .sd-content ul li.share-skype a:before,
+.sd-content ul li.share-skype div.option.option-smart-off a:before,
+.sd-social-icon-text .sd-content li.share-skype a:before {
+ content: '\f220';
+}
.sd-social-icon .sd-content ul li.share-pinterest a:before,
.sd-social-text .sd-content ul li.share-pinterest a:before,
.sd-content ul li.share-pinterest div.option.option-smart-off a:before,
@@ -339,13 +339,16 @@ body .sd-content ul li.share-custom.no-icon a span {
width: 98px;
}
-.sd-social-official .sd-content .twitter_button iframe {
- width: 96px;
+.sd-social-official .sd-content .skypeShare {
+ width: 55px;
}
-
/* Individual official buttons */
-.stumbleupon_button iframe, .reddit_button iframe {
+.googleplus1_button .g-plus {
+ vertical-align: top !important;
+}
+
+.reddit_button iframe {
margin-top: 1px;
}
@@ -526,11 +529,6 @@ body .sd-social-icon .sd-content li.share-custom a span {
color: #fff !important;
}
-.sd-social-icon .sd-content ul li[class*='share-'].share-stumbleupon a.sd-button {
- background: #ea4b24;
- color: #fff !important;
-}
-
.sd-social-icon .sd-content ul li[class*='share-'].share-twitter a.sd-button {
background: #00acee;
color: #fff !important;
@@ -565,6 +563,11 @@ body .sd-social-icon .sd-content li.share-custom a span {
color: #fff !important;
}
+.sd-social-icon .sd-content ul li[class*='share-'].share-skype a.sd-button {
+ background: #00AFF0;
+ color: #fff !important;
+}
+
.sd-social-icon .sd-content ul li[class*='share-'].share-reddit a.sd-button {
background: #cee3f8;
color: #555555 !important;
@@ -677,4 +680,3 @@ div.sharedaddy.sharedaddy-dark #sharing_email {
height: 123px;
margin: 0 0 1em 0;
}
-
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.js b/plugins/jetpack/modules/sharedaddy/sharing.js
index 37da0889..1c1d6aa0 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.js
+++ b/plugins/jetpack/modules/sharedaddy/sharing.js
@@ -1,12 +1,10 @@
-/* global WPCOM_sharing_counts, Recaptcha */
+/* global WPCOM_sharing_counts, grecaptcha */
var sharing_js_options;
if ( sharing_js_options && sharing_js_options.counts ) {
var WPCOMSharing = {
done_urls : [],
- twitter_count : {},
get_counts : function() {
- var facebookPostIds = [],
- https_url, http_url, url, urls, id, service, service_url, path_ending;
+ var url, requests, id, service, service_request;
if ( 'undefined' === typeof WPCOM_sharing_counts ) {
return;
@@ -19,25 +17,10 @@ if ( sharing_js_options && sharing_js_options.counts ) {
continue;
}
- // get both the http and https version of these URLs
- https_url = encodeURIComponent( url.replace( /^http:\/\//i, 'https://' ) );
- http_url = encodeURIComponent( url.replace( /^https:\/\//i, 'http://' ) );
-
- if ( jQuery( 'a[data-shared=sharing-facebook-' + id + ']' ).length ) {
- facebookPostIds.push( id );
- }
-
- urls = {
- twitter: [
- 'https://cdn.api.twitter.com/1/urls/count.json?callback=WPCOMSharing.update_twitter_count&url=' +
- http_url,
- 'https://cdn.api.twitter.com/1/urls/count.json?callback=WPCOMSharing.update_twitter_count&url=' +
- https_url
- ],
+ requests = {
// LinkedIn actually gets the share count for both the http and https version automatically -- so we don't need to do extra magic
linkedin: [
- window.location.protocol +
- '//www.linkedin.com/countserv/count/share?format=jsonp&callback=WPCOMSharing.update_linkedin_count&url=' +
+ 'https://www.linkedin.com/countserv/count/share?format=jsonp&callback=WPCOMSharing.update_linkedin_count&url=' +
encodeURIComponent( url )
],
// Pinterest, like LinkedIn, handles share counts for both http and https
@@ -45,90 +28,60 @@ if ( sharing_js_options && sharing_js_options.counts ) {
window.location.protocol +
'//api.pinterest.com/v1/urls/count.json?callback=WPCOMSharing.update_pinterest_count&url=' +
encodeURIComponent( url )
+ ],
+ // Facebook protocol summing has been shown to falsely double counts, so we only request the current URL
+ facebook: [
+ window.location.protocol +
+ '//graph.facebook.com/?callback=WPCOMSharing.update_facebook_count&ids=' +
+ encodeURIComponent( url )
]
};
- for ( service in urls ) {
+ for ( service in requests ) {
if ( ! jQuery( 'a[data-shared=sharing-' + service + '-' + id + ']' ).length ) {
continue;
}
- while ( ( service_url = urls[ service ].pop() ) ) {
- jQuery.getScript( service_url );
+ while ( ( service_request = requests[ service ].pop() ) ) {
+ jQuery.getScript( service_request );
}
+
+ WPCOMSharing.bump_sharing_count_stat( service );
}
WPCOMSharing.done_urls[ id ] = true;
}
-
- if ( facebookPostIds.length && ( 'WPCOM_site_ID' in window ) ) {
- path_ending = window.WPCOM_jetpack ? 'jetpack-count' : 'count';
- jQuery.ajax({
- dataType: 'jsonp',
- url: 'https://public-api.wordpress.com/rest/v1.1/sites/' + window.WPCOM_site_ID + '/sharing-buttons/facebook/' + path_ending,
- jsonpCallback: 'WPCOMSharing.update_facebook_count',
- data: { post_ID: facebookPostIds },
- success: WPCOMSharing.update_facebook_count,
- cache: true
- });
- }
},
// get the version of the url that was stored in the dom (sharing-$service-URL)
get_permalink: function( url ) {
- var rxTrailingSlash, formattedSlashUrl;
-
if ( 'https:' === window.location.protocol ) {
url = url.replace( /^http:\/\//i, 'https://' );
} else {
url = url.replace( /^https:\/\//i, 'http://' );
}
- // Some services (e.g. Twitter) canonicalize the URL with a trailing
- // slash. We can account for this by checking whether either format
- // exists as a known URL
- if ( ! ( url in WPCOM_sharing_counts ) ) {
- rxTrailingSlash = /\/$/,
- formattedSlashUrl = rxTrailingSlash.test( url ) ?
- url.replace( rxTrailingSlash, '' ) : url + '/';
-
- if ( formattedSlashUrl in WPCOM_sharing_counts ) {
- url = formattedSlashUrl;
- }
- }
-
return url;
},
- update_facebook_count : function( data ) {
- var index, length, post;
+ update_facebook_count: function( data ) {
+ var url, permalink;
- if ( ! data || ! data.counts ) {
+ if ( ! data ) {
return;
}
- for ( index = 0, length = data.counts.length; index < length; index++ ) {
- post = data.counts[ index ];
-
- if ( ! post.post_ID || ! post.count ) {
+ for ( url in data ) {
+ if ( ! data.hasOwnProperty( url ) || ! data[ url ].shares ) {
continue;
}
- WPCOMSharing.inject_share_count( 'sharing-facebook-' + post.post_ID, post.count );
- }
- },
- update_twitter_count : function( data ) {
- if ( 'number' === typeof data.count ) {
- var permalink = WPCOMSharing.get_permalink( data.url );
+ permalink = WPCOMSharing.get_permalink( url );
- if ( ! WPCOMSharing.twitter_count[ permalink ] ) {
- WPCOMSharing.twitter_count[ permalink ] = 0;
+ if ( ! ( permalink in WPCOM_sharing_counts ) ) {
+ continue;
}
- WPCOMSharing.twitter_count[ permalink ] += data.count;
-
- if ( WPCOMSharing.twitter_count[ permalink ] > 0 ) {
- WPCOMSharing.inject_share_count( 'sharing-twitter-' + WPCOM_sharing_counts[ permalink ], WPCOMSharing.twitter_count[ permalink ] );
- }
+ WPCOMSharing.inject_share_count( 'sharing-facebook-' + WPCOM_sharing_counts[ permalink ], data[ url ].shares );
}
},
update_linkedin_count : function( data ) {
@@ -154,6 +107,9 @@ if ( sharing_js_options && sharing_js_options.counts ) {
return String( count ).substring( 0, 1 ) + 'K+';
}
return '10K+';
+ },
+ bump_sharing_count_stat: function( service ) {
+ new Image().src = document.location.protocol + '//pixel.wp.com/g.gif?v=wpcom-no-pv&x_sharing-count-request=' + service + '&r=' + Math.random();
}
};
}
@@ -176,7 +132,9 @@ if ( sharing_js_options && sharing_js_options.counts ) {
function WPCOMSharing_do() {
var $more_sharing_buttons;
- WPCOMSharing.get_counts();
+ if ( 'undefined' !== typeof WPCOMSharing ) {
+ WPCOMSharing.get_counts();
+ }
$more_sharing_buttons = $( '.sharedaddy a.sharing-anchor' );
$more_sharing_buttons.click( function() {
@@ -381,7 +339,7 @@ if ( sharing_js_options && sharing_js_options.counts ) {
// Email button
$( 'a.share-email', this ).on( 'click', function() {
- var url = $( this ).attr( 'href' ), key;
+ var url = $( this ).attr( 'href' );
if ( $sharing_email.is( ':visible' ) ) {
$sharing_email.slideUp( 200 );
@@ -393,14 +351,11 @@ if ( sharing_js_options && sharing_js_options.counts ) {
$( '#sharing_email form input[type=submit]' ).removeAttr( 'disabled' );
$( '#sharing_email form a.sharing_cancel' ).show();
- key = '';
- if ( $( '#recaptcha_public_key' ).length > 0 ) {
- key = $( '#recaptcha_public_key' ).val();
+ // Reset reCATPCHA if exists.
+ if ( 'object' === typeof grecaptcha && 'function' === typeof grecaptcha.reset ) {
+ grecaptcha.reset();
}
- // Update the recaptcha
- Recaptcha.create( key, 'sharing_recaptcha', { lang : sharing_js_options.lang } );
-
// Show dialog
$sharing_email.css( {
left: $( this ).offset().left + 'px',
@@ -448,7 +403,10 @@ if ( sharing_js_options && sharing_js_options.counts ) {
$( '#sharing_email .errors-' + response ).show();
form.find( 'input[type=submit]' ).removeAttr( 'disabled' );
form.find( 'a.sharing_cancel' ).show();
- Recaptcha.reload();
+
+ if ( 'object' === typeof grecaptcha && 'function' === typeof grecaptcha.reset ) {
+ grecaptcha.reset();
+ }
}
else {
$( '#sharing_email form' ).hide();
@@ -481,36 +439,3 @@ if ( sharing_js_options && sharing_js_options.counts ) {
$( 'li.share-email, li.share-custom a.sharing-anchor' ).addClass( 'share-service-visible' );
}
})( jQuery );
-
-// Recaptcha code
-/* jshint ignore:start */
-var RecaptchaTemplates={};RecaptchaTemplates.VertHtml='<table id="recaptcha_table" class="recaptchatable" > <tr> <td colspan="6" class=\'recaptcha_r1_c1\'></td> </tr> <tr> <td class=\'recaptcha_r2_c1\'></td> <td colspan="4" class=\'recaptcha_image_cell\'><div id="recaptcha_image"></div></td> <td class=\'recaptcha_r2_c2\'></td> </tr> <tr> <td rowspan="6" class=\'recaptcha_r3_c1\'></td> <td colspan="4" class=\'recaptcha_r3_c2\'></td> <td rowspan="6" class=\'recaptcha_r3_c3\'></td> </tr> <tr> <td rowspan="3" class=\'recaptcha_r4_c1\' height="49"> <div class="recaptcha_input_area"> <label for="recaptcha_response_field" class="recaptcha_input_area_text"><span id="recaptcha_instructions_image" class="recaptcha_only_if_image recaptcha_only_if_no_incorrect_sol"></span><span id="recaptcha_instructions_audio" class="recaptcha_only_if_no_incorrect_sol recaptcha_only_if_audio"></span><span id="recaptcha_instructions_error" class="recaptcha_only_if_incorrect_sol"></span></label><br/> <input name="recaptcha_response_field" id="recaptcha_response_field" type="text" /> </div> </td> <td rowspan="4" class=\'recaptcha_r4_c2\'></td> <td><a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="17" /></a></td> <td rowspan="4" class=\'recaptcha_r4_c4\'></td> </tr> <tr> <td><a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="16" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="16" alt=""/></a></td> </tr> <tr> <td><a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a></td> </tr> <tr> <td class=\'recaptcha_r7_c1\'></td> <td class=\'recaptcha_r8_c1\'></td> </tr> </table> ';RecaptchaTemplates.CleanCss=".recaptchatable td img{display:block}.recaptchatable .recaptcha_image_cell center img{height:57px}.recaptchatable .recaptcha_image_cell center{height:57px}.recaptchatable .recaptcha_image_cell{background-color:white;height:57px;padding:7px!important}.recaptchatable,#recaptcha_area tr,#recaptcha_area td,#recaptcha_area th{margin:0!important;border:0!important;border-collapse:collapse!important;vertical-align:middle!important}.recaptchatable *{margin:0;padding:0;border:0;color:black;position:static;top:auto;left:auto;right:auto;bottom:auto;text-align:left!important}.recaptchatable #recaptcha_image{margin:auto;border:1px solid #dfdfdf!important}.recaptchatable a img{border:0}.recaptchatable a,.recaptchatable a:hover{-moz-outline:none;border:0!important;padding:0!important;text-decoration:none;color:blue;background:none!important;font-weight:normal}.recaptcha_input_area{position:relative!important;background:none!important}.recaptchatable label.recaptcha_input_area_text{border:1px solid #dfdfdf!important;margin:0!important;padding:0!important;position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important}.recaptcha_theme_red label.recaptcha_input_area_text,.recaptcha_theme_white label.recaptcha_input_area_text{color:black!important}.recaptcha_theme_blackglass label.recaptcha_input_area_text{color:white!important}.recaptchatable #recaptcha_response_field{font-size:11pt}.recaptcha_theme_blackglass #recaptcha_response_field,.recaptcha_theme_white #recaptcha_response_field{border:1px solid gray}.recaptcha_theme_red #recaptcha_response_field{border:1px solid #cca940}.recaptcha_audio_cant_hear_link{font-size:7pt;color:black}.recaptchatable{line-height:1em;border:1px solid #dfdfdf!important}.recaptcha_error_text{color:red}";RecaptchaTemplates.CleanHtml='<table id="recaptcha_table" class="recaptchatable"> <tr height="73"> <td class=\'recaptcha_image_cell\' width="302"><center><div id="recaptcha_image"></div></center></td> <td style="padding: 10px 7px 7px 7px;"> <a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="18" alt="" /></a> <a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="15" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="15" alt=""/></a> <a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a> </td> <td style="padding: 18px 7px 18px 7px;"> <img id=\'recaptcha_logo\' alt="" width="71" height="36" /> </td> </tr> <tr> <td style="padding-left: 7px;"> <div class="recaptcha_input_area" style="padding-top: 2px; padding-bottom: 7px;"> <input style="border: 1px solid #3c3c3c; width: 302px;" name="recaptcha_response_field" id="recaptcha_response_field" type="text" /> </div> </td> <td></td> <td style="padding: 4px 7px 12px 7px;"> <img id="recaptcha_tagline" width="71" height="17" /> </td> </tr> </table> ';RecaptchaTemplates.ContextHtml='<table id="recaptcha_table" class="recaptchatable"> <tr> <td colspan="6" class=\'recaptcha_r1_c1\'></td> </tr> <tr> <td class=\'recaptcha_r2_c1\'></td> <td colspan="4" class=\'recaptcha_image_cell\'><div id="recaptcha_image"></div></td> <td class=\'recaptcha_r2_c2\'></td> </tr> <tr> <td rowspan="6" class=\'recaptcha_r3_c1\'></td> <td colspan="4" class=\'recaptcha_r3_c2\'></td> <td rowspan="6" class=\'recaptcha_r3_c3\'></td> </tr> <tr> <td rowspan="3" class=\'recaptcha_r4_c1\' height="49"> <div class="recaptcha_input_area"> <label for="recaptcha_response_field" class="recaptcha_input_area_text"><span id="recaptcha_instructions_context" class="recaptcha_only_if_image recaptcha_only_if_no_incorrect_sol"></span><span id="recaptcha_instructions_audio" class="recaptcha_only_if_no_incorrect_sol recaptcha_only_if_audio"></span><span id="recaptcha_instructions_error" class="recaptcha_only_if_incorrect_sol"></span></label><br/> <input name="recaptcha_response_field" id="recaptcha_response_field" type="text" /> </div> </td> <td rowspan="4" class=\'recaptcha_r4_c2\'></td> <td><a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="17" /></a></td> <td rowspan="4" class=\'recaptcha_r4_c4\'></td> </tr> <tr> <td><a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="16" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="16" alt=""/></a></td> </tr> <tr> <td><a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a></td> </tr> <tr> <td class=\'recaptcha_r7_c1\'></td> <td class=\'recaptcha_r8_c1\'></td> </tr> </table> ';RecaptchaTemplates.VertCss=".recaptchatable td img{display:block}.recaptchatable .recaptcha_r1_c1{background:url(IMGROOT/sprite.png) 0 -63px no-repeat;width:318px;height:9px}.recaptchatable .recaptcha_r2_c1{background:url(IMGROOT/sprite.png) -18px 0 no-repeat;width:9px;height:57px}.recaptchatable .recaptcha_r2_c2{background:url(IMGROOT/sprite.png) -27px 0 no-repeat;width:9px;height:57px}.recaptchatable .recaptcha_r3_c1{background:url(IMGROOT/sprite.png) 0 0 no-repeat;width:9px;height:63px}.recaptchatable .recaptcha_r3_c2{background:url(IMGROOT/sprite.png) -18px -57px no-repeat;width:300px;height:6px}.recaptchatable .recaptcha_r3_c3{background:url(IMGROOT/sprite.png) -9px 0 no-repeat;width:9px;height:63px}.recaptchatable .recaptcha_r4_c1{background:url(IMGROOT/sprite.png) -43px 0 no-repeat;width:171px;height:49px}.recaptchatable .recaptcha_r4_c2{background:url(IMGROOT/sprite.png) -36px 0 no-repeat;width:7px;height:57px}.recaptchatable .recaptcha_r4_c4{background:url(IMGROOT/sprite.png) -214px 0 no-repeat;width:97px;height:57px}.recaptchatable .recaptcha_r7_c1{background:url(IMGROOT/sprite.png) -43px -49px no-repeat;width:171px;height:8px}.recaptchatable .recaptcha_r8_c1{background:url(IMGROOT/sprite.png) -43px -49px no-repeat;width:25px;height:8px}.recaptchatable .recaptcha_image_cell center img{height:57px}.recaptchatable .recaptcha_image_cell center{height:57px}.recaptchatable .recaptcha_image_cell{background-color:white;height:57px}#recaptcha_area,#recaptcha_table{width:318px!important}.recaptchatable,#recaptcha_area tr,#recaptcha_area td,#recaptcha_area th{margin:0!important;border:0!important;padding:0!important;border-collapse:collapse!important;vertical-align:middle!important}.recaptchatable *{margin:0;padding:0;border:0;font-family:helvetica,sans-serif;font-size:8pt;color:black;position:static;top:auto;left:auto;right:auto;bottom:auto;text-align:left!important}.recaptchatable #recaptcha_image{margin:auto}.recaptchatable img{border:0!important;margin:0!important;padding:0!important}.recaptchatable a,.recaptchatable a:hover{-moz-outline:none;border:0!important;padding:0!important;text-decoration:none;color:blue;background:none!important;font-weight:normal}.recaptcha_input_area{position:relative!important;width:146px!important;height:45px!important;margin-left:20px!important;margin-right:5px!important;margin-top:4px!important;background:none!important}.recaptchatable label.recaptcha_input_area_text{margin:0!important;padding:0!important;position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;background:none!important;height:auto!important;width:auto!important}.recaptcha_theme_red label.recaptcha_input_area_text,.recaptcha_theme_white label.recaptcha_input_area_text{color:black!important}.recaptcha_theme_blackglass label.recaptcha_input_area_text{color:white!important}.recaptchatable #recaptcha_response_field{width:145px!important;position:absolute!important;bottom:7px!important;padding:0!important;margin:0!important;font-size:10pt}.recaptcha_theme_blackglass #recaptcha_response_field,.recaptcha_theme_white #recaptcha_response_field{border:1px solid gray}.recaptcha_theme_red #recaptcha_response_field{border:1px solid #cca940}.recaptcha_audio_cant_hear_link{font-size:7pt;color:black}.recaptchatable{line-height:1em}#recaptcha_instructions_error{color:red!important}";var RecaptchaStr_en={visual_challenge:"Get a visual challenge",audio_challenge:"Get an audio challenge",refresh_btn:"Get a new challenge",instructions_visual:"Type the two words:",instructions_context:"Type the words in the boxes:",instructions_audio:"Type what you hear:",help_btn:"Help",play_again:"Play sound again",cant_hear_this:"Download sound as MP3",incorrect_try_again:"Incorrect. Try again."},RecaptchaStr_de={visual_challenge:"Visuelle Aufgabe generieren",audio_challenge:"Audio-Aufgabe generieren",
-refresh_btn:"Neue Aufgabe generieren",instructions_visual:"Gib die 2 W\u00f6rter ein:",instructions_context:"",instructions_audio:"Gib die 8 Ziffern ein:",help_btn:"Hilfe",incorrect_try_again:"Falsch. Nochmals versuchen!"},RecaptchaStr_es={visual_challenge:"Obt\u00e9n un reto visual",audio_challenge:"Obt\u00e9n un reto audible",refresh_btn:"Obt\u00e9n un nuevo reto",instructions_visual:"Escribe las 2 palabras:",instructions_context:"",instructions_audio:"Escribe los 8 n\u00fameros:",help_btn:"Ayuda",
-incorrect_try_again:"Incorrecto. Otro intento."},RecaptchaStr_fr={visual_challenge:"D\u00e9fi visuel",audio_challenge:"D\u00e9fi audio",refresh_btn:"Nouveau d\u00e9fi",instructions_visual:"Entrez les deux mots:",instructions_context:"",instructions_audio:"Entrez les huit chiffres:",help_btn:"Aide",incorrect_try_again:"Incorrect."},RecaptchaStr_nl={visual_challenge:"Test me via een afbeelding",audio_challenge:"Test me via een geluidsfragment",refresh_btn:"Nieuwe uitdaging",instructions_visual:"Type de twee woorden:",
-instructions_context:"",instructions_audio:"Type de acht cijfers:",help_btn:"Help",incorrect_try_again:"Foute invoer."},RecaptchaStr_pt={visual_challenge:"Obter um desafio visual",audio_challenge:"Obter um desafio sonoro",refresh_btn:"Obter um novo desafio",instructions_visual:"Escreva as 2 palavras:",instructions_context:"",instructions_audio:"Escreva os 8 numeros:",help_btn:"Ajuda",incorrect_try_again:"Incorrecto. Tenta outra vez."},RecaptchaStr_ru={visual_challenge:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",
-audio_challenge:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0437\u0432\u0443\u043a\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",refresh_btn:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",instructions_visual:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0432\u0430 \u0441\u043b\u043e\u0432\u0430:",instructions_context:"",instructions_audio:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u043e\u0441\u0435\u043c\u044c \u0447\u0438\u0441\u0435\u043b:",
-help_btn:"\u041f\u043e\u043c\u043e\u0449\u044c",incorrect_try_again:"\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e."},RecaptchaStr_tr={visual_challenge:"G\u00f6rsel deneme",audio_challenge:"\u0130\u015fitsel deneme",refresh_btn:"Yeni deneme",instructions_visual:"\u0130ki kelimeyi yaz\u0131n:",instructions_context:"",instructions_audio:"Sekiz numaray\u0131 yaz\u0131n:",help_btn:"Yard\u0131m (\u0130ngilizce)",incorrect_try_again:"Yanl\u0131\u015f. Bir daha deneyin."},RecaptchaStr_it=
-{visual_challenge:"Modalit\u00e0 visiva",audio_challenge:"Modalit\u00e0 auditiva",refresh_btn:"Chiedi due nuove parole",instructions_visual:"Scrivi le due parole:",instructions_context:"",instructions_audio:"Trascrivi ci\u00f2 che senti:",help_btn:"Aiuto",incorrect_try_again:"Scorretto. Riprova."},RecaptchaLangMap={en:RecaptchaStr_en,de:RecaptchaStr_de,es:RecaptchaStr_es,fr:RecaptchaStr_fr,nl:RecaptchaStr_nl,pt:RecaptchaStr_pt,ru:RecaptchaStr_ru,tr:RecaptchaStr_tr,it:RecaptchaStr_it};var RecaptchaStr=RecaptchaStr_en,RecaptchaOptions,RecaptchaDefaultOptions={tabindex:0,theme:"red",callback:null,lang:"en",custom_theme_widget:null,custom_translations:null,includeContext:false},Recaptcha={widget:null,timer_id:-1,style_set:false,theme:null,type:"image",ajax_verify_cb:null,$:function(a){return typeof a=="string"?document.getElementById(a):a},create:function(a,b,c){Recaptcha.destroy();if(b)Recaptcha.widget=Recaptcha.$(b);Recaptcha._init_options(c);Recaptcha._call_challenge(a)},destroy:function(){var a=
-Recaptcha.$("recaptcha_challenge_field");a&&a.parentNode.removeChild(a);Recaptcha.timer_id!=-1&&clearInterval(Recaptcha.timer_id);Recaptcha.timer_id=-1;if(a=Recaptcha.$("recaptcha_image"))a.innerHTML="";if(Recaptcha.widget){if(Recaptcha.theme!="custom")Recaptcha.widget.innerHTML="";else Recaptcha.widget.style.display="none";Recaptcha.widget=null}},focus_response_field:function(){var a=Recaptcha.$;a=a("recaptcha_response_field");a.focus()},get_challenge:function(){if(typeof RecaptchaState=="undefined")return null;
-return RecaptchaState.challenge},get_response:function(){var a=Recaptcha.$;a=a("recaptcha_response_field");if(!a)return null;return a.value},ajax_verify:function(a){Recaptcha.ajax_verify_cb=a;a=Recaptcha._get_api_server()+"/ajaxverify?c="+encodeURIComponent(Recaptcha.get_challenge())+"&response="+encodeURIComponent(Recaptcha.get_response());Recaptcha._add_script(a)},_ajax_verify_callback:function(a){Recaptcha.ajax_verify_cb(a)},_get_api_server:function(){var a=window.location.protocol,b;b=typeof _RecaptchaOverrideApiServer!=
-"undefined"?_RecaptchaOverrideApiServer:"www.google.com/recaptcha/api";return a+"//"+b},_call_challenge:function(a){a=Recaptcha._get_api_server()+"/challenge?k="+a+"&ajax=1&cachestop="+Math.random();if(typeof RecaptchaOptions.extra_challenge_params!="undefined")a+="&"+RecaptchaOptions.extra_challenge_params;if(RecaptchaOptions.includeContext)a+="&includeContext=1";Recaptcha._add_script(a)},_add_script:function(a){var b=document.createElement("script");b.type="text/javascript";b.src=a;Recaptcha._get_script_area().appendChild(b)},
-_get_script_area:function(){var a=document.getElementsByTagName("head");return a=!a||a.length<1?document.body:a[0]},_hash_merge:function(a){var b={};for(var c in a)for(var d in a[c])b[d]=a[c][d];if(b.theme=="context")b.includeContext=true;return b},_init_options:function(a){RecaptchaOptions=Recaptcha._hash_merge([RecaptchaDefaultOptions,a||{}])},challenge_callback:function(){Recaptcha._reset_timer();RecaptchaStr=Recaptcha._hash_merge([RecaptchaStr_en,RecaptchaLangMap[RecaptchaOptions.lang]||{},RecaptchaOptions.custom_translations||
-{}]);window.addEventListener&&window.addEventListener("unload",function(){Recaptcha.destroy()},false);Recaptcha._is_ie()&&window.attachEvent&&window.attachEvent("onbeforeunload",function(){});if(navigator.userAgent.indexOf("KHTML")>0){var a=document.createElement("iframe");a.src="about:blank";a.style.height="0px";a.style.width="0px";a.style.visibility="hidden";a.style.border="none";var b=document.createTextNode("This frame prevents back/forward cache problems in Safari.");a.appendChild(b);document.body.appendChild(a)}Recaptcha._finish_widget()},
-_add_css:function(a){var b=document.createElement("style");b.type="text/css";if(b.styleSheet)if(navigator.appVersion.indexOf("MSIE 5")!=-1)document.write("<style type='text/css'>"+a+"</style>");else b.styleSheet.cssText=a;else if(navigator.appVersion.indexOf("MSIE 5")!=-1)document.write("<style type='text/css'>"+a+"</style>");else{a=document.createTextNode(a);b.appendChild(a)}Recaptcha._get_script_area().appendChild(b)},_set_style:function(a){if(!Recaptcha.style_set){Recaptcha.style_set=true;Recaptcha._add_css(a+
-"\n\n.recaptcha_is_showing_audio .recaptcha_only_if_image,.recaptcha_isnot_showing_audio .recaptcha_only_if_audio,.recaptcha_had_incorrect_sol .recaptcha_only_if_no_incorrect_sol,.recaptcha_nothad_incorrect_sol .recaptcha_only_if_incorrect_sol{display:none !important}")}},_init_builtin_theme:function(){var a=Recaptcha.$,b=RecaptchaStr,c=RecaptchaState,d,e;c=c.server;if(c[c.length-1]=="/")c=c.substring(0,c.length-1);var f=c+"/img/"+Recaptcha.theme;if(Recaptcha.theme=="clean"){c=RecaptchaTemplates.CleanCss;
-d=RecaptchaTemplates.CleanHtml;e="png"}else{if(Recaptcha.theme=="context"){c=RecaptchaTemplates.VertCss;d=RecaptchaTemplates.ContextHtml}else{c=RecaptchaTemplates.VertCss;d=RecaptchaTemplates.VertHtml}e="gif"}c=c.replace(/IMGROOT/g,f);Recaptcha._set_style(c);Recaptcha.widget.innerHTML="<div id='recaptcha_area'>"+d+"</div>";a("recaptcha_reload").src=f+"/refresh."+e;a("recaptcha_switch_audio").src=f+"/audio."+e;a("recaptcha_switch_img").src=f+"/text."+e;a("recaptcha_whatsthis").src=f+"/help."+e;if(Recaptcha.theme==
-"clean"){a("recaptcha_logo").src=f+"/logo."+e;a("recaptcha_tagline").src=f+"/tagline."+e}a("recaptcha_reload").alt=b.refresh_btn;a("recaptcha_switch_audio").alt=b.audio_challenge;a("recaptcha_switch_img").alt=b.visual_challenge;a("recaptcha_whatsthis").alt=b.help_btn;a("recaptcha_reload_btn").href="javascript:Recaptcha.reload ();";a("recaptcha_reload_btn").title=b.refresh_btn;a("recaptcha_switch_audio_btn").href="javascript:Recaptcha.switch_type('audio');";a("recaptcha_switch_audio_btn").title=b.audio_challenge;
-a("recaptcha_switch_img_btn").href="javascript:Recaptcha.switch_type('image');";a("recaptcha_switch_img_btn").title=b.visual_challenge;a("recaptcha_whatsthis_btn").href=Recaptcha._get_help_link();a("recaptcha_whatsthis_btn").target="_blank";a("recaptcha_whatsthis_btn").title=b.help_btn;a("recaptcha_whatsthis_btn").onclick=function(){Recaptcha.showhelp();return false};a("recaptcha_table").className="recaptchatable recaptcha_theme_"+Recaptcha.theme;a("recaptcha_instructions_image")&&a("recaptcha_instructions_image").appendChild(document.createTextNode(b.instructions_visual));
-a("recaptcha_instructions_context")&&a("recaptcha_instructions_context").appendChild(document.createTextNode(b.instructions_context));a("recaptcha_instructions_audio")&&a("recaptcha_instructions_audio").appendChild(document.createTextNode(b.instructions_audio));a("recaptcha_instructions_error")&&a("recaptcha_instructions_error").appendChild(document.createTextNode(b.incorrect_try_again))},_finish_widget:function(){var a=Recaptcha.$,b=RecaptchaState,c=RecaptchaOptions,d=c.theme;switch(d){case "red":case "white":case "blackglass":case "clean":case "custom":case "context":break;
-default:d="red";break}if(!Recaptcha.theme)Recaptcha.theme=d;Recaptcha.theme!="custom"?Recaptcha._init_builtin_theme():Recaptcha._set_style("");d=document.createElement("span");d.id="recaptcha_challenge_field_holder";d.style.display="none";a("recaptcha_response_field").parentNode.insertBefore(d,a("recaptcha_response_field"));a("recaptcha_response_field").setAttribute("autocomplete","off");a("recaptcha_image").style.width="300px";a("recaptcha_image").style.height="57px";Recaptcha.should_focus=false;
-Recaptcha._set_challenge(b.challenge,"image");if(c.tabindex){a("recaptcha_response_field").tabIndex=c.tabindex;if(Recaptcha.theme!="custom"){a("recaptcha_whatsthis_btn").tabIndex=c.tabindex;a("recaptcha_switch_img_btn").tabIndex=c.tabindex;a("recaptcha_switch_audio_btn").tabIndex=c.tabindex;a("recaptcha_reload_btn").tabIndex=c.tabindex}}if(Recaptcha.widget)Recaptcha.widget.style.display="";c.callback&&c.callback()},switch_type:function(a){var b=Recaptcha;b.type=a;b.reload(b.type=="audio"?"a":"v")},
-reload:function(a){var b=Recaptcha,c=RecaptchaState;if(typeof a=="undefined")a="r";c=c.server+"reload?c="+c.challenge+"&k="+c.site+"&reason="+a+"&type="+b.type+"&lang="+RecaptchaOptions.lang;if(RecaptchaOptions.includeContext)c+="&includeContext=1";if(typeof RecaptchaOptions.extra_challenge_params!="undefined")c+="&"+RecaptchaOptions.extra_challenge_params;if(b.type=="audio")c+=RecaptchaOptions.audio_beta_12_08?"&audio_beta_12_08=1":"&new_audio_default=1";b.should_focus=a!="t";b._add_script(c)},finish_reload:function(a,
-b){RecaptchaState.is_incorrect=false;Recaptcha._set_challenge(a,b)},_set_challenge:function(a,b){var c=Recaptcha,d=RecaptchaState,e=c.$;d.challenge=a;c.type=b;e("recaptcha_challenge_field_holder").innerHTML="<input type='hidden' name='recaptcha_challenge_field' id='recaptcha_challenge_field' value='"+d.challenge+"'/>";if(b=="audio")e("recaptcha_image").innerHTML=Recaptcha.getAudioCaptchaHtml();else if(b=="image"){var f=d.server+"image?c="+d.challenge;e("recaptcha_image").innerHTML="<img style='display:block;' height='57' width='300' src='"+
-f+"'/>"}Recaptcha._css_toggle("recaptcha_had_incorrect_sol","recaptcha_nothad_incorrect_sol",d.is_incorrect);Recaptcha._css_toggle("recaptcha_is_showing_audio","recaptcha_isnot_showing_audio",b=="audio");c._clear_input();c.should_focus&&c.focus_response_field();c._reset_timer()},_reset_timer:function(){var a=RecaptchaState;clearInterval(Recaptcha.timer_id);Recaptcha.timer_id=setInterval("Recaptcha.reload('t');",(a.timeout-300)*1E3)},showhelp:function(){window.open(Recaptcha._get_help_link(),"recaptcha_popup",
-"width=460,height=570,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes")},_clear_input:function(){var a=Recaptcha.$("recaptcha_response_field");a.value=""},_displayerror:function(a){var b=Recaptcha.$;b("recaptcha_image").innerHTML="";b("recaptcha_image").appendChild(document.createTextNode(a))},reloaderror:function(a){Recaptcha._displayerror(a)},_is_ie:function(){return navigator.userAgent.indexOf("MSIE")>0&&!window.opera},_css_toggle:function(a,b,c){var d=Recaptcha.widget;
-if(!d)d=document.body;var e=d.className;e=e.replace(RegExp("(^|\\s+)"+a+"(\\s+|$)")," ");e=e.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," ");e+=" "+(c?a:b);d.className=e},_get_help_link:function(){var a=RecaptchaOptions.lang;return"http://recaptcha.net/popuphelp/"+(a=="en"?"":a+".html")},playAgain:function(){var a=Recaptcha.$;a("recaptcha_image").innerHTML=Recaptcha.getAudioCaptchaHtml()},getAudioCaptchaHtml:function(){var a=Recaptcha,b=RecaptchaState,c=b.server+"image?c="+b.challenge;if(c.indexOf("https://")==
-0)c="http://"+c.substring(8);b=b.server+"/img/audiocaptcha.swf?v2";a=a._is_ie()?'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="audiocaptcha" width="0" height="0" codebase="https://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="'+b+'" /><param name="quality" value="high" /><param name="bgcolor" value="#869ca7" /><param name="allowScriptAccess" value="always" /></object><br/>':'<embed src="'+b+'" quality="high" bgcolor="#869ca7" width="0" height="0" name="audiocaptcha" align="middle" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"></embed> ';
-c=(Recaptcha.checkFlashVer()?'<br/><a class="recaptcha_audio_cant_hear_link" href="#" onclick="Recaptcha.playAgain(); return false;">'+RecaptchaStr.play_again+"</a>":"")+'<br/><a class="recaptcha_audio_cant_hear_link" target="_blank" href="'+c+'">'+RecaptchaStr.cant_hear_this+"</a>";return a+c},gethttpwavurl:function(){var a=RecaptchaState;if(Recaptcha.type=="audio"){a=a.server+"image?c="+a.challenge;if(a.indexOf("https://")==0)a="http://"+a.substring(8);return a}return""},checkFlashVer:function(){var a=
-navigator.appVersion.indexOf("MSIE")!=-1?true:false,b=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,c=navigator.userAgent.indexOf("Opera")!=-1?true:false,d=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){a=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";a=navigator.plugins["Shockwave Flash"+a].description;a=a.split(" ");a=a[2].split(".");d=a[0]}}else if(a&&b&&!c)try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),
-f=e.GetVariable("$version");d=f.split(" ")[1].split(",")[0]}catch(g){}return d>=9},getlang:function(){return RecaptchaOptions.lang}};
-/* jshint ignore:end */
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.php b/plugins/jetpack/modules/sharedaddy/sharing.php
index 7ddd2ac9..74ad1059 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing.php
@@ -24,17 +24,9 @@ class Sharing_Admin {
public function sharing_head() {
wp_enqueue_script( 'sharing-js', WP_SHARING_PLUGIN_URL.'admin-sharing.js', array( 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-form' ), 2 );
-
- // @todo: Remove this opt-out filter in the future
- if ( ( ! defined( 'IS_WPCOM' ) ) || ( ! IS_WPCOM ) || apply_filters( 'wpl_sharing_2014_1', true ) ) {
- wp_enqueue_style( 'sharing-admin', WP_SHARING_PLUGIN_URL.'admin-sharing.css', false, JETPACK__VERSION );
- wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL.'sharing.css', false, JETPACK__VERSION );
- wp_enqueue_style( 'genericons' );
- } else {
- wp_enqueue_style( 'sharing-admin', WP_SHARING_PLUGIN_URL.'admin-sharing-legacy.css', false, JETPACK__VERSION );
- wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL.'sharing-legacy.css', false, JETPACK__VERSION );
- }
-
+ wp_enqueue_style( 'sharing-admin', WP_SHARING_PLUGIN_URL.'admin-sharing.css', false, JETPACK__VERSION );
+ wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL.'sharing.css', false, JETPACK__VERSION );
+ wp_enqueue_style( 'genericons' );
wp_enqueue_script( 'sharing-js-fe', WP_SHARING_PLUGIN_URL . 'sharing.js', array( ), 4 );
add_thickbox();
@@ -52,6 +44,8 @@ class Sharing_Admin {
/**
* Fires when updating sharing settings.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*/
do_action( 'sharing_admin_update' );
@@ -178,12 +172,14 @@ class Sharing_Admin {
<div class="wrap">
<div class="icon32" id="icon-options-general"><br /></div>
- <h2><?php _e( 'Sharing Settings', 'jetpack' ); ?></h2>
+ <h1><?php _e( 'Sharing Settings', 'jetpack' ); ?></h1>
<?php
/**
* Fires at the top of the admin sharing settings screen.
*
+ * @module sharedaddy
+ *
* @since 1.6.0
*/
do_action( 'pre_admin_screen_sharing' );
@@ -192,7 +188,7 @@ class Sharing_Admin {
<?php if ( current_user_can( 'manage_options' ) ) : ?>
<div class="share_manage_options">
- <h3><?php _e( 'Sharing Buttons', 'jetpack' ) ?></h3>
+ <h2><?php _e( 'Sharing Buttons', 'jetpack' ) ?></h2>
<p><?php _e( 'Add sharing buttons to your blog and allow your visitors to share posts with their friends.', 'jetpack' ) ?></p>
<div id="services-config">
@@ -346,6 +342,8 @@ class Sharing_Admin {
/**
* Filters the HTML at the beginning of the "Show button on" row.
*
+ * @module sharedaddy
+ *
* @since 2.1.0
*
* @param string $var Opening HTML tag at the beginning of the "Show button on" row.
@@ -371,6 +369,8 @@ class Sharing_Admin {
/**
* Filters the HTML at the end of the "Show button on" row.
*
+ * @module sharedaddy
+ *
* @since 2.1.0
*
* @param string $var Closing HTML tag at the end of the "Show button on" row.
@@ -382,6 +382,8 @@ class Sharing_Admin {
/**
* Fires at the end of the sharing global options settings table.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*/
do_action( 'sharing_global_options' );
@@ -434,6 +436,8 @@ class Sharing_Admin {
/**
* Fires after the custom sharing service form
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*/
do_action( 'sharing_new_service_form' );
@@ -445,6 +449,8 @@ class Sharing_Admin {
/**
* Fires at the bottom of the admin sharing settings screen.
*
+ * @module sharedaddy
+ *
* @since 1.6.0
*/
do_action( 'post_admin_screen_sharing' );
diff --git a/plugins/jetpack/modules/shortcodes.php b/plugins/jetpack/modules/shortcodes.php
index 4852cf25..0de4c14d 100644
--- a/plugins/jetpack/modules/shortcodes.php
+++ b/plugins/jetpack/modules/shortcodes.php
@@ -9,6 +9,7 @@
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Photos and Videos, Social, Writing, Appearance
+ * Additional Search Queries: shortcodes, shortcode, embeds, media, bandcamp, blip.tv, dailymotion, digg, facebook, flickr, google calendars, google maps, google+, polldaddy, recipe, recipes, scribd, slideshare, slideshow, slideshows, soundcloud, ted, twitter, vimeo, vine, youtube
*/
/**
@@ -49,6 +50,8 @@ function jetpack_load_shortcodes() {
/**
* This filter allows other plugins to override which shortcodes Jetpack loads.
*
+ * @module shortcodes
+ *
* @since 2.2.1
*
* @param array $shortcode_includes An array of which shortcodes to include.
diff --git a/plugins/jetpack/modules/shortcodes/audio.php b/plugins/jetpack/modules/shortcodes/audio.php
index 60b82b9f..a408f2a5 100644
--- a/plugins/jetpack/modules/shortcodes/audio.php
+++ b/plugins/jetpack/modules/shortcodes/audio.php
@@ -67,28 +67,30 @@ class AudioShortcode {
self::$add_script = true;
$atts[0] = strip_tags( join( ' ', $atts ) );
$src = ltrim( $atts[0], '=' );
-
- /**
- * Set the audio player default colors.
- *
- * @since 1.4.0
- *
- * @param array $ap_options {
- * The default colors for the audio player in hexidecimal format (e.g. 0x#F8F8F8).
- *
- * @type string $bg Background color.
- * @type string $leftbg Left background color.
- * @type string $lefticon Left icon color.
- * @type string $rightbg Right background color.
- * @type string $rightbghover Right background hover color.
- * @type string $righticon Right icon color.
- * @type string $righticonhover Right icon hover color.
- * @type string $text Text color.
- * @type string $slider Slider color.
- * @type string $track Track color.
- * @type string $border Border color.
- * @type string $loader Loader color.
- */
+
+ /**
+ * Set the audio player default colors.
+ *
+ * @module shortcodes
+ *
+ * @since 1.4.0
+ *
+ * @param array $ap_options {
+ * The default colors for the audio player in hexidecimal format (e.g. 0x#F8F8F8).
+ *
+ * @type string $bg Background color.
+ * @type string $leftbg Left background color.
+ * @type string $lefticon Left icon color.
+ * @type string $rightbg Right background color.
+ * @type string $rightbghover Right background hover color.
+ * @type string $righticon Right icon color.
+ * @type string $righticonhover Right icon hover color.
+ * @type string $text Text color.
+ * @type string $slider Slider color.
+ * @type string $track Track color.
+ * @type string $border Border color.
+ * @type string $loader Loader color.
+ */
$ap_options = apply_filters(
'audio_player_default_colors',
array(
@@ -282,14 +284,16 @@ CONTROLS;
}
$html5_audio .= "<span id='wp-as-{$post_id}_{$ap_playerID}-playing'></span>";
- /**
- * Sets external resource URL.
- *
- * @since 1.4.0
- *
- * @param string $args URL of external resource.
- *
- */
+ /**
+ * Sets external resource URL.
+ *
+ * @module shortcodes
+ *
+ * @since 1.4.0
+ *
+ * @param string $args URL of external resource.
+ *
+ */
$swfurl = apply_filters(
'jetpack_static_url',
set_url_scheme( "http://en.wordpress.com/wp-content/plugins/audio-player/player.swf" )
diff --git a/plugins/jetpack/modules/shortcodes/bandcamp.php b/plugins/jetpack/modules/shortcodes/bandcamp.php
index 95553633..10a2ba5e 100644
--- a/plugins/jetpack/modules/shortcodes/bandcamp.php
+++ b/plugins/jetpack/modules/shortcodes/bandcamp.php
@@ -1,6 +1,6 @@
<?php
// shortcode handler for [bandcamp], which inserts a bandcamp.com
-// music player (embedded flash object)
+// music player (iframe, html5)
//
// [bandcamp album=119385304]
// [bandcamp album=3462839126 bgcol=FFFFFF linkcol=4285BB size=venti]
@@ -10,41 +10,43 @@ function shortcode_handler_bandcamp( $atts ) {
// there are no default values, but specify here anyway
// to explicitly list supported atts
$attributes = shortcode_atts( array(
- 'album' => null, // integer album id
- 'track' => null, // integer track id
- 'video' => null, // integer track id for video player
- 'size' => 'venti', // one of the supported sizes
- 'bgcol' => 'FFFFFF', // hex, no '#' prefix
- 'linkcol' => null, // hex, no '#' prefix
- 'layout' => null, // encoded layout url
- 'width' => null, // integer with optional "%"
- 'height' => null, // integer with optional "%"
- 'notracklist' => null, // may be string "true" (defaults false)
- 'tracklist' => null, // may be string "false" (defaults true)
- 'artwork' => null, // may be string "false" (alternately: "none") or "small" (default is large)
- 'minimal' => null, // may be string "true" (defaults false)
- 'theme' => null, // may be theme identifier string ("light"|"dark" so far)
- 'package' => null, // integer package id
- 't' => null // integer track number
+ 'album' => null, // integer album id
+ 'track' => null, // integer track id
+ 'video' => null, // integer track id for video player
+ 'size' => 'venti', // one of the supported sizes
+ 'bgcol' => 'FFFFFF', // hex, no '#' prefix
+ 'linkcol' => null, // hex, no '#' prefix
+ 'layout' => null, // encoded layout url
+ 'width' => null, // integer with optional "%"
+ 'height' => null, // integer with optional "%"
+ 'notracklist' => null, // may be string "true" (defaults false)
+ 'tracklist' => null, // may be string "false" (defaults true)
+ 'artwork' => null, // may be string "false" (alternately: "none") or "small" (default is large)
+ 'minimal' => null, // may be string "true" (defaults false)
+ 'theme' => null, // may be theme identifier string ("light"|"dark" so far)
+ 'package' => null, // integer package id
+ 't' => null, // integer track number
+ 'tracks' => null, // comma separated list of allowed tracks
+ 'esig' => null // hex, no '#' prefix
), $atts, 'bandcamp' );
$sizes = array(
- 'venti' => array( 'width' => 400, 'height' => 100 ),
- 'grande' => array( 'width' => 300, 'height' => 100 ),
- 'grande2' => array( 'width' => 300, 'height' => 355 ),
- 'grande3' => array( 'width' => 300, 'height' => 415 ),
- 'tall_album' => array( 'width' => 150, 'height' => 295 ),
- 'tall_track' => array( 'width' => 150, 'height' => 270 ),
- 'tall2' => array( 'width' => 150, 'height' => 450 ),
- 'short' => array( 'width' => 46, 'height' => 23 ),
- 'large' => array( 'width' => 350, 'height' => 470 ),
- 'medium' => array( 'width' => 450, 'height' => 120 ),
- 'small' => array( 'width' => 350, 'height' => 42 )
+ 'venti' => array( 'width' => 400, 'height' => 100 ),
+ 'grande' => array( 'width' => 300, 'height' => 100 ),
+ 'grande2' => array( 'width' => 300, 'height' => 355 ),
+ 'grande3' => array( 'width' => 300, 'height' => 415 ),
+ 'tall_album' => array( 'width' => 150, 'height' => 295 ),
+ 'tall_track' => array( 'width' => 150, 'height' => 270 ),
+ 'tall2' => array( 'width' => 150, 'height' => 450 ),
+ 'short' => array( 'width' => 46, 'height' => 23 ),
+ 'large' => array( 'width' => 350, 'height' => 470 ),
+ 'medium' => array( 'width' => 450, 'height' => 120 ),
+ 'small' => array( 'width' => 350, 'height' => 42 )
);
$sizekey = $attributes['size'];
- $height = null;
- $width = null;
+ $height = null;
+ $width = null;
$isVideo = false;
@@ -56,21 +58,21 @@ function shortcode_handler_bandcamp( $atts ) {
// a video player or an audio player
$argparts = array();
- if ( !isset( $attributes['album'] ) && !isset( $attributes['track'] ) && !isset( $attributes['video'] ) ) {
+ if ( ! isset( $attributes['album'] ) && ! isset( $attributes['track'] ) && ! isset( $attributes['video'] ) ) {
return "[bandcamp: shortcode must include 'track', 'album', or 'video' param]";
}
- if ( isset( $attributes['track'] ) ) {
- $track = (int) $attributes['track'];
+ if ( isset( $attributes['track'] ) && is_numeric( $attributes['track'] ) ) {
+ $track = esc_attr( $attributes['track'] );
array_push( $argparts, "track={$track}" );
- } elseif ( isset( $attributes['video'] ) ) {
- $track = (int) $attributes['video']; // videos are referenced by track id
+ } elseif ( isset( $attributes['video'] ) && is_numeric( $attributes['video'] ) ) {
+ $track = esc_attr( $attributes['video'] ); // videos are referenced by track id
$urlbase = "//bandcamp.com/EmbeddedPlayer/v=2";
$isVideo = true;
array_push( $argparts, "track={$track}" );
}
- if ( isset( $attributes['album'] ) ) {
- $album = (int) $attributes['album'];
+ if ( isset( $attributes['album'] ) && is_numeric( $attributes['album'] ) ) {
+ $album = esc_attr( $attributes['album'] );
array_push( $argparts, "album={$album}" );
}
@@ -83,8 +85,8 @@ function shortcode_handler_bandcamp( $atts ) {
}
// if size specified that we don't recognize, fall back on venti
- if ( empty( $sizes[$sizekey] ) ) {
- $sizekey = 'venti';
+ if ( empty( $sizes[ $sizekey ] ) ) {
+ $sizekey = 'venti';
$attributes['size'] = 'venti';
}
@@ -104,13 +106,13 @@ function shortcode_handler_bandcamp( $atts ) {
}
}
- if ( !$height ) {
- $height = $sizes[$sizekey]['height'];
+ if ( ! $height ) {
+ $height = $sizes[ $sizekey ]['height'];
$cssheight = $height . "px";
}
- if ( !$width ) {
- $width = $sizes[$sizekey]['width'];
+ if ( ! $width ) {
+ $width = $sizes[ $sizekey ]['width'];
$csswidth = $width . "px";
}
@@ -165,11 +167,19 @@ function shortcode_handler_bandcamp( $atts ) {
array_push( $argparts, "theme={$attributes['theme']}" );
}
+ // param 'tracks' is signed digest param 'esig'
+ if ( isset( $attributes['tracks'] ) && preg_match( "|^[0-9\,]+$|", $attributes['tracks'] ) ) {
+ if ( isset( $attributes['esig'] ) && preg_match( "|^[0-9A-Fa-f]+$|", $attributes['esig'] ) ) {
+ array_push( $argparts, "tracks={$attributes['tracks']}" );
+ array_push( $argparts, "esig={$attributes['esig']}" );
+ }
+ }
+
if ( $isVideo ) {
- $url = "//bandcamp.com/VideoEmbed?" . join( '&', $argparts );
+ $url = "//bandcamp.com/VideoEmbed?" . join( '&', $argparts );
$extraAttrs = " mozallowfullscreen='1' webkitallowfullscreen='1' allowfullscreen='1'";
} else {
- $url = "//bandcamp.com/EmbeddedPlayer/v=2/" . join( '/', $argparts ) . '/';
+ $url = "//bandcamp.com/EmbeddedPlayer/v=2/" . join( '/', $argparts ) . '/';
$extraAttrs = '';
}
diff --git a/plugins/jetpack/modules/shortcodes/css/rtl/slideshow-shortcode-rtl.css b/plugins/jetpack/modules/shortcodes/css/rtl/slideshow-shortcode-rtl.css
index 5d51694f..ec63975b 100644
--- a/plugins/jetpack/modules/shortcodes/css/rtl/slideshow-shortcode-rtl.css
+++ b/plugins/jetpack/modules/shortcodes/css/rtl/slideshow-shortcode-rtl.css
@@ -1,14 +1,15 @@
-/* This file was automatically generated on Oct 06 2014 18:02:19 */
+/* This file was automatically generated on May 26 2015 21:25:53 */
.slideshow-window {
background-color: #222;
border: 20px solid #222;
- border-radius: 11px;
- -moz-border-radius: 11px;
- -webkit-border-radius: 11px;
- -khtml-border-radius: 11px;
+ border-radius: 10px;
+ height: 0;
margin-bottom: 20px;
- height: 410px;
+ overflow: hidden;
+ padding-top: 30px !important;
+ padding-bottom: 56.25% !important;
+ position: relative;
z-index: 1;
}
@@ -31,13 +32,19 @@
body div.slideshow-window * img {
/* Override any styles that might be present in the page stylesheet */
- border-width: 0 !important;
- margin-left: auto !important;
- margin-right: auto !important;
- padding: 0 !important;
background-color: transparent !important;
background-image: none !important;
+ border-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 {
@@ -45,11 +52,14 @@ body div.slideshow-window * img {
}
.slideshow-slide {
- height: 100%;
- width: 100%;
- text-align: center;
- margin: auto;
display: none;
+ height: 100% !important;
+ right: 0;
+ margin: auto;
+ position: absolute;
+ text-align: center;
+ top: 0;
+ width: 100% !important;
}
.slideshow-slide img {
@@ -80,14 +90,22 @@ body div.slideshow-window * img {
/* @noflip */
.slideshow-controls {
z-index: 1000;
- position: absolute;
- bottom: 30px;
- margin: auto;
+ position: absolute;
+ bottom: 30px;
+ margin: auto;
text-align: center;
width: 100%;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
opacity: 0.5;
direction:ltr;
+ -webkit-transition: 300ms opacity ease-out;
+ -moz-transition: 300ms opacity ease-out;
+ transition: 300ms opacity ease-out;
+}
+
+.slideshow-window:hover .slideshow-controls {
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+ opacity: 1;
}
body div div.slideshow-controls a,
diff --git a/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.css b/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.css
index 2dc3a649..b91505ea 100644
--- a/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.css
+++ b/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.css
@@ -1,12 +1,13 @@
.slideshow-window {
background-color: #222;
border: 20px solid #222;
- border-radius: 11px;
- -moz-border-radius: 11px;
- -webkit-border-radius: 11px;
- -khtml-border-radius: 11px;
+ border-radius: 10px;
+ height: 0;
margin-bottom: 20px;
- height: 410px;
+ overflow: hidden;
+ padding-top: 30px !important;
+ padding-bottom: 56.25% !important;
+ position: relative;
z-index: 1;
}
@@ -29,13 +30,19 @@
body div.slideshow-window * img {
/* Override any styles that might be present in the page stylesheet */
- border-width: 0 !important;
- margin-right: auto !important;
- margin-left: auto !important;
- padding: 0 !important;
background-color: transparent !important;
background-image: none !important;
+ border-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 {
@@ -43,11 +50,14 @@ body div.slideshow-window * img {
}
.slideshow-slide {
- height: 100%;
- width: 100%;
- text-align: center;
- margin: auto;
display: none;
+ height: 100% !important;
+ left: 0;
+ margin: auto;
+ position: absolute;
+ text-align: center;
+ top: 0;
+ width: 100% !important;
}
.slideshow-slide img {
@@ -78,14 +88,22 @@ body div.slideshow-window * img {
/* @noflip */
.slideshow-controls {
z-index: 1000;
- position: absolute;
- bottom: 30px;
- margin: auto;
+ position: absolute;
+ bottom: 30px;
+ margin: auto;
text-align: center;
width: 100%;
- -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
- opacity: 0;
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
+ opacity: 0.5;
direction:ltr;
+ -webkit-transition: 300ms opacity ease-out;
+ -moz-transition: 300ms opacity ease-out;
+ transition: 300ms opacity ease-out;
+}
+
+.slideshow-window:hover .slideshow-controls {
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+ opacity: 1;
}
body div div.slideshow-controls a,
diff --git a/plugins/jetpack/modules/shortcodes/dailymotion.php b/plugins/jetpack/modules/shortcodes/dailymotion.php
index a366eac6..24f7fcb2 100644
--- a/plugins/jetpack/modules/shortcodes/dailymotion.php
+++ b/plugins/jetpack/modules/shortcodes/dailymotion.php
@@ -132,6 +132,76 @@ function dailymotion_shortcode( $atts ) {
add_shortcode( 'dailymotion', 'dailymotion_shortcode' );
/**
+ * DailyMotion Channel Shortcode
+ *
+ * Examples:
+ * [dailymotion-channel user=MatthewDominick]
+ * [dailymotion-channel user=MatthewDominick type=grid] (supports grid, carousel, badge/default)
+ */
+function dailymotion_channel_shortcode( $atts ) {
+ $username = $atts['user'];
+
+ switch( $atts['type'] ) {
+ case 'grid':
+ return '<iframe width="300px" height="264px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=grid' ) . '"></iframe>';
+ break;
+ case 'carousel':
+ return '<iframe width="300px" height="360px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username . '?type=carousel' ) . '"></iframe>';
+ break;
+ default:
+ return '<iframe width="300px" height="78px" scrolling="no" frameborder="0" src="' . esc_url( '//www.dailymotion.com/badge/user/' . $username ) . '"></iframe>';
+ }
+}
+
+add_shortcode( 'dailymotion-channel', 'dailymotion_channel_shortcode' );
+
+/**
+ * Embed Reversal for Badge/Channel
+ */
+function dailymotion_channel_reversal( $content ) {
+ if ( false === stripos( $content, 'dailymotion.com/badge/' ) ) {
+ return $content;
+ }
+
+ /* Sample embed code:
+ <iframe width="300px" height="360px" scrolling="no" frameborder="0" src="http://www.dailymotion.com/badge/user/Dailymotion?type=carousel"></iframe>
+ */
+
+ $regexes = array();
+
+ $regexes[] = '#<iframe[^>]+?src=" (?:https?:)?//(?:www\.)?dailymotion\.com/badge/user/([^"\'/]++) "[^>]*+></iframe>#ix';
+
+ // Let's play nice with the visual editor too.
+ $regexes[] = '#&lt;iframe(?:[^&]|&(?!gt;))+?src=" (?:https?:)?//(?:www\.)?dailymotion\.com/badge/user/([^"\'/]++) "(?:[^&]|&(?!gt;))*+&gt;&lt;/iframe&gt;#ix';
+
+ foreach ( $regexes as $regex ) {
+ if ( ! preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) ) {
+ continue;
+ }
+
+ foreach ( $matches as $match ) {
+ $url_pieces = parse_url( $match[1] );
+
+ if ( 'type=carousel' === $url_pieces['query'] ) {
+ $type = 'carousel';
+ } else if ( 'type=grid' === $url_pieces['query'] ) {
+ $type = 'grid';
+ } else {
+ $type = 'badge';
+ }
+
+ $shortcode = '[dailymotion-channel user=' . esc_attr( $url_pieces['path'] ) . ' type=' . esc_attr( $type ) . ']';
+ $replace_regex = sprintf( '#\s*%s\s*#', preg_quote( $match[0], '#' ) );
+ $content = preg_replace( $replace_regex, sprintf( "\n\n%s\n\n", $shortcode ), $content );
+ }
+ }
+
+ return $content;
+}
+
+add_filter( 'pre_kses', 'dailymotion_channel_reversal' );
+
+/**
* Dailymotion Embed Reversal (with new iframe code as of 17.09.2014)
*
* Converts a generic HTML embed code from Dailymotion into an
diff --git a/plugins/jetpack/modules/shortcodes/facebook.php b/plugins/jetpack/modules/shortcodes/facebook.php
index 239253d6..c054ecc6 100644
--- a/plugins/jetpack/modules/shortcodes/facebook.php
+++ b/plugins/jetpack/modules/shortcodes/facebook.php
@@ -7,8 +7,9 @@ define( 'JETPACK_FACEBOOK_EMBED_REGEX', '#^https?://(www.)?facebook\.com/([^/]+)
define( 'JETPACK_FACEBOOK_ALTERNATE_EMBED_REGEX', '#^https?://(www.)?facebook\.com/permalink.php\?([^\s]+)#' );
define( 'JETPACK_FACEBOOK_PHOTO_EMBED_REGEX', '#^https?://(www.)?facebook\.com/photo.php\?([^\s]+)#' );
define( 'JETPACK_FACEBOOK_PHOTO_ALTERNATE_EMBED_REGEX', '#^https?://(www.)?facebook\.com/([^/]+)/photos/([^/]+)?#' );
-
define( 'JETPACK_FACEBOOK_VIDEO_EMBED_REGEX', '#^https?://(www.)?facebook\.com/video.php\?([^\s]+)#' );
+define( 'JETPACK_FACEBOOK_VIDEO_ALTERNATE_EMBED_REGEX', '#^https?://(www.)?facebook\.com/([^/]+)/videos/([^/]+)?#' );
+
// Example URL: https://www.facebook.com/VenusWilliams/posts/10151647007373076
wp_embed_register_handler( 'facebook', JETPACK_FACEBOOK_EMBED_REGEX, 'jetpack_facebook_embed_handler' );
@@ -24,16 +25,11 @@ wp_embed_register_handler( 'facebook-alternate-photo', JETPACK_FACEBOOK_PHOTO_AL
// Videos e.g. https://www.facebook.com/video.php?v=772471122790796
wp_embed_register_handler( 'facebook-video', JETPACK_FACEBOOK_VIDEO_EMBED_REGEX, 'jetpack_facebook_embed_handler' );
+// Videos https://www.facebook.com/WhiteHouse/videos/10153398464269238/
+wp_embed_register_handler( 'facebook-alternate-video', JETPACK_FACEBOOK_VIDEO_ALTERNATE_EMBED_REGEX, 'jetpack_facebook_embed_handler' );
function jetpack_facebook_embed_handler( $matches, $attr, $url ) {
- static $did_script;
-
- if ( ! $did_script ) {
- $did_script = true;
- add_action( 'wp_footer', 'jetpack_facebook_add_script' );
- }
-
- if ( false !== strpos( $url, 'video.php' ) ) {
+ if ( false !== strpos( $url, 'video.php' ) || false !== strpos( $url, '/videos/' ) ) {
$embed = sprintf( '<div class="fb-video" data-allowfullscreen="true" data-href="%s"></div>', esc_url( $url ) );
} else {
$embed = sprintf( '<fb:post href="%s"></fb:post>', esc_url( $url ) );
@@ -43,16 +39,23 @@ function jetpack_facebook_embed_handler( $matches, $attr, $url ) {
if ( defined( 'DOING_AJAX' ) && DOING_AJAX && ! empty( $_POST['action'] ) && 'parse-embed' == $_POST['action'] ) {
return $embed . '<script src="//connect.facebook.net/en_US/all.js#xfbml=1"></script>';
} else {
+ wp_enqueue_script( 'jetpack-facebook-embed', plugins_url( 'js/facebook.js', __FILE__ ), array( 'jquery' ), null, true );
+ /** This filter is documented in modules/sharedaddy/sharing-sources.php */
+ $fb_app_id = apply_filters( 'jetpack_sharing_facebook_app_id', '249643311490' );
+ if ( ! is_numeric( $fb_app_id ) ) {
+ $fb_app_id = '';
+ }
+ wp_localize_script(
+ 'jetpack-facebook-embed',
+ 'jpfbembed',
+ array(
+ 'appid' => $fb_app_id
+ )
+ );
return $embed;
}
}
-function jetpack_facebook_add_script() {
- ?>
- <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, "script", "facebook-jssdk"));</script>
- <?php
-}
-
add_shortcode( 'facebook', 'jetpack_facebook_shortcode_handler' );
function jetpack_facebook_shortcode_handler( $atts ) {
@@ -61,8 +64,12 @@ function jetpack_facebook_shortcode_handler( $atts ) {
if ( empty( $atts['url'] ) )
return;
- if ( ! preg_match( JETPACK_FACEBOOK_EMBED_REGEX, $atts['url'] ) && ! preg_match( JETPACK_FACEBOOK_PHOTO_EMBED_REGEX, $atts['url'] ) )
+ if ( ! preg_match( JETPACK_FACEBOOK_EMBED_REGEX, $atts['url'] )
+ && ! preg_match( JETPACK_FACEBOOK_PHOTO_EMBED_REGEX, $atts['url'] )
+ && ! preg_match( JETPACK_FACEBOOK_VIDEO_EMBED_REGEX, $atts['url'] )
+ && ! preg_match( JETPACK_FACEBOOK_VIDEO_ALTERNATE_EMBED_REGEX, $atts['url'] ) ) {
return;
+ }
return $wp_embed->shortcode( $atts, $atts['url'] );
}
diff --git a/plugins/jetpack/modules/shortcodes/gist.php b/plugins/jetpack/modules/shortcodes/gist.php
index 9a8f63db..ed01a78f 100644
--- a/plugins/jetpack/modules/shortcodes/gist.php
+++ b/plugins/jetpack/modules/shortcodes/gist.php
@@ -4,12 +4,14 @@
* GitHub's Gist site supports oEmbed but their oembed provider only
* returns raw HTML (no styling) and the first little bit of the code.
*
- * Their Javascript-based embed method is a lot better, so that's what we're using.
+ * Their JavaScript-based embed method is a lot better, so that's what we're using.
*/
wp_embed_register_handler( 'github-gist', '#https?://gist\.github\.com/([a-zA-Z0-9]+)#', 'github_gist_embed_handler' );
add_shortcode( 'gist', 'github_gist_shortcode' );
function github_gist_embed_handler( $matches, $attr, $url, $rawattr ) {
+ wp_enqueue_script( 'jetpack-gist-embed', plugins_url( 'js/gist.js', __FILE__ ), array( 'jquery' ), false, true );
+
// Let the shortcode callback do all the work
return github_gist_shortcode( $attr, $url );
}
@@ -28,10 +30,29 @@ function github_gist_shortcode( $atts, $content = '' ) {
if ( ! $id )
return '<!-- Invalid Gist ID -->';
- $embed_url = "https://gist.github.com/{$id}.js";
+ if ( ! empty( $atts['file'] ) ) {
+ $file = '?file=' . urlencode( $atts['file'] );
+ } else {
+ $file = '';
+ }
+
+ $embed_url = "{$id}.json" . $file;
- if ( ! empty( $atts['file'] ) )
- $embed_url = add_query_arg( 'file', urlencode( $atts['file'] ), $embed_url );
// inline style to prevent the bottom margin to the embed that themes like TwentyTen, et al., add to tables
- return '<style>.gist table { margin-bottom: 0; }</style>' . '<script src="' . esc_url( $embed_url ) . '"></script>';
+ $return = '<style>.gist table { margin-bottom: 0; }</style>' .
+ '<div class="gist-oembed" data-gist="' . esc_attr( $embed_url ) . '"></div>';
+
+ if ( isset( $_POST[ 'type' ]) && 'embed' === $_POST[ 'type' ] &&
+ isset( $_POST[ 'action' ] ) && 'parse-embed' === $_POST['action'] ) {
+
+ return github_gist_simple_embed( $id, $file );
+ }
+
+ return $return;
+}
+
+function github_gist_simple_embed( $id, $file ) {
+ $embed_url = $id . '.js' . $file;
+
+ return '<script type="text/javascript" src="//gist.github.com/' . $embed_url . '"></script>';
} \ No newline at end of file
diff --git a/plugins/jetpack/modules/shortcodes/instagram.php b/plugins/jetpack/modules/shortcodes/instagram.php
index 52f83747..43d7d28a 100644
--- a/plugins/jetpack/modules/shortcodes/instagram.php
+++ b/plugins/jetpack/modules/shortcodes/instagram.php
@@ -61,7 +61,6 @@ wp_embed_register_handler( 'jetpack_instagram', '#http(s?)://instagr(\.am|am\.co
function jetpack_instagram_handler( $matches, $atts, $url ) {
global $content_width;
- static $did_script;
// keep a copy of the passed-in URL since it's modified below
$passed_url = $url;
@@ -70,7 +69,7 @@ function jetpack_instagram_handler( $matches, $atts, $url ) {
$min_width = 320;
if ( is_feed() ) {
- $media_url = sprintf( 'http://instagr.am/p/%s/media/?size=l', $matches[2] );
+ $media_url = sprintf( 'http://instagr.am/p/%s/media/?size=l', $matches[3] );
return sprintf( '<a href="%s" title="%s"><img src="%s" alt="Instagram Photo" /></a>', esc_url( $url ), esc_attr__( 'View on Instagram', 'jetpack' ), esc_url( $media_url ) );
}
@@ -110,6 +109,8 @@ function jetpack_instagram_handler( $matches, $atts, $url ) {
*
* Allow enabling of object caching for the response sent by Instagram when querying for Instagram image HTML.
*
+ * @module shortcodes
+ *
* @since 3.3.0
*
* @param bool false Object caching is off by default.
@@ -128,7 +129,7 @@ function jetpack_instagram_handler( $matches, $atts, $url ) {
// Not using cache (default case) or cache miss
$instagram_response = wp_remote_get( $url, array( 'redirection' => 0 ) );
if ( is_wp_error( $instagram_response ) || 200 != $instagram_response['response']['code'] || empty( $instagram_response['body'] ) ) {
- return "<!-- instagram error: invalid oratv resource -->";
+ return "<!-- instagram error: invalid instagram resource -->";
}
$response_body = json_decode( $instagram_response['body'] );
@@ -139,40 +140,36 @@ function jetpack_instagram_handler( $matches, $atts, $url ) {
}
if ( ! empty( $response_body->html ) ) {
- if ( ! $did_script ) {
- $did_script = true;
- add_action( 'wp_footer', 'jetpack_instagram_add_script' );
- }
-
- // there's a script in the response, which we strip on purpose since it's added above
+ wp_enqueue_script( 'jetpack-instagram-embed', plugins_url( 'js/instagram.js', __FILE__ ), array( 'jquery' ), false, true );
+ // there's a script in the response, which we strip on purpose since it's added by this ^ script
$ig_embed = preg_replace( '@<(script)[^>]*?>.*?</\\1>@si', '', $response_body->html );
- } else {
- $ig_embed = jetpack_instagram_iframe_embed( $instagram_https_url, $atts );
+ return $ig_embed;
}
- return $ig_embed;
+
+ return '<!-- instagram error: no embed found -->';
}
-function jetpack_instagram_add_script() {
- ?>
- <script async defer src="//platform.instagram.com/en_US/embeds.js"></script>
- <?php
+
+// filters instagram's username format to the expected format that matches the embed handler
+wp_embed_register_handler( 'jetpack_instagram_alternate_format', '#http(s?)://instagr(\.am|am\.com)/([^/]*)/p/([^/]*)#i', 'jetpack_instagram_alternate_format_handler' );
+function jetpack_instagram_alternate_format_handler( $matches, $atts, $url ) {
+ $url = esc_url_raw( 'https://instagram.com/p/' . $matches[4] );
+ $matches[0] = $url;
+ $matches[3] = $matches[4];
+ unset( $matches[4] );
+ return jetpack_instagram_handler( $matches, $atts, $url );
}
+
// [instagram url="http://instagram.com/p/PSbF9sEIGP/"]
// [instagram url="http://instagram.com/p/PSbF9sEIGP/" width="300"]
add_shortcode( 'instagram', 'jetpack_shortcode_instagram' );
function jetpack_shortcode_instagram( $atts ) {
global $wp_embed;
- if ( empty( $atts['url'] ) || ! preg_match( '#http(s?)://instagr(\.am|am\.com)/p/([^/]*)#i', $atts['url'] ) )
- return;
+ if ( empty( $atts['url'] ) ) {
+ return '';
+ }
return $wp_embed->shortcode( $atts, $atts['url'] );
}
-
-function jetpack_instagram_iframe_embed( $url, $atts ) {
- $atts['height'] = intval( $atts['width'] ) + 98; // http://www.niemanlab.org/2013/07/instagram-embeds-are-here-but-not-quite-perfect-for-publishers/
- $url = trailingslashit( $url ) . 'embed/';
-
- return sprintf( '<iframe class="jp-embed-instagram" src="%s" width="%s" height="%s" frameborder="0" scrolling="no" allowtransparency="true"></iframe>', esc_url( $url ), esc_attr( $atts['width'] ), esc_attr( $atts['height'] ) );
-}
diff --git a/plugins/jetpack/modules/shortcodes/js/facebook.js b/plugins/jetpack/modules/shortcodes/js/facebook.js
new file mode 100644
index 00000000..f955effc
--- /dev/null
+++ b/plugins/jetpack/modules/shortcodes/js/facebook.js
@@ -0,0 +1,29 @@
+/* global FB, jpfbembed */
+(function( window ) {
+ var facebookEmbed = function() {
+ if ( 'undefined' !== typeof FB && FB.XFBML ) {
+ FB.XFBML.parse();
+ } else {
+ var fbroot = document.createElement( 'div' );
+ fbroot.id = 'fb-root';
+ document.getElementsByTagName( 'body' )[0].appendChild( fbroot );
+
+ jQuery.getScript( '//connect.facebook.net/en_US/sdk.js' );
+ }
+ };
+
+ window.fbAsyncInit = function() {
+ FB.init( {
+ appId : jpfbembed.appid,
+ version: 'v2.3'
+ } );
+
+ FB.XFBML.parse();
+ };
+
+ if ( 'undefined' !== typeof infiniteScroll ) {
+ jQuery( document.body ).on( 'post-load', facebookEmbed );
+ }
+
+ facebookEmbed();
+})( this );
diff --git a/plugins/jetpack/modules/shortcodes/js/gist.js b/plugins/jetpack/modules/shortcodes/js/gist.js
new file mode 100644
index 00000000..2714add4
--- /dev/null
+++ b/plugins/jetpack/modules/shortcodes/js/gist.js
@@ -0,0 +1,28 @@
+;(function( $, undefined ) {
+ var gistStylesheetLoaded = false,
+ gistEmbed = function() {
+ $( '.gist-oembed' ).each( function( i, el ) {
+ var url = 'https://gist.github.com/' + $( el ).data( 'gist' );
+
+ $.ajax( {
+ url: url,
+ dataType: 'jsonp'
+ } ).done( function( response ) {
+ $( el ).replaceWith( response.div );
+
+ if ( ! gistStylesheetLoaded ) {
+ var stylesheet = '<link rel="stylesheet" href="' +
+ response.stylesheet +
+ '" type="text/css" />';
+
+ $( 'head' ).append( stylesheet );
+
+ gistStylesheetLoaded = true;
+ }
+ } );
+ } );
+ };
+
+ $( document ).ready( gistEmbed );
+ $( 'body' ).on( 'post-load', gistEmbed );
+})( jQuery );
diff --git a/plugins/jetpack/modules/shortcodes/js/instagram.js b/plugins/jetpack/modules/shortcodes/js/instagram.js
new file mode 100644
index 00000000..ab7d9668
--- /dev/null
+++ b/plugins/jetpack/modules/shortcodes/js/instagram.js
@@ -0,0 +1,19 @@
+(function( instgrm ) {
+ var instagramEmbed = function() {
+ if ( 'undefined' !== typeof instgrm && instgrm.Embeds && instgrm.Embeds.process ) {
+ instgrm.Embeds.process();
+ } else {
+ var s = document.createElement( 'script' );
+ s.async = true;
+ s.defer = true;
+ s.src = '//platform.instagram.com/en_US/embeds.js';
+ document.getElementsByTagName( 'body' )[0].appendChild( s );
+ }
+ };
+
+ if ( 'undefined' !== typeof jQuery && 'undefined' !== typeof infiniteScroll ) {
+ jQuery( document.body ).on( 'post-load', instagramEmbed );
+ }
+
+ instagramEmbed();
+})(); \ No newline at end of file
diff --git a/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js b/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js
index 8bee063f..38531e0c 100644
--- a/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js
+++ b/plugins/jetpack/modules/shortcodes/js/slideshow-shortcode.js
@@ -1,22 +1,12 @@
/* jshint onevar:false, loopfunc:true */
/* global jetpackSlideshowSettings, escape */
-function JetpackSlideshow( element, width, height, transition ) {
+function JetpackSlideshow( element, transition, autostart ) {
this.element = element;
this.images = [];
this.controls = {};
this.transition = transition || 'fade';
-
- var currentWidth = this.element.width();
- if ( !width || width > currentWidth ) {
- width = currentWidth;
- }
-
- this.width = width;
- this.height = height;
- this.element.css( {
- 'height': this.height + 'px'
- } );
+ this.autostart = autostart;
}
JetpackSlideshow.prototype.showLoadingImage = function( toggle ) {
@@ -27,7 +17,6 @@ JetpackSlideshow.prototype.showLoadingImage = function( toggle ) {
img.src = jetpackSlideshowSettings.spinner;
this.loadingImage_.appendChild( img );
this.loadingImage_.appendChild( this.makeZeroWidthSpan() );
- this.loadingImage_.style.lineHeight = this.height + 'px';
this.element.append( this.loadingImage_ );
} else if ( this.loadingImage_ ) {
this.loadingImage_.parentNode.removeChild( this.loadingImage_ );
@@ -43,16 +32,16 @@ JetpackSlideshow.prototype.init = function() {
for ( var i = 0; i < this.images.length; i++ ) {
var imageInfo = this.images[i];
var img = document.createElement( 'img' );
- img.src = imageInfo.src + '?w=' + this.width;
- img.title = imageInfo.title;
- img.alt = imageInfo.alt;
+ img.src = imageInfo.src;
+ img.title = typeof( imageInfo.title ) !== 'undefined' ? imageInfo.title : '';
+ img.alt = typeof( imageInfo.alt ) !== 'undefined' ? imageInfo.alt : '';
img.align = 'middle';
+ img.nopin = 'nopin';
var caption = document.createElement( 'div' );
caption.className = 'slideshow-slide-caption';
caption.innerHTML = imageInfo.caption;
var container = document.createElement('div');
container.className = 'slideshow-slide';
- container.style.lineHeight = this.height + 'px';
// Hide loading image once first image has loaded.
if ( i === 0 ) {
@@ -83,7 +72,7 @@ JetpackSlideshow.prototype.makeZeroWidthSpan = function() {
emptySpan.className = 'slideshow-line-height-hack';
// Having a NBSP makes IE act weird during transitions, but other
// browsers ignore a text node with a space in it as whitespace.
- if (jQuery.browser.msie) {
+ if ( -1 !== window.navigator.userAgent.indexOf( 'MSIE ' ) ) {
emptySpan.appendChild( document.createTextNode(' ') );
} else {
emptySpan.innerHTML = '&nbsp;';
@@ -109,6 +98,13 @@ JetpackSlideshow.prototype.finishInit_ = function() {
} );
var slideshow = this.element;
+
+ if ( ! this.autostart ) {
+ slideshow.cycle( 'pause' );
+ jQuery(this.controls.stop).removeClass( 'running' );
+ jQuery(this.controls.stop).addClass( 'paused' );
+ }
+
jQuery( this.controls.stop ).click( function() {
var button = jQuery(this);
if ( ! button.hasClass( 'paused' ) ) {
@@ -122,21 +118,6 @@ JetpackSlideshow.prototype.finishInit_ = function() {
}
return false;
} );
-
- var controls = jQuery( this.controlsDiv_ );
- slideshow.on( 'mouseenter focusin', function() {
- controls.stop( true, false ).fadeTo( 200, 1 );
- } );
- slideshow.on( 'mouseleave', function() {
- if ( ! jQuery( document.activeElement.parentNode ).hasClass( 'slideshow-controls' ) ) {
- controls.fadeTo( 200, 0 );
- }
- } );
- slideshow.on( 'focusout', function() {
- if ( ! slideshow.is( ':hover' ) ) {
- controls.fadeTo( 200, 0 );
- }
- } );
} else {
this.element.children( ':first' ).show();
this.element.css( 'position', 'relative' );
@@ -194,7 +175,7 @@ JetpackSlideshow.prototype.onCyclePrevNextClick_ = function( isNext, i/*, slideE
return;
}
- var slideshow = new JetpackSlideshow( container, container.data( 'width' ), container.data( 'height' ), container.data( 'trans' ) );
+ var slideshow = new JetpackSlideshow( container, container.data( 'trans' ), container.data( 'autostart' ) );
slideshow.images = container.data( 'gallery' );
slideshow.init();
diff --git a/plugins/jetpack/modules/shortcodes/medium.php b/plugins/jetpack/modules/shortcodes/medium.php
index 6bd651df..2d11cf15 100644
--- a/plugins/jetpack/modules/shortcodes/medium.php
+++ b/plugins/jetpack/modules/shortcodes/medium.php
@@ -3,14 +3,14 @@
// Embed support for Medium https://medium.com/p/3eaed64aed8a
/**
- * Faux-oembed support for Medium permalinks
+ * Faux-oembed support for Medium permalinks
*
* e.g.
* https://medium.com/help-center
* https://medium.com/@richroll
*/
wp_embed_register_handler( 'medium', '#^https?://medium.com/([a-zA-z0-9-_@]+)#', 'jetpack_embed_medium_oembed' );
-
+
function jetpack_embed_medium_oembed( $matches, $attr, $url ) {
$attr = jetpack_embed_medium_args( $attr );
$attr['url'] = $url;
@@ -31,7 +31,7 @@ function jetpack_embed_medium_embed_html( $args ) {
}
/**
- * Shortcode support that allows passing in URL
+ * Shortcode support that allows passing in URL
*
* [medium url="https://medium.com/help-center" width="100%" border="false" collapsed="true"]
*/
@@ -48,12 +48,13 @@ function jetpack_embed_medium_shortcode( $atts ) {
function jetpack_embed_medium_get_embed_type( $url ) {
$url_path = parse_url( $url, PHP_URL_PATH );
- if ( 0 === strpos( $url_path, '/@' ) ) {
+ if ( preg_match( '/^\/@[\.\w]+$/', $url_path ) ) {
return 'profile';
- } elseif ( preg_match( '#^/[^/]+/[^/]+$#', $url_path ) ) {
- return 'story';
+ } else if ( preg_match( '/^\/[\da-zA-Z-]+$/', $url_path ) ) {
+ return 'collection';
}
- return 'collection';
+
+ return 'story';
}
function jetpack_embed_medium_args( $atts ) {
diff --git a/plugins/jetpack/modules/shortcodes/mixcloud.php b/plugins/jetpack/modules/shortcodes/mixcloud.php
index a5580312..8c244f17 100644
--- a/plugins/jetpack/modules/shortcodes/mixcloud.php
+++ b/plugins/jetpack/modules/shortcodes/mixcloud.php
@@ -22,7 +22,7 @@ function mixcloud_shortcode( $atts, $content = null ) {
if ( empty( $atts[0] ) && empty( $content ) )
return "<!-- mixcloud error: invalid mixcloud resource -->";
- $regular_expression = "#((?<=mixcloud.com/)([A-Za-z0-9_-]+/[A-Za-z0-9_-]+))|^([A-Za-z0-9_-]+/[A-Za-z0-9_-]+)#i";
+ $regular_expression = '#((?<=mixcloud.com/)([A-Za-z0-9%-]+/[A-Za-z0-9%-]+))|^([A-Za-z0-9%-]+/[A-Za-z0-9%-]+)#i';
preg_match( $regular_expression, $content, $match );
if ( ! empty( $match ) ) {
$resource_id = trim( $match[0] );
diff --git a/plugins/jetpack/modules/shortcodes/polldaddy.php b/plugins/jetpack/modules/shortcodes/polldaddy.php
index 3b20ff1d..dc6bc1c3 100644
--- a/plugins/jetpack/modules/shortcodes/polldaddy.php
+++ b/plugins/jetpack/modules/shortcodes/polldaddy.php
@@ -4,6 +4,7 @@ if ( !class_exists( 'PolldaddyShortcode' ) ) {
/**
* Class wrapper for polldaddy shortcodes
*/
+
class PolldaddyShortcode {
static $add_script = false;
@@ -13,12 +14,107 @@ class PolldaddyShortcode {
* Add all the actions & resgister the shortcode
*/
function __construct() {
- if ( defined( 'GLOBAL_TAGS' ) == false )
+ if ( defined( 'GLOBAL_TAGS' ) == false ) {
add_shortcode( 'polldaddy', array( $this, 'polldaddy_shortcode' ) );
+ add_filter( 'pre_kses', array( $this, 'polldaddy_embed_to_shortcode' ) );
+ }
add_action( 'wp_enqueue_scripts', array( $this, 'check_infinite' ) );
add_action( 'infinite_scroll_render', array( $this, 'polldaddy_shortcode_infinite' ), 11 );
}
+ private function get_async_code( array $settings, $survey_link ) {
+ $embed_src = 'http://i0.poll.fm/survey.js';
+ $embed_src_ssl = 'https://polldaddy.com/survey.js';
+
+ $include = <<<CONTAINER
+( function( d, c, j ) {
+ if ( !d.getElementById( j ) ) {
+ var pd = d.createElement( c ), s;
+ pd.id = j;
+ pd.src = ( 'https:' == d.location.protocol ) ? '{$embed_src_ssl}' : '{$embed_src}';
+ s = d.getElementsByTagName( c )[0];
+ s.parentNode.insertBefore( pd, s );
+ }
+}( document, 'script', 'pd-embed' ) );
+CONTAINER;
+
+ // Compress it a bit
+ $include = $this->compress_it( $include );
+
+ $placeholder =
+ '<div class="pd-embed" data-settings="'
+ . esc_attr( json_encode( $settings ) )
+ . '"></div>';
+ if ( 'button' === $settings['type'] ) {
+ $placeholder =
+ '<a class="pd-embed" href="'
+ . esc_attr( $survey_link )
+ . '" data-settings="'
+ . esc_attr( json_encode( $settings ) )
+ . '">'
+ . esc_html( $settings['title'] )
+ . '</a>';
+ }
+
+ $js_include = $placeholder . "\n";
+ $js_include .= '<script type="text/javascript"><!--//--><![CDATA[//><!--' . "\n";
+ $js_include .= $include . "\n";
+ $js_include .= "//--><!]]></script>\n";
+
+ if ( 'button' !== $settings['type'] ) {
+ $js_include .= '<noscript>' . $survey_link . "</noscript>\n";
+ }
+
+ return $js_include;
+ }
+
+ private function compress_it( $js ) {
+ $js = str_replace( array( "\n", "\t", "\r" ), '', $js );
+ $js = preg_replace( '/\s*([,:\?\{;\-=\(\)])\s*/', '$1', $js );
+ return $js;
+ }
+
+ /*
+ * Polldaddy Poll Embed script - transforms code that looks like that:
+ * <script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/123456.js"></script>
+ * <noscript><a href="http://polldaddy.com/poll/123456/">What is your favourite color?</a></noscript>
+ * into the [polldaddy poll=...] shortcode format
+ */
+ function polldaddy_embed_to_shortcode( $content ) {
+
+ if ( false === strpos( $content, 'polldaddy.com/p/' ) ) {
+ return $content;
+ }
+
+ $regexes = array();
+
+ $regexes[] = '#<script[^>]+?src="https?://(secure|static)\.polldaddy\.com/p/([0-9]+)\.js"[^>]*+>\s*?</script>\r?\n?(<noscript>.*?</noscript>)?#i';
+
+ $regexes[] = '#&lt;script(?:[^&]|&(?!gt;))+?src="https?://(secure|static)\.polldaddy\.com/p/([0-9]+)\.js"(?:[^&]|&(?!gt;))*+&gt;\s*?&lt;/script&gt;\r?\n?(&lt;noscript&gt;.*?&lt;/noscript&gt;)?#i';
+
+ foreach ( $regexes as $regex ) {
+ if ( ! preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) ) {
+ continue;
+ }
+
+ foreach ( $matches as $match ) {
+ if ( ! isset( $match[2] ) ) {
+ continue;
+ }
+
+ $id = (int) $match[2];
+
+ if ( $id > 0 ) {
+ $content = str_replace( $match[0], " [polldaddy poll=$id]", $content );
+ /** This action is documented in modules/shortcodes/youtube.php */
+ do_action( 'jetpack_embed_to_shortcode', 'polldaddy', $id );
+ }
+ }
+ }
+
+ return $content;
+ }
+
/**
* Shortcode for polldadddy
* [polldaddy poll|survey|rating="123456"]
@@ -50,48 +146,56 @@ class PolldaddyShortcode {
'delay' => 100,
'visit' => 'single',
'domain' => '',
- 'id' => ''
+ 'id' => '',
), $atts, 'polldaddy' ) );
if ( ! is_array( $atts ) ) {
return '<!-- Polldaddy shortcode passed invalid attributes -->';
}
- $inline = false;
+ $inline = ! in_the_loop();
$no_script = false;
$infinite_scroll = false;
- if ( is_home() && current_theme_supports( 'infinite-scroll' ) )
+ if ( is_home() && current_theme_supports( 'infinite-scroll' ) ) {
$infinite_scroll = true;
+ }
- if ( defined( 'PADPRESS_LOADED' ) )
+ if ( defined( 'PADPRESS_LOADED' ) ) {
$inline = true;
+ }
- if ( function_exists( 'get_option' ) && get_option( 'polldaddy_load_poll_inline' ) )
+ if ( function_exists( 'get_option' ) && get_option( 'polldaddy_load_poll_inline' ) ) {
$inline = true;
+ }
- if ( is_feed() || ( defined( 'DOING_AJAX' ) && !$infinite_scroll ) )
+ if ( is_feed() || ( defined( 'DOING_AJAX' ) && ! $infinite_scroll ) ) {
$no_script = false;
+ }
self::$add_script = $infinite_scroll;
- if ( intval( $rating ) > 0 && !$no_script ) { //rating embed
+ if ( intval( $rating ) > 0 && ! $no_script ) { //rating embed
- if ( empty( $unique_id ) )
- $unique_id = is_page() ? 'wp-page-'.$post->ID : 'wp-post-'.$post->ID;
+ if ( empty( $unique_id ) ) {
+ $unique_id = is_page() ? 'wp-page-' . $post->ID : 'wp-post-' . $post->ID;
+ }
- if ( empty( $item_id ) )
- $item_id = is_page() ? '_page_'.$post->ID : '_post_'.$post->ID;
+ if ( empty( $item_id ) ) {
+ $item_id = is_page() ? '_page_' . $post->ID : '_post_' . $post->ID;
+ }
- if ( empty( $title ) )
+ if ( empty( $title ) ) {
/** This filter is documented in core/src/wp-includes/general-template.php */
$title = apply_filters( 'wp_title', $post->post_title, '', '' );
+ }
- if ( empty( $permalink ) )
+ if ( empty( $permalink ) ) {
$permalink = get_permalink( $post->ID );
+ }
$rating = intval( $rating );
- $unique_id = wp_strip_all_tags( $unique_id );
+ $unique_id = preg_replace( '/[^\-_a-z0-9]/i', '', wp_strip_all_tags( $unique_id ) );
$item_id = wp_strip_all_tags( $item_id );
$item_id = preg_replace( '/[^_a-z0-9]/i', '', $item_id );
@@ -100,23 +204,29 @@ class PolldaddyShortcode {
'unique_id' => $unique_id,
'title' => rawurlencode( trim( $title ) ),
'permalink' => esc_url( $permalink ),
- 'item_id' => $item_id
+ 'item_id' => $item_id,
) );
$item_id = esc_js( $item_id );
+ if ( is_ssl() ) {
+ $rating_js_file = "https://polldaddy.com/js/rating/rating.js";
+ } else {
+ $rating_js_file = "http://i0.poll.fm/js/rating/rating.js";
+ }
+
if ( $inline ) {
return <<<SCRIPT
<div class="pd-rating" id="pd_rating_holder_{$rating}{$item_id}"></div>
<script type="text/javascript" charset="UTF-8"><!--//--><![CDATA[//><!--
PDRTJS_settings_{$rating}{$item_id}={$settings};
//--><!]]></script>
-<script type="text/javascript" charset="UTF-8" src="http://i.polldaddy.com/ratings/rating.js"></script>
+<script type="text/javascript" charset="UTF-8" src="{$rating_js_file}"></script>
SCRIPT;
- }
- else {
- if ( self::$scripts === false )
+ } else {
+ if ( false === self::$scripts ) {
self::$scripts = array();
+ }
$data = array( 'id' => $rating, 'item_id' => $item_id, 'settings' => $settings );
@@ -126,48 +236,42 @@ SCRIPT;
$data = esc_attr( json_encode( $data ) );
- if ( $infinite_scroll )
+ if ( $infinite_scroll ) {
return <<<CONTAINER
<div class="pd-rating" id="pd_rating_holder_{$rating}{$item_id}" data-settings="{$data}"></div>
CONTAINER;
- else
+ } else {
return <<<CONTAINER
<div class="pd-rating" id="pd_rating_holder_{$rating}{$item_id}"></div>
CONTAINER;
+ }
}
- }
- elseif ( intval( $poll ) > 0 ) { //poll embed
+ } elseif ( intval( $poll ) > 0 ) { //poll embed
$poll = intval( $poll );
$poll_url = sprintf( 'http://polldaddy.com/poll/%d', $poll );
$poll_js = sprintf( '%s.polldaddy.com/p/%d.js', ( is_ssl() ? 'https://secure' : 'http://static' ), $poll );
$poll_link = sprintf( '<a href="%s">Take Our Poll</a>', $poll_url );
- if ( $no_script )
+ if ( $no_script ) {
return $poll_link;
- else {
+ } else {
if ( $type == 'slider' && !$inline ) {
- if( !in_array( $visit, array( 'single', 'multiple' ) ) )
+ if ( ! in_array( $visit, array( 'single', 'multiple' ) ) ) {
$visit = 'single';
+ }
- $settings = json_encode( array(
+ $settings = array(
'type' => 'slider',
'embed' => 'poll',
'delay' => intval( $delay ),
'visit' => $visit,
'id' => intval( $poll )
- ) );
+ );
- return <<<SCRIPT
-<script type="text/javascript" charset="UTF-8" src="http://i0.poll.fm/survey.js"></script>
-<script type="text/javascript" charset="UTF-8"><!--//--><![CDATA[//><!--
-polldaddy.add( {$settings} );
-//--><!]]></script>
-<noscript>{$poll_link}</noscript>
-SCRIPT;
- }
- else {
+ return $this->get_async_code( $settings, $poll_link );
+ } else {
$cb = ( $cb == 1 ? '?cb='.mktime() : false );
$margins = '';
$float = '';
@@ -181,28 +285,54 @@ SCRIPT;
$margins = 'margin: 0px 0px 0px 10px';
}
- if ( $cb === false && !$inline ) {
- if ( self::$scripts === false )
+ // Force the normal style embed on single posts/pages otherwise it's not rendered on infinite scroll themed blogs ('infinite_scroll_render' isn't fired)
+ if ( is_singular() ) {
+ $inline = true;
+ }
+
+ if ( false === $cb && ! $inline ) {
+ if ( false === self::$scripts ) {
self::$scripts = array();
+ }
$data = array( 'url' => $poll_js );
- self::$scripts['poll'][] = $data;
+ self::$scripts['poll'][intval( $poll )] = $data;
add_action( 'wp_footer', array( $this, 'generate_scripts' ) );
$data = esc_attr( json_encode( $data ) );
- return <<<CONTAINER
-<a id="pd_a_{$poll}"></a>
+ $script_url = esc_url_raw( plugins_url( 'js/polldaddy-shortcode.js', __FILE__ ) );
+ $str = <<<CONTAINER
+<a name="pd_a_{$poll}"></a>
<div class="PDS_Poll" id="PDI_container{$poll}" data-settings="{$data}" style="display:inline-block;{$float}{$margins}"></div>
<div id="PD_superContainer"></div>
<noscript>{$poll_link}</noscript>
CONTAINER;
- }
- else {
- if ( $inline )
+
+$loader = <<<SCRIPT
+( function( d, c, j ) {
+ if ( ! d.getElementById( j ) ) {
+ var pd = d.createElement( c ), s;
+ pd.id = j;
+ pd.src = '{$script_url}';
+ s = d.getElementsByTagName( c )[0];
+ s.parentNode.insertBefore( pd, s );
+ } else if ( typeof jQuery !== 'undefined' ) {
+ jQuery( d.body ).trigger( 'pd-script-load' );
+ }
+} ( document, 'script', 'pd-polldaddy-loader' ) );
+SCRIPT;
+
+ $loader = $this->compress_it( $loader );
+ $loader = "<script type='text/javascript'>\n" . $loader . "\n</script>";
+
+ return $str . $loader;
+ } else {
+ if ( $inline ) {
$cb = '';
+ }
return <<<CONTAINER
<a id="pd_a_{$poll}"></a>
@@ -214,80 +344,120 @@ CONTAINER;
}
}
}
- }
- elseif ( !empty( $survey ) ) { //survey embed
+ } elseif ( ! empty( $survey ) ) { //survey embed
if ( in_array( $type, array( 'iframe', 'button', 'banner', 'slider' ) ) ) {
if ( empty( $title ) ) {
- $title = 'Take Our Survey';
- if( !empty( $link_text ) )
+ $title = __( 'Take Our Survey', 'jetpack' );
+ if( ! empty( $link_text ) ) {
$title = $link_text;
+ }
}
+ if ( $type == 'banner' || $type == 'slider' )
+ $inline = false;
+
$survey = preg_replace( '/[^a-f0-9]/i', '', $survey );
$survey_url = esc_url( "http://polldaddy.com/s/{$survey}" );
$survey_link = sprintf( '<a href="%s">%s</a>', $survey_url, esc_html( $title ) );
- if ( $no_script || $inline || $infinite_scroll )
+ $settings = array();
+
+ // Do we want a full embed code or a link?
+ if ( $no_script || $inline || $infinite_scroll ) {
return $survey_link;
+ }
if ( $type == 'iframe' ) {
if ( $height != 'auto' ) {
- if ( isset( $content_width ) && is_numeric( $width ) && $width > $content_width )
+ if ( isset( $content_width ) && is_numeric( $width ) && $width > $content_width ) {
$width = $content_width;
+ }
- if ( !$width )
+ if ( ! $width ) {
$width = '100%';
- else
+ } else {
$width = (int) $width;
+ }
- if ( !$height )
+ if ( ! $height ) {
$height = '600';
- else
+ } else {
$height = (int) $height;
+ }
return <<<CONTAINER
<iframe src="{$survey_url}?iframe=1" frameborder="0" width="{$width}" height="{$height}" scrolling="auto" allowtransparency="true" marginheight="0" marginwidth="0">{$survey_link}</iframe>
CONTAINER;
- }
- elseif ( !empty( $domain ) && !empty( $id ) ) {
+ } elseif ( ! empty( $domain ) && ! empty( $id ) ) {
+
+ $domain = preg_replace( '/[^a-z0-9\-]/i', '', $domain );
+ $id = preg_replace( '/[\/\?&\{\}]/', '', $id );
$auto_src = esc_url( "http://{$domain}.polldaddy.com/s/{$id}" );
$auto_src = parse_url( $auto_src );
- if ( !is_array( $auto_src ) || count( $auto_src ) == 0 )
+ if ( ! is_array( $auto_src ) || count( $auto_src ) == 0 ) {
return '<!-- no polldaddy output -->';
+ }
- if ( !isset( $auto_src['host'] ) || !isset( $auto_src['path'] ) )
+ if ( ! isset( $auto_src['host'] ) || ! isset( $auto_src['path'] ) ) {
return '<!-- no polldaddy output -->';
+ }
$domain = $auto_src['host'].'/s/';
$id = str_ireplace( '/s/', '', $auto_src['path'] );
- $settings = json_encode( array(
+ $settings = array(
'type' => $type,
'auto' => true,
'domain' => $domain,
'id' => $id
- ) );
+ );
}
- }
- else {
+ } else {
$text_color = preg_replace( '/[^a-f0-9]/i', '', $text_color );
$back_color = preg_replace( '/[^a-f0-9]/i', '', $back_color );
- if ( !in_array( $align, array( 'right', 'left', 'top-left', 'top-right', 'middle-left', 'middle-right', 'bottom-left', 'bottom-right' ) ) )
+ if (
+ ! in_array(
+ $align,
+ array(
+ 'right',
+ 'left',
+ 'top-left',
+ 'top-right',
+ 'middle-left',
+ 'middle-right',
+ 'bottom-left',
+ 'bottom-right'
+ )
+ )
+ ) {
$align = '';
+ }
- if ( !in_array( $style, array( 'inline', 'side', 'corner', 'rounded', 'square' ) ) )
+ if (
+ ! in_array(
+ $style,
+ array(
+ 'inline',
+ 'side',
+ 'corner',
+ 'rounded',
+ 'square'
+ )
+ )
+ ) {
$style = '';
+ }
$title = wp_strip_all_tags( $title );
$body = wp_strip_all_tags( $body );
$button = wp_strip_all_tags( $button );
- $settings = json_encode( array_filter( array(
+ $settings = array_filter( array(
'title' => $title,
'type' => $type,
'body' => $body,
@@ -296,32 +466,37 @@ CONTAINER;
'back_color' => $back_color,
'align' => $align,
'style' => $style,
- 'id' => $survey
- ) ) );
+ 'id' => $survey,
+ ) );
}
- return <<<CONTAINER
-<script type="text/javascript" charset="UTF-8" src="http://i0.poll.fm/survey.js"></script>
-<script type="text/javascript" charset="UTF-8"><!--//--><![CDATA[//><!--
-polldaddy.add( {$settings} );
-//--><!]]></script>
-<noscript>{$survey_link}</noscript>
-CONTAINER;
+
+ if ( empty( $settings ) ) {
+ return '<!-- no polldaddy output -->';
+ }
+
+ return $this->get_async_code( $settings, $survey_link );
}
- }
- else
+ } else {
return '<!-- no polldaddy output -->';
+ }
}
function generate_scripts() {
$script = '';
if ( is_array( self::$scripts ) ) {
+ if ( is_ssl() ) {
+ $rating_js_file = "https://polldaddy.com/js/rating/rating.js";
+ } else {
+ $rating_js_file = "http://i0.poll.fm/js/rating/rating.js";
+ }
+
if ( isset( self::$scripts['rating'] ) ) {
$script = "<script type='text/javascript' charset='UTF-8' id='polldaddyRatings'><!--//--><![CDATA[//><!--\n";
foreach( self::$scripts['rating'] as $rating ) {
$script .= "PDRTJS_settings_{$rating['id']}{$rating['item_id']}={$rating['settings']}; if ( typeof PDRTJS_RATING !== 'undefined' ){if ( typeof PDRTJS_{$rating['id']}{$rating['item_id']} == 'undefined' ){PDRTJS_{$rating['id']}{$rating['item_id']} = new PDRTJS_RATING( PDRTJS_settings_{$rating['id']}{$rating['item_id']} );}}";
}
- $script .= "\n//--><!]]></script><script type='text/javascript' charset='UTF-8' src='http://i.polldaddy.com/ratings/rating.js'></script>";
+ $script .= "\n//--><!]]></script><script type='text/javascript' charset='UTF-8' src='{$rating_js_file}'></script>";
}
@@ -340,7 +515,11 @@ CONTAINER;
* If the theme uses infinite scroll, include jquery at the start
*/
function check_infinite() {
- if ( current_theme_supports( 'infinite-scroll' ) ) {
+ if (
+ current_theme_supports( 'infinite-scroll' )
+ && class_exists( 'The_Neverending_Home_Page' )
+ && The_Neverending_Home_Page::archive_supports_infinity()
+ ) {
wp_enqueue_script( 'jquery' );
}
}
@@ -354,25 +533,24 @@ CONTAINER;
function polldaddy_shortcode_infinite() {
// only try to load if a shortcode has been called and theme supports infinite scroll
if( self::$add_script ) {
- $script_url = json_encode( esc_url_raw( plugins_url( 'js/polldaddy-shortcode.js', __FILE__ ) ) );
+ $script_url = esc_url_raw( plugins_url( 'js/polldaddy-shortcode.js', __FILE__ ) );
// if the script hasn't been loaded, load it
- // if the script loads successfully, fire an 'as-script-load' event
+ // if the script loads successfully, fire an 'pd-script-load' event
echo <<<SCRIPT
<script type='text/javascript'>
//<![CDATA[
- if ( typeof window.polldaddyshortcode === 'undefined' ) {
- var wp_pd_js = document.createElement( 'script' );
- wp_pd_js.type = 'text/javascript';
- wp_pd_js.src = $script_url;
- wp_pd_js.async = true;
- wp_pd_js.onload = function() {
- jQuery( document.body ).trigger( 'pd-script-load' );
- };
- document.getElementsByTagName( 'head' )[0].appendChild( wp_pd_js );
- } else {
- jQuery( document.body ).trigger( 'pd-script-load' );
- }
+ ( function( d, c, j ) {
+ if ( !d.getElementById( j ) ) {
+ var pd = d.createElement( c ), s;
+ pd.id = j;
+ pd.src = '{$script_url}';
+ s = d.getElementsByTagName( c )[0];
+ s.parentNode.insertBefore( pd, s );
+ } else if ( typeof jQuery !== 'undefined' ) {
+ jQuery( d.body ).trigger( 'pd-script-load' );
+ }
+ } ( document, 'script', 'pd-polldaddy-loader' ) );
//]]>
</script>
SCRIPT;
@@ -387,7 +565,7 @@ new PolldaddyShortcode();
if ( ! function_exists( 'polldaddy_link' ) ) {
// http://polldaddy.com/poll/1562975/?view=results&msg=voted
function polldaddy_link( $content ) {
- return preg_replace( '!(?:\n|\A)http://polldaddy.com/poll/([0-9]+?)/(.+)?(?:\n|\Z)!i', "\n<script type='text/javascript' language='javascript' charset='utf-8' src='http://static.polldaddy.com/p/$1.js'></script><noscript> <a href='http://polldaddy.com/poll/$1/'>View Poll</a></noscript>\n", $content );
+ return preg_replace( '!(?:\n|\A)http://polldaddy.com/poll/([0-9]+?)/(.+)?(?:\n|\Z)!i', "\n<script type='text/javascript' language='javascript' charset='utf-8' src='//static.polldaddy.com/p/$1.js'></script><noscript> <a href='http://polldaddy.com/poll/$1/'>View Poll</a></noscript>\n", $content );
}
// higher priority because we need it before auto-link and autop get to it
@@ -400,4 +578,6 @@ if ( ! function_exists( 'polldaddy_link' ) ) {
}
}
+wp_oembed_add_provider( '#http://poll\.fm/.*#i', 'http://polldaddy.com/oembed/', true );
+
}
diff --git a/plugins/jetpack/modules/shortcodes/recipe.php b/plugins/jetpack/modules/shortcodes/recipe.php
index ece39fd4..7288e2a4 100644
--- a/plugins/jetpack/modules/shortcodes/recipe.php
+++ b/plugins/jetpack/modules/shortcodes/recipe.php
@@ -96,28 +96,28 @@ class Jetpack_Recipes {
$html .= '<ul class="jetpack-recipe-meta">';
if ( '' != $atts['servings'] ) {
- $html .= sprintf( '<li class="jetpack-recipe-servings" itemprop="recipeYield"><strong>%1s: </strong>%2s</li>',
+ $html .= sprintf( '<li class="jetpack-recipe-servings" itemprop="recipeYield"><strong>%1$s: </strong>%2$s</li>',
__( 'Servings', 'jetpack' ),
esc_html( $atts['servings'] )
);
}
if ( '' != $atts['time'] ) {
- $html .= sprintf( '<li class="jetpack-recipe-time" itemprop="totalTime"><strong>%1s: </strong>%2s</li>',
+ $html .= sprintf( '<li class="jetpack-recipe-time" itemprop="totalTime"><strong>%1$s: </strong>%2$s</li>',
__( 'Time', 'jetpack' ),
esc_html( $atts['time'] )
);
}
if ( '' != $atts['difficulty'] ) {
- $html .= sprintf( '<li class="jetpack-recipe-difficulty"><strong>%1s: </strong>%2s</li>',
+ $html .= sprintf( '<li class="jetpack-recipe-difficulty"><strong>%1$s: </strong>%2$s</li>',
__( 'Difficulty', 'jetpack' ),
esc_html( $atts['difficulty'] )
);
}
if ( 'false' != $atts['print'] ) {
- $html .= sprintf( '<li class="jetpack-recipe-print"><a href="#">%1s</a></li>',
+ $html .= sprintf( '<li class="jetpack-recipe-print"><a href="#">%s</a></li>',
__( 'Print', 'jetpack' )
);
}
diff --git a/plugins/jetpack/modules/shortcodes/slideshare.php b/plugins/jetpack/modules/shortcodes/slideshare.php
index f08790ae..6b452039 100644
--- a/plugins/jetpack/modules/shortcodes/slideshare.php
+++ b/plugins/jetpack/modules/shortcodes/slideshare.php
@@ -1,47 +1,88 @@
<?php
+
+// guarantee use of https
+wp_oembed_remove_provider( '#https?://(www\.)?slideshare\.net/.*#i' );
+wp_oembed_add_provider( '#https?://(www\.)?slideshare\.net/.*#i', 'https://www.slideshare.net/api/oembed/2', true );
+
/*
* Slideshare shortcode format:
- * [slideshare id=5342235&doc=camprock-101002163655-phpapp01&w=300&h=200]
+ * Old style (still compatible): [slideshare id=5342235&doc=camprock-101002163655-phpapp01&w=300&h=200]
+ * New style: [slideshare id=5342235&w=300&h=200&fb=0&mw=0&mh=0&sc=no]
+ *
+ * Legend:
+ * id = Document ID provided by Slideshare
+ * w = Width of iFrame (int)
+ * h = Height of iFrame (int)
+ * fb = iFrame frameborder (int)
+ * mw = iFrame marginwidth (int)
+ * mh = iFrame marginheight (int)
+ * sc = iFrame Scrollbar (yes/no)
**/
+add_shortcode( 'slideshare', 'slideshare_shortcode' );
+
function slideshare_shortcode( $atts ) {
global $content_width;
$params = shortcode_new_to_old_params( $atts );
parse_str( $params, $arguments );
- if ( empty( $arguments ) ) {
+ if ( empty( $arguments ) )
return '<!-- SlideShare error: no arguments -->';
- }
- extract( $arguments, EXTR_SKIP );
+ extract( $arguments );
- $pattern = '/[^-_a-zA-Z0-9]/';
- if ( empty( $id ) || preg_match( $pattern, $id ) ) {
+ // check that the Slideshare ID contains letters, numbers and query strings
+ $pattern = '/[^-_a-zA-Z0-9?=&]/';
+ if ( empty( $id ) || preg_match( $pattern, $id ) )
return '<!-- SlideShare error: id is missing or has illegal characters -->';
- }
- if ( empty( $doc ) || preg_match( $pattern, $doc ) ) {
- return '<!-- SlideShare error: doc is missing or has illegal characters -->';
- }
-
- if ( empty( $w ) && !empty( $content_width ) ) {
+ // check the width/height
+ if ( empty( $w ) && ! empty( $content_width ) )
$w = intval( $content_width );
- } elseif ( ! ( $w = intval( $w ) ) || $w < 300 || $w > 1600 ) {
+ elseif ( ! ( $w = intval( $w ) ) || $w < 300 || $w > 1600 )
$w = 425;
- } else {
+ else
$w = intval( $w );
- }
$h = ceil( $w * 348 / 425 );
- $player = "<object type='application/x-shockwave-flash' wmode='opaque' data='http://static.slideshare.net/swf/ssplayer2.swf?id=$id&doc=$doc' width='$w' height='$h'><param name='movie' value='http://static.slideshare.net/swf/ssplayer2.swf?id=$id&doc=$doc' /><param name='allowFullScreen' value='true' /></object>";
-
- if ( !empty( $type ) && $type == 'd' ) {
- $player = "<object style='margin: 0px;' width='$w' height='$h'><param name='movie' value='http://static.slidesharecdn.com/swf/ssplayerd.swf?doc=$doc' /><param name='allowFullScreen' value='true' /><param name='wmode' value='opaque' /><embed src='http://static.slidesharecdn.com/swf/ssplayerd.swf?doc=$doc' type='application/x-shockwave-flash' allowfullscreen='true' wmode='opaque' width='$w' height='$h'></embed></object>";
+ if ( isset( $pro ) ) {
+ $source = "https://www.slideshare.net/slidesharepro/$id";
+ } else {
+ $source = "https://www.slideshare.net/slideshow/embed_code/$id";
}
- return $player;
-}
+ if ( isset( $rel ) )
+ $source = add_query_arg( 'rel', intval( $rel ), $source );
-add_shortcode( 'slideshare', 'slideshare_shortcode' );
+ if ( isset( $startSlide ) )
+ $source = add_query_arg( 'startSlide', intval( $startSlide ), $source );
+
+ $player = sprintf( "<iframe src='%s' width='%d' height='%d'", esc_url( $source ), $w, $h );
+
+ // check the frameborder
+ if ( isset( $fb ) )
+ $player .= " frameborder='" . intval( $fb ) . "'";
+
+ // check the margin width; if not empty, cast as int
+ if ( isset( $mw ) )
+ $player .= " marginwidth='" . intval( $mw ) . "'";
+
+ // check the margin height, if not empty, cast as int
+ if ( isset( $mh ) )
+ $player .= " marginheight='" . intval( $mh ) . "'";
+
+ if ( ! empty( $style ) )
+ $player .= " style='" . $style . "'";
+
+ // check the scrollbar; cast as a lowercase string for comparison
+ $sc = isset( $sc ) ? strtolower( $sc ) : '';
+
+ if ( in_array( $sc, array( 'yes', 'no' ) ) )
+ $player .= " scrolling='" . $sc . "'";
+
+ $player .= ' allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>';
+
+ return $player;
+} \ No newline at end of file
diff --git a/plugins/jetpack/modules/shortcodes/slideshow.php b/plugins/jetpack/modules/shortcodes/slideshow.php
index ced00efc..8132de8c 100644
--- a/plugins/jetpack/modules/shortcodes/slideshow.php
+++ b/plugins/jetpack/modules/shortcodes/slideshow.php
@@ -18,14 +18,15 @@ class Jetpack_Slideshow_Shortcode {
}
// Only if the gallery shortcode has not been redefined.
- if ( isset( $shortcode_tags['gallery'] ) && $shortcode_tags['gallery'] == 'gallery_shortcode' ) {
+ if ( isset( $shortcode_tags['gallery'] ) && 'gallery_shortcode' === $shortcode_tags['gallery'] ) {
add_filter( 'post_gallery', array( $this, 'post_gallery' ), 1002, 2 );
add_filter( 'jetpack_gallery_types', array( $this, 'add_gallery_type' ), 10 );
$needs_scripts = true;
}
- if ( $needs_scripts )
+ if ( $needs_scripts ) {
add_action( 'wp_enqueue_scripts', array( $this, 'maybe_enqueue_scripts' ), 1 );
+ }
/**
* For the moment, comment out the setting for v2.8.
@@ -38,19 +39,21 @@ class Jetpack_Slideshow_Shortcode {
/**
* Responds to the [gallery] shortcode, but not an actual shortcode callback.
*
- * @param $value An empty string if nothing has modified the gallery output, the output html otherwise
- * @param $attr The shortcode attributes array
+ * @param $value string An empty string if nothing has modified the gallery output, the output html otherwise
+ * @param $attr array The shortcode attributes array
*
* @return string The (un)modified $value
*/
function post_gallery( $value, $attr ) {
// Bail if somebody else has done something
- if ( ! empty( $value ) )
+ if ( ! empty( $value ) ) {
return $value;
+ }
// If [gallery type="slideshow"] have it behave just like [slideshow]
- if ( ! empty( $attr['type'] ) && 'slideshow' == $attr['type'] )
+ if ( ! empty( $attr['type'] ) && 'slideshow' == $attr['type'] ) {
return $this->shortcode_callback( $attr );
+ }
return $value;
}
@@ -58,11 +61,15 @@ class Jetpack_Slideshow_Shortcode {
/**
* Add the Slideshow type to gallery settings
*
- * @param $types An array of types where the key is the value, and the value is the caption.
* @see Jetpack_Tiled_Gallery::media_ui_print_templates
+ *
+ * @param $types array An array of types where the key is the value, and the value is the caption.
+ *
+ * @return array
*/
function add_gallery_type( $types = array() ) {
$types['slideshow'] = esc_html__( 'Slideshow', 'jetpack' );
+
return $types;
}
@@ -89,7 +96,7 @@ class Jetpack_Slideshow_Shortcode {
$option = get_option( $name );
?>
<fieldset>
- <select name="<?php echo esc_attr( $name ); ?>" id="<?php esc_attr( $name ); ?>">
+ <select name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>">
<?php foreach ( $values as $key => $value ) : ?>
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, $option ); ?>>
<?php echo esc_html( $value ); ?>
@@ -107,58 +114,73 @@ class Jetpack_Slideshow_Shortcode {
return ( 'white' == $value ) ? 'white' : 'black';
}
- function shortcode_callback( $attr, $content = null ) {
- global $post, $content_width;
-
- $attr = shortcode_atts( array(
- 'trans' => 'fade',
- 'order' => 'ASC',
- 'orderby' => 'menu_order ID',
- 'id' => $post->ID,
- 'include' => '',
- 'exclude' => '',
- ), $attr, 'slideshow' );
+ function shortcode_callback( $attr ) {
+ global $post;
+
+ $attr = shortcode_atts(
+ array(
+ 'trans' => 'fade',
+ 'order' => 'ASC',
+ 'orderby' => 'menu_order ID',
+ 'id' => $post->ID,
+ 'include' => '',
+ 'exclude' => '',
+ 'autostart' => true,
+ 'size' => '',
+ ), $attr, 'slideshow'
+ );
- if ( 'rand' == strtolower( $attr['order'] ) )
+ if ( 'rand' == strtolower( $attr['order'] ) ) {
$attr['orderby'] = 'none';
+ }
$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
- if ( ! $attr['orderby'] )
+ if ( ! $attr['orderby'] ) {
$attr['orderby'] = 'menu_order ID';
+ }
+
+ if ( ! $attr['size'] ) {
+ $attr['size'] = 'full';
+ }
// Don't restrict to the current post if include
$post_parent = ( empty( $attr['include'] ) ) ? intval( $attr['id'] ) : null;
- $attachments = get_posts( array(
- 'post_status' => 'inherit',
- 'post_type' => 'attachment',
- 'post_mime_type' => 'image',
- 'posts_per_page' => -1,
- 'post_parent' => $post_parent,
- 'order' => $attr['order'],
- 'orderby' => $attr['orderby'],
- 'include' => $attr['include'],
- 'exclude' => $attr['exclude'],
- ) );
-
- if ( count( $attachments ) < 1 )
- return;
+ $attachments = get_posts(
+ array(
+ 'post_status' => 'inherit',
+ 'post_type' => 'attachment',
+ 'post_mime_type' => 'image',
+ 'posts_per_page' => - 1,
+ 'post_parent' => $post_parent,
+ 'order' => $attr['order'],
+ 'orderby' => $attr['orderby'],
+ 'include' => $attr['include'],
+ 'exclude' => $attr['exclude'],
+ )
+ );
- $gallery_instance = sprintf( "gallery-%d-%d", $attr['id'], ++$this->instance_count );
+ if ( count( $attachments ) < 1 ) {
+ return false;
+ }
+
+ $gallery_instance = sprintf( 'gallery-%d-%d', $attr['id'], ++$this->instance_count );
$gallery = array();
foreach ( $attachments as $attachment ) {
- $attachment_image_src = wp_get_attachment_image_src( $attachment->ID, 'full' );
- $attachment_image_src = $attachment_image_src[0]; // [url, width, height]
+ $attachment_image_src = wp_get_attachment_image_src( $attachment->ID, $attr['size'] );
+ $attachment_image_src = $attachment_image_src[0]; // [url, width, height]
$attachment_image_title = get_the_title( $attachment->ID );
- $attachment_image_alt = get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true );
+ $attachment_image_alt = get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true );
/**
* Filters the Slideshow slide caption.
*
+ * @module shortcodes
+ *
* @since 2.3.0
*
* @param string wptexturize( strip_tags( $attachment->post_excerpt ) ) Post excerpt.
- * @param string $attachment->ID Attachment ID.
+ * @param string $attachment ->ID Attachment ID.
*/
$caption = apply_filters( 'jetpack_slideshow_slide_caption', wptexturize( strip_tags( $attachment->post_excerpt ) ), $attachment->ID );
@@ -171,28 +193,24 @@ class Jetpack_Slideshow_Shortcode {
);
}
- $max_width = intval( get_option( 'large_size_w' ) );
- $max_height = 450;
- if ( intval( $content_width ) > 0 )
- $max_width = min( intval( $content_width ), $max_width );
-
$color = Jetpack_Options::get_option( 'slideshow_background_color', 'black' );
$js_attr = array(
- 'gallery' => $gallery,
- 'selector' => $gallery_instance,
- 'width' => $max_width,
- 'height' => $max_height,
- 'trans' => $attr['trans'] ? $attr['trans'] : 'fade',
- 'color' => $color,
- );
+ 'gallery' => $gallery,
+ 'selector' => $gallery_instance,
+ 'trans' => $attr['trans'] ? $attr['trans'] : 'fade',
+ 'autostart' => $attr['autostart'] ? $attr['autostart'] : 'true',
+ 'color' => $color,
+ );
// Show a link to the gallery in feeds.
- if ( is_feed() )
- return sprintf( '<a href="%s">%s</a>',
+ if ( is_feed() ) {
+ return sprintf(
+ '<a href="%s">%s</a>',
esc_url( get_permalink( $post->ID ) . '#' . $gallery_instance . '-slideshow' ),
esc_html__( 'Click to view slideshow.', 'jetpack' )
);
+ }
return $this->slideshow_js( $js_attr );
}
@@ -202,22 +220,16 @@ class Jetpack_Slideshow_Shortcode {
*
* Returns the necessary markup and js to fire a slideshow.
*
+ * @param $attr array Attributes for the slideshow.
+ *
* @uses $this->enqueue_scripts()
+ *
+ * @return string HTML output.
*/
function slideshow_js( $attr ) {
// Enqueue scripts
$this->enqueue_scripts();
- if ( $attr['width'] <= 100 )
- $attr['width'] = 450;
-
- if ( $attr['height'] <= 100 )
- $attr['height'] = 450;
-
- // 40px padding
- $attr['width'] -= 40;
- $attr['height'] -= 40;
-
$output = '';
if ( defined( 'JSON_HEX_AMP' ) ) {
@@ -228,12 +240,12 @@ class Jetpack_Slideshow_Shortcode {
}
$output .= '<p class="jetpack-slideshow-noscript robots-nocontent">' . esc_html__( 'This slideshow requires JavaScript.', 'jetpack' ) . '</p>';
- $output .= sprintf( '<div id="%s" class="slideshow-window jetpack-slideshow slideshow-%s" data-width="%s" data-height="%s" data-trans="%s" data-gallery="%s"></div>',
+ $output .= sprintf(
+ '<div id="%s" class="slideshow-window jetpack-slideshow slideshow-%s" data-trans="%s" data-autostart="%s" data-gallery="%s"></div>',
esc_attr( $attr['selector'] . '-slideshow' ),
esc_attr( $attr['color'] ),
- esc_attr( $attr['width'] ),
- esc_attr( $attr['height'] ),
esc_attr( $attr['trans'] ),
+ esc_attr( $attr['autostart'] ),
/*
* The input to json_encode() above can contain '&quot;'.
*
@@ -256,16 +268,6 @@ class Jetpack_Slideshow_Shortcode {
_wp_specialchars( wp_check_invalid_utf8( $gallery ), ENT_QUOTES, false, true )
);
- $output .= "
- <style>
- #{$attr['selector']}-slideshow .slideshow-slide img {
- max-height: " . intval( $attr['height'] ) ."px;
- /* Emulate max-height in IE 6 */
- _height: expression(this.scrollHeight >= " . intval( $attr['height'] ) . " ? '" . intval( $attr['height'] ) . "px' : 'auto');
- }
- </style>
- ";
-
return $output;
}
@@ -273,8 +275,9 @@ class Jetpack_Slideshow_Shortcode {
* Infinite Scroll needs the scripts to be present at all times
*/
function maybe_enqueue_scripts() {
- if ( is_home() && current_theme_supports( 'infinite-scroll' ) )
+ if ( is_home() && current_theme_supports( 'infinite-scroll' ) ) {
$this->enqueue_scripts();
+ }
}
/**
@@ -283,28 +286,37 @@ class Jetpack_Slideshow_Shortcode {
function enqueue_scripts() {
static $enqueued = false;
- if ( $enqueued )
+ if ( $enqueued ) {
return;
+ }
- wp_enqueue_script( 'jquery-cycle', plugins_url( '/js/jquery.cycle.js', __FILE__ ) , array( 'jquery' ), '2.9999.8', true );
+ wp_enqueue_script( 'jquery-cycle', plugins_url( '/js/jquery.cycle.js', __FILE__ ), array( 'jquery' ), '2.9999.8', true );
wp_enqueue_script( 'jetpack-slideshow', plugins_url( '/js/slideshow-shortcode.js', __FILE__ ), array( 'jquery-cycle' ), '20121214.1', true );
- if( is_rtl() ) {
+ if ( is_rtl() ) {
wp_enqueue_style( 'jetpack-slideshow', plugins_url( '/css/rtl/slideshow-shortcode-rtl.css', __FILE__ ) );
} else {
wp_enqueue_style( 'jetpack-slideshow', plugins_url( '/css/slideshow-shortcode.css', __FILE__ ) );
}
- /**
- * Filters the slideshow Javascript spinner.
- *
- * @since 2.1.0
- *
- * @param array $args
- * - string - spinner - URL of the spinner image.
- */
- wp_localize_script( 'jetpack-slideshow', 'jetpackSlideshowSettings', apply_filters( 'jetpack_js_slideshow_settings', array(
- 'spinner' => plugins_url( '/img/slideshow-loader.gif', __FILE__ ),
- ) ) );
+ wp_localize_script(
+ 'jetpack-slideshow',
+ 'jetpackSlideshowSettings',
+ /**
+ * Filters the slideshow JavaScript spinner.
+ *
+ * @module shortcodes
+ *
+ * @since 2.1.0
+ *
+ * @param array $args
+ * - string - spinner - URL of the spinner image.
+ */
+ apply_filters(
+ 'jetpack_js_slideshow_settings', array(
+ 'spinner' => plugins_url( '/img/slideshow-loader.gif', __FILE__ ),
+ )
+ )
+ );
$enqueued = true;
}
@@ -313,4 +325,5 @@ class Jetpack_Slideshow_Shortcode {
$gallery = new Jetpack_Slideshow_Shortcode;
}
}
+
add_action( 'init', array( 'Jetpack_Slideshow_Shortcode', 'init' ) );
diff --git a/plugins/jetpack/modules/shortcodes/soundcloud.php b/plugins/jetpack/modules/shortcodes/soundcloud.php
index fe98c334..d3fb9f68 100644
--- a/plugins/jetpack/modules/shortcodes/soundcloud.php
+++ b/plugins/jetpack/modules/shortcodes/soundcloud.php
@@ -58,7 +58,7 @@ function soundcloud_shortcode( $atts, $content = null ) {
$player_type = soundcloud_get_option( 'player_type', 'visual' );
$isIframe = $player_type !== 'flash';
- $isVisual = !$player_type || $player_type === 'visual';
+ $isVisual = ! $player_type || $player_type === 'visual' || $shortcode_options['visual'];
// User preference options
$plugin_options = array_filter(array(
@@ -98,11 +98,11 @@ function soundcloud_shortcode( $atts, $content = null ) {
}
// Both "width" and "height" need to be integers
- if (isset( $options['width'] ) && ! preg_match( '/^\d+$/', $options['width'] ) ) {
+ if (isset( $options['width'] ) && ! preg_match( '/^(\d+)(%)?$/', $options['width'] ) ) {
// set to 0 so oEmbed will use the default 100% and WordPress themes will leave it alone
$options['width'] = 0;
}
- if ( isset( $options['height'] ) && ! preg_match( '/^\d+$/', $options['height'] ) ) {
+ if ( isset( $options['height'] ) && ! preg_match( '/^(\d+)(%)?$/', $options['height'] ) ) {
unset( $options['height'] );
}
@@ -240,13 +240,34 @@ function jetpack_soundcloud_embed_reversal( $content ) {
continue;
foreach ( $matches as $match ) {
+
+ // if pasted from the visual editor - prevent double encoding
+ $match[1] = str_replace( '&amp;amp;', '&amp;', $match[1] );
+
$args = parse_url( html_entity_decode( $match[1] ), PHP_URL_QUERY );
$args = wp_parse_args( $args );
if ( ! preg_match( '#^(?:https?:)?//api\.soundcloud\.com/.+$#i', $args['url'], $url_matches ) )
continue;
- $shortcode = sprintf( '[soundcloud url="%s"]', esc_url( $url_matches[0] ) );
+ if ( ! preg_match( '#height="(\d+)"#i', $match[0], $hmatch ) ) {
+ $height = '';
+ } else {
+ $height = " height='" . intval( $hmatch[1] ) . "'";
+ }
+
+ unset( $args['url'] );
+ $params = 'params="';
+ if ( count( $args ) > 0 ) {
+ foreach ( $args as $key => $value ) {
+ $params .= esc_html( $key ) . '=' . esc_html( $value ) . '&amp;';
+ }
+ $params = substr( $params, 0, -5 );
+ }
+ $params .= '"';
+
+ $shortcode = '[soundcloud url="' . esc_url( $url_matches[0] ) . '" ' . $params . ' width="100%"' . $height . ' iframe="true" /]';
+
$replace_regex = sprintf( '#\s*%s\s*#', preg_quote( $match[0], '#' ) );
$content = preg_replace( $replace_regex, sprintf( "\n\n%s\n\n", $shortcode ), $content );
/** This action is documented in modules/shortcodes/youtube.php */
diff --git a/plugins/jetpack/modules/shortcodes/twitchtv.php b/plugins/jetpack/modules/shortcodes/twitchtv.php
new file mode 100644
index 00000000..884a2ac5
--- /dev/null
+++ b/plugins/jetpack/modules/shortcodes/twitchtv.php
@@ -0,0 +1,79 @@
+<?php
+/**
+ * twitch.tv shortcode
+ * [twitchtv url='http://www.twitch.tv/paperbat' height='378' width='620' autoplay='false']
+ * [twitchtv url='http://www.twitch.tv/paperbat/b/323486192' height='378' width='620' autoplay='false']
+ **/
+
+/**
+ * Flash:
+(Live URL) http://www.twitch.tv/paperbat
+
+Video:
+<object type="application/x-shockwave-flash" height="378" width="620" id="live_embed_player_flash" data="//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf?channel=paperbat" bgcolor="#000000">
+<param name="allowFullScreen" value="true" />
+<param name="allowScriptAccess" value="always" />
+<param name="allowNetworking" value="all" />
+<param name="movie" value="//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf" />
+<param name="flashvars" value="hostname=www.twitch.tv&channel=paperbat&auto_play=true&start_volume=25" />
+</object>
+
+(Archive URL) http://www.twitch.tv/paperbat/v/323486192
+
+<object bgcolor='#000000' data='//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf' height='378' id='clip_embed_player_flash' type='application/x-shockwave-flash' width='620'>
+<param name='movie' value='//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf'>
+<param name='allowScriptAccess' value='always'>
+<param name='allowNetworking' value='all'>
+<param name='allowFullScreen' value='true'>
+<param name='flashvars' value='videoId=v323486192&hostname=www.twitch.tv&channel=paperbat&auto_play=false&title=PBat+Live+-+Playin%27+for+funnnnn+%287%2F1%2F2012%29&start_volume=25'>
+</object>
+ */
+function wpcom_twitchtv_shortcode( $attr, $content = NULL ) {
+ $attr = extract( shortcode_atts( array(
+ 'height' => 378,
+ 'width' => 620,
+ 'url' => '',
+ 'autoplay' => false
+ ), $attr ) );
+
+ if ( empty( $url ) )
+ return;
+
+ preg_match( '|^http://www.twitch.tv/([^/?]+)(/v/(\d+))?|i', $url, $match );
+
+ $width = (int) $width;
+ $height = (int) $height;
+ $autoplay = var_export( filter_var( $autoplay, FILTER_VALIDATE_BOOLEAN ), true );
+
+ $user_id = esc_attr( $match[1] );
+ $video_id = 0;
+ if ( !empty( $match[3] ) )
+ $video_id = (int) $match[3];
+
+ /** This action is documented in modules/widgets/social-media-icons.php */
+ do_action( 'jetpack_bump_stats_extras', 'twitchtv', 'shortcode' );
+
+ if ( $video_id > 0 ) {
+ // Archive video
+ return "<object bgcolor='#000000' data='//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf' height='$height' width='$width' id='clip_embed_player_flash' type='application/x-shockwave-flash'>
+<param name='movie' value='//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf'>
+<param name='allowScriptAccess' value='always'>
+<param name='allowNetworking' value='all'>
+<param name='allowFullScreen' value='true'>
+<param name='flashvars' value='videoId=v$video_id&hostname=www.twitch.tv&channel=$user_id&auto_play=$autoplay'>
+</object>";
+ }
+
+ $html = "<object type='application/x-shockwave-flash' height='$height' width='$width' id='live_embed_player_flash' data='//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf?channel=$user_id' bgcolor='#000000'>
+<param name='allowFullScreen' value='true' />
+<param name='allowScriptAccess' value='always' />
+<param name='allowNetworking' value='all' />
+<param name='movie' value='//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf' />
+<param name='flashvars' value='hostname=www.twitch.tv&channel=$user_id&auto_play=$autoplay&start_volume=25' />
+</object>";
+
+ return $html;
+}
+
+add_shortcode( 'twitch', 'wpcom_twitchtv_shortcode' );
+add_shortcode( 'twitchtv', 'wpcom_twitchtv_shortcode' );
diff --git a/plugins/jetpack/modules/shortcodes/vimeo.php b/plugins/jetpack/modules/shortcodes/vimeo.php
index f8637704..64869111 100644
--- a/plugins/jetpack/modules/shortcodes/vimeo.php
+++ b/plugins/jetpack/modules/shortcodes/vimeo.php
@@ -77,26 +77,30 @@ function vimeo_shortcode( $atts ) {
if ( ! $height ) {
$height = round( ( $width / 640 ) * 360 );
}
-
+
/**
* Filter the Vimeo player width.
*
+ * @module shortcodes
+ *
* @since 3.4.0
*
* @param int $width Width of the Vimeo player in pixels.
*/
$width = (int) apply_filters( 'vimeo_width', $width );
-
+
/**
* Filter the Vimeo player height.
*
+ * @module shortcodes
+ *
* @since 3.4.0
*
* @param int $height Height of the Vimeo player in pixels.
*/
$height = (int) apply_filters( 'vimeo_height', $height );
- $url = esc_url( set_url_scheme( "http://player.vimeo.com/video/$id" ) );
+ $url = esc_url( "https://player.vimeo.com/video/$id" );
// $args['autoplay'] is parsed from the embedded url.
// $autoplay is parsed from shortcode arguments.
@@ -110,21 +114,53 @@ function vimeo_shortcode( $atts ) {
}
$html = sprintf( '<div class="embed-vimeo" style="text-align:center;"><iframe src="%1$s" width="%2$u" height="%3$u" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>', esc_url( $url ), $width, $height );
-
+
/**
* Filter the Vimeo player HTML.
*
+ * @module shortcodes
+ *
* @since 1.2.3
*
* @param string $html Embedded Vimeo player HTML.
*/
$html = apply_filters( 'video_embed_html', $html );
-
+
return $html;
}
add_shortcode( 'vimeo', 'vimeo_shortcode' );
+/**
+ * Callback to modify output of embedded Vimeo video using Jetpack's shortcode.
+ *
+ * @since 3.9
+ *
+ * @param array $matches Regex partial matches against the URL passed.
+ * @param array $attr Attributes received in embed response
+ * @param array $url Requested URL to be embedded
+ *
+ * @return string Return output of Vimeo shortcode with the proper markup.
+ */
+function wpcom_vimeo_embed_url( $matches, $attr, $url ) {
+ return vimeo_shortcode( array( $url ) );
+}
+
+/**
+ * For bare URLs on their own line of the form
+ * http://vimeo.com/12345
+ *
+ * @since 3.9
+ *
+ * @uses wpcom_vimeo_embed_url
+ */
+function wpcom_vimeo_embed_url_init() {
+ wp_embed_register_handler( 'wpcom_vimeo_embed_url', '#https?://(.+\.)?vimeo\.com/#i', 'wpcom_vimeo_embed_url' );
+}
+
+// Register handler to modify Vimeo embeds using Jetpack's shortcode output.
+add_action( 'init', 'wpcom_vimeo_embed_url_init' );
+
function vimeo_embed_to_shortcode( $content ) {
if ( false === stripos( $content, 'player.vimeo.com/video/' ) )
return $content;
@@ -162,3 +198,45 @@ function vimeo_embed_to_shortcode( $content ) {
}
add_filter( 'pre_kses', 'vimeo_embed_to_shortcode' );
+
+/**
+ * Replaces plain-text links to Vimeo videos with Vimeo embeds.
+ *
+ * @since 3.7.0
+ *
+ * @param string $content HTML content
+ * @return string The content with embeds instead of URLs
+ */
+function vimeo_link( $content ) {
+ return preg_replace_callback( '#https://vimeo.com/\d*#', 'vimeo_link_callback', $content );
+}
+
+/**
+ * Callback function for the regex that replaces Vimeo URLs with Vimeo embeds.
+ *
+ * @since 3.7.0
+ *
+ * @param array $matches An array containing a Vimeo URL.
+ * @return string THe Vimeo HTML embed code.
+ */
+function vimeo_link_callback( $matches ) {
+ // Grab the Vimeo ID from the URL
+ if ( preg_match( '|vimeo\.com/(\d+)/?$|i', $matches[0], $match ) ) {
+ $id = (int) $match[1];
+ }
+
+ // Pass that ID to the Vimeo shortcode function.
+ if ( $id ) {
+ $atts = array( 'id' => $id );
+ }
+ return "\n" . vimeo_shortcode( $atts ) . "\n";
+}
+
+/** This filter is documented in modules/shortcodes/youtube.php */
+if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) {
+ // We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out.
+ if ( ! is_admin() ) {
+ // Higher priority because we need it before auto-link and autop get to it
+ add_filter( 'comment_text', 'vimeo_link', 1 );
+ }
+}
diff --git a/plugins/jetpack/modules/shortcodes/wufoo.php b/plugins/jetpack/modules/shortcodes/wufoo.php
new file mode 100644
index 00000000..fb8cce6d
--- /dev/null
+++ b/plugins/jetpack/modules/shortcodes/wufoo.php
@@ -0,0 +1,81 @@
+<?php
+/*
+Plugin Name: Wufoo Shortcode Plugin
+Description: Enables shortcode to embed Wufoo forms. Usage: [wufoo username="chriscoyier" formhash="x7w3w3" autoresize="true" height="458" header="show" ssl="true"]
+Author: Chris Coyier / Wufoo, evansolomon
+
+Based on http://wordpress.org/extend/plugins/wufoo-shortcode/
+http://wufoo.com/docs/code-manager/wordpress-shortcode-plugin/
+*/
+
+
+function wufoo_shortcode( $atts ) {
+ extract( shortcode_atts( array(
+ 'username' => '',
+ 'formhash' => '',
+ 'autoresize' => true,
+ 'height' => '500',
+ 'header' => 'show',
+ 'ssl' => ''
+ ), $atts ) );
+
+ //Check username and formhash to ensure they only have alphanumeric characters or underscores, and aren't empty
+ if ( !preg_match( "/^[a-zA-Z0-9_]+$/", $username) || !preg_match( "/^[a-zA-Z0-9_]+$/", $formhash ) ) {
+
+ /**
+ * Return an error to the users with instructions if one of these params is invalid
+ * They don't have default values because they are user/form-specific
+ */
+ $return_error = sprintf( __( 'Something is wrong with your Wufoo shortcode. If you copy and paste it from the %sWufoo Code Manager%s, you should be golden.', 'jetpack' ), "<a href='http://wufoo.com/docs/code-manager/'>", "</a>" );
+
+ return "
+ <div style='border: 20px solid red; border-radius: 40px; padding: 40px; margin: 50px 0 70px;'>
+ <h3>Uh oh!</h3>
+ <p style='margin: 0;'>$return_error</p>
+ </div>";
+ }
+
+ /**
+ * Required parameters are present
+ * An error will be returned inside the form if they are invalid
+ */
+
+ $js_embed = '<script type="text/javascript">var host = (("https:" == document.location.protocol) ? "https://secure." : "http://");document.write(unescape("%3Cscript src=\'" + host + "wufoo.com/scripts/embed/form.js\' type=\'text/javascript\'%3E%3C/script%3E"));</script>';
+ $js_embed .= "<script type='text/javascript'>";
+ $js_embed .= "var wufoo_$formhash = new WufooForm();";
+ $js_embed .= "wufoo_$formhash.initialize({";
+ $js_embed .= "'userName':'$username', ";
+ $js_embed .= "'formHash':'$formhash', ";
+ $js_embed .= "'autoResize':".(bool)( $autoresize ).",";
+ $js_embed .= "'height':'". (int) $height ."',";
+ $js_embed .= "'header':'".esc_js( $header )."' ";
+
+ /**
+ * Only output SSL value if passes as param
+ * Lower tier plans don't show this param (don't offer SSL)
+ */
+ $js_embed .= ( $ssl ) ? ",'ssl':".(bool) $ssl : "";
+ $js_embed .= "});";
+ $js_embed .= "wufoo_$formhash.display();";
+ $js_embed .= "</script>";
+
+ /**
+ * iframe embed, loaded inside <noscript> tags
+ */
+ $iframe_embed = '<iframe ';
+ $iframe_embed .= 'height="'. (int) $height .'" ';
+ $iframe_embed .= 'allowTransparency="true" frameborder="0" scrolling="no" style="width:100%;border:none;"';
+ $iframe_embed .= 'src="https://'. $username .'.wufoo.com/embed/'. $formhash .'/">';
+ $iframe_embed .= '<a href="https://'. $username .'.wufoo.com/forms/'. $formhash .'/" ';
+ $iframe_embed .= 'rel="nofollow">Fill out my Wufoo form!</a></iframe>';
+
+ /** This action is already documented in modules/widgets/gravatar-profile.php */
+ do_action( 'jetpack_stats_extra', 'embeds', 'wufoo' );
+
+ /**
+ * Return embed in JS and iframe
+ */
+ return "$js_embed <noscript> $iframe_embed </noscript>";
+}
+
+add_shortcode('wufoo', 'wufoo_shortcode');
diff --git a/plugins/jetpack/modules/shortcodes/youtube.php b/plugins/jetpack/modules/shortcodes/youtube.php
index 0eeed506..601427ba 100644
--- a/plugins/jetpack/modules/shortcodes/youtube.php
+++ b/plugins/jetpack/modules/shortcodes/youtube.php
@@ -69,11 +69,11 @@ function youtube_embed_to_short_code( $content ) {
if ( $width && $height )
$wh = "&w=$width&h=$height";
- $url = esc_url_raw( set_url_scheme( "http://www.youtube.com/watch?v={$match[3]}{$wh}" ) );
+ $url = esc_url_raw( "https://www.youtube.com/watch?v={$match[3]}{$wh}" );
} else {
$match[1] = str_replace( '?', '&', $match[1] );
- $url = esc_url_raw( set_url_scheme( "http://www.youtube.com/watch?v=" . html_entity_decode( $match[1] ) ) );
+ $url = esc_url_raw( "https://www.youtube.com/watch?v=" . html_entity_decode( $match[1] ) );
}
$content = str_replace( $match[0], "[youtube $url]", $content );
@@ -81,6 +81,8 @@ function youtube_embed_to_short_code( $content ) {
/**
* Fires before the YouTube embed is transformed into a shortcode.
*
+ * @module shortcodes
+ *
* @since 1.2.0
*
* @param string youtube Shortcode name.
@@ -210,7 +212,9 @@ function youtube_id( $url ) {
/**
* Filter the YouTube player width.
*
- * @since 1.1
+ * @module shortcodes
+ *
+ * @since 1.1.0
*
* @param int $w Width of the YouTube player in pixels.
*/
@@ -219,7 +223,9 @@ function youtube_id( $url ) {
/**
* Filter the YouTube player height.
*
- * @since 1.1
+ * @module shortcodes
+ *
+ * @since 1.1.0
*
* @param int $h Height of the YouTube player in pixels.
*/
@@ -232,6 +238,12 @@ function youtube_id( $url ) {
$fmt = ( isset( $qargs['fmt'] ) && intval( $qargs['fmt'] ) ) ? '&fmt=' . (int) $qargs['fmt'] : '';
+ if ( ! isset( $qargs['autohide'] ) || ( $qargs['autohide'] < 0 || 2 < $qargs['autohide'] ) ) {
+ $autohide = '&autohide=2';
+ } else {
+ $autohide = '&autohide=' . absint( $qargs['autohide'] );
+ }
+
$start = 0;
if ( isset( $qargs['start'] ) ) {
$start = intval( $qargs['start'] );
@@ -271,6 +283,8 @@ function youtube_id( $url ) {
/**
* Allow YouTube videos to start playing automatically.
*
+ * @module shortcodes
+ *
* @since 2.2.2
*
* @param bool false Enable autoplay for YouTube videos.
@@ -293,12 +307,14 @@ function youtube_id( $url ) {
if ( ( isset( $url['path'] ) && '/videoseries' == $url['path'] ) || isset( $qargs['list'] ) ) {
$html = "<span class='embed-youtube' style='$alignmentcss display: block;'><iframe class='youtube-player' type='text/html' width='$w' height='$h' src='" . esc_url( set_url_scheme( "http://www.youtube.com/embed/videoseries?list=$id&hl=en_US" ) ) . "' frameborder='0' allowfullscreen='true'></iframe></span>";
} else {
- $html = "<span class='embed-youtube' style='$alignmentcss display: block;'><iframe class='youtube-player' type='text/html' width='$w' height='$h' src='" . esc_url( set_url_scheme( "http://www.youtube.com/embed/$id?version=3&rel=$rel&fs=1$fmt&showsearch=$search&showinfo=$info&iv_load_policy=$iv$start$end$hd&wmode=$wmode$theme$autoplay{$cc}{$cc_lang}" ) ) . "' frameborder='0' allowfullscreen='true'></iframe></span>";
+ $html = "<span class='embed-youtube' style='$alignmentcss display: block;'><iframe class='youtube-player' type='text/html' width='$w' height='$h' src='" . esc_url( set_url_scheme( "http://www.youtube.com/embed/$id?version=3&rel=$rel&fs=1$fmt$autohide&showsearch=$search&showinfo=$info&iv_load_policy=$iv$start$end$hd&wmode=$wmode$theme$autoplay{$cc}{$cc_lang}" ) ) . "' frameborder='0' allowfullscreen='true'></iframe></span>";
}
/**
* Filter the YouTube video HTML output.
*
+ * @module shortcodes
+ *
* @since 1.2.3
*
* @param string $html YouTube video HTML output.
@@ -331,7 +347,9 @@ add_action( 'init', 'wpcom_youtube_embed_crazy_url_init' );
/**
* Allow oEmbeds in Jetpack's Comment form.
*
- * @since 2.8
+ * @module shortcodes
+ *
+ * @since 2.8.0
*
* @param int get_option('embed_autourls') Option to automatically embed all plain text URLs.
*/
@@ -342,3 +360,20 @@ if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls'
add_filter( 'comment_text', 'youtube_link', 1 );
}
}
+
+/**
+ * Core changes to do_shortcode (https://core.trac.wordpress.org/changeset/34747) broke "improper" shortcodes
+ * with the format [shortcode=http://url.com].
+ *
+ * This removes the "=" from the shortcode so it can be parsed.
+ *
+ * @see https://github.com/Automattic/jetpack/issues/3121
+ */
+function jetpack_fix_youtube_shortcode_display_filter( $content ) {
+ if ( strpos( $content, '[youtube=' ) !== false ) {
+ $content = preg_replace( '@\[youtube=(.*?)\]@', '[youtube $1]', $content );
+ }
+
+ return $content;
+}
+add_filter( 'the_content', 'jetpack_fix_youtube_shortcode_display_filter', 7 );
diff --git a/plugins/jetpack/modules/shortlinks.php b/plugins/jetpack/modules/shortlinks.php
index 98c4856f..2f277016 100644
--- a/plugins/jetpack/modules/shortlinks.php
+++ b/plugins/jetpack/modules/shortlinks.php
@@ -7,9 +7,10 @@
* Requires Connection: Yes
* Auto Activate: Yes
* Module Tags: Social
+ * Additional Search Queries: shortlinks, wp.me
*/
-add_filter( 'get_shortlink', 'wpme_get_shortlink_handler', 1, 4 );
+add_filter( 'pre_get_shortlink', 'wpme_get_shortlink_handler', 1, 4 );
if ( !function_exists( 'wpme_dec2sixtwo' ) ) {
function wpme_dec2sixtwo( $num ) {
diff --git a/plugins/jetpack/modules/site-icon.php b/plugins/jetpack/modules/site-icon.php
index 37f0ba2f..72cf69f7 100644
--- a/plugins/jetpack/modules/site-icon.php
+++ b/plugins/jetpack/modules/site-icon.php
@@ -8,9 +8,10 @@
* Requires Connection: No
* Auto Activate: No
* Module Tags: Other
+ * Additional Search Queries: favicon, icon, site icon
*/
include dirname( __FILE__ ) . '/site-icon/jetpack-site-icon.php';
include dirname( __FILE__ ) . '/site-icon/site-icon-functions.php';
-Jetpack_Sync::sync_options( __FILE__, 'jetpack_site_icon_url' ); \ No newline at end of file
+Jetpack_Sync::sync_options( __FILE__, 'jetpack_site_icon_url' );
diff --git a/plugins/jetpack/modules/site-icon/jetpack-site-icon.php b/plugins/jetpack/modules/site-icon/jetpack-site-icon.php
index 26fec236..db5626f3 100644
--- a/plugins/jetpack/modules/site-icon/jetpack-site-icon.php
+++ b/plugins/jetpack/modules/site-icon/jetpack-site-icon.php
@@ -68,14 +68,24 @@ class Jetpack_Site_Icon {
add_filter( 'display_media_states', array( $this, 'add_media_state' ) );
add_action( 'admin_init', array( $this, 'admin_init' ) );
add_action( 'admin_init', array( $this, 'delete_site_icon_hook' ) );
- add_action( 'atom_head', array( $this, 'atom_icon' ) );
- add_action( 'rss2_head', array( $this, 'rss2_icon' ) );
add_action( 'admin_print_styles-options-general.php', array( $this, 'add_general_options_styles' ) );
- // Add the favicon to the front end and backend
- add_action( 'wp_head', array( $this, 'site_icon_add_meta' ) );
- add_action( 'admin_head', array( $this, 'site_icon_add_meta' ) );
+ // Add the favicon to the front end and backend if Core's site icon not used.
+ /**
+ * As of WP 4.3 and JP 3.6, both are outputting the same icons so no need to fire these.
+ * This is a temporary solution until Jetpack's module primary function is deprecated.
+ * In the future, Jetpack's can output other sizes using Core's icon.
+ */
+ if ( ( function_exists( 'has_site_icon' ) && ! has_site_icon() ) || ! function_exists( 'has_site_icon' ) ) {
+ add_action( 'wp_head', array( $this, 'site_icon_add_meta' ) );
+ add_action( 'admin_head', array( $this, 'site_icon_add_meta' ) );
+ add_action( 'atom_head', array( $this, 'atom_icon' ) );
+ add_action( 'rss2_head', array( $this, 'rss2_icon' ) );
+ }
+
+ // Check if site icon is available in core, and if so convert Jetpack's to use it.
+ add_action( 'admin_init', array( 'Jetpack', 'jetpack_site_icon_available_in_core' ) );
add_action( 'delete_option', array( 'Jetpack_Site_Icon', 'delete_temp_data' ), 10, 1); // used to clean up after itself.
add_action( 'delete_attachment', array( 'Jetpack_Site_Icon', 'delete_attachment_data' ), 10, 1); // in case user deletes the attachment via
@@ -96,14 +106,18 @@ class Jetpack_Site_Icon {
*
*/
public function site_icon_add_meta() {
- /**
- * Toggles the Favicon meta elements from being loaded.
- *
- * @since 3.2.0
- *
- * @param bool Output Site Icon Meta Elements.
- */
- if ( apply_filters( 'site_icon_has_favicon', false ) ) {
+ if (
+ /**
+ * Toggles the Favicon meta elements from being loaded.
+ *
+ * @module site-icon
+ *
+ * @since 3.2.0
+ *
+ * @param bool Output Site Icon Meta Elements.
+ */
+ apply_filters( 'site_icon_has_favicon', false )
+ ) {
return;
}
@@ -191,9 +205,9 @@ class Jetpack_Site_Icon {
*/
public function upload_balavatar_head() {
- wp_register_script( 'site-icon-crop', plugin_dir_url( __FILE__ ). "js/site-icon-crop.js" , array( 'jquery', 'jcrop' ) , self::$assets_version, false);
+ wp_register_script( 'jetpack-site-icon-crop', plugin_dir_url( __FILE__ ). "js/site-icon-crop.js" , array( 'jquery', 'jcrop' ) , self::$assets_version, false);
if ( isset( $_REQUEST['step'] ) && $_REQUEST['step'] == 2 ) {
- wp_enqueue_script( 'site-icon-crop' );
+ wp_enqueue_script( 'jetpack-site-icon-crop' );
wp_enqueue_style( 'jcrop' );
}
wp_enqueue_style( 'site-icon-admin' );
@@ -363,8 +377,8 @@ class Jetpack_Site_Icon {
$crop_data = get_option( 'site_icon_temp_data' );
$crop_ration = $crop_data['large_image_data'][0] / $crop_data['resized_image_data'][0]; // always bigger then 1
- // lets make sure that the Javascript ia also loaded
- wp_localize_script( 'site-icon-crop', 'Site_Icon_Crop_Data', self::initial_crop_data( $crop_data['large_image_data'][0] , $crop_data['large_image_data'][1], $crop_data['resized_image_data'][0], $crop_data['resized_image_data'][1] ) );
+ // lets make sure that the JavaScript ia also loaded
+ wp_localize_script( 'jetpack-site-icon-crop', 'Site_Icon_Crop_Data', self::initial_crop_data( $crop_data['large_image_data'][0] , $crop_data['large_image_data'][1], $crop_data['resized_image_data'][0], $crop_data['resized_image_data'][1] ) );
?>
<h2 class="site-icon-title"><?php esc_html_e( 'Site Icon', 'jetpack' ); ?> <span class="small"><?php esc_html_e( 'crop the image', 'jetpack' ); ?></span></h2>
@@ -748,6 +762,8 @@ class Jetpack_Site_Icon {
/**
* Filter the different dimensions that a site icon is saved in.
*
+ * @module site-icon
+ *
* @since 3.2.0
*
* @param array $site_icon_sizes Sizes available for the Site Icon. Default is array(256, 128, 80, 64, 32, 16).
diff --git a/plugins/jetpack/modules/site-icon/site-icon-functions.php b/plugins/jetpack/modules/site-icon/site-icon-functions.php
index e20e2f86..7028bf2f 100644
--- a/plugins/jetpack/modules/site-icon/site-icon-functions.php
+++ b/plugins/jetpack/modules/site-icon/site-icon-functions.php
@@ -29,6 +29,8 @@ function jetpack_get_site_icon( $blog_id = null, $size = '512', $default = '', $
/**
* Filters the display options for the Site Icon.
*
+ * @module site-icon
+ *
* @since 3.2.0
*
* @param string $avatar The Site Icon in an html image tag.
diff --git a/plugins/jetpack/modules/site-icon/upload-site-icon.php b/plugins/jetpack/modules/site-icon/upload-site-icon.php
index 4d889309..bef846b0 100644
--- a/plugins/jetpack/modules/site-icon/upload-site-icon.php
+++ b/plugins/jetpack/modules/site-icon/upload-site-icon.php
@@ -1,19 +1,19 @@
-<?php
+<?php
/**
* Uploading a site_icon is a 3 step process
- *
- * 1. Select the file to upload
+ *
+ * 1. Select the file to upload
* 2. Crop the file
- * 3. Confirmation page
+ * 3. Confirmation page
*/
$step = ( isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : 1 );
$nonce = ( isset( $_REQUEST[ '_nonce' ] ) ? $_REQUEST[ '_nonce' ] : false );
if( ! wp_verify_nonce( $nonce , 'update-site_icon-' . $step ) && $step > 1 ) {
-
- echo esc_html__( 'You are not suppoed to be here!', 'jetpack' );
+
+ echo esc_html__( 'You are not supposed to be here!', 'jetpack' );
return;
}
switch( $step ){
@@ -28,4 +28,4 @@ switch( $step ){
case '3':
Jetpack_Site_Icon::all_done_page();
break;
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/sitemaps.php b/plugins/jetpack/modules/sitemaps.php
new file mode 100644
index 00000000..8122b91d
--- /dev/null
+++ b/plugins/jetpack/modules/sitemaps.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Module Name: Sitemaps
+ * Module Description: Creates sitemaps to allow your site to be easily indexed by search engines.
+ * Sort Order: 13
+ * First Introduced: 3.9
+ * Requires Connection: No
+ * Auto Activate: Public
+ * Module Tags: Recommended, Traffic
+ * Additional Search Queries: sitemap, traffic, search, site map, seo
+ */
+
+/**
+ * Check site privacy before activating sitemaps.
+ *
+ * @module sitemaps
+ */
+function jetpack_sitemaps_activate() {
+ Jetpack::check_privacy( __FILE__ );
+}
+
+add_action( 'jetpack_activate_module_sitemaps', 'jetpack_sitemaps_activate' );
+
+if ( '1' == get_option( 'blog_public' ) ) {
+ include_once 'sitemaps/sitemaps.php';
+} \ No newline at end of file
diff --git a/plugins/jetpack/modules/sitemaps/sitemap-xsl.php b/plugins/jetpack/modules/sitemaps/sitemap-xsl.php
new file mode 100644
index 00000000..427d64a5
--- /dev/null
+++ b/plugins/jetpack/modules/sitemaps/sitemap-xsl.php
@@ -0,0 +1,147 @@
+<?php
+/**
+ * XSLT for XML sitemap
+ *
+ * @module sitemaps
+ */
+
+$xsl = '<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="2.0"
+ xmlns:html="http://www.w3.org/TR/REC-html40"
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
+ xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>' . esc_html__( 'XML Sitemap', 'jetpack' ) . '</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <style type="text/css">
+ body {
+ font: 14px "Open Sans", Helvetica, Arial, sans-serif;
+ margin: 0;
+ }
+
+ a {
+ color: #3498db;
+ text-decoration: none;
+ }
+
+ h1 {
+ margin: 0;
+ }
+
+ #description {
+ background-color: #81a844;
+ color: #FFF;
+ padding: 30px 30px 20px;
+ }
+
+ #description a {
+ color: #fff;
+ }
+
+ #content {
+ padding: 10px 30px 30px;
+ background: #fff;
+ }
+
+ a:hover {
+ border-bottom: 1px solid;
+ }
+
+ th, td {
+ font-size: 12px;
+ }
+
+ th {
+ text-align: left;
+ border-bottom: 1px solid #ccc;
+ }
+
+ th, td {
+ padding: 10px 15px;
+ }
+
+ .odd {
+ background-color: #E7F1D4;
+ }
+
+ #footer {
+ margin: 20px 30px;
+ font-size: 12px;
+ color: #999;
+ }
+
+ #footer a {
+ color: inherit;
+ }
+
+ #description a, #footer a {
+ border-bottom: 1px solid;
+ }
+ #description a:hover, #footer a:hover {
+ border-bottom: none;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="description">
+ <h1>' . esc_html__( 'XML Sitemap', 'jetpack' ) . '</h1>
+ <p>' . wp_kses( sprintf( __( 'This is an XML Sitemap generated by <a href="%s">Jetpack</a>, meant to be consumed by search engines like <a href="%s">Google</a> or <a href="%s">Bing</a>.', 'jetpack' ), 'http://jetpack.me/', 'https://www.google.com', 'https://www.bing.com/' ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) . '</p>
+ <p>' . wp_kses( sprintf( __( 'You can find more information on XML sitemaps at <a href="%s">sitemaps.org</a>', 'jetpack' ), 'http://sitemaps.org' ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) . '</p>
+ </div>
+ <div id="content">
+ <table>
+ <tr>
+ <th>' . esc_html__( 'URL', 'jetpack' ) . '</th>
+ <th>' . esc_html__( 'Featured Image', 'jetpack' ) . '</th>';
+if ( empty( $type ) ) :
+$xsl .= ' <th>' . esc_html__( 'Change Frequency', 'jetpack' ) . '</th>
+ <th>' . esc_html__( 'Last Updated', 'jetpack' ) . '</th>';
+endif;
+$xsl .= ' </tr>
+ <xsl:variable name="lower" select="\'abcdefghijklmnopqrstuvwxyz\'"/>
+ <xsl:variable name="upper" select="\'ABCDEFGHIJKLMNOPQRSTUVWXYZ\'"/>
+ <xsl:for-each select="sitemap:urlset/sitemap:url">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="position() mod 2 != 1">
+ <xsl:attribute name="class">odd</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ <td>
+ <xsl:variable name="itemURL">
+ <xsl:value-of select="sitemap:loc"/>
+ </xsl:variable>
+ <a href="{$itemURL}">
+ <xsl:value-of select="sitemap:loc"/>
+ </a>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="count(image:image) > 0">' . esc_html__( 'Yes', 'jetpack' ) . '</xsl:when>
+ <xsl:otherwise>' . esc_html__( 'No', 'jetpack' ) . '</xsl:otherwise>
+ </xsl:choose>
+ </td>';
+if ( empty( $type ) ) :
+$xsl .= ' <td>
+ <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/>
+ </td>
+ <td>
+ <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(\' \', substring(sitemap:lastmod,12,5)))"/>
+ </td>';
+endif;
+$xsl .= ' </tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ <div id="footer">
+ <p>' . wp_kses( sprintf( __( '<em>Generated</em> by <a href="%s">Jetpack for WordPress</a>', 'jetpack' ), 'https://jetpack.me' ), array( 'a' => array( 'href' => true, 'title' => true ) ) ) . '</p>
+ </div>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>'; \ No newline at end of file
diff --git a/plugins/jetpack/modules/sitemaps/sitemaps.php b/plugins/jetpack/modules/sitemaps/sitemaps.php
new file mode 100644
index 00000000..74b97409
--- /dev/null
+++ b/plugins/jetpack/modules/sitemaps/sitemaps.php
@@ -0,0 +1,751 @@
+<?php
+/**
+ * Generate sitemap files in base XML as well as popular namespace extensions.
+ *
+ * @author Automattic
+ * @link http://sitemaps.org/protocol.php Base sitemaps protocol.
+ * @link http://www.google.com/support/webmasters/bin/answer.py?answer=74288 Google news sitemaps.
+ */
+
+
+/**
+ * Convert a MySQL datetime string to an ISO 8601 string.
+ *
+ * @module sitemaps
+ *
+ * @link http://www.w3.org/TR/NOTE-datetime W3C date and time formats document.
+ *
+ * @param string $mysql_date UTC datetime in MySQL syntax of YYYY-MM-DD HH:MM:SS.
+ *
+ * @return string ISO 8601 UTC datetime string formatted as YYYY-MM-DDThh:mm:ssTZD where timezone offset is always +00:00.
+ */
+function jetpack_w3cdate_from_mysql( $mysql_date ) {
+ return str_replace( ' ', 'T', $mysql_date ) . '+00:00';
+}
+
+/**
+ * Get the maximum comment_date_gmt value for approved comments for the given post_id.
+ *
+ * @module sitemaps
+ *
+ * @param int $post_id Post identifier.
+ *
+ * @return string datetime MySQL value or null if no comment found.
+ */
+function jetpack_get_approved_comments_max_datetime( $post_id ) {
+ global $wpdb;
+
+ return $wpdb->get_var( $wpdb->prepare( "SELECT MAX(comment_date_gmt) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND comment_type=''", $post_id ) );
+}
+
+/**
+ * Return the content type used to serve a Sitemap XML file.
+ * Uses text/xml by default, possibly overridden by jetpack_sitemap_content_type filter.
+ *
+ * @module sitemaps
+ *
+ * @return string Internet media type for the sitemap XML.
+ */
+function jetpack_sitemap_content_type() {
+ /**
+ * Filter the content type used to serve the XML sitemap file.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param string $content_type By default, it's 'text/xml'.
+ */
+ return apply_filters( 'jetpack_sitemap_content_type', 'text/xml' );
+}
+
+/**
+ * Write an XML tag.
+ *
+ * @module sitemaps
+ *
+ * @param array $data Information to write an XML tag.
+ */
+function jetpack_print_sitemap_item( $data ) {
+ jetpack_print_xml_tag( array( 'url' => $data ) );
+}
+
+/**
+ * Write an opening tag and its matching closing tag.
+ *
+ * @module sitemaps
+ *
+ * @param array $array Information to write a tag, opening and closing it.
+ */
+function jetpack_print_xml_tag( $array ) {
+ foreach ( $array as $key => $value ) {
+ if ( is_array( $value ) ) {
+ echo "<$key>";
+ jetpack_print_xml_tag( $value );
+ echo "</$key>";
+ } else {
+ echo "<$key>" . esc_html( $value ) . "</$key>";
+ }
+ }
+}
+
+/**
+ * Convert an array to a SimpleXML child of the passed tree.
+ *
+ * @module sitemaps
+ *
+ * @param array $data array containing element value pairs, including other arrays, for XML contruction.
+ * @param SimpleXMLElement $tree A SimpleXMLElement class object used to attach new children.
+ *
+ * @return SimpleXMLElement full tree with new children mapped from array.
+ */
+function jetpack_sitemap_array_to_simplexml( $data, &$tree ) {
+ $doc_namespaces = $tree->getDocNamespaces();
+
+ foreach ( $data as $key => $value ) {
+ // Allow namespaced keys by use of colon in $key, namespaces must be part of the document
+ $namespace = null;
+ if ( false !== strpos( $key, ':' ) ) {
+ list( $namespace_prefix, $key ) = explode( ':', $key );
+ if ( isset( $doc_namespaces[ $namespace_prefix ] ) ) {
+ $namespace = $doc_namespaces[ $namespace_prefix ];
+ }
+ }
+
+ if ( is_array( $value ) ) {
+ $child = $tree->addChild( $key, null, $namespace );
+ jetpack_sitemap_array_to_simplexml( $value, $child );
+ } else {
+ $tree->addChild( $key, esc_html( $value ), $namespace );
+ }
+ }
+
+ return $tree;
+}
+
+/**
+ * Define an array of attribute value pairs for use inside the root element of an XML document.
+ * Intended for mapping namespace and namespace URI values.
+ * Passes array through jetpack_sitemap_ns for other functions to add their own namespaces.
+ *
+ * @module sitemaps
+ *
+ * @return array array of attribute value pairs passed through the jetpack_sitemap_ns filter
+ */
+function jetpack_sitemap_namespaces() {
+ /**
+ * Filter the attribute value pairs used for namespace and namespace URI mappings.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param array $namespaces Associative array with namespaces and namespace URIs.
+ */
+ return apply_filters( 'jetpack_sitemap_ns', array(
+ 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
+ 'xsi:schemaLocation' => 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd',
+ 'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9',
+ // Mobile namespace from http://support.google.com/webmasters/bin/answer.py?hl=en&answer=34648
+ 'xmlns:mobile' => 'http://www.google.com/schemas/sitemap-mobile/1.0',
+ 'xmlns:image' => 'http://www.google.com/schemas/sitemap-image/1.1',
+ ) );
+}
+
+/**
+ * Start sitemap XML document, writing its heading and <urlset> tag with namespaces.
+ *
+ * @module sitemaps
+ *
+ * @param $charset string Charset for current XML document.
+ *
+ * @return string
+ */
+function jetpack_sitemap_initstr( $charset ) {
+ // URL to XSLT
+ $xsl = get_option( 'permalink_structure' ) ? home_url( '/sitemap.xsl' ) : home_url( '/?jetpack-sitemap-xsl=true' );
+
+ $initstr = '<?xml version="1.0" encoding="' . $charset . '"?>' . "\n";
+ $initstr .= '<?xml-stylesheet type="text/xsl" href="' . esc_url( $xsl ) . '"?>' . "\n";
+ $initstr .= '<!-- generator="jetpack-' . JETPACK__VERSION . '" -->' . "\n";
+ $initstr .= '<urlset';
+ foreach ( jetpack_sitemap_namespaces() as $attribute => $value ) {
+ $initstr .= ' ' . esc_html( $attribute ) . '="' . esc_attr( $value ) . '"';
+ }
+ $initstr .= ' />';
+
+ return $initstr;
+}
+
+/**
+ * Load XSLT for sitemap.
+ *
+ * @module sitemaps
+ *
+ * @param string $type XSLT to load.
+ */
+function jetpack_load_xsl( $type = '' ) {
+
+ $transient_xsl = empty( $type ) ? 'jetpack_sitemap_xsl' : "jetpack_{$type}_sitemap_xsl";
+
+ $xsl = get_transient( $transient_xsl );
+
+ if ( $xsl ) {
+ header( 'Content-Type: ' . jetpack_sitemap_content_type(), true );
+ echo $xsl;
+ die();
+ }
+
+ // Populate $xsl. Use $type.
+ include_once JETPACK__PLUGIN_DIR . 'modules/sitemaps/sitemap-xsl.php';
+
+ if ( ! empty( $xsl ) ) {
+ set_transient( $transient_xsl, $xsl, DAY_IN_SECONDS );
+ echo $xsl;
+ }
+
+ die();
+}
+
+/**
+ * Responds with an XSLT to stylize sitemap.
+ *
+ * @module sitemaps
+ */
+function jetpack_print_sitemap_xsl() {
+ jetpack_load_xsl();
+}
+
+/**
+ * Responds with an XSLT to stylize news sitemap.
+ *
+ * @module sitemaps
+ */
+function jetpack_print_news_sitemap_xsl() {
+ jetpack_load_xsl( 'news' );
+}
+
+/**
+ * Print an XML sitemap conforming to the Sitemaps.org protocol.
+ * Outputs an XML list of up to the latest 1000 posts.
+ *
+ * @module sitemaps
+ *
+ * @link http://sitemaps.org/protocol.php Sitemaps.org protocol.
+ */
+function jetpack_print_sitemap() {
+ global $wpdb;
+
+ $xml = get_transient( 'jetpack_sitemap' );
+
+ if ( $xml ) {
+ header( 'Content-Type: ' . jetpack_sitemap_content_type(), true );
+ echo $xml;
+ die();
+ }
+
+ // Compatibility with PHP 5.3 and older
+ if ( ! defined( 'ENT_XML1' ) ) {
+ define( 'ENT_XML1', 16 );
+ }
+
+ /**
+ * Filter the post types that will be included in sitemap.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param array $post_types Array of post types.
+ */
+ $post_types = apply_filters( 'jetpack_sitemap_post_types', array( 'post', 'page' ) );
+
+ $post_types_in = array();
+ foreach ( (array) $post_types as $post_type ) {
+ $post_types_in[] = $wpdb->prepare( '%s', $post_type );
+ }
+ $post_types_in = join( ",", $post_types_in );
+
+ // use direct query instead because get_posts was acting too heavy for our needs
+ //$posts = get_posts( array( 'numberposts'=>1000, 'post_type'=>$post_types, 'post_status'=>'published' ) );
+ $posts = $wpdb->get_results( "SELECT ID, post_type, post_modified_gmt, comment_count FROM $wpdb->posts WHERE post_status='publish' AND post_type IN ({$post_types_in}) ORDER BY post_modified_gmt DESC LIMIT 1000" );
+ if ( empty( $posts ) ) {
+ status_header( 404 );
+ }
+ header( 'Content-Type: ' . jetpack_sitemap_content_type() );
+ $initstr = jetpack_sitemap_initstr( get_bloginfo( 'charset' ) );
+ $tree = simplexml_load_string( $initstr );
+ // If we did not get a valid string, force UTF-8 and try again.
+ if ( false === $tree ) {
+ $initstr = jetpack_sitemap_initstr( 'UTF-8' );
+ $tree = simplexml_load_string( $initstr );
+ }
+
+ // Acquire necessary attachment data for all of the posts in a performant manner
+ $attachment_parents = wp_list_pluck( $posts, 'ID' );
+ $post_attachments = array();
+ while ( $sub_posts = array_splice( $attachment_parents, 0, 100 ) ) {
+ $post_parents = implode( ',', array_map( 'intval', $sub_posts ) );
+
+ // Get the attachment IDs for all posts. We need to see how many
+ // attachments each post parent has and limit it to 5.
+ $query = "SELECT ID, post_parent FROM {$wpdb->posts} WHERE post_parent IN ({$post_parents}) AND post_type='attachment' AND ( post_mime_type='image/jpeg' OR post_mime_type='image/png' ) LIMIT 0,1000;";
+ $all_attachments = $wpdb->get_results( $query );
+ $selected_attachments = array();
+ $attachment_count = array();
+
+ foreach ( $all_attachments as $attachment ) {
+ if ( ! isset( $attachment_count[ $attachment->post_parent ] ) ) {
+ $attachment_count[ $attachment->post_parent ] = 0;
+ }
+
+ // Skip this particular attachment if we already have 5 for the post
+ if ( $attachment_count[ $attachment->post_parent ] >= 5 ) {
+ continue;
+ }
+
+ $selected_attachments[] = $attachment->ID;
+ $attachment_count[ $attachment->post_parent ] ++;
+ }
+
+ // bail if there weren't any attachments to avoid an extra query
+ if ( empty( $selected_attachments ) ) {
+ continue;
+ }
+
+ // Get more of the attachment object for the attachments we actually care about
+ $attachment_ids = implode( ',', array_map( 'intval', $selected_attachments ) );
+ $query = "SELECT p.ID, p.post_parent, p.post_title, p.post_excerpt, p.guid FROM {$wpdb->posts} as p WHERE p.ID IN ({$attachment_ids}) AND p.post_type='attachment' AND ( p.post_mime_type='image/jpeg' OR p.post_mime_type='image/png' ) LIMIT 500;";
+ $attachments = $wpdb->get_results( $query );
+ $post_attachments = array_merge( $post_attachments, $attachments );
+ }
+
+ unset( $initstr );
+ $latest_mod = '';
+ foreach ( $posts as $post ) {
+
+ /**
+ * Filter condition to allow skipping specific posts in sitemap.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param bool $skip Current boolean. False by default, so no post is skipped.
+ * @param WP_POST $post Current post object.
+ */
+ if ( apply_filters( 'jetpack_sitemap_skip_post', false, $post ) ) {
+ continue;
+ }
+
+ $post_latest_mod = null;
+ $url = array( 'loc' => esc_url( get_permalink( $post->ID ) ) );
+
+ // If this post is configured to be the site home, skip since it's added separately later
+ if ( untrailingslashit( get_permalink( $post->ID ) ) == untrailingslashit( get_option( 'home' ) ) ) {
+ continue;
+ }
+
+ // Mobile node specified in http://support.google.com/webmasters/bin/answer.py?hl=en&answer=34648
+ $url['mobile:mobile'] = '';
+
+ // Image node specified in http://support.google.com/webmasters/bin/answer.py?hl=en&answer=178636
+ // These attachments were produced with batch SQL earlier in the script
+ if ( ! post_password_required( $post->ID ) && $attachments = wp_filter_object_list( $post_attachments, array( 'post_parent' => $post->ID ) ) ) {
+
+ $url['image:image'] = array();
+
+ foreach ( $attachments as $attachment ) {
+ $attachment_url = wp_get_attachment_url( $attachment->ID );
+
+ if ( $attachment_url ) {
+ $url['image:image']['loc'] = esc_url( $attachment_url );
+ }
+
+ // Only include title if not empty.
+ /** This filter is documented in wp-includes/feed.php */
+ if ( $attachment_title = apply_filters( 'the_title_rss', $attachment->post_title ) ) {
+ $url['image:image']['title'] = html_entity_decode( esc_html( $attachment_title ), ENT_XML1 );
+ }
+
+ // Only include caption if not empty.
+ /** This filter is documented in wp-includes/feed.php */
+ if ( $attachment_caption = apply_filters( 'the_excerpt_rss', $attachment->post_excerpt ) ) {
+ $url['image:image']['caption'] = html_entity_decode( esc_html( $attachment_caption ), ENT_XML1 );
+ }
+ }
+ }
+
+ if ( $post->post_modified_gmt && $post->post_modified_gmt != '0000-00-00 00:00:00' ) {
+ $post_latest_mod = $post->post_modified_gmt;
+ }
+ if ( $post->comment_count > 0 ) {
+ // last modified based on last comment
+ $latest_comment_datetime = jetpack_get_approved_comments_max_datetime( $post->ID );
+ if ( ! empty( $latest_comment_datetime ) ) {
+ if ( is_null( $post_latest_mod ) || $latest_comment_datetime > $post_latest_mod ) {
+ $post_latest_mod = $latest_comment_datetime;
+ }
+ }
+ unset( $latest_comment_datetime );
+ }
+ if ( ! empty( $post_latest_mod ) ) {
+ $latest_mod = max( $latest_mod, $post_latest_mod );
+ $url['lastmod'] = jetpack_w3cdate_from_mysql( $post_latest_mod );
+ }
+ unset( $post_latest_mod );
+ if ( $post->post_type == 'page' ) {
+ $url['changefreq'] = 'weekly';
+ $url['priority'] = '0.6'; // set page priority above default priority of 0.5
+ } else {
+ $url['changefreq'] = 'monthly';
+ }
+ /**
+ * Filter associative array with data to build <url> node and its descendants for current post.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param array $url Data to build parent and children nodes for current post.
+ * @param int $post_id Current post ID.
+ */
+ $url_node = apply_filters( 'jetpack_sitemap_url', $url, $post->ID );
+ jetpack_sitemap_array_to_simplexml( array( 'url' => $url_node ), $tree );
+ unset( $url );
+ }
+ $blog_home = array(
+ 'loc' => esc_url( get_option( 'home' ) ),
+ 'changefreq' => 'daily',
+ 'priority' => '1.0'
+ );
+ if ( ! empty( $latest_mod ) ) {
+ $blog_home['lastmod'] = jetpack_w3cdate_from_mysql( $latest_mod );
+ header( 'Last-Modified:' . mysql2date( 'D, d M Y H:i:s', $latest_mod, 0 ) . ' GMT' );
+ }
+ /**
+ * Filter associative array with data to build <url> node and its descendants for site home.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param array $blog_home Data to build parent and children nodes for site home.
+ */
+ $url_node = apply_filters( 'jetpack_sitemap_url_home', $blog_home );
+ jetpack_sitemap_array_to_simplexml( array( 'url' => $url_node ), $tree );
+ unset( $blog_home );
+
+ /**
+ * Filter data before rendering it as XML.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param SimpleXMLElement $tree Data tree for sitemap.
+ * @param string $latest_mod Date of last modification.
+ */
+ $tree = apply_filters( 'jetpack_print_sitemap', $tree, $latest_mod );
+
+ $xml = $tree->asXML();
+ unset( $tree );
+ if ( ! empty( $xml ) ) {
+ set_transient( 'jetpack_sitemap', $xml, DAY_IN_SECONDS );
+ echo $xml;
+ }
+
+ die();
+}
+
+/**
+ * Prints the news XML sitemap conforming to the Sitemaps.org protocol.
+ * Outputs an XML list of up to 1000 posts published in the last 2 days.
+ *
+ * @module sitemaps
+ *
+ * @link http://sitemaps.org/protocol.php Sitemaps.org protocol.
+ */
+function jetpack_print_news_sitemap() {
+
+ $xml = get_transient( 'jetpack_news_sitemap' );
+
+ if ( $xml ) {
+ header( 'Content-Type: application/xml' );
+ echo $xml;
+ die();
+ }
+
+ global $wpdb;
+
+ /**
+ * Filter post types to be included in news sitemap.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param array $post_types Array with post types to include in news sitemap.
+ */
+ $post_types = apply_filters( 'jetpack_sitemap_news_sitemap_post_types', array( 'post' ) );
+ if ( empty( $post_types ) ) {
+ return;
+ }
+
+ $post_types_in = array();
+ foreach ( $post_types as $post_type ) {
+ $post_types_in[] = $wpdb->prepare( '%s', $post_type );
+ }
+ $post_types_in_string = implode( ', ', $post_types_in );
+
+ /**
+ * Filter limit of entries to include in news sitemap.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param int $count Number of entries to include in news sitemap.
+ */
+ $limit = apply_filters( 'jetpack_sitemap_news_sitemap_count', 1000 );
+ $cur_datetime = current_time( 'mysql', true );
+
+ $query = $wpdb->prepare( "
+ SELECT p.ID, p.post_title, p.post_type, p.post_date, p.post_name, p.post_date_gmt, GROUP_CONCAT(t.name SEPARATOR ', ') AS keywords
+ FROM
+ $wpdb->posts AS p LEFT JOIN $wpdb->term_relationships AS r ON p.ID = r.object_id
+ LEFT JOIN $wpdb->term_taxonomy AS tt ON r.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'post_tag'
+ LEFT JOIN $wpdb->terms AS t ON tt.term_id = t.term_id
+ WHERE
+ post_status='publish' AND post_type IN ( {$post_types_in_string} ) AND post_date_gmt > (%s - INTERVAL 2 DAY)
+ GROUP BY p.ID
+ ORDER BY p.post_date_gmt DESC LIMIT %d", $cur_datetime, $limit );
+
+ // URL to XSLT
+ $xsl = get_option( 'permalink_structure' ) ? home_url( 'news-sitemap.xsl' ) : home_url( '/?jetpack-news-sitemap-xsl=true' );
+
+ header( 'Content-Type: application/xml' );
+ ob_start();
+ echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
+ echo '<?xml-stylesheet type="text/xsl" href="' . esc_url( $xsl ) . '"?>' . "\n";
+ echo '<!-- generator="jetpack-' . JETPACK__VERSION . '" -->' . "\n";
+ ?>
+ <!-- generator="jetpack" -->
+ <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
+ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
+ xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
+ >
+ <?php
+ $posts = $wpdb->get_results( $query );
+ foreach ( $posts as $post ):
+
+ /**
+ * Filter condition to allow skipping specific posts in news sitemap.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param bool $skip Current boolean. False by default, so no post is skipped.
+ * @param WP_POST $post Current post object.
+ */
+ if ( apply_filters( 'jetpack_sitemap_news_skip_post', false, $post ) ) {
+ continue;
+ }
+
+ $GLOBALS['post'] = $post;
+ $url = array();
+ $url['loc'] = get_permalink( $post->ID );
+ $news = array();
+ $news['news:publication']['news:name'] = get_bloginfo_rss( 'name' );
+ if ( function_exists( 'get_blog_lang_code' ) ) {
+ $news['news:publication']['news:language'] = get_blog_lang_code();
+ }
+ $news['news:publication_date'] = jetpack_w3cdate_from_mysql( $post->post_date_gmt );
+ $news['news:title'] = get_the_title_rss();
+ if ( $post->keywords ) {
+ $news['news:keywords'] = html_entity_decode( ent2ncr( $post->keywords ), ENT_HTML5 );
+ }
+ $url['news:news'] = $news;
+
+ // Add image to sitemap
+ $post_thumbnail = Jetpack_PostImages::get_image( $post->ID );
+ if ( isset( $post_thumbnail['src'] ) ) {
+ $url['image:image'] = array( 'image:loc' => esc_url( $post_thumbnail['src'] ) );
+ }
+
+ /**
+ * Filter associative array with data to build <url> node and its descendants for current post in news sitemap.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param array $url Data to build parent and children nodes for current post.
+ * @param int $post_id Current post ID.
+ */
+ $url = apply_filters( 'jetpack_sitemap_news_sitemap_item', $url, $post );
+
+ if ( empty( $url ) ) {
+ continue;
+ }
+
+ jetpack_print_sitemap_item( $url );
+ endforeach;
+ ?>
+ </urlset>
+ <?php
+ $xml = ob_get_contents();
+ ob_end_clean();
+ if ( ! empty( $xml ) ) {
+ set_transient( 'jetpack_news_sitemap', $xml, DAY_IN_SECONDS );
+ echo $xml;
+ }
+
+ die();
+}
+
+/**
+ * Absolute URL of the current blog's sitemap.
+ *
+ * @module sitemaps
+ *
+ * @return string Sitemap URL.
+ */
+function jetpack_sitemap_uri() {
+ if ( get_option( 'permalink_structure' ) ) {
+ $sitemap_url = home_url( '/sitemap.xml' );
+ } else {
+ $sitemap_url = home_url( '/?jetpack-sitemap=true' );
+ }
+ /**
+ * Filter sitemap URL relative to home URL.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param string $sitemap_url Sitemap URL.
+ */
+ return apply_filters( 'jetpack_sitemap_location', $sitemap_url );
+}
+
+/**
+ * Absolute URL of the current blog's news sitemap.
+ *
+ * @module sitemaps
+ */
+function jetpack_news_sitemap_uri() {
+ if ( get_option( 'permalink_structure' ) ) {
+ $news_sitemap_url = home_url( '/news-sitemap.xml' );
+ } else {
+ $news_sitemap_url = home_url( '/?jetpack-news-sitemap=true' );
+ }
+ /**
+ * Filter news sitemap URL relative to home URL.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param string $news_sitemap_url News sitemap URL.
+ */
+ return apply_filters( 'jetpack_news_sitemap_location', $news_sitemap_url );
+}
+
+/**
+ * Output the default sitemap URL.
+ *
+ * @module sitemaps
+ */
+function jetpack_sitemap_discovery() {
+ echo 'Sitemap: ' . esc_url( jetpack_sitemap_uri() ) . PHP_EOL;
+}
+
+/**
+ * Output the news sitemap URL.
+ *
+ * @module sitemaps
+ */
+function jetpack_news_sitemap_discovery() {
+ echo 'Sitemap: ' . esc_url( jetpack_news_sitemap_uri() ) . PHP_EOL . PHP_EOL;
+}
+
+/**
+ * Clear the sitemap cache when a sitemap action has changed.
+ *
+ * @module sitemaps
+ *
+ * @param int $post_id unique post identifier. not used.
+ */
+function jetpack_sitemap_handle_update( $post_id ) {
+ delete_transient( 'jetpack_sitemap' );
+ delete_transient( 'jetpack_news_sitemap' );
+}
+
+/**
+ * Clear sitemap cache when an entry changes. Make sitemaps discoverable to robots. Render sitemaps.
+ *
+ * @module sitemaps
+ */
+function jetpack_sitemap_initialize() {
+ add_action( 'publish_post', 'jetpack_sitemap_handle_update', 12, 1 );
+ add_action( 'publish_page', 'jetpack_sitemap_handle_update', 12, 1 );
+ add_action( 'trash_post', 'jetpack_sitemap_handle_update', 12, 1 );
+ add_action( 'deleted_post', 'jetpack_sitemap_handle_update', 12, 1 );
+
+ /**
+ * Filter whether to make the default sitemap discoverable to robots or not.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param bool $discover_sitemap Make default sitemap discoverable to robots.
+ */
+ $discover_sitemap = apply_filters( 'jetpack_sitemap_generate', true );
+ if ( $discover_sitemap ) {
+ add_action( 'do_robotstxt', 'jetpack_sitemap_discovery', 5, 0 );
+
+ // Sitemap XML
+ if ( preg_match( '#(/sitemap\.xml)$#i', $_SERVER['REQUEST_URI'] ) || ( isset( $_GET['jetpack-sitemap'] ) && 'true' == $_GET['jetpack-sitemap'] ) ) {
+ // run later so things like custom post types have been registered
+ add_action( 'init', 'jetpack_print_sitemap', 999 );
+ }
+
+ // XSLT for sitemap
+ if ( preg_match( '#(/sitemap\.xsl)$#i', $_SERVER['REQUEST_URI'] ) || ( isset( $_GET['jetpack-sitemap-xsl'] ) && 'true' == $_GET['jetpack-sitemap-xsl'] ) ) {
+ add_action( 'init', 'jetpack_print_sitemap_xsl' );
+ }
+ }
+
+ /**
+ * Filter whether to make the news sitemap discoverable to robots or not.
+ *
+ * @module sitemaps
+ *
+ * @since 3.9.0
+ *
+ * @param bool $discover_news_sitemap Make default news sitemap discoverable to robots.
+ */
+ $discover_news_sitemap = apply_filters( 'jetpack_news_sitemap_generate', true );
+ if ( $discover_news_sitemap ) {
+ add_action( 'do_robotstxt', 'jetpack_news_sitemap_discovery', 5, 0 );
+
+ // News Sitemap XML
+ if ( preg_match( '#(/news-sitemap\.xml)$#i', $_SERVER['REQUEST_URI'] ) || ( isset( $_GET['jetpack-news-sitemap'] ) && 'true' == $_GET['jetpack-news-sitemap'] ) ) {
+ // run later so things like custom post types have been registered
+ add_action( 'init', 'jetpack_print_news_sitemap', 999 );
+ }
+
+ // XSLT for sitemap
+ if ( preg_match( '#(/news-sitemap\.xsl)$#i', $_SERVER['REQUEST_URI'] ) || ( isset( $_GET['jetpack-news-sitemap-xsl'] ) && 'true' == $_GET['jetpack-news-sitemap-xsl'] ) ) {
+ add_action( 'init', 'jetpack_print_news_sitemap_xsl' );
+ }
+ }
+}
+
+// Initialize sitemaps once themes can filter the initialization.
+add_action( 'after_setup_theme', 'jetpack_sitemap_initialize' ); \ No newline at end of file
diff --git a/plugins/jetpack/modules/sso.php b/plugins/jetpack/modules/sso.php
index 25203512..d479d509 100644
--- a/plugins/jetpack/modules/sso.php
+++ b/plugins/jetpack/modules/sso.php
@@ -1,16 +1,17 @@
<?php
/**
- * Module Name: Jetpack Single Sign On
- * Module Description: Allow your users to log in using their WordPress.com accounts.
- * Jumpstart Description: lets you login to all your Jetpack-enabled sites with one click using your WordPress.com account.
+ * Module Name: Single Sign On
+ * Module Description: Secure user authentication.
+ * Jumpstart Description: Lets you log in to all your Jetpack-enabled sites with one click using your WordPress.com account.
* Sort Order: 30
* Recommendation Order: 5
* First Introduced: 2.6
* Requires Connection: Yes
* Auto Activate: No
* Module Tags: Developers
- * Feature: Jumpstart
+ * Feature: Jumpstart, Performance-Security
+ * Additional Search Queries: sso, single sign on, login, log in
*/
class Jetpack_SSO {
@@ -31,7 +32,19 @@ class Jetpack_SSO {
// Adding this action so that on login_init, the action won't be sanitized out of the $action global.
add_action( 'login_form_jetpack-sso', '__return_true' );
- if ( $this->should_hide_login_form() && apply_filters( 'jetpack_sso_display_disclaimer', true ) ) {
+ if (
+ $this->should_hide_login_form() &&
+ /**
+ * Filter the display of the disclaimer message appearing when default WordPress login form is disabled.
+ *
+ * @module sso
+ *
+ * @since 2.8.0
+ *
+ * @param bool true Should the disclaimer be displayed. Default to true.
+ */
+ apply_filters( 'jetpack_sso_display_disclaimer', true )
+ ) {
add_action( 'login_message', array( $this, 'msg_login_by_jetpack' ) );
}
}
@@ -137,13 +150,13 @@ class Jetpack_SSO {
add_settings_section(
'jetpack_sso_settings',
- __( 'Jetpack Single Sign On' , 'jetpack' ),
+ __( 'Single Sign On' , 'jetpack' ),
'__return_false',
'jetpack-sso'
);
/*
- * Settings > General > Jetpack Single Sign On
+ * Settings > General > Single Sign On
* Checkbox for Remove default login form
*/
/* Hide in 2.9
@@ -163,7 +176,7 @@ class Jetpack_SSO {
*/
/*
- * Settings > General > Jetpack Single Sign On
+ * Settings > General > Single Sign On
* Require two step authentication
*/
register_setting(
@@ -182,7 +195,7 @@ class Jetpack_SSO {
/*
- * Settings > General > Jetpack Single Sign On
+ * Settings > General > Single Sign On
*/
register_setting(
'jetpack-sso',
@@ -313,6 +326,15 @@ class Jetpack_SSO {
}
private function bypass_login_forward_wpcom() {
+ /**
+ * Redirect the site's log in form to WordPress.com's log in form.
+ *
+ * @module sso
+ *
+ * @since 3.1.0
+ *
+ * @param bool false Should the site's log in form be automatically forwarded to WordPress.com's log in form.
+ */
return apply_filters( 'jetpack_sso_bypass_login_forward_wpcom', false );
}
@@ -339,6 +361,7 @@ class Jetpack_SSO {
&& $this->bypass_login_forward_wpcom()
) {
add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) );
+ $this->maybe_save_cookie_redirect();
wp_safe_redirect( $this->build_sso_url() );
}
@@ -360,6 +383,10 @@ class Jetpack_SSO {
} elseif ( 'jetpack-sso' === $action ) {
if ( isset( $_GET['result'], $_GET['user_id'], $_GET['sso_nonce'] ) && 'success' == $_GET['result'] ) {
$this->handle_login();
+ wp_enqueue_script( 'jquery' );
+ wp_enqueue_style( 'genericons' );
+ add_action( 'login_footer', array( $this, 'login_form' ) );
+ add_action( 'login_footer', array( $this, 'login_footer' ) );
} else {
if ( Jetpack::check_identity_crisis() ) {
wp_die( __( "Error: This site's Jetpack connection is currently experiencing problems.", 'jetpack' ) );
@@ -407,6 +434,15 @@ class Jetpack_SSO {
* @return bool
**/
private function should_hide_login_form() {
+ /**
+ * Remove the default log in form, only leave the WordPress.com log in button.
+ *
+ * @module sso
+ *
+ * @since 3.1.0
+ *
+ * @param bool get_option( 'jetpack_sso_remove_login_form', false ) Should the default log in form be removed. Default to false.
+ */
return apply_filters( 'jetpack_remove_login_form', get_option( 'jetpack_sso_remove_login_form', false ) );
}
@@ -538,12 +574,31 @@ class Jetpack_SSO {
$user_data = (object) $user_data;
$user = null;
+
+ /**
+ * Fires before Jetpack's SSO modifies the log in form.
+ *
+ * @module sso
+ *
+ * @since 2.6.0
+ *
+ * @param object $user_data User login information.
+ */
do_action( 'jetpack_sso_pre_handle_login', $user_data );
- // Check to see if having two step enable on wpcom is a requirement to login here
+ /**
+ * Is it required to have 2-step authentication enabled on WordPress.com to use SSO?
+ *
+ * @module sso
+ *
+ * @since 2.8.0
+ *
+ * @param bool get_option( 'jetpack_sso_require_two_step' ) Does SSO require 2-step authentication?
+ */
$require_two_step = apply_filters( 'jetpack_sso_require_two_step', get_option( 'jetpack_sso_require_two_step' ) );
if( $require_two_step && 0 == (int) $user_data->two_step_enabled ) {
$this->user_data = $user_data;
+ /** This filter is documented in core/src/wp-includes/pluggable.php */
do_action( 'wp_login_failed', $user_data->login );
add_action( 'login_message', array( $this, 'error_msg_enable_two_step' ) );
return;
@@ -617,6 +672,16 @@ class Jetpack_SSO {
}
}
+ /**
+ * Fires after we got login information from WordPress.com.
+ *
+ * @module sso
+ *
+ * @since 2.6.0
+ *
+ * @param array $user WordPress.com User information.
+ * @param object $user_data User Login information.
+ */
do_action( 'jetpack_sso_handle_login', $user, $user_data );
if ( $user ) {
@@ -629,11 +694,19 @@ class Jetpack_SSO {
// And then purge it
setcookie( 'jetpack_sso_remember_me', ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
}
- // Set remember me value
+ /**
+ * Filter the remember me value.
+ *
+ * @module sso
+ *
+ * @since 2.8.0
+ *
+ * @param bool $remember Is the remember me option checked?
+ */
$remember = apply_filters( 'jetpack_remember_login', $remember );
wp_set_auth_cookie( $user->ID, $remember );
- // Run the WP core login action
+ /** This filter is documented in core/src/wp-includes/user.php */
do_action( 'wp_login', $user->user_login, $user );
$_request_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
@@ -647,11 +720,15 @@ class Jetpack_SSO {
setcookie( 'jetpack_sso_redirect_to', ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
}
- wp_safe_redirect( apply_filters( 'login_redirect', $redirect_to, $_request_redirect_to, $user ) );
+ wp_safe_redirect(
+ /** This filter is documented in core/src/wp-login.php */
+ apply_filters( 'login_redirect', $redirect_to, $_request_redirect_to, $user )
+ );
exit;
}
$this->user_data = $user_data;
+ /** This filter is documented in core/src/wp-includes/pluggable.php */
do_action( 'wp_login_failed', $user_data->login );
add_action( 'login_message', array( $this, 'cant_find_user' ) );
}
@@ -664,11 +741,30 @@ class Jetpack_SSO {
$match_by_email = ( 1 == get_option( 'jetpack_sso_match_by_email', true ) ) ? true: false;
$match_by_email = defined( 'WPCC_MATCH_BY_EMAIL' ) ? WPCC_MATCH_BY_EMAIL : $match_by_email;
+ /**
+ * Link the local account to an account on WordPress.com using the same email address.
+ *
+ * @module sso
+ *
+ * @since 2.6.0
+ *
+ * @param bool $match_by_email Should we link the local account to an account on WordPress.com using the same email address. Default to false.
+ */
return apply_filters( 'jetpack_sso_match_by_email', $match_by_email );
}
static function new_user_override() {
$new_user_override = defined( 'WPCC_NEW_USER_OVERRIDE' ) ? WPCC_NEW_USER_OVERRIDE : false;
+
+ /**
+ * Allow users to register on your site with a WordPress.com account, even though you disallow normal registrations.
+ *
+ * @module sso
+ *
+ * @since 2.6.0
+ *
+ * @param bool $new_user_override Allow users to register on your site with a WordPress.com account. Default to false.
+ */
return apply_filters( 'jetpack_sso_new_user_override', $new_user_override );
}
@@ -759,7 +855,15 @@ class Jetpack_SSO {
return $url;
}
- function get_user_by_wpcom_id( $wpcom_user_id ) {
+ /**
+ * Determines local user associated with a given WordPress.com user ID.
+ *
+ * @since 2.6.0
+ *
+ * @param int $wpcom_user_id User ID from WordPress.com
+ * @return object Local user object if found, null if not.
+ */
+ static function get_user_by_wpcom_id( $wpcom_user_id ) {
$user_query = new WP_User_Query( array(
'meta_key' => 'wpcom_user_id',
'meta_value' => intval( $wpcom_user_id ),
@@ -779,7 +883,7 @@ class Jetpack_SSO {
* @return string
**/
public function error_msg_enable_two_step( $message ) {
- $err = __( sprintf( 'This site requires two step authentication be enabled for your user account on WordPress.com. Please visit the <a href="%1$s"> Security Settings</a> page to enable two step', 'https://wordpress.com/settings/security/' ) , 'jetpack' );
+ $err = __( sprintf( 'This site requires two step authentication be enabled for your user account on WordPress.com. Please visit the <a href="%1$s"> Security Settings</a> page to enable two step', 'https://wordpress.com/me/security/two-step' ) , 'jetpack' );
$message .= sprintf( '<p class="message" id="login_error">%s</p>', $err );
@@ -814,6 +918,15 @@ class Jetpack_SSO {
$msg = __( sprintf( 'Jetpack authenticates through WordPress.com — to log in, enter your WordPress.com username and password, or <a href="%1$s">visit WordPress.com</a> to create a free account now.', 'http://wordpress.com/signup' ) , 'jetpack' );
+ /**
+ * Filter the message displayed when the default WordPress login form is disabled.
+ *
+ * @module sso
+ *
+ * @since 2.8.0
+ *
+ * @param string $msg Disclaimer when default WordPress login form is disabled.
+ */
$msg = apply_filters( 'jetpack_sso_disclaimer_message', $msg );
$message .= sprintf( '<p class="message">%s</p>', $msg );
@@ -890,8 +1003,8 @@ class Jetpack_SSO {
wp_enqueue_style( 'genericons' );
?>
- <h3><?php _e( 'WordPress.com Single Sign On', 'jetpack' ); ?></h3>
- <p><?php _e( 'Connecting with WordPress.com SSO enables you to log in via your WordPress.com account.', 'jetpack' ); ?></p>
+ <h3 id="single-sign-on"><?php _e( 'Single Sign On', 'jetpack' ); ?></h3>
+ <p><?php _e( 'Connecting with Single Sign On enables you to log in via your WordPress.com account.', 'jetpack' ); ?></p>
<?php if ( $this->is_user_connected( $user->ID ) ) : /* If the user is currently connected... */ ?>
<?php $user_data = $this->get_user_data( $user->ID ); ?>
@@ -906,9 +1019,9 @@ class Jetpack_SSO {
<span class="two_step">
<?php
if( $user_data->two_step_enabled ) {
- ?> <p class="enabled"><a href="https://wordpress.com/settings/security/"><?php _e( 'Two step Enabled', 'jetpack' ); ?></a></p> <?php
+ ?> <p class="enabled"><a href="https://wordpress.com/me/security/two-step"><?php _e( 'Two-Step Authentication Enabled', 'jetpack' ); ?></a></p> <?php
} else {
- ?> <p class="disabled"><a href="https://wordpress.com/settings/security/"><?php _e( 'Two step Disabled', 'jetpack' ); ?></a></p> <?php
+ ?> <p class="disabled"><a href="https://wordpress.com/me/security/two-step"><?php _e( 'Two-Step Authentication Disabled', 'jetpack' ); ?></a></p> <?php
}
?>
</span>
@@ -963,13 +1076,14 @@ class Jetpack_SSO {
}
</style>
- <?php elseif ( get_current_user_id() == $user->ID ) : ?>
+ <?php elseif ( get_current_user_id() == $user->ID && Jetpack::is_user_connected( $user->ID ) ) : ?>
<?php echo $this->button( 'state=sso-link-user&_wpnonce=' . wp_create_nonce('sso-link-user') ); // update ?>
<?php else : ?>
- <p><?php _e( 'This profile is not currently linked to a WordPress.com Profile.', 'jetpack' ); ?></p>
+ <p><?php esc_html_e( wptexturize( __( "If you don't have a WordPress.com account yet, you can sign up for free in just a few seconds.", 'jetpack' ) ) ); ?></p>
+ <a href="<?php echo Jetpack::init()->build_connect_url( false, get_edit_profile_url( get_current_user_id() ) . '#single-sign-on' ); ?>" class="button button-connector" id="wpcom-connect"><?php esc_html_e( 'Link account with WordPress.com', 'jetpack' ); ?></a>
<?php endif;
}
diff --git a/plugins/jetpack/modules/stats.php b/plugins/jetpack/modules/stats.php
index f156017f..c80ed09e 100644
--- a/plugins/jetpack/modules/stats.php
+++ b/plugins/jetpack/modules/stats.php
@@ -1,14 +1,15 @@
<?php
/**
- * Module Name: WordPress.com Stats
- * Module Description: Monitor your stats with clear, concise reports and no additional load on your server.
+ * Module Name: Site Stats
+ * Module Description: Collect traffic stats and insights.
* Sort Order: 1
* Recommendation Order: 2
* First Introduced: 1.1
* Requires Connection: Yes
* Auto Activate: Yes
- * Module Tags: WordPress.com Stats, Recommended
- * Feature: Recommended
+ * Module Tags: Site Stats, Recommended
+ * Feature: Recommended, Traffic
+ * Additional Search Queries: statistics, tracking, analytics, views, traffic, stats
*/
if ( defined( 'STATS_VERSION' ) ) {
@@ -66,11 +67,8 @@ function stats_load() {
if ( isset( $_GET['oldwidget'] ) ) {
// Old one.
add_action( 'wp_dashboard_setup', 'stats_register_dashboard_widget' );
- } elseif ( current_user_can( 'view_stats' ) ) {
- // New way.
- add_action( 'load-index.php', 'stats_enqueue_dashboard_head' );
- add_action( 'wp_dashboard_setup', 'stats_register_widget_control_callback' ); // hacky but works
- add_action( 'jetpack_dashboard_widget', 'stats_jetpack_dashboard_widget' );
+ } else {
+ add_action( 'admin_init', 'stats_merged_widget_admin_init' );
}
add_filter( 'jetpack_xmlrpc_methods', 'stats_xmlrpc_methods' );
@@ -79,6 +77,17 @@ function stats_load() {
add_filter( 'pre_option_db_version', 'stats_ignore_db_version' );
}
+/**
+ * Delay conditional for current_user_can to after init.
+ */
+function stats_merged_widget_admin_init() {
+ if ( current_user_can( 'view_stats' ) ) {
+ add_action( 'load-index.php', 'stats_enqueue_dashboard_head' );
+ add_action( 'wp_dashboard_setup', 'stats_register_widget_control_callback' ); // hacky but works
+ add_action( 'jetpack_dashboard_widget', 'stats_jetpack_dashboard_widget' );
+ }
+}
+
function stats_enqueue_dashboard_head() {
add_action( 'admin_head', 'stats_dashboard_head' );
}
@@ -112,7 +121,7 @@ function stats_map_meta_caps( $caps, $cap, $user_id, $args ) {
$stats_roles = stats_get_option( 'roles' );
// Is the users role in the available stats roles?
- if ( in_array( $user_role, $stats_roles ) ) {
+ if ( is_array( $stats_roles ) && in_array( $user_role, $stats_roles ) ) {
$caps = array( 'read' );
}
}
@@ -123,11 +132,9 @@ function stats_map_meta_caps( $caps, $cap, $user_id, $args ) {
function stats_template_redirect() {
global $wp_the_query, $current_user, $stats_footer;
- if ( is_feed() || is_robots() || is_trackback() )
+ if ( is_feed() || is_robots() || is_trackback() || is_preview() )
return;
- $options = stats_get_options();
-
// Should we be counting this user's views?
if ( !empty( $current_user->ID ) ) {
$count_roles = stats_get_option( 'count_roles' );
@@ -253,6 +260,15 @@ function stats_upgrade_options( $options ) {
}
function stats_array( $kvs ) {
+ /**
+ * Filter the options added to the JavaScript Stats tracking code.
+ *
+ * @module stats
+ *
+ * @since 1.1.0
+ *
+ * @param array $kvs Array of options about the site and page you're on.
+ */
$kvs = apply_filters( 'stats_array', $kvs );
$kvs = array_map( 'addslashes', $kvs );
foreach ( $kvs as $k => $v )
@@ -355,6 +371,7 @@ function stats_reports_page() {
return stats_dashboard_widget_content();
$blog_id = stats_get_option( 'blog_id' );
+ $domain = Jetpack::build_raw_urls( get_home_url() );
if ( !isset( $_GET['noheader'] ) && empty( $_GET['nojs'] ) && empty( $_COOKIE['stnojs'] ) ) {
$nojs_url = add_query_arg( 'nojs', '1' );
@@ -363,15 +380,15 @@ function stats_reports_page() {
// No JS fallback message
?>
<div class="wrap">
- <h2><?php esc_html_e( 'Site Stats', 'jetpack'); ?> <a style="font-size:13px;" href="<?php echo esc_url( admin_url('admin.php?page=jetpack&configure=stats') ); ?>"><?php esc_html_e( 'Configure', 'jetpack'); ?></a></h2>
+ <h2><?php esc_html_e( 'Site Stats', 'jetpack'); ?> <?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?><a style="font-size:13px;" href="<?php echo esc_url( admin_url('admin.php?page=jetpack&configure=stats') ); ?>"><?php esc_html_e( 'Configure', 'jetpack'); ?></a><?php endif; ?></h2>
</div>
<div id="stats-loading-wrap" class="wrap">
<p class="hide-if-no-js"><img width="32" height="32" alt="<?php esc_attr_e( 'Loading&hellip;', 'jetpack' ); ?>" src="<?php
/** This filter is documented in modules/shortcodes/audio.php */
echo esc_url( apply_filters( 'jetpack_static_url', "{$http}://en.wordpress.com/i/loading/loading-64.gif" ) ); ?>" /></p>
-<p style="font-size: 11pt; margin: 0;"><a href="https://wordpress.com/stats/<?php echo $blog_id; ?>"><?php esc_html_e( 'View stats on WordPress.com right now', 'jetpack' ); ?></a></p>
-<p class="hide-if-js"><?php esc_html_e( 'Your Site Stats work better with Javascript enabled.', 'jetpack' ); ?><br />
-<a href="<?php echo esc_url( $nojs_url ); ?>"><?php esc_html_e( 'View Site Stats without Javascript', 'jetpack' ); ?></a>.</p>
+<p style="font-size: 11pt; margin: 0;"><a href="https://wordpress.com/stats/<?php echo $domain; ?>"><?php esc_html_e( 'View stats on WordPress.com right now', 'jetpack' ); ?></a></p>
+<p class="hide-if-js"><?php esc_html_e( 'Your Site Stats work better with JavaScript enabled.', 'jetpack' ); ?><br />
+<a href="<?php echo esc_url( $nojs_url ); ?>"><?php esc_html_e( 'View Site Stats without JavaScript', 'jetpack' ); ?></a>.</p>
</div>
<?php
return;
@@ -647,8 +664,6 @@ function stats_admin_bar_head() {
}
function stats_admin_bar_menu( &$wp_admin_bar ) {
- $blog_id = stats_get_option( 'blog_id' );
-
$url = add_query_arg( 'page', 'stats', admin_url( 'admin.php' ) ); // no menu_page_url() blog-side.
$img_src = esc_attr( add_query_arg( array( 'noheader'=>'', 'proxy'=>'', 'chart'=>'admin-bar-hours-scale' ), $url ) );
@@ -814,18 +829,15 @@ function stats_dashboard_widget_control() {
function stats_jetpack_dashboard_widget() {
?>
- <h3>
- <span class="js-toggle-stats_dashboard_widget_control">
- <?php esc_html_e( 'Configure', 'jetpack' ); ?>
- </span>
- <?php esc_html_e( 'Site Stats', 'jetpack' ); ?>
- </h3>
<form id="stats_dashboard_widget_control" action="<?php esc_url( admin_url() ); ?>" method="post">
<?php stats_dashboard_widget_control(); ?>
<?php wp_nonce_field( 'edit-dashboard-widget_dashboard_stats', 'dashboard-widget-nonce' ); ?>
<input type="hidden" name="widget_id" value="dashboard_stats" />
<?php submit_button( __( 'Submit', 'jetpack' ) ); ?>
</form>
+ <span id="js-toggle-stats_dashboard_widget_control">
+ <?php esc_html_e( 'Configure', 'jetpack' ); ?>
+ </span>
<div id="dashboard_stats">
<div class="inside">
<div style="height: 250px;"></div>
@@ -833,16 +845,22 @@ function stats_jetpack_dashboard_widget() {
</div>
<script>
jQuery(document).ready(function($){
- $('.js-toggle-stats_dashboard_widget_control').click(function(e){
+ var $toggle = $('#js-toggle-stats_dashboard_widget_control');
+
+ $toggle.parent().prev().append( $toggle );
+ $toggle.show().click(function(e){
e.preventDefault();
+ e.stopImmediatePropagation();
$(this).parent().toggleClass('controlVisible');
$('#stats_dashboard_widget_control').slideToggle();
});
});
</script>
<style>
- .js-toggle-stats_dashboard_widget_control {
+ #js-toggle-stats_dashboard_widget_control {
+ display: none;
float: right;
+ margin-top: 0.2em;
font-weight: 400;
color: #444;
font-size: .8em;
@@ -869,39 +887,36 @@ function stats_jetpack_dashboard_widget() {
function stats_register_widget_control_callback() {
$GLOBALS['wp_dashboard_control_callbacks']['dashboard_stats'] = 'stats_dashboard_widget_control';
}
-// Javascript and CSS for dashboard widget
+// JavaScript and CSS for dashboard widget
function stats_dashboard_head() { ?>
<script type="text/javascript">
/* <![CDATA[ */
-jQuery(window).load( function() {
- jQuery( function($) {
- resizeChart();
- jQuery(window).resize( _.debounce( function(){
- resizeChart();
- }, 100) );
- } );
-
- function resizeChart() {
- var dashStats = jQuery( '#dashboard_stats div.inside' );
+jQuery( function($) {
+ var dashStats = jQuery( '#dashboard_stats div.inside' );
- if ( dashStats.find( '.dashboard-widget-control-form' ).length ) {
- return;
- }
+ if ( dashStats.find( '.dashboard-widget-control-form' ).length ) {
+ return;
+ }
- if ( ! dashStats.length ) {
- dashStats = jQuery( '#dashboard_stats div.dashboard-widget-content' );
- var h = parseInt( dashStats.parent().height() ) - parseInt( dashStats.prev().height() );
- var args = 'width=' + dashStats.width() + '&height=' + h.toString();
+ if ( ! dashStats.length ) {
+ dashStats = jQuery( '#dashboard_stats div.dashboard-widget-content' );
+ var h = parseInt( dashStats.parent().height() ) - parseInt( dashStats.prev().height() );
+ var args = 'width=' + dashStats.width() + '&height=' + h.toString();
+ } else {
+ if ( jQuery('#dashboard_stats' ).hasClass('postbox') ) {
+ var args = 'width=' + ( dashStats.prev().width() * 2 ).toString();
} else {
- if ( jQuery('#dashboard_stats' ).hasClass('postbox') ) {
- var args = 'width=' + ( dashStats.prev().width() * 2 ).toString();
- } else {
- var args = 'width=' + ( dashStats.width() * 2 ).toString();
- }
+ var args = 'width=' + ( dashStats.width() * 2 ).toString();
}
-
- dashStats.not( '.dashboard-widget-control' ).load( 'admin.php?page=stats&noheader&dashboard&' + args );
}
+
+ dashStats
+ .not( '.dashboard-widget-control' )
+ .load( 'admin.php?page=stats&noheader&dashboard&' + args );
+
+ jQuery( window ).one( 'resize', function() {
+ jQuery( '#stat-chart' ).css( 'width', 'auto' );
+ } );
} );
/* ]]> */
</script>
@@ -954,7 +969,7 @@ jQuery(window).load( function() {
#top-search p {
color: #999;
}
-#stats-info h4 {
+#stats-info h3 {
font-size: 1em;
margin: 0 0 .5em 0 !important;
}
@@ -1023,7 +1038,8 @@ function stats_dashboard_widget_content() {
$post_ids = array();
- $csv_args = array( 'top' => '&limit=8', 'search' => '&limit=5' );
+ $csv_end_date = date( 'Y-m-d', current_time( 'timestamp' ) );
+ $csv_args = array( 'top' => "&limit=8&end=$csv_end_date", 'search' => "&limit=5&end=$csv_end_date" );
/* translators: Stats dashboard widget postviews list: "$post_title $views Views" */
$printf = __( '%1$s %2$s Views' , 'jetpack' );
@@ -1050,7 +1066,7 @@ function stats_dashboard_widget_content() {
<div id="stats-info">
<div id="top-posts" class='stats-section'>
<div class="stats-section-inner">
- <h4 class="heading"><?php _e( 'Top Posts' , 'jetpack' ); ?></h4>
+ <h3 class="heading"><?php _e( 'Top Posts' , 'jetpack' ); ?></h3>
<?php
if ( empty( $top_posts ) ) {
?>
@@ -1074,7 +1090,7 @@ function stats_dashboard_widget_content() {
</div>
<div id="top-search" class='stats-section'>
<div class="stats-section-inner">
- <h4 class="heading"><?php _e( 'Top Searches' , 'jetpack' ); ?></h4>
+ <h3 class="heading"><?php _e( 'Top Searches' , 'jetpack' ); ?></h3>
<?php
if ( empty( $searches ) ) {
?>
@@ -1138,6 +1154,35 @@ function stats_print_wp_remote_error( $get, $url ) {
<?php
}
+/**
+ * Get stats from WordPress.com
+ *
+ * @param string $table The stats which you want to retrieve: postviews, or searchterms
+ * @param array $args {
+ * An associative array of arguments.
+ *
+ * @type bool $end The last day of the desired time frame. Format is 'Y-m-d' (e.g. 2007-05-01)
+ * and default timezone is UTC date. Default value is Now.
+ * @type string $days The length of the desired time frame. Default is 30. Maximum 90 days.
+ * @type int $limit The maximum number of records to return. Default is 10. Maximum 100.
+ * @type int $post_id The ID of the post to retrieve stats data for
+ * @type string $summarize If present, summarizes all matching records. Default Null.
+ *
+ * }
+ *
+ * @return array {
+ * An array of post view data, each post as an array
+ *
+ * array {
+ * The post view data for a single post
+ *
+ * @type string $post_id The ID of the post
+ * @type string $post_title The title of the post
+ * @type string $post_permalink The permalink for the post
+ * @type string $views The number of views for the post within the $num_days specified
+ * }
+ * }
+ */
function stats_get_csv( $table, $args = null ) {
$defaults = array( 'end' => false, 'days' => false, 'limit' => 3, 'post_id' => false, 'summarize' => '' );
@@ -1226,3 +1271,71 @@ function stats_str_getcsv( $csv ) {
return $data;
}
+
+/**
+ * Abstract out building the rest api stats path.
+ *
+ * @param string $resource
+ * @return string
+ */
+function jetpack_stats_api_path( $resource = '' ) {
+ $resource = ltrim( $resource, '/' );
+ return sprintf( '/sites/%d/stats/%s', stats_get_option( 'blog_id' ), $resource );
+}
+
+/**
+ * Fetches stats data from the REST API. Caches locally for 5 minutes.
+ *
+ * @link: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/
+ *
+ * @param array|string $args The args that are passed to the endpoint
+ * @param string $resource Optional sub-endpoint following /stats/
+ * @return array|WP_Error
+ */
+function stats_get_from_restapi( $args = array(), $resource = '' ) {
+ $endpoint = jetpack_stats_api_path( $resource );
+ $api_version = '1.1';
+ $args = wp_parse_args( $args, array() );
+ $cache_key = md5( implode( '|', array( $endpoint, $api_version, serialize( $args ) ) ) );
+
+ // Get cache
+ $stats_cache = Jetpack_Options::get_option( 'restapi_stats_cache', array() );
+ if ( ! is_array( $stats_cache ) ) {
+ $stats_cache = array();
+ }
+
+ // Return or expire this key
+ if ( isset( $stats_cache[ $cache_key ] ) ) {
+ $time = key( $stats_cache[ $cache_key ] );
+ if ( time() - $time < ( 5 * MINUTE_IN_SECONDS ) ) {
+ $cached_stats = $stats_cache[ $cache_key ][ $time ];
+ $cached_stats = (object) array_merge( array( 'cached_at' => $time ), (array) $cached_stats );
+ return $cached_stats;
+ }
+ unset( $stats_cache[ $cache_key ] );
+ }
+
+ // Do the dirty work.
+ $response = Jetpack_Client::wpcom_json_api_request_as_blog( $endpoint, $api_version, $args );
+ if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
+ // If bad, just return it, don't cache.
+ return $response;
+ }
+
+ $data = json_decode( wp_remote_retrieve_body( $response ) );
+
+ // Expire old keys
+ foreach ( $stats_cache as $k => $cache ) {
+ if ( ! is_array( $cache ) || ( 5 * MINUTE_IN_SECONDS ) < time() - key( $cache ) ) {
+ unset( $stats_cache[ $k ] );
+ }
+ }
+
+ // Set cache
+ $stats_cache[ $cache_key ] = array(
+ time() => $data,
+ );
+ Jetpack_Options::update_option( 'restapi_stats_cache', $stats_cache, false );
+
+ return $data;
+}
diff --git a/plugins/jetpack/modules/subscriptions.php b/plugins/jetpack/modules/subscriptions.php
index 771bbe11..92bdd667 100644
--- a/plugins/jetpack/modules/subscriptions.php
+++ b/plugins/jetpack/modules/subscriptions.php
@@ -2,7 +2,7 @@
/**
* Module Name: Subscriptions
* Module Description: Allow users to subscribe to your posts and comments and receive notifications via email.
- * Jumpstart Description: give visitors two easy subscription options — while commenting, or via a separate email subscription widget you can display.
+ * Jumpstart Description: Give visitors two easy subscription options — while commenting, or via a separate email subscription widget you can display.
* Sort Order: 9
* Recommendation Order: 8
* First Introduced: 1.2
@@ -10,6 +10,7 @@
* Auto Activate: Yes
* Module Tags: Social
* Feature: Jumpstart
+ * Additional Search Queries: subscriptions, subscription, email, follow, followers, subscribers, signup
*/
add_action( 'jetpack_modules_loaded', 'jetpack_subscriptions_load' );
@@ -43,7 +44,7 @@ function jetpack_subscriptions_configuration_load() {
}
class Jetpack_Subscriptions {
- var $jetpack = false;
+ public $jetpack = false;
public static $hash;
@@ -61,7 +62,7 @@ class Jetpack_Subscriptions {
return $instance;
}
- function Jetpack_Subscriptions() {
+ function __construct() {
$this->jetpack = Jetpack::init();
// Don't use COOKIEHASH as it could be shared across installs && is non-unique in multisite.
@@ -87,6 +88,11 @@ class Jetpack_Subscriptions {
// Catch comment posts and check for subscriptions.
add_action( 'comment_post', array( $this, 'comment_subscribe_submit' ), 50, 2 );
+
+ // Adds post meta checkbox in the post submit metabox
+ add_action( 'post_submitbox_misc_actions', array( $this, 'subscription_post_page_metabox' ) );
+
+ add_action( 'transition_post_status', array( $this, 'maybe_send_subscription_email' ), 10, 3 );
}
function post_is_public( $the_post ) {
@@ -95,6 +101,15 @@ class Jetpack_Subscriptions {
}
if ( 'publish' === $post->post_status && strlen( (string) $post->post_password ) < 1 ) {
+ /**
+ * Filter whether posts can be emailed to subscribers.
+ *
+ * @module subscriptions
+ *
+ * @since 2.4.0
+ *
+ * @param bool true Can the post be emailed to Subscribers. Default to true.
+ */
return apply_filters( 'jetpack_is_post_mailable', true );
}
}
@@ -114,6 +129,111 @@ class Jetpack_Subscriptions {
);
}
+ /*
+ * Disable Subscribe on Single Post
+ * Register post meta
+ */
+ function subscription_post_page_metabox() {
+ if (
+ /**
+ * Filter whether or not to show the per-post subscription option.
+ *
+ * @module subscriptions
+ *
+ * @since 3.7.0
+ *
+ * @param bool true = show checkbox option on all new posts | false = hide the option.
+ */
+ ! apply_filters( 'jetpack_allow_per_post_subscriptions', false ) )
+ {
+ return;
+ }
+
+ if ( has_filter( 'jetpack_subscriptions_exclude_these_categories' ) || has_filter( 'jetpack_subscriptions_include_only_these_categories' ) ) {
+ return;
+ }
+
+ global $post;
+ $disable_subscribe_value = get_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', true );
+ // Nonce it
+ wp_nonce_field( 'disable_subscribe', 'disable_subscribe_nonce' );
+ // only show checkbox if post hasn't been published and is a 'post' post type.
+ if ( get_post_status( $post->ID ) !== 'publish' && get_post_type( $post->ID ) == 'post' ) : ?>
+ <div class="misc-pub-section">
+ <label for="_jetpack_dont_email_post_to_subs"><?php _e( 'Jetpack Subscriptions:', 'jetpack' ); ?></label><br>
+ <input type="checkbox" name="_jetpack_dont_email_post_to_subs" id="jetpack-per-post-subscribe" value="1" <?php checked( $disable_subscribe_value, 1, true ); ?> />
+ <?php _e( 'Don&#8217;t send this to subscribers', 'jetpack' ); ?>
+ </div>
+ <?php endif;
+ }
+
+ /**
+ * Checks whether or not the post should be emailed to subscribers
+ *
+ * It checks for the following things in order:
+ * - Usage of filter jetpack_subscriptions_exclude_these_categories
+ * - Usage of filter jetpack_subscriptions_include_only_these_categories
+ * - Existence of the per-post checkbox option
+ *
+ * Only one of these can be used at any given time.
+ *
+ * @param $new_status string - the "new" post status of the transition when saved
+ * @param $old_status string - the "old" post status of the transition when saved
+ * @param $post obj - The post object
+ */
+ function maybe_send_subscription_email( $new_status, $old_status, $post ) {
+ // Only do things on publish
+ if ( 'publish' !== $new_status ) {
+ return;
+ }
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
+ return;
+ }
+
+ /**
+ * Array of categories that will never trigger subscription emails.
+ *
+ * Will not send subscription emails from any post from within these categories.
+ *
+ * @module subscriptions
+ *
+ * @since 3.7.0
+ *
+ * @param array $args Array of category slugs or ID's.
+ */
+ $excluded_categories = apply_filters( 'jetpack_subscriptions_exclude_these_categories', array() );
+
+ // Never email posts from these categories
+ if ( ! empty( $excluded_categories ) && in_category( $excluded_categories, $post->ID ) ) {
+ update_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', 1 );
+ }
+
+ /**
+ * ONLY send subscription emails for these categories
+ *
+ * Will ONLY send subscription emails to these categories.
+ *
+ * @module subscriptions
+ *
+ * @since 3.7.0
+ *
+ * @param array $args Array of category slugs or ID's.
+ */
+ $only_these_categories = apply_filters( 'jetpack_subscriptions_exclude_all_categories_except', array() );
+
+ // Only emails posts from these categories
+ if ( ! empty( $only_these_categories ) && ! in_category( $only_these_categories, $post->ID ) ) {
+ update_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', 1 );
+ }
+
+ // Email the post, depending on the checkbox option
+ if ( ! empty( $_POST['disable_subscribe_nonce'] ) && wp_verify_nonce( $_POST['disable_subscribe_nonce'], 'disable_subscribe' ) ) {
+ if ( isset( $_POST['_jetpack_dont_email_post_to_subs'] ) ) {
+ update_post_meta( $post->ID, '_jetpack_dont_email_post_to_subs', $_POST['_jetpack_dont_email_post_to_subs'] );
+ }
+ }
+ }
+
/**
* Jetpack_Subscriptions::configure()
*
@@ -426,22 +546,38 @@ class Jetpack_Subscriptions {
}
}
- if ( $error ) {
- switch ( $error ) {
- case 'invalid_email':
- $redirect = add_query_arg( 'subscribe', 'invalid_email' );
- break;
- case 'active': case 'pending':
- $redirect = add_query_arg( 'subscribe', 'already' );
- break;
- default:
- $redirect = add_query_arg( 'subscribe', 'error' );
- break;
- }
- } else {
- $redirect = add_query_arg( 'subscribe', 'success' );
+ switch ( $error ) {
+ case false:
+ $result = 'success';
+ break;
+ case 'invalid_email':
+ $result = $error;
+ break;
+ case 'active':
+ case 'blocked_email':
+ $result = 'opted_out';
+ break;
+ case 'pending':
+ $result = 'already';
+ break;
+ default:
+ $result = 'error';
+ break;
}
+ $redirect = add_query_arg( 'subscribe', $result );
+
+ /**
+ * Fires on each subscription form submission.
+ *
+ * @module subscriptions
+ *
+ * @since 3.7.0
+ *
+ * @param string $result Result of form submission: success, invalid_email, already, error.
+ */
+ do_action( 'jetpack_subscriptions_form_submission', $result );
+
wp_safe_redirect( "$redirect#$redirect_fragment" );
exit;
}
@@ -475,7 +611,18 @@ class Jetpack_Subscriptions {
// Subscribe to comments checkbox
$str .= '<p class="comment-subscription-form"><input type="checkbox" name="subscribe_comments" id="subscribe_comments" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;"' . $comments_checked . ' /> ';
$comment_sub_text = __( 'Notify me of follow-up comments by email.', 'jetpack' );
- $str .= '<label class="subscribe-label" id="subscribe-label" for="subscribe_comments">' . esc_html( apply_filters( 'jetpack_subscribe_comment_label', $comment_sub_text ) ) . '</label>';
+ $str .= '<label class="subscribe-label" id="subscribe-label" for="subscribe_comments">' . esc_html(
+ /**
+ * Filter the Subscribe to comments text appearing below the comment form.
+ *
+ * @module subscriptions
+ *
+ * @since 3.4.0
+ *
+ * @param string $comment_sub_text Subscribe to comments text.
+ */
+ apply_filters( 'jetpack_subscribe_comment_label', $comment_sub_text )
+ ) . '</label>';
$str .= '</p>';
}
@@ -483,10 +630,30 @@ class Jetpack_Subscriptions {
// Subscribe to blog checkbox
$str .= '<p class="comment-subscription-form"><input type="checkbox" name="subscribe_blog" id="subscribe_blog" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;"' . $blog_checked . ' /> ';
$blog_sub_text = __( 'Notify me of new posts by email.', 'jetpack' );
- $str .= '<label class="subscribe-label" id="subscribe-blog-label" for="subscribe_blog">' . esc_html( apply_filters( 'jetpack_subscribe_blog_label', $blog_sub_text ) ) . '</label>';
+ $str .= '<label class="subscribe-label" id="subscribe-blog-label" for="subscribe_blog">' . esc_html(
+ /**
+ * Filter the Subscribe to blog text appearing below the comment form.
+ *
+ * @module subscriptions
+ *
+ * @since 3.4.0
+ *
+ * @param string $comment_sub_text Subscribe to blog text.
+ */
+ apply_filters( 'jetpack_subscribe_blog_label', $blog_sub_text )
+ ) . '</label>';
$str .= '</p>';
}
+ /**
+ * Filter the output of the subscription options appearing below the comment form.
+ *
+ * @module subscriptions
+ *
+ * @since 1.2.0
+ *
+ * @param string $str Comment Subscription form HTML output.
+ */
echo apply_filters( 'jetpack_comment_subscription_form', $str );
}
@@ -536,8 +703,27 @@ class Jetpack_Subscriptions {
function set_cookies( $comments = true, $posts = true ) {
global $post;
+ /** This filter is already documented in core/wp-includes/comment-functions.php */
$cookie_lifetime = apply_filters( 'comment_cookie_lifetime', 30000000 );
+ /**
+ * Filter the Jetpack Comment cookie path.
+ *
+ * @module subscriptions
+ *
+ * @since 2.5.0
+ *
+ * @param string COOKIEPATH Cookie path.
+ */
$cookie_path = apply_filters( 'jetpack_comment_cookie_path', COOKIEPATH );
+ /**
+ * Filter the Jetpack Comment cookie domain.
+ *
+ * @module subscriptions
+ *
+ * @since 2.5.0
+ *
+ * @param string COOKIE_DOMAIN Cookie domain.
+ */
$cookie_domain = apply_filters( 'jetpack_comment_cookie_domain', COOKIE_DOMAIN );
if ( $comments )
@@ -560,16 +746,24 @@ Jetpack_Subscriptions::init();
*/
class Jetpack_Subscriptions_Widget extends WP_Widget {
- function Jetpack_Subscriptions_Widget() {
+ function __construct() {
$widget_ops = array( 'classname' => 'jetpack_subscription_widget', 'description' => __( 'Add an email signup form to allow people to subscribe to your blog.', 'jetpack' ) );
$control_ops = array( 'width' => 300 );
- $this->WP_Widget( 'blog_subscription', __( 'Blog Subscriptions (Jetpack)', 'jetpack' ), $widget_ops, $control_ops );
+ parent::__construct(
+ 'blog_subscription',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
+ apply_filters( 'jetpack_widget_name', __( 'Blog Subscriptions', 'jetpack' ) ),
+ $widget_ops,
+ $control_ops
+ );
}
function widget( $args, $instance ) {
- if ( ( ! defined( 'IS_WPCOM' ) || ! IS_WPCOM )
- && false === apply_filters( 'jetpack_auto_fill_logged_in_user', false )
+ if (
+ ( ! defined( 'IS_WPCOM' ) || ! IS_WPCOM ) &&
+ /** This filter is already documented in modules/contact-form/grunion-contact-form.php */
+ false === apply_filters( 'jetpack_auto_fill_logged_in_user', false )
) {
$subscribe_email = '';
} else {
@@ -595,6 +789,16 @@ class Jetpack_Subscriptions_Widget extends WP_Widget {
$subscribers_total = $this->fetch_subscriber_count(); // Only used for the shortcode [total-subscribers]
// Give the input element a unique ID
+ /**
+ * Filter the subscription form's ID prefix.
+ *
+ * @module subscriptions
+ *
+ * @since 2.7.0
+ *
+ * @param string subscribe-field Subscription form field prefix.
+ * @param int $widget_id Widget ID.
+ */
$subscribe_field_id = apply_filters( 'subscribe_field_id', 'subscribe-field', $widget_id );
// Enqueue the form's CSS
@@ -617,6 +821,12 @@ class Jetpack_Subscriptions_Widget extends WP_Widget {
case 'invalid_email' : ?>
<p class="error"><?php esc_html_e( 'The email you entered was invalid. Please check and try again.', 'jetpack' ); ?></p>
<?php break;
+ case 'opted_out' : ?>
+ <p class="error"><?php printf( __( 'The email address has opted out of subscription emails. <br /> You can manage your preferences at <a href="%1$s" title="%2$s" target="_blank">subscribe.wordpress.com</a>', 'jetpack' ),
+ 'https://subscribe.wordpress.com/',
+ __( 'Manage your email preferences.', 'jetpack' )
+ ); ?>
+ <?php break;
case 'already' : ?>
<p class="error"><?php esc_html_e( 'You have already subscribed to this site. Please check your inbox.', 'jetpack' ); ?></p>
<?php break;
@@ -635,20 +845,19 @@ class Jetpack_Subscriptions_Widget extends WP_Widget {
} else { ?>
<form action="#" method="post" accept-charset="utf-8" id="subscribe-blog-<?php echo $widget_id; ?>">
<?php
- if ( ! isset ( $_GET['subscribe'] ) ) {
+ if ( ! isset ( $_GET['subscribe'] ) || 'success' != $_GET['subscribe'] ) {
?><div id="subscribe-text"><?php echo wpautop( str_replace( '[total-subscribers]', number_format_i18n( $subscribers_total['value'] ), $subscribe_text ) ); ?></div><?php
}
if ( $show_subscribers_total && 0 < $subscribers_total['value'] ) {
echo wpautop( sprintf( _n( 'Join %s other subscriber', 'Join %s other subscribers', $subscribers_total['value'], 'jetpack' ), number_format_i18n( $subscribers_total['value'] ) ) );
}
-
- if ( ! isset ( $_GET['subscribe'] ) ) { ?>
+ if ( ! isset ( $_GET['subscribe'] ) || 'success' != $_GET['subscribe'] ) { ?>
<p id="subscribe-email">
- <label id="jetpack-subscribe-label" for="<?php echo esc_attr( $subscribe_field_id ); ?>">
+ <label id="jetpack-subscribe-label" for="<?php echo esc_attr( $subscribe_field_id ) . '-' . esc_attr( $widget_id ); ?>">
<?php echo !empty( $subscribe_placeholder ) ? esc_html( $subscribe_placeholder ) : esc_html__( 'Email Address:', 'jetpack' ); ?>
</label>
- <input type="email" name="email" required="required" class="required" value="<?php echo esc_attr( $subscribe_email ); ?>" id="<?php echo esc_attr( $subscribe_field_id ); ?>" placeholder="<?php echo esc_attr( $subscribe_placeholder ); ?>" />
+ <input type="email" name="email" required="required" class="required" value="<?php echo esc_attr( $subscribe_email ); ?>" id="<?php echo esc_attr( $subscribe_field_id ) . '-' . esc_attr( $widget_id ); ?>" placeholder="<?php echo esc_attr( $subscribe_placeholder ); ?>" />
</p>
<p id="subscribe-submit">
@@ -667,25 +876,41 @@ class Jetpack_Subscriptions_Widget extends WP_Widget {
</form>
<script>
- ( function( d ) {
- if ( ( 'placeholder' in d.createElement( 'input' ) ) ) {
- var label = d.getElementById( 'jetpack-subscribe-label' );
- label.style.clip = 'rect(1px, 1px, 1px, 1px)';
- label.style.position = 'absolute';
- label.style.height = '1px';
- label.style.width = '1px';
- label.style.overflow = 'hidden';
- }
- } ) ( document );
-
- // Special check for required email input because Safari doesn't support HTML5 "required"
- jQuery( '#subscribe-blog-<?php echo $widget_id; ?>' ).submit( function( event ) {
- var requiredInput = jQuery( this ).find( '.required' );
- if ( requiredInput.val() == '' ) {
- event.preventDefault();
- requiredInput.focus();
- }
- });
+ /*
+ Custom functionality for safari and IE
+ */
+ (function( d ) {
+ // In case the placeholder functionality is available we remove labels
+ if ( ( 'placeholder' in d.createElement( 'input' ) ) ) {
+ var label = d.querySelector( 'label[for=subscribe-field-<?php echo $widget_id; ?>]' );
+ label.style.clip = 'rect(1px, 1px, 1px, 1px)';
+ label.style.position = 'absolute';
+ label.style.height = '1px';
+ label.style.width = '1px';
+ label.style.overflow = 'hidden';
+ }
+
+ // Make sure the email value is filled in before allowing submit
+ var form = d.getElementById('subscribe-blog-<?php echo $widget_id; ?>'),
+ input = d.getElementById('<?php echo esc_attr( $subscribe_field_id ) . '-' . esc_attr( $widget_id ); ?>'),
+ handler = function( event ) {
+ if ( '' === input.value ) {
+ input.focus();
+
+ if ( event.preventDefault ){
+ event.preventDefault();
+ }
+
+ return false;
+ }
+ };
+
+ if ( window.addEventListener ) {
+ form.addEventListener( 'submit', handler, false );
+ } else {
+ form.attachEvent( 'onsubmit', handler );
+ }
+ })( document );
</script>
<?php } ?>
<?php
@@ -750,7 +975,7 @@ class Jetpack_Subscriptions_Widget extends WP_Widget {
'subscribe_text' => esc_html__( 'Enter your email address to subscribe to this blog and receive notifications of new posts by email.', 'jetpack' ),
'subscribe_placeholder' => esc_html__( 'Email Address', 'jetpack' ),
'subscribe_button' => esc_html__( 'Subscribe', 'jetpack' ),
- 'success_message' => esc_html__( 'Success! An email was just sent to confirm your subscription. Please find the email now and click activate to start subscribing', 'jetpack' ),
+ 'success_message' => esc_html__( 'Success! An email was just sent to confirm your subscription. Please find the email now and click activate to start subscribing.', 'jetpack' ),
'show_subscribers_total' => true,
);
}
@@ -814,11 +1039,14 @@ class Jetpack_Subscriptions_Widget extends WP_Widget {
add_shortcode( 'jetpack_subscription_form', 'jetpack_do_subscription_form' );
-function jetpack_do_subscription_form( $args ) {
- $args['show_subscribers_total'] = empty( $args['show_subscribers_total'] ) ? false : true;
- $args = shortcode_atts( Jetpack_Subscriptions_Widget::defaults(), $args, 'jetpack_subscription_form' );
+function jetpack_do_subscription_form( $instance ) {
+ $instance['show_subscribers_total'] = empty( $instance['show_subscribers_total'] ) ? false : true;
+ $instance = shortcode_atts( Jetpack_Subscriptions_Widget::defaults(), $instance, 'jetpack_subscription_form' );
+ $args = array(
+ 'before_widget' => sprintf( '<div class="%s">', 'jetpack_subscription_widget' ),
+ );
ob_start();
- the_widget( 'Jetpack_Subscriptions_Widget', $args );
+ the_widget( 'Jetpack_Subscriptions_Widget', $instance, $args );
$output = ob_get_clean();
return $output;
}
diff --git a/plugins/jetpack/modules/theme-tools.php b/plugins/jetpack/modules/theme-tools.php
index 4d377344..c9d82c45 100644
--- a/plugins/jetpack/modules/theme-tools.php
+++ b/plugins/jetpack/modules/theme-tools.php
@@ -14,19 +14,30 @@ add_action( 'init', 'jetpack_load_theme_tools', 30 );
/**
* Load theme compat file if it exists.
- *
- * A theme could add its own compat files here if they like. For example:
- *
- * add_filter( 'jetpack_theme_compat_files', 'mytheme_jetpack_compat_file' );
- * function mytheme_jetpack_compat_file( $files ) {
- * $files['mytheme'] = locate_template( 'jetpack-compat.php' );
- * return $files;
- * }
*/
function jetpack_load_theme_compat() {
+
+ /**
+ * Filter theme compat files.
+ *
+ * Themes can add their own compat files here if they like. For example:
+ *
+ * add_filter( 'jetpack_theme_compat_files', 'mytheme_jetpack_compat_file' );
+ * function mytheme_jetpack_compat_file( $files ) {
+ * $files['mytheme'] = locate_template( 'jetpack-compat.php' );
+ * return $files;
+ * }
+ *
+ * @module theme-tools
+ *
+ * @since 2.8.0
+ *
+ * @param array Associative array of theme compat files to load.
+ */
$compat_files = apply_filters( 'jetpack_theme_compat_files', array(
'twentyfourteen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentyfourteen.php',
'twentyfifteen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentyfifteen.php',
+ 'twentysixteen' => JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentysixteen.php',
) );
_jetpack_require_compat_file( get_stylesheet(), $compat_files );
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentyfifteen-rtl.css b/plugins/jetpack/modules/theme-tools/compat/twentyfifteen-rtl.css
index 5d545f5b..cd2a372c 100644
--- a/plugins/jetpack/modules/theme-tools/compat/twentyfifteen-rtl.css
+++ b/plugins/jetpack/modules/theme-tools/compat/twentyfifteen-rtl.css
@@ -234,22 +234,6 @@ iframe[id*="twitter-widget-"] {
/**
- * Responsive Videos
- */
-
-.jetpack-video-wrapper {
- margin-bottom: 1.6em;
-}
-
-.jetpack-video-wrapper > embed,
-.jetpack-video-wrapper > iframe,
-.jetpack-video-wrapper > object,
-.jetpack-video-wrapper > .wp-video {
- margin-bottom: 0;
-}
-
-
-/**
* Jetpack Comments
*/
@@ -749,4 +733,4 @@ iframe[id*="twitter-widget-"] {
.jp-relatedposts-post-img {
margin-bottom: 0.6315em;
}
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.css b/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.css
index e5c44f36..0ccda411 100644
--- a/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.css
+++ b/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.css
@@ -234,22 +234,6 @@ iframe[id*="twitter-widget-"] {
/**
- * Responsive Videos
- */
-
-.jetpack-video-wrapper {
- margin-bottom: 1.6em;
-}
-
-.jetpack-video-wrapper > embed,
-.jetpack-video-wrapper > iframe,
-.jetpack-video-wrapper > object,
-.jetpack-video-wrapper > .wp-video {
- margin-bottom: 0;
-}
-
-
-/**
* Jetpack Comments
*/
@@ -749,4 +733,4 @@ iframe[id*="twitter-widget-"] {
.jp-relatedposts-post-img {
margin-bottom: 0.6315em;
}
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentysixteen-rtl.css b/plugins/jetpack/modules/theme-tools/compat/twentysixteen-rtl.css
new file mode 100644
index 00000000..34b0c874
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/compat/twentysixteen-rtl.css
@@ -0,0 +1,763 @@
+/**
+ * Jetpack Comments
+ */
+
+.comment-form iframe {
+ margin: 0;
+}
+
+.comment-form .subscribe-label {
+ font-weight: 400;
+ letter-spacing: 0;
+ text-transform: none;
+}
+
+.comment-subscription-form {
+ margin: 1.75em 0 0;
+}
+
+.comment-subscription-form + .comment-subscription-form {
+ margin-top: 0;
+}
+
+
+/**
+ * Extra Widgets
+ */
+
+ /* Blog Subscriptions Widget */
+.jetpack_subscription_widget #subscribe-email input {
+ padding: 0.625em 0.4375em;
+ width: 100%;
+}
+
+.jetpack_subscription_widget form > :last-child {
+ margin-bottom: 0;
+}
+
+ /* Contact Info Widget */
+.widget_contact_info .contact-map {
+ margin-bottom: 1.75em;
+}
+
+/* Display WordPress Posts Widget */
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts {
+ margin: 0;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts h4 {
+ font-size: inherit;
+ margin: 0 0 0.875em;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts img {
+ margin-bottom: 0.875em;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts p {
+ font-size: inherit;
+ line-height: 1.75 !important;
+ margin: 0 0 1.75em !important;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts > :last-child {
+ margin-bottom: 0 !important;
+}
+
+/* Gallery Widget */
+.widget-gallery .slideshow-window {
+ border-radius: 0;
+}
+
+/* Goodreads Widget */
+.widget_goodreads div[class^="gr_custom_container"] {
+ background-color: transparent;
+ border: 0;
+ border-radius: 0;
+ color: inherit;
+ padding: 0;
+}
+
+.widget_goodreads div[class^="gr_custom_container"] a {
+ color: inherit;
+}
+
+.widget_goodreads div[class^="gr_custom_each_container"] {
+ border: 0;
+ margin-bottom: 1.75em;
+ padding-bottom: 0;
+}
+
+.widget_goodreads h2[class^="gr_custom_header"],
+.widget_goodreads div[class^="gr_custom_author"] {
+ font-size: inherit;
+}
+
+/* Gravatar Profile Widget */
+.widget-grofile .grofile-thumbnail {
+ width: 300px;
+}
+
+.widget-area .widget-grofile h4 {
+ font-size: inherit;
+ font-weight: 900;
+ margin: 1.75em 0 0;
+}
+
+.widget-area .widget-grofile .grofile-accounts {
+ margin-top: 0.4375em;
+}
+
+/* Image Widget */
+.widget_image .wp-caption {
+ margin-bottom: 0;
+}
+
+/* RSS Links Widget */
+.widget_rss_links img {
+ position: relative;
+ top: -1px;
+}
+
+/* Social Media Icon Widget */
+.widget.widget_wpcom_social_media_icons_widget ul {
+ margin: 0 0 -0.4375em;
+}
+
+.widget.widget_wpcom_social_media_icons_widget ul:before,
+.widget.widget_wpcom_social_media_icons_widget ul:after {
+ content: "";
+ display: table;
+}
+
+.widget.widget_wpcom_social_media_icons_widget ul:after {
+ clear: both;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li {
+ float: right;
+ margin: 0 0 0.4375em 0.4375em;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li a {
+ border: 1px solid currentColor;
+ border-radius: 50%;
+ color: inherit;
+ display: block;
+ height: 35px;
+ position: relative;
+ width: 35px;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li a:before {
+ height: 33px;
+ line-height: 33px;
+ text-align: center;
+ width: 33px;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li a:hover:before,
+.widget.widget_wpcom_social_media_icons_widget li a:focus:before {
+ opacity: 0.8;
+}
+
+/* Top Posts & Pages Widget */
+.widget_top-posts .widgets-list-layout .widgets-list-layout-blavatar {
+ margin-top: 0.25em;
+}
+
+.widget_top-posts .widgets-list-layout-links {
+ width: -webkit-calc(100% - 3.375em);
+ width: calc(100% - 3.375em);
+}
+
+.widget_top-posts .widgets-list-layout li {
+ margin-bottom: 0.875em;
+}
+
+.widget_top-posts .widgets-list-layout li:last-child {
+ margin-bottom: 0;
+}
+
+.widget-grid-view-image:nth-child(odd) {
+ clear: both;
+}
+
+/* Upcoming Events Widget */
+.widget_upcoming_events_widget .upcoming-events li {
+ margin-bottom: 0.875em
+}
+
+
+/**
+ * Shortcodes
+ */
+
+/* Contact Form */
+.entry-content .contact-form label {
+ color: inherit;
+ display: block;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: 13px;
+ font-size: 0.8125rem;
+ font-weight: 400;
+ letter-spacing: 0.076923077em;
+ line-height: 1.6153846154;
+ margin-bottom: 0.5384615385em;
+ text-transform: uppercase;
+}
+
+.entry-content .contact-form label span {
+ color: inherit;
+ letter-spacing: 0;
+ opacity: 0.7;
+ text-transform: capitalize;
+}
+
+.entry-content .contact-form input[type="text"],
+.entry-content .contact-form input[type="email"],
+.entry-content .contact-form textarea {
+ margin-bottom: 1.75em;
+ max-width: 100%;
+ width: 100%;
+}
+
+.entry-content .contact-form label.checkbox,
+.entry-content .contact-form label.radio {
+ font-family: inherit;
+ font-size: inherit;
+ letter-spacing: 0;
+ margin-bottom: 0;
+ text-transform: none;
+}
+
+.entry-content .contact-form label.checkbox:nth-last-child(2),
+.entry-content .contact-form label.radio:nth-last-child(2) {
+ margin-bottom: 0.875em;
+}
+
+.entry-content .contact-form input[type="radio"],
+.entry-content .contact-form input[type="checkbox"] {
+ margin-bottom: 0.875em;
+}
+
+.entry-content .contact-form select {
+ margin-bottom: 1.75em;
+}
+
+/* Facebook */
+.fb_iframe_widget {
+ margin-bottom: 1.75em;
+ max-width: 100%;
+}
+
+.fb_iframe_widget span {
+ max-width: 100%;
+}
+
+/* Gist */
+.gist table {
+ table-layout: auto;
+}
+
+.entry-content .gist .gist-file {
+ margin-bottom: 1.75em;
+}
+
+/* Instagram */
+.instagram-media {
+ margin-bottom: 1.75em !important;
+}
+
+/* Mixclound */
+iframe[src^="http://api.mixcloud.com/"] {
+ margin-right: -8px;
+ max-width: -webkit-calc(100% + 8px);
+ max-width: calc(100% + 8px);
+}
+
+/* Polldaddy */
+.PDS_Poll {
+ display: block !important;
+ margin-bottom: 1.75em;
+}
+
+.PDS_Poll .pds-box {
+ max-width: 100%;
+ width: auto;
+}
+
+/* Portfolio */
+.entry-content .portfolio-entry {
+ margin-bottom: 1.75em;
+}
+
+.entry-content .portfolio-entry-title,
+.entry-content .portfolio-entry-meta {
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+}
+
+.entry-content .portfolio-entry-title a,
+.entry-content .portfolio-entry-meta a {
+ box-shadow: none;
+}
+
+.entry-content .portfolio-entry-title a:hover,
+.entry-content .portfolio-entry-meta a:hover {
+ box-shadow: 0 1px 0 0 currentColor;
+}
+
+.entry-content .portfolio-entry-meta span,
+.entry-content .portfolio-entry-meta a {
+ font-size: 1em;
+}
+
+.entry-content .portfolio-entry-title {
+ font-size: inherit;
+ line-height: 1.3125;
+}
+
+.entry-content .portfolio-featured-image + .portfolio-entry-title {
+ margin-top: 0.875em;
+ margin-bottom: 0.4375em;
+}
+
+.entry-content .portfolio-entry-meta,
+.entry-content .portfolio-entry-content p {
+ font-size: 13px;
+ font-size: 0.8125em;
+ line-height: 1.615384615;
+}
+
+.entry-content .portfolio-entry-content p:last-child {
+ margin-bottom: 0;
+}
+
+.entry-content .portfolio-entry-title + .portfolio-entry-meta {
+ margin-top: 0.538461538em;
+}
+
+.entry-content .portfolio-entry-content {
+ margin-top: 0.875em;
+}
+
+.entry-content .portfolio-entry-content p {
+ margin-bottom: 1.615384615em;
+}
+
+/* Presentation */
+.entry-content .presentation-wrapper {
+ margin: 0 0 1.75em;
+ max-width: 100%;
+}
+
+.presentation {
+ max-width: 100%;
+}
+
+/* Recipes */
+.entry-content .jetpack-recipe {
+ border: 0;
+ margin: 0 0 1.75em;
+ padding: 0;
+}
+
+.entry-content .jetpack-recipe-title {
+ border: 0;
+ margin-top: 0;
+ padding: 0;
+}
+
+.entry-content .jetpack-recipe .jetpack-recipe-meta {
+ font-size: inherit;
+ margin: 0;
+}
+
+/* Scribd */
+.scribd_iframe_embed + div {
+ margin-bottom: 28px;
+}
+
+/* Slideshow */
+.entry-content .slideshow-window {
+ border-radius: 0;
+ margin-bottom: 1.75em;
+}
+
+/* Subscription Form */
+.entry-content .jetpack_subscription_widget {
+ border-top: 0;
+ font-size: inherit;
+ margin-bottom: 1.75em;
+ padding: 0;
+}
+
+.entry-content #subscribe-email input {
+ font-size: inherit;
+ line-height: normal;
+ padding: 0.625em 0.4375em;
+ width: 100%;
+}
+
+.entry-content .jetpack_subscription_widget input[type="submit"] {
+ font-size: inherit;
+ padding: 0.84375em 0.875em 0.78125em;
+}
+
+/* Testimonial */
+.entry-content .testimonial-entry {
+ margin-bottom: 1.75em;
+}
+
+.entry-content .testimonial-entry-content {
+ margin: 0;
+}
+
+.entry-content .testimonial-entry-title,
+.entry-content .testimonial-entry-content p {
+ font-size: 13px;
+ font-size: 0.8125em;
+ line-height: 1.615384615;
+ margin: 0;
+}
+
+.entry-content .testimonial-entry-content p {
+ margin-bottom: 1.615384615em;
+}
+
+.entry-content .testimonial-entry-title {
+ float: right;
+}
+
+.entry-content .testimonial-entry-title a {
+ box-shadow: none;
+}
+
+.entry-content .testimonial-entry-title a:hover {
+ box-shadow: 0 1px 0 0 currentColor;
+}
+
+.entry-content .testimonial-featured-image img {
+ float: left;
+ max-width: 42px;
+}
+
+/* Twitter-timeline */
+.twitter-timeline {
+ margin-bottom: 1.75em !important;
+}
+
+
+/**
+ * Responsive Videos
+ */
+.hentry .jetpack-video-wrapper {
+ margin-bottom: 1.75em;
+}
+
+
+/**
+ * Related Posts
+ */
+
+.entry-content #jp-relatedposts {
+ margin: 0;
+ padding: 1.75em 0;
+ position: relative;
+}
+
+.jp-relatedposts:before,
+.jp-relatedposts:last-child:after {
+ background-color: currentColor;
+ content: "";
+ height: 1px;
+ opacity: 0.2;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.jp-relatedposts:last-child:after {
+ bottom: 0;
+ top: auto;
+}
+
+.entry-content #jp-relatedposts h3.jp-relatedposts-headline {
+ color: inherit;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: 13px;
+ font-size: 0.8125rem;
+ font-weight: 400;
+ line-height: 1;
+ margin-bottom: 1.076923077em;
+}
+
+.entry-content #jp-relatedposts h3.jp-relatedposts-headline em:before {
+ display: none;
+}
+
+.entry-content #jp-relatedposts h3.jp-relatedposts-headline em {
+ font-weight: 400;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-headline em:after {
+ content: ":";
+}
+
+.jp-relatedposts-items:before,
+.jp-relatedposts-items:after {
+ content: "";
+ display: table;
+}
+
+.jp-relatedposts-items:after {
+ clear: both;
+}
+
+.entry-content .jp-relatedposts-post-aoverlay,
+.entry-content .jp-relatedposts-post-a {
+ box-shadow: none;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
+ margin-bottom: 1.75em;
+ width: 100%;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:last-child {
+ margin-bottom: 0;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span {
+ max-width: 100%;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items p,
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title {
+ font-size: 13px;
+ font-size: 0.8125rem;
+ letter-spacing: 0;
+ line-height: 1.615384615;
+}
+
+.jp-relatedposts-post-date,
+.jp-relatedposts-post-context {
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+}
+
+.jp-relatedposts-post-title,
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post-excerpt,
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title {
+ margin-bottom: 1.076923077em;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a {
+ font-weight: 700;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover,
+.entry-content .jp-relatedposts-post-aoverlay:hover + .jp-relatedposts-post-title .jp-relatedposts-post-a {
+ box-shadow: 0 1px 0 0 currentColor;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover,
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a {
+ text-decoration: none;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date,
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context,
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post {
+ opacity: 1;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post {
+ padding-left: 0;
+}
+
+.entry-content .jp-relatedposts-post-a:hover img.jp-relatedposts-post-img,
+.entry-content .jp-relatedposts-post-a:focus img.jp-relatedposts-post-img {
+ opacity: 0.85;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img {
+ margin-bottom: 0.875em;
+ max-width: 100%;
+}
+
+
+/**
+ * Sharing
+ */
+
+.sharedaddy {
+ padding: 1.75em 0;
+ position: relative;
+}
+
+.sharedaddy:before,
+.sharedaddy:last-child:after {
+ background-color: currentColor;
+ content: "";
+ height: 1px;
+ opacity: 0.2;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.sharedaddy:last-child:after {
+ bottom: 0;
+ top: auto;
+}
+
+.sd-block {
+ line-height: 1;
+}
+
+.sd-like {
+ padding-bottom: 1.125em;
+}
+
+.hentry div.sharedaddy h3.sd-title,
+.hentry h3.sd-title {
+ color: inherit;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: 13px;
+ font-size: 0.8125rem;
+ font-weight: 400;
+ line-height: 1;
+ margin-bottom: 1.076923077em;
+}
+
+.hentry div.sharedaddy h3.sd-title:before {
+ display: none;
+}
+
+.sd-social-icon-text .sd-content ul,
+.sd-social-text .sd-content ul {
+ margin-bottom: -0.3125em !important;
+}
+
+.sd-social-icon .sd-content ul {
+ margin-bottom: 0 !important;
+}
+
+.sd-social-official .sd-content ul {
+ margin-bottom: -0.625em !important;
+}
+
+.hentry #sharing_email .sharing_send,
+.hentry .sd-content ul li .option a.share-ustom,
+.hentry .sd-content ul li a.sd-button,
+.hentry .sd-content ul li.advanced a.share-more,
+.hentry .sd-content ul li.preview-item div.option.option-smart-off a,
+.hentry .sd-social-icon .sd-content ul li a.sd-button,
+.hentry .sd-social-icon-text .sd-content ul li a.sd-button,
+.hentry .sd-social-official .sd-content > ul > li .digg_button > a,
+.hentry .sd-social-official .sd-content > ul > li > a.sd-button,
+.hentry .sd-social-text .sd-content ul li a.sd-button {
+ box-shadow: none;
+}
+
+
+/**
+ * Stats
+ */
+
+#wpstats {
+ display: none;
+}
+
+
+/**
+ * Tiled gallery
+ */
+
+.entry-content .tiled-gallery {
+ margin-bottom: 1.75em;
+}
+
+
+/**
+ * Media Queries
+ */
+
+@media screen and (min-width: 56.875em) {
+ .widget-area .jetpack_subscription_widget #subscribe-email input {
+ padding: 0.4615384615em 0.5384615385em;
+ }
+
+ .widget_contact_info .contact-map {
+ margin-bottom: 1.615384615em;
+ }
+
+ .widget_jetpack_display_posts_widget .jetpack-display-remote-posts h4,
+ .widget_jetpack_display_posts_widget .jetpack-display-remote-posts img {
+ margin-bottom: 1.076923077em;
+ }
+
+ .widget_jetpack_display_posts_widget .jetpack-display-remote-posts p {
+ line-height: 1.615384615em !important;
+ margin: 0 0 1.615384615em !important;
+ }
+
+ .widget_goodreads div[class^="gr_custom_each_container"] {
+ margin-bottom: 1.615384615em;
+ }
+
+ .widget-area .widget-grofile h4 {
+ margin: 1.615384615em 0 0;
+ }
+
+ .widget-area .widget-grofile .grofile-accounts {
+ margin-top: 0.538461538em;
+ }
+
+ .widget.widget_wpcom_social_media_icons_widget ul {
+ margin: 0 0 -0.538461538em;
+ }
+
+ .widget.widget_wpcom_social_media_icons_widget li {
+ margin: 0 0 0.538461538em 0.538461538em;
+ }
+
+ .widget_top-posts .widgets-list-layout .widgets-list-layout-blavatar {
+ margin-top: 0.153846154em;
+ }
+
+ .widget_top-posts .widgets-list-layout-links {
+ width: -webkit-calc(100% - 4.153846154em);
+ width: calc(100% - 4.153846154em);
+ }
+
+ .widget_top-posts .widgets-list-layout li {
+ margin-bottom: 1.076923077em;
+ }
+
+ .widget_upcoming_events_widget .upcoming-events li {
+ margin-bottom: 1.076923077em
+ }
+
+ .entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
+ margin-bottom: 0;
+ padding-left: 0.875em;
+ width: 33%;
+ }
+}
+
+@media screen and (min-width: 61.5625em) {
+ body:not(.search-results) article:not(.type-page) .sharedaddy:last-child,
+ body:not(.search-results) article:not(.type-page) .jp-relatedposts:last-child {
+ padding-bottom: 0;
+ }
+
+ body:not(.search-results) article:not(.type-page) .sharedaddy:last-child:after,
+ body:not(.search-results) article:not(.type-page) .jp-relatedposts:last-child:after {
+ display: none;
+ }
+
+ body:not(.search-results) article:not(.type-page) img.below-entry-meta {
+ width: auto;
+ }
+}
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentysixteen.css b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.css
new file mode 100644
index 00000000..58fd42f3
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.css
@@ -0,0 +1,763 @@
+/**
+ * Jetpack Comments
+ */
+
+.comment-form iframe {
+ margin: 0;
+}
+
+.comment-form .subscribe-label {
+ font-weight: 400;
+ letter-spacing: 0;
+ text-transform: none;
+}
+
+.comment-subscription-form {
+ margin: 1.75em 0 0;
+}
+
+.comment-subscription-form + .comment-subscription-form {
+ margin-top: 0;
+}
+
+
+/**
+ * Extra Widgets
+ */
+
+ /* Blog Subscriptions Widget */
+.jetpack_subscription_widget #subscribe-email input {
+ padding: 0.625em 0.4375em;
+ width: 100%;
+}
+
+.jetpack_subscription_widget form > :last-child {
+ margin-bottom: 0;
+}
+
+ /* Contact Info Widget */
+.widget_contact_info .contact-map {
+ margin-bottom: 1.75em;
+}
+
+/* Display WordPress Posts Widget */
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts {
+ margin: 0;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts h4 {
+ font-size: inherit;
+ margin: 0 0 0.875em;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts img {
+ margin-bottom: 0.875em;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts p {
+ font-size: inherit;
+ line-height: 1.75 !important;
+ margin: 0 0 1.75em !important;
+}
+
+.widget_jetpack_display_posts_widget .jetpack-display-remote-posts > :last-child {
+ margin-bottom: 0 !important;
+}
+
+/* Gallery Widget */
+.widget-gallery .slideshow-window {
+ border-radius: 0;
+}
+
+/* Goodreads Widget */
+.widget_goodreads div[class^="gr_custom_container"] {
+ background-color: transparent;
+ border: 0;
+ border-radius: 0;
+ color: inherit;
+ padding: 0;
+}
+
+.widget_goodreads div[class^="gr_custom_container"] a {
+ color: inherit;
+}
+
+.widget_goodreads div[class^="gr_custom_each_container"] {
+ border: 0;
+ margin-bottom: 1.75em;
+ padding-bottom: 0;
+}
+
+.widget_goodreads h2[class^="gr_custom_header"],
+.widget_goodreads div[class^="gr_custom_author"] {
+ font-size: inherit;
+}
+
+/* Gravatar Profile Widget */
+.widget-grofile .grofile-thumbnail {
+ width: 300px;
+}
+
+.widget-area .widget-grofile h4 {
+ font-size: inherit;
+ font-weight: 900;
+ margin: 1.75em 0 0;
+}
+
+.widget-area .widget-grofile .grofile-accounts {
+ margin-top: 0.4375em;
+}
+
+/* Image Widget */
+.widget_image .wp-caption {
+ margin-bottom: 0;
+}
+
+/* RSS Links Widget */
+.widget_rss_links img {
+ position: relative;
+ top: -1px;
+}
+
+/* Social Media Icon Widget */
+.widget.widget_wpcom_social_media_icons_widget ul {
+ margin: 0 0 -0.4375em;
+}
+
+.widget.widget_wpcom_social_media_icons_widget ul:before,
+.widget.widget_wpcom_social_media_icons_widget ul:after {
+ content: "";
+ display: table;
+}
+
+.widget.widget_wpcom_social_media_icons_widget ul:after {
+ clear: both;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li {
+ float: left;
+ margin: 0 0.4375em 0.4375em 0;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li a {
+ border: 1px solid currentColor;
+ border-radius: 50%;
+ color: inherit;
+ display: block;
+ height: 35px;
+ position: relative;
+ width: 35px;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li a:before {
+ height: 33px;
+ line-height: 33px;
+ text-align: center;
+ width: 33px;
+}
+
+.widget.widget_wpcom_social_media_icons_widget li a:hover:before,
+.widget.widget_wpcom_social_media_icons_widget li a:focus:before {
+ opacity: 0.8;
+}
+
+/* Top Posts & Pages Widget */
+.widget_top-posts .widgets-list-layout .widgets-list-layout-blavatar {
+ margin-top: 0.25em;
+}
+
+.widget_top-posts .widgets-list-layout-links {
+ width: -webkit-calc(100% - 3.375em);
+ width: calc(100% - 3.375em);
+}
+
+.widget_top-posts .widgets-list-layout li {
+ margin-bottom: 0.875em;
+}
+
+.widget_top-posts .widgets-list-layout li:last-child {
+ margin-bottom: 0;
+}
+
+.widget-grid-view-image:nth-child(odd) {
+ clear: both;
+}
+
+/* Upcoming Events Widget */
+.widget_upcoming_events_widget .upcoming-events li {
+ margin-bottom: 0.875em
+}
+
+
+/**
+ * Shortcodes
+ */
+
+/* Contact Form */
+.entry-content .contact-form label {
+ color: inherit;
+ display: block;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: 13px;
+ font-size: 0.8125rem;
+ font-weight: 400;
+ letter-spacing: 0.076923077em;
+ line-height: 1.6153846154;
+ margin-bottom: 0.5384615385em;
+ text-transform: uppercase;
+}
+
+.entry-content .contact-form label span {
+ color: inherit;
+ letter-spacing: 0;
+ opacity: 0.7;
+ text-transform: capitalize;
+}
+
+.entry-content .contact-form input[type="text"],
+.entry-content .contact-form input[type="email"],
+.entry-content .contact-form textarea {
+ margin-bottom: 1.75em;
+ max-width: 100%;
+ width: 100%;
+}
+
+.entry-content .contact-form label.checkbox,
+.entry-content .contact-form label.radio {
+ font-family: inherit;
+ font-size: inherit;
+ letter-spacing: 0;
+ margin-bottom: 0;
+ text-transform: none;
+}
+
+.entry-content .contact-form label.checkbox:nth-last-child(2),
+.entry-content .contact-form label.radio:nth-last-child(2) {
+ margin-bottom: 0.875em;
+}
+
+.entry-content .contact-form input[type="radio"],
+.entry-content .contact-form input[type="checkbox"] {
+ margin-bottom: 0.875em;
+}
+
+.entry-content .contact-form select {
+ margin-bottom: 1.75em;
+}
+
+/* Facebook */
+.fb_iframe_widget {
+ margin-bottom: 1.75em;
+ max-width: 100%;
+}
+
+.fb_iframe_widget span {
+ max-width: 100%;
+}
+
+/* Gist */
+.gist table {
+ table-layout: auto;
+}
+
+.entry-content .gist .gist-file {
+ margin-bottom: 1.75em;
+}
+
+/* Instagram */
+.instagram-media {
+ margin-bottom: 1.75em !important;
+}
+
+/* Mixclound */
+iframe[src^="http://api.mixcloud.com/"] {
+ margin-left: -8px;
+ max-width: -webkit-calc(100% + 8px);
+ max-width: calc(100% + 8px);
+}
+
+/* Polldaddy */
+.PDS_Poll {
+ display: block !important;
+ margin-bottom: 1.75em;
+}
+
+.PDS_Poll .pds-box {
+ max-width: 100%;
+ width: auto;
+}
+
+/* Portfolio */
+.entry-content .portfolio-entry {
+ margin-bottom: 1.75em;
+}
+
+.entry-content .portfolio-entry-title,
+.entry-content .portfolio-entry-meta {
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+}
+
+.entry-content .portfolio-entry-title a,
+.entry-content .portfolio-entry-meta a {
+ box-shadow: none;
+}
+
+.entry-content .portfolio-entry-title a:hover,
+.entry-content .portfolio-entry-meta a:hover {
+ box-shadow: 0 1px 0 0 currentColor;
+}
+
+.entry-content .portfolio-entry-meta span,
+.entry-content .portfolio-entry-meta a {
+ font-size: 1em;
+}
+
+.entry-content .portfolio-entry-title {
+ font-size: inherit;
+ line-height: 1.3125;
+}
+
+.entry-content .portfolio-featured-image + .portfolio-entry-title {
+ margin-top: 0.875em;
+ margin-bottom: 0.4375em;
+}
+
+.entry-content .portfolio-entry-meta,
+.entry-content .portfolio-entry-content p {
+ font-size: 13px;
+ font-size: 0.8125em;
+ line-height: 1.615384615;
+}
+
+.entry-content .portfolio-entry-content p:last-child {
+ margin-bottom: 0;
+}
+
+.entry-content .portfolio-entry-title + .portfolio-entry-meta {
+ margin-top: 0.538461538em;
+}
+
+.entry-content .portfolio-entry-content {
+ margin-top: 0.875em;
+}
+
+.entry-content .portfolio-entry-content p {
+ margin-bottom: 1.615384615em;
+}
+
+/* Presentation */
+.entry-content .presentation-wrapper {
+ margin: 0 0 1.75em;
+ max-width: 100%;
+}
+
+.presentation {
+ max-width: 100%;
+}
+
+/* Recipes */
+.entry-content .jetpack-recipe {
+ border: 0;
+ margin: 0 0 1.75em;
+ padding: 0;
+}
+
+.entry-content .jetpack-recipe-title {
+ border: 0;
+ margin-top: 0;
+ padding: 0;
+}
+
+.entry-content .jetpack-recipe .jetpack-recipe-meta {
+ font-size: inherit;
+ margin: 0;
+}
+
+/* Scribd */
+.scribd_iframe_embed + div {
+ margin-bottom: 28px;
+}
+
+/* Slideshow */
+.entry-content .slideshow-window {
+ border-radius: 0;
+ margin-bottom: 1.75em;
+}
+
+/* Subscription Form */
+.entry-content .jetpack_subscription_widget {
+ border-top: 0;
+ font-size: inherit;
+ margin-bottom: 1.75em;
+ padding: 0;
+}
+
+.entry-content #subscribe-email input {
+ font-size: inherit;
+ line-height: normal;
+ padding: 0.625em 0.4375em;
+ width: 100%;
+}
+
+.entry-content .jetpack_subscription_widget input[type="submit"] {
+ font-size: inherit;
+ padding: 0.84375em 0.875em 0.78125em;
+}
+
+/* Testimonial */
+.entry-content .testimonial-entry {
+ margin-bottom: 1.75em;
+}
+
+.entry-content .testimonial-entry-content {
+ margin: 0;
+}
+
+.entry-content .testimonial-entry-title,
+.entry-content .testimonial-entry-content p {
+ font-size: 13px;
+ font-size: 0.8125em;
+ line-height: 1.615384615;
+ margin: 0;
+}
+
+.entry-content .testimonial-entry-content p {
+ margin-bottom: 1.615384615em;
+}
+
+.entry-content .testimonial-entry-title {
+ float: left;
+}
+
+.entry-content .testimonial-entry-title a {
+ box-shadow: none;
+}
+
+.entry-content .testimonial-entry-title a:hover {
+ box-shadow: 0 1px 0 0 currentColor;
+}
+
+.entry-content .testimonial-featured-image img {
+ float: right;
+ max-width: 42px;
+}
+
+/* Twitter-timeline */
+.twitter-timeline {
+ margin-bottom: 1.75em !important;
+}
+
+
+/**
+ * Responsive Videos
+ */
+.hentry .jetpack-video-wrapper {
+ margin-bottom: 1.75em;
+}
+
+
+/**
+ * Related Posts
+ */
+
+.entry-content #jp-relatedposts {
+ margin: 0;
+ padding: 1.75em 0;
+ position: relative;
+}
+
+.jp-relatedposts:before,
+.jp-relatedposts:last-child:after {
+ background-color: currentColor;
+ content: "";
+ height: 1px;
+ opacity: 0.2;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.jp-relatedposts:last-child:after {
+ bottom: 0;
+ top: auto;
+}
+
+.entry-content #jp-relatedposts h3.jp-relatedposts-headline {
+ color: inherit;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: 13px;
+ font-size: 0.8125rem;
+ font-weight: 400;
+ line-height: 1;
+ margin-bottom: 1.076923077em;
+}
+
+.entry-content #jp-relatedposts h3.jp-relatedposts-headline em:before {
+ display: none;
+}
+
+.entry-content #jp-relatedposts h3.jp-relatedposts-headline em {
+ font-weight: 400;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-headline em:after {
+ content: ":";
+}
+
+.jp-relatedposts-items:before,
+.jp-relatedposts-items:after {
+ content: "";
+ display: table;
+}
+
+.jp-relatedposts-items:after {
+ clear: both;
+}
+
+.entry-content .jp-relatedposts-post-aoverlay,
+.entry-content .jp-relatedposts-post-a {
+ box-shadow: none;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
+ margin-bottom: 1.75em;
+ width: 100%;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:last-child {
+ margin-bottom: 0;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span {
+ max-width: 100%;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items p,
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title {
+ font-size: 13px;
+ font-size: 0.8125rem;
+ letter-spacing: 0;
+ line-height: 1.615384615;
+}
+
+.jp-relatedposts-post-date,
+.jp-relatedposts-post-context {
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+}
+
+.jp-relatedposts-post-title,
+#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post-excerpt,
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title {
+ margin-bottom: 1.076923077em;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a {
+ font-weight: 700;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover,
+.entry-content .jp-relatedposts-post-aoverlay:hover + .jp-relatedposts-post-title .jp-relatedposts-post-a {
+ box-shadow: 0 1px 0 0 currentColor;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover,
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post:hover .jp-relatedposts-post-title a {
+ text-decoration: none;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date,
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context,
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post {
+ opacity: 1;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post {
+ padding-right: 0;
+}
+
+.entry-content .jp-relatedposts-post-a:hover img.jp-relatedposts-post-img,
+.entry-content .jp-relatedposts-post-a:focus img.jp-relatedposts-post-img {
+ opacity: 0.85;
+}
+
+.entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img {
+ margin-bottom: 0.875em;
+ max-width: 100%;
+}
+
+
+/**
+ * Sharing
+ */
+
+.sharedaddy {
+ padding: 1.75em 0;
+ position: relative;
+}
+
+.sharedaddy:before,
+.sharedaddy:last-child:after {
+ background-color: currentColor;
+ content: "";
+ height: 1px;
+ opacity: 0.2;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.sharedaddy:last-child:after {
+ bottom: 0;
+ top: auto;
+}
+
+.sd-block {
+ line-height: 1;
+}
+
+.sd-like {
+ padding-bottom: 1.125em;
+}
+
+.hentry div.sharedaddy h3.sd-title,
+.hentry h3.sd-title {
+ color: inherit;
+ font-family: Montserrat, "Helvetica Neue", sans-serif;
+ font-size: 13px;
+ font-size: 0.8125rem;
+ font-weight: 400;
+ line-height: 1;
+ margin-bottom: 1.076923077em;
+}
+
+.hentry div.sharedaddy h3.sd-title:before {
+ display: none;
+}
+
+.sd-social-icon-text .sd-content ul,
+.sd-social-text .sd-content ul {
+ margin-bottom: -0.3125em !important;
+}
+
+.sd-social-icon .sd-content ul {
+ margin-bottom: 0 !important;
+}
+
+.sd-social-official .sd-content ul {
+ margin-bottom: -0.625em !important;
+}
+
+.hentry #sharing_email .sharing_send,
+.hentry .sd-content ul li .option a.share-ustom,
+.hentry .sd-content ul li a.sd-button,
+.hentry .sd-content ul li.advanced a.share-more,
+.hentry .sd-content ul li.preview-item div.option.option-smart-off a,
+.hentry .sd-social-icon .sd-content ul li a.sd-button,
+.hentry .sd-social-icon-text .sd-content ul li a.sd-button,
+.hentry .sd-social-official .sd-content > ul > li .digg_button > a,
+.hentry .sd-social-official .sd-content > ul > li > a.sd-button,
+.hentry .sd-social-text .sd-content ul li a.sd-button {
+ box-shadow: none;
+}
+
+
+/**
+ * Stats
+ */
+
+#wpstats {
+ display: none;
+}
+
+
+/**
+ * Tiled gallery
+ */
+
+.entry-content .tiled-gallery {
+ margin-bottom: 1.75em;
+}
+
+
+/**
+ * Media Queries
+ */
+
+@media screen and (min-width: 56.875em) {
+ .widget-area .jetpack_subscription_widget #subscribe-email input {
+ padding: 0.4615384615em 0.5384615385em;
+ }
+
+ .widget_contact_info .contact-map {
+ margin-bottom: 1.615384615em;
+ }
+
+ .widget_jetpack_display_posts_widget .jetpack-display-remote-posts h4,
+ .widget_jetpack_display_posts_widget .jetpack-display-remote-posts img {
+ margin-bottom: 1.076923077em;
+ }
+
+ .widget_jetpack_display_posts_widget .jetpack-display-remote-posts p {
+ line-height: 1.615384615em !important;
+ margin: 0 0 1.615384615em !important;
+ }
+
+ .widget_goodreads div[class^="gr_custom_each_container"] {
+ margin-bottom: 1.615384615em;
+ }
+
+ .widget-area .widget-grofile h4 {
+ margin: 1.615384615em 0 0;
+ }
+
+ .widget-area .widget-grofile .grofile-accounts {
+ margin-top: 0.538461538em;
+ }
+
+ .widget.widget_wpcom_social_media_icons_widget ul {
+ margin: 0 0 -0.538461538em;
+ }
+
+ .widget.widget_wpcom_social_media_icons_widget li {
+ margin: 0 0.538461538em 0.538461538em 0;
+ }
+
+ .widget_top-posts .widgets-list-layout .widgets-list-layout-blavatar {
+ margin-top: 0.153846154em;
+ }
+
+ .widget_top-posts .widgets-list-layout-links {
+ width: -webkit-calc(100% - 4.153846154em);
+ width: calc(100% - 4.153846154em);
+ }
+
+ .widget_top-posts .widgets-list-layout li {
+ margin-bottom: 1.076923077em;
+ }
+
+ .widget_upcoming_events_widget .upcoming-events li {
+ margin-bottom: 1.076923077em
+ }
+
+ .entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post {
+ margin-bottom: 0;
+ padding-right: 0.875em;
+ width: 33%;
+ }
+}
+
+@media screen and (min-width: 61.5625em) {
+ body:not(.search-results) article:not(.type-page) .sharedaddy:last-child,
+ body:not(.search-results) article:not(.type-page) .jp-relatedposts:last-child {
+ padding-bottom: 0;
+ }
+
+ body:not(.search-results) article:not(.type-page) .sharedaddy:last-child:after,
+ body:not(.search-results) article:not(.type-page) .jp-relatedposts:last-child:after {
+ display: none;
+ }
+
+ body:not(.search-results) article:not(.type-page) img.below-entry-meta {
+ width: auto;
+ }
+}
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php
new file mode 100644
index 00000000..7cf80f66
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Jetpack Compatibility File
+ * See: http://jetpack.me/
+ */
+
+function twentysixteen_jetpack_setup() {
+ /**
+ * Add theme support for Responsive Videos.
+ */
+ add_theme_support( 'jetpack-responsive-videos' );
+}
+add_action( 'after_setup_theme', 'twentysixteen_jetpack_setup' );
+
+function twentysixteen_init_jetpack() {
+ /**
+ * Add our compat CSS file for custom widget stylings and such.
+ * Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production
+ * or skip it entirely for wpcom.
+ */
+ $version = false;
+ if ( method_exists( 'Jetpack', 'is_development_version' ) ) {
+ $version = Jetpack::is_development_version() ? filemtime( plugin_dir_path( __FILE__ ) . 'twentysixteen.css' ) : JETPACK__VERSION;
+ }
+ wp_enqueue_style( 'twentysixteen-jetpack', plugins_url( 'twentysixteen.css', __FILE__ ), array(), $version );
+ wp_style_add_data( 'twentysixteen-jetpack', 'rtl', 'replace' );
+}
+add_action( 'init', 'twentysixteen_init_jetpack' );
+
+/**
+ * Alter gallery widget default width.
+ */
+function twentysixteen_gallery_widget_content_width( $width ) {
+ return 390;
+}
+add_filter( 'gallery_widget_content_width', 'twentysixteen_gallery_widget_content_width' );
+
+/**
+ * Remove ratings from excerpts that are used as intro on blog index, single, and archive pages.
+ */
+function twentysixteen_remove_share() {
+ if ( is_single() || is_archive() || is_home() ) {
+ remove_filter( 'the_excerpt', 'sharing_display', 19 );
+ if ( class_exists( 'Jetpack_Likes' ) ) {
+ remove_filter( 'the_excerpt', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
+ }
+ }
+}
+add_action( 'loop_start', 'twentysixteen_remove_share' );
diff --git a/plugins/jetpack/modules/theme-tools/featured-content.php b/plugins/jetpack/modules/theme-tools/featured-content.php
index 3c3bc0be..c80149aa 100644
--- a/plugins/jetpack/modules/theme-tools/featured-content.php
+++ b/plugins/jetpack/modules/theme-tools/featured-content.php
@@ -106,6 +106,8 @@ class Featured_Content {
add_action( 'switch_theme', array( __CLASS__, 'switch_theme' ) );
add_action( 'switch_theme', array( __CLASS__, 'delete_transient' ) );
add_action( 'wp_loaded', array( __CLASS__, 'wp_loaded' ) );
+ add_action( 'split_shared_term', array( __CLASS__, 'jetpack_update_featured_content_for_split_terms', 10, 4 ) );
+
if ( isset( $theme_support[0]['additional_post_types'] ) ) {
$theme_support[0]['post_types'] = array_merge( array( 'post' ), (array) $theme_support[0]['additional_post_types'] );
@@ -179,7 +181,19 @@ class Featured_Content {
// Return array of cached results if they exist.
$featured_ids = get_transient( 'featured_content_ids' );
if ( ! empty( $featured_ids ) ) {
- return array_map( 'absint', apply_filters( 'featured_content_post_ids', (array) $featured_ids ) );
+ return array_map(
+ 'absint',
+ /**
+ * Filter the list of Featured Posts IDs.
+ *
+ * @module theme-tools
+ *
+ * @since 2.7.0
+ *
+ * @param array $featured_ids Array of post IDs.
+ */
+ apply_filters( 'featured_content_post_ids', (array) $featured_ids )
+ );
}
$settings = self::get_setting();
@@ -192,6 +206,7 @@ class Featured_Content {
if ( $term ) {
$tag = $term->term_id;
} else {
+ /** This action is documented in modules/theme-tools/featured-content.php */
return apply_filters( 'featured_content_post_ids', array() );
}
@@ -212,8 +227,10 @@ class Featured_Content {
) );
// Return empty array if no featured content exists.
- if ( ! $featured )
+ if ( ! $featured ) {
+ /** This action is documented in modules/theme-tools/featured-content.php */
return apply_filters( 'featured_content_post_ids', array() );
+ }
// Ensure correct format before save/return.
$featured_ids = wp_list_pluck( (array) $featured, 'ID' );
@@ -221,6 +238,7 @@ class Featured_Content {
set_transient( 'featured_content_ids', $featured_ids );
+ /** This action is documented in modules/theme-tools/featured-content.php */
return apply_filters( 'featured_content_post_ids', $featured_ids );
}
@@ -411,7 +429,7 @@ class Featured_Content {
*/
public static function register_setting() {
add_settings_field( 'featured-content', __( 'Featured Content', 'jetpack' ), array( __class__, 'render_form' ), 'reading' );
-
+
// Register sanitization callback for the Customizer.
register_setting( 'featured-content', 'featured-content', array( __class__, 'validate_settings' ) );
}
@@ -502,6 +520,22 @@ class Featured_Content {
public static function get_setting( $key = 'all' ) {
$saved = (array) get_option( 'featured-content' );
+ /**
+ * Filter Featured Content's default settings.
+ *
+ * @module theme-tools
+ *
+ * @since 2.7.0
+ *
+ * @param array $args {
+ * Array of Featured Content Settings
+ *
+ * @type int hide-tag Default is 1.
+ * @type int tag-id Default is 0.
+ * @type string tag-name Default is empty.
+ * @type int show-all Default is 0.
+ * }
+ */
$defaults = apply_filters( 'featured_content_default_settings', array(
'hide-tag' => 1,
'tag-id' => 0,
@@ -574,6 +608,17 @@ class Featured_Content {
update_option( 'featured-content', $option );
}
}
+
+ public static function jetpack_update_featured_content_for_split_terms( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
+ $featured_content_settings = get_option( 'featured-content', array() );
+
+ // Check to see whether the stored tag ID is the one that's just been split.
+ if ( isset( $featured_content_settings['tag-id'] ) && $old_term_id == $featured_content_settings['tag-id'] && 'post_tag' == $taxonomy ) {
+ // We have a match, so we swap out the old tag ID for the new one and resave the option.
+ $featured_content_settings['tag-id'] = $new_term_id;
+ update_option( 'featured-content', $featured_content_settings );
+ }
+ }
}
Featured_Content::setup();
diff --git a/plugins/jetpack/modules/theme-tools/infinite-scroll.php b/plugins/jetpack/modules/theme-tools/infinite-scroll.php
index 70f469e6..d129e06c 100644
--- a/plugins/jetpack/modules/theme-tools/infinite-scroll.php
+++ b/plugins/jetpack/modules/theme-tools/infinite-scroll.php
@@ -20,6 +20,7 @@ function jetpack_load_infinite_scroll_annotation() {
if ( ! is_a( $theme, 'WP_Theme' ) && ! is_array( $theme ) )
return;
+ /** This filter is already documented in modules/infinite-scroll/infinity.php */
$customization_file = apply_filters( 'infinite_scroll_customization_file', dirname( __FILE__ ) . "/infinite-scroll/themes/{$theme['Stylesheet']}.php", $theme['Stylesheet'] );
if ( is_readable( $customization_file ) ) {
@@ -41,7 +42,7 @@ add_action( 'setup_theme', 'jetpack_load_infinite_scroll_annotation' );
* @filter jetpack_can_activate_infinite-scroll
* @return bool
*/
-function jetpack_can_activate_infinite_scroll( $can_activate ) {
+function jetpack_can_activate_infinite_scroll() {
return (bool) current_theme_supports( 'infinite-scroll' );
}
add_filter( 'jetpack_can_activate_infinite-scroll', 'jetpack_can_activate_infinite_scroll' );
diff --git a/plugins/jetpack/modules/theme-tools/random-redirect.php b/plugins/jetpack/modules/theme-tools/random-redirect.php
index 85984712..82990ec3 100644
--- a/plugins/jetpack/modules/theme-tools/random-redirect.php
+++ b/plugins/jetpack/modules/theme-tools/random-redirect.php
@@ -50,7 +50,7 @@ function jetpack_matt_random_redirect() {
$random_cat_id = (int) $_GET['random_cat_id'];
// Change the post type if the parameter is set.
- if ( isset( $_GET['random_post_type'] ) && post_type_exists( $_GET['random_post_type'] ) )
+ if ( isset( $_GET['random_post_type'] ) && post_type_exists( $_GET['random_post_type'] ) )
$post_type = $_GET['random_post_type'];
global $wpdb;
diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos.php b/plugins/jetpack/modules/theme-tools/responsive-videos.php
index 5e31b66c..9bc4b2e4 100644
--- a/plugins/jetpack/modules/theme-tools/responsive-videos.php
+++ b/plugins/jetpack/modules/theme-tools/responsive-videos.php
@@ -11,12 +11,14 @@ function jetpack_responsive_videos_init() {
/* If the theme does support 'jetpack-responsive-videos', wrap the videos */
add_filter( 'wp_video_shortcode', 'jetpack_responsive_videos_embed_html' );
- add_filter( 'embed_oembed_html', 'jetpack_responsive_videos_embed_html' );
add_filter( 'video_embed_html', 'jetpack_responsive_videos_embed_html' );
+ /* Only wrap oEmbeds if video */
+ add_filter( 'embed_oembed_html', 'jetpack_responsive_videos_maybe_wrap_oembed', 10, 2 );
+ add_filter( 'embed_handler_html', 'jetpack_responsive_videos_maybe_wrap_oembed', 10, 2 );
+
/* Wrap videos in Buddypress */
add_filter( 'bp_embed_oembed_html', 'jetpack_responsive_videos_embed_html' );
-
}
add_action( 'after_setup_theme', 'jetpack_responsive_videos_init', 99 );
@@ -31,10 +33,71 @@ function jetpack_responsive_videos_embed_html( $html ) {
}
if ( defined( 'SCRIPT_DEBUG' ) && true == SCRIPT_DEBUG ) {
- wp_enqueue_script( 'jetpack-responsive-videos-script', plugins_url( 'responsive-videos/responsive-videos.js', __FILE__ ), array( 'jquery' ), '1.1', true );
+ wp_enqueue_script( 'jetpack-responsive-videos-script', plugins_url( 'responsive-videos/responsive-videos.js', __FILE__ ), array( 'jquery' ), '1.2', true );
} else {
- wp_enqueue_script( 'jetpack-responsive-videos-min-script', plugins_url( 'responsive-videos/responsive-videos.min.js', __FILE__ ), array( 'jquery' ), '1.1', true );
+ wp_enqueue_script( 'jetpack-responsive-videos-min-script', plugins_url( 'responsive-videos/responsive-videos.min.js', __FILE__ ), array( 'jquery' ), '1.2', true );
}
+ // Enqueue CSS to ensure compatibility with all themes
+ wp_enqueue_style( 'jetpack-responsive-videos-style', plugins_url( 'responsive-videos/responsive-videos.css', __FILE__ ) );
+
return '<div class="jetpack-video-wrapper">' . $html . '</div>';
}
+
+/**
+ * Check if oEmbed is a `$video_patterns` provider video before wrapping.
+ *
+ * @return string
+ */
+function jetpack_responsive_videos_maybe_wrap_oembed( $html, $url = null ) {
+ if ( empty( $html ) || ! is_string( $html ) || ! $url ) {
+ return $html;
+ }
+
+ $jetpack_video_wrapper = '<div class="jetpack-video-wrapper">';
+
+ $already_wrapped = strpos( $html, $jetpack_video_wrapper );
+
+ // If the oEmbed has already been wrapped, return the html.
+ if ( false !== $already_wrapped ) {
+ return $html;
+ }
+
+ /**
+ * oEmbed Video Providers.
+ *
+ * A whitelist of oEmbed video provider Regex patterns to check against before wrapping the output.
+ *
+ * @module theme-tools
+ *
+ * @since 3.8.0
+ *
+ * @param array $video_patterns oEmbed video provider Regex patterns.
+ */
+ $video_patterns = apply_filters( 'jetpack_responsive_videos_oembed_videos', array(
+ 'https?://((m|www)\.)?youtube\.com/watch',
+ 'https?://((m|www)\.)?youtube\.com/playlist',
+ 'https?://youtu\.be/',
+ 'https?://(.+\.)?vimeo\.com/',
+ 'https?://(www\.)?dailymotion\.com/',
+ 'https?://dai.ly/',
+ 'https?://(www\.)?hulu\.com/watch/',
+ 'https?://wordpress.tv/',
+ 'https?://(www\.)?funnyordie\.com/videos/',
+ 'https?://vine.co/v/',
+ 'https?://(www\.)?collegehumor\.com/video/',
+ 'https?://(www\.|embed\.)?ted\.com/talks/'
+ ) );
+
+ // Merge patterns to run in a single preg_match call.
+ $video_patterns = '(' . implode( '|', $video_patterns ) . ')';
+
+ $is_video = preg_match( $video_patterns, $url );
+
+ // If the oEmbed is a video, wrap it in the responsive wrapper.
+ if ( false === $already_wrapped && 1 === $is_video ) {
+ return jetpack_responsive_videos_embed_html( $html );
+ }
+
+ return $html;
+}
diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.css b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.css
new file mode 100644
index 00000000..056f1829
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.css
@@ -0,0 +1,10 @@
+.jetpack-video-wrapper {
+ margin-bottom: 1.6em;
+}
+
+.jetpack-video-wrapper > embed,
+.jetpack-video-wrapper > iframe,
+.jetpack-video-wrapper > object,
+.jetpack-video-wrapper > .wp-video {
+ margin-bottom: 0;
+}
diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.js b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.js
index 7b099225..51ac1363 100644
--- a/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.js
+++ b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.js
@@ -38,11 +38,16 @@
* A function to resize videos.
*/
function responsive_videos() {
-
+
$( '.jetpack-video-wrapper' ).find( 'embed, iframe, object' ).each( function() {
- var video_element, video_width, video_height, video_ratio, video_wrapper, container_width;
-
+ var video_element, video_width, video_height, video_ratio, video_wrapper, video_margin, container_width;
+
video_element = $( this );
+ video_margin = 0;
+
+ if ( video_element.parents( '.jetpack-video-wrapper' ).prev( 'p' ).css( 'text-align' ) === 'center' ) {
+ video_margin = '0 auto';
+ }
if ( ! video_element.attr( 'data-ratio' ) ) {
video_element
@@ -51,7 +56,7 @@
.attr( 'data-height', this.height )
.css( {
'display' : 'block',
- 'margin' : 0
+ 'margin' : video_margin
} );
}
@@ -90,4 +95,4 @@
$( window ).load( responsive_videos ).resize( debounce( responsive_videos, 100 ) ).trigger( 'resize' );
$( document ).on( 'post-load', responsive_videos );
-} )( jQuery ); \ No newline at end of file
+} )( jQuery );
diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js
index e6873a34..ee468c33 100644
--- a/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js
+++ b/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.min.js
@@ -1 +1 @@
-!function(t){function a(){t(".jetpack-video-wrapper").find("embed, iframe, object").each(function(){var a=t(this);a.attr("data-ratio")||a.attr("data-ratio",this.height/this.width).attr("data-width",this.width).attr("data-height",this.height).css({display:"block",margin:0});var i=a.attr("data-width"),e=a.attr("data-height"),r=a.attr("data-ratio"),h=a.parent(),n=h.width();"Infinity"===r&&(i="100%"),a.removeAttr("height").removeAttr("width"),i>n?a.width(n).height(n*r):a.width(i).height(e)})}var i=function(t,a){var i,e,r,h;return function(){r=this,e=[].slice.call(arguments,0),h=new Date;var n=function(){var d=new Date-h;a>d?i=setTimeout(n,a-d):(i=null,t.apply(r,e))};i||(i=setTimeout(n,a))}};t(window).load(a).resize(i(a,100)).trigger("resize"),t(document).on("post-load",a)}(jQuery); \ No newline at end of file
+!function(t){function a(){t(".jetpack-video-wrapper").find("embed, iframe, object").each(function(){var a,e,i,r,h,n,d;a=t(this),n=0,"center"===a.parents(".jetpack-video-wrapper").prev("p").css("text-align")&&(n="0 auto"),a.attr("data-ratio")||a.attr("data-ratio",this.height/this.width).attr("data-width",this.width).attr("data-height",this.height).css({display:"block",margin:n}),e=a.attr("data-width"),i=a.attr("data-height"),r=a.attr("data-ratio"),h=a.parent(),d=h.width(),"Infinity"===r&&(e="100%"),a.removeAttr("height").removeAttr("width"),e>d?a.width(d).height(d*r):a.width(e).height(i)})}var e=function(t,a){var e,i,r,h;return function(){r=this,i=[].slice.call(arguments,0),h=new Date;var n=function(){var d=new Date-h;a>d?e=setTimeout(n,a-d):(e=null,t.apply(r,i))};e||(e=setTimeout(n,a))}};t(window).load(a).resize(e(a,100)).trigger("resize"),t(document).on("post-load",a)}(jQuery);
diff --git a/plugins/jetpack/modules/theme-tools/site-logo.php b/plugins/jetpack/modules/theme-tools/site-logo.php
index cbab78e4..410344fc 100644
--- a/plugins/jetpack/modules/theme-tools/site-logo.php
+++ b/plugins/jetpack/modules/theme-tools/site-logo.php
@@ -1,14 +1,21 @@
<?php
/*
- * Plugin Name: Site Logo
- * Plugin URI: http://wordpress.com
- * Description: Add a logo to your WordPress site. Set it once, and all themes that support it will display it automatically.
- * Author: Automattic
- * Version: 1.0
- * Author URI: http://wordpress.com
- * License: GPL2 or later
- * Text Domain: site-logo
- * Domain Path: /languages/
+ * Site Logo.
+ * @see http://jetpack.me/support/site-logo/
+ *
+ * This feature will only be activated for themes that declare their support.
+ * This can be done by adding code similar to the following during the
+ * 'after_setup_theme' action:
+ *
+ * $args = array(
+ * 'header-text' => array(
+ * 'site-title',
+ * 'site-description',
+ * ),
+ * 'size' => 'medium',
+ * );
+ * add_theme_support( 'site-logo', $args );
+ *
*/
/**
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php b/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php
index 23a8f23e..2117bf88 100644
--- a/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php
+++ b/plugins/jetpack/modules/theme-tools/site-logo/inc/functions.php
@@ -31,6 +31,51 @@ function jetpack_get_site_logo( $show = 'url' ) {
}
/**
+ * Retrieve an array of the dimensions of the Site Logo.
+ *
+ * @uses Site_Logo::theme_size()
+ * @uses get_option( 'thumbnail_size_w' )
+ * @uses get_option( 'thumbnail_size_h' )
+ * @uses global $_wp_additional_image_sizes;
+ *
+ * @since 3.6.0
+ *
+ * @return array $dimensions {
+ * An array of dimensions of the Site Logo.
+ *
+ * @type string $width Width of the logo in pixels.
+ * @type string $height Height of the logo in pixels.
+ * }
+ */
+function jetpack_get_site_logo_dimensions() {
+ // Get the image size to use with the logo.
+ $size = site_logo()->theme_size();
+
+ // If the size is the default `thumbnail`, get its dimensions. Otherwise, get them from $_wp_additional_image_sizes
+ if ( empty( $size ) ) {
+ return false;
+ } else if ( 'thumbnail' == $size ) {
+ $dimensions = array(
+ 'width' => get_option( 'thumbnail_size_w' ),
+ 'height' => get_option( 'thumbnail_size_h' ),
+ );
+ } else {
+ global $_wp_additional_image_sizes;
+
+ if ( ! isset( $_wp_additional_image_sizes[ $size ] ) ) {
+ return false;
+ }
+
+ $dimensions = array(
+ 'width' => $_wp_additional_image_sizes[ $size ][ 'width' ],
+ 'height' => $_wp_additional_image_sizes[ $size ][ 'height' ],
+ );
+ }
+
+ return $dimensions;
+}
+
+/**
* Determine if a site logo is assigned or not.
*
* @uses get_option
@@ -87,6 +132,17 @@ function jetpack_the_site_logo() {
);
}
+ /**
+ * Filter the Site Logo output.
+ *
+ * @module theme-tools
+ *
+ * @since 3.2.0
+ *
+ * @param string $html Site Logo HTML output.
+ * @param array $logo Array of Site Logo details.
+ * @param string $size Size specified in add_theme_support declaration, or 'thumbnail' default.
+ */
echo apply_filters( 'jetpack_the_site_logo', $html, $logo, $size );
}
diff --git a/plugins/jetpack/modules/theme-tools/social-links.php b/plugins/jetpack/modules/theme-tools/social-links.php
index 53a64b87..671f58f6 100644
--- a/plugins/jetpack/modules/theme-tools/social-links.php
+++ b/plugins/jetpack/modules/theme-tools/social-links.php
@@ -18,6 +18,8 @@ function jetpack_theme_supports_social_links() {
}
add_action( 'init', 'jetpack_theme_supports_social_links', 30 );
+if ( ! class_exists( 'Social_Links' ) ) {
+
class Social_Links {
/**
@@ -224,8 +226,10 @@ class Social_Links {
/**
* Back-compat function for versions prior to 4.0.
*/
- private function is_customize_preview() {
- global $wp_customize;
- return is_a( $wp_customize, 'WP_Customize_Manager' ) && $wp_customize->is_preview();
- }
+ private function is_customize_preview() {
+ global $wp_customize;
+ return is_a( $wp_customize, 'WP_Customize_Manager' ) && $wp_customize->is_preview();
+ }
}
+
+} // end if ( ! class_exists( 'Social_Links' )
diff --git a/plugins/jetpack/modules/theme-tools/social-menu.php b/plugins/jetpack/modules/theme-tools/social-menu.php
new file mode 100644
index 00000000..923d9448
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/social-menu.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Social Menu.
+ *
+ * This feature will only be activated for themes that declare their support.
+ * This can be done by adding code similar to the following during the
+ * 'after_setup_theme' action:
+ *
+ * add_theme_support( 'jetpack-social-menu' );
+ */
+
+/**
+ * Activate the Social Menu plugin.
+ *
+ * @uses current_theme_supports()
+ */
+function jetpack_social_menu_init() {
+ // Only load our code if our theme declares support
+ if ( ! current_theme_supports( 'jetpack-social-menu' ) ) {
+ return;
+ }
+
+ /*
+ * Social Menu description.
+ *
+ * Rename the social menu description.
+ *
+ * @module theme-tools
+ *
+ * @since 3.9.0
+ *
+ * @param string $social_menu_description Social Menu description
+ */
+ $social_menu_description = apply_filters( 'jetpack_social_menu_description', __( 'Social Menu', 'jetpack' ) );
+
+ // Register a new menu location
+ register_nav_menus( array(
+ 'jetpack-social-menu' => esc_html( $social_menu_description ),
+ ) );
+
+ // Enqueue CSS
+ add_action( 'wp_enqueue_scripts', 'jetpack_social_menu_style' );
+}
+add_action( 'after_setup_theme', 'jetpack_social_menu_init', 99 );
+
+/* Function to enqueue CSS */
+function jetpack_social_menu_style() {
+ if ( has_nav_menu( 'jetpack-social-menu' ) ) {
+ wp_enqueue_style( 'jetpack-social-menu', plugins_url( 'social-menu/social-menu.css', __FILE__ ), array( 'genericons' ), '1.0' );
+ }
+}
+
+/* Create the function */
+function jetpack_social_menu() {
+ if ( has_nav_menu( 'jetpack-social-menu' ) ) : ?>
+ <nav class="jetpack-social-navigation" role="navigation">
+ <?php
+ wp_nav_menu( array(
+ 'theme_location' => 'jetpack-social-menu',
+ 'link_before' => '<span class="screen-reader-text">',
+ 'link_after' => '</span>',
+ 'depth' => 1,
+ ) );
+ ?>
+ </nav><!-- .jetpack-social-navigation -->
+ <?php endif;
+}
diff --git a/plugins/jetpack/modules/theme-tools/social-menu/social-menu.css b/plugins/jetpack/modules/theme-tools/social-menu/social-menu.css
new file mode 100644
index 00000000..4ad100af
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/social-menu/social-menu.css
@@ -0,0 +1,180 @@
+.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: normal;
+ height: 1em;
+ line-height: 1;
+ speak: none;
+ text-decoration: inherit;
+ vertical-align: top;
+ width: 1em;
+}
+
+/* Default */
+.jetpack-social-navigation a:before {
+ content: "\f415";
+}
+
+/* CodePen */
+.jetpack-social-navigation a[href*="codepen.io"]:before {
+ content: "\f216";
+}
+
+/* Digg */
+.jetpack-social-navigation a[href*="digg.com"]:before {
+ content: "\f221";
+}
+
+/* Dribbble */
+.jetpack-social-navigation a[href*="dribbble.com"]:before {
+ content: "\f201";
+}
+
+/* Dropbox */
+.jetpack-social-navigation a[href*="dropbox.com"]:before {
+ content: "\f225";
+}
+
+/* Email */
+.jetpack-social-navigation a[href*="mailto:"]:before {
+ content: "\f410";
+}
+
+/* Facebook */
+.jetpack-social-navigation a[href*="facebook.com"]:before {
+ content: "\f203";
+}
+
+/* Flickr */
+.jetpack-social-navigation a[href*="flickr.com"]:before {
+ content: "\f211";
+}
+
+/* Foursquare */
+.jetpack-social-navigation a[href*="foursquare.com"]:before {
+ content: "\f226";
+}
+
+/* GitHub */
+.jetpack-social-navigation a[href*="github.com"]:before {
+ content: "\f200";
+}
+
+/* Google Plus */
+.jetpack-social-navigation a[href*="plus.google.com"]:before {
+ content: "\f206";
+}
+
+/* Instagram */
+.jetpack-social-navigation a[href*="instagram.com"]:before {
+ content: "\f215";
+}
+
+/* LinkedIn */
+.jetpack-social-navigation a[href*="linkedin.com"]:before {
+ content: "\f208";
+}
+
+/* Path */
+.jetpack-social-navigation a[href*="path.com"]:before {
+ content: "\f219";
+}
+
+/* Pinterest */
+.jetpack-social-navigation a[href*="pinterest.com"]:before {
+ content: "\f210";
+}
+
+/* Pocket */
+.jetpack-social-navigation a[href*="getpocket.com"]:before {
+ content: "\f224";
+}
+
+/* Polldaddy */
+.jetpack-social-navigation a[href*="polldaddy.com"]:before {
+ content: "\f217";
+}
+
+/* Reddit */
+.jetpack-social-navigation a[href*="reddit.com"]:before {
+ content: "\f222";
+}
+
+/* RSS Feed */
+.jetpack-social-navigation a[href$="/feed/"]:before {
+ content: "\f413";
+}
+
+/* Skype */
+.jetpack-social-navigation a[href*="skype:"]:before {
+ content: "\f220";
+}
+
+/* Spotify */
+.jetpack-social-navigation a[href*="spotify.com"]:before {
+ content: "\f515";
+}
+
+/* StumbleUpon */
+.jetpack-social-navigation a[href*="stumbleupon.com"]:before {
+ content: "\f223";
+}
+
+/* Tumblr */
+.jetpack-social-navigation a[href*="tumblr.com"]:before {
+ content: "\f214";
+}
+
+/* Twitch */
+.jetpack-social-navigation a[href*="twitch.tv"]:before {
+ content: "\f516";
+}
+
+/* Twitter */
+.jetpack-social-navigation a[href*="twitter.com"]:before {
+ content: "\f202";
+}
+
+/* Vimeo */
+.jetpack-social-navigation a[href*="vimeo.com"]:before {
+ content: "\f212";
+}
+
+/* Vine */
+.jetpack-social-navigation a[href*="vine.co"]:before {
+ content: "\f517";
+}
+
+/* WordPress */
+.jetpack-social-navigation a[href*="wordpress.com"]:before,
+.jetpack-social-navigation a[href*="wordpress.org"]:before {
+ content: "\f205";
+}
+
+/* YouTube */
+.jetpack-social-navigation a[href*="youtube.com"]:before {
+ content: "\f213";
+} \ No newline at end of file
diff --git a/plugins/jetpack/modules/tiled-gallery.php b/plugins/jetpack/modules/tiled-gallery.php
index 1dc7ae23..c79313c4 100644
--- a/plugins/jetpack/modules/tiled-gallery.php
+++ b/plugins/jetpack/modules/tiled-gallery.php
@@ -8,6 +8,7 @@
* Auto Activate: No
* Module Tags: Photos and Videos
* Sort Order: 24
+ * Additional Search Queries: gallery, tiles, tiled, grid, mosaic, images
*/
function jetpack_load_tiled_gallery() {
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php b/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
index 7cf17cc3..ee7a0c54 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
@@ -107,10 +107,25 @@ class Jetpack_Tiled_Gallery {
if ( empty( $attachments ) )
return '';
- if ( is_feed() || defined( 'IS_HTML_EMAIL' ) )
+ if ( is_feed() || defined( 'IS_HTML_EMAIL' ) ) {
return '';
+ }
- if ( in_array( $this->atts['type'], self::$talaveras ) ) {
+ if (
+ in_array(
+ $this->atts['type'],
+ /**
+ * Filters the permissible Tiled Gallery types.
+ *
+ * @module tiled-gallery
+ *
+ * @since 3.7.0
+ *
+ * @param array Array of allowed types. Default: 'rectangular', 'square', 'circle', 'rectangle', 'columns'.
+ */
+ $talaveras = apply_filters( 'jetpack_tiled_gallery_types', self::$talaveras )
+ )
+ ) {
// Enqueue styles and scripts
self::default_scripts_and_styles();
@@ -138,6 +153,17 @@ class Jetpack_Tiled_Gallery {
if ( ! isset( $shortcode_tags[ 'gallery' ] ) || $shortcode_tags[ 'gallery' ] !== 'gallery_shortcode' ) {
$redefined = true;
}
+ /**
+ * Filter the output of the check for another plugin or theme affecting WordPress galleries.
+ *
+ * This will let folks that replace core’s shortcode confirm feature parity with it, so Jetpack's Tiled Galleries can still work.
+ *
+ * @module tiled-gallery
+ *
+ * @since 3.1.0
+ *
+ * @param bool $redefined Does another plugin or theme already redefines the default WordPress gallery?
+ */
return apply_filters( 'jetpack_tiled_gallery_shortcode_redefined', $redefined );
}
@@ -155,6 +181,15 @@ class Jetpack_Tiled_Gallery {
if ( ! $tiled_gallery_content_width )
$tiled_gallery_content_width = 500;
+ /**
+ * Filter overwriting the default content width.
+ *
+ * @module tiled-gallery
+ *
+ * @since 2.1.0
+ *
+ * @param string $tiled_gallery_content_width Default Tiled Gallery content width.
+ */
return apply_filters( 'tiled_gallery_content_width', $tiled_gallery_content_width );
}
@@ -177,7 +212,7 @@ class Jetpack_Tiled_Gallery {
return $types;
}
- function jetpack_default_gallery_type( $default ) {
+ function jetpack_default_gallery_type() {
return ( get_option( 'tiled_galleries' ) ? 'rectangular' : 'default' );
}
@@ -210,4 +245,3 @@ class Jetpack_Tiled_Gallery {
}
add_action( 'init', array( 'Jetpack_Tiled_Gallery', 'init' ) );
-
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/rtl/tiled-gallery-rtl.css b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/rtl/tiled-gallery-rtl.css
index a91af001..f5cab8ea 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/rtl/tiled-gallery-rtl.css
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/rtl/tiled-gallery-rtl.css
@@ -1,4 +1,4 @@
-/* This file was automatically generated on May 26 2014 22:30:22 */
+/* This file was automatically generated on Oct 01 2015 20:17:19 */
/* =Tiled Gallery Default Styles
-------------------------------------------------------------- */
@@ -27,7 +27,7 @@
.tiled-gallery .tiled-gallery-item a { /* Needs to reset some properties for theme compatibility */
background: transparent;
border: none;
- color: none;
+ color: inherit;
margin: 0;
padding: 0;
text-decoration: none;
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/carousel-image-args.php b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/carousel-image-args.php
index 02c2863f..4898faea 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/carousel-image-args.php
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/carousel-image-args.php
@@ -1,10 +1,16 @@
<?php
+// See https://github.com/Automattic/jetpack/issues/2765
+$fuzzy_image_meta = $item->fuzzy_image_meta();
+if ( isset( $fuzzy_image_meta['keywords'] ) ) {
+ unset( $fuzzy_image_meta['keywords'] );
+}
+
if ( defined( 'JSON_HEX_AMP' ) ) {
// see shortcodes/slideshow.php
// This is nice to have, but not strictly necessary since we use _wp_specialchars() below
- $fuzzy_image_meta = json_encode( array_map( 'strval', $item->fuzzy_image_meta() ), JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );
+ $fuzzy_image_meta = json_encode( array_map( 'strval', $fuzzy_image_meta ), JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );
} else {
- $fuzzy_image_meta = json_encode( array_map( 'strval', $item->fuzzy_image_meta() ) );
+ $fuzzy_image_meta = json_encode( array_map( 'strval', $fuzzy_image_meta ) );
}
?>
data-attachment-id="<?php echo esc_attr( $item->image->ID ); ?>"
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/item.php b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/item.php
index 7e8c8a07..2bbd2ce6 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/item.php
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/item.php
@@ -1,5 +1,11 @@
<?php
-$add_link = 'none' !== $this->link; ?>
+$add_link = 'none' !== $this->link;
+
+// We do this for accessibility. Titles without alt's break screen readers.
+if ( empty( $item->image_alt ) && ! empty( $item->image_title ) ) {
+ $item->image_alt = $item->image_title;
+}
+?>
<div class="tiled-gallery-item<?php if ( isset( $item->size ) ) echo " tiled-gallery-item-$item->size"; ?>">
<?php if ( $add_link ): ?>
<a href="<?php echo $item->link; ?>" border="0">
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery-item.php b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery-item.php
index 355ee406..b6d94c64 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery-item.php
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery-item.php
@@ -7,7 +7,17 @@ abstract class Jetpack_Tiled_Gallery_Item {
$this->grayscale = $grayscale;
$this->image_title = $this->image->post_title;
+
$this->image_alt = get_post_meta( $this->image->ID, '_wp_attachment_image_alt', true );
+ // If no Alt value, use the caption
+ if ( empty( $this->image_alt ) && ! empty( $this->image->post_excerpt ) ) {
+ $this->image_alt = trim( strip_tags( $this->image->post_excerpt ) );
+ }
+ // If still no Alt value, use the title
+ if ( empty( $this->image_alt ) && ! empty( $this->image->post_title ) ) {
+ $this->image_alt = trim( strip_tags( $this->image->post_title ) );
+ }
+
$this->orig_file = wp_get_attachment_url( $this->image->ID );
$this->link = $needs_attachment_link ? get_attachment_link( $this->image->ID ) : $this->orig_file;
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery.css b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery.css
index 09792d30..b4cdc576 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery.css
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery/tiled-gallery.css
@@ -25,7 +25,7 @@
.tiled-gallery .tiled-gallery-item a { /* Needs to reset some properties for theme compatibility */
background: transparent;
border: none;
- color: none;
+ color: inherit;
margin: 0;
padding: 0;
text-decoration: none;
diff --git a/plugins/jetpack/modules/vaultpress.php b/plugins/jetpack/modules/vaultpress.php
index 7fbc6193..927c6c57 100644
--- a/plugins/jetpack/modules/vaultpress.php
+++ b/plugins/jetpack/modules/vaultpress.php
@@ -1,13 +1,15 @@
<?php
/**
- * Module Name: VaultPress
- * Module Description: Protect your site with automatic backups and security scans. (Subscription required.)
+ * Module Name: Data Backups
+ * Module Description: Daily or real-time backups.
* First Introduced: 0:1.2
* Sort Order: 32
* Deactivate: false
* Free: false
* Requires Connection: Yes
* Auto Activate: Yes
+ * Feature: Performance-Security
+ * Additional Search Queries: vaultpress, backup, security
*/
add_action( 'jetpack_modules_loaded', 'vaultpress_jetpack_stub' );
diff --git a/plugins/jetpack/modules/verification-tools.php b/plugins/jetpack/modules/verification-tools.php
index 87d4c0f2..5e3e78b7 100644
--- a/plugins/jetpack/modules/verification-tools.php
+++ b/plugins/jetpack/modules/verification-tools.php
@@ -2,11 +2,12 @@
/**
* Module Name: Site Verification
- * Module Description: Verify your site or domain with Google Webmaster Tools, Pinterest, and others.
+ * Module Description: Verify your site or domain with Google Search Console, Pinterest, and others.
* First Introduced: 3.0
* Sort Order: 33
* Requires Connection: No
* Auto Activate: Yes
+ * Additional Search Queries: webmaster, seo, google, bing, pinterest, search, console
*/
function jetpack_load_verification_tools() {
diff --git a/plugins/jetpack/modules/verification-tools/blog-verification-tools.php b/plugins/jetpack/modules/verification-tools/blog-verification-tools.php
index 4a6bd4fa..7320a8bf 100644
--- a/plugins/jetpack/modules/verification-tools/blog-verification-tools.php
+++ b/plugins/jetpack/modules/verification-tools/blog-verification-tools.php
@@ -4,7 +4,7 @@
function jetpack_verification_services() {
return array(
'google' => array(
- 'name' =>'Google Webmaster Tools',
+ 'name' =>'Google Search Console',
'key' =>'google-site-verification',
'format' =>'dBw5CvburAxi537Rp9qi5uG2174Vb6JwHwIRwPSLIK8',
'url' => 'https://www.google.com/webmasters/tools/',
@@ -37,6 +37,15 @@ function jetpack_verification_print_meta() {
foreach ( jetpack_verification_services() as $name => $service ) {
if ( is_array( $service ) && !empty( $verification_services_codes["$name"] ) ) {
$ver_tag = sprintf( '<meta name="%s" content="%s" />', esc_attr( $service["key"] ), esc_attr( $verification_services_codes["$name"] ) );
+ /**
+ * Filter the meta tag template used for all verification tools.
+ *
+ * @module verification-tools
+ *
+ * @since 3.0.0
+ *
+ * @param string $ver_tag Verification Tool meta tag.
+ */
$ver_output .= apply_filters( 'jetpack_site_verification_output', $ver_tag );
$ver_output .= "\n";
}
@@ -67,6 +76,16 @@ function jetpack_verification_validate( $verification_services_codes ) {
// limit length to 100 chars.
$code = substr( $code, 0, 100 );
+ /**
+ * Fire after each Verification code was validated.
+ *
+ * @module verification-tools
+ *
+ * @since 3.0.0
+ *
+ * @param string $key Verification service name.
+ * @param string $code Verification service code provided in field in the Tools menu.
+ */
do_action( 'jetpack_site_verification_validate', $key, $code );
}
return $verification_services_codes;
@@ -77,33 +96,77 @@ function jetpack_verification_options_form() {
?>
<form method="post" action="options.php">
<?php settings_fields( 'verification_services_codes_fields' ); ?>
- <table class="form-table">
+ <div class="tools-container">
<?php
foreach ( jetpack_verification_services() as $key => $service ) {
- echo "<tr valign='top'>
- <th scope='row'>" . esc_html( $service['name'] ) . "</th>
- <td>
- <input value='" . esc_attr( $verification_services_codes["$key"] ) . "' size='50' name='verification_services_codes[" . esc_attr( $key ) . "]' type='text' />
- </td>
- </tr><tr>
- <td colspan='2'><small>
- <label for='verification_services_codes[" . esc_attr( $key ) . "]'>" . esc_html( __( 'Example:' , 'jetpack' ) ) . " <code>&lt;meta name='" . esc_attr( $service['key'] ) . "' content='<strong>" . esc_attr( $service['format'] ) . "</strong>'&gt;</code></label>
- </small></td>
- </tr>";
+ echo "<div class='jp-verification-service'>
+ <h4>" . esc_html( $service['name'] ) . "</h4>
+ <input value='" . esc_attr( $verification_services_codes["$key"] ) . "' name='verification_services_codes[" . esc_attr( $key ) . "]' type='text' />
+ <small>
+ <label for='verification_services_codes[" . esc_attr( $key ) . "]'>" . esc_html( __( 'Example:' , 'jetpack' ) ) . " <span>&lt;meta name='" . esc_attr( $service['key'] ) . "' content='<strong>" . esc_attr( $service['format'] ) . "</strong>'&gt;</span></label>
+ </small>
+ </div>";
}
?>
- </table>
+ </div>
<p class="submit">
<input type="submit" class="button-primary" value="<?php _e( 'Save Changes' , 'jetpack' ); ?>" />
</p>
</form>
+
+<style>
+/* Jetpack styles aren't loaded in the tools section of the admin, let's save on some http requests and just do an inline block */
+
+ .jp-verification-tools h3 a {
+ text-decoration: none;
+ }
+
+ .jp-verification-service {
+ border-bottom: 1px #f1f1f1 solid;
+ padding-bottom: 20px;
+ }
+
+ .jp-verification-service input[type="text"] {
+ width: 100%;
+ margin-bottom: 10px;
+ }
+
+ .jp-verification-service label {
+ font-size: 13px;
+ }
+
+ /* mimic 'code' tag style, but this allows for better visuals + line breaks on mobile devices */
+ .jp-verification-service span {
+ display: block;
+ margin-top: 5px;
+ font-size: 14px;
+ padding: 10px;
+ background: #f1f1f1;
+ font-family: monospace;
+ word-wrap: break-word;
+ }
+
+ .jp-verification-service strong {
+ font-weight: bold;
+ }
+</style>
+
<?php
}
function jetpack_verification_tool_box() {
global $current_user;
- if ( !apply_filters( 'jetpack_enable_site_verification', true ) )
+ /**
+ * Decide whether Site Verification tools be added to the Tools menu.
+ *
+ * @module verification-tools
+ *
+ * @since 3.0.0
+ *
+ * @param bool true Should the Site Verification tools be added to the Tools menu.
+ */
+ if ( ! apply_filters( 'jetpack_enable_site_verification', true ) )
return;
$list = array();
@@ -113,7 +176,7 @@ function jetpack_verification_tool_box() {
$last = array_pop( $list );
if ( current_user_can( 'manage_options' ) ) {
- echo '<div class="tool-box"><h3 class="title">' . __( 'Website Verification Services' , 'jetpack' ) . ' <a href="http://support.wordpress.com/webmaster-tools/" target="_blank">(?)</a></h3>';
+ echo '<div class="jp-verification-tools card"><h3 class="title">' . __( 'Website Verification Services' , 'jetpack' ) . ' <a href="http://support.wordpress.com/webmaster-tools/" target="_blank">(?)</a></h3>';
echo '<p>' . sprintf( esc_html( __( 'Enter your meta key "content" value to verify your blog with %s' , 'jetpack' ) ), implode( ', ', $list ) ) . ' ' . __( 'and' , 'jetpack' ) . ' ' . $last . '.</p>';
jetpack_verification_options_form();
echo '</div>';
diff --git a/plugins/jetpack/modules/videopress.php b/plugins/jetpack/modules/videopress.php
index f80b74c5..229432a3 100644
--- a/plugins/jetpack/modules/videopress.php
+++ b/plugins/jetpack/modules/videopress.php
@@ -7,6 +7,7 @@
* Requires Connection: Yes
* Sort Order: 27
* Module Tags: Photos and Videos
+ * Additional Search Queries: video, videos, videopress
*/
Jetpack::dns_prefetch( array(
diff --git a/plugins/jetpack/modules/videopress/class.videopress-player.php b/plugins/jetpack/modules/videopress/class.videopress-player.php
index 5242de89..00fa76bf 100644
--- a/plugins/jetpack/modules/videopress/class.videopress-player.php
+++ b/plugins/jetpack/modules/videopress/class.videopress-player.php
@@ -296,6 +296,7 @@ class VideoPress_Player {
* @return string HTML5 video element and children
*/
private function html5_static() {
+ wp_enqueue_script( 'videopress' );
$thumbnail = esc_url( $this->video->poster_frame_uri );
$html = "<video id=\"{$this->video_id}\" width=\"{$this->video->calculated_width}\" height=\"{$this->video->calculated_height}\" poster=\"$thumbnail\" controls=\"true\"";
if ( isset( $this->options['autoplay'] ) && $this->options['autoplay'] === true )
@@ -332,13 +333,37 @@ class VideoPress_Player {
/**
* Click to play dynamic HTML5-capable player.
- * The player displays a video preview section including poster frame, video title, play button and watermark on the original page load and calculates the playback capabilities of the browser. The video player is loaded when the visitor clicks on the video preview area.
- * If Flash Player 10 or above is available the browser will display the Flash version of the video. If HTML5 video appears to be supported and the browser may be capable of MP4 (H.264, AAC) or OGV (Theora, Vorbis) playback the browser will display its native HTML5 player.
+ * The player displays a video preview section including poster frame,
+ * video title, play button and watermark on the original page load
+ * and calculates the playback capabilities of the browser. The video player
+ * is loaded when the visitor clicks on the video preview area.
+ * If Flash Player 10 or above is available the browser will display
+ * the Flash version of the video. If HTML5 video appears to be supported
+ * and the browser may be capable of MP4 (H.264, AAC) or OGV (Theora, Vorbis)
+ * playback the browser will display its native HTML5 player.
*
* @since 1.5
* @return string HTML markup
*/
private function html5_dynamic() {
+
+ /**
+ * Filter the VideoPress legacy player feature
+ *
+ * This filter allows you to control whether the legacy VideoPress player should be used
+ * instead of the improved one.
+ *
+ * @module videopress
+ *
+ * @since 3.7.0
+ *
+ * @param boolean $videopress_use_legacy_player
+ */
+ if ( ! apply_filters( 'jetpack_videopress_use_legacy_player', false ) ) {
+ return $this->html5_dynamic_next();
+ }
+
+ wp_enqueue_script( 'videopress' );
$video_placeholder_id = $this->video_container_id . '-placeholder';
$age_gate_required = $this->age_gate_required();
$width = absint( $this->video->calculated_width );
@@ -509,6 +534,97 @@ class VideoPress_Player {
return $html;
}
+ function html5_dynamic_next() {
+ $video_container_id = 'v-' . $this->video->guid;
+
+ // Must not use iframes for IE11 due to a fullscreen bug
+ if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && stristr( $_SERVER['HTTP_USER_AGENT'], 'Trident/7.0; rv:11.0' ) ) {
+ $iframe_embed = false;
+ } else {
+
+ /**
+ * Filter the VideoPress iframe embed
+ *
+ * This filter allows you to control whether the videos will be embedded using an iframe.
+ * Set this to false in order to use an in-page embed rather than an iframe.
+ *
+ * @module videopress
+ *
+ * @since 3.7.0
+ *
+ * @param boolean $videopress_player_use_iframe
+ */
+ $iframe_embed = apply_filters( 'jetpack_videopress_player_use_iframe', true );
+ }
+
+ if ( ! array_key_exists( 'hd', $this->options ) ) {
+ $this->options['hd'] = (bool) get_option( 'video_player_high_quality', false );
+ }
+
+ $videopress_options = array(
+ 'width' => absint( $this->video->calculated_width ),
+ 'height' => absint( $this->video->calculated_height ),
+ );
+ foreach ( $this->options as $option => $value ) {
+ switch ( $option ) {
+ case 'at':
+ if ( intval( $value ) ) {
+ $videopress_options[ $option ] = intval( $value );
+ }
+ break;
+ case 'autoplay':
+ $option = 'autoPlay';
+ case 'hd':
+ case 'loop':
+ case 'permalink':
+ if ( in_array( $value, array( 1, 'true' ) ) ) {
+ $videopress_options[ $option ] = true;
+ } elseif ( in_array( $value, array( 0, 'false' ) ) ) {
+ $videopress_options[ $option ] = false;
+ }
+ break;
+ case 'defaultlangcode':
+ $option = 'defaultLangCode';
+ if ( $value ) {
+ $videopress_options[ $option ] = $value;
+ }
+ break;
+ }
+ }
+
+ if ( $iframe_embed ) {
+ $iframe_url = "https://videopress.com/embed/{$this->video->guid}";
+
+ foreach ( $videopress_options as $option => $value ) {
+ if ( ! in_array( $option, array( 'width', 'height' ) ) ) {
+
+ // add_query_arg ignores false as a value, so replacing it with 0
+ $iframe_url = add_query_arg( $option, ( false === $value ) ? 0 : $value, $iframe_url );
+ }
+ }
+
+ $js_url = 'https://s0.wp.com/wp-content/plugins/video/assets/js/next/videopress-iframe.js';
+ $js_url = add_query_arg( 'jetpack_version', JETPACK__VERSION, $js_url );
+
+ return "<iframe width='" . esc_attr( $videopress_options['width'] )
+ . "' height='" . esc_attr( $videopress_options['height'] )
+ . "' src='" . esc_attr( $iframe_url )
+ . "' frameborder='0' allowfullscreen></iframe>"
+ . "<script src='" . esc_attr( $js_url ) . "'></script>";
+
+ } else {
+ $videopress_options = json_encode( $videopress_options );
+ $js_url = 'https://s0.wp.com/wp-content/plugins/video/assets/js/next/videopress.js';
+ $js_url = add_query_arg( 'jetpack_version', JETPACK__VERSION, $js_url );
+
+ return "<div id='{$video_container_id}'></div>
+ <script src='{$js_url}'></script>
+ <script>
+ videopress('{$this->video->guid}', document.querySelector('#{$video_container_id}'), {$videopress_options});
+ </script>";
+ }
+ }
+
/**
* Only allow legitimate Flash parameters and their values
*
@@ -597,7 +713,18 @@ class VideoPress_Player {
if ( ! isset( $this->video->players->swf->params ) )
return array();
else
- return self::esc_flash_params( apply_filters( 'video_flash_params', (array) $this->video->players->swf->params, 10, 1 ) );
+ return self::esc_flash_params(
+ /**
+ * Filters the Flash parameters of the VideoPress player.
+ *
+ * @module videopress
+ *
+ * @since 1.2.0
+ *
+ * @param array $this->video->players->swf->params Array of swf parameters for the VideoPress flash player.
+ */
+ apply_filters( 'video_flash_params', (array) $this->video->players->swf->params, 10, 1 )
+ );
}
/**
@@ -609,6 +736,7 @@ class VideoPress_Player {
* @return string HTML markup. Embed element with no children
*/
private function flash_embed() {
+ wp_enqueue_script( 'videopress' );
if ( ! isset( $this->video->players->swf ) || ! isset( $this->video->players->swf->url ) )
return '';
@@ -639,6 +767,7 @@ class VideoPress_Player {
* @return HTML markup. Object and children.
*/
private function flash_object() {
+ wp_enqueue_script( 'videopress' );
if ( ! isset( $this->video->players->swf ) || ! isset( $this->video->players->swf->url ) )
return '';
@@ -679,4 +808,4 @@ class VideoPress_Player {
</object>
OBJECT;
}
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/videopress/class.videopress-video.php b/plugins/jetpack/modules/videopress/class.videopress-video.php
index a0d01b44..9120ffc1 100644
--- a/plugins/jetpack/modules/videopress/class.videopress-video.php
+++ b/plugins/jetpack/modules/videopress/class.videopress-video.php
@@ -166,7 +166,7 @@ class VideoPress_Video {
* @var string $guid VideoPress unique identifier
* @var int $maxwidth maximum requested video width. final width and height are calculated on VideoPress servers based on the aspect ratio of the original video upload.
*/
- public function __construct( $guid, $maxwidth = 0 ) {
+ public function __construct( $guid, $maxwidth = 640 ) {
$this->guid = $guid;
$maxwidth = absint( $maxwidth );
@@ -175,8 +175,14 @@ class VideoPress_Video {
$data = $this->get_data();
if ( is_wp_error( $data ) || empty( $data ) ) {
- $this->error = $data;
- return;
+ /** This filter is documented in modules/videopress/class.videopress-player.php */
+ if ( ! apply_filters( 'jetpack_videopress_use_legacy_player', false ) ) {
+ // Unlike the Flash player, the new player does it's own error checking, age gate, etc.
+ $data = (object) array( 'guid' => $guid, 'width' => $maxwidth, 'height' => $maxwidth / 16 * 9 );
+ } else {
+ $this->error = $data;
+ return;
+ }
}
if ( isset( $data->blog_id ) )
@@ -321,4 +327,4 @@ class VideoPress_Video {
return json_decode( $response_body );
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/videopress/shortcode.php b/plugins/jetpack/modules/videopress/shortcode.php
index 9a501475..c0fb87e8 100644
--- a/plugins/jetpack/modules/videopress/shortcode.php
+++ b/plugins/jetpack/modules/videopress/shortcode.php
@@ -40,10 +40,15 @@ class Jetpack_VideoPress_Shortcode {
$attr = shortcode_atts( array(
'w' => 0,
+ 'h' => 0,
'freedom' => false,
'flashonly' => false,
'autoplay' => false,
- 'hd' => false
+ 'hd' => false,
+ 'permalink' => true,
+ 'loop' => false,
+ 'at' => 0,
+ 'defaultlangcode' => false,
), $attr );
$attr['forcestatic'] = false;
@@ -63,16 +68,29 @@ class Jetpack_VideoPress_Shortcode {
if ( ( $attr['width'] % 2 ) === 1 )
$attr['width']--;
+ /**
+ * Filter the default VideoPress shortcode options.
+ *
+ * @module videopress
+ *
+ * @since 2.5.0
+ *
+ * @param array $args Array of VideoPress shortcode options.
+ */
$options = apply_filters( 'videopress_shortcode_options', array(
'freedom' => $attr['freedom'],
'force_flash' => (bool) $attr['flashonly'],
- 'autoplay' => (bool) $attr['autoplay'],
+ 'autoplay' => $attr['autoplay'],
'forcestatic' => $attr['forcestatic'],
- 'hd' => (bool) $attr['hd']
+ 'hd' => $attr['hd'],
+ 'permalink' => $attr['permalink'],
+ 'loop' => $attr['autoplay'],
+ 'at' => (int) $attr['at'],
+ 'defaultlangcode' => $attr['defaultlangcode']
) );
// Enqueue VideoPress scripts
- self::enqueue_scripts();
+ self::register_scripts();
require_once( dirname( __FILE__ ) . '/class.videopress-video.php' );
require_once( dirname( __FILE__ ) . '/class.videopress-player.php' );
@@ -100,17 +118,34 @@ class Jetpack_VideoPress_Shortcode {
}
/**
- * Enqueue scripts needed to play VideoPress videos
+ * Register scripts needed to play VideoPress videos. One of the player methods will
+ * enqueue thoe script if needed.
*
* @uses is_ssl()
- * @uses wp_enqueue_script()
+ * @uses wp_register_script()
* @return null
*/
- public static function enqueue_scripts() {
+ public static function register_scripts() {
$js_url = ( is_ssl() ) ? 'https://v0.wordpress.com/js/videopress.js' : 'http://s0.videopress.com/js/videopress.js';
- wp_enqueue_script( 'videopress', $js_url, array( 'jquery', 'swfobject' ), '1.09' );
+ wp_register_script( 'videopress', $js_url, array( 'jquery', 'swfobject' ), '1.09' );
+ }
+
+ /**
+ * Adds a `for` query parameter to the oembed provider request URL.
+ * @param String $oembed_provider
+ * @return String $ehnanced_oembed_provider
+ */
+ public static function add_oembed_parameter( $oembed_provider ) {
+ if ( false === stripos( $oembed_provider, 'videopress.com' ) ) {
+ return $oembed_provider;
+ }
+ return add_query_arg( 'for', parse_url( home_url(), PHP_URL_HOST ), $oembed_provider );
}
}
// Initialize the shortcode handler.
-Jetpack_VideoPress_Shortcode::init(); \ No newline at end of file
+Jetpack_VideoPress_Shortcode::init();
+
+wp_oembed_add_provider( '#^https?://videopress.com/v/.*#', 'http://public-api.wordpress.com/oembed/1.0/', true );
+
+add_filter( 'oembed_fetch_url', 'Jetpack_VideoPress_Shortcode::add_oembed_parameter' );
diff --git a/plugins/jetpack/modules/videopress/videopress.php b/plugins/jetpack/modules/videopress/videopress.php
index 28771fb6..c3542a45 100644
--- a/plugins/jetpack/modules/videopress/videopress.php
+++ b/plugins/jetpack/modules/videopress/videopress.php
@@ -600,7 +600,12 @@ class Jetpack_VideoPress {
'caps' => $caps,
'l10n' => $l10n,
) );
-
+
+ /**
+ * Fires after VideoPress scripts are enqueued in the dashboard.
+ *
+ * @since 2.5.0
+ */
do_action( 'videopress_enqueue_admin_scripts' );
}
diff --git a/plugins/jetpack/modules/widget-visibility.php b/plugins/jetpack/modules/widget-visibility.php
index fffef6a4..530e8b5f 100644
--- a/plugins/jetpack/modules/widget-visibility.php
+++ b/plugins/jetpack/modules/widget-visibility.php
@@ -8,6 +8,7 @@
* Auto Activate: Yes
* Sort Order: 17
* Module Tags: Appearance
+ * Additional Search Queries: widget visibility, logic, conditional, widgets, widget
*/
include dirname( __FILE__ ) . "/widget-visibility/widget-conditions.php";
diff --git a/plugins/jetpack/modules/widget-visibility/widget-conditions.php b/plugins/jetpack/modules/widget-visibility/widget-conditions.php
index cd48a309..0878f56d 100644
--- a/plugins/jetpack/modules/widget-visibility/widget-conditions.php
+++ b/plugins/jetpack/modules/widget-visibility/widget-conditions.php
@@ -14,8 +14,8 @@ class Jetpack_Widget_Conditions {
add_filter( 'widget_update_callback', array( __CLASS__, 'widget_update' ), 10, 3 );
add_action( 'in_widget_form', array( __CLASS__, 'widget_conditions_admin' ), 10, 3 );
add_action( 'wp_ajax_widget_conditions_options', array( __CLASS__, 'widget_conditions_options' ) );
- }
- else {
+ add_action( 'wp_ajax_widget_conditions_has_children', array( __CLASS__, 'widget_conditions_has_children' ) );
+ } else if ( ! in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) ) {
add_filter( 'widget_display_callback', array( __CLASS__, 'filter_widget' ) );
add_filter( 'sidebars_widgets', array( __CLASS__, 'sidebars_widgets' ) );
add_action( 'template_redirect', array( __CLASS__, 'template_redirect' ) );
@@ -26,7 +26,7 @@ class Jetpack_Widget_Conditions {
if( is_rtl() ) {
wp_enqueue_style( 'widget-conditions', plugins_url( 'widget-conditions/rtl/widget-conditions-rtl.css', __FILE__ ) );
} else {
- wp_enqueue_style( 'widget-conditions', plugins_url( 'widget-conditions/widget-conditions.css', __FILE__ ) );
+ wp_enqueue_style( 'widget-conditions', plugins_url( 'widget-conditions/widget-conditions.css', __FILE__ ) );
}
wp_enqueue_style( 'widget-conditions', plugins_url( 'widget-conditions/widget-conditions.css', __FILE__ ) );
wp_enqueue_script( 'widget-conditions', plugins_url( 'widget-conditions/widget-conditions.js', __FILE__ ), array( 'jquery', 'jquery-ui-core' ), 20140721, true );
@@ -36,6 +36,10 @@ class Jetpack_Widget_Conditions {
* Provided a second level of granularity for widget conditions.
*/
public static function widget_conditions_options_echo( $major = '', $minor = '' ) {
+ if ( in_array( $major, array( 'category', 'tag' ) ) && is_numeric( $minor ) ) {
+ $minor = self::maybe_get_split_term( $minor, $major );
+ }
+
switch ( $major ) {
case 'category':
?>
@@ -142,10 +146,19 @@ class Jetpack_Widget_Conditions {
$taxonomies = get_taxonomies( array( '_builtin' => false ), 'objects' );
usort( $taxonomies, array( __CLASS__, 'strcasecmp_name' ) );
+ $parts = explode( '_tax_', $minor );
+
+ if ( 2 === count( $parts ) ) {
+ $minor_id = self::maybe_get_split_term( $parts[1], $parts[0] );
+ $minor = $parts[0] . '_tax_' . $minor_id;
+ }
+
foreach ( $taxonomies as $taxonomy ) {
?>
<optgroup label="<?php esc_attr_e( $taxonomy->labels->name . ':', 'jetpack' ); ?>">
- <option value="<?php echo esc_attr( $taxonomy->name ); ?>" <?php selected( $taxonomy->name, $minor ); ?>><?php echo 'All ' . esc_html( $taxonomy->name ) . ' pages'; ?></option>
+ <option value="<?php echo esc_attr( $taxonomy->name ); ?>" <?php selected( $taxonomy->name, $minor ); ?>>
+ <?php _e( 'All pages', 'jetpack' ); ?>
+ </option>
<?php
$terms = get_terms( array( $taxonomy->name ), array( 'number' => 250, 'hide_empty' => false ) );
@@ -172,6 +185,42 @@ class Jetpack_Widget_Conditions {
}
/**
+ * Provide an option to include children of pages.
+ */
+ public static function widget_conditions_has_children_echo( $major = '', $minor = '', $has_children = false ) {
+ if ( ! $major || 'page' !== $major || ! $minor ) {
+ return null;
+ }
+
+ if ( 'front' == $minor ) {
+ $minor = get_option( 'page_on_front' );
+ }
+
+ if ( ! is_numeric( $minor ) ) {
+ return null;
+ }
+
+ $page_children = get_pages( array( 'child_of' => (int) $minor ) );
+
+ if ( $page_children ) {
+ ?>
+ <label>
+ <input type="checkbox" id="include_children" name="conditions[page_children][]" value="has" <?php checked( $has_children, true ); ?> />
+ <?php echo esc_html_x( "Include children", 'Checkbox on Widget Visibility if choosen page has children.', 'jetpack' ); ?>
+ </label>
+ <?php
+ }
+ }
+
+ /**
+ * This is the AJAX endpoint for the has_children input.
+ */
+ public static function widget_conditions_has_children() {
+ self::widget_conditions_has_children_echo( $_REQUEST['major'], isset( $_REQUEST['minor'] ) ? $_REQUEST['minor'] : '', isset( $_REQUEST['has_children'] ) ? $_REQUEST['has_children'] : false );
+ die;
+ }
+
+ /**
* Add the widget conditions to each widget in the admin.
*
* @param $widget unused.
@@ -188,7 +237,7 @@ class Jetpack_Widget_Conditions {
$conditions['action'] = 'show';
if ( empty( $conditions['rules'] ) )
- $conditions['rules'][] = array( 'major' => '', 'minor' => '' );
+ $conditions['rules'][] = array( 'major' => '', 'minor' => '', 'has_children' => '' );
?>
<div class="widget-conditional <?php if ( empty( $_POST['widget-conditions-visible'] ) || $_POST['widget-conditions-visible'] == '0' ) { ?>widget-conditional-hide<?php } ?>">
@@ -210,31 +259,37 @@ class Jetpack_Widget_Conditions {
<option value="" <?php selected( "", $rule['major'] ); ?>><?php echo esc_html_x( '-- Select --', 'Used as the default option in a dropdown list', 'jetpack' ); ?></option>
<option value="category" <?php selected( "category", $rule['major'] ); ?>><?php esc_html_e( 'Category', 'jetpack' ); ?></option>
<option value="author" <?php selected( "author", $rule['major'] ); ?>><?php echo esc_html_x( 'Author', 'Noun, as in: "The author of this post is..."', 'jetpack' ); ?></option>
- <?php
- // this doesn't work on .com because of caching
- if( ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) {
- ?>
- <option value="loggedin" <?php selected( "loggedin", $rule['major'] ); ?>><?php echo esc_html_x( 'User', 'Noun', 'jetpack' ); ?></option>
- <option value="role" <?php selected( "role", $rule['major'] ); ?>><?php echo esc_html_x( 'Role', 'Noun, as in: "The user role of that can access this widget is..."', 'jetpack' ); ?></option>
+
+ <?php if( ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) { // this doesn't work on .com because of caching ?>
+ <option value="loggedin" <?php selected( "loggedin", $rule['major'] ); ?>><?php echo esc_html_x( 'User', 'Noun', 'jetpack' ); ?></option>
+ <option value="role" <?php selected( "role", $rule['major'] ); ?>><?php echo esc_html_x( 'Role', 'Noun, as in: "The user role of that can access this widget is..."', 'jetpack' ); ?></option>
<?php } ?>
+
<option value="tag" <?php selected( "tag", $rule['major'] ); ?>><?php echo esc_html_x( 'Tag', 'Noun, as in: "This post has one tag."', 'jetpack' ); ?></option>
<option value="date" <?php selected( "date", $rule['major'] ); ?>><?php echo esc_html_x( 'Date', 'Noun, as in: "This page is a date archive."', 'jetpack' ); ?></option>
<option value="page" <?php selected( "page", $rule['major'] ); ?>><?php echo esc_html_x( 'Page', 'Example: The user is looking at a page, not a post.', 'jetpack' ); ?></option>
+
<?php if ( get_taxonomies( array( '_builtin' => false ) ) ) : ?>
- <option value="taxonomy" <?php selected( "taxonomy", $rule['major'] ); ?>><?php echo esc_html_x( 'Taxonomy', 'Noun, as in: "This post has one taxonomy."', 'jetpack' ); ?></option>
+ <option value="taxonomy" <?php selected( "taxonomy", $rule['major'] ); ?>><?php echo esc_html_x( 'Taxonomy', 'Noun, as in: "This post has one taxonomy."', 'jetpack' ); ?></option>
<?php endif; ?>
</select>
+
<?php _ex( 'is', 'Widget Visibility: {Rule Major [Page]} is {Rule Minor [Search results]}', 'jetpack' ); ?>
+
<select class="conditions-rule-minor" name="conditions[rules_minor][]" <?php if ( ! $rule['major'] ) { ?> disabled="disabled"<?php } ?> data-loading-text="<?php esc_attr_e( 'Loading...', 'jetpack' ); ?>">
<?php self::widget_conditions_options_echo( $rule['major'], $rule['minor'] ); ?>
</select>
+ <span class="conditions-rule-has-children">
+ <?php self::widget_conditions_has_children_echo( $rule['major'], $rule['minor'], $rule['has_children'] ); ?>
+ </span>
</div>
+
<div class="condition-control">
- <span class="condition-conjunction"><?php echo esc_html_x( 'or', 'Shown between widget visibility conditions.', 'jetpack' ); ?></span>
- <div class="actions alignright">
- <a href="#" class="delete-condition"><?php esc_html_e( 'Delete', 'jetpack' ); ?></a> | <a href="#" class="add-condition"><?php esc_html_e( 'Add', 'jetpack' ); ?></a>
- </div>
+ <span class="condition-conjunction"><?php echo esc_html_x( 'or', 'Shown between widget visibility conditions.', 'jetpack' ); ?></span>
+ <div class="actions alignright">
+ <a href="#" class="delete-condition"><?php esc_html_e( 'Delete', 'jetpack' ); ?></a> | <a href="#" class="add-condition"><?php esc_html_e( 'Add', 'jetpack' ); ?></a>
+ </div>
</div>
</div><!-- .condition -->
@@ -266,7 +321,8 @@ class Jetpack_Widget_Conditions {
$conditions['rules'][] = array(
'major' => $major_rule,
- 'minor' => isset( $_POST['conditions']['rules_minor'][$index] ) ? $_POST['conditions']['rules_minor'][$index] : ''
+ 'minor' => isset( $_POST['conditions']['rules_minor'][$index] ) ? $_POST['conditions']['rules_minor'][$index] : '',
+ 'has_children' => isset( $_POST['conditions']['page_children'][$index] ) ? true : false,
);
}
@@ -284,9 +340,25 @@ class Jetpack_Widget_Conditions {
serialize( $instance['conditions'] ) != serialize( $old_instance['conditions'] )
)
) {
+
+ /**
+ * Fires after the widget visibility conditions are saved.
+ *
+ * @module widget-visibility
+ *
+ * @since 2.4.0
+ */
do_action( 'widget_conditions_save' );
}
else if ( ! isset( $instance['conditions'] ) && isset( $old_instance['conditions'] ) ) {
+
+ /**
+ * Fires after the widget visibility conditions are deleted.
+ *
+ * @module widget-visibility
+ *
+ * @since 2.4.0
+ */
do_action( 'widget_conditions_delete' );
}
@@ -306,6 +378,9 @@ class Jetpack_Widget_Conditions {
if ( empty( $widgets ) )
continue;
+ if ( ! is_array( $widgets ) )
+ continue;
+
if ( 'wp_inactive_widgets' == $widget_area )
continue;
@@ -346,6 +421,19 @@ class Jetpack_Widget_Conditions {
}
/**
+ * Generates a condition key based on the rule array
+ *
+ * @param array $rule
+ * @return string key used to retrieve the condition.
+ */
+ static function generate_condition_key( $rule ) {
+ if ( isset( $rule['has_children'] ) ) {
+ return $rule['major'] . ":" . $rule['minor'] . ":" . $rule['has_children'];
+ }
+ return $rule['major'] . ":" . $rule['minor'];
+ }
+
+ /**
* Determine whether the widget should be displayed based on conditions set by the user.
*
* @param array $instance The widget settings.
@@ -364,8 +452,8 @@ class Jetpack_Widget_Conditions {
$condition_result = false;
foreach ( $instance['conditions']['rules'] as $rule ) {
- $condition_key = $rule['major'] . ":" . $rule['minor'];
-
+ $condition_key = self::generate_condition_key( $rule );
+
if ( isset( $condition_result_cache[ $condition_key ] ) ) {
$condition_result = $condition_result_cache[ $condition_key ];
}
@@ -426,29 +514,38 @@ class Jetpack_Widget_Conditions {
} else {
// $rule['minor'] is a page ID
$condition_result = is_page( $rule['minor'] );
+ // Check if $rule['minor'] is parent of page ID
+ if ( ! $condition_result && isset( $rule['has_children'] ) && $rule['has_children'] )
+ $condition_result = wp_get_post_parent_id( get_the_ID() ) == $rule['minor'];
}
break;
}
break;
case 'tag':
- if ( ! $rule['minor'] && is_tag() )
+ if ( ! $rule['minor'] && is_tag() ) {
$condition_result = true;
- else if ( is_singular() && $rule['minor'] && has_tag( $rule['minor'] ) )
- $condition_result = true;
- else {
- $tag = get_tag( $rule['minor'] );
-
- if ( $tag && is_tag( $tag->slug ) )
+ } else {
+ $rule['minor'] = self::maybe_get_split_term( $rule['minor'], $rule['major'] );
+ if ( is_singular() && $rule['minor'] && has_tag( $rule['minor'] ) ) {
$condition_result = true;
+ } else {
+ $tag = get_tag( $rule['minor'] );
+ if ( $tag && ! is_wp_error( $tag ) && is_tag( $tag->slug ) ) {
+ $condition_result = true;
+ }
+ }
}
break;
case 'category':
- if ( ! $rule['minor'] && is_category() )
- $condition_result = true;
- else if ( is_category( $rule['minor'] ) )
- $condition_result = true;
- else if ( is_singular() && $rule['minor'] && in_array( 'category', get_post_taxonomies() ) && has_category( $rule['minor'] ) )
+ if ( ! $rule['minor'] && is_category() ) {
$condition_result = true;
+ } else {
+ $rule['minor'] = self::maybe_get_split_term( $rule['minor'], $rule['major'] );
+ if ( is_category( $rule['minor'] ) ) {
+ $condition_result = true;
+ } else if ( is_singular() && $rule['minor'] && in_array( 'category', get_post_taxonomies() ) && has_category( $rule['minor'] ) )
+ $condition_result = true;
+ }
break;
case 'loggedin':
$condition_result = is_user_logged_in();
@@ -467,8 +564,7 @@ class Jetpack_Widget_Conditions {
break;
case 'role':
if( is_user_logged_in() ) {
- global $current_user;
- get_currentuserinfo();
+ $current_user = wp_get_current_user();
$user_roles = $current_user->roles;
@@ -484,7 +580,9 @@ class Jetpack_Widget_Conditions {
break;
case 'taxonomy':
$term = explode( '_tax_', $rule['minor'] ); // $term[0] = taxonomy name; $term[1] = term id
-
+ if ( isset( $term[0] ) && isset( $term[1] ) ) {
+ $term[1] = self::maybe_get_split_term( $term[1], $term[0] );
+ }
if ( isset( $term[1] ) && is_tax( $term[0], $term[1] ) )
$condition_result = true;
else if ( isset( $term[1] ) && is_singular() && $term[1] && has_term( $term[1], $term[0] ) )
@@ -519,6 +617,20 @@ class Jetpack_Widget_Conditions {
public static function strcasecmp_name( $a, $b ) {
return strcasecmp( $a->name, $b->name );
}
+
+ public static function maybe_get_split_term( $old_term_id = '', $taxonomy = '' ) {
+ $term_id = $old_term_id;
+
+ if ( 'tag' == $taxonomy ) {
+ $taxonomy = 'post_tag';
+ }
+
+ if ( function_exists( 'wp_get_split_term' ) && $new_term_id = wp_get_split_term( $old_term_id, $taxonomy ) ) {
+ $term_id = $new_term_id;
+ }
+
+ return $term_id;
+ }
}
add_action( 'init', array( 'Jetpack_Widget_Conditions', 'init' ) );
diff --git a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.css b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.css
index 94a7180d..29bf3320 100644
--- a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.css
+++ b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.css
@@ -48,6 +48,9 @@
.widget-conditional .selection {
margin-left: 70px;
}
+.widget-conditional .conditions-rule-has-children {
+ display: block;
+}
.widget-conditional .condition .actions {
margin-top: -28px;
}
diff --git a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.min.css b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.min.css
index 33173fd5..5e91ad09 100644
--- a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.min.css
+++ b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions-rtl.min.css
@@ -1 +1 @@
-.wp-customizer .expanded .widget-conditional .widget-conditional-inner{width:98%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .expanded .widget-conditional .form{overflow:scroll;margin-bottom:20px}.widget-liquid-right .widget.expanded{overflow:visible}.widget-conditional-hide{display:none}.widget-conditional .widget-conditional-inner{background:#F9F9F9;border:1px solid #DFDFDF;padding:12px 10px 0}.widget-conditional,.widget-conditional .conditions{margin-bottom:12px}.widget-conditional .condition,.widget-conditional .condition-top{clear:both}.widget-conditional .condition{padding-top:12px}.widget-conditional .condition select{width:120px}.widget-conditional .condition-top select{width:auto}.widget-conditional .condition-control{padding-top:4px;clear:both;margin-top:-20px}.widget-conditional .selection{margin-left:70px}.widget-conditional .condition .actions{margin-top:-28px}.widget-conditional .condition-control a{text-decoration:none}.widget-conditional .condition:last-child .condition-conjunction{display:none}.wp-core-ui .button.display-options{margin-left:5px}.wp-core-ui .button.display-options:hover{text-decoration:none}.wp-customizer .widget-conditional select{min-width:0;max-width:none;height:auto} \ No newline at end of file
+.wp-customizer .expanded .widget-conditional .widget-conditional-inner{width:98%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .expanded .widget-conditional .form{overflow:scroll;margin-bottom:20px}.widget-liquid-right .widget.expanded{overflow:visible}.widget-conditional-hide{display:none}.widget-conditional .widget-conditional-inner{background:#F9F9F9;border:1px solid #DFDFDF;padding:12px 10px 0}.widget-conditional,.widget-conditional .conditions{margin-bottom:12px}.widget-conditional .condition,.widget-conditional .condition-top{clear:both}.widget-conditional .condition{padding-top:12px}.widget-conditional .condition select{width:120px}.widget-conditional .condition-top select{width:auto}.widget-conditional .condition-control{padding-top:4px;clear:both;margin-top:-20px}.widget-conditional .selection{margin-left:70px}.widget-conditional .conditions-rule-has-children{display:block}.widget-conditional .condition .actions{margin-top:-28px}.widget-conditional .condition-control a{text-decoration:none}.widget-conditional .condition:last-child .condition-conjunction{display:none}.wp-core-ui .button.display-options{margin-left:5px}.wp-core-ui .button.display-options:hover{text-decoration:none}.wp-customizer .widget-conditional select{min-width:0;max-width:none;height:auto} \ No newline at end of file
diff --git a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.css b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.css
index 4ae0b29b..7e9bc3fd 100644
--- a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.css
+++ b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.css
@@ -48,6 +48,9 @@
.widget-conditional .selection {
margin-right: 70px;
}
+.widget-conditional .conditions-rule-has-children {
+ display: block;
+}
.widget-conditional .condition .actions {
margin-top: -28px;
}
diff --git a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.js b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.js
index 709085ae..e6749e4b 100644
--- a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.js
+++ b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.js
@@ -14,7 +14,7 @@ jQuery( function( $ ) {
if ( $( 'body' ).hasClass( 'wp-customizer' ) ) {
// set the inside widget 2 top this way we can see the widget settings
$widget.find('.widget-inside').css( 'top', 0 );
-
+
return;
}
@@ -36,7 +36,7 @@ jQuery( function( $ ) {
} else {
$widget.css( 'position', 'relative' ).css( 'left', '-' + extra + 'px' ).css( 'width', '400px' );
}
-
+
}
}
else if ( $widget.data( 'original-style' ) ) {
@@ -66,10 +66,13 @@ jQuery( function( $ ) {
widgets_shell.on( 'click.widgetconditions', 'a.add-condition', function( e ) {
e.preventDefault();
+
var $condition = $( this ).closest( 'div.condition' ),
$conditionClone = $condition.clone().insertAfter( $condition );
+
$conditionClone.find( 'select.conditions-rule-major' ).val( '' );
$conditionClone.find( 'select.conditions-rule-minor' ).html( '' ).attr( 'disabled' );
+ $conditionClone.find( 'span.conditions-rule-has-children' ).hide().html( '' );
} );
widgets_shell.on( 'click.widgetconditions', 'a.display-options', function ( e ) {
@@ -120,10 +123,15 @@ jQuery( function( $ ) {
} );
$( document ).on( 'change.widgetconditions', 'select.conditions-rule-major', function() {
- var $conditionsRuleMajor = $ ( this );
- var $conditionsRuleMinor = $conditionsRuleMajor.siblings( 'select.conditions-rule-minor:first' );
+ var $conditionsRuleMajor = $ ( this ),
+ $conditionsRuleMinor = $conditionsRuleMajor.siblings( 'select.conditions-rule-minor:first' ),
+ $conditionsRuleHasChildren = $conditionsRuleMajor.siblings( 'span.conditions-rule-has-children' );
if ( $conditionsRuleMajor.val() ) {
+ if ( $conditionsRuleMajor.val() !== 'page' ){
+ $conditionsRuleHasChildren.hide().html( '' );
+ }
+
$conditionsRuleMinor.html( '' ).append( $( '<option/>' ).text( $conditionsRuleMinor.data( 'loading-text' ) ) );
var data = {
@@ -136,6 +144,27 @@ jQuery( function( $ ) {
} );
} else {
$conditionsRuleMajor.siblings( 'select.conditions-rule-minor' ).attr( 'disabled', 'disabled' ).html( '' );
+ $conditionsRuleHasChildren.hide().html( '' );
+ }
+ } );
+
+ $( document ).on( 'change.widgetconditions', 'select.conditions-rule-minor', function() {
+ var $conditionsRuleMinor = $ ( this ),
+ $conditionsRuleMajor = $conditionsRuleMinor.siblings( 'select.conditions-rule-major' ),
+ $conditionsRuleHasChildren = $conditionsRuleMinor.siblings( 'span.conditions-rule-has-children' );
+
+ if ( $conditionsRuleMajor.val() === 'page' ) {
+ var data = {
+ action: 'widget_conditions_has_children',
+ major: $conditionsRuleMajor.val(),
+ minor: $conditionsRuleMinor.val()
+ };
+
+ jQuery.post( ajaxurl, data, function( html ) {
+ $conditionsRuleHasChildren.html( html ).show();
+ } );
+ } else {
+ $conditionsRuleHasChildren.hide().html( '' );
}
} );
} );
diff --git a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.min.css b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.min.css
index e81918c8..bf1d04cc 100644
--- a/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.min.css
+++ b/plugins/jetpack/modules/widget-visibility/widget-conditions/widget-conditions.min.css
@@ -1 +1 @@
-.wp-customizer .expanded .widget-conditional .widget-conditional-inner{width:98%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .expanded .widget-conditional .form{overflow:scroll;margin-bottom:20px}.widget-liquid-right .widget.expanded{overflow:visible}.widget-conditional-hide{display:none}.widget-conditional .widget-conditional-inner{background:#F9F9F9;border:1px solid #DFDFDF;padding:12px 10px 0}.widget-conditional,.widget-conditional .conditions{margin-bottom:12px}.widget-conditional .condition,.widget-conditional .condition-top{clear:both}.widget-conditional .condition{padding-top:12px}.widget-conditional .condition select{width:120px}.widget-conditional .condition-top select{width:auto}.widget-conditional .condition-control{padding-top:4px;clear:both;margin-top:-20px}.widget-conditional .selection{margin-right:70px}.widget-conditional .condition .actions{margin-top:-28px}.widget-conditional .condition-control a{text-decoration:none}.widget-conditional .condition:last-child .condition-conjunction{display:none}.wp-core-ui .button.display-options{margin-right:5px}.wp-core-ui .button.display-options:hover{text-decoration:none}.wp-customizer .widget-conditional select{min-width:0;max-width:none;height:auto} \ No newline at end of file
+.wp-customizer .expanded .widget-conditional .widget-conditional-inner{width:98%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wp-customizer .expanded .widget-conditional .form{overflow:scroll;margin-bottom:20px}.widget-liquid-right .widget.expanded{overflow:visible}.widget-conditional-hide{display:none}.widget-conditional .widget-conditional-inner{background:#F9F9F9;border:1px solid #DFDFDF;padding:12px 10px 0}.widget-conditional,.widget-conditional .conditions{margin-bottom:12px}.widget-conditional .condition,.widget-conditional .condition-top{clear:both}.widget-conditional .condition{padding-top:12px}.widget-conditional .condition select{width:120px}.widget-conditional .condition-top select{width:auto}.widget-conditional .condition-control{padding-top:4px;clear:both;margin-top:-20px}.widget-conditional .selection{margin-right:70px}.widget-conditional .conditions-rule-has-children{display:block}.widget-conditional .condition .actions{margin-top:-28px}.widget-conditional .condition-control a{text-decoration:none}.widget-conditional .condition:last-child .condition-conjunction{display:none}.wp-core-ui .button.display-options{margin-right:5px}.wp-core-ui .button.display-options:hover{text-decoration:none}.wp-customizer .widget-conditional select{min-width:0;max-width:none;height:auto} \ No newline at end of file
diff --git a/plugins/jetpack/modules/widgets.php b/plugins/jetpack/modules/widgets.php
index cacfb46e..8997c06c 100644
--- a/plugins/jetpack/modules/widgets.php
+++ b/plugins/jetpack/modules/widgets.php
@@ -7,6 +7,7 @@
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Social, Appearance
+ * Additional Search Queries: widget, widgets, facebook, gallery, twitter, gravatar, image, rss
*/
function jetpack_load_widgets() {
@@ -18,6 +19,8 @@ function jetpack_load_widgets() {
/**
* Modify which Jetpack Widgets to register.
*
+ * @module widgets
+ *
* @since 2.2.1
*
* @param array $widgets_include An array of widgets to be registered.
diff --git a/plugins/jetpack/modules/widgets/contact-info.php b/plugins/jetpack/modules/widgets/contact-info.php
index 233c3b40..dcf2878e 100644
--- a/plugins/jetpack/modules/widgets/contact-info.php
+++ b/plugins/jetpack/modules/widgets/contact-info.php
@@ -28,6 +28,7 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) {
);
parent::__construct(
'widget_contact_info',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
apply_filters( 'jetpack_widget_name', __( 'Contact Info', 'jetpack' ) ),
$widget_ops
);
diff --git a/plugins/jetpack/modules/widgets/contact-info/contact-info-map.js b/plugins/jetpack/modules/widgets/contact-info/contact-info-map.js
index c93fbcf8..11a85fdb 100644
--- a/plugins/jetpack/modules/widgets/contact-info/contact-info-map.js
+++ b/plugins/jetpack/modules/widgets/contact-info/contact-info-map.js
@@ -17,7 +17,11 @@ if (jQuery) {
map: map,
position: lat_lon
});
-
+
+ google.maps.event.addListenerOnce(map, 'mouseover', function() {
+ google.maps.event.trigger(map, 'resize');
+ });
+
});
});
}
diff --git a/plugins/jetpack/modules/widgets/facebook-likebox.php b/plugins/jetpack/modules/widgets/facebook-likebox.php
index 9bad358d..2943bc09 100644
--- a/plugins/jetpack/modules/widgets/facebook-likebox.php
+++ b/plugins/jetpack/modules/widgets/facebook-likebox.php
@@ -10,28 +10,35 @@ function jetpack_facebook_likebox_init() {
}
/**
- * Facebook Like Box widget class
- * Display a Facebook Like Box as a widget
- * http://developers.facebook.com/docs/reference/plugins/like-box/
+ * Facebook Page Plugin (formely known as the Like Box)
+ * Display a Facebook Page Plugin as a widget (replaces the old like box plugin)
+ * https://developers.facebook.com/docs/plugins/page-plugin
*/
class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
- private $default_height = 432;
- private $default_width = 200;
- private $max_width = 9999;
- private $min_width = 0;
+ private $default_height = 580;
+ private $default_width = 340;
+ private $max_width = 500;
+ private $min_width = 180;
private $max_height = 9999;
- private $min_height = 100;
- private $default_colorscheme = 'light';
- private $allowed_colorschemes = array( 'light', 'dark' );
+ private $min_height = 130;
function __construct() {
parent::__construct(
'facebook-likebox',
- apply_filters( 'jetpack_widget_name', __( 'Facebook Like Box', 'jetpack' ) ),
+ /**
+ * Filter the name of a widget included in the Extra Sidebar Widgets module.
+ *
+ * @module widgets
+ *
+ * @since 2.1.2
+ *
+ * @param string $widget_name Widget title.
+ */
+ apply_filters( 'jetpack_widget_name', __( 'Facebook Page Plugin', 'jetpack' ) ),
array(
'classname' => 'widget_facebook_likebox',
- 'description' => __( 'Display a Facebook Like Box to connect visitors to your Facebook Page', 'jetpack' )
+ 'description' => __( 'Use the Facebook Page Plugin to connect visitors to your Facebook Page', 'jetpack' )
)
);
}
@@ -42,6 +49,9 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
$like_args = $this->normalize_facebook_args( $instance['like_args'] );
+ wp_enqueue_style( 'jetpack_facebook_likebox', plugins_url( 'facebook-likebox/style.css', __FILE__ ) );
+ wp_style_add_data( 'jetpack_facebook_likebox', 'jetpack-inline', true );
+
if ( empty( $like_args['href'] ) || ! $this->is_valid_facebook_url( $like_args['href'] ) ) {
if ( current_user_can('edit_theme_options') ) {
echo $before_widget;
@@ -52,26 +62,23 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
return;
}
-
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $instance['title'] );
$page_url = set_url_scheme( $like_args['href'], 'https' );
- $like_args['show_faces'] = (bool) $like_args['show_faces'] ? 'true' : 'false';
- $like_args['stream'] = (bool) $like_args['stream'] ? 'true' : 'false';
- $like_args['force_wall'] = (bool) $like_args['force_wall'] ? 'true' : 'false';
- $like_args['show_border']= (bool) $like_args['show_border'] ? 'true' : 'false';
- $like_args['header'] = (bool) $like_args['header'] ? 'true' : 'false';
- $like_bg_colour = apply_filters( 'jetpack_fb_likebox_bg', ( 'dark' == $like_args['colorscheme'] ? '#000' : '#fff' ), $like_args['colorscheme'] );
+ $like_args['show_faces'] = (bool) $like_args['show_faces'] ? 'true' : 'false';
+ $like_args['stream'] = (bool) $like_args['stream'] ? 'true' : 'false';
+ $like_args['cover'] = (bool) $like_args['cover'] ? 'false' : 'true';
$locale = $this->get_locale();
- if ( $locale && 'en_US' != $locale )
- $like_args['locale'] = $locale;
- $like_args = urlencode_deep( $like_args );
- $like_url = add_query_arg(
- $like_args,
- 'https://www.facebook.com/plugins/likebox.php'
- );
+ /** This filter is documented in modules/sharedaddy/sharing-sources.php */
+ $fb_app_id = apply_filters( 'jetpack_sharing_facebook_app_id', '249643311490' );
+ if ( is_numeric( $fb_app_id ) ) {
+ $fb_app_id = '&appId=' . $fb_app_id;
+ } else {
+ $fb_app_id = '';
+ }
echo $before_widget;
@@ -80,15 +87,32 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
$likebox_widget_title = '<a href="' . esc_url( $page_url ) . '">' . esc_html( $title ) . '</a>';
+ /**
+ * Filter Facebook Likebox's widget title.
+ *
+ * @module widgets
+ *
+ * @since 3.3.0
+ *
+ * @param string $likebox_widget_title Likebox Widget title (including a link to the Page URL).
+ * @param string $title Widget title as set in the widget settings.
+ * @param string $page_url Facebook Page URL.
+ */
echo apply_filters( 'jetpack_facebook_likebox_title', $likebox_widget_title, $title, $page_url );
echo $after_title;
endif;
- ?><iframe src="<?php echo esc_url( $like_url ); ?>" scrolling="no" frameborder="0" style="border: none; overflow: hidden;<?php echo 0 != $like_args['width'] ? ' width: ' . (int) $like_args['width'] . 'px; ' : ''; ?> height: <?php echo (int) $like_args['height']; ?>px; background: <?php echo esc_attr( $like_bg_colour ); ?>"></iframe><?php
-
+ ?>
+ <div id="fb-root"></div>
+ <div class="fb-page" data-href="<?php echo esc_url( $page_url ); ?>" data-width="<?php echo intval( $like_args['width'] ); ?>" data-height="<?php echo intval( $like_args['height'] ); ?>" data-hide-cover="<?php echo esc_attr( $like_args['cover'] ); ?>" data-show-facepile="<?php echo esc_attr( $like_args['show_faces'] ); ?>" data-show-posts="<?php echo esc_attr( $like_args['stream'] ); ?>">
+ <div class="fb-xfbml-parse-ignore"><blockquote cite="<?php echo esc_url( $page_url ); ?>"><a href="<?php echo esc_url( $page_url ); ?>"><?php echo esc_html( $title ); ?></a></blockquote></div>
+ </div>
+ <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = '//connect.facebook.net/<?php echo esc_html( $locale ); ?>/sdk.js#xfbml=1<?php echo $fb_app_id; ?>&version=v2.3'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
+ <?php
echo $after_widget;
+ /** This action is already documented in modules/widgets/gravatar-profile.php */
do_action( 'jetpack_stats_extra', 'widget', 'facebook-likebox' );
}
@@ -105,12 +129,9 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
'href' => trim( strip_tags( stripslashes( $new_instance['href'] ) ) ),
'width' => (int) $new_instance['width'],
'height' => (int) $new_instance['height'],
- 'colorscheme' => $new_instance['colorscheme'],
- 'show_faces' => (bool) $new_instance['show_faces'],
- 'stream' => (bool) $new_instance['stream'],
- 'show_border' => (bool) $new_instance['show_border'],
- 'header' => false, // The header just displays "Find us on Facebook"; it's redundant with the title
- 'force_wall' => (bool) $new_instance['force_wall'],
+ 'show_faces' => isset( $new_instance['show_faces'] ),
+ 'stream' => isset( $new_instance['stream'] ),
+ 'cover' => isset( $new_instance['cover'] ),
);
$instance['like_args'] = $this->normalize_facebook_args( $instance['like_args'] );
@@ -138,7 +159,7 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
<?php _e( 'Facebook Page URL', 'jetpack' ); ?>
<input type="text" name="<?php echo $this->get_field_name( 'href' ); ?>" id="<?php echo $this->get_field_id( 'href' ); ?>" value="<?php echo esc_url( $like_args['href'] ); ?>" class="widefat" />
<br />
- <small><?php _e( 'The Like Box only works with <a href="http://www.facebook.com/help/?faq=174987089221178">Facebook Pages</a>.', 'jetpack' ); ?></small>
+ <small><?php _e( 'The widget only works with Facebook Pages.', 'jetpack' ); ?></small>
</label>
</p>
@@ -157,16 +178,6 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
</p>
<p>
- <label for="<?php echo $this->get_field_id( 'colorscheme' ); ?>">
- <?php _e( 'Color Scheme', 'jetpack' ); ?>
- <select name="<?php echo $this->get_field_name( 'colorscheme' ); ?>" id="<?php echo $this->get_field_id( 'colorscheme' ); ?>">
- <option value="light" <?php selected( $like_args['colorscheme'], 'light' ); ?>><?php _e( 'Light', 'jetpack' ); ?></option>
- <option value="dark" <?php selected( $like_args['colorscheme'], 'dark' ); ?>><?php _e( 'Dark', 'jetpack' ); ?></option>
- </select>
- </label>
- </p>
-
- <p>
<label for="<?php echo $this->get_field_id( 'show_faces' ); ?>">
<input type="checkbox" name="<?php echo $this->get_field_name( 'show_faces' ); ?>" id="<?php echo $this->get_field_id( 'show_faces' ); ?>" <?php checked( $like_args['show_faces'] ); ?> />
<?php _e( 'Show Faces', 'jetpack' ); ?>
@@ -180,25 +191,15 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
<input type="checkbox" name="<?php echo $this->get_field_name( 'stream' ); ?>" id="<?php echo $this->get_field_id( 'stream' ); ?>" <?php checked( $like_args['stream'] ); ?> />
<?php _e( 'Show Stream', 'jetpack' ); ?>
<br />
- <small><?php _e( 'Show the profile stream for the public profile.', 'jetpack' ); ?></small>
+ <small><?php _e( 'Show Page Posts.', 'jetpack' ); ?></small>
</label>
</p>
<p>
- <label for="<?php echo $this->get_field_id( 'show_border' ); ?>">
- <input type="checkbox" name="<?php echo $this->get_field_name( 'show_border' ); ?>" id="<?php echo $this->get_field_id( 'show_border' ); ?>" <?php checked( $like_args['show_border'] ); ?> />
- <?php _e( 'Show Border', 'jetpack' ); ?>
+ <label for="<?php echo $this->get_field_id( 'cover' ); ?>">
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'cover' ); ?>" id="<?php echo $this->get_field_id( 'cover' ); ?>" <?php checked( $like_args['cover'] ); ?> />
+ <?php _e( 'Show Cover Photo', 'jetpack' ); ?>
<br />
- <small><?php _e( 'Show a border around the plugin.', 'jetpack' ); ?></small>
- </label>
- </p>
-
- <p>
- <label for="<?php echo $this->get_field_id( 'force_wall' ); ?>">
- <input type="checkbox" name="<?php echo $this->get_field_name( 'force_wall' ); ?>" id="<?php echo $this->get_field_id( 'force_wall' ); ?>" <?php checked( $like_args['force_wall'] ); ?> />
- <?php _e( 'Show Wall', 'jetpack' ); ?>
- <br />
- <small><?php _e( 'Show the wall for a Places page rather than friend activity.', 'jetpack' ); ?></small>
</label>
</p>
@@ -210,14 +211,20 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
'href' => '',
'width' => $this->default_width,
'height' => $this->default_height,
- 'colorscheme' => $this->default_colorscheme,
- 'show_faces' => true,
- 'stream' => false,
- 'show_border' => true,
- 'header' => false,
- 'force_wall' => false,
+ 'show_faces' => 'true',
+ 'stream' => '',
+ 'cover' => 'true',
);
+ /**
+ * Filter Facebook Likebox default options.
+ *
+ * @module widgets
+ *
+ * @since 1.3.1
+ *
+ * @param array $defaults Array of default options.
+ */
return apply_filters( 'jetpack_facebook_likebox_defaults', $defaults );
}
@@ -232,22 +239,20 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
$args['href'] = '';
}
- $args['width'] = $this->normalize_int_value( (int) $args['width'], $this->default_width, $this->max_width, $this->min_width );
- $args['height'] = $this->normalize_int_value( (int) $args['height'], $this->default_height, $this->max_height, $this->min_height );
- $args['colorscheme'] = $this->normalize_text_value( $args['colorscheme'], $this->default_colorscheme, $this->allowed_colorschemes );
- $args['show_faces'] = (bool) $args['show_faces'];
- $args['stream'] = (bool) $args['stream'];
- $args['show_border'] = (bool) $args['show_border'];
- $args['force_wall'] = (bool) $args['force_wall'];
+ $args['width'] = $this->normalize_int_value( (int) $args['width'], $this->default_width, $this->max_width, $this->min_width );
+ $args['height'] = $this->normalize_int_value( (int) $args['height'], $this->default_height, $this->max_height, $this->min_height );
+ $args['show_faces'] = (bool) $args['show_faces'];
+ $args['stream'] = (bool) $args['stream'];
+ $args['cover'] = (bool) $args['cover'];
// The height used to be dependent on other widget settings
// If the user changes those settings but doesn't customize the height,
// let's intelligently assign a new height.
if ( in_array( $args['height'], array( 580, 110, 432 ) ) ) {
- if( $args['show_faces'] && $args['stream'] ) {
+ if ( $args['show_faces'] && $args['stream'] ) {
$args['height'] = 580;
- } else if( ! $args['show_faces'] && ! $args['stream'] ) {
- $args['height'] = 110;
+ } else if ( ! $args['show_faces'] && ! $args['stream'] ) {
+ $args['height'] = 130;
} else {
$args['height'] = 432;
}
@@ -296,18 +301,36 @@ class WPCOM_Widget_Facebook_LikeBox extends WP_Widget {
$locale = GP_Locales::by_slug( $lang );
} else {
// Jetpack: get_locale() returns 'it_IT';
- $locale = GP_Locales::by_field( 'wp_locale', $lang );
+ $locale = GP_Locales::by_field( 'facebook_locale', $lang );
}
- if ( !$locale || empty( $locale->facebook_locale ) ) {
+ if ( ! $locale ) {
return false;
}
+ if ( empty( $locale->facebook_locale ) ) {
+ if ( empty( $locale->wp_locale ) ) {
+ return false;
+ } else {
+ // Facebook SDK is smart enough to fall back to en_US if a
+ // locale isn't supported. Since supported Facebook locales
+ // can fall out of sync, we'll attempt to use the known
+ // wp_locale value and rely on said fallback.
+ return $locale->wp_locale;
+ }
+ }
+
return $locale->facebook_locale;
}
function get_locale() {
- return $this->guess_locale_from_lang( get_locale() );
+ $locale = $this->guess_locale_from_lang( get_locale() );
+
+ if ( ! $locale ) {
+ $locale = 'en_US';
+ }
+
+ return $locale;
}
}
diff --git a/plugins/jetpack/modules/widgets/facebook-likebox/style.css b/plugins/jetpack/modules/widgets/facebook-likebox/style.css
new file mode 100644
index 00000000..d5d554ba
--- /dev/null
+++ b/plugins/jetpack/modules/widgets/facebook-likebox/style.css
@@ -0,0 +1,3 @@
+.widget_facebook_likebox {
+ overflow: hidden;
+}
diff --git a/plugins/jetpack/modules/widgets/gallery.php b/plugins/jetpack/modules/widgets/gallery.php
index 0b525c63..0ad87d40 100644
--- a/plugins/jetpack/modules/widgets/gallery.php
+++ b/plugins/jetpack/modules/widgets/gallery.php
@@ -23,12 +23,18 @@ class Jetpack_Gallery_Widget extends WP_Widget {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
- $this->WP_Widget( 'gallery', apply_filters( 'jetpack_widget_name', __( 'Gallery', 'jetpack' ) ), $widget_ops, $control_ops );
+ parent::__construct(
+ 'gallery',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
+ apply_filters( 'jetpack_widget_name', __( 'Gallery', 'jetpack' ) ),
+ $widget_ops,
+ $control_ops
+ );
}
/**
* @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
- * @param array $instance The settings for the particular instance of the widget
+ * @param array $instance The settings for the particular instance of the widget.
*/
public function widget( $args, $instance ) {
$instance = wp_parse_args( (array) $instance, $this->defaults() );
@@ -69,6 +75,7 @@ class Jetpack_Gallery_Widget extends WP_Widget {
echo $before_widget . "\n";
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $instance['title'] );
if ( $title )
@@ -78,7 +85,17 @@ class Jetpack_Gallery_Widget extends WP_Widget {
$method = $instance['type'] . '_widget';
- // Allow the width of a gallery to be altered by themes or other code
+ /**
+ * Allow the width of a gallery to be altered by themes or other code.
+ *
+ * @module widgets
+ *
+ * @since 2.5.0
+ *
+ * @param int self::DEFAULT_WIDTH Default gallery width. Default is 265.
+ * @param string $args Display arguments including before_title, after_title, before_widget, and after_widget.
+ * @param array $instance The settings for the particular instance of the widget.
+ */
$this->_instance_width = apply_filters( 'gallery_widget_content_width', self::DEFAULT_WIDTH, $args, $instance );
// Register a filter to modify the tiled_gallery_content_width, so Jetpack_Tiled_Gallery
@@ -234,6 +251,7 @@ class Jetpack_Gallery_Widget extends WP_Widget {
$max_width = min( intval( $content_width ), $max_width );
$color = Jetpack_Options::get_option( 'slideshow_background_color', 'black' );
+ $autostart = isset( $attr['autostart'] ) ? $attr['autostart'] : true;
$js_attr = array(
'gallery' => $gallery,
@@ -242,6 +260,7 @@ class Jetpack_Gallery_Widget extends WP_Widget {
'height' => $max_height,
'trans' => 'fade',
'color' => $color,
+ 'autostart' => $autostart,
);
$html = $slideshow->slideshow_js( $js_attr );
@@ -366,9 +385,11 @@ class Jetpack_Gallery_Widget extends WP_Widget {
wp_enqueue_media();
wp_enqueue_script( 'gallery-widget-admin', plugins_url( '/gallery/js/admin.js', __FILE__ ), array(
- 'media-models',
- 'media-views'
- ) );
+ 'media-models',
+ 'media-views'
+ ),
+ '20150501'
+ );
$js_settings = array(
'thumbSize' => self::THUMB_SIZE
diff --git a/plugins/jetpack/modules/widgets/gallery/js/admin.js b/plugins/jetpack/modules/widgets/gallery/js/admin.js
index 234eafc2..1f4526e2 100644
--- a/plugins/jetpack/modules/widgets/gallery/js/admin.js
+++ b/plugins/jetpack/modules/widgets/gallery/js/admin.js
@@ -6,10 +6,10 @@
var $thumbs;
$(function(){
- $( document.body ) .on( 'click', '.widget-content .gallery-widget-choose-images', function( event ) {
+ $( document.body ) .on( 'click', '.gallery-widget-choose-images', function( event ) {
event.preventDefault();
- var widget_form = $( this ).closest( 'form' );
+ var widget_form = $( this ).closest( 'form, .form' );
$ids = widget_form.find( '.gallery-widget-ids' );
$thumbs = widget_form.find( '.gallery-widget-thumbs' );
@@ -142,8 +142,7 @@
selection.each( function( model ){
var sizedUrl = model.get('url') + '?w=' + imageSize + '&h=' + imageSize + '&crop=true';
- var thumb = '<img src="' + sizedUrl + '" alt="' + model.get('title') + '" \
- title="' + model.get('title') + '" width="' + imageSize + '" height="' + imageSize + '" class="thumb" />';
+ var thumb = jQuery('<img>', { 'src' : sizedUrl, 'alt': model.get('title'), 'title': model.get('title'), 'width': imageSize, 'height': imageSize, 'class': 'thumb' });
wrapper.append( thumb );
});
diff --git a/plugins/jetpack/modules/widgets/goodreads.php b/plugins/jetpack/modules/widgets/goodreads.php
index 5a56644e..338a481d 100644
--- a/plugins/jetpack/modules/widgets/goodreads.php
+++ b/plugins/jetpack/modules/widgets/goodreads.php
@@ -21,6 +21,7 @@ class WPCOM_Widget_Goodreads extends WP_Widget {
function __construct() {
parent::__construct(
'wpcom-goodreads',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
apply_filters( 'jetpack_widget_name', __( 'Goodreads', 'jetpack' ) ),
array(
'classname' => 'widget_goodreads',
@@ -48,6 +49,7 @@ class WPCOM_Widget_Goodreads extends WP_Widget {
}
function widget( $args, $instance ) {
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $instance['title'] );
if ( empty( $instance['user_id'] ) || 'invalid' === $instance['user_id'] ) {
@@ -83,6 +85,7 @@ class WPCOM_Widget_Goodreads extends WP_Widget {
echo $args['after_widget'];
+ /** This action is already documented in modules/widgets/gravatar-profile.php */
do_action( 'jetpack_stats_extra', 'widget', 'goodreads' );
}
@@ -120,16 +123,11 @@ class WPCOM_Widget_Goodreads extends WP_Widget {
<input class="widefat" id="' . esc_attr( $this->get_field_id( 'title' ) ) . '" name="' . esc_attr( $this->get_field_name( 'title' ) ) . '" type="text" value="' . esc_attr( $instance['title'] ) . '" />
</label></p>
<p><label for="' . esc_attr( $this->get_field_id( 'user_id' ) ) . '">';
+ printf( __( 'Goodreads numeric user ID <a href="%s" target="_blank">(instructions)</a>:', 'jetpack' ), 'https://en.support.wordpress.com/widgets/goodreads-widget/#goodreads-user-id' );
if ( 'invalid' === $instance['user_id'] ) {
- $invalid_notice = _x( 'Invalid User ID, please verify and re-enter your', 'Goodreads numeric user id', 'jetpack' );
- echo '<span class="error">' . $invalid_notice . '</span>&nbsp;';
+ printf( '<br /><small class="error">%s</small>&nbsp;', __( 'Invalid User ID, please verify and re-enter your Goodreads numeric user ID.', 'jetpack' ) );
$instance['user_id'] = '';
}
- $goodreads_id = sprintf (
- __( 'Goodreads numeric user id <a href="%s" target="_blank">(instructions)</a>:', 'jetpack' ),
- 'http://support.wordpress.com/widgets/goodreads-widget/#goodreads-user-id'
- );
- echo $goodreads_id;
echo '<input class="widefat" id="' . esc_attr( $this->get_field_id( 'user_id' ) ) . '" name="' . esc_attr( $this->get_field_name( 'user_id' ) ) . '" type="text" value="' . esc_attr( $instance['user_id'] ) . '" />
</label></p>
<p><label for="' . esc_attr( $this->get_field_id( 'shelf' ) ) . '">' . esc_html__( 'Shelf:', 'jetpack' ) . '
diff --git a/plugins/jetpack/modules/widgets/google-plus/js/admin.js b/plugins/jetpack/modules/widgets/google-plus/js/admin.js
new file mode 100644
index 00000000..a27c2def
--- /dev/null
+++ b/plugins/jetpack/modules/widgets/google-plus/js/admin.js
@@ -0,0 +1,22 @@
+(function($) {
+ // For when adding widget via customizer
+ $( document ).on( 'widget-added', function() {
+ toggle_items();
+ });
+
+ $(function(){
+ $( document ).on( 'change', '.googleplus-badge-choose-type', toggle_items )
+ .on( 'widget-updated', toggle_items );
+
+ toggle_items();
+ });
+
+ function toggle_items() {
+ $( '.widget-inside .googleplus-badge-choose-type' ).each( function(){
+ var $widget_form = $( this ).parents( 'form' );
+
+ $widget_form.find( '[class^="googleplus-badge-only-"]' ).parent().hide();
+ $widget_form.find( '.googleplus-badge-only-' + $( this ).val() ).parent().show();
+ });
+ }
+})(jQuery);
diff --git a/plugins/jetpack/modules/widgets/googleplus-badge.php b/plugins/jetpack/modules/widgets/googleplus-badge.php
new file mode 100644
index 00000000..617daf0d
--- /dev/null
+++ b/plugins/jetpack/modules/widgets/googleplus-badge.php
@@ -0,0 +1,310 @@
+<?php
+
+/**
+ * Register the widget for use in Appearance -> Widgets
+ */
+add_action( 'widgets_init', 'jetpack_googleplus_badge_init' );
+
+function jetpack_googleplus_badge_init() {
+ register_widget( 'WPCOM_Widget_GooglePlus_Badge' );
+}
+
+/**
+ * Google+ Badge widget class
+ * Display a Google+ Badge as a widget
+ * https://developers.google.com/+/web/badge/
+ */
+class WPCOM_Widget_GooglePlus_Badge extends WP_Widget {
+
+ private $default_width = 220;
+ private $max_width = 450;
+ private $min_width_portrait = 180;
+ private $min_width_landscape = 273;
+ private $min_width;
+ private $default_theme = 'light';
+ private $allowed_themes = array( 'light', 'dark' );
+ private $default_layout = 'portrait';
+ private $allowed_layouts = array( 'landscape', 'portrait' );
+ private $default_type = 'person';
+ private $allowed_types = array();
+
+ function __construct() {
+ $this->min_width = min( $this->min_width_portrait, $this->min_width_landscape );
+ $this->allowed_types = array(
+ 'person' => __( 'Person Widget', 'jetpack' ),
+ 'page' => __( 'Page Widget', 'jetpack' ),
+ 'community' => __( 'Community Widget', 'jetpack' ),
+ );
+
+ parent::__construct(
+ 'googleplus-badge',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
+ apply_filters( 'jetpack_widget_name', __( 'Google+ Badge', 'jetpack' ) ),
+ array(
+ 'classname' => 'widget_googleplus_badge',
+ 'description' => __( 'Display a Google+ Badge to connect visitors to your Google+', 'jetpack' )
+ )
+ );
+
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
+
+ if ( is_active_widget( '', '', 'googleplus-badge' ) ) {
+ add_action( 'wp_print_styles', array( $this, 'enqueue_script' ) );
+ add_filter( 'script_loader_tag', array( $this, 'replace_script_tag' ), 10, 2 );
+ }
+ }
+
+ function enqueue_script() {
+ wp_enqueue_script( 'googleplus-widget', 'https://apis.google.com/js/platform.js' );
+ }
+
+ function replace_script_tag( $tag, $handle ) {
+ if ( 'googleplus-widget' !== $handle ) {
+ return $tag;
+ }
+
+ return str_replace( ' src', ' async defer src', $tag );
+ }
+
+ function enqueue_admin_scripts() {
+ global $pagenow;
+
+ if ( 'widgets.php' == $pagenow || 'customize.php' == $pagenow ) {
+ wp_enqueue_script( 'googleplus-widget-admin', plugins_url( '/google-plus/js/admin.js', __FILE__ ), array( 'jquery' ) );
+ }
+ }
+
+ function widget( $args, $instance ) {
+ if ( empty( $instance['href'] ) || ! $this->is_valid_googleplus_url( $instance['href'] ) ) {
+ if ( current_user_can( 'edit_theme_options' ) ) {
+ echo $args['before_widget'];
+ echo '<p>' . sprintf(
+ __( 'It looks like your Google+ URL is incorrectly configured. Please check it in your <a href="%s">widget settings</a>.', 'jetpack' ),
+ admin_url( 'widgets.php' )
+ ) . '</p>';
+ echo $args['after_widget'];
+ }
+ echo '<!-- Invalid Google+ URL -->';
+ return;
+ }
+
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
+ $title = apply_filters( 'widget_title', $instance['title'] );
+
+ echo $args['before_widget'];
+ echo $args['before_title'] . esc_html( $title ) . $args['after_title'];
+
+ switch( $instance['type'] ) {
+ case 'person':
+ case 'page':
+ printf(
+ '<div class="g-%s" data-href="%s" data-layout="%s" data-theme="%s" data-showcoverphoto="%s" data-showtagline="%s" data-width="%s"></div>',
+ $instance['type'],
+ esc_url( $instance['href'] ),
+ esc_attr( $instance['layout'] ),
+ esc_attr( $instance['theme'] ),
+ esc_attr( $instance['show_coverphoto'] ? 'true' : 'false' ),
+ esc_attr( $instance['show_tagline'] ? 'true' : 'false' ),
+ esc_attr( $instance['width'] )
+ );
+ break;
+ case 'community':
+ printf(
+ '<div class="g-%s" data-href="%s" data-layout="%s" data-theme="%s" data-showphoto="%s" data-showowners="%s" data-showtagline="%s" data-width="%s"></div>',
+ $instance['type'],
+ esc_url( $instance['href'] ),
+ esc_attr( $instance['layout'] ),
+ esc_attr( $instance['theme'] ),
+ esc_attr( $instance['show_photo'] ? 'true' : 'false' ),
+ esc_attr( $instance['show_owners'] ? 'true' : 'false' ),
+ esc_attr( $instance['show_tagline'] ? 'true' : 'false' ),
+ esc_attr( $instance['width'] )
+ );
+ break;
+ }
+
+ echo $args['after_widget'];
+
+ /** This action is already documented in modules/widgets/gravatar-profile.php */
+ do_action( 'jetpack_stats_extra', 'widget', 'googleplus-badge' );
+ }
+
+ function update( $new_instance, $old_instance ) {
+ $instance = array();
+
+ $instance['title'] = trim( strip_tags( stripslashes( $new_instance['title'] ) ) );
+
+ // Validate the Google+ URL
+ $instance['href'] = trim( strip_tags( stripslashes( $new_instance['href'] ) ) );
+
+ if ( $this->is_valid_googleplus_url( $instance['href'] ) ) {
+ $temp = explode( '?', $instance['href'] );
+ $instance['href'] = str_replace( array( 'http://plus.google.com', 'https://plus.google.com' ), 'https://plus.google.com', $temp[0] );
+ } else {
+ $instance['href'] = '';
+ }
+
+ $instance['theme'] = $this->filter_text( $new_instance['theme'], $this->default_theme, $this->allowed_themes );
+ $instance['layout'] = $this->filter_text( $new_instance['layout'], $this->default_layout, $this->allowed_layouts );
+
+ switch( $instance['layout'] ) {
+ case 'portrait':
+ $instance['width'] = filter_var( $new_instance['width'], FILTER_VALIDATE_INT, array( 'options' => array(
+ 'min_range' => $this->min_width_portrait,
+ 'max_range' => $this->max_width,
+ 'default' => $this->default_width,
+ ) ) );
+ break;
+ case 'landscape':
+ $instance['width'] = filter_var( $new_instance['width'], FILTER_VALIDATE_INT, array( 'options' => array(
+ 'min_range' => $this->min_width_landscape,
+ 'max_range' => $this->max_width,
+ 'default' => $this->default_width,
+ ) ) );
+ break;
+ }
+
+ if ( array_key_exists( $new_instance['type'], $this->allowed_types ) ) {
+ $instance['type'] = $new_instance['type'];
+ } else {
+ $instance['type'] = $this->default_type;
+ }
+
+ switch( $instance['type'] ) {
+ case 'person':
+ case 'page':
+ $instance['show_coverphoto'] = isset( $new_instance['show_coverphoto'] );
+ break;
+ case 'community':
+ $instance['show_photo'] = isset( $new_instance['show_photo'] );
+ $instance['show_owners'] = isset( $new_instance['show_owners'] );
+ break;
+ }
+
+ $instance['show_tagline'] = isset( $new_instance['show_tagline'] );
+
+ return $instance;
+ }
+
+ function form( $instance ) {
+ $defaults = array(
+ 'title' => '',
+ 'href' => '',
+ 'width' => $this->default_width,
+ 'layout' => $this->default_layout,
+ 'theme' => $this->default_theme,
+ 'show_coverphoto' => true,
+ 'show_photo' => true,
+ 'show_owners' => false,
+ 'show_tagline' => true,
+ 'type' => $this->default_type,
+ );
+
+ $instance = wp_parse_args( $instance, $defaults );
+ ?>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>">
+ <?php _e( 'Title', 'jetpack' ); ?>
+ <input type="text" name="<?php echo $this->get_field_name( 'title' ); ?>" id="<?php echo $this->get_field_id( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" class="widefat" />
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'type' ); ?>">
+ <?php _e( 'Type of Widget', 'jetpack' ); ?>
+ <select name="<?php echo $this->get_field_name( 'type' ); ?>" id="<?php echo $this->get_field_id( 'type' ); ?>" class="widefat googleplus-badge-choose-type">
+ <?php
+ foreach( $this->allowed_types as $type_value => $type_display ) {
+ printf(
+ '<option value="%s"%s>%s</option>',
+ esc_attr( $type_value ),
+ selected( $type_value, $instance['type'], false ),
+ esc_attr( $type_display )
+ );
+ }
+ ?>
+ </select>
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'href' ); ?>">
+ <?php _e( 'Google+ URL', 'jetpack' ); ?>
+ <input type="text" name="<?php echo $this->get_field_name( 'href' ); ?>" id="<?php echo $this->get_field_id( 'href' ); ?>" value="<?php echo esc_url( $instance['href'] ); ?>" class="widefat" />
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'width' ); ?>">
+ <?php _e( 'Width', 'jetpack' ); ?>
+ <input type="number" class="smalltext" min="<?php echo esc_attr( $this->min_width ); ?>" max="<?php echo esc_attr( $this->max_width ); ?>" maxlength="3" name="<?php echo $this->get_field_name( 'width' ); ?>" id="<?php echo $this->get_field_id( 'width' ); ?>" value="<?php echo esc_attr( $instance['width'] ); ?>" style="text-align: center;" />px
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'layout' ); ?>">
+ <?php _e( 'Layout', 'jetpack' ); ?>
+ <select name="<?php echo $this->get_field_name( 'layout' ); ?>" id="<?php echo $this->get_field_id( 'layout' ); ?>">
+ <option value="landscape" <?php selected( $instance['layout'], 'landscape' ); ?>><?php _e( 'Landscape', 'jetpack' ); ?></option>
+ <option value="portrait" <?php selected( $instance['layout'], 'portrait' ); ?>><?php _e( 'Portrait', 'jetpack' ); ?></option>
+ </select>
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'theme' ); ?>">
+ <?php _e( 'Theme', 'jetpack' ); ?>
+ <select name="<?php echo $this->get_field_name( 'theme' ); ?>" id="<?php echo $this->get_field_id( 'theme' ); ?>">
+ <option value="light" <?php selected( $instance['theme'], 'light' ); ?>><?php _e( 'Light', 'jetpack' ); ?></option>
+ <option value="dark" <?php selected( $instance['theme'], 'dark' ); ?>><?php _e( 'Dark', 'jetpack' ); ?></option>
+ </select>
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'show_coverphoto' ); ?>">
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'show_coverphoto' ); ?>" id="<?php echo $this->get_field_id( 'show_coverphoto' ); ?>" <?php checked( $instance['show_coverphoto'] ); ?> class="googleplus-badge-only-person googleplus-badge-only-page" />
+ <?php _e( 'Show Cover Photo', 'jetpack' ); ?>
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'show_photo' ); ?>">
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'show_photo' ); ?>" id="<?php echo $this->get_field_id( 'show_photo' ); ?>" <?php checked( $instance['show_photo'] ); ?> class="googleplus-badge-only-community" />
+ <?php _e( 'Show Photo', 'jetpack' ); ?>
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'show_owners' ); ?>">
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'show_owners' ); ?>" id="<?php echo $this->get_field_id( 'show_owners' ); ?>" <?php checked( $instance['show_owners'] ); ?> class="googleplus-badge-only-community" />
+ <?php _e( 'Show Owners', 'jetpack' ); ?>
+ </label>
+ </p>
+
+ <p>
+ <label for="<?php echo $this->get_field_id( 'show_tagline' ); ?>">
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'show_tagline' ); ?>" id="<?php echo $this->get_field_id( 'show_tagline' ); ?>" <?php checked( $instance['show_tagline'] ); ?> />
+ <?php _e( 'Show Tag Line', 'jetpack' ); ?>
+ </label>
+ </p>
+
+ <?php
+ }
+
+ function is_valid_googleplus_url( $url ) {
+ return ( FALSE !== strpos( $url, 'plus.google.com' ) ) ? TRUE : FALSE;
+ }
+
+ function filter_text( $value, $default = '', $allowed = array() ) {
+ $allowed = (array) $allowed;
+
+ if ( empty( $value ) || ( ! empty( $allowed ) && ! in_array( $value, $allowed ) ) )
+ $value = $default;
+
+ return $value;
+ }
+}
+
+// END
diff --git a/plugins/jetpack/modules/widgets/gravatar-profile.php b/plugins/jetpack/modules/widgets/gravatar-profile.php
index efaf85aa..103fb128 100644
--- a/plugins/jetpack/modules/widgets/gravatar-profile.php
+++ b/plugins/jetpack/modules/widgets/gravatar-profile.php
@@ -18,6 +18,7 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget {
function __construct() {
parent::__construct(
'grofile',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
apply_filters( 'jetpack_widget_name', __( 'Gravatar Profile', 'jetpack' ) ),
array(
'classname' => 'widget-grofile grofile',
@@ -31,12 +32,13 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget {
}
function widget( $args, $instance ) {
-
+
$instance = wp_parse_args( $instance, array(
'title' => '',
'email' => ''
) );
-
+
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $instance['title'] );
if ( !$instance['email'] ) {
@@ -98,10 +100,38 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget {
?>
- <p><a href="<?php echo esc_url( $profile['profileUrl'] ); ?>" class="grofile-full-link"><?php echo esc_html( apply_filters( 'jetpack_gravatar_full_profile_title', __( 'View Full Profile &rarr;', 'jetpack' ) ) ); ?></a></p>
+ <p><a href="<?php echo esc_url( $profile['profileUrl'] ); ?>" class="grofile-full-link">
+ <?php echo esc_html(
+ /**
+ * Filter the Gravatar Profile widget's profile link title.
+ *
+ * @module widgets
+ *
+ * @since 2.8.0
+ *
+ * @param string $str Profile link title.
+ */
+ apply_filters(
+ 'jetpack_gravatar_full_profile_title',
+ __( 'View Full Profile &rarr;', 'jetpack' )
+ )
+ ); ?>
+ </a></p>
<?php
+ /**
+ * Fires when an item is displayed on the frontend.
+ *
+ * Can be used to track stats about the number of displays for a specific item
+ *
+ * @module widgets, shortcodes
+ *
+ * @since 1.6.0
+ *
+ * @param string widget Item type (e.g. widget, or embed).
+ * @param string grofile Item description (e.g. grofile, goodreads).
+ */
do_action( 'jetpack_stats_extra', 'widget', 'grofile' );
} else {
@@ -118,7 +148,21 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget {
return;
?>
- <h4><?php echo esc_html( apply_filters( 'jetpack_gravatar_personal_links_title', __( 'Personal Links', 'jetpack' ) ) ); ?></h4>
+ <h4><?php echo esc_html(
+ apply_filters(
+ /**
+ * Filter the Gravatar Profile widget's "Personal Links" section title.
+ *
+ * @module widgets
+ *
+ * @since 2.8.0
+ *
+ * @param string $str "Personal Links" section title.
+ */
+ 'jetpack_gravatar_personal_links_title',
+ __( 'Personal Links', 'jetpack' )
+ )
+ ); ?></h4>
<ul class="grofile-urls grofile-links">
<?php foreach( $personal_links as $personal_link ) : ?>
@@ -126,7 +170,7 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget {
<a href="<?php echo esc_url( $personal_link['value'] ); ?>">
<?php
$link_title = ( ! empty( $personal_link['title'] ) ) ? $personal_link['title'] : $personal_link['value'];
- echo esc_html( $link_title );
+ echo esc_html( $link_title );
?>
</a>
</li>
@@ -141,7 +185,21 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget {
return;
?>
- <h4><?php echo esc_html( apply_filters( 'jetpack_gravatar_verified_services_title', __( 'Verified Services', 'jetpack' ) ) ); ?></h4>
+ <h4><?php echo esc_html(
+ /**
+ * Filter the Gravatar Profile widget's "Verified Services" section title.
+ *
+ * @module widgets
+ *
+ * @since 2.8.0
+ *
+ * @param string $str "Verified Services" section title.
+ */
+ apply_filters(
+ 'jetpack_gravatar_verified_services_title',
+ __( 'Verified Services', 'jetpack' )
+ )
+ ); ?></h4>
<ul class="grofile-urls grofile-accounts">
<?php foreach( $accounts as $account ) :
@@ -164,19 +222,20 @@ class Jetpack_Gravatar_Profile_Widget extends WP_Widget {
}
function form( $instance ) {
-
$title = isset( $instance['title'] ) ? $instance['title'] : '';
$email = isset( $instance['email'] ) ? $instance['email'] : '';
$email_user = isset( $instance['email_user'] ) ? $instance['email_user'] : get_current_user_id();
$show_personal_links = isset( $instance['show_personal_links'] ) ? (bool) $instance['show_personal_links'] : '';
$show_account_links = isset( $instance['show_account_links'] ) ? (bool) $instance['show_account_links'] : '';
+ $profile_url = 'https://gravatar.com/profile/edit';
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
$profile_url = admin_url( 'profile.php' );
- } else {
- $profile_url = 'https://gravatar.com/profile/edit';
- }
+ if ( isset( $_REQUEST['calypso'] ) ) {
+ $profile_url = 'https://wordpress.com/me';
+ }
+ }
?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>">
diff --git a/plugins/jetpack/modules/widgets/image-widget.php b/plugins/jetpack/modules/widgets/image-widget.php
index 11a86729..fab8df50 100644
--- a/plugins/jetpack/modules/widgets/image-widget.php
+++ b/plugins/jetpack/modules/widgets/image-widget.php
@@ -21,6 +21,7 @@ class Jetpack_Image_Widget extends WP_Widget {
public function __construct() {
parent::__construct(
'image',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
apply_filters( 'jetpack_widget_name', esc_html__( 'Image', 'jetpack' ) ),
array(
'classname' => 'widget_image',
@@ -51,47 +52,60 @@ class Jetpack_Image_Widget extends WP_Widget {
* @param array $instance Saved values from database.
*/
public function widget( $args, $instance ) {
- extract( $args );
- echo $before_widget;
+ echo $args['before_widget'];
$instance = wp_parse_args( $instance, array(
'title' => '',
'img_url' => ''
) );
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $instance['title'] );
- if ( $title )
- echo $before_title . esc_html( $title ) . $after_title;
+ if ( $title ) {
+ echo $args['before_title'] . esc_html( $title ) . $args['after_title'];
+ }
if ( '' != $instance['img_url'] ) {
$output = '<img src="' . esc_attr( $instance['img_url'] ) .'" ';
- if ( '' != $instance['alt_text'] )
+
+ if ( '' != $instance['alt_text'] ) {
$output .= 'alt="' . esc_attr( $instance['alt_text'] ) .'" ';
- if ( '' != $instance['img_title'] )
+ }
+ if ( '' != $instance['img_title'] ) {
$output .= 'title="' . esc_attr( $instance['img_title'] ) .'" ';
- if ( '' == $instance['caption'] )
+ }
+ if ( '' == $instance['caption'] ) {
$output .= 'class="align' . esc_attr( $instance['align'] ) . '" ';
- if ( '' != $instance['img_width'] )
+ }
+ if ( '' != $instance['img_width'] ) {
$output .= 'width="' . esc_attr( $instance['img_width'] ) .'" ';
- if ( '' != $instance['img_height'] )
+ }
+ if ( '' != $instance['img_height'] ) {
$output .= 'height="' . esc_attr( $instance['img_height'] ) .'" ';
+ }
$output .= '/>';
- if ( '' != $instance['link'] && ! empty( $instance['link_target_blank'] ) )
+ if ( '' != $instance['link'] && ! empty( $instance['link_target_blank'] ) ) {
$output = '<a target="_blank" href="' . esc_attr( $instance['link'] ) . '">' . $output . '</a>';
- if ( '' != $instance['link'] && empty( $instance['link_target_blank'] ) )
+ }
+ if ( '' != $instance['link'] && empty( $instance['link_target_blank'] ) ) {
$output = '<a href="' . esc_attr( $instance['link'] ) . '">' . $output . '</a>';
+ }
if ( '' != $instance['caption'] ) {
- $caption = apply_filters( 'widget_text', $instance['caption'] );
- $output = '[caption align="align' . esc_attr( $instance['align'] ) . '" width="' . esc_attr( $instance['img_width'] ) .'"]' . $output . ' ' . $caption . '[/caption]'; // wp_kses_post caption on update
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
+ $caption = apply_filters( 'widget_text', $instance['caption'] );
+ $img_width = ( ! empty( $instance['img_width'] ) ? 'style="width: ' . esc_attr( $instance['img_width'] ) .'px"' : '' );
+ $output = '<figure ' . $img_width .' class="wp-caption align' . esc_attr( $instance['align'] ) . '">
+ ' . $output . '
+ <figcaption class="wp-caption-text">' . $caption . '</figcaption>
+ </figure>'; // wp_kses_post caption on update
}
-
echo '<div class="jetpack-image-container">' . do_shortcode( $output ) . '</div>';
}
- echo "\n" . $after_widget;
+ echo "\n" . $args['after_widget'];
}
/**
diff --git a/plugins/jetpack/modules/widgets/rsslinks-widget.php b/plugins/jetpack/modules/widgets/rsslinks-widget.php
index 04545bc9..c1ed416e 100644
--- a/plugins/jetpack/modules/widgets/rsslinks-widget.php
+++ b/plugins/jetpack/modules/widgets/rsslinks-widget.php
@@ -8,9 +8,17 @@
class Jetpack_RSS_Links_Widget extends WP_Widget {
- function Jetpack_RSS_Links_Widget() {
- $widget_ops = array( 'classname' => 'widget_rss_links', 'description' => __( "Links to your blog's RSS feeds", 'jetpack' ) );
- $this->WP_Widget( 'rss_links', __( 'RSS Links (Jetpack)', 'jetpack' ), $widget_ops );
+ function __construct() {
+ $widget_ops = array(
+ 'classname' => 'widget_rss_links',
+ 'description' => __( "Links to your blog's RSS feeds", 'jetpack' )
+ );
+ parent::__construct(
+ 'rss_links',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
+ apply_filters( 'jetpack_widget_name', __( 'RSS Links', 'jetpack' ) ),
+ $widget_ops
+ );
}
function widget( $args, $instance ) {
@@ -18,6 +26,7 @@ class Jetpack_RSS_Links_Widget extends WP_Widget {
extract( $args );
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $instance['title'] );
echo $before_widget;
@@ -157,19 +166,41 @@ class Jetpack_RSS_Links_Widget extends WP_Widget {
$link_item = '';
$format = $args['format'];
-
+
+ /**
+ * Filters the target link attribute for the RSS link in the RSS widget.
+ *
+ * @module widgets
+ *
+ * @since 3.4.0
+ *
+ * @param bool false Control whether the link should open in a new tab. Default to false.
+ */
if ( apply_filters( 'jetpack_rsslinks_widget_target_blank', false ) ) {
$link_target = '_blank';
} else {
$link_target = '_self';
}
-
- if ( 'image' == $format || 'text-image' == $format )
- $link_item = '<a target="' . $link_target . '" href="' . get_bloginfo( $rss_type ) . '" title="' . esc_attr( $subscribe_to ) . '"><img src="' . esc_url( plugins_url( 'images/rss/' . $args['imagecolor'] . '-' . $args['imagesize'] . '.png', dirname( dirname( __FILE__ ) ) ) ) . '" alt="RSS Feed" /></a>';
- if ( 'text-image' == $format )
+
+ if ( 'image' == $format || 'text-image' == $format ) {
+ /**
+ * Filters the image used as RSS icon in the RSS widget.
+ *
+ * @module widgets
+ *
+ * @since 3.6.0
+ *
+ * @param string $var URL of RSS Widget icon.
+ */
+ $link_image = apply_filters( 'jetpack_rss_widget_icon', plugins_url( 'images/rss/' . $args['imagecolor'] . '-' . $args['imagesize'] . '.png', dirname( dirname( __FILE__ ) ) ) );
+ $link_item = '<a target="' . $link_target . '" href="' . get_bloginfo( $rss_type ) . '" title="' . esc_attr( $subscribe_to ) . '"><img src="' . esc_url( $link_image ) . '" alt="RSS Feed" /></a>';
+ }
+ if ( 'text-image' == $format ) {
$link_item .= '&nbsp;<a target="' . $link_target . '" href="' . get_bloginfo( $rss_type ) . '" title="' . esc_attr( $subscribe_to ) . '">' . esc_html__( 'RSS - ' . $type_text, 'jetpack' ). '</a>';
- if ( 'text' == $format )
+ }
+ if ( 'text' == $format ) {
$link_item = '<a target="' . $link_target . '" href="' . get_bloginfo( $rss_type ) . '" title="' . esc_attr( $subscribe_to ) . '">' . esc_html__( 'RSS - ' . $type_text, 'jetpack' ). '</a>';
+ }
if ( 'text' == $format )
echo '<li>';
@@ -182,10 +213,9 @@ class Jetpack_RSS_Links_Widget extends WP_Widget {
echo '</p>';
}
-} //Class Jetpack_RSS_Links_Widget
+} // Class Jetpack_RSS_Links_Widget
function jetpack_rss_links_widget_init() {
register_widget( 'Jetpack_RSS_Links_Widget' );
}
add_action( 'widgets_init', 'jetpack_rss_links_widget_init' );
-?>
diff --git a/plugins/jetpack/modules/widgets/social-media-icons.php b/plugins/jetpack/modules/widgets/social-media-icons.php
new file mode 100644
index 00000000..30908669
--- /dev/null
+++ b/plugins/jetpack/modules/widgets/social-media-icons.php
@@ -0,0 +1,250 @@
+<?php
+/*
+Plugin Name: Social Media Icons Widget
+Description: A simple widget that displays social media icons
+Author: Chris Rudzki
+*/
+
+// Creating the widget
+
+class WPCOM_social_media_icons_widget extends WP_Widget {
+
+ private $defaults;
+
+ private $services;
+
+ public function __construct() {
+ parent::__construct(
+ 'wpcom_social_media_icons_widget',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
+ apply_filters( 'jetpack_widget_name', esc_html__( 'Social Media Icons', 'jetpack' ) ),
+ array( 'description' => __( 'A simple widget that displays social media icons.', 'jetpack' ), )
+ );
+
+ $this->defaults = array(
+ 'title' => __( 'Social', 'jetpack' ),
+ 'facebook_username' => '',
+ 'twitter_username' => '',
+ 'instagram_username' => '',
+ 'pinterest_username' => '',
+ 'linkedin_username' => '',
+ 'github_username' => '',
+ 'youtube_username' => '',
+ 'vimeo_username' => '',
+ 'googleplus_username' => '',
+ );
+
+ $this->services = array(
+ 'facebook' => array( 'Facebook', 'https://www.facebook.com/%s/' ),
+ 'twitter' => array( 'Twitter', 'https://twitter.com/%s/' ),
+ 'instagram' => array( 'Instagram', 'https://instagram.com/%s/' ),
+ 'pinterest' => array( 'Pinterest', 'https://www.pinterest.com/%s/' ),
+ 'linkedin' => array( 'LinkedIn', 'https://www.linkedin.com/in/%s/' ),
+ 'github' => array( 'GitHub', 'https://github.com/%s/' ),
+ 'youtube' => array( 'YouTube', 'https://www.youtube.com/%s/' ),
+ 'vimeo' => array( 'Vimeo', 'https://vimeo.com/%s/' ),
+ 'googleplus' => array( 'Google+', 'https://plus.google.com/u/0/%s/' ),
+ );
+
+ if ( is_active_widget( false, false, $this->id_base ) ) {
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) );
+ }
+ }
+
+ public function enqueue_style() {
+ wp_register_style( 'jetpack_social_media_icons_widget', plugins_url( 'social-media-icons/style.css', __FILE__ ), array(), '20150602' );
+ wp_enqueue_style( 'jetpack_social_media_icons_widget' );
+ }
+
+ private function check_genericons() {
+ global $wp_styles;
+
+ foreach ( $wp_styles->queue as $handle ) {
+ if ( false !== stristr( $handle, 'genericons' ) ) {
+ return $handle;
+ }
+ }
+
+ return false;
+ }
+
+ // front end
+ public function widget( $args, $instance ) {
+ $instance = wp_parse_args( (array) $instance, $this->defaults );
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
+ $instance['title'] = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
+
+ if ( ! $this->check_genericons() ) {
+ wp_enqueue_style( 'genericons' );
+ }
+
+ $index = 10;
+ $html = array();
+
+ $alt_text = esc_attr__( 'View %1$s&#8217;s profile on %2$s', 'jetpack' );
+
+ foreach ( $this->services as $service => $data ) {
+ list( $service_name, $url ) = $data;
+
+ if ( ! isset( $instance[ $service . '_username' ] ) ) {
+ continue;
+ }
+ $username = $link_username = $instance[ $service . '_username' ];
+
+ if ( empty( $username ) ) {
+ continue;
+ }
+
+ $index += 10;
+
+ if (
+ $service === 'googleplus'
+ && ! is_numeric( $username )
+ && substr( $username, 0, 1 ) !== "+"
+ ) {
+ $link_username = "+" . $username;
+ }
+
+ if ( $service === 'youtube' && substr( $username, 0, 2 ) == 'UC' ) {
+ $link_username = "channel/" . $username;
+ } else if ( $service === 'youtube' ) {
+ $link_username = "user/" . $username;
+ }
+
+ /**
+ * Fires for each profile link in the social icons widget. Can be used
+ * to change the links for certain social networks if needed.
+ *
+ * @module widgets
+ *
+ * @since 3.8.0
+ *
+ * @param string $url the currently processed URL
+ * @param string $service the lowercase service slug, e.g. 'facebook', 'youtube', etc.
+ */
+ $link = apply_filters( 'jetpack_social_media_icons_widget_profile_link', esc_url( sprintf( $url, $link_username ) ), $service );
+
+ $html[ $index ] =
+ '<a title="' . sprintf( $alt_text, esc_attr( $username ), $service_name )
+ . '" href="' . $link
+ . '" class="genericon genericon-' . $service . '" target="_blank"><span class="screen-reader-text">'
+ . sprintf( $alt_text, esc_html( $username ), $service_name )
+ . '</span></a>';
+ }
+
+ /**
+ * Fires at the end of the list of Social Media accounts.
+ * Can be used to add a new Social Media Site to the Social Media Icons Widget.
+ * The filter function passed the array of HTML entries that will be sorted
+ * by key, each wrapped in a list item element and output as an unsorted list.
+ *
+ * @module widgets
+ *
+ * @since 3.8.0
+ *
+ * @param array $html Associative array of HTML snippets per each icon.
+ */
+ $html = apply_filters( 'jetpack_social_media_icons_widget_array', $html );
+
+ ksort( $html );
+ $html = '<ul><li>' . join( '</li><li>', $html ) . '</li></ul>';
+
+ if ( ! empty( $instance['title'] ) ) {
+ $html = $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'] . $html;
+ }
+
+ $html = $args['before_widget'] . $html . $args['after_widget'];
+
+ /**
+ * Filters the Social Media Icons widget output.
+ *
+ * @module widgets
+ *
+ * @since 3.6.0
+ *
+ * @param string $html Social Media Icons widget html output.
+ */
+ echo apply_filters( 'jetpack_social_media_icons_widget_output', $html );
+ }
+
+ // backend
+ public function form( $instance ) {
+ $instance = wp_parse_args( (array) $instance, $this->defaults );
+ ?>
+ <p>
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'jetpack' ); ?></label>
+ <input
+ class="widefat"
+ id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"
+ name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>"
+ type="text"
+ value="<?php echo esc_attr( $instance['title'] ); ?>"
+ />
+ </p>
+ <?php
+
+ foreach ( $this->services as $service => $data ) {
+ list( $service_name, $url ) = $data;
+ ?>
+ <p>
+ <label for="<?php echo esc_attr( $this->get_field_id( $service . '_username' ) ); ?>">
+ <?php
+ /* translators: %s is a social network name, e.g. Facebook */
+ printf( __( '%s username:', 'jetpack' ), $service_name );
+ ?>
+ </label>
+ <input
+ class="widefat"
+ id="<?php echo esc_attr( $this->get_field_id( $service . '_username' ) ); ?>"
+ name="<?php echo esc_attr( $this->get_field_name( $service . '_username' ) ); ?>"
+ type="text"
+ value="<?php echo esc_attr( $instance[ $service . '_username'] ); ?>"
+ />
+ </p>
+ <?php
+ }
+ }
+
+ // updating widget settings
+ public function update( $new_instance, $old_instance ) {
+ $instance = (array) $old_instance;
+
+ foreach ( $new_instance as $field => $value ) {
+ $instance[$field] = sanitize_text_field( $new_instance[$field] );
+ }
+
+ // Stats
+ $stats = $instance;
+ unset( $stats['title'] );
+ $stats = array_filter( $stats );
+ $stats = array_keys( $stats );
+ $stats = array_map( array( $this, 'remove_username' ), $stats );
+ foreach ( $stats as $val ) {
+ /**
+ * Fires for each Social Media account being saved in the Social Media Widget settings.
+ *
+ * @module widgets
+ *
+ * @since 3.6.0
+ *
+ * @param string social-media-links-widget-svcs Type of action to track.
+ * @param string $val Name of the Social Media account being saved.
+ */
+ do_action( 'jetpack_bump_stats_extras', 'social-media-links-widget-svcs', $val ) ;
+ }
+
+ return $instance;
+ }
+
+ // Remove username from value before to save stats
+ public function remove_username( $val ) {
+ return str_replace( '_username', '', $val );
+ }
+
+} // class ends here
+
+// register and load the widget
+function wpcom_social_media_icons_widget_load_widget() {
+ register_widget( 'wpcom_social_media_icons_widget' );
+}
+add_action( 'widgets_init', 'wpcom_social_media_icons_widget_load_widget' );
diff --git a/plugins/jetpack/modules/widgets/social-media-icons/style.css b/plugins/jetpack/modules/widgets/social-media-icons/style.css
new file mode 100644
index 00000000..b90c6faa
--- /dev/null
+++ b/plugins/jetpack/modules/widgets/social-media-icons/style.css
@@ -0,0 +1,49 @@
+.widget_wpcom_social_media_icons_widget ul {
+ list-style-type: none;
+ margin-left: 0;
+}
+
+.widget_wpcom_social_media_icons_widget li {
+ border: 0 none;
+ display: inline;
+ margin-right: 0.5em;
+}
+
+.widget_wpcom_social_media_icons_widget li a {
+ border: 0 none;
+ 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:hover,
+.widget_wpcom_social_media_icons_widget .screen-reader-text:active,
+.widget_wpcom_social_media_icons_widget .screen-reader-text:focus {
+ background-color: #f1f1f1;
+ border-radius: 3px;
+ box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
+ clip: auto !important;
+ color: #21759b;
+ display: block;
+ font-size: 14px;
+ font-size: 0.875rem;
+ font-weight: bold;
+ height: auto;
+ left: 5px;
+ line-height: normal;
+ padding: 15px 23px 14px;
+ text-decoration: none;
+ top: 5px;
+ width: auto;
+ z-index: 100000; /* Above WP toolbar. */
+} \ No newline at end of file
diff --git a/plugins/jetpack/modules/widgets/top-posts.php b/plugins/jetpack/modules/widgets/top-posts.php
index 31d1d3d2..e14b4434 100644
--- a/plugins/jetpack/modules/widgets/top-posts.php
+++ b/plugins/jetpack/modules/widgets/top-posts.php
@@ -15,9 +15,9 @@ add_action( 'widgets_init', 'jetpack_top_posts_widget_init' );
function jetpack_top_posts_widget_init() {
// Currently, this widget depends on the Stats Module
if (
- ( !defined( 'IS_WPCOM' ) || !IS_WPCOM )
+ ( ! defined( 'IS_WPCOM' ) || ! IS_WPCOM )
&&
- !function_exists( 'stats_get_csv' )
+ ! function_exists( 'stats_get_csv' )
) {
return;
}
@@ -26,12 +26,13 @@ function jetpack_top_posts_widget_init() {
}
class Jetpack_Top_Posts_Widget extends WP_Widget {
- var $alt_option_name = 'widget_stats_topposts';
- var $default_title = '';
+ public $alt_option_name = 'widget_stats_topposts';
+ public $default_title = '';
function __construct() {
parent::__construct(
'top-posts',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
apply_filters( 'jetpack_widget_name', __( 'Top Posts &amp; Pages', 'jetpack' ) ),
array(
'description' => __( 'Shows your most viewed posts and pages.', 'jetpack' ),
@@ -61,6 +62,9 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
$count = 10;
}
+ $allowed_post_types = array_values( get_post_types( array( 'public' => true ) ) );
+ $types = isset( $instance['types'] ) ? (array) $instance['types'] : array( 'post', 'page' );
+
if ( isset( $instance['display'] ) && in_array( $instance['display'], array( 'grid', 'list', 'text' ) ) ) {
$display = $instance['display'];
} else {
@@ -80,6 +84,28 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
</p>
<p>
+ <label for="<?php echo $this->get_field_id( 'types' ); ?>"><?php esc_html_e( 'Types of pages to display:', 'jetpack' ); ?></label>
+ <ul>
+ <?php foreach( $allowed_post_types as $type ) {
+ // Get the Post Type name to display next to the checkbox
+ $post_type_object = get_post_type_object( $type );
+ $label = $post_type_object->labels->name;
+
+ $checked = '';
+ if ( in_array( $type, $types ) ) {
+ $checked = 'checked="checked" ';
+ } ?>
+
+ <li><label>
+ <input value="<?php echo esc_attr( $type ); ?>" name="<?php echo $this->get_field_name( 'types' ); ?>[]" id="<?php echo $this->get_field_id( 'types' ); ?>-<?php echo $type; ?>" type="checkbox" <?php echo $checked; ?>>
+ <?php echo esc_html( $label ); ?>
+ </label></li>
+
+ <?php } // End foreach ?>
+ </ul>
+ </p>
+
+ <p>
<label><?php esc_html_e( 'Display as:', 'jetpack' ); ?></label>
<ul>
<li><label><input id="<?php echo $this->get_field_id( 'display' ); ?>-text" name="<?php echo $this->get_field_name( 'display' ); ?>" type="radio" value="text" <?php checked( 'text', $display ); ?> /> <?php esc_html_e( 'Text List', 'jetpack' ); ?></label></li>
@@ -105,6 +131,14 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
$instance['count'] = 10;
}
+ $allowed_post_types = array_values( get_post_types( array( 'public' => true ) ) );
+ $instance['types'] = $new_instance['types'];
+ foreach( $new_instance['types'] as $key => $type ) {
+ if ( ! in_array( $type, $allowed_post_types ) ) {
+ unset( $new_instance['types'][ $key ] );
+ }
+ }
+
if ( isset( $new_instance['display'] ) && in_array( $new_instance['display'], array( 'grid', 'list', 'text' ) ) ) {
$instance['display'] = $new_instance['display'];
} else {
@@ -116,16 +150,29 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
function widget( $args, $instance ) {
$title = isset( $instance['title' ] ) ? $instance['title'] : false;
- if ( false === $title )
+ if ( false === $title ) {
$title = $this->default_title;
+ }
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $title );
$count = isset( $instance['count'] ) ? (int) $instance['count'] : false;
if ( $count < 1 || 10 < $count ) {
$count = 10;
}
+ /**
+ * Control the number of displayed posts.
+ *
+ * @module widgets
+ *
+ * @since 3.3.0
+ *
+ * @param string $count Number of Posts displayed in the Top Posts widget. Default is 10.
+ */
$count = apply_filters( 'jetpack_top_posts_widget_count', $count );
+ $types = isset( $instance['types'] ) ? (array) $instance['types'] : array( 'post', 'page' );
+
if ( isset( $instance['display'] ) && in_array( $instance['display'], array( 'grid', 'list', 'text' ) ) ) {
$display = $instance['display'];
} else {
@@ -143,12 +190,35 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
} else {
$get_image_options['avatar_size'] = 40;
}
+ /**
+ * Top Posts Widget Image options.
+ *
+ * @module widgets
+ *
+ * @since 1.8.0
+ *
+ * @param array $get_image_options {
+ * Array of Image options.
+ * @type bool true Should we default to Gravatars when no image is found? Default is true.
+ * @type string $gravatar_default Default Image URL if no Gravatar is found.
+ * @type int $avatar_size Default Image size.
+ * }
+ */
$get_image_options = apply_filters( 'jetpack_top_posts_widget_image_options', $get_image_options );
}
$posts = $this->get_by_views( $count );
- if ( !$posts ) {
+ // Filter the returned posts. Remove all posts that do not match the chosen Post Types.
+ if ( isset( $types ) ) {
+ foreach ( $posts as $k => $post ) {
+ if ( ! in_array( $post['post_type'], $types ) ) {
+ unset( $posts[$k] );
+ }
+ }
+ }
+
+ if ( ! $posts ) {
$posts = $this->get_fallback_posts();
}
@@ -156,7 +226,7 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
if ( ! empty( $title ) )
echo $args['before_title'] . $title . $args['after_title'];
- if ( !$posts ) {
+ if ( ! $posts ) {
if ( current_user_can( 'edit_theme_options' ) ) {
echo '<p>' . sprintf(
__( 'There are no posts to display. <a href="%s">Want more traffic?</a>', 'jetpack' ),
@@ -188,11 +258,34 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
foreach ( $posts as $post ) :
?>
<div class="widget-grid-view-image">
- <?php do_action( 'jetpack_widget_top_posts_before_post', $post['post_id'] ); ?>
+ <?php
+ /**
+ * Fires before each Top Post result, inside <li>.
+ *
+ * @module widgets
+ *
+ * @since 3.2.0
+ *
+ * @param string $post['post_id'] Post ID.
+ */
+ do_action( 'jetpack_widget_top_posts_before_post', $post['post_id'] );
+ ?>
<a href="<?php echo esc_url( $post['permalink'] ); ?>" title="<?php echo esc_attr( wp_kses( $post['title'], array() ) ); ?>" class="bump-view" data-bump-view="tp">
- <img src="<?php echo esc_url( $post['image'] ); ?>" alt="<?php echo esc_attr( wp_kses( $post['title'], array() ) ); ?>" />
+ <?php $size = (int) $get_image_options['avatar_size']; ?>
+ <img width="<?php echo absint( $size ); ?>" height="<?php echo absint( $size ); ?>" src="<?php echo esc_url( $post['image'] ); ?>" alt="<?php echo esc_attr( wp_kses( $post['title'], array() ) ); ?>" data-pin-nopin="true" />
</a>
- <?php do_action( 'jetpack_widget_top_posts_after_post', $post['post_id'] ); ?>
+ <?php
+ /**
+ * Fires after each Top Post result, inside <li>.
+ *
+ * @module widgets
+ *
+ * @since 3.2.0
+ *
+ * @param string $post['post_id'] Post ID.
+ */
+ do_action( 'jetpack_widget_top_posts_after_post', $post['post_id'] );
+ ?>
</div>
<?php
endforeach;
@@ -202,16 +295,23 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
foreach ( $posts as $post ) :
?>
<li>
- <?php do_action( 'jetpack_widget_top_posts_before_post', $post['post_id'] ); ?>
+ <?php
+ /** This action is documented in modules/widgets/top-posts.php */
+ do_action( 'jetpack_widget_top_posts_before_post', $post['post_id'] );
+ ?>
<a href="<?php echo esc_url( $post['permalink'] ); ?>" title="<?php echo esc_attr( wp_kses( $post['title'], array() ) ); ?>" class="bump-view" data-bump-view="tp">
- <img src="<?php echo esc_url( $post['image'] ); ?>" class='widgets-list-layout-blavatar' alt="<?php echo esc_attr( wp_kses( $post['title'], array() ) ); ?>" />
+ <?php $size = (int) $get_image_options['avatar_size']; ?>
+ <img width="<?php echo absint( $size ); ?>" height="<?php echo absint( $size ); ?>" src="<?php echo esc_url( $post['image'] ); ?>" class='widgets-list-layout-blavatar' alt="<?php echo esc_attr( wp_kses( $post['title'], array() ) ); ?>" data-pin-nopin="true" />
</a>
<div class="widgets-list-layout-links">
<a href="<?php echo esc_url( $post['permalink'] ); ?>" class="bump-view" data-bump-view="tp">
<?php echo esc_html( wp_kses( $post['title'], array() ) ); ?>
</a>
</div>
- <?php do_action( 'jetpack_widget_top_posts_after_post', $post['post_id'] ); ?>
+ <?php
+ /** This action is documented in modules/widgets/top-posts.php */
+ do_action( 'jetpack_widget_top_posts_after_post', $post['post_id'] );
+ ?>
</li>
<?php
endforeach;
@@ -223,11 +323,17 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
foreach ( $posts as $post ) :
?>
<li>
- <?php do_action( 'jetpack_widget_top_posts_before_post', $post['post_id'] ); ?>
+ <?php
+ /** This action is documented in modules/widgets/top-posts.php */
+ do_action( 'jetpack_widget_top_posts_before_post', $post['post_id'] );
+ ?>
<a href="<?php echo esc_url( $post['permalink'] ); ?>" class="bump-view" data-bump-view="tp">
<?php echo esc_html( wp_kses( $post['title'], array() ) ); ?>
</a>
- <?php do_action( 'jetpack_widget_top_posts_after_post', $post['post_id'] ); ?>
+ <?php
+ /** This action is documented in modules/widgets/top-posts.php */
+ do_action( 'jetpack_widget_top_posts_after_post', $post['post_id'] );
+ ?>
</li>
<?php
endforeach;
@@ -238,6 +344,15 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
}
function get_by_views( $count ) {
+ /**
+ * Filter the number of days used to calculate Top Posts for the Top Posts widget.
+ *
+ * @module widgets
+ *
+ * @since 2.8.0
+ *
+ * @param int 2 Number of days. Default is 2.
+ */
$days = (int) apply_filters( 'jetpack_top_posts_days', 2 );
if ( $days < 1 ) {
@@ -249,12 +364,12 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
}
$post_view_posts = stats_get_csv( 'postviews', array( 'days' => absint( $days ), 'limit' => 11 ) );
- if ( !$post_view_posts ) {
+ if ( ! $post_view_posts ) {
return array();
}
$post_view_ids = array_filter( wp_list_pluck( $post_view_posts, 'post_id' ) );
- if ( !$post_view_ids ) {
+ if ( ! $post_view_ids ) {
return array();
}
@@ -275,7 +390,7 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
'no_found_rows' => true,
) );
- if ( !$posts ) {
+ if ( ! $posts ) {
return array();
}
@@ -291,15 +406,11 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
foreach ( (array) $post_ids as $post_id ) {
$post = get_post( $post_id );
- if ( !$post )
- continue;
-
- // Only posts and pages, no attachments
- if ( 'attachment' == $post->post_type )
+ if ( ! $post )
continue;
// hide private and password protected posts
- if ( 'publish' != $post->post_status || !empty( $post->post_password ) || empty( $post->ID ) )
+ if ( 'publish' != $post->post_status || ! empty( $post->post_password ) || empty( $post->ID ) )
continue;
// Both get HTML stripped etc on display
@@ -313,13 +424,27 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
$permalink = get_permalink( $post->ID );
- $posts[] = compact( 'title', 'permalink', 'post_id' );
+ $post_type = $post->post_type;
+
+ $posts[] = compact( 'title', 'permalink', 'post_id', 'post_type' );
$counter++;
- if ( $counter == $count )
+ if ( $counter == $count ) {
break; // only need to load and show x number of likes
+ }
}
+ /**
+ * Filter the Top Posts and Pages.
+ *
+ * @module widgets
+ *
+ * @since 3.0.0
+ *
+ * @param array $posts Array of the most popular posts.
+ * @param array $post_ids Array of Post IDs.
+ * @param string $count Number of Top Posts we want to display.
+ */
return apply_filters( 'jetpack_widget_get_top_posts', $posts, $post_ids, $count );
}
}
diff --git a/plugins/jetpack/modules/widgets/twitter-timeline.php b/plugins/jetpack/modules/widgets/twitter-timeline.php
index e794b8fa..9301f639 100644
--- a/plugins/jetpack/modules/widgets/twitter-timeline.php
+++ b/plugins/jetpack/modules/widgets/twitter-timeline.php
@@ -21,6 +21,7 @@ class Jetpack_Twitter_Timeline_Widget extends WP_Widget {
public function __construct() {
parent::__construct(
'twitter_timeline',
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
apply_filters( 'jetpack_widget_name', esc_html__( 'Twitter Timeline', 'jetpack' ) ),
array(
'classname' => 'widget_twitter_timeline',
@@ -64,8 +65,10 @@ class Jetpack_Twitter_Timeline_Widget extends WP_Widget {
echo $args['before_widget'];
- if ( $instance['title'] )
+ if ( $instance['title'] ) {
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
+ }
$data_attribs = array( 'widget-id', 'theme', 'link-color', 'border-color', 'chrome', 'tweet-limit' );
$attribs = array( 'width', 'height', 'lang' );
@@ -95,11 +98,13 @@ class Jetpack_Twitter_Timeline_Widget extends WP_Widget {
$timeline_placeholder = __( 'My Tweets', 'jetpack' );
/**
- * Filter the Timeline placeholder text
+ * Filter the Timeline placeholder text.
+ *
+ * @module widgets
*
- * @since 3.4
+ * @since 3.4.0
*
- * @param string $timeline_placeholder Timeline placeholder text
+ * @param string $timeline_placeholder Timeline placeholder text.
*/
$timeline_placeholder = apply_filters( 'jetpack_twitter_timeline_placeholder', $timeline_placeholder );
@@ -109,6 +114,7 @@ class Jetpack_Twitter_Timeline_Widget extends WP_Widget {
echo $args['after_widget'];
+ /** This action is documented in modules/widgets/social-media-icons.php */
do_action( 'jetpack_bump_stats_extras', 'widget', 'twitter_timeline' );
}
diff --git a/plugins/jetpack/modules/widgets/wordpress-post-widget.php b/plugins/jetpack/modules/widgets/wordpress-post-widget.php
index a3c724e1..198effc4 100644
--- a/plugins/jetpack/modules/widgets/wordpress-post-widget.php
+++ b/plugins/jetpack/modules/widgets/wordpress-post-widget.php
@@ -7,21 +7,141 @@
* Author URI: http://automattic.com
* License: GPL2
*/
+
+/**
+ * Disable direct access/execution to/of the widget code.
+ */
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
add_action( 'widgets_init', 'jetpack_display_posts_widget' );
function jetpack_display_posts_widget() {
- register_widget( 'Jetpack_Display_Posts_Widget' );
+ register_widget( 'Jetpack_Display_Posts_Widget' );
+}
+
+
+/**
+ * Cron tasks
+ */
+
+add_filter( 'cron_schedules', 'jetpack_display_posts_widget_cron_intervals' );
+
+/**
+ * Adds 10 minute running interval to the cron schedules.
+ *
+ * @param array $current_schedules Currently defined schedules list.
+ *
+ * @return array
+ */
+function jetpack_display_posts_widget_cron_intervals( $current_schedules ) {
+
+ /**
+ * Only add the 10 minute interval if it wasn't already set.
+ */
+ if ( ! isset( $current_schedules['minutes_10'] ) ) {
+ $current_schedules['minutes_10'] = array(
+ 'interval' => 10 * MINUTE_IN_SECONDS,
+ 'display' => 'Every 10 minutes'
+ );
+ }
+
+ return $current_schedules;
}
+/**
+ * Execute the cron task
+ */
+add_action( 'jetpack_display_posts_widget_cron_update', 'jetpack_display_posts_update_cron_action' );
+function jetpack_display_posts_update_cron_action() {
+ $widget = new Jetpack_Display_Posts_Widget();
+ $widget->cron_task();
+}
+
+/**
+ * Handle activation procedures for the cron.
+ *
+ * `updating_jetpack_version` - Handle cron activation when Jetpack gets updated. It's here
+ * to cover the first cron activation after the update.
+ *
+ * `jetpack_activate_module_widgets` - Activate the cron when the Extra Sidebar widgets are activated.
+ *
+ * `activated_plugin` - Activate the cron when Jetpack gets activated.
+ *
+ */
+add_action( 'updating_jetpack_version', 'jetpack_display_posts_widget_conditionally_activate_cron' );
+add_action( 'jetpack_activate_module_widgets', 'Jetpack_Display_Posts_Widget::activate_cron' );
+add_action( 'activated_plugin', 'jetpack_conditionally_activate_cron_on_plugin_activation' );
+
+/**
+ * Executed when Jetpack gets activated. Tries to activate the cron if it is needed.
+ *
+ * @param string $plugin_file_name The plugin file that was activated.
+ */
+function jetpack_conditionally_activate_cron_on_plugin_activation( $plugin_file_name ) {
+ if ( plugin_basename( JETPACK__PLUGIN_FILE ) === $plugin_file_name ) {
+ jetpack_display_posts_widget_conditionally_activate_cron();
+ }
+}
+
+/**
+ * Activates the cron only when needed.
+ * @see Jetpack_Display_Posts_Widget::should_cron_be_running
+ */
+function jetpack_display_posts_widget_conditionally_activate_cron() {
+ $widget = new Jetpack_Display_Posts_Widget();
+ if ( $widget->should_cron_be_running() ) {
+ $widget->activate_cron();
+ }
+
+ unset( $widget );
+}
+
+/**
+ * End of cron activation handling.
+ */
+
+
+/**
+ * Handle deactivation procedures where they are needed.
+ *
+ * If Extra Sidebar Widgets module is deactivated, the cron is not needed.
+ *
+ * If Jetpack is deactivated, the cron is not needed.
+ */
+add_action( 'jetpack_deactivate_module_widgets', 'Jetpack_Display_Posts_Widget::deactivate_cron_static' );
+register_deactivation_hook( plugin_basename( JETPACK__PLUGIN_FILE ), 'Jetpack_Display_Posts_Widget::deactivate_cron_static' );
+
+/**
+ * End of Cron tasks
+ */
/*
* Display a list of recent posts from a WordPress.com or Jetpack-enabled blog.
*/
+
class Jetpack_Display_Posts_Widget extends WP_Widget {
+ /**
+ * @var string Remote service API URL prefix.
+ */
+ public $service_url = 'https://public-api.wordpress.com/rest/v1.1/';
+
+ /**
+ * @var string Widget options key prefix.
+ */
+ public $widget_options_key_prefix = 'display_posts_site_data_';
+
+ /**
+ * @var string The name of the cron that will update widget data.
+ */
+ public static $cron_name = 'jetpack_display_posts_widget_cron_update';
+
+
public function __construct() {
parent::__construct(
- // internal id
+ // internal id
'jetpack_display_posts_widget',
- // wp-admin title
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
apply_filters( 'jetpack_widget_name', __( 'Display WordPress Posts', 'jetpack' ) ),
array(
'description' => __( 'Displays a list of recent posts from another WordPress.com or Jetpack-enabled blog.', 'jetpack' ),
@@ -33,98 +153,648 @@ class Jetpack_Display_Posts_Widget extends WP_Widget {
* Expiring transients have a name length maximum of 45 characters,
* so this function returns an abbreviated MD5 hash to use instead of
* the full URI.
+ *
+ * @param string $site Site to get the hash for.
+ *
+ * @return string
*/
public function get_site_hash( $site ) {
return substr( md5( $site ), 0, 21 );
}
- public function get_site_info( $site ) {
+ /**
+ * Fetch a remote service endpoint and parse it.
+ *
+ * Timeout is set to 15 seconds right now, because sometimes the WordPress API
+ * takes more than 5 seconds to fully respond.
+ *
+ * Caching is used here so we can avoid re-downloading the same endpoint
+ * in a single request.
+ *
+ * @param string $endpoint Parametrized endpoint to call.
+ *
+ * @param int $timeout How much time to wait for the API to respond before failing.
+ *
+ * @return array|WP_Error
+ */
+ public function fetch_service_endpoint( $endpoint, $timeout = 15 ) {
+
+ /**
+ * Holds endpoint request cache.
+ */
+ static $cache = array();
+
+ if ( ! isset( $cache[ $endpoint ] ) ) {
+ $raw_data = $this->wp_wp_remote_get( $this->service_url . ltrim( $endpoint, '/' ), array( 'timeout' => $timeout ) );
+ $cache[ $endpoint ] = $this->parse_service_response( $raw_data );
+ }
+
+ return $cache[ $endpoint ];
+ }
+
+ /**
+ * Parse data from service response.
+ * Do basic error handling for general service and data errors
+ *
+ * @param array $service_response Response from the service.
+ *
+ * @return array|WP_Error
+ */
+ public function parse_service_response( $service_response ) {
+ /**
+ * If there is an error, we add the error message to the parsed response
+ */
+ if ( is_wp_error( $service_response ) ) {
+ return new WP_Error(
+ 'general_error',
+ __( 'An error occurred fetching the remote data.', 'jetpack' ),
+ $service_response->get_error_messages()
+ );
+ }
+
+ /**
+ * Validate HTTP response code.
+ */
+ if ( 200 !== wp_remote_retrieve_response_code( $service_response ) ) {
+ return new WP_Error(
+ 'http_error',
+ __( 'An error occurred fetching the remote data.', 'jetpack' ),
+ wp_remote_retrieve_response_message( $service_response )
+ );
+ }
+
+
+ /**
+ * Extract service response body from the request.
+ */
+
+ $service_response_body = wp_remote_retrieve_body( $service_response );
+
+
+ /**
+ * No body has been set in the response. This should be pretty bad.
+ */
+ if ( ! $service_response_body ) {
+ return new WP_Error(
+ 'no_body',
+ __( 'Invalid remote response.', 'jetpack' ),
+ 'No body in response.'
+ );
+ }
+
+ /**
+ * Parse the JSON response from the API. Convert to associative array.
+ */
+ $parsed_data = json_decode( $service_response_body );
+
+ /**
+ * If there is a problem with parsing the posts return an empty array.
+ */
+ if ( is_null( $parsed_data ) ) {
+ return new WP_Error(
+ 'no_body',
+ __( 'Invalid remote response.', 'jetpack' ),
+ 'Invalid JSON from remote.'
+ );
+ }
+
+ /**
+ * Check for errors in the parsed body.
+ */
+ if ( isset( $parsed_data->error ) ) {
+ return new WP_Error(
+ 'remote_error',
+ __( 'We cannot display information for this blog.', 'jetpack' ),
+ $parsed_data->error
+ );
+ }
+
+
+ /**
+ * No errors found, return parsed data.
+ */
+ return $parsed_data;
+ }
+
+ /**
+ * Fetch site information from the WordPress public API
+ *
+ * @param string $site URL of the site to fetch the information for.
+ *
+ * @return array|WP_Error
+ */
+ public function fetch_site_info( $site ) {
+
+ $response = $this->fetch_service_endpoint( sprintf( '/sites/%s', urlencode( $site ) ) );
+
+ return $response;
+ }
+
+ /**
+ * Parse external API response from the site info call and handle errors if they occur.
+ *
+ * @param array|WP_Error $service_response The raw response to be parsed.
+ *
+ * @return array|WP_Error
+ */
+ public function parse_site_info_response( $service_response ) {
+
+ /**
+ * If the service returned an error, we pass it on.
+ */
+ if ( is_wp_error( $service_response ) ) {
+ return $service_response;
+ }
+
+ /**
+ * Check if the service returned proper site information.
+ */
+ if ( ! isset( $service_response->ID ) ) {
+ return new WP_Error(
+ 'no_site_info',
+ __( 'Invalid site information returned from remote.', 'jetpack' ),
+ 'No site ID present in the response.'
+ );
+ }
+
+ return $service_response;
+ }
+
+ /**
+ * Fetch list of posts from the WordPress public API.
+ *
+ * @param int $site_id The site to fetch the posts for.
+ *
+ * @return array|WP_Error
+ */
+ public function fetch_posts_for_site( $site_id ) {
+
+ $response = $this->fetch_service_endpoint(
+ sprintf(
+ '/sites/%1$d/posts/%2$s',
+ $site_id,
+ /**
+ * Filters the parameters used to fetch for posts in the Display Posts Widget.
+ *
+ * @see https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/posts/
+ *
+ * @module widgets
+ *
+ * @since 3.6.0
+ *
+ * @param string $args Extra parameters to filter posts returned from the WordPress.com REST API.
+ */
+ apply_filters( 'jetpack_display_posts_widget_posts_params', '' )
+ )
+ );
+
+ return $response;
+ }
+
+ /**
+ * Parse external API response from the posts list request and handle errors if any occur.
+ *
+ * @param object|WP_Error $service_response The raw response to be parsed.
+ *
+ * @return array|WP_Error
+ */
+ public function parse_posts_response( $service_response ) {
+
+ /**
+ * If the service returned an error, we pass it on.
+ */
+ if ( is_wp_error( $service_response ) ) {
+ return $service_response;
+ }
+
+ /**
+ * Check if the service returned proper posts array.
+ */
+ if ( ! isset( $service_response->posts ) || ! is_array( $service_response->posts ) ) {
+ return new WP_Error(
+ 'no_posts',
+ __( 'No posts data returned by remote.', 'jetpack' ),
+ 'No posts information set in the returned data.'
+ );
+ }
+
+ /**
+ * Format the posts to preserve storage space.
+ */
+
+ return $this->format_posts_for_storage( $service_response );
+ }
+
+ /**
+ * Format the posts for better storage. Drop all the data that is not used.
+ *
+ * @param object $parsed_data Array of posts returned by the APIs.
+ *
+ * @return array Formatted posts or an empty array if no posts were found.
+ */
+ public function format_posts_for_storage( $parsed_data ) {
+
+ $formatted_posts = array();
+
+ /**
+ * Only go through the posts list if we have valid posts array.
+ */
+ if ( isset( $parsed_data->posts ) && is_array( $parsed_data->posts ) ) {
+
+ /**
+ * Loop through all the posts and format them appropriately.
+ */
+ foreach ( $parsed_data->posts as $single_post ) {
+
+ $prepared_post = array(
+ 'title' => $single_post->title ? $single_post->title : '',
+ 'excerpt' => $single_post->excerpt ? $single_post->excerpt : '',
+ 'featured_image' => $single_post->featured_image ? $single_post->featured_image : '',
+ 'url' => $single_post->URL,
+ );
+
+ /**
+ * Append the formatted post to the results.
+ */
+ $formatted_posts[] = $prepared_post;
+ }
+ }
+
+ return $formatted_posts;
+ }
+
+ /**
+ * Fetch site information and posts list for a site.
+ *
+ * @param string $site Site to fetch the data for.
+ * @param array $original_data Optional original data to updated.
+ *
+ * @param bool $site_data_only Fetch only site information, skip posts list.
+ *
+ * @return array Updated or new data.
+ */
+ public function fetch_blog_data( $site, $original_data = array(), $site_data_only = false ) {
+
+ /**
+ * If no optional data is supplied, initialize a new structure
+ */
+ if ( ! empty( $original_data ) ) {
+ $widget_data = $original_data;
+ }
+ else {
+ $widget_data = array(
+ 'site_info' => array(
+ 'last_check' => null,
+ 'last_update' => null,
+ 'error' => null,
+ 'data' => array(),
+ ),
+ 'posts' => array(
+ 'last_check' => null,
+ 'last_update' => null,
+ 'error' => null,
+ 'data' => array(),
+ )
+ );
+ }
+
+ /**
+ * Update check time and fetch site information.
+ */
+ $widget_data['site_info']['last_check'] = time();
+
+ $site_info_raw_data = $this->fetch_site_info( $site );
+ $site_info_parsed_data = $this->parse_site_info_response( $site_info_raw_data );
+
+
+ /**
+ * If there is an error with the fetched site info, save the error and update the checked time.
+ */
+ if ( is_wp_error( $site_info_parsed_data ) ) {
+ $widget_data['site_info']['error'] = $site_info_parsed_data;
+
+ return $widget_data;
+ }
+ /**
+ * If data is fetched successfully, update the data and set the proper time.
+ *
+ * Data is only updated if we have valid results. This is done this way so we can show
+ * something if external service is down.
+ *
+ */
+ else {
+ $widget_data['site_info']['last_update'] = time();
+ $widget_data['site_info']['data'] = $site_info_parsed_data;
+ $widget_data['site_info']['error'] = null;
+ }
+
+
+ /**
+ * If only site data is needed, return it here, don't fetch posts data.
+ */
+ if ( true === $site_data_only ) {
+ return $widget_data;
+ }
+
+ /**
+ * Update check time and fetch posts list.
+ */
+ $widget_data['posts']['last_check'] = time();
+
+ $site_posts_raw_data = $this->fetch_posts_for_site( $site_info_parsed_data->ID );
+ $site_posts_parsed_data = $this->parse_posts_response( $site_posts_raw_data );
+
+
+ /**
+ * If there is an error with the fetched posts, save the error and update the checked time.
+ */
+ if ( is_wp_error( $site_posts_parsed_data ) ) {
+ $widget_data['posts']['error'] = $site_posts_parsed_data;
+
+ return $widget_data;
+ }
+ /**
+ * If data is fetched successfully, update the data and set the proper time.
+ *
+ * Data is only updated if we have valid results. This is done this way so we can show
+ * something if external service is down.
+ *
+ */
+ else {
+ $widget_data['posts']['last_update'] = time();
+ $widget_data['posts']['data'] = $site_posts_parsed_data;
+ $widget_data['posts']['error'] = null;
+ }
+
+ return $widget_data;
+ }
+
+ /**
+ * Gets blog data from the cache.
+ *
+ * @param string $site
+ *
+ * @return array|WP_Error
+ */
+ public function get_blog_data( $site ) {
+ // load from cache, if nothing return an error
$site_hash = $this->get_site_hash( $site );
- $data_from_cache = get_transient( 'display_posts_site_info_' . $site_hash );
- if ( false === $data_from_cache ) {
- $response = wp_remote_get( sprintf( 'https://public-api.wordpress.com/rest/v1/sites/%s', urlencode( $site ) ) );
- set_transient( 'display_posts_site_info_' . $site_hash, $response, 10 * MINUTE_IN_SECONDS );
- } else {
- $response = $data_from_cache;
+
+ $cached_data = $this->wp_get_option( $this->widget_options_key_prefix . $site_hash );
+
+ /**
+ * If the cache is empty, return an empty_cache error.
+ */
+ if ( false === $cached_data ) {
+ return new WP_Error(
+ 'empty_cache',
+ __( 'Information about this blog is currently being retrieved.', 'jetpack' )
+ );
+ }
+
+ return $cached_data;
+
+ }
+
+ /**
+ * Activates widget update cron task.
+ */
+ public static function activate_cron() {
+ if ( ! wp_next_scheduled( self::$cron_name ) ) {
+ wp_schedule_event( time(), 'minutes_10', self::$cron_name );
}
+ }
+
+ /**
+ * Deactivates widget update cron task.
+ *
+ * This is a wrapper over the static method as it provides some syntactic sugar.
+ */
+ public function deactivate_cron() {
+ self::deactivate_cron_static();
+ }
+
+ /**
+ * Deactivates widget update cron task.
+ */
+ public static function deactivate_cron_static() {
+ $next_scheduled_time = wp_next_scheduled( self::$cron_name );
+ wp_unschedule_event( $next_scheduled_time, self::$cron_name );
+ }
- if ( is_wp_error( $response ) ) {
+ /**
+ * Checks if the update cron should be running and returns appropriate result.
+ *
+ * @return bool If the cron should be running or not.
+ */
+ public function should_cron_be_running() {
+ /**
+ * The cron doesn't need to run empty loops.
+ */
+ $widget_instances = $this->get_instances_sites();
+
+ if ( empty( $widget_instances ) || ! is_array( $widget_instances ) ) {
+ return false;
+ }
+
+ /**
+ * If Jetpack is not active or in development mode, we don't want to update widget data.
+ */
+ if ( ! Jetpack::is_active() && ! Jetpack::is_development_mode() ) {
return false;
}
- $site_info = json_decode( $response ['body'] );
- if ( ! isset( $site_info->ID ) ) {
+ /**
+ * If Extra Sidebar Widgets module is not active, we don't need to update widget data.
+ */
+ if ( ! Jetpack::is_module_active( 'widgets' ) ) {
+ return false;
+ }
+
+
+ /**
+ * If none of the above checks failed, then we definitely want to update widget data.
+ */
+ return true;
+ }
+
+ /**
+ * Main cron code. Updates all instances of the widget.
+ *
+ * @return bool
+ */
+ public function cron_task() {
+
+ /**
+ * If the cron should not be running, disable it.
+ */
+ if ( false === $this->should_cron_be_running() ) {
+ return true;
+ }
+
+ $instances_to_update = $this->get_instances_sites();
+
+ /**
+ * If no instances are found to be updated - stop.
+ */
+ if ( empty( $instances_to_update ) || ! is_array( $instances_to_update ) ) {
+ return true;
+ }
+
+ foreach ( $instances_to_update as $site_url ) {
+ $this->update_instance( $site_url );
+ }
+
+ return true;
+ }
+
+ /**
+ * Get a list of unique sites from all instances of the widget.
+ *
+ * @return array|bool
+ */
+ public function get_instances_sites() {
+
+ $widget_settings = $this->wp_get_option( 'widget_jetpack_display_posts_widget' );
+
+ /**
+ * If the widget still hasn't been added anywhere, the config will not be present.
+ *
+ * In such case we don't want to continue execution.
+ */
+ if ( false === $widget_settings || ! is_array( $widget_settings ) ) {
return false;
}
- return $site_info;
+ $urls = array();
+
+ foreach ( $widget_settings as $widget_instance_data ) {
+ if ( isset( $widget_instance_data['url'] ) && ! empty( $widget_instance_data['url'] ) ) {
+ $urls[] = $widget_instance_data['url'];
+ }
+ }
+
+ /**
+ * Make sure only unique URLs are returned.
+ */
+ $urls = array_unique( $urls );
+
+ return $urls;
+
}
- /*
- * Set up the widget display on the front end
+ /**
+ * Update a widget instance.
+ *
+ * @param string $site The site to fetch the latest data for.
+ */
+ public function update_instance( $site ) {
+
+ /**
+ * Fetch current information for a site.
+ */
+ $site_hash = $this->get_site_hash( $site );
+
+ $option_key = $this->widget_options_key_prefix . $site_hash;
+
+ $instance_data = $this->wp_get_option( $option_key );
+
+ /**
+ * Fetch blog data and save it in $instance_data.
+ */
+ $new_data = $this->fetch_blog_data( $site, $instance_data );
+
+ /**
+ * If the option doesn't exist yet - create a new option
+ */
+ if ( false === $instance_data ) {
+ $this->wp_add_option( $option_key, $new_data );
+ }
+ else {
+ $this->wp_update_option( $option_key, $new_data );
+ }
+ }
+
+ /**
+ * Set up the widget display on the front end.
+ *
+ * @param array $args
+ * @param array $instance
*/
public function widget( $args, $instance ) {
+
+ /** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $instance['title'] );
wp_enqueue_style( 'jetpack_display_posts_widget', plugins_url( 'wordpress-post-widget/style.css', __FILE__ ) );
- $site_info = $this->get_site_info( $instance['url'] );
-
echo $args['before_widget'];
- if ( false === $site_info ) {
- echo '<p>' . __( 'We cannot load blog data at this time.', 'jetpack' ) . '</p>';
+ $data = $this->get_blog_data( $instance['url'] );
+
+ // check for errors
+ if ( is_wp_error( $data ) || empty( $data['site_info']['data'] ) ) {
+ echo '<p>' . __( 'Cannot load blog information at this time.', 'jetpack' ) . '</p>';
echo $args['after_widget'];
+
return;
}
+ $site_info = $data['site_info']['data'];
+
if ( ! empty( $title ) ) {
echo $args['before_title'] . esc_html( $title . ': ' . $site_info->name ) . $args['after_title'];
- } else {
- echo $args['before_title'] . esc_html( $site_info->name ) . $args['after_title'];
}
-
- $site_hash = $this->get_site_hash( $instance['url'] );
- $data_from_cache = get_transient( 'display_posts_post_info_' . $site_hash );
- if ( false === $data_from_cache ) {
- $response = wp_remote_get( sprintf( 'https://public-api.wordpress.com/rest/v1/sites/%d/posts/', $site_info->ID ) );
- set_transient( 'display_posts_post_info_' . $site_hash, $response, 10 * MINUTE_IN_SECONDS );
- } else {
- $response = $data_from_cache;
- }
-
- if ( is_wp_error( $response ) ) {
- echo '<p>' . __( 'We cannot load blog data at this time.', 'jetpack' ) . '</p>';
- echo $args['after_widget'];
- return;
+ else {
+ echo $args['before_title'] . esc_html( $site_info->name ) . $args['after_title'];
}
- $posts_info = json_decode( $response['body'] );
-
echo '<div class="jetpack-display-remote-posts">';
- if ( isset( $posts_info->error ) && 'jetpack_error' == $posts_info->error ) {
- echo '<p>' . __( 'We cannot display posts for this blog.', 'jetpack' ) . '</p>';
+ if ( is_wp_error( $data['posts']['data'] ) || empty( $data['posts']['data'] ) ) {
+ echo '<p>' . __( 'Cannot load blog posts at this time.', 'jetpack' ) . '</p>';
echo '</div><!-- .jetpack-display-remote-posts -->';
echo $args['after_widget'];
+
return;
}
- $number_of_posts = min( $instance['number_of_posts'], count( $posts_info->posts ) );
+ $posts_list = $data['posts']['data'];
- for ( $i = 0; $i < $number_of_posts; $i++ ) {
- $single_post = $posts_info->posts[$i];
- $post_title = ( $single_post->title ) ? $single_post->title : '( No Title )';
+ /**
+ * Show only as much posts as we need. If we have less than configured amount,
+ * we must show only that much posts.
+ */
+ $number_of_posts = min( $instance['number_of_posts'], count( $posts_list ) );
- echo '<h4><a href="' . esc_url( $single_post->URL ) . '">' . esc_html( $post_title ) . '</a></h4>' . "\n";
- if ( ( $instance['featured_image'] == true ) && ( ! empty ( $single_post->featured_image) ) ) {
- $featured_image = ( $single_post->featured_image ) ? $single_post->featured_image : '';
- echo '<a title="' . esc_attr( $post_title ) . '" href="' . esc_url( $single_post->URL ) . '"><img src="' . $featured_image . '" alt="' . esc_attr( $post_title ) . '"/></a>';
+ for ( $i = 0; $i < $number_of_posts; $i ++ ) {
+ $single_post = $posts_list[ $i ];
+ $post_title = ( $single_post['title'] ) ? $single_post['title'] : '( No Title )';
+
+ $target = '';
+ if ( isset( $instance['open_in_new_window'] ) && $instance['open_in_new_window'] == true ) {
+ $target = ' target="_blank"';
+ }
+ echo '<h4><a href="' . esc_url( $single_post['url'] ) . '"' . $target . '>' . esc_html( $post_title ) . '</a></h4>' . "\n";
+ if ( ( $instance['featured_image'] == true ) && ( ! empty ( $single_post['featured_image'] ) ) ) {
+ $featured_image = $single_post['featured_image'];
+ /**
+ * Allows setting up custom Photon parameters to manipulate the image output in the Display Posts widget.
+ *
+ * @see https://developer.wordpress.com/docs/photon/
+ *
+ * @module widgets
+ *
+ * @since 3.6.0
+ *
+ * @param array $args Array of Photon Parameters.
+ */
+ $image_params = apply_filters( 'jetpack_display_posts_widget_image_params', array() );
+ echo '<a title="' . esc_attr( $post_title ) . '" href="' . esc_url( $single_post['url'] ) . '"><img src="' . jetpack_photon_url( $featured_image, $image_params ) . '" alt="' . esc_attr( $post_title ) . '"/></a>';
}
if ( $instance['show_excerpts'] == true ) {
- $post_excerpt = ( $single_post->excerpt ) ? $single_post->excerpt : '';
- echo $post_excerpt;
+ echo $single_post['excerpt'];
}
}
@@ -132,35 +802,115 @@ class Jetpack_Display_Posts_Widget extends WP_Widget {
echo $args['after_widget'];
}
- public function form( $instance ) {
- if ( isset( $instance[ 'title' ] ) ) {
- $title = $instance[ 'title' ];
- } else {
- $title = __( 'Recent Posts', 'jetpack' );
- }
+ /**
+ * Scan and extract first error from blog data array.
+ *
+ * @param array|WP_Error $blog_data Blog data to scan for errors.
+ *
+ * @return string First error message found
+ */
+ public function extract_errors_from_blog_data( $blog_data ) {
+
+ $errors = array(
+ 'message' => '',
+ 'debug' => '',
+ 'where' => '',
+ );
- if ( isset( $instance[ 'url' ] ) ) {
- $url = $instance[ 'url' ];
- } else {
- $url = '';
- }
- if ( isset( $instance[ 'number_of_posts' ] ) ) {
- $number_of_posts = $instance[ 'number_of_posts' ];
- } else {
- $number_of_posts = 5;
+ /**
+ * When the cache result is an error. Usually when the cache is empty.
+ * This is not an error case for now.
+ */
+ if ( is_wp_error( $blog_data ) ) {
+ return $errors;
}
- if ( isset( $instance[ 'featured_image'] ) ) {
- $featured_image = $instance[ 'featured_image'];
- } else {
- $featured_image = false;
+ /**
+ * Loop through `site_info` and `posts` keys of $blog_data.
+ */
+ foreach ( array( 'site_info', 'posts' ) as $info_key ) {
+
+ /**
+ * Contains information on which stage the error ocurred.
+ */
+ $errors['where'] = $info_key;
+
+ /**
+ * If an error is set, we want to check it for usable messages.
+ */
+ if ( isset( $blog_data[ $info_key ]['error'] ) && ! empty( $blog_data[ $info_key ]['error'] ) ) {
+
+ /**
+ * Extract error message from the error, if possible.
+ */
+ if ( is_wp_error( $blog_data[ $info_key ]['error'] ) ) {
+ /**
+ * In the case of WP_Error we want to have the error message
+ * and the debug information available.
+ */
+ $error_messages = $blog_data[ $info_key ]['error']->get_error_messages();
+ $errors['message'] = reset( $error_messages );
+
+ $extra_data = $blog_data[ $info_key ]['error']->get_error_data();
+ if ( is_array( $extra_data ) ) {
+ $errors['debug'] = implode( '; ', $extra_data );
+ }
+ else {
+ $errors['debug'] = $extra_data;
+ }
+
+ break;
+ }
+ elseif ( is_array( $blog_data[ $info_key ]['error'] ) ) {
+ /**
+ * In this case we don't have debug information, because
+ * we have no way to know the format. The widget works with
+ * WP_Error objects only.
+ */
+ $errors['message'] = reset( $blog_data[ $info_key ]['error'] );
+ break;
+ }
+
+ /**
+ * We do nothing if no usable error is found.
+ */
+ }
}
- if ( isset( $instance[ 'show_excerpts'] ) ) {
- $show_excerpts = $instance[ 'show_excerpts'];
- } else {
- $show_excerpts = false;
+ return $errors;
+ }
+
+ /**
+ * Display the widget administration form.
+ *
+ * @param array $instance Widget instance configuration.
+ *
+ * @return string|void
+ */
+ public function form( $instance ) {
+
+ /**
+ * Initialize widget configuration variables.
+ */
+ $title = ( isset( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts', 'jetpack' );
+ $url = ( isset( $instance['url'] ) ) ? $instance['url'] : '';
+ $number_of_posts = ( isset( $instance['number_of_posts'] ) ) ? $instance['number_of_posts'] : 5;
+ $open_in_new_window = ( isset( $instance['open_in_new_window'] ) ) ? $instance['open_in_new_window'] : false;
+ $featured_image = ( isset( $instance['featured_image'] ) ) ? $instance['featured_image'] : false;
+ $show_excerpts = ( isset( $instance['show_excerpts'] ) ) ? $instance['show_excerpts'] : false;
+
+
+ /**
+ * Check if the widget instance has errors available.
+ *
+ * Only do so if a URL is set.
+ */
+ $update_errors = array();
+
+ if ( ! empty( $url ) ) {
+ $data = $this->get_blog_data( $url );
+ $update_errors = $this->extract_errors_from_blog_data( $data );
}
?>
@@ -172,21 +922,33 @@ class Jetpack_Display_Posts_Widget extends WP_Widget {
<p>
<label for="<?php echo $this->get_field_id( 'url' ); ?>"><?php _e( 'Blog URL:', 'jetpack' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'url' ); ?>" name="<?php echo $this->get_field_name( 'url' ); ?>" type="text" value="<?php echo esc_attr( $url ); ?>" />
- <p>
- <?php _e( "Enter a WordPress.com or Jetpack WordPress site URL.", 'jetpack' ); ?>
- </p>
+ <i>
+ <?php _e( "Enter a WordPress.com or Jetpack WordPress site URL.", 'jetpack' ); ?>
+ </i>
+ <?php
+ if ( empty( $url ) ) {
+ ?>
+ <br />
+ <i class="error-message"><?php echo __( 'You must specify a valid blog URL!', 'jetpack' ); ?></i>
+ <?php
+ }
+ ?>
</p>
<p>
<label for="<?php echo $this->get_field_id( 'number_of_posts' ); ?>"><?php _e( 'Number of Posts to Display:', 'jetpack' ); ?></label>
<select name="<?php echo $this->get_field_name( 'number_of_posts' ); ?>">
<?php
- for ($i = 1; $i <= 10; $i++) {
- echo '<option value="' . $i . '" '.selected( $number_of_posts, $i ).'>' . $i . '</option>';
- }
+ for ( $i = 1; $i <= 10; $i ++ ) {
+ echo '<option value="' . $i . '" ' . selected( $number_of_posts, $i ) . '>' . $i . '</option>';
+ }
?>
</select>
</p>
<p>
+ <label for="<?php echo $this->get_field_id( 'open_in_new_window' ); ?>"><?php _e( 'Open links in new window/tab:', 'jetpack' ); ?></label>
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'open_in_new_window' ); ?>" <?php checked( $open_in_new_window, 1 ); ?> />
+ </p>
+ <p>
<label for="<?php echo $this->get_field_id( 'featured_image' ); ?>"><?php _e( 'Show Featured Image:', 'jetpack' ); ?></label>
<input type="checkbox" name="<?php echo $this->get_field_name( 'featured_image' ); ?>" <?php checked( $featured_image, 1 ); ?> />
</p>
@@ -196,27 +958,170 @@ class Jetpack_Display_Posts_Widget extends WP_Widget {
</p>
<?php
+
+ /**
+ * Show error messages.
+ */
+ if ( ! empty( $update_errors['message'] ) ) {
+
+ /**
+ * Prepare the error messages.
+ */
+
+ $what_broke_down = '';
+ switch ( $update_errors['where'] ) {
+ case 'posts':
+ $what_broke_down .= __( 'posts list', 'jetpack' );
+ break;
+
+ /**
+ * If something else, beside `posts` and `site_info` broke,
+ * don't handle it and default to blog `information`,
+ * as it is generic enough.
+ */
+ case 'site_info':
+ default:
+ $what_broke_down .= __( 'information', 'jetpack' );
+ break;
+ }
+
+ $where_message = sprintf(
+ __( 'An error occurred while downloading blog %s', 'jetpack' ),
+ $what_broke_down
+ );
+
+
+ ?>
+ <p class="error-message">
+ <?php echo $where_message; ?>:
+ <br />
+ <i>
+ <?php echo esc_html( $update_errors['message'] ); ?>
+ <?php
+ /**
+ * If there is any debug - show it here.
+ */
+ if ( ! empty( $update_errors['debug'] ) ) {
+ ?>
+ <br />
+ <br />
+ <?php echo __( 'Detailed information', 'jetpack' ); ?>:
+ <br />
+ <?php echo esc_html( $update_errors['debug'] ); ?>
+ <?php
+ }
+ ?>
+ </i>
+ </p>
+
+ <?php
+ }
}
public function update( $new_instance, $old_instance ) {
- $instance = array();
+
+ $instance = array();
$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
- $instance['url'] = ( ! empty( $new_instance['url'] ) ) ? strip_tags( $new_instance['url'] ) : '';
- $instance['url'] = str_replace( "http://", "", $instance['url'] );
- $instance['url'] = untrailingslashit( $instance['url'] );
-
- // Normalize www.
- $site_info = $this->get_site_info( $instance['url'] );
- if ( ! $site_info && 'www.' === substr( $instance['url'], 0, 4 ) ) {
- $site_info = $this->get_site_info( substr( $instance['url'], 4 ) );
- if ( $site_info ) {
- $instance['url'] = substr( $instance['url'], 4 );
+ $instance['url'] = ( ! empty( $new_instance['url'] ) ) ? strip_tags( $new_instance['url'] ) : '';
+ $instance['url'] = preg_replace( "!^https?://!is", "", $instance['url'] );
+ $instance['url'] = untrailingslashit( $instance['url'] );
+
+
+ /**
+ * Check if the URL should be with or without the www prefix before saving.
+ */
+ if ( ! empty( $instance['url'] ) ) {
+ $blog_data = $this->fetch_blog_data( $instance['url'], array(), true );
+
+ if ( is_wp_error( $blog_data['site_info']['error'] ) && 'www.' === substr( $instance['url'], 0, 4 ) ) {
+ $blog_data = $this->fetch_blog_data( substr( $instance['url'], 4 ), array(), true );
+
+ if ( ! is_wp_error( $blog_data['site_info']['error'] ) ) {
+ $instance['url'] = substr( $instance['url'], 4 );
+ }
}
}
- $instance['number_of_posts'] = ( ! empty( $new_instance['number_of_posts'] ) ) ? intval( $new_instance['number_of_posts'] ) : '';
- $instance['featured_image'] = ( ! empty( $new_instance['featured_image'] ) ) ? true : '';
- $instance['show_excerpts'] = ( ! empty( $new_instance['show_excerpts'] ) ) ? true : '';
+ $instance['number_of_posts'] = ( ! empty( $new_instance['number_of_posts'] ) ) ? intval( $new_instance['number_of_posts'] ) : '';
+ $instance['open_in_new_window'] = ( ! empty( $new_instance['open_in_new_window'] ) ) ? true : '';
+ $instance['featured_image'] = ( ! empty( $new_instance['featured_image'] ) ) ? true : '';
+ $instance['show_excerpts'] = ( ! empty( $new_instance['show_excerpts'] ) ) ? true : '';
+
+ /**
+ * Forcefully activate the update cron when saving widget instance.
+ *
+ * So we can be sure that it will be running later.
+ */
+ $this->activate_cron();
+
+
+ /**
+ * If there is no cache entry for the specified URL, run a forced update.
+ *
+ * @see get_blog_data Returns WP_Error if the cache is empty, which is what is needed here.
+ */
+ $cached_data = $this->get_blog_data( $instance['url'] );
+
+ if ( is_wp_error( $cached_data ) ) {
+ $this->update_instance( $instance['url'] );
+ }
+
return $instance;
}
-}
+
+ /**
+ * This is just to make method mocks in the unit tests easier.
+ *
+ * @param string $param Option key to get
+ *
+ * @return mixed
+ *
+ * @codeCoverageIgnore
+ */
+ public function wp_get_option( $param ) {
+ return get_option( $param );
+ }
+
+ /**
+ * This is just to make method mocks in the unit tests easier.
+ *
+ * @param string $option_name Option name to be added
+ * @param mixed $option_value Option value
+ *
+ * @return mixed
+ *
+ * @codeCoverageIgnore
+ */
+ public function wp_add_option( $option_name, $option_value ) {
+ return add_option( $option_name, $option_value );
+ }
+
+ /**
+ * This is just to make method mocks in the unit tests easier.
+ *
+ * @param string $option_name Option name to be updated
+ * @param mixed $option_value Option value
+ *
+ * @return mixed
+ *
+ * @codeCoverageIgnore
+ */
+ public function wp_update_option( $option_name, $option_value ) {
+ return update_option( $option_name, $option_value );
+ }
+
+
+ /**
+ * This is just to make method mocks in the unit tests easier.
+ *
+ * @param string $url The URL to fetch
+ * @param array $args Optional. Request arguments.
+ *
+ * @return array|WP_Error
+ *
+ * @codeCoverageIgnore
+ */
+ public function wp_wp_remote_get( $url, $args = array() ) {
+ return wp_remote_get( $url, $args );
+ }
+} \ No newline at end of file
diff --git a/plugins/jetpack/modules/wpgroho.js b/plugins/jetpack/modules/wpgroho.js
index 07a78b13..92261bdc 100644
--- a/plugins/jetpack/modules/wpgroho.js
+++ b/plugins/jetpack/modules/wpgroho.js
@@ -25,6 +25,10 @@ WPGroHo = jQuery.extend( {
}, WPGroHo );
jQuery( document ).ready( function() {
+ if ( 'undefined' === typeof Gravatar ) {
+ return;
+ }
+
Gravatar.profile_cb = function( h, d ) {
WPGroHo.syncProfileData( h, d );
};
diff --git a/plugins/jetpack/readme.txt b/plugins/jetpack/readme.txt
index a4adced1..38d9b78c 100644
--- a/plugins/jetpack/readme.txt
+++ b/plugins/jetpack/readme.txt
@@ -1,1360 +1,317 @@
-=== Jetpack by WordPress.com ===
-Contributors: automattic, alternatekev, andy, apeatling, azaozz, barry, beaulebens, blobaugh, cfinke, chellycat, danielbachhuber, daniloercoli, designsimply, dsmart, eoigal, ethitter, gibrown, georgestephanis, hew, hugobaeta, iammattthomas, jblz, jeherve, jkudish, Joen, johnjamesjacoby, jshreve, kraftbj, lancewillett, martinremy, matt, matveb, maverick3x6, mcsf, mdawaffe, migueluy, nickmomrik, obenland, pento, professor44, richardmtl, roccotripaldi, samhotchkiss, sdquirk, stephdau, tmoorewp, Viper007Bond, westi, yoavf, zinigor
-Tags: WordPress.com, statistics, stats, views, tweets, twitter, widget, gravatar, hovercards, profile, equations, latex, math, maths, youtube, shortcode, archives, audio, blip, bliptv, dailymotion, digg, flickr, googlevideo, google, googlemaps, kyte, kytetv, livevideo, redlasso, rockyou, rss, scribd, slide, slideshare, soundcloud, vimeo, shortlinks, wp.me, subscriptions, notifications, notes, json, api, rest, mosaic, gallery, slideshow, videopress, monitor, search, omnisearch, sso, jet pack
-Stable tag: 3.5.3
-Requires at least: 4.1.1
-Tested up to: 4.2.1
-
-Your WordPress, Streamlined.
-
-== Description ==
-
-[Jetpack](http://jetpack.me/) adds powerful features previously only available to WordPress.com users including customization, traffic, mobile, content, and performance tools.
-
-**Features include:**
-
-* **Customization.** Make your WordPress site uniquely yours with *Custom CSS*, *Carousels*, spam-free *Contact Forms*, *Sidebar Widgets*, *Infinite Scroll*, and *Tiled Galleries*.
-* **Mobile theme.** Instant and customizable lightweight responsive theme designed for phones and tablets.
-* **Content tools.** Create and publish richer content with *Post by Email*, *Shortcode Embeds*, *Markdown*, *Beautiful Math*, *Spelling*, and *VideoPress*.
-* **Visitor engagement.** Increase your traffic and keep visitors coming back with *Enhanced Distribution*, spam-free *Comments*, *Shortlinks*, *Likes*, *Notifications*, *Related Posts*, *Publicize*, *Social Sharing*, *Subscriptions*, and *Site Verification Tools*.
-* **Site performance.** Speed up image delivery with the *Photon CDN* and access to visitor *Stats*.
-* **Security.** Keep your WordPress site up, safe, and protected with *Single Sign On*, *Jetpack Monitor*, and *Akismet* anti-spam.
-
-**Our users love:**
-
-* Simple, concise stats with no additional load on your server.
-* Email subscriptions for your blog's posts and your post's comments.
-* Social networking enabled comment system.
-* Likes, allowing your readers to show their appreciation of your posts.
-* Monitor and manage your site's activity with Notifications.
-* Simple, Akismet-backed contact forms.
-* The WP.me URL shortener.
-* Hovercard popups for your commenters via Gravatar.
-* Easily embedded media from popular sites like YouTube, Digg, and Vimeo.
-* The ability to post to your blog from any email client.
-* Integration with social networks including Twitter, Facebook, Tumblr, Path, and LinkedIn.
-* For the Math geeks, a simple way to include beautiful mathematical expressions.
-* A widget for displaying recent tweets.
-* Your readers can easily share your posts via email or their favorite social networks.
-* Improved writing thanks to an AI-based spell, style, and grammar checker.
-* Turn WordPress galleries into a gorgeous full-screen photo browsing experience.
-* A CSS editor that lets you customize your site design without modifying your theme.
-* A mobile theme that automatically streamlines your site for visitors on mobile devices.
-* Mobile push notifications for new comments via WordPress mobile apps.
-* Allowing applications to securely authenticate and access your site with your permission.
-* Creative formats for your image galleries: mosaic, circles, squares, and a slideshow view.
-* Add post sliders and other highlights to your theme with Featured Content.
-* Omnisearch: Search posts, pages, comments, media, and plugins from one search box.
-* Configure widgets to appear only on certain pages.
-* Upload and insert videos into your posts thanks to VideoPress.
-* Link WordPress and your Google+ Profile to add multiple Google features to your site.
-* Sign in to your self-hosted WordPress site using your WordPress.com account.
-* Receive alerts the moment that site downtime is detected.
-
-**New features**
-We're always improving Jetpack based on your feedback and WordPress development. [Subscribe to our mailing list](http://jetpack.me/coming-soon/) to get notified of new developments.
-
-
-
-== Installation ==
-
-1. Install Jetpack either via the WordPress.org plugin directory, or by uploading the files to your server.
-2. After activating Jetpack, connect to WordPress.com to enable the Jetpack features.
-3. Click the Connect button and log in to a WordPress.com account to authorize the Jetpack connection.
-4. If you don't yet have a WordPress.com account, you can quickly create one after clicking the Connect button.
-5. That's it. You're ready to go!
-
-If you need additional help [read our detailed instructions, including a video walkthrough](http://jetpack.me/support/installing-jetpack/).
-
-
-== Frequently Asked Questions ==
-
-= I already have a WordPress account, but it's not working, what's going on? =
-
-Jetpack requires a connection to [WordPress.com](http://wordpress.com/) to enable all features. This is a different account than the one you use to log into your self-hosted WordPress. If you can log into http://wordpress.com, then you already have a WordPress.com account. If you can't, then you can easily create one as part of the installation of Jetpack.
-
-= How do I view my stats? =
-
-Once you've installed Jetpack, your stats will be available via the "Site Stats" menu which appears in the new Jetpack menu (under your Dashboard menu within WordPress).
-
-= How do I contribute to Jetpack? =
-
-Easy! There are opportunities for developers at all levels to contribute:
-
-* Join our Beta Test group.
-* Give us a hand answering questions in our [support forum](http://wordpress.org/support/plugin/jetpack).
-* Report bugs, with reproduction steps, or post patches on [GitHub](https://github.com/Automattic/Jetpack).
-
-Learn more (and get detailed instructions) in our [contribute guide](http://jetpack.me/contribute/).
-
-== Screenshots ==
-
-1. Stats chart.
-2. Sharing buttons.
-3. Subscriptions widget.
-4. Gravatar Hovercards settings.
-5. Spelling and Grammar demo.
-6. Gallery Carousel.
-7. CSS Editor
-8. Mobile Theme
-
-== Changelog ==
-
-= 3.5.3 =
-Release Date: May 6th, 2015
-
-* Security Hardening: Remove Genericons example.html file.
-
-= 3.5.2 =
-Release Date: May 5th, 2015
-
-* Bug Fix: Sharing: Changes Facebook share count endpoint
-
-
-= 3.5.1 =
-Release Date: May 5th, 2015
-
-* Enhancement: Sharing: Changes Facebook share count method per Facebook API change
-* Enhancement: General: Remove .po files to reduce plugin size
-* Bug Fix: General: Remove identity crisis notification
-* Bug Fix: Subscriptions: Correct required input validation
-* Security hardening
-
-= 3.5 =
-Release Date: April 23rd, 2015
-Release Post: http://jetpack.me/2016/04/23/jetpack-3-5-menu-management/
-
-Jetpack 3.5 introduces the ability to manage your site's menus directly from WordPress.com and several bug fixes and enhancements. This upgrade is recommended for all users.
-
-* Enhancement: General: Change security reporting to use a transient instead of option to reduce backup load
-* Enhancement: General: Improve module search
-* Enhancement: JSON API: Allow users to manage menus through WordPress.com
-* Enhancement: Sharing: Reduce spam through email sharing
-* Bug Fix: Custom CSS: Improve recall of CSS revisions
-* Bug Fix: Extra Sidebar Widgets: Change class name for Contact Info widget
-* Bug Fix: Extra Sidebar Widgets: Fix errors when adding widgets via the customizer
-* Bug Fix: Extra Sidebar Widgets: Fix PHP notices in RSS widget
-* Bug Fix: General: Fix redirect loop on activation
-* Bug Fix: General: Styling fixes
-* Bug Fix: Protect: Add IP translation fallback when inet_pton is not available
-* Bug Fix: Protect: Always allow login from local IDs
-* Bug Fix: Protect: Sanitize displayed IP after block
-* Bug Fix: Publicize: Prevent generating Facebook profile links for app-scoped user IDs
-* Bug Fix: Subscriptions: Improve error handling
-* Bug Fix: Theme Tools: Include breadcrumb code
-* Misc: Extra Sidebar Widgets: Remove Readmill Widget
-
-= 3.4.3 =
-Release Date: April 20th, 2015
-
-* Security hardening.
-
-= 3.4.2 =
-Release Date: April 19th, 2015
-
-* Bug Fix: Contact info widget namespacing
-* Bug Fix: Javascript errors on wp-admin due to stats display code
-* Bug Fix: Potential fatal error from improperly called function
-* Bug Fix: Potential fatal error when protect servers are unreachable for WordPress Multisite
-
-= 3.4.1 =
-Release Date: March 19th, 2015
-
-* Bug Fix: General: Modules not displaying properly in non-English installs
-* Bug Fix: Manage: Some installs showing a transient fatal error
-* Bug Fix: Protect: Protect module not auto-activating for users who upgrade
-* Bug Fix: Omnisearch: Some installs not properly reporting WP version number, causing Omnisearch error
-* Bug Fix: Stats: Top posts/pages widget not loading
-* Bug Fix: Contact Info Widget: Fix conflict with Avada theme
-
-= 3.4 =
-Release Date: March 18th, 2015
-
-Release Post: http://jetpack.me/2015/03/17/jetpack-3-4-protect-secure-and-simplify/
-
-* Enhancement : Config Settings: provide a notification for users that update features settings
-* Enhancement : Config Settings: provide a notification for users that update features settings
-* Enhancement : Contact Form: Use the predefined $title variable in the anchor tag in grunion contact form button
-* Enhancement : Contact Form: Use the predefined $title variable in the anchor tag in the button on admin
-* Enhancement : Custom Content Type: Add all Custom Post Types to Omnisearch
-* Enhancement : Custom Content Type: Add option to add Testimonial Custom Content Type in admin
-* Enhancement : Custom Content Type: bring consistency between the portfolio and testimonial shared codebase
-* Enhancement : Custom Content Type: code cleanup
-* Enhancement : Custom Content Type: register namespaced 'jetpack_portfolio' shortcode/use a prefix for shortcode for Portfolio
-* Enhancement : Custom Content Type: set shortcode image size to 'large' and add jetpack_portfolio_thumbnail_size filter to allow themes to set their own size for Portfolio
-* Enhancement : Custom Content Type: testimonial shortcode enhancement
-* Enhancement : Extra Sidebar Widgets: Add subscription widget wildcard
-* Enhancement : Extra Sidebar Widgets: Likes and Sharing Shortcodes
-* Enhancement : Extra Sidebar Widgets: Minor fixes to Facebook widget plugin for SSL
-* Enhancement : Fix/update jetpack version
-* Enhancement : General: Add DNS Prefetching
-* Enhancement : General: Add Jetpack admin dashboard widget
-* Enhancement : GlotPress: Update GP_Locales and GP_Locale classes
-* Enhancement : Improved control over Nova Theme Menu output markup
-* Enhancement : Infinite Scroll: Adds a `button` wrapper for the infinity handle.
-* Enhancement : Infinite Scroll: Check for response.html before using indexOf
-* Enhancement : Integrate BruteProtect for protection against Brute Force attacks
-* Enhancement : JSON API Manage: Added Mock Jetpack Option to Sync options that don't have to live in the Database
-* Enhancement : JSON API: Add/empty trash days option to sync
-* Enhancement : Jump Start: Add "Jump Start" interface for new users
-* Enhancement : Manage: Add "modified_before" and "modified_after" parameters to /sites/%s/posts/ via JSON API
-* Enhancement : Mobile Theme: Add filter for choosing mobile theme menu
-* Enhancement : Notifications: Changes to load the new notifications client.
-* Enhancement : Protect: Add a filter so that user can add thier own bots
-* Enhancement : Protect: Add security reporting
-* Enhancement : Protect: Add/whitelist endpoints via JSON API for Jetpack Protect
-* Enhancement : Publicize: update connection confirmation message
-* Enhancement : Sharing: Add custom service name as a class
-* Enhancement : Sharing: display name of custom service in link title
-* Enhancement : Sharing: Remove default post types for showing share links
-* Enhancement : Sharing: use Jetpack version number when enqueing sharing.js
-* Enhancement : Shortcodes Team Partnerships: Backport fixes from SoundCloud 2.3.1 through 3.0.2
-* Enhancement : Shortlinks: use HTTPS when possible
-* Enhancement : Stats: Make loading of stats async
-* Enhancement : Subscriptions: Added settings field for comment sub text
-* Enhancement : Subscriptions: Hide Form After Submit
-* Enhancement : Subscriptions: remove label from widget title
-* Enhancement : Subscriptions: Update subscriptions.php
-* Bug Fix : Contact form: Increase CSS specificity for Contact Forms in widgets
-* Bug Fix : Custom Content Type: Testimonial Custom Content Type: use core `WP_Customize_Image_Control` instead of custom...
-* Bug Fix : Extra Sidebar Widgets: add missing & to if statement for widget visibility
-* Bug Fix : Extra Sidebar Widgets: Don't require height/width values in the Twitter Timeline widget
-* Bug Fix : Extra Sidebar Widgets: Upload images from the customizer/Extra Sidebar Widgets Tiled Galleries for Gallery Widget
-* Bug Fix : General: Fix bug that was preventing modules from displaying properly
-* Bug Fix : Manage: When calling /sites/%s/posts/ include all attachments not just the first five via JSON API
-* Bug Fix : Mobile Theme: Minileven; Start after DOM ready
-* Bug Fix : Sharing: Open sharing in same window
-* Bug Fix : Stats language
-* Bug Fix : Subscritpions: fix invalid field when no email address
-
-
-= 3.3.2 =
-Release Date: February 19th, 2015
-
-* Enhancement: Updated translation files.
-* Enhancement: Heartbeat: Correctly stat new datasets.
-* Bug Fix: Widget Visibility: Correct some caching of visibility results that may get evaluated too soon.
-* Bug Fix: Contact Form: Hardening.
-* Bug Fix: Photon: Make sure our gallery filter can parse array inputs as well as the default html.
-
-= 3.3.1 =
-Release Date: February 11th, 2015
-
-* Bug Fix: JSON API: Minor versioning data.
-* Bug Fix: Markdown: Re-run KSES after processing to account for syntax changes.
-* Bug Fix: Media Extractor: Don't call a gallery a gallery if it hasn't got any pictures!
-* Bug Fix: Module Management: Handle a core api change for folks running trunk.
-* Bug Fix: Related Posts: CSS -- better clear rows.
-* Bug Fix: Sharing: Including sharing account on Pinterest unofficial buttons as well.
-* Bug Fix: Sharing: Properly version external assets by Jetpack release version.
-* Bug Fix: Shortcodes: Soundcloud: Backport API compatibility fixes.
-* Bug Fix: Shortcodes: Flickr: Tidy up our regex url pattern matching.
-* Bug Fix: Subscriptions: Don't add 'Email Address' as the value -- we have placeholders!
-* Bug Fix: Widgets: Gallery Widget: Allow folks to upload images from the widget area in the customizer.
-
-= 3.3 =
-Release Date: December 15th, 2014
-Release Post: http://jetpack.me/2014/12/16/jetpack-3-3-a-single-home-for-all-your-wordpress-sites/
-
-* Enhancement: Adds responsive video support to BuddyPress.
-* Enhancement: Custom Content Types: Added 'order' and 'orderby' options to portfolio shortcode.
-* Enhancement: Display notice when Jetpack Development Mode is on.
-* Enhancement: General: Update compatibility with Twenty Fifteen.
-* Enhancement: Image URL can now be overwritten with the `jetpack_images_fit_image_url_override` filter after dimensions are set by Photon.
-* Enhancement: JSON API: Add Endpoint for trigger Plugin Autoupdates.
-* Enhancement: JSON API: General Improvements. Documentation on http://developer.wordpress.com/
-* Enhancement: Likes: Updated the code to accept arbitrary CPTs.
-* Enhancement: Related Posts: Allow filter by `post_format`.
-* Enhancement: Sharing: add new `jetpack_sharing_counts` filter for option to turn off sharing counts.
-* Enhancement: Sharing: Use the Site Logo Theme Tool and the Site Icon as fallbacks for image tags.
-* Enhancement: Shortcodes: Made the code more readable by using output buffers instead of string concatenation.
-* Enhancement: Site Logo: Add alias functions to provide backward compatibility for themes expecting the old function calls.
-* Enhancement: Slideshow: Add title and alt text to images.
-* Enhancement: Subscription Form: Do not display the logged in user's email address by default.
-* Enhancement: Top Posts Widget: Refactor to allow conditional loading of the css.
-* Enhancement: Top Posts: Add `jetpack_top_posts_widget_count` filter to control number of displayed posts.
-* Bug Fix: Change subscribe_text from `p` to `div` so that it can contain block-level elements.
-* Bug Fix: Fonts: Change path to look for the svg in the right directory.
-* Bug Fix: Increase CSS specificity for Contact Forms in widgets.
-* Bug Fix: JSON API: Plugins Update: Make sure the plugin doesn't get deactivated.
-* Bug Fix: Likes: Fixes issues where likes don't load, load master iframe after scripts are loaded.
-* Bug Fix: Notes Module: Avoid a PHP Notice in cli scripts when the request doesn't contain a User-Agent header.
-* Bug Fix: Nova Menu CPT: fix notice when we have no taxonomies.
-* Bug Fix: Nova Menus: Use current instance to maintain object context.
-* Bug Fix: Related Posts: Add filter for `_enabled_for_request()`.
-* Bug Fix: Sharing: Prevent duplicate @ in shared Tweets.
-* Bug Fix: Site Logo: `get_site_logo()` now properly returns the site logo ID when provided in the `$show` argument.
-* Bug Fix: Site Logo: Correct evaluation of the Display Header Text in Customizer preview.
-
-= 3.2.1 =
-Release Date: November 14th, 2014
-
-* Enhancement: Updated translation files.
-* Enhancement: JSON API: More object vars passed back to some queries. Documentation on http://developer.wordpress.com/
-* Bug Fix: JSON API: Pass back correct author in `me/posts` data.
-* Bug Fix: JSON API: Don't check if a post is freshly pressed on remote Jetpack sites where the function doesn't exist.
-* Bug Fix: Site Logo: Add backward-compatible template tags to match the standalone release.
-* Bug Fix: Don't use __DIR__ -- it's 5.3+ only, and WordPress supports back to 5.2.
-* Bug Fix: Retool how we remove the source styles when using the concatenated version.
-* Bug Fix: Shortcodes: TED: Correct default language code from `eng` to `en`.
-* Bug Fix: Gallery Widget: Add a default background color.
-* Bug Fix: Subscription Notifications: Remove the label.
-* Bug Fix: Sharing: enqueue Genericons on static front page as well if selected.
-
-= 3.2 =
-Release Date: October 29, 2014
-Release Post: http://jetpack.me/2014/11/03/jetpack-3-2/
-
-* Enhancement: Speed Improvements (woohoo!).
-* Enhancement: Add site icons: an avatar for your blog.
-* Enhancement: Improvements to API endpoints.
-* Enhancement: Add oEmbed sources (Twitter, SoundCloud, Instagram, DailyMotion, Vine).
-* Enhancement: Add indicators to make it easier to see which modules are active.
-* Enhancement: Improve debug tool.
-* Enhancement: Add new 'Site Logos' code to theme tools, for themes that opt in to support it.
-* Enhancement: Improved caching for related posts.
-* Enhancement: Added "Remember Me" functionality to Single Sign On.
-* Enhancement: Improved accessibility.
-* Enhancement: Added additional filters to Widget Visibility.
-* Bug Fix: Fixed PHP Notice errors for Likes, Widget Visibility.
-* Bug Fix: Improvements to the testimonials CPT.
-* Bug Fix: Improved RTL on VideoPress admin.
-* Bug Fix: Removed Google+ Authorship module (discontinued by Google).
-* Bug Fix: Fixed use of deprecated function in mobile theme.
-* Bug Fix: Various fixes to Tiled Galleries.
-* Bug Fix: Various fixes to Contact Form.
-* Bug Fix: Various fixes to oEmbed.
-* Bug Fix: Various fixes to Single Sign On.
-* Bug Fix: Fixed styles in ShareDaddy.
-* Bug Fix: Better match protocols (http/https) to the site.
-
-
-= 3.1.1 =
-Release Date: August 7, 2014
-
-* Enhancement: Update translation files for strings that had been submitted/approved since release.
-* Bug Fix: Social Links: Add a function check to better degrade if Publicize isn't around.
-* Bug Fix: Open Graph: Add WordPress SEO back to the blacklist, until they update how they opt us out.
-* Bug Fix: Asset Minification: Add another caveat ( empty $plugin ) to short out on.
-* Bug Fix: Deprecated Hooks: Fixing our expectations where something that should be an array occasionally wasn't.
-* Bug Fix: Custom CSS: Add extra whitelist rule for -o-keyframe rules.
-
-= 3.1 =
-Release Date: July 31, 2014
-Release Post: http://jetpack.me/2014/07/31/jetpack-3-1-portfolio-custom-post-types-a-new-logo-and-much-more/
-
-* Enhancement: New Custom Content Types module.
-* Enhancement: New Jetpack Logo.
-* Enhancement: New optional JSON API endpoints for viewing updates and managing plugins and themes.
-* Enhancement: New Custom Post Type: Portfolio!
-* Enhancement: Rearranged buttons on the modules modals for easier management.
-* Enhancement: Jetpack Settings have improved keyboard accessibility.
-* Enhancement: Improved RTL support for After the Deadline, Carousel, Contact Form, Comics CPT, Custom CSS, Omnisearch, Publicize, Related Posts, Slideshow short code, Tiled Gallery, Widget-Visibility and Widgets Gallery.
-* Enhancement: Contact Form: Add an "Empty Spam" option.
-* Enhancement: i18n: Change the priority of where plugin_textdomain is hooked so that the plugins can better translate Jetpack.
-* Enhancement: Monitor: Displays how often the site is checked for downtime.
-* Enhancement: Shortcode: Added Mixcloud shortcode and oEmbed support.
-* Enhancement: Social Links: Improved handling of customizer hooks in non-admin context.
-* Enhancement: Stats: The smiley image is gone by default.
-* Enhancement: Stats: Added link to the configure page for stats so that the stats settings page is easier to find.
-* Enhancement: Theme Tools: Added the responsive videos to theme tools so that themes can support responsive videos more easily.
-* Update: Updated Genericons to version 3.1, new icons for website, ellipsis, foursquare, x-post, sitemap, hierarchy and paintbrush.
-* Bug Fix: Contact Form: Prefix function to avoid conflicts with other plugins.
-* Bug Fix: Custom CSS: Admin UI has a responsive layout.
-* Bug Fix: Custom CSS: Custom $content_width value doesn't overwrite theme's $content_width.
-* Bug Fix: Contact Form: Feedback link takes you to the form page.
-* Bug Fix: Carousel: Confirms an avatar is returned by get_avatar before displaying.
-* Bug Fix: Featured Content: Don't remove setting validation.
-* Bug Fix: Infinite Scroll: Google Universal Analytics support added.
-* Bug Fix: Multisite: Add message when updating multisite settings.
-* Bug Fix: Photon: Photon will no longer upscale images larger than the original size.
-* Bug Fix: Photon: Check that the image exists before rewriting the image URL to utilize Photon.
-* Bug Fix: Sharing: Pinterest adds attribute to display share count.
-* Bug Fix: Sharing: Respect an empty sharing title.
-* Bug Fix: Sharing: Share buttons now appear in the bbPress forms.
-* Bug Fix: Sharing: Support for multiple meta html tag og:image values.
-* Bug Fix: Single Sign On: Logout allows override of forcing Single Sign On.
-* Bug Fix: Single Sign On: Remove the lost password link on auto-forward logout.
-* Bug Fix: Social Links: Do not use anonymous function for compatibility with PHP 5.2.
-* Bug Fix: Tiled Galleries: Update jQuery mouseover caption effect to reduce flickering.
-* Bug Fix: Widgets Visibility: Works better in the customizer admin view.
-
-= 3.0.2 =
-Release Date: June 17, 2014
-
-* Enhancement: General: Make module categories filter more visible when active.
-* Enhancement: General: Updated translation files with more strings added since the last release.
-* Enhancement: General: Allow deep-linking to the Contact Support form.
-* Bug Fix: General: RTL Jetpack Admin UI looks better.
-* Bug Fix: General: Fixed PHP warning when bulk deactivating modules.
-* Bug Fix: General: Removed an unnecessary description.
-* Bug Fix: General: Resolved an SSL error on Jetpack Admin UI.
-* Bug Fix: General: Fix error comparing signatures when the WordPress installation is using site_url filters (applied mostly to WPEngine sites).
-* Bug Fix: General: Resolved PHP strict error on the mobile menu.
-* Bug Fix: General: Fix timing of conditional checks, so that calling developer mode via a plugin works again.
-* Bug Fix: General: Main page categories tab now properly translates module names.
-* Bug Fix: Related Posts: Fix a typo, the "more info" link now works.
-* Bug Fix: Likes: Improve button styling.
-* Bug Fix: Likes: Remove unused UI for Reblog settings on social settings page.
-* Bug Fix: Contact Form: Updated to no longer use a deprecated Akismet function.
-* Bug Fix: Contact Form: Sends email to the administrator that is not marked as spam again.
-* Bug Fix: Open Graph: Resolved PHP warning on open graph gallery pages when the gallery is empty.
-
-= 3.0.1 =
-Release Date: May 22, 2014
-
-* Bug Fix: AtD: A wpcom-only function got synced by mistake and caused a few errors. Fixed.
-* Bug Fix: Post By Email: Add static keyword to a function.
-* Bug Fix: ShareDaddy: In the admin-side configuration of sharing links, we used a Path icon instead of Pinterest. Oops!
-* Bug Fix: ShareDaddy: We inadvertently appended `via @jetpack` to some twitter shares. This is no longer the case.
-* Bug Fix: Related Posts: Tidying up and relocation of the `resync` button formerly on the more info modal.
-* Bug Fix: Infinite Scroll: Work better with core's MediaElement.js
-* Bug Fix: Heartbeat: Undeclared variable fixed.
-
-= 3.0 =
-Release Date: May 20, 2014
-Release Post: http://jetpack.me/2014/05/20/jetpack-3-0/
-
-* New User Interface for managing modules and settings
-* New Module: Verfication Tools
-* Enhancement: New look for the Sharing module
-* Enhancement: Multiple improvements on which Twitter handle a Twitter card will display
-* Enhancement: Add option to hide Google+ Authorship banner while still receiving the benefits
-* Enhancement: Many Infinite Scroll enhancements to improve performance
-* Enhancement: Infinite Scroll will use your CPT's display name instead of "Older Posts"
-* Enhancement: JSON API added /media/new endpoint
-* Enhancement: Added filter to assign new default image for Open Graph tags
-* Enhancement: New [jetpack-related-posts] shortcode to add Related Posts to page instead of default placement
-* Enhancement: Added SSO option to turn off login form completely, to use WordPress.com login exclusively
-* Enhancement: The [googlemaps] shortcode allows for Google Maps Engine
-* Enhancement: YouTube shortcode allows HD playback
-* Enhancement: Smoother, Faster Tiled Galleries!
-* Enhancement: New languages! Use Jetpack in Irish, Fulah, and Tigrinya
-* Bug Fix: Use your browser's Back and Forward buttons when naviagating a Carousel
-* Bug Fix: Various Related Posts fixes and improvements for added flexibility
-* Bug Fix: WordPress 3.9: Restores ability to edit Contact Forms
-* Bug Fix: WordPress 3.9: Restores Gallery Widget compatability
-* Bug Fix: Ensure Markdown is kept when Bulk Editing posts
-* Bug Fix: Improved Jetpack's Multisite Network Admin page for networks with a large number of sites
-* Bug Fix: Ensure Sharing settings persist when Bulk Editing a post
-* Bug Fix: Various other shortcode improvements
-
-= 2.9.3 =
-Release Date: April 10, 2014
-
-* Important security update. CVE-2014-0173
-
-= 2.9.2 =
-Release Date: March 17, 2014
-
-* Bug Fix: Publicize: When publishing from a mobile app or third-party client, Publicize now works again.
-
-= 2.9.1 =
-Release Date: March 6, 2014
-
-* Bug Fix: After the Deadline: Fix a Javascript glitch that could prevent publishing of posts.
-* Bug Fix: SSO: Disable the implementation of an option that had been removed before release. This would have only been an issue if a site administrator had enabled the module during an early beta of 2.9.
-
-= 2.9 =
-Release Date: February 26, 2014
-Release Post: http://jetpack.me/2014/02/26/jetpack-2-9/
-
-* Added Multisite network functionality
-* New Module: Related Posts
-* Enhancement: Single Sign On
-* Enhancement: Mixcloud shortcode and oEmbed
-* Enhancement: Gist shortcode and oEmbed
-* Enhancement: Modify Facebook Like Box widget to support new Facebook parameters
-* Enhancement: Rolled the Push Notifications module into the Notes module
-* Enhancement: Update kses with Markdown
-* Enhancement: Adding keyboard accessibility to sharing buttons config page
-* Enhancement: Pull WordPress testing bits from the new official git mirror at WordPress.org
-* Bug Fix: Widget Visibility
-* Bug Fix: Revisions box in Custom CSS
-* Bug Fix: Fix several bugs in the WordPress Posts Widget so that it correctly updates
-* Bug Fix: Limit Login Attempts no longer generates false positives from xmlrpc.
-* Bug Fix: Clear max_posts transient on theme switch.
-* Bug Fix: Lower priority of sync to allow all CPTs to be registered.
-* Bug Fix: Contact form fields emailed in correct order.
-
-* Other bugfixes and enhancements at https://github.com/Automattic/jetpack/commits/2.9
-
-= 2.8 =
-Release Date: January 31, 2014
-Release Post: http://jetpack.me/2014/01/31/jetpack-2-8-introducing-markdown-and-improving-monitor/
-
-* New Module: Markdown
-* Module Update: Jetpack Monitor
-* Enhancement: Infinite Scroll: Keep track of $current_day between requests so the_date() works well.
-* Enhancement: Embeds: New filter to turn off embeds in comments.
-* Enhancement: Contact Form: Add placeholder support.
-* Enhancement: Widget: Gravatar Profile: Added filters to allow users to customize headings and fixed output of personal links.
-* Enhancement: Facebook OG Tags: Add `published_time`, `modified_time`, and `author` if the post type supports it.
-* Enhancement: Sharing: Display buttons on CPT archive pages.
-* Enhancement: Sharing: Add `get_share_title` function and filter.
-* Enhancement: Sharing: Add filter `sharing_display_link`.
-* Enhancement: Twitter Timeline: Flesh out tweet limit option.
-* Enhancement: Social Links: Add Google+ to the list of supported services.
-* Enhancement: Stats: Improve dashboard styles in 3.8.
-* Enhancement: Stats: No longer use Quantcast.
-* Enhancement: Top Posts: Add `jetpack_top_posts_days` filter.
-* Enhancement: AtD: Add TinyMCE 4 compatibility for its pending arrival in WordPress 3.9
-* Enhancement: Genericons: Update to v3.0.3
-* Enhancement: Tiled Galleries: Add alt attributes to images.
-* Enhancement: Shortcode: YouTube: Accept protocol-relative URLs.
-* Enhancement: Shortcode: Slideshow: Add white background option.
-* Enhancement: Shortcode: YouTube: Add support for the two closed-caption arguments.
-* Enhancement: Shortcode: Vimeo: Update the regex to support the new embed code.
-* Enhancement: Shortcode: Google Maps: Update the regex to handle new format for embeds.
-* Enhancement: Likes: Avoid a PHP Notice when $_POST['post_type'] is not set in meta_box_save.
-* Enhancement: Smush images to save on file size.
-* Enhancement: Publicize: Enable opt-in publicizing of custom post types.
-* Bug Fix: Random Redirect: Further namespace to avoid conflicts.
-* Bug Fix: Twitter Timeline: Resolve undefined index notice.
-* Bug Fix: Featured Content: Add extra class_exists() check to be extra careful.
-* Bug Fix: Facebook OG Tags: Change OG type of Home and Front Page to 'website'
-* Bug Fix: Widget Visibility: Add support for old-style single use widgets.
-* Bug Fix: Google Authorship: Support apostrophe in author names.
-* Bug Fix: Media Extractor: Assorted graceful failure caveats.
-* Bug Fix: Carousel: 'Link to None' bug fixed.
-* Bug Fix: Embeds: Bandcamp: Switch escaping function for album and track IDs to handle (int)s greater than PHP_INT_MAX
-* Bug Fix: Some plugins trying to catch brute-force attacks mistakenly flagged the Jetpack connection as one.
-
-= 2.7 =
-Release Date: December 11, 2013
-Release Post: http://jetpack.me/2013/12/11/jetpack-2-7-publicize/
-
-* Enhancement: Google+ Publicize
-* Enhancement: Add Cloudup as an oEmbed provider
-* Enhancement: Subscriptions: Add subscribe_field_id filter to allow updated ids when using multiple widgets
-* Enhancement: Infinite Scroll: TwentyFourteen Support
-* Bug Fix: Contact Form: Fix warning when form is called outside the loop
-* Bug Fix: Featured Content: Moving Settings to Customizer, provide option to set default tag as fallback, specify all supported post-types rather than just additional ones. Description Updates
-* Bug Fix: Featured Content: Compat with 'additional_post_types' theme support argument. Comment updates
-* Bug Fix: Featured Content: Make sure $term is an object before we treat it as one
-* Bug Fix: GlotPress: Merge with latest GlotPress
-* Bug Fix: Infinite Scroll: prevent Undefined index notice that can cause IS to fail when user has WP_DEBUG set to true
-* Bug Fix: Infinite Scroll: Improved compatibility with Carousel, Tiled Galleries, VideoPress, and the `[audio]` and `[video]` shortcodes
-* Bug Fix: Likes: Stop manually including version.php and trust the global. Some whitespace fixes, and if it's an attachment, follow the post_status of the parent post
-* Bug Fix: Mobile Theme: Display password field for Gallery format protected posts
-* Bug Fix: Sharing: Add new translation width for share button, and Google Plus icons
-* Bug Fix: Shortcodes: Support Ineternational Google domains for maps
-* Bug Fix: Shortcodes: Facebook Embeds: Register alternate permalink.php URL for posts
-* Bug Fix: Subscriptions: Moved inline styles from widget email input to separate css file
-* Bug Fix: Theme Tools: Fix glitch where random-redirect.php also showed as a plugin being deleted if you were deleting Jetpack
-* Bug Fix: Misc: Internationalization & RTL updates
-* Bug Fix: Misc: Prevent collisions with 'Facebook Featured Image & OG Meta Tags' plugin
-
-= 2.6.1 =
-Release Date: December 3, 2013
-
-* Bug Fix: minor styling fix in pre- and post-MP6/3.8 UI changes.
-* Bug Fix: Stats: spinner gif url fix when the user is viewing it over https.
-* Bug Fix: Stats: Switch to esc_html from htmlspecialchars in error message -- better to be native
-* Bug Fix: Media Extractor: some hosts don't compile unicode for preg_match_all, so we temporarily removed the block that depended on it.
-* Bug Fix: Media Extractor: Add in some error handling for malformed URLs.
-* Bug Fix: Twitter Cards: treat single-image galleries as a photo-type.
-* Bug Fix: Update conflicting plugins for OG tags and Twitter Cards.
-* Bug Fix: Correct max supported version number -- had been 3.6, update to 3.7.1
-
-= 2.6 =
-Release Date: November 28, 2013
-Release Post: http://jetpack.me/2013/11/26/new-release-jetpack-2-6/
-
-* Enhancement: WPCC / now called [SSO](http://jetpack.me/support/sso/): refactored.
-* Enhancement: Monitor: new module which will notify you if your site goes down(http://jetpack.me/support/monitor/).
-* Enhancement: Custom CSS: replace Ace editor with Codemirror.
-* Enhancement: Widgets: new “Display Posts” widget.
-* Enhancement: WP-CLI: add commands to disconnect a site and manage modules.
-* Enhancement: Contact Form: new filters, `grunion_contact_form_field_html` and `grunion_should_send_email`.
-* Enhancement: Custom Post Types: new restaurant post type.
-* Enhancement: Genericons: update to version 3.0.2.
-* Enhancement: Infinite Scroll: many improvements and fixes.
-* Enhancement: Likes: performance improvements.
-* Enhancement: MP6: Jetpack icons are now compatible with WordPress 3.8.
-* Enhancement: Open Graph: better descriptions, fallback images, and media extraction from video posts.
-* Enhancement: Publicize: new background token tests for connected publicize services and display problems on settings sharing and add new post.
-* Enhancement: Shortcodes: updated Bandcamp shortcode to support the `tracklist` and `minimal` attributes, as well as more `artwork` attribute values.
-* Enhancement: Shortlinks: add Custom Post Type support.
-* Enhancement: Subscriptions: add more ways to customize the subscriptions widget.
-* Enhancement: Twitter Cards: better media management and card type detection, and better handling of conflicts with other Twitter Cards plugins.
-* Enhancement: better handling of conflicts with other plugins.
-* Bug Fix: After the Deadline: add a typeof check for `tinyMCEPreInit.mceInit` to prevent js errors.
-* Bug Fix: Carousel: speed improvements and several bugfixes.
-* Bug Fix: Contact Form: remove nonce creating issues with caching plugins.
-* Bug Fix: Custom Post Types: Testimonials: return if featured image is empty so it can be removed after it’s been set.
-* Bug Fix: Featured Content: add additional post type support through the `additional_post_types` argument.
-* Bug Fix: Google Authorship: support apostrophes in Google+ profiles.
-* Bug Fix: Google Authorship: use a regexp Instead of using `mb_convert_encoding`, which doesn’t enjoy universal support.
-* Bug Fix: Heartbeat: ensure that it never triggers more than once per week.
-* Bug Fix: JSON API: add new `?meta=` parameter that allows you to expand the data found in the `meta->links` responses.
-* Bug Fix: JSON API: add new `is_private` response to the sites endpoint and `global_ID` response to the reader and post endpoints.
-* Bug Fix: Mobile Theme: allow small images to display inline.
-* Bug Fix: Mobile Theme: fix fatal errors for missing `minileven_header` function.
-* Bug Fix: Photon: fix errors when an image is not uploaded properly.
-* Bug Fix: Shortcodes: improvements to Archives, Google+, Presentations, Vine and Youtube.
-* Bug Fix: Tiled Galleries: improve display of panoramic images and fix errors when an image is not uploaded properly.
-
-= 2.5 =
-Release Date: September 19, 2013
-Release Post: http://jetpack.me/2013/09/19/jetpack-2-5/
-
-* Enhancement: Connect your Google+ profile and WordPress site to prove authorship of posts.
-* Enhancement: Improved sharing buttons display.
-* Enhancement: Comment on your posts using Google+ to signin.
-* Enhancement: Embed Google+ posts into your posts.
-* Enhancement: Added event logging capabilities for debugging
-* Enhancement: LaTeX is now available in dev mode
-* Enhancement: Introduced gallery widget
-* Enhancement: Added new module: VideoPress
-* Enhancement: Updated identity crisis checker
-* Enhancement: Tiled Gallery widget added
-* Enhancement: Google +1 button changed to Google+ Share button, to avoid confusion
-* Enhancement: Added check to ensure Google+ authorship accounts have disconnected properly
-* Enhancement: Updated identity crisis checker
-* Enhancement: Tiled Gallery widget added
-* Enhancement: Google +1 button changed to Google+ Share button, to avoid confusion
-* Enhancement: Added the ability to embed Facebook posts
-* Bug Fix: Redirect issue with G+ authorship when WordPress is not in the root directory
-* Enhancement: Better security if carousel to prevent self-XSS
-* Enhancement: Better handling of cookies for subsites on multisite installs
-* Bug Fix: Check for post in G+ authorship before accessing it
-
-= 2.4.2 =
-Release Date: September 5, 2013
-
-* Enhancement: Converted to module headers to detect Auto-Activating modules.
-* Enhancement: WPCC: Added 'Close' link to deactivate WPCC in the admin nag.
-* Enhancement: JSON API: Add User Nicename to the user data.
-* Bug Fix: Contact Form: Stopped using a short tag.
-* Bug Fix: Changed CSS selector to catch MP6 stylings.
-* Bug Fix: Dropped __FILE__ references in class.jetpack.php in favor of JETPACK__PLUGIN_DIR constant, now code that deactivates the plugin from the connect nag works again.
-* Bug Fix: Random Redirect: Add random-redirect to the plugins overriden list, in case someone is using Matt's Random Redirect plugin.
-* Bug Fix: Tiled Gallery: Revert r757178 relating to tiled gallery defaults.
-* Bug Fix: Return false, not zero, if $GLOBALS['content_width'] isn't defined.
-* Bug Fix: WPCC: Don't call wp_login_url() in the constructor -- if someone is running a custom login page, that can break things if their plugin runs get_permalink as a filter before init.
-* Bug Fix: Tiled Gallery: Add fallback if post_parent == 0 due to infinite_scroll_load_other_plugins_scripts.
-* Bug Fix: Custom CSS: Set the ACE gutter z-index to 1.
-* Bug Fix: Custom Post Types: Switch from wp_redirect() to wp_safe_redirect().
-* Bug Fix: Likes: Set overflow:hidden; on the likes adminbar item.
-* Bug Fix: Mobile Theme: Migrate where/when the custom header stuff is included.
-* Bug Fix: Slideshow Shortcode: Add a height of 410px.
-
-= 2.4.1 =
-Release Date: September 4, 2013
-
-* Enhancement: Don't auto-activate WPCC.
-
-= 2.4 =
-Release Date: August 30, 2013
-Release Post: http://jetpack.me/2013/09/04/jetpack-2-4-widget-visibility-and-wpcc-and-more/
-
-* Enhancement: WordPress.com Connect (WPCC): New Module.
-* Enhancement: Widget Visibility: New Module.
-* Enhancement: Shortcode: Addition of new Twitter Timeline shortcode.
-* Enhancement: Shortcode: Addition of new Presentation shortcode.
-* Enhancement: Shortcode: Addition of new Vine shortcode.
-* Enhancement: Custom Post Types: CPTs are available.
-* Enhancement: Subscriptions: Add 'jetpack_is_post_mailable' filter.
-* Enhancement: OpenGraph: Add Twitter Cards meta tags as well.
-* Enhancement: Custom CSS: Update lessc and scssc preprocessors to 0.4.0 and 0.0.7 respectively.
-* Enhancement: Omnisearch: Add Media results.
-* Enhancement: Likes: Use a protocol-agnostic iframe, instead of forced HTTPS.
-* Enhancement: Top Posts: Increase post limit.
-* Enhancement: Publicize: Updated JS and UI.
-* Enhancement: Photon: New filter to let site admins/owners enable photon for HTTPS urls.
-* Enhancement: New jetpack_get_available_modules filter.
-* Enhancement: Subscriptions: Antispam measures.
-* Bug Fix: Add inline style to keep plugins/themes from inadvertently hiding the Connect box.
-* Bug Fix: Custom CSS: Respect the new wp_revisions_to_keep filter.
-* Bug Fix: Photon: Only hook jetpack_photon_url into the filter if the user has Photon active.
-* Bug Fix: Heartbeat: Used wrong object, occasinally fatal-erroring out for the cron.
-* Bug Fix: Add an empty debug.php file to the /modules/ folder, to solve some update issues where it never got deleted.
-
-= 2.3.5 =
-Release Date: August 12, 2013
-
-* Enhancement: Added Path support to Publicize.
-
-= 2.3.4 =
-Release Date: August 6, 2013
-
-* Bug Fix: Correct when output occurs with CSV export for feedback.
-* Bug Fix: Tidy up the Heartbeat API.
-* Enhancement: User Agent: Improve detecting of bots.
-* Enhancement: Genericons: Make sure we're pulling the freshest version from genericons.com on each release.
-* Enhancement: JSON API: Open up replies/new endpoints so that users can comment on blogs that are not in their access token.
-* Enhancement: Photon: Apply to `get_post_gallery()` function as well.
-* Enhancement: Tiled Galleries: Add a default bottom margin to be more robust out of the box.
-* Translations: Adding in fresher translation files.
-* Deprecation: Removing the retinization code for 3.4, as it was included in WordPress trunk from 3.5 onwards.
-
-= 2.3.3 =
-Release Date: July 26, 2013
-
-* Bug Fix: We were inadvertently overwriting cron schedules with our Jetpack heartbeat. This should now be fixed.
-* Enhancement: New Facebook Sharing icons.
-* Enhancement: Minor update to the Minileven stylesheet.
-
-= 2.3.2 =
-Release Date: July 25, 2013
-
-* Bug Fix: Fixed an issue where Facebook Pages were not available when connecting a Publicize account.
-* Bug Fix: For some web hosts, fixed an issue where 'Jetpack ID' error would occur consistently on connecting to WordPress.com.
-* Enhancement: Adding some new stats and heartbeat checking to Jetpack.
-
-= 2.3.1 =
-Release Date: July 2, 2013
-
-* Enhancement: Social Links: Retooling the class for better consistency and performance behind the scenes.
-* Enhancement: Omnisearch: Make it easier to search Custom Post Types. No longer need to extend the class, if all you want is a basic display. Just call `new Jetpack_Omnisearch_Posts( 'cpt' );`
-* Enhancement: Sharing Buttons: LinkedIn: Use the official button's sharing link on the Jetpack implementation for a more consistent sharing experience and produce better results on LinkedIn's end.
-* Enhancement: Debug / Connection: Better logic in determining whether the server can use SSL to connect to WPCOM servers.
-* Enhancement: Sharing: Twitter: Calculate the size of the Tweet based on the short URL rather than the full URL size.
-* Enhancement: Debug: More readable and understandable messages.
-* Enhancement: Likes: Including some MP6 styles.
-* Enhancement: Comments: Add new core classes to comment form. See http://core.trac.wordpress.org/changeset/24525
-* Bug Fix: Omnisearch: Don't load everything initially, run the providers off admin_init, and then issue an action for folks to hook into.
-* Bug Fix: Omnisearch: Modify some child class functions to match the parent's parameters and avoid strict notices in newer versions of PHP.
-* Bug Fix: Omnisearch: Hide the search form in the module description if the current user can't use it.
-* Bug Fix: Comment Form: Use edit_pages, not edit_page (fixes glitch in previous beta, never publicly released).
-* Bug Fix: Twitter Timeline Widget: Additional testing of values and casting to default if they are nonconforming.
-* Bug Fix: Sharing: Pinterest: Make the button wider if there's a count to avoid overlapping with others.
-* Bug Fix: Post By Email: Change configuration_redirect to static.
-* Bug Fix: Likes: Don't call configuration_redirect as a static, do it as a method.
-* Bug Fix: Add some further security measures to module activation.
-
-= 2.3 =
-Release Date: June 19, 2013
-Release Post: http://jetpack.me/2013/06/19/jetpack-2-3/
-
-* Enhancement: Omnisearch: Search once, get results from everything! Omnisearch is a single search box that lets you search many different things
-* Enhancement: Debugger: this module helps you debug connection issues right from your dashboard, and contact the Jetpack support team if needed
-* Enhancement: Social Links: this module is a canonical source, based on Publicize, that themes can use to let users specify where social icons should link to
-* Enhancement: It’s now easier to find out if a module is active or note, thanks to the new Jetpack::is_module_active()
-* Enhancement: Contact Form: You are now able to customize the submit button text thanks to the submit_button_text parameter
-* Enhancement: Comments: We've added a filter to let users customize the Comment Reply label, and users can now also customize the prompt on the comment form again.
-* Enhancement: Mobile Theme: Add genericons.css and registering it so it’s easily accessible to other modules that may want it
-* Enhancement: Tiled Galleries: You can now customize the captions, thanks to the jetpack_slideshow_slide_caption filter
-* Enhancement: Widgets: Twitter Timeline: Add the noscrollbar option
-* Enhancement: Widgets: Facebook Like Box Widget: add a show_border attribute
-* Enhancement: Widgets: FB Like Box: let Jetpack users override the iframe background color set in an inline style attribute by using the jetpack_fb_likebox_bg filter
-* Bug Fix: Carousel: Fix a bug where double-clicking a gallery thumbnail broke the carousel functionality
-* Bug Fix: Comments: Change “must-log-in” to class from ID
-* Bug Fix: Contact Form: Make the Add Contact Form link a button, ala Add Media in core
-* Bug Fix: Contact Form: Fix encoding of field labels
-* Bug Fix: Contact Form: Remove references to missing images
-* Bug Fix: Fix 2 XSS vulnerabilities
-* Bug Fix: JSON API: Minor fixes for bbPress compatibility
-* Bug Fix: JSON API: Fix metadata bugs
-* Bug Fix: JSON API: Add a new hook that is fired when a post is posted using the API
-* Bug Fix: JSON API: Prefork/REST: update path normalizer to accept versions other than 1
-* Bug Fix: JSON API: Remove extra parenthesis in CSS
-* Bug Fix: Custom CSS: Move content width filters higher up so that they’re active for all users, not just logged-in admins.
-* Bug Fix: Custom CSS: All CSS properties that accept images as values need to be allowed to be declared multiple times so that cross-browser gradients work
-* Bug Fix: Infinite Scroll: Allow themes to define a custom function to render the IS footer
-* Bug Fix: Infinite Scroll: Fix up Twenty Thirteen styles for RTL and small viewports.
-* Bug Fix: Likes: Fix ‘Call to undefined function’
-* Bug Fix: Likes: Add scrolling no to iframe to make sure that like button in admin bar does not show scrollbars
-* Bug Fix: Likes: Remove setInterval( JetpackLikesWidgetQueueHandler, 250 ) call that was causing heavy CPU load
-* Bug Fix: Mobile Theme: Remove unused variable & function call
-* Bug Fix: Publicize: Fix LinkedIn profile URL generation
-* Bug Fix: Publicize: Better refresh handling for services such as LinkedIn and Facebook
-* Bug Fix: Shortcodes: Audio shortcode: Treat src as element 0. Fixes audio shortcodes created by wp_embed_register_handler when an audio url is on a line by itself
-* Bug Fix: Bandcamp: Updates to the Bandcamp shortcode
-* Bug Fix: Stats: Fix missing function get_editable_roles on non-admin page loads
-* Bug Fix: Widgets: Twitter Timeline: Fix HTML links in admin; set default values for width/height; change some of the sanitization functions
-* Bug Fix: Widgets: Top Posts Widget: Exclude attachments
-* Bug Fix: Widgets: Top Posts Widget: fix data validation for number of posts
-* Bug Fix: Fix PHP warnings non-static method called dynamically
-* Bug Fix: Fixed an issue in image extraction from HTML content
-* Bug Fix: Open Graph: Change default minimum size for og:image too 200×200
-* Note: The old Twitter widget was removed in favour of Twitter Timeline widget
-* Note: Add is_module_active() to make it easier to detect what is and what isn’t
-* Note: Compressing images via lossless methods
-* Note: Tidying up jetpack’s CSS
-* Note: Set the max DB version for our retina overrides that were meant to stop for WordPress 3.5
-* Note: Updating spin.js to the current version, and shifting to the canonical jquery.spin.js library
-* Note: Adding Jetpack_Options class, and abstracting out options functions to it
-
-= 2.2.5 =
-Release Date: May 1, 2013
-
-* Enhancement: Stats: Counting of registered users' views can now be enabled for specific roles
-* Bug Fix: Security tightening for metadata support in the REST API
-* Bug Fix: Update the method for checking Twitter Timeline widget_id and update coding standards
-* Bug Fix: Custom CSS: Allow the content width setting to be larger than the theme's content width
-* Bug Fix: Custom CSS: Fix possible missing argument warning.
-
-= 2.2.4 =
-Release Date: April 26, 2013
-
-* Bug Fix: JSON API compat file include was not assigning a variable correctly, thus throwing errors. This has been resolved.
-
-= 2.2.3 =
-Release Date: April 26, 2013
-
-* Enhancement: Comments - Add the reply-title H3 to the comment form so that themes or user CSS can style it
-* Enhancement: Custom CSS - Support for the CSS @viewport
-* Enhancement: JSON API - Support for i_like, is_following, and is_reblogged
-* Enhancement: JSON API: Custom Post Type Support
-* Enhancement: JSON API: Meta Data Support
-* Enhancement: JSON API: Bundled Support for bbPress
-* Enhancement: JSON API: Additions of following, reblog, and like status for post endpoints.
-* Enhancement: Shortcodes - Add Bandcamp shortcode
-* Enhancement: Tiled Galleries - Add code to get blog_id
-* Bug Fix: Carousel - Support relative image paths incase a plugin is filtering attachment URLs to be relative instead of absolute
-* Bug Fix: Carousel - Add likes widget to images / Respect comment settings for name/email
-* Bug Fix: Carousel - Make name and email optional if the setting in the admin area says they are
-* Bug Fix: Contact Form - Bug fixes, including a fix for WP-CLI
-* Bug Fix: Contact Form - Remove deprecated .live calls, delegate lazily to jQuery(document) since it's all in an iframe modal
-* Bug Fix: Contact Form - RTL styles
-* Bug Fix: Contact Form - Better handle MP6 icons
-* Bug Fix: Custom CSS - array_shift() took a variable by reference, so avoid passing it the result of a function
-* 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>)
-* Bug Fix: Infinite Scroll - Maintain main query's `post__not_in` values when querying posts for IS
-* 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
-* Bug Fix: Infinite Scroll - CSS update - IS footer was too large in Firefox
-* Bug Fix: Infinite Scroll - Add bundled support for Twenty Thirteen default theme
-* Bug Fix: Infinite Scroll - Include posts table's prefix when modifying the SQL WordPress generates to retrieve posts for Infinite Scroll
-* Bug Fix: JSON API - Use wp_set_comment_status to change the comment status, to make sure actions are run where needed
-* Bug Fix: Likes - Update style and logic for matching id's
-* Bug Fix: Mobile Theme - Ensure that <code>minileven_actual_current_theme()</code> is child-theme compatible + other updates
-* Bug Fix: Mobile Theme - Update method for finding currently active theme.
-* Bug Fix: Notifications - Remove the postmessage.js enqueue since this feature solely supports native postMessage
-* Bug Fix: Notifications - Clean up script enqueues and use core versions of underscore and backbone on wpcom as fallbacks
-* Bug Fix: Notifications - Enqueue v2 scripts and style
-* Bug Fix: Notifications - Prefix module-specific scripts and style to prevent collision
-* Bug Fix: Notifications - Include lang and dir attributes on #wpnt-notes-panel so the notifications iframe can use these to display correctly
-* Bug Fix: Open Graph: Use the profile OG type instead of author. Add tags for first/last names
-* Bug Fix: Publicize - Remove the Yahoo! service because they stopped supporting that API entirely
-* Bug Fix: Publicize - fix fatal errors caused by using a method on a non-object. Props @ipstenu
-* Bug Fix: Sharing - Adding 2x graphics for Pocket sharing service
-* Bug Fix: Sharing - Bug fixes, and a new filter
-* Bug Fix: Shortcodes - Audio: make sure that the Jetpack audion shortcode does not override the 3.6 core audio shortcode. Also, we need to filter the old Jetpack-style shortcode to properly set the params for the Core audio shortcode.
-* Bug Fix: Shortcodes - Audio: Re-enable the flash player
-* Bug Fix: Shortcodes - Slideshow: RTL styling update
-* Bug Fix: Tiled Galleries - Fix IE8 display bug where it doesn't honor inline CSS for width on images
-* Bug Fix: Tiled Galleries - Remove depreacted hover call, use mouseenter mouseleave instead
-* Enhancement: Twitter Timeline Widget: New JavaScript based widget. Old one will discontinue May 7th.
-
-= 2.2.2 =
-Release Date: April 5, 2013
-
-* Enhancement: Mobile Theme: Add controls for custom CSS.
-* Enhancement: Sharing: Add Pocket to the available services.
-* Bug Fix: Custom CSS: Update the method for generating content width setting.
-* Bug Fix: JSON API: Security updates.
-* Bug Fix: Likes: Add settings for email notifications and misc style updates.
-* Bug Fix: Notifications: Add the post types to sync after init.
-* Bug Fix: Publicize: RTL styling.
-* Bug Fix: Shortcodes: security fixes and function prefixing.
-* Bug Fix: Widgets: Update wording on the Top Posts widget for clarity.
-* Bug Fix: Jetpack Post Images security fixes.
-
-= 2.2.1 =
-Release Date: March 28, 2013
-
-* Enhancement: Development Mode: Define the `JETPACK_DEV_DEBUG` constant to `true` to enable an offline mode for localhost development. Only modules that don't require a WordPress.com connection can be enabled in this mode.
-* Enhancement: Likes: Added the number of likes to the wp-admin/edit.php screens.
-* Enhancement: Mobile Theme - design refresh
-* Enhancement: Shortcodes - Add a filter to the shortcode loading section so that a plugin can override what Jetpack loads for shortcodes
-* Enhancement: Widgets - Filter Jetpack's widgets so that a plugin can control which widgets get loaded
-* Bug Fix: Comments - Add in a wrapper div with id='commentform'
-* Bug Fix: Contact Form - Added date field with datepicker
-* Bug Fix: Contact Form - Allowed non-text widgets to use contact forms by running their output through the widget_text filter
-* Bug Fix: Custom CSS - Allowing color values to be defined multiple times
-* Bug Fix: Custom CSS - Dynamically loading the correct CSS/LESS/SCSS mode for the CSS editor if the user changes the preprocessor
-* Bug Fix: Custom CSS - Using the unminified worker CSS
-* Bug Fix: Custom CSS - Added rule: reminder about using .custom-background on body selector
-* Bug Fix: Custom CSS - Modified rule: Removed portion of overqualification rule that deems 'a.foo' overqualified if there are no other 'a' rules
-* Bug Fix: Custom CSS - Ensuring that the editor and the textarea behind it are using the same font so that the cursor appears in the correct location
-* Bug Fix: Custom CSS - Fix a bug that caused some sites to always ignore the base theme's CSS when in preview mode
-* Bug Fix: Custom CSS - Run stripslashes() before passing CSS to save()
-* Bug Fix: Custom CSS - Moving inline CSS and JavaScript into external files
-* Bug Fix: Infinite Scroll - Use the `is_main_query()` function and query method
-* Bug Fix: Infinite Scroll - Remove unused styles and an unnecessary margin setting
-* Bug Fix: Infinite Scroll - Allow the query used with IS to be filtered, so IS can be applied to a new query within a page template
-* Bug Fix: JSON API - Catch the 'User cannot view password protected post' error from can_view_post and bypass it for likes actions if the user has the password entered
-* Bug Fix: Likes - Bump cache buster, Don't show likes for password protected posts
-* Bug Fix: Notifications - Remove a redundant span closing tag
-* Bug Fix: Photon - If an image is already served from Photon but the anchor tag that surrounds it hasn't had its `href` value rewritten to use Photon, do so. Accounts for WP galleries whose individual items are linked to the original image files
-* Bug Fix: Publicize - Allows GLOBAL_CAP to be filtered, Adds an AYS to connection deletion, UI improvement for MP6 (and in general)
-* Bug Fix: Sharedaddy - Fire the sharing redirect earlier for increased plugin compatibility
-* Bug Fix: Stats - Move the display:none CSS output to wp_head so it gets written inside the HEAD tag if the option to hide the stats smilie is active
-* Bug Fix: Tiled Galleries - A more descriptive name for the default gallery type
-* Bug Fix: Tiled Galleries - Hide the Columns setting for gallery types that don't support it
-* Bug Fix: Run the admin_menu action late so that plugins hooking into it get a chance to run
-* Bug Fix: Prophylactic strict equality check
-
-= 2.2 =
-Release Date: February 26, 2013
-Release Post: http://jetpack.me/2013/02/26/jetpack-2-2-likes/
-
-* Enhancement: Likes: Allow your readers to show their appreciation of your posts.
-* Enhancement: Shortcodes: SoundCloud: Update to version 2.3 of the SoundCloud plugin (HTML5 default player, various fixes).
-* Enhancement: Shortcodes: Subscriptions: Add a shortcode to enable placement of a subscription signup form in a post or page.
-* Enhancement: Sharedaddy: Allow selecting multiple images from a post using the Pinterest share button.
-* Enhancement: Contact Form: Allow feedbacks to be marked spam in bulk.
-* Enhancement: Widgets: Readmill Widget: Give your visitors a link to send your book to their Readmill library.
-* Note: Notifications: Discontinue support for Internet Explorer 7 and below.
-* Bug Fix: JSON API: Fix authorization problems that some users were experiencing.
-* Bug Fix: JSON API: Sticky posts were not being sorted correctly in /posts requests.
-* Bug Fix: Stats: sync stats_options so server has roles array needed for view_stats cap check.
-* Bug Fix: Infinite Scroll: Display improvements.
-* Bug Fix: Infinite Scroll: WordPress compatibility fixes.
-* Bug Fix: Photon: Only rewrite iamge urls if the URL is compatible with Photon.
-* Bug Fix: Photon: Account for registered image sizes with one or more dimesions set to zero.
-* Bug Fix: Subscriptions: Make HTML markup more valid.
-* Bug Fix: Subscriptions: Fixed notices displayed in debug mode.
-* Bug Fix: Custom CSS: CSS warnings and errors should now work in environments where JavaScript is concatenated or otherwise modified before being served.
-* Bug Fix: Hovercards: WordPress compatibility fixes.
-* Bug Fix: Improved image handling for the Sharing and Publicize modules.
-* Bug Fix: Carousel: Display and Scrollbar fixes.
-* Bug Fix: Tiled Galleries: Restrict images in tiled galleries from being set larger than their containers.
-* Bug Fix: Widgets: Gravatar Profile: CSS fixes.
-* Bug Fix: Publicize: Strip HTML comments from the data we send to the third party services.
-* Bug Fix: Notifications: Dropped support for IE7 and below in the notifications menu.
-* Bug Fix: Custom CSS Editor: Allow custom themes to save CSS more easily.
-* Bug Fix: Infinite Scroll: Waits until the DOM is ready before loading the scrolling code.
-* Bug Fix: Mobile Theme: If the user has disabled the custom header text color, show the default black header text color.
-* Bug Fix: Mobile Theme: Fix for the "View Full Site" link.
-* Bug Fix: Mobile Theme: Use a filter to modify the output of wp_title().
-* Bug Fix: Publicize: Twitter: Re-enable character count turning red when more than 140 characters are typed.
-
-= 2.1.2 =
-Release Date: February 5, 2013
-
-* Enhancement: Infinite Scroll: Introduce filters for Infinite Scroll.
-* Enhancement: Shortcodes: TED shortcode.
-* Bug Fix: Carousel: Make sure to use large image sizes.
-* Bug Fix: Carousel: Clicking the back button in your browser after exiting a carousel gallery brings you back to the gallery.
-* Bug Fix: Carousel: Fix a scrollbar issue.
-* Bug Fix: Comments: Move the get_avatar() function out of the base class.
-* Bug Fix: Contact Form: Prevent the form from displaying i18n characters.
-* Bug Fix: Contact Form: Remove the !important CSS rule.
-* Bug Fix: Infinite Scroll: Main query arguments are not respected when using default permalink.
-* Bug Fix: JSON API: Trap 'wp_die' for new comments and image uploads.
-* Bug Fix: JSON API: Use a better array key for the user_ID.
-* Bug Fix: JSON API: Make the class instantiable only once, but multi-use.
-* Bug Fix: JSON API: Fix lookup of pages by page slug.
-* Bug Fix: JSON API: Updates for post likes.
-* Bug Fix: Mobile Theme: Remove Android download link for BB10 and Playbook.
-* Bug Fix: Open Graph: Stop using Loop functions to get post data for meta tags.
-* Bug Fix: Photon: Suppress and check for warnings when pasing_url and using it.
-* Bug Fix: Photon: Ensure full image size can be used.
-* Bug Fix: Photon: Resolve Photon / YouTube embed conflict.
-* Bug Fix: Photon: Fix dimension parsing from URLs.
-* Bug Fix: Photon: Make sure that width/height atts are greater than zero.
-* Bug Fix: Sharedaddy: Layout fixes for share buttons.
-* Bug Fix: Sharedaddy: Always send Facebook a language locale.
-* Bug Fix: Sharedaddy: Don't look up share counts for empty URLs.
-* Bug Fix: Shortcodes: Ensure that images don't overflow their containers in the slideshow shortcode.
-* Bug Fix: Shortcodes: only enqueue jquery if archive supports Infinite Scroll in the Audio Shortcode.
-* Bug Fix: Tiled Galleries: Use a more specific class for gallery item size to avoid conflicts.
-* Bug Fix: Tiled Galleries: Fixing scrolling issue when tapping on a Tiled Gallery on Android.
-* Bug Fix: Widgets: Gravatar profile widget typo.
-* Bug Fix: Widgets: Add (Jetpack) to widget titles.
-* Bug Fix: Widgets: Twitter wasn't wrapping links in the t.co shortener.
-* Bug Fix: Widgets: Facebook Likebox updates to handling the language locale.
-* Bug Fix: Widgets: Top Posts: Fixed a WP_DEBUG notice.
-* Bug Fix: Widgets: Gravatar Profile Widget: transient names must be less than 45 characters long.
-* Bug Fix: typo in delete_post_action function.
-* Bug Fix: Load rendered LaTeX image on same protocol as its page.
-
-
-= 2.1.1 =
-Release Date: January 5, 2013
-
-* Bug Fix: Fix for an error appearing for blogs updating from Jetpack 1.9.2 or earlier to 2.1.
-
-= 2.1 =
-Release Date: January 4, 2013
-Release Post: http://jetpack.me/2013/01/04/galleries/
-
-* Enhancement: Tiled Galleries: Show off your photos with cool mosaic galleries.
-* Enhancement: Slideshow gallery type: Display any gallery as a slideshow.
-* Enhancement: Custom CSS: Allow zoom property.
-* Enhancement: Stats: Show WordPress.com subscribers in stats.
-* Bug Fix: Fix errors shown after connecting Jetpack to WordPress.com.
-* Bug Fix: Photon: Fix bug causing errors to be shown in some posts.
-* Bug Fix: Photon: Convert all images in posts when Photon is active.
-* Bug Fix: Infinite Scroll: Improved compatibility with the other modules.
-* Bug Fix: Custom CSS: Updated editor to fix missing file errors.
-* Bug Fix: Publicize: Don't show the Facebook profile option if this is a Page-only account.
-* Bug Fix: Photon: A fix for photos appearing shrunken if they didn't load quickly enough.
-* Bug Fix: Sharing: A compatibility fix for posts that only have partial featured image data.
-* Bug Fix: Publicize/Sharing: For sites without a static homepage, don't set the OpenGraph url value to the first post permalink.
-* Bug Fix: Mobile Theme: Better compatibility with the customizer on mobile devices.
-* Bug Fix: Sharing: Don't show sharing options on front page if that option is turned off.
-* Bug Fix: Contact Form: Fix PHP warning shown when adding a Contact Form in WordPress 3.5.
-* Bug Fix: Photon: Handle images with relative paths.
-* Bug Fix: Contact Form: Fix compatibility with the Shortcode Embeds module.
-
-
-= 2.0.4 =
-Release Date: December 14, 2012
-
-* Bug Fix: Open Graph: Correct a bug that prevents Jetpack from being activated if the SharePress plugin isn't installed.
-
-= 2.0.3 =
-Release Date: December 14, 2012
-
-* Enhancement: Infinite Scroll: support [VideoPress](http://wordpress.org/extend/plugins/video/) plugin.
-* Enhancement: Photon: Apply to all images retrieved from the Media Library.
-* Enhancement: Photon: Retina image support.
-* Enhancement: Custom CSS: Refined editor interface.
-* Enhancement: Custom CSS: Support [Sass](http://sass-lang.com/) and [LESS](http://lesscss.org/) with built-in preprocessors.
-* Enhancement: Open Graph: Better checks for other plugins that may be loading Open Graph tags to prevent Jetpack from doubling meta tag output.
-* Bug Fix: Infinite Scroll: Respect relative image dimensions.
-* Bug Fix: Photon: Detect custom-cropped images and use those with Photon, rather than trying to use the original.
-* Bug Fix: Custom CSS: Fix for bug preventing @import from working with url()-style URLs.
-
-= 2.0.2 =
-Release Date: November 21, 2012
-
-* Bug Fix: Remove an erroneous PHP short open tag with the full tag to correct fatal errors under certain PHP configurations.
-
-= 2.0.1 =
-Release Date: November 21, 2012
-
-* Enhancement: Photon: Support for the [Lazy Load](http://wordpress.org/extend/plugins/lazy-load/) plugin.
-* Bug Fix: Photon: Fix warped images with un- or under-specified dimensions.
-* Bug Fix: Photon: Fix warped images with pre-photonized URLs; don't try to photonize them twice.
-* Bug Fix: Infinite Scroll: Check a child theme's parent theme for infinite scroll support.
-* Bug Fix: Infinite Scroll: Correct a bug with archives that resulted in posts appearing on archives that they didn't belong on.
-* Bug Fix: Publicize: Send the correct shortlink to Twitter (et al.) if your site uses a shortener other than wp.me.
-* Bug Fix: Sharing: Improved theme compatibility for the Google+ button.
-* Bug Fix: Notifications: Use locally-installed Javascript libraries if available.
-
-= 2.0 =
-Release Date: November 8, 2012
-Release Post: http://jetpack.me/2012/11/08/jetpack-2-0-publicize-to-facebook-twitter-linkedin-tumblr-post-by-email-photon-infinite-scroll/
-
-* Enhancement: Publicize: Connect your site to popular social networks and automatically share new posts with your friends.
-* Enhancement: Post By Email: Publish posts to your blog directly from your personal email account.
-* Enhancement: Photon: Images served through the global WordPress.com cloud.
-* Enhancement: Infinite Scroll: Better/faster browsing by pulling the next set of posts into view automatically when the reader approaches the bottom of the page.
-* Enhancement: Open Graph: Provides more detailed information about your posts to social networks.
-* Enhancement: JSON API: New parameters for creating and viewing posts.
-* Enhancement: Improved compatibility for the upcoming WordPress 3.5.
-* Bug Fix: Sharing: When you set your sharing buttons to use icon, text, or icon + text mode, the Google+ button will display accordingly.
-* Bug Fix: Gravatar Profile Widget: Allow basic HTML to be displayed.
-* Bug Fix: Twitter Widget: Error handling fixes.
-* Bug Fix: Sharing: Improved theme compatibility
-* Bug Fix: JSON API: Fixed error when creating some posts in some versions of PHP.
-
-= 1.9.2 =
-Release Date: October 29, 2012
-
-* Bug Fix: Only sync options on upgrade once.
-
-= 1.9.1 =
-* Enhancement: Notifications feature is enabled for logged-out users when the module is active & the toolbar is shown by another plugin.
-* Bug Fix: Use proper CDN addresses to avoid SSL cert issues.
-* Bug Fix: Prioritize syncing comments over deleting comments on WordPress.com. Fixes comment notifications marked as spam appearing to be trashed.
-
-= 1.9 =
-Release Date: October 26, 2012
-Release Post: http://jetpack.me/2012/10/26/jetpack-1-9-toolbar-notifications/
-
-* Enhancement: Notifications: Display Notifications in the toolbar and support reply/moderation of comment notifications.
-* Enhancement: Mobile Push Notifications: Added support for mobile push notifications of new comments for users that linked their accounts to WordPress.com accounts.
-* Enhancement: JSON API: Allows applications to send API requests via WordPress.com (see [the docs](http://developer.wordpress.com/docs/api/) )
-* Enhancement: Sync: Modules (that require the data) sync full Post/Comment to ensure consistent data on WP.com (eg Stats)
-* Enhancement: Sync: Improve syncing of site options to WP.com
-* Enhancement: Sync: Sync attachment parents to WP.com
-* Enhancement: Sync: Add signing of WP.com user ids for Jetpack Comments
-* Enhancement: Sync: Mark and obfuscate private posts.
-* Enhancement: Privacy: Default disable enhanced-distribution and json-api modules if site appears to be private.
-* Enhancement: Custom CSS: allow applying Custom CSS to mobile theme.
-* Enhancement: Sharing: On HTTPS pageloads, load as much of the sharing embeds as possible from HTTPS URLs.
-* Enhancement: Contact Form: Overhaul of the contact form code to fix incompatibilites with other plugins.
-* Bug Fix: Only allow users with manage_options permission to enable/disable modules
-* Bug Fix: Custom CSS: allow '/' in media query units; e.g. (-o-min-device-pixel-ratio: 3/2)
-* Bug Fix: Custom CSS: leave comments alone in CSS when editing but minify on the frontend
-* Bug Fix: Sharing: Keep "more" pane open so Google+ Button isn't obscured
-* Bug Fix: Carousel: Make sure the original size is used, even when it is exceedingly large.
-* Bug Fix: Exclude iPad from Twitter on iPhone mobile browsing
-* Bug Fix: Sync: On .org user role changes synchronize the change to .com
-* Bug Fix: Contact Form: Fix a bug where some web hosts would reject mail from the contact form due to email address spoofing.
-
-= 1.8.3 =
-Release Date: October 23, 2012
-
-* Bug Fix: Subscriptions: Fix a bug where subscriptions were not being sent from the blog.
-* Bug Fix: Twitter: Fix a bug where the Twitter username was being saved as blank.
-* Bug Fix: Fix a bug where Contact Form notification emails were not being sent.
-
-= 1.8.2 =
-Release Date: October 4, 2012
-
-* Bug Fix: Subscriptions: Fix a bug where subscriptions were not sent for posts and comments written by some authors.
-* Bug Fix: Widgets: Fix CSS that was uglifying some themes (like P2).
-* Bug Fix: Widgets: Improve Top Posts and Pages styling.
-* Bug Fix: Custom CSS: Make the default "Welcome" message translatable.
-* Bug Fix: Fix Lithuanian translation.
-
-= 1.8.1 =
-Release Date: September 28, 2012
-
-* Bug Fix: Stats: Fixed a bug preventing some users from viewing stats.
-* Bug Fix: Mobile Theme: Fixed some disabled toolbar buttons.
-* Bug Fix: Top Posts widget: Fixed a bug preventing the usage of the Top Posts widget.
-* Bug Fix: Mobile Theme: Fixed a bug that broke some sites when the Subscriptions module was not enabled and the Mobile Theme module was enabled.
-* Bug Fix: Mobile Theme: Made mobile app promos in the Mobile Theme footer opt-in.
-* Bug Fix: Twitter Widget: A fix to prevent malware warnings.
-* Bug Fix: Mobile Theme: Fixed a bug that caused errors for some users with custom header images.
-
-= 1.8 =
-Release Date: September 27, 2012
-Release Post: http://jetpack.me/2012/09/27/jetpack-1-8-mobile-theme/
-
-* Enhancement: Mobile Theme: Automatically serve a slimmed down version of your site to users on mobile devices.
-* Enhancement: Multiuser: Allow multiple users to link their accounts to WordPress.com accounts.
-* Enhancement: Custom CSS: Added support for object-fit, object-position, transition, and filter properties.
-* Enhancement: Twitter Widget: Added Follow button
-* Enhancement: Widgets: Added Top Posts and Pages widget
-* Enhancement: Mobile Push Notifications: Added support for mobile push notifications on new comments.
-* Enhancement: VideoPress: Shortcodes now support the HD option, for default HD playback.
-* Bug Fix: Twitter Widget: Fixed tweet permalinks in the Twitter widget
-* Bug Fix: Custom CSS: @import rules and external images are no longer stripped out of custom CSS
-* Bug Fix: Custom CSS: Fixed warnings and notices displayed in debug mode
-* Bug Fix: Sharing: Fixed double-encoding of image URLs
-* Bug Fix: Sharing: Fix Google +1 button HTML validation issues (again :))
-* Bug Fix: Gravatar Profile Widget: Reduce size of header margins
-
-= 1.7 =
-Release Date: August 23, 2012
-Release Post: http://jetpack.me/2012/08/23/jetpack-1-7-custom-css/
-
-* Enhancement: CSS Editor: Customize your site's design without modifying your theme.
-* Enhancement: Comments: Submit the comment within the iframe. No more full page load to jetpack.wordpress.com.
-* Enhancement: Sharing: Share counts for Twitter, Facebook, LinkedIn
-* Enhancement: Sharing: Improve styling
-* Enhancement: Sharing: Add support for ReCaptcha
-* Enhancement: Sharing: Better extensability through filters
-* Enhancement: Widgets: Twitter: Attempt to reduce errors by storing a long lasting copy of the data. Thanks, kareldonk :)
-* Regression Fix: Sharing: Properly store and display the sharing label option's default value.
-* Bug Fix: Contact Form: remove worse-than-useless nonce.
-* Bug Fix: Subscriptions: remove worse-than-useless nonce.
-* Bug Fix: Sharing: Don't show sharing buttons twice on attachment pages.
-* Bug Fix: Sharing: Increase width of Spanish Like button for Facebook.
-* Bug Fix: Sharing: Use the correct URL to the throbber.
-* Bug Fix: Stats: Fix notice about undefined variable $alt
-* Bug Fix: Subscriptions: Make Subscriptions module obey the settings of the Settngs -> Discussion checkboxes for Follow Blog/Comments
-* Bug Fix: Shortcodes: VideoPress: Compatibility with the latest version of VideoPress
-* Bug Fix: Shortcodes: Audio: Include JS File for HTML5 audio player
-* Bug Fix: Hovercards: Improve cache handling.
-* Bug Fix: Widgets: Gravatar Profle: Correctly display service icons in edge cases.
-* Bug Fix: Widgets: Gravatar Profle: Prevent ugly "flash" of too-large image when page first loads on some sites
-* Bug Fix: Carousel: CSS Compatibility with more themes.
-
-= 1.6.1 =
-Release Date: August 4, 2012
-
-* Bug Fix: Prevent Fatal error under certain conditions in sharing module
-* Bug Fix: Add cachebuster to sharing.css
-* Bug Fix: Disable via for Twitter until more robust code is in place
-
-= 1.6 =
-Release Date: August 2, 2012
-Release Post: http://jetpack.me/2012/08/02/jetpack-1-6-retina-and-pinterest/
-
-* Enhancement: Carousel: Better image resolution selection based on available width/height.
-* Enhancement: Carousel: Load image caption, metadata, comments, et alii when a slide is clicked to switch to instead of waiting.
-* Enhancement: Carousel: Added a "Comment" button and handling to scroll to and focus on comment textarea.
-* Enhancement: Widgets: Facebook Likebox now supports a height parameter and a better width parameter.
-* Enhancement: Widgets: Better feedback when widgets are not set up properly.
-* Enhancement: Shortcodes: Google Maps shortcode now supports percentages in the width.
-* Enhancement: Shortcodes: Update Polldaddy shortcode for more efficient Javascript libraries.
-* Enhancement: Shortcodes: Youtube shortcode now has playlist support.
-* Enhancement: Add Gravatar Profile widget.
-* Enhancement: Update Sharedaddy to latest version, including Pinterest support.
-* Enhancement: Retinize Jetpack and much of WordPress.
-* Bug Fix: Shortcodes: Fix Audio shortcode color parameter and rename encoding function.
-* Bug Fix: Shortcodes: Don't output HTML 5 version of the Audio shortcode because of a bug with Google Reader.
-* Bug Fix: Jetpack Comments: Don't overlead the addComments object if it doesn't exist. Fixes spacing issue with comment form.
-* Bug Fix: Contact Form: If send_to_editor() exists, use it. Fixes an IE9 text area issue.
-
-= 1.5 =
-Release Date: July 31, 2012
-
-* Enhancement: Add Gallery Carousel feature
-* Note: the Carousel module bundles http://fgnass.github.com/spin.js/ (MIT license)
-
-= 1.4.2 =
-Release Date: June 20, 2012
-
-* Bug Fix: Jetpack Comments: Add alternative Javascript event listener for Internet 8 users.
-* Enhancement: Remove more PHP 4 backwards-compatible code (WordPress andJetpack only support PHP 5).
-* Enhancement: Remove more WordPress 3.1 and under backwards-compatible code.
-
-= 1.4.1 =
-Release Date: June 15, 2012
-
-* Bug Fix: Jetpack Comments / Subscriptions: Add checkboxes and logic control for the Subscription checkboxes.
-
-= 1.4 =
-Release Date: June 14, 2012
-
-* Enhancement: Add Jetpack Comments feature.
-* Bug Fix: Sharing: Make the sharing_label translatable.
-* Bug Fix: Sharing: Fixed the file type on the LinkedIn graphic.
-* Bug Fix: Sharing: Fixes for the Faceboox Like button language locales.
-* Bug Fix: Sharing: Updates for the "more" button when used with touch screen devices.
-* Bug Fix: Sharing: Properly scope the More button so that multiple More buttons on a page behave properly.
-* Bug Fix: Shortcodes: Update the YouTube and Audio shortcodes to better handle spaces in the URLs.
-* Bug Fix: Shortcodes: Make the YouTube shortcode respect embed settings in Settings -> Media when appropriate.
-* Bug Fix: Shortcodes: Removed the Slide.com shortcode; Slide.com no longer exists.
-* Bug Fix: Shortcodes: Match both http and https links in the [googlemaps] shortcode.
-* Bug Fix: After the Deadline: Code clean up and removal of inconsistencies.
-
-= 1.3.4 =
-Release Date: May 24, 2012
-
-* Bug Fix: Revert changes to the top level menu that are causing problems.
-
-= 1.3.3 =
-Release Date: May 22, 2012
-
-* Bug Fix: Fix notices caused by last update
-
-= 1.3.2 =
-Release Date: May 22, 2012
-
-* Bug Fix: Fix Jetpack menu so that Akismet and VaultPress submenus show up.
-
-= 1.3.1 =
-Release Date: May 22, 2012
-
-* Enhancement: Add a new widget, the Facebook Likebox
-* Bug Fix: Sharing: Sharing buttons can now be used on custom post types.
-* Bug Fix: Contact Forms: Make Contact Forms widget shortcode less aggressive about the shortcodes it converts.
-* Bug Fix: Ensure contact forms are parsed correctly in text widgets.
-* Bug Fix: Connection notices now only appear on the Dashboard and plugin page.
-* Bug Fix: Connection notices are now dismissable if Jetpack is not network activated.
-* Bug Fix: Subscriptions: Fix an issue that was causing errors with new BuddyPress forum posts.
-
-= 1.3 =
-Release Date: April 25, 2012
-Release Post: http://jetpack.me/2012/04/24/jetpack-1-3-released-contact-forms/
-
-* Enhancement: Add Contact Forms feature. Formerly Grunion Contact Forms.
-* Bug Fix: Tweak YouTube autoembedder to catch more YouTube URLs.
-* Bug Fix: Correctly load the Sharing CSS files.
-
-= 1.2.4 =
-Release Date: April 6, 2012
-
-* Bug Fix: Fix rare bug with static front pages
-
-= 1.2.3 =
-Release Date: April 5, 2012
-
-* Enhancement: Twitter Widget: Expand t.co URLs
-* Bug Fix: Various PHP Notices.
-* Bug Fix: WordPress Deprecated `add_contextual_help()` notices
-* Bug Fix: Don't display unimportant DB errors when processing Jetpack nonces
-* Bug Fix: Correctly sync data during certain MultiSite cases.
-* Bug Fix: Stats: Allow sparkline img to load even when there is a DB upgrade.
-* Bug Fix: Stats: Replace "loading title" with post title regardless of type and status.
-* Bug Fix: Stats: Avoid edge case infinite redirect for `show_on_front=page` sites where the `home_url()` conatins uppercase letters.
-* Bug Fix: Subscriptions: Don't send subscriptions if the feature is turned off in Jetpack.
-* Bug Fix: Subscriptions: Fix pagination of subscribers.
-* Bug Fix: Subscriptions: Sync data about categories/tags as well to improve subscription emails.
-* Bug Fix: Subscriptions: Better styling for the subscription success message.
-* Bug Fix: Shortcodes: Support for multiple Google Maps in one post. Support for all Google Maps URLs.
-* Bug Fix: Shortcodes: Improved support for youtu.be URLs
-* Bug Fix: Shortcodes: Improved Vimeo embeds.
-* Bug Fix: Sharing: Switch to the 20px version of Google's +1 button for consistency.
-* Bug Fix: Sharing: Fix Google +1 button HTML validation issues.
-* Bug Fix: Sharing: Disable sharing buttons during preview.
-* Bug Fix: Spelling and Grammar: Properly handle proofreading settings.
-* Bug Fix: Spelling and Grammar: Don't prevent post save when proofreading service is unavailable.
-
-= 1.2.2 =
-Release Date: December 6, 2011
-
-* Bug Fix: Ensure expected modules get reactivated correctly during upgrade.
-* Bug Fix: Don't send subscription request during spam comment submission.
-* Bug Fix: Increased theme compatibility for subscriptions.
-* Bug Fix: Remove reference to unused background image.
-
-= 1.2.1 =
-Release Date: November 18, 2011
-
-* Bug Fix: Ensure Site Stats menu item is accessible.
-* Bug Fix: Fixed errors displayed during some upgrades.
-* Bug Fix: Fix inaccurate new modules "bubble" in menu for some upgrades.
-* Bug Fix: Fix VaultPress detection.
-* Bug Fix: Fix link to http://jetpack.me/faq/
-
-= 1.2 =
-Release Date: November 17, 2011
-Release Post: http://jetpack.me/2011/11/17/announcing-jetpack-1-2/
-
-* Enhancement: Add Subscriptions: Subscribe to site's posts and posts' comments.
-* Enhancement: Add Google Maps shortcode.
-* Enhancement: Add Image Widget.
-* Enhancement: Add RSS Links Widget.
-* Enhancement: Stats: More responsive stats dashboard.
-* Enhancement: Shortcodes: Google Maps, VideoPress
-* Enhancement: Sharing: Google+, LinkedIn
-* Enhancement: Enhanced Distribution: Added Jetpack blogs to http://en.wordpress.com/firehose/
-* Bug Fix: Spelling and Grammar: WordPress 3.3 compatibility.
-* Bug Fix: Translatable module names/descriptinos.
-* Bug Fix: Correctly detect host's ability to make outgoing HTTPS requests.
-
-= 1.1.3 =
-Release Date: July 19, 2011
-
-* Bug Fix: Increase compatibility with WordPress 3.2's new `wp_remote_request()` API.
-* Bug Fix: Increase compatibility with Admin Bar.
-* Bug Fix: Stats: Improved performance when creating new posts.
-* Bug Fix: Twitter Widget: Fix PHP Notice.
-* Bug Fix: Sharedaddy: Fix PHP Warning.
-* Enhancement: AtD: Add spellcheck button to Distraction Free Writing screen.
-* Translations: Added: Bosnian, Danish, German, Finnish, Galician, Croatian, Indonesian, Macedonian, Norwegian (Bokmål), Russian, Slovak, Serbian, Swedish
-* Translations: Updated: Spanish, French, Italian, Japanese, Brazilian Portuguese, Portuguese
-
-= 1.1.2 =
-Release Date: July 6, 2011
-
-* Bug Fix: Note, store, and keep fresh the time difference between the Jetpack site's host and the Jetpack servers at WordPress.com. Should fix all "timestamp is too old" errors.
-* Bug Fix: Improve experience on hosts capable of making outgoing HTTPS requests but incapable of verifying SSL certificates. Fixes some "register_http_request_failed", "error setting certificate verify locations", and "error:14090086:lib(20):func(144):reason(134)" errors.
-* Bug Fix: Better fallback when WordPress.com is experiencing problems.
-* Bug Fix: It's Jetpack, not JetPack :)
-* Bug Fix: Remove PHP Warnings/Notices.
-* Bug Fix: AtD: JS based XSS bug. Props markjaquith.
-* Bug Fix: AtD: Prevent stored configuration options from becoming corrupted.
-* Bug Fix: Stats: Prevent missing old stats for some blogs.
-* Bug Fix: Twitter Widget: Fix formatting of dates/times in PHP4.
-* Bug Fix: Twitter Widget: Cache the response from Twitter to prevent "Twitter did not respond. Please wait a few minutes and refresh this page." errors.
-* Enhancement: Slightly improved RTL experience. Jetpack 1.2 should include a much better fix.
-* Enhancement: Sharedaddy: Improve localization for Facebook Like button.
-* Enhancement: Gravatar Hovercards: Improved experience for Windows browsers.
-
-= 1.1.1 =
-Release Date: March 19, 2011
-* Bug Fix: Improve experience on hosts capable of making outgoing HTTPS requests but incapable of verifying SSL certificates. Fixes most "Your Jetpack has a glitch. Connecting this site with WordPress.com is not possible. This usually means your site is not publicly accessible (localhost)." errors.
-* Bug Fix: Sharedaddy: Fatal error under PHP4. Disable on PHP4 hosts.
-* Bug Fix: Stats: Fatal error under PHP4. Rewrite to be PHP4 compatible.
-* Bug Fix: Stats: Fatal error on some sites modifying/removing core WordPress user roles. Add sanity check.
-* Bug Fix: Stats: Replace debug output with error message in dashboard widget.
-* Bug Fix: Stats: Rework hook priorities so that stats views are always counted even if a plugin (such as Paginated Comments) bails early on template_redirect.
-* Bug Fix: Identify the module that connot be activated to fatal error during single module activation.
-* Bug Fix: `glob()` is not always available. Use `opendir()`, `readdir()`, `closedir()`.
-* Bug Fix: Send permalink options to Stats Server for improved per post permalink calculation.
-* Bug Fix: Do not hide Screen Options and Help links during Jetpack call to connect.
-* Bug Fix: Improve readablitiy of text.
-* Bug Fix: AtD: Correctly store/display options.
-* Enhancement: Output more informative error messages.
-* Enhancement: Improve CSS styling.
-* Enhancement: Stats: Query all post types and statuses when getting posts for stats reports.
-* Enhancement: Improve performance of LaTeX URLs be using cookieless CDN.
-
-= 1.1 =
-Release Date: March 9, 2011
-
-* Initial release
+=== Jetpack by WordPress.com ===
+Contributors: automattic, aduth, akirk, allendav, alternatekev, andy, apeatling, azaozz, batmoo, barry, beaulebens, blobaugh, cainm, cfinke, chellycat, christinepollock, csonnek, danielbachhuber, daniloercoli, designsimply, dllh, dsmart, dzver, ebinnion, enej, eoigal, ethitter, gcorne, georgestephanis, gibrown, hew, hugobaeta, HypertextRanch, iammattthomas, iandunn, jblz, jeherve, jenia, jkudish, jmdodd, Joen, johnjamesjacoby, jshreve, koke, kraftbj, lancewillett, martinremy, matt, matveb, mattwiebe, maverick3x6, mcsf, mdawaffe, michaeldcain, michael-arestad, migueluy, mikeyarce, mjangda, mkaz, nickmomrik, obenland, pento, professor44, ryancowles, richardmuscat, richardmtl, roccotripaldi, samhotchkiss, sdquirk, stephdau, tmoorewp, Viper007Bond, westi, yoavf, zinigor
+Tags: WordPress.com, jet pack, comments, contact, gallery, performance, sharing, security, shortcodes, stats, subscriptions, widgets
+Stable tag: 3.9.1
+Requires at least: 4.3
+Tested up to: 4.4
+
+Your WordPress, Simplified.
+
+== Description ==
+
+Jetpack simplifies managing WordPress sites by giving you visitor stats, security services, speeding up images, and helping you get more traffic. Jetpack is a free plugin.
+
+= Traffic Growth & Insights =
+Jetpack tells you how many visits your site gets and helps you **get more traffic** with tools like Related Posts, Publicize, Enhanced Distribution, and Sharing.
+
+= Security =
+Jetpack **protects your site** against brute force attacks and unauthorised logins. We also monitor your site for downtime and keep your plugins updated.
+
+= Image Performance =
+Jetpack automatically **optimizes and speeds up** images using the global WordPress.com content delivery network. This saves you hosting costs by reducing bandwidth.
+
+= Centralized Management =
+With Jetpack comes a **centralized dashboard** on WordPress.com. Manage plugins and menus, publish posts, and view enhanced site stats for all of your sites.
+
+= A few more things that our users love =
+Jetpack includes other features that help you customize your site including Custom CSS, Contact Forms, Galleries and Carousels, Notifications and Subscriptions, Configurable Widgets, and [many more](https://jetpack.me/features).
+
+= Dedicated Support =
+We have an entire team of happiness engineers ready to help you. Ask your questions in the support forum, or [contact us directly](https://jetpack.me/contact-support).
+
+= Contributing to Jetpack =
+
+Jetpack is open-source and we actively encourage community contributions: whether it's a compliment, bug report, code, or an idea we welcome it with open arms! [Learn about contributing](https://jetpack.me/contribute) or consider [joining our beta program](https://jetpack.me/beta).
+
+== Installation ==
+
+[Install Jetpack from our site](https://jetpack.me/install?from=wporg) by typing in your site address.
+
+Alternatively install Jetpack via the plugin directory, or by uploading the files manually to your server. After activating Jetpack, connect to WordPress.com to enable the Jetpack features.
+
+If you need additional help [read our detailed instructions (including a video walkthrough)](http://jetpack.me/support/installing-jetpack/).
+
+
+== Frequently Asked Questions ==
+
+= Is Jetpack free? =
+
+Yes! The core features of Jetpack are and always will be free. Jetpack also integrates with paid services like Akismet (anti-spam), VaultPress (backups), and VideoPress (video hosting) but these are not required for Jetpack to function.
+
+= Why do I need a WordPress.com account? =
+
+Many of our core features (like Photon, Stats, and Protect) make use of the WordPress.com cloud. For this to happen Jetpack requires a (free) WordPress.com account. If you don't have one already you can easily create one during Jetpack's connection process.
+
+= I already have a WordPress account, but it's not working. What's going on? =
+
+A WordPress.com account is different to the one you use to log into your self-hosted WordPress. If you can log into http://wordpress.com then you already have a WordPress.com account. If you can't, you can easily create one during Jetpack's connection process.
+
+= How do I view my stats? =
+
+Once you've installed Jetpack your stats will be available via "Site Stats" which appears in the Jetpack menu (under your Dashboard menu within WordPress).
+
+= How do I contribute to Jetpack? =
+
+There are opportunities for developers at all levels to contribute. [Learn more about contributing to Jetpack](https://jetpack.me/contribute) or consider [joining our beta program](https://jetpack.me/beta).
+
+
+== Screenshots ==
+
+1. Jetpack Dashboard.
+2. Site Stats.
+3. Plugin Bulk Management.
+4. Publicize.
+5. Related Posts.
+
+== Changelog ==
+
+= 3.9.1 =
+Release date: Jan 21st, 2016
+
+Bug Fixes:
+
+* General: Addresses a namespacing issue which was causing conflicts on some hosting providers.
+* Sitemaps: Added MSM-Sitemap to the list of plugins which, if installed, will prevent Jetpack Sitemaps from being used
+
+= 3.9 =
+Release date: Jan 20th, 2016
+
+Featured:
+
+* New sharing button: let users share your content using Skype.
+* New "Social Menu" theme tool that uses Genericons to display Social Links.
+* Sitemap support for better search engine indexing.
+
+Enhancements:
+
+* Contact Form: Added a new filter that allows you to change the "Required" text.
+* General: Hidden archived sites in multisite site list.
+* General: Removed several function calls that would be deprecated in WordPress 4.5.
+* Infinite Scroll: Added a new filter to check if Infinite Scroll has been triggered.
+* Likes: Added a conditional to ensure WordPress 4.5 compatibility.
+* Photon: Improved compatibility with responsive images feature added in WordPress 4.4.
+* Photon: Now enabled by default on sites using HTTPS.
+* REST API: Extended the ability to manage users from WordPress.com.
+* REST API: Increased the performance of the plugin update endpoint.
+* Responsive Videos: Centering videos when they are wrapped in a centered paragraph.
+* Sharing: Added a new filter to customize the default OpenGraph description.
+* Shortcodes: Added Wistia oEmbed support.
+* Shortcodes: Bandcamp: Added support for new attributes for tracks approved by artists.
+* Shortcodes: Improved Medium path format recognition.
+* Slideshow: Improved compatibility with older IE versions.
+* Staging: Improved staging environment detection.
+* Widgets: Added "width" option to the Facebook Page widget.
+* Widgets: Added size parameters to tags in Top Posts to avoid warnings.
+* Widgets: Introduced major performance and stability improvements to the Display Posts Widget.
+* Widgets: Refactored to remove deprecated code patterns.
+
+Bug Fixes:
+
+* AtD: Fixed replacing emojis with images in the text editor in Chrome.
+* AtD: Made pre tags be excluded from spell-checking.
+* CPT: Not registering Nova if it is already registered.
+* Carousel: Fixed a bug where full size images were not always served by Photon.
+* Carousel: Reverted a change that broke direct link to carousel image.
+* Contact Form: Fixed a CSV export bug with multiple choice questions.
+* Contact Form: Fixed notices when creating feedback entries without a contact form.
+* General: Fixed a scrolling bug on modal window closing.
+* Infinite Scroll: Disabled in the Customizer when previewing a non-active theme.
+* Publicize: Fixed notices appearing with bbPress or BuddyPress installed.
+* Publicize: Showing options only to users that can change them.
+* Related Posts: Fixed incorrect URLs generated for posts.
+* Responsive Videos: Fixed warnings in debug mode.
+* Shortcodes: Bandcamp: Fixed a problem with large track IDs.
+* Shortcodes: Fixed a problem with dynamic Gist embeds.
+* Stats: Fixed dashboard widget resize problem.
+* Widgets: Added a fallback to English US when a locale isn't supported by Facebook.
+* Widgets: Fixed layout for Twenty Sixteen.
+
+= 3.8.2 =
+Release date: Dec 17th, 2015
+Release post: http://wp.me/p1moTy-26v
+
+Jetpack 3.8.2 is here to squash a few annoying bugs.
+
+Bug Fixes:
+
+* Photon: Fixed a bug where some custom thumbnail image sizes weren't being sized properly.
+* Shortcodes: Fixed an incompatibility with how WordPress renders the YouTube shortcode.
+* Shortcodes: Tightened up security in the Wufoo shortcode.
+* Image Widget: Now shows the caption.
+* Fixed typos in inline docs.
+* Very minor fixes to: Carousel, Publicize, Google+, and Infinite Scroll.
+
+= 3.8.1 =
+Release date: Dec 1st, 2015
+Release post: http://wp.me/p1moTy-23V
+
+Jetpack 3.8.1 is here and is fully compatible with WordPress 4.4.
+
+Featured:
+
+* Photon + Responsive Images FTW.
+* Fully compatible with Twenty Sixteen.
+* More accessibility enhancements.
+* Dropped some weight by optimizing Jetpack's plugin images.
+
+Enhancements:
+
+* Comments: filter to allow disabling comments per post type.
+
+Bug Fixes:
+
+* Carousel: Stop page from scrolling to top when Carousel is closed.
+* Carousel: Browser compatibility fixes with older version of IE.
+* Markdown: Fixed a bug that would strip markdown when saving in "Quick Edit" mode.
+* Single Sign On: Fixed login always redirecting to the admin dashboard.
+* Subscriptions: Filter to allow per-post emails fixed for use in themes.
+
+= 3.8.0 =
+Release date: Nov 4th, 2015
+Release post: http://wp.me/p1moTy-1VN
+
+We're happy to introduce Jetpack 3.8, which has significant contributions from the Jetpack community. Read more about it here: http://wp.me/p1moTy-1VN
+
+Feature enhancements:
+
+* New Google+ Badge Widget. Display your profile, page, or community Google+ badge.
+* New twitch.tv shortcode embeds. Display a Twitch.tv stream in your posts.
+* Accessibility enhancements.
+* A handful of new filters to allow further customization of Jetpack.
+
+Other enhancements:
+
+* Carousel: Added support to retrieve image dimensions from an image url.
+* Carousel: Simpler algorithm to detect shutter speeds.
+* Contact Form: New "Checkbox with Multiple Items" field available in the Contact Form.
+* Contact Form: Allow pre-filling form fields with URL parameters.
+* Contact Form: Better styling of the emailed form responses.
+* Performance: Replaced some custom-built functions with core's native functions.
+* Related Posts: New filter to add post classes to post's container class.
+* Sharing: New filter to choose if sharing meta box should be shown.
+* Sharing: New filter to allow sharing button markup to be editable.
+* Sharing: New filter to allow you to specify a custom Facebook app ID.
+* Social Media Icons Widget: Added option for YouTube username as well as Channel ID.
+* Social Media Icons Widget: Added Google+ icon.
+* Social Media Icons Widget: New filter to allow you to add your own social media icons and links.
+* Subscriptions: Better errors to your visitors if their subscription sign-up fails.
+* Subscriptions: Removed "widget" class from Subs shortcode form.
+
+
+Bug fixes:
+
+* Carousel: Fixed browser back/forward button behavior.
+* Contact Form: Allow the email field to be set to empty when building form in post editor.
+* Facebook Likebox Widget: Fixed an issue where some languages were not translating.
+* Facebook Likebox Widget: Return a language when none found.
+* General: Fixed some minor styling issues in the Jetpack admin areas.
+* General: Add missing parameter to the_title filter call.
+* General: Prevent scrolling of body when the Jetpack admin modals are opened.
+* General: Update doc to reflect that Open Graph filter jetpack_enable_opengraph has been deprecated in favor of jetpack_enable_open_graph.
+* Infinite Scroll: Fixed an error that sometimes occurred that would stop posts from loading.
+* JSON API: Fixed some undefined notices when publishing a post with the API.
+* Open Graph: Fixed bug where facebook description content was sometimes being polluted by a filter.
+* Sharing: Use full SSL Pinterest url instead of protocol relative.
+* Sharing: Fixed plus signs appearing in tweets shared from iOS.
+* Shortcodes: Prefer HTTPS for video embeds to avoid mixed content warnings.
+* Subscriptions Widget: Fix HTML Validation error.
+* Theme Tools: Check oEmbeds for the presence of a video before adding the responsive videos filter.
+* Tiled Galleries: Add image alt attribute if there is a title set. This was breaking some screen reader functionality.
+
+= 3.7.2 =
+Release date: September 29th, 2015
+
+* Bug Fix: REST API: Fixed an error when saving drafts and publishing posts
+
+= 3.7.1 =
+Release date: September 28th, 2015
+
+* Enhancement: General: Added inline documentation for various filters and functions
+* Enhancement: General: Added custom capabilities for module management on multi-site installs
+* Enhancement: General: Cleaned up old changelog entries from readme
+* Enhancement: General: Cleaned up unused i18n textdomains
+* Enhancement: General: Updated the new settings page to look better in various translations
+* Enhancement: REST API: Added new endpoints to manage users
+* Enhancement: Sharing: Updated the Google logo
+* Bug Fix: Carousel: Page scroll no longer disappears after closing the carousel
+* Bug Fix: Contact Form: Fields are sent and displayed in the correct order
+* Bug Fix: Contact Form: No longer showing a notice on AJAX actions in feedback lists
+* Bug Fix: Contact Form: Made using more than two notification emails possible
+* Bug Fix: Contact Form: Mitigate a potential stored XSS vulnerability. Thanks to Marc-Alexandre Montpas (Sucuri)
+* Bug Fix: General: Mitigate a potential information disclosure. Thanks to Jaime Delgado Horna
+* Bug Fix: General: Fixed a locale error in the notifications popout
+* Bug Fix: General: Fixed a possible fatal error in the client area
+* Bug Fix: General: Fixed compatibility issues with certain use cases
+* Bug Fix: General: Disabled connection warnings for multisites with domain mapping
+* Bug Fix: General: Updated translations for correct link display in admin notices
+* Bug Fix: REST API: Fixed a fatal error in one of the endpoints
+* Bug Fix: Sharing: Fixed OpenGraph tags for Instagram embeds
+* Bug Fix: Sharing: Fixed compatibility issues with bbPress
+* Bug Fix: Widget Visibility: Fixed a fatal error in case of a missing tag
+
+= 3.7.0 =
+Release date: September 9th, 2015
+
+Feature Enhancements:
+
+* New admin page interface to easily configure Jetpack
+* Added staging site support for testing a connected Jetpack site
+
+Additional changes:
+
+* Enhancement: CLI: Added a possibility to change all options with confirmation for some of them
+* Enhancement: Gallery: Added filters to allow new gallery types to be declared
+* Enhancement: General: Added inline documentation for actions, filters, etc.
+* Enhancement: General: Changed class variable declarations keyword from var to public
+* Enhancement: General: Made the Settings page module toggle buttons more accessible
+* Enhancement: General: The admin bar now loads new notifications popout
+* Enhancement: General: Renamed some modules to avoid redundant prefixes
+* Enhancement: General: Switched to the WordPress Core's spinner image
+* Enhancement: General: Updated the bot list
+* Enhancement: Manage: Added the ability to activate a network-wide plugin on a single site from WordPress.com
+* Enhancement: Photon: Added a way to check image URLs against custom domains
+* Enhancement: Photon: Added prompts on the media upload page telling the user about Photon
+* Enhancement: Publicize: Added width and height values to OpenGraph tags for default images
+* Enhancement: Related Posts: Added a filter to allow disabling nofollow
+* Enhancement: REST API: Added new API endpoints to extend API functionality
+* Enhancement: REST API: Added new fields to existing API endpoints
+* Enhancement: Sharing: Added a possibility to opt-out of sharing for a single post
+* Enhancement: Sharing: Added bbPress support
+* Enhancement: Sharing: Added more configuration to the Likes modal
+* Enhancement: Sharing: Made the reddit button open a new tab
+* Enhancement: Sharing: Removed unused files
+* Enhancement: Shortcodes: Added auto embed option inside comments
+* Enhancement: Shortcodes: Added autohide parameter to the YouTube shortcode
+* Enhancement: Subscriptions: added an action that triggers at the end of the subscription process
+* Enhancement: VideoPress: Videos are now embedded using a new player
+* Enhancement: Widget Visibility: Added parent page logic
+* Enhancement: Widget Visibility: Added support for split terms
+* Enhancement: Widgets: Added actions to the Social Media widget
+* Enhancement: Widgets: Switched the Display Posts widget to the new API version
+* Bug Fix: General: Fixed scrolling to top after modal window closing
+* Bug Fix: Infinite Scroll: Added a check for cases when output buffering is disabled
+* Bug Fix: Infinite Scroll: Added translation to the copyright message
+* Bug Fix: Manage: Fixed automatic update synchronization on WordPress multisite network admin
+* Bug Fix: Manage: Redirects back to WordPress.com are allowed from the customizer view
+* Bug Fix: Media: Fixed duplicate images bug in the Media Extractor
+* Bug Fix: Publicize: Made it possible to remove previously set message
+* Bug Fix: Sharing: Added a thumbnail image to OpenGraph tags on pages with DailyMotion embeds
+* Bug Fix: Sharing: Fixed Twitter Cards tags escaping
+* Bug Fix: Sharing: Made OpenGraph tags for title and description use proper punctuation
+* Bug Fix: Sharing: Made sure Likes can be disabled on the front page
+* Bug Fix: Shortcodes: Fixed Facebook embeds by placing the script in the footer
+* Bug Fix: Shortcodes: Fixed PollDaddy shortcode issues over SSL connections
+* Bug Fix: Shortcodes: Made responsive video wrappers only wrap video embeds
+* Bug Fix: Shortcodes: Made SoundCloud accept percents for dimensions
+* Bug Fix: Social Links: Fixed a possible conflict with another class
+* Bug Fix: Stats: Made sure the Stats URL is always escaped properly
diff --git a/plugins/jetpack/require-lib.php b/plugins/jetpack/require-lib.php
index 7bd9131e..5853754d 100644
--- a/plugins/jetpack/require-lib.php
+++ b/plugins/jetpack/require-lib.php
@@ -12,6 +12,14 @@ function jetpack_require_lib( $slug ) {
}
$lib_dir = WP_CONTENT_DIR . '/lib';
+
+ /**
+ * Filter the location of the library directory.
+ *
+ * @since 2.5.0
+ *
+ * @param str $lib_dir Path to the library directory.
+ */
$lib_dir = apply_filters( 'jetpack_require_lib_dir', $lib_dir );
$choices = array(
"$lib_dir/$slug.php",
diff --git a/plugins/jetpack/scss/atoms/colors/_colors.scss b/plugins/jetpack/scss/atoms/colors/_colors.scss
index faeef5f1..63b869f8 100644
--- a/plugins/jetpack/scss/atoms/colors/_colors.scss
+++ b/plugins/jetpack/scss/atoms/colors/_colors.scss
@@ -4,6 +4,13 @@
$green: #81a844;
$white: #fff;
-$clouds: #f9f9f9;
-$lightblue: #2ea2cc;
$red: #d94f4f;
+
+// Blues
+$lightblue: #2ea2cc;
+$wpcom: #0087be;
+$blue-dark: #005082;
+
+// Grays
+$clouds: #f9f9f9;
+$gray-med: #686f72;
diff --git a/plugins/jetpack/scss/atoms/icons/_jetpack.scss b/plugins/jetpack/scss/atoms/icons/_jetpack.scss
index b9a39c0c..5c65d47a 100644
--- a/plugins/jetpack/scss/atoms/icons/_jetpack.scss
+++ b/plugins/jetpack/scss/atoms/icons/_jetpack.scss
@@ -20,4 +20,4 @@
}
}
-// .jetpack-icon-20:before { content: "\f102"; } \ No newline at end of file
+// .jetpack-icon-20:before { content: "\f102"; }
diff --git a/plugins/jetpack/scss/jetpack-admin-jitm.scss b/plugins/jetpack/scss/jetpack-admin-jitm.scss
new file mode 100644
index 00000000..f2cce6c5
--- /dev/null
+++ b/plugins/jetpack/scss/jetpack-admin-jitm.scss
@@ -0,0 +1,170 @@
+// Just in Time Messaging - message prompts
+
+.jp-jitm {
+ border-radius: 2px;
+ max-width: 100%;
+ margin: 2em auto 1em auto;
+ padding: .85em;
+ background: #fcfcfc;
+ border: 1px solid #dedede;
+ text-align: center;
+
+ // clear hack
+ &:before, &:after {
+ content: "";
+ display: table;
+ }
+ &:after {
+ clear: both;
+ }
+
+ #screen-meta-links + & {
+ margin: 3em 1.5385em 0 auto;
+ }
+
+ .activate {
+ margin-top: .5em;
+ }
+ .jp-emblem {
+ width: 25px;
+ height: 25px; // for ie svg
+ margin: .40em 1em 0 auto;
+ }
+
+ svg {
+ width: 100%;
+ height: 100%;
+ }
+
+ path {
+ fill: #8cc258;
+ }
+
+ .dismiss {
+ margin: 0;
+ text-decoration: none;
+ float: right;
+ &:before {
+ color: #666;
+ font: 400 15px/1 dashicons;
+ content: '\f158';
+ }
+ }
+
+ p {
+ font-size: 1em;
+ line-height: 165%;
+ }
+
+ .j-spinner {
+ margin: 8px 0 0;
+ height: 17px;
+ width: 17px;
+ }
+
+ .hide {
+ display: none;
+ }
+
+ form[name=post] > &:first-of-type {
+ margin-top: 1em;
+ }
+
+ @media (min-width: 800px) {
+ .jp-emblem, p {
+ float: left;
+ /* margin: .5em 1em 0 .5em;
+ padding-top: 4px; */
+ }
+ .jp-emblem {
+ width: 20px;
+ height: 20px; // for ie svg
+ margin-right: .5em;
+ }
+ p {
+ margin: .40em 1em 0 0;
+ }
+ p + p {
+ margin: 0;
+ padding: 0;
+ }
+ .activate {
+ margin-top: 0;
+ }
+ } // > 1100px
+
+ @media (max-width: 1100px) {
+ margin: 2.5em .75em .5em .5em;
+
+ form[name=post] > &:first-of-type {
+ margin-left: auto;
+ margin-right: auto;
+ }
+ }
+
+ @media (max-width: 800px) {
+ .jp-emblem {
+ margin: .40em auto 0 auto;
+ }
+ }
+
+} // .jp-jitm
+
+// update core page
+.update-core-php .jp-jitm {
+ @media (min-width: 1100px) { margin: 3em 2em 0 auto; }
+}
+
+// when jetpack is connected, we need to move up the upload prompt content so the photo JITM can fit properly.
+.jetpack-connected .media-modal-content .uploader-inline-content {
+ top: 20%;
+}
+
+.media-menu {
+
+ @media only screen and (min-width: 800px) {
+
+ .jp-jitm {
+ margin: 10px 0;
+ padding: 5px 5px 15px;
+ border-width: 1px 0;
+
+ .jp-emblem {
+ margin: 20px 10px 0 15px;
+ }
+
+ .msg {
+ width: 75%;
+ text-align: left;
+ margin: 0 0 10px;
+ }
+
+ .msg + p {
+ text-align: center;
+ width: 100%;
+ }
+ }
+ }
+
+
+ @media only screen and (max-width: 900px) {
+
+ .jp-jitm {
+ display: none;
+ margin: .5em 3%;
+ border-width: 1px;
+
+ .msg {
+ margin-top: 20px;
+ width: 88%;
+ margin-left: auto;
+ margin-right: auto;
+ }
+ }
+
+ &.visible .jp-jitm {
+ display: block;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/plugins/jetpack/scss/jetpack-admin.scss b/plugins/jetpack/scss/jetpack-admin.scss
index 0c6fe3b0..6541a9ea 100644
--- a/plugins/jetpack/scss/jetpack-admin.scss
+++ b/plugins/jetpack/scss/jetpack-admin.scss
@@ -11,5 +11,7 @@
"templates/main", // Main template
"templates/settings", // Settings page
"pages/protect", // Protect config page
- "templates/module-overhaul", // Module redux styles
- "_utilities/clearings"; \ No newline at end of file
+ "pages/connection", // Connection page
+ "pages/manage", // Actiavte and confirm manage
+ "templates/nux-landing-2015", // 2015 NUX Landing
+ "_utilities/clearings";
diff --git a/plugins/jetpack/scss/organisms/_banners.scss b/plugins/jetpack/scss/organisms/_banners.scss
index 3c6c09f7..38e29036 100644
--- a/plugins/jetpack/scss/organisms/_banners.scss
+++ b/plugins/jetpack/scss/organisms/_banners.scss
@@ -1,3 +1,80 @@
+#message.jp-identity-crisis {
+ display: table;
+ padding: 0;
+ background: #d94f4f;
+ border: none;
+ color: #fff;
+
+ .service-mark {
+ display: table-cell;
+ vertical-align: middle;
+ padding: 0 20px;
+ &:before {
+ font-family: "jetpack" !important;
+ content: "\f102";
+ font-size: 40px;
+ line-height: 1;
+ color: #fff;
+ }
+ }
+ .jp-id-banner__content {
+ display: table;
+ padding: 10px 10px 10px 0;
+
+ .success-notice {
+ color: #fff;
+ }
+
+ .banner-content {
+ display: table-row;
+
+ p {
+ margin: 0;
+ font-size: 13px;
+ color: #fff;
+ opacity: 1.0;
+
+ strong {
+ text-decoration: none;
+ font-weight: 600;
+ color: #fff;
+ opacity: 1.0;
+ }
+ }
+
+ a {
+ display: inline-block;
+ color: rgba(255, 255, 255, 0.80);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ -webkit-transform: all 1s ease;
+ }
+ }
+ .jp-btn-group {
+ display: table-row;
+
+ a {
+ display: inline-block;
+ margin: 10px 0 0 0;
+ padding: 0 0 1px 0;
+ color: rgba(255, 255, 255, 0.80);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ -webkit-transform: all 1s ease;
+
+ &:hover {
+ color: rgba(255, 255, 255, 1.0);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.80);
+ }
+ }
+
+ .idc-separator {
+ margin: 0 6px;
+ }
+ }
+ }
+}
+
#message.jp-banner {
position: relative;
margin-bottom: 26px;
@@ -26,7 +103,7 @@
a {
color: #fff;
}
- h4 {
+ h2 {
display: block;
margin: 0;
padding: 0;
@@ -49,11 +126,7 @@
color: #dfffcc;
padding: 0 0 0 20px;
box-sizing: border-box;
- width: 75%;
-
- &.is-connection {
- width: 50%;
- }
+ width: 50%;
@media ( max-width: 768px ) {
width: 100%;
@@ -64,16 +137,19 @@
}
a {
- // Medium text underline hack
+ text-decoration: underline;
+ /* Medium.com text underline hack - doesn't work well on small mobile devices... reverting to traditional underline
background-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #fff 50%);
background-repeat: repeat-x;
background-size: 2px 2px;
- background-position: 0 1.2em;
+ background-position: 0 95%;
+ display: inline-block;
@media not all, only screen and (min-resolution: 2dppx), only screen and (-webkit-min-device-pixel-ratio: 2) {
background-image: linear-gradient(to bottom, rgba(0,0,0,0) 75%, #fff 75%);
background-repeat: repeat-x;
}
+ */
}
p {
margin: 0;
@@ -87,7 +163,7 @@
top: 0;
right: 0;
padding-left: 20px;
- width: 25%;
+ width: 50%;
height: 100%;
box-sizing: border-box;
@@ -103,7 +179,6 @@
height: auto;
}
&.is-connection {
- width: 50%;
@media ( max-width: 768px ) {
width: 100%;
@@ -111,6 +186,24 @@
}
}
+// 'activate now' banner displayed on dashboard
+#message {
+ &.is-opt-in {
+ .jp-banner__content {
+ width: 60%;
+ }
+ .jp-banner__action-container {
+ width: 40%;
+ }
+
+ @media ( max-width: 768px ) {
+ .jp-banner__content, .jp-banner__action-container {
+ width: 100%;
+ }
+ }
+ }
+}
+
#message .jp-banner__button {
display: inline-block;
position: absolute;
@@ -127,7 +220,7 @@
font: 400 1.5em/1 'Open Sans', Helvetica, sans-serif;
transition: all .1s ease-in-out;
- @media ( max-width: 1080px ){
+ @media ( max-width: 1175px ){
font-size: 1.25em;
right: 110px;
}
@@ -219,3 +312,39 @@
outline: none;
}
}
+
+// temporary styles for protect module error. banners to be rebuilt soon. - Jeff Golenski
+
+#message.jp-banner.protect-error {
+ background: #fff;
+ border-left: 4px #d94f4f solid;
+
+ .jp-banner__content {
+ color: #444;
+ h2, a {
+ color: #d94f4f;
+ }
+ a:hover {
+ color: darken(#d94f4f, 5%);
+ }
+ }
+
+ .jp-banner__button {
+ background: #d94f4f;
+ box-shadow: none;
+ color: #fff;
+
+ &:hover,
+ &:focus,
+ &:active {
+ box-shadow: none;
+ }
+ &:hover {
+ background: darken(#d94f4f, 5%);
+ }
+ }
+
+ .jp-banner__dismiss:before {
+ color: #a0a5aa;
+ }
+}
diff --git a/plugins/jetpack/scss/pages/_connection.scss b/plugins/jetpack/scss/pages/_connection.scss
new file mode 100644
index 00000000..75c0da53
--- /dev/null
+++ b/plugins/jetpack/scss/pages/_connection.scss
@@ -0,0 +1,160 @@
+// ==========================================================================
+// Jetpack Connection Page (My Jetpack)
+//===========================================================================
+
+.my-jetpack-actions {
+ margin: 0 0 40px 0;
+
+ .j-col {
+ padding: 0;
+ text-align: center;
+ }
+
+ #user-list {
+ height: 30px;
+ margin-top: -1px;
+ margin-left: -3px;
+ }
+}
+
+#jetpack-disconnect-content {
+ display: none;
+ text-align: center;
+ .cancel-disconnect {
+ display: block;
+ margin-top: 10px;
+ }
+}
+
+.connection-details {
+ border: 1px #ddd solid;
+
+ &.local-user {
+ margin-bottom: 10px;
+ }
+
+ .user-01,
+ .wpuser-02,
+ .action-btns {
+ padding: 10px;
+
+ .button, select {
+ margin-top: 5px;
+ }
+ }
+
+ .wpuser-02 {
+ margin-top: 10px;
+ }
+
+ h3 {
+ padding: 10px;
+ margin: 0;
+ background: #eee;
+ border-bottom: 1px #ddd solid;
+ font-size: 14px;
+ }
+} // .connection-details
+
+.jp-user {
+ img {
+ margin-right: 10px;
+ border-radius: 50%;
+ }
+}
+
+.jp-user,
+.wp-user,
+.wp-action {
+ div {
+ display: inline-block;
+ width: 100%;
+ }
+}
+
+.j-col.jp-user,
+.j-col.wp-user,
+.j-col.wp-action {
+ padding: 0;
+}
+
+.my-jetpack-actions select {
+ max-width: 150px;
+}
+
+.j-actions .button:nth-child(3) {
+ margin-right: 5px;
+}
+
+.j-row.disconnect {
+ text-align: center;
+ .button {
+ margin: 0 auto;
+ }
+}
+
+a.what-is-primary {
+ color: #b4b9be;
+ margin-left: 4px;
+}
+
+@include breakpoint(tablet){
+ .wp-action {
+ border-top: 1px #ddd solid;
+ h3 {
+ display: none;
+ }
+ }
+};
+
+@media screen and (max-width: 500px) {
+
+ .connection-details {
+ font-size: 11px;
+
+ h3 {
+ font-size: 12px;
+ padding: 5px;
+ }
+
+ .user-01,
+ .wpuser-02 {
+ padding: 6px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 200px;
+ }
+
+ .action-btns {
+ text-align: center;
+ }
+ } // .connection-details
+}
+
+@include breakpoint(large-phone){
+ .connection-details .wpuser-02 {
+ margin-top: 0;
+ padding: 12px;
+ }
+};
+
+@media screen and (max-width: 450px) {
+
+ .j-actions .button {
+ width: 100%;
+ margin-bottom: 5px;
+ text-align: center;
+
+ &.alignright {
+ float: none;
+ }
+ }
+}
+
+@media screen and (max-width: 350px) {
+ .user-01,
+ .wpuser-02 {
+ max-width: 100px;
+ }
+} \ No newline at end of file
diff --git a/plugins/jetpack/scss/pages/_manage.scss b/plugins/jetpack/scss/pages/_manage.scss
new file mode 100644
index 00000000..0825429b
--- /dev/null
+++ b/plugins/jetpack/scss/pages/_manage.scss
@@ -0,0 +1,40 @@
+
+.manage__icon {
+ width: 155px;
+ height: 155px;
+ margin: 20px auto;
+}
+
+.manage-page {
+ .manage__description {
+ max-width: 600px;
+ text-align: center;
+ font-size: 22px;
+ color: #999;
+ margin: 20px auto;
+ }
+ .manage__button {
+ font-size:16px;
+ padding: 0 20px;
+ height:40px;
+ line-height:40px;
+ }
+}
+.manage__title .genericon {
+ font-size: 38px;
+ color: #81A944;
+}
+
+.manage__link {
+ font-size: 16px;
+ padding: 0 20px;
+ height: 40px;
+ line-height: 40px;
+ font-weight: normal;
+
+ .genericon{
+ font-size: 28px;
+ vertical-align: middle;
+ margin-top: -6px;
+ }
+}
diff --git a/plugins/jetpack/scss/templates/_id-crisis.scss b/plugins/jetpack/scss/templates/_id-crisis.scss
new file mode 100644
index 00000000..e34c802a
--- /dev/null
+++ b/plugins/jetpack/scss/templates/_id-crisis.scss
@@ -0,0 +1,9 @@
+// styles are inline for now - line 5073 - class.jetpack.php, move here.
+.jp-identity-crisis {
+ .jp-btn-group {
+ margin-top: 15px;
+ }
+ strong {
+ color: $green;
+ }
+} \ No newline at end of file
diff --git a/plugins/jetpack/scss/templates/_main.scss b/plugins/jetpack/scss/templates/_main.scss
index 0b934389..1c4801fb 100644
--- a/plugins/jetpack/scss/templates/_main.scss
+++ b/plugins/jetpack/scss/templates/_main.scss
@@ -31,9 +31,6 @@ ul#adminmenu a.toplevel_page_jetpack:after {
.folded #wpcontent {
margin-left: 36px;
}
-#wpfooter {
- display: none;
-}
.jp-content {
background: $clouds;
@@ -185,7 +182,7 @@ body {
}
}
.jetpack-modules + .jetpack-modules {
- margin-left:15px
+ margin-left: 15px;
}
}
@@ -288,15 +285,7 @@ body {
margin-bottom: 33px;
max-width: 600px;
}
-.flyby {
- position: relative;
- max-width: 1200px;
- margin: 0 auto;
- @include breakpoint(desktop){
- display: none;
- };
-}
.flyer {
position: absolute;
bottom: -200px;
@@ -770,6 +759,41 @@ body {
}
}
+ .button,
+ .button-primary {
+ margin-top: 15px;
+ }
+
+ @include breakpoint(large-phone) {
+ .configure, .activate {
+ display: block;
+ width: 100%;
+ text-align: center;
+ }
+ .button,
+ .button-primary {
+ width: 50%;
+ }
+ .button-primary {
+ // make wp core primary btn style consistent w/ normal btn styles
+ line-height: normal;
+ padding: 6px 14px;
+ height: auto;
+ font-size: 14px;
+ }
+ }
+
+ @media screen and (max-width: 450px){
+ .button,
+ .button-primary {
+ margin: 20px auto 0 auto;
+
+ &.alignright {
+ float: none;
+ }
+ }
+ }
+
.cat & {
@include breakpoint(large-desktop){
&:nth-child(3n + 1) {
@@ -1102,7 +1126,6 @@ body {
position: relative;
padding: em(140px) 0 em(60px);
text-align: center;
- //@include gradient--vertical(lighten($green, 5%), $green);
&:before,
&:after {
@@ -1116,19 +1139,16 @@ body {
margin-top: -1px; // Removes subpixel gap on retina landscape
width: 100%;
height: 195px;
- //background: url('../images/the-undercloud.svg') center top repeat-x;
}
&:after {
- bottom: 0;
- width: 100%;
- height: 50px;
- background: url('../images/the-footcloud.svg') center bottom no-repeat;
- background-size: auto 45px;
- z-index: 1;
+ display: none;
}
.download-jetpack {
margin-bottom: 33px;
}
+ @include minbreakpoint(large-desktop){
+ padding-bottom: 35px;
+ };
@include breakpoint(large-desktop) {
padding-top: 165px;
padding-bottom: 0;
@@ -1136,9 +1156,9 @@ body {
&:before {
background-size: 160% auto;
}
- &:after {
+ /*&:after {
display: none;
- }
+ }*/
ul {
float: none;
overflow: hidden; // Clears the float
@@ -1160,7 +1180,6 @@ body {
}
.footer nav {
max-width: 100%;
- // color: #c8e3a2;
a,
a:visited {
@@ -1174,14 +1193,12 @@ body {
}
}
@include breakpoint(large-desktop){
- border: none;
- padding: 0;
a,
a:visited {
&:hover,
&:focus {
- color: #fff;
+ color: $green;
}
}
};
@@ -1209,9 +1226,17 @@ body {
li {
margin-right: 5px;
}
- @include breakpoint(large-desktop){
- margin: 0 30px;
- padding: 8px 15px 30px;
+ @include minbreakpoint(tablet){
+ padding: 8px 15px 10px;
+ margin-bottom: 30px;
+ border-bottom: 1px solid #eee;
+ };
+ @include minbreakpoint(large-desktop){
+ margin-bottom: 0;
+ };
+ @include breakpoint(tablet){
+ padding: 8px 15px 8px;
+ border-bottom: none;
};
@include breakpoint(large-phone){
margin: 0;
@@ -1259,13 +1284,16 @@ body {
}
}
}
- /*@include breakpoint(large-desktop){
- display: none;
- };*/
}
.secondary {
- padding: 10px 15px 0 15px;
- //border-top: 1px solid #8eb345;
+ @include minbreakpoint(tablet){
+ padding: 0 15px 10px 15px;
+ border-bottom: 1px solid #eee;
+ }
+ @include minbreakpoint(large-desktop){
+ padding: 0 15px 10px 15px;
+ border-bottom: none;
+ }
}
@@ -1310,7 +1338,12 @@ body {
display: none;
}
}
- h4 {
+ .squeezer {
+ h2 {
+ font-size: 1em;
+ }
+ }
+ h2 {
color: #fff;
margin: 0;
}
@@ -1364,6 +1397,7 @@ body {
// Icons
// ==========================================================================
+.jetpack-modules #site-icon-deprecated .info,
.modules h3.icon,
.jetpack-modules .info a {
width: auto;
@@ -1542,6 +1576,13 @@ body {
content: '\f475';
}
+.jetpack-modules #site-icon-deprecated .info:before {
+ content: '\f475';
+}
+
+.jetpack-modules #sitemaps .info a:before {
+ content: '\f507';
+}
// ==========================================================================
@@ -1585,7 +1626,7 @@ body {
// Custom Breakpoints
// ==========================================================================
-@media screen and (max-width: 400px) {
+@media screen and (max-width: 515px) {
.jp-frame {
.header-nav {
padding-bottom: 10px;
@@ -1606,6 +1647,14 @@ body {
.jetpack-modules + .jetpack-modules {
text-align: left;
}
+ .jetpack-modules:nth-child(4) {
+ text-align: center;
+ margin: 0 auto;
+ width: 100%;
+ a {
+ padding: 0 10px;
+ }
+ }
}
}
-} // max 400px
+} // max 515px
diff --git a/plugins/jetpack/scss/templates/_module-overhaul.scss b/plugins/jetpack/scss/templates/_module-overhaul.scss
deleted file mode 100644
index 3d040ba6..00000000
--- a/plugins/jetpack/scss/templates/_module-overhaul.scss
+++ /dev/null
@@ -1,279 +0,0 @@
-// Needs to be cleaned. Let's remove those important tags and unneeded classes that we can utilize from core. Properly nest elements. migrate into _main.scss
-// Once everything is tested, I'll remove all the comments below as well. - @jeffgolenski
-
-
-// wrapping these common element names temporarily until I can audit - jeff
-.jp-content {
- .hide {
- display: none;
- }
- .pointer {
- cursor: pointer;
- }
- .landing {
- margin: 0 auto;
- z-index: 2;
- position: relative;
- }
- h1 {
- font: 300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;
- position: relative;
- z-index: 3;
- width: 100%;
- text-align: center;
- &.success {
- color: $green;
- }
- }
- .footer {
- padding-top: 0;
- margin-top: 0;
- background-image: none;
- &:before {
- height: inherit;
- }
- }
- .more-info:before {
- content: none;
- }
-} //.jp-content
-
-.landing {
- .wpcom-connect {
- min-height: 400px;
- }
-}
-
-.wpcom-connect {
- .j-col {
- padding: 0;
- }
- .connect-desc {
- padding-right: 25px;
- }
- .connect-btn {
- text-align: center;
- }
-}
-
-.module-grid h2 {
- color: #000;
- font: 300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;
-}
-
-// place button styles in _button.scss
-.download-jetpack {
- margin-top: 1em!important;
-}
-
-// let's try and get rid of styling via IDs
-#jump-start-area {
- margin-top: 35px;
- padding-left: 60px;
- padding-right: 60px;
- background: #fefefe;
- border: 1px #dae0e2 solid;
- padding-bottom: 20px;
-
- #jumpstart-cta,
- .jumpstart-desc {
- padding: 0;
- }
- p {
- font-size: 14px;
- line-height: 185%;
- }
- .spinner {
- float: none;
- margin: 0 auto;
- position: absolute;
- bottom: 0;
- height: 100%;
- width: 100%;
- background-position: 50% 56%;
- background-color: rgba(254,254,254, .99);
- display: block;
- opacity: .9;
- }
-}
-
-.jumpstart-message {
- p {
- padding-right: 25px;
- }
-}
-
-.jumpstart-desc {
- text-align: left;
-}
-
-#jumpstart-cta {
- text-align: center;
-}
-
-.dismiss-jumpstart {
- color: #999;
- font-size: 14px;
-}
-
-// place button styles in _button.scss
-#jumpstart-cta .button,
-#jumpstart-cta .button-primary {
- margin: 1em;
- font-size: 18px;
- height: 45px!important;
- padding: 8px 15px 1px;
-}
-
-#jumpstart-cta .button-primary {
- display: block;
- margin: 35px 20px 5px 20px;
-}
-
-#jp-config-list {
- position: relative;
- padding-top: 15px;
- padding-bottom: 15px;
- margin-left: -15px;
- margin-right: -15px;
-
- .j-col {
- padding: 15px;
- }
- strong {
- display: inline-block;
- }
- small {
- display: block;
- margin-top: 5px;
- line-height: 150%;
- }
- .close {
- position: absolute;
- top: 10px;
- right: 0;
- text-transform: uppercase;
- font-weight: bold;
- display: block;
- z-index: 5;
- }
-}
-
-.jp-config-status {
- text-transform: uppercase;
- font-size: 10px;
- font-weight: bold;
- line-height: 100%;
- color: #fff;
- background: #9fbd72;
- border-radius: 2px;
- padding: 2px 4px;
- display: inline-block;
-}
-
-.miguel {
- display: none;
- position: fixed;
- opacity: .35;
- bottom: -200px;
- left: 0;
- z-index: 1;
- -webkit-animation: miguel 3.4s 0s ease-in-out;
- animation: miguel 3.4s 0s ease-in-out;
-}
-
-.miguel:nth-child(2) {
- left: 49%;
- width: 120px;
- height: 131px;
- -webkit-animation-duration: 2.4s;
- animation-duration: 2.4s;
- -webkit-animation-delay: 0s;
- animation-delay: 0s;
-}
-
-.miguel:nth-child(3) {
- left: 23%;
- width: 60px;
- height: 66px;
- -webkit-animation-duration: 4.5s;
- animation-duration: 4.5s;
- -webkit-animation-delay: 0s;
- animation-delay: 0s;
-}
-
-@-webkit-keyframes "miguel" {
- 0% {
- -webkit-transform: translate3d(0px, 0px, 0px);
- transform: translate3d(0px, 0px, 0px);
- }
- 100% {
- -webkit-transform: translate3d(900px, -900px, 0px);
- transform: translate3d(900px, -900px, 0px);
- }
-}
-@keyframes "miguel" {
- 0% {
- -webkit-transform: translate3d(0px, 0px, 0px);
- transform: translate3d(0px, 0px, 0px);
- }
- 100% {
- -webkit-transform: translate3d(900px, -900px, 0px);
- transform: translate3d(900px, -900px, 0px);
- }
-}
-
-// Breakpoints
-@include breakpoint(large-desktop) {
-
- .jp-content {
- .landing {
- padding: 0 2em;
- }
- .footer {
- padding-top: 1.5em;
- }
- }
-
-} // large-desktop
-
-@include breakpoint(tablet) {
-
- #jumpstart-cta .button-primary {
- margin: 10px 0 5px 0;
- }
-
- #jump-start-area .spinner {
- background-position: 50% 35%;
- }
-
-} // tablet
-
-@include breakpoint(large-phone) {
-
- .jp-content {
- .landing {
- padding: 0 .5em;
- }
- }
-
- #jump-start-area {
- padding: 0 1em;
- }
-
- .jumpstart-message {
- p {
- padding-right: 0;
- }
- }
-
- #jumpstart-cta .button-primary {
- margin: 0 0 5px 0;
- padding-bottom: 10px;
- }
-
- .footer .a8c-attribution a:after {
- top: 6px;
- }
-
-} // large-phone \ No newline at end of file
diff --git a/plugins/jetpack/scss/templates/_nux-landing-2015.scss b/plugins/jetpack/scss/templates/_nux-landing-2015.scss
new file mode 100644
index 00000000..cd6e8171
--- /dev/null
+++ b/plugins/jetpack/scss/templates/_nux-landing-2015.scss
@@ -0,0 +1,694 @@
+// Needs to be cleaned. Let's remove those important tags and unneeded classes that we can utilize from core. Properly nest elements. migrate into _main.scss
+// Once everything is tested, I'll remove all the comments below as well. - @jeffgolenski
+
+
+// wrapping these common element names temporarily until I can audit - jeff
+.jp-content {
+ .hide {
+ display: none;
+ }
+ .pointer {
+ cursor: pointer;
+ }
+ .landing {
+ margin: 0 auto;
+ z-index: 2;
+ position: relative;
+ }
+ h1 {
+ font: 300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;
+ position: relative;
+ z-index: 3;
+ width: 100%;
+ text-align: center;
+ &.success {
+ color: $green;
+ }
+ }
+ .footer {
+ padding-top: 0;
+ margin-top: 0;
+ background-image: none;
+ &:before {
+ height: inherit;
+ }
+ }
+ .more-info:before {
+ content: none;
+ }
+} //.jp-content
+
+.landing {
+ .wpcom-connect {
+ min-height: 400px;
+ }
+}
+
+.wpcom-connect {
+ .j-col {
+ padding: 0;
+ }
+ .connect-desc {
+ padding-right: 25px;
+ }
+ .connect-btn {
+ text-align: center;
+ }
+}
+
+.module-grid h2 {
+ color: #000;
+ font: 300 2.57143em/1em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;
+}
+
+// place button styles in _button.scss
+.download-jetpack {
+ margin-top: 1em!important;
+}
+
+// let's try and get rid of styling via IDs
+#jump-start-area {
+ margin-top: 35px;
+ padding-left: 60px;
+ padding-right: 60px;
+ background: #fefefe;
+ border: 1px #dae0e2 solid;
+ padding-bottom: 20px;
+ text-align:center;
+
+ .connect-btn {
+ text-align:center;
+ }
+
+ #jumpstart-cta,
+ .jumpstart-desc {
+ padding: 0;
+ }
+ p {
+ font-size: 14px;
+ line-height: 185%;
+ }
+ .spinner {
+ float: none;
+ margin: 0 auto;
+ position: absolute;
+ bottom: 0;
+ height: 100%;
+ width: 100%;
+ background-position: 50% 56%;
+ background-color: rgba(254,254,254, .99);
+ display: block;
+ opacity: .9;
+ }
+}
+
+.jumpstart-message {
+ p {
+ padding-right: 25px;
+ }
+}
+
+.jumpstart-desc {
+ text-align: left;
+}
+
+#jumpstart-cta {
+ text-align: center;
+ display:inline-block;
+ float:none
+}
+
+.dismiss-jumpstart {
+ color: #999;
+ font-size: 14px;
+}
+
+// place button styles in _button.scss
+#jumpstart-cta .button,
+#jumpstart-cta .button-primary {
+ margin: 1em;
+ font-size: 18px;
+ height: 45px!important;
+ padding: 8px 15px 1px;
+}
+
+#jumpstart-cta .button-primary {
+ display: block;
+ margin: 35px 20px 5px 20px;
+}
+
+#jp-config-list {
+ position: relative;
+ padding-top: 15px;
+ padding-bottom: 15px;
+ margin-left: -15px;
+ margin-right: -15px;
+
+ .j-col {
+ padding: 15px;
+ }
+ strong {
+ display: inline-block;
+ }
+ small {
+ display: block;
+ margin-top: 5px;
+ line-height: 150%;
+ }
+ .close {
+ position: absolute;
+ top: 10px;
+ right: 0;
+ text-transform: uppercase;
+ font-weight: bold;
+ display: block;
+ z-index: 5;
+ }
+}
+
+.jp-config-status {
+ text-transform: uppercase;
+ font-size: 10px;
+ font-weight: bold;
+ line-height: 100%;
+ color: #fff;
+ background: #9fbd72;
+ border-radius: 2px;
+ padding: 2px 4px;
+ display: inline-block;
+}
+
+// Nux landing page 2015
+
+@mixin vertalign { // vertical center this div
+ position: absolute;
+ top: 50%;
+ -ms-transform: translate(0,-50%);
+ -webkit-transform: translate(0,-50%);
+ transform: translate(0,-50%);
+}
+
+.nux-intro {
+
+ h3 {
+ background: $green;
+ color: $white;
+ font-weight: 600;
+ padding: .75em;
+ margin: 0;
+ }
+
+ h4 {
+ margin: 0 0 2px 0;
+ }
+
+ p {
+ text-align: center;
+ font-size: 1.24em;
+ line-height: 175%;
+ }
+
+ a {
+ transition: all .4s ease;
+ }
+
+ .j-col {
+ padding: 0 0.5em;
+ &:first-of-type {
+ padding-left: 0;
+ }
+ &:last-of-type {
+ padding-right: 0;
+ }
+ }
+
+ .nux-in {
+ background: darken($clouds, 5%);
+ -webkit-border-bottom-right-radius: 6px;
+ -webkit-border-bottom-left-radius: 6px;
+ -moz-border-radius-bottomright: 6px;
+ -moz-border-radius-bottomleft: 6px;
+ border-bottom-right-radius: 6px;
+ border-bottom-left-radius: 6px;
+
+ h3 {
+ font-size: 1.10em;
+ -webkit-border-top-left-radius: 6px;
+ -webkit-border-top-right-radius: 6px;
+ -moz-border-radius-topleft: 6px;
+ -moz-border-radius-topright: 6px;
+ border-top-left-radius: 6px;
+ border-top-right-radius: 6px;
+
+ .dashicons {
+ float: right;
+ color: darken($green, 10%);
+ font-size: 1.25em;
+ padding-left: 0;
+ &:hover {
+ color: darken($green, 15%);
+ }
+ }
+ }
+
+ p {
+ font-size: .9em;
+ line-height: 150%;
+ margin: 0;
+ text-align: left;
+ color: $gray-med;
+ }
+
+ .j-row {
+ border-bottom: 1px $clouds solid;
+ padding: 5px 0;
+ position: relative;
+ min-height: 70px; // moderating consistent heights w/o JS
+ &:hover {
+ background: darken($clouds, 10%);
+ }
+ }
+
+ .unavailable {
+ opacity: 0.5;
+
+ .act {
+ display: none;
+ }
+ }
+
+ .paid {
+ top: 4px;
+ margin-left: 12px;
+ }
+
+ .dashicons {
+ color: $green;
+ font-size: 1em;
+ position: relative;
+ top: 3px;
+ padding-left: 6px;
+ &:hover {
+ color: darken($green, 15%);
+ }
+ }
+
+ .dashicons-external {
+ font-size: 1.5em;
+ top: 2px;
+ padding-left: 3px;
+ }
+
+ .lmore {
+ font-size: 11px;
+ color: $green;
+ &:hover {
+ color: darken($green, 15%);
+ }
+ }
+
+ } // nux-in
+
+ .feat {
+ &.j-col {
+ padding: 10px 2px 10px 10px;
+ }
+ .dashicons {
+ display: none;
+ }
+ }
+
+ .activated .feat {
+ .dashicons {
+ display: inline-block;
+ }
+ }
+
+ .act {
+ @include vertalign;
+ right: 8px;
+ float: right;
+
+ &.j-col {
+ padding: 5px;
+ text-align: right;
+ }
+ }
+
+ .module-action {
+ text-transform: uppercase;
+ font-size: .85em;
+ font-weight: 600;
+ }
+
+ .wpcom {
+
+ h3 {
+ background: $wpcom;
+ .dashicons {
+ color: darken($wpcom, 10%);
+ &:hover {
+ color: darken($wpcom, 15%);
+ }
+ }
+ }
+
+ .j-col {
+ padding: 10px;
+ }
+
+ .goto {
+ text-align: center;
+ padding: 1em;
+
+ &:hover {
+ background: darken($clouds, 5%);
+ }
+
+ .j-col {
+ padding: 0 5px;
+ }
+
+ a {
+ width: 100%;
+ padding: .25em;
+ height: auto;
+ }
+
+ .button {
+ height: auto;
+ min-height: 28px;
+ line-height: 18px;
+ white-space: normal;
+ max-width: 200px;
+ margin-bottom: 0;
+ padding-top: 4px;
+ padding-bottom: 5px;
+ }
+ .feat {
+ @include vertalign;
+ }
+ } // go-to
+ }
+
+ .nux-foot {
+ .j-col {
+ padding: 1em;
+ }
+ }
+
+} // nux-intro
+
+.nux-foot {
+ margin-top: 2em;
+ background: darken($clouds, 5%);
+ border-radius: 6px;
+
+ .j-col {
+ min-height: 75px;
+ padding: 1em;
+ @media (max-width: 650px) { width: 100%; }
+ }
+
+ .j-col + .j-col {
+ border-left: 1px $clouds solid;
+ @media (max-width: 650px) { border-left: none; border-top: 1px $clouds solid; }
+ }
+
+ .actions {
+ margin-top: 1em;
+ }
+
+ a {
+ text-decoration: underline;
+ }
+
+ img {
+ float: right;
+ margin-left: 1em;
+ width: 75px;
+ border-radius: 4px;
+ }
+
+ p {
+ font-size: .9em;
+ text-align: left;
+ font-weight: 600;
+ margin-top: 0;
+ }
+
+ p + p {
+ font-weight: 400;
+ margin-bottom: 0;
+ }
+
+ ul {
+ font-size: .9em;
+ margin-bottom: 0;
+
+ li {
+ margin-right: .875em;
+ margin-bottom: 0;
+ line-height: 175%;
+ display: inline-block;
+ vertical-align: middle;
+ }
+ }
+} // nux-foot
+
+// Activate toggle - replicated from WordPress.com
+.form-toggle[type="checkbox"] {
+ opacity: 0;
+ position: absolute;
+}
+
+.form-toggle__switch {
+ position: relative;
+ display: inline-block;
+ border-radius: 12px;
+ box-sizing: border-box;
+ padding: 2px;
+ width: 40px;
+ height: 24px;
+ background: darken($clouds, 25%);
+ vertical-align: middle;
+ outline: 0;
+ cursor: pointer;
+ transition: all .4s ease;
+
+ &:before, &:after {
+ position: relative;
+ display: block;
+ content: "";
+ width: 20px;
+ height: 20px;
+ }
+
+ &:after {
+ left: 0;
+ border-radius: 50%;
+ background: #fff;
+ transition: all .2s ease;
+ }
+
+ &:before {
+ display: none;
+ }
+
+ &:hover {
+ background: lighten($green, 25%);
+ }
+} // __switch
+
+.form-toggle__label {
+ cursor: pointer;
+}
+
+.plugin-action__label {
+ padding-right: 5px;
+ top: -1px;
+ position: relative;
+ color: lighten($gray-med, 15%);
+}
+
+.activated .plugin-action__label {
+ color: $green;
+ }
+
+.form-toggle:focus + .form-toggle__label .form-toggle__switch,
+.form-toggle:focus:checked + .form-toggle__label .form-toggle__switch {
+ box-shadow: 0 0 0 2px $wpcom;
+}
+
+.form-toggle:checked + .form-toggle__label .form-toggle__switch {
+ background: $green;
+ &:after {
+ left: 16px;
+ }
+}
+
+.form-toggle:checked:hover + .form-toggle__label .form-toggle__switch {
+ background: lighten($green, 25%);
+}
+
+
+.form-toggle:disabled + .form-toggle__label .form-toggle__switch,
+.form-toggle:disabled:hover + .form-toggle__label .form-toggle__switch {
+ background: #e9eff3;
+}
+
+.form-toggle.is-toggling + .form-toggle__label .form-toggle__switch {
+ background: $green;
+}
+
+.form-toggle.is-toggling:checked + .form-toggle__label .form-toggle__switch {
+ background: lighten($green, 25%);
+}
+
+.form-toggle.is-compact + .form-toggle__label .form-toggle__switch {
+ border-radius: 8px;
+ width: 24px;
+ height: 16px;
+ &:before, &:after {
+ width: 12px;
+ height: 12px;
+ }
+}
+
+.form-toggle.is-compact:checked + .form-toggle__label .form-toggle__switch:after {
+ left: 8px;
+}
+// end toggle
+
+
+// Breakpoints
+
+
+@include breakpoint(large-desktop) {
+
+ .jp-content {
+ .landing {
+ padding: 0 2em;
+ }
+ .footer {
+ padding-top: 1.5em;
+ }
+ }
+
+ .nux-intro {
+ .main-col {
+ width: 50%;
+ margin-bottom: 2em;
+ &.wpcom {
+ width: 100%;
+ }
+ }
+ .main-col + .main-col {
+ padding-right: 0;
+ }
+ .wpcom {
+ padding: 0;
+
+ .j-row {
+ width: 50%;
+ float: left;
+ border-bottom: 1px $clouds solid;
+ border-right: 1px $clouds solid;
+ &:last-of-type {
+ width: 100%;
+ float: none;
+ clear: both;
+ border: none;
+ border-top: 1px $clouds solid;
+ position: relative; // hides border of 2nd to last j-row
+ top: -1px;
+ }
+ }
+ .goto {
+ .feat a {
+ float: left;
+ }
+ }
+ }
+ } // nux-intro
+
+ .nux-foot {
+ .j-col {
+ border: none;
+ }
+ }
+
+} // large-desktop
+
+
+@include breakpoint(desktop) {
+
+ .nux-intro {
+ .main-col {
+ width: 100%;
+ padding: 0;
+ margin-bottom: 2em;
+ }
+ .wpcom {
+ .j-row {
+ width: 100%;
+ float: none;
+ }
+ }
+ }
+
+} // desktop
+
+@include breakpoint(tablet) {
+
+ #jumpstart-cta .button-primary {
+ margin: 10px 0 5px 0;
+ }
+
+ #jump-start-area .spinner {
+ background-position: 50% 35%;
+ }
+
+} // tablet
+
+@include breakpoint(phablet) {
+
+ .nux-intro {
+ h1 {
+ font-size: 1.75em;
+ }
+ p {
+ font-size: 1em;
+ }
+ }
+
+} // phablet
+
+@include breakpoint(large-phone) {
+
+ .jp-content {
+ .landing {
+ padding: 0 .5em;
+ }
+ }
+
+ #jump-start-area {
+ padding: 0 1em;
+ }
+
+ .jumpstart-message {
+ p {
+ padding-right: 0;
+ }
+ }
+
+ #jumpstart-cta .button-primary {
+ margin: 0 0 5px 0;
+ padding-bottom: 10px;
+ }
+
+ .footer .a8c-attribution a:after {
+ top: 6px;
+ }
+
+} // large-phone \ No newline at end of file
diff --git a/plugins/jetpack/scss/templates/_settings.scss b/plugins/jetpack/scss/templates/_settings.scss
index 95d3489a..5e5c4ecf 100644
--- a/plugins/jetpack/scss/templates/_settings.scss
+++ b/plugins/jetpack/scss/templates/_settings.scss
@@ -131,6 +131,15 @@
&#vaultpress {
opacity: 1;
}
+ &.deprecated {
+ span {
+ color: #888;
+ }
+ .dep-msg {
+ margin-right: 10px;
+ color: #555;
+ }
+ }
th,
td {
background: #fff;
@@ -275,10 +284,11 @@
}
&.show {
display: block;
- position: fixed;
+ // position: fixed;
overflow-y: auto;
overflow-x: hidden;
position: absolute;
+ z-index: 100000; // sits on top of wp-admin bar
}
.search-bar {
margin-bottom: 18px;
@@ -322,10 +332,10 @@
border-radius:2px;
margin-left:-5px;
background: #0D72B2;
- color:#FFF;
+ color: #fff;
.count{
- color:#BCD7E7;
+ color: #BCD7E7;
font-weight:200;
}
}
@@ -354,6 +364,54 @@
margin: 0;
padding: 0;
}
+ } // < 782
+ }
+}
+
+@media (max-width: 782px) {
+
+ // Fix to override particular wp-list-table changes in core - July 2015
+ .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.column-primary):not(.check-column) {
+ padding: 11px 10px;
+ display: block;
+ }
+
+ .jetpack_page_jetpack_modules {
+ #doaction {
+ padding: 7px 14px;
+ }
+ .fixed-top thead .check-column {
+ padding: 28px 10px 0 10px;
+ }
+ .filter-search {
+ margin-top: 28px;
+ .button {
+ padding: 7px 14px;
+ }
+ }
}
+ .manage-right.show .subsubsub li {
+ padding: 5px;
+ }
+
+} // < 782
+
+@media (max-width: 650px) {
+
+ .table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions {
+ float: none;
+ padding-left: 18px;
}
}
+
+@media (max-width: 430px) {
+
+ // Hide activate / config links on really small screens. Users can still utlize these actions by tapping on the title of the module
+ .table-bordered.jetpack-modules tr.jetpack-module td .row-actions {
+ display: none;
+ }
+
+ .table-bordered.jetpack-modules tr.jetpack-module.deprecated td .row-actions {
+ display: block;
+ }
+} // < 430
diff --git a/plugins/jetpack/to-test.md b/plugins/jetpack/to-test.md
new file mode 100644
index 00000000..3763c693
--- /dev/null
+++ b/plugins/jetpack/to-test.md
@@ -0,0 +1,287 @@
+## 3.9
+
+### Sitemaps
+
+That's a brand new module! Once you activate it, 2 sitemaps will be generated and will be available at `/sitemap.xml` and `news-sitemap.xml`. To test:
+
+- Make sure the sitemap isn't generated if your site is private.
+- Make sure the module isn't automatically enabled if you already use a Sitemap plugin.
+- Make sure the sitemaps work regardless of your permalink structure.
+- Check the posts included in both sitemaps.
+
+### Carousel
+
+- Revert change that broke direct link to carousel image. To test, open the Carousel view, copy the URL from your browser bar, and reload that URL in a different tab. Carousel view should open for that specific image.
+- Full Carousel images are now served by Photon again.
+
+### Contact Form
+
+- Fix notices when creating feedback entries without a contact form. Steps to reproduce the issue are available [here](https://github.com/Automattic/jetpack/issues/3115).
+- CSV export option now handles multiple options questions in forms. To test, create a contact form with multiple questions, and questions with multiple options. See if you can then export submitted forms via the Feedback menu.
+- New filter: `jetpack_required_field_text` allows you to change the "Required" text. To test, use a code snippet like this one:
+```php
+function jeherve_custom_required() {
+ return 'this is important';
+}
+add_filter( 'jetpack_required_field_text', 'jeherve_custom_required' );
+```
+
+### General
+
+We've added New Just In Time messages to promote WordPress.com new interface. To test:
+- Message appearing in Media > Add New when Photon is inactive.
+- Message appearing in Posts > Add New and Pages > Add New.
+- Message appearing in Posts > Add New, in the image insert modal, when Photon is disabled, before you publish a post.
+- Message about Stats, appearing in Posts > Add New and Pages > Add New, after publishing a post.
+- Message appearing in Dashboard > Updates, if auto updates are allowed on the site and if Manage is disabled.
+- Message appearing in the Plugins menu, after activating one or more plugins, if auto updates are allowed on the site, if the plugin is in the W.org repo, and if the plugin is already set to autoupdate on WordPress.com via Manage.
+
+For each scenario, check the link in the message, to make sure it's correct. Make sure you can activate modules from the message when the option is available. Also check that when dismissing one message, all the others disappear as well.
+
+- Multisite: hide archived sites in Network > Jetpack > Sites. To test, make sure no archived sites are displayed on this page.
+
+
+### Likes
+
+- Add conditional for `is_comments_popup` as 4.5 deprecates it. Test it by enabling Likes on a site running WordPress trunk and `WP_DEBUG` set to true.
+
+### Manage
+
+- New endpoints for user management. To test, go to [wordpress.com/people/](https://wordpress.com/people/) and try to search, edit, and delete users on your site. It's worth testing things on both Multisite and single installations.
+- Update plugin installation process. To test, ensure you can use WordPress.com to install plugins to your site.
+
+### Photon
+
+We've made several changes to improve compatibility with WP 4.4. All images should now be parsed by Photon, and should not generate any notices when `WP_DEBUG` is set. To test:
+
+- set your theme to call `the_post_thumbnail( array( 800, 800 ) )` using an array for the size that happens to be larger than the original image (say 500 x 500 for this example). Make sure the image is still displayed properly.
+- Enable Twenty Sixteen and make sure all images use Photon, and all `scrset` image values are correct (you can check this with your browser inspector).
+- Create a new image size in your theme by adding the following to your theme's functions.php: `add_image_size( 'jetpack-test-featured-thumbnail', 405, 405, true );`. Then output the image in your theme, with `the_post_thumbnail( 'jetpack-test-featured-thumbnail' );`. Create a new post, and use an old image from your Media Library as Featured Image. In your post, the returned image should fit within 400x400, using Photon, with the current values on both the `img` tag and the resize string in the Photon URL.
+- You can also test several variations with different slider plugins activated.
+
+- Photon is now enabled by default on sites using HTTPS. In the past, you had to add `add_filter( 'jetpack_photon_reject_https', '__return_false' );` for images served with HTTPS to be cached by Photon. You don't need that snippet anymore.
+
+### Publicize
+
+- Show Publicize options only to roles that can publish posts. To test, log in with a subscriber or contributor and make sure Publicize options are not displayed in Posts > Add New.
+- Fix notices appearing on Publicize settings screen when bbPress or BuddyPress are installed.
+
+### Related Posts
+
+- Fix incorrect condition for Related Posts exclusions. To test, make sure that when clicking on a Related Post, no `&relatedposts_exclude=undefined` is added to the URL of the related post.
+
+### Sharing
+
+- New Sharing button: Skype. To test, go to Settings > Sharing and enable the new Skype service. Try switching between button styles to make sure the button is displayed properly regardless of the button style, and try using the button.
+- The new `jetpack_open_graph_fallback_description` filter allows you to change the default Open Graph description, "Visit the post for more".
+
+### Shortcodes
+
+- Bandcamp: Switch to `esc_attr` instead of `int` for IDs, to allow for large track IDs. Try using very large track IDs like the ones from [this artist](https://renaudgabrielpion.bandcamp.com/album/voices-in-a-room).
+- Bandcamp: add support for `tracks` and `esig` attributes. The 2 attributes are only available to approved artists, but general testing of the [Bandcamp shortcode](https://en.support.wordpress.com/audio/bandcamp/) should help.
+- Medium: Improve URL path type matching. The list of possible URL formats is available [here](https://github.com/Automattic/jetpack/pull/3063).
+- Slideshow: better detection of older versions of IE. Try viewing a post with a slideshow in IE8, IE9, and IE11.
+- Add new Wistia oEmbed. To test, try inserting Wistia URLs into your posts. An example would be `http://automattic-2.wistia.com/medias/mqf9c9147u?embedType=iframe&videoWidth=320`
+
+### Spellchecking
+
+- Exclude `pre` tags from spellchecking. To test, add some code inside `pre` tags, including text that would trigger the spellchecker. Once you've done so, click on the "proofread" button and make sure content inside the `pre` tags is ignored.
+- Do not replace emoji by `img` tags when using the spellchecker. Testing instructions can be found [here]
+(https://github.com/Automattic/jetpack/issues/3220).
+
+### Stats
+
+- Fix Stats Dashboard widget when resizing stats chart in the browser. To test, check the Stats dashboard widget, and resize your browser. You can test in as many browsers as possible.
+
+### Theme Tools
+
+- Custom Content Types: do not register Nova CPT if it's already registered.
+- Infinite Scroll: disable in the Customizer when previewing a non-active theme.
+- Infinite Scroll: the new `infinite_scroll_got_infinity` filter allows you to filter the parameter used to check if Infinite Scroll has been triggered.
+- Responsive Videos: center videos when it's wrapped in a centered paragraph. To test, enable a theme using Responsive Videos, like Sapor, and create a new post with a YouTube video, wrapped in a centered paragraph. Make sure the video is centered on all devices.
+- Responsive Videos: fix [warning](https://github.com/Automattic/jetpack/issues/3048) appearing when `WP_DEBUG` was set to `true`. To test, enable `WP_DEBUG` on your site, switch to a theme that supports Responsive Videos like Sapor, and view posts including videos.
+- Social Menu: this new theme tool adds a "Social Menu" menu location if your theme includes `add_theme_support( 'jetpack-social-menu' );`. The menu then uses Genericons to display Social Links, much like in Twenty Sixteen.
+
+
+### Widgets
+
+- Facebook Like Box: add "Width" option.
+- Facebook Like Box: fallback to English US when a locale isn't supported by Facebook (e.g. Australian).
+- Top Posts: add size parameters to `img` tag to avoid warnings on performance tests. To test, make sure the widget is still displayed properly on your site, when using one of the Top Posts widget layouts including images.
+- Top Posts: layout fixes for Twenty Sixteen. To test, add a Top Posts widget using images to a site running Twenty Sixteen, and make sure the layout looks as shown [here](https://github.com/Automattic/jetpack/pull/3239).
+- Image Widget: refactor to remove `extract()`. To test, try editing existing image widget options, and create new image widgets. All options must be saved properly, and applied on the site's frontend.
+- Display Posts Widget: speed and stability improvements. To test, check if your existing Display Posts widgets still display posts from third-party Jetpack or WordPress.com sites, and try creating new widgets and see if everything works as expected, regardless of the widget settings.
+
+------------------
+
+# Past Releases
+
+## 3.8.1
+
+### WordPress 4.4 Compatibility
+
+If you're running a WordPress 4.4 beta, or trunk, please test out the following:
+
+- Photon + Responsive images:
+Make sure your images are playing nicely with Responsive Images when Photon is active. Look for image distortion, strange cropping, or Photon/srcset simply not working.
+
+- Twenty Sixteen theme:
+Activate the 2016 theme and look for any strangeness with Jetpack features. Pay special attention to these features:
+ - Gallery Widget
+ - Sharing & Likes buttons should not be shown on custom excerpts
+ - Infinite scroll
+
+### Other testing
+
+- Subscriptions filter:
+Add `add_filter( 'jetpack_allow_per_post_subscriptions', '__return_true' );` to your theme's functions.php. You should see this when writing up a new post: https://cloudup.com/czXrr6ni5GX
+
+- General styling with Jetpack admin messages
+- We've made some changes to the heading structures with our admin notices to improve accessibility. Toggle some modules, connect/disconnect your site, trigger some errors. Let us know if anything looks off in regards to the message styles.
+
+- Comments filter: filter to allow disabling Jetpack comments per post type.
+This filter, when applied, should revert WordPress to its comment behaviour as it would have been without Jetpack.
+`add_filter( 'jetpack_comment_form_enabled_for_page', '__return_false');`
+
+- Carousel: don't scroll to top when closed.
+Open a Carousel gallery. Browse around and close out of it. Scroll position when opened should not change.
+
+- Single Sign On: redirect correctly.
+Step 1. Add `add_filter( 'jetpack_sso_bypass_login_forward_wpcom', '__return_true' );` to a core functionality plugin and verify that visiting your wp-admin skips the local login form.
+Step 2. Logged out of both your local site and WP.com, try to visit your site's tools.php directly (e.g. example.com/wp-admin/tools.php )
+Expected result: Login successful, dumped to /wp-admin/tools.php
+
+## 3.8
+
+### New Features/Enhancements
+
+- Google+ Sidebar Widget
+New widget!
+To test: Add widget in both wp-admin and Customizer. Make sure there are no errors when adding either a person, page, or community badge.
+
+Example Google+ urls to use:
+
+https://plus.google.com/communities/101504763068635549461?hl=en (community)
+https://plus.google.com/+WordPress/posts?hl=en (page)
+https://plus.google.com/u/0/106016569422981142354/posts (profile)
+
+- Social Media Icons: Add Google+
+Adding Google+ to the Social Media Icons widget.
+To test: set up a Google+ account in the widget using a Google+ username/user ID. Typically it's the value found in your Google+ page URL: https://plus.google.com/[USER_ID]/posts. Try with both the numerical value or a custom Google+ name if your URL uses +FirstName in the [USER_ID] instead of a numerical value.
+
+- Sharing: Remove Twitter share counts.
+Due to Twitter removing support for third party sharing counts, we needed to remove the option from our Twitter sharing buttons.
+To test: Enable the Twitter sharing button (Icon, Icon + Text, or Text only) on a post that has Twitter share counts - you can verify existing counts by using the Official button - and verify that the share counts have been removed.
+
+- Contact Form: Check for valid email address.
+We've added a check to see if the "To" address in the Contact Form meets the Official Standard: RFC 5322 -- http://www.regular-expressions.info/email.html.
+To test: Set up a contact form "To" address using an invalid email address. For example: "thisemail@is.invalid" or similar. You should see an alert message notifying you of the invalid email address.
+
+- Contact Form: Checkbox with multiple items
+In previous versions of Jetpack, if you wanted multiple checkboxes on your Contact Form, you had to enter one per field. Now, you can have multiple checkbox options in a single form field.
+To test: Create a contact form using the new "Checkbox with Multiple Items" field type and ensure that they work properly in contact form submissions.
+
+- Shortcodes: Add Twitch.tv shortcode embeds
+Adding the Twitch.tv shortcode from WordPress.com.
+To test: Add shortcode to a post or page. The most basic form of the shortcode requires only the URL parameter, and looks like this: [twitchtv url="http://www.twitch.tv/paperbat/b/323486192"]
+
+You can also add additional parameters to customize the appearance:
+
+height – defaults to 378 pixels
+width – defaults to 620 pixels
+autoplay – defaults to false
+
+A more advanced shortcode would look something like: [twitchtv url="http://www.twitch.tv/paperbat" width="400" height="244" autoplay="true"]
+
+- Notices
+If you don't have Manage enabled, head on over to your updates page (update-core.php) -- you may see a message from us.
+
+### Fixes
+
+- Subscriptions: better error messaging for blocked emails.
+Previously, if you had blocked emails from WordPress.com, then tried to subscribe to a page using Jetpack Subscriptions, you would never receive the confirmation email.
+To test: Using your WordPress.com account, log into subscribe.wordpress.com, go to the Settings tab, and check the box to block all emails from WordPress.com and save. Leaving that window open, open a new tab/window to your test site (where you are not already subscribed to your site) and attempt to sign up using the same email address. Verify that the error message says "The email address has opted out of subscription emails." and includes a link to where you can fix the issue Then, refresh the subscribe.wordpress.com page and check to see if your subscription request is listed under the "Pending" tab. Don't forget to uncheck the "block emails" option under Settings when you're finished testing.
+
+- Infinite Scroll: Use theme posts_per_page variable if set.
+Previously, Jetpack ignored the posts_per_page variable set when declaring theme support for Infinite Scroll when the site was set to load additional posts on click. Now, if this variable is set in the theme, Jetpack will use the theme's variable when loading posts via Infinite Scroll.
+To test: Using a theme that uses a posts_per_page that is not 7 (the default for Infinite Scroll), test to see whether or not the custom posts_per_page number is used when Infinite Scroll is enabled.
+
+### New Filters/Hooks
+
+- Sharing: Filter whether to display the Sharing Meta Box or not.
+https://github.com/Automattic/jetpack/pull/2837/files
+
+- Related Posts: Filter the post css classes added on HTML markup.
+https://github.com/Automattic/jetpack/pull/2811
+
+- Social Media Icon Widget: Filter the icons
+See example in https://github.com/Automattic/jetpack/pull/2741
+
+- Sharing: Filter the App ID used in the official Facebook Share button.
+Example in https://github.com/Automattic/jetpack/pull/2590
+
+
+## 3.7
+
+### New Features/Enhancements
+
+- New admin page UI!
+You'll notice that the main Jetpack admin page has changed.
+To test: Please follow these instructions https://github.com/Automattic/jetpack/pull/2549, and anything else you can think of.
+
+- Staging Site Support!
+Clone your site's database to a new site, e.g. using a host's staging site feature. Previously, since both databases had the needed info to communicate to WordPress.com's record for the original site, there would be lots of things broken/weird. Now, when opening on a site where WP.com and your site's siteurl/homeurl settings differ, we'll prompt you to ask what's going on.
+To test: A brand new site cloned from an existing one: Confirm that the "Reset Connection" option properly connects the new site (e.g. the stats aren't shared with another site) and the original site remains operational.
+To test: On a staging site, any changes made (e.g. creating new posts) are not reflected on the WP.com record. Example way to check: Visit the wordpress.com My Sites for the original test site and confirm any posts made only on the staging site aren't listed as a post there.
+
+- Subscriptions per-post opt out!
+When using the Subscriptions module, you can now opt-out individual posts from being sent out to subscribers.
+To test: Toggle the checkmark in the publish meta box on an unpublished post.
+
+- Switched notifications to API v1.1
+To test: Make sure that new notification overlay is properly displayed both in the admin area and in the front-end area.
+
+- Reddit "Official" Sharing Button
+To test: Confirm that, when using the official Reddit button, the Reddit posting page opens in a new window/tab, not the original.
+
+- Publicize Custom Message: Previously, once a custom Publicize message was set, it could not be completely removed.
+To test: Set a custom message when writing a new post, save a draft, then come back and remove the message to restore the default settings.
+
+- Open Graph tags with smart punctuation
+To test: Set the post title or description (e.g. excerpt) to use smart punctuation—curly quotes, angled apostrophes, etc, and confirm sharing on various services that use OG tags works as expected (Facebook, Twitter, Pinterest, etc).
+
+- New VideoPress player
+Updates the Jetpack VideoPress player to HTML 5 when using the [wpvideo] shortcode and registers VideoPress as an oEmbed provider.
+To test: Add an VideoPress permalink into the editor to test oEmbed.
+To test: Play videos via oEmbed and the wpvideo shortcode on a number of browser/OS combinations.
+
+- PollDaddy shortcode
+The PollDaddy shortcode had been updated and enhanced quite a bit on WP.com. 3.7 brings those enhancements downstream.
+To test: Add a PD poll via the Shortcode. Confirm it loads and no JS errors (JS changed to async)
+To test: Add a PD poll via oEmbed (dropping in the poll.fm link). New to Jetpack.
+To test: Add a PD poll via Shortcode on a HTTPS site. Expected: Works with no mixed content issues.
+
+- Widget Visibility Enhancement!
+A new rule has been added to show/hide widgets based on Parent Page. Very helpful for all of your hierarchical page-based site needs!
+To test: Set widget visibility option for a parent page, confirm works as expected on a child of that page.
+
+- bbPress Love!
+Previously, Jetpack didn't insert Sharing buttons on bbPress CPTs even if they were set to be used via Settings->Sharing
+To test: Enable Sharing on bbPress CPTs and confirm they're added.
+
+### Fixes
+
+- No longer forcing http:// on API urls
+To test: If you have a site that uses HTTPS, please test to ensure that social sharing, shortlinks, and managing your site through WordPress.com all work as expected
+
+- Edit Posts List Table: Fixed the styling associated with the Likes column resulting from 4.3 changes.
+To test: Confirm no visual oddities while on either WP 4.2.x or 4.3.x
+
+- Facebook Embeds: In some cases, the script loaded early resulting in no embed
+To test: Try embedding a FB post using the Facebook shortcode.
+
+- Sharing/Likes: Front Page settings
+To test: Set a page as your site's front page and confirm the "Front Page" sharing option is respected.
+
+- Open Graph Tags
+DailyMotion videos are treated the same as YouTube/Vimeo. If the logic suggests a video screencap should be used, it'll now include DailyMotion.
diff --git a/plugins/jetpack/views/admin/admin-page.php b/plugins/jetpack/views/admin/admin-page.php
index a1a7422b..3e092178 100644
--- a/plugins/jetpack/views/admin/admin-page.php
+++ b/plugins/jetpack/views/admin/admin-page.php
@@ -3,90 +3,245 @@
<div class="page-content landing">
<?php Jetpack::init()->load_view( 'admin/network-activated-notice.php' ); ?>
- <?php do_action( 'jetpack_notices' ) ?>
+ <?php
+ /**
+ * Fires when a notice is displayed in the Jetpack menu.
+ *
+ * @since 3.0.0
+ */
+ do_action( 'jetpack_notices' );
+ ?>
<?php if ( $data['is_connected'] ) : ?>
- <?php if ( $data['show_jumpstart'] && 'new_connection' === Jetpack_Options::get_option( 'jumpstart' ) && current_user_can( 'jetpack_manage_modules' ) && ! Jetpack::is_development_mode() ) : ?>
-
- <div id="jump-start-success"></div>
- <div id="jump-start-area" class="j-row">
- <h1 title="Jump Start your site by activating these components" class="jstart"><?php _e( 'Jump Start your site', 'jetpack' ); ?></h1>
- <div class="jumpstart-desc j-col j-sm-12 j-md-12 j-lrg-8">
- <div class="jumpstart-message">
- <p id="jumpstart-paragraph-before"><?php echo sprintf( __( 'To immediately boost performance, security, and engagement, we recommend activating <strong>%s</strong> and a few others. Click <strong>Jump Start</strong> to activate these modules.', 'jetpack' ), $data['jumpstart_list'] ); ?>
- <a class="pointer jp-config-list-btn"><?php _e( 'Learn more about Jump Start and what it adds to your site.', 'jetpack' ); ?></a>
- </p>
- </div><!-- /.jumpstart-message -->
- </div>
- <div class="jumpstart-message hide">
- <h1 title="Your site has been sucessfully Jump Started." class="success"><?php _e( 'Success! You\'ve jump started your site.', 'jetpack' ); ?></h1>
- <p><?php echo sprintf( __( 'Check out other recommended features below, or go to the <a href="%s">settings</a> page to customize your Jetpack experience.', 'jetpack' ), admin_url( 'admin.php?page=jetpack_modules' ) ); ?></p>
- </div><!-- /.jumpstart-message -->
- <div id="jumpstart-cta" class="j-col j-sm-12 j-md-12 j-lrg-4">
- <a id="jump-start" class="button-primary" ><?php esc_html_e( 'Jump Start', 'jetpack' ); ?></a>
- <a class="dismiss-jumpstart pointer" ><?php esc_html_e( 'Dismiss', 'jetpack' ); ?></a>
- <span class="spinner" style="display: none;"></span>
- </div>
- <div id="jump-start-module-area">
- <div id="jp-config-list" class="clear j-row hide">
- <a class="pointer jp-config-list-btn close" ><span class="dashicons dashicons-no"></span></a>
- </div>
+ <?php if ( $data['show_jumpstart'] && 'new_connection' === Jetpack_Options::get_option( 'jumpstart' ) && current_user_can( 'jetpack_manage_modules' ) && ! Jetpack::is_development_mode() ) : ?>
+
+ <div id="jump-start-success"></div>
+ <div id="jump-start-area" class="j-row">
+ <h1 title="<?php esc_attr_e( 'Jump Start your site by activating these components', 'jetpack' ); ?>" class="jstart"><?php _e( 'Jump Start your site', 'jetpack' ); ?></h1>
+ <div class="jumpstart-desc j-col j-sm-12 j-md-12">
+ <div class="jumpstart-message">
+ <p id="jumpstart-paragraph-before"><?php
+ if ( count( $data['jumpstart_list'] ) > 1 ) {
+ $last_item = array_pop( $data['jumpstart_list'] );
+ /* translators: %1$s is a comma-separated list of module names or a single module name, %2$s is the last item in the module list */
+ echo sprintf( __( 'To quickly boost performance, security, and engagement we recommend activating <strong>%1$s and %2$s</strong>. Click <strong>Jump Start</strong> to activate these features or <a class="pointer jp-config-list-btn">learn more</a>', 'jetpack' ), implode( $data['jumpstart_list'], ', ' ), $last_item );
+
+ } else {
+ /* translators: %s is a module name */
+ echo sprintf( __( 'To quickly boost performance, security, and engagement we recommend activating <strong>%s</strong>. Click <strong>Jump Start</strong> to activate this feature or <a class="pointer jp-config-list-btn">learn more</a>', 'jetpack' ), $data['jumpstart_list'][0] );
+ }
+ ?></p>
+ </div><!-- /.jumpstart-message -->
+ </div>
+ <div class="jumpstart-message hide">
+ <h1 title="<?php esc_attr_e( 'Your site has been sucessfully Jump Started.', 'jetpack' ); ?>" class="success"><?php _e( 'Success! You\'ve jump started your site.', 'jetpack' ); ?></h1>
+ <p><?php echo sprintf( __( 'Check out other recommended features below, or go to the <a href="%s">settings</a> page to customize your Jetpack experience.', 'jetpack' ), admin_url( 'admin.php?page=jetpack_modules' ) ); ?></p>
+ </div><!-- /.jumpstart-message -->
+ <div id="jumpstart-cta" class="j-col j-sm-12 j-md-12 j-lrg-4">
+ <img class="jumpstart-spinner" style="margin: 49px auto 14px; display: none;" width="17" height="17" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="Loading ..." />
+ <a id="jump-start" class="button-primary" ><?php esc_html_e( 'Jump Start', 'jetpack' ); ?></a>
+ <a class="dismiss-jumpstart pointer" ><?php esc_html_e( 'Skip', 'jetpack' ); ?></a>
+ </div>
+ <div id="jump-start-module-area">
+ <div id="jp-config-list" class="clear j-row hide">
+ <a class="pointer jp-config-list-btn close" ><span class="dashicons dashicons-no"></span></a>
</div>
</div>
+ </div>
- <?php endif; ?>
+ <?php endif; ?>
- <?php if ( $data['is_connected'] && ! $data['is_user_connected'] && current_user_can( 'jetpack_connect_user' ) ) : ?>
- <div class="link-button" style="width: 100%; text-align: center; margin-top: 15px;">
- <a href="<?php echo Jetpack::init()->build_connect_url() ?>" class="download-jetpack"><?php esc_html_e( 'Link your account to WordPress.com', 'jetpack' ); ?></a>
- </div>
- <?php endif; ?>
-
- <?php // Recommended modules on the landing page ?>
- <div class="module-grid">
- <h2 title="Get the most out of Jetpack with these features"><?php _e( 'Get the most out of Jetpack with...', 'jetpack' ); ?></h2>
- <div class="modules"></div>
- <?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?>
- <a href="<?php echo admin_url( 'admin.php?page=jetpack_modules' ); ?>" class="button" ><?php echo sprintf( __( 'See the other %s Jetpack features', 'jetpack' ), count( Jetpack::get_available_modules() ) - count( $data['recommended_list'] ) ); ?></a>
- <?php endif; ?>
- </div><!-- .module-grid -->
+ <?php if ( $data['is_connected'] && ! $data['is_user_connected'] && current_user_can( 'jetpack_connect_user' ) ) : ?>
+ <div class="link-button" style="width: 100%; text-align: center; margin-top: 15px;">
+ <a href="<?php echo Jetpack::init()->build_connect_url() ?>" class="download-jetpack"><?php esc_html_e( 'Link your account to WordPress.com', 'jetpack' ); ?></a>
+ </div>
+ <?php endif; ?>
+
+ <div class="nux-intro jp-content" style="display: none;">
+
+ <h1 title="<?php esc_attr_e( 'Improve your site with Jetpack', 'jetpack' ); ?>"><?php _e( 'Improve your site with Jetpack', 'jetpack' ); ?></h1>
+ <p><?php _e( 'Jetpack can help secure your site, increase performance &amp; traffic, and simplify how you manage your site.', 'jetpack' ); ?></p>
+ <div class="j-row">
+
+ <?php // Performance & Security ?>
+ <div class="j-col j-lrg-4 main-col">
+ <div class="nux-in">
+
+ <h3 title="<?php esc_attr_e( 'Performance &amp; Security', 'jetpack' ); ?>">
+ <?php /* Leave out until better link is available
+ <a class="dashicons dashicons-editor-help" href="http://jetpack.me/features/" title="<?php esc_attr_e( 'Learn more about Jetpack\'s Performance &amp; Security tools', 'jetpack' ); ?>" target="_blank"></a>
+ */ ?>
+ <?php _e( 'Performance &amp; Security', 'jetpack' ); ?>
+ </h3>
+
+ <?php // The template container from landing-page-templates.php ?>
+ <div id="nux-performance-security"></div>
+
+ </div> <?php // nux-in ?>
+ </div><?php // j-col ?>
+ <?php // END Performance & Security ?>
+
+ <?php // Traffic Boosting Tools ?>
+ <div class="j-col j-lrg-4 main-col">
+ <div class="nux-in">
+
+ <h3 title="<?php esc_attr_e( 'Traffic Growth', 'jetpack' ); ?>">
+ <?php /* Leave out until better link is available
+ <a class="dashicons dashicons-editor-help" href="http://jetpack.me/features/" title="<?php esc_attr_e( 'Learn more about Jetpack\'s Traffic Boosting tools', 'jetpack' ); ?>" target="_blank"></a>
+ */ ?>
+ <?php _e( 'Traffic Growth', 'jetpack' ); ?>
+ </h3>
+
+ <?php // The template container from landing-page-templates.php ?>
+ <div id="nux-traffic"></div>
+
+ </div> <?php // nux-in ?>
+ </div><?php // j-col ?>
+ <?php // END Traffic Tools ?>
+
+
+ <?php // WordPress.com Tools ?>
+ <div class="wpcom j-col j-lrg-4 main-col">
+ <div class="nux-in">
+
+ <h3 title="<?php esc_attr_e( 'WordPress.com Tools', 'jetpack' ); ?>"><a class="dashicons dashicons-editor-help" href="http://jetpack.me/support/site-management/" title="<?php esc_attr_e( 'Learn more about WordPress.com\'s free tools', 'jetpack' ); ?>" target="_blank"></a><?php _e( 'WordPress.com Tools', 'jetpack' ); ?></h3>
+
+ <div class="j-row">
+ <div class="j-col j-lrg-12 j-md-12 j-sm-12">
+ <h4 title="<?php esc_attr_e( 'Manage Multiple Sites', 'jetpack' ); ?>"><?php _e( 'Manage Multiple Sites', 'jetpack' ); ?></h4>
+ <p title="<?php esc_attr_e( 'Bulk site management from one dashboard.', 'jetpack' ); ?>"><?php _e( 'Bulk site management from one dashboard.', 'jetpack' ); ?></p>
+ </div>
+ </div><?php // j-row ?>
+
+ <div class="j-row">
+ <div class="j-col j-lrg-12 j-md-12 j-sm-12">
+ <h4 title="<?php esc_attr_e( 'Automatic Updates', 'jetpack' ); ?>"><?php _e( 'Automatic Updates', 'jetpack' ); ?></h4>
+ <p title="<?php esc_attr_e( 'Keep plugins auto-updated.', 'jetpack' ); ?>"><?php _e( 'Keep plugins auto-updated.', 'jetpack' ); ?></p>
+ </div>
+ </div><?php // j-row ?>
+
+ <div class="j-row">
+ <div class="j-col j-lrg-12 j-md-12 j-sm-12">
+ <h4 title="<?php esc_attr_e( 'Centralized Posting', 'jetpack' ); ?>"><?php _e( 'Centralized Posting', 'jetpack' ); ?></h4>
+ <p title="<?php esc_attr_e( 'Post to your sites via mobile devices.', 'jetpack' ); ?>"><?php _e( 'Post to your sites via mobile devices.', 'jetpack' ); ?></p>
+ </div>
+ </div><?php // j-row ?>
+
+ <div class="j-row">
+ <div class="j-col j-lrg-12 j-md-12 j-sm-12">
+ <h4 title="<?php esc_attr_e( 'Menu Management', 'jetpack' ); ?>"><?php _e( 'Menu Management', 'jetpack' ); ?></h4>
+ <p title="<?php esc_attr_e( 'A simpler UI for creating and editing menus.', 'jetpack' ); ?>"><?php _e( 'A simpler UI for creating and editing menus.', 'jetpack' ); ?></p>
+ </div>
+ </div><?php // j-row ?>
+
+ <div class="j-row">
+ <div class="j-col j-lrg-12 j-md-12 j-sm-12">
+ <h4 title="<?php esc_attr_e( 'More Statistics', 'jetpack' ); ?>"><?php _e( 'More Statistics', 'jetpack' ); ?></h4>
+ <p title="<?php esc_attr_e( 'Enhanced site stats and insights.', 'jetpack' ); ?>"><?php _e( 'Enhanced site stats and insights.', 'jetpack' ); ?></p>
+ </div>
+ </div><?php // j-row ?>
+
+ <?php
+ $normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
+ $manage_active = Jetpack::is_module_active( 'manage' );
+ ?>
+ <?php if ( current_user_can( 'jetpack_manage_modules' ) && $data['is_user_connected'] && ! Jetpack::is_development_mode() ) : ?>
+ <div id="manage-row" class="j-row goto <?php echo ( $manage_active ) ? 'activated' : ''; ?>">
+ <div class="feat j-col j-lrg-7 j-md-8 j-sm-7">
+ <a href="<?php echo esc_url( 'https://wordpress.com/plugins/' . $normalized_site_url . '?from=jpnux' ); ?>" class="button button-primary manage-cta-active" target="_blank" style="display: <?php echo ( $manage_active ) ? 'inline-block' : 'none'; ?>;" title="<?php esc_attr_e( 'Go to WordPress.com to try these features', 'jetpack' ); ?>"><?php _e( 'Go to WordPress.com', 'jetpack' ); ?></a>
+ <label for="active-manage" class="button button-primary form-toggle manage-cta-inactive" style="display: <?php echo ( $manage_active ) ? 'none' : 'inline-block'; ?>" title="<?php esc_attr_e( 'Activate free WordPress.com features', 'jetpack' ); ?>"><?php _e( 'Activate features', 'jetpack' ); ?></label>
+ </div>
+ <div class="act j-col j-lrg-5 j-md-4 j-sm-5">
+ <div class="module-action">
+ <span>
+ <?php $manage_active = Jetpack::is_module_active( 'manage' ); ?>
+ <input class="is-compact form-toggle" type="checkbox" id="active-manage" <?php echo ( $manage_active ) ? 'checked' : ''; ?> />
+ <label class="form-toggle__label" for="active-manage">
+ <img class="module-spinner-manage" style="display: none;" width="16" height="16" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="Loading ..." />
+ <label class="plugin-action__label" for="active-manage">
+ <?php ( $manage_active ) ? esc_html_e( 'Active', 'jetpack' ) : esc_html_e( 'Inactive', 'jetpack' ); ?>
+ </label>
+ <span class="form-toggle__switch"></span>
+ </label>
+ </span>
+ </div>
+ </div>
+ </div><?php // j-row ?>
+ <?php endif; ?>
+
+ </div> <?php // nux-in ?>
+ </div><?php // j-col ?>
+ <?php // END WordPress.com Tools ?>
+
+ </div><?php // j-row ?>
+
+ <?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?>
+ <p><?php _e( 'Jetpack includes many other features that you can use to customize how your site looks and functions. These include Contact Forms, Tiled Photo Galleries, Custom CSS, Image Carousel, and a lot more.', 'jetpack' ); ?></p>
+ <p><a href="<?php echo admin_url( 'admin.php?page=jetpack_modules' ); ?>" class="button full-features-btn" ><?php echo sprintf( __( 'See the other %s Jetpack features', 'jetpack' ), count( Jetpack::get_available_modules() ) - count( $data['recommended_list'] ) ); ?></a></p>
+ <?php endif; ?>
+
+ <div class="nux-foot j-row">
+ <div class="j-col j-lrg-8 j-md-8 j-sm-12">
+ <?php
+ // Get a list of Jetpack Happiness Engineers.
+ $jetpack_hes = array(
+ '724cd8eaaa1ef46e4c38c4213ee1d8b7',
+ '623f42e878dbd146ddb30ebfafa1375b',
+ '561be467af56cefa58e02782b7ac7510',
+ 'd8ad409290a6ae7b60f128a0b9a0c1c5',
+ '790618302648bd80fa8a55497dfd8ac8',
+ '6e238edcb0664c975ccb9e8e80abb307',
+ '4e6c84eeab0a1338838a9a1e84629c1a',
+ '9d4b77080c699629e846d3637b3a661c',
+ '4626de7797aada973c1fb22dfe0e5109',
+ '190cf13c9cd358521085af13615382d5',
+ );
+
+ // Get a fallback profile image.
+ $default_he_img = plugins_url( 'images/jetpack-icon.jpg', JETPACK__PLUGIN_FILE );
+
+ printf(
+ '<a href="http://jetpack.me/support/" target="_blank"><img src="https://secure.gravatar.com/avatar/%1$s?s=75&d=%2$s" alt="Jetpack Happiness Engineer" /></a>',
+ $jetpack_hes[ array_rand( $jetpack_hes ) ],
+ urlencode( $default_he_img )
+ );
+ ?>
+ <p><?php _e( 'Help and Support', 'jetpack' ); ?></p>
+ <p><?php _e( 'We offer free, full support to all Jetpack users. Our support team is always around to help you.', 'jetpack' ); ?></p>
+ <ul class="actions">
+ <li><a href="http://jetpack.me/support/" target="_blank" class="button"><?php esc_html_e( 'Visit support site', 'jetpack' ); ?></a></li>
+ <li><a href="https://wordpress.org/support/plugin/jetpack" target="_blank"><?php esc_html_e( 'Browse forums', 'jetpack' ); ?></a></li>
+ <li><a href="http://jetpack.me/contact-support/" target="_blank"><?php esc_html_e( 'Contact us directly', 'jetpack' ); ?></a></li>
+ </ul>
+ </div>
+ <div class="j-col j-lrg-4 j-md-4 j-sm-12">
+ <p><?php _e( 'Premium Add-ons', 'jetpack' ); ?></p>
+ <p><?php esc_html_e( 'Business site? Safeguard it with real-time backups, security scans, and anti-spam.', 'jetpack' ); ?></p>
+ <p>&nbsp;</p>
+ <?php $normalized_site_url = Jetpack::build_raw_urls( get_home_url() ); ?>
+ <div class="actions"><a href="<?php echo esc_url( 'https://wordpress.com/plans/' . $normalized_site_url ); ?>" target="_blank" class="button"><?php esc_html_e( 'Compare Options', 'jetpack' ); ?></a></div>
+ </div>
+ </div><?php // nux-foot ?>
+
+ </div><?php // nux-intro ?>
</div><!-- .landing -->
<?php else : ?>
- <div class="wpcom-connect">
- <h1 title="Boost traffic, enhance security, and improve performance."><?php esc_html_e( 'Boost traffic, enhance security, and improve performance.', 'jetpack' ); ?></h1>
- <div class="j-row">
- <div class="j-col j-sm-12 j-md-8 j-lrg-7 connect-desc">
- <p><?php _e('Jetpack connects your site to WordPress.com to give you traffic and customization tools, enhanced security, speed boosts, and more.', 'jetpack' ); ?></p>
- <p><?php _e('To start using Jetpack, connect to your WordPress.com account by clicking the button (if you don’t have an account you can create one quickly and for free).', 'jetpack' ); ?></p>
- </div>
- <div class="j-col j-sm-12 j-md-4 j-lrg-5 connect-btn">
- <?php if ( ! $data['is_connected'] && current_user_can( 'jetpack_connect' ) ) : ?>
- <a href="<?php echo Jetpack::init()->build_connect_url() ?>" class="download-jetpack"><?php esc_html_e( 'Connect to WordPress.com', 'jetpack' ); ?></a>
- <?php elseif ( $data['is_connected'] && ! $data['is_user_connected'] && current_user_can( 'jetpack_connect_user' ) ) : ?>
- <a href="<?php echo Jetpack::init()->build_connect_url() ?>" class="download-jetpack"><?php esc_html_e( 'Link your account to WordPress.com', 'jetpack' ); ?></a>
- <?php endif; ?>
- </div>
+ <div id="jump-start-area" class="j-row">
+ <h1 title="<?php esc_attr_e( 'Please Connect Jetpack', 'jetpack' ); ?>"><?php esc_html_e( 'Please Connect Jetpack', 'jetpack' ); ?></h1>
+ <div class="connect-btn j-col j-sm-12 j-md-12">
+ <p><?php echo wp_kses( __( 'Connecting Jetpack will show you <strong>stats</strong> about your traffic, <strong>protect</strong> you from brute force attacks, <strong>speed up</strong> your images and photos, and enable other <strong>traffic and security</strong> features.', 'jetpack' ), 'jetpack' ) ?></p>
+ <?php if ( ! $data['is_connected'] && current_user_can( 'jetpack_connect' ) ) : ?>
+ <a href="<?php echo Jetpack::init()->build_connect_url() ?>" class="download-jetpack"><?php esc_html_e( 'Connect Jetpack', 'jetpack' ); ?></a>
+ <?php elseif ( $data['is_connected'] && ! $data['is_user_connected'] && current_user_can( 'jetpack_connect_user' ) ) : ?>
+ <a href="<?php echo Jetpack::init()->build_connect_url() ?>" class="download-jetpack"><?php esc_html_e( 'Connect your account', 'jetpack' ); ?></a>
+ <?php endif; ?>
</div>
</div>
<?php endif; ?>
- <div id="miguels" class="flyby">
- <svg class="miguel" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="80px" height="87px" viewBox="0 0 80 87" enable-background="new 0 0 80 87" xml:space="preserve">
- <polygon class="eye" fill="#518d2a" points="41.187,17.081 46.769,11.292 50.984,15.306"/>
- <path class="body" fill="#518d2a" d="M38.032,47.3l4.973-5.157l7.597,1.996l0.878-0.91l0.761-0.789l-0.688-2.838l-0.972-0.926l-1.858,1.926 l-2.206-2.1l3.803-3.944l0.09-3.872L80,0L61.201,10.382L60.2,15.976l-5.674,1.145l-8.09-7.702L34.282,22.024l8.828-1.109 l2.068,2.929l-4.996,0.655l-3.467,3.595l0.166-4.469l-4.486,0.355L21.248,35.539l-0.441,4.206l-2.282,2.366l-2.04,6.961 L27.69,37.453l4.693,1.442l-2.223,2.306l-4.912,0.095l-7.39,22.292l-8.06,3.848l-2.408,9.811l-3.343-0.739L0,86.739l30.601-31.733 l8.867,2.507l-7.782,8.07l-1.496-0.616l-0.317-2.623l-7.197,7.463l11.445-2.604l16.413-7.999L38.032,47.3z M42.774,16.143 l3.774-3.914l2.85,2.713L42.774,16.143z"/>
- </svg>
- <svg class="miguel" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="80px" height="87px" viewBox="0 0 80 87" enable-background="new 0 0 80 87" xml:space="preserve">
- <polygon class="eye" fill="#518d2a" points="41.187,17.081 46.769,11.292 50.984,15.306 "/>
- <path class="body" fill="#518d2a" d="M38.032,47.3l4.973-5.157l7.597,1.996l0.878-0.91l0.761-0.789l-0.688-2.838l-0.972-0.926l-1.858,1.926 l-2.206-2.1l3.803-3.944l0.09-3.872L80,0L61.201,10.382L60.2,15.976l-5.674,1.145l-8.09-7.702L34.282,22.024l8.828-1.109 l2.068,2.929l-4.996,0.655l-3.467,3.595l0.166-4.469l-4.486,0.355L21.248,35.539l-0.441,4.206l-2.282,2.366l-2.04,6.961 L27.69,37.453l4.693,1.442l-2.223,2.306l-4.912,0.095l-7.39,22.292l-8.06,3.848l-2.408,9.811l-3.343-0.739L0,86.739l30.601-31.733 l8.867,2.507l-7.782,8.07l-1.496-0.616l-0.317-2.623l-7.197,7.463l11.445-2.604l16.413-7.999L38.032,47.3z M42.774,16.143 l3.774-3.914l2.85,2.713L42.774,16.143z"/>
- </svg>
- <svg class="miguel" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="80px" height="87px" viewBox="0 0 80 87" enable-background="new 0 0 80 87" xml:space="preserve">
- <polygon class="eye" fill="#518d2a" points="41.187,17.081 46.769,11.292 50.984,15.306 "/>
- <path class="body" fill="#518d2a" d="M38.032,47.3l4.973-5.157l7.597,1.996l0.878-0.91l0.761-0.789l-0.688-2.838l-0.972-0.926l-1.858,1.926 l-2.206-2.1l3.803-3.944l0.09-3.872L80,0L61.201,10.382L60.2,15.976l-5.674,1.145l-8.09-7.702L34.282,22.024l8.828-1.109 l2.068,2.929l-4.996,0.655l-3.467,3.595l0.166-4.469l-4.486,0.355L21.248,35.539l-0.441,4.206l-2.282,2.366l-2.04,6.961 L27.69,37.453l4.693,1.442l-2.223,2.306l-4.912,0.095l-7.39,22.292l-8.06,3.848l-2.408,9.811l-3.343-0.739L0,86.739l30.601-31.733 l8.867,2.507l-7.782,8.07l-1.496-0.616l-0.317-2.623l-7.197,7.463l11.445-2.604l16.413-7.999L38.032,47.3z M42.774,16.143 l3.774-3.914l2.85,2.713L42.774,16.143z"/>
- </svg>
- </div>
<div id="deactivate-success"></div>
<?php if ( Jetpack::is_development_version() ) { ?>
<a id="jump-start-deactivate" style="cursor:pointer; display: block; text-align: center; margin-top: 25px;"><?php esc_html_e( 'RESET EVERYTHING (during testing only) - will reset modules to default as well', 'jetpack' ); ?></a>
diff --git a/plugins/jetpack/views/admin/landing-page-templates.php b/plugins/jetpack/views/admin/landing-page-templates.php
index fef2c31b..b979c798 100644
--- a/plugins/jetpack/views/admin/landing-page-templates.php
+++ b/plugins/jetpack/views/admin/landing-page-templates.php
@@ -1,5 +1,17 @@
<?php
- $modules = array('Appearance', 'Developers', 'Mobile', 'Other', 'Photos and Videos', 'Social', 'WordPress.com Stats', 'Writing' );
+ if ( is_plugin_active( 'vaultpress/vaultpress.php' ) ) {
+ if ( VaultPress::init()->is_registered() ) {
+ $vp_link = 'https://dashboard.vaultpress.com';
+ $target = '_blank';
+ } else {
+ $vp_link = admin_url( 'admin.php?page=vaultpress' );
+ $target = '_self';
+ }
+ } else {
+ $vp_link = esc_url( 'https://wordpress.com/plans/' . Jetpack::build_raw_urls( get_home_url() ) );
+ $target = '_blank';
+ }
+ $modules = array('Appearance', 'Developers', 'Mobile', 'Other', 'Photos and Videos', 'Social', 'Site Stats', 'Writing' );
?>
<script id="tmpl-category" type="text/html">
<?php foreach( $modules as $module ){
@@ -24,25 +36,63 @@
<td class="med"><a href="{{ data.url }}" data-name="{{{ data.name }}}"><span class="genericon genericon-help" title="<?php esc_attr_e( 'Learn more', 'jetpack' ); ?>"></span></a><# if ( data.hasConfig ) { #><a href="{{ data.url }}" data-name="{{ data.name }}"><span class="genericon genericon-cog" title="<?php esc_attr_e( 'Configure', 'jetpack' ); ?>"></span></a><# } #></td>
</tr>
</script>
-<script id="tmpl-mod-recommended" type="text/html">
- <div href="{{ data.url }}" tabindex="0" data-index="{{ data.index }}" data-name="{{ data.name }}" class="module{{ data.activated ? ' active' : '' }}">
- <h3 class="icon press {{ data.module }}">{{{ data.name }}}</h3>
- <p>{{{ data.short_description }}}</p>
- <?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?>
- <# if ( data.activated && data.configurable ) { #>
- <span class='configure'><a class="button alignright" href="{{ data.configure_url }}" data-name="{{ data.name }}" title="<?php esc_attr_e( 'Configure', 'jetpack' ); ?>"><?php _e( 'Configure', 'jetpack' ); ?></a></span>
- <# } else if ( !data.activated && data.available ) { #>
- <span class='activate'><a class="button-primary alignright{{ data.configurable ? ' configurable' : ' notconfigurable' }}" href="<?php echo admin_url( 'admin.php' ); ?>?page=jetpack&#038;action=activate&#038;module={{{ data.module }}}&#038;_wpnonce={{{ data.activate_nonce }}}"><?php _e( 'Activate', 'jetpack' ); ?></a></span>
- <# } #>
- <?php endif; ?>
- </div>
-</script>
<script id="tmpl-mod-jumpstart" type="text/html">
<div class="j-col j-lrg-4 jp-jumpstart {{ ( data.activated ) ? 'active' : '' }}">
<strong>{{{ data.name }}}</strong>
<# if ( data.activated ) { #>
- <span class="jp-config-status">Activated</span>
+ <span class="jp-config-status"><?php esc_html_e( 'Activated', 'jetpack' ); ?></span>
<# } #>
<small>{{{ data.jumpstart_desc }}}</small>
</div>
</script>
+<?php // NUX - Performance and security section ?>
+<script id="tmpl-mod-nux" type="text/html">
+ <?php if ( Jetpack::is_development_mode() ) : ?>
+ <div id="toggle-{{ data.module }}" data-index="{{ data.index }}" class="{{ data.activated ? 'activated' : '' }} {{ data.requires_connection && 'vaultpress' !== data.module ? 'unavailable' : '' }} j-row">
+ <?php else : ?>
+ <div id="toggle-{{ data.module }}" data-index="{{ data.index }}" class="{{ data.activated ? 'activated' : '' }} j-row">
+ <?php endif; ?>
+ <div href="{{ data.url }}" tabindex="0" data-index="{{ data.index }}" data-name="{{ data.name }}" class="feat j-col j-lrg-8 j-md-12 j-sm-7">
+ <h4 title="{{ data.name }}" style="cursor: pointer; display: inline;">{{{ data.name }}}</h4>
+ <# if ( 'vaultpress' == data.module ) { #>
+ <span class="paid" title="<?php esc_attr_e( 'Premium Jetpack Service', 'jetpack' ); ?>"><?php esc_attr_e( 'PAID', 'jetpack' ); ?></span>
+ <# } else if ( -1 == data.noConfig || data.configurable ) { #>
+ <a href="{{ data.configure_url }}" class="dashicons dashicons-admin-generic" title="<?php esc_attr_e( 'Configure', 'jetpack' ); ?>"></a>
+ <# } #>
+ <p title="{{ data.short_description }}">{{{ data.short_description }}}</p>
+ </div>
+ <?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?>
+ <div class="act j-col j-lrg-4 j-md-12 j-sm-5">
+ <div class="module-action">
+ <# if ( data.activated ) { #>
+ <input class="is-compact form-toggle" type="checkbox" id="active-{{ data.module }}" checked />
+ <# } else { #>
+ <input class="is-compact form-toggle" type="checkbox" id="active-{{ data.module }}" />
+ <# } #>
+ <label class="form-toggle__label" for="active-{{ data.module }}">
+ <img class="module-spinner-{{ data.module }}" style="display: none;" width="16" height="16" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="Loading ..." />
+ <# if ( 'vaultpress' !== data.module ) { #>
+ <label class="plugin-action__label" for="active-{{ data.module }}">
+ <# if ( data.activated ) { #>
+ <?php _e( 'Active', 'jetpack' ); ?>
+ <# } else { #>
+ <?php _e( 'Inactive', 'jetpack' ); ?>
+ <# } #>
+ </label>
+ <# } #>
+
+ <# if ( 'vaultpress' == data.module ) { #>
+ <?php if ( is_plugin_active( 'vaultpress/vaultpress.php' ) ) : ?>
+ <a href="<?php echo esc_url( $vp_link ); ?>" class="dashicons dashicons-external" title="<?php esc_attr_e( 'Configure', 'jetpack' ); ?>" target="<?php echo $target; ?>"></a>
+ <?php else : ?>
+ <a href="<?php echo esc_url( $vp_link ); ?>" class="lmore" title="<?php esc_attr_e( 'Learn More', 'jetpack' ); ?>" target="<?php echo $target; ?>"><?php _e( 'Learn More', 'jetpack' ); ?></a>
+ <?php endif; ?>
+ <# } else { #>
+ <span class="form-toggle__switch"></span>
+ <# } #>
+ </label>
+ </div>
+ </div>
+ <?php endif; ?>
+ </div><?php // j-row ?>
+</script>
diff --git a/plugins/jetpack/views/admin/module-modal-template.php b/plugins/jetpack/views/admin/module-modal-template.php
index 78471f3e..c2959b04 100644
--- a/plugins/jetpack/views/admin/module-modal-template.php
+++ b/plugins/jetpack/views/admin/module-modal-template.php
@@ -20,7 +20,7 @@
<span class='activate'><a class="button-primary"href="<?php echo admin_url( 'admin.php' ); ?>?page=jetpack&#038;action=activate&#038;module={{{ data.module }}}&#038;_wpnonce={{{ data.activate_nonce }}}"><?php _e( 'Activate', 'jetpack' ); ?></a></span>
<# } #>
</li>
- <# if ( data.configurable ) { #>
+ <# if ( ( data.configurable && -1 !== data.noConfig ) || ( data.activated && -1 == data.noConfig ) ) { #>
<li><a class="button-primary" href="{{ data.configure_url }}"><?php _e( 'Configure', 'jetpack' ); ?></a></li>
<# } #>
</ul>
diff --git a/plugins/jetpack/views/admin/must-connect-main-blog.php b/plugins/jetpack/views/admin/must-connect-main-blog.php
index 0079129d..125a5640 100644
--- a/plugins/jetpack/views/admin/must-connect-main-blog.php
+++ b/plugins/jetpack/views/admin/must-connect-main-blog.php
@@ -2,10 +2,10 @@
<div id="message" class="updated jetpack-message jp-connect" style="display:block !important;">
<div class="jetpack-wrap-container">
<div class="jetpack-text-container">
- <h2><?php _e( 'Get started with Jetpack Multisite', 'jetpack' ); ?></h2>
- <h4>
- <p><?php _e( 'Get started managing your Multisite install of Jetpack by connecting.', 'jetpack' ) ?></p>
- </h4>
+ <h1><?php _e( 'Get started with Jetpack Multisite', 'jetpack' ); ?></h1>
+ <p>
+ <?php _e( 'Get started managing your Multisite install of Jetpack by connecting.', 'jetpack' ) ?>
+ </p>
</div>
<div class="jetpack-install-container">
<p class="submit"><a href="<?php echo esc_url( $data['url'] ); ?>" class="button-connector" id="wpcom-connect"><?php _e( 'Connect to WordPress.com', 'jetpack' ); ?></a></p>
diff --git a/plugins/jetpack/views/admin/my-jetpack-page.php b/plugins/jetpack/views/admin/my-jetpack-page.php
new file mode 100644
index 00000000..aa4a26e0
--- /dev/null
+++ b/plugins/jetpack/views/admin/my-jetpack-page.php
@@ -0,0 +1,173 @@
+<div class="clouds-sm"></div>
+
+<div class="page-content landing">
+ <?php Jetpack::init()->load_view( 'admin/network-activated-notice.php' ); ?>
+
+ <?php
+ /** This action is already documented in views/admin/admin-page.php */
+ do_action( 'jetpack_notices' );
+ ?>
+
+ <div id="my-jetpack-page-template"></div>
+
+ <script id="tmpl-connection-page" type="text/html">
+ <div class="content-container">
+ <div id="my-jetpack-content" class="content">
+ <h2><?php _e( 'My Jetpack', 'jetpack' ); ?></h2>
+
+ <?php
+ /*
+ * 3-column row shown to non-masters
+ */
+ ?>
+ <# if ( ! data.currentUser.isMasterUser || ( ! data.currentUser.isMasterUser && data.masterUser ) ) { #>
+ <div class="connection-details local-user j-row">
+ <?php // left col ?>
+ <div class="j-col j-lrg-4 j-md-6 j-sm-12 jp-user">
+ <h3 title="<?php esc_attr_e( 'Username', 'jetpack' ); ?>"><?php _e( 'Site Username', 'jetpack' ); ?></h3>
+ <div class="user-01">
+ {{{ data.currentUser.gravatar }}} {{{ data.currentUser.adminUsername }}}
+ </div>
+ </div>
+
+ <?php // middle col ?>
+ <div class="j-col j-lrg-4 j-md-6 j-sm-12 wp-user">
+ <h3 title="<?php esc_attr_e( 'WordPress.com Username', 'jetpack' ); ?>"><?php _e( 'WordPress.com Username', 'jetpack' ); ?></h3>
+ <div class="wpuser-02">
+ <# if ( data.currentUser.isUserConnected ) { #>
+ {{{ data.currentUser.userComData.login }}}
+ <# } else { #>
+ <span><em><?php _e( 'Not connected', 'jetpack' ); ?></em></span>
+ <# } #>
+ </div>

+ </div>
+
+ <?php // right col ( Link/Unlink my account ) ?>
+ <div class="j-col j-lrg-4 j-md-12 j-sm-12 wp-action">
+ <?php //@todo h3 tags here for styling purposes ?>
+ <h3>&nbsp</h3>
+ <div class="action-btns">
+ <# if ( data.currentUser.isUserConnected ) { #>
+ <a class="button" title="<?php esc_attr_e( 'Unlink your account from WordPress.com', 'jetpack' ); ?>" href="<?php echo wp_nonce_url( Jetpack::admin_url( 'action=unlink&redirect=my_jetpack' ), 'jetpack-unlink' ); ?>"><?php esc_html_e( 'Unlink my account ', 'jetpack' ); ?></a>
+ <# } else { #>
+ <a class="button button-primary" title="<?php esc_attr_e( 'Link your account to WordPress.com', 'jetpack' ); ?>" href="<?php echo Jetpack::init()->build_connect_url( false, Jetpack::admin_url( array( 'page' => 'my_jetpack' ) ) ); ?>" ><?php esc_html_e( 'Link your account', 'jetpack' ); ?></a>
+ <# } #>
+ </div>
+ </div>
+ </div>
+ <# } #>
+
+
+ <?php
+ /*
+ * 2-column row shown to master users.
+ */
+ ?>
+ <# if ( data.currentUser.isMasterUser ) { #>
+ <div class="connection-details master-user j-row">
+ <?php // Left Col ?>
+ <div class="j-col j-lrg-6 j-md-6 j-sm-12 jp-user">
+ <h3 title="<?php esc_attr_e( 'Primary User of the site', 'jetpack' ); ?>"><?php _e( 'Site Username (Primary)', 'jetpack' ); ?></h3>
+ <div class="user-01">
+ {{{ data.currentUser.gravatar }}} {{{ data.currentUser.adminUsername }}}
+ </div>
+ </div>
+
+ <?php // Right Col ?>
+ <div class="j-col j-lrg-6 j-md-6 j-sm-12 wp-user">
+ <h3 title="<?php esc_attr_e( 'WordPress.com Username', 'jetpack' ); ?>"><?php _e( 'WordPress.com Username', 'jetpack' ); ?></h3>
+ <div class="wpuser-02">
+ <span>{{{ data.currentUser.userComData.login }}}</span>
+ </div>

+ </div>
+ </div>
+ <# } #>
+
+ </div><?php // my-jetpack-content ?>
+
+ <?php
+ /*
+ * User actions, only shown to admins
+ *
+ * Disconnect site, or change primary user
+ */
+ ?>
+ <?php if ( current_user_can( 'jetpack_disconnect' ) ) : ?>
+ <div class="j-row my-jetpack-actions">
+ <div class="j-col j-lrg-6 j-md-6 j-sm-12">
+ <h4><?php _e( 'Jetpack Primary User', 'jetpack' ); ?><a title="<?php esc_attr_e( 'Learn about what being the Primary User means.', 'jetpack' ); ?>" class="dashicons dashicons-editor-help what-is-primary" href="https://jetpack.me/support/primary-user" target="_blank"></a></h4>
+ <?php
+ // Only show dropdown if there are other admins
+ $all_users = count_users();
+ $primary_text = __( '(primary)', 'jetpack' );
+ if ( 1 < $all_users['avail_roles']['administrator'] ) : ?>
+ <form action="" method="post">
+ <select name="jetpack-new-master" id="user-list">
+ <?php
+ $all_users = get_users();
+
+ foreach ( $all_users as $user ) {
+ if ( Jetpack::is_user_connected( $user->ID ) && $user->caps['administrator'] ) {
+ if ( $user->ID == Jetpack_Options::get_option( 'master_user' ) ) {
+ $master_user_option = "<option selected value='{$user->ID}'>$user->user_login $primary_text</option>";
+ } else {
+ $user_options .= "<option value='{$user->ID}'>$user->user_login</option>";
+ }
+ }
+ }
+ // Show master first
+ echo $master_user_option;
+
+ // Show the rest of the linked admins
+ $user_options = ! empty( $user_options ) ? $user_options : printf( __( '%sConnect more admins%s', 'jetpack' ), "<option disabled='disabled'>", "</option>" );
+ echo $user_options;
+ ?>
+ </select>
+ <?php wp_nonce_field( 'jetpack_change_primary_user', '_my_jetpack_nonce' ); ?>
+ <# if ( data.otherAdminsLinked ) { #>
+ <input type="submit" name="jetpack-set-master-user" id="save-primary-btn" class="button button-primary" value="Save" title="<?php esc_attr_e( 'Set the primary account holder', 'jetpack' ); ?>"/>
+ <# } else { #>
+ <input type="submit" disabled="disabled" name="jetpack-set-master-user" id="save-primary-btn" class="button" value="Save" title="<?php esc_attr_e( 'Set the primary account holder', 'jetpack' ); ?>"/>
+ <# } #>
+ </form>
+ <?php else : ?>
+ <p>{{{ data.masterUser.masterUser.data.user_login }}} <?php echo $primary_text; ?></p>
+ <p><em><?php _e( 'Create additional admins to change primary user.', 'jetpack' ); ?></em></p>
+ <?php endif; ?>
+ </div>
+ <div class="j-col j-lrg-6 j-md-6 j-sm-12">
+ <h4><?php _e( 'Disconnect Jetpack', 'jetpack' ); ?></h4>
+ <a class="button" id="jetpack-disconnect" href="#"><?php esc_html_e( 'Disconnect site from WordPress.com', 'jetpack' ); ?></a>
+ </div>
+ </div>
+
+ <div id="jetpack-disconnect-content">
+ <div class="j-row">
+ <div class="j-col j-lrg-12 j-md-12 j-sm-12">
+
+ <?php if ( ! Jetpack::is_staging_site() ) : ?>
+ <h2><?php _e( 'Disconnecting Jetpack', 'jetpack' ); ?></h2>
+ <p><?php _e( 'Before you completely disconnect Jetpack is there anything we can do to help?', 'jetpack' ); ?></p>
+ <a class="button" id="confirm-disconnect" title="<?php esc_attr_e( 'Disconnect Jetpack', 'jetpack' ); ?>" href="<?php echo wp_nonce_url( Jetpack::admin_url( 'action=disconnect' ), 'jetpack-disconnect' ); ?>"><?php _e( 'Confirm Disconnect', 'jetpack' ); ?></a>
+ <a class="button primary" id="support-no-disconnect" target="_blank" title="<?php esc_attr_e( 'Jetpack Support', 'jetpack' ); ?>" href="http://jetpack.me/contact-support/"><?php esc_html_e( 'I Need Support', 'jetpack' ); ?></a>
+ <?php else : ?>
+ <h2><?php _e( 'Can not disconnect Jetpack', 'jetpack' ); ?></h2>
+ <p><?php
+ printf(
+ __( 'Disconnecting is not possible while in staging mode.<br /><a href="%s" target="_blank">Learn more about how staging sites work</a>.', 'jetpack' ),
+ 'https://jetpack.me/support/why-cant-i-disconnect-my-site/'
+ );
+ ?></p>
+ <input type="button" class="button" disabled="disabled" id="confirm-disconnect" value="<?php _e( 'Confirm Disconnect', 'jetpack' ); ?>">
+ <a class="button primary" id="support-no-disconnect" target="_blank" title="<?php esc_attr_e( 'Jetpack Support', 'jetpack' ); ?>" href="https://jetpack.me/support/why-cant-i-disconnect-my-site/"><?php esc_html_e( 'I Need Support', 'jetpack' ); ?></a>
+ <?php endif; ?>
+ <a class="cancel-disconnect" id="cancel-disconnect" target="_blank" title="<?php esc_attr_e( 'cancel', 'jetpack' ); ?>" href="#"><?php esc_html_e( 'cancel', 'jetpack' ); ?></a>
+
+ </div>
+
+ </div>
+ </div>
+ <?php endif;?>
+ </div><?php // div.content-container ?>
+ </script>
+</div><?php // div.page-content ?>
diff --git a/plugins/jetpack/views/admin/network-admin-alert.php b/plugins/jetpack/views/admin/network-admin-alert.php
index 9b378439..2d14d209 100644
--- a/plugins/jetpack/views/admin/network-admin-alert.php
+++ b/plugins/jetpack/views/admin/network-admin-alert.php
@@ -1,9 +1,9 @@
<div id="message" class="updated jetpack-message jp-connect" style="display:block !important;">
<div class="jetpack-wrap-container">
<div class="jetpack-text-container">
- <h4>
- <p><?php echo $data['notice']; ?></p>
- </h4>
+ <h2>
+ <?php echo $data['notice']; ?>
+ </h2>
</div>
</div>
</div>
diff --git a/plugins/jetpack/views/admin/network-admin-header.php b/plugins/jetpack/views/admin/network-admin-header.php
index 8c20a4c4..8782ed74 100644
--- a/plugins/jetpack/views/admin/network-admin-header.php
+++ b/plugins/jetpack/views/admin/network-admin-header.php
@@ -8,6 +8,7 @@
<h2 style="display: none"></h2> <!-- For WP JS message relocation -->
- <?php
+ <?php
Jetpack::init()->load_view( 'admin/network-activated-notice.php' );
- do_action( 'jetpack_notices' );
+ /** This action is already documented in views/admin/admin-page.php */
+ do_action( 'jetpack_notices' );
diff --git a/plugins/jetpack/views/admin/network-settings.php b/plugins/jetpack/views/admin/network-settings.php
index fef9f12b..b0008a50 100644
--- a/plugins/jetpack/views/admin/network-settings.php
+++ b/plugins/jetpack/views/admin/network-settings.php
@@ -1,21 +1,19 @@
-<?php
- extract( $data );
+<?php extract( $data ); ?>
+<?php if ( isset( $_GET['updated'] ) && 'true' == $_GET['updated'] ) : ?>
+ <div class="updated"><?php esc_html_e( 'Jetpack Network Settings Updated!', 'jetpack' ); ?></div>
+<?php endif; ?>
-if( isset( $_GET['updated'] ) && 'true' == $_GET['updated'] ) {
-?>
-
-<div class="updated"><?php esc_html_e( 'Jetpack Network Settings Updated!', 'jetpack' ); ?></div>
-
-<?php
-}
-?>
+<?php if ( isset( $_GET['error'] ) && 'jetpack_protect_whitelist' == $_GET['error'] ) : ?>
+ <div class="error"><?php esc_html_e( 'One of your IP addresses was not valid.', 'jetpack' ); ?></div>
+<?php endif; ?>
<div class="wrap">
<h2><?php _e( 'Network Settings', 'jetpack' ); ?></h2>
<form action="edit.php?action=jetpack-network-settings" method="POST">
<h3><?php _e( 'Global', 'jetpack' ); ?></h3>
<p><?php _e( 'These settings affect all sites on the network.', 'jetpack' ); ?></p>
+ <?php wp_nonce_field( 'jetpack-network-settings' ); ?>
<table class="form-table">
<?php /*
<tr valign="top">
@@ -33,6 +31,15 @@ if( isset( $_GET['updated'] ) && 'true' == $_GET['updated'] ) {
<label for="sub-site-override"><?php _e( 'Allow individual site administrators to manage their own connections (connect and disconnect) to <a href="//wordpress.com">WordPress.com</a>', 'jetpack' ); ?></label>
</td>
</tr>
+
+ <tr valign="top">
+ <th scope="row"><label for="sub-site-override"><?php _e( 'Protect whitelist', 'jetpack' ); ?></label></th>
+ <td>
+ <p><strong><?php printf( __( 'Your current IP: %s', 'jetpack' ), jetpack_protect_get_ip() ); ?></strong></p>
+ <textarea name="global-whitelist" style="width: 100%;" rows="8"><?php echo implode( PHP_EOL, $jetpack_protect_whitelist['global'] ); ?></textarea> <br />
+ <label for="global-whitelist"><?php _e('IPv4 and IPv6 are acceptable. <br />To specify a range, enter the low value and high value separated by a dash. Example: 12.12.12.1-12.12.12.100', 'jetpack' ); ?></label>
+ </td>
+ </tr>
<?php /* Remove the toggles for 2.9, re-evaluate how they're done and added for a 3.0 release. They don't feel quite right yet.
<tr>
<th scope="row"><label for="manage_auto_activated_modules">Manage modules</label></th>