summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules')
-rw-r--r--plugins/jetpack/modules/after-the-deadline.php2
-rw-r--r--plugins/jetpack/modules/after-the-deadline/jquery.atd.js2
-rw-r--r--plugins/jetpack/modules/after-the-deadline/tinymce/editor_plugin.js2
-rw-r--r--plugins/jetpack/modules/after-the-deadline/tinymce/plugin.js2
-rw-r--r--plugins/jetpack/modules/blocks.php31
-rw-r--r--plugins/jetpack/modules/calypsoify/class.jetpack-calypsoify.php70
-rw-r--r--plugins/jetpack/modules/calypsoify/gutenberg-styles/button.scss143
-rw-r--r--plugins/jetpack/modules/calypsoify/style-gutenberg-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/calypsoify/style-gutenberg.min.css2
-rw-r--r--plugins/jetpack/modules/calypsoify/style-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/calypsoify/style.min.css2
-rw-r--r--plugins/jetpack/modules/carousel.php3
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel-ie8fix.css13
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel-rtl.css2
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel.js18
-rw-r--r--plugins/jetpack/modules/carousel/jetpack-carousel.php50
-rw-r--r--plugins/jetpack/modules/comment-likes.php6
-rw-r--r--plugins/jetpack/modules/contact-form.php7
-rw-r--r--plugins/jetpack/modules/contact-form/admin.php2
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.css60
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css3
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.min.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-style-rtl.css32
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-style-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-style.css3
-rw-r--r--plugins/jetpack/modules/contact-form/css/editor-style.min.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/grunion-rtl.css2
-rw-r--r--plugins/jetpack/modules/contact-form/css/grunion.css1
-rw-r--r--plugins/jetpack/modules/contact-form/grunion-contact-form.php133
-rw-r--r--plugins/jetpack/modules/copy-post.php338
-rw-r--r--plugins/jetpack/modules/custom-css.php22
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php6
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/lang.inc.php2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css-4.7.php22
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/codemirror.css2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/rtl/codemirror-rtl.css2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js2
-rw-r--r--plugins/jetpack/modules/gravatar-hovercards.php3
-rw-r--r--plugins/jetpack/modules/infinite-scroll.php11
-rw-r--r--plugins/jetpack/modules/infinite-scroll/infinity.php8
-rw-r--r--plugins/jetpack/modules/lazy-images.php4
-rw-r--r--plugins/jetpack/modules/lazy-images/lazy-images.php15
-rw-r--r--plugins/jetpack/modules/likes.php104
-rw-r--r--plugins/jetpack/modules/likes/jetpack-likes-settings.php82
-rw-r--r--plugins/jetpack/modules/likes/queuehandler.js2
-rw-r--r--plugins/jetpack/modules/markdown/easy-markdown.php3
-rw-r--r--plugins/jetpack/modules/masterbar.php14
-rw-r--r--plugins/jetpack/modules/masterbar/masterbar.php4
-rw-r--r--plugins/jetpack/modules/minileven/minileven.php7
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php12
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php7
-rw-r--r--plugins/jetpack/modules/minileven/theme/pub/minileven/rtl.css8
-rw-r--r--plugins/jetpack/modules/module-extras.php11
-rw-r--r--plugins/jetpack/modules/module-headings.php42
-rw-r--r--plugins/jetpack/modules/module-info.php15
-rw-r--r--plugins/jetpack/modules/monitor.php4
-rw-r--r--plugins/jetpack/modules/photon-cdn.php42
-rw-r--r--plugins/jetpack/modules/photon-cdn/jetpack-manifest.php785
-rw-r--r--plugins/jetpack/modules/photon.php6
-rw-r--r--plugins/jetpack/modules/plugin-search.php602
-rw-r--r--plugins/jetpack/modules/plugin-search/plugin-search.css84
-rw-r--r--plugins/jetpack/modules/plugin-search/plugin-search.js264
-rw-r--r--plugins/jetpack/modules/plugin-search/psh-128.pngbin0 -> 12524 bytes
-rw-r--r--plugins/jetpack/modules/plugin-search/psh-256.pngbin0 -> 27512 bytes
-rw-r--r--plugins/jetpack/modules/plugin-search/psh.svg1
-rw-r--r--plugins/jetpack/modules/protect.php10
-rw-r--r--plugins/jetpack/modules/protect/blocked-login-page.php2
-rw-r--r--plugins/jetpack/modules/protect/math-fallback.php70
-rw-r--r--plugins/jetpack/modules/publicize.php9
-rw-r--r--plugins/jetpack/modules/publicize/assets/connected.gifbin1681 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/publicize/assets/facebook-logo.pngbin18719 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/publicize/assets/linkedin-logo.pngbin6783 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize-rtl.css227
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css1
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize.css226
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize.js184
-rw-r--r--plugins/jetpack/modules/publicize/assets/publicize.min.css2
-rw-r--r--plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css200
-rw-r--r--plugins/jetpack/modules/publicize/assets/spinner.gifbin457 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/publicize/assets/tumblr-logo.pngbin8902 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/publicize/assets/twitter-logo.pngbin4524 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/publicize/publicize-jetpack.php20
-rw-r--r--plugins/jetpack/modules/publicize/publicize.php55
-rw-r--r--plugins/jetpack/modules/publicize/ui.php349
-rw-r--r--plugins/jetpack/modules/pwa/class.jetpack-pwa-helpers.php4
-rw-r--r--plugins/jetpack/modules/related-posts.php7
-rw-r--r--plugins/jetpack/modules/related-posts/class.related-posts-customize.php32
-rw-r--r--plugins/jetpack/modules/related-posts/jetpack-related-posts.php320
-rw-r--r--plugins/jetpack/modules/related-posts/related-posts-rtl.css2
-rw-r--r--plugins/jetpack/modules/related-posts/related-posts.css92
-rw-r--r--plugins/jetpack/modules/related-posts/related-posts.js18
-rw-r--r--plugins/jetpack/modules/search.php4
-rw-r--r--plugins/jetpack/modules/search/class.jetpack-search.php61
-rw-r--r--plugins/jetpack/modules/sharedaddy.php7
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css34
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing.css34
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing.js3
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing.min.css2
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/googleplus1.pngbin602 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.pngbin1134 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/icon-googleplus-2x.pngbin1333 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/icon-googleplus.pngbin722 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.pngbin2323 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.pngbin3398 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing-service.php29
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing-sources.php228
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.css35
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.js5
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.php76
-rw-r--r--plugins/jetpack/modules/shortcodes.php16
-rw-r--r--plugins/jetpack/modules/shortcodes/archiveorg-book.php6
-rw-r--r--plugins/jetpack/modules/shortcodes/archiveorg.php14
-rw-r--r--plugins/jetpack/modules/shortcodes/brightcove.php27
-rw-r--r--plugins/jetpack/modules/shortcodes/crowdsignal.php53
-rw-r--r--plugins/jetpack/modules/shortcodes/css/slideshow-shortcode-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.min.css2
-rw-r--r--plugins/jetpack/modules/shortcodes/email-subscribe.php6
-rw-r--r--plugins/jetpack/modules/shortcodes/getty.php44
-rw-r--r--plugins/jetpack/modules/shortcodes/googleapps.php62
-rw-r--r--plugins/jetpack/modules/shortcodes/googleplus.php11
-rw-r--r--plugins/jetpack/modules/shortcodes/gravatar.php14
-rw-r--r--plugins/jetpack/modules/shortcodes/hulu.php68
-rw-r--r--plugins/jetpack/modules/shortcodes/instagram.php88
-rw-r--r--plugins/jetpack/modules/shortcodes/kickstarter.php8
-rw-r--r--plugins/jetpack/modules/shortcodes/lytro.php296
-rw-r--r--plugins/jetpack/modules/shortcodes/mailchimp.php59
-rw-r--r--plugins/jetpack/modules/shortcodes/quiz.php41
-rw-r--r--plugins/jetpack/modules/shortcodes/sitemap.php2
-rw-r--r--plugins/jetpack/modules/shortcodes/slideshare.php7
-rw-r--r--plugins/jetpack/modules/shortcodes/tweet.php167
-rw-r--r--plugins/jetpack/modules/shortcodes/unavailable.php34
-rw-r--r--plugins/jetpack/modules/shortcodes/ustream.php88
-rw-r--r--plugins/jetpack/modules/shortcodes/wordads.php6
-rw-r--r--plugins/jetpack/modules/shortcodes/youtube.php6
-rw-r--r--plugins/jetpack/modules/shortlinks.php47
-rw-r--r--plugins/jetpack/modules/simple-payments/simple-payments.php19
-rw-r--r--plugins/jetpack/modules/sitemaps.php1
-rw-r--r--plugins/jetpack/modules/sitemaps/sitemap-builder.php16
-rw-r--r--plugins/jetpack/modules/sso.php83
-rw-r--r--plugins/jetpack/modules/stats.php56
-rw-r--r--plugins/jetpack/modules/subscriptions.php367
-rw-r--r--plugins/jetpack/modules/subscriptions/readme.md12
-rw-r--r--plugins/jetpack/modules/subscriptions/subscriptions.css22
-rw-r--r--plugins/jetpack/modules/subscriptions/views.php755
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentynineteen-rtl.css1
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentynineteen.css85
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentynineteen.php2
-rw-r--r--plugins/jetpack/modules/theme-tools/compat/twentysixteen.php4
-rw-r--r--plugins/jetpack/modules/theme-tools/featured-content.php15
-rw-r--r--plugins/jetpack/modules/theme-tools/responsive-videos.php30
-rw-r--r--plugins/jetpack/modules/theme-tools/social-menu/icon-functions.php4
-rw-r--r--plugins/jetpack/modules/theme-tools/social-menu/social-menu.css4
-rw-r--r--plugins/jetpack/modules/theme-tools/social-menu/social-menu.svg3
-rw-r--r--plugins/jetpack/modules/tiled-gallery.php14
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery.php1
-rw-r--r--plugins/jetpack/modules/vaultpress.php7
-rw-r--r--plugins/jetpack/modules/videopress.php5
-rw-r--r--plugins/jetpack/modules/videopress/class.jetpack-videopress.php2
-rw-r--r--plugins/jetpack/modules/videopress/class.videopress-gutenberg.php169
-rw-r--r--plugins/jetpack/modules/videopress/class.videopress-options.php2
-rw-r--r--plugins/jetpack/modules/widget-visibility/widget-conditions.php2
-rw-r--r--plugins/jetpack/modules/widgets.php26
-rw-r--r--plugins/jetpack/modules/widgets/blog-stats.php2
-rw-r--r--plugins/jetpack/modules/widgets/contact-info.php37
-rw-r--r--plugins/jetpack/modules/widgets/eu-cookie-law/style.css1
-rw-r--r--plugins/jetpack/modules/widgets/google-plus/js/admin.js22
-rw-r--r--plugins/jetpack/modules/widgets/googleplus-badge.php330
-rw-r--r--plugins/jetpack/modules/widgets/milestone/milestone.php8
-rw-r--r--plugins/jetpack/modules/widgets/my-community.php13
-rw-r--r--plugins/jetpack/modules/widgets/search.php31
-rw-r--r--plugins/jetpack/modules/widgets/social-icons.php39
-rw-r--r--plugins/jetpack/modules/widgets/top-posts.php2
-rw-r--r--plugins/jetpack/modules/widgets/twitter-timeline.php16
-rw-r--r--plugins/jetpack/modules/woocommerce-analytics/classes/wp-woocommerce-analytics-universal.php57
-rw-r--r--plugins/jetpack/modules/woocommerce-analytics/wp-woocommerce-analytics.php17
-rw-r--r--plugins/jetpack/modules/wordads/php/params.php2
-rw-r--r--plugins/jetpack/modules/wordads/wordads.php109
182 files changed, 5493 insertions, 3569 deletions
diff --git a/plugins/jetpack/modules/after-the-deadline.php b/plugins/jetpack/modules/after-the-deadline.php
index a30b38be..a856efbe 100644
--- a/plugins/jetpack/modules/after-the-deadline.php
+++ b/plugins/jetpack/modules/after-the-deadline.php
@@ -223,7 +223,7 @@ function AtD_load_javascripts() {
array('jquery'),
ATD_VERSION
);
- wp_enqueue_script( 'AtD_settings', admin_url() . 'admin-ajax.php?action=atd_settings', array('AtD_jquery'), ATD_VERSION );
+ wp_enqueue_script( 'AtD_settings', admin_url( 'admin-ajax.php?action=atd_settings' ), array('AtD_jquery'), ATD_VERSION );
wp_enqueue_script(
'AtD_autoproofread',
Jetpack::get_file_url_for_environment(
diff --git a/plugins/jetpack/modules/after-the-deadline/jquery.atd.js b/plugins/jetpack/modules/after-the-deadline/jquery.atd.js
index 703edad9..1ffd8a01 100644
--- a/plugins/jetpack/modules/after-the-deadline/jquery.atd.js
+++ b/plugins/jetpack/modules/after-the-deadline/jquery.atd.js
@@ -15,7 +15,7 @@
*/
/* jshint onevar: false, sub: true, smarttabs: true, loopfunc: true */
-/* global AtDCore, AtD_proofread_click_count, CSSHttpRequest, ActiveXObject */
+/* global AtDCore, AtD_proofread_click_count:true, CSSHttpRequest, ActiveXObject */
var AtD =
{
diff --git a/plugins/jetpack/modules/after-the-deadline/tinymce/editor_plugin.js b/plugins/jetpack/modules/after-the-deadline/tinymce/editor_plugin.js
index 34cb2e36..198c9a5d 100644
--- a/plugins/jetpack/modules/after-the-deadline/tinymce/editor_plugin.js
+++ b/plugins/jetpack/modules/after-the-deadline/tinymce/editor_plugin.js
@@ -16,7 +16,7 @@
*/
/* jshint onevar: false, sub: true, devel: true, loopfunc: true */
-/* global tinymce, AtDCore, AtD_proofread_click_count */
+/* global tinymce, AtDCore, AtD_proofread_click_count:true */
(function()
{
diff --git a/plugins/jetpack/modules/after-the-deadline/tinymce/plugin.js b/plugins/jetpack/modules/after-the-deadline/tinymce/plugin.js
index 1a71ce8b..27cf86f8 100644
--- a/plugins/jetpack/modules/after-the-deadline/tinymce/plugin.js
+++ b/plugins/jetpack/modules/after-the-deadline/tinymce/plugin.js
@@ -85,7 +85,7 @@ tinymce.PluginManager.add( 'AtD', function( editor ) {
function checkIfFinished() {
if ( ! editor.dom.select('span.hiddenSpellError, span.hiddenGrammarError, span.hiddenSuggestion').length ) {
if ( suggestionsMenu ) {
- suggestionsMenu.hideMenu();
+ suggestionsMenu.hide();
}
finish();
diff --git a/plugins/jetpack/modules/blocks.php b/plugins/jetpack/modules/blocks.php
index 392978eb..88c13090 100644
--- a/plugins/jetpack/modules/blocks.php
+++ b/plugins/jetpack/modules/blocks.php
@@ -1,33 +1,6 @@
<?php
/**
- * Load code specific to Gutenberg blocks which are not tied to a module.
- * This file is unusual, and is not an actual `module` as such.
- * It is included in ./module-extras.php
+ * Deprecated. No longer needed.
*
+ * @package Jetpack
*/
-
-jetpack_register_block(
- 'map',
- array(
- 'render_callback' => 'jetpack_map_block_load_assets',
- )
-);
-
-/**
- * Map block registration/dependency declaration.
- *
- * @param array $attr - Array containing the map block attributes.
- * @param string $content - String containing the map block content.
- *
- * @return string
- */
-function jetpack_map_block_load_assets( $attr, $content ) {
- $dependencies = array(
- 'lodash',
- 'wp-element',
- 'wp-i18n',
- 'wp-api-fetch',
- );
- Jetpack_Gutenberg::load_assets_as_required( 'map', $dependencies );
- return $content;
-}
diff --git a/plugins/jetpack/modules/calypsoify/class.jetpack-calypsoify.php b/plugins/jetpack/modules/calypsoify/class.jetpack-calypsoify.php
index 769535a8..0838bb3f 100644
--- a/plugins/jetpack/modules/calypsoify/class.jetpack-calypsoify.php
+++ b/plugins/jetpack/modules/calypsoify/class.jetpack-calypsoify.php
@@ -1,7 +1,7 @@
<?php
/*
* This is Calypso skin of the wp-admin interface that is conditionally triggered via the ?calypsoify=1 param.
- * Portted from an internal Automattic plugin.
+ * Ported from an internal Automattic plugin.
*/
class Jetpack_Calypsoify {
@@ -20,39 +20,44 @@ class Jetpack_Calypsoify {
}
public function setup() {
- add_action( 'admin_init', array( $this, 'check_param' ) );
+ add_action( 'admin_init', array( $this, 'check_param' ), 4 );
+
if ( 1 == (int) get_user_meta( get_current_user_id(), 'calypsoify', true ) ) {
+ add_action( 'admin_init', array( $this, 'setup_admin' ), 6 );
+ }
- // Masterbar is currently required for this to work properly. Mock the instance of it
- if ( ! Jetpack::is_module_active( 'masterbar' ) ) {
- $this->mock_masterbar_activation();
- }
+ // Make this always available -- in case calypsoify gets toggled off.
+ add_action( 'wp_ajax_jetpack_toggle_autoupdate', array( $this, 'jetpack_toggle_autoupdate' ) );
+ add_filter( 'handle_bulk_actions-plugins', array( $this, 'handle_bulk_actions_plugins' ), 10, 3 );
+ }
- if ( $this->is_page_gutenberg() ) {
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_for_gutenberg' ), 100 );
- return;
- }
- add_action( 'admin_init', array( $this, 'check_page' ) );
- add_action( 'admin_menu', array( $this, 'remove_core_menus' ), 100 );
- add_action( 'admin_menu', array( $this, 'add_plugin_menus' ), 101 );
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 100 );
- add_action( 'in_admin_header', array( $this, 'insert_sidebar_html' ) );
- add_action( 'wp_before_admin_bar_render', array( $this, 'modify_masterbar' ), 100000 );
+ public function setup_admin() {
+ // Masterbar is currently required for this to work properly. Mock the instance of it
+ if ( ! Jetpack::is_module_active( 'masterbar' ) ) {
+ $this->mock_masterbar_activation();
+ }
+ if ( $this->is_page_gutenberg() ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_for_gutenberg' ), 100 );
+ return;
+ }
- add_filter( 'get_user_option_admin_color', array( $this, 'admin_color_override' ) );
+ add_action( 'admin_init', array( $this, 'check_page' ) );
+ add_action( 'admin_menu', array( $this, 'remove_core_menus' ), 100 );
+ add_action( 'admin_menu', array( $this, 'add_plugin_menus' ), 101 );
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 100 );
+ add_action( 'in_admin_header', array( $this, 'insert_sidebar_html' ) );
+ add_action( 'wp_before_admin_bar_render', array( $this, 'modify_masterbar' ), 100000 );
- add_action( 'manage_plugins_columns', array( $this, 'manage_plugins_columns_header' ) );
- add_action( 'manage_plugins_custom_column', array( $this, 'manage_plugins_custom_column' ), 10, 2 );
- add_filter( 'bulk_actions-plugins', array( $this, 'bulk_actions_plugins' ) );
+ add_filter( 'get_user_option_admin_color', array( $this, 'admin_color_override' ) );
- if ( 'plugins.php' === basename( $_SERVER['PHP_SELF'] ) ) {
- add_action( 'admin_notices', array( $this, 'plugins_admin_notices' ) );
- }
+ add_action( 'manage_plugins_columns', array( $this, 'manage_plugins_columns_header' ) );
+ add_action( 'manage_plugins_custom_column', array( $this, 'manage_plugins_custom_column' ), 10, 2 );
+ add_filter( 'bulk_actions-plugins', array( $this, 'bulk_actions_plugins' ) );
+
+ if ( 'plugins.php' === basename( $_SERVER['PHP_SELF'] ) ) {
+ add_action( 'admin_notices', array( $this, 'plugins_admin_notices' ) );
}
- // Make this always available -- in case calypsoify gets toggled off.
- add_action( 'wp_ajax_jetpack_toggle_autoupdate', array( $this, 'jetpack_toggle_autoupdate' ) );
- add_filter( 'handle_bulk_actions-plugins', array( $this, 'handle_bulk_actions_plugins' ), 10, 3 );
}
public function manage_plugins_columns_header( $columns ) {
@@ -332,21 +337,10 @@ class Jetpack_Calypsoify {
* @since 6.7.0
*/
public function is_post_type_gutenberg( $post_type ) {
- // @TODO: Remove function check once 5.0 is the minimum supported WP version.
- if ( function_exists( 'use_block_editor_for_post_type' ) ) {
- return use_block_editor_for_post_type( $post_type );
- } else {
- // We use the filter introduced in WordPress 5.0 to be backwards compatible.
- /** This filter is already documented in core/wp-admin/includes/post.php */
- return apply_filters( 'use_block_editor_for_post_type', true, $post_type );
- }
+ return use_block_editor_for_post_type( $post_type );
}
public function is_page_gutenberg() {
- if ( ! Jetpack_Gutenberg::is_gutenberg_available() ) {
- return false;
- }
-
$page = wp_basename( esc_url( $_SERVER['REQUEST_URI'] ) );
if ( false !== strpos( $page, 'post-new.php' ) && empty ( $_GET['post_type'] ) ) {
diff --git a/plugins/jetpack/modules/calypsoify/gutenberg-styles/button.scss b/plugins/jetpack/modules/calypsoify/gutenberg-styles/button.scss
new file mode 100644
index 00000000..38c256e8
--- /dev/null
+++ b/plugins/jetpack/modules/calypsoify/gutenberg-styles/button.scss
@@ -0,0 +1,143 @@
+.components-button {
+ &.is-default {
+ color: $muriel-gray-700;
+ border-color: $muriel-gray-100;
+ background: $white;
+ box-shadow: none;
+ border-width: 1px 1px 2px;
+
+ &:hover {
+ background: $white;
+ border-color: $muriel-gray-200;
+ box-shadow: none;
+ color: $muriel-gray-700;
+ }
+
+ &:focus:enabled {
+ background: $white;
+ color: $muriel-gray-700;
+ border-color: $color-primary;
+ box-shadow: 0 0 0 2px $color-primary-light;
+ }
+
+ &:active:enabled {
+ background: $white;
+ border-color: $muriel-gray-100;
+ border-width: 2px 1px 1px;
+ box-shadow: none;
+ }
+
+ &:disabled,
+ &[aria-disabled='true'] {
+ color: $muriel-gray-50;
+ background-color: $white;
+ border-color: $muriel-gray-50;
+ text-shadow: none;
+ }
+ }
+
+ &.is-primary {
+ background: $color-accent;
+ border-color: $color-accent-dark;
+ box-shadow: none;
+ color: $white;
+ text-shadow: none;
+
+ &:focus:enabled {
+ background: $muriel-hot-pink-400;
+ border-color: $color-accent;
+ color: $white;
+ box-shadow: 0 0 0 2px $color-accent-light;
+ }
+
+ &:hover {
+ box-shadow: none;
+ background: $muriel-hot-pink-400;
+ border-color: $color-accent-dark;
+ color: $white;
+ }
+
+ &:focus:enabled {
+ box-shadow: 0 0 0 2px $color-accent-light;
+ }
+
+ &:active:enabled {
+ background: $muriel-hot-pink-400;
+ border-color: $color-accent-dark;
+ box-shadow: inset 0 1px 0 $color-accent-dark;
+ }
+
+ &:disabled,
+ &[aria-disabled='true'] {
+ color: $muriel-gray-50;
+ background: $white;
+ border-color: $muriel-gray-50;
+ text-shadow: none;
+
+ &:hover,
+ &:focus,
+ &:active {
+ color: $muriel-gray-50;
+ background-color: $white;
+ border-color: $muriel-gray-50;
+ box-shadow: none;
+ }
+ }
+
+ &.is-busy,
+ &.is-busy:disabled,
+ &.is-busy[aria-disabled='true'] {
+ background-image: linear-gradient(
+ -45deg,
+ $color-accent 28%,
+ $muriel-hot-pink-600 28%,
+ $muriel-hot-pink-600 72%,
+ $color-accent 72%
+ );
+ border-color: $color-accent-dark;
+ }
+ }
+
+ /* Buttons that look like links, for a cross of good semantics with the visual */
+ &.is-link {
+ color: $color-link;
+
+ &:hover,
+ &:active {
+ color: $color-link-dark;
+ }
+
+ &:focus {
+ color: $color-link-dark;
+ box-shadow: 0 0 0 2px $color-primary-light;
+ }
+ }
+
+ /* Link buttons that are red to indicate destructive behavior. */
+ &.is-link.is-destructive {
+ color: $alert-red;
+ }
+
+ &:focus:enabled {
+ // @include button-style__focus-active;
+ }
+
+ &.is-busy {
+ background-image: repeating-linear-gradient(
+ -45deg,
+ $muriel-gray-500,
+ $white 11px,
+ $white 10px,
+ $muriel-gray-500 20px
+ );
+ }
+
+ // Buttons that are text-based.
+ &.is-tertiary {
+ color: $color-link;
+
+ &:not( :disabled ):not( [aria-disabled='true'] ):not( .is-default ):hover {
+ color: $color-link-dark;
+ }
+ }
+}
diff --git a/plugins/jetpack/modules/calypsoify/style-gutenberg-rtl.min.css b/plugins/jetpack/modules/calypsoify/style-gutenberg-rtl.min.css
index ad3c11ba..002de0ee 100644
--- a/plugins/jetpack/modules/calypsoify/style-gutenberg-rtl.min.css
+++ b/plugins/jetpack/modules/calypsoify/style-gutenberg-rtl.min.css
@@ -1,4 +1,4 @@
/* Do not modify this file directly. It is compiled SASS code. */
-.edit-post-more-menu__content .components-menu-group:first-child .components-menu-item__button:last-child{display:none}.editor-inserter__manage-reusable-blocks,a.components-menu-item__button[href*="post_type=wp_block"]{display:none}.wp-toolbar .revision-php{margin-top:-32px}.revision-php{background:#f3f6f8}.revision-php #wpadminbar,.revision-php #adminmenumain,.revision-php #wp-admin-bar-menu-toggle{display:none}.revision-php #wpcontent{margin-right:0 !important}.revision-php #wpbody{padding-top:0}.revision-php #screen-meta-links{display:none !important}.revision-php #wpfooter{display:none !important}.revision-tickmarks{margin-top:8px}.revisions-controls{height:118px}.revisions-controls .author-card .avatar{border-radius:50%;height:38px;margin-top:4px;width:38px}.revisions-controls .author-card .author-info{line-height:20px;margin-top:4px}.comparing-two-revisions .revisions-controls{height:176px}.revisions-meta{margin-top:28px}.diff-meta{min-height:46px}.revision-toggle-compare-mode label{vertical-align:top}.revisions-tooltip{-ms-transform:translateY(-36px);transform:translateY(-36px)}
+.components-button.is-default{color:#3d4145;border-color:#ccced0;background:#fff;box-shadow:none;border-width:1px 1px 2px}.components-button.is-default:hover{background:#fff;border-color:#b0b5b8;box-shadow:none;color:#3d4145}.components-button.is-default:focus:enabled{background:#fff;color:#3d4145;border-color:#016087;box-shadow:0 0 0 2px #6f93ad}.components-button.is-default:active:enabled{background:#fff;border-color:#ccced0;border-width:2px 1px 1px;box-shadow:none}.components-button.is-default:disabled,.components-button.is-default[aria-disabled='true']{color:#e1e2e2;background-color:#fff;border-color:#e1e2e2;text-shadow:none}.components-button.is-primary{background:#d52c82;border-color:#992053;box-shadow:none;color:#fff;text-shadow:none}.components-button.is-primary:focus:enabled{background:#ff3997;border-color:#d52c82;color:#fff;box-shadow:0 0 0 2px #ff76b8}.components-button.is-primary:hover{box-shadow:none;background:#ff3997;border-color:#992053;color:#fff}.components-button.is-primary:focus:enabled{box-shadow:0 0 0 2px #ff76b8}.components-button.is-primary:active:enabled{background:#ff3997;border-color:#992053;box-shadow:inset 0 1px 0 #992053}.components-button.is-primary:disabled,.components-button.is-primary[aria-disabled='true']{color:#e1e2e2;background:#fff;border-color:#e1e2e2;text-shadow:none}.components-button.is-primary:disabled:hover,.components-button.is-primary:disabled:focus,.components-button.is-primary:disabled:active,.components-button.is-primary[aria-disabled='true']:hover,.components-button.is-primary[aria-disabled='true']:focus,.components-button.is-primary[aria-disabled='true']:active{color:#e1e2e2;background-color:#fff;border-color:#e1e2e2;box-shadow:none}.components-button.is-primary.is-busy,.components-button.is-primary.is-busy:disabled,.components-button.is-primary.is-busy[aria-disabled='true']{background-image:linear-gradient(45deg, #d52c82 28%, #b7266a 28%, #b7266a 72%, #d52c82 72%);border-color:#992053}.components-button.is-link{color:#016087}.components-button.is-link:hover,.components-button.is-link:active{color:#23354b}.components-button.is-link:focus{color:#23354b;box-shadow:0 0 0 2px #6f93ad}.components-button.is-link.is-destructive{color:#ff4b1c}.components-button.is-busy{background-image:repeating-linear-gradient(45deg, #636d75, #fff 11px, #fff 10px, #636d75 20px)}.components-button.is-tertiary{color:#016087}.components-button.is-tertiary:not(:disabled):not([aria-disabled='true']):not(.is-default):hover{color:#23354b}.edit-post-more-menu__content .components-menu-group:first-child .components-menu-item__button:last-child{display:none}.editor-inserter__manage-reusable-blocks,a.components-menu-item__button[href*="post_type=wp_block"]{display:none}.edit-post-sidebar__panel-tab.is-active{border-color:#016087}.edit-post-sidebar .input-control:focus,.edit-post-sidebar input[type='checkbox']:focus,.edit-post-sidebar input[type='color']:focus,.edit-post-sidebar input[type='date']:focus,.edit-post-sidebar input[type='datetime-local']:focus,.edit-post-sidebar input[type='datetime']:focus,.edit-post-sidebar input[type='email']:focus,.edit-post-sidebar input[type='month']:focus,.edit-post-sidebar input[type='number']:focus,.edit-post-sidebar input[type='password']:focus,.edit-post-sidebar input[type='radio']:focus,.edit-post-sidebar input[type='search']:focus,.edit-post-sidebar input[type='tel']:focus,.edit-post-sidebar input[type='text']:focus,.edit-post-sidebar input[type='time']:focus,.edit-post-sidebar input[type='url']:focus,.edit-post-sidebar input[type='week']:focus,.edit-post-sidebar select:focus,.edit-post-sidebar textarea:focus{border-color:#016087;box-shadow:0 0 0 2px #6f93ad}.edit-post-sidebar input[type='checkbox']:checked{background:#016087;border-color:#016087}a{color:#016087}a:active,a:hover{color:#23354b}a:focus{color:#23354b;box-shadow:none;outline:thin dotted}.wp-toolbar .revision-php{margin-top:-32px}.revision-php{background:#f6f6f6}.revision-php #wpadminbar,.revision-php #adminmenumain,.revision-php #wp-admin-bar-menu-toggle{display:none}.revision-php #wpcontent{margin-right:0 !important}.revision-php #wpbody{padding-top:0}.revision-php #screen-meta-links{display:none !important}.revision-php #wpfooter{display:none !important}.revision-tickmarks{margin-top:8px}.revisions-controls{height:118px}.revisions-controls .author-card .avatar{border-radius:50%;height:38px;margin-top:4px;width:38px}.revisions-controls .author-card .author-info{line-height:20px;margin-top:4px}.comparing-two-revisions .revisions-controls{height:176px}.revisions-meta{margin-top:28px}.diff-meta{min-height:46px}.revision-toggle-compare-mode label{vertical-align:top}.revisions-tooltip{transform:translateY(-36px)}
/*# sourceMappingURL=style-gutenberg-rtl.min.css.map */
diff --git a/plugins/jetpack/modules/calypsoify/style-gutenberg.min.css b/plugins/jetpack/modules/calypsoify/style-gutenberg.min.css
index 2802214e..cb47e755 100644
--- a/plugins/jetpack/modules/calypsoify/style-gutenberg.min.css
+++ b/plugins/jetpack/modules/calypsoify/style-gutenberg.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is compiled SASS code. */
-.edit-post-more-menu__content .components-menu-group:first-child .components-menu-item__button:last-child{display:none}.editor-inserter__manage-reusable-blocks,a.components-menu-item__button[href*="post_type=wp_block"]{display:none}.wp-toolbar .revision-php{margin-top:-32px}.revision-php{background:#f3f6f8}.revision-php #wpadminbar,.revision-php #adminmenumain,.revision-php #wp-admin-bar-menu-toggle{display:none}.revision-php #wpcontent{margin-left:0 !important}.revision-php #wpbody{padding-top:0}.revision-php #screen-meta-links{display:none !important}.revision-php #wpfooter{display:none !important}.revision-tickmarks{margin-top:8px}.revisions-controls{height:118px}.revisions-controls .author-card .avatar{border-radius:50%;height:38px;margin-top:4px;width:38px}.revisions-controls .author-card .author-info{line-height:20px;margin-top:4px}.comparing-two-revisions .revisions-controls{height:176px}.revisions-meta{margin-top:28px}.diff-meta{min-height:46px}.revision-toggle-compare-mode label{vertical-align:top}.revisions-tooltip{-ms-transform:translateY(-36px);transform:translateY(-36px)}
+.components-button.is-default{color:#3d4145;border-color:#ccced0;background:#fff;box-shadow:none;border-width:1px 1px 2px}.components-button.is-default:hover{background:#fff;border-color:#b0b5b8;box-shadow:none;color:#3d4145}.components-button.is-default:focus:enabled{background:#fff;color:#3d4145;border-color:#016087;box-shadow:0 0 0 2px #6f93ad}.components-button.is-default:active:enabled{background:#fff;border-color:#ccced0;border-width:2px 1px 1px;box-shadow:none}.components-button.is-default:disabled,.components-button.is-default[aria-disabled='true']{color:#e1e2e2;background-color:#fff;border-color:#e1e2e2;text-shadow:none}.components-button.is-primary{background:#d52c82;border-color:#992053;box-shadow:none;color:#fff;text-shadow:none}.components-button.is-primary:focus:enabled{background:#ff3997;border-color:#d52c82;color:#fff;box-shadow:0 0 0 2px #ff76b8}.components-button.is-primary:hover{box-shadow:none;background:#ff3997;border-color:#992053;color:#fff}.components-button.is-primary:focus:enabled{box-shadow:0 0 0 2px #ff76b8}.components-button.is-primary:active:enabled{background:#ff3997;border-color:#992053;box-shadow:inset 0 1px 0 #992053}.components-button.is-primary:disabled,.components-button.is-primary[aria-disabled='true']{color:#e1e2e2;background:#fff;border-color:#e1e2e2;text-shadow:none}.components-button.is-primary:disabled:hover,.components-button.is-primary:disabled:focus,.components-button.is-primary:disabled:active,.components-button.is-primary[aria-disabled='true']:hover,.components-button.is-primary[aria-disabled='true']:focus,.components-button.is-primary[aria-disabled='true']:active{color:#e1e2e2;background-color:#fff;border-color:#e1e2e2;box-shadow:none}.components-button.is-primary.is-busy,.components-button.is-primary.is-busy:disabled,.components-button.is-primary.is-busy[aria-disabled='true']{background-image:linear-gradient(-45deg, #d52c82 28%, #b7266a 28%, #b7266a 72%, #d52c82 72%);border-color:#992053}.components-button.is-link{color:#016087}.components-button.is-link:hover,.components-button.is-link:active{color:#23354b}.components-button.is-link:focus{color:#23354b;box-shadow:0 0 0 2px #6f93ad}.components-button.is-link.is-destructive{color:#ff4b1c}.components-button.is-busy{background-image:repeating-linear-gradient(-45deg, #636d75, #fff 11px, #fff 10px, #636d75 20px)}.components-button.is-tertiary{color:#016087}.components-button.is-tertiary:not(:disabled):not([aria-disabled='true']):not(.is-default):hover{color:#23354b}.edit-post-more-menu__content .components-menu-group:first-child .components-menu-item__button:last-child{display:none}.editor-inserter__manage-reusable-blocks,a.components-menu-item__button[href*="post_type=wp_block"]{display:none}.edit-post-sidebar__panel-tab.is-active{border-color:#016087}.edit-post-sidebar .input-control:focus,.edit-post-sidebar input[type='checkbox']:focus,.edit-post-sidebar input[type='color']:focus,.edit-post-sidebar input[type='date']:focus,.edit-post-sidebar input[type='datetime-local']:focus,.edit-post-sidebar input[type='datetime']:focus,.edit-post-sidebar input[type='email']:focus,.edit-post-sidebar input[type='month']:focus,.edit-post-sidebar input[type='number']:focus,.edit-post-sidebar input[type='password']:focus,.edit-post-sidebar input[type='radio']:focus,.edit-post-sidebar input[type='search']:focus,.edit-post-sidebar input[type='tel']:focus,.edit-post-sidebar input[type='text']:focus,.edit-post-sidebar input[type='time']:focus,.edit-post-sidebar input[type='url']:focus,.edit-post-sidebar input[type='week']:focus,.edit-post-sidebar select:focus,.edit-post-sidebar textarea:focus{border-color:#016087;box-shadow:0 0 0 2px #6f93ad}.edit-post-sidebar input[type='checkbox']:checked{background:#016087;border-color:#016087}a{color:#016087}a:active,a:hover{color:#23354b}a:focus{color:#23354b;box-shadow:none;outline:thin dotted}.wp-toolbar .revision-php{margin-top:-32px}.revision-php{background:#f6f6f6}.revision-php #wpadminbar,.revision-php #adminmenumain,.revision-php #wp-admin-bar-menu-toggle{display:none}.revision-php #wpcontent{margin-left:0 !important}.revision-php #wpbody{padding-top:0}.revision-php #screen-meta-links{display:none !important}.revision-php #wpfooter{display:none !important}.revision-tickmarks{margin-top:8px}.revisions-controls{height:118px}.revisions-controls .author-card .avatar{border-radius:50%;height:38px;margin-top:4px;width:38px}.revisions-controls .author-card .author-info{line-height:20px;margin-top:4px}.comparing-two-revisions .revisions-controls{height:176px}.revisions-meta{margin-top:28px}.diff-meta{min-height:46px}.revision-toggle-compare-mode label{vertical-align:top}.revisions-tooltip{transform:translateY(-36px)}
diff --git a/plugins/jetpack/modules/calypsoify/style-rtl.min.css b/plugins/jetpack/modules/calypsoify/style-rtl.min.css
index 5f6c3a67..2022acb8 100644
--- a/plugins/jetpack/modules/calypsoify/style-rtl.min.css
+++ b/plugins/jetpack/modules/calypsoify/style-rtl.min.css
@@ -1,4 +1,4 @@
/* Do not modify this file directly. It is compiled SASS code. */
-body,#wp-content-editor-tools{background:#f3f6f8}#wpwrap{top:14px}#adminmenu #collapse-menu,#adminmenu .wp-menu-separator,#screen-meta-links,.wp-submenu,#toplevel_page_jetpack{display:none}.wp-menu-open .wp-submenu{display:block}#adminmenuwrap,#adminmenuback,#adminmenu{background:#e9eff3}#adminmenuback{border-left:1px solid #d9e3ea}#adminmenu,#adminmenuwrap,#adminmenuback,#adminmenu .wp-submenu{width:272px}#adminmenu{margin-top:71px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .opensub .wp-submenu,#adminmenu .opensub .wp-submenu:after,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:transparent !important}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open,#adminmenu a:hover{background:#f3f6f8}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{padding:5px 5px 5px 0}#adminmenu .wp-has-current-submenu ul>li>a{padding:7px 46px 7px 12px;font-size:14px}#adminmenu .wp-submenu a:hover{background:#fff}#adminmenu>li.wp-first-item{border-bottom:1px solid rgba(200,215,225,0.5)}#adminmenu a.wp-has-current-submenu:after,#adminmenu>li.current>a.current:after,#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border:none}#adminmenu .dashicons,#adminmenu .dashicons-before:before{width:24px;height:24px;font-size:24px}#adminmenu a,#adminmenu div.wp-menu-image:before{color:#2e4453 !important}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu{background:#537994}#adminmenu div.wp-menu-image.svg{filter:brightness(0.25)}#adminmenu li.wp-menu-open div.wp-menu-image.svg{filter:brightness(100)}#adminmenu li.wp-menu-open div.wp-menu-image:before,#adminmenu li.wp-menu-open div.wp-menu-name{color:#fff !important}#adminmenu div.wp-menu-name{color:#2e4453;font-size:15px;padding:9px 41px 8px 0}#adminmenu li.menu-top{min-height:46px}#adminmenu .awaiting-mod,#adminmenu .update-plugins{background-color:#00aadc}.no-js li.wp-has-current-submenu:hover .wp-submenu{background:transparent !important}#wpcontent,#wpfooter{margin-right:272px}#toplevel_page_plugins div.wp-menu-image.svg,#toplevel_page_plugin-install div.wp-menu-image.svg{background-size:24px auto}#toplevel_page_plugins div.wp-menu-image.svg{position:relative;right:-2px}#calypso-sidebar-header{position:fixed;top:47px;right:0;width:272px;height:70px;background:#fff;z-index:10000}#calypso-sidebar-header svg{float:right;position:relative;right:10px;top:23px}#calypso-sidebar-header ul{float:right;position:relative;top:3px;right:15px}#calypso-sidebar-header ul li{margin:0}#calypso-sidebar-header ul li#calypso-sitename{font-size:12px;color:#537994;overflow:hidden;white-space:nowrap;width:225px}@media screen and (max-width: 782px){#calypso-sidebar-header ul li#calypso-sitename{width:150px}}#calypso-sidebar-header ul li#calypso-sitename:after{content:'';display:block;position:absolute;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;background:linear-gradient(to left, rgba(255,255,255,0), #fff 90%);top:0px;bottom:0px;left:0px;right:auto;width:20%;height:auto}#calypso-sidebar-header ul li#calypso-plugins{font-weight:bold;color:#2e4453;font-size:16px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .opensub .wp-submenu:after,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#e9eff3 !important}.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:7px 46px 7px 12px;font-size:14px}.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head{background:#537994}.folded #adminmenu .wp-submenu .wp-submenu-head{padding:14px 11px 14px 4px}.folded #adminmenu a.menu-top{padding-right:1px}.folded #wpcontent #calypso-sidebar-header{width:36px}.folded #wpcontent #calypso-sidebar-header svg{right:6px}.folded #wpcontent #calypso-sidebar-header ul{display:none}.folded .no-js li.wp-has-current-submenu:hover .wp-submenu{background:#e9eff3 !important}.folded #toplevel_page_plugins div.wp-menu-image.svg{position:relative;right:-2px}@media only screen and (max-width: 960px){#calypso-sidebar-header{width:36px}#calypso-sidebar-header ul{display:none}#calypso-sidebar-header svg{right:6px}#adminmenu a.menu-top{padding-right:1px}}@media screen and (max-width: 782px){#calypso-sidebar-header{position:absolute;display:none;width:190px;top:-14px}.wp-responsive-open #calypso-sidebar-header{display:block}#calypso-sidebar-header ul{display:block}.auto-fold #adminmenu .wp-menu-name{margin-right:0}.auto-fold #adminmenu{top:-14px}.auto-fold #adminmenu .selected,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open{background:#537994 !important}#adminmenu .wp-submenu,.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#f3f6f8 !important}.auto-fold #adminmenu li.selected div.wp-menu-image.svg{filter:brightness(100)}.auto-fold #adminmenu li.selected div.wp-menu-image:before,.auto-fold #adminmenu li.selected div.wp-menu-name{color:#fff !important}#wpadminbar .quicklinks>ul>li>a,#wpadminbar .quicklinks>ul>li>.ab-empty-item{padding:0 15px !important}#wpadminbar li#wp-admin-bar-ab-new-post a{padding:7px 15px !important}}@media screen and (max-width: 600px){#calypso-sidebar-header{top:32px}.auto-fold #adminmenu{top:32px}}@media screen and (max-width: 480px){#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before{margin-top:4px !important}#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:6px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before{top:-5px !important;margin-right:-12px !important}}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5)}.nav-tab{border:none;background:none;font-weight:400;padding:3px 13px 12px;color:#0087be}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{background:transparent;box-shadow:none}.nav-tab:first-child{margin-right:0}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active{border-bottom:2px solid #2e4453;color:#2e4453}#wpadminbar{background:#0087be;-webkit-box-shadow:none;-mozilla-box-shadow:none;height:46px;position:fixed}#wpadminbar .ab-top-menu>li>.ab-item{font-size:14px}#wpadminbar .ab-top-menu>li.hover>.ab-item{background:#0099d8 !important;color:#fff}#wpadminbar *{line-height:46px}#wpadminbar .quicklinks a,#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .shortlink-input{height:46px}#wpadminbar .quicklinks>ul>li>a{padding:0 15px}#wpadminbar .quicklinks>ul>li.current>a{background:#004967}#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar .ab-top-menu>li.ab-hover>.ab-item{background:transparent !important}#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item{background:#0099d8 !important;color:#fff}#wpadminbar .ab-top-menu>li.my-sites>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.hover>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.ab-hover>.ab-item{background:#004967 !important}#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before,#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:12px}#wpadminbar ul li#wp-admin-bar-ab-new-post{border-radius:3px}#wpadminbar ul li#wp-admin-bar-ab-new-post a{padding:6px 15px;color:#0087be !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a span{color:#0087be !important;font-size:14px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before,#wpadminbar ul li#wp-admin-bar-ab-new-post a:after{background-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="0" fill="none" width="24" height="24"/><g><path fill="%230087be" d="M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"/><path fill="%230087be" d="M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"/></g></svg>') !important}#wpadminbar ul li#wp-admin-bar-ab-new-post:hover,#wpadminbar ul li#wp-admin-bar-ab-new-post:hover>.ab-item{background:#fff !important;opacity:1;border-radius:3px !important}#wpadminbar li#wp-admin-bar-blog.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-newdash.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-my-account.menupop>.ab-sub-wrapper{display:none !important}#wpadminbar li#wp-admin-bar-notes.active,#wpadminbar li#wp-admin-bar-notes.active>.ab-item{background:#004967 !important}#wpadminbar li#wp-admin-bar-notes>#wpnt-notes-panel2{top:46px}#wpadminbar .ab-top-menu>li.ab-active>.ab-item,#wpadminbar>#wp-toolbar .wpnt-show span.noticon,#wpadminbar #wp-admin-bar-notes.wpnt-show .noticon{color:#fff !important}#wpadminbar .ab-active>a.ab-item:before,#wpadminbar #wp-admin-bar-notes.active .noticon-bell:before{filter:brightness(100) !important}#wpadminbar .quicklinks>ul>li#wp-admin-bar-notes>a.ab-item span.noticon,#wpadminbar>#wp-toolbar span.noticon,#wpadminbar #wp-admin-bar-notes .noticon{top:10px}#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon,#wpadminbar .ab-icon,#wpadminbar .ab-item:before{font-size:24px;line-height:1.45}.wrap{margin:20px 15px 25px 30px}@media screen and (max-width: 782px){.wrap{margin:10px 7px 10px 18px}}.subsubsub,.wp-filter{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5);width:100%;box-shadow:none;padding:0}.subsubsub a,.filter-links li>a{padding:10px 15px;display:inline-block;font-size:14px;margin:0;color:#0073aa;border-bottom:none;outline:none}.filter-links li>a{padding:16px}.subsubsub a.current,.filter-links .current{border-bottom:2px solid #000}.count{display:inline-block;padding:1px 6px;border:solid 1px #87a6bc;border-radius:12px;font-size:11px;font-weight:bold;line-height:14px;color:#537994;text-align:center;margin-right:2px}.plugins-php .tablenav{clear:none;float:right;margin-bottom:15px}.plugins-php .tablenav .one-page .displaying-num{display:none}.plugins-php p.search-box{margin-top:5px}.wrap .wp-heading-inline+.page-title-action,.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{background:#00aadc;border-color:#008ab3;color:#fff;border-style:solid;border-width:1px 1px 2px;cursor:pointer;display:inline-block;margin:0 0 0 5px;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;font-size:13px;line-height:21px;border-radius:4px;padding:2px 10px 2px;margin-bottom:2px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wrap .wp-heading-inline+.page-title-action:hover{border-color:#005082}.wp-core-ui .button{background:#fff}.wp-core-ui .button-primary{background:#00aadc;border-color:#008ab3;color:#fff;text-shadow:none}.ui-tabs-nav li,.wp-switch-editor{background-color:#e9eff3 !important}.plugin-card-bottom,.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd),.ui-tabs-panel,.ui-tabs-nav li.ui-tabs-active,.ui-tabs-nav li.ui-tabs-active:hover,div.mce-toolbar-grp,.html-active .switch-html,.tmce-active .switch-tmce,#post-status-info,.quicktags-toolbar,#major-publishing-actions{background-color:#f3f6f8 !important;border-color:#d9e3ea}.wp-filter .search-form{margin-left:10px}.form-toggle[type="checkbox"]{display:none}.form-toggle__switch{position:relative;display:inline-block;border-radius:12px;box-sizing:border-box;padding:2px;width:40px;height:24px;vertical-align:middle;-ms-flex-item-align:start;align-self:flex-start;outline:0;cursor:pointer;transition:all .4s ease, box-shadow 0s}.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}.accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #00aadc}.form-toggle__label{cursor:pointer}.is-disabled .form-toggle__label{cursor:default}.form-toggle__label .form-toggle__label-content{-ms-flex:0 1 100%;flex:0 1 100%;margin-right:12px}.accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #00aadc}.accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #78dcfa}.form-toggle+.form-toggle__label .form-toggle__switch{background:#a8bece}.form-toggle:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#c8d7e1}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#00aadc}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{right:16px}.form-toggle:checked:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#78dcfa}.form-toggle:disabled+label.form-toggle__label span.form-toggle__switch{opacity:0.25;cursor:default}.form-toggle.is-toggling+.form-toggle__label .form-toggle__switch{background:#00aadc}.form-toggle.is-toggling:checked+.form-toggle__label .form-toggle__switch{background:#c8d7e1}.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}
+body,#wp-content-editor-tools{background:#f6f6f6}#wpwrap{top:14px}#wp-admin-bar-notes #wpnt-notes-unread-count.wpn-unread{background-image:none !important;background-color:#ff76b8 !important;border:none !important}#adminmenu #collapse-menu,#adminmenu .wp-menu-separator,#screen-meta-links,.wp-submenu,#toplevel_page_jetpack{display:none}.wp-menu-open .wp-submenu{display:block}#adminmenuwrap,#adminmenuback,#adminmenu{background:#fff}#adminmenuback{border-left:1px solid #e1e2e2}#adminmenu,#adminmenuwrap,#adminmenuback,#adminmenu .wp-submenu{width:272px}#adminmenu{margin-top:71px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .opensub .wp-submenu,#adminmenu .opensub .wp-submenu:after,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:transparent !important}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open,#adminmenu a:hover{background:#f6f6f6}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{padding:5px 5px 5px 0}#adminmenu .wp-has-current-submenu ul>li>a{padding:11px 20px 11px 16px;font-size:14px}#adminmenu .wp-submenu a:hover{background-color:#e1e2e2}#adminmenu>li.wp-first-item{border-bottom:1px solid rgba(200,215,225,0.5)}#adminmenu a.wp-has-current-submenu:after,#adminmenu>li.current>a.current:after,#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border:none}#adminmenu .dashicons,#adminmenu .dashicons-before:before{width:24px;height:24px;font-size:24px}#adminmenu a,#adminmenu div.wp-menu-image:before{color:#3d4145 !important}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu{background:#d8dee4}#adminmenu div.wp-menu-image.svg{filter:brightness(0.25)}#adminmenu li.wp-menu-open div.wp-menu-image.svg{filter:brightness(100)}#adminmenu li.wp-menu-open div.wp-menu-image:before,#adminmenu li.wp-menu-open div.wp-menu-name{color:#016087 !important}#adminmenu div.wp-menu-name{color:#2b2d2f;font-size:15px;padding:9px 41px 8px 0}#adminmenu li.menu-top{min-height:46px}#adminmenu .awaiting-mod,#adminmenu .update-plugins{background-color:#016087}.no-js li.wp-has-current-submenu:hover .wp-submenu{background:transparent !important}#wpcontent,#wpfooter{margin-right:272px}#toplevel_page_plugins div.wp-menu-image.svg,#toplevel_page_plugin-install div.wp-menu-image.svg{background-size:24px auto}#toplevel_page_plugins div.wp-menu-image.svg{position:relative;right:-2px}#calypso-sidebar-header{position:fixed;top:47px;right:0;width:272px;height:70px;background:#fff;z-index:10000}#calypso-sidebar-header svg{float:right;position:relative;right:10px;top:23px}#calypso-sidebar-header ul{float:right;position:relative;top:3px;right:15px}#calypso-sidebar-header ul li{margin:0}#calypso-sidebar-header ul li#calypso-sitename{font-size:12px;color:#636d75;overflow:hidden;white-space:nowrap;width:225px}@media screen and (max-width: 782px){#calypso-sidebar-header ul li#calypso-sitename{width:150px}}#calypso-sidebar-header ul li#calypso-sitename:after{content:'';display:block;position:absolute;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;background:linear-gradient(to left, rgba(255,255,255,0), #fff 90%);top:0px;bottom:0px;left:0px;right:auto;width:20%;height:auto}#calypso-sidebar-header ul li#calypso-plugins{font-weight:bold;color:#2b2d2f;font-size:16px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .opensub .wp-submenu:after,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#f6f6f6 !important}.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:7px 46px 7px 12px;font-size:14px}.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head{background:#f3f5f6}.folded #adminmenu .wp-submenu .wp-submenu-head{padding:14px 11px 14px 4px}.folded #adminmenu a.menu-top{padding-right:1px}.folded #wpcontent #calypso-sidebar-header{width:36px}.folded #wpcontent #calypso-sidebar-header svg{right:6px}.folded #wpcontent #calypso-sidebar-header ul{display:none}.folded .no-js li.wp-has-current-submenu:hover .wp-submenu{background:#f6f6f6 !important}.folded #toplevel_page_plugins div.wp-menu-image.svg{position:relative;right:-2px}@media only screen and (max-width: 960px){#calypso-sidebar-header{width:36px}#calypso-sidebar-header ul{display:none}#calypso-sidebar-header svg{right:6px}#adminmenu a.menu-top{padding-right:1px}}@media screen and (max-width: 782px){#calypso-sidebar-header{position:absolute;display:none;width:190px;top:-14px}.wp-responsive-open #calypso-sidebar-header{display:block}#calypso-sidebar-header ul{display:block}.auto-fold #adminmenu .wp-menu-name{margin-right:0}.auto-fold #adminmenu{top:-14px}.auto-fold #adminmenu .selected,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open{background:#d8dee4 !important}#adminmenu .wp-submenu,.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#fff !important}.auto-fold #adminmenu li.selected div.wp-menu-image.svg{filter:brightness(100)}.auto-fold #adminmenu li.selected div.wp-menu-image:before,.auto-fold #adminmenu li.selected div.wp-menu-name{color:#016087 !important}#wpadminbar .quicklinks>ul>li>a,#wpadminbar .quicklinks>ul>li>.ab-empty-item{padding:0 15px !important}#wpadminbar li#wp-admin-bar-ab-new-post a{padding:7px 15px !important}}@media screen and (max-width: 600px){#calypso-sidebar-header{top:32px}.auto-fold #adminmenu{top:32px}}@media screen and (max-width: 480px){#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before{margin-top:4px !important}#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:6px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before{top:-5px !important;margin-right:-12px !important}}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5)}.nav-tab{border:none;background:none;font-weight:400;padding:3px 13px 12px;color:#016087}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{background:transparent;box-shadow:none}.nav-tab:first-child{margin-right:0}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active{border-bottom:2px solid #3d4145;color:#2b2d2f}#wpadminbar{background:#016087;-webkit-box-shadow:none;-mozilla-box-shadow:none;height:46px;position:fixed}#wpadminbar .ab-top-menu>li>.ab-item{font-size:14px}#wpadminbar .ab-top-menu>li.hover>.ab-item{background:#6f93ad !important;color:#fff}#wpadminbar *{line-height:46px}#wpadminbar .quicklinks a,#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .shortlink-input{height:46px}#wpadminbar .quicklinks>ul>li>a{padding:0 15px}#wpadminbar .quicklinks>ul>li.current>a{background:#004966}#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar .ab-top-menu>li.ab-hover>.ab-item{background:transparent !important}#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item{background:#6f93ad !important;color:#fff}#wpadminbar .ab-top-menu>li.my-sites>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.hover>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.ab-hover>.ab-item{background:#004966 !important}#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before,#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:12px}#wpadminbar ul li#wp-admin-bar-ab-new-post{border-radius:3px}#wpadminbar ul li#wp-admin-bar-ab-new-post a{padding:6px 15px;color:#016087 !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a span{color:#016087 !important;font-size:14px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before,#wpadminbar ul li#wp-admin-bar-ab-new-post a:after{background-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="0" fill="none" width="24" height="24"/><g><path fill="%230087be" d="M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"/><path fill="%230087be" d="M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"/></g></svg>') !important}#wpadminbar ul li#wp-admin-bar-ab-new-post:hover,#wpadminbar ul li#wp-admin-bar-ab-new-post:hover>.ab-item{background:#f6f6f6 !important;opacity:1;border-radius:3px !important}#wpadminbar li#wp-admin-bar-blog.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-newdash.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-my-account.menupop>.ab-sub-wrapper{display:none !important}#wpadminbar li#wp-admin-bar-notes.active,#wpadminbar li#wp-admin-bar-notes.active>.ab-item{background:#004966 !important}#wpadminbar li#wp-admin-bar-notes>#wpnt-notes-panel2{top:46px}#wpadminbar .ab-top-menu>li.ab-active>.ab-item,#wpadminbar>#wp-toolbar .wpnt-show span.noticon,#wpadminbar #wp-admin-bar-notes.wpnt-show .noticon{color:#fff !important}#wpadminbar .ab-active>a.ab-item:before,#wpadminbar #wp-admin-bar-notes.active .noticon-bell:before{filter:brightness(100) !important}#wpadminbar .quicklinks>ul>li#wp-admin-bar-notes>a.ab-item span.noticon,#wpadminbar>#wp-toolbar span.noticon,#wpadminbar #wp-admin-bar-notes .noticon{top:10px}#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon,#wpadminbar .ab-icon,#wpadminbar .ab-item:before{font-size:24px;line-height:1.45}.wrap{margin:20px 15px 25px 30px}@media screen and (max-width: 782px){.wrap{margin:10px 7px 10px 18px}}.subsubsub,.wp-filter{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5);width:100%;box-shadow:none;padding:0}.subsubsub a,.filter-links li>a{padding:10px 15px;display:inline-block;font-size:14px;margin:0;color:#016087;border-bottom:2px solid #fff;outline:none}.subsubsub a:focus,.filter-links li>a:focus{box-shadow:0 0 0 1px #016087,0 0 2px 1px #6f93ad}.subsubsub a:hover,.filter-links li>a:hover{color:#23354b;background-color:#f3f5f6}.subsubsub a:hover:not(.current),.filter-links li>a:hover:not(.current){border-color:#f3f5f6}.filter-links li>a{padding:16px}.subsubsub a.current,.filter-links .current{border-bottom:2px solid #3d4145}.count{display:inline-block;padding:1px 6px;border:solid 1px #969ca1;border-radius:12px;font-size:11px;font-weight:bold;line-height:14px;color:#636d75;text-align:center;margin-right:2px}.plugins-php .plugins a{color:#016087}.plugins-php .plugins a:hover,.plugins-php .plugins a:focus{color:#23354b}.plugins-php .plugins a:focus{box-shadow:0 0 0 1px #016087,0 0 2px 1px #6f93ad}.plugins-php .plugins a.delete{color:#eb0001}.plugins-php .plugins a.delete:hover,.plugins-php .plugins a.delete:focus{color:#ac120b}.plugins-php .plugins a.delete:focus{box-shadow:0 0 0 1px #eb0001,0 0 2px 1px #ff8248}.plugins-php .tablenav{clear:none;float:right;margin-bottom:15px}.plugins-php .tablenav .one-page .displaying-num{display:none}.plugins-php .bulkactions select:focus{border-color:#016087;box-shadow:0 0 2px #6f93ad}.plugins-php p.search-box{margin-top:5px}.plugins-php p.search-box .wp-filter-search:focus{border-color:#016087;box-shadow:0 0 2px #6f93ad}.plugins-php .plugins .active th{border-right:4px solid #016087}.plugins-php .plugins .active th,.plugins-php .plugins .active td{background-color:#f3f5f6}.wrap .wp-heading-inline+.page-title-action,.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{background:#d52c82;border-color:#992053;color:#fff;border-style:solid;border-width:1px 1px 2px;cursor:pointer;display:inline-block;margin:0 0 0 5px;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;font-size:13px;line-height:21px;border-radius:4px;padding:2px 10px 2px;margin-bottom:2px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wrap .wp-heading-inline+.page-title-action:hover,.wrap .add-new-h2:hover,.wrap .add-new-h2:active:hover,.wrap .page-title-action:hover,.wrap .page-title-action:active:hover{background-color:#ff3997}.wrap .wp-heading-inline+.page-title-action:focus,.wrap .add-new-h2:focus,.wrap .add-new-h2:active:focus,.wrap .page-title-action:focus,.wrap .page-title-action:active:focus{box-shadow:0 0 0 2px #ff76b8;background-color:#ff3997}.wp-core-ui .button{background:#fff}.wp-core-ui .button:focus{border-color:#016087;box-shadow:0 0 3px #6f93ad}.wp-core-ui .button-primary{background:#016087;border-color:#23354b;color:#fff;text-shadow:none}.wp-core-ui .button-primary:hover,.wp-core-ui .button-primary:focus{background-color:#46799a}.ui-tabs-nav li,.wp-switch-editor{background-color:#f6f6f6 !important}.plugin-card a,.popular-tags a,.filter-links>li>a{color:#016087}.plugin-card a:hover,.plugin-card a:focus,.popular-tags a:hover,.popular-tags a:focus,.filter-links>li>a:hover,.filter-links>li>a:focus{color:#23354b}.plugin-card a:focus,.popular-tags a:focus,.filter-links>li>a:focus{box-shadow:0 0 0 1px #016087,0 0 2px 1px #6f93ad}.plugin-card-bottom,.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd),.ui-tabs-panel,.ui-tabs-nav li.ui-tabs-active,.ui-tabs-nav li.ui-tabs-active:hover,div.mce-toolbar-grp,.html-active .switch-html,.tmce-active .switch-tmce,#post-status-info,.quicktags-toolbar,#major-publishing-actions{background-color:#fff;border-color:#d7e1e9}.wp-filter .search-form{margin-left:10px}.form-toggle[type="checkbox"]{display:none}.form-toggle__switch{position:relative;display:inline-block;border-radius:12px;box-sizing:border-box;padding:2px;width:40px;height:24px;vertical-align:middle;align-self:flex-start;outline:0;cursor:pointer;transition:all .4s ease, box-shadow 0s}.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}.accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #016087}.form-toggle__label{cursor:pointer}.is-disabled .form-toggle__label{cursor:default}.form-toggle__label .form-toggle__label-content{flex:0 1 100%;margin-right:12px}.accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #016087}.accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #6f93ad}.form-toggle+.form-toggle__label .form-toggle__switch{background:#b0b5b8}.form-toggle:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#ccced0}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#016087}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{right:16px}.form-toggle:checked:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#6f93ad}.form-toggle:disabled+label.form-toggle__label span.form-toggle__switch{opacity:0.25;cursor:default}.form-toggle.is-toggling+.form-toggle__label .form-toggle__switch{background:#016087}.form-toggle.is-toggling:checked+.form-toggle__label .form-toggle__switch{background:#ccced0}.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}
/*# sourceMappingURL=style-rtl.min.css.map */
diff --git a/plugins/jetpack/modules/calypsoify/style.min.css b/plugins/jetpack/modules/calypsoify/style.min.css
index 08bc8705..555ee289 100644
--- a/plugins/jetpack/modules/calypsoify/style.min.css
+++ b/plugins/jetpack/modules/calypsoify/style.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is compiled SASS code. */
-body,#wp-content-editor-tools{background:#f3f6f8}#wpwrap{top:14px}#adminmenu #collapse-menu,#adminmenu .wp-menu-separator,#screen-meta-links,.wp-submenu,#toplevel_page_jetpack{display:none}.wp-menu-open .wp-submenu{display:block}#adminmenuwrap,#adminmenuback,#adminmenu{background:#e9eff3}#adminmenuback{border-right:1px solid #d9e3ea}#adminmenu,#adminmenuwrap,#adminmenuback,#adminmenu .wp-submenu{width:272px}#adminmenu{margin-top:71px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .opensub .wp-submenu,#adminmenu .opensub .wp-submenu:after,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:transparent !important}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open,#adminmenu a:hover{background:#f3f6f8}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{padding:5px 0 5px 5px}#adminmenu .wp-has-current-submenu ul>li>a{padding:7px 12px 7px 46px;font-size:14px}#adminmenu .wp-submenu a:hover{background:#fff}#adminmenu>li.wp-first-item{border-bottom:1px solid rgba(200,215,225,0.5)}#adminmenu a.wp-has-current-submenu:after,#adminmenu>li.current>a.current:after,#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border:none}#adminmenu .dashicons,#adminmenu .dashicons-before:before{width:24px;height:24px;font-size:24px}#adminmenu a,#adminmenu div.wp-menu-image:before{color:#2e4453 !important}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu{background:#537994}#adminmenu div.wp-menu-image.svg{filter:brightness(0.25)}#adminmenu li.wp-menu-open div.wp-menu-image.svg{filter:brightness(100)}#adminmenu li.wp-menu-open div.wp-menu-image:before,#adminmenu li.wp-menu-open div.wp-menu-name{color:#fff !important}#adminmenu div.wp-menu-name{color:#2e4453;font-size:15px;padding:9px 0 8px 41px}#adminmenu li.menu-top{min-height:46px}#adminmenu .awaiting-mod,#adminmenu .update-plugins{background-color:#00aadc}.no-js li.wp-has-current-submenu:hover .wp-submenu{background:transparent !important}#wpcontent,#wpfooter{margin-left:272px}#toplevel_page_plugins div.wp-menu-image.svg,#toplevel_page_plugin-install div.wp-menu-image.svg{background-size:24px auto}#toplevel_page_plugins div.wp-menu-image.svg{position:relative;left:-2px}#calypso-sidebar-header{position:fixed;top:47px;left:0;width:272px;height:70px;background:#fff;z-index:10000}#calypso-sidebar-header svg{float:left;position:relative;left:10px;top:23px}#calypso-sidebar-header ul{float:left;position:relative;top:3px;left:15px}#calypso-sidebar-header ul li{margin:0}#calypso-sidebar-header ul li#calypso-sitename{font-size:12px;color:#537994;overflow:hidden;white-space:nowrap;width:225px}@media screen and (max-width: 782px){#calypso-sidebar-header ul li#calypso-sitename{width:150px}}#calypso-sidebar-header ul li#calypso-sitename:after{content:'';display:block;position:absolute;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;background:linear-gradient(to right, rgba(255,255,255,0), #fff 90%);top:0px;bottom:0px;right:0px;left:auto;width:20%;height:auto}#calypso-sidebar-header ul li#calypso-plugins{font-weight:bold;color:#2e4453;font-size:16px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .opensub .wp-submenu:after,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#e9eff3 !important}.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:7px 12px 7px 46px;font-size:14px}.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head{background:#537994}.folded #adminmenu .wp-submenu .wp-submenu-head{padding:14px 4px 14px 11px}.folded #adminmenu a.menu-top{padding-left:1px}.folded #wpcontent #calypso-sidebar-header{width:36px}.folded #wpcontent #calypso-sidebar-header svg{left:6px}.folded #wpcontent #calypso-sidebar-header ul{display:none}.folded .no-js li.wp-has-current-submenu:hover .wp-submenu{background:#e9eff3 !important}.folded #toplevel_page_plugins div.wp-menu-image.svg{position:relative;left:-2px}@media only screen and (max-width: 960px){#calypso-sidebar-header{width:36px}#calypso-sidebar-header ul{display:none}#calypso-sidebar-header svg{left:6px}#adminmenu a.menu-top{padding-left:1px}}@media screen and (max-width: 782px){#calypso-sidebar-header{position:absolute;display:none;width:190px;top:-14px}.wp-responsive-open #calypso-sidebar-header{display:block}#calypso-sidebar-header ul{display:block}.auto-fold #adminmenu .wp-menu-name{margin-left:0}.auto-fold #adminmenu{top:-14px}.auto-fold #adminmenu .selected,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open{background:#537994 !important}#adminmenu .wp-submenu,.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#f3f6f8 !important}.auto-fold #adminmenu li.selected div.wp-menu-image.svg{filter:brightness(100)}.auto-fold #adminmenu li.selected div.wp-menu-image:before,.auto-fold #adminmenu li.selected div.wp-menu-name{color:#fff !important}#wpadminbar .quicklinks>ul>li>a,#wpadminbar .quicklinks>ul>li>.ab-empty-item{padding:0 15px !important}#wpadminbar li#wp-admin-bar-ab-new-post a{padding:7px 15px !important}}@media screen and (max-width: 600px){#calypso-sidebar-header{top:32px}.auto-fold #adminmenu{top:32px}}@media screen and (max-width: 480px){#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before{margin-top:4px !important}#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:6px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before{top:-5px !important;margin-left:-12px !important}}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5)}.nav-tab{border:none;background:none;font-weight:400;padding:3px 13px 12px;color:#0087be}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{background:transparent;box-shadow:none}.nav-tab:first-child{margin-left:0}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active{border-bottom:2px solid #2e4453;color:#2e4453}#wpadminbar{background:#0087be;-webkit-box-shadow:none;-mozilla-box-shadow:none;height:46px;position:fixed}#wpadminbar .ab-top-menu>li>.ab-item{font-size:14px}#wpadminbar .ab-top-menu>li.hover>.ab-item{background:#0099d8 !important;color:#fff}#wpadminbar *{line-height:46px}#wpadminbar .quicklinks a,#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .shortlink-input{height:46px}#wpadminbar .quicklinks>ul>li>a{padding:0 15px}#wpadminbar .quicklinks>ul>li.current>a{background:#004967}#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar .ab-top-menu>li.ab-hover>.ab-item{background:transparent !important}#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item{background:#0099d8 !important;color:#fff}#wpadminbar .ab-top-menu>li.my-sites>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.hover>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.ab-hover>.ab-item{background:#004967 !important}#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before,#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:12px}#wpadminbar ul li#wp-admin-bar-ab-new-post{border-radius:3px}#wpadminbar ul li#wp-admin-bar-ab-new-post a{padding:6px 15px;color:#0087be !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a span{color:#0087be !important;font-size:14px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before,#wpadminbar ul li#wp-admin-bar-ab-new-post a:after{background-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="0" fill="none" width="24" height="24"/><g><path fill="%230087be" d="M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"/><path fill="%230087be" d="M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"/></g></svg>') !important}#wpadminbar ul li#wp-admin-bar-ab-new-post:hover,#wpadminbar ul li#wp-admin-bar-ab-new-post:hover>.ab-item{background:#fff !important;opacity:1;border-radius:3px !important}#wpadminbar li#wp-admin-bar-blog.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-newdash.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-my-account.menupop>.ab-sub-wrapper{display:none !important}#wpadminbar li#wp-admin-bar-notes.active,#wpadminbar li#wp-admin-bar-notes.active>.ab-item{background:#004967 !important}#wpadminbar li#wp-admin-bar-notes>#wpnt-notes-panel2{top:46px}#wpadminbar .ab-top-menu>li.ab-active>.ab-item,#wpadminbar>#wp-toolbar .wpnt-show span.noticon,#wpadminbar #wp-admin-bar-notes.wpnt-show .noticon{color:#fff !important}#wpadminbar .ab-active>a.ab-item:before,#wpadminbar #wp-admin-bar-notes.active .noticon-bell:before{filter:brightness(100) !important}#wpadminbar .quicklinks>ul>li#wp-admin-bar-notes>a.ab-item span.noticon,#wpadminbar>#wp-toolbar span.noticon,#wpadminbar #wp-admin-bar-notes .noticon{top:10px}#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon,#wpadminbar .ab-icon,#wpadminbar .ab-item:before{font-size:24px;line-height:1.45}.wrap{margin:20px 30px 25px 15px}@media screen and (max-width: 782px){.wrap{margin:10px 18px 10px 7px}}.subsubsub,.wp-filter{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5);width:100%;box-shadow:none;padding:0}.subsubsub a,.filter-links li>a{padding:10px 15px;display:inline-block;font-size:14px;margin:0;color:#0073aa;border-bottom:none;outline:none}.filter-links li>a{padding:16px}.subsubsub a.current,.filter-links .current{border-bottom:2px solid #000}.count{display:inline-block;padding:1px 6px;border:solid 1px #87a6bc;border-radius:12px;font-size:11px;font-weight:bold;line-height:14px;color:#537994;text-align:center;margin-left:2px}.plugins-php .tablenav{clear:none;float:left;margin-bottom:15px}.plugins-php .tablenav .one-page .displaying-num{display:none}.plugins-php p.search-box{margin-top:5px}.wrap .wp-heading-inline+.page-title-action,.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{background:#00aadc;border-color:#008ab3;color:#fff;border-style:solid;border-width:1px 1px 2px;cursor:pointer;display:inline-block;margin:0 5px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;font-size:13px;line-height:21px;border-radius:4px;padding:2px 10px 2px;margin-bottom:2px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wrap .wp-heading-inline+.page-title-action:hover{border-color:#005082}.wp-core-ui .button{background:#fff}.wp-core-ui .button-primary{background:#00aadc;border-color:#008ab3;color:#fff;text-shadow:none}.ui-tabs-nav li,.wp-switch-editor{background-color:#e9eff3 !important}.plugin-card-bottom,.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd),.ui-tabs-panel,.ui-tabs-nav li.ui-tabs-active,.ui-tabs-nav li.ui-tabs-active:hover,div.mce-toolbar-grp,.html-active .switch-html,.tmce-active .switch-tmce,#post-status-info,.quicktags-toolbar,#major-publishing-actions{background-color:#f3f6f8 !important;border-color:#d9e3ea}.wp-filter .search-form{margin-right:10px}.form-toggle[type="checkbox"]{display:none}.form-toggle__switch{position:relative;display:inline-block;border-radius:12px;box-sizing:border-box;padding:2px;width:40px;height:24px;vertical-align:middle;-ms-flex-item-align:start;align-self:flex-start;outline:0;cursor:pointer;transition:all .4s ease, box-shadow 0s}.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}.accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #00aadc}.form-toggle__label{cursor:pointer}.is-disabled .form-toggle__label{cursor:default}.form-toggle__label .form-toggle__label-content{-ms-flex:0 1 100%;flex:0 1 100%;margin-left:12px}.accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #00aadc}.accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #78dcfa}.form-toggle+.form-toggle__label .form-toggle__switch{background:#a8bece}.form-toggle:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#c8d7e1}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#00aadc}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{left:16px}.form-toggle:checked:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#78dcfa}.form-toggle:disabled+label.form-toggle__label span.form-toggle__switch{opacity:0.25;cursor:default}.form-toggle.is-toggling+.form-toggle__label .form-toggle__switch{background:#00aadc}.form-toggle.is-toggling:checked+.form-toggle__label .form-toggle__switch{background:#c8d7e1}.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}
+body,#wp-content-editor-tools{background:#f6f6f6}#wpwrap{top:14px}#wp-admin-bar-notes #wpnt-notes-unread-count.wpn-unread{background-image:none !important;background-color:#ff76b8 !important;border:none !important}#adminmenu #collapse-menu,#adminmenu .wp-menu-separator,#screen-meta-links,.wp-submenu,#toplevel_page_jetpack{display:none}.wp-menu-open .wp-submenu{display:block}#adminmenuwrap,#adminmenuback,#adminmenu{background:#fff}#adminmenuback{border-right:1px solid #e1e2e2}#adminmenu,#adminmenuwrap,#adminmenuback,#adminmenu .wp-submenu{width:272px}#adminmenu{margin-top:71px}#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .opensub .wp-submenu,#adminmenu .opensub .wp-submenu:after,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:transparent !important}#adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open,#adminmenu a:hover{background:#f6f6f6}#adminmenu .wp-submenu-head,#adminmenu a.menu-top{padding:5px 0 5px 5px}#adminmenu .wp-has-current-submenu ul>li>a{padding:11px 16px 11px 20px;font-size:14px}#adminmenu .wp-submenu a:hover{background-color:#e1e2e2}#adminmenu>li.wp-first-item{border-bottom:1px solid rgba(200,215,225,0.5)}#adminmenu a.wp-has-current-submenu:after,#adminmenu>li.current>a.current:after,#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after{border:none}#adminmenu .dashicons,#adminmenu .dashicons-before:before{width:24px;height:24px;font-size:24px}#adminmenu a,#adminmenu div.wp-menu-image:before{color:#3d4145 !important}#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu{background:#d8dee4}#adminmenu div.wp-menu-image.svg{filter:brightness(0.25)}#adminmenu li.wp-menu-open div.wp-menu-image.svg{filter:brightness(100)}#adminmenu li.wp-menu-open div.wp-menu-image:before,#adminmenu li.wp-menu-open div.wp-menu-name{color:#016087 !important}#adminmenu div.wp-menu-name{color:#2b2d2f;font-size:15px;padding:9px 0 8px 41px}#adminmenu li.menu-top{min-height:46px}#adminmenu .awaiting-mod,#adminmenu .update-plugins{background-color:#016087}.no-js li.wp-has-current-submenu:hover .wp-submenu{background:transparent !important}#wpcontent,#wpfooter{margin-left:272px}#toplevel_page_plugins div.wp-menu-image.svg,#toplevel_page_plugin-install div.wp-menu-image.svg{background-size:24px auto}#toplevel_page_plugins div.wp-menu-image.svg{position:relative;left:-2px}#calypso-sidebar-header{position:fixed;top:47px;left:0;width:272px;height:70px;background:#fff;z-index:10000}#calypso-sidebar-header svg{float:left;position:relative;left:10px;top:23px}#calypso-sidebar-header ul{float:left;position:relative;top:3px;left:15px}#calypso-sidebar-header ul li{margin:0}#calypso-sidebar-header ul li#calypso-sitename{font-size:12px;color:#636d75;overflow:hidden;white-space:nowrap;width:225px}@media screen and (max-width: 782px){#calypso-sidebar-header ul li#calypso-sitename{width:150px}}#calypso-sidebar-header ul li#calypso-sitename:after{content:'';display:block;position:absolute;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;background:linear-gradient(to right, rgba(255,255,255,0), #fff 90%);top:0px;bottom:0px;right:0px;left:auto;width:20%;height:auto}#calypso-sidebar-header ul li#calypso-plugins{font-weight:bold;color:#2b2d2f;font-size:16px}.folded #adminmenu .wp-has-current-submenu .wp-submenu,.folded #adminmenu .opensub .wp-submenu,.folded #adminmenu .opensub .wp-submenu:after,.folded #adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#f6f6f6 !important}.folded #adminmenu li.menu-top .wp-submenu>li>a{padding:7px 12px 7px 46px;font-size:14px}.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head{background:#f3f5f6}.folded #adminmenu .wp-submenu .wp-submenu-head{padding:14px 4px 14px 11px}.folded #adminmenu a.menu-top{padding-left:1px}.folded #wpcontent #calypso-sidebar-header{width:36px}.folded #wpcontent #calypso-sidebar-header svg{left:6px}.folded #wpcontent #calypso-sidebar-header ul{display:none}.folded .no-js li.wp-has-current-submenu:hover .wp-submenu{background:#f6f6f6 !important}.folded #toplevel_page_plugins div.wp-menu-image.svg{position:relative;left:-2px}@media only screen and (max-width: 960px){#calypso-sidebar-header{width:36px}#calypso-sidebar-header ul{display:none}#calypso-sidebar-header svg{left:6px}#adminmenu a.menu-top{padding-left:1px}}@media screen and (max-width: 782px){#calypso-sidebar-header{position:absolute;display:none;width:190px;top:-14px}.wp-responsive-open #calypso-sidebar-header{display:block}#calypso-sidebar-header ul{display:block}.auto-fold #adminmenu .wp-menu-name{margin-left:0}.auto-fold #adminmenu{top:-14px}.auto-fold #adminmenu .selected,#adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus,#adminmenu li.wp-menu-open{background:#d8dee4 !important}#adminmenu .wp-submenu,.auto-fold #adminmenu .selected .wp-submenu,.auto-fold #adminmenu .wp-menu-open .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu{background:#fff !important}.auto-fold #adminmenu li.selected div.wp-menu-image.svg{filter:brightness(100)}.auto-fold #adminmenu li.selected div.wp-menu-image:before,.auto-fold #adminmenu li.selected div.wp-menu-name{color:#016087 !important}#wpadminbar .quicklinks>ul>li>a,#wpadminbar .quicklinks>ul>li>.ab-empty-item{padding:0 15px !important}#wpadminbar li#wp-admin-bar-ab-new-post a{padding:7px 15px !important}}@media screen and (max-width: 600px){#calypso-sidebar-header{top:32px}.auto-fold #adminmenu{top:32px}}@media screen and (max-width: 480px){#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before{margin-top:4px !important}#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:6px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before{top:-5px !important;margin-left:-12px !important}}.nav-tab-wrapper,.wrap h2.nav-tab-wrapper{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5)}.nav-tab{border:none;background:none;font-weight:400;padding:3px 13px 12px;color:#016087}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active,.nav-tab-active:hover{background:transparent;box-shadow:none}.nav-tab:first-child{margin-left:0}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:focus:active{border-bottom:2px solid #3d4145;color:#2b2d2f}#wpadminbar{background:#016087;-webkit-box-shadow:none;-mozilla-box-shadow:none;height:46px;position:fixed}#wpadminbar .ab-top-menu>li>.ab-item{font-size:14px}#wpadminbar .ab-top-menu>li.hover>.ab-item{background:#6f93ad !important;color:#fff}#wpadminbar *{line-height:46px}#wpadminbar .quicklinks a,#wpadminbar .quicklinks .ab-empty-item,#wpadminbar .shortlink-input{height:46px}#wpadminbar .quicklinks>ul>li>a{padding:0 15px}#wpadminbar .quicklinks>ul>li.current>a{background:#004966}#wpadminbar:not(.mobile) .ab-top-menu>li>.ab-item:focus,#wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus,#wpadminbar .ab-top-menu>li.ab-hover>.ab-item{background:transparent !important}#wpadminbar:not(.mobile) .ab-top-menu>li:hover>.ab-item{background:#6f93ad !important;color:#fff}#wpadminbar .ab-top-menu>li.my-sites>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.hover>.ab-item,#wpadminbar .ab-top-menu>li.my-sites.ab-hover>.ab-item{background:#004966 !important}#wpadminbar #wp-admin-bar-blog.my-sites>a.ab-item:before,#wpadminbar #wp-admin-bar-newdash>a.ab-item:before{margin-top:12px}#wpadminbar ul li#wp-admin-bar-ab-new-post{border-radius:3px}#wpadminbar ul li#wp-admin-bar-ab-new-post a{padding:6px 15px;color:#016087 !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a span{color:#016087 !important;font-size:14px !important}#wpadminbar ul li#wp-admin-bar-ab-new-post a:before,#wpadminbar ul li#wp-admin-bar-ab-new-post a:after{background-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="0" fill="none" width="24" height="24"/><g><path fill="%230087be" d="M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"/><path fill="%230087be" d="M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"/></g></svg>') !important}#wpadminbar ul li#wp-admin-bar-ab-new-post:hover,#wpadminbar ul li#wp-admin-bar-ab-new-post:hover>.ab-item{background:#f6f6f6 !important;opacity:1;border-radius:3px !important}#wpadminbar li#wp-admin-bar-blog.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-newdash.menupop>.ab-sub-wrapper,#wpadminbar li#wp-admin-bar-my-account.menupop>.ab-sub-wrapper{display:none !important}#wpadminbar li#wp-admin-bar-notes.active,#wpadminbar li#wp-admin-bar-notes.active>.ab-item{background:#004966 !important}#wpadminbar li#wp-admin-bar-notes>#wpnt-notes-panel2{top:46px}#wpadminbar .ab-top-menu>li.ab-active>.ab-item,#wpadminbar>#wp-toolbar .wpnt-show span.noticon,#wpadminbar #wp-admin-bar-notes.wpnt-show .noticon{color:#fff !important}#wpadminbar .ab-active>a.ab-item:before,#wpadminbar #wp-admin-bar-notes.active .noticon-bell:before{filter:brightness(100) !important}#wpadminbar .quicklinks>ul>li#wp-admin-bar-notes>a.ab-item span.noticon,#wpadminbar>#wp-toolbar span.noticon,#wpadminbar #wp-admin-bar-notes .noticon{top:10px}#wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon,#wpadminbar .ab-icon,#wpadminbar .ab-item:before{font-size:24px;line-height:1.45}.wrap{margin:20px 30px 25px 15px}@media screen and (max-width: 782px){.wrap{margin:10px 18px 10px 7px}}.subsubsub,.wp-filter{margin:10px 0 25px;background:#fff;border:1px solid rgba(200,215,225,0.5);width:100%;box-shadow:none;padding:0}.subsubsub a,.filter-links li>a{padding:10px 15px;display:inline-block;font-size:14px;margin:0;color:#016087;border-bottom:2px solid #fff;outline:none}.subsubsub a:focus,.filter-links li>a:focus{box-shadow:0 0 0 1px #016087,0 0 2px 1px #6f93ad}.subsubsub a:hover,.filter-links li>a:hover{color:#23354b;background-color:#f3f5f6}.subsubsub a:hover:not(.current),.filter-links li>a:hover:not(.current){border-color:#f3f5f6}.filter-links li>a{padding:16px}.subsubsub a.current,.filter-links .current{border-bottom:2px solid #3d4145}.count{display:inline-block;padding:1px 6px;border:solid 1px #969ca1;border-radius:12px;font-size:11px;font-weight:bold;line-height:14px;color:#636d75;text-align:center;margin-left:2px}.plugins-php .plugins a{color:#016087}.plugins-php .plugins a:hover,.plugins-php .plugins a:focus{color:#23354b}.plugins-php .plugins a:focus{box-shadow:0 0 0 1px #016087,0 0 2px 1px #6f93ad}.plugins-php .plugins a.delete{color:#eb0001}.plugins-php .plugins a.delete:hover,.plugins-php .plugins a.delete:focus{color:#ac120b}.plugins-php .plugins a.delete:focus{box-shadow:0 0 0 1px #eb0001,0 0 2px 1px #ff8248}.plugins-php .tablenav{clear:none;float:left;margin-bottom:15px}.plugins-php .tablenav .one-page .displaying-num{display:none}.plugins-php .bulkactions select:focus{border-color:#016087;box-shadow:0 0 2px #6f93ad}.plugins-php p.search-box{margin-top:5px}.plugins-php p.search-box .wp-filter-search:focus{border-color:#016087;box-shadow:0 0 2px #6f93ad}.plugins-php .plugins .active th{border-left:4px solid #016087}.plugins-php .plugins .active th,.plugins-php .plugins .active td{background-color:#f3f5f6}.wrap .wp-heading-inline+.page-title-action,.wrap .add-new-h2,.wrap .add-new-h2:active,.wrap .page-title-action,.wrap .page-title-action:active{background:#d52c82;border-color:#992053;color:#fff;border-style:solid;border-width:1px 1px 2px;cursor:pointer;display:inline-block;margin:0 5px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:middle;box-sizing:border-box;font-size:13px;line-height:21px;border-radius:4px;padding:2px 10px 2px;margin-bottom:2px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wrap .wp-heading-inline+.page-title-action:hover,.wrap .add-new-h2:hover,.wrap .add-new-h2:active:hover,.wrap .page-title-action:hover,.wrap .page-title-action:active:hover{background-color:#ff3997}.wrap .wp-heading-inline+.page-title-action:focus,.wrap .add-new-h2:focus,.wrap .add-new-h2:active:focus,.wrap .page-title-action:focus,.wrap .page-title-action:active:focus{box-shadow:0 0 0 2px #ff76b8;background-color:#ff3997}.wp-core-ui .button{background:#fff}.wp-core-ui .button:focus{border-color:#016087;box-shadow:0 0 3px #6f93ad}.wp-core-ui .button-primary{background:#016087;border-color:#23354b;color:#fff;text-shadow:none}.wp-core-ui .button-primary:hover,.wp-core-ui .button-primary:focus{background-color:#46799a}.ui-tabs-nav li,.wp-switch-editor{background-color:#f6f6f6 !important}.plugin-card a,.popular-tags a,.filter-links>li>a{color:#016087}.plugin-card a:hover,.plugin-card a:focus,.popular-tags a:hover,.popular-tags a:focus,.filter-links>li>a:hover,.filter-links>li>a:focus{color:#23354b}.plugin-card a:focus,.popular-tags a:focus,.filter-links>li>a:focus{box-shadow:0 0 0 1px #016087,0 0 2px 1px #6f93ad}.plugin-card-bottom,.alternate,.striped>tbody>:nth-child(odd),ul.striped>:nth-child(odd),.ui-tabs-panel,.ui-tabs-nav li.ui-tabs-active,.ui-tabs-nav li.ui-tabs-active:hover,div.mce-toolbar-grp,.html-active .switch-html,.tmce-active .switch-tmce,#post-status-info,.quicktags-toolbar,#major-publishing-actions{background-color:#fff;border-color:#d7e1e9}.wp-filter .search-form{margin-right:10px}.form-toggle[type="checkbox"]{display:none}.form-toggle__switch{position:relative;display:inline-block;border-radius:12px;box-sizing:border-box;padding:2px;width:40px;height:24px;vertical-align:middle;align-self:flex-start;outline:0;cursor:pointer;transition:all .4s ease, box-shadow 0s}.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}.accessible-focus .form-toggle__switch:focus{box-shadow:0 0 0 2px #016087}.form-toggle__label{cursor:pointer}.is-disabled .form-toggle__label{cursor:default}.form-toggle__label .form-toggle__label-content{flex:0 1 100%;margin-left:12px}.accessible-focus .form-toggle:focus+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #016087}.accessible-focus .form-toggle:focus:checked+.form-toggle__label .form-toggle__switch{box-shadow:0 0 0 2px #6f93ad}.form-toggle+.form-toggle__label .form-toggle__switch{background:#b0b5b8}.form-toggle:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#ccced0}.form-toggle:checked+.form-toggle__label .form-toggle__switch{background:#016087}.form-toggle:checked+.form-toggle__label .form-toggle__switch:after{left:16px}.form-toggle:checked:not(:disabled)+.form-toggle__label:hover .form-toggle__switch{background:#6f93ad}.form-toggle:disabled+label.form-toggle__label span.form-toggle__switch{opacity:0.25;cursor:default}.form-toggle.is-toggling+.form-toggle__label .form-toggle__switch{background:#016087}.form-toggle.is-toggling:checked+.form-toggle__label .form-toggle__switch{background:#ccced0}.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}
diff --git a/plugins/jetpack/modules/carousel.php b/plugins/jetpack/modules/carousel.php
index 611d2004..fda08752 100644
--- a/plugins/jetpack/modules/carousel.php
+++ b/plugins/jetpack/modules/carousel.php
@@ -3,14 +3,13 @@
/**
* Module Name: Carousel
* Module Description: Display images and galleries in a gorgeous, full-screen browsing experience
- * 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
* Requires Connection: No
* Auto Activate: No
* Module Tags: Photos and Videos
- * Feature: Appearance, Jumpstart
+ * Feature: Appearance
* Additional Search Queries: gallery, carousel, diaporama, slideshow, images, lightbox, exif, metadata, image
*/
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel-ie8fix.css b/plugins/jetpack/modules/carousel/jetpack-carousel-ie8fix.css
deleted file mode 100644
index 0c41d553..00000000
--- a/plugins/jetpack/modules/carousel/jetpack-carousel-ie8fix.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.jp-carousel .jp-carousel-slide {
- display: none !important;
-}
-.jp-carousel {
- text-align: center!important;
- width:100%!important;
-}
-.jp-carousel .selected {
- margin: 0 auto;
- display: block !important;
- width: auto;
- position: relative!important;
-} \ No newline at end of file
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel-rtl.css b/plugins/jetpack/modules/carousel/jetpack-carousel-rtl.css
index 7de51efb..bf71e026 100644
--- a/plugins/jetpack/modules/carousel/jetpack-carousel-rtl.css
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel-rtl.css
@@ -1 +1 @@
-.jp-carousel-wrap *{line-height:inherit}.jp-carousel-overlay{background:#000}div.jp-carousel-fadeaway{background:-moz-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background:-webkit-gradient(linear,right bottom,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));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) no-repeat center center;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;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:.4s ease-out}.jp-carousel-info h2{background:100% 0!important;border:none!important;color:#999;display:block!important;font:normal 13px/1.25em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;margin:7px 0 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:.5s 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:normal 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-transitions .jp-carousel-slide{transition:.3s ease-out}.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:100% 0!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 .4s 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 .2s linear}.jp-carousel-close-hint span{cursor:pointer;background-color:#000;background-color:rgba(0,0,0,.8);display:inline-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 .2s linear}.jp-carousel-close-hint:hover{cursor:default;color:#fff}.jp-carousel-close-hint:hover span{border-color:#fff}a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background:url(../modules/carousel/images/carousel-sprite.png?5) no-repeat;background-size:16px 200px}div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{margin:0 0 0 14px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;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}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:100% -156px;padding-right:19px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{cursor:default}div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:6px -56px;color:#68c9e8}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../modules/carousel/images/carousel-sprite-2x.png?5)}}div#carousel-reblog-box{background:#222;background:-moz-linear-gradient(bottom,#222,#333);background:-webkit-gradient(linear,right bottom,right top,from(#222),to(#333));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 9px;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;background:-moz-linear-gradient(bottom,#aaa,#ccc);background:-webkit-gradient(linear,right bottom,right top,from(#aaa),to(#ccc));border:1px solid #444}#carousel-reblog-box input#carousel-reblog-submit:hover,#jp-carousel-comment-form-button-submit:hover{background:#ccc;background:-moz-linear-gradient(bottom,#ccc,#eee);background:-webkit-gradient(linear,right bottom,right top,from(#ccc),to(#eee))}#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-size:13px;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:100% 0!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;display:inline-block!important;vertical-align:top!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:100% -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:100% -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 transparent}.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 transparent;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;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 0;padding:0}#jp-carousel-comment-form-commenting-as fieldset{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}#js-carousel-comment-form-container{margin-bottom:15px;overflow:auto;width:100%}#jp-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;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-reblog.reblogged{background-color:#2ea2cc;color:#fff}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:100% -176px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-position:5px -36px}.jp-carousel-light div#carousel-reblog-box{background:#eee;background:-moz-linear-gradient(bottom,#ececec,#f7f7f7);background:-webkit-gradient(linear,right bottom,right top,from(#ececec),to(#f7f7f7));box-shadow:0 2px 10px rgba(0,0,0,.1);border:1px solid #ddd}.jp-carousel-light #carousel-reblog-box textarea{border:1px inset #ccc;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;background:-moz-linear-gradient(bottom,#ddd,#fff);background:-webkit-gradient(linear,right bottom,right top,from(#ddd),to(#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:100% -122px}.jp-carousel-light a.jp-carousel-image-download:hover{background-position:100% -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}.jp-carousel-light .jp-carousel-fadeaway{background:-moz-linear-gradient(bottom,rgba(255,255,255,.75),rgba(255,255,255,0));background:-webkit-gradient(linear,right bottom,right top,from(rgba(255,255,255,.75)),to(rgba(255,255,255,0)))}@media only screen and (max-width:760px){.jp-carousel-info{margin:0 10px!important}.jp-carousel-next-button,.jp-carousel-previous-button{display:none!important}.jp-carousel-buttons{display:none!important}.jp-carousel-image-meta{float:none!important;width:100%!important;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}} \ No newline at end of file
+.jp-carousel-wrap *{line-height:inherit}.jp-carousel-overlay{background:#000}div.jp-carousel-fadeaway{background:-moz-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background:-webkit-gradient(linear,right bottom,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));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) no-repeat center center;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;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:.4s ease-out}.jp-carousel-info h2{background:100% 0!important;border:none!important;color:#999;display:block!important;font:normal 13px/1.25em "Helvetica Neue",sans-serif!important;letter-spacing:0!important;margin:7px 0 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;opacity:.2}.jp-carousel-transitions .jp-carousel-next-button span,.jp-carousel-transitions .jp-carousel-previous-button span{transition:.5s opacity ease-out}.jp-carousel-next-button:hover span,.jp-carousel-previous-button:hover span{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:normal 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-transitions .jp-carousel-slide{transition:.3s ease-out}.jp-carousel-slide.selected{position:absolute!important;opacity:1}.jp-carousel-slide{opacity:.25}.jp-carousel-slide img{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;background:100% 0!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 .4s 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 .2s linear}.jp-carousel-close-hint span{cursor:pointer;background-color:#000;background-color:rgba(0,0,0,.8);display:inline-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 .2s linear}.jp-carousel-close-hint:hover{cursor:default;color:#fff}.jp-carousel-close-hint:hover span{border-color:#fff}a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background:url(../modules/carousel/images/carousel-sprite.png?5) no-repeat;background-size:16px 200px}div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{margin:0 0 0 14px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-color:#303030;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}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:100% -156px;padding-right:19px!important}div.jp-carousel-buttons a.jp-carousel-reblog.reblogged:hover{cursor:default}div.jp-carousel-buttons a.jp-carousel-reblog:hover{background-position:6px -56px;color:#68c9e8}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (min-device-pixel-ratio:1.5){a.jp-carousel-image-download,div.jp-carousel-buttons a.jp-carousel-commentlink,div.jp-carousel-buttons a.jp-carousel-reblog{background-image:url(../modules/carousel/images/carousel-sprite-2x.png?5)}}div#carousel-reblog-box{background:#222;background:-moz-linear-gradient(bottom,#222,#333);background:-webkit-gradient(linear,right bottom,right top,from(#222),to(#333));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 9px;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;background:-moz-linear-gradient(bottom,#aaa,#ccc);background:-webkit-gradient(linear,right bottom,right top,from(#aaa),to(#ccc));border:1px solid #444}#carousel-reblog-box input#carousel-reblog-submit:hover,#jp-carousel-comment-form-button-submit:hover{background:#ccc;background:-moz-linear-gradient(bottom,#ccc,#eee);background:-webkit-gradient(linear,right bottom,right top,from(#ccc),to(#eee))}#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-size:13px;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:100% 0!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;display:inline-block!important;vertical-align:top!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:100% -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:100% -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 transparent}.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 transparent;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;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 0;padding:0}#jp-carousel-comment-form-commenting-as fieldset{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}#js-carousel-comment-form-container{margin-bottom:15px;overflow:auto;width:100%}#jp-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;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-reblog.reblogged{background-color:#2ea2cc;color:#fff}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-commentlink{background-position:100% -176px}.jp-carousel-light div.jp-carousel-buttons a.jp-carousel-reblog.reblogged{background-position:5px -36px}.jp-carousel-light div#carousel-reblog-box{background:#eee;background:-moz-linear-gradient(bottom,#ececec,#f7f7f7);background:-webkit-gradient(linear,right bottom,right top,from(#ececec),to(#f7f7f7));box-shadow:0 2px 10px rgba(0,0,0,.1);border:1px solid #ddd}.jp-carousel-light #carousel-reblog-box textarea{border:1px inset #ccc;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;background:-moz-linear-gradient(bottom,#ddd,#fff);background:-webkit-gradient(linear,right bottom,right top,from(#ddd),to(#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:100% -122px}.jp-carousel-light a.jp-carousel-image-download:hover{background-position:100% -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}.jp-carousel-light .jp-carousel-fadeaway{background:-moz-linear-gradient(bottom,rgba(255,255,255,.75),rgba(255,255,255,0));background:-webkit-gradient(linear,right bottom,right top,from(rgba(255,255,255,.75)),to(rgba(255,255,255,0)))}@media only screen and (max-width:760px){.jp-carousel-info{margin:0 10px!important}.jp-carousel-next-button,.jp-carousel-previous-button{display:none!important}.jp-carousel-buttons{display:none!important}.jp-carousel-image-meta{float:none!important;width:100%!important;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{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}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.js b/plugins/jetpack/modules/carousel/jetpack-carousel.js
index 056c376b..d5cc8037 100644
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.js
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.js
@@ -70,7 +70,7 @@ jQuery(document).ready(function($) {
overlay = $('<div></div>')
.addClass('jp-carousel-overlay')
.css({
- 'position' : 'absolute',
+ 'position' : 'fixed',
'top' : 0,
'right' : 0,
'bottom' : 0,
@@ -993,7 +993,7 @@ jQuery(document).ready(function($) {
var imageLinkParser = document.createElement( 'a' );
imageLinkParser.href = args.large_file;
- var isPhotonUrl = ( imageLinkParser.hostname.match( /^i[\d]{1}.wp.com$/i ) != null );
+ var isPhotonUrl = /^i[0-2].wp.com$/i.test( imageLinkParser.hostname );
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 );
@@ -1446,19 +1446,27 @@ jQuery(document).ready(function($) {
};
// register the event listener for starting the gallery
- $( document.body ).on( 'click.jp-carousel', 'div.gallery, div.tiled-gallery, ul.wp-block-gallery, a.single-image-gallery', function( e ) {
+ $(document.body).on('click.jp-carousel', 'div.gallery, div.tiled-gallery, ul.wp-block-gallery, div.wp-block-jetpack-tiled-gallery, a.single-image-gallery', function( e ) {
if ( ! $(this).jp_carousel( 'testForData', e.currentTarget ) ) {
return;
}
+
+ // Do not open the modal if we are looking at a gallery caption from before WP5, which may contain a link.
if ( $(e.target).parent().hasClass('gallery-caption') ) {
return;
}
+
+ // Do not open the modal if we are looking at a caption of a gallery block, which may contain a link.
+ if ( $(e.target).parent().is('figcaption') ) {
+ 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'))});
+ $(this).jp_carousel('open', { start_index: $(this).find('.gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item').index($(e.target).parents('.gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item'))});
});
// handle lightbox (single image gallery) for images linking to 'Attachment Page'
@@ -1495,7 +1503,7 @@ jQuery(document).ready(function($) {
last_known_location_hash = window.location.hash;
matches = window.location.hash.match( hashRegExp );
attachmentId = parseInt( matches[1], 10 );
- galleries = $( 'div.gallery, div.tiled-gallery, a.single-image-gallery' );
+ galleries = $( 'div.gallery, div.tiled-gallery, a.single-image-gallery, ul.wp-block-gallery, div.wp-block-jetpack-tiled-gallery' );
// Find the first thumbnail that matches the attachment ID in the location
// hash, then open the gallery that contains it.
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.php b/plugins/jetpack/modules/carousel/jetpack-carousel.php
index b024d005..f2f347df 100644
--- a/plugins/jetpack/modules/carousel/jetpack-carousel.php
+++ b/plugins/jetpack/modules/carousel/jetpack-carousel.php
@@ -78,6 +78,7 @@ class Jetpack_Carousel {
add_filter( 'gallery_style', array( $this, 'add_data_to_container' ) );
add_filter( 'wp_get_attachment_image_attributes', array( $this, 'add_data_to_images' ), 10, 2 );
add_filter( 'the_content', array( $this, 'check_content_for_blocks' ), 1 );
+ add_filter( 'jetpack_tiled_galleries_block_content', array( $this, 'add_data_img_tags_and_enqueue_assets' ) );
if ( $this->single_image_gallery_enabled ) {
add_filter( 'the_content', array( $this, 'add_data_img_tags_and_enqueue_assets' ) );
}
@@ -158,6 +159,10 @@ class Jetpack_Carousel {
}
function check_if_shortcode_processed_and_enqueue_assets( $output ) {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $output;
+ }
+
if (
! empty( $output ) &&
/**
@@ -199,8 +204,21 @@ class Jetpack_Carousel {
return $output;
}
+ /**
+ * Check if the content of a post uses gallery blocks. To be used by 'the_content' filter.
+ *
+ * @since 6.8.0
+ *
+ * @param string $content Post content.
+ *
+ * @return string $content Post content.
+ */
function check_content_for_blocks( $content ) {
- if ( function_exists( 'has_block' ) && has_block( 'gallery', $content ) ) {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $content;
+ }
+
+ if ( has_block( 'gallery', $content ) || has_block( 'jetpack/tiled-gallery', $content ) ) {
$this->enqueue_assets();
$content = $this->add_data_to_container( $content );
}
@@ -216,7 +234,7 @@ class Jetpack_Carousel {
'modules/carousel/jetpack-carousel.js'
),
array( 'jquery.spin' ),
- $this->asset_version( '20170209' ),
+ $this->asset_version( '20190102' ),
true
);
@@ -324,10 +342,6 @@ class Jetpack_Carousel {
wp_enqueue_style( 'jetpack-carousel', plugins_url( 'jetpack-carousel.css', __FILE__ ), array(), $this->asset_version( '20120629' ) );
wp_style_add_data( 'jetpack-carousel', 'rtl', 'replace' );
- 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.
@@ -346,6 +360,9 @@ class Jetpack_Carousel {
}
function set_in_gallery( $output ) {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $output;
+ }
$this->in_gallery = true;
return $output;
}
@@ -361,15 +378,19 @@ class Jetpack_Carousel {
* @return string Modified HTML content of the post
*/
function add_data_img_tags_and_enqueue_assets( $content ) {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $content;
+ }
+
if ( ! preg_match_all( '/<img [^>]+>/', $content, $matches ) ) {
return $content;
}
$selected_images = array();
-
foreach ( $matches[0] as $image_html ) {
- if ( preg_match( '/wp-image-([0-9]+)/i', $image_html, $class_id ) &&
- ( $attachment_id = absint( $class_id[1] ) ) ) {
- /*
+ if ( preg_match( '/(wp-image-|data-id=)\"?([0-9]+)\"?/i', $image_html, $class_id ) &&
+ ! preg_match( '/wp-block-jetpack-slideshow_image/', $image_html ) ) {
+ $attachment_id = absint( $class_id[2] );
+ /**
* If exactly the same image tag is used more than once, overwrite it.
* All identical tags will be replaced later with 'str_replace()'.
*/
@@ -411,6 +432,10 @@ class Jetpack_Carousel {
}
function add_data_to_images( $attr, $attachment = null ) {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $attr;
+ }
+
$attachment_id = intval( $attachment->ID );
if ( ! wp_attachment_is_image( $attachment_id ) ) {
return $attr;
@@ -423,7 +448,7 @@ class Jetpack_Carousel {
$img_meta = ( ! empty( $meta['image_meta'] ) ) ? (array) $meta['image_meta'] : array();
$comments_opened = intval( comments_open( $attachment_id ) );
- /*
+ /**
* Note: Cannot generate a filename from the width and height wp_get_attachment_image_src() returns because
* it takes the $content_width global variable themes can set in consideration, therefore returning sizes
* which when used to generate a filename will likely result in a 404 on the image.
@@ -479,6 +504,9 @@ class Jetpack_Carousel {
function add_data_to_container( $html ) {
global $post;
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $html;
+ }
if ( isset( $post ) ) {
$blog_id = (int) get_current_blog_id();
diff --git a/plugins/jetpack/modules/comment-likes.php b/plugins/jetpack/modules/comment-likes.php
index c884b8e9..4fd73751 100644
--- a/plugins/jetpack/modules/comment-likes.php
+++ b/plugins/jetpack/modules/comment-likes.php
@@ -38,7 +38,7 @@ class Jetpack_Comment_Likes {
$this->url_parts = parse_url( $this->url );
$this->domain = $this->url_parts['host'];
- add_action( 'init', array( $this, 'frontend_init' ) );
+ add_action( 'template_redirect', array( $this, 'frontend_init' ) );
add_action( 'admin_init', array( $this, 'admin_init' ) );
if ( ! Jetpack::is_module_active( 'likes' ) ) {
@@ -117,10 +117,6 @@ class Jetpack_Comment_Likes {
}
public function frontend_init() {
- if ( is_admin() ) {
- return;
- }
-
if ( Jetpack_AMP_Support::is_amp_request() ) {
return;
}
diff --git a/plugins/jetpack/modules/contact-form.php b/plugins/jetpack/modules/contact-form.php
index 31be8241..93c66df7 100644
--- a/plugins/jetpack/modules/contact-form.php
+++ b/plugins/jetpack/modules/contact-form.php
@@ -1,16 +1,15 @@
<?php
/**
* Module Name: Contact Form
- * Module Description: Insert a customizable 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.
+ * Module Description: Add a customizable contact form to any post or page using the Jetpack Form Block.
* Sort Order: 15
* Recommendation Order: 14
* First Introduced: 1.3
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Other
- * Feature: Writing, Jumpstart
- * Additional Search Queries: contact, form, grunion, feedback, submission
+ * Feature: Writing
+ * Additional Search Queries: contact, form, grunion, feedback, submission, contact form, email, feedback, contact form plugin, custom form, custom form plugin, form builder, forms, form maker, survey, contact by jetpack, contact us, forms free
*/
require_once 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 6fa0a7c5..0596f798 100644
--- a/plugins/jetpack/modules/contact-form/admin.php
+++ b/plugins/jetpack/modules/contact-form/admin.php
@@ -660,7 +660,7 @@ function grunion_ajax_spam() {
do_action( 'contact_form_akismet', 'ham', $akismet_values );
$comment_author_email = $reply_to_addr = $message = $to = $headers = false;
- $blog_url = parse_url( site_url() );
+ $blog_url = wp_parse_url( site_url() );
// resend the original email
$email = get_post_meta( $post_id, '_feedback_email', true );
diff --git a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.css b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.css
index fc517a33..1cfbf3ce 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.css
@@ -144,6 +144,13 @@ input[type="url"]:-ms-input-placeholder {
color: #87a6bc;
}
+input[type="text"]::-ms-input-placeholder,
+input[type="tel"]::-ms-input-placeholder,
+input[type="email"]::-ms-input-placeholder,
+input[type="url"]::-ms-input-placeholder {
+ color: #87a6bc;
+}
+
input[type="text"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder,
@@ -198,6 +205,13 @@ input[type="url"]:disabled:-ms-input-placeholder {
color: #a8bece;
}
+input[type="text"]:disabled::-ms-input-placeholder,
+input[type="tel"]:disabled::-ms-input-placeholder,
+input[type="email"]:disabled::-ms-input-placeholder,
+input[type="url"]:disabled::-ms-input-placeholder {
+ color: #a8bece;
+}
+
input[type="text"]:disabled::placeholder,
input[type="tel"]:disabled::placeholder,
input[type="email"]:disabled::placeholder,
@@ -233,6 +247,10 @@ textarea:-ms-input-placeholder {
color: #87a6bc;
}
+textarea::-ms-input-placeholder {
+ color: #87a6bc;
+}
+
textarea::placeholder {
color: #87a6bc;
}
@@ -266,6 +284,10 @@ textarea:disabled:-ms-input-placeholder {
color: #a8bece;
}
+textarea:disabled::-ms-input-placeholder {
+ color: #a8bece;
+}
+
textarea:disabled::placeholder {
color: #a8bece;
}
@@ -440,6 +462,11 @@ input[type="radio"]:disabled:-ms-input-placeholder {
color: #a8bece;
}
+.radio-button:disabled::-ms-input-placeholder,
+input[type="radio"]:disabled::-ms-input-placeholder {
+ color: #a8bece;
+}
+
.radio-button:disabled::placeholder,
input[type="radio"]:disabled::placeholder {
color: #a8bece;
@@ -510,11 +537,11 @@ select {
vertical-align: top;
white-space: nowrap;
box-sizing: border-box;
- padding: 7px 14px 9px 32px; // Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow.
+ /* Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow. */
+ padding: 7px 14px 9px 32px;
-webkit-appearance: none;
-moz-appearance: none;
- -webkit-appearance: none;
- appearance: none;
+ appearance: none;
}
select:hover {
@@ -700,17 +727,13 @@ input[type="submit"].button-primary {
}
.grunion-type-options {
- display: -ms-flexbox;
display: flex;
- -ms-flex-wrap: wrap;
- flex-wrap: wrap;
+ flex-wrap: wrap;
}
.grunion-type {
- -ms-flex-positive: 0;
- flex-grow: 0;
- -ms-flex-negative: 0;
- flex-shrink: 0;
+ flex-grow: 0;
+ flex-shrink: 0;
}
.grunion-type select {
@@ -720,10 +743,8 @@ input[type="submit"].button-primary {
.grunion-required {
padding: 27px 16px 0 0;
- -ms-flex-positive: 0;
- flex-grow: 0;
- -ms-flex-negative: 0;
- flex-shrink: 0;
+ flex-grow: 0;
+ flex-shrink: 0;
}
.grunion-options {
@@ -737,7 +758,6 @@ input[type="submit"].button-primary {
}
.grunion-options li {
- display: -ms-flexbox;
display: flex;
margin-bottom: 16px;
}
@@ -764,21 +784,17 @@ input[type="submit"].button-primary {
}
.grunion-controls {
- display: -ms-flexbox;
display: flex;
- -ms-flex-wrap: wrap;
- flex-wrap: wrap;
+ flex-wrap: wrap;
}
.grunion-update-controls {
text-align: left;
- -ms-flex-positive: 1;
- flex-grow: 1;
+ flex-grow: 1;
}
#add-field {
- -ms-flex-positive: 0;
- flex-grow: 0;
+ flex-grow: 0;
}
.delete-option:before,
diff --git a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.min.css b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.min.css
index f306cf78..9b7a27c2 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.min.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style-rtl.min.css
@@ -1 +1 @@
-html{direction:rtl}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em;margin:0}a,a:visited{color:#0087be;text-decoration:none}a:active,a:focus,a:hover{color:$link-highlight}.card,body{display:block;position:relative;margin:0 auto 10px auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}body{margin:0;background:#f5f5f5}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}.card:focus,.card:hover{box-shadow:0 0 0 1px #999,0 1px 2px #e9eff3}.card .delete-field{display:block;float:left}@media (min-width:481px){.card{margin-bottom:16px;padding:24px}body{padding:24px}}.card.is-compact{margin-bottom:1px}@media (min-width:481px){.card.is-compact{margin-bottom:1px;padding:16px 24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px;margin-top:8px}label:first-of-type{margin-top:4px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}.checkbox,input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:right;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}.checkbox:checked:before,input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px -4px 0 0;float:right;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}.checkbox:disabled:checked:before,input[type=checkbox]:disabled:checked:before{color:#a8bece}.checkbox:hover,input[type=checkbox]:hover{border-color:#a8bece}.checkbox:focus,input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.checkbox:disabled,input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}.checkbox:disabled:hover,input[type=checkbox]:disabled:hover{cursor:default}.checkbox+span,input[type=checkbox]+span{display:block;font-weight:400;margin-right:24px}.radio-button,input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 0 0 4px;float:right;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}.radio-button:hover,input[type=radio]:hover{border-color:#a8bece}.radio-button:focus,input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.radio-button:focus::-ms-clear,input[type=radio]:focus::-ms-clear{display:none}.radio-button:checked:before,input[type=radio]:checked:before{float:right;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}.radio-button:disabled,input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}.radio-button:disabled:hover,input[type=radio]:disabled:hover{cursor:default}.radio-button:disabled:-ms-input-placeholder,input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}.radio-button:disabled::placeholder,input[type=radio]:disabled::placeholder{color:#a8bece}.radio-button:disabled:checked::before,input[type=radio]:disabled:checked:before{background:#e9eff3}.radio-button+span,input[type=radio]+span{display:block;font-weight:400;margin-right:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 14px 9px 32px;-moz-appearance:none;-webkit-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center}select.is-compact{min-width:0;padding:0 6px 2px 20px;margin:0 4px;background-position:left 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}input[type=submit].hidden{display:none}input[type=submit] .gridicon{position:relative;top:4px;margin-top:-2px;width:18px;height:18px}input[type=submit].button-primary{background:#00aadc;border-color:#008ab3;color:#fff}input[type=submit].button-primary:focus,input[type=submit].button-primary:hover{border-color:#005082;color:#fff}input[type=submit].button-primary:disabled,input[type=submit].button-primary[disabled]{background:#bceefd;border-color:#8cc9e2;color:#fff}input[type=submit].button-primary{color:#fff}.ui-sortable-handle{cursor:move}.grunion-section-header{font-size:21px;margin-top:32px;font-weight:600}.grunion-form-settings:hover{box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.grunion-section-header:first-child{margin-top:0}.grunion-type-options{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.grunion-type{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.grunion-type select{-webkit-appearance:none;width:100%}.grunion-required{padding:27px 16px 0 0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.grunion-options{padding-top:16px}.grunion-options ol{list-style:none;padding:0;margin:8px 0 0}.grunion-options li{display:-ms-flexbox;display:flex;margin-bottom:16px}.grunion-field-edit .grunion-options{display:none}.delete-field,.delete-option{color:#0087be;text-decoration:none;width:40px;line-height:40px;font-size:21px;text-align:center;font-weight:600}.delete-field{position:absolute;top:0;left:0}.grunion-controls{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.grunion-update-controls{text-align:left;-ms-flex-positive:1;flex-grow:1}#add-field{-ms-flex-positive:0;flex-grow:0}.delete-field:before,.delete-option:before{font-family:Dashicons;content:"\f335";display:inline-block;speak:none}.grunion-field-edit.grunion-field-checkbox-multiple .grunion-options,.grunion-field-edit.grunion-field-radio .grunion-options,.grunion-field-edit.grunion-field-select .grunion-options{display:block}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important} \ No newline at end of file
+html{direction:rtl}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em;margin:0}a,a:visited{color:#0087be;text-decoration:none}a:active,a:focus,a:hover{color:$link-highlight}.card,body{display:block;position:relative;margin:0 auto 10px auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}body{margin:0;background:#f5f5f5}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}.card:focus,.card:hover{box-shadow:0 0 0 1px #999,0 1px 2px #e9eff3}.card .delete-field{display:block;float:left}@media (min-width:481px){.card{margin-bottom:16px;padding:24px}body{padding:24px}}.card.is-compact{margin-bottom:1px}@media (min-width:481px){.card.is-compact{margin-bottom:1px;padding:16px 24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px;margin-top:8px}label:first-of-type{margin-top:4px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::-ms-input-placeholder,input[type=tel]::-ms-input-placeholder,input[type=text]::-ms-input-placeholder,input[type=url]::-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::-ms-input-placeholder,input[type=tel]:disabled::-ms-input-placeholder,input[type=text]:disabled::-ms-input-placeholder,input[type=url]:disabled::-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}.checkbox,input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:right;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}.checkbox:checked:before,input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px -4px 0 0;float:right;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}.checkbox:disabled:checked:before,input[type=checkbox]:disabled:checked:before{color:#a8bece}.checkbox:hover,input[type=checkbox]:hover{border-color:#a8bece}.checkbox:focus,input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.checkbox:disabled,input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}.checkbox:disabled:hover,input[type=checkbox]:disabled:hover{cursor:default}.checkbox+span,input[type=checkbox]+span{display:block;font-weight:400;margin-right:24px}.radio-button,input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 0 0 4px;float:right;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}.radio-button:hover,input[type=radio]:hover{border-color:#a8bece}.radio-button:focus,input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.radio-button:focus::-ms-clear,input[type=radio]:focus::-ms-clear{display:none}.radio-button:checked:before,input[type=radio]:checked:before{float:right;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}.radio-button:disabled,input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}.radio-button:disabled:hover,input[type=radio]:disabled:hover{cursor:default}.radio-button:disabled:-ms-input-placeholder,input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}.radio-button:disabled::-ms-input-placeholder,input[type=radio]:disabled::-ms-input-placeholder{color:#a8bece}.radio-button:disabled::placeholder,input[type=radio]:disabled::placeholder{color:#a8bece}.radio-button:disabled:checked::before,input[type=radio]:disabled:checked:before{background:#e9eff3}.radio-button+span,input[type=radio]+span{display:block;font-weight:400;margin-right:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 14px 9px 32px;-webkit-appearance:none;-moz-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center}select.is-compact{min-width:0;padding:0 6px 2px 20px;margin:0 4px;background-position:left 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}input[type=submit].hidden{display:none}input[type=submit] .gridicon{position:relative;top:4px;margin-top:-2px;width:18px;height:18px}input[type=submit].button-primary{background:#00aadc;border-color:#008ab3;color:#fff}input[type=submit].button-primary:focus,input[type=submit].button-primary:hover{border-color:#005082;color:#fff}input[type=submit].button-primary:disabled,input[type=submit].button-primary[disabled]{background:#bceefd;border-color:#8cc9e2;color:#fff}input[type=submit].button-primary{color:#fff}.ui-sortable-handle{cursor:move}.grunion-section-header{font-size:21px;margin-top:32px;font-weight:600}.grunion-form-settings:hover{box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.grunion-section-header:first-child{margin-top:0}.grunion-type-options{display:flex;flex-wrap:wrap}.grunion-type{flex-grow:0;flex-shrink:0}.grunion-type select{-webkit-appearance:none;width:100%}.grunion-required{padding:27px 16px 0 0;flex-grow:0;flex-shrink:0}.grunion-options{padding-top:16px}.grunion-options ol{list-style:none;padding:0;margin:8px 0 0}.grunion-options li{display:flex;margin-bottom:16px}.grunion-field-edit .grunion-options{display:none}.delete-field,.delete-option{color:#0087be;text-decoration:none;width:40px;line-height:40px;font-size:21px;text-align:center;font-weight:600}.delete-field{position:absolute;top:0;left:0}.grunion-controls{display:flex;flex-wrap:wrap}.grunion-update-controls{text-align:left;flex-grow:1}#add-field{flex-grow:0}.delete-field:before,.delete-option:before{font-family:Dashicons;content:"\f335";display:inline-block;speak:none}.grunion-field-edit.grunion-field-checkbox-multiple .grunion-options,.grunion-field-edit.grunion-field-radio .grunion-options,.grunion-field-edit.grunion-field-select .grunion-options{display:block}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important} \ No newline at end of file
diff --git a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css
index df097164..13db02fd 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.css
@@ -476,7 +476,8 @@ select {
vertical-align: top;
white-space: nowrap;
box-sizing: border-box;
- padding: 7px 32px 9px 14px; // Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow.
+ /* Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow. */
+ padding: 7px 32px 9px 14px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
diff --git a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.min.css b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.min.css
index 51eb01e0..7d3a0ca0 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.min.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-inline-editing-style.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-html{direction:ltr}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em;margin:0}a,a:visited{color:#0087be;text-decoration:none}a:active,a:focus,a:hover{color:$link-highlight}.card,body{display:block;position:relative;margin:0 auto 10px auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}body{margin:0;background:#f5f5f5}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}.card:focus,.card:hover{box-shadow:0 0 0 1px #999,0 1px 2px #e9eff3}.card .delete-field{display:block;float:right}@media (min-width:481px){.card{margin-bottom:16px;padding:24px}body{padding:24px}}.card.is-compact{margin-bottom:1px}@media (min-width:481px){.card.is-compact{margin-bottom:1px;padding:16px 24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px;margin-top:8px}label:first-of-type{margin-top:4px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}.checkbox,input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:left;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}.checkbox:checked:before,input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px 0 0 -4px;float:left;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}.checkbox:disabled:checked:before,input[type=checkbox]:disabled:checked:before{color:#a8bece}.checkbox:hover,input[type=checkbox]:hover{border-color:#a8bece}.checkbox:focus,input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.checkbox:disabled,input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}.checkbox:disabled:hover,input[type=checkbox]:disabled:hover{cursor:default}.checkbox+span,input[type=checkbox]+span{display:block;font-weight:400;margin-left:24px}.radio-button,input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 4px 0 0;float:left;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}.radio-button:hover,input[type=radio]:hover{border-color:#a8bece}.radio-button:focus,input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.radio-button:focus::-ms-clear,input[type=radio]:focus::-ms-clear{display:none}.radio-button:checked:before,input[type=radio]:checked:before{float:left;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}.radio-button:disabled,input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}.radio-button:disabled:hover,input[type=radio]:disabled:hover{cursor:default}.radio-button:disabled:-ms-input-placeholder,input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}.radio-button:disabled::placeholder,input[type=radio]:disabled::placeholder{color:#a8bece}.radio-button:disabled:checked::before,input[type=radio]:disabled:checked:before{background:#e9eff3}.radio-button+span,input[type=radio]+span{display:block;font-weight:400;margin-left:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 32px 9px 14px;-moz-appearance:none;-webkit-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center}select.is-compact{min-width:0;padding:0 20px 2px 6px;margin:0 4px;background-position:right 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}input[type=submit].hidden{display:none}input[type=submit] .gridicon{position:relative;top:4px;margin-top:-2px;width:18px;height:18px}input[type=submit].button-primary{background:#00aadc;border-color:#008ab3;color:#fff}input[type=submit].button-primary:focus,input[type=submit].button-primary:hover{border-color:#005082;color:#fff}input[type=submit].button-primary:disabled,input[type=submit].button-primary[disabled]{background:#bceefd;border-color:#8cc9e2;color:#fff}input[type=submit].button-primary{color:#fff}.ui-sortable-handle{cursor:move}.grunion-section-header{font-size:21px;margin-top:32px;font-weight:600}.grunion-form-settings:hover{box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.grunion-section-header:first-child{margin-top:0}.grunion-type-options{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.grunion-type{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.grunion-type select{-webkit-appearance:none;width:100%}.grunion-required{padding:27px 0 0 16px;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.grunion-options{padding-top:16px}.grunion-options ol{list-style:none;padding:0;margin:8px 0 0}.grunion-options li{display:-ms-flexbox;display:flex;margin-bottom:16px}.grunion-field-edit .grunion-options{display:none}.delete-field,.delete-option{color:#0087be;text-decoration:none;width:40px;line-height:40px;font-size:21px;text-align:center;font-weight:600}.delete-field{position:absolute;top:0;right:0}.grunion-controls{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.grunion-update-controls{text-align:right;-ms-flex-positive:1;flex-grow:1}#add-field{-ms-flex-positive:0;flex-grow:0}.delete-field:before,.delete-option:before{font-family:Dashicons;content:"\f335";display:inline-block;speak:none}.grunion-field-edit.grunion-field-checkbox-multiple .grunion-options,.grunion-field-edit.grunion-field-radio .grunion-options,.grunion-field-edit.grunion-field-select .grunion-options{display:block}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important} \ No newline at end of file
+html{direction:ltr}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em;margin:0}a,a:visited{color:#0087be;text-decoration:none}a:active,a:focus,a:hover{color:$link-highlight}.card,body{display:block;position:relative;margin:0 auto 10px auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}body{margin:0;background:#f5f5f5}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}.card:focus,.card:hover{box-shadow:0 0 0 1px #999,0 1px 2px #e9eff3}.card .delete-field{display:block;float:right}@media (min-width:481px){.card{margin-bottom:16px;padding:24px}body{padding:24px}}.card.is-compact{margin-bottom:1px}@media (min-width:481px){.card.is-compact{margin-bottom:1px;padding:16px 24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px;margin-top:8px}label:first-of-type{margin-top:4px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::-ms-input-placeholder,input[type=tel]::-ms-input-placeholder,input[type=text]::-ms-input-placeholder,input[type=url]::-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::-ms-input-placeholder,input[type=tel]:disabled::-ms-input-placeholder,input[type=text]:disabled::-ms-input-placeholder,input[type=url]:disabled::-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}.checkbox,input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:left;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}.checkbox:checked:before,input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px 0 0 -4px;float:left;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}.checkbox:disabled:checked:before,input[type=checkbox]:disabled:checked:before{color:#a8bece}.checkbox:hover,input[type=checkbox]:hover{border-color:#a8bece}.checkbox:focus,input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.checkbox:disabled,input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}.checkbox:disabled:hover,input[type=checkbox]:disabled:hover{cursor:default}.checkbox+span,input[type=checkbox]+span{display:block;font-weight:400;margin-left:24px}.radio-button,input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 4px 0 0;float:left;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}.radio-button:hover,input[type=radio]:hover{border-color:#a8bece}.radio-button:focus,input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}.radio-button:focus::-ms-clear,input[type=radio]:focus::-ms-clear{display:none}.radio-button:checked:before,input[type=radio]:checked:before{float:left;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}.radio-button:disabled,input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}.radio-button:disabled:hover,input[type=radio]:disabled:hover{cursor:default}.radio-button:disabled:-ms-input-placeholder,input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}.radio-button:disabled::-ms-input-placeholder,input[type=radio]:disabled::-ms-input-placeholder{color:#a8bece}.radio-button:disabled::placeholder,input[type=radio]:disabled::placeholder{color:#a8bece}.radio-button:disabled:checked::before,input[type=radio]:disabled:checked:before{background:#e9eff3}.radio-button+span,input[type=radio]+span{display:block;font-weight:400;margin-left:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 32px 9px 14px;-webkit-appearance:none;-moz-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center}select.is-compact{min-width:0;padding:0 20px 2px 6px;margin:0 4px;background-position:right 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}input[type=submit].hidden{display:none}input[type=submit] .gridicon{position:relative;top:4px;margin-top:-2px;width:18px;height:18px}input[type=submit].button-primary{background:#00aadc;border-color:#008ab3;color:#fff}input[type=submit].button-primary:focus,input[type=submit].button-primary:hover{border-color:#005082;color:#fff}input[type=submit].button-primary:disabled,input[type=submit].button-primary[disabled]{background:#bceefd;border-color:#8cc9e2;color:#fff}input[type=submit].button-primary{color:#fff}.ui-sortable-handle{cursor:move}.grunion-section-header{font-size:21px;margin-top:32px;font-weight:600}.grunion-form-settings:hover{box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.grunion-section-header:first-child{margin-top:0}.grunion-type-options{display:flex;flex-wrap:wrap}.grunion-type{flex-grow:0;flex-shrink:0}.grunion-type select{-webkit-appearance:none;width:100%}.grunion-required{padding:27px 0 0 16px;flex-grow:0;flex-shrink:0}.grunion-options{padding-top:16px}.grunion-options ol{list-style:none;padding:0;margin:8px 0 0}.grunion-options li{display:flex;margin-bottom:16px}.grunion-field-edit .grunion-options{display:none}.delete-field,.delete-option{color:#0087be;text-decoration:none;width:40px;line-height:40px;font-size:21px;text-align:center;font-weight:600}.delete-field{position:absolute;top:0;right:0}.grunion-controls{display:flex;flex-wrap:wrap}.grunion-update-controls{text-align:right;flex-grow:1}#add-field{flex-grow:0}.delete-field:before,.delete-option:before{font-family:Dashicons;content:"\f335";display:inline-block;speak:none}.grunion-field-edit.grunion-field-checkbox-multiple .grunion-options,.grunion-field-edit.grunion-field-radio .grunion-options,.grunion-field-edit.grunion-field-select .grunion-options{display:block}.screen-reader-text{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important} \ No newline at end of file
diff --git a/plugins/jetpack/modules/contact-form/css/editor-style-rtl.css b/plugins/jetpack/modules/contact-form/css/editor-style-rtl.css
index 048d4a23..e6b43f3c 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-style-rtl.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-style-rtl.css
@@ -91,6 +91,13 @@ input[type="url"]:-ms-input-placeholder {
color: #87a6bc;
}
+input[type="text"]::-ms-input-placeholder,
+input[type="tel"]::-ms-input-placeholder,
+input[type="email"]::-ms-input-placeholder,
+input[type="url"]::-ms-input-placeholder {
+ color: #87a6bc;
+}
+
input[type="text"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder,
@@ -145,6 +152,13 @@ input[type="url"]:disabled:-ms-input-placeholder {
color: #a8bece;
}
+input[type="text"]:disabled::-ms-input-placeholder,
+input[type="tel"]:disabled::-ms-input-placeholder,
+input[type="email"]:disabled::-ms-input-placeholder,
+input[type="url"]:disabled::-ms-input-placeholder {
+ color: #a8bece;
+}
+
input[type="text"]:disabled::placeholder,
input[type="tel"]:disabled::placeholder,
input[type="email"]:disabled::placeholder,
@@ -180,6 +194,10 @@ textarea:-ms-input-placeholder {
color: #87a6bc;
}
+textarea::-ms-input-placeholder {
+ color: #87a6bc;
+}
+
textarea::placeholder {
color: #87a6bc;
}
@@ -213,6 +231,10 @@ textarea:disabled:-ms-input-placeholder {
color: #a8bece;
}
+textarea:disabled::-ms-input-placeholder {
+ color: #a8bece;
+}
+
textarea:disabled::placeholder {
color: #a8bece;
}
@@ -371,6 +393,10 @@ input[type="radio"]:disabled:-ms-input-placeholder {
color: #a8bece;
}
+input[type="radio"]:disabled::-ms-input-placeholder {
+ color: #a8bece;
+}
+
input[type="radio"]:disabled::placeholder {
color: #a8bece;
}
@@ -438,11 +464,11 @@ select {
vertical-align: top;
white-space: nowrap;
box-sizing: border-box;
- padding: 7px 14px 9px 32px; // Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow.
+ /* Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow. */
+ padding: 7px 14px 9px 32px;
-webkit-appearance: none;
-moz-appearance: none;
- -webkit-appearance: none;
- appearance: none;
+ appearance: none;
}
select:hover {
diff --git a/plugins/jetpack/modules/contact-form/css/editor-style-rtl.min.css b/plugins/jetpack/modules/contact-form/css/editor-style-rtl.min.css
index cfa53b4a..4562abc2 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-style-rtl.min.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-style-rtl.min.css
@@ -1 +1 @@
-body,label{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em}.card{display:block;position:relative;margin:0 auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}@media (min-width:481px){.card{padding:24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:right;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px -4px 0 0;float:right;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}input[type=checkbox]:disabled:checked:before{color:#a8bece}input[type=checkbox]:hover{border-color:#a8bece}input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}input[type=checkbox]:disabled:hover{cursor:default}input[type=checkbox]+span{display:block;font-weight:400;margin-right:24px}input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 0 0 4px;float:right;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}input[type=radio]:hover{border-color:#a8bece}input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=radio]:focus::-ms-clear{display:none}input[type=radio]:checked:before{float:right;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}input[type=radio]:disabled:hover{cursor:default}input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}input[type=radio]:disabled::placeholder{color:#a8bece}input[type=radio]:disabled:checked:before{background:#e9eff3}input[type=radio]+span{display:block;font-weight:400;margin-right:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 14px 9px 32px;-moz-appearance:none;-webkit-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center}select.is-compact{min-width:0;padding:0 6px 2px 20px;margin:0 4px;background-position:left 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}.wpview.wpview-wrap[data-wpview-type=contact-form] iframe.inline-edit-contact-form{width:100%;min-height:500px;border:0;overflow:hidden;margin-bottom:0;display:block}.contact-submit.contact-submit{margin-top:0;margin-bottom:0} \ No newline at end of file
+body,label{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em}.card{display:block;position:relative;margin:0 auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}@media (min-width:481px){.card{padding:24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::-ms-input-placeholder,input[type=tel]::-ms-input-placeholder,input[type=text]::-ms-input-placeholder,input[type=url]::-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::-ms-input-placeholder,input[type=tel]:disabled::-ms-input-placeholder,input[type=text]:disabled::-ms-input-placeholder,input[type=url]:disabled::-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:right;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px -4px 0 0;float:right;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}input[type=checkbox]:disabled:checked:before{color:#a8bece}input[type=checkbox]:hover{border-color:#a8bece}input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}input[type=checkbox]:disabled:hover{cursor:default}input[type=checkbox]+span{display:block;font-weight:400;margin-right:24px}input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 0 0 4px;float:right;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}input[type=radio]:hover{border-color:#a8bece}input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=radio]:focus::-ms-clear{display:none}input[type=radio]:checked:before{float:right;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}input[type=radio]:disabled:hover{cursor:default}input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}input[type=radio]:disabled::-ms-input-placeholder{color:#a8bece}input[type=radio]:disabled::placeholder{color:#a8bece}input[type=radio]:disabled:checked:before{background:#e9eff3}input[type=radio]+span{display:block;font-weight:400;margin-right:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 14px 9px 32px;-webkit-appearance:none;-moz-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat left 10px center}select.is-compact{min-width:0;padding:0 6px 2px 20px;margin:0 4px;background-position:left 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}.wpview.wpview-wrap[data-wpview-type=contact-form] iframe.inline-edit-contact-form{width:100%;min-height:500px;border:0;overflow:hidden;margin-bottom:0;display:block}.contact-submit.contact-submit{margin-top:0;margin-bottom:0} \ No newline at end of file
diff --git a/plugins/jetpack/modules/contact-form/css/editor-style.css b/plugins/jetpack/modules/contact-form/css/editor-style.css
index 343b7f96..e060f69a 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-style.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-style.css
@@ -405,7 +405,8 @@ select {
vertical-align: top;
white-space: nowrap;
box-sizing: border-box;
- padding: 7px 32px 9px 14px; // Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow.
+ /* Aligns the text to the 8px baseline grid and adds padding on right to allow for the arrow. */
+ padding: 7px 32px 9px 14px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
diff --git a/plugins/jetpack/modules/contact-form/css/editor-style.min.css b/plugins/jetpack/modules/contact-form/css/editor-style.min.css
index f3bc59c2..fdef6b83 100644
--- a/plugins/jetpack/modules/contact-form/css/editor-style.min.css
+++ b/plugins/jetpack/modules/contact-form/css/editor-style.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-body,label{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em}.card{display:block;position:relative;margin:0 auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}@media (min-width:481px){.card{padding:24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:left;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px 0 0 -4px;float:left;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}input[type=checkbox]:disabled:checked:before{color:#a8bece}input[type=checkbox]:hover{border-color:#a8bece}input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}input[type=checkbox]:disabled:hover{cursor:default}input[type=checkbox]+span{display:block;font-weight:400;margin-left:24px}input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 4px 0 0;float:left;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}input[type=radio]:hover{border-color:#a8bece}input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=radio]:focus::-ms-clear{display:none}input[type=radio]:checked:before{float:left;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}input[type=radio]:disabled:hover{cursor:default}input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}input[type=radio]:disabled::placeholder{color:#a8bece}input[type=radio]:disabled:checked:before{background:#e9eff3}input[type=radio]+span{display:block;font-weight:400;margin-left:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 32px 9px 14px;-moz-appearance:none;-webkit-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center}select.is-compact{min-width:0;padding:0 20px 2px 6px;margin:0 4px;background-position:right 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}.wpview.wpview-wrap[data-wpview-type=contact-form] iframe.inline-edit-contact-form{width:100%;min-height:500px;border:0;overflow:hidden;margin-bottom:0;display:block}.contact-submit.contact-submit{margin-top:0;margin-bottom:0} \ No newline at end of file
+body,label{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:1.4em}.card{display:block;position:relative;margin:0 auto;padding:16px;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,.5),0 1px 2px #e9eff3}.card:after{content:".";display:block;height:0;clear:both;visibility:hidden}@media (min-width:481px){.card{padding:24px}}.card>div{margin-top:24px}.card>div:first-child{margin-top:0}label{display:block;font-size:14px;font-weight:600;margin-bottom:5px}input[type=email],input[type=tel],input[type=text],input[type=url]{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}input[type=email]:-ms-input-placeholder,input[type=tel]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder,input[type=url]:-ms-input-placeholder{color:#87a6bc}input[type=email]::-ms-input-placeholder,input[type=tel]::-ms-input-placeholder,input[type=text]::-ms-input-placeholder,input[type=url]::-ms-input-placeholder{color:#87a6bc}input[type=email]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=url]::placeholder{color:#87a6bc}input[type=email]:hover,input[type=tel]:hover,input[type=text]:hover,input[type=url]:hover{border-color:#a8bece}input[type=email]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=email]:focus::-ms-clear,input[type=tel]:focus::-ms-clear,input[type=text]:focus::-ms-clear,input[type=url]:focus::-ms-clear{display:none}input[type=email]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}input[type=email]:disabled:hover,input[type=tel]:disabled:hover,input[type=text]:disabled:hover,input[type=url]:disabled:hover{cursor:default}input[type=email]:disabled:-ms-input-placeholder,input[type=tel]:disabled:-ms-input-placeholder,input[type=text]:disabled:-ms-input-placeholder,input[type=url]:disabled:-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::-ms-input-placeholder,input[type=tel]:disabled::-ms-input-placeholder,input[type=text]:disabled::-ms-input-placeholder,input[type=url]:disabled::-ms-input-placeholder{color:#a8bece}input[type=email]:disabled::placeholder,input[type=tel]:disabled::placeholder,input[type=text]:disabled::placeholder,input[type=url]:disabled::placeholder{color:#a8bece}textarea{border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;margin:0;padding:7px 14px;height:92px;width:100%;color:#2e4453;font-size:16px;line-height:1.5;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-shadow:none}textarea:-ms-input-placeholder{color:#87a6bc}textarea::-ms-input-placeholder{color:#87a6bc}textarea::placeholder{color:#87a6bc}textarea:hover{border-color:#a8bece}textarea:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}textarea:focus::-ms-clear{display:none}textarea:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;-webkit-text-fill-color:#a8bece}textarea:disabled:hover{cursor:default}textarea:disabled:-ms-input-placeholder{color:#a8bece}textarea:disabled::-ms-input-placeholder{color:#a8bece}textarea:disabled::placeholder{color:#a8bece}input[type=checkbox]{-webkit-appearance:none;display:inline-block;box-sizing:border-box;margin:2px 0 0;padding:7px 14px;width:16px;height:16px;float:left;outline:0;padding:0;box-shadow:none;background-color:#fff;border:1px solid #c8d7e1;color:#2e4453;font-size:16px;line-height:0;text-align:center;vertical-align:middle;-moz-appearance:none;appearance:none;transition:all .15s ease-in-out;clear:none;cursor:pointer}input[type=checkbox]:checked:before{content:'\f147';font-family:Dashicons;margin:-3px 0 0 -4px;float:left;display:inline-block;vertical-align:middle;width:16px;font-size:20px;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none;color:#00aadc}input[type=checkbox]:disabled:checked:before{color:#a8bece}input[type=checkbox]:hover{border-color:#a8bece}input[type=checkbox]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=checkbox]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1}input[type=checkbox]:disabled:hover{cursor:default}input[type=checkbox]+span{display:block;font-weight:400;margin-left:24px}input[type=radio]{color:#2e4453;font-size:16px;border:1px solid #c8d7e1;background-color:#fff;transition:all .15s ease-in-out;box-sizing:border-box;-webkit-appearance:none;clear:none;cursor:pointer;display:inline-block;line-height:0;height:16px;margin:2px 4px 0 0;float:left;outline:0;padding:0;text-align:center;vertical-align:middle;width:16px;min-width:16px;-moz-appearance:none;appearance:none;border-radius:50%;line-height:10px}input[type=radio]:hover{border-color:#a8bece}input[type=radio]:focus{border-color:#0087be;outline:0;box-shadow:0 0 0 2px #78dcfa}input[type=radio]:focus::-ms-clear{display:none}input[type=radio]:checked:before{float:left;display:inline-block;content:'\2022';margin:3px;width:8px;height:8px;text-indent:-9999px;background:#00aadc;vertical-align:middle;border-radius:50%;animation:grow .2s ease-in-out}input[type=radio]:disabled{background:#f3f6f8;border-color:#e9eff3;color:#a8bece;opacity:1;-webkit-text-fill-color:#a8bece}input[type=radio]:disabled:hover{cursor:default}input[type=radio]:disabled:-ms-input-placeholder{color:#a8bece}input[type=radio]:disabled::-ms-input-placeholder{color:#a8bece}input[type=radio]:disabled::placeholder{color:#a8bece}input[type=radio]:disabled:checked:before{background:#e9eff3}input[type=radio]+span{display:block;font-weight:400;margin-left:24px}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}@keyframes grow{0%{transform:scale(.3)}60%{transform:scale(1.15)}100%{transform:scale(1)}}select{background:#fff url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjQzhEN0UxIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center;border-color:#c8d7e1;border-style:solid;border-radius:4px;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:0;outline:0;overflow:hidden;font-size:14px;line-height:21px;font-weight:600;text-overflow:ellipsis;text-decoration:none;vertical-align:top;white-space:nowrap;box-sizing:border-box;padding:7px 32px 9px 14px;-webkit-appearance:none;-moz-appearance:none;appearance:none}select:hover{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjYThiZWNlIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==)}select:focus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiA8dGl0bGU+YXJyb3ctZG93bjwvdGl0bGU+IDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiA8ZGVmcz48L2RlZnM+IDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPiA8ZyBpZD0iYXJyb3ctZG93biIgc2tldGNoOnR5cGU9Ik1TQXJ0Ym9hcmRHcm91cCIgZmlsbD0iIzJlNDQ1MyI+IDxwYXRoIGQ9Ik0xNS41LDYgTDE3LDcuNSBMMTAuMjUsMTQuMjUgTDMuNSw3LjUgTDUsNiBMMTAuMjUsMTEuMjUgTDE1LjUsNiBaIiBpZD0iRG93bi1BcnJvdyIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPiA8L2c+IDwvZz48L3N2Zz4=);border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa;outline:0;-moz-outline:none;-moz-user-focus:ignore}select:disabled,select:hover:disabled{background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPiAgICAgICAgPHRpdGxlPmFycm93LWRvd248L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4gICAgICAgIDxnIGlkPSJhcnJvdy1kb3duIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIiBmaWxsPSIjZTllZmYzIj4gICAgICAgICAgICA8cGF0aCBkPSJNMTUuNSw2IEwxNyw3LjUgTDEwLjI1LDE0LjI1IEwzLjUsNy41IEw1LDYgTDEwLjI1LDExLjI1IEwxNS41LDYgWiIgaWQ9IkRvd24tQXJyb3ciIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat right 10px center}select.is-compact{min-width:0;padding:0 20px 2px 6px;margin:0 4px;background-position:right 5px center;background-size:12px 12px}label select,label+select{display:block;min-width:200px}label select.is-compact,label+select.is-compact{display:inline-block;min-width:0}select::-ms-expand{display:none}select::-ms-value{background:0 0;color:#2e4453}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #2e4453}input[type=submit]{padding:0;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:baseline;background:#fff;border-color:#c8d7e1;border-style:solid;border-width:1px 1px 2px;color:#2e4453;cursor:pointer;display:inline-block;margin:24px 0 0;outline:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;text-decoration:none;vertical-align:top;box-sizing:border-box;font-size:14px;line-height:21px;border-radius:4px;padding:7px 14px 9px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=submit]:hover{border-color:#a8bece;color:#2e4453}input[type=submit]:active{border-width:2px 1px 1px}input[type=submit]:visited{color:#2e4453}input[type=submit]:disabled,input[type=submit][disabled]{color:#e9eff3;background:#fff;border-color:#e9eff3;cursor:default}input[type=submit]:disabled:active,input[type=submit][disabled]:active{border-width:1px 1px 2px}input[type=submit]:focus{border-color:#00aadc;box-shadow:0 0 0 2px #78dcfa}.wpview.wpview-wrap[data-wpview-type=contact-form] iframe.inline-edit-contact-form{width:100%;min-height:500px;border:0;overflow:hidden;margin-bottom:0;display:block}.contact-submit.contact-submit{margin-top:0;margin-bottom:0} \ No newline at end of file
diff --git a/plugins/jetpack/modules/contact-form/css/grunion-rtl.css b/plugins/jetpack/modules/contact-form/css/grunion-rtl.css
index 44b988ea..952b25fa 100644
--- a/plugins/jetpack/modules/contact-form/css/grunion-rtl.css
+++ b/plugins/jetpack/modules/contact-form/css/grunion-rtl.css
@@ -1 +1 @@
-.contact-form .clear-form{clear:both}.contact-form input:-ms-input-placeholder{transition:opacity .3s ease-out}.contact-form input::placeholder{transition:opacity .3s ease-out}.contact-form input:hover:-ms-input-placeholder{opacity:.5}.contact-form input:hover::placeholder{opacity:.5}.contact-form input:focus:-ms-input-placeholder{opacity:.3}.contact-form input:focus::placeholder{opacity:.3}.contact-form input[type=email],.contact-form input[type=text],.contact-form input[type=url]{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 input[type=url],.textwidget .contact-form textarea{width:250px;max-width:100%;box-sizing:border-box}#jetpack-check-feedback-spam{margin:1px 0 0 8px}.jetpack-check-feedback-spam-spinner{display:inline-block;margin-top:7px} \ No newline at end of file
+.contact-form .clear-form{clear:both}.contact-form input:-ms-input-placeholder{transition:opacity .3s ease-out}.contact-form input::-ms-input-placeholder{transition:opacity .3s ease-out}.contact-form input::placeholder{transition:opacity .3s ease-out}.contact-form input:hover:-ms-input-placeholder{opacity:.5}.contact-form input:hover::-ms-input-placeholder{opacity:.5}.contact-form input:hover::placeholder{opacity:.5}.contact-form input:focus:-ms-input-placeholder{opacity:.3}.contact-form input:focus::-ms-input-placeholder{opacity:.3}.contact-form input:focus::placeholder{opacity:.3}.contact-form input[type=email],.contact-form input[type=text],.contact-form input[type=url]{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;word-wrap:break-word}.form-errors .form-error-message{color:red}.textwidget .contact-form input[type=email],.textwidget .contact-form input[type=text],.textwidget .contact-form input[type=url],.textwidget .contact-form textarea{width:250px;max-width:100%;box-sizing:border-box}#jetpack-check-feedback-spam{margin:1px 0 0 8px}.jetpack-check-feedback-spam-spinner{display:inline-block;margin-top:7px} \ No newline at end of file
diff --git a/plugins/jetpack/modules/contact-form/css/grunion.css b/plugins/jetpack/modules/contact-form/css/grunion.css
index d9ac8b80..1089188d 100644
--- a/plugins/jetpack/modules/contact-form/css/grunion.css
+++ b/plugins/jetpack/modules/contact-form/css/grunion.css
@@ -65,6 +65,7 @@
.contact-form-submission p {
margin: 0 auto;
+ word-wrap: break-word;
}
.form-errors .form-error-message {
diff --git a/plugins/jetpack/modules/contact-form/grunion-contact-form.php b/plugins/jetpack/modules/contact-form/grunion-contact-form.php
index 2601f171..8d83f535 100644
--- a/plugins/jetpack/modules/contact-form/grunion-contact-form.php
+++ b/plugins/jetpack/modules/contact-form/grunion-contact-form.php
@@ -120,7 +120,10 @@ class Grunion_Contact_Form_Plugin {
return $data_without_tags;
}
- function __construct() {
+ /**
+ * Class uses singleton pattern; use Grunion_Contact_Form_Plugin::init() to initialize.
+ */
+ protected function __construct() {
$this->add_shortcode();
// While generating the output of a text widget with a contact-form shortcode, we need to know its widget ID.
@@ -137,6 +140,8 @@ class Grunion_Contact_Form_Plugin {
add_filter( 'widget_text', array( $this, 'widget_shortcode_hack' ), 5 );
}
+ add_filter( 'jetpack_contact_form_is_spam', array( $this, 'is_spam_blacklist' ), 10, 2 );
+
// Akismet to the rescue
if ( defined( 'AKISMET_VERSION' ) || function_exists( 'akismet_http_post' ) ) {
add_filter( 'jetpack_contact_form_is_spam', array( $this, 'is_spam_akismet' ), 10, 2 );
@@ -234,48 +239,57 @@ class Grunion_Contact_Form_Plugin {
wp_register_style( 'grunion.css', GRUNION_PLUGIN_URL . 'css/grunion.css', array(), JETPACK__VERSION );
wp_style_add_data( 'grunion.css', 'rtl', 'replace' );
- if ( Jetpack_Gutenberg::is_gutenberg_available() ) {
- self::register_contact_form_blocks();
- }
+ self::register_contact_form_blocks();
}
private static function register_contact_form_blocks() {
- jetpack_register_block( 'contact-form', array(
+ jetpack_register_block( 'jetpack/contact-form', array(
'render_callback' => array( __CLASS__, 'gutenblock_render_form' ),
) );
// Field render methods.
- jetpack_register_block( 'field-text', array(
+ jetpack_register_block( 'jetpack/field-text', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_text' ),
) );
- jetpack_register_block( 'field-name', array(
+ jetpack_register_block( 'jetpack/field-name', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_name' ),
) );
- jetpack_register_block( 'field-email', array(
+ jetpack_register_block( 'jetpack/field-email', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_email' ),
) );
- jetpack_register_block( 'field-url', array(
+ jetpack_register_block( 'jetpack/field-url', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_url' ),
) );
- jetpack_register_block( 'field-date', array(
+ jetpack_register_block( 'jetpack/field-date', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_date' ),
) );
- jetpack_register_block( 'field-telephone', array(
+ jetpack_register_block( 'jetpack/field-telephone', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_telephone' ),
) );
- jetpack_register_block( 'field-textarea', array(
+ jetpack_register_block( 'jetpack/field-textarea', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_textarea' ),
) );
- jetpack_register_block( 'field-checkbox', array(
+ jetpack_register_block( 'jetpack/field-checkbox', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_checkbox' ),
) );
- jetpack_register_block( 'field-checkbox-multiple', array(
+ jetpack_register_block( 'jetpack/field-checkbox-multiple', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_checkbox_multiple' ),
) );
- jetpack_register_block( 'field-radio', array(
+ jetpack_register_block( 'jetpack/field-radio', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_radio' ),
) );
- jetpack_register_block( 'field-select', array(
+ jetpack_register_block( 'jetpack/field-select', array(
+ 'parent' => array( 'jetpack/contact-form' ),
'render_callback' => array( __CLASS__, 'gutenblock_render_field_select' ),
) );
}
@@ -620,6 +634,29 @@ class Grunion_Contact_Form_Plugin {
}
/**
+ * Check if a submission matches the Comment Blacklist.
+ * The Comment Blacklist is a means to moderate discussion, and contact
+ * forms are 1:1 discussion forums, ripe for abuse by users who are being
+ * removed from the public discussion.
+ * Attached to `jetpack_contact_form_is_spam`
+ *
+ * @param bool $is_spam
+ * @param array $form
+ * @return bool TRUE => spam, FALSE => not spam
+ */
+ function is_spam_blacklist( $is_spam, $form = array() ) {
+ if ( $is_spam ) {
+ return $is_spam;
+ }
+
+ if ( wp_blacklist_check( $form['comment_author'], $form['comment_author_email'], $form['comment_author_url'], $form['comment_content'], $form['user_ip'], $form['user_agent'] ) ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* Populate an array with all values necessary to submit a NEW contact-form feedback to Akismet.
* Note that this includes the current user_ip etc, so this should only be called when accepting a new item via $_POST
*
@@ -1763,6 +1800,11 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
*/
static $style = false;
+ /**
+ * @var array When printing the submit button, what tags are allowed
+ */
+ static $allowed_html_tags_for_submit_button = array( 'br' => array() );
+
function __construct( $attributes, $content = null ) {
global $post;
@@ -1992,6 +2034,11 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
$r .= $form->body;
$r .= "\t<p class='contact-submit'>\n";
+ $gutenberg_submit_button_classes = '';
+ if ( ! empty( $attributes['submitButtonClasses'] ) ) {
+ $gutenberg_submit_button_classes = ' ' . $attributes['submitButtonClasses'];
+ }
+
/**
* Filter the contact form submit button class attribute.
*
@@ -2001,9 +2048,31 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
*
* @param string $class Additional CSS classes for button attribute.
*/
- $submit_button_class = apply_filters( 'jetpack_contact_form_submit_button_class', 'pushbutton-wide' );
+ $submit_button_class = apply_filters( 'jetpack_contact_form_submit_button_class', 'pushbutton-wide' . $gutenberg_submit_button_classes );
+
+ $submit_button_styles = '';
+ if ( ! empty( $attributes['customBackgroundButtonColor'] ) ) {
+ $submit_button_styles .= 'background-color: ' . $attributes['customBackgroundButtonColor'] . '; ';
+ }
+ if ( ! empty( $attributes['customTextButtonColor'] ) ) {
+ $submit_button_styles .= 'color: ' . $attributes['customTextButtonColor'] . ';';
+ }
+ if ( ! empty( $attributes['submitButtonText'] ) ) {
+ $submit_button_text = $attributes['submitButtonText'];
+ } else {
+ $submit_button_text = $form->get_attribute( 'submit_button_text' );
+ }
+
+ $r .= "\t\t<button type='submit' class='" . esc_attr( $submit_button_class ) . "'";
+ if ( ! empty( $submit_button_styles ) ) {
+ $r .= " style='" . esc_attr( $submit_button_styles ) . "'";
+ }
+ $r .= ">";
+ $r .= wp_kses(
+ $submit_button_text,
+ self::$allowed_html_tags_for_submit_button
+ ) . "</button>";
- $r .= "\t\t<input type='submit' value='" . esc_attr( $form->get_attribute( 'submit_button_text' ) ) . "' class='" . $submit_button_class . "'/>\n";
if ( is_user_logged_in() ) {
$r .= "\t\t" . wp_nonce_field( 'contact-form_' . $id, '_wpnonce', true, false ) . "\n"; // nonce and referer
}
@@ -3161,8 +3230,8 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
$type_class = $type ? ' ' .$type : '';
return
- "<label
- for='" . esc_attr( $id ) . "'
+ "<label
+ for='" . esc_attr( $id ) . "'
class='grunion-field-label{$type_class}" . ( $this->is_error() ? ' form-error' : '' ) . "'
>"
. esc_html( $label )
@@ -3172,13 +3241,13 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
}
function render_input_field( $type, $id, $value, $class, $placeholder, $required ) {
- return "<input
- type='". esc_attr( $type ) ."'
- name='" . esc_attr( $id ) . "'
- id='" . esc_attr( $id ) . "'
- value='" . esc_attr( $value ) . "'
- " . $class . $placeholder . '
- ' . ( $required ? "required aria-required='true'" : '' ) . "
+ return "<input
+ type='". esc_attr( $type ) ."'
+ name='" . esc_attr( $id ) . "'
+ id='" . esc_attr( $id ) . "'
+ value='" . esc_attr( $value ) . "'
+ " . $class . $placeholder . '
+ ' . ( $required ? "required aria-required='true'" : '' ) . "
/>\n";
}
@@ -3203,8 +3272,8 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
function render_textarea_field( $id, $label, $value, $class, $required, $required_field_text, $placeholder ) {
$field = $this->render_label( 'textarea', 'contact-form-comment-' . $id, $label, $required, $required_field_text );
$field .= "<textarea
- name='" . esc_attr( $id ) . "'
- id='contact-form-comment-" . esc_attr( $id ) . "'
+ name='" . esc_attr( $id ) . "'
+ id='contact-form-comment-" . esc_attr( $id ) . "'
rows='20' "
. $class
. $placeholder
@@ -3220,9 +3289,9 @@ class Grunion_Contact_Form_Field extends Crunion_Contact_Form_Shortcode {
$option = Grunion_Contact_Form_Plugin::strip_tags( $option );
if ( $option ) {
$field .= "\t\t<label class='grunion-radio-label radio" . ( $this->is_error() ? ' form-error' : '' ) . "'>";
- $field .= "<input
- type='radio'
- name='" . esc_attr( $id ) . "'
+ $field .= "<input
+ type='radio'
+ name='" . esc_attr( $id ) . "'
value='" . esc_attr( $this->get_option_value( $this->get_attribute( 'values' ), $optionIndex, $option ) ) . "' "
. $class
. checked( $option, $value, false ) . ' '
diff --git a/plugins/jetpack/modules/copy-post.php b/plugins/jetpack/modules/copy-post.php
new file mode 100644
index 00000000..1ae33ced
--- /dev/null
+++ b/plugins/jetpack/modules/copy-post.php
@@ -0,0 +1,338 @@
+<?php
+/**
+ * Module Name: Copy Post
+ * Module Description: Copy an existing post's content into a new draft post
+ * Jumpstart Description: Copy an existing post's content into a new draft post
+ * Sort Order: 15
+ * First Introduced: 7.0
+ * Requires Connection: No
+ * Auto Activate: No
+ * Module Tags: Writing
+ * Feature: Writing
+ * Additional Search Queries: copy, duplicate
+ */
+
+/**
+ * Copy Post class.
+ */
+class Jetpack_Copy_Post {
+ /**
+ * Jetpack_Copy_Post_By_Param constructor.
+ * Add row actions to post/page/CPT listing screens.
+ * Process any `?copy` param if on a create new post/page/CPT screen.
+ *
+ * @return void
+ */
+ public function __construct() {
+ if ( 'edit.php' === $GLOBALS['pagenow'] ) {
+ add_filter( 'post_row_actions', array( $this, 'add_row_action' ), 10, 2 );
+ add_filter( 'page_row_actions', array( $this, 'add_row_action' ), 10, 2 );
+ return;
+ }
+
+ if ( ! empty( $_GET['jetpack-copy'] ) && 'post-new.php' === $GLOBALS['pagenow'] ) {
+ add_action( 'wp_insert_post', array( $this, 'update_post_data' ), 10, 3 );
+ add_filter( 'pre_option_default_post_format', '__return_empty_string' );
+ }
+ }
+
+ /**
+ * Update the new (target) post data with the source post data.
+ *
+ * @param int $target_post_id Target post ID.
+ * @param WP_Post $post Target post object (not used).
+ * @param bool $update Whether this is an existing post being updated or not.
+ * @return void
+ */
+ public function update_post_data( $target_post_id, $post, $update ) {
+ // This `$update` check avoids infinite loops of trying to update our updated post.
+ if ( $update ) {
+ return;
+ }
+
+ $source_post = get_post( $_GET['jetpack-copy'] );
+ if ( ! $source_post instanceof WP_Post ||
+ ! $this->user_can_access_post( $source_post->ID ) ||
+ ! $this->validate_post_type( $source_post ) ) {
+ return;
+ }
+
+ $update_results = array(
+ 'update_content' => $this->update_content( $source_post, $target_post_id ),
+ 'update_featured_image' => $this->update_featured_image( $source_post, $target_post_id ),
+ 'update_post_format' => $this->update_post_format( $source_post, $target_post_id ),
+ 'update_likes_sharing' => $this->update_likes_sharing( $source_post, $target_post_id ),
+ 'update_post_type_terms' => $this->update_post_type_terms( $source_post, $target_post_id ),
+ );
+
+ // Required to satisfy get_default_post_to_edit(), which has these filters after post creation.
+ add_filter( 'default_title', array( $this, 'filter_title' ), 10, 2 );
+ add_filter( 'default_content', array( $this, 'filter_content' ), 10, 2 );
+ add_filter( 'default_excerpt', array( $this, 'filter_excerpt' ), 10, 2 );
+
+ // Required to avoid the block editor from adding default blocks according to post format.
+ add_filter( 'block_editor_settings', array( $this, 'remove_post_format_template' ) );
+
+ /**
+ * Fires after all updates have been performed, and default content filters have been added.
+ * Allows for any cleanup or post operations, and default content filters can be removed or modified.
+ *
+ * @module copy-post
+ *
+ * @since 7.0.0
+ *
+ * @param WP_Post $source_post Post object that was copied.
+ * @param int $target_post_id Target post ID.
+ * @param array $update_results Results of all update operations, allowing action to be taken.
+ */
+ do_action( 'jetpack_copy_post', $source_post, $target_post_id, $update_results );
+ }
+
+ /**
+ * Determine if the current user has edit access to the source post.
+ *
+ * @param int $post_id Source post ID (the post being copied).
+ * @return bool True if user has the meta cap of `edit_post` for the given post ID, false otherwise.
+ */
+ protected function user_can_access_post( $post_id ) {
+ return current_user_can( 'edit_post', $post_id );
+ }
+
+ /**
+ * Update the target post's title, content, excerpt, categories, and tags.
+ *
+ * @param WP_Post $source_post Post object to be copied.
+ * @param int $target_post_id Target post ID.
+ * @return int 0 on failure, or the updated post ID on success.
+ */
+ protected function update_content( $source_post, $target_post_id ) {
+ $data = array(
+ 'ID' => $target_post_id,
+ 'post_title' => $source_post->post_title,
+ 'post_content' => $source_post->post_content,
+ 'post_excerpt' => $source_post->post_excerpt,
+ 'comment_status' => $source_post->comment_status,
+ 'ping_status' => $source_post->ping_status,
+ 'post_category' => $source_post->post_category,
+ 'post_password' => $source_post->post_password,
+ 'tags_input' => $source_post->tags_input,
+ );
+
+ /**
+ * Fires just before the target post is updated with its new data.
+ * Allows for final data adjustments before updating the target post.
+ *
+ * @module copy-post
+ *
+ * @since 7.0.0
+ *
+ * @param array $data Post data with which to update the target (new) post.
+ * @param WP_Post $source_post Post object being copied.
+ * @param int $target_post_id Target post ID.
+ */
+ $data = apply_filters( 'jetpack_copy_post_data', $data, $source_post, $target_post_id );
+ return wp_update_post( $data );
+ }
+
+ /**
+ * Update terms for post types.
+ *
+ * @param WP_Post $source_post Post object to be copied.
+ * @param int $target_post_id Target post ID.
+ * @return array Results of attempts to set each term to the target (new) post.
+ */
+ protected function update_post_type_terms( $source_post, $target_post_id ) {
+ $results = array();
+
+ $bypassed_post_types = apply_filters( 'jetpack_copy_post_bypassed_post_types', array( 'post', 'page' ), $source_post, $target_post_id );
+ if ( in_array( $source_post->post_type, $bypassed_post_types, true ) ) {
+ return $results;
+ }
+
+ $taxonomies = get_object_taxonomies( $source_post, 'objects' );
+ foreach ( $taxonomies as $taxonomy ) {
+ $terms = wp_get_post_terms( $source_post->ID, $taxonomy->name, array( 'fields' => 'ids' ) );
+ $results[] = wp_set_post_terms( $target_post_id, $terms, $taxonomy->name );
+ }
+
+ return $results;
+ }
+
+ /**
+ * Update the target post's featured image.
+ *
+ * @param WP_Post $source_post Post object to be copied.
+ * @param int $target_post_id Target post ID.
+ * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
+ */
+ protected function update_featured_image( $source_post, $target_post_id ) {
+ $featured_image_id = get_post_thumbnail_id( $source_post );
+ return update_post_meta( $target_post_id, '_thumbnail_id', $featured_image_id );
+ }
+
+ /**
+ * Update the target post's post format.
+ *
+ * @param WP_Post $source_post Post object to be copied.
+ * @param int $target_post_id Target post ID.
+ * @return array|WP_Error|false WP_Error on error, array of affected term IDs on success.
+ */
+ protected function update_post_format( $source_post, $target_post_id ) {
+ $post_format = get_post_format( $source_post );
+ return set_post_format( $target_post_id, $post_format );
+ }
+
+ /**
+ * Ensure the block editor doesn't modify the source post content for non-standard post formats.
+ *
+ * @param array $settings Settings to be passed into the block editor.
+ * @return array Settings with any `template` key removed.
+ */
+ public function remove_post_format_template( $settings ) {
+ unset( $settings['template'] );
+ return $settings;
+ }
+
+ /**
+ * Update the target post's Likes and Sharing statuses.
+ *
+ * @param WP_Post $source_post Post object to be copied.
+ * @param int $target_post_id Target post ID.
+ * @return array Array with the results of each update action.
+ */
+ protected function update_likes_sharing( $source_post, $target_post_id ) {
+ $likes = get_post_meta( $source_post->ID, 'switch_like_status', true );
+ $sharing = get_post_meta( $source_post->ID, 'sharing_disabled', false );
+ $likes_result = update_post_meta( $target_post_id, 'switch_like_status', $likes );
+ $sharing_result = update_post_meta( $target_post_id, 'sharing_disabled', $sharing );
+ return array(
+ 'likes' => $likes_result,
+ 'sharing' => $sharing_result,
+ );
+ }
+
+ /**
+ * Update the target post's title.
+ *
+ * @param string $post_title Post title determined by `get_default_post_to_edit()`.
+ * @param WP_Post $post Post object of newly-inserted post.
+ * @return string Updated post title from source post.
+ */
+ public function filter_title( $post_title, $post ) {
+ return $post->post_title;
+ }
+
+ /**
+ * Update the target post's content (`post_content`).
+ *
+ * @param string $post_content Post content determined by `get_default_post_to_edit()`.
+ * @param WP_Post $post Post object of newly-inserted post.
+ * @return string Updated post content from source post.
+ */
+ public function filter_content( $post_content, $post ) {
+ return $post->post_content;
+ }
+
+ /**
+ * Update the target post's excerpt.
+ *
+ * @param string $post_excerpt Post excerpt determined by `get_default_post_to_edit()`.
+ * @param WP_Post $post Post object of newly-inserted post.
+ * @return string Updated post excerpt from source post.
+ */
+ public function filter_excerpt( $post_excerpt, $post ) {
+ return $post->post_excerpt;
+ }
+
+ /**
+ * Validate the post type to be used for the target post.
+ *
+ * @param WP_Post $post Post object of current post in listing.
+ * @return bool True if the post type is in a list of supported psot types; false otherwise.
+ */
+ protected function validate_post_type( $post ) {
+ /**
+ * Fires when determining if the "Copy" row action should be made available.
+ * Allows overriding supported post types.
+ *
+ * @module copy-post
+ *
+ * @since 7.0.0
+ *
+ * @param array Post types supported by default.
+ * @param WP_Post $post Post object of current post in listing.
+ */
+ $valid_post_types = apply_filters(
+ 'jetpack_copy_post_post_types',
+ array(
+ 'post',
+ 'page',
+ 'jetpack-testimonial',
+ 'jetpack-portfolio',
+ ),
+ $post
+ );
+ return in_array( $post->post_type, $valid_post_types, true );
+ }
+
+ /**
+ * Add a "Copy" row action to supported posts/pages/CPTs on list views.
+ *
+ * @param array $actions Existing actions.
+ * @param WP_Post $post Post object of current post in list.
+ * @return array Array of updated row actions.
+ */
+ public function add_row_action( $actions, $post ) {
+ if ( ! $this->user_can_access_post( $post->ID ) ||
+ ! $post instanceof WP_Post ||
+ ! $this->validate_post_type( $post ) ) {
+ return $actions;
+ }
+
+ $edit_url = add_query_arg(
+ array(
+ 'post_type' => $post->post_type,
+ 'jetpack-copy' => $post->ID,
+ ),
+ admin_url( 'post-new.php' )
+ );
+ $edit_action = array(
+ 'jetpack-copy' => sprintf(
+ '<a href="%s" aria-label="%s">%s</a>',
+ esc_url( $edit_url ),
+ esc_attr__( 'Copy this post.', 'jetpack' ),
+ esc_html__( 'Copy', 'jetpack' )
+ ),
+ );
+
+ // Insert the Copy action before the Trash action.
+ $edit_offset = array_search( 'trash', array_keys( $actions ), true );
+ $updated_actions = array_merge(
+ array_slice( $actions, 0, $edit_offset ),
+ $edit_action,
+ array_slice( $actions, $edit_offset )
+ );
+
+ /**
+ * Fires after the new Copy action has been added to the row actions.
+ * Allows changes to the action presentation, or other final checks.
+ *
+ * @module copy-post
+ *
+ * @since 7.0.0
+ *
+ * @param array $updated_actions Updated row actions with the Copy Post action.
+ * @param array $actions Original row actions passed to this filter.
+ * @param WP_Post $post Post object of current post in listing.
+ */
+ return apply_filters( 'jetpack_copy_post_row_actions', $updated_actions, $actions, $post );
+ }
+}
+
+/**
+ * Instantiate an instance of Jetpack_Copy_Post on the `admin_init` hook.
+ */
+function jetpack_copy_post_init() {
+ new Jetpack_Copy_Post();
+}
+add_action( 'admin_init', 'jetpack_copy_post_init' );
diff --git a/plugins/jetpack/modules/custom-css.php b/plugins/jetpack/modules/custom-css.php
index 8e2999d5..940ef0ba 100644
--- a/plugins/jetpack/modules/custom-css.php
+++ b/plugins/jetpack/modules/custom-css.php
@@ -49,6 +49,28 @@ add_action( 'jetpack_modules_loaded', 'custom_css_loaded' );
function custom_css_loaded() {
Jetpack::enable_module_configurable( __FILE__ );
Jetpack::module_configuration_load( __FILE__, 'custom_css_configuration_load' );
+ add_filter( 'jetpack_module_configuration_url_custom-css', 'jetpack_custom_css_configuration_url' );
+}
+
+/**
+ * Overrides default configuration url
+ *
+ * @uses admin_url
+ * @return string module settings URL
+ */
+function jetpack_custom_css_configuration_url() {
+ // Redirect to Core's CSS editor in the customizer if the feature is available.
+ if ( function_exists( 'wp_get_custom_css' ) ) {
+ $configuration_link = Jetpack_Custom_CSS_Enhancements::customizer_link(
+ array(
+ 'return_url' => wp_get_referer(),
+ )
+ );
+ } else {
+ $configuration_link = admin_url( 'themes.php?page=editcss#settingsdiv' );
+ }
+
+ return $configuration_link;
}
function custom_css_configuration_load() {
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
index 74afd99d..e92669da 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
@@ -855,7 +855,7 @@ class csstidy {
$this->str_char[] = $string{$i} == "(" ? ")" : $string{$i};
$this->from[] = 'instr';
$this->quoted_string[] = !($string{$i} === "(");
- continue;
+ continue 2;
}
if ($_str_char !== ")" && ($string{$i} === "\n" || $string{$i} === "\r") && !($string{$i - 1} === '\\' && !csstidy::escaped($string, $i - 1))) {
@@ -1027,7 +1027,7 @@ class csstidy {
return $media;
}
end($this->css);
- list($at,) = each($this->css);
+ $at = current( $this->css );
if ($at == $media){
return $media;
}
@@ -1066,7 +1066,7 @@ class csstidy {
// if last is the same, keep it
end($this->css[$media]);
- list($sel,) = each($this->css[$media]);
+ $sel = current( $this->css[$media] );
if ($sel == $selector){
return $selector;
}
diff --git a/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php b/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php
index d169ddfe..d4c61114 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php
@@ -79,7 +79,7 @@ $lang['en'][36] = 'Compression Ratio';
$lang['en'][37] = 'Input';
$lang['en'][38] = 'Output';
$lang['en'][39] = 'Language';
-$lang['en'][41] = 'Attention: This may change the behaviour of your CSS Code!';
+$lang['en'][41] = 'Attention: This may change the behavior of your CSS Code!';
$lang['en'][42] = 'Remove last ;';
$lang['en'][43] = 'Discard invalid properties';
$lang['en'][44] = 'Only safe optimisations';
diff --git a/plugins/jetpack/modules/custom-css/custom-css-4.7.php b/plugins/jetpack/modules/custom-css/custom-css-4.7.php
index 9e8fe4d8..bb72caec 100644
--- a/plugins/jetpack/modules/custom-css/custom-css-4.7.php
+++ b/plugins/jetpack/modules/custom-css/custom-css-4.7.php
@@ -31,10 +31,6 @@ class Jetpack_Custom_CSS_Enhancements {
add_filter( 'customize_update_custom_css_post_content_args', array( __CLASS__, 'customize_update_custom_css_post_content_args' ), 10, 3 );
add_filter( 'update_custom_css_data', array( __CLASS__, 'update_custom_css_data' ), 10, 2 );
- // Handle Sass/LESS.
- add_filter( 'customize_value_custom_css', array( __CLASS__, 'customize_value_custom_css' ), 10, 2 );
- add_filter( 'customize_update_custom_css_post_content_args', array( __CLASS__, 'customize_update_custom_css_post_content_args' ), 10, 3 );
-
// Stuff for stripping out the theme's default stylesheet...
add_filter( 'stylesheet_uri', array( __CLASS__, 'style_filter' ) );
add_filter( 'safecss_skip_stylesheet', array( __CLASS__, 'preview_skip_stylesheet' ) );
@@ -59,27 +55,13 @@ class Jetpack_Custom_CSS_Enhancements {
}
wp_register_style( 'jetpack-codemirror', plugins_url( 'custom-css/css/codemirror.css', __FILE__ ), array(), '20120905' );
- $deps = array();
- if ( ! function_exists( 'wp_enqueue_code_editor' ) ) {
- // If Core < 4.9
- $deps[] = 'jetpack-codemirror';
- }
- wp_register_style( 'jetpack-customizer-css', plugins_url( 'custom-css/css/customizer-control.css', __FILE__ ), $deps, '20140728' );
+ wp_register_style( 'jetpack-customizer-css', plugins_url( 'custom-css/css/customizer-control.css', __FILE__ ), array(), '20140728' );
wp_register_script( 'jetpack-codemirror', plugins_url( 'custom-css/js/codemirror.min.js', __FILE__ ), array(), '3.16', true );
- $deps = array( 'customize-controls', 'underscore' );
$src = Jetpack::get_file_url_for_environment(
'_inc/build/custom-css/custom-css/js/core-customizer-css.core-4.9.min.js',
'modules/custom-css/custom-css/js/core-customizer-css.core-4.9.js'
);
- if ( ! function_exists( 'wp_enqueue_code_editor' ) ) {
- // If Core < 4.9
- $deps[] = 'jetpack-codemirror';
- $src = Jetpack::get_file_url_for_environment(
- '_inc/build/custom-css/custom-css/js/core-customizer-css.min.js',
- 'modules/custom-css/custom-css/js/core-customizer-css.js'
- );
- }
- wp_register_script( 'jetpack-customizer-css', $src, $deps, JETPACK__VERSION, true );
+ wp_register_script( 'jetpack-customizer-css', $src, array( 'customize-controls', 'underscore' ), JETPACK__VERSION, true );
wp_register_script(
'jetpack-customizer-css-preview',
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css
index d0c072c7..359717bf 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css
@@ -10,7 +10,7 @@
height: 400px;
}
.CodeMirror-scroll {
- /* Set scrolling behaviour here */
+ /* Set scrolling behavior here */
overflow: auto;
}
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css
index 41563c12..bb4ede28 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css
@@ -1 +1 @@
-.rtl .CodeMirror{direction:rtl}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-left:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 5px 0 3px;min-width:20px;text-align:left;color:#999}.CodeMirror div.CodeMirror-cursor{border-right:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-right:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-left:-30px;padding-bottom:30px;padding-left:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{left:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;right:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{left:0;bottom:0}.CodeMirror-gutter-filler{right:0;bottom:0}.CodeMirror-gutters{position:absolute;right:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-left:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-left:none;width:auto}.CodeMirror-linebackground{position:absolute;right:0;left:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-left:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
+.rtl .CodeMirror{direction:rtl}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-left:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 5px 0 3px;min-width:20px;text-align:left;color:#999}.CodeMirror div.CodeMirror-cursor{border-right:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-right:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-left:-30px;padding-bottom:30px;padding-left:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{left:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;right:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{left:0;bottom:0}.CodeMirror-gutter-filler{right:0;bottom:0}.CodeMirror-gutters{position:absolute;right:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-left:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-left:none;width:auto}.CodeMirror-linebackground{position:absolute;right:0;left:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-left:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.css b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.css
index 007a0711..db90a5a5 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.css
@@ -9,7 +9,7 @@
height: 400px;
}
.CodeMirror-scroll {
- /* Set scrolling behaviour here */
+ /* Set scrolling behavior here */
overflow: auto;
}
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css
index cdc1b372..92af420a 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-.rtl .CodeMirror{direction:ltr}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-right:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-right:none;width:auto}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
+.rtl .CodeMirror{direction:ltr}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-right:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-right:none;width:auto}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/rtl/codemirror-rtl.css b/plugins/jetpack/modules/custom-css/custom-css/css/rtl/codemirror-rtl.css
index f028b965..74ad41fb 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/rtl/codemirror-rtl.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/rtl/codemirror-rtl.css
@@ -7,7 +7,7 @@
height: 300px;
}
.CodeMirror-scroll {
- /* Set scrolling behaviour here */
+ /* Set scrolling behavior here */
overflow: auto;
}
diff --git a/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js b/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js
index 6da30d9f..2c90eaea 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js
+++ b/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js
@@ -77,7 +77,7 @@ jQuery( function ( $ ) {
e.preventDefault();
$( '#css-mode-select' ).slideUp();
- $( '#css-mode-display' ).text( $( 'input[name=add_to_existing_display]:checked' ).val() == 'true' ? 'Add-on' : 'Replacement' ); // jshint ignore:line
+ $( '#css-mode-display' ).text( $( 'input[name=add_to_existing_display]:checked' ).val() === 'true' ? 'Add-on' : 'Replacement' );
$( '#add_to_existing' ).val( $( 'input[name=add_to_existing_display]:checked' ).val() );
$( '.edit-css-mode' ).show();
} );
diff --git a/plugins/jetpack/modules/gravatar-hovercards.php b/plugins/jetpack/modules/gravatar-hovercards.php
index 49ebac04..6096ae77 100644
--- a/plugins/jetpack/modules/gravatar-hovercards.php
+++ b/plugins/jetpack/modules/gravatar-hovercards.php
@@ -2,14 +2,13 @@
/**
* 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.
* Sort Order: 11
* Recommendation Order: 13
* First Introduced: 1.1
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Social, Appearance
- * Feature: Appearance, Jumpstart
+ * Feature: Appearance
* Additional Search Queries: gravatar, hovercards
*/
diff --git a/plugins/jetpack/modules/infinite-scroll.php b/plugins/jetpack/modules/infinite-scroll.php
index 0b782024..a736ef00 100644
--- a/plugins/jetpack/modules/infinite-scroll.php
+++ b/plugins/jetpack/modules/infinite-scroll.php
@@ -64,6 +64,7 @@ class Jetpack_Infinite_Scroll_Extras {
public function action_jetpack_modules_loaded() {
Jetpack::enable_module_configurable( __FILE__ );
Jetpack::module_configuration_load( __FILE__, array( $this, 'module_configuration_load' ) );
+ add_filter( 'jetpack_module_configuration_url_infinite-scroll', array( $this, 'infinite_scroll_configuration_url' ) );
}
/**
@@ -78,6 +79,16 @@ class Jetpack_Infinite_Scroll_Extras {
}
/**
+ * Overrides default configuration url
+ *
+ * @uses admin_url
+ * @return string module settings URL
+ */
+ public function infinite_scroll_configuration_url() {
+ return admin_url( 'options-reading.php#infinite-scroll-options' );
+ }
+
+ /**
* Register Google Analytics setting
*
* @uses add_settings_field, __, register_setting
diff --git a/plugins/jetpack/modules/infinite-scroll/infinity.php b/plugins/jetpack/modules/infinite-scroll/infinity.php
index 093a3dc6..35193cfc 100644
--- a/plugins/jetpack/modules/infinite-scroll/infinity.php
+++ b/plugins/jetpack/modules/infinite-scroll/infinity.php
@@ -896,7 +896,9 @@ class The_Neverending_Home_Page {
?>
<script type="text/javascript">
//<![CDATA[
- var infiniteScroll = <?php echo json_encode( array( 'settings' => $js_settings ) ); ?>;
+ var infiniteScroll = JSON.parse( decodeURIComponent( '<?php echo
+ rawurlencode( json_encode( array( 'settings' => $js_settings ) ) );
+ ?>' ) );
//]]>
</script>
<?php
@@ -1209,8 +1211,6 @@ class The_Neverending_Home_Page {
* @return string or null
*/
function query() {
- global $wp_customize;
- global $wp_version;
if ( ! isset( $_REQUEST['page'] ) || ! current_theme_supports( 'infinite-scroll' ) )
die;
@@ -1534,7 +1534,7 @@ class The_Neverending_Home_Page {
*
*/
private function default_footer() {
- if ( function_exists( 'get_privacy_policy_url' ) && ( '' !== get_privacy_policy_url() ) ) {
+ if ( '' !== get_privacy_policy_url() ) {
$credits = get_the_privacy_policy_link() . '<span role="separator" aria-hidden="true"> / </span>';
} else {
$credits = '';
diff --git a/plugins/jetpack/modules/lazy-images.php b/plugins/jetpack/modules/lazy-images.php
index 5031710a..57df7706 100644
--- a/plugins/jetpack/modules/lazy-images.php
+++ b/plugins/jetpack/modules/lazy-images.php
@@ -2,7 +2,7 @@
/**
* Module Name: Lazy Images
- * Module Description: Lazy load images
+ * Module Description: Speed up your site and create a smoother viewing experience by loading images as visitors scroll down the screen, instead of all at once.
* Jumpstart Description: Lazy-loading images improve your site's speed and create a smoother viewing experience. Images will load as visitors scroll down the screen, instead of all at once.
* Sort Order: 24
* Recommendation Order: 14
@@ -11,7 +11,7 @@
* Auto Activate: No
* Module Tags: Appearance, Recommended
* Feature: Appearance, Jumpstart
- * Additional Search Queries: mobile, theme, performance, image
+ * Additional Search Queries: mobile, theme, fast images, fast image, image, lazy, lazy load, lazyload, images, lazy images, thumbnail, image lazy load, lazy loading, load, loading
*/
/**
diff --git a/plugins/jetpack/modules/lazy-images/lazy-images.php b/plugins/jetpack/modules/lazy-images/lazy-images.php
index e77d2e10..befa5ec8 100644
--- a/plugins/jetpack/modules/lazy-images/lazy-images.php
+++ b/plugins/jetpack/modules/lazy-images/lazy-images.php
@@ -40,6 +40,10 @@ class Jetpack_Lazy_Images {
return;
}
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return;
+ }
+
add_action( 'wp_head', array( $this, 'setup_filters' ), 9999 ); // we don't really want to modify anything in <head> since it's mostly all metadata
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_assets' ) );
@@ -102,11 +106,6 @@ class Jetpack_Lazy_Images {
return $content;
}
- // Don't lazyload for amp-wp content
- if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
- return $content;
- }
-
// This is a pretty simple regex, but it works
$content = preg_replace_callback( '#<(img)([^>]+?)(>(.*?)</\\1>|[\/]?>)#si', array( __CLASS__, 'process_image' ), $content );
@@ -281,7 +280,8 @@ class Jetpack_Lazy_Images {
public function add_nojs_fallback() {
?>
<style type="text/css">
- html:not( .jetpack-lazy-images-js-enabled ) .jetpack-lazy-image {
+ /* If html does not have either class, do not show lazy loaded images. */
+ html:not( .jetpack-lazy-images-js-enabled ):not( .js ) .jetpack-lazy-image {
display: none;
}
</style>
@@ -339,9 +339,6 @@ class Jetpack_Lazy_Images {
}
public function enqueue_assets() {
- if ( Jetpack_AMP_Support::is_amp_request() ) {
- return;
- }
wp_enqueue_script(
'jetpack-lazy-images',
Jetpack::get_file_url_for_environment(
diff --git a/plugins/jetpack/modules/likes.php b/plugins/jetpack/modules/likes.php
index 576fc10f..b2e5de54 100644
--- a/plugins/jetpack/modules/likes.php
+++ b/plugins/jetpack/modules/likes.php
@@ -37,7 +37,10 @@ class Jetpack_Likes {
$this->in_jetpack = ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ? false : true;
$this->settings = new Jetpack_Likes_Settings();
- add_action( 'init', array( &$this, 'action_init' ) );
+ // We need to run on wp hook rather than init because we check is_amp_endpoint()
+ // when bootstrapping hooks
+ add_action( 'wp', array( &$this, 'action_init' ), 99 );
+
add_action( 'admin_init', array( $this, 'admin_init' ) );
if ( $this->in_jetpack ) {
@@ -46,6 +49,7 @@ class Jetpack_Likes {
Jetpack::enable_module_configurable( __FILE__ );
Jetpack::module_configuration_load( __FILE__, array( $this, 'configuration_redirect' ) );
+ add_filter( 'jetpack_module_configuration_url_likes', array( $this, 'jetpack_likes_configuration_url' ) );
add_action( 'admin_print_scripts-settings_page_sharing', array( &$this, 'load_jp_css' ) );
add_filter( 'sharing_show_buttons_on_row_start', array( $this, 'configuration_target_area' ) );
@@ -122,6 +126,16 @@ class Jetpack_Likes {
}
/**
+ * Overrides default configuration url
+ *
+ * @uses admin_url
+ * @return string module settings URL
+ */
+ function jetpack_likes_configuration_url() {
+ return admin_url( 'options-general.php?page=sharing#likes' );
+ }
+
+ /**
* Loads Jetpack's CSS on the sharing page so we can use .jetpack-targetable
*/
function load_jp_css() {
@@ -437,7 +451,7 @@ class Jetpack_Likes {
} else {
$blog_id = Jetpack_Options::get_option( 'id' );
$url = home_url();
- $url_parts = parse_url( $url );
+ $url_parts = wp_parse_url( $url );
$domain = $url_parts['host'];
}
// make sure to include the scripts before the iframe otherwise weird things happen
@@ -522,7 +536,7 @@ class Jetpack_Likes {
} else {
$blog_id = Jetpack_Options::get_option( 'id' );
$url = home_url();
- $url_parts = parse_url( $url );
+ $url_parts = wp_parse_url( $url );
$domain = $url_parts['host'];
}
// make sure to include the scripts before the iframe otherwise weird things happen
@@ -543,4 +557,88 @@ class Jetpack_Likes {
}
}
+/**
+ * Callback to get the value for the jetpack_likes_enabled field.
+ *
+ * Warning: this behavior is somewhat complicated!
+ * When the switch_like_status post_meta is unset, we follow the global setting in Sharing.
+ * When it is set to 0, we disable likes on the post, regardless of the global setting.
+ * When it is set to 1, we enable likes on the post, regardless of the global setting.
+ */
+function jetpack_post_likes_get_value( array $post ) {
+ $post_likes_switched = get_post_meta( $post['id'], 'switch_like_status', true );
+
+ /** This filter is documented in modules/jetpack-likes-settings.php */
+ $sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
+
+ // an empty string: post meta was not set, so go with the global setting
+ if ( "" === $post_likes_switched ) {
+ return $sitewide_likes_enabled;
+ }
+
+ // user overrode the global setting to disable likes
+ elseif ( "0" === $post_likes_switched ) {
+ return false;
+ }
+
+ // user overrode the global setting to enable likes
+ elseif ( "1" === $post_likes_switched ) {
+ return true;
+ }
+
+ // no default fallback, let's stay explicit
+}
+
+/**
+ * Callback to set switch_like_status post_meta when jetpack_likes_enabled is updated.
+ *
+ * Warning: this behavior is somewhat complicated!
+ * When the switch_like_status post_meta is unset, we follow the global setting in Sharing.
+ * When it is set to 0, we disable likes on the post, regardless of the global setting.
+ * When it is set to 1, we enable likes on the post, regardless of the global setting.
+ */
+function jetpack_post_likes_update_value( $enable_post_likes, $post_object ) {
+ /** This filter is documented in modules/jetpack-likes-settings.php */
+ $sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
+
+ $should_switch_status = $enable_post_likes !== $sitewide_likes_enabled;
+
+ if ( $should_switch_status ) {
+ // set the meta to 0 if the user wants to disable likes, 1 if user wants to enable
+ $switch_like_status = ( $enable_post_likes ? 1 : 0 );
+ return update_post_meta( $post_object->ID, 'switch_like_status', $switch_like_status );
+ } else {
+ // unset the meta otherwise
+ return delete_post_meta( $post_object->ID, 'switch_like_status' );
+ }
+}
+
+/**
+ * Add Likes post_meta to the REST API Post response.
+ *
+ * @action rest_api_init
+ * @uses register_rest_field
+ * @link https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/
+ */
+function jetpack_post_likes_register_rest_field() {
+ $post_types = get_post_types( array( 'public' => true ) );
+ foreach ( $post_types as $post_type ) {
+ register_rest_field(
+ $post_type,
+ 'jetpack_likes_enabled',
+ array(
+ 'get_callback' => 'jetpack_post_likes_get_value',
+ 'update_callback' => 'jetpack_post_likes_update_value',
+ 'schema' => array(
+ 'description' => __( 'Are Likes enabled?', 'jetpack' ),
+ 'type' => 'boolean',
+ ),
+ )
+ );
+ }
+}
+
+// Add Likes post_meta to the REST API Post response.
+add_action( 'rest_api_init', 'jetpack_post_likes_register_rest_field' );
+
Jetpack_Likes::init();
diff --git a/plugins/jetpack/modules/likes/jetpack-likes-settings.php b/plugins/jetpack/modules/likes/jetpack-likes-settings.php
index b58467a6..8492b92a 100644
--- a/plugins/jetpack/modules/likes/jetpack-likes-settings.php
+++ b/plugins/jetpack/modules/likes/jetpack-likes-settings.php
@@ -148,7 +148,7 @@ class Jetpack_Likes_Settings {
( $this->is_enabled_sitewide() && ! empty( $_POST['wpl_enable_post_likes'] ) )
) {
// User wants to update the likes button status for an individual post, but the new status
- // is the same as if they're asking for the default behaviour according to the current Likes setting.
+ // is the same as if they're asking for the default behavior according to the current Likes setting.
// So we delete the meta.
delete_post_meta( $post_id, 'switch_like_status' );
}
@@ -164,7 +164,7 @@ class Jetpack_Likes_Settings {
$disabled = get_post_meta( $post_id, 'sharing_disabled', true ); ?>
<p>
<label for="wpl_enable_post_sharing">
- <input type="checkbox" name="wpl_enable_post_sharing" id="wpl_enable_post_sharing" value="1" <?php checked( !$disabled ); ?>>
+ <input type="checkbox" name="wpl_enable_post_sharing" id="wpl_enable_post_sharing" value="1" <?php checked( ! $disabled ); ?>>
<?php _e( 'Show sharing buttons.', 'jetpack' ); ?>
</label>
<input type="hidden" name="wpl_sharing_status_hidden" value="1" />
@@ -237,14 +237,29 @@ class Jetpack_Likes_Settings {
*/
function is_post_likeable( $post_id = 0 ) {
$post = get_post( $post_id );
- if ( !$post || is_wp_error( $post ) ) {
+ if ( ! $post || is_wp_error( $post ) ) {
return false;
}
$sitewide_likes_enabled = (bool) $this->is_enabled_sitewide();
$post_likes_switched = get_post_meta( $post->ID, 'switch_like_status', true );
- return $post_likes_switched || ( $sitewide_likes_enabled && $post_likes_switched !== '0' );
+ // on WPCOM, we need to look at post edit date so we don't break old posts
+ // if post edit date predates this code, stick with the former (buggy) behavior
+ // see: p7DVsv-64H-p2
+ $last_modified_time = strtotime( $post->post_modified_gmt );
+
+ $behavior_was_changed_at = strtotime( "2019-02-22 00:40:42" );
+
+ if ( $this->in_jetpack || $last_modified_time > $behavior_was_changed_at ) {
+ // the new and improved behavior on Jetpack and recent WPCOM posts:
+ // $post_likes_switched is empty to follow site setting,
+ // 0 if we want likes disabled, 1 if we want likes enabled
+ return $post_likes_switched || ( $sitewide_likes_enabled && $post_likes_switched !== '0' );
+ }
+
+ // implicit else (old behavior): $post_likes_switched simply inverts the global setting
+ return ( (bool) $post_likes_switched ) xor $sitewide_likes_enabled;
}
/**
@@ -395,7 +410,7 @@ class Jetpack_Likes_Settings {
}
// Ensure it's always an array (even if not previously empty or scalar)
- $setting['show'] = !empty( $sharing['global']['show'] ) ? (array) $sharing['global']['show'] : array();
+ $setting['show'] = ! empty( $sharing['global']['show'] ) ? (array) $sharing['global']['show'] : array();
/**
* Filters where the Likes are displayed.
@@ -507,9 +522,25 @@ class Jetpack_Likes_Settings {
<input type="radio" class="code" name="jetpack_reblogs_enabled" value="off" <?php checked( $this->reblogs_enabled_sitewide(), false ); ?> />
<?php esc_html_e( 'Don\'t show the Reblog button on posts', 'jetpack' ); ?>
</label>
- <div>
+ </div>
</td>
</tr>
+ <!-- WPCOM only: Comment Likes -->
+ <?php if ( ! $this->in_jetpack ) : ?>
+ <tr>
+ <th scope="row">
+ <label><?php esc_html_e( 'Comment Likes are', 'jetpack' ); ?></label>
+ </th>
+ <td>
+ <div>
+ <label>
+ <input type="checkbox" class="code" name="jetpack_comment_likes_enabled" value="1" <?php checked( $this->is_comments_enabled(), true ); ?> />
+ <?php esc_html_e( 'On for all comments', 'jetpack' ); ?>
+ </label>
+ </div>
+ </td>
+ </tr>
+ <?php endif; ?>
<?php endif; ?>
</tbody> <?php // closes the tbody attached to sharing_show_buttons_on_row_start... ?>
<?php
@@ -534,15 +565,34 @@ class Jetpack_Likes_Settings {
}
/**
+ * Used for WPCOM ONLY. Comment likes are in their own module in Jetpack.
+ * Returns if comment likes are enabled. Defaults to 'off'
+ * @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 comment-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 ) );
+ }
+
+ /**
* Saves the setting in the database, bumps a stat on WordPress.com
*/
function admin_settings_callback() {
// We're looking for these, and doing a dance to set some stats and save
// them together in array option.
- $new_state = !empty( $_POST['wpl_default'] ) ? $_POST['wpl_default'] : 'on';
+ $new_state = ! empty( $_POST['wpl_default'] ) ? $_POST['wpl_default'] : 'on';
$db_state = $this->is_enabled_sitewide();
- $reblogs_new_state = !empty( $_POST['jetpack_reblogs_enabled'] ) ? $_POST['jetpack_reblogs_enabled'] : 'on';
+ $reblogs_new_state = ! empty( $_POST['jetpack_reblogs_enabled'] ) ? $_POST['jetpack_reblogs_enabled'] : 'on';
$reblogs_db_state = $this->reblogs_enabled_sitewide();
/** Default State *********************************************************/
@@ -578,6 +628,20 @@ class Jetpack_Likes_Settings {
delete_option( 'disabled_reblogs' );
break;
}
+
+ // WPCOM only: Comment Likes
+ if ( ! $this->in_jetpack ) {
+ $new_comments_state = ! empty( $_POST['jetpack_comment_likes_enabled'] ) ? $_POST['jetpack_comment_likes_enabled'] : false;
+ switch( (bool) $new_comments_state ) {
+ case true:
+ update_option( 'jetpack_comment_likes_enabled', 1 );
+ break;
+ case false:
+ default:
+ update_option( 'jetpack_comment_likes_enabled', 0 );
+ break;
+ }
+ }
}
/**
@@ -598,8 +662,6 @@ class Jetpack_Likes_Settings {
* 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
/** This action is documented in modules/sharedaddy/sharing.php */
echo apply_filters( 'sharing_show_buttons_on_row_start', '<tr valign="top">' );
?>
diff --git a/plugins/jetpack/modules/likes/queuehandler.js b/plugins/jetpack/modules/likes/queuehandler.js
index 1917ab9a..0db8658a 100644
--- a/plugins/jetpack/modules/likes/queuehandler.js
+++ b/plugins/jetpack/modules/likes/queuehandler.js
@@ -193,7 +193,7 @@ function JetpackLikesMessageListener( event, message ) {
$list.append( element );
} );
- offset = jQuery( '[name=\'' + event.parent + '\']' ).offset();
+ offset = jQuery( 'body' ).find( '[name=\'' + event.parent + '\']' ).offset();
$container.css( 'left', offset.left + event.position.left - 10 + 'px' );
$container.css( 'top', offset.top + event.position.top - 33 + 'px' );
diff --git a/plugins/jetpack/modules/markdown/easy-markdown.php b/plugins/jetpack/modules/markdown/easy-markdown.php
index d1993a26..06a2cab9 100644
--- a/plugins/jetpack/modules/markdown/easy-markdown.php
+++ b/plugins/jetpack/modules/markdown/easy-markdown.php
@@ -72,7 +72,6 @@ class WPCom_Markdown {
if ( current_theme_supports( 'o2' ) || class_exists( 'P2' ) ) {
$this->add_o2_helpers();
}
- jetpack_register_block( 'markdown' );
}
/**
@@ -574,7 +573,7 @@ jQuery( function() {
*/
public function transform( $text, $args = array() ) {
// If this contains Gutenberg content, let's keep it intact.
- if ( function_exists( 'has_blocks' ) && has_blocks( $text ) ) {
+ if ( has_blocks( $text ) ) {
return $text;
}
diff --git a/plugins/jetpack/modules/masterbar.php b/plugins/jetpack/modules/masterbar.php
index 6672a992..8efeae3e 100644
--- a/plugins/jetpack/modules/masterbar.php
+++ b/plugins/jetpack/modules/masterbar.php
@@ -11,6 +11,16 @@
* Additional Search Queries: adminbar, masterbar
*/
-include dirname( __FILE__ ) . '/masterbar/masterbar.php';
+require dirname( __FILE__ ) . '/masterbar/masterbar.php';
-new A8C_WPCOM_Masterbar;
+// In order to be able to tell if it's an AMP request or not we have to hook into parse_query at a later priority.
+add_action( 'admin_bar_init', 'jetpack_initialize_masterbar', 99 );
+
+/**
+ * Initializes the Masterbar in case the request is not AMP.
+ */
+function jetpack_initialize_masterbar() {
+ if ( ! Jetpack_AMP_Support::is_amp_request() ) {
+ new A8C_WPCOM_Masterbar();
+ }
+}
diff --git a/plugins/jetpack/modules/masterbar/masterbar.php b/plugins/jetpack/modules/masterbar/masterbar.php
index d59ead39..3f39f2d0 100644
--- a/plugins/jetpack/modules/masterbar/masterbar.php
+++ b/plugins/jetpack/modules/masterbar/masterbar.php
@@ -509,7 +509,7 @@ class A8C_WPCOM_Masterbar {
'class' => 'mb-icon user-info-item',
),
) );
-
+
$help_link = 'https://jetpack.com/support/';
if ( jetpack_is_atomic_site() ) {
@@ -660,7 +660,7 @@ class A8C_WPCOM_Masterbar {
if ( is_user_member_of_blog( $current_user->ID ) ) {
$plans_url = 'https://wordpress.com/plans/' . esc_attr( $this->primary_site_slug );
$label = esc_html__( 'Plan', 'jetpack' );
- $plan = Jetpack::get_active_plan();
+ $plan = Jetpack_Plan::get();
$plan_title = $this->create_menu_item_pair(
array(
diff --git a/plugins/jetpack/modules/minileven/minileven.php b/plugins/jetpack/modules/minileven/minileven.php
index 8b609d97..abfec53d 100644
--- a/plugins/jetpack/modules/minileven/minileven.php
+++ b/plugins/jetpack/modules/minileven/minileven.php
@@ -117,7 +117,7 @@ function jetpack_mobile_template( $theme ) {
}
function jetpack_mobile_available() {
- 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>';
+ echo '<div class="jetpack-mobile-link" style="text-align:center;margin:10px 0;"><a href="'. esc_url( home_url( add_query_arg('ak_action', 'accept_mobile') ) ) . '">' . __( 'View Mobile Site', 'jetpack' ) . '</a></div>';
}
function jetpack_mobile_request_handler() {
@@ -176,10 +176,7 @@ function jetpack_mobile_request_handler() {
if ($redirect) {
if ( isset( $_GET['redirect_to'] ) && $_GET['redirect_to'] ) {
$go = urldecode( $_GET['redirect_to'] );
- } else if (!empty($_SERVER['HTTP_REFERER'])) {
- $go = $_SERVER['HTTP_REFERER'];
- }
- else {
+ } else {
$go = remove_query_arg( array( 'ak_action' ) );
}
wp_safe_redirect( $go );
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 85f69359..218949ea 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/content-gallery.php
@@ -30,15 +30,15 @@
$images = minileven_get_gallery_images();
if ( $images ) :
$total_images = count( $images );
- $large_image = array_shift( $images );
+ $large_image = array_shift( $images );
$thumb1_image = array_shift( $images );
$thumb2_image = array_shift( $images );
$thumb3_image = array_shift( $images );
- $image_img_tag = wp_get_attachment_image( $large_image->ID, 'large' );
- $thumb1_img_tag = wp_get_attachment_image( $thumb1_image->ID, 'thumbnail' );
- $thumb2_img_tag = wp_get_attachment_image( $thumb2_image->ID, 'thumbnail' );
- $thumb3_img_tag = wp_get_attachment_image( $thumb3_image->ID, 'thumbnail' );
+ $image_img_tag = wp_get_attachment_image( (int) $large_image, 'large' );
+ $thumb1_img_tag = wp_get_attachment_image( (int) $thumb1_image, 'thumbnail' );
+ $thumb2_img_tag = wp_get_attachment_image( (int) $thumb2_image, 'thumbnail' );
+ $thumb3_img_tag = wp_get_attachment_image( (int) $thumb3_image, 'thumbnail' );
?>
<div class="img-gallery">
<div class="gallery-large">
@@ -80,4 +80,4 @@
</footer><!-- #entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
-<?php comments_template( '', true ); ?> \ No newline at end of file
+<?php comments_template( '', true ); ?>
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php b/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php
index a55c1988..964165f0 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/footer.php
@@ -27,12 +27,7 @@
<footer id="colophon" role="contentinfo">
<div id="site-generator">
-
-<?php
- global $wp;
- $current_url = trailingslashit( home_url( add_query_arg( array(), $wp->request ) ) );
-?>
- <a href="<?php echo $current_url . '?ak_action=reject_mobile'; ?>"><?php _e( 'View Full Site', 'jetpack' ); ?></a><br />
+ <a href="<?php echo esc_url( home_url( add_query_arg('ak_action', 'reject_mobile') ) ); ?>"><?php _e( 'View Full Site', 'jetpack' ); ?></a><br />
<?php
/**
diff --git a/plugins/jetpack/modules/minileven/theme/pub/minileven/rtl.css b/plugins/jetpack/modules/minileven/theme/pub/minileven/rtl.css
index 7b67e1f2..b2839d74 100644
--- a/plugins/jetpack/modules/minileven/theme/pub/minileven/rtl.css
+++ b/plugins/jetpack/modules/minileven/theme/pub/minileven/rtl.css
@@ -572,11 +572,3 @@ section.recent-posts .other-recent-posts .comments-link > span {
margin-right: 50px;
}
}
-
-/* =IE7
------------------------------------------------ */
-
-#ie7 section.recent-posts {
- margin-right: 0;
- margin-left: 7.6%;
-}
diff --git a/plugins/jetpack/modules/module-extras.php b/plugins/jetpack/modules/module-extras.php
index 4185ca42..bf8cf481 100644
--- a/plugins/jetpack/modules/module-extras.php
+++ b/plugins/jetpack/modules/module-extras.php
@@ -27,6 +27,12 @@ $tools = array(
'woocommerce-analytics/wp-woocommerce-analytics.php',
'geo-location.php',
'calypsoify/class.jetpack-calypsoify.php',
+
+ // Keep working the VideoPress videos in existing posts/pages when the module is deactivated
+ 'videopress/utility-functions.php',
+ 'videopress/class.videopress-gutenberg.php',
+
+ 'plugin-search.php',
);
// Not every tool needs to be included if Jetpack is inactive and not in development mode
@@ -38,11 +44,6 @@ if ( ! Jetpack::is_active() && ! Jetpack::is_development_mode() ) {
);
}
-/* If Gutenberg blocks are enabled, register blocks that aren't associated with modules */
-if ( Jetpack_Gutenberg::should_load_blocks() ) {
- $tools[] = 'blocks.php';
-}
-
/**
* Filter extra tools (not modules) to include.
*
diff --git a/plugins/jetpack/modules/module-headings.php b/plugins/jetpack/modules/module-headings.php
index e345dcd5..245f79eb 100644
--- a/plugins/jetpack/modules/module-headings.php
+++ b/plugins/jetpack/modules/module-headings.php
@@ -20,7 +20,6 @@ function jetpack_get_module_i18n( $key ) {
'carousel' => array(
'name' => _x( 'Carousel', 'Module Name', 'jetpack' ),
'description' => _x( 'Display images and galleries in a gorgeous, full-screen browsing experience', 'Module Description', 'jetpack' ),
- 'recommended description' => _x( 'Brings your photos and images to life as full-size, easily navigable galleries.', 'Jumpstart Description', 'jetpack' ),
),
'comment-likes' => array(
@@ -35,8 +34,13 @@ function jetpack_get_module_i18n( $key ) {
'contact-form' => array(
'name' => _x( 'Contact Form', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Insert a customizable contact form anywhere on your site.', 'Module Description', 'jetpack' ),
- 'recommended description' => _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' ),
+ 'description' => _x( 'Add a customizable contact form to any post or page using the Jetpack Form Block.', 'Module Description', 'jetpack' ),
+ ),
+
+ 'copy-post' => array(
+ 'name' => _x( 'Copy Post', 'Module Name', 'jetpack' ),
+ 'description' => _x( 'Copy an existing post\'s content into a new draft post', 'Module Description', 'jetpack' ),
+ 'recommended description' => _x( 'Copy an existing post\'s content into a new draft post', 'Jumpstart Description', 'jetpack' ),
),
'custom-content-types' => array(
@@ -62,7 +66,6 @@ function jetpack_get_module_i18n( $key ) {
'gravatar-hovercards' => array(
'name' => _x( 'Gravatar Hovercards', 'Module Name', 'jetpack' ),
'description' => _x( 'Enable pop-up business cards over commenters’ Gravatars.', 'Module Description', 'jetpack' ),
- 'recommended description' => _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' ),
),
'infinite-scroll' => array(
@@ -82,7 +85,7 @@ function jetpack_get_module_i18n( $key ) {
'lazy-images' => array(
'name' => _x( 'Lazy Images', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Lazy load images', 'Module Description', 'jetpack' ),
+ 'description' => _x( 'Speed up your site and create a smoother viewing experience by loading images as visitors scroll down the screen, instead of all at once.', 'Module Description', 'jetpack' ),
'recommended description' => _x( 'Lazy-loading images improve your site\'s speed and create a smoother viewing experience. Images will load as visitors scroll down the screen, instead of all at once.', 'Jumpstart Description', 'jetpack' ),
),
@@ -114,7 +117,7 @@ function jetpack_get_module_i18n( $key ) {
'monitor' => array(
'name' => _x( 'Monitor', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Receive immediate notifications if your site goes down, 24/7.', 'Module Description', 'jetpack' ),
+ 'description' => _x( 'Jetpack’s downtime monitoring will continuously watch your site, and alert you the moment that downtime is detected.', 'Module Description', 'jetpack' ),
'recommended description' => _x( 'Receive immediate notifications if your site goes down, 24/7.', 'Jumpstart Description', 'jetpack' ),
),
@@ -125,12 +128,12 @@ function jetpack_get_module_i18n( $key ) {
'photon-cdn' => array(
'name' => _x( 'Asset CDN', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Serve static assets from our servers', 'Module Description', 'jetpack' ),
+ 'description' => _x( 'Jetpack’s Site Accelerator loads your site faster by optimizing your images and serving your images and static files from our global network of servers.', 'Module Description', 'jetpack' ),
),
'photon' => array(
- 'name' => _x( 'Photon', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Serve images from our servers', 'Module Description', 'jetpack' ),
+ 'name' => _x( 'Image CDN', 'Module Name', 'jetpack' ),
+ 'description' => _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.', 'Module Description', 'jetpack' ),
'recommended description' => _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' ),
),
@@ -141,12 +144,12 @@ function jetpack_get_module_i18n( $key ) {
'protect' => array(
'name' => _x( 'Protect', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Block suspicious-looking sign in activity', 'Module Description', 'jetpack' ),
+ 'description' => _x( 'Protect yourself from brute force and distributed brute force attacks, which are the most common way for hackers to get into your site.', 'Module Description', 'jetpack' ),
),
'publicize' => array(
'name' => _x( 'Publicize', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Automated social marketing.', 'Module Description', 'jetpack' ),
+ 'description' => _x( 'Publicize makes it easy to share your site’s posts on several social media networks automatically when you publish a new post.', 'Module Description', 'jetpack' ),
),
'pwa' => array(
@@ -156,13 +159,12 @@ function jetpack_get_module_i18n( $key ) {
'related-posts' => array(
'name' => _x( 'Related posts', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Increase page views by showing related content to your visitors.', 'Module Description', 'jetpack' ),
- 'recommended description' => _x( 'Keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post.', 'Jumpstart Description', 'jetpack' ),
+ 'description' => _x( 'Keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post.', 'Module Description', 'jetpack' ),
),
'search' => array(
'name' => _x( 'Search', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Enhanced search, powered by Elasticsearch', 'Module Description', 'jetpack' ),
+ 'description' => _x( 'Enhanced search, powered by Elasticsearch, a powerful replacement for WordPress search.', 'Module Description', 'jetpack' ),
),
'seo-tools' => array(
@@ -172,8 +174,7 @@ function jetpack_get_module_i18n( $key ) {
'sharedaddy' => array(
'name' => _x( 'Sharing', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Allow visitors to share your content.', 'Module Description', 'jetpack' ),
- 'recommended description' => _x( 'Twitter, Facebook and Google+ buttons at the bottom of each post, making it easy for visitors to share your content.', 'Jumpstart Description', 'jetpack' ),
+ 'description' => _x( 'Add Twitter, Facebook and Google+ buttons at the bottom of each post, making it easy for visitors to share your content.', 'Module Description', 'jetpack' ),
),
'shortcodes' => array(
@@ -205,18 +206,16 @@ function jetpack_get_module_i18n( $key ) {
'subscriptions' => array(
'name' => _x( 'Subscriptions', 'Module Name', 'jetpack' ),
'description' => _x( 'Allow users to subscribe to your posts and comments and receive notifications via email', 'Module Description', 'jetpack' ),
- 'recommended description' => _x( 'Give visitors two easy subscription options — while commenting, or via a separate email subscription widget you can display.', 'Jumpstart Description', 'jetpack' ),
),
'tiled-gallery' => array(
'name' => _x( 'Tiled Galleries', 'Module Name', 'jetpack' ),
'description' => _x( 'Display image galleries in a variety of elegant arrangements.', 'Module Description', 'jetpack' ),
- 'recommended description' => _x( 'Display image galleries in a variety of elegant arrangements.', 'Jumpstart Description', 'jetpack' ),
),
'vaultpress' => array(
- 'name' => _x( 'Data Backups', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Off-site backups, security scans, and automatic fixes.', 'Module Description', 'jetpack' ),
+ 'name' => _x( 'Backups and Scanning', 'Module Name', 'jetpack' ),
+ 'description' => _x( 'Protect your site with daily or real-time backups and automated virus scanning and threat detection.', 'Module Description', 'jetpack' ),
),
'verification-tools' => array(
@@ -226,7 +225,7 @@ function jetpack_get_module_i18n( $key ) {
'videopress' => array(
'name' => _x( 'VideoPress', 'Module Name', 'jetpack' ),
- 'description' => _x( 'Fast, ad-free video hosting', 'Module Description', 'jetpack' ),
+ 'description' => _x( 'Save on hosting storage and bandwidth costs by streaming fast, ad-free video from our global network.', 'Module Description', 'jetpack' ),
),
'widget-visibility' => array(
@@ -265,6 +264,7 @@ function jetpack_get_module_i18n_tag( $key ) {
// Modules with `Writing` tag:
// - modules/after-the-deadline.php
+ // - modules/copy-post.php
// - modules/custom-content-types.php
// - modules/enhanced-distribution.php
// - modules/json-api.php
diff --git a/plugins/jetpack/modules/module-info.php b/plugins/jetpack/modules/module-info.php
index 08daf5c7..fd01e9a0 100644
--- a/plugins/jetpack/modules/module-info.php
+++ b/plugins/jetpack/modules/module-info.php
@@ -102,7 +102,7 @@ add_filter( 'jetpack_learn_more_button_publicize', 'publicize_load_more_link' );
function publicize_more_info() { ?>
<?php esc_html_e(
- 'Automatically share and promote newly published posts to Facebook, Twitter, Tumblr, Google+,
+ 'Automatically share and promote newly published posts to Facebook, Twitter, Tumblr,
and LinkedIn. You can add connections for yourself or for all users on your site.'
, 'jetpack' );
}
@@ -699,3 +699,16 @@ function jetpack_assetcdn_more_info() {
);
}
add_action( 'jetpack_module_more_info_photon-cdn', 'jetpack_assetcdn_more_info' );
+
+/**
+ * Copy Post
+ */
+function jetpack_copy_post_more_link() {
+ echo 'https://jetpack.com/support/copy-post-2/';
+}
+add_action( 'jetpack_learn_more_button_copy-post', 'jetpack_copy_post_more_link' );
+
+function jetpack_more_info_copy_post() {
+ esc_html_e( 'Create a new post based on an existing post.', 'jetpack' );
+}
+add_action( 'jetpack_module_more_info_copy-post', 'jetpack_more_info_copy_post' );
diff --git a/plugins/jetpack/modules/monitor.php b/plugins/jetpack/modules/monitor.php
index 1e03c850..c8710483 100644
--- a/plugins/jetpack/modules/monitor.php
+++ b/plugins/jetpack/modules/monitor.php
@@ -1,7 +1,7 @@
<?php
/**
* Module Name: Monitor
- * Module Description: Receive immediate notifications if your site goes down, 24/7.
+ * Module Description: Jetpack’s downtime monitoring will continuously watch your site, and alert you the moment that downtime is detected.
* Jumpstart Description: Receive immediate notifications if your site goes down, 24/7.
* Sort Order: 28
* Recommendation Order: 10
@@ -10,7 +10,7 @@
* Auto Activate: No
* Module Tags: Recommended
* Feature: Security, Jumpstart
- * Additional Search Queries: monitor, uptime, downtime, monitoring
+ * Additional Search Queries: monitor, uptime, downtime, monitoring, maintenance, maintenance mode, offline, site is down, site down, down, repair, error
*/
class Jetpack_Monitor {
diff --git a/plugins/jetpack/modules/photon-cdn.php b/plugins/jetpack/modules/photon-cdn.php
index 3190237b..ecf0288c 100644
--- a/plugins/jetpack/modules/photon-cdn.php
+++ b/plugins/jetpack/modules/photon-cdn.php
@@ -1,15 +1,15 @@
<?php
/**
* Module Name: Asset CDN
- * Module Description: Serve static assets from our servers
+ * Module Description: Jetpack’s Site Accelerator loads your site faster by optimizing your images and serving your images and static files from our global network of servers.
* Sort Order: 26
* Recommendation Order: 1
* First Introduced: 6.6
* Requires Connection: No
* Auto Activate: No
* Module Tags: Photos and Videos, Appearance, Recommended
- * Feature: Recommended, Appearance
- * Additional Search Queries: photon, image, cdn, performance, speed, assets
+ * Feature: Recommended, Appearance, Jumpstart
+ * Additional Search Queries: site accelerator, accelerate, static, assets, javascript, css, files, performance, cdn, bandwidth, content delivery network, pagespeed, combine js, optimize css
*/
$GLOBALS['concatenate_scripts'] = false;
@@ -30,6 +30,7 @@ class Jetpack_Photon_Static_Assets_CDN {
add_action( 'admin_print_scripts', array( __CLASS__, 'cdnize_assets' ) );
add_action( 'admin_print_styles', array( __CLASS__, 'cdnize_assets' ) );
add_action( 'wp_footer', array( __CLASS__, 'cdnize_assets' ) );
+ add_filter( 'load_script_textdomain_relative_path', array( __CLASS__, 'fix_script_relative_path' ), 10, 2 );
}
/**
@@ -38,6 +39,17 @@ class Jetpack_Photon_Static_Assets_CDN {
public static function cdnize_assets() {
global $wp_scripts, $wp_styles, $wp_version;
+ /*
+ * Short-circuit if AMP since not relevant as custom JS is not allowed and CSS is inlined.
+ * Note that it is not suitable to use the jetpack_force_disable_site_accelerator filter for this
+ * because it will be applied before the wp action, which is the point at which the queried object
+ * is available and we know whether the response will be AMP or not. This is particularly important
+ * for AMP-first (native AMP) pages where there are no AMP-specific URLs.
+ */
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return;
+ }
+
/**
* Filters Jetpack CDN's Core version number and locale. Can be used to override the values
* that Jetpack uses to retrieve assets. Expects the values to be returned in an array.
@@ -84,6 +96,30 @@ class Jetpack_Photon_Static_Assets_CDN {
}
/**
+ * Ensure use of the correct relative path when determining the JavaScript file names.
+ *
+ * @param string $relative The relative path of the script. False if it could not be determined.
+ * @param string $src The full source url of the script.
+ * @return string The expected relative path for the CDN-ed URL.
+ */
+ public static function fix_script_relative_path( $relative, $src ) {
+
+ // Note relevant in AMP responses. See note above.
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $relative;
+ }
+
+ $strpos = strpos( $src, '/wp-includes/' );
+
+ // We only treat URLs that have wp-includes in them. Cases like language textdomains
+ // can also use this filter, they don't need to be touched because they are local paths.
+ if ( false === $strpos ) {
+ return $relative;
+ }
+ return substr( $src, 1 + $strpos );
+ }
+
+ /**
* Sets up CDN URLs for supported plugin assets.
*
* @param String $plugin_slug plugin slug string.
diff --git a/plugins/jetpack/modules/photon-cdn/jetpack-manifest.php b/plugins/jetpack/modules/photon-cdn/jetpack-manifest.php
index f1681ae8..1d40b5a1 100644
--- a/plugins/jetpack/modules/photon-cdn/jetpack-manifest.php
+++ b/plugins/jetpack/modules/photon-cdn/jetpack-manifest.php
@@ -32,390 +32,403 @@ $assets = array (
29 => 'css/jetpack-admin-jitm.min.css',
30 => '3rd-party/debug-bar/debug-bar.css',
31 => '3rd-party/debug-bar/debug-bar.js',
- 32 => '_inc/blocks/editor.css',
- 33 => '_inc/blocks/editor.rtl.css',
- 34 => '_inc/blocks/editor-beta.js',
- 35 => '_inc/blocks/editor.js',
- 36 => '_inc/blocks/map/mapbox-gl.rtl.css',
- 37 => '_inc/blocks/map/mapbox-gl.js',
- 38 => '_inc/blocks/map/view.rtl.css',
- 39 => '_inc/blocks/map/view.js',
- 40 => '_inc/blocks/map/view.css',
- 41 => '_inc/blocks/map/mapbox-gl.css',
- 42 => '_inc/blocks/editor-beta.css',
- 43 => '_inc/blocks/editor-beta.rtl.css',
- 44 => '_inc/idc-notice.js',
- 45 => '_inc/jetpack-modules.js',
- 46 => '_inc/jquery.jetpack-resize.js',
- 47 => '_inc/genericons/genericons/genericons.css',
- 48 => '_inc/genericons/genericons/rtl/genericons-rtl.css',
- 49 => '_inc/genericons/genericons.css',
- 50 => '_inc/jetpack-modules.views.js',
- 51 => '_inc/jquery.spin.js',
- 52 => '_inc/facebook-embed.js',
- 53 => '_inc/twitter-timeline.js',
- 54 => '_inc/spin.js',
- 55 => '_inc/accessible-focus.js',
- 56 => '_inc/jetpack-jitm.js',
- 57 => '_inc/jetpack-modules.models.js',
- 58 => '_inc/social-logos/social-logos.min.css',
- 59 => '_inc/social-logos/social-logos.css',
- 60 => '_inc/gallery-settings.js',
- 61 => '_inc/lib/tracks/tracks-callables.js',
- 62 => '_inc/lib/tracks/tracks-ajax.js',
- 63 => '_inc/build/infinite-scroll/infinity.min.js',
- 64 => '_inc/build/videopress/js/videopress-plupload.min.js',
- 65 => '_inc/build/videopress/js/videopress-uploader.min.js',
- 66 => '_inc/build/videopress/js/media-video-widget-extensions.min.js',
- 67 => '_inc/build/videopress/js/editor-view.min.js',
- 68 => '_inc/build/tiled-gallery/tiled-gallery/tiled-gallery.min.js',
- 69 => '_inc/build/jetpack-connection-banner.min.js',
- 70 => '_inc/build/style.min.css',
- 71 => '_inc/build/masterbar/tracks-events.min.js',
- 72 => '_inc/build/sharedaddy/admin-sharing.min.js',
- 73 => '_inc/build/sharedaddy/sharing.min.js',
- 74 => '_inc/build/jquery.spin.min.js',
- 75 => '_inc/build/custom-post-types/comics/comics.min.js',
- 76 => '_inc/build/custom-post-types/js/nova-drag-drop.min.js',
- 77 => '_inc/build/custom-post-types/js/many-items.min.js',
- 78 => '_inc/build/custom-post-types/js/menu-checkboxes.min.js',
- 79 => '_inc/build/jquery.jetpack-resize.min.js',
- 80 => '_inc/build/likes/post-count-jetpack.min.js',
- 81 => '_inc/build/likes/queuehandler.min.js',
- 82 => '_inc/build/likes/post-count.min.js',
- 83 => '_inc/build/admin.dops-style.css',
- 84 => '_inc/build/after-the-deadline/tinymce/editor_plugin.min.js',
- 85 => '_inc/build/after-the-deadline/tinymce/plugin.min.js',
- 86 => '_inc/build/after-the-deadline/atd-nonvis-editor-plugin.min.js',
- 87 => '_inc/build/after-the-deadline/jquery.atd.min.js',
- 88 => '_inc/build/after-the-deadline/atd.core.min.js',
- 89 => '_inc/build/after-the-deadline/atd-autoproofread.min.js',
- 90 => '_inc/build/comment-likes/comment-like-count.min.js',
- 91 => '_inc/build/idc-notice.min.js',
- 92 => '_inc/build/accessible-focus.min.js',
- 93 => '_inc/build/contact-form/js/grunion.min.js',
- 94 => '_inc/build/contact-form/js/tinymce-plugin-form-button.min.js',
- 95 => '_inc/build/contact-form/js/grunion-admin.min.js',
- 96 => '_inc/build/contact-form/js/grunion-frontend.min.js',
- 97 => '_inc/build/contact-form/js/editor-view.min.js',
- 98 => '_inc/build/jetpack-modules.models.min.js',
- 99 => '_inc/build/related-posts/related-posts.min.js',
- 100 => '_inc/build/related-posts/related-posts-customizer.min.js',
- 101 => '_inc/build/carousel/jetpack-carousel.min.js',
- 102 => '_inc/build/shortcodes/js/brightcove.min.js',
- 103 => '_inc/build/shortcodes/js/gist.min.js',
- 104 => '_inc/build/shortcodes/js/recipes-printthis.min.js',
- 105 => '_inc/build/shortcodes/js/main.min.js',
- 106 => '_inc/build/shortcodes/js/recipes.min.js',
- 107 => '_inc/build/shortcodes/js/jmpress.min.js',
- 108 => '_inc/build/shortcodes/js/instagram.min.js',
- 109 => '_inc/build/shortcodes/js/slideshow-shortcode.min.js',
- 110 => '_inc/build/shortcodes/js/quiz.min.js',
- 111 => '_inc/build/minileven/theme/pub/minileven/js/small-menu.min.js',
- 112 => '_inc/build/custom-css/custom-css/js/core-customizer-css-preview.min.js',
- 113 => '_inc/build/custom-css/custom-css/js/core-customizer-css.core-4.9.min.js',
- 114 => '_inc/build/custom-css/custom-css/js/use-codemirror.min.js',
- 115 => '_inc/build/custom-css/custom-css/js/core-customizer-css.min.js',
- 116 => '_inc/build/custom-css/custom-css/js/css-editor.min.js',
- 117 => '_inc/build/jetpack-jitm.min.js',
- 118 => '_inc/build/gallery-settings.min.js',
- 119 => '_inc/build/spin.min.js',
- 120 => '_inc/build/jetpack-admin.min.js',
- 121 => '_inc/build/admin.js',
- 122 => '_inc/build/twitter-timeline.min.js',
- 123 => '_inc/build/jetpack-modules.views.min.js',
- 124 => '_inc/build/photon/photon.min.js',
- 125 => '_inc/build/style.min.rtl.css',
- 126 => '_inc/build/jetpack-modules.min.js',
- 127 => '_inc/build/postmessage.min.js',
- 128 => '_inc/build/widget-visibility/widget-conditions/widget-conditions.min.js',
- 129 => '_inc/build/publicize/assets/publicize.min.js',
- 130 => '_inc/build/facebook-embed.min.js',
- 131 => '_inc/build/widgets/simple-payments/customizer.min.js',
- 132 => '_inc/build/widgets/social-icons/social-icons-admin.min.js',
- 133 => '_inc/build/widgets/eu-cookie-law/eu-cookie-law.min.js',
- 134 => '_inc/build/widgets/eu-cookie-law/eu-cookie-law-admin.min.js',
- 135 => '_inc/build/widgets/gallery/js/gallery.min.js',
- 136 => '_inc/build/widgets/gallery/js/admin.min.js',
- 137 => '_inc/build/widgets/milestone/milestone.min.js',
- 138 => '_inc/build/widgets/milestone/admin.min.js',
- 139 => '_inc/build/widgets/search/js/search-widget.min.js',
- 140 => '_inc/build/widgets/search/js/search-widget-admin.min.js',
- 141 => '_inc/build/widgets/google-plus/js/admin.min.js',
- 142 => '_inc/build/widgets/customizer-utils.min.js',
- 143 => '_inc/build/widgets/contact-info/contact-info-admin.min.js',
- 144 => '_inc/build/widgets/twitter-timeline-admin.min.js',
- 145 => '_inc/build/widgets/google-translate/google-translate.min.js',
- 146 => '_inc/build/lazy-images/js/lazy-images.min.js',
- 147 => '_inc/jetpack-admin.js',
- 148 => '_inc/jetpack-connection-banner.js',
- 149 => '_inc/postmessage.js',
- 150 => 'modules/infinite-scroll/infinity.js',
- 151 => 'modules/infinite-scroll/infinity.css',
- 152 => 'modules/infinite-scroll/themes/twentysixteen.css',
- 153 => 'modules/infinite-scroll/themes/twentyeleven.css',
- 154 => 'modules/infinite-scroll/themes/twentyten.css',
- 155 => 'modules/infinite-scroll/themes/twentyseventeen-rtl.css',
- 156 => 'modules/infinite-scroll/themes/twentyfifteen.css',
- 157 => 'modules/infinite-scroll/themes/twentysixteen-rtl.css',
- 158 => 'modules/infinite-scroll/themes/twentyseventeen.css',
- 159 => 'modules/infinite-scroll/themes/twentytwelve.css',
- 160 => 'modules/infinite-scroll/themes/twentyfourteen.css',
- 161 => 'modules/infinite-scroll/themes/twentyfifteen-rtl.css',
- 162 => 'modules/infinite-scroll/themes/twentythirteen.css',
- 163 => 'modules/videopress/css/videopress-editor-style-rtl.css',
- 164 => 'modules/videopress/css/videopress-editor-style.min.css',
- 165 => 'modules/videopress/css/editor.css',
- 166 => 'modules/videopress/css/videopress-editor-style-rtl.min.css',
- 167 => 'modules/videopress/css/editor.min.css',
- 168 => 'modules/videopress/css/editor-rtl.css',
- 169 => 'modules/videopress/css/editor-rtl.min.css',
- 170 => 'modules/videopress/css/videopress-editor-style.css',
- 171 => 'modules/videopress/js/media-video-widget-extensions.js',
- 172 => 'modules/videopress/js/videopress-plupload.js',
- 173 => 'modules/videopress/js/videopress-uploader.js',
- 174 => 'modules/videopress/js/editor-view.js',
- 175 => 'modules/videopress/videopress-admin.css',
- 176 => 'modules/videopress/videopress-admin.min.css',
- 177 => 'modules/videopress/videopress-admin-rtl.css',
- 178 => 'modules/videopress/videopress-admin-rtl.min.css',
- 179 => 'modules/tiled-gallery/tiled-gallery/tiled-gallery-rtl.css',
- 180 => 'modules/tiled-gallery/tiled-gallery/tiled-gallery.css',
- 181 => 'modules/tiled-gallery/tiled-gallery/rtl/tiled-gallery-rtl.css',
- 182 => 'modules/tiled-gallery/tiled-gallery/tiled-gallery.js',
- 183 => 'modules/simple-payments/simple-payments.css',
- 184 => 'modules/simple-payments/paypal-express-checkout.js',
- 185 => 'modules/masterbar/overrides.css',
- 186 => 'modules/masterbar/tracks-events.js',
- 187 => 'modules/sharedaddy/admin-sharing-rtl.min.css',
- 188 => 'modules/sharedaddy/sharing.js',
- 189 => 'modules/sharedaddy/sharing.css',
- 190 => 'modules/sharedaddy/admin-sharing.js',
- 191 => 'modules/sharedaddy/admin-sharing.min.css',
- 192 => 'modules/sharedaddy/admin-sharing-rtl.css',
- 193 => 'modules/sharedaddy/admin-sharing.css',
- 194 => 'modules/custom-post-types/comics/comics.min.css',
- 195 => 'modules/custom-post-types/comics/comics-rtl.css',
- 196 => 'modules/custom-post-types/comics/comics.css',
- 197 => 'modules/custom-post-types/comics/comics-rtl.min.css',
- 198 => 'modules/custom-post-types/comics/comics.js',
- 199 => 'modules/custom-post-types/comics/admin.css',
- 200 => 'modules/custom-post-types/comics/rtl/comics-rtl.css',
- 201 => 'modules/custom-post-types/css/portfolio-shortcode.css',
- 202 => 'modules/custom-post-types/css/testimonial-shortcode.css',
- 203 => 'modules/custom-post-types/css/nova-font.css',
- 204 => 'modules/custom-post-types/css/edit-items.css',
- 205 => 'modules/custom-post-types/css/nova.css',
- 206 => 'modules/custom-post-types/css/many-items.css',
- 207 => 'modules/custom-post-types/js/menu-checkboxes.js',
- 208 => 'modules/custom-post-types/js/many-items.js',
- 209 => 'modules/custom-post-types/js/nova-drag-drop.js',
- 210 => 'modules/calypsoify/style-gutenberg-rtl.min.css',
- 211 => 'modules/calypsoify/style-rtl.min.css',
- 212 => 'modules/calypsoify/style.min.css',
- 213 => 'modules/calypsoify/style-gutenberg.min.css',
- 214 => 'modules/calypsoify/mods-gutenberg.js',
- 215 => 'modules/calypsoify/mods.js',
- 216 => 'modules/likes/post-count.js',
- 217 => 'modules/likes/post-count-jetpack.js',
- 218 => 'modules/likes/style.css',
- 219 => 'modules/likes/queuehandler.js',
- 220 => 'modules/protect/protect-dashboard-widget-rtl.min.css',
- 221 => 'modules/protect/protect-dashboard-widget.css',
- 222 => 'modules/protect/protect-dashboard-widget.min.css',
- 223 => 'modules/protect/protect-dashboard-widget-rtl.css',
- 224 => 'modules/after-the-deadline/jquery.atd.js',
- 225 => 'modules/after-the-deadline/tinymce/css/content-rtl.min.css',
- 226 => 'modules/after-the-deadline/tinymce/css/content.css',
- 227 => 'modules/after-the-deadline/tinymce/css/content-rtl.css',
- 228 => 'modules/after-the-deadline/tinymce/css/content.min.css',
- 229 => 'modules/after-the-deadline/tinymce/editor_plugin.js',
- 230 => 'modules/after-the-deadline/tinymce/plugin.js',
- 231 => 'modules/after-the-deadline/atd-rtl.css',
- 232 => 'modules/after-the-deadline/atd.min.css',
- 233 => 'modules/after-the-deadline/atd.core.js',
- 234 => 'modules/after-the-deadline/atd-rtl.min.css',
- 235 => 'modules/after-the-deadline/rtl/atd-rtl.css',
- 236 => 'modules/after-the-deadline/atd-autoproofread.js',
- 237 => 'modules/after-the-deadline/atd-nonvis-editor-plugin.js',
- 238 => 'modules/after-the-deadline/atd.css',
- 239 => 'modules/comment-likes/comment-like-count.js',
- 240 => 'modules/comment-likes/admin-style.css',
- 241 => 'modules/contact-form/css/editor-ui.min.css',
- 242 => 'modules/contact-form/css/editor-ui-rtl.css',
- 243 => 'modules/contact-form/css/editor-inline-editing-style.css',
- 244 => 'modules/contact-form/css/editor-inline-editing-style-rtl.css',
- 245 => 'modules/contact-form/css/editor-inline-editing-style.min.css',
- 246 => 'modules/contact-form/css/editor-style-rtl.min.css',
- 247 => 'modules/contact-form/css/jquery-ui-datepicker.css',
- 248 => 'modules/contact-form/css/grunion.css',
- 249 => 'modules/contact-form/css/editor-ui.css',
- 250 => 'modules/contact-form/css/editor-style.css',
- 251 => 'modules/contact-form/css/editor-style-rtl.css',
- 252 => 'modules/contact-form/css/editor-inline-editing-style-rtl.min.css',
- 253 => 'modules/contact-form/css/editor-style.min.css',
- 254 => 'modules/contact-form/css/grunion-rtl.css',
- 255 => 'modules/contact-form/css/editor-ui-rtl.min.css',
- 256 => 'modules/contact-form/js/grunion.js',
- 257 => 'modules/contact-form/js/grunion-admin.js',
- 258 => 'modules/contact-form/js/editor-view.js',
- 259 => 'modules/contact-form/js/grunion-frontend.js',
- 260 => 'modules/contact-form/js/tinymce-plugin-form-button.js',
- 261 => 'modules/related-posts/related-posts.css',
- 262 => 'modules/related-posts/related-posts.js',
- 263 => 'modules/related-posts/related-posts-rtl.css',
- 264 => 'modules/related-posts/rtl/related-posts-rtl.css',
- 265 => 'modules/related-posts/related-posts-customizer.js',
- 266 => 'modules/carousel/jetpack-carousel-ie8fix.css',
- 267 => 'modules/carousel/jetpack-carousel.js',
- 268 => 'modules/carousel/rtl/jetpack-carousel-rtl.css',
- 269 => 'modules/carousel/jetpack-carousel.css',
- 270 => 'modules/carousel/jetpack-carousel-rtl.css',
- 271 => 'modules/shortcodes/css/recipes.css',
- 272 => 'modules/shortcodes/css/slideshow-shortcode.min.css',
- 273 => 'modules/shortcodes/css/slideshow-shortcode-rtl.css',
- 274 => 'modules/shortcodes/css/recipes-print.min.css',
- 275 => 'modules/shortcodes/css/recipes-rtl.css',
- 276 => 'modules/shortcodes/css/recipes.min.css',
- 277 => 'modules/shortcodes/css/recipes-print-rtl.css',
- 278 => 'modules/shortcodes/css/recipes-print.css',
- 279 => 'modules/shortcodes/css/slideshow-shortcode-rtl.min.css',
- 280 => 'modules/shortcodes/css/recipes-rtl.min.css',
- 281 => 'modules/shortcodes/css/recipes-print-rtl.min.css',
- 282 => 'modules/shortcodes/css/style.css',
- 283 => 'modules/shortcodes/css/quiz.css',
- 284 => 'modules/shortcodes/css/slideshow-shortcode.css',
- 285 => 'modules/shortcodes/js/brightcove.js',
- 286 => 'modules/shortcodes/js/quiz.js',
- 287 => 'modules/shortcodes/js/recipes-printthis.js',
- 288 => 'modules/shortcodes/js/jmpress.js',
- 289 => 'modules/shortcodes/js/slideshow-shortcode.js',
- 290 => 'modules/shortcodes/js/main.js',
- 291 => 'modules/shortcodes/js/jquery.cycle.min.js',
- 292 => 'modules/shortcodes/js/instagram.js',
- 293 => 'modules/shortcodes/js/recipes.js',
- 294 => 'modules/shortcodes/js/gist.js',
- 295 => 'modules/subscriptions/subscriptions.css',
- 296 => 'modules/minileven/theme/pub/minileven/js/small-menu.js',
- 297 => 'modules/minileven/theme/pub/minileven/style.css',
- 298 => 'modules/minileven/theme/pub/minileven/rtl.css',
- 299 => 'modules/wordads/css/style.css',
- 300 => 'modules/custom-css/csstidy/cssparse-rtl.min.css',
- 301 => 'modules/custom-css/csstidy/cssparse-rtl.css',
- 302 => 'modules/custom-css/csstidy/cssparse.min.css',
- 303 => 'modules/custom-css/csstidy/cssparsed-rtl.min.css',
- 304 => 'modules/custom-css/csstidy/cssparsed.css',
- 305 => 'modules/custom-css/csstidy/cssparse.css',
- 306 => 'modules/custom-css/csstidy/cssparsed-rtl.css',
- 307 => 'modules/custom-css/csstidy/cssparsed.min.css',
- 308 => 'modules/custom-css/custom-css/css/blank.css',
- 309 => 'modules/custom-css/custom-css/css/css-editor.css',
- 310 => 'modules/custom-css/custom-css/css/use-codemirror.css',
- 311 => 'modules/custom-css/custom-css/css/codemirror.css',
- 312 => 'modules/custom-css/custom-css/css/codemirror-rtl.min.css',
- 313 => 'modules/custom-css/custom-css/css/css-editor-rtl.min.css',
- 314 => 'modules/custom-css/custom-css/css/css-editor-rtl.css',
- 315 => 'modules/custom-css/custom-css/css/customizer-control.css',
- 316 => 'modules/custom-css/custom-css/css/codemirror-rtl.css',
- 317 => 'modules/custom-css/custom-css/css/css-editor.min.css',
- 318 => 'modules/custom-css/custom-css/css/codemirror.min.css',
- 319 => 'modules/custom-css/custom-css/css/rtl/codemirror-rtl.css',
- 320 => 'modules/custom-css/custom-css/css/use-codemirror-rtl.css',
- 321 => 'modules/custom-css/custom-css/css/use-codemirror.min.css',
- 322 => 'modules/custom-css/custom-css/css/use-codemirror-rtl.min.css',
- 323 => 'modules/custom-css/custom-css/js/core-customizer-css.core-4.9.js',
- 324 => 'modules/custom-css/custom-css/js/css-editor.js',
- 325 => 'modules/custom-css/custom-css/js/codemirror.min.js',
- 326 => 'modules/custom-css/custom-css/js/core-customizer-css-preview.js',
- 327 => 'modules/custom-css/custom-css/js/core-customizer-css.js',
- 328 => 'modules/custom-css/custom-css/js/use-codemirror.js',
- 329 => 'modules/sso/jetpack-sso-login.css',
- 330 => 'modules/sso/jetpack-sso-login.js',
- 331 => 'modules/sso/jetpack-sso-login-rtl.css',
- 332 => 'modules/sso/jetpack-sso-login.min.css',
- 333 => 'modules/sso/jetpack-sso-login-rtl.min.css',
- 334 => 'modules/theme-tools/site-logo/css/site-logo-control.css',
- 335 => 'modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css',
- 336 => 'modules/theme-tools/site-logo/css/site-logo-control.min.css',
- 337 => 'modules/theme-tools/site-logo/css/site-logo-control-rtl.css',
- 338 => 'modules/theme-tools/site-logo/js/site-logo.min.js',
- 339 => 'modules/theme-tools/site-logo/js/site-logo.js',
- 340 => 'modules/theme-tools/site-logo/js/site-logo-header-text.js',
- 341 => 'modules/theme-tools/site-logo/js/site-logo-control.js',
- 342 => 'modules/theme-tools/site-logo/js/site-logo-header-text.min.js',
- 343 => 'modules/theme-tools/site-logo/js/site-logo-control.min.js',
- 344 => 'modules/theme-tools/compat/twentysixteen.css',
- 345 => 'modules/theme-tools/compat/twentynineteen.css',
- 346 => 'modules/theme-tools/compat/twentyfourteen-rtl.css',
- 347 => 'modules/theme-tools/compat/twentyfifteen.css',
- 348 => 'modules/theme-tools/compat/twentysixteen-rtl.css',
- 349 => 'modules/theme-tools/compat/twentyfourteen.css',
- 350 => 'modules/theme-tools/compat/twentyfifteen-rtl.css',
- 351 => 'modules/theme-tools/content-options/customizer.js',
- 352 => 'modules/theme-tools/js/suggest.js',
- 353 => 'modules/theme-tools/social-menu/social-menu.css',
- 354 => 'modules/theme-tools/responsive-videos/responsive-videos.css',
- 355 => 'modules/theme-tools/responsive-videos/responsive-videos.js',
- 356 => 'modules/theme-tools/responsive-videos/responsive-videos.min.js',
- 357 => 'modules/post-by-email/post-by-email-rtl.css',
- 358 => 'modules/post-by-email/post-by-email.min.css',
- 359 => 'modules/post-by-email/post-by-email-rtl.min.css',
- 360 => 'modules/post-by-email/post-by-email.css',
- 361 => 'modules/post-by-email/post-by-email.js',
- 362 => 'modules/photon/photon.js',
- 363 => 'modules/widget-visibility/widget-conditions/widget-conditions-rtl.min.css',
- 364 => 'modules/widget-visibility/widget-conditions/widget-conditions-rtl.css',
- 365 => 'modules/widget-visibility/widget-conditions/widget-conditions.min.css',
- 366 => 'modules/widget-visibility/widget-conditions/widget-conditions.css',
- 367 => 'modules/widget-visibility/widget-conditions/rtl/widget-conditions-rtl.css',
- 368 => 'modules/widget-visibility/widget-conditions/widget-conditions.js',
- 369 => 'modules/publicize/assets/publicize-rtl.css',
- 370 => 'modules/publicize/assets/publicize.min.css',
- 371 => 'modules/publicize/assets/publicize.js',
- 372 => 'modules/publicize/assets/publicize.css',
- 373 => 'modules/publicize/assets/rtl/publicize-rtl.css',
- 374 => 'modules/publicize/assets/publicize-rtl.min.css',
- 375 => 'modules/widgets/simple-payments/customizer.css',
- 376 => 'modules/widgets/simple-payments/customizer.js',
- 377 => 'modules/widgets/simple-payments/style.css',
- 378 => 'modules/widgets/twitter-timeline-admin.js',
- 379 => 'modules/widgets/facebook-likebox/style.css',
- 380 => 'modules/widgets/customizer-utils.js',
- 381 => 'modules/widgets/goodreads/css/goodreads.css',
- 382 => 'modules/widgets/goodreads/css/rtl/goodreads-rtl.css',
- 383 => 'modules/widgets/social-media-icons/style.css',
- 384 => 'modules/widgets/my-community/style.css',
- 385 => 'modules/widgets/authors/style.css',
- 386 => 'modules/widgets/social-icons/social-icons-admin.js',
- 387 => 'modules/widgets/social-icons/social-icons-admin.css',
- 388 => 'modules/widgets/social-icons/social-icons.css',
- 389 => 'modules/widgets/eu-cookie-law/eu-cookie-law.js',
- 390 => 'modules/widgets/eu-cookie-law/style.css',
- 391 => 'modules/widgets/eu-cookie-law/eu-cookie-law-admin.js',
- 392 => 'modules/widgets/flickr/style.css',
- 393 => 'modules/widgets/gallery/css/admin-rtl.min.css',
- 394 => 'modules/widgets/gallery/css/admin.css',
- 395 => 'modules/widgets/gallery/css/admin-rtl.css',
- 396 => 'modules/widgets/gallery/css/admin.min.css',
- 397 => 'modules/widgets/gallery/css/rtl/admin-rtl.css',
- 398 => 'modules/widgets/gallery/js/gallery.js',
- 399 => 'modules/widgets/gallery/js/admin.js',
- 400 => 'modules/widgets/top-posts/style.css',
- 401 => 'modules/widgets/milestone/style-admin.css',
- 402 => 'modules/widgets/milestone/milestone.js',
- 403 => 'modules/widgets/milestone/admin.js',
- 404 => 'modules/widgets/search/css/search-widget-frontend.css',
- 405 => 'modules/widgets/search/css/search-widget-admin-ui.css',
- 406 => 'modules/widgets/search/js/search-widget-admin.js',
- 407 => 'modules/widgets/search/js/search-widget.js',
- 408 => 'modules/widgets/google-plus/js/admin.js',
- 409 => 'modules/widgets/contact-info/contact-info-admin.js',
- 410 => 'modules/widgets/contact-info/contact-info-map.css',
- 411 => 'modules/widgets/image-widget/style.css',
- 412 => 'modules/widgets/customizer-controls.css',
- 413 => 'modules/widgets/google-translate/google-translate.js',
- 414 => 'modules/widgets/wordpress-post-widget/style.css',
- 415 => 'modules/widgets/gravatar-profile.css',
- 416 => 'modules/lazy-images/js/lazy-images.js',
- 417 => 'modules/wpgroho.js',
+ 32 => '_inc/blocks/tiled-gallery/view.rtl.css',
+ 33 => '_inc/blocks/tiled-gallery/view.js',
+ 34 => '_inc/blocks/tiled-gallery/view.css',
+ 35 => '_inc/blocks/vendors~swiper.css',
+ 36 => '_inc/blocks/editor.css',
+ 37 => '_inc/blocks/editor.rtl.css',
+ 38 => '_inc/blocks/vendors~map/mapbox-gl.rtl.css',
+ 39 => '_inc/blocks/vendors~map/mapbox-gl.js',
+ 40 => '_inc/blocks/vendors~map/mapbox-gl.css',
+ 41 => '_inc/blocks/vendors~swiper.rtl.css',
+ 42 => '_inc/blocks/repeat-visitor/view.js',
+ 43 => '_inc/blocks/editor-beta.js',
+ 44 => '_inc/blocks/mailchimp/view.rtl.css',
+ 45 => '_inc/blocks/mailchimp/view.js',
+ 46 => '_inc/blocks/mailchimp/view.css',
+ 47 => '_inc/blocks/editor.js',
+ 48 => '_inc/blocks/map/view.rtl.css',
+ 49 => '_inc/blocks/map/view.js',
+ 50 => '_inc/blocks/map/view.css',
+ 51 => '_inc/blocks/vendors~swiper.js',
+ 52 => '_inc/blocks/editor-beta.css',
+ 53 => '_inc/blocks/contact-info/view.rtl.css',
+ 54 => '_inc/blocks/contact-info/view.js',
+ 55 => '_inc/blocks/contact-info/view.css',
+ 56 => '_inc/blocks/slideshow/view.rtl.css',
+ 57 => '_inc/blocks/slideshow/view.js',
+ 58 => '_inc/blocks/slideshow/view.css',
+ 59 => '_inc/blocks/editor-beta.rtl.css',
+ 60 => '_inc/blocks/gif/view.rtl.css',
+ 61 => '_inc/blocks/gif/view.js',
+ 62 => '_inc/blocks/gif/view.css',
+ 63 => '_inc/idc-notice.js',
+ 64 => '_inc/jetpack-modules.js',
+ 65 => '_inc/jquery.jetpack-resize.js',
+ 66 => '_inc/genericons/genericons/genericons.css',
+ 67 => '_inc/genericons/genericons/rtl/genericons-rtl.css',
+ 68 => '_inc/genericons/genericons.css',
+ 69 => '_inc/jetpack-modules.views.js',
+ 70 => '_inc/jquery.spin.js',
+ 71 => '_inc/facebook-embed.js',
+ 72 => '_inc/twitter-timeline.js',
+ 73 => '_inc/spin.js',
+ 74 => '_inc/accessible-focus.js',
+ 75 => '_inc/jetpack-jitm.js',
+ 76 => '_inc/jetpack-modules.models.js',
+ 77 => '_inc/social-logos/social-logos.min.css',
+ 78 => '_inc/social-logos/social-logos.css',
+ 79 => '_inc/gallery-settings.js',
+ 80 => '_inc/lib/tracks/tracks-callables.js',
+ 81 => '_inc/lib/tracks/tracks-ajax.js',
+ 82 => '_inc/build/infinite-scroll/infinity.min.js',
+ 83 => '_inc/build/videopress/js/videopress-plupload.min.js',
+ 84 => '_inc/build/videopress/js/videopress-uploader.min.js',
+ 85 => '_inc/build/videopress/js/media-video-widget-extensions.min.js',
+ 86 => '_inc/build/videopress/js/editor-view.min.js',
+ 87 => '_inc/build/tiled-gallery/tiled-gallery/tiled-gallery.min.js',
+ 88 => '_inc/build/jetpack-connection-banner.min.js',
+ 89 => '_inc/build/style.min.css',
+ 90 => '_inc/build/masterbar/tracks-events.min.js',
+ 91 => '_inc/build/sharedaddy/admin-sharing.min.js',
+ 92 => '_inc/build/sharedaddy/sharing.min.js',
+ 93 => '_inc/build/jquery.spin.min.js',
+ 94 => '_inc/build/custom-post-types/comics/comics.min.js',
+ 95 => '_inc/build/custom-post-types/js/nova-drag-drop.min.js',
+ 96 => '_inc/build/custom-post-types/js/many-items.min.js',
+ 97 => '_inc/build/custom-post-types/js/menu-checkboxes.min.js',
+ 98 => '_inc/build/jquery.jetpack-resize.min.js',
+ 99 => '_inc/build/likes/post-count-jetpack.min.js',
+ 100 => '_inc/build/likes/queuehandler.min.js',
+ 101 => '_inc/build/likes/post-count.min.js',
+ 102 => '_inc/build/admin.dops-style.css',
+ 103 => '_inc/build/after-the-deadline/tinymce/editor_plugin.min.js',
+ 104 => '_inc/build/after-the-deadline/tinymce/plugin.min.js',
+ 105 => '_inc/build/after-the-deadline/atd-nonvis-editor-plugin.min.js',
+ 106 => '_inc/build/after-the-deadline/jquery.atd.min.js',
+ 107 => '_inc/build/after-the-deadline/atd.core.min.js',
+ 108 => '_inc/build/after-the-deadline/atd-autoproofread.min.js',
+ 109 => '_inc/build/comment-likes/comment-like-count.min.js',
+ 110 => '_inc/build/idc-notice.min.js',
+ 111 => '_inc/build/accessible-focus.min.js',
+ 112 => '_inc/build/contact-form/js/grunion.min.js',
+ 113 => '_inc/build/contact-form/js/tinymce-plugin-form-button.min.js',
+ 114 => '_inc/build/contact-form/js/grunion-admin.min.js',
+ 115 => '_inc/build/contact-form/js/grunion-frontend.min.js',
+ 116 => '_inc/build/contact-form/js/editor-view.min.js',
+ 117 => '_inc/build/jetpack-modules.models.min.js',
+ 118 => '_inc/build/related-posts/related-posts.min.js',
+ 119 => '_inc/build/related-posts/related-posts-customizer.min.js',
+ 120 => '_inc/build/carousel/jetpack-carousel.min.js',
+ 121 => '_inc/build/shortcodes/js/brightcove.min.js',
+ 122 => '_inc/build/shortcodes/js/gist.min.js',
+ 123 => '_inc/build/shortcodes/js/recipes-printthis.min.js',
+ 124 => '_inc/build/shortcodes/js/main.min.js',
+ 125 => '_inc/build/shortcodes/js/recipes.min.js',
+ 126 => '_inc/build/shortcodes/js/jmpress.min.js',
+ 127 => '_inc/build/shortcodes/js/instagram.min.js',
+ 128 => '_inc/build/shortcodes/js/slideshow-shortcode.min.js',
+ 129 => '_inc/build/shortcodes/js/quiz.min.js',
+ 130 => '_inc/build/minileven/theme/pub/minileven/js/small-menu.min.js',
+ 131 => '_inc/build/custom-css/custom-css/js/core-customizer-css-preview.min.js',
+ 132 => '_inc/build/custom-css/custom-css/js/core-customizer-css.core-4.9.min.js',
+ 133 => '_inc/build/custom-css/custom-css/js/use-codemirror.min.js',
+ 134 => '_inc/build/custom-css/custom-css/js/core-customizer-css.min.js',
+ 135 => '_inc/build/custom-css/custom-css/js/css-editor.min.js',
+ 136 => '_inc/build/jetpack-jitm.min.js',
+ 137 => '_inc/build/gallery-settings.min.js',
+ 138 => '_inc/build/spin.min.js',
+ 139 => '_inc/build/jetpack-admin.min.js',
+ 140 => '_inc/build/admin.js',
+ 141 => '_inc/build/twitter-timeline.min.js',
+ 142 => '_inc/build/jetpack-modules.views.min.js',
+ 143 => '_inc/build/photon/photon.min.js',
+ 144 => '_inc/build/style.min.rtl.css',
+ 145 => '_inc/build/jetpack-modules.min.js',
+ 146 => '_inc/build/postmessage.min.js',
+ 147 => '_inc/build/widget-visibility/widget-conditions/widget-conditions.min.js',
+ 148 => '_inc/build/facebook-embed.min.js',
+ 149 => '_inc/build/widgets/simple-payments/customizer.min.js',
+ 150 => '_inc/build/widgets/social-icons/social-icons-admin.min.js',
+ 151 => '_inc/build/widgets/eu-cookie-law/eu-cookie-law.min.js',
+ 152 => '_inc/build/widgets/eu-cookie-law/eu-cookie-law-admin.min.js',
+ 153 => '_inc/build/widgets/gallery/js/gallery.min.js',
+ 154 => '_inc/build/widgets/gallery/js/admin.min.js',
+ 155 => '_inc/build/widgets/milestone/milestone.min.js',
+ 156 => '_inc/build/widgets/milestone/admin.min.js',
+ 157 => '_inc/build/widgets/search/js/search-widget.min.js',
+ 158 => '_inc/build/widgets/search/js/search-widget-admin.min.js',
+ 159 => '_inc/build/widgets/customizer-utils.min.js',
+ 160 => '_inc/build/widgets/contact-info/contact-info-admin.min.js',
+ 161 => '_inc/build/widgets/twitter-timeline-admin.min.js',
+ 162 => '_inc/build/widgets/google-translate/google-translate.min.js',
+ 163 => '_inc/build/lazy-images/js/lazy-images.min.js',
+ 164 => '_inc/build/admin.dops-style.rtl.css',
+ 165 => '_inc/jetpack-admin.js',
+ 166 => '_inc/jetpack-connection-banner.js',
+ 167 => '_inc/postmessage.js',
+ 168 => 'modules/infinite-scroll/infinity.js',
+ 169 => 'modules/infinite-scroll/infinity.css',
+ 170 => 'modules/infinite-scroll/themes/twentysixteen.css',
+ 171 => 'modules/infinite-scroll/themes/twentyeleven.css',
+ 172 => 'modules/infinite-scroll/themes/twentyten.css',
+ 173 => 'modules/infinite-scroll/themes/twentyseventeen-rtl.css',
+ 174 => 'modules/infinite-scroll/themes/twentyfifteen.css',
+ 175 => 'modules/infinite-scroll/themes/twentysixteen-rtl.css',
+ 176 => 'modules/infinite-scroll/themes/twentyseventeen.css',
+ 177 => 'modules/infinite-scroll/themes/twentytwelve.css',
+ 178 => 'modules/infinite-scroll/themes/twentyfourteen.css',
+ 179 => 'modules/infinite-scroll/themes/twentyfifteen-rtl.css',
+ 180 => 'modules/infinite-scroll/themes/twentythirteen.css',
+ 181 => 'modules/videopress/css/videopress-editor-style-rtl.css',
+ 182 => 'modules/videopress/css/videopress-editor-style.min.css',
+ 183 => 'modules/videopress/css/editor.css',
+ 184 => 'modules/videopress/css/videopress-editor-style-rtl.min.css',
+ 185 => 'modules/videopress/css/editor.min.css',
+ 186 => 'modules/videopress/css/editor-rtl.css',
+ 187 => 'modules/videopress/css/editor-rtl.min.css',
+ 188 => 'modules/videopress/css/videopress-editor-style.css',
+ 189 => 'modules/videopress/js/media-video-widget-extensions.js',
+ 190 => 'modules/videopress/js/videopress-plupload.js',
+ 191 => 'modules/videopress/js/videopress-uploader.js',
+ 192 => 'modules/videopress/js/editor-view.js',
+ 193 => 'modules/videopress/videopress-admin.css',
+ 194 => 'modules/videopress/videopress-admin.min.css',
+ 195 => 'modules/videopress/videopress-admin-rtl.css',
+ 196 => 'modules/videopress/videopress-admin-rtl.min.css',
+ 197 => 'modules/tiled-gallery/tiled-gallery/tiled-gallery-rtl.css',
+ 198 => 'modules/tiled-gallery/tiled-gallery/tiled-gallery.css',
+ 199 => 'modules/tiled-gallery/tiled-gallery/rtl/tiled-gallery-rtl.css',
+ 200 => 'modules/tiled-gallery/tiled-gallery/tiled-gallery.js',
+ 201 => 'modules/simple-payments/simple-payments.css',
+ 202 => 'modules/simple-payments/paypal-express-checkout.js',
+ 203 => 'modules/masterbar/overrides.css',
+ 204 => 'modules/masterbar/tracks-events.js',
+ 205 => 'modules/sharedaddy/admin-sharing-rtl.min.css',
+ 206 => 'modules/sharedaddy/sharing.js',
+ 207 => 'modules/sharedaddy/sharing.css',
+ 208 => 'modules/sharedaddy/admin-sharing.js',
+ 209 => 'modules/sharedaddy/admin-sharing.min.css',
+ 210 => 'modules/sharedaddy/admin-sharing-rtl.css',
+ 211 => 'modules/sharedaddy/admin-sharing.css',
+ 212 => 'modules/custom-post-types/comics/comics.min.css',
+ 213 => 'modules/custom-post-types/comics/comics-rtl.css',
+ 214 => 'modules/custom-post-types/comics/comics.css',
+ 215 => 'modules/custom-post-types/comics/comics-rtl.min.css',
+ 216 => 'modules/custom-post-types/comics/comics.js',
+ 217 => 'modules/custom-post-types/comics/admin.css',
+ 218 => 'modules/custom-post-types/comics/rtl/comics-rtl.css',
+ 219 => 'modules/custom-post-types/css/portfolio-shortcode.css',
+ 220 => 'modules/custom-post-types/css/testimonial-shortcode.css',
+ 221 => 'modules/custom-post-types/css/nova-font.css',
+ 222 => 'modules/custom-post-types/css/edit-items.css',
+ 223 => 'modules/custom-post-types/css/nova.css',
+ 224 => 'modules/custom-post-types/css/many-items.css',
+ 225 => 'modules/custom-post-types/js/menu-checkboxes.js',
+ 226 => 'modules/custom-post-types/js/many-items.js',
+ 227 => 'modules/custom-post-types/js/nova-drag-drop.js',
+ 228 => 'modules/calypsoify/style-gutenberg-rtl.min.css',
+ 229 => 'modules/calypsoify/style-rtl.min.css',
+ 230 => 'modules/calypsoify/style.min.css',
+ 231 => 'modules/calypsoify/style-gutenberg.min.css',
+ 232 => 'modules/calypsoify/mods-gutenberg.js',
+ 233 => 'modules/calypsoify/mods.js',
+ 234 => 'modules/likes/post-count.js',
+ 235 => 'modules/likes/post-count-jetpack.js',
+ 236 => 'modules/likes/style.css',
+ 237 => 'modules/likes/queuehandler.js',
+ 238 => 'modules/protect/protect-dashboard-widget-rtl.min.css',
+ 239 => 'modules/protect/protect-dashboard-widget.css',
+ 240 => 'modules/protect/protect-dashboard-widget.min.css',
+ 241 => 'modules/protect/protect-dashboard-widget-rtl.css',
+ 242 => 'modules/after-the-deadline/jquery.atd.js',
+ 243 => 'modules/after-the-deadline/tinymce/css/content-rtl.min.css',
+ 244 => 'modules/after-the-deadline/tinymce/css/content.css',
+ 245 => 'modules/after-the-deadline/tinymce/css/content-rtl.css',
+ 246 => 'modules/after-the-deadline/tinymce/css/content.min.css',
+ 247 => 'modules/after-the-deadline/tinymce/editor_plugin.js',
+ 248 => 'modules/after-the-deadline/tinymce/plugin.js',
+ 249 => 'modules/after-the-deadline/atd-rtl.css',
+ 250 => 'modules/after-the-deadline/atd.min.css',
+ 251 => 'modules/after-the-deadline/atd.core.js',
+ 252 => 'modules/after-the-deadline/atd-rtl.min.css',
+ 253 => 'modules/after-the-deadline/rtl/atd-rtl.css',
+ 254 => 'modules/after-the-deadline/atd-autoproofread.js',
+ 255 => 'modules/after-the-deadline/atd-nonvis-editor-plugin.js',
+ 256 => 'modules/after-the-deadline/atd.css',
+ 257 => 'modules/comment-likes/comment-like-count.js',
+ 258 => 'modules/comment-likes/admin-style.css',
+ 259 => 'modules/contact-form/css/editor-ui.min.css',
+ 260 => 'modules/contact-form/css/editor-ui-rtl.css',
+ 261 => 'modules/contact-form/css/editor-inline-editing-style.css',
+ 262 => 'modules/contact-form/css/editor-inline-editing-style-rtl.css',
+ 263 => 'modules/contact-form/css/editor-inline-editing-style.min.css',
+ 264 => 'modules/contact-form/css/editor-style-rtl.min.css',
+ 265 => 'modules/contact-form/css/jquery-ui-datepicker.css',
+ 266 => 'modules/contact-form/css/grunion.css',
+ 267 => 'modules/contact-form/css/editor-ui.css',
+ 268 => 'modules/contact-form/css/editor-style.css',
+ 269 => 'modules/contact-form/css/editor-style-rtl.css',
+ 270 => 'modules/contact-form/css/editor-inline-editing-style-rtl.min.css',
+ 271 => 'modules/contact-form/css/editor-style.min.css',
+ 272 => 'modules/contact-form/css/grunion-rtl.css',
+ 273 => 'modules/contact-form/css/editor-ui-rtl.min.css',
+ 274 => 'modules/contact-form/js/grunion.js',
+ 275 => 'modules/contact-form/js/grunion-admin.js',
+ 276 => 'modules/contact-form/js/editor-view.js',
+ 277 => 'modules/contact-form/js/grunion-frontend.js',
+ 278 => 'modules/contact-form/js/tinymce-plugin-form-button.js',
+ 279 => 'modules/related-posts/related-posts.css',
+ 280 => 'modules/related-posts/related-posts.js',
+ 281 => 'modules/related-posts/related-posts-rtl.css',
+ 282 => 'modules/related-posts/rtl/related-posts-rtl.css',
+ 283 => 'modules/related-posts/related-posts-customizer.js',
+ 284 => 'modules/carousel/jetpack-carousel.js',
+ 285 => 'modules/carousel/rtl/jetpack-carousel-rtl.css',
+ 286 => 'modules/carousel/jetpack-carousel.css',
+ 287 => 'modules/carousel/jetpack-carousel-rtl.css',
+ 288 => 'modules/shortcodes/css/recipes.css',
+ 289 => 'modules/shortcodes/css/slideshow-shortcode.min.css',
+ 290 => 'modules/shortcodes/css/slideshow-shortcode-rtl.css',
+ 291 => 'modules/shortcodes/css/recipes-print.min.css',
+ 292 => 'modules/shortcodes/css/recipes-rtl.css',
+ 293 => 'modules/shortcodes/css/recipes.min.css',
+ 294 => 'modules/shortcodes/css/recipes-print-rtl.css',
+ 295 => 'modules/shortcodes/css/recipes-print.css',
+ 296 => 'modules/shortcodes/css/slideshow-shortcode-rtl.min.css',
+ 297 => 'modules/shortcodes/css/recipes-rtl.min.css',
+ 298 => 'modules/shortcodes/css/recipes-print-rtl.min.css',
+ 299 => 'modules/shortcodes/css/style.css',
+ 300 => 'modules/shortcodes/css/quiz.css',
+ 301 => 'modules/shortcodes/css/slideshow-shortcode.css',
+ 302 => 'modules/shortcodes/js/brightcove.js',
+ 303 => 'modules/shortcodes/js/quiz.js',
+ 304 => 'modules/shortcodes/js/recipes-printthis.js',
+ 305 => 'modules/shortcodes/js/jmpress.js',
+ 306 => 'modules/shortcodes/js/slideshow-shortcode.js',
+ 307 => 'modules/shortcodes/js/main.js',
+ 308 => 'modules/shortcodes/js/jquery.cycle.min.js',
+ 309 => 'modules/shortcodes/js/instagram.js',
+ 310 => 'modules/shortcodes/js/recipes.js',
+ 311 => 'modules/shortcodes/js/gist.js',
+ 312 => 'modules/subscriptions/subscriptions.css',
+ 313 => 'modules/minileven/theme/pub/minileven/js/small-menu.js',
+ 314 => 'modules/minileven/theme/pub/minileven/style.css',
+ 315 => 'modules/minileven/theme/pub/minileven/rtl.css',
+ 316 => 'modules/wordads/css/style.css',
+ 317 => 'modules/custom-css/csstidy/cssparse-rtl.min.css',
+ 318 => 'modules/custom-css/csstidy/cssparse-rtl.css',
+ 319 => 'modules/custom-css/csstidy/cssparse.min.css',
+ 320 => 'modules/custom-css/csstidy/cssparsed-rtl.min.css',
+ 321 => 'modules/custom-css/csstidy/cssparsed.css',
+ 322 => 'modules/custom-css/csstidy/cssparse.css',
+ 323 => 'modules/custom-css/csstidy/cssparsed-rtl.css',
+ 324 => 'modules/custom-css/csstidy/cssparsed.min.css',
+ 325 => 'modules/custom-css/custom-css/css/blank.css',
+ 326 => 'modules/custom-css/custom-css/css/css-editor.css',
+ 327 => 'modules/custom-css/custom-css/css/use-codemirror.css',
+ 328 => 'modules/custom-css/custom-css/css/codemirror.css',
+ 329 => 'modules/custom-css/custom-css/css/codemirror-rtl.min.css',
+ 330 => 'modules/custom-css/custom-css/css/css-editor-rtl.min.css',
+ 331 => 'modules/custom-css/custom-css/css/css-editor-rtl.css',
+ 332 => 'modules/custom-css/custom-css/css/customizer-control.css',
+ 333 => 'modules/custom-css/custom-css/css/codemirror-rtl.css',
+ 334 => 'modules/custom-css/custom-css/css/css-editor.min.css',
+ 335 => 'modules/custom-css/custom-css/css/codemirror.min.css',
+ 336 => 'modules/custom-css/custom-css/css/rtl/codemirror-rtl.css',
+ 337 => 'modules/custom-css/custom-css/css/use-codemirror-rtl.css',
+ 338 => 'modules/custom-css/custom-css/css/use-codemirror.min.css',
+ 339 => 'modules/custom-css/custom-css/css/use-codemirror-rtl.min.css',
+ 340 => 'modules/custom-css/custom-css/js/core-customizer-css.core-4.9.js',
+ 341 => 'modules/custom-css/custom-css/js/css-editor.js',
+ 342 => 'modules/custom-css/custom-css/js/codemirror.min.js',
+ 343 => 'modules/custom-css/custom-css/js/core-customizer-css-preview.js',
+ 344 => 'modules/custom-css/custom-css/js/core-customizer-css.js',
+ 345 => 'modules/custom-css/custom-css/js/use-codemirror.js',
+ 346 => 'modules/sso/jetpack-sso-login.css',
+ 347 => 'modules/sso/jetpack-sso-login.js',
+ 348 => 'modules/sso/jetpack-sso-login-rtl.css',
+ 349 => 'modules/sso/jetpack-sso-login.min.css',
+ 350 => 'modules/sso/jetpack-sso-login-rtl.min.css',
+ 351 => 'modules/theme-tools/site-logo/css/site-logo-control.css',
+ 352 => 'modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css',
+ 353 => 'modules/theme-tools/site-logo/css/site-logo-control.min.css',
+ 354 => 'modules/theme-tools/site-logo/css/site-logo-control-rtl.css',
+ 355 => 'modules/theme-tools/site-logo/js/site-logo.min.js',
+ 356 => 'modules/theme-tools/site-logo/js/site-logo.js',
+ 357 => 'modules/theme-tools/site-logo/js/site-logo-header-text.js',
+ 358 => 'modules/theme-tools/site-logo/js/site-logo-control.js',
+ 359 => 'modules/theme-tools/site-logo/js/site-logo-header-text.min.js',
+ 360 => 'modules/theme-tools/site-logo/js/site-logo-control.min.js',
+ 361 => 'modules/theme-tools/compat/twentysixteen.css',
+ 362 => 'modules/theme-tools/compat/twentynineteen.css',
+ 363 => 'modules/theme-tools/compat/twentyfourteen-rtl.css',
+ 364 => 'modules/theme-tools/compat/twentyfifteen.css',
+ 365 => 'modules/theme-tools/compat/twentysixteen-rtl.css',
+ 366 => 'modules/theme-tools/compat/twentynineteen-rtl.css',
+ 367 => 'modules/theme-tools/compat/twentyfourteen.css',
+ 368 => 'modules/theme-tools/compat/twentyfifteen-rtl.css',
+ 369 => 'modules/theme-tools/content-options/customizer.js',
+ 370 => 'modules/theme-tools/js/suggest.js',
+ 371 => 'modules/theme-tools/social-menu/social-menu.css',
+ 372 => 'modules/theme-tools/responsive-videos/responsive-videos.css',
+ 373 => 'modules/theme-tools/responsive-videos/responsive-videos.js',
+ 374 => 'modules/theme-tools/responsive-videos/responsive-videos.min.js',
+ 375 => 'modules/post-by-email/post-by-email-rtl.css',
+ 376 => 'modules/post-by-email/post-by-email.min.css',
+ 377 => 'modules/post-by-email/post-by-email-rtl.min.css',
+ 378 => 'modules/post-by-email/post-by-email.css',
+ 379 => 'modules/post-by-email/post-by-email.js',
+ 380 => 'modules/photon/photon.js',
+ 381 => 'modules/plugin-search/plugin-search.css',
+ 382 => 'modules/plugin-search/plugin-search.js',
+ 383 => 'modules/widget-visibility/widget-conditions/widget-conditions-rtl.min.css',
+ 384 => 'modules/widget-visibility/widget-conditions/widget-conditions-rtl.css',
+ 385 => 'modules/widget-visibility/widget-conditions/widget-conditions.min.css',
+ 386 => 'modules/widget-visibility/widget-conditions/widget-conditions.css',
+ 387 => 'modules/widget-visibility/widget-conditions/rtl/widget-conditions-rtl.css',
+ 388 => 'modules/widget-visibility/widget-conditions/widget-conditions.js',
+ 389 => 'modules/widgets/simple-payments/customizer.css',
+ 390 => 'modules/widgets/simple-payments/customizer.js',
+ 391 => 'modules/widgets/simple-payments/style.css',
+ 392 => 'modules/widgets/twitter-timeline-admin.js',
+ 393 => 'modules/widgets/facebook-likebox/style.css',
+ 394 => 'modules/widgets/customizer-utils.js',
+ 395 => 'modules/widgets/goodreads/css/goodreads.css',
+ 396 => 'modules/widgets/goodreads/css/rtl/goodreads-rtl.css',
+ 397 => 'modules/widgets/social-media-icons/style.css',
+ 398 => 'modules/widgets/my-community/style.css',
+ 399 => 'modules/widgets/authors/style.css',
+ 400 => 'modules/widgets/social-icons/social-icons-admin.js',
+ 401 => 'modules/widgets/social-icons/social-icons-admin.css',
+ 402 => 'modules/widgets/social-icons/social-icons.css',
+ 403 => 'modules/widgets/eu-cookie-law/eu-cookie-law.js',
+ 404 => 'modules/widgets/eu-cookie-law/style.css',
+ 405 => 'modules/widgets/eu-cookie-law/eu-cookie-law-admin.js',
+ 406 => 'modules/widgets/flickr/style.css',
+ 407 => 'modules/widgets/gallery/css/admin-rtl.min.css',
+ 408 => 'modules/widgets/gallery/css/admin.css',
+ 409 => 'modules/widgets/gallery/css/admin-rtl.css',
+ 410 => 'modules/widgets/gallery/css/admin.min.css',
+ 411 => 'modules/widgets/gallery/css/rtl/admin-rtl.css',
+ 412 => 'modules/widgets/gallery/js/gallery.js',
+ 413 => 'modules/widgets/gallery/js/admin.js',
+ 414 => 'modules/widgets/top-posts/style.css',
+ 415 => 'modules/widgets/milestone/style-admin.css',
+ 416 => 'modules/widgets/milestone/milestone.js',
+ 417 => 'modules/widgets/milestone/admin.js',
+ 418 => 'modules/widgets/search/css/search-widget-frontend.css',
+ 419 => 'modules/widgets/search/css/search-widget-admin-ui.css',
+ 420 => 'modules/widgets/search/js/search-widget-admin.js',
+ 421 => 'modules/widgets/search/js/search-widget.js',
+ 422 => 'modules/widgets/contact-info/contact-info-admin.js',
+ 423 => 'modules/widgets/contact-info/contact-info-map.css',
+ 424 => 'modules/widgets/image-widget/style.css',
+ 425 => 'modules/widgets/customizer-controls.css',
+ 426 => 'modules/widgets/google-translate/google-translate.js',
+ 427 => 'modules/widgets/wordpress-post-widget/style.css',
+ 428 => 'modules/widgets/gravatar-profile.css',
+ 429 => 'modules/lazy-images/js/lazy-images.js',
+ 430 => 'modules/wpgroho.js',
);
diff --git a/plugins/jetpack/modules/photon.php b/plugins/jetpack/modules/photon.php
index 628f57c5..cd61ee70 100644
--- a/plugins/jetpack/modules/photon.php
+++ b/plugins/jetpack/modules/photon.php
@@ -1,7 +1,7 @@
<?php
/**
- * Module Name: Photon
- * Module Description: Serve images from our servers
+ * Module Name: Image CDN
+ * Module 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.
* 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
@@ -10,7 +10,7 @@
* Auto Activate: No
* Module Tags: Photos and Videos, Appearance, Recommended
* Feature: Recommended, Jumpstart, Appearance
- * Additional Search Queries: photon, image, cdn, performance, speed
+ * Additional Search Queries: photon, photo cdn, image cdn, speed, compression, resize, responsive images, responsive, content distribution network, optimize, page speed, image optimize, photon jetpack
*/
Jetpack::dns_prefetch( array(
diff --git a/plugins/jetpack/modules/plugin-search.php b/plugins/jetpack/modules/plugin-search.php
new file mode 100644
index 00000000..0536d37b
--- /dev/null
+++ b/plugins/jetpack/modules/plugin-search.php
@@ -0,0 +1,602 @@
+<?php
+/**
+ * Disable direct access and execution.
+ */
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+
+if (
+ is_admin() &&
+ Jetpack::is_active() &&
+ /** This filter is documented in _inc/lib/admin-pages/class.jetpack-react-page.php */
+ apply_filters( 'jetpack_show_promotions', true ) &&
+ jetpack_is_psh_active()
+) {
+ Jetpack_Plugin_Search::init();
+}
+
+// Register endpoints when WP REST API is initialized.
+add_action( 'rest_api_init', array( 'Jetpack_Plugin_Search', 'register_endpoints' ) );
+
+/**
+ * Class that includes cards in the plugin search results when users enter terms that match some Jetpack feature.
+ * Card can be dismissed and includes a title, description, button to enable the feature and a link for more information.
+ *
+ * @since 7.1.0
+ */
+class Jetpack_Plugin_Search {
+
+ static $slug = 'jetpack-plugin-search';
+
+ public static function init() {
+ static $instance = null;
+
+ if ( ! $instance ) {
+ jetpack_require_lib( 'tracks/client' );
+ $instance = new Jetpack_Plugin_Search();
+ }
+
+ return $instance;
+ }
+
+ public function __construct() {
+ add_action( 'current_screen', array( $this, 'start' ) );
+ }
+
+ /**
+ * Add actions and filters only if this is the plugin installation screen and it's the first page.
+ *
+ * @param object $screen
+ *
+ * @since 7.1.0
+ */
+ public function start( $screen ) {
+ if ( 'plugin-install' === $screen->base && ( ! isset( $_GET['paged'] ) || 1 == $_GET['paged'] ) ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'load_plugins_search_script' ) );
+ add_filter( 'plugins_api_result', array( $this, 'inject_jetpack_module_suggestion' ), 10, 3 );
+ add_filter( 'self_admin_url', array( $this, 'plugin_details' ) );
+ add_filter( 'plugin_install_action_links', array( $this, 'insert_module_related_links' ), 10, 2 );
+ }
+ }
+
+ /**
+ * Modify URL used to fetch to plugin information so it pulls Jetpack plugin page.
+ *
+ * @param string $url URL to load in dialog pulling the plugin page from wporg.
+ *
+ * @since 7.1.0
+ *
+ * @return string The URL with 'jetpack' instead of 'jetpack-plugin-search'.
+ */
+ public function plugin_details( $url ) {
+ return false !== stripos( $url, 'tab=plugin-information&amp;plugin=' . self::$slug )
+ ? 'plugin-install.php?tab=plugin-information&amp;plugin=jetpack&amp;TB_iframe=true&amp;width=600&amp;height=550'
+ : $url;
+ }
+
+ /**
+ * Register REST API endpoints.
+ *
+ * @since 7.1.0
+ */
+ public static function register_endpoints() {
+ register_rest_route( 'jetpack/v4', '/hints', array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => __CLASS__ . '::dismiss',
+ 'permission_callback' => __CLASS__ . '::can_request',
+ 'args' => array(
+ 'hint' => array(
+ 'default' => '',
+ 'type' => 'string',
+ 'required' => true,
+ 'validate_callback' => __CLASS__ . '::is_hint_id',
+ ),
+ )
+ ) );
+ }
+
+ /**
+ * A WordPress REST API permission callback method that accepts a request object and
+ * decides if the current user has enough privileges to act.
+ *
+ * @since 7.1.0
+ *
+ * @return bool does a current user have enough privileges.
+ */
+ public static function can_request() {
+ return current_user_can( 'jetpack_admin_page' );
+ }
+
+ /**
+ * Validates that the ID of the hint to dismiss is a string.
+ *
+ * @since 7.1.0
+ *
+ * @param string|bool $value Value to check.
+ * @param WP_REST_Request $request The request sent to the WP REST API.
+ * @param string $param Name of the parameter passed to endpoint holding $value.
+ *
+ * @return bool|WP_Error
+ */
+ public static function is_hint_id( $value, $request, $param ) {
+ return in_array( $value, Jetpack::get_available_modules(), true )
+ ? true
+ : new WP_Error( 'invalid_param', sprintf( esc_html__( '%s must be an alphanumeric string.', 'jetpack' ), $param ) );
+ }
+
+ /**
+ * A WordPress REST API callback method that accepts a request object and decides what to do with it.
+ *
+ * @param WP_REST_Request $request {
+ * Array of parameters received by request.
+ *
+ * @type string $hint Slug of card to dismiss.
+ * }
+ *
+ * @since 7.1.0
+ *
+ * @return bool|array|WP_Error a resulting value or object, or an error.
+ */
+ public static function dismiss( WP_REST_Request $request ) {
+ return self::add_to_dismissed_hints( $request['hint'] )
+ ? rest_ensure_response( array( 'code' => 'success' ) )
+ : new WP_Error( 'not_dismissed', esc_html__( 'The card could not be dismissed', 'jetpack' ), array( 'status' => 400 ) );
+ }
+
+ /**
+ * Returns a list of previously dismissed hints.
+ *
+ * @since 7.1.0
+ *
+ * @return array List of dismissed hints.
+ */
+ protected static function get_dismissed_hints() {
+ $dismissed_hints = Jetpack_Options::get_option( 'dismissed_hints' );
+ return isset( $dismissed_hints ) && is_array( $dismissed_hints )
+ ? $dismissed_hints
+ : array();
+ }
+
+ /**
+ * Save the hint in the list of dismissed hints.
+ *
+ * @since 7.1.0
+ *
+ * @param string $hint The hint id, which is a Jetpack module slug.
+ *
+ * @return bool Whether the card was added to the list and hence dismissed.
+ */
+ protected static function add_to_dismissed_hints( $hint ) {
+ return Jetpack_Options::update_option( 'dismissed_hints', array_merge( self::get_dismissed_hints(), array( $hint ) ) );
+ }
+
+ /**
+ * Checks that the module slug passed should be displayed.
+ *
+ * A feature hint will be displayed if it has not been dismissed before or if 2 or fewer other hints have been dismissed.
+ *
+ * @since 7.2.1
+ *
+ * @param string $hint The hint id, which is a Jetpack module slug.
+ *
+ * @return bool True if $hint should be displayed.
+ */
+ protected function should_display_hint( $hint ) {
+ $dismissed_hints = $this->get_dismissed_hints();
+ // If more than 2 hints have been dismissed, then show no more.
+ if ( 2 < count( $dismissed_hints ) ) {
+ return false;
+ }
+
+ $plan = Jetpack_Plan::get();
+ if ( isset( $plan['class'] ) && ( 'free' === $plan['class'] || 'personal' === $plan['class'] ) && 'vaultpress' === $hint ) {
+ return false;
+ }
+
+ return ! in_array( $hint, $dismissed_hints, true );
+ }
+
+ public function load_plugins_search_script() {
+ wp_enqueue_script( self::$slug, plugins_url( 'modules/plugin-search/plugin-search.js', JETPACK__PLUGIN_FILE ), array( 'jquery' ), JETPACK__VERSION, true );
+ wp_localize_script(
+ self::$slug,
+ 'jetpackPluginSearch',
+ array(
+ 'nonce' => wp_create_nonce( 'wp_rest' ),
+ 'base_rest_url' => rest_url( '/jetpack/v4' ),
+ 'poweredBy' => esc_html__( 'by Jetpack (installed)', 'jetpack' ),
+ 'manageSettings' => esc_html__( 'Configure', 'jetpack' ),
+ 'activateModule' => esc_html__( 'Activate Module', 'jetpack' ),
+ 'getStarted' => esc_html__( 'Get started', 'jetpack' ),
+ 'activated' => esc_html__( 'Activated', 'jetpack' ),
+ 'activating' => esc_html__( 'Activating', 'jetpack' ),
+ 'logo' => 'https://ps.w.org/jetpack/assets/icon.svg?rev=1791404',
+ 'legend' => esc_html__(
+ 'This suggestion was made by Jetpack, the security and performance plugin already installed on your site.',
+ 'jetpack'
+ ),
+ 'supportText' => esc_html__(
+ 'Learn more about these suggestions.',
+ 'jetpack'
+ ),
+ 'supportLink' => 'https://jetpack.com/redirect/?source=plugin-hint-learn-support',
+ 'hideText' => esc_html__( 'Hide this suggestion', 'jetpack' ),
+ )
+ );
+
+ wp_enqueue_style( self::$slug, plugins_url( 'modules/plugin-search/plugin-search.css', JETPACK__PLUGIN_FILE ) );
+ }
+
+ /**
+ * Get the plugin repo's data for Jetpack to populate the fields with.
+ *
+ * @return array|mixed|object|WP_Error
+ */
+ public static function get_jetpack_plugin_data() {
+ $data = get_transient( 'jetpack_plugin_data' );
+
+ if ( false === $data || is_wp_error( $data ) ) {
+ include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
+ $data = plugins_api( 'plugin_information', array(
+ 'slug' => 'jetpack',
+ 'is_ssl' => is_ssl(),
+ 'fields' => array(
+ 'banners' => true,
+ 'reviews' => true,
+ 'active_installs' => true,
+ 'versions' => false,
+ 'sections' => false,
+ ),
+ ) );
+ set_transient( 'jetpack_plugin_data', $data, DAY_IN_SECONDS );
+ }
+
+ return $data;
+ }
+
+ /**
+ * Create a list with additional features for those we don't have a module, like Akismet.
+ *
+ * @since 7.1.0
+ *
+ * @return array List of features.
+ */
+ public function get_extra_features() {
+ return array(
+ 'akismet' => array(
+ 'name' => 'Akismet',
+ 'search_terms' => 'akismet, anti-spam, antispam, comments, spam, spam protection, form spam, captcha, no captcha, nocaptcha, recaptcha, phising, google',
+ 'short_description' => esc_html__( 'Keep your visitors and search engines happy by stopping comment and contact form spam with Akismet.', 'jetpack' ),
+ 'requires_connection' => true,
+ 'module' => 'akismet',
+ 'sort' => '16',
+ 'learn_more_button' => 'https://jetpack.com/features/security/spam-filtering/',
+ 'configure_url' => admin_url( 'admin.php?page=akismet-key-config' ),
+ ),
+ );
+ }
+
+ /**
+ * Intercept the plugins API response and add in an appropriate card for Jetpack
+ */
+ public function inject_jetpack_module_suggestion( $result, $action, $args ) {
+ // Looks like a search query; it's matching time
+ if ( ! empty( $args->search ) ) {
+ require_once JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php';
+ $jetpack_modules_list = array_intersect_key(
+ array_merge( $this->get_extra_features(), Jetpack_Admin::init()->get_modules() ),
+ array_flip( array(
+ 'contact-form',
+ 'lazy-images',
+ 'monitor',
+ 'photon',
+ 'photon-cdn',
+ 'protect',
+ 'publicize',
+ 'related-posts',
+ 'sharedaddy',
+ 'akismet',
+ 'vaultpress',
+ 'videopress',
+ 'search',
+ ) )
+ );
+ uasort( $jetpack_modules_list, array( $this, 'by_sorting_option' ) );
+
+ // Record event when user searches for a term over 3 chars (less than 3 is not very useful.)
+ if ( strlen( $args->search ) >= 3 ) {
+ JetpackTracking::record_user_event( 'wpa_plugin_search_term', array( 'search_term' => $args->search ) );
+ }
+
+ // Lowercase, trim, remove punctuation/special chars, decode url, remove 'jetpack'
+ $normalized_term = $this->sanitize_search_term( $args->search );
+
+ $matching_module = null;
+
+ // Try to match a passed search term with module's search terms
+ foreach ( $jetpack_modules_list as $module_slug => $module_opts ) {
+ /*
+ * Does the site's current plan support the feature?
+ * We don't use Jetpack_Plan::supports() here because
+ * that check always returns Akismet as supported,
+ * since Akismet has a free version.
+ */
+ $current_plan = Jetpack_Plan::get();
+ $is_supported_by_plan = in_array( $module_slug, $current_plan['supports'], true );
+
+ if (
+ false !== stripos( $module_opts['search_terms'] . ', ' . $module_opts['name'], $normalized_term )
+ && $is_supported_by_plan
+ ) {
+ $matching_module = $module_slug;
+ break;
+ }
+ }
+
+ if ( isset( $matching_module ) && $this->should_display_hint( $matching_module ) ) {
+ // Record event when a matching feature is found
+ JetpackTracking::record_user_event( 'wpa_plugin_search_match_found', array( 'feature' => $matching_module ) );
+
+ $inject = (array) self::get_jetpack_plugin_data();
+ $image_url = plugins_url( 'modules/plugin-search/psh', JETPACK__PLUGIN_FILE );
+ $overrides = array(
+ 'plugin-search' => true, // Helps to determine if that an injected card.
+ 'name' => sprintf( // Supplement name/description so that they clearly indicate this was added.
+ esc_html_x( 'Jetpack: %s', 'Jetpack: Module Name', 'jetpack' ),
+ $jetpack_modules_list[ $matching_module ]['name']
+ ),
+ 'short_description' => $jetpack_modules_list[ $matching_module ]['short_description'],
+ 'requires_connection' => (bool) $jetpack_modules_list[ $matching_module ]['requires_connection'],
+ 'slug' => self::$slug,
+ 'version' => JETPACK__VERSION,
+ 'icons' => array(
+ '1x' => "$image_url-128.png",
+ '2x' => "$image_url-256.png",
+ 'svg' => "$image_url.svg",
+ ),
+ );
+
+ // Splice in the base module data
+ $inject = array_merge( $inject, $jetpack_modules_list[ $matching_module ], $overrides );
+
+ // Add it to the top of the list
+ $result->plugins = array_filter( $result->plugins, array( $this, 'filter_cards' ) );
+ array_unshift( $result->plugins, $inject );
+ }
+ }
+ return $result;
+ }
+
+ /**
+ * Remove cards for Jetpack plugins since we don't want duplicates.
+ *
+ * @since 7.1.0
+ * @since 7.2.0 Only remove Jetpack.
+ *
+ * @param array|object $plugin
+ *
+ * @return bool
+ */
+ function filter_cards( $plugin ) {
+ // Take in account that before WordPress 5.1, the list of plugins is an array of objects.
+ // With WordPress 5.1 the list of plugins is an array of arrays.
+ $slug = is_array( $plugin ) ? $plugin['slug'] : $plugin->slug;
+ return ! in_array( $slug, array( 'jetpack' ), true );
+ }
+
+ /**
+ * Take a raw search query and return something a bit more standardized and
+ * easy to work with.
+ *
+ * @param String $term The raw search term
+ * @return String A simplified/sanitized version.
+ */
+ private function sanitize_search_term( $term ) {
+ $term = strtolower( urldecode( $term ) );
+
+ // remove non-alpha/space chars.
+ $term = preg_replace( '/[^a-z ]/', '', $term );
+
+ // remove strings that don't help matches.
+ $term = trim( str_replace( array( 'jetpack', 'jp', 'free', 'wordpress' ), '', $term ) );
+
+ return $term;
+ }
+
+ /**
+ * Callback function to sort the array of modules by the sort option.
+ */
+ private function by_sorting_option( $m1, $m2 ) {
+ return $m1['sort'] - $m2['sort'];
+ }
+
+ /**
+ * Builds a URL to purchase and upgrade inserting the site fragment and the affiliate code if it exists.
+ *
+ * @param string $feature Module slug (or forged one for extra features).
+ *
+ * @since 7.1.0
+ *
+ * @return string URL to upgrade.
+ */
+ private function get_upgrade_url( $feature ) {
+ $site_raw_url = Jetpack::build_raw_urls( get_home_url() );
+ $affiliateCode = Jetpack_Affiliate::init()->get_affiliate_code();
+ $user = wp_get_current_user()->ID;
+ return "https://jetpack.com/redirect/?source=plugin-hint-upgrade-$feature&site=$site_raw_url&u=$user" .
+ ( $affiliateCode ? "&aff=$affiliateCode" : '' );
+ }
+
+ /**
+ * Modify the URL to the feature settings, for example Publicize.
+ * Sharing is included here because while we still have a page in WP Admin,
+ * we prefer to send users to Calypso.
+ *
+ * @param string $feature
+ * @param string $configure_url
+ *
+ * @return string
+ * @since 7.1.0
+ *
+ */
+ private function get_configure_url( $feature, $configure_url ) {
+ $siteFragment = Jetpack::build_raw_urls( get_home_url() );
+ switch ( $feature ) {
+ case 'sharing':
+ case 'publicize':
+ $configure_url = "https://wordpress.com/sharing/$siteFragment";
+ break;
+ case 'seo-tools':
+ $configure_url = "https://wordpress.com/settings/traffic/$siteFragment#seo";
+ break;
+ case 'google-analytics':
+ $configure_url = "https://wordpress.com/settings/traffic/$siteFragment#analytics";
+ break;
+ case 'wordads':
+ $configure_url = "https://wordpress.com/ads/settings/$siteFragment";
+ break;
+ }
+ return $configure_url;
+ }
+
+ /**
+ * Put some more appropriate links on our custom result cards.
+ */
+ public function insert_module_related_links( $links, $plugin ) {
+ if ( self::$slug !== $plugin['slug'] ) {
+ return $links;
+ }
+
+ // By the time this filter is applied, self_admin_url was already applied and we don't need it anymore.
+ remove_filter( 'self_admin_url', array( $this, 'plugin_details' ) );
+
+ $links = array();
+
+ if ( 'akismet' === $plugin['module'] || 'vaultpress' === $plugin['module'] ) {
+ $links['jp_get_started'] = '<a
+ id="plugin-select-settings"
+ class="jetpack-plugin-search__primary jetpack-plugin-search__get-started button"
+ href="https://jetpack.com/redirect/?source=plugin-hint-learn-' . $plugin['module'] . '"
+ data-module="' . esc_attr( $plugin['module'] ) . '"
+ data-track="get_started"
+ >' . esc_html__( 'Get started', 'jetpack' ) . '</a>';
+ // Jetpack installed, active, feature not enabled; prompt to enable.
+ } elseif (
+ current_user_can( 'jetpack_activate_modules' ) &&
+ ! Jetpack::is_module_active( $plugin['module'] ) &&
+ Jetpack_Plan::supports( $plugin['module'] )
+ ) {
+ $links[] = '<button
+ id="plugin-select-activate"
+ class="jetpack-plugin-search__primary button"
+ data-module="' . esc_attr( $plugin['module'] ) . '"
+ data-configure-url="' . esc_url( $this->get_configure_url( $plugin['module'], $plugin['configure_url'] ) ) . '"
+ > ' . esc_html__( 'Enable', 'jetpack' ) . '</button>';
+
+ // Jetpack installed, active, feature enabled; link to settings.
+ } elseif (
+ ! empty( $plugin['configure_url'] ) &&
+ current_user_can( 'jetpack_configure_modules' ) &&
+ Jetpack::is_module_active( $plugin['module'] ) &&
+ /** This filter is documented in class.jetpack-admin.php */
+ apply_filters( 'jetpack_module_configurable_' . $plugin['module'], false )
+ ) {
+ $links[] = '<a
+ id="plugin-select-settings"
+ class="jetpack-plugin-search__primary button jetpack-plugin-search__configure"
+ href="' . esc_url( $this->get_configure_url( $plugin['module'], $plugin['configure_url'] ) ) . '"
+ data-module="' . esc_attr( $plugin['module'] ) . '"
+ data-track="configure"
+ >' . esc_html__( 'Configure', 'jetpack' ) . '</a>';
+ // Module is active, doesn't have options to configure
+ } elseif ( Jetpack::is_module_active( $plugin['module'] ) ) {
+ $links['jp_get_started'] = '<a
+ id="plugin-select-settings"
+ class="jetpack-plugin-search__primary jetpack-plugin-search__get-started button"
+ href="https://jetpack.com/redirect/?source=plugin-hint-learn-' . $plugin['module'] . '"
+ data-module="' . esc_attr( $plugin['module'] ) . '"
+ data-track="get_started"
+ >' . esc_html__( 'Get started', 'jetpack' ) . '</a>';
+ }
+
+ // Add link pointing to a relevant doc page in jetpack.com only if the Get started button isn't displayed.
+ if ( ! empty( $plugin['learn_more_button'] ) && ! isset( $links['jp_get_started'] ) ) {
+ $links[] = '<a
+ class="jetpack-plugin-search__learn-more"
+ href="' . esc_url( $plugin['learn_more_button'] ) . '"
+ target="_blank"
+ data-module="' . esc_attr( $plugin['module'] ) . '"
+ data-track="learn_more"
+ >' . esc_html__( 'Learn more', 'jetpack' ) . '</a>';
+ }
+
+ // Dismiss link
+ $links[] = '<a
+ class="jetpack-plugin-search__dismiss"
+ data-module="' . esc_attr( $plugin['module'] ) . '"
+ >' . esc_html__( 'Hide this suggestion', 'jetpack' ) . '</a>';
+
+ return $links;
+ }
+
+}
+
+/**
+ * Master control that checks if Plugin search hints is active.
+ *
+ * @since 7.1.1
+ *
+ * @return bool True if PSH is active.
+ */
+function jetpack_is_psh_active() {
+ // false means unset, 1 means active, 0 means inactive.
+ $status = get_transient( 'jetpack_psh_status' );
+
+ if ( false === $status ) {
+ $error = false;
+ $status = jetpack_get_remote_is_psh_active( $error );
+ set_transient(
+ 'jetpack_psh_status',
+ // Cache as int
+ (int) $status,
+ // If there was an error, still cache but for a shorter time
+ ( $error ? 5 : 15 ) * MINUTE_IN_SECONDS
+ );
+ }
+
+ return (bool) $status;
+}
+
+/**
+ * Makes remote request to determine if Plugin search hints is active.
+ *
+ * @since 7.1.1
+ * @internal
+ *
+ * @param bool &$error Did the remote request result in an error?
+ * @return bool True if PSH is active.
+ */
+function jetpack_get_remote_is_psh_active( &$error ) {
+ $response = wp_remote_get( 'https://jetpack.com/psh-status/' );
+ if ( is_wp_error( $response ) ) {
+ $error = true;
+ return true;
+ }
+
+ $body = wp_remote_retrieve_body( $response );
+ if ( empty( $body ) ) {
+ $error = true;
+ return true;
+ }
+
+ $json = json_decode( $body );
+ if ( ! isset( $json->active ) ) {
+ $error = true;
+ return true;
+ }
+
+ $error = false;
+ return (bool) $json->active;
+}
diff --git a/plugins/jetpack/modules/plugin-search/plugin-search.css b/plugins/jetpack/modules/plugin-search/plugin-search.css
new file mode 100644
index 00000000..8623d3f4
--- /dev/null
+++ b/plugins/jetpack/modules/plugin-search/plugin-search.css
@@ -0,0 +1,84 @@
+.plugin-card-jetpack-plugin-search h3 {
+ margin: 0 0 4px 0;
+}
+
+.plugin-card-jetpack-plugin-search .column-name,
+.plugin-card-jetpack-plugin-search .column-description {
+ margin-right: 20px;
+}
+
+.plugin-card-jetpack-plugin-search .action-links {
+ overflow: auto;
+ position: static;
+}
+
+@media screen and (max-width: 1100px) and (min-width: 782px), (max-width: 480px) {
+ .plugin-card-jetpack-plugin-search .action-links {
+ margin-left: 0;
+ }
+}
+
+.plugin-card-jetpack-plugin-search .plugin-action-buttons {
+ margin: 0;
+ width: 100%;
+ text-align: left;
+ white-space: nowrap;
+}
+
+.plugin-card-jetpack-plugin-search .plugin-action-buttons .jetpack-plugin-search__primary {
+ background: #00be28;
+ border-color: #00a523;
+ color: #fff;
+ box-shadow: 0 1px 0 #c5e2c3;
+}
+
+.plugin-card-jetpack-plugin-search .plugin-action-buttons .jetpack-plugin-search__primary:hover {
+ background: #00a523;
+ border-color: #008b1d;
+ color: #fff;
+}
+
+.plugin-card-jetpack-plugin-search .plugin-card-bottom {
+ display: none;
+}
+
+.jetpack-plugin-search__bottom {
+ display: flex;
+ align-items: center;
+ align-content: space-between;
+ clear: both;
+ padding: 12px 20px;
+ background-color: #fafafa;
+ border-top: 1px solid #ddd;
+ overflow: hidden;
+}
+
+.jetpack-plugin-search__text {
+ flex: 1;
+ margin: 0 24px 0 16px;
+}
+
+@media screen and (max-width: 1100px) and (min-width: 782px), (max-width: 480px) {
+ .plugin-card-jetpack-plugin-search .plugin-action-buttons li {
+ display: block;
+ }
+ .plugin-card-jetpack-plugin-search .plugin-action-buttons li button {
+ margin-right: 0;
+ }
+}
+
+/* Hides the link to dismiss cards when it's in action links are before being moved to bottom row*/
+.action-links .jetpack-plugin-search__dismiss {
+ display: none;
+}
+
+.jetpack-plugin-search__bottom .jetpack-plugin-search__dismiss {
+ color: #484848;
+ font-style: italic;
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+.jetpack-plugin-search__dismiss:hover {
+ color: #666;
+}
diff --git a/plugins/jetpack/modules/plugin-search/plugin-search.js b/plugins/jetpack/modules/plugin-search/plugin-search.js
new file mode 100644
index 00000000..b277a5aa
--- /dev/null
+++ b/plugins/jetpack/modules/plugin-search/plugin-search.js
@@ -0,0 +1,264 @@
+/**
+ * Handles the activation of a Jetpack feature, dismissing the card, and replacing the bottom row
+ * of the card with customized content.
+ */
+
+/* global jetpackPluginSearch, JSON, jpTracksAJAX */
+
+var JetpackPSH = {};
+
+( function( $, jpsh ) {
+ JetpackPSH = {
+
+ $pluginFilter: $( '#plugin-filter' ),
+
+ /**
+ * Get parent search hint element.
+ * @returns {Element | null}
+ */
+ getCard: function() {
+ return document.querySelector( '.plugin-card-jetpack-plugin-search' );
+ },
+
+ /**
+ * Track user event such as a click on a button or a link.
+ *
+ * @param {string} eventName Event identifier.
+ * @param {object} feature Identifier of feature involved in the event.
+ * @param {object} target Object where action was performed.
+ */
+ trackEvent: function( eventName, feature, target ) {
+ jpTracksAJAX
+ .record_ajax_event( eventName, 'click', { 'feature' : feature } )
+ .always( function() {
+ if ( 'undefined' !== typeof target && !! target.getAttribute( 'href' ) ) {
+ // If it has an href, follow it.
+ window.location = target.getAttribute( 'href' );
+ }
+ } );
+ },
+
+ /**
+ * Update title of the card to add a mention that the result is from the Jetpack plugin.
+ */
+ updateCardTitle: function() {
+ var hint = JetpackPSH.getCard();
+
+ if ( 'object' === typeof hint && null !== hint ) {
+ var title = hint.querySelector( '.column-name h3' );
+ title.outerHTML =
+ title.outerHTML + '<strong>' + jetpackPluginSearch.poweredBy + '</strong>';
+ }
+ },
+
+ /**
+ * Move action links below description.
+ */
+ moveActionLinks: function() {
+ var hint = JetpackPSH.getCard();
+ if ( 'object' === typeof hint && null !== hint ) {
+ var descriptionContainer = hint.querySelector( '.column-description' );
+ // Keep only the first paragraph. The second is the plugin author.
+ var descriptionText = descriptionContainer.querySelector( 'p:first-child' );
+ var actionLinks = hint.querySelector( '.action-links' );
+
+ // Change the contents of the description, to keep the description text and the action links.
+ descriptionContainer.innerHTML = descriptionText.outerHTML + actionLinks.outerHTML;
+
+ // Remove the action links from their default location.
+ actionLinks.parentNode.removeChild( actionLinks );
+ }
+ },
+
+ /**
+ * Replace bottom row of the card to insert logo, text and link to dismiss the card.
+ */
+ replaceCardBottom: function() {
+ var hint = JetpackPSH.getCard();
+ if ( 'object' === typeof hint && null !== hint ) {
+ hint.querySelector( '.plugin-card-bottom' ).outerHTML =
+ '<div class="jetpack-plugin-search__bottom"><img src="' +
+ jetpackPluginSearch.logo +
+ '" width="32" />' +
+ '<p class="jetpack-plugin-search__text">' +
+ jetpackPluginSearch.legend +
+ ' <a class="jetpack-plugin-search__support_link" href="' +
+ jetpackPluginSearch.supportLink +
+ '" target="_blank" rel="noopener noreferrer" data-track="support_link" >' +
+ jetpackPluginSearch.supportText +
+ '</a>' +
+ '</p>' +
+ '</div>';
+
+ // Remove link and parent li from action links and move it to bottom row
+ var dismissLink = document.querySelector( '.jetpack-plugin-search__dismiss' );
+ dismissLink.parentNode.parentNode.removeChild( dismissLink.parentNode );
+ document
+ .querySelector( '.jetpack-plugin-search__bottom' )
+ .appendChild( dismissLink );
+ }
+ },
+
+ /**
+ * Check if plugin card list nodes changed. If there's a Jetpack PSH card, replace the title and the bottom row.
+ * @param {array} mutationsList
+ */
+ replaceOnNewResults: function( mutationsList ) {
+ mutationsList.forEach( function( mutation ) {
+ if (
+ 'childList' === mutation.type &&
+ 1 === document.querySelectorAll( '.plugin-card-jetpack-plugin-search' ).length
+ ) {
+ JetpackPSH.updateCardTitle();
+ JetpackPSH.moveActionLinks();
+ JetpackPSH.replaceCardBottom();
+ }
+ } );
+ },
+
+ dismiss: function( moduleName ) {
+ document.getElementById( 'the-list' ).removeChild( JetpackPSH.getCard() );
+ $.ajax( {
+ url: jpsh.base_rest_url + '/hints',
+ method: 'post',
+ beforeSend: function( xhr ) {
+ xhr.setRequestHeader( 'X-WP-Nonce', jpsh.nonce );
+ },
+ data: JSON.stringify( {
+ hint: moduleName
+ } ),
+ contentType: 'application/json',
+ dataType: 'json'
+ } ).done( function() {
+ JetpackPSH.trackEvent( 'wpa_plugin_search_dismiss', moduleName );
+ } );
+ },
+
+ ajaxActivateModule: function( moduleName ) {
+ var $moduleBtn = JetpackPSH.$pluginFilter.find( '#plugin-select-activate' );
+ $moduleBtn.toggleClass( 'install-now updating-message' );
+ $moduleBtn.prop( 'disabled', true );
+ $moduleBtn.text( jpsh.activating );
+ var data = {};
+ data[ moduleName ] = true;
+ $.ajax( {
+ url: jpsh.base_rest_url + '/settings',
+ method: 'post',
+ beforeSend: function( xhr ) {
+ xhr.setRequestHeader( 'X-WP-Nonce', jpsh.nonce );
+ },
+ data: JSON.stringify( data ),
+ contentType: 'application/json',
+ dataType: 'json'
+ } ).done( function() {
+ JetpackPSH.updateButton( moduleName );
+ JetpackPSH.trackEvent( 'wpa_plugin_search_activate', moduleName );
+ } ).error( function() {
+ $moduleBtn.toggleClass( 'install-now updating-message' );
+ } );
+ },
+
+ // Remove onclick handler, disable loading spinner, update button to redirect to module settings.
+ updateButton: function( moduleName ) {
+ $.ajax( {
+ url: jpsh.base_rest_url + '/module/' + moduleName,
+ method: 'get',
+ beforeSend: function( xhr ) {
+ xhr.setRequestHeader( 'X-WP-Nonce', jpsh.nonce );
+ },
+ dataType: 'json'
+ } ).done( function( response ) {
+ var $moduleBtn = JetpackPSH.$pluginFilter.find( '#plugin-select-activate' );
+ $moduleBtn.prop( 'onclick', null ).off( 'click' );
+ $moduleBtn.toggleClass( 'install-now updating-message' );
+ $moduleBtn.text( jpsh.activated );
+ setTimeout( function() {
+ var url = 'https://jetpack.com/redirect/?source=plugin-hint-learn-' + moduleName,
+ label = jpsh.getStarted,
+ classes = 'jetpack-plugin-search__primary button',
+ track = 'configure';
+
+ // If the feature has options in Jetpack admin UI, link to them.
+ if ( response.options && 0 < Object.keys( response.options ).length ) {
+ url = $moduleBtn.data( 'configure-url' );
+ label = jpsh.manageSettings;
+ classes += ' jetpack-plugin-search__configure';
+ } else {
+ // If it has no options, the Get started button will be displayed so remove the Learn more link if it's there.
+ var learnMore = document.querySelector( '.jetpack-plugin-search__learn-more' );
+ learnMore.parentNode.removeChild( learnMore );
+ classes += ' jetpack-plugin-search__get-started';
+ track = 'get_started';
+ }
+ $moduleBtn.replaceWith(
+ '<a id="plugin-select-settings" class="' + classes + '" href="' + url + '" data-module="' + moduleName + '" data-track="' + track + '">' + label + '</a>'
+ );
+ }, 1000 );
+
+ } );
+ },
+
+ /**
+ * Start suggesting.
+ */
+ init: function() {
+ if ( JetpackPSH.$pluginFilter.length < 1 ) {
+ return;
+ }
+
+ // Update title to show that the suggestion is from Jetpack.
+ JetpackPSH.updateCardTitle();
+
+ // Update the description and action links.
+ JetpackPSH.moveActionLinks();
+
+ // Replace PSH bottom row on page load
+ JetpackPSH.replaceCardBottom();
+
+ // Listen for changes in plugin search results
+ var resultsObserver = new MutationObserver( JetpackPSH.replaceOnNewResults );
+ resultsObserver.observe( document.getElementById( 'plugin-filter' ), { childList: true } );
+
+ JetpackPSH.$pluginFilter
+ .on( 'click', '.jetpack-plugin-search__dismiss', function( event ) {
+ event.preventDefault();
+ JetpackPSH.dismiss( $( this ).data( 'module' ) );
+ } )
+ .on( 'click', 'button#plugin-select-activate', function( event ) {
+ event.preventDefault();
+ JetpackPSH.ajaxActivateModule( $( this ).data( 'module' ) );
+ } )
+ .on( 'click', '.jetpack-plugin-search__primary', function( event ) {
+ event.preventDefault();
+ var $this = $( this );
+ if ( $this.data( 'track' ) ) {
+ // This catches Purchase, Configure, and Get started. Feature activation is tracked when it ends successfully, in its callback.
+ JetpackPSH.trackEvent( 'wpa_plugin_search_' + $this.data( 'track' ), $this.data( 'module' ), $this.get(0) );
+ }
+ } )
+ .on( 'click', '.jetpack-plugin-search__learn-more', function( event ) {
+ event.preventDefault();
+ var $this = $( this );
+
+ JetpackPSH.trackEvent(
+ 'wpa_plugin_search_learn_more',
+ $this.data( 'module' ),
+ $this.get( 0 )
+ );
+ } )
+ .on( 'click', '.jetpack-plugin-search__support_link', function( event ) {
+ event.preventDefault();
+ var $this = $( this );
+ JetpackPSH.trackEvent(
+ 'wpa_plugin_search_support_link',
+ $this.data( 'module' ),
+ $this.get( 0 )
+ );
+ } );
+ }
+
+ };
+
+ JetpackPSH.init();
+
+} )( jQuery, jetpackPluginSearch );
diff --git a/plugins/jetpack/modules/plugin-search/psh-128.png b/plugins/jetpack/modules/plugin-search/psh-128.png
new file mode 100644
index 00000000..20c74c4c
--- /dev/null
+++ b/plugins/jetpack/modules/plugin-search/psh-128.png
Binary files differ
diff --git a/plugins/jetpack/modules/plugin-search/psh-256.png b/plugins/jetpack/modules/plugin-search/psh-256.png
new file mode 100644
index 00000000..2dfc2207
--- /dev/null
+++ b/plugins/jetpack/modules/plugin-search/psh-256.png
Binary files differ
diff --git a/plugins/jetpack/modules/plugin-search/psh.svg b/plugins/jetpack/modules/plugin-search/psh.svg
new file mode 100644
index 00000000..5b2609ef
--- /dev/null
+++ b/plugins/jetpack/modules/plugin-search/psh.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 183 104" xmlns="http://www.w3.org/2000/svg"><path d="m.3 99.6c11-.6 22.1-.7 33.1-.8l16.6-.1h16.6l33.1.2c11 .1 22.1.2 33.1.6.2 0 .4.2.4.4s-.2.4-.4.4c-11 .4-22.1.5-33.1.6l-33.1.2h-16.6l-16.6-.1c-11-.1-22.1-.3-33.1-.8-.1 0-.2-.1-.2-.2 0-.3.1-.4.2-.4zm152.5 0c2.5-.5 5-.7 7.5-.8l3.7-.1h3.7c2.5 0 5 .1 7.5.2s5 .2 7.5.6c.2 0 .4.2.4.5 0 .2-.2.3-.4.4-2.5.4-5 .5-7.5.6s-5 .1-7.5.2h-3.7l-3.7-.1c-2.5-.1-5-.3-7.5-.8-.1 0-.2-.1-.2-.2 0-.4.1-.5.2-.5z" fill="#e3eaf0"/><path d="m46.1 82.8v-57.8h70.1v57.8h-66.3" fill="#d8dee4"/><path d="m46.1 24.7v-13.6h98.2v13.5h-92.8" fill="#BBC9D5"/><path d="m144.3 25.2.9 57.3-28.9.1v-57.4z" fill="#ccced0"/><path d="m102.5 82.7h-48.2v-32.1h53.1v32.1m0-35.7h-53.1v-13.2h53.1z" fill="#fff"/><path d="m96.1 41.6c-.7.2-1.4.5-2.1.8-.6.4-1.3.7-1.9 1.1-.4.3-.9.6-1.4.9.4-.5.9-1.1 1.3-1.6.5-.6 1-1.3 1.4-2 .5-.7.9-1.4 1.2-2.2 0-.1 0-.1-.1-.1h-.1c-.7.5-1.3 1.1-1.8 1.7s-1 1.3-1.5 1.9c-.4.6-.9 1.2-1.3 1.9.2-.7.5-1.4.7-2.2l.6-2.4c.2-.8.3-1.6.3-2.5v-.1h-.1c-.4.7-.8 1.5-1 2.2-.3.8-.5 1.6-.7 2.3-.2.6-.3 1.2-.4 1.8 0-.7-.1-1.5-.1-2.2-.1-.9-.2-1.7-.3-2.6s-.3-1.7-.5-2.6c0-.1-.1-.2-.2-.1-.1 0-.1.1-.1.2-.1.9-.1 1.8-.1 2.6 0 .9.1 1.7.1 2.6.1.9.1 1.7.2 2.6-.2-.5-.5-1.1-.8-1.6-.3-.6-.7-1.3-1-1.9l-1.2-1.8c-.1-.1-.2-.1-.3 0-.1 0-.1.1-.1.2.2.7.4 1.4.7 2.1s.6 1.3.9 2c.2.3.3.6.5.9-.5-.5-1-1.1-1.5-1.6-.7-.6-1.3-1.3-2-1.9s-1.4-1.2-2.2-1.7c-.1-.1-.2 0-.3.1v.2c.5.8 1.1 1.5 1.7 2.1.6.7 1.3 1.3 1.9 2 .6.6 1.3 1.3 2 1.9l.1.1c-.4-.2-.8-.4-1.2-.5-.6-.2-1.2-.5-1.9-.7-.6-.2-1.3-.4-1.9-.5-.1 0-.2.1-.2.2s0 .1.1.2c.5.4 1.1.7 1.7 1s1.2.6 1.8.8c.6.3 1.2.5 1.9.7.6.2 1.2.3 1.9.4h.3c.7-.3 1.4-.6 2-.9.6-.4 1.3-.7 1.9-1.1l1.8-1.2c.6-.4 1.2-.9 1.7-1.5v-.1c-.3.1-.4.1-.4.1z" fill="#ccced0"/><path d="m147.6 24.9c-8.7.9-17.4.9-26.1 1l-26.1.3h-26.1c-8.7 0-17.4.1-26.1-.7v-.5c8.7-.9 17.4-.9 26.1-1l26.1-.3h26.1c8.7 0 17.4-.1 26.1.7z" fill="#46799A"/><path d="m77.3 70c-1.1.6-2.1 1.3-2.9 2.2l.3-1.1c.4-1.7 1-3.4 1.6-5.1l-.3-.2c-.6.7-1.1 1.5-1.4 2.4-.4.9-.7 1.7-.9 2.6s-.4 1.8-.5 2.8v.8c-.2.6-.3 1.4-.1 2h.2l.1-.1v.1h.2c.1-.5.3-.9.4-1.4.1-.1.1-.2.2-.3.3-.5.7-1 1-1.5.4-.5.8-.9 1.3-1.4s.9-.9 1.3-1.5c-.2 0-.5-.3-.5-.3zm24.6-10.4c-.5-.9-1.3-2-2.8-2.5-.6-.2-1.3-.3-2-.3.3-.4.6-.7.9-1.1l-.3-.3c-.6.5-1.1 1-1.7 1.5-.5.1-1 .3-1.4.5-.2-1-.6-2.3-1.8-3.3-.8-.7-1.9-1.1-2.9-1.2-1.1-.1-2.1.7-2.3 1.8 0 .3 0 .5.1.8.3 1.1.9 2 1.8 2.7 1 .8 2.3 1.3 3.6 1.3.3 0 .6 0 .9-.1-1 1.5-1.8 3.1-2.5 4.8l-.1.1c-.2-1-.7-2.8-2.5-3.8-1.1-.6-2.3-.9-3.6-.7-1 .1-1.7 1-1.6 2.1 0 .1 0 .3.1.4.4 1.2 1.2 2.2 2.3 2.9 1.4.8 3 1 4.5.5 0 .1.1.2.2.3-.5 1.7-.8 3.4-1 5.1-.2-.6-1.4-2.8-3.9-3.3-1.2-.2-2.5 0-3.6.5-.9.5-1.3 1.6-.8 2.5.1.1.1.2.2.3.8 1 1.9 1.7 3.2 1.9.3.1.7.1 1.1.1 1.2 0 2.3-.4 3.3-1l-.1.2.2.3c.1.2.2.3.3.5-.1 1.5 0 3.1.2 4.6h.2c.2-1.3.3-2.5.4-3.8.9.8 2.1 1.2 3.4 1.2 1.2 0 2.3-.4 3.3-1 .5-.3.8-.8.8-1.4s-.2-1.1-.6-1.5c-.7-.7-1.9-1.5-3.5-1.5-1.1 0-2.1.3-3 .9.2-1.2.4-2.4.8-3.6.9.8 2 1.3 3.1 1.4h.5c1 0 2-.3 2.9-.8.5-.3.8-.8.9-1.3.1-.6-.1-1.1-.5-1.5-.7-.7-1.8-1.6-3.3-1.7-.8-.1-1.7.1-2.5.4.4-1 .9-2 1.5-3 .1-.1.1-.2.2-.4.6.9 1.6 1.7 2.7 2 .6.2 1.2.3 1.8.3s1.1-.1 1.6-.2c.5-.2 1-.6 1.2-1.1.5-.4.4-1 .1-1.5zm-15.2 4.9c-.9-.5-1.5-1.3-1.9-2.3-.1-.4.1-.9.5-1.1h.8c.8 0 1.6.2 2.3.6 1.5.9 1.9 2.6 2 3.3-1.2.3-2.6.1-3.7-.5zm-1.5 7.7c-1-.2-1.9-.7-2.6-1.6-.3-.4-.2-.9.1-1.2l.1-.1c.7-.3 1.4-.5 2.2-.5.3 0 .5 0 .8.1 1.7.3 2.7 1.8 3 2.5-.9.8-2.3 1.1-3.6.8zm8.8-1.3c1.3 0 2.2.6 2.8 1.2.3.3.4.9 0 1.2 0 0-.1.1-.2.1-.7.6-1.6.9-2.6.9-1.6 0-2.6-.8-3.2-1.5 0-.2.1-.4.1-.6.6-.5 1.7-1.3 3.1-1.3zm1.4-6.6c1.2.1 2.2.8 2.7 1.4.2.2.2.4.2.7s-.2.5-.4.6c-.9.5-1.9.7-2.9.6-1.1-.1-2.2-.7-2.9-1.5v-.1c.1-.3.2-.7.3-1 .9-.5 1.9-.8 3-.7zm-1.7-5.6c-1.3.2-2.6-.2-3.6-1-.7-.6-1.2-1.3-1.4-2.2-.2-.6.2-1.2.7-1.3h.4c.9.1 1.7.4 2.4 1 1.4 1 1.5 2.7 1.5 3.5zm7.4 2.1c-.1.2-.3.4-.6.5-.9.3-1.9.3-2.9-.1-1-.3-1.9-1.1-2.4-2l.9-1.2c.9-.2 1.8-.2 2.6.1 1.2.4 1.9 1.3 2.3 2 .2.2.2.5.1.7z" fill="#ccced0"/><path d="m178.2 57.1c-.1-.5-.5-.9-1-.9-2.1 0-4.2-.2-6.3-.5s-4.2-.8-6.2-1.5-3.9-1.6-5.7-2.7-3.3-2.5-4.6-4.1l-.1-.1c-.4-.3-1-.3-1.3.1-1.2 1.4-2.8 2.8-4.3 4-1.6 1.2-3.3 2.2-5.1 3s-3.7 1.4-5.6 1.8-3.9.5-5.9.3c-.4 0-.7.3-.8.6-.7 4.8-.9 9.5-.6 14.3.3 4.7 1.2 9.5 2.9 13.9 1.7 4.5 4.3 8.6 7.8 11.9s7.8 5.5 12.4 6.7h.1c2.5-.1 4.9-.8 7.1-1.8s4.4-2.3 6.2-4c3.8-3.2 6.7-7.4 8.6-12 2-4.6 2.8-9.5 3.1-14.4s0-9.8-.7-14.6z" fill="#00be28"/><path d="m145.3 78.3 7.4 5.9 15.1-17.2" fill="#00be28"/><path d="m168.1 66.9c-.1-.1-.3-.2-.5-.1-1.5 1.2-2.9 2.6-4.2 3.9l-3.9 4.2c-2.3 2.6-4.6 5.1-6.9 7.7-1-.8-1.9-1.5-2.9-2.3l-1.9-1.5c-.7-.5-1.2-1.1-2.1-1.2h-.4c-.4.2-.6.6-.4 1 .3.9 1 1.2 1.6 1.8l1.8 1.5c1.2 1 2.4 2 3.7 3 .5.4 1.1.3 1.5-.1 2.5-2.9 5-5.7 7.5-8.6 1.2-1.5 2.5-2.9 3.7-4.4s2.3-3 3.3-4.7c.2.1.1-.1.1-.2z" fill="#fff"/><path d="m137.2 99.7c-5-.2-10-.4-15-.5s-10-.2-15-.2c-10-.1-19.9-.1-29.9-.1l-29.9-.1h-18.7c-.7 0-1.1 0-1.6-.1s-.9-.3-1.3-.6c-.8-.6-1.3-1.4-1.5-2.4 0-.2-.1-.5-.1-.7v-1.6l52.9-.1h4.8v2.4c0 .3.2.5.5.5h24.5c.3 0 .5-.2.5-.5v-2.7c3.5 0 6.9-.1 10.4-.2 4.5-.1 9-.2 13.5-.4.1 0 .2-.1.2-.3 0-.1-.1-.2-.2-.2-4.5-.2-9-.3-13.5-.4s-9-.2-13.5-.2c-9-.1-18-.1-27-.1l-54.2-.2c-.6 0-1.2.5-1.2 1.2v2.8c0 .4 0 .8.1 1.2.5 2.3 2.2 4.2 4.5 4.8.7.2 1.6.2 2.2.2h18.7l29.9-.1c10 0 19.9 0 29.9-.1 5 0 10-.1 15-.2s10-.2 15-.5c.1 0 .2-.1.2-.3s-.1-.3-.2-.3zm16.6-99.4-25.8-.1h-85.1c-.6 0-1.2.1-1.8.3-1.2.3-2.3.9-3.3 1.7-1.9 1.6-3.1 4-3 6.5v82.5h2.2v-82.4c0-2.9 1.9-5.4 4.6-6.1.4-.1.9-.2 1.4-.2h85.1l24.9-.1.2 19.7.1 10.3.2 10.3c0 .2.2.3.4.3.1 0 .3-.1.3-.3l.2-10.3.1-10.3.2-20.6c-.1-.7-.4-1.1-.9-1.2z" fill="#ccced0"/><path d="m54.3 78.8c13.6-5.6 42.9-1.9 52.5 4.1l-52.5-.2z" fill="#6F93AD"/></svg> \ No newline at end of file
diff --git a/plugins/jetpack/modules/protect.php b/plugins/jetpack/modules/protect.php
index 48117d5e..c2e60705 100644
--- a/plugins/jetpack/modules/protect.php
+++ b/plugins/jetpack/modules/protect.php
@@ -1,7 +1,7 @@
<?php
/**
* Module Name: Protect
- * Module Description: Block suspicious-looking sign in activity
+ * Module Description: Protect yourself from brute force and distributed brute force attacks, which are the most common way for hackers to get into your site.
* Sort Order: 1
* Recommendation Order: 4
* First Introduced: 3.4
@@ -9,7 +9,7 @@
* Auto Activate: Yes
* Module Tags: Recommended
* Feature: Security
- * Additional Search Queries: security, secure, protection, botnet, brute force, protect, login
+ * Additional Search Queries: security, jetpack protect, secure, protection, botnet, brute force, protect, login, bot, password, passwords, strong passwords, strong password, wp-login.php, protect admin
*/
include_once JETPACK__PLUGIN_DIR . 'modules/protect/shared-functions.php';
@@ -60,6 +60,12 @@ class Jetpack_Protect_Module {
// This is a backup in case $pagenow fails for some reason
add_action( 'login_form', array ( $this, 'check_login_ability' ), 1 );
+ // Load math fallback after math page form submission
+ if ( isset( $_POST[ 'jetpack_protect_process_math_form' ] ) ) {
+ include_once dirname( __FILE__ ) . '/protect/math-fallback.php';
+ new Jetpack_Protect_Math_Authenticate;
+ }
+
// 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' );
diff --git a/plugins/jetpack/modules/protect/blocked-login-page.php b/plugins/jetpack/modules/protect/blocked-login-page.php
index 775474f4..246031f6 100644
--- a/plugins/jetpack/modules/protect/blocked-login-page.php
+++ b/plugins/jetpack/modules/protect/blocked-login-page.php
@@ -355,7 +355,7 @@ class Jetpack_Protect_Blocked_Login_Page {
<title><?php echo $title ?></title>
<style type="text/css">
html {
- background: #f3f6f8;
+ background: #f6f6f6;
}
body {
diff --git a/plugins/jetpack/modules/protect/math-fallback.php b/plugins/jetpack/modules/protect/math-fallback.php
index 583358f7..bc29fa86 100644
--- a/plugins/jetpack/modules/protect/math-fallback.php
+++ b/plugins/jetpack/modules/protect/math-fallback.php
@@ -23,6 +23,10 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
}
}
+ private static function time_window() {
+ return ceil( time() / ( MINUTE_IN_SECONDS * 2 ) );
+ }
+
/**
* Verifies that a user answered the math problem correctly while logging in.
*
@@ -31,11 +35,6 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
* @throws Error message if the math is wrong
*/
static function math_authenticate() {
- $salt = get_site_option( 'jetpack_protect_key' ) . get_site_option( 'admin_email' );
- $ans = isset( $_POST['jetpack_protect_num'] ) ? (int) $_POST['jetpack_protect_num'] : '' ;
- $salted_ans = sha1( $salt . $ans );
- $correct_ans = isset( $_POST[ 'jetpack_protect_answer' ] ) ? $_POST[ 'jetpack_protect_answer' ] : '' ;
-
if( isset( $_COOKIE[ 'jpp_math_pass' ] ) ) {
$jetpack_protect = Jetpack_Protect_Module::instance();
$transient = $jetpack_protect->get_transient( 'jpp_math_pass_' . $_COOKIE[ 'jpp_math_pass' ] );
@@ -46,9 +45,17 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
return true;
}
- if ( ! $correct_ans || !$_POST['jetpack_protect_num'] ) {
+ $ans = isset( $_POST['jetpack_protect_num'] ) ? (int) $_POST['jetpack_protect_num'] : '' ;
+ $correct_ans = isset( $_POST[ 'jetpack_protect_answer' ] ) ? $_POST[ 'jetpack_protect_answer' ] : '' ;
+
+ $time_window = Jetpack_Protect_Math_Authenticate::time_window();
+ $salt = get_site_option( 'jetpack_protect_key' ) . '|' . get_site_option( 'admin_email' ) . '|';
+ $salted_ans_1 = hash_hmac( 'sha1', $ans, $salt . $time_window );
+ $salted_ans_2 = hash_hmac( 'sha1', $ans, $salt . ( $time_window - 1 ) );
+
+ if ( ! $correct_ans || ! $ans ) {
Jetpack_Protect_Math_Authenticate::generate_math_page();
- } elseif ( $salted_ans != $correct_ans ) {
+ } elseif ( ! hash_equals( $salted_ans_1, $correct_ans ) && ! hash_equals( $salted_ans_2, $correct_ans ) ) {
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' ),
'',
@@ -65,22 +72,17 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
* @return none, execution stopped
*/
static function generate_math_page( $error = false ) {
- $salt = get_site_option( 'jetpack_protect_key' ) . get_site_option( 'admin_email' );
- $num1 = rand( 0, 10 );
- $num2 = rand( 1, 10 );
- $sum = $num1 + $num2;
- $ans = sha1( $salt . $sum );
ob_start();
?>
- <h2><?php _e( 'Please solve this math problem to prove that you are not a bot. Once you solve it, you will need to log in again.', 'jetpack' ); ?></h2>
+ <h2><?php esc_html_e( 'Please solve this math problem to prove that you are not a bot. Once you solve it, you will need to log in again.', 'jetpack' ); ?></h2>
<?php if ($error): ?>
- <h3><?php _e( 'Your answer was incorrect, please try again.', 'jetpack' ); ?></h3>
+ <h3><?php esc_html_e( 'Your answer was incorrect, please try again.', 'jetpack' ); ?></h3>
<?php endif ?>
<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="<?php esc_html_e( 'Continue &rarr;', 'jetpack' ); ?>"></p>
+ <p><input type="submit" value="<?php esc_attr_e( 'Continue &rarr;', 'jetpack' ); ?>"></p>
</form>
<?php
$mathpage = ob_get_contents();
@@ -93,19 +95,23 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
}
public function process_generate_math_page() {
- $salt = get_site_option( 'jetpack_protect_key' ) . get_site_option( 'admin_email' );
- $ans = (int)$_POST['jetpack_protect_num'];
- $salted_ans = sha1( $salt . $ans );
- $correct_ans = $_POST[ 'jetpack_protect_answer' ];
+ $ans = isset( $_POST['jetpack_protect_num'] ) ? (int)$_POST['jetpack_protect_num'] : '';
+ $correct_ans = isset( $_POST[ 'jetpack_protect_answer' ] ) ? $_POST[ 'jetpack_protect_answer' ] : '' ;
+
+ $time_window = Jetpack_Protect_Math_Authenticate::time_window();
+ $salt = get_site_option( 'jetpack_protect_key' ) . '|' . get_site_option( 'admin_email' ) . '|';
+ $salted_ans_1 = hash_hmac( 'sha1', $ans, $salt . $time_window );
+ $salted_ans_2 = hash_hmac( 'sha1', $ans, $salt . ( $time_window - 1 ) );
- if ( $salted_ans != $correct_ans ) {
+ if ( ! hash_equals( $salted_ans_1, $correct_ans ) && ! hash_equals( $salted_ans_2, $correct_ans ) ) {
Jetpack_Protect_Math_Authenticate::generate_math_page(true);
} else {
- $temp_pass = substr( sha1( rand( 1, 100000000 ) . get_site_option( 'jetpack_protect_key' ) ), 5, 25 );
+ $temp_pass = substr( hash_hmac( 'sha1', rand( 1, 100000000 ), get_site_option( 'jetpack_protect_key' ) ), 5, 25 );
$jetpack_protect = Jetpack_Protect_Module::instance();
$jetpack_protect->set_transient( 'jpp_math_pass_' . $temp_pass, 3, DAY_IN_SECONDS );
setcookie('jpp_math_pass', $temp_pass, time() + DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN, false);
+ remove_action( 'login_form', array( $this, 'math_form' ) );
return true;
}
}
@@ -116,11 +122,23 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
* @return VOID outputs html
*/
static function math_form() {
- $salt = get_site_option( 'jetpack_protect_key' ) . get_site_option( 'admin_email' );
+ // Check if jpp_math_pass cookie is set and it matches valid transient
+ if( isset( $_COOKIE[ 'jpp_math_pass' ] ) ) {
+ $jetpack_protect = Jetpack_Protect_Module::instance();
+ $transient = $jetpack_protect->get_transient( 'jpp_math_pass_' . $_COOKIE[ 'jpp_math_pass' ] );
+
+ if( $transient && $transient > 0 ) {
+ return '';
+ }
+ }
+
$num1 = rand( 0, 10 );
$num2 = rand( 1, 10 );
- $sum = $num1 + $num2;
- $ans = sha1( $salt . $sum );
+ $ans = $num1 + $num2;
+
+ $time_window = Jetpack_Protect_Math_Authenticate::time_window();
+ $salt = get_site_option( 'jetpack_protect_key' ) . '|' . get_site_option( 'admin_email' ) . '|';
+ $salted_ans = hash_hmac( 'sha1', $ans, $salt . $time_window );
?>
<div style="margin: 5px 0 20px;">
<label for="jetpack_protect_answer">
@@ -128,10 +146,10 @@ if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {
</label>
<br/>
<span style="vertical-align:super;">
- <?php echo "$num1 &nbsp; + &nbsp; $num2 &nbsp; = &nbsp;"; ?>
+ <?php echo esc_html( "$num1 &nbsp; + &nbsp; $num2 &nbsp; = &nbsp;" ); ?>
</span>
<input type="text" id="jetpack_protect_answer" name="jetpack_protect_num" value="" size="2" style="width:30px;height:25px;vertical-align:middle;font-size:13px;" class="input" />
- <input type="hidden" name="jetpack_protect_answer" value="<?php echo $ans; ?>" />
+ <input type="hidden" name="jetpack_protect_answer" value="<?php echo esc_attr( $salted_ans ); ?>" />
</div>
<?php
}
diff --git a/plugins/jetpack/modules/publicize.php b/plugins/jetpack/modules/publicize.php
index bf1c9213..20c1474e 100644
--- a/plugins/jetpack/modules/publicize.php
+++ b/plugins/jetpack/modules/publicize.php
@@ -1,7 +1,7 @@
<?php
/**
* Module Name: Publicize
- * Module Description: Automated social marketing.
+ * Module Description: Publicize makes it easy to share your site’s posts on several social media networks automatically when you publish a new post.
* Sort Order: 10
* Recommendation Order: 7
* First Introduced: 2.0
@@ -9,7 +9,7 @@
* Auto Activate: Yes
* Module Tags: Social, Recommended
* Feature: Engagement
- * Additional Search Queries: facebook, twitter, google+, googleplus, google, tumblr, linkedin, social, tweet, connections, sharing
+ * Additional Search Queries: facebook, jetpack publicize, twitter, tumblr, linkedin, social, tweet, connections, sharing, social media, automated, automated sharing, auto publish, auto tweet and like, auto tweet, facebook auto post, facebook posting
*/
class Jetpack_Publicize {
@@ -40,11 +40,12 @@ class Jetpack_Publicize {
$publicize_ui->in_jetpack = $this->in_jetpack;
// Jetpack specific checks / hooks
- if ( $this->in_jetpack) {
+ if ( $this->in_jetpack ) {
// if sharedaddy isn't active, the sharing menu hasn't been added yet
$active = Jetpack::get_active_modules();
- if ( in_array( 'publicize', $active ) && !in_array( 'sharedaddy', $active ) )
+ if ( in_array( 'publicize', $active ) && ! in_array( 'sharedaddy', $active ) ) {
add_action( 'admin_menu', array( &$publicize_ui, 'sharing_menu' ) );
+ }
}
}
diff --git a/plugins/jetpack/modules/publicize/assets/connected.gif b/plugins/jetpack/modules/publicize/assets/connected.gif
deleted file mode 100644
index 24e0c11f..00000000
--- a/plugins/jetpack/modules/publicize/assets/connected.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/publicize/assets/facebook-logo.png b/plugins/jetpack/modules/publicize/assets/facebook-logo.png
deleted file mode 100644
index 785d0850..00000000
--- a/plugins/jetpack/modules/publicize/assets/facebook-logo.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/publicize/assets/linkedin-logo.png b/plugins/jetpack/modules/publicize/assets/linkedin-logo.png
deleted file mode 100644
index b480ce54..00000000
--- a/plugins/jetpack/modules/publicize/assets/linkedin-logo.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/publicize/assets/publicize-rtl.css b/plugins/jetpack/modules/publicize/assets/publicize-rtl.css
deleted file mode 100644
index eb1eacbb..00000000
--- a/plugins/jetpack/modules/publicize/assets/publicize-rtl.css
+++ /dev/null
@@ -1,227 +0,0 @@
-/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-div#publicize-services-block {
- display: block;
- clear: both;
- margin-bottom: 25px;
- background-color: #fff;
- padding: 25px 20px 5px 25px;
- overflow: hidden;
- max-width: 1200px;
-}
-
-/* Add the logos for the Publicize services */
-span.pub-logos {
- float: right;
- display: block;
- width: 130px;
- height: 75px;
- margin-top: -18px;
- margin-right: 5px;
- vertical-align: top;
-}
-
-@media screen and ( min-width: 782px ) {
- .left, .right {
- width: 50%;
- float: right;
- }
- div.publicize-service-entry:last-of-type{
- border-width: 0px;
- }
-}
-
-div#facebook:before {
- color: #3B5998;
- content: '\f203';
-}
-
-div#twitter:before {
- color: #1DA1F2;
- content: '\f610';
-}
-
-div#linkedin:before {
- color: #0077b5;
- content: '\f207';
-}
-
-div#tumblr:before {
- color: #35465c;
- content: '\f214';
-}
-
-div#google_plus:before {
- color: #dd4b39;
- content: '\f206';
-}
-
-div.publicize-service-left:before {
- font: normal 30px/1 social-logos;
- vertical-align: middle;
-}
-
-a.publicize-profile-link, a.publicize-profile-link:visited {
- text-decoration: none;
- font-weight: bold;
-}
-
-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 0;
- border-bottom: 1px #eee solid;
- margin-left: 40px;
- overflow: hidden;
-}
-
-.right div.publicize-service-entry:last-of-type{
- border-width: 0px;
-}
-
-div.publicize-service-left {
- display: inline-block;
- width: 150px;
- vertical-align: top;
- min-height: 35px;
-}
-
-div.publicize-service-left a{
- font-size: 18px;
- 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-bottom-color: #CCC;
- border-bottom-style: none;
- border-bottom-width: 0px;
- border-right-color: #CCC;
- border-right-style: none;
- border-right-width: 0px;
- border-left-color: #CCC;
- border-left-style: none;
- border-left-width: 0px;
- border-top-color: #CCC;
- border-top-style: none;
- border-top-width: 0px;
- color: #CCC;
- display: inline;
- font-size: 20px;
- font-style: normal;
- font-weight: normal;
- height: auto;
- line-height: 22px;
- list-style-image: none;
- list-style-position: outside;
- list-style-type: none;
- margin-bottom: 0px;
- margin-right: 0px;
- margin-left: 0px;
- margin-top: 0px;
- outline-color: #CCC;
- outline-style: none;
- outline-width: 0px;
- overflow-y: visible;
- padding-bottom: 0px;
- padding-right: 0px;
- padding-left: 0px;
- padding-top: 0px;
- 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 {
- padding-left: 20px;
-}
-
-table#option-profile td.thumbnail {
- padding-left: 20px;
-}
-
-table#option-profile td.details {
- font-weight: bold; color: #333333
-}
-
-table#option-fb-fanpage td, table#option-fanpage td {
- font-family: "Lucida Grande",Verdana,Arial,sans-serif;
- vertical-align: middle;
-}
-
-table#option-fb-fanpage td.thumbnail, table#option-fanpage td.thumbnail {
- padding: 5px 20px 5px 20px;
-}
-
-table#option-fb-fanpage td.details, table#option-fanpage td.details {
- width: 130px;
- padding-left: 10px;
-}
-
-table#option-fb-fanpage td.details span.name, table#option-fanpage td.details span.name {
- font-weight: bold; color: #333333;
-}
-
-table#option-fb-fanpage td.details span.category, table#option-fanpage td.details span.category {
- font-size: 10px; color: #888888;
-}
-
-input.fb-options {
- font-family: "Lucida Grande",Verdana,Arial,sans-serif;
- font-size: 12px;
-}
-
-.pub-connection-error {
- color: #ff0000;
-}
-
-.pub-connection-test. test-failed p { margin-top: 0; }
diff --git a/plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css b/plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css
deleted file mode 100644
index a0e4a6f4..00000000
--- a/plugins/jetpack/modules/publicize/assets/publicize-rtl.min.css
+++ /dev/null
@@ -1 +0,0 @@
-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}@media screen and (min-width:782px){.left,.right{width:50%;float:right}div.publicize-service-entry:last-of-type{border-width:0}}div#facebook:before{color:#3b5998;content:'\f203'}div#twitter:before{color:#1da1f2;content:'\f610'}div#linkedin:before{color:#0077b5;content:'\f207'}div#tumblr:before{color:#35465c;content:'\f214'}div#google_plus:before{color:#dd4b39;content:'\f206'}div.publicize-service-left:before{font:normal 30px/1 social-logos;vertical-align:middle}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 0;border-bottom:1px #eee solid;margin-left:40px;overflow:hidden}.right 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:18px;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-bottom-color:#ccc;border-bottom-style:none;border-bottom-width:0;border-right-color:#ccc;border-right-style:none;border-right-width:0;border-left-color:#ccc;border-left-style:none;border-left-width:0;border-top-color:#ccc;border-top-style:none;border-top-width:0;color:#ccc;display:inline;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style-image:none;list-style-position:outside;list-style-type:none;margin-bottom:0;margin-right:0;margin-left:0;margin-top:0;outline-color:#ccc;outline-style:none;outline-width:0;overflow-y:visible;padding-bottom:0;padding-right:0;padding-left:0;padding-top: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{padding-left:20px}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 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}.pub-connection-test. test-failed p{margin-top:0} \ No newline at end of file
diff --git a/plugins/jetpack/modules/publicize/assets/publicize.css b/plugins/jetpack/modules/publicize/assets/publicize.css
deleted file mode 100644
index 4b4054f5..00000000
--- a/plugins/jetpack/modules/publicize/assets/publicize.css
+++ /dev/null
@@ -1,226 +0,0 @@
-div#publicize-services-block {
- display: block;
- clear: both;
- margin-bottom: 25px;
- background-color: #fff;
- padding: 25px 25px 5px 20px;
- overflow: hidden;
- max-width: 1200px;
-}
-
-/* Add the logos for the Publicize services */
-span.pub-logos {
- float: left;
- display: block;
- width: 130px;
- height: 75px;
- margin-top: -18px;
- margin-left: 5px;
- vertical-align: top;
-}
-
-@media screen and ( min-width: 782px ) {
- .left, .right {
- width: 50%;
- float: left;
- }
- div.publicize-service-entry:last-of-type{
- border-width: 0px;
- }
-}
-
-div#facebook:before {
- color: #3B5998;
- content: '\f203';
-}
-
-div#twitter:before {
- color: #1DA1F2;
- content: '\f610';
-}
-
-div#linkedin:before {
- color: #0077b5;
- content: '\f207';
-}
-
-div#tumblr:before {
- color: #35465c;
- content: '\f214';
-}
-
-div#google_plus:before {
- color: #dd4b39;
- content: '\f206';
-}
-
-div.publicize-service-left:before {
- font: normal 30px/1 social-logos;
- vertical-align: middle;
-}
-
-a.publicize-profile-link, a.publicize-profile-link:visited {
- text-decoration: none;
- font-weight: bold;
-}
-
-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 0;
- border-bottom: 1px #eee solid;
- margin-right: 40px;
- overflow: hidden;
-}
-
-.right div.publicize-service-entry:last-of-type{
- border-width: 0px;
-}
-
-div.publicize-service-left {
- display: inline-block;
- width: 150px;
- vertical-align: top;
- min-height: 35px;
-}
-
-div.publicize-service-left a{
- font-size: 18px;
- 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-bottom-color: #CCC;
- border-bottom-style: none;
- border-bottom-width: 0px;
- border-left-color: #CCC;
- border-left-style: none;
- border-left-width: 0px;
- border-right-color: #CCC;
- border-right-style: none;
- border-right-width: 0px;
- border-top-color: #CCC;
- border-top-style: none;
- border-top-width: 0px;
- color: #CCC;
- display: inline;
- font-size: 20px;
- font-style: normal;
- font-weight: normal;
- height: auto;
- line-height: 22px;
- list-style-image: none;
- list-style-position: outside;
- list-style-type: none;
- margin-bottom: 0px;
- margin-left: 0px;
- margin-right: 0px;
- margin-top: 0px;
- outline-color: #CCC;
- outline-style: none;
- outline-width: 0px;
- overflow-y: visible;
- padding-bottom: 0px;
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- 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 {
- padding-right: 20px;
-}
-
-table#option-profile td.thumbnail {
- padding-right: 20px;
-}
-
-table#option-profile td.details {
- font-weight: bold; color: #333333
-}
-
-table#option-fb-fanpage td, table#option-fanpage td {
- font-family: "Lucida Grande",Verdana,Arial,sans-serif;
- vertical-align: middle;
-}
-
-table#option-fb-fanpage td.thumbnail, table#option-fanpage td.thumbnail {
- padding: 5px 20px 5px 20px;
-}
-
-table#option-fb-fanpage td.details, table#option-fanpage td.details {
- width: 130px;
- padding-right: 10px;
-}
-
-table#option-fb-fanpage td.details span.name, table#option-fanpage td.details span.name {
- font-weight: bold; color: #333333;
-}
-
-table#option-fb-fanpage td.details span.category, table#option-fanpage td.details span.category {
- font-size: 10px; color: #888888;
-}
-
-input.fb-options {
- font-family: "Lucida Grande",Verdana,Arial,sans-serif;
- font-size: 12px;
-}
-
-.pub-connection-error {
- color: #ff0000;
-}
-
-.pub-connection-test. test-failed p { margin-top: 0; }
diff --git a/plugins/jetpack/modules/publicize/assets/publicize.js b/plugins/jetpack/modules/publicize/assets/publicize.js
deleted file mode 100644
index 9227dbd8..00000000
--- a/plugins/jetpack/modules/publicize/assets/publicize.js
+++ /dev/null
@@ -1,184 +0,0 @@
-/* jshint onevar: false, smarttabs: true */
-/* global tb_show, tb_pathToImage, ajaxurl, tb_init, tb_remove */
-/* global myblogsResponse, publicizeConnTestStart:true, publicizeConnTestComplete:true, publicizeConnRefreshClick:true */
-
-var showOptionsPage;
-
-jQuery( function( $ ) {
-
- showOptionsPage = function( service, nonce, connection, blogId ) {
- tb_show( null, null, null );
- $('body').append( '<div id=\'TB_load\'><img src=\'' + tb_pathToImage + '\' /></div>' );
- $('#TB_load').show();
-
- var query = '';
- if ( connection ) {
- query += '&connection=' + encodeURIComponent( connection );
- }
- if ( 'undefined' !== typeof( blogId ) && blogId ) {
- query += '&blog_id=' + Number( blogId );
- }
-
- $.post( ajaxurl, 'action=publicize_' + service + '_options_page&_wpnonce=' + nonce + query, function( response ) {
- $('#TB_load').remove();
-
- try {
- var obj = jQuery.parseJSON( response );
- if ( obj && 'object' === typeof( obj ) ) {
- if ( obj.hasOwnProperty( 'fb_redirect' ) ) {
- location.href = obj.fb_redirect + '&redirect_uri=' + encodeURIComponent( location.href );
- return;
- }
- }
- } catch (err) {
- // Do nothing and move on
- }
-
- if ( response ) {
- var blogID = $( 'input[name=wpas_ajax_blog_id]' ).val();
-
- var message = $( '<div id="wpas-ajax-' + blogID + '" class="wrap"></div>' ).append( response );
- message.append( '<a href="#TB_inline?thickbox&height=420&width=555&inlineId=wpas-ajax-' + blogID + '" id="wpas-click-' + blogID + '" class="new-thickbox" style="display: none;"></a>' );
- $('#wpas-message').html( message );
-
-
- tb_init( 'a.new-thickbox' );
- $('#wpas-click-' + blogID).click();
-
- var tb_height = parseInt( $('#TB_ajaxContent').css('height'), 10 );
- var content_height = $('#thickbox-content').height();
- if ( content_height < tb_height ) {
- var new_height = content_height + 15;
- $('#TB_ajaxContent').css( 'height', new_height );
-
- var new_margin = parseInt( $('#TB_window').css( 'margin-top'), 10 ) + (tb_height - new_height) / 2 + 'px';
- $('#TB_window').css( 'margin-top', new_margin);
- }
-
- $('.save-options').unbind('click').click( function() {
- var sel = $( 'input[name=\'option\']:checked' );
- var global = $( 'input[name=\'global\']:checked' );
-
- var connection = $(this).data('connection');
- var token = encodeURIComponent( sel.val() );
- var id = encodeURIComponent( sel.attr( 'id' ) );
- var type = encodeURIComponent( sel.attr( 'data-type' ) );
- var nonce = $(this).attr('rel');
- var global_conn = 'off';
- var global_nonce = '';
-
- if ( global.length ) {
- global_conn = 'on';
- global_nonce = global.val();
- }
-
- $.post( ajaxurl, 'action=publicize_'+ service + '_options_save&connection=' + connection + '&selected_id=' + id + '&token=' + token + '&type=' + type + '&_wpnonce=' + nonce + '&global=' + global_conn + '&global_nonce=' + global_nonce, function( /*response*/ ) {
- var frameNonce;
- tb_remove();
- frameNonce = document.location.search.match( /frame-nonce=([^&]+)/ );
- if ( /inside-newdash=1/.test( document.location.search ) && frameNonce ) {
- document.location = 'options-general.php?page=sharing&inside-newdash=1&frame-nonce' + frameNonce[1];
- } else {
- top.location = 'options-general.php?page=sharing';
- }
- } );
-
- } );
- }
-
- }, 'html' );
- };
-
- $( 'body' ).append( '<div id="wpas-message" style="display: none"></div>' );
-
- $( '.wpas-posts' ).change( function() {
- var inputs = $(this).parents( 'td:first' ).find( ':input' );
- var _this = this;
- var blogID = inputs.filter( '[name=wpas_ajax_blog_id]' ).val();
-
- $( '#waiting_' + blogID ).show();
- $.post( ajaxurl, inputs.serialize() + '&action=wpas_post', function( response ) { myblogsResponse.call( _this, blogID, response ); }, 'html' );
- } );
-
- $( '.options' ).unbind('click').bind( 'click', function(e) {
- e.preventDefault();
- e.stopPropagation();
-
- var service = $(this).attr('class').replace( 'options ', '' );
-
- var blogId = null;
- if ( 'undefined' !== typeof( $(this).attr('id') ) ) {
- blogId = parseInt( $(this).attr('id').replace( 'options-', '' ), 10 );
- }
-
- var nonce = $(this).attr('href').replace( '#nonce=', '' );
- var connection = $(this).data( 'connection' );
- showOptionsPage.call( this, service, nonce, connection, blogId );
- });
-
- /**
- * Kicks off tests for all connections
- */
- publicizeConnTestStart = function() {
- $( '.pub-connection-test' )
- .addClass( 'test-in-progress' );
- $.post( ajaxurl, { action: 'test_publicize_conns' }, publicizeConnTestComplete );
- };
-
- publicizeConnRefreshClick = function( event ) {
- event.preventDefault();
- var popupURL = event.currentTarget.href;
- var popupTitle = event.currentTarget.title;
- // open a popup window
- // when it is closed, kick off the tests again
- var popupWin = window.open( popupURL, popupTitle, '' );
- var popupWinTimer= window.setInterval( function() {
- if ( popupWin.closed !== false ) {
- window.clearInterval( popupWinTimer );
- publicizeConnTestStart();
- }
- }, 500 );
- };
-
- publicizeConnTestComplete = function( response ) {
- $( '.pub-connection-test' ).removeClass( 'test-in-progress' );
-
- $.each( response.data, function( index, testResult ) {
- // find the li for this connection
- var testSelector = '#pub-connection-test-' + testResult.connectionID;
- if ( testResult.connectionTestPassed ) {
- $( testSelector )
- .addClass( 'test-passed' )
- .html( '' )
- .removeClass( 'test-failed' );
- } else {
- $( testSelector )
- .addClass( 'test-failed' )
- .html( '<p><span class="pub-connection-error">' + testResult.connectionTestMessage + '</span></p>' )
- .removeClass( 'test-passed' );
-
- if ( testResult.userCanRefresh ) {
- $( testSelector )
- .append( '<br/>' );
- $( '<a/>', {
- 'class' : 'pub-refresh-button button',
- 'title' : testResult.refreshText,
- 'href' : testResult.refreshURL,
- 'text' : testResult.refreshText,
- 'target' : '_refresh_' + testResult.serviceName
- } )
- .appendTo( testSelector )
- .click( publicizeConnRefreshClick );
- }
- }
- } );
- };
-
- $( document ).ready( function() {
- // If we have at least one .pub-connection-test div present, kick off the connection test
- if ( $( '.pub-connection-test' ).length ) {
- publicizeConnTestStart();
- }
- } );
-
-} );
diff --git a/plugins/jetpack/modules/publicize/assets/publicize.min.css b/plugins/jetpack/modules/publicize/assets/publicize.min.css
deleted file mode 100644
index fd7b8c59..00000000
--- a/plugins/jetpack/modules/publicize/assets/publicize.min.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-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}@media screen and (min-width:782px){.left,.right{width:50%;float:left}div.publicize-service-entry:last-of-type{border-width:0}}div#facebook:before{color:#3b5998;content:'\f203'}div#twitter:before{color:#1da1f2;content:'\f610'}div#linkedin:before{color:#0077b5;content:'\f207'}div#tumblr:before{color:#35465c;content:'\f214'}div#google_plus:before{color:#dd4b39;content:'\f206'}div.publicize-service-left:before{font:normal 30px/1 social-logos;vertical-align:middle}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 0;border-bottom:1px #eee solid;margin-right:40px;overflow:hidden}.right 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:18px;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-bottom-color:#ccc;border-bottom-style:none;border-bottom-width:0;border-left-color:#ccc;border-left-style:none;border-left-width:0;border-right-color:#ccc;border-right-style:none;border-right-width:0;border-top-color:#ccc;border-top-style:none;border-top-width:0;color:#ccc;display:inline;font-size:20px;font-style:normal;font-weight:400;height:auto;line-height:22px;list-style-image:none;list-style-position:outside;list-style-type:none;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;outline-color:#ccc;outline-style:none;outline-width:0;overflow-y:visible;padding-bottom:0;padding-left:0;padding-right:0;padding-top: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{padding-right:20px}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 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}.pub-connection-test. test-failed p{margin-top:0} \ 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
deleted file mode 100644
index 33ea3813..00000000
--- a/plugins/jetpack/modules/publicize/assets/rtl/publicize-rtl.css
+++ /dev/null
@@ -1,200 +0,0 @@
-/* This file was automatically generated on Mar 01 2018 13:02:41 */
-
-div#publicize-services-block {
- display: block;
- clear: both;
- margin-bottom: 25px;
- background-color: #fff;
- padding: 25px 20px 5px 25px;
- overflow: hidden;
- max-width: 1200px;
-}
-
-/* Add the logos for the Publicize services */
-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 ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
-div#twitter { background: url( ../publicize-twitter-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
-div#linkedin { background: url( ../publicize-linkedin-2x.png )no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
-div#tumblr { background: url( ../publicize-tumblr-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
-div#path { background: url( ../publicize-path-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
-div#google_plus { background: url( ../publicize-google-2x.png ) no-repeat; background-size: 32px 32px; padding-right: 42px;background-position: 0px 0px;padding-top:5px; }
-
-a.publicize-profile-link, a.publicize-profile-link:visited {
- text-decoration: none;
- font-weight: bold;
-}
-
-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 0;
- border-bottom: 1px #eee solid;
- margin-left: 40px;
- overflow: hidden;
-}
-
-div.publicize-service-entry:last-of-type{
- border-width: 0px;
-}
-
-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-bottom-color: #CCC;
- border-bottom-style: none;
- border-bottom-width: 0px;
- border-right-color: #CCC;
- border-right-style: none;
- border-right-width: 0px;
- border-left-color: #CCC;
- border-left-style: none;
- border-left-width: 0px;
- border-top-color: #CCC;
- border-top-style: none;
- border-top-width: 0px;
- color: #CCC;
- display: inline;
- font-family: sans-serif;
- font-size: 20px;
- font-style: normal;
- font-weight: normal;
- height: auto;
- line-height: 22px;
- list-style-image: none;
- list-style-position: outside;
- list-style-type: none;
- margin-bottom: 0px;
- margin-right: 0px;
- margin-left: 0px;
- margin-top: 0px;
- outline-color: #CCC;
- outline-style: none;
- outline-width: 0px;
- overflow-y: visible;
- padding-bottom: 0px;
- padding-right: 0px;
- padding-left: 0px;
- padding-top: 0px;
- 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 {
- padding-left: 20px;
-}
-
-table#option-profile td.thumbnail {
- padding-left: 20px;
-}
-
-table#option-profile td.details {
- font-weight: bold; color: #333333
-}
-
-table#option-fb-fanpage td, table#option-fanpage td {
- font-family: "Lucida Grande",Verdana,Arial,sans-serif;
- vertical-align: middle;
-}
-
-table#option-fb-fanpage td.thumbnail, table#option-fanpage td.thumbnail {
- padding: 5px 20px 5px 20px;
-}
-
-table#option-fb-fanpage td.details, table#option-fanpage td.details {
- width: 130px;
- padding-left: 10px;
-}
-
-table#option-fb-fanpage td.details span.name, table#option-fanpage td.details span.name {
- font-weight: bold; color: #333333;
-}
-
-table#option-fb-fanpage td.details span.category, table#option-fanpage td.details span.category {
- font-size: 10px; color: #888888;
-}
-
-input.fb-options {
- font-family: "Lucida Grande",Verdana,Arial,sans-serif;
- font-size: 12px;
-}
-
-.pub-connection-error {
- color: #ff0000;
-}
diff --git a/plugins/jetpack/modules/publicize/assets/spinner.gif b/plugins/jetpack/modules/publicize/assets/spinner.gif
deleted file mode 100644
index 6e5bace6..00000000
--- a/plugins/jetpack/modules/publicize/assets/spinner.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/publicize/assets/tumblr-logo.png b/plugins/jetpack/modules/publicize/assets/tumblr-logo.png
deleted file mode 100644
index ac26184e..00000000
--- a/plugins/jetpack/modules/publicize/assets/tumblr-logo.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/publicize/assets/twitter-logo.png b/plugins/jetpack/modules/publicize/assets/twitter-logo.png
deleted file mode 100644
index f8ab3aa2..00000000
--- a/plugins/jetpack/modules/publicize/assets/twitter-logo.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/publicize/publicize-jetpack.php b/plugins/jetpack/modules/publicize/publicize-jetpack.php
index 8ab8e95c..b2ec20e8 100644
--- a/plugins/jetpack/modules/publicize/publicize-jetpack.php
+++ b/plugins/jetpack/modules/publicize/publicize-jetpack.php
@@ -13,13 +13,11 @@ class Publicize extends Publicize_Base {
add_action( 'wp_ajax_publicize_facebook_options_page', array( $this, 'options_page_facebook' ) );
add_action( 'wp_ajax_publicize_twitter_options_page', array( $this, 'options_page_twitter' ) );
add_action( 'wp_ajax_publicize_linkedin_options_page', array( $this, 'options_page_linkedin' ) );
- add_action( 'wp_ajax_publicize_google_plus_options_page', array( $this, 'options_page_google_plus' ) );
add_action( 'wp_ajax_publicize_tumblr_options_save', array( $this, 'options_save_tumblr' ) );
add_action( 'wp_ajax_publicize_facebook_options_save', array( $this, 'options_save_facebook' ) );
add_action( 'wp_ajax_publicize_twitter_options_save', array( $this, 'options_save_twitter' ) );
add_action( 'wp_ajax_publicize_linkedin_options_save', array( $this, 'options_save_linkedin' ) );
- add_action( 'wp_ajax_publicize_google_plus_options_save', array( $this, 'options_save_google_plus' ) );
add_action( 'load-settings_page_sharing', array( $this, 'force_user_connection' ) );
@@ -117,7 +115,11 @@ class Publicize extends Publicize_Base {
}
function get_all_connections() {
- return Jetpack_Options::get_option( 'publicize_connections' );
+ $connections = Jetpack_Options::get_option( 'publicize_connections' );
+ if ( isset( $connections['google_plus'] ) ) {
+ unset( $connections['google_plus'] );
+ }
+ return $connections;
}
function get_connections( $service_name, $_blog_id = false, $_user_id = false ) {
@@ -239,12 +241,11 @@ class Publicize extends Publicize_Base {
function globalization() {
if ( 'on' == $_REQUEST['global'] ) {
$globalize_connection = $_REQUEST['connection'];
-
if ( ! current_user_can( $this->GLOBAL_CAP ) ) {
return;
}
- $this->globalize_connection( $connection_id );
+ $this->globalize_connection( $globalize_connection );
}
}
@@ -298,7 +299,6 @@ class Publicize extends Publicize_Base {
'twitter' => array(),
'linkedin' => array(),
'tumblr' => array(),
- 'google_plus' => array(),
);
if ( 'all' == $filter ) {
@@ -674,10 +674,6 @@ class Publicize extends Publicize_Base {
Publicize_UI::options_page_other( 'linkedin' );
}
- function options_page_google_plus() {
- Publicize_UI::options_page_other( 'google_plus' );
- }
-
function options_save_twitter() {
$this->options_save_other( 'twitter' );
}
@@ -686,10 +682,6 @@ class Publicize extends Publicize_Base {
$this->options_save_other( 'linkedin' );
}
- function options_save_google_plus() {
- $this->options_save_other( 'google_plus' );
- }
-
function options_save_other( $service_name ) {
// Nonce check
check_admin_referer( 'save_' . $service_name . '_token_' . $_REQUEST['connection'] );
diff --git a/plugins/jetpack/modules/publicize/publicize.php b/plugins/jetpack/modules/publicize/publicize.php
index 5821a871..73632d4e 100644
--- a/plugins/jetpack/modules/publicize/publicize.php
+++ b/plugins/jetpack/modules/publicize/publicize.php
@@ -40,7 +40,7 @@ abstract class Publicize_Base {
* 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
*/
- public $GLOBAL_CAP = 'edit_others_posts';
+ public $GLOBAL_CAP = 'publish_posts';
/**
* Sets up the basics of Publicize
@@ -119,7 +119,7 @@ abstract class Publicize_Base {
add_action( 'init', array( $this, 'add_post_type_support' ) );
add_action( 'init', array( $this, 'register_post_meta' ), 20 );
- add_action( 'init', array( $this, 'register_gutenberg_extension' ), 30 );
+ add_action( 'jetpack_register_gutenberg_extensions', array( $this, 'register_gutenberg_extension' ) );
}
/*
@@ -140,6 +140,10 @@ abstract class Publicize_Base {
*/
abstract function get_services( $filter = 'all', $_blog_id = false, $_user_id = false );
+ function can_connect_service( $service_name ) {
+ return true;
+ }
+
/**
* Does the given user have a connection to the service on the given blog?
*
@@ -204,9 +208,6 @@ abstract class Publicize_Base {
case 'linkedin':
return 'LinkedIn';
break;
- case 'google_plus':
- return 'Google+';
- break;
case 'twitter':
case 'facebook':
case 'tumblr':
@@ -331,10 +332,6 @@ abstract class Publicize_Base {
return 'http://' . $cmeta['connection_data']['meta']['tumblr_base_hostname'];
} elseif ( 'twitter' == $service_name ) {
return 'https://twitter.com/' . substr( $cmeta['external_display'], 1 ); // Has a leading '@'
- } elseif ( 'google_plus' == $service_name && isset( $cmeta['connection_data']['meta']['google_plus_page'] ) ) {
- return 'https://plus.google.com/' . $cmeta['connection_data']['meta']['google_plus_page'];
- } elseif ( 'google_plus' == $service_name ) {
- return 'https://plus.google.com/' . $cmeta['external_id'];
} else if ( 'linkedin' == $service_name ) {
if ( !isset( $cmeta['connection_data']['meta']['profile_url'] ) ) {
return false;
@@ -430,6 +427,19 @@ abstract class Publicize_Base {
}
/**
+ * LinkedIn needs to be reauthenticated to use v2 of their API.
+ * If it's using LinkedIn old API, it's an 'invalid' connection
+ *
+ * @param object|array The Connection object (WordPress.com) or array (Jetpack)
+ * @return bool
+ */
+ function is_invalid_linkedin_connection( $connection ) {
+ // LinkedIn API v1 included the profile link in the connection data.
+ $connection_meta = $this->get_connection_meta( $connection );
+ return isset( $connection_meta['connection_data']['meta']['profile_url'] );
+ }
+
+ /**
* Whether the Connection currently being connected
*
* @param object|array The Connection object (WordPress.com) or array (Jetpack)
@@ -498,10 +508,17 @@ abstract class Publicize_Base {
if ( ! $this->is_valid_facebook_connection( $connection ) ) {
$connection_test_passed = false;
$user_can_refresh = false;
- $connection_test_message = __( 'Facebook no longer supports Publicize connections to Facebook Profiles, but you can still connect Facebook Pages. Please select a Facebook Page to publish updates to.' );
+ $connection_test_message = __( 'Please select a Facebook Page to publish updates.', 'jetpack' );
}
}
+ // LinkedIn needs reauthentication to be compatible with v2 of their API
+ if ( 'linkedin' === $service_name && $this->is_invalid_linkedin_connection( $connection ) ) {
+ $connection_test_passed = 'must_reauth';
+ $user_can_refresh = false;
+ $connection_test_message = esc_html__( 'Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.', 'jetpack' );
+ }
+
$unique_id = null;
if ( ! empty( $connection->unique_id ) ) {
$unique_id = $connection->unique_id;
@@ -780,9 +797,15 @@ abstract class Publicize_Base {
* Register the Publicize Gutenberg extension
*/
function register_gutenberg_extension() {
- // TODO: Not really a block. The underlying logic doesn't care, so we should rename to
- // `jetpack_register_gutenberg_extension()` (to account for both Gutenblocks and Gutenplugins).
- jetpack_register_block( 'publicize' );
+ // TODO: The `gutenberg/available-extensions` endpoint currently doesn't accept a post ID,
+ // so we cannot pass one to `$this->current_user_can_access_publicize_data()`.
+
+ if ( $this->current_user_can_access_publicize_data() ) {
+ Jetpack_Gutenberg::set_extension_available( 'jetpack/publicize' );
+ } else {
+ Jetpack_Gutenberg::set_extension_unavailable( 'jetpack/publicize', 'unauthorized' );
+
+ }
}
/**
@@ -1030,6 +1053,12 @@ abstract class Publicize_Base {
if ( ! $this->post_type_is_publicizeable( $post_type ) ) {
return $messages;
}
+
+ // Bail early if the post is private.
+ if ( 'publish' !== $post->post_status ) {
+ return $messages;
+ }
+
$view_post_link_html = '';
$viewable = is_post_type_viewable( $post_type_object );
if ( $viewable ) {
diff --git a/plugins/jetpack/modules/publicize/ui.php b/plugins/jetpack/modules/publicize/ui.php
index 1cadc21d..43a6c05f 100644
--- a/plugins/jetpack/modules/publicize/ui.php
+++ b/plugins/jetpack/modules/publicize/ui.php
@@ -10,6 +10,9 @@ class Publicize_UI {
*/
public $publicize;
+ /**
+ * @var string URL to Sharing settings page in wordpress.com
+ */
protected $publicize_settings_url = '';
/**
@@ -24,13 +27,7 @@ class Publicize_UI {
}
function init() {
- $this->publicize_settings_url = apply_filters_deprecated(
- 'jetpack_override_publicize_settings_url',
- array( admin_url( 'options-general.php?page=sharing' ) ),
- '6.7',
- false,
- __( 'This filter will be removed in a future version of Jetpack', 'jetpack' )
- );
+ $this->publicize_settings_url = publicize_calypso_url();
// Show only to users with the capability required to manage their Publicize connections.
if ( ! $this->publicize->current_user_can_access_publicize_data() ) {
@@ -50,13 +47,13 @@ class Publicize_UI {
}
/**
- * If the ShareDaddy plugin is not active we need to add the sharing settings page to the menu still
- */
+ * If the ShareDaddy plugin is not active we need to add the sharing settings page to the menu still
+ */
function sharing_menu() {
add_submenu_page(
'options-general.php',
- __( 'Sharing Settings', 'jetpack' ),
- __( 'Sharing', 'jetpack' ),
+ esc_html__( 'Sharing Settings', 'jetpack' ),
+ esc_html__( 'Sharing', 'jetpack' ),
'publish_posts',
'sharing',
array( $this, 'wrapper_admin_page' )
@@ -64,20 +61,21 @@ class Publicize_UI {
}
function wrapper_admin_page() {
- Jetpack_Admin_Page::wrap_ui( array( $this, 'management_page' ), array( 'is-wide' => true ) );
+ Jetpack_Admin_Page::wrap_ui( array( $this, 'management_page' ) );
}
+
/**
- * Management page to load if Sharedaddy is not active so the 'pre_admin_screen_sharing' action exists.
- */
+ * Management page to load if Sharedaddy is not active so the 'pre_admin_screen_sharing' action exists.
+ */
function management_page() { ?>
<div class="wrap">
<div class="icon32" id="icon-options-general"><br /></div>
- <h1><?php _e( 'Sharing Settings', 'jetpack' ); ?></h1>
+ <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 action is documented in modules/sharedaddy/sharing.php */
+ do_action( 'pre_admin_screen_sharing' );
+ ?>
</div> <?php
}
@@ -87,50 +85,7 @@ class Publicize_UI {
* JS for the options and switching
*/
function load_assets() {
- wp_enqueue_script(
- 'publicize',
- Jetpack::get_file_url_for_environment(
- '_inc/build/publicize/assets/publicize.min.js',
- 'modules/publicize/assets/publicize.js'
- ),
- array( 'jquery', 'thickbox' ),
- '20121019'
- );
- if ( is_rtl() ) {
- wp_enqueue_style( 'publicize', plugins_url( 'assets/rtl/publicize-rtl.css', __FILE__ ), array(), '20180301' );
- } else {
- wp_enqueue_style( 'publicize', plugins_url( 'assets/publicize.css', __FILE__ ), array(), '20180301' );
- }
-
Jetpack_Admin_Page::load_wrapper_styles();
- wp_enqueue_style( 'social-logos' );
-
- add_thickbox();
- }
-
- public static function connected_notice( $service_name ) { ?>
- <div class='updated'>
- <p><?php
-
- if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
- $platform = 'WordPress.com';
- } else {
- $platform = 'Jetpack';
- }
-
- printf(
- /* translators: %1$s: Service Name (Facebook, Twitter, ...), %2$s: Site type (WordPress.com or Jetpack) */
- __( 'You have successfully connected your %1$s account with %2$s.', 'jetpack' ),
- Publicize::get_service_label( $service_name ),
- $platform
- ); ?></p>
- </div><?php
- }
-
- public static function denied_notice() { ?>
- <div class='updated'>
- <p><?php _e ( "You have chosen not to connect your blog. Please click 'accept' when prompted if you wish to connect your accounts.", 'jetpack' ); ?></p>
- </div><?php
}
/**
@@ -138,201 +93,21 @@ class Publicize_UI {
* looks exactly like Publicize v1 for now, UI and functionality updates will come after the move to keyring
*/
function admin_page() {
- $override_publicize_settings_page = apply_filters_deprecated(
- 'jetpack_override_publicize_settings_page',
- array( false ),
- '6.7',
- false,
- __( 'This filter will be removed in a future version of Jetpack', 'jetpack' )
- );
-
- if ( $override_publicize_settings_page ) {
- echo $override_publicize_settings_page;
- return;
- }
-
- $_blog_id = get_current_blog_id();
- ?>
-
- <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.com/support/publicize/";
- } else {
- $doc_link = "http://en.support.wordpress.com/publicize/";
- }
- ?>
-
- <p>&rarr; <a href="<?php echo esc_url( $doc_link ); ?>" rel="noopener noreferrer" 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 $service_name => $service ) :
- $connect_url = $this->publicize->connect_url( $service_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( $service_name ); ?>" class="publicize-service-left">
- <a href="<?php echo esc_url( $connect_url ); ?>" id="service-link-<?php echo esc_attr( $service_name ); ?>" target="_top"><?php echo $this->publicize->get_service_label( $service_name ); ?></a>
- </div>
-
-
- <div class="publicize-service-right">
- <?php if ( $this->publicize->is_enabled( $service_name ) && $connections = $this->publicize->get_connections( $service_name ) ) : ?>
- <ul>
- <?php
- foreach( $connections as $c ) :
- $id = $this->publicize->get_connection_id( $c );
- $disconnect_url = $this->publicize->disconnect_url( $service_name, $id );
-
- $cmeta = $this->publicize->get_connection_meta( $c );
- $profile_link = $this->publicize->get_profile_link( $service_name, $c );
- $connection_display = $this->publicize->get_display_name( $service_name, $c );
-
- $options_nonce = wp_create_nonce( 'options_page_' . $service_name . '_' . $id ); ?>
-
- <?php if ( $this->publicize->show_options_popup( $service_name, $c ) ): ?>
- <script type="text/javascript">
- jQuery(document).ready( function($) {
- showOptionsPage.call(
- this,
- '<?php echo esc_js( $service_name ); ?>',
- '<?php echo esc_js( $options_nonce ); ?>',
- '<?php echo esc_js( $id ); ?>'
- );
- } );
- </script>
- <?php endif; ?>
-
- <li class="publicize-connection" data-connection-id="<?php echo esc_attr( $id ); ?>">
- <?php esc_html_e( 'Connected as:', 'jetpack' ); ?>
- <?php
- if ( !empty( $profile_link ) ) : ?>
- <a class="publicize-profile-link" href="<?php echo esc_url( $profile_link ); ?>" target="_top">
- <?php echo esc_html( $connection_display ); ?>
- </a><?php
- else :
- echo esc_html( $connection_display );
- endif;
- ?>
-
- <?php if ( 0 == $cmeta['connection_data']['user_id'] ) : ?>
- <small>(<?php esc_html_e( 'Shared', 'jetpack' ); ?>)</small>
-
- <?php if ( current_user_can( $this->publicize->GLOBAL_CAP ) ) : ?>
- <a class="pub-disconnect-button" title="<?php esc_html_e( 'Disconnect', 'jetpack' ); ?>" href="<?php echo esc_url( $disconnect_url ); ?>" target="_top">×</a>
- <?php endif; ?>
-
- <?php else : ?>
- <a class="pub-disconnect-button" title="<?php esc_html_e( 'Disconnect', 'jetpack' ); ?>" href="<?php echo esc_url( $disconnect_url ); ?>" target="_top">×</a>
- <?php endif; ?>
-
- <br/>
- <div class="pub-connection-test test-in-progress" id="pub-connection-test-<?php echo esc_attr( $id ); ?>" >
- </div>
- </li>
-
- <?php
- endforeach;
- ?>
- </ul>
- <?php endif; ?>
-
-
-
- <?php
- $connections = $this->publicize->get_connections( $service_name );
- if ( empty ( $connections ) ) { ?>
- <a id="<?php echo esc_attr( $service_name ); ?>" class="publicize-add-connection button" href="<?php echo esc_url( $connect_url ); ?>" target="_top"><?php echo esc_html( __( 'Connect', 'jetpack' ) ); ?></a>
- <?php } else { ?>
- <a id="<?php echo esc_attr( $service_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 } ?>
- </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' ) ); ?>' ) ) {
- return true;
- } else {
- 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
-
- }
-
- public static function global_checkbox( $service_name, $id ) {
- global $publicize;
- if ( current_user_can( $publicize->GLOBAL_CAP ) ) : ?>
- <p>
- <input id="globalize_<?php echo $service_name; ?>" type="checkbox" name="global" value="<?php echo wp_create_nonce( 'publicize-globalize-' . $id ) ?>" />
- <label for="globalize_<?php echo $service_name; ?>"><?php _e( 'Make this connection available to all users of this blog?', 'jetpack' ); ?></label>
- </p>
- <?php endif;
- }
-
- function broken_connection( $service_name, $id ) { ?>
- <div id="thickbox-content">
- <div class='error'>
- <p><?php printf(
- /* translators: %s: Service Name (Facebook, Twitter, ...) */
- __( 'There was a problem connecting to %s. Please disconnect and try again.', 'jetpack' ),
- Publicize::get_service_label( $service_name )
- ); ?></p>
- </div>
- </div><?php
- }
-
- public static function options_page_other( $service_name ) {
- // Nonce check
- check_admin_referer( "options_page_{$service_name}_" . $_REQUEST['connection'] );
?>
- <div id="thickbox-content">
- <?php
- ob_start();
- Publicize_UI::connected_notice( $service_name );
- $update_notice = ob_get_clean();
- if ( ! empty( $update_notice ) )
- echo $update_notice;
+ <h2 id="publicize"><?php esc_html_e( 'Publicize', 'jetpack' ) ?></h2>
+ <p><?php esc_html_e( 'Connect social media services to automatically share new posts.', 'jetpack' ) ?></p>
+ <h4><?php
+ printf(
+ wp_kses(
+ __( "We've made some updates to Publicize. Please visit the <a href='%s' class='jptracks' data-jptracks-name='legacy_publicize_settings'>WordPress.com sharing page</a> to manage your publicize connections or use the button below.", 'jetpack' ),
+ array( 'a' => array( 'href' => array(), 'class' => array(), 'data-jptracks-name' => array() ) )
+ ),
+ esc_url( publicize_calypso_url() )
+ );
?>
+ </h4>
- <?php Publicize_UI::global_checkbox( $service_name, $_REQUEST['connection'] ); ?>
-
- <p style="text-align: center;">
- <input type="submit" value="<?php esc_attr_e( 'OK', 'jetpack' ) ?>" class="button <?php echo $service_name; ?>-options save-options" name="save" data-connection="<?php echo esc_attr( $_REQUEST['connection'] ); ?>" rel="<?php echo wp_create_nonce( 'save_'.$service_name.'_token_' . $_REQUEST['connection'] ) ?>" />
- </p> <br />
- </div>
+ <a href="<?php echo esc_url( publicize_calypso_url() ); ?>" class="button button-primary jptracks" data-jptracks-name='legacy_publicize_settings'><?php esc_html_e( 'Publicize Settings', 'jetpack' ); ?></a>
<?php
}
@@ -590,6 +365,23 @@ jQuery( function($) {
list-style: square;
padding-left: 1em;
}
+.publicize__notice-warning {
+ display: block;
+ padding: 7px 10px;
+ margin: 5px 0;
+ border-left-width: 4px;
+ border-left-style: solid;
+ font-size: 12px;
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
+}
+.publicize-external-link {
+ display: block;
+ text-decoration: none;
+ margin-top: 8px;
+}
+.publicize-external-link__text {
+ text-decoration: underline;
+}
#publicize-title:before {
content: "\f237";
font: normal 20px/1 dashicons;
@@ -612,6 +404,10 @@ jQuery( function($) {
.wpas-twitter-length-limit {
color: red;
}
+.publicize__notice-warning .dashicons {
+ font-size: 16px;
+ text-decoration: none;
+}
</style><?php
}
@@ -630,6 +426,24 @@ jQuery( function($) {
}
/**
+ * Extracts the connections that require reauthentication, for example, LinkedIn, when it switched v1 to v2 of its API.
+ *
+ * @return array Connections that must be reauthenticated
+ */
+ function get_must_reauth_connections() {
+ $must_reauth = array();
+ $connections = $this->publicize->get_connections( 'linkedin' );
+ if ( is_array( $connections ) ) {
+ foreach ( $connections as $index => $connection ) {
+ if ( $this->publicize->is_invalid_linkedin_connection( $connection ) ) {
+ $must_reauth[ $index ] = 'LinkedIn';
+ }
+ }
+ }
+ return $must_reauth;
+ }
+
+ /**
* Controls the metabox that is displayed on the post page
* Allows the user to customize the message that will be sent out to the social network, as well as pick which
* networks to publish to. Also displays the character counter and some other information.
@@ -659,6 +473,33 @@ jQuery( function($) {
if ( 0 < count( $connections_data ) ) :
$publicize_form = $this->get_metabox_form_connected( $connections_data );
+ $must_reauth = $this->get_must_reauth_connections();
+ if ( ! empty( $must_reauth ) ) {
+ foreach ( $must_reauth as $connection_name ) {
+ ?>
+ <span class="notice-warning publicize__notice-warning">
+ <?php
+ /* translators: %s is the name of a Pubilicize service like "LinkedIn" */
+ printf( esc_html__(
+ 'Your %s connection needs to be reauthenticated to continue working – head to Sharing to take care of it.',
+ 'jetpack'
+ ), $connection_name );
+ ?>
+ <a
+ class="publicize-external-link"
+ href="<?php echo publicize_calypso_url() ?>"
+ target="_blank"
+ >
+ <span class="publicize-external-link__text"><?php esc_html_e( 'Go to Sharing settings', 'jetpack' ); ?></span>
+ <span class="dashicons dashicons-external"></span>
+ </a>
+ </span>
+ <?php
+ }
+ ?>
+ <?php
+ }
+
$labels = array();
foreach ( $connections_data as $connection_data ) {
if ( ! $connection_data['enabled'] ) {
diff --git a/plugins/jetpack/modules/pwa/class.jetpack-pwa-helpers.php b/plugins/jetpack/modules/pwa/class.jetpack-pwa-helpers.php
index c1b868c3..4ac7602d 100644
--- a/plugins/jetpack/modules/pwa/class.jetpack-pwa-helpers.php
+++ b/plugins/jetpack/modules/pwa/class.jetpack-pwa-helpers.php
@@ -10,9 +10,7 @@ class Jetpack_PWA_Helpers {
}
public static function site_icon_url( $size = 512 ) {
- $url = function_exists( 'get_site_icon_url' )
- ? get_site_icon_url( $size )
- : false;
+ $url = get_site_icon_url( $size );
// Fall back to built-in WordPress icon
if ( ! $url && in_array( $size, self::get_default_manifest_icon_sizes() ) ) {
diff --git a/plugins/jetpack/modules/related-posts.php b/plugins/jetpack/modules/related-posts.php
index ff5583d5..11a71201 100644
--- a/plugins/jetpack/modules/related-posts.php
+++ b/plugins/jetpack/modules/related-posts.php
@@ -1,16 +1,15 @@
<?php
/**
* Module Name: Related posts
- * Module Description: Increase page views by showing related content to your visitors.
- * Jumpstart Description: Keep visitors engaged on your blog by highlighting relevant and new content at the bottom of each published post.
+ * Module 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: Engagement, Jumpstart
- * Additional Search Queries: related, related posts
+ * Feature: Engagement
+ * Additional Search Queries: related, jetpack related posts, related posts for wordpress, related posts, popular posts, popular, related content, related post, contextual, context, contextual related posts, related articles, similar posts, easy related posts, related page, simple related posts, free related posts, related thumbnails, similar, engagement, yet another related posts plugin
*/
class Jetpack_RelatedPosts_Module {
/**
diff --git a/plugins/jetpack/modules/related-posts/class.related-posts-customize.php b/plugins/jetpack/modules/related-posts/class.related-posts-customize.php
index 8349b530..8f15ca69 100644
--- a/plugins/jetpack/modules/related-posts/class.related-posts-customize.php
+++ b/plugins/jetpack/modules/related-posts/class.related-posts-customize.php
@@ -95,7 +95,7 @@ class Jetpack_Related_Posts_Customize {
// If selective refresh is available, implement it.
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial( "$this->prefix", array(
- 'selector' => '.jp-relatedposts',
+ 'selector' => '.jp-relatedposts:not(.jp-relatedposts-block)',
'settings' => $selective_options,
'render_callback' => __CLASS__ . '::render_callback',
'container_inclusive' => false,
@@ -114,24 +114,49 @@ class Jetpack_Related_Posts_Customize {
}
/**
+ * Check whether the current post contains a Related Posts block.
+ *
+ * @since 6.9.0
+ *
+ * @return bool
+ */
+ public static function contains_related_posts_block() {
+ if ( has_block( 'jetpack/related-posts' ) ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* Check that we're in a single post view.
+ * Will return `false` if the current post contains a Related Posts block,
+ * because in that case we want to hide the Customizer controls.
*
* @since 4.4.0
*
* @return bool
*/
public static function is_single() {
+ if ( self::contains_related_posts_block() ) {
+ return false;
+ }
return is_single();
}
/**
* Check that we're not in a single post view.
+ * Will return `false` if the current post contains a Related Posts block,
+ * because in that case we want to hide the Customizer controls.
*
* @since 4.4.0
*
* @return bool
*/
public static function is_not_single() {
+ if ( self::contains_related_posts_block() ) {
+ return false;
+ }
return ! is_single();
}
@@ -147,10 +172,7 @@ class Jetpack_Related_Posts_Customize {
function get_options( $wp_customize ) {
$transport = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
- // Get the correct translated string for preview in WP 4.7 and later.
- $switched_locale = function_exists( 'switch_to_locale' )
- ? switch_to_locale( get_user_locale() )
- : false;
+ $switched_locale = switch_to_locale( get_user_locale() );
$headline = __( 'Related', 'jetpack' );
if ( $switched_locale ) {
restore_previous_locale();
diff --git a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
index fcbe23e7..ebd91cf1 100644
--- a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
+++ b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
@@ -1,8 +1,9 @@
<?php
class Jetpack_RelatedPosts {
- const VERSION = '20150408';
+ const VERSION = '20190204';
const SHORTCODE = 'jetpack-related-posts';
- private static $instance = null;
+
+ private static $instance = null;
private static $instance_raw = null;
/**
@@ -15,10 +16,7 @@ class Jetpack_RelatedPosts {
if ( class_exists('WPCOM_RelatedPosts') && method_exists( 'WPCOM_RelatedPosts', 'init' ) ) {
self::$instance = WPCOM_RelatedPosts::init();
} else {
- self::$instance = new Jetpack_RelatedPosts(
- get_current_blog_id(),
- Jetpack_Options::get_option( 'id' )
- );
+ self::$instance = new Jetpack_RelatedPosts();
}
}
@@ -35,18 +33,13 @@ class Jetpack_RelatedPosts {
if ( class_exists('WPCOM_RelatedPosts') && method_exists( 'WPCOM_RelatedPosts', 'init_raw' ) ) {
self::$instance_raw = WPCOM_RelatedPosts::init_raw();
} else {
- self::$instance_raw = new Jetpack_RelatedPosts_Raw(
- get_current_blog_id(),
- Jetpack_Options::get_option( 'id' )
- );
+ self::$instance_raw = new Jetpack_RelatedPosts_Raw();
}
}
return self::$instance_raw;
}
- protected $_blog_id_local;
- protected $_blog_id_wpcom;
protected $_options;
protected $_allow_feature_toggle;
protected $_blog_charset;
@@ -57,14 +50,10 @@ class Jetpack_RelatedPosts {
/**
* Constructor for Jetpack_RelatedPosts.
*
- * @param int $blog_id_local
- * @param int $blog_id_wpcom
* @uses get_option, add_action, apply_filters
* @return null
*/
- public function __construct( $blog_id_local, $blog_id_wpcom ) {
- $this->_blog_id_local = $blog_id_local;
- $this->_blog_id_wpcom = $blog_id_wpcom;
+ public function __construct() {
$this->_blog_charset = get_option( 'blog_charset' );
$this->_convert_charset = ( function_exists( 'iconv' ) && ! preg_match( '/^utf\-?8$/i', $this->_blog_charset ) );
@@ -76,11 +65,18 @@ class Jetpack_RelatedPosts {
}
// Add Related Posts to the REST API Post response.
- if ( function_exists( 'register_rest_field' ) ) {
- add_action( 'rest_api_init', array( $this, 'rest_register_related_posts' ) );
- }
+ add_action( 'rest_api_init', array( $this, 'rest_register_related_posts' ) );
+
+ jetpack_register_block(
+ 'jetpack/related-posts',
+ array(
+ 'render_callback' => array( $this, 'render_block' ),
+ )
+ );
+ }
- jetpack_register_block( 'related-posts' );
+ protected function get_blog_id() {
+ return Jetpack_Options::get_option( 'id' );
}
/**
@@ -125,17 +121,7 @@ class Jetpack_RelatedPosts {
return;
if ( isset( $_GET['relatedposts'] ) ) {
- $excludes = array();
- if ( isset( $_GET['relatedposts_exclude'] ) ) {
- if ( is_string( $_GET['relatedposts_exclude'] ) ) {
- $excludes = explode( ',', $_GET['relatedposts_exclude'] );
- } elseif ( is_array( $_GET['relatedposts_exclude'] ) ) {
- $excludes = array_values( $_GET['relatedposts_exclude'] );
- }
-
- $excludes = array_unique( array_filter( array_map( 'absint', $excludes ) ) );
- }
-
+ $excludes = $this->parse_numeric_get_arg( 'relatedposts_exclude' );
$this->_action_frontend_init_ajax( $excludes );
} else {
if ( isset( $_GET['relatedposts_hit'], $_GET['relatedposts_origin'], $_GET['relatedposts_position'] ) ) {
@@ -172,13 +158,18 @@ class Jetpack_RelatedPosts {
/**
* Adds a target to the post content to load related posts into if a shortcode for it did not already exist.
+ * Will skip adding the target if the post content contains a Related Posts block.
*
* @filter the_content
* @param string $content
* @returns string
*/
public function filter_add_target_to_dom( $content ) {
- if ( !$this->_found_shortcode ) {
+ if ( has_block( 'jetpack/related-posts', $content ) ) {
+ return $content;
+ }
+
+ if ( ! $this->_found_shortcode ) {
$content .= "\n" . $this->get_target_html();
}
@@ -249,12 +240,203 @@ EOT;
}
/**
+ * ===============
+ * GUTENBERG BLOCK
+ * ===============
+ */
+
+ /**
+ * Echoes out items for the Gutenberg block
+ *
+ * @param array $related_post The post oject.
+ * @param array $block_attributes The block attributes.
+ */
+ public function render_block_item( $related_post, $block_attributes ) {
+ $instance_id = 'related-posts-item-' . uniqid();
+ $label_id = $instance_id . '-label';
+
+ $item_markup = sprintf(
+ '<ul id="%1$s" aria-labelledby="%2$s" class="jp-related-posts-i2__post" role="menuitem">',
+ esc_attr( $instance_id ),
+ esc_attr( $label_id )
+ );
+
+ $item_markup .= sprintf(
+ '<li class="jp-related-posts-i2__post-link"><a id="%1$s" href="%2$s" rel="%4$s">%3$s</a></li>',
+ esc_attr( $label_id ),
+ esc_url( $related_post['url'] ),
+ esc_attr( $related_post['title'] ),
+ esc_attr( $related_post['rel'] )
+ );
+
+ if ( ! empty( $block_attributes['show_thumbnails'] ) && ! empty( $related_post['img']['src'] ) ) {
+ $img_link = sprintf(
+ '<li class="jp-related-posts-i2__post-img-link"><a href="%1$s" rel="%2$s"><img src="%3$s" width="%4$s" alt="%5$s" /></a></li>',
+ esc_url( $related_post['url'] ),
+ esc_attr( $related_post['rel'] ),
+ esc_url( $related_post['img']['src'] ),
+ esc_attr( $related_post['img']['width'] ),
+ esc_attr( $related_post['img']['alt_text'] )
+ );
+
+ $item_markup .= $img_link;
+ }
+
+ if ( $block_attributes['show_date'] ) {
+ $date_tag = sprintf(
+ '<li class="jp-related-posts-i2__post-date">%1$s</li>',
+ esc_html( $related_post['date'] )
+ );
+
+ $item_markup .= $date_tag;
+ }
+
+ if ( ( $block_attributes['show_context'] ) && ! empty( $related_post['context'] ) ) {
+ $context_tag = sprintf(
+ '<li class="jp-related-posts-i2__post-context">%1$s</li>',
+ esc_html( $related_post['context'] )
+ );
+
+ $item_markup .= $context_tag;
+ }
+
+ $item_markup .= '</ul>';
+
+ return $item_markup;
+ }
+
+ /**
+ * Render a related posts row.
+ *
+ * @param array $posts The posts to render into the row.
+ * @param array $block_attributes Block attributes.
+ */
+ public function render_block_row( $posts, $block_attributes ) {
+ $rows_markup = '';
+ foreach ( $posts as $post ) {
+ $rows_markup .= $this->render_block_item( $post, $block_attributes );
+ }
+ return sprintf(
+ '<div class="jp-related-posts-i2__row" data-post-count="%1$s">%2$s</div>',
+ count( $posts ),
+ $rows_markup
+ );
+ }
+
+ /**
+ * Render the related posts markup.
+ *
+ * @param array $attributes Block attributes.
+ * @return string
+ */
+ public function render_block( $attributes ) {
+ $block_attributes = array(
+ 'show_thumbnails' => isset( $attributes['displayThumbnails'] ) && $attributes['displayThumbnails'],
+ 'show_date' => isset( $attributes['displayDate'] ) ? (bool) $attributes['displayDate'] : true,
+ 'show_context' => isset( $attributes['displayContext'] ) && $attributes['displayContext'],
+ 'layout' => isset( $attributes['postLayout'] ) && 'list' === $attributes['postLayout'] ? $attributes['postLayout'] : 'grid',
+ 'size' => ! empty( $attributes['postsToShow'] ) ? absint( $attributes['postsToShow'] ) : 3,
+ );
+
+ $excludes = $this->parse_numeric_get_arg( 'relatedposts_origin' );
+ $related_posts = $this->get_for_post_id(
+ get_the_ID(),
+ array(
+ 'size' => $block_attributes['size'],
+ 'exclude_post_ids' => $excludes,
+ )
+ );
+
+ $display_lower_row = $block_attributes['size'] > 3;
+
+ if ( empty( $related_posts ) ) {
+ return '';
+ }
+
+ switch ( count( $related_posts ) ) {
+ case 2:
+ case 4:
+ case 5:
+ $top_row_end = 2;
+ break;
+
+ default:
+ $top_row_end = 3;
+ break;
+ }
+
+ $upper_row_posts = array_slice( $related_posts, 0, $top_row_end );
+ $lower_row_posts = array_slice( $related_posts, $top_row_end );
+
+ $rows_markup = $this->render_block_row( $upper_row_posts, $block_attributes );
+ if ( $display_lower_row ) {
+ $rows_markup .= $this->render_block_row( $lower_row_posts, $block_attributes );
+ }
+
+ $target_to_dom_priority = has_filter(
+ 'the_content',
+ array( $this, 'filter_add_target_to_dom' )
+ );
+ remove_filter(
+ 'the_content',
+ array( $this, 'filter_add_target_to_dom' ),
+ $target_to_dom_priority
+ );
+
+ /*
+ Below is a hack to get the block content to render correctly.
+
+ This functionality should be covered in /inc/blocks.php but due to an error,
+ this has not been fixed as of this writing.
+
+ Alda has submitted a patch to Core in order to have this issue fixed at
+ https://core.trac.wordpress.org/attachment/ticket/45495/do_blocks.diff and
+ hopefully it makes to to the final RC of WP 5.1.
+ */
+ $priority = has_filter( 'the_content', 'wpautop' );
+ remove_filter( 'the_content', 'wpautop', $priority );
+ add_filter( 'the_content', '_restore_wpautop_hook', $priority + 1 );
+
+ return sprintf(
+ '<nav class="jp-relatedposts-i2" data-layout="%1$s">%2$s</nav>',
+ esc_attr( $block_attributes['layout'] ),
+ $rows_markup
+ );
+ }
+
+ /**
* ========================
* PUBLIC UTILITY FUNCTIONS
* ========================
*/
/**
+ * Parse a numeric GET variable to an array of values.
+ *
+ * @since 6.9.0
+ *
+ * @uses absint
+ *
+ * @param string $arg Name of the GET variable
+ * @return array $result Parsed value(s)
+ */
+ public function parse_numeric_get_arg( $arg ) {
+ $result = array();
+
+ if ( isset( $_GET[ $arg ] ) ) {
+ if ( is_string( $_GET[ $arg ] ) ) {
+ $result = explode( ',', $_GET[ $arg ] );
+ } elseif ( is_array( $_GET[ $arg ] ) ) {
+ $result = array_values( $_GET[ $arg ] );
+ }
+
+ $result = array_unique( array_filter( array_map( 'absint', $result ) ) );
+ }
+
+ return $result;
+ }
+
+ /**
* Gets options set for Jetpack_RelatedPosts and merge with defaults.
*
* @uses Jetpack_Options::get_option, apply_filters
@@ -364,6 +546,7 @@ EOT;
$options = $this->get_options();
$ui_settings_template = <<<EOT
+<p class="description">%s</p>
<ul id="settings-reading-relatedposts-customize">
<li>
<label><input name="jetpack_relatedposts[show_headline]" type="checkbox" value="1" %s /> %s</label>
@@ -385,6 +568,7 @@ EOT;
EOT;
$ui_settings = sprintf(
$ui_settings_template,
+ esc_html__( 'The following settings will impact all related posts on your site, except for those you created via the block editor:', 'jetpack' ),
checked( $options['show_headline'], true, false ),
esc_html__( 'Highlight related content with a heading', 'jetpack' ),
checked( $options['show_thumbnails'], true, false ),
@@ -456,7 +640,7 @@ EOT;
<div class="jp-relatedposts-items jp-relatedposts-items-visual">
<div class="jp-relatedposts-post jp-relatedposts-post0 jp-relatedposts-post-thumbs" data-post-id="0" data-post-format="image">
<a $href_params>
- <img class="jp-relatedposts-post-img" src="https://jetpackme.files.wordpress.com/2014/08/1-wpios-ipad-3-1-viewsite.png?w=350&amp;h=200&amp;crop=1" width="350" alt="Big iPhone/iPad Update Now Available" scale="0">
+ <img class="jp-relatedposts-post-img" src="https://jetpackme.files.wordpress.com/2019/03/cat-blog.png" width="350" alt="Big iPhone/iPad Update Now Available" scale="0">
</a>
<h4 class="jp-relatedposts-post-title">
<a $href_params>Big iPhone/iPad Update Now Available</a>
@@ -466,7 +650,7 @@ EOT;
</div>
<div class="jp-relatedposts-post jp-relatedposts-post1 jp-relatedposts-post-thumbs" data-post-id="0" data-post-format="image">
<a $href_params>
- <img class="jp-relatedposts-post-img" src="https://jetpackme.files.wordpress.com/2014/08/wordpress-com-news-wordpress-for-android-ui-update2.jpg?w=350&amp;h=200&amp;crop=1" width="350" alt="The WordPress for Android App Gets a Big Facelift" scale="0">
+ <img class="jp-relatedposts-post-img" src="https://jetpackme.files.wordpress.com/2019/03/devices.jpg" width="350" alt="The WordPress for Android App Gets a Big Facelift" scale="0">
</a>
<h4 class="jp-relatedposts-post-title">
<a $href_params>The WordPress for Android App Gets a Big Facelift</a>
@@ -476,7 +660,7 @@ EOT;
</div>
<div class="jp-relatedposts-post jp-relatedposts-post2 jp-relatedposts-post-thumbs" data-post-id="0" data-post-format="image">
<a $href_params>
- <img class="jp-relatedposts-post-img" src="https://jetpackme.files.wordpress.com/2014/08/videopresswedding.jpg?w=350&amp;h=200&amp;crop=1" width="350" alt="Upgrade Focus: VideoPress For Weddings" scale="0">
+ <img class="jp-relatedposts-post-img" src="https://jetpackme.files.wordpress.com/2019/03/mobile-wedding.jpg" width="350" alt="Upgrade Focus: VideoPress For Weddings" scale="0">
</a>
<h4 class="jp-relatedposts-post-title">
<a $href_params>Upgrade Focus: VideoPress For Weddings</a>
@@ -585,7 +769,7 @@ EOT;
/**
* Gets an array of related posts that match the given post_id.
*
- * @param int $post_id
+ * @param int $post_id Post which we want to find related posts for.
* @param array $args - params to use when building Elasticsearch filters to narrow down the search domain.
* @uses self::get_options, get_post_type, wp_parse_args, apply_filters
* @return array
@@ -597,19 +781,23 @@ EOT;
$options['size'] = $args['size'];
}
- if ( ! $options['enabled'] || 0 == (int)$post_id || empty( $options['size'] ) || get_post_status( $post_id) !== 'publish' ) {
+ if (
+ ! $options['enabled']
+ || 0 === (int) $post_id
+ || empty( $options['size'] )
+ ) {
return array();
}
$defaults = array(
- 'size' => (int)$options['size'],
- 'post_type' => get_post_type( $post_id ),
- 'post_formats' => array(),
- 'has_terms' => array(),
- 'date_range' => array(),
+ 'size' => (int) $options['size'],
+ 'post_type' => get_post_type( $post_id ),
+ 'post_formats' => array(),
+ 'has_terms' => array(),
+ 'date_range' => array(),
'exclude_post_ids' => array(),
);
- $args = wp_parse_args( $args, $defaults );
+ $args = wp_parse_args( $args, $defaults );
/**
* Filter the arguments used to retrieve a list of Related Posts.
*
@@ -796,7 +984,7 @@ EOT;
*/
protected function _get_coalesced_range( array $date_range ) {
$now = time();
- $coalesce_time = $this->_blog_id_wpcom % 86400;
+ $coalesce_time = $this->get_blog_id() % 86400;
$current_time = $now - strtotime( 'today', $now );
if ( $current_time < $coalesce_time && '01' == date( 'd', $now ) ) {
@@ -837,7 +1025,7 @@ EOT;
$related_posts = array(
array(
'id' => - 1,
- 'url' => 'https://jetpackme.files.wordpress.com/2014/08/1-wpios-ipad-3-1-viewsite.png?w=350&h=200&crop=1',
+ 'url' => 'https://jetpackme.files.wordpress.com/2019/03/cat-blog.png',
'url_meta' => array(
'origin' => 0,
'position' => 0
@@ -849,7 +1037,7 @@ EOT;
'rel' => 'nofollow',
'context' => esc_html__( 'In "Mobile"', 'jetpack' ),
'img' => array(
- 'src' => 'https://jetpackme.files.wordpress.com/2014/08/1-wpios-ipad-3-1-viewsite.png?w=350&h=200&crop=1',
+ 'src' => 'https://jetpackme.files.wordpress.com/2019/03/cat-blog.png',
'width' => 350,
'height' => 200
),
@@ -857,7 +1045,7 @@ EOT;
),
array(
'id' => - 1,
- 'url' => 'https://jetpackme.files.wordpress.com/2014/08/wordpress-com-news-wordpress-for-android-ui-update2.jpg?w=350&h=200&crop=1',
+ 'url' => 'https://jetpackme.files.wordpress.com/2019/03/devices.jpg',
'url_meta' => array(
'origin' => 0,
'position' => 0
@@ -869,7 +1057,7 @@ EOT;
'rel' => 'nofollow',
'context' => esc_html__( 'In "Mobile"', 'jetpack' ),
'img' => array(
- 'src' => 'https://jetpackme.files.wordpress.com/2014/08/wordpress-com-news-wordpress-for-android-ui-update2.jpg?w=350&h=200&crop=1',
+ 'src' => 'https://jetpackme.files.wordpress.com/2019/03/devices.jpg',
'width' => 350,
'height' => 200
),
@@ -877,7 +1065,7 @@ EOT;
),
array(
'id' => - 1,
- 'url' => 'https://jetpackme.files.wordpress.com/2014/08/videopresswedding.jpg?w=350&h=200&crop=1',
+ 'url' => 'https://jetpackme.files.wordpress.com/2019/03/mobile-wedding.jpg',
'url_meta' => array(
'origin' => 0,
'position' => 0
@@ -889,7 +1077,7 @@ EOT;
'rel' => 'nofollow',
'context' => esc_html__( 'In "Mobile"', 'jetpack' ),
'img' => array(
- 'src' => 'https://jetpackme.files.wordpress.com/2014/08/videopresswedding.jpg?w=350&h=200&crop=1',
+ 'src' => 'https://jetpackme.files.wordpress.com/2019/03/mobile-wedding.jpg',
'width' => 350,
'height' => 200
),
@@ -1087,15 +1275,12 @@ EOT;
protected function _generate_related_post_image_params( $post_id ) {
$options = $this->get_options();
$image_params = array(
- 'src' => '',
- 'width' => 0,
- 'height' => 0,
+ 'alt_text' => '',
+ 'src' => '',
+ 'width' => 0,
+ 'height' => 0,
);
- if ( ! $options['show_thumbnails'] ) {
- return $image_params;
- }
-
/**
* Filter the size of the Related Posts images.
*
@@ -1118,7 +1303,7 @@ EOT;
// Try to get post image
if ( class_exists( 'Jetpack_PostImages' ) ) {
- $img_url = '';
+ $img_url = '';
$post_image = Jetpack_PostImages::get_image(
$post_id,
$thumbnail_size
@@ -1134,10 +1319,15 @@ EOT;
}
}
- if ( !empty( $img_url ) ) {
- $image_params['width'] = $thumbnail_size['width'];
+ if ( ! empty( $img_url ) ) {
+ if ( ! empty( $post_image['alt_text'] ) ) {
+ $image_params['alt_text'] = $post_image['alt_text'];
+ } else {
+ $image_params['alt_text'] = '';
+ }
+ $image_params['width'] = $thumbnail_size['width'];
$image_params['height'] = $thumbnail_size['height'];
- $image_params['src'] = Jetpack_PostImages::fit_image_url(
+ $image_params['src'] = Jetpack_PostImages::fit_image_url(
$img_url,
$thumbnail_size['width'],
$thumbnail_size['height']
@@ -1249,7 +1439,7 @@ EOT;
}
$response = wp_remote_post(
- "https://public-api.wordpress.com/rest/v1/sites/{$this->_blog_id_wpcom}/posts/$post_id/related/",
+ "https://public-api.wordpress.com/rest/v1/sites/{$this->get_blog_id()}/posts/$post_id/related/",
array(
'timeout' => 10,
'user-agent' => 'jetpack_related_posts',
@@ -1345,7 +1535,7 @@ EOT;
foreach ( $categories as $category ) {
if ( 'uncategorized' != $category->slug && '' != trim( $category->name ) ) {
$post_cat_context = sprintf(
- _x( 'In "%s"', 'in {category/tag name}', 'jetpack' ),
+ esc_html_x( 'In “%s”', 'in {category/tag name}', 'jetpack' ),
$category->name
);
/**
@@ -1551,7 +1741,7 @@ EOT;
* @return array
*/
public function rest_get_related_posts( $object, $field_name, $request ) {
- return $this->get_for_post_id( $object['id'], array() );
+ return $this->get_for_post_id( $object['id'], array( 'size' => 6 ) );
}
}
diff --git a/plugins/jetpack/modules/related-posts/related-posts-rtl.css b/plugins/jetpack/modules/related-posts/related-posts-rtl.css
index 34d5d361..1ad313f5 100644
--- a/plugins/jetpack/modules/related-posts/related-posts-rtl.css
+++ b/plugins/jetpack/modules/related-posts/related-posts-rtl.css
@@ -1 +1 @@
-#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 0;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;border-bottom:0}#jp-relatedposts .jp-relatedposts-items p{margin-bottom:0}#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a{font-size:inherit;font-weight:400;text-decoration:none;filter:alpha(opacity=100);-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a:hover{text-decoration:underline}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span{display:block;max-width:90%;overflow:hidden;text-overflow:ellipsis}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post span{max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context,#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{opacity:.6}.jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{display:none}#jp-relatedposts .jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt{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}#jp-relatedposts .jp-relatedposts-list .jp-relatedposts-post{clear:both;width:100%}#jp-relatedposts .jp-relatedposts-list .jp-relatedposts-post img.jp-relatedposts-post-img{float:right;overflow:hidden;max-width:33%;margin-left:3%}#jp-relatedposts .jp-relatedposts-list h4.jp-relatedposts-post-title{display:inline-block;max-width:63%}@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-relatedposts .jp-relatedposts-list .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-list h4.jp-relatedposts-post-title{float:none;max-width:100%;margin-left:0}} \ No newline at end of file
+.jp-related-posts-i2__row{display:flex;margin-top:1.5rem}.jp-related-posts-i2__row:first-child{margin-top:0}.jp-related-posts-i2__post{flex-grow:1;flex-basis:0;margin:0 10px;display:flex;flex-direction:column;padding-right:0}.jp-related-posts-i2__row[data-post-count="3"] .jp-related-posts-i2__post{max-width:calc(33% - 20px)}.jp-related-posts-i2__row[data-post-count="1"] .jp-related-posts-i2__post,.jp-related-posts-i2__row[data-post-count="2"] .jp-related-posts-i2__post{max-width:calc(50% - 20px)}.jp-related-posts-i2__post-context,.jp-related-posts-i2__post-date,.jp-related-posts-i2__post-heading,.jp-related-posts-i2__post-img-link{flex-direction:row;display:block}.jp-related-posts-i2__post-heading{margin:.5rem 0;font-size:1rem;line-height:1.2em}.jp-related-posts-i2__post-link{display:block;width:100%;line-height:1.2em}.jp-related-posts-i2__post-img-link{order:-1;line-height:1em}.jp-relatedposts-i2[data-layout=list] .jp-related-posts-i2__post{max-width:none;margin:0}.jp-relatedposts-i2[data-layout=list].jp-related-posts-i2__post-img-link{margin-top:1rem}@media only screen and (max-width:640px){.jp-related-posts-i2__row{margin-top:0;display:block}.jp-related-posts-i2__row[data-post-count] .jp-related-posts-i2__post{max-width:none;margin:0;margin-top:1rem}.jp-related-posts-i2__post-img-link{margin-top:1rem}}.jp-relatedposts:after{content:'';display:block;clear:both}#jp-relatedposts h3.jp-relatedposts-headline{margin:0 0 1em 0;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;-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{-moz-opacity:1;opacity:1}#jp-relatedposts .jp-relatedposts-items p,#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:14px;line-height:20px;margin:0}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs{position:relative}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post-nothumbs a.jp-relatedposts-post-aoverlay{position:absolute;top:0;bottom:0;right:0;left:0;display:block;border-bottom:0}#jp-relatedposts .jp-relatedposts-items p{margin-bottom:0}#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{text-transform:none;margin:0;font-family:inherit;display:block;max-width:100%}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a{font-size:inherit;font-weight:400;text-decoration:none;-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-items .jp-relatedposts-post .jp-relatedposts-post-date{display:none}#jp-relatedposts .jp-relatedposts-items-visual div.jp-relatedposts-post-thumbs p.jp-relatedposts-post-excerpt{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}#jp-relatedposts .jp-relatedposts-list .jp-relatedposts-post{clear:both;width:100%}#jp-relatedposts .jp-relatedposts-list .jp-relatedposts-post img.jp-relatedposts-post-img{float:right;overflow:hidden;max-width:33%;margin-left:3%}#jp-relatedposts .jp-relatedposts-list h4.jp-relatedposts-post-title{display:inline-block;max-width:63%}@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-relatedposts .jp-relatedposts-list .jp-relatedposts-post img.jp-relatedposts-post-img,#jp-relatedposts .jp-relatedposts-list h4.jp-relatedposts-post-title{float:none;max-width:100%;margin-left:0}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/related-posts/related-posts.css b/plugins/jetpack/modules/related-posts/related-posts.css
index 06995030..b75da46d 100644
--- a/plugins/jetpack/modules/related-posts/related-posts.css
+++ b/plugins/jetpack/modules/related-posts/related-posts.css
@@ -2,6 +2,98 @@
* Jetpack related posts
*/
+/**
+ * The Gutenberg block
+ */
+
+.jp-related-posts-i2__row {
+ display: flex;
+ margin-top: 1.5rem;
+}
+
+.jp-related-posts-i2__row:first-child {
+ margin-top: 0;
+}
+
+.jp-related-posts-i2__post {
+ flex-grow: 1;
+ flex-basis: 0;
+ margin: 0 10px;
+ display: flex;
+ flex-direction: column;
+ padding-left: 0;
+}
+
+.jp-related-posts-i2__row[data-post-count="3"] .jp-related-posts-i2__post {
+ max-width: calc(33% - 20px);
+}
+
+.jp-related-posts-i2__row[data-post-count="2"] .jp-related-posts-i2__post,
+.jp-related-posts-i2__row[data-post-count="1"] .jp-related-posts-i2__post {
+ max-width: calc(50% - 20px);
+}
+
+.jp-related-posts-i2__post-heading, .jp-related-posts-i2__post-img-link,
+.jp-related-posts-i2__post-date, .jp-related-posts-i2__post-context {
+ flex-direction: row;
+ display: block;
+}
+
+.jp-related-posts-i2__post-heading {
+ margin: 0.5rem 0;
+ font-size: 1rem;
+ line-height: 1.2em;
+}
+
+.jp-related-posts-i2__post-link {
+ display: block;
+ width: 100%;
+ line-height: 1.2em;
+}
+
+.jp-related-posts-i2__post-img-link {
+ order: -1;
+ line-height: 1em;
+ img {
+ width: 100%;
+ }
+}
+
+/* List view */
+
+.jp-relatedposts-i2[data-layout="list"] .jp-related-posts-i2__row{
+ margin-top: 0;
+ display: block;
+}
+
+.jp-relatedposts-i2[data-layout="list"] .jp-related-posts-i2__post {
+ max-width: none;
+ margin: 0;
+}
+
+.jp-relatedposts-i2[data-layout="list"].jp-related-posts-i2__post-img-link {
+ margin-top: 1rem;
+}
+
+/* Breakpoints */
+@media only screen and (max-width: 640px) {
+ .jp-related-posts-i2__row {
+ margin-top: 0;
+ display: block;
+ }
+ .jp-related-posts-i2__row[data-post-count] .jp-related-posts-i2__post {
+ max-width: none;
+ margin: 0;
+ margin-top: 1rem;
+ }
+ .jp-related-posts-i2__post-img-link {
+ margin-top: 1rem;
+ img {
+ width: 350px;
+ }
+ }
+}
+
/* Container */
#jp-relatedposts {
diff --git a/plugins/jetpack/modules/related-posts/related-posts.js b/plugins/jetpack/modules/related-posts/related-posts.js
index ac2eb0d4..c3cc1c53 100644
--- a/plugins/jetpack/modules/related-posts/related-posts.js
+++ b/plugins/jetpack/modules/related-posts/related-posts.js
@@ -194,6 +194,13 @@
}
};
+ function afterPostsHaveLoaded() {
+ jprp.setVisualExcerptHeights();
+ $( '#jp-relatedposts a.jp-relatedposts-post-a' ).click( function() {
+ this.href = jprp.getTrackedUrl( this );
+ } );
+ }
+
/**
* Initialize Related Posts.
*/
@@ -203,6 +210,11 @@
var endpointURL = jprp.getEndpointURL(),
$relatedPosts = $( '#jp-relatedposts' );
+ if ( $( '#jp-relatedposts .jp-relatedposts-post' ).length ) {
+ afterPostsHaveLoaded();
+ return;
+ }
+
$.getJSON( endpointURL, function( response ) {
if ( 0 === response.items.length || 0 === $relatedPosts.length ) {
return;
@@ -229,15 +241,11 @@
html = ! showThumbnails ? jprp.generateMinimalHtml( response.items, options ) : jprp.generateVisualHtml( response.items, options );
$relatedPosts.append( html );
- jprp.setVisualExcerptHeights();
if ( options.showDate ) {
$relatedPosts.find( '.jp-relatedposts-post-date' ).show();
}
$relatedPosts.show();
-
- $( '#jp-relatedposts a.jp-relatedposts-post-a' ).click(function() {
- this.href = jprp.getTrackedUrl( this );
- });
+ afterPostsHaveLoaded();
} );
}
diff --git a/plugins/jetpack/modules/search.php b/plugins/jetpack/modules/search.php
index 1c3c633e..0f94315b 100644
--- a/plugins/jetpack/modules/search.php
+++ b/plugins/jetpack/modules/search.php
@@ -2,14 +2,14 @@
/**
* Module Name: Search
- * Module Description: Enhanced search, powered by Elasticsearch
+ * Module Description: Enhanced search, powered by Elasticsearch, a powerful replacement for WordPress search.
* First Introduced: 5.0
* Sort Order: 34
* Free: false
* Requires Connection: Yes
* Auto Activate: No
* Feature: Search
- * Additional Search Queries: search
+ * Additional Search Queries: search, elastic, elastic search, elasticsearch, fast search, search results, search performance, google search
* Plans: business
*/
diff --git a/plugins/jetpack/modules/search/class.jetpack-search.php b/plugins/jetpack/modules/search/class.jetpack-search.php
index f44f9770..40867589 100644
--- a/plugins/jetpack/modules/search/class.jetpack-search.php
+++ b/plugins/jetpack/modules/search/class.jetpack-search.php
@@ -150,7 +150,7 @@ class Jetpack_Search {
* @since 5.0.0
*/
public function setup() {
- if ( ! Jetpack::is_active() || ! Jetpack::active_plan_supports( 'search' ) ) {
+ if ( ! Jetpack::is_active() || ! Jetpack_Plan::supports( 'search' ) ) {
return;
}
@@ -243,6 +243,13 @@ class Jetpack_Search {
intval( $this->last_query_info['elapsed_time'] ),
esc_html( $this->last_query_info['es_time'] )
);
+
+ if ( isset( $_GET['searchdebug'] ) ) {
+ printf(
+ '<!-- Query response data: %s -->',
+ esc_html( print_r( $this->last_query_info, 1 ) )
+ );
+ }
}
}
@@ -308,7 +315,7 @@ class Jetpack_Search {
* @param WP_Query $query A WP_Query instance.
*/
public function maybe_add_post_type_as_var( WP_Query $query ) {
- if ( $query->is_main_query() && $query->is_search && ! empty( $_GET['post_type'] ) ) {
+ if ( $this->should_handle_query( $query ) && ! empty( $_GET['post_type'] ) ) {
$post_types = ( is_string( $_GET['post_type'] ) && false !== strpos( $_GET['post_type'], ',' ) )
? $post_type = explode( ',', $_GET['post_type'] )
: (array) $_GET['post_type'];
@@ -442,17 +449,7 @@ class Jetpack_Search {
* @return array Array of matching posts.
*/
public function filter__posts_pre_query( $posts, $query ) {
- /**
- * Determine whether a given WP_Query should be handled by ElasticSearch.
- *
- * @module search
- *
- * @since 5.6.0
- *
- * @param bool $should_handle Should be handled by Jetpack Search.
- * @param WP_Query $query The WP_Query object.
- */
- if ( ! apply_filters( 'jetpack_search_should_handle_query', ( $query->is_main_query() && $query->is_search() ), $query ) ) {
+ if ( ! $this->should_handle_query( $query ) ) {
return $posts;
}
@@ -500,7 +497,7 @@ class Jetpack_Search {
* @param WP_Query $query The original WP_Query to use for the parameters of our search.
*/
public function do_search( WP_Query $query ) {
- if ( ! $query->is_main_query() || ! $query->is_search() ) {
+ if ( ! $this->should_handle_query( $query ) ) {
return;
}
@@ -1610,7 +1607,20 @@ class Jetpack_Search {
} // End foreach().
} // End foreach().
- return $aggregation_data;
+ /**
+ * Modify the aggregation filters returned by get_filters().
+ *
+ * Useful if you are setting custom filters outside of the supported filters (taxonomy, post_type etc.) and
+ * want to hook them up so they're returned when you call `get_filters()`.
+ *
+ * @module search
+ *
+ * @since 6.9.0
+ *
+ * @param array $aggregation_data The array of filters keyed on label.
+ * @param WP_Query $query The WP_Query object.
+ */
+ return apply_filters( 'jetpack_search_get_filters', $aggregation_data, $query );
}
/**
@@ -1802,6 +1812,27 @@ class Jetpack_Search {
}
/**
+ * Determine whether a given WP_Query should be handled by ElasticSearch.
+ *
+ * @param WP_Query $query The WP_Query object.
+ *
+ * @return bool
+ */
+ public function should_handle_query( $query ) {
+ /**
+ * Determine whether a given WP_Query should be handled by ElasticSearch.
+ *
+ * @module search
+ *
+ * @since 5.6.0
+ *
+ * @param bool $should_handle Should be handled by Jetpack Search.
+ * @param WP_Query $query The WP_Query object.
+ */
+ return apply_filters( 'jetpack_search_should_handle_query', $query->is_main_query() && $query->is_search(), $query );
+ }
+
+ /**
* Transforms an array with fields name as keys and boosts as value into
* shorthand "caret" format.
*
diff --git a/plugins/jetpack/modules/sharedaddy.php b/plugins/jetpack/modules/sharedaddy.php
index 3b06928c..1bfcc35b 100644
--- a/plugins/jetpack/modules/sharedaddy.php
+++ b/plugins/jetpack/modules/sharedaddy.php
@@ -1,8 +1,7 @@
<?php
/**
* Module Name: Sharing
- * Module Description: Allow visitors to 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.
+ * Module Description: Add 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
* First Introduced: 1.1
@@ -10,8 +9,8 @@
* Requires Connection: No
* Auto Activate: Yes
* Module Tags: Social, Recommended
- * Feature: Engagement, Jumpstart
- * Additional Search Queries: share, sharing, sharedaddy, buttons, icons, email, facebook, twitter, google+, linkedin, pinterest, pocket, press this, print, reddit, tumblr
+ * Feature: Engagement
+ * Additional Search Queries: share, sharing, sharedaddy, social buttons, buttons, share facebook, share twitter, social media sharing, social media share, social share, icons, email, facebook, twitter, linkedin, pinterest, pocket, social widget, social media
*/
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 4e486211..04d10acc 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
@@ -97,6 +97,17 @@ body.settings_page_sharing ul.services-hidden {
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
+#available-services .service.share-deprecated,
+#enabled-services .service.share-deprecated {
+ opacity: 0.5;
+ padding: 5px;
+ text-decoration: line-through;
+}
+
+#available-services .service.share-deprecated {
+ display: none;
+}
+
/* Generic style icons */
li.service span:before {
color: #555;
@@ -138,9 +149,6 @@ li.service.share-pocket span:before {
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: '\f203';
}
@@ -320,13 +328,6 @@ body.settings_page_sharing .advanced input[type=submit] {
height:20px;
}
-.preview-google-plus-1 .option-smart-on {
- background: url(images/smart-googleplus1.png) no-repeat top left;
- background-size: 96px 20px;
- width: 96px;
- height: 20px;
-}
-
.preview-tumblr .option-smart-on {
background: url(images/smart-tumblr.png) no-repeat top left;
background-size: 62px 20px;
@@ -354,6 +355,15 @@ body.settings_page_sharing .advanced input[type=submit] {
width: 60px;
height: 20px;
}
+
+.preview-item.share-deprecated {
+ opacity: 0.5;
+}
+
+.preview-item.share-deprecated a span {
+ text-decoration: line-through;
+}
+
@media
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
@@ -377,10 +387,6 @@ body.settings_page_sharing .advanced input[type=submit] {
background-image: url(images/linkedin-smart@2x.png);
}
- .preview-google-plus-1 .option-smart-on {
- background-image: url(images/smart-googleplus1@2x.png);
- }
-
.preview-tumblr .option-smart-on {
background-image: url(images/smart-tumblr@2x.png);
}
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css
index 8b3ba1ce..db5c3771 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:0;width:100%;padding-top:20px;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:#f8f8f8;background-repeat:no-repeat;background-position:center center}#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:normal 18px/1 social-logos;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-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f203'}li.service.share-press-this span:before{content:'\f205'}li.service.share-telegram span:before{content:'\f606'}li.service.share-jetpack-whatsapp span:before{content:'\f608'}li.service.share-skype span:before{content:'\f220'}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 0}.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) no-repeat top left;background-size:76px 17px;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) no-repeat top left;background-size:104px 21px;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) no-repeat top left;background-size:85px 20px;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) no-repeat top left;background-size:60px 20px;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) no-repeat top center;background-size:99px 18px;width:99px;height:20px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) no-repeat top left;background-size:96px 20px;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) no-repeat top left;background-size:62px 20px;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) no-repeat top left;background-size:39px 20px;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) no-repeat top left;background-size:60px 20px;width:60px;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}@media (-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.preview-digg .option-smart-on{background-image:url(images/smart-digg@2x.png)}.preview-reddit .option-smart-on{background-image:url(images/smart-reddit@2x.png)}.preview-facebook .option-smart-on{background-image:url(images/smart-like@2x.png)}.preview-twitter .option-smart-on{background-image:url(images/smart-twitter@2x.png?1)}.preview-linkedin .option-smart-on{background-image:url(images/linkedin-smart@2x.png)}.preview-google-plus-1 .option-smart-on{background-image:url(images/smart-googleplus1@2x.png)}.preview-tumblr .option-smart-on{background-image:url(images/smart-tumblr@2x.png)}.preview-pinterest .option-smart-on{background-image:url(images/smart-pinterest@2x.png)}.preview-pocket .option-smart-on{background-image:url(images/smart-pocket@2x.png)}.preview-skype .option-smart-on{background-image:url(images/smart-skype@2x.png)}}.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:0;width:100%;padding-top:20px;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:#f8f8f8;background-repeat:no-repeat;background-position:center center}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}#available-services .service.share-deprecated,#enabled-services .service.share-deprecated{opacity:.5;padding:5px;text-decoration:line-through}#available-services .service.share-deprecated{display:none}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 social-logos;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-pinterest span:before{content:'\f209'}li.service.share-facebook span:before{content:'\f203'}li.service.share-press-this span:before{content:'\f205'}li.service.share-telegram span:before{content:'\f606'}li.service.share-jetpack-whatsapp span:before{content:'\f608'}li.service.share-skype span:before{content:'\f220'}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 0}.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) no-repeat top left;background-size:76px 17px;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) no-repeat top left;background-size:104px 21px;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) no-repeat top left;background-size:85px 20px;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) no-repeat top left;background-size:60px 20px;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) no-repeat top center;background-size:99px 18px;width:99px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) no-repeat top left;background-size:62px 20px;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) no-repeat top left;background-size:39px 20px;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) no-repeat top left;background-size:60px 20px;width:60px;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}.preview-item.share-deprecated{opacity:.5}.preview-item.share-deprecated a span{text-decoration:line-through}@media (-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.preview-digg .option-smart-on{background-image:url(images/smart-digg@2x.png)}.preview-reddit .option-smart-on{background-image:url(images/smart-reddit@2x.png)}.preview-facebook .option-smart-on{background-image:url(images/smart-like@2x.png)}.preview-twitter .option-smart-on{background-image:url(images/smart-twitter@2x.png?1)}.preview-linkedin .option-smart-on{background-image:url(images/linkedin-smart@2x.png)}.preview-tumblr .option-smart-on{background-image:url(images/smart-tumblr@2x.png)}.preview-pinterest .option-smart-on{background-image:url(images/smart-pinterest@2x.png)}.preview-pocket .option-smart-on{background-image:url(images/smart-pocket@2x.png)}.preview-skype .option-smart-on{background-image:url(images/smart-skype@2x.png)}}.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 3702d08c..f7093186 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.css
@@ -96,6 +96,17 @@ body.settings_page_sharing ul.services-hidden {
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
+#available-services .service.share-deprecated,
+#enabled-services .service.share-deprecated {
+ opacity: 0.5;
+ padding: 5px;
+ text-decoration: line-through;
+}
+
+#available-services .service.share-deprecated {
+ display: none;
+}
+
/* Generic style icons */
li.service span:before {
color: #555;
@@ -137,9 +148,6 @@ li.service.share-pocket span:before {
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: '\f203';
}
@@ -319,13 +327,6 @@ body.settings_page_sharing .advanced input[type=submit] {
height:20px;
}
-.preview-google-plus-1 .option-smart-on {
- background: url(images/smart-googleplus1.png) no-repeat top left;
- background-size: 96px 20px;
- width: 96px;
- height: 20px;
-}
-
.preview-tumblr .option-smart-on {
background: url(images/smart-tumblr.png) no-repeat top left;
background-size: 62px 20px;
@@ -353,6 +354,15 @@ body.settings_page_sharing .advanced input[type=submit] {
width: 60px;
height: 20px;
}
+
+.preview-item.share-deprecated {
+ opacity: 0.5;
+}
+
+.preview-item.share-deprecated a span {
+ text-decoration: line-through;
+}
+
@media
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
@@ -376,10 +386,6 @@ body.settings_page_sharing .advanced input[type=submit] {
background-image: url(images/linkedin-smart@2x.png);
}
- .preview-google-plus-1 .option-smart-on {
- background-image: url(images/smart-googleplus1@2x.png);
- }
-
.preview-tumblr .option-smart-on {
background-image: url(images/smart-tumblr@2x.png);
}
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing.js b/plugins/jetpack/modules/sharedaddy/admin-sharing.js
index f546c7fb..04a65f5a 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing.js
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.js
@@ -128,7 +128,8 @@
!$( this ).hasClass( 'preview-print' ) &&
!$( this ).hasClass( 'preview-telegram' ) &&
!$( this ).hasClass( 'preview-jetpack-whatsapp' ) &&
- !$( this ).hasClass( 'share-custom' ) ) {
+ !$( this ).hasClass( 'share-custom' ) &&
+ !$( this ).hasClass( 'share-deprecated' ) ) {
$( this ).find( '.option a span' ).html( '' ).parent().removeClass( 'sd-button' ).parent().attr( 'class', 'option option-smart-on' );
}
} );
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css b/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
index 649f3cf9..e572752d 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-#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:0;width:100%;padding-top:20px;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:#f8f8f8;background-repeat:no-repeat;background-position:center center}#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:normal 18px/1 social-logos;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-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f203'}li.service.share-press-this span:before{content:'\f205'}li.service.share-telegram span:before{content:'\f606'}li.service.share-jetpack-whatsapp span:before{content:'\f608'}li.service.share-skype span:before{content:'\f220'}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 0}.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) no-repeat top left;background-size:76px 17px;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) no-repeat top left;background-size:104px 21px;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) no-repeat top left;background-size:85px 20px;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) no-repeat top left;background-size:60px 20px;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) no-repeat top center;background-size:99px 18px;width:99px;height:20px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) no-repeat top left;background-size:96px 20px;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) no-repeat top left;background-size:62px 20px;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) no-repeat top left;background-size:39px 20px;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) no-repeat top left;background-size:60px 20px;width:60px;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}@media (-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.preview-digg .option-smart-on{background-image:url(images/smart-digg@2x.png)}.preview-reddit .option-smart-on{background-image:url(images/smart-reddit@2x.png)}.preview-facebook .option-smart-on{background-image:url(images/smart-like@2x.png)}.preview-twitter .option-smart-on{background-image:url(images/smart-twitter@2x.png?1)}.preview-linkedin .option-smart-on{background-image:url(images/linkedin-smart@2x.png)}.preview-google-plus-1 .option-smart-on{background-image:url(images/smart-googleplus1@2x.png)}.preview-tumblr .option-smart-on{background-image:url(images/smart-tumblr@2x.png)}.preview-pinterest .option-smart-on{background-image:url(images/smart-pinterest@2x.png)}.preview-pocket .option-smart-on{background-image:url(images/smart-pocket@2x.png)}.preview-skype .option-smart-on{background-image:url(images/smart-skype@2x.png)}}.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:0;width:100%;padding-top:20px;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:#f8f8f8;background-repeat:no-repeat;background-position:center center}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}#available-services .service.share-deprecated,#enabled-services .service.share-deprecated{opacity:.5;padding:5px;text-decoration:line-through}#available-services .service.share-deprecated{display:none}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:normal 18px/1 social-logos;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-pinterest span:before{content:'\f209'}li.service.share-facebook span:before{content:'\f203'}li.service.share-press-this span:before{content:'\f205'}li.service.share-telegram span:before{content:'\f606'}li.service.share-jetpack-whatsapp span:before{content:'\f608'}li.service.share-skype span:before{content:'\f220'}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 0}.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) no-repeat top left;background-size:76px 17px;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) no-repeat top left;background-size:104px 21px;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) no-repeat top left;background-size:85px 20px;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) no-repeat top left;background-size:60px 20px;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) no-repeat top center;background-size:99px 18px;width:99px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) no-repeat top left;background-size:62px 20px;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) no-repeat top left;background-size:39px 20px;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) no-repeat top left;background-size:60px 20px;width:60px;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}.preview-item.share-deprecated{opacity:.5}.preview-item.share-deprecated a span{text-decoration:line-through}@media (-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.preview-digg .option-smart-on{background-image:url(images/smart-digg@2x.png)}.preview-reddit .option-smart-on{background-image:url(images/smart-reddit@2x.png)}.preview-facebook .option-smart-on{background-image:url(images/smart-like@2x.png)}.preview-twitter .option-smart-on{background-image:url(images/smart-twitter@2x.png?1)}.preview-linkedin .option-smart-on{background-image:url(images/linkedin-smart@2x.png)}.preview-tumblr .option-smart-on{background-image:url(images/smart-tumblr@2x.png)}.preview-pinterest .option-smart-on{background-image:url(images/smart-pinterest@2x.png)}.preview-pocket .option-smart-on{background-image:url(images/smart-pocket@2x.png)}.preview-skype .option-smart-on{background-image:url(images/smart-skype@2x.png)}}.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/googleplus1.png b/plugins/jetpack/modules/sharedaddy/images/googleplus1.png
deleted file mode 100644
index 7f07e5bc..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/googleplus1.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png b/plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png
deleted file mode 100644
index 41c0096f..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/googleplus1@2x.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/icon-googleplus-2x.png b/plugins/jetpack/modules/sharedaddy/images/icon-googleplus-2x.png
deleted file mode 100644
index 60dd1c03..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/icon-googleplus-2x.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/icon-googleplus.png b/plugins/jetpack/modules/sharedaddy/images/icon-googleplus.png
deleted file mode 100644
index ee687af1..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/icon-googleplus.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png b/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png
deleted file mode 100644
index 8fd1a836..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png b/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png
deleted file mode 100644
index 1708c484..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/smart-googleplus1@2x.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/sharing-service.php b/plugins/jetpack/modules/sharedaddy/sharing-service.php
index ec7bb0b6..3f86053e 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing-service.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing-service.php
@@ -41,7 +41,6 @@ class Sharing_Service {
* Gets a list of all available service names and classes
*/
public function get_all_services( $include_custom = true ) {
- global $wp_version;
// Default services
// if you update this list, please update the REST API tests
// in bin/tests/api/suites/SharingTest.php
@@ -51,13 +50,15 @@ class Sharing_Service {
'linkedin' => 'Share_LinkedIn',
'reddit' => 'Share_Reddit',
'twitter' => 'Share_Twitter',
- 'google-plus-1' => 'Share_GooglePlus1',
'tumblr' => 'Share_Tumblr',
'pinterest' => 'Share_Pinterest',
'pocket' => 'Share_Pocket',
'telegram' => 'Share_Telegram',
'jetpack-whatsapp' => 'Jetpack_Share_WhatsApp',
'skype' => 'Share_Skype',
+
+ // Deprecated
+ 'google-plus-1' => 'Share_GooglePlus1',
);
/**
@@ -74,7 +75,7 @@ class Sharing_Service {
$services['email'] = 'Share_Email';
}
- if ( is_multisite() && ( version_compare( $wp_version, '4.9-RC1-42107', '<' ) || is_plugin_active( 'press-this/press-this-plugin.php' ) ) ) {
+ if ( is_multisite() && is_plugin_active( 'press-this/press-this-plugin.php' ) ) {
$services['press-this'] = 'Share_PressThis';
}
@@ -577,6 +578,10 @@ function sharing_maybe_enqueue_scripts() {
}
function sharing_add_footer() {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return;
+ }
+
global $jetpack_sharing_counts;
/**
@@ -792,8 +797,15 @@ function sharing_display( $text = '', $echo = false ) {
// Visible items
$visible = '';
foreach ( $enabled['visible'] as $id => $service ) {
+ $klasses = array( 'share-' . $service->get_class() );
+ if ( $service->is_deprecated() ) {
+ if ( ! current_user_can( 'manage_options' ) ) {
+ continue;
+ }
+ $klasses[] = 'share-deprecated';
+ }
// Individual HTML for sharing service
- $visible .= '<li class="share-' . $service->get_class() . '">' . $service->get_display( $post ) . '</li>';
+ $visible .= '<li class="' . implode( ' ', $klasses ) . '">' . $service->get_display( $post ) . '</li>';
}
$parts = array();
@@ -832,7 +844,14 @@ function sharing_display( $text = '', $echo = false ) {
$count = 1;
foreach ( $enabled['hidden'] as $id => $service ) {
// Individual HTML for sharing service
- $sharing_content .= '<li class="share-' . $service->get_class() . '">';
+ $klasses = array( 'share-' . $service->get_class() );
+ if ( $service->is_deprecated() ) {
+ if ( ! current_user_can( 'manage_options' ) ) {
+ continue;
+ }
+ $klasses[] = 'share-deprecated';
+ }
+ $sharing_content .= '<li class="' . implode( ' ', $klasses ) . '">';
$sharing_content .= $service->get_display( $post );
$sharing_content .= '</li>';
diff --git a/plugins/jetpack/modules/sharedaddy/sharing-sources.php b/plugins/jetpack/modules/sharedaddy/sharing-sources.php
index a77a6cbf..4ed1d270 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing-sources.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing-sources.php
@@ -30,6 +30,10 @@ abstract class Sharing_Source {
}
}
+ public function is_deprecated() {
+ return false;
+ }
+
public function http() {
return is_ssl() ? 'https' : 'http';
}
@@ -263,11 +267,21 @@ abstract class Sharing_Source {
$klasses[] = 'no-icon';
}
+ $is_deprecated = $this->is_deprecated();
+
$link = sprintf(
'<a rel="nofollow" class="%s" href="javascript:void(0)" title="%s"><span>%s</span></a>',
implode( ' ', $klasses ),
- $this->get_name(),
- $text
+ esc_attr(
+ $is_deprecated
+ ? sprintf( __( 'The %1$s service has shut down. This sharing button is not displayed to your visitors and should be removed.', 'jetpack' ), $this->get_name() )
+ : $this->get_name()
+ ),
+ esc_html(
+ $is_deprecated
+ ? sprintf( __( '%1$s has shut down', 'jetpack' ), $this->get_name() )
+ : $text
+ )
);
$smart = ( $this->smart || $force_smart ) ? 'on' : 'off';
@@ -358,6 +372,62 @@ abstract class Sharing_Source {
}
}
+abstract class Deprecated_Sharing_Source extends Sharing_Source {
+ public $button_style = 'text';
+ public $smart = false;
+ protected $open_link_in_new = false;
+ protected $id;
+ protected $deprecated = true;
+
+ final public function __construct( $id, array $settings ) {
+ $this->id = $id;
+
+ if ( isset( $settings['button_style'] ) ) {
+ $this->button_style = $settings['button_style'];
+ }
+ }
+
+ final public function is_deprecated() {
+ return true;
+ }
+
+ final public function get_share_url( $post_id ) {
+ return get_permalink( $post_id );
+ }
+
+ final public function display_preview( $echo = true, $force_smart = false, $button_style = null ) {
+ return parent::display_preview( $echo, false, $button_style );
+ }
+
+ final public function get_total( $post = false ) {
+ return 0;
+ }
+
+ final public function get_posts_total() {
+ return 0;
+ }
+
+ final public function process_request( $post, array $post_data ) {
+ parent::process_request( $post, $post_data );
+ }
+
+ final public function get_display( $post ) {
+ if ( current_user_can( 'manage_options' ) ) {
+ return $this->display_deprecated( $post );
+ }
+
+ return '';
+ }
+
+ public function display_deprecated( $post ) {
+ return $this->get_link(
+ $this->get_share_url( $post->ID ),
+ sprintf( __( '%1$s has shut down', 'jetpack' ), $this->get_name() ),
+ sprintf( __( 'The %1$s service has shut down. This sharing button is not displayed to your visitors and should be removed.', 'jetpack' ), $this->get_name() )
+ );
+ }
+}
+
abstract class Sharing_Advanced_Source extends Sharing_Source {
public function has_advanced_options() {
return true;
@@ -1057,7 +1127,7 @@ class Share_PressThis extends Sharing_Source {
}
public function process_request( $post, array $post_data ) {
- global $current_user, $wp_version;
+ global $current_user;
$primary_blog = (int) get_user_meta( $current_user->ID, 'primary_blog', true );
if ( $primary_blog ) {
@@ -1088,16 +1158,8 @@ class Share_PressThis extends Sharing_Source {
'u' => rawurlencode( $this->get_share_url( $post->ID ) ),
);
- if ( version_compare( $wp_version, '4.9-RC1-42107', '>=' ) ) {
- $args[ 'url-scan-submit' ] = 'Scan';
- $args[ '_wpnonce' ] = wp_create_nonce( 'scan-site' );
-
- } else { // Remove once 4.9 is the minimum.
- $args['t'] = rawurlencode( $this->get_share_title( $post->ID ) );
- if ( isset( $_GET['sel'] ) ) {
- $args['s'] = rawurlencode( $_GET['sel'] );
- }
- }
+ $args[ 'url-scan-submit' ] = 'Scan';
+ $args[ '_wpnonce' ] = wp_create_nonce( 'scan-site' );
$url = $blog->siteurl . '/wp-admin/press-this.php';
$url = add_query_arg( $args, $url );
@@ -1115,110 +1177,11 @@ class Share_PressThis extends Sharing_Source {
}
}
-class Share_GooglePlus1 extends Sharing_Source {
+class Share_GooglePlus1 extends Deprecated_Sharing_Source {
public $shortname = 'googleplus1';
- public $icon = '\f218';
- private $state = false;
-
- 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 __( 'Google', 'jetpack' );
- }
-
- public function has_custom_button_style() {
- return $this->smart;
- }
-
- 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( $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 );
- }
- }
-
- public function get_state() {
- return $this->state;
- }
-
- public function process_request( $post, array $post_data ) {
-
- if ( isset( $post_data['state'] ) ) {
- $this->state = $post_data['state'];
- }
- // Record stats
- parent::process_request( $post, $post_data );
-
- // Redirect to Google +'s sharing endpoint
- $url = 'https://plus.google.com/share?url=' . rawurlencode( $this->get_share_url( $post->ID ) );
- wp_redirect( $url );
- die();
- }
-
- public function display_footer() {
- global $post;
-
- if ( $this->smart ) { ?>
- <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/platform.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 {
- $this->js_dialog( 'google-plus-1', array( 'width' => 480, 'height' => 550 ) );
- }
- }
-
- public function get_total( $post = false ) {
- global $wpdb, $blog_id;
-
- $name = strtolower( $this->get_id() );
-
- if ( $post == false ) {
- // get total number of shares for service
- return $wpdb->get_var( $wpdb->prepare( 'SELECT SUM( count ) FROM sharing_stats WHERE blog_id = %d AND share_service = %s', $blog_id, $name ) );
- }
-
- // get total shares for a post
- return $wpdb->get_var( $wpdb->prepare( 'SELECT count FROM sharing_stats WHERE blog_id = %d AND post_id = %d AND share_service = %s', $blog_id, $post->ID, $name ) );
+ return __( 'Google+', 'jetpack' );
}
}
@@ -1440,7 +1403,28 @@ class Share_Tumblr extends Sharing_Source {
$target = '_blank';
}
- return '<a target="' . $target . '" href="https://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(\'https://platform.tumblr.com/v1/share_2.png\') top left no-repeat transparent;">' . __( 'Share on Tumblr', 'jetpack' ) . '</a>';
+ /**
+ * If we are looking at a single post, let Tumblr figure out the post type (text, photo, link, quote, chat, or video)
+ * based on the content available on the page.
+ * If we are not looking at a single post, content from other posts can appear on the page and Tumblr will pick that up.
+ * In this case, we want Tumblr to focus on our current post, so we will limit the post type to link, where we can give Tumblr a link to our post.
+ */
+ if ( ! is_single() ) {
+ $posttype = 'data-posttype="link"';
+ } else {
+ $posttype = '';
+ }
+
+ // Documentation: https://www.tumblr.com/docs/en/share_button
+ return sprintf(
+ '<a class="tumblr-share-button" target="%1$s" href="%2$s" data-title="%3$s" data-content="%4$s" title="%5$s"%6$s>%5$s</a>',
+ $target,
+ 'https://www.tumblr.com/share',
+ $this->get_share_title( $post->ID ),
+ $this->get_share_url( $post->ID ),
+ __( 'Share on Tumblr', 'jetpack' ),
+ $posttype
+ );
} else {
return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Tumblr', 'share to', 'jetpack' ), __( 'Click to share on Tumblr', 'jetpack' ), 'share=tumblr' );
}
@@ -1455,10 +1439,10 @@ class Share_Tumblr extends Sharing_Source {
wp_redirect( $url );
die();
}
- // http://www.tumblr.com/share?v=3&u=URL&t=TITLE&s=
+
public function display_footer() {
if ( $this->smart ) {
- ?><script type="text/javascript" src="https://platform.tumblr.com/v1/share.js"></script><?php
+ ?><script id="tumblr-js" type="text/javascript" src="https://assets.tumblr.com/share-button.js"></script><?php
} else {
$this->js_dialog( $this->shortname, array( 'width' => 450, 'height' => 450 ) );
}
@@ -1719,7 +1703,15 @@ class Jetpack_Share_WhatsApp extends Sharing_Source {
}
public function get_display( $post ) {
- return $this->get_link( 'https://api.whatsapp.com/send?text=' . rawurlencode( $this->get_share_title( $post->ID ) . ' ' . $this->get_share_url( $post->ID ) ), _x( 'WhatsApp', 'share to', 'jetpack' ), __( 'Click to share on WhatsApp', 'jetpack' ) );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'WhatsApp', 'share to', 'jetpack' ), __( 'Click to share on WhatsApp', 'jetpack' ), 'share=jetpack-whatsapp' );
+ }
+
+ public function process_request( $post, array $post_data ) {
+ // Record stats
+ parent::process_request( $post, $post_data );
+ $url = 'https://api.whatsapp.com/send?text=' . rawurlencode( $this->get_share_title( $post->ID ) . ' ' . $this->get_share_url( $post->ID ) );
+ wp_redirect( $url );
+ exit;
}
}
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.css b/plugins/jetpack/modules/sharedaddy/sharing.css
index 68ce779a..6bd41be9 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.css
+++ b/plugins/jetpack/modules/sharedaddy/sharing.css
@@ -55,6 +55,14 @@ body.highlander-dark h3.sd-title:before {
display: inline-block;
}
+.sd-content ul li.share-deprecated {
+ opacity: 0.5;
+}
+
+.sd-content ul li.share-deprecated a span {
+ text-decoration: line-through;
+}
+
.sd-block.sd-gplus {
margin: 0 0 .5em 0;
}
@@ -286,12 +294,6 @@ body .sd-content ul li.share-custom.no-icon a span {
.sd-social-icon-text .sd-content li.share-pinterest a:before {
content: '\f210';
}
-.sd-social-icon .sd-content ul li.share-google-plus-1 a:before,
-.sd-social-text .sd-content ul li.share-google-plus-1 a:before,
-.sd-content ul li.share-google-plus-1 div.option.option-smart-off a:before,
-.sd-social-icon-text .sd-content li.share-google-plus-1 a:before {
- content: '\f218';
-}
.sd-social-icon .sd-content ul li.share-facebook a:before,
.sd-social-text .sd-content ul li.share-facebook a:before,
.sd-content ul li.share-facebook div.option.option-smart-off a:before,
@@ -350,6 +352,16 @@ body .sd-content ul li.share-custom.no-icon a span {
color: #fff !important;
}
+
+.sd-social-icon .sd-content ul li.share-deprecated a:before,
+.sd-social-icon-text .sd-content li.share-deprecated a:before,
+.sd-social-official .sd-content li.share-deprecated a:before,
+.sd-content ul li.share-deprecated div.option.option-smart-off a:before {
+ width: 1em;
+ height: 1em;
+ content: "\1F6AB";
+}
+
/* Share count */
.sd-social .sd-button .share-count {
background: #2ea2cc;
@@ -402,15 +414,11 @@ body .sd-content ul li.share-custom.no-icon a span {
/* Individual official buttons */
-.googleplus1_button .g-plus {
- vertical-align: top !important;
-}
-
.reddit_button iframe {
margin-top: 1px;
}
-.pocket_button iframe, .googleplus1_button iframe, .pinterest_button, .twitter_button, .linkedin_button>span {
+.pocket_button iframe, .pinterest_button, .twitter_button, .linkedin_button>span {
margin: 0 !important;
}
@@ -620,11 +628,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-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;
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.js b/plugins/jetpack/modules/sharedaddy/sharing.js
index 52430634..c38877b6 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.js
+++ b/plugins/jetpack/modules/sharedaddy/sharing.js
@@ -192,11 +192,6 @@ if ( sharing_js_options && sharing_js_options.counts ) {
$more_sharing_pane.data( 'justSlid', false );
}, 300 );
- if ( $more_sharing_pane.find( '.share-google-plus-1' ).length ) {
- // The pane needs to stay open for the Google+ Button
- return;
- }
-
$more_sharing_pane.mouseleave( handler_item_leave ).mouseenter( handler_item_enter );
$more_sharing_button.mouseleave( handler_original_leave ).mouseenter( handler_original_enter );
} );
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.php b/plugins/jetpack/modules/sharedaddy/sharing.php
index 0e3d7ee5..b2d4872c 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing.php
@@ -51,6 +51,11 @@ class Sharing_Admin {
wp_enqueue_style( 'social-logos' );
wp_enqueue_script( 'sharing-js-fe', WP_SHARING_PLUGIN_URL . 'sharing.js', array(), 4 );
add_thickbox();
+
+ // On Jetpack sites, make sure we include CSS to style the admin page.
+ if ( ! defined( 'IS_WPCOM' ) || ! IS_WPCOM ) {
+ Jetpack_Admin_Page::load_wrapper_styles();
+ }
}
public function admin_init() {
@@ -148,11 +153,15 @@ class Sharing_Admin {
}
public function output_preview( $service ) {
+
$klasses = array( 'advanced', 'preview-item' );
if ( $service->button_style != 'text' || $service->has_custom_button_style() ) {
$klasses[] = 'preview-' . $service->get_class();
$klasses[] = 'share-' . $service->get_class();
+ if ( $service->is_deprecated() ) {
+ $klasses[] = 'share-deprecated';
+ }
if ( $service->get_class() != $service->get_id() ) {
$klasses[] = 'preview-' . $service->get_id();
@@ -165,8 +174,15 @@ class Sharing_Admin {
}
public function output_service( $id, $service, $show_dropdown = false ) {
+ $title = '';
+ $klasses = array( 'service', 'advanced', 'share-' . $service->get_class() );
+ if ( $service->is_deprecated() ) {
+ $title = sprintf( __( 'The %1$s service has shut down. This sharing button is not displayed to your visitors and should be removed.', 'jetpack' ), $service->get_name() );
+ $klasses[] = 'share-deprecated';
+ }
+
?>
- <li class="service advanced share-<?php echo $service->get_class(); ?>" id="<?php echo $service->get_id(); ?>" tabindex="0">
+ <li class="<?php echo implode( ' ', $klasses ); ?>" id="<?php echo $service->get_id(); ?>" tabindex="0" title="<?php echo esc_attr( $title ); ?>">
<span class="options-left"><?php echo esc_html( $service->get_name() ); ?></span>
<?php if ( 0 === strpos( $service->get_id(), 'custom-' ) || $service->has_advanced_options() ) : ?>
<span class="close"><a href="#" class="remove">&times;</a></span>
@@ -536,6 +552,64 @@ class Sharing_Admin {
}
}
+/**
+ * Callback to get the value for the jetpack_sharing_enabled field.
+ *
+ * When the sharing_disabled post_meta is unset, we follow the global setting in Sharing.
+ * When it is set to 1, we disable sharing on the post, regardless of the global setting.
+ * It is not possible to enable sharing on a post if it is disabled globally.
+ */
+function jetpack_post_sharing_get_value( array $post ) {
+ // if sharing IS disabled on this post, enabled=false, so negate the meta
+ return (bool) ! get_post_meta( $post['id'], 'sharing_disabled', true );
+}
+
+/**
+ * Callback to set sharing_disabled post_meta when the
+ * jetpack_sharing_enabled field is updated.
+ *
+ * When the sharing_disabled post_meta is unset, we follow the global setting in Sharing.
+ * When it is set to 1, we disable sharing on the post, regardless of the global setting.
+ * It is not possible to enable sharing on a post if it is disabled globally.
+ *
+ */
+function jetpack_post_sharing_update_value( $enable_sharing, $post_object ) {
+ if ( $enable_sharing ) {
+ // delete the override if we want to enable sharing
+ return delete_post_meta( $post_object->ID, 'sharing_disabled' );
+ } else {
+ return update_post_meta( $post_object->ID, 'sharing_disabled', true );
+ }
+}
+
+/**
+ * Add Sharing post_meta to the REST API Post response.
+ *
+ * @action rest_api_init
+ * @uses register_rest_field
+ * @link https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/
+ */
+function jetpack_post_sharing_register_rest_field() {
+ $post_types = get_post_types( array( 'public' => true ) );
+ foreach ( $post_types as $post_type ) {
+ register_rest_field(
+ $post_type,
+ 'jetpack_sharing_enabled',
+ array(
+ 'get_callback' => 'jetpack_post_sharing_get_value',
+ 'update_callback' => 'jetpack_post_sharing_update_value',
+ 'schema' => array(
+ 'description' => __( 'Are sharing buttons enabled?', 'jetpack' ),
+ 'type' => 'boolean',
+ ),
+ )
+ );
+ }
+}
+
+// Add Sharing post_meta to the REST API Post response.
+add_action( 'rest_api_init', 'jetpack_post_sharing_register_rest_field' );
+
function sharing_admin_init() {
global $sharing_admin;
diff --git a/plugins/jetpack/modules/shortcodes.php b/plugins/jetpack/modules/shortcodes.php
index ec414573..de7828c6 100644
--- a/plugins/jetpack/modules/shortcodes.php
+++ b/plugins/jetpack/modules/shortcodes.php
@@ -84,10 +84,6 @@ function jetpack_load_shortcodes() {
* @return string $content Replaced post content.
*/
function jetpack_preg_replace_outside_tags( $pattern, $replacement, $content, $search = null ) {
- if ( ! function_exists( 'wp_html_split' ) ) {
- return $content;
- }
-
if ( $search && false === strpos( $content, $search ) ) {
return $content;
}
@@ -116,10 +112,6 @@ function jetpack_preg_replace_outside_tags( $pattern, $replacement, $content, $s
* @return string $content Replaced post content.
*/
function jetpack_preg_replace_callback_outside_tags( $pattern, $callback, $content, $search = null ) {
- if ( ! function_exists( 'wp_html_split' ) ) {
- return $content;
- }
-
if ( $search && false === strpos( $content, $search ) ) {
return $content;
}
@@ -193,4 +185,12 @@ function wpcom_shortcodereverse_parseattr( $attrs ) {
return $attrs;
}
+/**
+ * When an embed service goes away, we can use this handler
+ * to output a link for history's sake.
+ */
+function jetpack_deprecated_embed_handler( $matches, $attr, $url ) {
+ return sprintf( '<a href="%s">%s</a>', esc_url( $url ), esc_html( esc_url( $url ) ) );
+}
+
jetpack_load_shortcodes();
diff --git a/plugins/jetpack/modules/shortcodes/archiveorg-book.php b/plugins/jetpack/modules/shortcodes/archiveorg-book.php
index 8eb73173..88ac328c 100644
--- a/plugins/jetpack/modules/shortcodes/archiveorg-book.php
+++ b/plugins/jetpack/modules/shortcodes/archiveorg-book.php
@@ -8,6 +8,8 @@
* [archiveorg id=goodytwoshoes00newyiala width=480 height=430]
* <iframe src='https://www.archive.org/stream/goodytwoshoes00newyiala?ui=embed#mode/1up' width='480px' height='430px' frameborder='0' ></iframe>
+ *
+ * @package Jetpack
*/
/**
@@ -15,7 +17,7 @@
*
* @since 4.5.0
*
- * @param $atts
+ * @param array $atts Shortcode attributes.
*
* @return int|string
*/
@@ -87,7 +89,7 @@ add_shortcode( 'archiveorg-book', 'jetpack_archiveorg_book_shortcode' );
*
* @since 4.5.0
*
- * @param string $content
+ * @param string $content Post content.
*
* @return mixed
*/
diff --git a/plugins/jetpack/modules/shortcodes/archiveorg.php b/plugins/jetpack/modules/shortcodes/archiveorg.php
index c8e95567..4a335b32 100644
--- a/plugins/jetpack/modules/shortcodes/archiveorg.php
+++ b/plugins/jetpack/modules/shortcodes/archiveorg.php
@@ -8,6 +8,8 @@
* [archiveorg id=Experime1940 width=640 height=480 autoplay=1]
* <iframe src="http://archive.org/embed/Experime1940&autoplay=1&poster=http://archive.org/images/map.png" width="640" height="480" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
+ *
+ * @package Jetpack
*/
/**
@@ -15,7 +17,7 @@
*
* @since 4.5.0
*
- * @param array $atts
+ * @param array $atts Shortcode attributes.
*
* @return int|string
*/
@@ -102,7 +104,7 @@ add_shortcode( 'archiveorg', 'jetpack_archiveorg_shortcode' );
*
* @since 4.5.0
*
- * @param string $content
+ * @param string $content Post content.
*
* @return mixed
*/
@@ -121,9 +123,11 @@ function jetpack_archiveorg_embed_to_shortcode( $content ) {
$url = explode( '&amp;', $match[1] );
$id = 'id=' . $url[0];
- $autoplay = '';
- $poster = '';
- for ( $ii = 1; $ii < count( $url ); $ii++ ) {
+ $autoplay = '';
+ $poster = '';
+ $url_count = count( $url );
+
+ for ( $ii = 1; $ii < $url_count; $ii++ ) {
if ( 'autoplay=1' === $url[ $ii ] ) {
$autoplay = ' autoplay="1"';
}
diff --git a/plugins/jetpack/modules/shortcodes/brightcove.php b/plugins/jetpack/modules/shortcodes/brightcove.php
index 0b9b3c34..5eca5293 100644
--- a/plugins/jetpack/modules/shortcodes/brightcove.php
+++ b/plugins/jetpack/modules/shortcodes/brightcove.php
@@ -1,4 +1,4 @@
-<?php
+<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Brightcove shortcode.
@@ -18,7 +18,12 @@
* to the legacy code.
*/
class Jetpack_Brightcove_Shortcode {
- static $shortcode = 'brightcove';
+ /**
+ * Shortcode name.
+ *
+ * @var string
+ */
+ public static $shortcode = 'brightcove';
/**
* Parse shortcode arguments and render its output.
@@ -55,10 +60,20 @@ class Jetpack_Brightcove_Shortcode {
* @return array
*/
public static function normalize_attributes( $atts ) {
- if ( is_array( $atts ) && 1 == count( $atts ) ) { // this is the case we need to take care of.
+ if ( is_array( $atts ) && 1 === count( $atts ) ) { // this is the case we need to take care of.
$parsed_atts = array();
$params = shortcode_new_to_old_params( $atts );
- $params = apply_filters( 'brightcove_dimensions', $params );
+
+ /**
+ * Filter the Brightcove shortcode parameters.
+ *
+ * @module shortcodes
+ *
+ * @since 4.5.0
+ *
+ * @param string $params String of shortcode parameters.
+ */
+ $params = apply_filters( 'brightcove_dimensions', $params );
parse_str( $params, $parsed_atts );
return $parsed_atts;
@@ -213,7 +228,9 @@ class Jetpack_Brightcove_Shortcode {
$flashvars = trim( add_query_arg( array_map( 'urlencode', $fv ), '' ), '?' );
- $width = $height = null;
+ $width = null;
+ $height = null;
+
if ( ! empty( $attr['w'] ) && ! empty( $attr['h'] ) ) {
$w = abs( (int) $attr['w'] );
$h = abs( (int) $attr['h'] );
diff --git a/plugins/jetpack/modules/shortcodes/crowdsignal.php b/plugins/jetpack/modules/shortcodes/crowdsignal.php
index 4359040c..e2078a68 100644
--- a/plugins/jetpack/modules/shortcodes/crowdsignal.php
+++ b/plugins/jetpack/modules/shortcodes/crowdsignal.php
@@ -124,6 +124,32 @@ CONTAINER;
global $post;
global $content_width;
+ /**
+ * Variables extracted from $atts.
+ *
+ * @var string $survey
+ * @var string $link_text
+ * @var string $poll
+ * @var string $rating
+ * @var string $unique_id
+ * @var string $item_id
+ * @var string $title
+ * @var string $permalink
+ * @var int $cb
+ * @var string $type
+ * @var string $body
+ * @var string $button
+ * @var string $text_color
+ * @var string $back_color
+ * @var string $align
+ * @var string $style
+ * @var int $width
+ * @var int $height
+ * @var int $delay
+ * @var string $visit
+ * @var string $domain
+ * @var string $id
+ */
extract( shortcode_atts( array(
'survey' => null,
'link_text' => 'Take Our Survey',
@@ -209,7 +235,9 @@ CONTAINER;
$item_id = esc_js( $item_id );
- if ( $inline ) {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return sprintf( '<a href="%s" target="_blank">%s</a>', esc_url( $permalink ), esc_html( trim( $title ) ) );
+ } elseif ( $inline ) {
return <<<SCRIPT
<div class="cs-rating pd-rating" id="pd_rating_holder_{$rating}{$item_id}"></div>
<script type="text/javascript" charset="UTF-8"><!--//--><![CDATA[//><!--
@@ -242,12 +270,16 @@ CONTAINER;
}
} elseif ( intval( $poll ) > 0 ) { //poll embed
+ if ( empty( $title ) ) {
+ $title = __( 'Take Our Poll', 'jetpack' );
+ }
+
$poll = intval( $poll );
$poll_url = sprintf( 'https://poll.fm/%d', $poll );
$poll_js = sprintf( 'https://secure.polldaddy.com/p/%d.js', $poll );
- $poll_link = sprintf( '<a href="%s" target="_blank">Take Our Poll</a>', $poll_url );
+ $poll_link = sprintf( '<a href="%s" target="_blank">%s</a>', esc_url( $poll_url ), esc_html( $title ) );
- if ( $no_script ) {
+ if ( $no_script || Jetpack_AMP_Support::is_amp_request() ) {
return $poll_link;
} else {
if ( $type == 'slider' && !$inline ) {
@@ -359,7 +391,7 @@ CONTAINER;
$settings = array();
// Do we want a full embed code or a link?
- if ( $no_script || $inline || $infinite_scroll ) {
+ if ( $no_script || $inline || $infinite_scroll || Jetpack_AMP_Support::is_amp_request() ) {
return $survey_link;
}
@@ -554,6 +586,10 @@ new CrowdsignalShortcode();
if ( ! function_exists( 'crowdsignal_link' ) ) {
// http://polldaddy.com/poll/1562975/?view=results&msg=voted
function crowdsignal_link( $content ) {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return $content;
+ }
+
return preg_replace( '!(?:\n|\A)https?://(polldaddy\.com/poll|poll\.fm)/([0-9]+?)(/.*)?(?:\n|\Z)!i', "\n<script type='text/javascript' charset='utf-8' src='//static.polldaddy.com/p/$2.js'></script><noscript> <a href='https://poll.fm/$2'>View Poll</a></noscript>\n", $content );
}
@@ -562,8 +598,13 @@ if ( ! function_exists( 'crowdsignal_link' ) ) {
add_filter( 'the_content_rss', 'crowdsignal_link', 1 );
}
-wp_oembed_add_provider( '#https?://(.+\.)?polldaddy\.com/.*#i', 'https://api.crowdsignal.com/oembed', true );
+ /**
+ * Note that Core has the oembed of '#https?://survey\.fm/.*#i' as of 5.1.
+ * This should be removed after Core has the current regex is in our minimum version.
+ *
+ * @see https://core.trac.wordpress.org/ticket/46467
+ * @todo Confirm patch landed and remove once 5.2 is the minimum version.
+ */
wp_oembed_add_provider( '#https?://.+\.survey\.fm/.*#i', 'https://api.crowdsignal.com/oembed', true );
-wp_oembed_add_provider( '#https?://poll\.fm/.*#i', 'https://api.crowdsignal.com/oembed', true );
}
diff --git a/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode-rtl.min.css b/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode-rtl.min.css
index 6341bcd6..4342c699 100644
--- a/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode-rtl.min.css
+++ b/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode-rtl.min.css
@@ -1 +1 @@
-.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 *{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;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:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";opacity:.5;direction:ltr;transition:.3s opacity ease-out}.slideshow-window:hover .slideshow-controls{-ms-filter:"progid:DXImageTransform.Microsoft.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(../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;*display:inline;zoom:1;height:32px!important;width:32px!important;line-height:32px!important;text-align:center!important;border-radius:10em!important;transition:.3s 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(../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:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.running{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} \ No newline at end of file
+.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 *{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;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%;opacity:.5;direction:ltr;transition:.3s opacity ease-out}.slideshow-window:hover .slideshow-controls{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(../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;border-radius:10em!important;transition:.3s 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(../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:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.running{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} \ No newline at end of file
diff --git a/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.min.css b/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.min.css
index 6c445e46..9642a647 100644
--- a/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.min.css
+++ b/plugins/jetpack/modules/shortcodes/css/slideshow-shortcode.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-.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 *{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;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:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";opacity:.5;direction:ltr;transition:.3s opacity ease-out}.slideshow-window:hover .slideshow-controls{-ms-filter:"progid:DXImageTransform.Microsoft.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(../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;*display:inline;zoom:1;height:32px!important;width:32px!important;line-height:32px!important;text-align:center!important;border-radius:10em!important;transition:.3s 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(../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:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.running{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} \ No newline at end of file
+.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 *{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;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%;opacity:.5;direction:ltr;transition:.3s opacity ease-out}.slideshow-window:hover .slideshow-controls{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(../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;border-radius:10em!important;transition:.3s 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(../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:nth-child(2){background-position:-34px 8px!important}body div div.slideshow-controls a.running{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} \ No newline at end of file
diff --git a/plugins/jetpack/modules/shortcodes/email-subscribe.php b/plugins/jetpack/modules/shortcodes/email-subscribe.php
new file mode 100644
index 00000000..88c13090
--- /dev/null
+++ b/plugins/jetpack/modules/shortcodes/email-subscribe.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Deprecated. No longer needed.
+ *
+ * @package Jetpack
+ */
diff --git a/plugins/jetpack/modules/shortcodes/getty.php b/plugins/jetpack/modules/shortcodes/getty.php
index c308ed0f..d473e726 100644
--- a/plugins/jetpack/modules/shortcodes/getty.php
+++ b/plugins/jetpack/modules/shortcodes/getty.php
@@ -4,6 +4,8 @@
*
* [getty src="82278805" width="$width" height="$height"]
* <div class="getty embed image" style="background-color:#fff;display:inline-block;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#a7a7a7;font-size:11px;width:100%;max-width:462px;"><div style="padding:0;margin:0;text-align:left;"><a href="http://www.gettyimages.com/detail/82278805" target="_blank" style="color:#a7a7a7;text-decoration:none;font-weight:normal !important;border:none;display:inline-block;">Embed from Getty Images</a></div><div style="overflow:hidden;position:relative;height:0;padding:80.086580% 0 0 0;width:100%;"><iframe src="//embed.gettyimages.com/embed/82278805?et=jGiu6FXXSpJDGf1SnwLV2g&sig=TFVNFtqghwNw5iJQ1MFWnI8f4Y40_sfogfZLhai6SfA=" width="462" height="370" scrolling="no" frameborder="0" style="display:inline-block;position:absolute;top:0;left:0;width:100%;height:100%;"></iframe></div><p style="margin:0;"></p></div>
+ *
+ * @package Jetpack
*/
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
@@ -20,14 +22,14 @@ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
*/
function jetpack_getty_enable_embeds() {
- // Support their oEmbed Endpoint
+ // Support their oEmbed Endpoint.
wp_oembed_add_provider( '#https?://www\.gettyimages\.com/detail/.*#i', 'https://embed.gettyimages.com/oembed/', true );
wp_oembed_add_provider( '#https?://(www\.)?gty\.im/.*#i', 'https://embed.gettyimages.com/oembed/', true );
- // Allow iframes to be filtered to short code (so direct copy+paste can be done)
+ // Allow iframes to be filtered to short code (so direct copy+paste can be done).
add_filter( 'pre_kses', 'wpcom_shortcodereverse_getty' );
- // Actually display the Getty Embed
+ // Actually display the Getty Embed.
add_shortcode( 'getty', 'jetpack_getty_shortcode' );
}
@@ -46,6 +48,11 @@ function jetpack_getty_enable_embeds() {
*/
add_filter( 'oembed_fetch_url', 'getty_add_oembed_endpoint_caller' );
+/**
+ * Filter the embeds to add a caller parameter.
+ *
+ * @param string $provider URL of the oEmbed provider.
+ */
function getty_add_oembed_endpoint_caller( $provider ) {
// By time filter is called, original provider URL has had url, maxwidth,
// maxheight query parameters added.
@@ -56,17 +63,17 @@ function getty_add_oembed_endpoint_caller( $provider ) {
// Set the caller argument to pass to Getty's oembed provider.
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
- // Only include caller for non-private sites
+ // Only include caller for non-private sites.
if ( ! function_exists( 'is_private_blog' ) || ! is_private_blog() ) {
- $host = parse_url( get_bloginfo( 'url' ), PHP_URL_HOST );
+ $host = wp_parse_url( get_bloginfo( 'url' ), PHP_URL_HOST );
}
- // Fall back to WordPress.com
+ // Fall back to WordPress.com.
if ( empty( $host ) ) {
$host = 'wordpress.com';
}
} else {
- $host = parse_url( get_home_url(), PHP_URL_HOST );
+ $host = wp_parse_url( get_home_url(), PHP_URL_HOST );
}
return add_query_arg( 'caller', $host, $provider );
@@ -77,7 +84,7 @@ function getty_add_oembed_endpoint_caller( $provider ) {
*
* @since 4.5.0
*
- * @param string $content
+ * @param string $content Post content.
*
* @return mixed
*/
@@ -89,19 +96,18 @@ function wpcom_shortcodereverse_getty( $content ) {
$regexp = '!<iframe\s+src=[\'"](https?:)?//embed\.gettyimages\.com/embed(/|/?\?assets=)([a-z0-9_-]+(,[a-z0-9_-]+)*)[^\'"]*?[\'"]((?:\s+\w+=[\'"][^\'"]*[\'"])*)((?:[\s\w]*))></iframe>!i';
$regexp_ent = str_replace( '&amp;#0*58;', '&amp;#0*58;|&#0*58;', htmlspecialchars( $regexp, ENT_NOQUOTES ) );
- // Markup pattern for 2017 embed syntax with significant differences from
- // the prior pattern:
+ // Markup pattern for 2017 embed syntax with significant differences from the prior pattern.
$regexp_2017 = '!<a.+?class=\'gie-(single|slideshow)\'.+?gie\.widgets\.load\({([^}]+)}\).+?embed-cdn\.gettyimages\.com/widgets\.js.+?</script>!';
$regexp_2017_ent = str_replace( '&amp;#0*58;', '&amp;#0*58;|&#0*58;', htmlspecialchars( $regexp_2017, ENT_NOQUOTES ) );
- foreach ( array( 'regexp_2017', 'regexp_2017_ent', 'regexp', 'regexp_ent' ) as $reg ) {
- if ( ! preg_match_all( $$reg, $content, $matches, PREG_SET_ORDER ) ) {
+ foreach ( compact( 'regexp_2017', 'regexp_2017_ent', 'regexp', 'regexp_ent' ) as $reg => $regexp ) {
+ if ( ! preg_match_all( $regexp, $content, $matches, PREG_SET_ORDER ) ) {
continue;
}
foreach ( $matches as $match ) {
if ( 'regexp_2017' === $reg || 'regexp_2017_ent' === $reg ) {
- // Extract individual keys from the matched JavaScript object
+ // Extract individual keys from the matched JavaScript object.
$params = $match[2];
if ( ! preg_match_all( '!(?P<key>\w+)\s*:\s*([\'"](?P<value>[^\'"]*?)(px)?[\'"])!', $params, $key_matches, PREG_SET_ORDER ) ) {
continue;
@@ -146,8 +152,10 @@ function wpcom_shortcodereverse_getty( $content ) {
if ( ! empty( $height ) ) {
$shortcode .= ' height="' . esc_attr( $height ) . '"';
}
- // While it does not appear to have any practical impact, Getty has
- // requested that we include TLD in the embed request
+ /*
+ * While it does not appear to have any practical impact, Getty has
+ * requested that we include TLD in the embed request
+ */
if ( ! empty( $tld ) ) {
$shortcode .= ' tld="' . esc_attr( $tld ) . '"';
}
@@ -157,12 +165,12 @@ function wpcom_shortcodereverse_getty( $content ) {
}
}
- // strip out enclosing div and any other markup
+ // strip out enclosing div and any other markup.
$regexp = '%<div class="getty\s[^>]*+>.*?<div[^>]*+>(\[getty[^\]]*+\])\s*</div>.*?</div>%is';
$regexp_ent = str_replace( array( '&amp;#0*58;', '[^&gt;]' ), array( '&amp;#0*58;|&#0*58;', '[^&]' ), htmlspecialchars( $regexp, ENT_NOQUOTES ) );
- foreach ( array( 'regexp', 'regexp_ent' ) as $reg ) {
- if ( ! preg_match_all( $$reg, $content, $matches, PREG_SET_ORDER ) ) {
+ foreach ( compact( 'regexp', 'regexp_ent' ) as $reg => $regexp ) {
+ if ( ! preg_match_all( $regexp, $content, $matches, PREG_SET_ORDER ) ) {
continue;
}
diff --git a/plugins/jetpack/modules/shortcodes/googleapps.php b/plugins/jetpack/modules/shortcodes/googleapps.php
index 8d40e2e5..55c4580e 100644
--- a/plugins/jetpack/modules/shortcodes/googleapps.php
+++ b/plugins/jetpack/modules/shortcodes/googleapps.php
@@ -1,5 +1,4 @@
<?php
-
/**
* Google Docs and Google Calendar Shortcode
*
@@ -33,6 +32,8 @@
*
* Generic
* <iframe src="https://docs.google.com/file/d/0B0SIdZW7iu-zX1RWREJpMXVHZVU/preview" width="640" height="480"></iframe>
+ *
+ * @package Jetpack
*/
add_filter( 'pre_kses', 'googleapps_embed_to_shortcode' );
@@ -43,12 +44,16 @@ add_shortcode( 'googleapps', 'googleapps_shortcode' );
*
* @since 4.5.0
*
- * @param string $content
+ * @param string $content Post content.
*
* @return mixed
*/
function googleapps_embed_to_shortcode( $content ) {
- if ( ! is_string( $content ) || false === stripos( $content, '<iframe' ) && false === stripos( $content, '.google.com' ) ) {
+ if (
+ ! is_string( $content )
+ || false === stripos( $content, '<iframe' )
+ && false === stripos( $content, '.google.com' )
+ ) {
return $content;
}
@@ -59,20 +64,22 @@ function googleapps_embed_to_shortcode( $content ) {
$regexp_noquot = '!<iframe(.*?)src=https://(docs|drive)\.google\.com/[-\.\w/]*?(viewer)\?(.*?)>(.*?)</iframe>!';
$regexp_ent_noquot = str_replace( '&amp;#0*58;', '&amp;#0*58;|&#0*58;', htmlspecialchars( $regexp_noquot, ENT_NOQUOTES ) );
- foreach ( array( 'regexp', 'regexp_ent', 'regexp_squot', 'regexp_ent_squot', 'regexp_noquot', 'regexp_ent_noquot' ) as $reg ) {
- if ( ! preg_match_all( $$reg, $content, $matches, PREG_SET_ORDER ) ) {
+ foreach ( compact( 'regexp', 'regexp_ent', 'regexp_squot', 'regexp_ent_squot', 'regexp_noquot', 'regexp_ent_noquot' ) as $reg => $regexp ) {
+ if ( ! preg_match_all( $regexp, $content, $matches, PREG_SET_ORDER ) ) {
continue;
}
foreach ( $matches as $match ) {
$params = $match[1] . $match[5];
- if ( in_array( $reg, array( 'regexp_ent', 'regexp_ent_squot' ) ) ) {
+ if ( in_array( $reg, array( 'regexp_ent', 'regexp_ent_squot' ), true ) ) {
$params = html_entity_decode( $params );
}
$params = wp_kses_hair( $params, array( 'http' ) );
- $width = $height = 0;
+ $width = 0;
+ $height = 0;
+
if ( isset( $params['width'] ) ) {
$width = (int) $params['width']['value'];
}
@@ -81,14 +88,19 @@ function googleapps_embed_to_shortcode( $content ) {
$height = (int) $params['height']['value'];
}
- // allow the user to specify width greater than 200 inside text widgets
- if ( $width > 400 && isset( $_POST['widget-text'] ) ) {
+ // allow the user to specify width greater than 200 inside text widgets.
+ if (
+ $width > 400
+ // We don't need to check a nonce here. A nonce is already checked "further up" in most code paths.
+ // In the case where no nonce is ever checked, setting this $_POST parameter doesn't do anything the submitter couldn't already do (set the width/height).
+ && isset( $_POST['widget-text'] ) // phpcs:ignore WordPress.Security.NonceVerification.Missing
+ ) {
$width = 200;
$height = 200;
}
$attributes = '';
- if ( isset( $params['width'] ) && '100%' == $params['width']['value'] ) {
+ if ( isset( $params['width'] ) && '100%' === $params['width']['value'] ) {
$width = '100%';
}
@@ -101,7 +113,7 @@ function googleapps_embed_to_shortcode( $content ) {
}
$domain = 'spreadsheets';
- if ( in_array( $match[2], array( 'docs', 'drive', 'www', 'calendar' ) ) ) {
+ if ( in_array( $match[2], array( 'docs', 'drive', 'www', 'calendar' ), true ) ) {
$domain = $match[2];
}
@@ -125,7 +137,7 @@ function googleapps_embed_to_shortcode( $content ) {
*
* @since 4.5.0
*
- * @param array $atts
+ * @param array $atts Shortcode attributes.
*
* @return string
*/
@@ -149,7 +161,7 @@ function googleapps_shortcode( $atts ) {
}
if ( isset( $content_width ) && '560' === $attr['height'] ) {
- $attr['height'] = $content_height = floor( $content_width * 3 / 4 );
+ $attr['height'] = floor( $content_width * 3 / 4 );
}
if ( isset( $atts[0] ) && $atts[0] ) {
@@ -187,28 +199,28 @@ function googleapps_shortcode( $atts ) {
*
* @since 4.5.0
*
- * @param string $domain
- * @param string $dir
+ * @param string $domain Google subdomain.
+ * @param string $dir Subdirectory of the shared URL.
*
* @return bool
*/
function googleapps_validate_domain_and_dir( $domain, $dir ) {
- if ( ! in_array( $domain, array( 'docs', 'drive', 'www', 'spreadsheets', 'calendar' ) ) ) {
+ if ( ! in_array( $domain, array( 'docs', 'drive', 'www', 'spreadsheets', 'calendar' ), true ) ) {
return false;
}
- // Calendars
+ // Calendars.
if ( ( 'www' === $domain || 'calendar' === $domain ) && 'calendar/' !== substr( $dir, 0, 9 ) ) {
return false;
}
- // Docs
- if ( in_array( $domain, array( 'docs', 'drive' ) ) && ! preg_match( '![-\.\w/]*(presentation/embed|presentation/d/(.*)|present/embed|document/pub|spreadsheets/d/(.*)|document/d/(e/)?[\w-]+/pub|file/d/[\w-]+/preview|viewer|forms/d/(.*)/viewform|spreadsheet/\w+)$!', $dir ) ) {
+ // Docs.
+ if ( in_array( $domain, array( 'docs', 'drive' ), true ) && ! preg_match( '![-\.\w/]*(presentation/embed|presentation/d/(.*)|present/embed|document/pub|spreadsheets/d/(.*)|document/d/(e/)?[\w-]+/pub|file/d/[\w-]+/preview|viewer|forms/d/(.*)/viewform|spreadsheet/\w+)$!', $dir ) ) {
return false;
}
- // Spreadsheets
- if ( 'spreadsheets' == $domain && ! preg_match( '!^([-\.\w/]+/pub|[-\.\w/]*embeddedform)$!', $dir ) ) {
+ // Spreadsheets.
+ if ( 'spreadsheets' === $domain && ! preg_match( '!^([-\.\w/]+/pub|[-\.\w/]*embeddedform)$!', $dir ) ) {
return false;
}
@@ -220,8 +232,8 @@ function googleapps_validate_domain_and_dir( $domain, $dir ) {
*
* @since 4.5.0
*
- * @param string $domain
- * @param string $dir
+ * @param string $domain Google subdomain.
+ * @param string $dir Subdirectory of the shared URL.
*
* @return string
*/
@@ -229,10 +241,10 @@ function googleapps_service_name( $domain, $dir ) {
switch ( $domain ) {
case 'drive':
case 'docs':
- $service_name = ( 'present/embed' == $dir ) ? 'googledocs_presentation' : 'googledocs_document';
+ $service_name = ( 'present/embed' === $dir ) ? 'googledocs_presentation' : 'googledocs_document';
break;
case 'spreadsheets':
- $service_name = ( 'embeddedform' == $dir ) ? 'googledocs_form' : 'googledocs_spreadsheet';
+ $service_name = ( 'embeddedform' === $dir ) ? 'googledocs_form' : 'googledocs_spreadsheet';
break;
case 'calendar':
default:
diff --git a/plugins/jetpack/modules/shortcodes/googleplus.php b/plugins/jetpack/modules/shortcodes/googleplus.php
index 950f217c..8c9118e1 100644
--- a/plugins/jetpack/modules/shortcodes/googleplus.php
+++ b/plugins/jetpack/modules/shortcodes/googleplus.php
@@ -2,18 +2,15 @@
/**
* Google+ embeds
+ * Google+ has shut down. Output the link for history's sake.
+ * Other than that, there's not much we can do.
*/
define( 'JETPACK_GOOGLEPLUS_EMBED_REGEX', '#^https?://plus\.(sandbox\.)?google\.com/(u/\d+/)?([^/]+)/posts/([^/]+)$#' );
// Example URL: https://plus.google.com/114986219448604314131/posts/LgHkesWCmJo
// Alternate example: https://plus.google.com/u/0/100004581596612508203/posts/2UKwN67MBQs (note the /u/0/)
-wp_embed_register_handler( 'googleplus', JETPACK_GOOGLEPLUS_EMBED_REGEX, 'jetpack_googleplus_embed_handler' );
-
-function jetpack_googleplus_embed_handler( $matches, $attr, $url ) {
- wp_enqueue_script( 'jetpack-gplus-api', 'https://apis.google.com/js/platform.js', array(), null, true );
- return sprintf( '<div class="g-post" data-href="%s"></div>', esc_url( $url ) );
-}
+wp_embed_register_handler( 'googleplus', JETPACK_GOOGLEPLUS_EMBED_REGEX, 'jetpack_deprecated_embed_handler' );
add_shortcode( 'googleplus', 'jetpack_googleplus_shortcode_handler' );
@@ -28,5 +25,5 @@ function jetpack_googleplus_shortcode_handler( $atts ) {
return;
}
- return $wp_embed->shortcode( $atts, $atts['url'] );
+ return sprintf( '<p>%s</p>', $wp_embed->shortcode( $atts, $atts['url'] ) );
}
diff --git a/plugins/jetpack/modules/shortcodes/gravatar.php b/plugins/jetpack/modules/shortcodes/gravatar.php
index ea248618..cb709af9 100644
--- a/plugins/jetpack/modules/shortcodes/gravatar.php
+++ b/plugins/jetpack/modules/shortcodes/gravatar.php
@@ -6,6 +6,8 @@
*
* [gravatar email="user@example.org" size="48"]
* [gravatar_profile who="user@example.org"]
+ *
+ * @package Jetpack
*/
add_shortcode( 'gravatar', 'jetpack_gravatar_shortcode' );
@@ -63,10 +65,10 @@ function jetpack_gravatar_shortcode( $atts ) {
* @return string
*/
function jetpack_gravatar_profile_shortcode( $atts ) {
- // Give each use of the shortcode a unique ID
+ // Give each use of the shortcode a unique ID.
static $instance = 0;
- // Process passed attributes
+ // Process passed attributes.
$atts = shortcode_atts(
array(
'who' => null,
@@ -75,7 +77,7 @@ function jetpack_gravatar_profile_shortcode( $atts ) {
'jetpack_gravatar_profile'
);
- // Can specify username, user ID, or email address
+ // Can specify username, user ID, or email address.
if ( is_numeric( $atts['who'] ) ) {
$user = get_user_by( 'id', (int) $atts['who'] );
} elseif ( is_email( $atts['who'] ) ) {
@@ -86,12 +88,12 @@ function jetpack_gravatar_profile_shortcode( $atts ) {
$user = false;
}
- // Bail if we don't have a user
+ // Bail if we don't have a user.
if ( false === $user ) {
return false;
}
- // Render the shortcode
+ // Render the shortcode.
$gravatar_url = set_url_scheme( 'http://gravatar.com/' . $user->user_login );
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
@@ -154,7 +156,7 @@ function jetpack_gravatar_profile_shortcode( $atts ) {
</div>
<?php
- // Increment and return the rendered profile
+ // Increment and return the rendered profile.
$instance++;
return ob_get_clean();
diff --git a/plugins/jetpack/modules/shortcodes/hulu.php b/plugins/jetpack/modules/shortcodes/hulu.php
index 93701099..38203d4c 100644
--- a/plugins/jetpack/modules/shortcodes/hulu.php
+++ b/plugins/jetpack/modules/shortcodes/hulu.php
@@ -13,11 +13,13 @@
* <param name="allowFullScreen" value="true"></param>
* <embed src="http://www.hulu.com/embed/gQ6Z0I990IWv_VFQI2J7Eg" type="application/x-shockwave-flash" width="512" height="288" allowFullScreen="true"></embed>
* </object>
+ *
+ * @package Jetpack
*/
if ( get_option( 'embed_autourls' ) ) {
- // Convert hulu URLS to shortcodes for old comments, saved before comments for shortcodes were enabled
+ // Convert hulu URLS to shortcodes for old comments, saved before comments for shortcodes were enabled.
add_filter( 'comment_text', 'jetpack_hulu_link', 1 );
}
@@ -35,13 +37,13 @@ add_shortcode( 'hulu', 'jetpack_hulu_shortcode' );
function jetpack_shortcode_get_hulu_id( $atts ) {
// This will catch an id explicitly defined as such, or assume any param without a label is the id. First found is used.
if ( isset( $atts['id'] ) ) {
- // First we check to see if [hulu id=369061] or [hulu id=gQ6Z0I990IWv_VFQI2J7Eg] was used
+ // First we check to see if [hulu id=369061] or [hulu id=gQ6Z0I990IWv_VFQI2J7Eg] was used.
$id = esc_attr( $atts['id'] );
} elseif ( isset( $atts[0] ) && preg_match( '|www\.hulu\.com/watch/(\d+)|i', $atts[0], $match ) ) {
- // this checks for [hulu http://www.hulu.com/watch/369061]
+ // this checks for [hulu http://www.hulu.com/watch/369061].
$id = (int) $match[1];
} elseif ( isset( $atts[0] ) ) {
- // This checks for [hulu 369061] or [hulu 65yppv6xqa45s5n7_m1wng]
+ // This checks for [hulu 369061] or [hulu 65yppv6xqa45s5n7_m1wng].
$id = esc_attr( $atts[0] );
} else {
$id = 0;
@@ -91,12 +93,18 @@ function jetpack_hulu_shortcode( $atts ) {
}
// check to see if $id is 76560 else we assume it's gQ6Z0I990IWv_VFQI2J7Eg
- // If id is numeric, we'll send it off to the hulu oembed api to get the embed URL (and non-numeric id)
+ // If id is numeric, we'll send it off to the hulu oembed api to get the embed URL (and non-numeric id).
if ( is_numeric( $id ) ) {
- $transient_key = "hulu-$id";
- if ( false === ( $transient_value = get_transient( $transient_key ) ) ) {
- // let's make a cross-site http request out to the hulu oembed api
- $response = wp_remote_get( 'http://www.hulu.com/api/oembed.json?url=' . urlencode( 'http://www.hulu.com/watch/' . esc_attr( $id ) ) );
+ $transient_key = "hulu-$id";
+ $transient_value = get_transient( $transient_key );
+
+ if ( false === $transient_value ) {
+ // let's make a cross-site http request out to the hulu oembed api.
+ $oembed_url = sprintf(
+ 'https://www.hulu.com/api/oembed.json?url=%s',
+ rawurlencode( 'https://www.hulu.com/watch/' . esc_attr( $id ) )
+ );
+ $response = wp_remote_get( $oembed_url );
$response_code = wp_remote_retrieve_response_code( $response );
$response_message = wp_remote_retrieve_response_message( $response );
if ( 200 !== $response_code && ! empty( $response_message ) ) {
@@ -107,9 +115,9 @@ function jetpack_hulu_shortcode( $atts ) {
$response_body = wp_remote_retrieve_body( $response );
$json = json_decode( $response_body );
- // Pull out id from embed url (from oembed API)
+ // Pull out id from embed url (from oembed API).
$embed_url_params = array();
- parse_str( parse_url( $json->embed_url, PHP_URL_QUERY ), $embed_url_params );
+ parse_str( wp_parse_url( $json->embed_url, PHP_URL_QUERY ), $embed_url_params );
if ( isset( $embed_url_params['eid'] ) ) {
$id = $embed_url_params['eid'];
@@ -126,14 +134,6 @@ function jetpack_hulu_shortcode( $atts ) {
return '<!-- Hulu Error: Not a Hulu video. -->';
}
- $width = intval( $attr['width'] );
- $height = round( ( $width / 640 ) * 360 );
-
- $iframe_url = 'http://www.hulu.com/embed.html';
- if ( is_ssl() ) {
- $iframe_url = 'https://secure.hulu.com/embed.html';
- }
-
$query_args = array();
$query_args['eid'] = esc_attr( $id );
if ( isset( $start_time ) ) {
@@ -146,7 +146,9 @@ function jetpack_hulu_shortcode( $atts ) {
$query_args['it'] = 'i' . intval( $thumbnail_frame );
}
- $iframe_url = add_query_arg( $query_args, $iframe_url );
+ $iframe_url = add_query_arg( $query_args, 'https://www.hulu.com/embed.html' );
+ $width = intval( $attr['width'] );
+ $height = round( ( $width / 640 ) * 360 );
$html = sprintf(
'<div class="embed-hulu" style="text-align: center;"><iframe src="%s" width="%s" height="%s" style="border:0;" scrolling="no" webkitAllowFullScreen
@@ -165,18 +167,17 @@ mozallowfullscreen allowfullscreen></iframe></div>',
*
* @since 4.5.0
*
- * @param array $matches
+ * @param array $matches Array of matches from regex.
*
* @return string
*/
function jetpack_hulu_link_callback( $matches ) {
$video_id = $matches[4];
- $src = is_ssl()
- ? 'https://secure.hulu.com'
- : 'http://www.hulu.com';
- // Make up an embed src to pass to the shortcode reversal function
- $attrs['src'] = $src . '/embed.html?eid=' . esc_attr( $video_id );
+ // Make up an embed src to pass to the shortcode reversal function.
+ $attrs = array(
+ 'src' => 'https://www.hulu.com/embed.html?eid=' . esc_attr( $video_id ),
+ );
return wpcom_shortcodereverse_huluhelper( $attrs );
}
@@ -186,7 +187,7 @@ function jetpack_hulu_link_callback( $matches ) {
*
* @since 4.5.0
*
- * @param string $content
+ * @param string $content Post content.
*
* @return string
*/
@@ -201,7 +202,7 @@ function jetpack_hulu_link( $content ) {
*
* @since 4.5.0
*
- * @param array $attrs
+ * @param array $attrs Shortcode attributes.
*
* @return string
*/
@@ -209,7 +210,7 @@ function wpcom_shortcodereverse_huluhelper( $attrs ) {
$attrs = wpcom_shortcodereverse_parseattr( $attrs );
$src_attributes = array();
- parse_str( parse_url( $attrs['src'], PHP_URL_QUERY ), $src_attributes );
+ parse_str( wp_parse_url( $attrs['src'], PHP_URL_QUERY ), $src_attributes );
$attrs = array_merge( $attrs, $src_attributes );
@@ -237,7 +238,7 @@ function wpcom_shortcodereverse_huluhelper( $attrs ) {
}
if ( $attrs['it'] ) {
- // the thumbnail frame attribute comes with an i in front of the value, so we've got to remove that
+ // the thumbnail frame attribute comes with an i in front of the value, so we've got to remove that.
$shortcode .= ' thumbnail_frame=' . intval( ltrim( $attrs['it'], 'i' ) );
}
$shortcode .= ']';
@@ -256,18 +257,19 @@ function wpcom_shortcodereverse_huluhelper( $attrs ) {
*
* @since 4.5.0
*
- * @param array $attrs
+ * @param array $attrs Shortcode attributes.
*
* @return string
*/
function wpcom_shortcodereverse_huluembed( $attrs ) {
$shortcode = wpcom_shortcodereverse_huluhelper( $attrs );
- if ( substr( $shortcode, 0, 1 ) == '[' ) {
+
+ if ( '[' === substr( $shortcode, 0, 1 ) ) {
/** This action is documented in modules/widgets/social-media-icons.php */
do_action( 'jetpack_bump_stats_extras', 'html_to_shortcode', 'hulu-embed' );
}
return $shortcode;
}
-Filter_Embedded_HTML_Objects::register( '#^http://www.hulu.com/embed.html#i', 'wpcom_shortcodereverse_huluembed', true );
+Filter_Embedded_HTML_Objects::register( '#^https?://www.hulu.com/embed.html#i', 'wpcom_shortcodereverse_huluembed', true );
diff --git a/plugins/jetpack/modules/shortcodes/instagram.php b/plugins/jetpack/modules/shortcodes/instagram.php
index fc164d82..656703bd 100644
--- a/plugins/jetpack/modules/shortcodes/instagram.php
+++ b/plugins/jetpack/modules/shortcodes/instagram.php
@@ -21,17 +21,17 @@ function jetpack_instagram_embed_reversal( $content ) {
$regexes = array();
- // new style js
- $regexes[] = '#<blockquote[^>]+?class="instagram-media"[^>](.+?)>(.+?)</blockquote><script[^>]+?src="(https?:)?//platform\.instagram\.com/(.+?)/embeds\.js"></script>#ix';
+ // new style js.
+ $regexes[] = '#<blockquote[^>]+?class="instagram-media"[^>].+?>(.+?)</blockquote><script[^>]+?src="(https?:)?//platform\.instagram\.com/(.+?)/embeds\.js"></script>#ix';
// Let's play nice with the visual editor too.
- $regexes[] = '#&lt;blockquote(?:[^&]|&(?!gt;))+?class="instagram-media"(?:[^&]|&(?!gt;))(.+?)&gt;(.+?)&lt;/blockquote&gt;&lt;script(?:[^&]|&(?!gt;))+?src="(https?:)?//platform\.instagram\.com/(.+?)/embeds\.js"(?:[^&]|&(?!gt;))*+&gt;&lt;/script&gt;#ix';
+ $regexes[] = '#&lt;blockquote(?:[^&]|&(?!gt;))+?class="instagram-media"(?:[^&]|&(?!gt;)).+?&gt;(.+?)&lt;/blockquote&gt;&lt;script(?:[^&]|&(?!gt;))+?src="(https?:)?//platform\.instagram\.com/(.+?)/embeds\.js"(?:[^&]|&(?!gt;))*+&gt;&lt;/script&gt;#ix';
- // old style iframe
- $regexes[] = '#<iframe[^>]+?src="(?:https?:)?//instagram\.com/p/([^"\'/]++)[^"\']*?"[^>]*+>\s*?</iframe>#i';
+ // old style iframe.
+ $regexes[] = '#<iframe[^>]+?src="((?:https?:)?//(?:www\.)?instagram\.com/p/([^"\'/]++)[^"\']*?)"[^>]*+>\s*?</iframe>#i';
// Let's play nice with the visual editor too.
- $regexes[] = '#&lt;iframe(?:[^&]|&(?!gt;))+?src="(?:https?:)?//instagram\.com/p/([^"\'/]++)[^"\']*?"(?:[^&]|&(?!gt;))*+&gt;\s*?&lt;/iframe&gt;#i';
+ $regexes[] = '#&lt;iframe(?:[^&]|&(?!gt;))+?src="((?:https?:)?//(?:www\.)instagram\.com/p/([^"\'/]++)[^"\']*?)"(?:[^&]|&(?!gt;))*+&gt;\s*?&lt;/iframe&gt;#i';
foreach ( $regexes as $regex ) {
if ( ! preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) ) {
@@ -39,7 +39,7 @@ function jetpack_instagram_embed_reversal( $content ) {
}
foreach ( $matches as $match ) {
- if ( ! preg_match( '#(https?:)?//instagr(\.am|am\.com)/p/([^/]*)#i', $match[2], $url_matches ) ) {
+ if ( ! preg_match( '#(https?:)?//(?:www\.)?instagr(\.am|am\.com)/p/([^/]*)#i', $match[1], $url_matches ) ) {
continue;
}
@@ -59,11 +59,28 @@ function jetpack_instagram_embed_reversal( $content ) {
add_filter( 'pre_kses', 'jetpack_instagram_embed_reversal' );
/**
- * Instagram
+ * Instagram's custom Embed provider.
+ * We first remove 2 different embed providers, both registered by Core.
+ * - The first is the original provider,that only supports images.
+ * - The second is tne new provider that replaced the first one in Core when Core added support for videos. https://core.trac.wordpress.org/changeset/44486
+ *
+ * Once the core embed provider is removed (one or the other, depending on your version of Core), we declare our own.
*/
-wp_oembed_remove_provider( '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i' ); // remove core's oEmbed support so we can override
-wp_embed_register_handler( 'jetpack_instagram', '#http(s?)://(www\.)?instagr(\.am|am\.com)/p/([^/]*)#i', 'jetpack_instagram_handler' );
+wp_oembed_remove_provider( '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i' );
+wp_oembed_remove_provider( '#https?://(www\.)?instagr(\.am|am\.com)/(p|tv)/.*#i' );
+wp_embed_register_handler(
+ 'jetpack_instagram',
+ '#http(s?)://(www\.)?instagr(\.am|am\.com)/(p|tv)/([^\/]*)#i',
+ 'jetpack_instagram_handler'
+);
+/**
+ * Handle Instagram embeds (build embed from regex).
+ *
+ * @param array $matches Array of matches from the regex.
+ * @param array $atts The original unmodified attributes.
+ * @param string $url The original URL that was matched by the regex.
+ */
function jetpack_instagram_handler( $matches, $atts, $url ) {
global $content_width;
@@ -74,8 +91,24 @@ 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[4] );
- return sprintf( '<a href="%s" title="%s" target="_blank"><img src="%s" alt="Instagram Photo" /></a>', esc_url( $url ), esc_attr__( 'View on Instagram', 'jetpack' ), esc_url( $media_url ) );
+ // Instagram offers direct links to images, but not to videos.
+ if ( 'p' === $matches[1] ) {
+ $media_url = sprintf( 'http://instagr.am/p/%1$s/media/?size=l', $matches[2] );
+ return sprintf(
+ '<a href="%1$s" title="%2$s" target="_blank"><img src="%3$s" alt="%4$s" /></a>',
+ esc_url( $url ),
+ esc_attr__( 'View on Instagram', 'jetpack' ),
+ esc_url( $media_url ),
+ esc_html__( 'Instagram Photo', 'jetpack' )
+ );
+ } elseif ( 'tv' === $matches[1] ) {
+ return sprintf(
+ '<a href="%1$s" title="%2$s" target="_blank">%3$s</a>',
+ esc_url( $url ),
+ esc_attr__( 'View on Instagram', 'jetpack' ),
+ esc_html__( 'Instagram Video', 'jetpack' )
+ );
+ }
}
$atts = shortcode_atts(
@@ -166,13 +199,32 @@ function jetpack_instagram_handler( $matches, $atts, $url ) {
return '<!-- instagram error: no embed found -->';
}
-// 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' );
+/**
+ * Handle an alternate Instagram URL format, where the username is also part of the URL.
+ * We do not actually need that username for the embed.
+ */
+wp_embed_register_handler(
+ 'jetpack_instagram_alternate_format',
+ '#https?://(?:www\.)?instagr(?:\.am|am\.com)/(?:[^/]*)/(p|tv)/([^\/]*)#i',
+ 'jetpack_instagram_alternate_format_handler'
+);
+
+/**
+ * Handle alternate Instagram embeds (build embed from regex).
+ *
+ * @param array $matches Array of matches from the regex.
+ * @param array $atts The original unmodified attributes.
+ * @param string $url The original URL that was matched by the regex.
+ */
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] );
+ // Replace URL saved by original Instagram URL (no username).
+ $matches[0] = esc_url_raw(
+ sprintf(
+ 'https://www.instagram.com/%1$s/%2$s',
+ $matches[1],
+ $matches[2]
+ )
+ );
return jetpack_instagram_handler( $matches, $atts, $url );
}
diff --git a/plugins/jetpack/modules/shortcodes/kickstarter.php b/plugins/jetpack/modules/shortcodes/kickstarter.php
index cd59f940..1e6664bb 100644
--- a/plugins/jetpack/modules/shortcodes/kickstarter.php
+++ b/plugins/jetpack/modules/shortcodes/kickstarter.php
@@ -4,6 +4,8 @@
*
* Usage:
* [kickstarter url="https://www.kickstarter.com/projects/peaktoplateau/yak-wool-baselayers-from-tibet-to-the-world" width="480" height=""]
+ *
+ * @package Jetpack
*/
add_shortcode( 'kickstarter', 'jetpack_kickstarter_shortcode' );
@@ -24,7 +26,7 @@ function jetpack_kickstarter_shortcode( $atts ) {
}
$url = esc_url_raw( $atts['url'] );
- if ( ! preg_match( '#^(www\.)?kickstarter\.com$#i', parse_url( $url, PHP_URL_HOST ) ) ) {
+ if ( ! preg_match( '#^(www\.)?kickstarter\.com$#i', wp_parse_url( $url, PHP_URL_HOST ) ) ) {
return '<!-- Invalid Kickstarter URL -->';
}
@@ -49,7 +51,7 @@ function jetpack_kickstarter_embed_to_shortcode( $content ) {
}
$regexp = '!<iframe((?:\s+\w+=[\'"][^\'"]*[\'"])*)\s+src=[\'"](http://www\.kickstarter\.com/projects/[^/]+/[^/]+)/[^\'"]+[\'"]((?:\s+\w+=[\'"][^\'"]*[\'"])*)>[\s]*</iframe>!i';
- $regexp_ent = str_replace( '&amp;#0*58;', '&amp;#0*58;|&#0*58;', htmlspecialchars( $regexp, ENT_NOQUOTES ) );
+ $regexp_ent = str_replace( '&amp;#0*58;', '&amp;#0*58;|&#0*58;', htmlspecialchars( $regexp, ENT_NOQUOTES ) ); // phpcs:ignore
foreach ( array( 'regexp', 'regexp_ent' ) as $reg ) {
if ( ! preg_match_all( $$reg, $content, $matches, PREG_SET_ORDER ) ) {
@@ -61,7 +63,7 @@ function jetpack_kickstarter_embed_to_shortcode( $content ) {
$params = $match[1] . $match[3];
- if ( 'regexp_ent' == $reg ) {
+ if ( 'regexp_ent' === $reg ) {
$params = html_entity_decode( $params );
}
diff --git a/plugins/jetpack/modules/shortcodes/lytro.php b/plugins/jetpack/modules/shortcodes/lytro.php
deleted file mode 100644
index 0e222fda..00000000
--- a/plugins/jetpack/modules/shortcodes/lytro.php
+++ /dev/null
@@ -1,296 +0,0 @@
-<?php
-/**
- * Lytro.com Short Code
- *
- * Format:
- * [lytro photo='202' show_arrow='true' show_border='true' show_first_time_user='true' allow_full_view='true']
- * [lytro username='lytroweb' photo='431119']
- *
- * Legend:
- * username: the lytro.com username for newer embed format
- * photo: the ID or the URL of the photo on lytro.com
- * show_arrow: set to false to force-hide the menu in the lower right (not used in v2)
- * show_border: set to true to force-show the border
- * show_first_time_user: set to false to force-disable the first-time user experience (not used in v2)
- * allow_full_view: set to true to allow an external site to have a full-zoom mode (not used in v2)
- * enable_help: set to false to hide the question mark/help popup
- *
- * Output:
- * <iframe width="400" height="415" src="https://www.lytro.com/living-pictures/202/embed?showArrow=true&showBorder=true&showFTU=true" frameborder="0" allowfullscreen></iframe>
- * <iframe width="400" height="415" src="http://pictures.lytro.com/lytroweb/pictures/431119/embed" frameborder="0" allowfullscreen="" scrolling="no"></iframe>
- */
-
-/**
- * Lytro.com Short Code Attributes Definition
- *
- * This helper function returns an array all available
- * shortcode attributes, their validation method, default
- * value and more.
- *
- * Keys:
- * validate: a callable function or regular expression used to validate the input
- * default: default value for shortcode attribute
- * query_arg: the related lytro query argument name
- *
- * @since 4.5.0
- */
-function jetpack_lytro_shortcode_attributes() {
- return array(
- 'username' => array(
- 'default' => '',
- ),
- 'photo' => array( // could be ID or URL, validated separately
- 'default' => 0,
- ),
- 'width' => array(
- 'validate' => '#^\d+$#',
- 'default' => 400,
- ),
- 'height' => array(
- 'validate' => '#^\d+$#',
- 'default' => 415,
- ),
- 'show_arrow' => array(
- 'query_arg' => 'showArrow',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'show_border' => array(
- 'query_arg' => 'showBorder',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'show_first_time_user' => array(
- 'query_arg' => 'showFTU',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'allow_full_view' => array(
- 'query_arg' => 'allowFullView',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'enable_help' => array(
- 'query_arg' => 'enableHelp',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'enable_attribution' => array(
- 'query_arg' => 'enableAttribution',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'enable_logo' => array(
- 'query_arg' => 'enableLogo',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'enable_fullscreen' => array(
- 'query_arg' => 'enableFullscreen',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'enable_play' => array(
- 'query_arg' => 'enablePlay',
- 'validate' => '#^(true|false)$#',
- 'default' => 'true',
- ),
- 'bg_color' => array(
- 'query_arg' => 'bgColor',
- 'validate' => '/^#(?:[0-9a-fA-F]{3}){1,2}$/',
- 'default' => '',
- ),
- );
-}
-
-/**
- * Lytro.com Shortcode
- *
- * Allows embedding Lytro "living pictures" using [lytro photo="200"] or
- * [lytro photo="http://www.lytro.com/..."]. Additional attributes
- * like show_border, show_arrow, etc have priority over the ones supplied
- * in the URL.
- *
- * @since 4.5.0
- *
- * @param array $atts Shortcode attributes
- *
- * @uses jetpack_lytro_shortcode_attributes()
- * @return string Embed HTML or a <!-- commented out error -->
- */
-function jetpack_lytro_shortcode_handler( $atts ) {
- $defaults = array();
- $attributes = jetpack_lytro_shortcode_attributes();
- foreach ( $attributes as $key => $attribute ) {
- if ( isset( $attribute['default'] ) ) {
- $defaults[ $key ] = $attribute['default'];
- }
- }
-
- $atts = shortcode_atts( $defaults, $atts );
-
- // There has to at least be a photo attribute.
- if ( empty( $atts['photo'] ) ) {
- return '<!-- Lytro Shortcode Error: No Photo ID/URL -->';
- }
-
- // The photo attribute might be a URL
- if ( ! is_numeric( $atts['photo'] ) ) {
- $atts = array_merge( $atts, jetpack_lytro_shortcode_url_to_atts( $atts['photo'] ) );
- }
-
- // Validate all attributes by callable function or regular expression.
- foreach ( $atts as $key => $value ) {
- $attribute = $attributes[ $key ];
- if ( isset( $attribute['validate'] ) ) {
- $validate = $attribute['validate'];
- $valid = is_callable( $validate ) ? call_user_func( $validate, $value ) : preg_match( $validate, $value );
- if ( ! $valid ) {
- $atts[ $key ] = $defaults[ $key ];
- }
- }
- }
-
- // The photo attribute might have changed, make sure it's still valid.
- if ( ! is_numeric( $atts['photo'] ) || ! $atts['photo'] ) {
- return '<!-- Lytro Shortcode Error: Invalid Photo ID/URL -->';
- }
-
- // Build a query which is then appended to the iframe src.
- $query_args = array();
- foreach ( $atts as $key => $value ) {
- $attribute = $attributes[ $key ];
- if ( isset( $attribute['query_arg'] ) && ! empty( $attribute['query_arg'] ) && ! empty( $value ) ) {
- $query_args[ $attribute['query_arg'] ] = $value;
- }
- }
-
- if ( ! empty( $atts['username'] ) ) {
- $src = sprintf( 'https://pictures.lytro.com/%s/pictures/%d/embed', $atts['username'], $atts['photo'] );
- } else {
- $src = sprintf( 'https://pictures.lytro.com/pictures/%d/embed', $atts['photo'] );
- }
-
- // Add query args and build the iframe.
- $src = add_query_arg( $query_args, $src );
-
- return '<iframe width="' . esc_attr( $atts['width'] ) . '" height="' . esc_attr( $atts['height'] ) . '" src="' . esc_url( $src ) . '" frameborder="0" allowfullscreen scrolling="no"></iframe>';
-}
-
-add_shortcode( 'lytro', 'jetpack_lytro_shortcode_handler' );
-
-/**
- * Lytro Shortcode URL to Shortcode Attributes
- *
- * This helper function parses a Lytro.com URL
- * and returns an attributes array.
- *
- * @since 4.5.0
- *
- * @uses jetpack_lytro_shortcode_attributes()
- */
-function jetpack_lytro_shortcode_url_to_atts( $url ) {
- $attributes = jetpack_lytro_shortcode_attributes();
- $atts = array();
-
- $url = str_replace( '&amp;', '&', $url );
-
- if ( preg_match( '#^https?://(www\.)?lytro\.com/living-pictures/([0-9]+)/?#i', $url, $matches ) ) {
- $atts['photo'] = $matches[2];
- } elseif ( preg_match( '#^https?://(www\.)?pictures\.lytro\.com/([^/]+)/pictures/([0-9]+)/?#i', $url, $matches ) ) {
- $atts['username'] = $matches[2];
- $atts['photo'] = $matches[3];
- }
-
- $url = parse_url( $url );
- if ( isset( $url['query'] ) ) {
- parse_str( $url['query'], $qargs );
-
- // Get the attributes with query_args and fill in the $atts array
- foreach ( $attributes as $key => $attribute ) {
- if ( isset( $attribute['query_arg'] ) && in_array( $attribute['query_arg'], array_keys( $qargs ) ) ) {
- $atts[ $key ] = $qargs[ $attribute['query_arg'] ];
- }
- }
- }
-
- return $atts;
-}
-
-/**
- * Lytro Shortcode Reversal
- *
- * Example
- * <iframe width="400" height="415" src="https://www.lytro.com/living-pictures/202/embed?showBorder=true" frameborder="0" allowfullscreen></iframe>
- * <iframe width="400" height="415" src="http://pictures.lytro.com/lytroweb/pictures/431128/embed" frameborder="0" allowfullscreen="" scrolling="no"></iframe>
- *
- * Converts to:
- * [lytro photo="202" show_border="true" width="400" height="415"]
- *
- * @since 4.5.0
- *
- * @uses jetpack_lytro_shortcode_url_to_atts()
- * @uses wpcom_shortcodereverse_parseattr()
- */
-function wpcom_shortcodereverse_lytro( $atts ) {
- $atts = wpcom_shortcodereverse_parseattr( $atts );
- $shortcode_atts = array();
-
- // Grab the src URL and convert to shortcode attributes
- if ( $atts['src'] ) {
- $shortcode_atts = jetpack_lytro_shortcode_url_to_atts( $atts['src'] );
- }
-
- // Width and height too
- if ( $atts['width'] ) {
- $shortcode_atts['width'] = $atts['width'];
- }
- if ( $atts['height'] ) {
- $shortcode_atts['height'] = $atts['height'];
- }
-
- // Generate the shortcode.
- $shortcode = '';
- foreach ( $shortcode_atts as $key => $value ) {
- $shortcode .= " $key='" . esc_attr( $value ) . "'";
- }
- $shortcode = "[lytro {$shortcode}]";
-
- return $shortcode;
-}
-
-Filter_Embedded_HTML_Objects::register( '#^https?://(www\.)?lytro\.com/living-pictures/#i', 'wpcom_shortcodereverse_lytro', true );
-Filter_Embedded_HTML_Objects::register( '#^https?://(www\.)?pictures\.lytro\.com/([^/]+)/pictures/([0-9]+)/embed#i', 'wpcom_shortcodereverse_lytro', true );
-
-/**
- * Register Embed Handler
- *
- * Registers a WordPress Embed handler to allow embedding
- * Lytro images by publishing the Lytro URL on a line by itself.
- *
- * @since 4.5.0
- *
- * @uses wp_embed_register_handler
- */
-function jetpack_lytro_register_embed_handler() {
- wp_embed_register_handler( 'lytro', '#^https?://(www\.)?lytro\.com/living-pictures/([0-9]+)/?#i', 'jetpack_lytro_embed_handler' );
- wp_embed_register_handler( 'lytro-v2', '#^https?://(www\.)?pictures\.lytro\.com/([^/]+)/pictures/([0-9]+)/?#i', 'jetpack_lytro_embed_handler' );
-}
-
-add_action( 'init', 'jetpack_lytro_register_embed_handler' );
-
-/**
- * Lytro Embed Handler
- *
- * The embed handler function which converts a Lytro URL
- * on a line by itself into an embedded Lytro image.
- *
- * @since 4.5.0
- *
- * @see jetpack_lytro_register_embed_handler
- * @uses jetpack_lytro_shortcode_url_to_atts
- * @uses jetpack_lytro_shortcode_handler
- */
-function jetpack_lytro_embed_handler( $matches, $attr, $url, $rawattr ) {
- return jetpack_lytro_shortcode_handler( jetpack_lytro_shortcode_url_to_atts( $url ) );
-}
diff --git a/plugins/jetpack/modules/shortcodes/mailchimp.php b/plugins/jetpack/modules/shortcodes/mailchimp.php
index 6e05a936..ce815673 100644
--- a/plugins/jetpack/modules/shortcodes/mailchimp.php
+++ b/plugins/jetpack/modules/shortcodes/mailchimp.php
@@ -1,4 +1,4 @@
-<?php
+<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* MailChimp Subscriber Popup Form shortcode
*
@@ -7,7 +7,6 @@
*
* Embed code example:
* <script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"1ca7856462585a934b8674c71","lid":"2d24f1898b","uniqueMethods":true}) })</script>
- *
*/
/**
@@ -50,9 +49,9 @@ class MailChimp_Subscriber_Popup {
*
* @var array
*/
- static $reversal_regexes = array(
+ private static $reversal_regexes = array(
/* raw examplejs */
- '/<script type="text\/javascript" src="(https?:)?\/\/downloads\.mailchimp\.com\/js\/signup-forms\/popup\/unique-methods\/embed\.js" data-dojo-config="([^"]*?)"><\/script><script type="text\/javascript">window.dojoRequire\(\["mojo\/signup-forms\/Loader"\]\, function\(L\) { L\.start\({([^}]*?)}\) }\)<\/script>/s',
+ '/<script type="text\/javascript" src="(https?:)?\/\/downloads\.mailchimp\.com\/js\/signup-forms\/popup\/unique-methods\/embed\.js" data-dojo-config="([^"]*?)"><\/script><script type="text\/javascript">window.dojoRequire\(\["mojo\/signup-forms\/Loader"\]\, function\(L\) { L\.start\({([^}]*?)}\) }\)<\/script>/s', //phpcs:ignore
/* visual editor */
'/&lt;script type="text\/javascript" src="(https?:)?\/\/downloads\.mailchimp\.com\/js\/signup-forms\/popup\/unique-methods\/embed\.js" data-dojo-config="([^"]*?)"&gt;&lt;\/script&gt;&lt;script type="text\/javascript"&gt;window.dojoRequire\(\["mojo\/signup-forms\/Loader"]\, function\(L\) { L\.start\({([^}]*?)}\) }\)&lt;\/script&gt;/s',
);
@@ -62,7 +61,7 @@ class MailChimp_Subscriber_Popup {
*
* @var array
*/
- static $allowed_config = array(
+ private static $allowed_config = array(
'usePlainJson' => 'true',
'isDebug' => 'false',
);
@@ -72,7 +71,7 @@ class MailChimp_Subscriber_Popup {
*
* @var array
*/
- static $allowed_js_vars = array(
+ private static $allowed_js_vars = array(
'baseUrl',
'uuid',
'lid',
@@ -83,12 +82,12 @@ class MailChimp_Subscriber_Popup {
*
* @since 4.5.0
*
- * @param string $content Post Content
+ * @param string $content Post Content.
*
* @return string Content with embeds replaced
*/
- static function reversal( $content ) {
- // Bail without the js src
+ public static function reversal( $content ) {
+ // Bail without the js src.
if ( ! is_string( $content ) || false === stripos( $content, 'downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js' ) ) {
return $content;
}
@@ -96,7 +95,7 @@ class MailChimp_Subscriber_Popup {
require_once ABSPATH . WPINC . '/class-json.php';
$wp_json = new Services_JSON();
- // loop through our rules and find valid embeds
+ // loop through our rules and find valid embeds.
foreach ( self::$reversal_regexes as $regex ) {
if ( ! preg_match_all( $regex, $content, $matches ) ) {
@@ -104,7 +103,7 @@ class MailChimp_Subscriber_Popup {
}
foreach ( $matches[3] as $index => $js_vars ) {
- // the regex rule for a specific embed
+ // the regex rule for a specific embed.
$replace_regex = sprintf( '#\s*%s\s*#', preg_quote( $matches[0][ $index ], '#' ) );
$attrs = $wp_json->decode( '{' . $js_vars . '}' );
@@ -112,7 +111,7 @@ class MailChimp_Subscriber_Popup {
if ( $matches[2][ $index ] ) {
$config_attrs = $wp_json->decode( '{' . $matches[2][ $index ] . '}' );
foreach ( $config_attrs as $key => $value ) {
- $attrs->$key = ( 1 == $value ) ? 'true' : 'false';
+ $attrs->$key = ( 1 === $value ) ? 'true' : 'false';
}
}
@@ -133,16 +132,19 @@ class MailChimp_Subscriber_Popup {
*
* @since 4.5.0
*
- * @param array $attrs A valid list of attributes (gets matched against self::$allowed_config and self::$allowed_js_vars)
+ * @param array $attrs A valid list of attributes (gets matched against self::$allowed_config and self::$allowed_js_vars).
*
* @return string
*/
- static function build_shortcode_from_reversal_attrs( $attrs ) {
+ private static function build_shortcode_from_reversal_attrs( $attrs ) {
$shortcode = '[mailchimp_subscriber_popup ';
foreach ( $attrs as $key => $value ) {
- // skip unsupported keys
- if ( ! in_array( $key, array_keys( self::$allowed_config ) ) && ! in_array( $key, self::$allowed_js_vars ) ) {
+ // skip unsupported keys.
+ if (
+ ! in_array( $key, array_keys( self::$allowed_config ), true )
+ && ! in_array( $key, self::$allowed_js_vars, true )
+ ) {
continue;
}
@@ -157,14 +159,14 @@ class MailChimp_Subscriber_Popup {
*
* @since 4.5.0
*
- * @param array $lcase_attrs
+ * @param array $lcase_attrs Lowercase shortcode attributes.
*
* @return string
*/
- static function shortcode( $lcase_attrs ) {
+ public static function shortcode( $lcase_attrs ) {
static $displayed_once = false;
- // Limit to one form per page load
+ // Limit to one form per page load.
if ( $displayed_once ) {
return '';
}
@@ -176,7 +178,7 @@ class MailChimp_Subscriber_Popup {
$defaults = array_fill_keys( self::$allowed_js_vars, '' );
$defaults = array_merge( $defaults, self::$allowed_config );
- // Convert $attrs back to proper casing since they come through in all lowercase
+ // Convert $attrs back to proper casing since they come through in all lowercase.
$attrs = array();
foreach ( $defaults as $key => $value ) {
if ( array_key_exists( strtolower( $key ), $lcase_attrs ) ) {
@@ -185,10 +187,21 @@ class MailChimp_Subscriber_Popup {
}
$attrs = array_map( 'esc_js', array_filter( shortcode_atts( $defaults, $attrs ) ) );
- // Split config & js vars
- $config_vars = $js_vars = array();
+ // Split config & js vars.
+ $js_vars = array();
+ $config_vars = array();
foreach ( $attrs as $key => $value ) {
- if ( in_array( $key, self::$allowed_js_vars ) ) {
+ if (
+ 'baseUrl' === $key
+ && (
+ ! preg_match( '#mc\.us\d+\.list-manage\d?\.com#', $value, $matches )
+ || $value !== $matches[0]
+ )
+ ) {
+ return '<!-- Invalid MailChimp baseUrl -->';
+ }
+
+ if ( in_array( $key, self::$allowed_js_vars, true ) ) {
$js_vars[ $key ] = $value;
} else {
$config_vars[] = "$key: $value";
diff --git a/plugins/jetpack/modules/shortcodes/quiz.php b/plugins/jetpack/modules/shortcodes/quiz.php
index 1abfdd54..fa4ed960 100644
--- a/plugins/jetpack/modules/shortcodes/quiz.php
+++ b/plugins/jetpack/modules/shortcodes/quiz.php
@@ -1,4 +1,4 @@
-<?php
+<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileNam
/**
* Quiz shortcode.
*
@@ -78,12 +78,12 @@ class Quiz_Shortcode {
* @since 4.5.0
*/
private static function enqueue_scripts() {
- wp_enqueue_style( 'quiz', plugins_url( 'css/quiz.css', __FILE__ ) );
+ wp_enqueue_style( 'quiz', plugins_url( 'css/quiz.css', __FILE__ ), array(), JETPACK__VERSION );
wp_enqueue_script(
'quiz',
Jetpack::get_file_url_for_environment( '_inc/build/shortcodes/js/quiz.min.js', 'modules/shortcodes/js/quiz.js' ),
array( 'jquery' ),
- null,
+ JETPACK__VERSION,
true
);
}
@@ -101,10 +101,12 @@ class Quiz_Shortcode {
}
if ( is_feed() ) {
- return self::$javascript_unavailable = true;
+ self::$javascript_unavailable = true;
+ return self::$javascript_unavailable;
}
- return self::$javascript_unavailable = false;
+ self::$javascript_unavailable = false;
+ return self::$javascript_unavailable;
}
/**
@@ -146,19 +148,19 @@ class Quiz_Shortcode {
public static function shortcode( $atts, $content = null ) {
// There's nothing to do if there's nothing enclosed.
- if ( null == $content ) {
+ if ( empty( $content ) ) {
return '';
}
$id = '';
if ( self::is_javascript_unavailable() ) {
- // in an e-mail print the question and the info sentence once per question, too
+ // in an e-mail print the question and the info sentence once per question, too.
self::$noscript_info_printed = false;
} else {
if ( ! self::$scripts_enqueued ) {
- // lazy enqueue cannot use the wp_enqueue_scripts action anymore
+ // lazy enqueue cannot use the wp_enqueue_scripts action anymore.
self::enqueue_scripts();
self::$scripts_enqueued = true;
}
@@ -194,21 +196,22 @@ class Quiz_Shortcode {
*
* @since 4.5.0
*
- * @param string $content
+ * @param string $content Post content.
*
* @return mixed|string
*/
private static function do_shortcode( $content ) {
- // strip autoinserted line breaks
+ // strip autoinserted line breaks.
$content = preg_replace( '#(<(?:br /|/?p)>\n?)*(\[/?[a-z]+\])(<(?:br /|/?p)>\n?)*#', '$2', $content );
- // Add internal parameter so it's only rendered when it has it
+ // Add internal parameter so it's only rendered when it has it.
$content = preg_replace( '/\[(question|answer|wrong|explanation)\]/i', '[$1 quiz_item="true"]', $content );
$content = do_shortcode( $content );
$content = wp_kses(
$content,
array(
'tt' => array(),
+ 'a' => array( 'href' => true ),
'pre' => array(),
'strong' => array(),
'i' => array(),
@@ -231,8 +234,8 @@ class Quiz_Shortcode {
*
* @since 4.5.0
*
- * @param array $atts
- * @param null $content
+ * @param array $atts Shortcode attributes.
+ * @param null $content Post content.
*
* @return string
*/
@@ -247,8 +250,8 @@ class Quiz_Shortcode {
*
* @since 4.5.0
*
- * @param array $atts
- * @param null $content
+ * @param array $atts Shortcode attributes.
+ * @param null $content Post content.
*
* @return string
*/
@@ -267,8 +270,8 @@ class Quiz_Shortcode {
*
* @since 4.5.0
*
- * @param array $atts
- * @param null $content
+ * @param array $atts Shortcode attributes.
+ * @param null $content Post content.
*
* @return string
*/
@@ -287,8 +290,8 @@ class Quiz_Shortcode {
*
* @since 4.5.0
*
- * @param array $atts
- * @param null $content
+ * @param array $atts Shortcode attributes.
+ * @param null $content Post content.
*
* @return string
*/
diff --git a/plugins/jetpack/modules/shortcodes/sitemap.php b/plugins/jetpack/modules/shortcodes/sitemap.php
index 963f90ce..d26210f0 100644
--- a/plugins/jetpack/modules/shortcodes/sitemap.php
+++ b/plugins/jetpack/modules/shortcodes/sitemap.php
@@ -3,6 +3,8 @@
* Sitemap shortcode.
*
* Usage: [sitemap]
+ *
+ * @package Jetpack
*/
add_shortcode( 'sitemap', 'jetpack_sitemap_shortcode' );
diff --git a/plugins/jetpack/modules/shortcodes/slideshare.php b/plugins/jetpack/modules/shortcodes/slideshare.php
index 42258814..898ae57e 100644
--- a/plugins/jetpack/modules/shortcodes/slideshare.php
+++ b/plugins/jetpack/modules/shortcodes/slideshare.php
@@ -1,10 +1,5 @@
<?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:
* 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]
diff --git a/plugins/jetpack/modules/shortcodes/tweet.php b/plugins/jetpack/modules/shortcodes/tweet.php
index 95a3dcdd..5d6acd29 100644
--- a/plugins/jetpack/modules/shortcodes/tweet.php
+++ b/plugins/jetpack/modules/shortcodes/tweet.php
@@ -1,4 +1,4 @@
-<?php
+<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Tweet shortcode.
* Params map to key value pairs, and all but tweet are optional:
@@ -14,13 +14,23 @@
*
* More parameters and another tweet syntax admitted:
* [tweet tweet="https://twitter.com/jack/statuses/20" align="left" width="350" align="center" lang="es"]
+ *
+ * @package Jetpack
*/
add_shortcode( 'tweet', array( 'Jetpack_Tweet', 'jetpack_tweet_shortcode' ) );
+/**
+ * Tweet Shortcode class.
+ */
class Jetpack_Tweet {
- static $provider_args;
+ /**
+ * Array of arguments about a tweet.
+ *
+ * @var array
+ */
+ public static $provider_args;
/**
* Parse shortcode arguments and render its output.
@@ -32,6 +42,8 @@ class Jetpack_Tweet {
* @return string
*/
public static function jetpack_tweet_shortcode( $atts ) {
+ global $wp_embed;
+
$default_atts = array(
'tweet' => '',
'align' => 'none',
@@ -45,33 +57,152 @@ class Jetpack_Tweet {
self::$provider_args = $attr;
- // figure out the tweet id for the requested tweet
- // supporting both omitted attributes and tweet="tweet_id"
- // and supporting both an id and a URL
+ /*
+ * figure out the tweet id for the requested tweet
+ * supporting both omitted attributes and tweet="tweet_id"
+ * and supporting both an id and a URL
+ */
if ( empty( $attr['tweet'] ) && ! empty( $atts[0] ) ) {
$attr['tweet'] = $atts[0];
}
if ( ctype_digit( $attr['tweet'] ) ) {
- $id = 'https://twitter.com/jetpack/status/' . $attr['tweet'];
+ $id = 'https://twitter.com/jetpack/status/' . $attr['tweet'];
+ $tweet_id = intval( $attr['tweet'] );
} else {
preg_match( '/^http(s|):\/\/twitter\.com(\/\#\!\/|\/)([a-zA-Z0-9_]{1,20})\/status(es)*\/(\d+)$/', $attr['tweet'], $urlbits );
if ( isset( $urlbits[5] ) && intval( $urlbits[5] ) ) {
- $id = 'https://twitter.com/' . $urlbits[3] . '/status/' . intval( $urlbits[5] );
+ $id = 'https://twitter.com/' . $urlbits[3] . '/status/' . intval( $urlbits[5] );
+ $tweet_id = intval( $urlbits[5] );
} else {
return '<!-- Invalid tweet id -->';
}
}
- // Add shortcode arguments to provider URL
- add_filter( 'oembed_fetch_url', array( 'Jetpack_Tweet', 'jetpack_tweet_url_extra_args' ), 10, 3 );
+ /*
+ * Fetch tweet.
+ *
+ * On WordPress.com, we also cache tweets for better performance and less requests.
+ */
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ /*
+ * See if we have the tweet stored in our tweet store
+ * if not get_tweet_store queues up a job to request
+ */
+ $data = get_tweet_store( $tweet_id );
+ if ( $data ) {
+ $tweet_handler = new Tweet_Handler();
+
+ /*
+ * Replace Unicode characters with ther entities like Blackbird Pie v 0.3.2 did
+ * to store tweets from other languages (important for non-english bloggers)
+ */
+ $data->text = $tweet_handler->unicode_replace_entities( $data->text );
+ $data->user->screen_name = $tweet_handler->unicode_replace_entities( $data->user->screen_name );
+ $data->user->name = $tweet_handler->unicode_replace_entities( $data->user->name );
+
+ $tweet = esc_html( $data->text );
+ $tweet = $tweet_handler->expand_tco_links( $tweet, $data );
+
+ $tweet = $tweet_handler->autolink( $tweet );
+
+ $screen_name = esc_html( $data->user->screen_name );
+ $name = esc_html( $data->user->name );
+
+ $url = 'https://twitter.com/' . $screen_name . '/status/' . intval( $data->id );
- // Fetch tweet
- $output = wp_oembed_get( $id, $atts );
+ // Only show the user's real name if they set it to something different from their screename.
+ if ( $screen_name !== $name ) {
+ $real_name = '<br />' . $name;
+ } else {
+ $real_name = '<br />&nbsp;';
+ }
- // Clean up filter
- remove_filter( 'oembed_fetch_url', array( 'Jetpack_Tweet', 'jetpack_tweet_url_extra_args' ), 10 );
+ $time = strtotime( $data->created_at );
+ $human_readable = date( 'F d, Y', $time );
+ $data_datetime = date( 'Y-m-d\TH:i:sP', $time );
+
+ /*
+ * Additional params.
+ */
+
+ // align (float).
+ $extra_classes = '';
+ if ( in_array( $attr['align'], array( 'left', 'right', 'center' ), true ) ) {
+ $extra_classes = ' tw-align-' . $attr['align'];
+ }
+
+ if ( 'true' === $attr['hide_thread'] ) {
+ $extra_classes .= ' tw-hide-thread';
+ }
+
+ if ( 'true' === $attr['hide_media'] ) {
+ $extra_classes .= ' tw-hide-media';
+ }
+
+ // lang.
+ $lang = substr( $attr['lang'], 0, 2 );
+ if ( empty( $lang ) ) {
+ $lang = 'en';
+ }
+
+ // width.
+ $width_html = '';
+ $width = intval( $attr['width'] );
+ if ( $width > 100 ) {
+ $width_html = ' width="' . esc_attr( $width ) . '"';
+ }
+
+ // in reply to id (conversation tweets).
+ $in_reply_to_html = '';
+ $in_reply_to = intval( $data->in_reply_to_status_id );
+ if ( ! empty( $in_reply_to ) && 'false' === $attr['hide_thread'] ) {
+ $in_reply_to_html = ' data-in-reply-to="' . esc_attr( $in_reply_to ) . '"';
+ }
+
+ // Generate the HTML output.
+ $output = sprintf(
+ '<blockquote class="twitter-tweet%1$s"%2$s%3$s lang="%4$s"><p>%5$s</p>&mdash; %6$s (@%7$s) <a href="%8$s" data-datetime="%9$s">%10$s</a></blockquote>',
+ esc_attr( $extra_classes ),
+ $width_html,
+ $in_reply_to_html,
+ esc_attr( $lang ),
+ $tweet,
+ wp_kses( $real_name, array( 'br' => array() ) ),
+ esc_html( $screen_name ),
+ esc_url( $url ),
+ esc_attr( $data_datetime ),
+ esc_html( $human_readable )
+ );
+ } else {
+ /**
+ * Filter the default display when a tweet is not available in the store.
+ * Not available in Jetpack.
+ *
+ * @module shortcodes
+ *
+ * @since 5.1.0
+ *
+ * @param string $message Default display when a tweet is not available.
+ * @param string $id Twitter URL.
+ * @param array $attr Shortcode attributes.
+ */
+ return apply_filters( 'tweet_shortcode_pending_tweet', '', $id, $attr );
+ }
+ } else {
+ // Add shortcode arguments to provider URL.
+ add_filter( 'oembed_fetch_url', array( 'Jetpack_Tweet', 'jetpack_tweet_url_extra_args' ), 10, 3 );
+
+ /*
+ * In Jetpack, we use $wp_embed->shortcode() to return the tweet output.
+ * @see https://github.com/Automattic/jetpack/pull/11173
+ */
+ $output = $wp_embed->shortcode( $atts, $id );
+
+ // Clean up filter.
+ remove_filter( 'oembed_fetch_url', array( 'Jetpack_Tweet', 'jetpack_tweet_url_extra_args' ), 10 );
+ }
// Add Twitter widgets.js script to the footer.
add_action( 'wp_footer', array( 'Jetpack_Tweet', 'jetpack_tweet_shortcode_script' ) );
@@ -89,11 +220,11 @@ class Jetpack_Tweet {
*
* @param string $provider URL of provider that supplies the tweet we're requesting.
* @param string $url URL of tweet to embed.
- * @param array $args Parameters supplied to shortcode and passed to wp_oembed_get
+ * @param array $args Parameters supplied to shortcode and passed to wp_oembed_get.
*
* @return string
*/
- public static function jetpack_tweet_url_extra_args( $provider, $url, $args = array() ) {
+ public static function jetpack_tweet_url_extra_args( $provider, $url, $args = array() ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
foreach ( self::$provider_args as $key => $value ) {
switch ( $key ) {
case 'align':
@@ -105,10 +236,10 @@ class Jetpack_Tweet {
}
}
- // Disable script since we're enqueing it in our own way in the footer
+ // Disable script since we're enqueing it in our own way in the footer.
$provider = add_query_arg( 'omit_script', 'true', $provider );
- // Twitter doesn't support maxheight so don't send it
+ // Twitter doesn't support maxheight so don't send it.
$provider = remove_query_arg( 'maxheight', $provider );
/**
@@ -122,7 +253,7 @@ class Jetpack_Tweet {
*/
$partner = apply_filters( 'jetpack_twitter_partner_id', 'jetpack' );
- // Add Twitter partner ID to track embeds from Jetpack
+ // Add Twitter partner ID to track embeds from Jetpack.
if ( ! empty( $partner ) ) {
$provider = add_query_arg( 'partner', $partner, $provider );
}
diff --git a/plugins/jetpack/modules/shortcodes/unavailable.php b/plugins/jetpack/modules/shortcodes/unavailable.php
index 4d31c5b9..9a6bb201 100644
--- a/plugins/jetpack/modules/shortcodes/unavailable.php
+++ b/plugins/jetpack/modules/shortcodes/unavailable.php
@@ -1,4 +1,10 @@
-<?php
+<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
+/**
+ * Display a message on the frontend when we retire a shortcode,
+ * explaining why the shortcode is not available anymore.
+ *
+ * @package Jetpack
+ */
/**
* Class Jetpack_Shortcode_Unavailable
@@ -20,7 +26,7 @@ class Jetpack_Shortcode_Unavailable {
* already claimed them, add a handler to nullify their output.
*/
public function add_shortcodes() {
- foreach ( $this->shortcodes as $shortcode => $message ) {
+ foreach ( array_keys( $this->shortcodes ) as $shortcode ) {
if ( ! shortcode_exists( $shortcode ) ) {
add_shortcode( $shortcode, array( $this, 'stub_shortcode' ) );
}
@@ -31,9 +37,10 @@ class Jetpack_Shortcode_Unavailable {
* Nullify the output of unavailable shortcodes. Includes a filter to make
* it easier to notify admins that a shortcode that they used is unavailable.
*
- * @param $atts
- * @param string $content
- * @param string $shortcode
+ * @param array $atts Shortcode attributes.
+ * @param string $content Post content.
+ * @param string $shortcode Shortcode name.
+ *
* @return mixed|void
*/
public function stub_shortcode( $atts, $content = '', $shortcode = '' ) {
@@ -57,8 +64,15 @@ class Jetpack_Shortcode_Unavailable {
}
}
-new Jetpack_Shortcode_Unavailable(
- array(
- 'blip.tv' => __( 'The Blip.tv service has been shut down since August 20th, 2015.', 'jetpack' ),
- )
-);
+/**
+ * Init class.
+ */
+function jetpack_init_shortcode_unavailable() {
+ new Jetpack_Shortcode_Unavailable(
+ array(
+ 'blip.tv' => __( 'The Blip.tv service has been shut down since August 20th, 2015.', 'jetpack' ),
+ 'lytro' => __( 'Lytro has been shut down since March 2019.', 'jetpack' ),
+ )
+ );
+}
+add_action( 'init', 'jetpack_init_shortcode_unavailable' );
diff --git a/plugins/jetpack/modules/shortcodes/ustream.php b/plugins/jetpack/modules/shortcodes/ustream.php
index f4d0c62e..0ab664c1 100644
--- a/plugins/jetpack/modules/shortcodes/ustream.php
+++ b/plugins/jetpack/modules/shortcodes/ustream.php
@@ -1,7 +1,6 @@
<?php
-
/**
- * ustream.tv shortcode
+ * Ustream.tv shortcode
*
* Example:
* [ustream id=1524 live=1]
@@ -9,6 +8,8 @@
*
* Embed code example, from http://www.ustream.tv/leolaporte
* <iframe src="http://www.ustream.tv/embed/recorded/1524?v=3&#038;wmode=direct" width="480" height="296" scrolling="no" frameborder="0" style="border: 0 none transparent;"></iframe>
+ *
+ * @package Jetpack
*/
add_shortcode( 'ustream', 'ustream_shortcode' );
@@ -19,7 +20,7 @@ add_shortcode( 'ustreamsocial', 'ustreamsocial_shortcode' );
*
* @since 4.5.0
*
- * @param $atts array of user-supplied arguments.
+ * @param array $atts array of user-supplied arguments.
*
* @return string HTML output.
*/
@@ -37,52 +38,59 @@ function ustream_shortcode( $atts ) {
'version' => 3,
'hwaccel' => 1,
);
+ $atts = array_map( 'intval', shortcode_atts( $defaults, $atts ) );
- $atts = array_map( 'intval', shortcode_atts( $defaults, $atts ) );
-
- $ustream_id = $atts['id'];
- $width = $atts['width'];
- $height = $atts['height'];
- $live = $atts['live'];
- $highlight = $atts['highlight'];
- $version = $atts['version'];
- $hwaccel = $atts['hwaccel'];
-
- $version = 'v=' . esc_attr( $version );
-
- if ( 0 >= $ustream_id ) {
+ if ( 0 >= $atts['id'] ) {
return '<!-- ustream error: bad video ID -->';
}
- if ( 0 >= $height ) {
+ if ( 0 >= $atts['height'] ) {
return '<!-- ustream error: height invalid -->';
}
- if ( 0 >= $width ) {
+ if ( 0 >= $atts['width'] ) {
return '<!-- ustream error: width invalid -->';
}
- if ( $live ) {
+ if ( $atts['live'] ) {
$recorded = '';
} else {
$recorded = 'recorded/';
}
- if ( ! $live && ( 0 < $highlight ) ) {
- $highlight = "/highlight/$highlight";
+ if ( ! $atts['live'] && ( 0 < $atts['highlight'] ) ) {
+ $highlight = sprintf( '/highlight/%d', esc_attr( $atts['highlight'] ) );
} else {
$highlight = '';
}
- if ( 0 < $hwaccel ) {
- $wmode = '&amp;wmode=direct';
- } else {
- $wmode = '';
+ $url_base = sprintf(
+ 'https://www.ustream.tv/embed/%s%d%s',
+ $recorded,
+ esc_attr( $atts['id'] ),
+ $highlight
+ );
+
+ $video_options = array(
+ 'html5ui' => 1,
+ 'v' => absint( $atts['version'] ),
+ );
+
+ if ( 0 < $atts['hwaccel'] ) {
+ $video_options['wmode'] = 'direct';
}
- $url = 'http://www.ustream.tv/embed/' . $recorded . esc_attr( $ustream_id ) . $highlight . '?' . $version . $wmode;
- $url = set_url_scheme( $url );
- $output = '<iframe src="' . esc_url( $url ) . '" width="' . esc_attr( $width ) . '" height="' . esc_attr( $height ) . '" scrolling="no" style="border: 0 none transparent;"></iframe>';
+ $url = add_query_arg(
+ $video_options,
+ $url_base
+ );
+
+ $output = sprintf(
+ '<iframe src="%1$s" width="%2$d" height="%3$d" scrolling="no" style="border: 0 none transparent;"></iframe>',
+ esc_url( $url ),
+ absint( $atts['width'] ),
+ absint( $atts['height'] )
+ );
return $output;
}
@@ -92,7 +100,7 @@ function ustream_shortcode( $atts ) {
*
* @since 4.5.0
*
- * @param $atts array of user-supplied arguments.
+ * @param array $atts array of user-supplied arguments.
*
* @return string HTML output.
*/
@@ -102,26 +110,26 @@ function ustreamsocial_shortcode( $atts ) {
'height' => 420,
'width' => 320,
);
+ $atts = array_map( 'intval', shortcode_atts( $defaults, $atts ) );
- $atts = array_map( 'intval', shortcode_atts( $defaults, $atts ) );
-
- $ustream_id = $atts['id'];
- $width = $atts['width'];
- $height = $atts['height'];
-
- if ( 0 >= $ustream_id ) {
+ if ( 0 >= $atts['id'] ) {
return '<!-- ustreamsocial error: bad social stream ID -->';
}
- if ( 0 >= $height ) {
+ if ( 0 >= $atts['height'] ) {
return '<!-- ustreamsocial error: height invalid -->';
}
- if ( 0 >= $width ) {
+ if ( 0 >= $atts['width'] ) {
return '<!-- ustreamsocial error: width invalid -->';
}
- $url = set_url_scheme( "http://www.ustream.tv/socialstream/$ustream_id" );
+ $url = 'https://www.ustream.tv/socialstream/' . esc_attr( $atts['id'] );
- return '<iframe id="SocialStream" class="" name="SocialStream" width="' . esc_attr( $width ) . '" height="' . esc_attr( $height ) . '" scrolling="no" allowtransparency="true" src="' . esc_url( $url ) . '" style="visibility: visible; margin-top: 0; margin-bottom: 0; border: 0;"></iframe>';
+ return sprintf(
+ '<iframe id="SocialStream" src="%1$s" class="" name="SocialStream" width="%2$d" height="%3$d" scrolling="no" allowtransparency="true" style="visibility: visible; margin-top: 0; margin-bottom: 0; border: 0;"></iframe>',
+ esc_url( $url ),
+ absint( $atts['width'] ),
+ absint( $atts['height'] )
+ );
}
diff --git a/plugins/jetpack/modules/shortcodes/wordads.php b/plugins/jetpack/modules/shortcodes/wordads.php
index 86d6b70c..bca6c48a 100644
--- a/plugins/jetpack/modules/shortcodes/wordads.php
+++ b/plugins/jetpack/modules/shortcodes/wordads.php
@@ -20,6 +20,7 @@ class Jetpack_WordAds_Shortcode {
if ( empty( $wordads ) ) {
return null;
}
+
add_shortcode( 'wordads', array( $this, 'wordads_shortcode' ) );
}
@@ -53,10 +54,7 @@ class Jetpack_WordAds_Shortcode {
return '<div>' . __( 'The WordAds module is not active', 'jetpack' ) . '</div>';
}
- $html = '<div class="jetpack-wordad" itemscope itemtype="https://schema.org/WPAdBlock">';
-
- $html .= '</div>';
-
+ $html = '<div class="jetpack-wordad" itemscope itemtype="https://schema.org/WPAdBlock"></div>';
$html = $wordads->insert_inline_ad( $html );
return $html;
diff --git a/plugins/jetpack/modules/shortcodes/youtube.php b/plugins/jetpack/modules/shortcodes/youtube.php
index 79af6f94..048eb09b 100644
--- a/plugins/jetpack/modules/shortcodes/youtube.php
+++ b/plugins/jetpack/modules/shortcodes/youtube.php
@@ -32,7 +32,7 @@ function youtube_embed_to_short_code( $content ) {
}
// older codes
- $regexp = '!<object width="\d+" height="\d+"><param name="movie" value="https?://www\.youtube\.com/v/([^"]+)"></param>(?:<param name="\w+" value="[^"]*"></param>)*<embed src="https?://www\.youtube\.com/v/(.+)" type="application/x-shockwave-flash"(?: \w+="[^"]*")* width="\d+" height="\d+"></embed></object>!i';
+ $regexp = '!<object(.*?)>.*?<param\s+name=[\'"]movie[\'"]\s+value=[\'"](https?:)?//www\.youtube\.com/v/([^\'"]+)[\'"].*?>.*?</object>!i';
$regexp_ent = htmlspecialchars( $regexp, ENT_NOQUOTES );
$old_regexp = '!<embed(?:\s+\w+="[^"]*")*\s+src="https?(?:\:|&#0*58;)//www\.youtube\.com/v/([^"]+)"(?:\s+\w+="[^"]*")*\s*(?:/>|>\s*</embed>)!';
$old_regexp_ent = str_replace( '&amp;#0*58;', '&amp;#0*58;|&#0*58;', htmlspecialchars( $old_regexp, ENT_NOQUOTES ) );
@@ -55,10 +55,10 @@ function youtube_embed_to_short_code( $content ) {
// <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/aP9AaD4tgBY?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/aP9AaD4tgBY?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
// As shown at the start of function, previous YouTube didn't '?'
// the 1st field-value pair.
- if ( in_array( $reg, array( 'ifr_regexp', 'ifr_regexp_ent' ) ) ) {
+ if ( in_array( $reg, array( 'ifr_regexp', 'ifr_regexp_ent', 'regexp', 'regexp_ent' ) ) ) {
$params = $match[1];
- if ( 'ifr_regexp_ent' == $reg ) {
+ if ( in_array( $reg, array( 'ifr_regexp_ent', 'regexp_ent' ) ) ) {
$params = html_entity_decode( $params );
}
diff --git a/plugins/jetpack/modules/shortlinks.php b/plugins/jetpack/modules/shortlinks.php
index 54e30b94..cd06f43d 100644
--- a/plugins/jetpack/modules/shortlinks.php
+++ b/plugins/jetpack/modules/shortlinks.php
@@ -87,3 +87,50 @@ function wpme_get_shortlink( $id = 0, $context = 'post', $allow_slugs = true ) {
function wpme_get_shortlink_handler( $shortlink, $id, $context, $allow_slugs ) {
return wpme_get_shortlink( $id, $context, $allow_slugs );
}
+
+/**
+ * Add Shortlinks to the REST API Post response.
+ *
+ * @since 6.9.0
+ *
+ * @action rest_api_init
+ * @uses register_rest_field, wpme_rest_get_shortlink
+ */
+function wpme_rest_register_shortlinks() {
+ register_rest_field(
+ 'post',
+ 'jetpack_shortlink',
+ array(
+ 'get_callback' => 'wpme_rest_get_shortlink',
+ 'update_callback' => null,
+ 'schema' => null,
+ )
+ );
+}
+
+/**
+ * Get the shortlink of a post.
+ *
+ * @since 6.9.0
+ *
+ * @param array $object Details of current post.
+ *
+ * @uses wpme_get_shortlink
+ *
+ * @return string
+ */
+function wpme_rest_get_shortlink( $object ) {
+ return wpme_get_shortlink( $object['id'], array() );
+}
+
+// Add shortlinks to the REST API Post response.
+add_action( 'rest_api_init', 'wpme_rest_register_shortlinks' );
+
+/**
+ * Set the Shortlink Gutenberg extension as available.
+ */
+function wpme_set_extension_available() {
+ Jetpack_Gutenberg::set_extension_available( 'jetpack/shortlinks' );
+}
+
+add_action( 'init', 'wpme_set_extension_available' );
diff --git a/plugins/jetpack/modules/simple-payments/simple-payments.php b/plugins/jetpack/modules/simple-payments/simple-payments.php
index 690c71a1..e1b7f8d7 100644
--- a/plugins/jetpack/modules/simple-payments/simple-payments.php
+++ b/plugins/jetpack/modules/simple-payments/simple-payments.php
@@ -40,6 +40,7 @@ class Jetpack_Simple_Payments {
private function register_init_hooks() {
add_action( 'init', array( $this, 'init_hook_action' ) );
+ add_action( 'jetpack_register_gutenberg_extensions', array( $this, 'register_gutenberg_block' ) );
add_action( 'rest_api_init', array( $this, 'register_meta_fields_in_rest_api' ) );
}
@@ -57,11 +58,13 @@ class Jetpack_Simple_Payments {
$this->setup_cpts();
add_filter( 'the_content', array( $this, 'remove_auto_paragraph_from_product_description' ), 0 );
+ }
+ function register_gutenberg_block() {
if ( $this->is_enabled_jetpack_simple_payments() ) {
- jetpack_register_block( 'simple-payments' );
+ jetpack_register_block( 'jetpack/simple-payments' );
} else {
- jetpack_register_block( 'simple-payments', array(), array( 'available' => false, 'unavailable_reason' => 'missing_plan' ) );
+ Jetpack_Gutenberg::set_extension_unavailable( 'jetpack/simple-payments', 'missing_plan' );
}
}
@@ -105,7 +108,7 @@ class Jetpack_Simple_Payments {
}
// For all Jetpack sites
- return Jetpack::is_active() && Jetpack::active_plan_supports( 'simple-payments');
+ return Jetpack::is_active() && Jetpack_Plan::supports( 'simple-payments');
}
function parse_shortcode( $attrs, $content = false ) {
@@ -138,7 +141,7 @@ class Jetpack_Simple_Payments {
$data['id'] = $attrs['id'];
- if( ! wp_style_is( 'jetpack-simple-payments', 'enqueue' ) ) {
+ if( ! wp_style_is( 'jetpack-simple-payments', 'enqueued' ) ) {
wp_enqueue_style( 'jetpack-simple-payments' );
}
@@ -285,7 +288,13 @@ class Jetpack_Simple_Payments {
);
}
- return "$price $currency";
+ // Fall back to unspecified currency symbol like `¤1,234.05`.
+ // @link https://en.wikipedia.org/wiki/Currency_sign_(typography).
+ if ( ! $currency ) {
+ return '¤' . number_format_i18n( $price, 2 );
+ }
+
+ return number_format_i18n( $price, 2 ) . ' ' . $currency;
}
/**
diff --git a/plugins/jetpack/modules/sitemaps.php b/plugins/jetpack/modules/sitemaps.php
index febf5786..dfd59719 100644
--- a/plugins/jetpack/modules/sitemaps.php
+++ b/plugins/jetpack/modules/sitemaps.php
@@ -7,6 +7,7 @@
* Requires Connection: No
* Auto Activate: Public
* Module Tags: Recommended, Traffic
+ * Feature: Recommended
* Additional Search Queries: sitemap, traffic, search, site map, seo
*
* @package Jetpack
diff --git a/plugins/jetpack/modules/sitemaps/sitemap-builder.php b/plugins/jetpack/modules/sitemaps/sitemap-builder.php
index c74b1f03..e04f58d5 100644
--- a/plugins/jetpack/modules/sitemaps/sitemap-builder.php
+++ b/plugins/jetpack/modules/sitemaps/sitemap-builder.php
@@ -1319,6 +1319,20 @@ class Jetpack_Sitemap_Builder {
/** This filter is already documented in core/wp-includes/feed.php */
$content = apply_filters( 'the_content_feed', $content, 'rss2' );
+
+ // Include thumbnails for VideoPress videos, use blank image for others
+ if ( 'complete' === get_post_meta( $post->ID, 'videopress_status', true ) && has_post_thumbnail( $post ) ) {
+ $video_thumbnail_url = get_the_post_thumbnail_url( $post );
+ } else {
+ /**
+ * Filter the thumbnail image used in the video sitemap for non-VideoPress videos.
+ *
+ * @since 7.2.0
+ *
+ * @param string $str Image URL.
+ */
+ $video_thumbnail_url = apply_filters( 'jetpack_video_sitemap_default_thumbnail', 'https://s0.wp.com/i/blank.jpg' );
+ }
$item_array = array(
'url' => array(
@@ -1327,7 +1341,7 @@ class Jetpack_Sitemap_Builder {
'video:video' => array(
/** This filter is already documented in core/wp-includes/feed.php */
'video:title' => apply_filters( 'the_title_rss', $post->post_title ),
- 'video:thumbnail_loc' => '',
+ 'video:thumbnail_loc' => esc_url( $video_thumbnail_url ),
'video:description' => $content,
'video:content_loc' => esc_url( wp_get_attachment_url( $post->ID ) ),
),
diff --git a/plugins/jetpack/modules/sso.php b/plugins/jetpack/modules/sso.php
index 916a20e4..cb45ed3b 100644
--- a/plugins/jetpack/modules/sso.php
+++ b/plugins/jetpack/modules/sso.php
@@ -23,16 +23,17 @@ class Jetpack_SSO {
self::$instance = $this;
- add_action( 'admin_init', array( $this, 'maybe_authorize_user_after_sso' ), 1 );
- add_action( 'admin_init', array( $this, 'register_settings' ) );
- add_action( 'login_init', array( $this, 'login_init' ) );
- add_action( 'delete_user', array( $this, 'delete_connection_for_user' ) );
- add_filter( 'jetpack_xmlrpc_methods', array( $this, 'xmlrpc_methods' ) );
- add_action( 'init', array( $this, 'maybe_logout_user' ), 5 );
- add_action( 'jetpack_modules_loaded', array( $this, 'module_configure_button' ) );
- add_action( 'login_form_logout', array( $this, 'store_wpcom_profile_cookies_on_logout' ) );
- add_action( 'jetpack_unlinked_user', array( $this, 'delete_connection_for_user') );
- add_action( 'wp_login', array( 'Jetpack_SSO', 'clear_cookies_after_login' ) );
+ add_action( 'admin_init', array( $this, 'maybe_authorize_user_after_sso' ), 1 );
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
+ add_action( 'login_init', array( $this, 'login_init' ) );
+ add_action( 'delete_user', array( $this, 'delete_connection_for_user' ) );
+ add_filter( 'jetpack_xmlrpc_methods', array( $this, 'xmlrpc_methods' ) );
+ add_action( 'init', array( $this, 'maybe_logout_user' ), 5 );
+ add_action( 'jetpack_modules_loaded', array( $this, 'module_configure_button' ) );
+ add_action( 'login_form_logout', array( $this, 'store_wpcom_profile_cookies_on_logout' ) );
+ add_action( 'jetpack_unlinked_user', array( $this, 'delete_connection_for_user') );
+ add_action( 'wp_login', array( 'Jetpack_SSO', 'clear_cookies_after_login' ) );
+ add_action( 'jetpack_jitm_received_envelopes', array( $this, 'inject_sso_jitm' ) );
// 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' );
@@ -370,6 +371,12 @@ class Jetpack_SSO {
add_filter( 'allowed_redirect_hosts', array( 'Jetpack_SSO_Helpers', 'allowed_redirect_hosts' ) );
$reauth = ! empty( $_GET['force_reauth'] );
$sso_url = $this->get_sso_url_or_die( $reauth );
+
+ // Is this our first SSO Login. Set an option.
+ if ( ! Jetpack_Options::get_option( 'sso_first_login' ) ) {
+ Jetpack_options::update_option( 'sso_first_login', true );
+ }
+
JetpackTracking::record_user_event( 'sso_login_redirect_success' );
wp_safe_redirect( $sso_url );
exit;
@@ -1087,6 +1094,62 @@ class Jetpack_SSO {
public function get_user_data( $user_id ) {
return get_user_meta( $user_id, 'wpcom_user_data', true );
}
+
+ /**
+ * Mark SSO as discovered when an SSO JITM is viewed.
+ *
+ * @since 6.9.0
+ *
+ * @param array $envelopes Array of JITM messages received after API call.
+ *
+ * @return array $envelopes New array of JITM messages. May now contain only one message, about SSO.
+ */
+ public function inject_sso_jitm( $envelopes ) {
+ // Bail early if that's not the first time the user uses SSO.
+ if ( true != Jetpack_Options::get_option( 'sso_first_login' ) ) {
+ return $envelopes;
+ }
+
+ // Update our option to mark that SSO was discovered.
+ Jetpack_Options::update_option( 'sso_first_login', false );
+
+ return $this->prepare_sso_first_login_jitm();
+ }
+
+ /**
+ * Prepare JITM array for new SSO users
+ *
+ * @since 6.9.0
+ *
+ * @return array $sso_first_login_jitm array containting one object of information about our message.
+ */
+ private function prepare_sso_first_login_jitm() {
+ // Build our custom SSO JITM.
+ $discover_sso_message = array(
+ 'content' => array(
+ 'message' => esc_html__( "You've successfully signed in with WordPress.com Secure Sign On!", 'jetpack' ),
+ 'icon' => 'jetpack',
+ 'list' => array(),
+ 'description' => esc_html__( 'Interested in learning more about how Secure Sign On keeps your site safer?', 'jetpack' ),
+ 'classes' => '',
+ ),
+ 'CTA' => array(
+ 'message' => esc_html__( 'Learn More', 'jetpack' ),
+ 'hook' => '',
+ 'newWindow' => true,
+ 'primary' => true,
+ ),
+ 'template' => 'default',
+ 'ttl' => 300,
+ 'id' => 'sso_discover',
+ 'feature_class' => 'sso',
+ 'expires' => 3628800,
+ 'max_dismissal' => 1,
+ 'activate_module' => null,
+ );
+
+ return array( json_decode( json_encode( $discover_sso_message ) ) );
+ }
}
Jetpack_SSO::get_instance();
diff --git a/plugins/jetpack/modules/stats.php b/plugins/jetpack/modules/stats.php
index bcd9deea..6169caa6 100644
--- a/plugins/jetpack/modules/stats.php
+++ b/plugins/jetpack/modules/stats.php
@@ -202,7 +202,7 @@ function stats_build_view_data() {
$blog = Jetpack_Options::get_option( 'id' );
$tz = get_option( 'gmt_offset' );
$v = 'ext';
- $blog_url = parse_url( site_url() );
+ $blog_url = wp_parse_url( site_url() );
$srv = $blog_url['host'];
$j = sprintf( '%s:%s', JETPACK__API_VERSION, JETPACK__VERSION );
if ( $wp_the_query->is_single || $wp_the_query->is_page || $wp_the_query->is_posts_page ) {
@@ -465,7 +465,7 @@ function stats_reports_load() {
add_action( 'admin_print_styles', 'stats_reports_css' );
if ( isset( $_GET['nojs'] ) && $_GET['nojs'] ) {
- $parsed = parse_url( admin_url() );
+ $parsed = wp_parse_url( admin_url() );
// Remember user doesn't want JS.
setcookie( 'stnojs', '1', time() + 172800, $parsed['path'] ); // 2 days.
}
@@ -513,7 +513,7 @@ function stats_reports_css() {
* @return void
*/
function stats_js_remove_stnojs_cookie() {
- $parsed = parse_url( admin_url() );
+ $parsed = wp_parse_url( admin_url() );
?>
<script type="text/javascript">
/* <![CDATA[ */
@@ -931,7 +931,7 @@ function stats_admin_bar_head() {
if ( ! current_user_can( 'view_stats' ) )
return;
- if ( function_exists( 'is_admin_bar_showing' ) && ! is_admin_bar_showing() ) {
+ if ( ! is_admin_bar_showing() ) {
return;
}
@@ -958,7 +958,7 @@ function stats_admin_bar_head() {
}
#wpadminbar .quicklinks li#wp-admin-bar-stats a img {
height: 24px;
- padding: 4px 0;
+ margin: 4px 0;
max-width: none;
border: none;
}
@@ -983,7 +983,15 @@ function stats_admin_bar_menu( &$wp_admin_bar ) {
$title = esc_attr( __( 'Views over 48 hours. Click for more Site Stats.', 'jetpack' ) );
- $menu = array( 'id' => 'stats', 'title' => "<div><script type='text/javascript'>var src;if(typeof(window.devicePixelRatio)=='undefined'||window.devicePixelRatio<2){src='$img_src';}else{src='$img_src_2x';}document.write('<img src=\''+src+'\' alt=\'$alt\' title=\'$title\' />');</script></div>", 'href' => $url );
+ $menu = array(
+ 'id' => 'stats',
+ 'href' => $url,
+ );
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ $menu['title'] = "<amp-img src='$img_src_2x' width=112 height=24 layout=fixed alt='$alt' title='$title'></amp-img>";
+ } else {
+ $menu['title'] = "<div><script type='text/javascript'>var src;if(typeof(window.devicePixelRatio)=='undefined'||window.devicePixelRatio<2){src='$img_src';}else{src='$img_src_2x';}document.write('<img src=\''+src+'\' alt=\'$alt\' title=\'$title\' />');</script></div>";
+ }
$wp_admin_bar->add_menu( $menu );
}
@@ -1196,7 +1204,7 @@ function stats_jetpack_dashboard_widget() {
<input type="hidden" name="widget_id" value="dashboard_stats" />
<?php submit_button( __( 'Submit', 'jetpack' ) ); ?>
</form>
- <span id="js-toggle-stats_dashboard_widget_control">
+ <span class="js-toggle-stats_dashboard_widget_control">
<?php esc_html_e( 'Configure', 'jetpack' ); ?>
</span>
<div id="dashboard_stats">
@@ -1206,7 +1214,7 @@ function stats_jetpack_dashboard_widget() {
</div>
<script>
jQuery(document).ready(function($){
- var $toggle = $('#js-toggle-stats_dashboard_widget_control');
+ var $toggle = $('.js-toggle-stats_dashboard_widget_control');
$toggle.parent().prev().append( $toggle );
$toggle.show().click(function(e){
@@ -1218,7 +1226,7 @@ function stats_jetpack_dashboard_widget() {
});
</script>
<style>
- #js-toggle-stats_dashboard_widget_control {
+ .js-toggle-stats_dashboard_widget_control {
display: none;
float: right;
margin-top: 0.2em;
@@ -1447,7 +1455,6 @@ function stats_dashboard_widget_content() {
}
?>
-<a class="button" href="admin.php?page=stats"><?php esc_html_e( 'View All', 'jetpack' ); ?></a>
<div id="stats-info">
<div id="top-posts" class='stats-section'>
<div class="stats-section-inner">
@@ -1483,15 +1490,28 @@ function stats_dashboard_widget_content() {
<p class="nothing"><?php esc_html_e( 'Sorry, nothing to report.', 'jetpack' ); ?></p>
<?php
} else {
-?>
- <p><?php echo join( ',&nbsp; ', $searches );?></p>
- <?php
+ foreach ( $searches as $search_term_item ) {
+ printf(
+ '<p>%s</p>',
+ $search_term_item
+ );
+ }
}
?>
</div>
</div>
</div>
<div class="clear"></div>
+<div class="stats-view-all">
+<?php
+ printf(
+ '<a class="button" target="_blank" rel="noopener noreferrer" href="%1$s">%2$s</a>',
+ esc_url( "https://wordpress.com/stats/day/" . Jetpack::build_raw_urls( get_home_url() ) ),
+ esc_html__( 'View all stats', 'jetpack' )
+ );
+?>
+</div>
+<div class="clear"></div>
<?php
exit;
}
@@ -1725,6 +1745,9 @@ function stats_get_from_restapi( $args = array(), $resource = '' ) {
$time = key( $stats_cache[ $cache_key ] );
if ( time() - $time < ( 5 * MINUTE_IN_SECONDS ) ) {
$cached_stats = $stats_cache[ $cache_key ][ $time ];
+ if ( is_wp_error( $cached_stats ) ) {
+ return $cached_stats;
+ }
$cached_stats = (object) array_merge( array( 'cached_at' => $time ), (array) $cached_stats );
return $cached_stats;
}
@@ -1734,12 +1757,11 @@ function stats_get_from_restapi( $args = array(), $resource = '' ) {
// 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 = is_wp_error( $response ) ? $response : new WP_Error( 'stats_error' );
+ } else {
+ $data = json_decode( wp_remote_retrieve_body( $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 ) ) {
diff --git a/plugins/jetpack/modules/subscriptions.php b/plugins/jetpack/modules/subscriptions.php
index fb0b6eb3..aa00cf13 100644
--- a/plugins/jetpack/modules/subscriptions.php
+++ b/plugins/jetpack/modules/subscriptions.php
@@ -2,14 +2,13 @@
/**
* 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.
* Sort Order: 9
* Recommendation Order: 8
* First Introduced: 1.2
* Requires Connection: Yes
* Auto Activate: Yes
* Module Tags: Social
- * Feature: Engagement, Jumpstart
+ * Feature: Engagement
* Additional Search Queries: subscriptions, subscription, email, follow, followers, subscribers, signup
*/
@@ -81,15 +80,12 @@ class Jetpack_Subscriptions {
// Add Configuration Page
add_action( 'admin_init', array( $this, 'configure' ) );
- // Set up the subscription widget.
- add_action( 'widgets_init', array( $this, 'widget_init' ) );
-
// Catch subscription widget submits
if ( isset( $_REQUEST['jetpack_subscriptions_widget'] ) )
add_action( 'template_redirect', array( $this, 'widget_submit' ) );
// Set up the comment subscription checkboxes
- add_action( 'comment_form_after_fields', array( $this, 'comment_subscribe_init' ) );
+ add_filter( 'comment_form_submit_button', array( $this, 'comment_subscribe_init' ), 10, 2 );
// Catch comment posts and check for subscriptions.
add_action( 'comment_post', array( $this, 'comment_subscribe_submit' ), 50, 2 );
@@ -214,6 +210,11 @@ class Jetpack_Subscriptions {
return false;
}
+ // Private posts are not sent to subscribers.
+ if ( 'private' === $post->post_status ) {
+ return false;
+ }
+
/**
* Array of categories that will never trigger subscription emails.
*
@@ -515,15 +516,6 @@ class Jetpack_Subscriptions {
}
/**
- * Jetpack_Subscriptions::widget_init()
- *
- * Initialize and register the Jetpack Subscriptions widget.
- */
- function widget_init() {
- register_widget( 'Jetpack_Subscriptions_Widget' );
- }
-
- /**
* Jetpack_Subscriptions::widget_submit()
*
* When a user submits their email via the blog subscription widget, check the details and call the subsribe() method.
@@ -609,8 +601,11 @@ class Jetpack_Subscriptions {
* Jetpack_Subscriptions::comment_subscribe_init()
*
* Set up and add the comment subscription checkbox to the comment form.
+ *
+ * @param string $submit_button HTML markup for the submit button.
+ * @param array $args Arguments passed to `comment_form()`.
*/
- function comment_subscribe_init() {
+ function comment_subscribe_init( $submit_button, $args ) {
global $post;
$comments_checked = '';
@@ -679,7 +674,9 @@ class Jetpack_Subscriptions {
*
* @param string $str Comment Subscription form HTML output.
*/
- echo apply_filters( 'jetpack_comment_subscription_form', $str );
+ $str = apply_filters( 'jetpack_comment_subscription_form', $str );
+
+ return $str . $submit_button;
}
/**
@@ -787,338 +784,4 @@ class Jetpack_Subscriptions {
Jetpack_Subscriptions::init();
-
-/***
- * Blog Subscription Widget
- */
-
-class Jetpack_Subscriptions_Widget extends WP_Widget {
- function __construct() {
- $widget_ops = array(
- 'classname' => 'jetpack_subscription_widget',
- 'description' => esc_html__( 'Add an email signup form to allow people to subscribe to your blog.', 'jetpack' ),
- 'customize_selective_refresh' => true,
- );
-
- parent::__construct(
- 'blog_subscription',
- /** This filter is documented in modules/widgets/facebook-likebox.php */
- apply_filters( 'jetpack_widget_name', __( 'Blog Subscriptions', 'jetpack' ) ),
- $widget_ops
- );
-
- if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) || is_customize_preview() ) {
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) );
- }
- }
-
- /**
- * Enqueue the form's CSS.
- *
- * @since 4.5.0
- */
- function enqueue_style() {
- wp_register_style( 'jetpack-subscriptions', plugins_url( 'subscriptions/subscriptions.css', __FILE__ ) );
- wp_enqueue_style( 'jetpack-subscriptions' );
- }
-
- function widget( $args, $instance ) {
- 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 {
- $current_user = wp_get_current_user();
- if ( ! empty( $current_user->user_email ) ) {
- $subscribe_email = esc_attr( $current_user->user_email );
- } else {
- $subscribe_email = '';
- }
- }
-
- /** This action is already documented in modules/widgets/gravatar-profile.php */
- do_action( 'jetpack_stats_extra', 'widget_view', 'jetpack_subscriptions' );
-
- $source = 'widget';
- $instance = wp_parse_args( (array) $instance, $this->defaults() );
- $subscribe_text = isset( $instance['subscribe_text'] ) ? stripslashes( $instance['subscribe_text'] ) : '';
- $subscribe_placeholder = isset( $instance['subscribe_placeholder'] ) ? stripslashes( $instance['subscribe_placeholder'] ) : '';
- $subscribe_button = isset( $instance['subscribe_button'] ) ? stripslashes( $instance['subscribe_button'] ) : '';
- $success_message = isset( $instance['success_message'] ) ? stripslashes( $instance['success_message'] ) : '';
- $widget_id = esc_attr( !empty( $args['widget_id'] ) ? esc_attr( $args['widget_id'] ) : mt_rand( 450, 550 ) );
-
- $show_subscribers_total = (bool) $instance['show_subscribers_total'];
- $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 );
-
- // Display the subscription form
- echo $args['before_widget'];
-
- // Only show the title if there actually is a title
- if( ! empty( $instance['title'] ) ) {
- echo $args['before_title'] . esc_attr( $instance['title'] ) . $args['after_title'] . "\n";
- }
-
- $referer = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
-
- // Display any errors
- if ( isset( $_GET['subscribe'] ) ) :
- switch ( $_GET['subscribe'] ) :
- 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' )
- ); ?></p>
- <?php break;
- case 'already' : ?>
- <p class="error"><?php printf( __( 'You have already subscribed to this site. Please check your inbox. <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' )
- ); ?></p>
- <?php break;
- case 'success' : ?>
- <div class="success"><?php echo wpautop( str_replace( '[total-subscribers]', number_format_i18n( $subscribers_total['value'] ), $success_message ) ); ?></div>
- <?php break;
- default : ?>
- <p class="error"><?php esc_html_e( 'There was an error when subscribing. Please try again.', 'jetpack' ); ?></p>
- <?php break;
- endswitch;
- endif;
-
- // Display a subscribe form
- if ( isset( $_GET['subscribe'] ) && 'success' == $_GET['subscribe'] ) { ?>
- <?php
- } else { ?>
- <form action="#" method="post" accept-charset="utf-8" id="subscribe-blog-<?php echo $widget_id; ?>">
- <?php
- 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'] ) || 'success' != $_GET['subscribe'] ) { ?>
- <p id="subscribe-email">
- <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 ) . '-' . esc_attr( $widget_id ); ?>" placeholder="<?php echo esc_attr( $subscribe_placeholder ); ?>" />
- </p>
-
- <p id="subscribe-submit">
- <input type="hidden" name="action" value="subscribe" />
- <input type="hidden" name="source" value="<?php echo esc_url( $referer ); ?>" />
- <input type="hidden" name="sub-type" value="<?php echo esc_attr( $source ); ?>" />
- <input type="hidden" name="redirect_fragment" value="<?php echo $widget_id; ?>" />
- <?php
- if ( is_user_logged_in() ) {
- wp_nonce_field( 'blogsub_subscribe_'. get_current_blog_id(), '_wpnonce', false );
- }
- ?>
- <input type="submit" value="<?php echo esc_attr( $subscribe_button ); ?>" name="jetpack_subscriptions_widget" />
- </p>
- <?php }?>
- </form>
-
- <script>
- /*
- 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
-
- echo "\n" . $args['after_widget'];
- }
-
- function increment_subscriber_count( $current_subs_array = array() ) {
- $current_subs_array['value']++;
-
- set_transient( 'wpcom_subscribers_total', $current_subs_array, 3600 ); // try to cache the result for at least 1 hour
-
- return $current_subs_array;
- }
-
- function fetch_subscriber_count() {
- $subs_count = get_transient( 'wpcom_subscribers_total' );
-
- if ( FALSE === $subs_count || 'failed' == $subs_count['status'] ) {
- Jetpack:: load_xml_rpc_client();
-
- $xml = new Jetpack_IXR_Client( array( 'user_id' => JETPACK_MASTER_USER, ) );
-
- $xml->query( 'jetpack.fetchSubscriberCount' );
-
- if ( $xml->isError() ) { // if we get an error from .com, set the status to failed so that we will try again next time the data is requested
- $subs_count = array(
- 'status' => 'failed',
- 'code' => $xml->getErrorCode(),
- 'message' => $xml->getErrorMessage(),
- 'value' => ( isset( $subs_count['value'] ) ) ? $subs_count['value'] : 0,
- );
- } else {
- $subs_count = array(
- 'status' => 'success',
- 'value' => $xml->getResponse(),
- );
- }
-
- set_transient( 'wpcom_subscribers_total', $subs_count, 3600 ); // try to cache the result for at least 1 hour
- }
-
- return $subs_count;
- }
-
- function update( $new_instance, $old_instance ) {
- $instance = $old_instance;
-
- $instance['title'] = wp_kses( stripslashes( $new_instance['title'] ), array() );
- $instance['subscribe_text'] = wp_filter_post_kses( stripslashes( $new_instance['subscribe_text'] ) );
- $instance['subscribe_placeholder'] = wp_kses( stripslashes( $new_instance['subscribe_placeholder'] ), array() );
- $instance['subscribe_button'] = wp_kses( stripslashes( $new_instance['subscribe_button'] ), array() );
- $instance['success_message'] = wp_kses( stripslashes( $new_instance['success_message'] ), array() );
- $instance['show_subscribers_total'] = isset( $new_instance['show_subscribers_total'] ) && $new_instance['show_subscribers_total'];
-
- return $instance;
- }
-
- public static function defaults() {
- return array(
- 'title' => esc_html__( 'Subscribe to Blog via Email', 'jetpack' ),
- '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 'Confirm Follow' to start subscribing.", 'jetpack' ),
- 'show_subscribers_total' => true,
- );
- }
-
- function form( $instance ) {
- $instance = wp_parse_args( (array) $instance, $this->defaults() );
-
- $title = stripslashes( $instance['title'] );
- $subscribe_text = stripslashes( $instance['subscribe_text'] );
- $subscribe_placeholder = stripslashes( $instance['subscribe_placeholder'] );
- $subscribe_button = stripslashes( $instance['subscribe_button'] );
- $success_message = stripslashes( $instance['success_message']);
- $show_subscribers_total = checked( $instance['show_subscribers_total'], true, false );
-
- $subs_fetch = $this->fetch_subscriber_count();
-
- if ( 'failed' == $subs_fetch['status'] ) {
- printf( '<div class="error inline"><p>' . __( '%s: %s', 'jetpack' ) . '</p></div>', esc_html( $subs_fetch['code'] ), esc_html( $subs_fetch['message'] ) );
- }
- $subscribers_total = number_format_i18n( $subs_fetch['value'] );
-?>
-<p>
- <label for="<?php echo $this->get_field_id( 'title' ); ?>">
- <?php _e( 'Widget title:', 'jetpack' ); ?>
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
- </label>
-</p>
-<p>
- <label for="<?php echo $this->get_field_id( 'subscribe_text' ); ?>">
- <?php _e( 'Optional text to display to your readers:', 'jetpack' ); ?>
- <textarea class="widefat" id="<?php echo $this->get_field_id( 'subscribe_text' ); ?>" name="<?php echo $this->get_field_name( 'subscribe_text' ); ?>" rows="3"><?php echo esc_html( $subscribe_text ); ?></textarea>
- </label>
-</p>
-<p>
- <label for="<?php echo $this->get_field_id( 'subscribe_placeholder' ); ?>">
- <?php esc_html_e( 'Subscribe Placeholder:', 'jetpack' ); ?>
- <input class="widefat" id="<?php echo $this->get_field_id( 'subscribe_placeholder' ); ?>" name="<?php echo $this->get_field_name( 'subscribe_placeholder' ); ?>" type="text" value="<?php echo esc_attr( $subscribe_placeholder ); ?>" />
- </label>
-</p>
-<p>
- <label for="<?php echo $this->get_field_id( 'subscribe_button' ); ?>">
- <?php _e( 'Subscribe Button:', 'jetpack' ); ?>
- <input class="widefat" id="<?php echo $this->get_field_id( 'subscribe_button' ); ?>" name="<?php echo $this->get_field_name( 'subscribe_button' ); ?>" type="text" value="<?php echo esc_attr( $subscribe_button ); ?>" />
- </label>
-</p>
-<p>
- <label for="<?php echo $this->get_field_id( 'success_message' ); ?>">
- <?php _e( 'Success Message Text:', 'jetpack' ); ?>
- <textarea class="widefat" id="<?php echo $this->get_field_id( 'success_message' ); ?>" name="<?php echo $this->get_field_name( 'success_message' ); ?>" rows="5"><?php echo esc_html( $success_message ); ?></textarea>
- </label>
-</p>
-<p>
- <label for="<?php echo $this->get_field_id( 'show_subscribers_total' ); ?>">
- <input type="checkbox" id="<?php echo $this->get_field_id( 'show_subscribers_total' ); ?>" name="<?php echo $this->get_field_name( 'show_subscribers_total' ); ?>" value="1"<?php echo $show_subscribers_total; ?> />
- <?php echo esc_html( sprintf( _n( 'Show total number of subscribers? (%s subscriber)', 'Show total number of subscribers? (%s subscribers)', $subscribers_total, 'jetpack' ), $subscribers_total ) ); ?>
- </label>
-</p>
-<?php
- }
-}
-
-add_shortcode( 'jetpack_subscription_form', 'jetpack_do_subscription_form' );
-add_shortcode( 'blog_subscription_form', 'jetpack_do_subscription_form' );
-
-function jetpack_do_subscription_form( $instance ) {
- if ( empty( $instance ) || ! is_array( $instance ) ) {
- $instance = array();
- }
- $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', $instance, $args );
- $output = ob_get_clean();
- return $output;
-}
+include dirname( __FILE__ ) . '/subscriptions/views.php';
diff --git a/plugins/jetpack/modules/subscriptions/readme.md b/plugins/jetpack/modules/subscriptions/readme.md
new file mode 100644
index 00000000..44680150
--- /dev/null
+++ b/plugins/jetpack/modules/subscriptions/readme.md
@@ -0,0 +1,12 @@
+## Assets for Subscriptions
+
+### subscriptions.css
+
+CSS required to render the subscription widget
+
+### views.php
+
+This file handles the registration of various subscriptions
+views, i.e. a widget and a block for the post editor.
+
+This file is shared with wordpress.com
diff --git a/plugins/jetpack/modules/subscriptions/subscriptions.css b/plugins/jetpack/modules/subscriptions/subscriptions.css
index feda9836..2bd1bd23 100644
--- a/plugins/jetpack/modules/subscriptions/subscriptions.css
+++ b/plugins/jetpack/modules/subscriptions/subscriptions.css
@@ -2,6 +2,28 @@
width: 95%;
}
+.comment-subscription-form {
+ margin-bottom: 1em;
+}
+
.comment-subscription-form .subscribe-label {
display: inline !important;
}
+
+/*
+Text meant only for screen readers.
+Provides support for themes that do not bundle this CSS yet.
+@see https://make.wordpress.org/accessibility/2015/02/09/hiding-text-for-screen-readers-with-wordpress-core/
+***********************************/
+.screen-reader-text {
+ border: 0;
+ clip: rect(1px, 1px, 1px, 1px);
+ clip-path: inset(50%);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute ! important;
+ width: 1px;
+ word-wrap: normal ! important;
+}
diff --git a/plugins/jetpack/modules/subscriptions/views.php b/plugins/jetpack/modules/subscriptions/views.php
new file mode 100644
index 00000000..6a332f8f
--- /dev/null
+++ b/plugins/jetpack/modules/subscriptions/views.php
@@ -0,0 +1,755 @@
+<?php
+
+class Jetpack_Subscriptions_Widget extends WP_Widget {
+ static $instance_count = 0;
+ /**
+ * @var array When printing the submit button, what tags are allowed
+ */
+ static $allowed_html_tags_for_submit_button = array( 'br' => array() );
+
+ function __construct() {
+ $widget_ops = array(
+ 'classname' => 'widget_blog_subscription jetpack_subscription_widget',
+ 'description' => __( 'Add an email signup form to allow people to subscribe to your blog.', 'jetpack' ),
+ 'customize_selective_refresh' => true,
+ );
+
+ $name = self::is_jetpack() ?
+ /** This filter is documented in modules/widgets/facebook-likebox.php */
+ apply_filters( 'jetpack_widget_name', __( 'Blog Subscriptions', 'jetpack' ) ) :
+ __( 'Follow Blog', 'jetpack' );
+
+ parent::__construct(
+ 'blog_subscription',
+ $name,
+ $widget_ops
+ );
+
+ if ( self::is_jetpack() &&
+ (
+ is_active_widget( false, false, $this->id_base ) ||
+ is_active_widget( false, false, 'monster' ) ||
+ is_customize_preview()
+ )
+ ) {
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) );
+ }
+ }
+
+ /**
+ * Enqueue the form's CSS.
+ *
+ * @since 4.5.0
+ */
+ function enqueue_style() {
+ wp_register_style(
+ 'jetpack-subscriptions',
+ plugins_url( 'subscriptions.css', __FILE__ ),
+ array(),
+ JETPACK__VERSION
+ );
+ wp_enqueue_style( 'jetpack-subscriptions' );
+ }
+
+ /**
+ * Renders a full widget either within the context of WordPress widget, or in response to a shortcode.
+ *
+ * @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.
+ */
+ function widget( $args, $instance ) {
+ if ( self::is_jetpack() &&
+ /** This filter is documented in modules/contact-form/grunion-contact-form.php */
+ false === apply_filters( 'jetpack_auto_fill_logged_in_user', false )
+ ) {
+ $subscribe_email = '';
+ } else {
+ $current_user = wp_get_current_user();
+ if ( ! empty( $current_user->user_email ) ) {
+ $subscribe_email = esc_attr( $current_user->user_email );
+ } else {
+ $subscribe_email = '';
+ }
+ }
+
+ $stats_action = self::is_jetpack() ? 'jetpack_subscriptions' : 'follow_blog';
+ /** This action is documented in modules/widgets/gravatar-profile.php */
+ do_action( 'jetpack_stats_extra', 'widget_view', $stats_action );
+
+ $after_widget = isset( $args['after_widget'] ) ? $args['after_widget'] : '';
+ $before_widget = isset( $args['before_widget'] ) ? $args['before_widget'] : '';
+ $instance = wp_parse_args( (array) $instance, $this->defaults() );
+
+ echo $before_widget;
+
+ Jetpack_Subscriptions_Widget::$instance_count ++;
+
+ self::render_widget_title( $args, $instance );
+
+ self::render_widget_status_messages( $instance );
+
+ if ( self::is_current_user_subscribed() ) {
+ self::render_widget_already_subscribed( $instance );
+ } else {
+ self::render_widget_subscription_form( $args, $instance, $subscribe_email );
+ }
+
+ echo "\n" . $after_widget;
+ }
+
+ /**
+ * Prints the widget's title. If show_only_email_and_button is true, we will not show a title.
+ *
+ * @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.
+ */
+ static function render_widget_title( $args, $instance ) {
+ $show_only_email_and_button = $instance['show_only_email_and_button'];
+ $before_title = isset( $args['before_title'] ) ? $args['before_title'] : '';
+ $after_title = isset( $args['after_title'] ) ? $args['after_title'] : '';
+ if ( self::is_wpcom() && ! $show_only_email_and_button ) {
+ if ( self::is_current_user_subscribed() ) {
+ if ( ! empty( $instance['title_following'] ) ) {
+ echo $before_title . '<label for="subscribe-field' . ( Jetpack_Subscriptions_Widget::$instance_count > 1 ? '-' . Jetpack_Subscriptions_Widget::$instance_count : '' ) . '">' . esc_attr( $instance['title_following'] ) . '</label>' . $after_title . "\n";
+ }
+ } else {
+ if ( ! empty( $instance['title'] ) ) {
+ echo $before_title . '<label for="subscribe-field' . ( Jetpack_Subscriptions_Widget::$instance_count > 1 ? '-' . Jetpack_Subscriptions_Widget::$instance_count : '' ) . '">' . esc_attr( $instance['title'] ) . '</label>' . $after_title . "\n";
+ }
+ }
+ }
+
+ if ( self::is_jetpack() && empty( $instance['show_only_email_and_button'] ) ) {
+ echo $args['before_title'] . esc_attr( $instance['title'] ) . $args['after_title'] . "\n";
+ }
+ }
+
+ /**
+ * Prints the subscription block's status messages after someone has attempted to subscribe.
+ * Either a success message or an error message.
+ *
+ * @param array $instance The settings for the particular instance of the widget.
+ */
+ static function render_widget_status_messages( $instance ) {
+ if ( self::is_jetpack() && isset( $_GET['subscribe'] ) ) {
+ $success_message = isset( $instance['success_message'] ) ? stripslashes( $instance['success_message'] ) : '';
+ $subscribers_total = self::fetch_subscriber_count();
+ switch ( $_GET['subscribe'] ) :
+ 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' )
+ ); ?></p>
+ <?php break;
+ case 'already' : ?>
+ <p class="error"><?php printf( __( 'You have already subscribed to this site. Please check your inbox. <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' )
+ ); ?></p>
+ <?php break;
+ case 'success' : ?>
+ <div class="success"><?php echo wpautop( str_replace( '[total-subscribers]', number_format_i18n( $subscribers_total['value'] ), $success_message ) ); ?></div>
+ <?php break;
+ default : ?>
+ <p class="error"><?php esc_html_e( 'There was an error when subscribing. Please try again.', 'jetpack' ); ?></p>
+ <?php break;
+ endswitch;
+ }
+
+ if ( self::is_wpcom() && self::wpcom_has_status_message() ) {
+ global $themecolors;
+ switch ( $_GET['blogsub'] ) {
+ case 'confirming':
+ echo "<div style='background-color: #{$themecolors['bg']}; border: 1px solid #{$themecolors['border']}; color: #{$themecolors['text']}; padding-left: 5px; padding-right: 5px; margin-bottom: 10px;'>";
+ _e( 'Thanks for subscribing! You&rsquo;ll get an email with a link to confirm your subscription. If you don&rsquo;t get it, please <a href="http://en.support.wordpress.com/contact/">contact us</a>.' );
+ echo "</div>";
+ break;
+ case 'blocked':
+ echo "<div style='background-color: #{$themecolors['bg']}; border: 1px solid #{$themecolors['border']}; color: #{$themecolors['text']}; padding-left: 5px; padding-right: 5px; margin-bottom: 10px;'>";
+ _e( 'Subscriptions have been blocked for this email address.' );
+ echo "</div>";
+ break;
+ case 'flooded':
+ echo "<div style='background-color: #{$themecolors['bg']}; border: 1px solid #{$themecolors['border']}; color: #{$themecolors['text']}; padding-left: 5px; padding-right: 5px; margin-bottom: 10px;'>";
+ _e( 'You already have several pending email subscriptions. Approve or delete a few through your <a href="https://subscribe.wordpress.com/">Subscription Manager</a> before attempting to subscribe to more blogs.' );
+ echo "</div>";
+ break;
+ case 'spammed':
+ echo "<div style='background-color: #{$themecolors['bg']}; border: 1px solid #{$themecolors['border']}; color: #{$themecolors['text']}; padding-left: 5px; padding-right: 5px; margin-bottom: 10px;'>";
+ echo wp_kses_post( sprintf( __( 'Because there are many pending subscriptions for this email address, we have blocked the subscription. Please <a href="%s">activate or delete</a> pending subscriptions before attempting to subscribe.' ), 'https://subscribe.wordpress.com/' ) );
+ echo "</div>";
+ break;
+ case 'subscribed':
+ echo "<div style='background-color: #{$themecolors['bg']}; border: 1px solid #{$themecolors['border']}; color: #{$themecolors['text']}; padding-left: 5px; padding-right: 5px; margin-bottom: 10px;'>";
+ _e( 'You&rsquo;re already subscribed to this site.' );
+ echo "</div>";
+ break;
+ case 'pending':
+ echo "<div style='background-color: #{$themecolors['bg']}; border: 1px solid #{$themecolors['border']}; color: #{$themecolors['text']}; padding-left: 5px; padding-right: 5px; margin-bottom: 10px;'>";
+ _e( 'You have a pending subscription already; we just sent you another email. Click the link or <a href="http://en.support.wordpress.com/contact/">contact us</a> if you don&rsquo;t receive it.' );
+ echo "</div>";
+ break;
+ case 'confirmed':
+ echo "<div style='background-color: #{$themecolors['bg']}; border: 1px solid #{$themecolors['border']}; color: #{$themecolors['text']}; padding-left: 5px; padding-right: 5px; margin-bottom: 10px;'>";
+ _e( 'Congrats, you&rsquo;re subscribed! You&rsquo;ll get an email with the details of your subscription and an unsubscribe link.' );
+ echo "</div>";
+ break;
+ }
+ }
+ }
+
+ /**
+ * Renders a message to folks who are already subscribed.
+ *
+ * @param array $instance The settings for the particular instance of the widget.
+ *
+ * @return void
+ */
+ static function render_widget_already_subscribed( $instance ) {
+ if ( self::is_wpcom() ) {
+ $subscribers_total = self::fetch_subscriber_count();
+ $edit_subs_url = 'https://wordpress.com/following/edit/';
+ if ( function_exists( 'localized_wpcom_url' ) ) {
+ $edit_subs_url = localized_wpcom_url( http() . '://wordpress.com/following/edit/', get_user_locale() );
+ }
+ $show_subscribers_total = (bool) $instance['show_subscribers_total'];
+ if ( $show_subscribers_total && $subscribers_total > 1 ) :
+ $subscribers_not_me = $subscribers_total - 1;
+ /* translators: %s: number of folks following the blog */
+ ?>
+ <p><?php printf( _n( 'You are following this blog, along with %s other amazing person (<a href="%s">manage</a>).', 'You are following this blog, along with %s other amazing people (<a href="%s">manage</a>).', $subscribers_not_me ), number_format_i18n( $subscribers_not_me ), $edit_subs_url ) ?></p><?php
+ else :
+ ?>
+ <p><?php printf( __( 'You are following this blog (<a href="%s">manage</a>).' ), $edit_subs_url ) ?></p><?php
+ endif;
+ }
+ }
+
+ /**
+ * Renders a form allowing folks to subscribe to the blog.
+ *
+ * @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 string $subscribe_email The email to use to prefill the form.
+ */
+ static function render_widget_subscription_form( $args, $instance, $subscribe_email ) {
+ $show_only_email_and_button = $instance['show_only_email_and_button'];
+ $subscribe_logged_in = isset( $instance['subscribe_logged_in'] ) ? stripslashes( $instance['subscribe_logged_in'] ) : '';
+ $show_subscribers_total = (bool) $instance['show_subscribers_total'];
+ $subscribe_text = empty( $instance['show_only_email_and_button'] ) ?
+ stripslashes( $instance['subscribe_text'] ) :
+ false;
+ $referer = ( is_ssl() ? 'https' : 'http' ) . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+ $source = 'widget';
+ $widget_id = esc_attr( ! empty( $args['widget_id'] ) ? esc_attr( $args['widget_id'] ) : mt_rand( 450, 550 ) );
+ $subscribe_button = ! empty( $instance['submit_button_text'] ) ? $instance['submit_button_text'] : $instance['subscribe_button'];
+ $subscribers_total = self::fetch_subscriber_count();
+ $subscribe_placeholder = isset( $instance['subscribe_placeholder'] ) ? stripslashes( $instance['subscribe_placeholder'] ) : '';
+ $submit_button_classes = isset( $instance['submit_button_classes'] ) ? $instance['submit_button_classes'] : '';
+ $submit_button_styles = isset( $instance['submit_button_styles'] ) ? $instance['submit_button_styles'] : '';
+
+ if ( self::is_wpcom() && ! self::wpcom_has_status_message() ) {
+ global $current_blog;
+ $url = defined( 'SUBSCRIBE_BLOG_URL' ) ? SUBSCRIBE_BLOG_URL : '';
+ ?>
+ <form action="<?php echo $url; ?>" method="post" accept-charset="utf-8"
+ id="subscribe-blog<?php if ( Jetpack_Subscriptions_Widget::$instance_count > 1 ) {
+ echo '-' . Jetpack_Subscriptions_Widget::$instance_count;
+ } ?>">
+ <?php if ( is_user_logged_in() ) : ?>
+ <?php
+ if ( ! $show_only_email_and_button ) {
+ echo wpautop( $subscribe_logged_in );
+ }
+ if ( $show_subscribers_total && $subscribers_total ) {
+ /* translators: %s: number of folks following the blog */
+ echo wpautop( sprintf( _n( 'Join %s other follower', 'Join %s other followers', $subscribers_total ), number_format_i18n( $subscribers_total ) ) );
+ }
+ ?>
+ <?php else : ?>
+ <?php
+ if ( ! $show_only_email_and_button ) {
+ echo wpautop( $subscribe_text );
+ }
+ if ( $show_subscribers_total && $subscribers_total ) {
+ /* translators: %s: number of folks following the blog */
+ echo wpautop( sprintf( _n( 'Join %s other follower', 'Join %s other followers', $subscribers_total ), number_format_i18n( $subscribers_total ) ) );
+ }
+ ?>
+ <p><input type="text" name="email" style="width: 95%; padding: 1px 2px"
+ placeholder="<?php esc_attr_e( 'Enter your email address' ); ?>" value=""
+ id="subscribe-field<?php if ( Jetpack_Subscriptions_Widget::$instance_count > 1 ) {
+ echo '-' . Jetpack_Subscriptions_Widget::$instance_count;
+ } ?>"/></p>
+ <?php endif; ?>
+
+ <p>
+ <input type="hidden" name="action" value="subscribe"/>
+ <input type="hidden" name="blog_id" value="<?php echo (int) $current_blog->blog_id; ?>"/>
+ <input type="hidden" name="source" value="<?php echo esc_url( $referer ); ?>"/>
+ <input type="hidden" name="sub-type" value="<?php echo esc_attr( $source ); ?>"/>
+ <input type="hidden" name="redirect_fragment" value="<?php echo esc_attr( $widget_id ); ?>"/>
+ <?php wp_nonce_field( 'blogsub_subscribe_' . $current_blog->blog_id, '_wpnonce', false ); ?>
+ <button type="submit"
+ <?php if ( ! empty( $submit_button_classes ) ) { ?>
+ class="<?php echo esc_attr( $submit_button_classes ); ?>"
+ <?php }; ?>
+ <?php if ( ! empty( $submit_button_styles ) ) { ?>
+ style="<?php echo esc_attr( $submit_button_styles ); ?>"
+ <?php }; ?>
+ >
+ <?php
+ echo wp_kses(
+ $subscribe_button,
+ self::$allowed_html_tags_for_submit_button
+ );
+ ?>
+ </button>
+ </p>
+ </form>
+ <?php
+ }
+
+ if ( self::is_jetpack() ) {
+ /**
+ * 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 );
+ ?>
+ <form action="#" method="post" accept-charset="utf-8" id="subscribe-blog-<?php echo $widget_id; ?>">
+ <?php
+ if ( $subscribe_text && ( ! 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'] ) {
+ /* translators: %s: number of folks following the blog */
+ 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'] ) || 'success' != $_GET['subscribe'] ) { ?>
+ <p id="subscribe-email">
+ <label id="jetpack-subscribe-label"
+ class="screen-reader-text"
+ 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 ) . '-' . esc_attr( $widget_id ); ?>"
+ placeholder="<?php echo esc_attr( $subscribe_placeholder ); ?>"/>
+ </p>
+
+ <p id="subscribe-submit">
+ <input type="hidden" name="action" value="subscribe"/>
+ <input type="hidden" name="source" value="<?php echo esc_url( $referer ); ?>"/>
+ <input type="hidden" name="sub-type" value="<?php echo esc_attr( $source ); ?>"/>
+ <input type="hidden" name="redirect_fragment" value="<?php echo $widget_id; ?>"/>
+ <?php
+ if ( is_user_logged_in() ) {
+ wp_nonce_field( 'blogsub_subscribe_' . get_current_blog_id(), '_wpnonce', false );
+ }
+ ?>
+ <button type="submit"
+ <?php if ( ! empty( $submit_button_classes ) ) { ?>
+ class="<?php echo esc_attr( $submit_button_classes ); ?>"
+ <?php }; ?>
+ <?php if ( ! empty( $submit_button_styles ) ) { ?>
+ style="<?php echo esc_attr( $submit_button_styles ); ?>"
+ <?php }; ?>
+ name="jetpack_subscriptions_widget"
+ >
+ <?php
+ echo wp_kses(
+ $subscribe_button,
+ self::$allowed_html_tags_for_submit_button
+ ); ?>
+ </button>
+ </p>
+ <?php } ?>
+ </form>
+ <?php }
+ }
+
+ /**
+ * Determines if the current user is subscribed to the blog.
+ *
+ * @return bool Is the person already subscribed.
+ */
+ static function is_current_user_subscribed() {
+ $subscribed = isset( $_GET['subscribe'] ) && 'success' == $_GET['subscribe'];
+
+ if ( self::is_wpcom() && class_exists( 'Blog_Subscription' ) && class_exists( 'Blog_Subscriber' ) ) {
+ $subscribed = is_user_logged_in() && Blog_Subscription::is_subscribed( new Blog_Subscriber() );
+ }
+
+ return $subscribed;
+ }
+
+ /**
+ * Is this script running in the wordpress.com environment?
+ *
+ * @return bool
+ */
+ static function is_wpcom() {
+ return defined( 'IS_WPCOM' ) && IS_WPCOM;
+ }
+
+ /**
+ * Is this script running in a self-hosted environment?
+ *
+ * @return bool
+ */
+ static function is_jetpack() {
+ return ! self::is_wpcom();
+ }
+
+ /**
+ * Used to determine if there is a valid status slug within the wordpress.com environment.
+ *
+ * @return bool
+ */
+ static function wpcom_has_status_message() {
+ return isset( $_GET['blogsub'] ) &&
+ in_array(
+ $_GET['blogsub'],
+ array(
+ 'confirming',
+ 'blocked',
+ 'flooded',
+ 'spammed',
+ 'subscribed',
+ 'pending',
+ 'confirmed',
+ )
+ );
+ }
+
+ /**
+ * Determine the amount of folks currently subscribed to the blog.
+ *
+ * @return int|array
+ */
+ static function fetch_subscriber_count() {
+ $subs_count = 0;
+
+ if ( self::is_jetpack() ) {
+ $subs_count = get_transient( 'wpcom_subscribers_total' );
+ if ( false === $subs_count || 'failed' == $subs_count['status'] ) {
+ Jetpack::load_xml_rpc_client();
+
+ $xml = new Jetpack_IXR_Client( array( 'user_id' => JETPACK_MASTER_USER, ) );
+
+ $xml->query( 'jetpack.fetchSubscriberCount' );
+
+ if ( $xml->isError() ) { // if we get an error from .com, set the status to failed so that we will try again next time the data is requested
+ $subs_count = array(
+ 'status' => 'failed',
+ 'code' => $xml->getErrorCode(),
+ 'message' => $xml->getErrorMessage(),
+ 'value' => ( isset( $subs_count['value'] ) ) ? $subs_count['value'] : 0,
+ );
+ } else {
+ $subs_count = array(
+ 'status' => 'success',
+ 'value' => $xml->getResponse(),
+ );
+ }
+
+ set_transient( 'wpcom_subscribers_total', $subs_count, 3600 ); // try to cache the result for at least 1 hour
+ }
+ }
+
+ if ( self::is_wpcom() && function_exists( 'wpcom_reach_total_for_blog' ) ) {
+ $subs_count = wpcom_reach_total_for_blog();
+ }
+
+ return $subs_count;
+ }
+
+ /**
+ * Updates a particular instance of a widget when someone saves it in wp-admin.
+ *
+ * @param array $new_instance
+ * @param array $old_instance
+ *
+ * @return array
+ */
+ function update( $new_instance, $old_instance ) {
+ $instance = $old_instance;
+
+ if ( self::is_jetpack() ) {
+ $instance['title'] = wp_kses( stripslashes( $new_instance['title'] ), array() );
+ $instance['subscribe_placeholder'] = wp_kses( stripslashes( $new_instance['subscribe_placeholder'] ), array() );
+ $instance['subscribe_button'] = wp_kses( stripslashes( $new_instance['subscribe_button'] ), array() );
+ $instance['success_message'] = wp_kses( stripslashes( $new_instance['success_message'] ), array() );
+ }
+
+ if ( self::is_wpcom() ) {
+ $instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );
+ $instance['title_following'] = strip_tags( stripslashes( $new_instance['title_following'] ) );
+ $instance['subscribe_logged_in'] = wp_filter_post_kses( stripslashes( $new_instance['subscribe_logged_in'] ) );
+ $instance['subscribe_button'] = strip_tags( stripslashes( $new_instance['subscribe_button'] ) );
+ }
+
+ $instance['show_subscribers_total'] = isset( $new_instance['show_subscribers_total'] ) && $new_instance['show_subscribers_total'];
+ $instance['show_only_email_and_button'] = isset( $new_instance['show_only_email_and_button'] ) && $new_instance['show_only_email_and_button'];
+ $instance['subscribe_text'] = wp_filter_post_kses( stripslashes( $new_instance['subscribe_text'] ) );
+
+ return $instance;
+ }
+
+ /**
+ * The default args for rendering a subscription form.
+ *
+ * @return array
+ */
+ static function defaults() {
+ $defaults = array(
+ 'show_subscribers_total' => true,
+ 'show_only_email_and_button' => false
+ );
+
+ if ( self::is_jetpack() ) {
+ $defaults['title'] = esc_html__( 'Subscribe to Blog via Email', 'jetpack' );
+ $defaults['subscribe_text'] = esc_html__( 'Enter your email address to subscribe to this blog and receive notifications of new posts by email.', 'jetpack' );
+ $defaults['subscribe_placeholder'] = esc_html__( 'Email Address', 'jetpack' );
+ $defaults['subscribe_button'] = esc_html__( 'Subscribe', 'jetpack' );
+ $defaults['success_message'] = esc_html__( "Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.", 'jetpack' );
+ }
+
+ if ( self::is_wpcom() ) {
+ $defaults['title'] = __( 'Follow Blog via Email' );
+ $defaults['title_following'] = __( 'You are following this blog' );
+ $defaults['subscribe_text'] = __( 'Enter your email address to follow this blog and receive notifications of new posts by email.' );
+ $defaults['subscribe_button'] = __( 'Follow' );
+ $defaults['subscribe_logged_in'] = __( 'Click to follow this blog and receive notifications of new posts by email.' );
+ }
+
+ return $defaults;
+ }
+
+ /**
+ * Renders the widget's options form in wp-admin.
+ *
+ * @param array $instance
+ */
+ function form( $instance ) {
+ $instance = wp_parse_args( (array) $instance, $this->defaults() );
+ $show_subscribers_total = checked( $instance['show_subscribers_total'], true, false );
+
+
+ if ( self::is_wpcom() ) {
+ $title = esc_attr( stripslashes( $instance['title'] ) );
+ $title_following = esc_attr( stripslashes( $instance['title_following'] ) );
+ $subscribe_text = esc_attr( stripslashes( $instance['subscribe_text'] ) );
+ $subscribe_logged_in = esc_attr( stripslashes( $instance['subscribe_logged_in'] ) );
+ $subscribe_button = esc_attr( stripslashes( $instance['subscribe_button'] ) );
+ $subscribers_total = self::fetch_subscriber_count();
+ }
+
+ if ( self::is_jetpack() ) {
+ $title = stripslashes( $instance['title'] );
+ $subscribe_text = stripslashes( $instance['subscribe_text'] );
+ $subscribe_placeholder = stripslashes( $instance['subscribe_placeholder'] );
+ $subscribe_button = stripslashes( $instance['subscribe_button'] );
+ $success_message = stripslashes( $instance['success_message'] );
+ $subs_fetch = self::fetch_subscriber_count();
+ if ( 'failed' == $subs_fetch['status'] ) {
+ printf( '<div class="error inline"><p>%s: %s</p></div>', esc_html( $subs_fetch['code'] ), esc_html( $subs_fetch['message'] ) );
+ }
+ $subscribers_total = number_format_i18n( $subs_fetch['value'] );
+ }
+
+ if ( self::is_wpcom() ) : ?>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>">
+ <?php _e( 'Widget title for non-followers:' ); ?>
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text"
+ value="<?php echo $title; ?>"/>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'title_following' ); ?>">
+ <?php _e( 'Widget title for followers:' ); ?>
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title_following' ); ?>"
+ name="<?php echo $this->get_field_name( 'title_following' ); ?>" type="text"
+ value="<?php echo $title_following; ?>"/>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'subscribe_logged_in' ); ?>">
+ <?php _e( 'Optional text to display to logged in WordPress.com users:' ); ?>
+ <textarea style="width: 95%" id="<?php echo $this->get_field_id( 'subscribe_logged_in' ); ?>"
+ name="<?php echo $this->get_field_name( 'subscribe_logged_in' ); ?>"
+ type="text"><?php echo $subscribe_logged_in; ?></textarea>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'subscribe_text' ); ?>">
+ <?php _e( 'Optional text to display to non-WordPress.com users:' ); ?>
+ <textarea style="width: 95%" id="<?php echo $this->get_field_id( 'subscribe_text' ); ?>"
+ name="<?php echo $this->get_field_name( 'subscribe_text' ); ?>"
+ type="text"><?php echo $subscribe_text; ?></textarea>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'subscribe_button' ); ?>">
+ <?php _e( 'Follow Button Text:' ); ?>
+ <input class="widefat" id="<?php echo $this->get_field_id( 'subscribe_button' ); ?>"
+ name="<?php echo $this->get_field_name( 'subscribe_button' ); ?>" type="text"
+ value="<?php echo $subscribe_button; ?>"/>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'show_subscribers_total' ); ?>">
+ <input type="checkbox" id="<?php echo $this->get_field_id( 'show_subscribers_total' ); ?>"
+ name="<?php echo $this->get_field_name( 'show_subscribers_total' ); ?>"
+ value="1"<?php echo $show_subscribers_total; ?> />
+ <?php echo esc_html( sprintf( _n( 'Show total number of followers? (%s follower)', 'Show total number of followers? (%s followers)', $subscribers_total ), number_format_i18n( $subscribers_total ) ) ); ?>
+ </label>
+ </p>
+ <?php endif;
+
+ if ( self::is_jetpack() ) : ?>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>">
+ <?php _e( 'Widget title:', 'jetpack' ); ?>
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text"
+ value="<?php echo esc_attr( $title ); ?>"/>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'subscribe_text' ); ?>">
+ <?php _e( 'Optional text to display to your readers:', 'jetpack' ); ?>
+ <textarea class="widefat" id="<?php echo $this->get_field_id( 'subscribe_text' ); ?>"
+ name="<?php echo $this->get_field_name( 'subscribe_text' ); ?>"
+ rows="3"><?php echo esc_html( $subscribe_text ); ?></textarea>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'subscribe_placeholder' ); ?>">
+ <?php esc_html_e( 'Subscribe Placeholder:', 'jetpack' ); ?>
+ <input class="widefat" id="<?php echo $this->get_field_id( 'subscribe_placeholder' ); ?>"
+ name="<?php echo $this->get_field_name( 'subscribe_placeholder' ); ?>" type="text"
+ value="<?php echo esc_attr( $subscribe_placeholder ); ?>"/>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'subscribe_button' ); ?>">
+ <?php _e( 'Subscribe Button:', 'jetpack' ); ?>
+ <input class="widefat" id="<?php echo $this->get_field_id( 'subscribe_button' ); ?>"
+ name="<?php echo $this->get_field_name( 'subscribe_button' ); ?>" type="text"
+ value="<?php echo esc_attr( $subscribe_button ); ?>"/>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'success_message' ); ?>">
+ <?php _e( 'Success Message Text:', 'jetpack' ); ?>
+ <textarea class="widefat" id="<?php echo $this->get_field_id( 'success_message' ); ?>"
+ name="<?php echo $this->get_field_name( 'success_message' ); ?>"
+ rows="5"><?php echo esc_html( $success_message ); ?></textarea>
+ </label>
+ </p>
+ <p>
+ <label for="<?php echo $this->get_field_id( 'show_subscribers_total' ); ?>">
+ <input type="checkbox" id="<?php echo $this->get_field_id( 'show_subscribers_total' ); ?>"
+ name="<?php echo $this->get_field_name( 'show_subscribers_total' ); ?>"
+ value="1"<?php echo $show_subscribers_total; ?> />
+ <?php echo esc_html( sprintf( _n( 'Show total number of subscribers? (%s subscriber)', 'Show total number of subscribers? (%s subscribers)', $subscribers_total, 'jetpack' ), $subscribers_total ) ); ?>
+ </label>
+ </p>
+ <?php endif;
+ }
+}
+
+if ( defined( 'IS_WPCOM' ) && IS_WPCOM && function_exists( 'class_alias' ) ) {
+ class_alias( 'Jetpack_Subscriptions_Widget', 'Blog_Subscription_Widget' );
+}
+
+function get_jetpack_blog_subscriptions_widget_classname() {
+ return ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ?
+ 'Blog_Subscription_Widget' :
+ 'Jetpack_Subscriptions_Widget';
+}
+
+function jetpack_do_subscription_form( $instance ) {
+ if ( empty( $instance ) || ! is_array( $instance ) ) {
+ $instance = array();
+ }
+
+ if ( empty( $instance['show_subscribers_total'] ) || 'false' === $instance['show_subscribers_total'] ) {
+ $instance['show_subscribers_total'] = false;
+ } else {
+ $instance['show_subscribers_total'] = true;
+ }
+
+ $show_only_email_and_button = isset( $instance['show_only_email_and_button'] ) ? $instance['show_only_email_and_button'] : false;
+ $submit_button_text = isset( $instance['submit_button_text'] ) ? $instance['submit_button_text'] : '';
+
+
+
+ // Build up a string with the submit button's classes and styles and set it on the instance
+ $submit_button_classes = isset( $instance['submit_button_classes'] ) ? $instance['submit_button_classes'] : '';
+ $submit_button_styles = '';
+ if ( isset( $instance['custom_background_button_color'] ) ) {
+ $submit_button_styles .= 'background-color: ' . $instance['custom_background_button_color'] . '; ';
+ }
+ if ( isset( $instance['custom_text_button_color'] ) ) {
+ $submit_button_styles .= 'color: ' . $instance['custom_text_button_color'] . ';';
+ }
+
+ $instance = shortcode_atts(
+ Jetpack_Subscriptions_Widget::defaults(),
+ $instance,
+ 'jetpack_subscription_form'
+ );
+
+ // These must come after the call to shortcode_atts()
+ $instance['submit_button_text'] = $submit_button_text;
+ $instance['show_only_email_and_button'] = $show_only_email_and_button;
+ if ( ! empty( $submit_button_classes ) ) {
+ $instance['submit_button_classes'] = $submit_button_classes;
+ }
+ if ( ! empty ( $submit_button_styles ) ) {
+ $instance['submit_button_styles'] = $submit_button_styles;
+ }
+
+ $args = array(
+ 'before_widget' => '<div class="jetpack_subscription_widget">',
+ );
+ ob_start();
+ the_widget( get_jetpack_blog_subscriptions_widget_classname(), $instance, $args );
+ $output = ob_get_clean();
+
+ return $output;
+}
+
+add_shortcode( 'jetpack_subscription_form', 'jetpack_do_subscription_form' );
+add_shortcode( 'blog_subscription_form', 'jetpack_do_subscription_form' );
+
+function jetpack_blog_subscriptions_init() {
+ register_widget( get_jetpack_blog_subscriptions_widget_classname() );
+}
+
+add_action( 'widgets_init', 'jetpack_blog_subscriptions_init' );
+
+function jetpack_register_subscriptions_block() {
+ if ( class_exists( 'WP_Block_Type_Registry' ) && ! WP_Block_Type_Registry::get_instance()->is_registered( 'jetpack/subscriptions' ) ) {
+ jetpack_register_block( 'jetpack/subscriptions' );
+ }
+}
+
+add_action( 'init', 'jetpack_register_subscriptions_block' );
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentynineteen-rtl.css b/plugins/jetpack/modules/theme-tools/compat/twentynineteen-rtl.css
new file mode 100644
index 00000000..2cf7d0bb
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/compat/twentynineteen-rtl.css
@@ -0,0 +1 @@
+.infinite-scroll .pagination,.infinite-scroll .posts-navigation,.infinite-scroll.neverending .site-footer{display:none}.infinity-end.neverending .site-footer{display:block}.infinite-loader{margin:calc(3 * 1rem) auto}.infinite-loader .spinner{margin:0 auto;right:inherit!important}.site-main #infinite-handle{margin:calc(2 * 1rem) auto}.site-main #infinite-handle span{background:100% 0;display:block;font-size:.8888888889em;text-align:center}.site-main #infinite-handle span button,.site-main #infinite-handle span button:focus,.site-main #infinite-handle span button:hover{transition:background 150ms ease-in-out;background:#0073aa;border:none;border-radius:5px;box-sizing:border-box;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:.8888888889em;font-weight:600;line-height:1.2;outline:0;padding:.66rem 1rem}.site-main #infinite-handle span button:hover{cursor:pointer}.site-main #infinite-handle span button:focus,.site-main #infinite-handle span button:hover{background:#111}.site-main #infinite-handle span button:focus{outline:thin dotted;outline-offset:-4px}.site-main .infinite-wrap .entry:first-of-type{margin-top:calc(6 * 1rem)}.entry .jetpack-video-wrapper{margin-bottom:1.75em}.sd-block{line-height:1}.entry div.sharedaddy h3.sd-title,.entry h3.sd-title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:1.125em;font-weight:700;letter-spacing:-.02em;line-height:1.2;margin-bottom:.5em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.entry div.sharedaddy h3.sd-title:before,.entry h3.sd-title:before{background:#767676;border-top:none;content:"\020";display:block;height:2px;margin:1rem 0;width:1em;min-width:inherit}.sd-social-icon-text .sd-content ul,.sd-social-text .sd-content ul{margin-bottom:-.3125em!important}.sd-social-icon .sd-content ul,.sd-social-official .sd-content ul{margin-bottom:0!important}.entry #sharing_email .sharing_send,.entry .sd-content ul li .option a.share-ustom,.entry .sd-content ul li a.sd-button,.entry .sd-content ul li.advanced a.share-more,.entry .sd-content ul li.preview-item div.option.option-smart-off a,.entry .sd-social-icon .sd-content ul li a.sd-button,.entry .sd-social-icon-text .sd-content ul li a.sd-button,.entry .sd-social-official .sd-content>ul>li .digg_button>a,.entry .sd-social-official .sd-content>ul>li>a.sd-button,.entry .sd-social-text .sd-content ul li a.sd-button{box-shadow:none}.entry #jp-relatedposts{padding-top:0;margin-top:32px;margin-bottom:32px}.entry #jp-relatedposts h3.jp-relatedposts-headline{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:1.125em;font-weight:700;letter-spacing:-.02em;line-height:1.2;margin-bottom:.5em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.entry #jp-relatedposts h3.jp-relatedposts-headline:before{background:#767676;border-top:none;content:"\020";display:block;height:2px;margin:1rem 0;width:1em;min-width:inherit}.entry #jp-relatedposts h3.jp-relatedposts-headline em:before{display:none}.entry #jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post{opacity:1}.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post,.entry #jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:1em;letter-spacing:-.02em;line-height:1.2;margin-bottom:.5em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post span a,.entry #jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title a{font-weight:700}.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-excerpt,.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title{margin-top:.5em;margin-bottom:.5em}.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-context,.entry #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-date{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:13px;font-weight:500}.entry #jp-relatedposts .jp-relatedposts-items p,.entry #jp-relatedposts .jp-relatedposts-items-visual .entry h4.jp-relatedposts-post-title{letter-spacing:normal}#wpstats{display:none}.comments-area .comments-title-wrap+.comment-respond .comment-reply-title{display:none}.widget_author_grid ul,.widget_authors ul,.widget_jp_blogs_i_follow ul,.widget_links ul,.widget_rss_links ul{list-style:none;padding-right:0;padding-left:0}.widget_jp_blogs_i_follow li,.widget_links li,.widget_rss_links li{color:#767676;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:calc(22px * 1.125);font-weight:700;line-height:1.2;margin-top:.5rem;margin-bottom:.5rem}.widget.widget_authors ul li>ul{list-style-type:disc;padding-right:4.25rem}.rtl .widget.widget_authors ul li>ul{padding-right:0;padding-left:1rem}.widget_authors>ul>li>a{display:block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;position:relative}.widget.widget_authors li a strong{line-height:1.2;position:absolute;top:0}.widget.widget_authors .avatar{float:right;margin-left:1em}.widget_authors li>ul{clear:both}.widget_jetpack_display_posts_widget .jetpack-display-remote-posts h4{font-size:100%;margin:1rem 0}.widget_goodreads div[class^=gr_custom_container]{border:none}.widget_goodreads div[class^=gr_custom_each_container]{border-bottom:none;margin-bottom:1rem;padding-bottom:0}.widget_goodreads div[class^=gr_custom_author],.widget_goodreads h2[class^=gr_custom_header]{font-size:inherit;line-height:1.15}.widget_eu_cookie_law_widget #eu-cookie-law{border-color:#ccc;color:#767676;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:.68182em;padding:.5rem 1rem}.widget_eu_cookie_law_widget #eu-cookie-law .accept{font-size:1em;padding:10px 12px}.widget_rss li a.rsswidget{display:block;margin:1rem 0 .5rem}.widget_rss .rssSummary{font-family:NonBreakingSpaceOverride,"Hoefler Text","Baskerville Old Face",Garamond,"Times New Roman",serif;font-weight:400;font-size:22px}.widget_rss .rss-date,.widget_rss cite{color:#9c9c9c;display:block;font-size:.71111em;font-weight:500;margin:.5rem 0}.widget_rss cite{font-style:normal}.widget_rss cite:before{content:"\2014\00a0"}.widget_top-posts .widgets-list-layout-links{float:inherit;margin-right:calc(40px + 1rem);width:inherit}@media only screen and (min-width:600px){.widget.widget_search .search-field{max-width:calc(50vw - 20%)}}.twentynineteen-customizer .entry .entry-footer>span,.twentynineteen-customizer .entry .entry-meta>span{display:inline} \ No newline at end of file
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentynineteen.css b/plugins/jetpack/modules/theme-tools/compat/twentynineteen.css
index 2bd0512c..4ba953f0 100644
--- a/plugins/jetpack/modules/theme-tools/compat/twentynineteen.css
+++ b/plugins/jetpack/modules/theme-tools/compat/twentynineteen.css
@@ -64,6 +64,10 @@
outline-offset: -4px;
}
+.site-main .infinite-wrap .entry:first-of-type {
+ margin-top: calc(6 * 1rem);
+}
+
/**
* Responsive Videos
*/
@@ -108,12 +112,9 @@
margin-bottom: -0.3125em !important;
}
-.sd-social-icon .sd-content ul {
- margin-bottom: 0 !important;
-}
-
+.sd-social-icon .sd-content ul,
.sd-social-official .sd-content ul {
- margin-bottom: -0.625em !important;
+ margin-bottom: 0 !important;
}
.entry #sharing_email .sharing_send,
@@ -228,6 +229,30 @@
* Widgets
*/
+/* Widget List Resets */
+.widget_authors ul,
+.widget_author_grid ul,
+.widget_jp_blogs_i_follow ul,
+.widget_links ul,
+.widget_rss_links ul {
+ list-style: none;
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.widget_links li,
+.widget_jp_blogs_i_follow li,
+.widget_rss_links li {
+ color: #767676;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+ font-size: calc(22px * 1.125);
+ font-weight: 700;
+ line-height: 1.2;
+ margin-top: 0.5rem;
+ margin-bottom: 0.5rem;
+}
+
+
/* Authors Widget */
.widget.widget_authors ul li > ul {
list-style-type: disc;
@@ -297,19 +322,47 @@
padding: 10px 12px;
}
-/* RSS Links */
-.widget_rss_links ul {
- list-style: none;
- padding-left: 0;
- padding-right: 0;
+/* RSS Feed Widget */
+.widget_rss li a.rsswidget {
+ display: block;
+ margin: 1rem 0 0.5rem;
}
-.widget_rss_links li {
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
- font-size: calc(22px * 1.125);
- font-weight: bold;
- line-height: 1.2;
- padding-bottom: 0.75rem;
+.widget_rss .rssSummary {
+ font-family: "NonBreakingSpaceOverride", "Hoefler Text", "Baskerville Old Face", Garamond, "Times New Roman", serif;
+ font-weight: 400;
+ font-size: 22px;
+}
+
+.widget_rss cite,
+.widget_rss .rss-date {
+ color: #9c9c9c;
+ display: block;
+ font-size: 0.71111em;
+ font-weight: 500;
+ margin: 0.5rem 0;
+}
+
+.widget_rss cite {
+ font-style: normal;
+}
+
+.widget_rss cite:before {
+ content: "\2014\00a0";
+}
+
+/* Top Posts & Pages Widget */
+.widget_top-posts .widgets-list-layout-links {
+ float: inherit;
+ margin-left: calc(40px + 1rem);
+ width: inherit;
+}
+
+/* Search widget override */
+@media only screen and (min-width: 600px) {
+ .widget.widget_search .search-field {
+ max-width: calc( 50vw - 20% );
+ }
}
/**
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php b/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php
index b9c50e7b..fcc8b8c1 100644
--- a/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php
+++ b/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php
@@ -30,7 +30,7 @@ function twentynineteen_jetpack_setup() {
* Add theme support for Content Options.
*/
add_theme_support( 'jetpack-content-options', array(
- 'blog-display' => 'content', // the default setting of the theme: 'content', 'excerpt' or array( 'content', 'excerpt' ) for themes mixing both display.
+ 'blog-display' => array( 'content', 'excerpt' ),
'post-details' => array(
'stylesheet' => 'twentynineteen-style',
'date' => '.posted-on',
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php
index e13df99d..816a74b5 100644
--- a/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php
+++ b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php
@@ -56,10 +56,6 @@ function twentysixteen_remove_share() {
add_action( 'loop_start', 'twentysixteen_remove_share' );
function twentysixteen_jetpack_lazy_images_compat() {
- if ( ! function_exists( 'wp_add_inline_script' ) ) {
- return;
- }
-
// Since TwentySixteen outdents when window is resized, let's trigger a window resize
// every time we lazy load an image on the TwentySixteen theme.
wp_add_inline_script(
diff --git a/plugins/jetpack/modules/theme-tools/featured-content.php b/plugins/jetpack/modules/theme-tools/featured-content.php
index 1090982c..3ffc9687 100644
--- a/plugins/jetpack/modules/theme-tools/featured-content.php
+++ b/plugins/jetpack/modules/theme-tools/featured-content.php
@@ -693,8 +693,6 @@ if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'pl
}
}
- Featured_Content::setup();
-
/**
* Adds the featured content plugin to the set of files for which action
* handlers should be copied when the theme context is loaded by the REST API.
@@ -708,4 +706,17 @@ if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'pl
}
add_action( 'restapi_theme_action_copy_dirs', 'wpcom_rest_api_featured_content_copy_plugin_actions' );
+ /**
+ * Delayed initialization for API Requests.
+ */
+ function wpcom_rest_request_before_callbacks( $request ) {
+ Featured_Content::init();
+ return $request;
+ }
+
+ if ( Jetpack_Constants::is_true( 'IS_WPCOM' ) && Jetpack_Constants::is_true( 'REST_API_REQUEST' ) ) {
+ add_filter( 'rest_request_before_callbacks', 'wpcom_rest_request_before_callbacks');
+ }
+
+ Featured_Content::setup();
} // end if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'plugins.php' !== $GLOBALS['pagenow'] ) {
diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos.php b/plugins/jetpack/modules/theme-tools/responsive-videos.php
index c4eacf46..61987a8d 100644
--- a/plugins/jetpack/modules/theme-tools/responsive-videos.php
+++ b/plugins/jetpack/modules/theme-tools/responsive-videos.php
@@ -23,9 +23,15 @@ function jetpack_responsive_videos_init() {
/* Wrap Slideshare shortcodes */
add_filter( 'jetpack_slideshare_shortcode', 'jetpack_responsive_videos_embed_html' );
+
+ // Remove the Jetpack Responsive video wrapper in embed blocks on sites that support core Responsive embeds.
+ if ( current_theme_supports( 'responsive-embeds' ) ) {
+ add_filter( 'render_block', 'jetpack_responsive_videos_remove_wrap_oembed', 10, 2 );
+ }
}
add_action( 'after_setup_theme', 'jetpack_responsive_videos_init', 99 );
+
/**
* Adds a wrapper to videos and enqueue script
*
@@ -63,6 +69,9 @@ function jetpack_responsive_videos_embed_html( $html ) {
/**
* Check if oEmbed is a `$video_patterns` provider video before wrapping.
*
+ * @param mixed $html The cached HTML result, stored in post meta.
+ * @param string $url he attempted embed URL.
+ *
* @return string
*/
function jetpack_responsive_videos_maybe_wrap_oembed( $html, $url = null ) {
@@ -120,3 +129,24 @@ function jetpack_responsive_videos_maybe_wrap_oembed( $html, $url = null ) {
return $html;
}
+
+/**
+ * Remove the Jetpack Responsive video wrapper in embed blocks.
+ *
+ * @since 7.0.0
+ *
+ * @param string $block_content The block content about to be appended.
+ * @param array $block The full block, including name and attributes.
+ *
+ * @return string $block_content String of rendered HTML.
+ */
+function jetpack_responsive_videos_remove_wrap_oembed( $block_content, $block ) {
+ if (
+ isset( $block['blockName'] )
+ && false !== strpos( $block['blockName'], 'core-embed' )
+ ) {
+ $block_content = preg_replace( '#<div class="jetpack-video-wrapper">(.*?)</div>#', '${1}', $block_content );
+ }
+
+ return $block_content;
+}
diff --git a/plugins/jetpack/modules/theme-tools/social-menu/icon-functions.php b/plugins/jetpack/modules/theme-tools/social-menu/icon-functions.php
index 89e4f833..c8cec4a2 100644
--- a/plugins/jetpack/modules/theme-tools/social-menu/icon-functions.php
+++ b/plugins/jetpack/modules/theme-tools/social-menu/icon-functions.php
@@ -130,6 +130,8 @@ if ( ! function_exists( 'jetpack_social_menu_social_links_icons' ) ) :
'behance.net' => 'behance',
'codepen.io' => 'codepen',
'deviantart.com' => 'deviantart',
+ 'discord.gg' => 'discord',
+ 'discordapp.com' => 'discord',
'digg.com' => 'digg',
'dribbble.com' => 'dribbble',
'dropbox.com' => 'dropbox',
@@ -147,7 +149,7 @@ if ( ! function_exists( 'jetpack_social_menu_social_links_icons' ) ) :
'mailto:' => 'mail',
'meetup.com' => 'meetup',
'medium.com' => 'medium',
- 'pinterest.com' => 'pinterest',
+ 'pinterest.' => 'pinterest',
'getpocket.com' => 'pocket',
'reddit.com' => 'reddit',
'skype.com' => 'skype',
diff --git a/plugins/jetpack/modules/theme-tools/social-menu/social-menu.css b/plugins/jetpack/modules/theme-tools/social-menu/social-menu.css
index 543bd155..57a3d7c1 100644
--- a/plugins/jetpack/modules/theme-tools/social-menu/social-menu.css
+++ b/plugins/jetpack/modules/theme-tools/social-menu/social-menu.css
@@ -121,7 +121,7 @@ Genericons
}
/* Pinterest */
-.jetpack-social-navigation-genericons a[href*="pinterest.com"]:before {
+.jetpack-social-navigation-genericons a[href*="pinterest."]:before {
content: "\f210";
}
@@ -194,4 +194,4 @@ Genericons
/* YouTube */
.jetpack-social-navigation-genericons a[href*="youtube.com"]:before {
content: "\f213";
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/theme-tools/social-menu/social-menu.svg b/plugins/jetpack/modules/theme-tools/social-menu/social-menu.svg
index 2cc0da95..aae2867a 100644
--- a/plugins/jetpack/modules/theme-tools/social-menu/social-menu.svg
+++ b/plugins/jetpack/modules/theme-tools/social-menu/social-menu.svg
@@ -26,6 +26,9 @@
</symbol>
<symbol id="icon-digg" viewBox="0 0 24 24">
<path d="M4.5,5.4h2.2V16H1V8.5h3.5V5.4L4.5,5.4z M4.5,14.2v-4H3.2v4H4.5z M7.6,8.5V16h2.2V8.5C9.8,8.5,7.6,8.5,7.6,8.5z M7.6,5.4 v2.2h2.2V5.4C9.8,5.4,7.6,5.4,7.6,5.4z M10.7,8.5h5.7v10.1h-5.7v-1.8h3.5V16h-3.5C10.7,16,10.7,8.5,10.7,8.5z M14.2,14.2v-4h-1.3v4 H14.2z M17.3,8.5H23v10.1h-5.7v-1.8h3.5V16h-3.5C17.3,16,17.3,8.5,17.3,8.5z M20.8,14.2v-4h-1.3v4H20.8z"/>
+</symbol>
+<symbol id="icon-discord" viewBox="0 0 24 24">
+<path d="M10.227 9.957c-.559 0-1 .48-1 1.063 0 .585.453 1.066 1 1.066.558 0 1-.48 1-1.066.007-.582-.442-1.063-1-1.063zm3.574 0c-.559 0-.996.48-.996 1.063 0 .585.449 1.066.996 1.066.558 0 1-.48 1-1.066 0-.582-.442-1.063-1-1.063zm0 0 M18.563 1.918H5.438c-1.11 0-2.008.879-2.008 1.973v12.957c0 1.093.898 1.972 2.007 1.972h11.11l-.52-1.773 1.254 1.14 1.184 1.075 2.105 1.82V3.891c0-1.094-.898-1.973-2.008-1.973zM14.78 14.434s-.351-.414-.644-.778c1.281-.355 1.773-1.14 1.773-1.14a5.745 5.745 0 0 1-1.129.566c-.488.2-.96.336-1.418.41a7.07 7.07 0 0 1-2.539-.008 8.133 8.133 0 0 1-1.441-.414 6.219 6.219 0 0 1-.715-.324c-.027-.02-.059-.027-.086-.047a.113.113 0 0 1-.039-.031c-.176-.094-.273-.16-.273-.16s.468.765 1.71 1.129c-.293.363-.656.797-.656.797-2.164-.067-2.984-1.457-2.984-1.457 0-3.086 1.41-5.586 1.41-5.586 1.41-1.036 2.75-1.008 2.75-1.008l.098.113c-1.762.5-2.575 1.258-2.575 1.258s.215-.117.579-.277c1.046-.454 1.878-.579 2.222-.606.059-.008.11-.02.168-.02a8.728 8.728 0 0 1 1.977-.019c.933.106 1.93.375 2.949.922 0 0-.773-.719-2.438-1.219l.137-.152s1.34-.028 2.75 1.008c0 0 1.414 2.5 1.414 5.586 0 0-.836 1.39-3 1.457zm0 0"/>
</symbol>
<symbol id="icon-dribbble" viewBox="0 0 24 24">
<path d="M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"/>
diff --git a/plugins/jetpack/modules/tiled-gallery.php b/plugins/jetpack/modules/tiled-gallery.php
index 36b95f1e..19b87c52 100644
--- a/plugins/jetpack/modules/tiled-gallery.php
+++ b/plugins/jetpack/modules/tiled-gallery.php
@@ -3,12 +3,11 @@
/**
* Module Name: Tiled Galleries
* Module Description: Display image galleries in a variety of elegant arrangements.
- * Jumpstart Description: Display image galleries in a variety of elegant arrangements.
* First Introduced: 2.1
* Requires Connection: No
* Auto Activate: No
* Module Tags: Photos and Videos
- * Feature: Appearance, Jumpstart
+ * Feature: Appearance
* Sort Order: 24
* Additional Search Queries: gallery, tiles, tiled, grid, mosaic, images
*/
@@ -22,6 +21,7 @@ add_action( 'jetpack_modules_loaded', 'jetpack_tiled_gallery_loaded' );
function jetpack_tiled_gallery_loaded() {
Jetpack::enable_module_configurable( __FILE__ );
Jetpack::module_configuration_load( __FILE__, 'jetpack_tiled_gallery_configuration_load' );
+ add_filter( 'jetpack_module_configuration_url_tiled-gallery', 'jetpack_tiled_gallery_configuration_url' );
}
function jetpack_tiled_gallery_configuration_load() {
@@ -29,4 +29,14 @@ function jetpack_tiled_gallery_configuration_load() {
exit;
}
+/**
+ * Overrides default configuration url
+ *
+ * @uses admin_url
+ * @return string module settings URL
+ */
+function jetpack_tiled_gallery_configuration_url() {
+ return admin_url( 'options-media.php' );
+}
+
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 4e81a8c0..479eadc2 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
@@ -16,7 +16,6 @@ class Jetpack_Tiled_Gallery {
add_action( 'admin_init', array( $this, 'settings_api_init' ) );
add_filter( 'jetpack_gallery_types', array( $this, 'jetpack_gallery_types' ), 9 );
add_filter( 'jetpack_default_gallery_type', array( $this, 'jetpack_default_gallery_type' ) );
-
}
public function tiles_enabled() {
diff --git a/plugins/jetpack/modules/vaultpress.php b/plugins/jetpack/modules/vaultpress.php
index 352f9ee2..656af6ef 100644
--- a/plugins/jetpack/modules/vaultpress.php
+++ b/plugins/jetpack/modules/vaultpress.php
@@ -1,7 +1,7 @@
<?php
/**
- * Module Name: Data Backups
- * Module Description: Off-site backups, security scans, and automatic fixes.
+ * Module Name: Backups and Scanning
+ * Module Description: Protect your site with daily or real-time backups and automated virus scanning and threat detection.
* First Introduced: 0:1.2
* Sort Order: 32
* Deactivate: false
@@ -9,7 +9,8 @@
* Requires Connection: Yes
* Auto Activate: Yes
* Feature: Security, Health
- * Additional Search Queries: vaultpress, backup, security
+ * Additional Search Queries: backup, cloud backup, database backup, restore, wordpress backup, backup plugin, wordpress backup plugin, back up, backup wordpress, backwpup, vaultpress, backups, off-site backups, offsite backup, offsite, off-site, antivirus, malware scanner, security, virus, viruses, prevent viruses, scan, anti-virus, antimalware, protection, safe browsing, malware, wp security, wordpress security
+ * Plans: personal, business, premium
*/
add_action( 'jetpack_modules_loaded', 'vaultpress_jetpack_stub' );
diff --git a/plugins/jetpack/modules/videopress.php b/plugins/jetpack/modules/videopress.php
index 1e5c33ca..8d272b02 100644
--- a/plugins/jetpack/modules/videopress.php
+++ b/plugins/jetpack/modules/videopress.php
@@ -1,18 +1,17 @@
<?php
/**
* Module Name: VideoPress
- * Module Description: Fast, ad-free video hosting
+ * Module Description: Save on hosting storage and bandwidth costs by streaming fast, ad-free video from our global network.
* First Introduced: 2.5
* Free: false
* Requires Connection: Yes
* Sort Order: 27
* Module Tags: Photos and Videos
* Feature: Writing
- * Additional Search Queries: video, videos, videopress
+ * Additional Search Queries: video, videos, videopress, video gallery, video player, videoplayer, mobile video, vimeo, youtube, html5 video, stream
* Plans: business, premium
*/
-include_once dirname( __FILE__ ) . '/videopress/utility-functions.php';
include_once dirname( __FILE__ ) . '/videopress/shortcode.php';
include_once dirname( __FILE__ ) . '/videopress/class.videopress-options.php';
include_once dirname( __FILE__ ) . '/videopress/class.videopress-scheduler.php';
diff --git a/plugins/jetpack/modules/videopress/class.jetpack-videopress.php b/plugins/jetpack/modules/videopress/class.jetpack-videopress.php
index 322d3797..a1073f05 100644
--- a/plugins/jetpack/modules/videopress/class.jetpack-videopress.php
+++ b/plugins/jetpack/modules/videopress/class.jetpack-videopress.php
@@ -42,7 +42,7 @@ class Jetpack_VideoPress {
add_filter( 'plupload_default_settings', array( $this, 'videopress_pluploder_config' ) );
add_filter( 'wp_get_attachment_url', array( $this, 'update_attachment_url_for_videopress' ), 10, 2 );
- if ( Jetpack::active_plan_supports( 'videopress' ) ) {
+ if ( Jetpack_Plan::supports( 'videopress' ) ) {
add_filter( 'upload_mimes', array( $this, 'add_video_upload_mimes' ), 999 );
}
diff --git a/plugins/jetpack/modules/videopress/class.videopress-gutenberg.php b/plugins/jetpack/modules/videopress/class.videopress-gutenberg.php
new file mode 100644
index 00000000..be0bd1db
--- /dev/null
+++ b/plugins/jetpack/modules/videopress/class.videopress-gutenberg.php
@@ -0,0 +1,169 @@
+<?php
+/**
+ * Block Editor functionality for VideoPress users.
+ *
+ * @package Jetpack
+ */
+
+/**
+ * Register a VideoPress extension to replace the default Core Video block.
+ */
+class VideoPress_Gutenberg {
+
+ /**
+ * Singleton
+ */
+ public static function init() {
+ static $instance = false;
+
+ if ( ! $instance ) {
+ $instance = new VideoPress_Gutenberg();
+ }
+
+ return $instance;
+ }
+
+ /**
+ * VideoPress_Gutenberg constructor.
+ *
+ * Initialize the VideoPress Gutenberg extension
+ */
+ private function __construct() {
+ add_action( 'init', array( $this, 'register_video_block_with_videopress' ) );
+ add_action( 'jetpack_register_gutenberg_extensions', array( $this, 'set_extension_availability' ) );
+ }
+
+ /**
+ * Used to check whether VideoPress is enabled for given site.
+ *
+ * @todo Create a global `jetpack_check_module_availability( $module )` helper so we can re-use it on other modules.
+ * This global helper should be created in a file synced with WordPress.com so we can use it there too.
+ * @see https://github.com/Automattic/jetpack/pull/11321#discussion_r255477815
+ *
+ * @return array Associative array indicating if the module is available (key `available`) and the reason why it is
+ * unavailable (key `unavailable_reason`)
+ */
+ public function check_videopress_availability() {
+ // It is available on Simple Sites having the appropriate a plan.
+ if (
+ defined( 'IS_WPCOM' ) && IS_WPCOM
+ && method_exists( 'Store_Product_List', 'get_site_specific_features_data' )
+ ) {
+ $features = Store_Product_List::get_site_specific_features_data();
+ if ( in_array( 'videopress', $features['active'], true ) ) {
+ return array( 'available' => true );
+ } else {
+ return array(
+ 'available' => false,
+ 'unavailable_reason' => 'missing_plan',
+ );
+ }
+ }
+
+ // It is available on Jetpack Sites having the module active.
+ if (
+ method_exists( 'Jetpack', 'is_active' ) && Jetpack::is_active()
+ && method_exists( 'Jetpack', 'is_module_active' )
+ && method_exists( 'Jetpack_Plan', 'supports' )
+ ) {
+ if ( Jetpack::is_module_active( 'videopress' ) ) {
+ return array( 'available' => true );
+ } elseif ( ! Jetpack_Plan::supports( 'videopress' ) ) {
+ return array(
+ 'available' => false,
+ 'unavailable_reason' => 'missing_plan',
+ );
+ } else {
+ return array(
+ 'available' => false,
+ 'unavailable_reason' => 'missing_module',
+ );
+ }
+ }
+
+ return array(
+ 'available' => false,
+ 'unavailable_reason' => 'unknown',
+ );
+ }
+
+ /**
+ * Set the Jetpack Gutenberg extension availability.
+ */
+ public function set_extension_availability() {
+ $availability = $this->check_videopress_availability();
+ if ( $availability['available'] ) {
+ Jetpack_Gutenberg::set_extension_available( 'jetpack/videopress' );
+ } else {
+ Jetpack_Gutenberg::set_extension_unavailable( 'jetpack/videopress', $availability['unavailable_reason'] );
+ }
+ }
+
+ /**
+ * Register the core video block as a dynamic block.
+ *
+ * It defines a server-side rendering that adds VideoPress support to the core video block.
+ */
+ public function register_video_block_with_videopress() {
+ jetpack_register_block(
+ 'core/video',
+ array(
+ 'render_callback' => array( $this, 'render_video_block_with_videopress' ),
+ )
+ );
+ }
+
+ /**
+ * Render the core video block replacing the src attribute with the VideoPress URL
+ *
+ * @param array $attributes Array containing the video block attributes.
+ * @param string $content String containing the video block content.
+ *
+ * @return string
+ */
+ public function render_video_block_with_videopress( $attributes, $content ) {
+ if ( ! isset( $attributes['id'] ) || isset( $attributes['guid'] ) ) {
+ return $content;
+ }
+
+ if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
+ $blog_id = get_current_blog_id();
+ } elseif ( method_exists( 'Jetpack', 'is_active' ) && Jetpack::is_active() ) {
+ /**
+ * We're intentionally not using `get_current_blog_id` because it was returning unexpected values.
+ *
+ * @see https://github.com/Automattic/jetpack/pull/11193#issuecomment-457883886
+ * @see https://github.com/Automattic/jetpack/pull/11193/commits/215cf789f3d8bd03ff9eb1bbdb693acb8831d273
+ */
+ $blog_id = Jetpack_Options::get_option( 'id' );
+ }
+
+ if ( ! isset( $blog_id ) ) {
+ return $content;
+ }
+
+ $post_id = absint( $attributes['id'] );
+ $videopress_id = video_get_info_by_blogpostid( $blog_id, $post_id )->guid;
+ $videopress_data = videopress_get_video_details( $videopress_id );
+
+ if ( empty( $videopress_data->file_url_base->https ) || empty( $videopress_data->files->hd->mp4 ) ) {
+ return $content;
+ }
+
+ $videopress_url = $videopress_data->file_url_base->https . $videopress_data->files->hd->mp4;
+
+ $pattern = '/(\s)src=([\'"])(?:(?!\2).)+?\2/';
+
+ return preg_replace(
+ $pattern,
+ sprintf(
+ '\1src="%1$s"',
+ esc_url_raw( $videopress_url )
+ ),
+ $content,
+ 1
+ );
+ }
+}
+
+VideoPress_Gutenberg::init();
diff --git a/plugins/jetpack/modules/videopress/class.videopress-options.php b/plugins/jetpack/modules/videopress/class.videopress-options.php
index b72abd5b..b8049e37 100644
--- a/plugins/jetpack/modules/videopress/class.videopress-options.php
+++ b/plugins/jetpack/modules/videopress/class.videopress-options.php
@@ -31,7 +31,7 @@ class VideoPress_Options {
self::$options['shadow_blog_id'] = 0;
// Use the Jetpack ID for the shadow blog ID if we have a plan that supports VideoPress
- if ( Jetpack::active_plan_supports( 'videopress' ) ) {
+ if ( Jetpack_Plan::supports( 'videopress' ) ) {
self::$options['shadow_blog_id'] = Jetpack_Options::get_option( 'id' );
}
diff --git a/plugins/jetpack/modules/widget-visibility/widget-conditions.php b/plugins/jetpack/modules/widget-visibility/widget-conditions.php
index f716a796..f5e12cbb 100644
--- a/plugins/jetpack/modules/widget-visibility/widget-conditions.php
+++ b/plugins/jetpack/modules/widget-visibility/widget-conditions.php
@@ -772,7 +772,7 @@ class Jetpack_Widget_Conditions {
$taxonomy = 'post_tag';
}
- if ( function_exists( 'wp_get_split_term' ) && $new_term_id = wp_get_split_term( $old_term_id, $taxonomy ) ) {
+ if ( $new_term_id = wp_get_split_term( $old_term_id, $taxonomy ) ) {
$term_id = $new_term_id;
}
diff --git a/plugins/jetpack/modules/widgets.php b/plugins/jetpack/modules/widgets.php
index 8aa4db86..24f63779 100644
--- a/plugins/jetpack/modules/widgets.php
+++ b/plugins/jetpack/modules/widgets.php
@@ -41,6 +41,7 @@ add_action( 'jetpack_modules_loaded', 'jetpack_widgets_loaded' );
function jetpack_widgets_loaded() {
Jetpack::enable_module_configurable( __FILE__ );
Jetpack::module_configuration_load( __FILE__, 'jetpack_widgets_configuration_load' );
+ add_filter( 'jetpack_module_configuration_url_widgets', 'jetpack_widgets_configuration_url' );
}
function jetpack_widgets_configuration_load() {
@@ -48,7 +49,15 @@ function jetpack_widgets_configuration_load() {
exit;
}
-
+/**
+ * Overrides default configuration url
+ *
+ * @uses admin_url
+ * @return string module settings URL
+ */
+function jetpack_widgets_configuration_url() {
+ return admin_url( 'customize.php?autofocus[panel]=widgets' );
+}
jetpack_load_widgets();
@@ -71,3 +80,18 @@ function jetpack_widgets_customizer_assets_controls() {
wp_enqueue_style( 'jetpack-customizer-widget-controls', plugins_url( '/widgets/customizer-controls.css', __FILE__ ), array( 'customize-widgets' ) );
}
add_action( 'customize_controls_enqueue_scripts', 'jetpack_widgets_customizer_assets_controls' );
+
+function jetpack_widgets_remove_old_widgets() {
+ $old_widgets = array(
+ 'googleplus-badge',
+ );
+
+ // Don't bother cleaning up the sidebars_widgets data.
+ // That will get cleaned up the next time a widget is
+ // added, removed, moved, etc.
+ foreach ( $old_widgets as $old_widget ) {
+ delete_option( "widget_{$old_widget}" );
+ }
+}
+
+add_action( 'updating_jetpack_version', 'jetpack_widgets_remove_old_widgets' );
diff --git a/plugins/jetpack/modules/widgets/blog-stats.php b/plugins/jetpack/modules/widgets/blog-stats.php
index 8f8f0f33..e89db686 100644
--- a/plugins/jetpack/modules/widgets/blog-stats.php
+++ b/plugins/jetpack/modules/widgets/blog-stats.php
@@ -150,7 +150,7 @@ class Jetpack_Blog_Stats_Widget extends WP_Widget {
isset( $instance['hits'] ) ? esc_html( $instance['hits'] ) : ''
);
} else {
- esc_html_e( 'No hits.', 'jetpack' );
+ esc_html_e( 'There was an issue retrieving stats. Please try again later.', 'jetpack' );
}
echo $args['after_widget'];
diff --git a/plugins/jetpack/modules/widgets/contact-info.php b/plugins/jetpack/modules/widgets/contact-info.php
index 292f96d7..7a0a373e 100644
--- a/plugins/jetpack/modules/widgets/contact-info.php
+++ b/plugins/jetpack/modules/widgets/contact-info.php
@@ -321,19 +321,42 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) {
/**
* Builds map display HTML code from the supplied latitude and longitude.
*
- * @param float $lat Map Latitude
- * @param float $lon Map Longitude
+ * @param string $address Address.
+ * @param string $api_key API Key.
*
- * @return string HTML of the map
+ * @return string HTML of the map.
*/
function build_map( $address, $api_key = null ) {
$this->enqueue_scripts();
- $src = add_query_arg( 'q', urlencode( $address ), 'https://www.google.com/maps/embed/v1/place' );
+ $src = add_query_arg( 'q', rawurlencode( $address ), 'https://www.google.com/maps/embed/v1/place' );
if ( ! empty( $api_key ) ) {
$src = add_query_arg( 'key', $api_key, $src );
}
- return '<iframe width="600" height="216" frameborder="0" src="' . esc_url( $src ) . '" class="contact-map"></iframe>';
+ $height = 216;
+
+ $iframe_attributes = sprintf(
+ ' height="%d" frameborder="0" src="%s" class="contact-map"',
+ esc_attr( $height ),
+ esc_url( $src )
+ );
+
+ $iframe_html = sprintf( '<iframe width="600" %s></iframe>', $iframe_attributes );
+
+ if ( ! Jetpack_AMP_Support::is_amp_request() ) {
+ return $iframe_html;
+ }
+
+ $amp_iframe_html = sprintf( '<amp-iframe layout="fixed-height" width="auto" sandbox="allow-scripts allow-same-origin" %s>', $iframe_attributes );
+
+ // Add placeholder to avoid AMP error: <amp-iframe> elements must be positioned outside the first 75% of the viewport or 600px from the top (whichever is smaller).
+ $amp_iframe_html .= sprintf( '<span placeholder>%s</span>', esc_html__( 'Loading map&hellip;', 'jetpack' ) );
+
+ // Add original iframe as fallback in case JavaScript is disabled.
+ $amp_iframe_html .= sprintf( '<noscript>%s</noscript>', $iframe_html );
+
+ $amp_iframe_html .= '</amp-iframe>';
+ return $amp_iframe_html;
}
/**
@@ -348,9 +371,7 @@ if ( ! class_exists( 'Jetpack_Contact_Info_Widget' ) ) {
$address = strtolower( $address );
$address = preg_replace( '/\s+/', ' ', trim( $address ) ); // Get rid of any unwanted whitespace
$address = str_ireplace( ' ', '+', $address ); // Use + not %20
- urlencode( $address );
-
- return $address;
+ return urlencode( $address );
}
/**
diff --git a/plugins/jetpack/modules/widgets/eu-cookie-law/style.css b/plugins/jetpack/modules/widgets/eu-cookie-law/style.css
index c1e2520f..07d5a9f6 100644
--- a/plugins/jetpack/modules/widgets/eu-cookie-law/style.css
+++ b/plugins/jetpack/modules/widgets/eu-cookie-law/style.css
@@ -56,6 +56,7 @@
*/
#eu-cookie-law form {
margin-bottom: 0;
+ position: static;
}
/**
diff --git a/plugins/jetpack/modules/widgets/google-plus/js/admin.js b/plugins/jetpack/modules/widgets/google-plus/js/admin.js
deleted file mode 100644
index a27c2def..00000000
--- a/plugins/jetpack/modules/widgets/google-plus/js/admin.js
+++ /dev/null
@@ -1,22 +0,0 @@
-(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
deleted file mode 100644
index 8e42aac9..00000000
--- a/plugins/jetpack/modules/widgets/googleplus-badge.php
+++ /dev/null
@@ -1,330 +0,0 @@
-<?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' ),
- 'customize_selective_refresh' => true,
- )
- );
-
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
-
- if ( is_active_widget( '', '', 'googleplus-badge' ) || is_customize_preview() ) {
- 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',
- Jetpack::get_file_url_for_environment(
- '_inc/build/widgets/google-plus/js/admin.min.js',
- 'modules/widgets/google-plus/js/admin.js'
- ),
- array( 'jquery' )
- );
- }
- }
-
- function widget( $args, $instance ) {
- /** This action is documented in modules/widgets/gravatar-profile.php */
- do_action( 'jetpack_stats_extra', 'widget_view', 'googleplus-badge' );
-
- 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'];
-
- if ( ! empty( $title ) ) {
- 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'];
- }
-
- 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/milestone/milestone.php b/plugins/jetpack/modules/widgets/milestone/milestone.php
index 2dd38361..8490a8ec 100644
--- a/plugins/jetpack/modules/widgets/milestone/milestone.php
+++ b/plugins/jetpack/modules/widgets/milestone/milestone.php
@@ -74,6 +74,10 @@ class Milestone_Widget extends WP_Widget {
}
public static function enqueue_template() {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return;
+ }
+
wp_enqueue_script(
'milestone',
Jetpack::get_file_url_for_environment(
@@ -175,6 +179,10 @@ class Milestone_Widget extends WP_Widget {
* Hooks into the "wp_footer" action.
*/
function localize_script() {
+ if ( Jetpack_AMP_Support::is_amp_request() ) {
+ return;
+ }
+
if ( empty( self::$config_js['instances'] ) ) {
wp_dequeue_script( 'milestone' );
return;
diff --git a/plugins/jetpack/modules/widgets/my-community.php b/plugins/jetpack/modules/widgets/my-community.php
index a9db5f6b..03958c38 100644
--- a/plugins/jetpack/modules/widgets/my-community.php
+++ b/plugins/jetpack/modules/widgets/my-community.php
@@ -144,7 +144,7 @@ class Jetpack_My_Community_Widget extends WP_Widget {
$instance['include_followers'] = (bool) $new_instance['include_followers'];
$instance['include_commenters'] = (bool) $new_instance['include_commenters'];
- delete_transient( "$this->id-{$instance['number']}" . (int) $instance['include_likers'] . (int) $instance['include_followers'] . (int) $instance['include_commenters'] );
+ delete_transient( "$this->id-v2-{$instance['number']}" . (int) $instance['include_likers'] . (int) $instance['include_followers'] . (int) $instance['include_commenters'] );
return $instance;
}
@@ -183,7 +183,7 @@ class Jetpack_My_Community_Widget extends WP_Widget {
echo $args['before_title'] . $title . $args['after_title'];
}
- $transient_name = "$this->id-{$instance['number']}" . (int) $instance['include_likers'] . (int) $instance['include_followers'] . (int) $instance['include_commenters'];
+ $transient_name = "$this->id-v2-{$instance['number']}" . (int) $instance['include_likers'] . (int) $instance['include_followers'] . (int) $instance['include_commenters'];
$my_community = get_transient( $transient_name );
@@ -219,10 +219,11 @@ class Jetpack_My_Community_Widget extends WP_Widget {
foreach ( $members as $member ) {
$my_community .= sprintf(
- '<li><a href="%s" %s><img alt="" src="%s" class="avatar avatar-240" height="48" width="48" originals="240" scale="1" /></a></li>',
- $member->profile_URL,
- empty( $member->name ) ? '' : 'title="' . $member->name . '"',
- $member->avatar_URL
+ '<li><a href="%s" title="%s"><img alt="%s" src="%s" class="avatar avatar-48" height="48" width="48"></a></li>',
+ esc_url( $member->profile_URL ),
+ esc_attr( $member->name ),
+ esc_attr( $member->name ),
+ esc_url( $member->avatar_URL )
);
}
diff --git a/plugins/jetpack/modules/widgets/search.php b/plugins/jetpack/modules/widgets/search.php
index 8e176c8c..54d866b5 100644
--- a/plugins/jetpack/modules/widgets/search.php
+++ b/plugins/jetpack/modules/widgets/search.php
@@ -10,7 +10,7 @@
add_action( 'widgets_init', 'jetpack_search_widget_init' );
function jetpack_search_widget_init() {
- if ( ! Jetpack::is_active() || ! Jetpack::active_plan_supports( 'search' ) ) {
+ if ( ! Jetpack::is_active() || ! Jetpack_Plan::supports( 'search' ) ) {
return;
}
@@ -144,7 +144,7 @@ class Jetpack_Search_Widget extends WP_Widget {
'defaultFilterCount' => self::DEFAULT_FILTER_COUNT,
'tracksUserData' => Jetpack_Tracks_Client::get_connected_user_tracks_identity(),
'tracksEventData' => array(
- 'is_customizer' => ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) ? 1 : 0,
+ 'is_customizer' => (int) is_customize_preview(),
),
'i18n' => array(
'month' => Jetpack_Search_Helpers::get_date_filter_type_name( 'month', false ),
@@ -266,6 +266,19 @@ class Jetpack_Search_Widget extends WP_Widget {
$display_filters = false;
+ if ( Jetpack::is_development_mode() ) {
+ echo $args['before_widget'];
+ ?><div id="<?php echo esc_attr( $this->id ); ?>-wrapper">
+ <div class="jetpack-search-sort-wrapper">
+ <label>
+ <?php esc_html_e( 'Jetpack Search not supported in Development Mode', 'jetpack' ); ?>
+ </label>
+ </div>
+ </div><?php
+ echo $args['after_widget'];
+ return;
+ }
+
if ( is_search() ) {
if ( Jetpack_Search_Helpers::should_rerun_search_in_customizer_preview() ) {
Jetpack_Search::instance()->update_search_results_aggregations();
@@ -384,11 +397,11 @@ class Jetpack_Search_Widget extends WP_Widget {
?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
- var orderByDefault = <?php echo wp_json_encode( $orderby ); ?>,
- orderDefault = <?php echo wp_json_encode( $order ); ?>,
- widgetId = <?php echo wp_json_encode( $this->id ); ?>,
- searchQuery = <?php echo wp_json_encode( get_query_var( 's', '' ) ); ?>,
- isSearch = <?php echo wp_json_encode( is_search() ); ?>;
+ var orderByDefault = '<?php echo 'date' === $orderby ? 'date' : 'relevance'; ?>',
+ orderDefault = '<?php echo 'ASC' === $order ? 'ASC' : 'DESC'; ?>',
+ widgetId = decodeURIComponent( '<?php echo rawurlencode( $this->id ); ?>' ),
+ searchQuery = decodeURIComponent( '<?php echo rawurlencode( get_query_var( 's', '' ) ); ?>' ),
+ isSearch = <?php echo (int) is_search(); ?>;
var container = $( '#' + widgetId + '-wrapper' ),
form = container.find('.jetpack-search-form form'),
@@ -655,8 +668,8 @@ class Jetpack_Search_Widget extends WP_Widget {
* @param bool $is_template Whether this is for an Underscore template or not.
*/
private function render_widget_option_selected( $name, $value, $compare, $is_template ) {
- $compare_json = wp_json_encode( $compare );
- echo $is_template ? "<%= $compare_json === $name ? 'selected=\"selected\"' : '' %>" : selected( $value, $compare );
+ $compare_js = rawurlencode( $compare );
+ echo $is_template ? "<%= decodeURIComponent( '$compare_js' ) === $name ? 'selected=\"selected\"' : '' %>" : selected( $value, $compare );
}
/**
diff --git a/plugins/jetpack/modules/widgets/social-icons.php b/plugins/jetpack/modules/widgets/social-icons.php
index d70fb28e..a8ed7920 100644
--- a/plugins/jetpack/modules/widgets/social-icons.php
+++ b/plugins/jetpack/modules/widgets/social-icons.php
@@ -9,6 +9,8 @@ class Jetpack_Widget_Social_Icons extends WP_Widget {
* Widget constructor.
*/
public function __construct() {
+ global $pagenow;
+
$widget_ops = array(
'classname' => 'jetpack_widget_social_icons',
'description' => __( 'Add social-media icons to your site.', 'jetpack' ),
@@ -33,10 +35,17 @@ class Jetpack_Widget_Social_Icons extends WP_Widget {
),
);
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
- add_action( 'admin_print_footer_scripts', array( $this, 'render_admin_js' ) );
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_icon_scripts' ) );
- add_action( 'wp_footer', array( $this, 'include_svg_icons' ), 9999 );
+ // Enqueue admin scrips and styles, only in the customizer or the old widgets page.
+ if ( is_customize_preview() || 'widgets.php' === $pagenow ) {
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
+ add_action( 'admin_print_footer_scripts', array( $this, 'render_admin_js' ) );
+ }
+
+ // Enqueue scripts and styles for the display of the widget, on the frontend or in the customizer.
+ if ( is_active_widget( false, $this->id, $this->id_base, true ) || is_customize_preview() ) {
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_icon_scripts' ) );
+ add_action( 'wp_footer', array( $this, 'include_svg_icons' ), 9999 );
+ }
}
/**
@@ -58,12 +67,6 @@ class Jetpack_Widget_Social_Icons extends WP_Widget {
* JavaScript for admin widget form.
*/
public function render_admin_js() {
- global $wp_customize;
- global $pagenow;
-
- if ( ! isset( $wp_customize ) && 'widgets.php' !== $pagenow ) {
- return;
- }
?>
<script type="text/html" id="tmpl-jetpack-widget-social-icons-template">
<?php self::render_icons_template(); ?>
@@ -75,10 +78,6 @@ class Jetpack_Widget_Social_Icons extends WP_Widget {
* Add SVG definitions to the footer.
*/
public function include_svg_icons() {
- if ( ! is_active_widget( false, $this->id, $this->id_base, true ) ) {
- return;
- }
-
// Define SVG sprite file in Jetpack
$svg_icons = dirname( dirname( __FILE__ ) ) . '/theme-tools/social-menu/social-menu.svg';
@@ -479,6 +478,16 @@ class Jetpack_Widget_Social_Icons extends WP_Widget {
'label' => 'Digg',
),
array(
+ 'url' => 'discord.gg',
+ 'icon' => 'discord',
+ 'label' => 'Discord',
+ ),
+ array(
+ 'url' => 'discordapp.com',
+ 'icon' => 'discord',
+ 'label' => 'Discord',
+ ),
+ array(
'url' => 'dribbble.com',
'icon' => 'dribbble',
'label' => 'Dribbble',
@@ -564,7 +573,7 @@ class Jetpack_Widget_Social_Icons extends WP_Widget {
'label' => 'Medium',
),
array(
- 'url' => 'pinterest.com',
+ 'url' => 'pinterest.',
'icon' => 'pinterest',
'label' => 'Pinterest',
),
diff --git a/plugins/jetpack/modules/widgets/top-posts.php b/plugins/jetpack/modules/widgets/top-posts.php
index ab2ffd2e..cdcd59d1 100644
--- a/plugins/jetpack/modules/widgets/top-posts.php
+++ b/plugins/jetpack/modules/widgets/top-posts.php
@@ -542,7 +542,7 @@ class Jetpack_Top_Posts_Widget extends WP_Widget {
$days = 2;
}
- $post_view_posts = stats_get_from_restapi( array(), 'top-posts?max=11&summarize=1&num=' . absint( $days ) );
+ $post_view_posts = stats_get_from_restapi( array(), 'top-posts?max=11&summarize=1&num=' . intval( $days ) );
if ( ! isset( $post_view_posts->summary ) || empty( $post_view_posts->summary->postviews ) ) {
return array();
diff --git a/plugins/jetpack/modules/widgets/twitter-timeline.php b/plugins/jetpack/modules/widgets/twitter-timeline.php
index d9c8c947..0f16e330 100644
--- a/plugins/jetpack/modules/widgets/twitter-timeline.php
+++ b/plugins/jetpack/modules/widgets/twitter-timeline.php
@@ -138,6 +138,22 @@ class Jetpack_Twitter_Timeline_Widget extends WP_Widget {
echo ' data-partner="' . esc_attr( $partner ) . '"';
}
+ /**
+ * Allow the activation of Do Not Track for the Twitter Timeline Widget.
+ *
+ * @see https://developer.twitter.com/en/docs/twitter-for-websites/timelines/guides/parameter-reference.html
+ *
+ * @module widgets
+ *
+ * @since 6.9.0
+ *
+ * @param bool false Should the Twitter Timeline use the DNT attribute? Default to false.
+ */
+ $dnt = apply_filters( 'jetpack_twitter_timeline_default_dnt', false );
+ if ( true === $dnt ) {
+ echo ' data-dnt="true"';
+ }
+
if ( ! empty( $instance['chrome'] ) && is_array( $instance['chrome'] ) ) {
echo ' data-chrome="' . esc_attr( join( ' ', $instance['chrome'] ) ) . '"';
}
diff --git a/plugins/jetpack/modules/woocommerce-analytics/classes/wp-woocommerce-analytics-universal.php b/plugins/jetpack/modules/woocommerce-analytics/classes/wp-woocommerce-analytics-universal.php
index b08b5bc6..5214db3f 100644
--- a/plugins/jetpack/modules/woocommerce-analytics/classes/wp-woocommerce-analytics-universal.php
+++ b/plugins/jetpack/modules/woocommerce-analytics/classes/wp-woocommerce-analytics-universal.php
@@ -79,29 +79,32 @@ class Jetpack_WooCommerce_Analytics_Universal {
$blogid = Jetpack::get_option( 'id' );
// check for previous add-to-cart cart events
- $data = WC()->session->get( 'wca_session_data' );
- if ( ! empty( $data ) ) {
- foreach ( $data as $data_instance ) {
- $product = wc_get_product( $data_instance['product_id'] );
- if ( ! $product ) {
- continue;
+ if ( is_object( WC()->session ) ) {
+ $data = WC()->session->get( 'wca_session_data' );
+ if ( ! empty( $data ) ) {
+ foreach ( $data as $data_instance ) {
+ $product = wc_get_product( $data_instance['product_id'] );
+ if ( ! $product ) {
+ continue;
+ }
+ $product_details = $this->get_product_details( $product );
+ wc_enqueue_js(
+ "_wca.push( {
+ '_en': '" . esc_js( $data_instance['event'] ) . "',
+ 'blog_id': '" . esc_js( $blogid ) . "',
+ 'pi': '" . esc_js( $data_instance['product_id'] ) . "',
+ 'pn': '" . esc_js( $product_details['name'] ) . "',
+ 'pc': '" . esc_js( $product_details['category'] ) . "',
+ 'pp': '" . esc_js( $product_details['price'] ) . "',
+ 'pq': '" . esc_js( $data_instance['quantity'] ) . "',
+ 'pt': '" . esc_js( $product_details['type'] ) . "',
+ 'ui': '" . esc_js( $this->get_user_id() ) . "',
+ } );"
+ );
}
- $product_details = $this->get_product_details( $product );
- wc_enqueue_js(
- "_wca.push( {
- '_en': '" . esc_js( $data_instance['event'] ) . "',
- 'blog_id': '" . esc_js( $blogid ) . "',
- 'pi': '" . esc_js( $data_instance['product_id'] ) . "',
- 'pn': '" . esc_js( $product_details['name'] ) . "',
- 'pc': '" . esc_js( $product_details['category'] ) . "',
- 'pp': '" . esc_js( $product_details['price'] ) . "',
- 'pq': '" . esc_js( $data_instance['quantity'] ) . "',
- 'ui': '" . esc_js( $this->get_user_id() ) . "',
- } );"
- );
+ // clear data
+ WC()->session->set( 'wca_session_data', '' );
}
- // clear data
- WC()->session->set( 'wca_session_data', '' );
}
}
@@ -170,6 +173,7 @@ class Jetpack_WooCommerce_Analytics_Universal {
'name' => $product->get_title(),
'category' => $this->get_product_categories_concatenated( $product ),
'price' => $product->get_price(),
+ 'type' => $product->get_type(),
);
}
@@ -190,6 +194,7 @@ class Jetpack_WooCommerce_Analytics_Universal {
'pn': '" . esc_js( $product_details['name'] ) . "',
'pc': '" . esc_js( $product_details['category'] ) . "',
'pp': '" . esc_js( $product_details['price'] ) . "',
+ 'pt': '" . esc_js( $product_details['type'] ) . "',
'ui': '" . esc_js( $this->get_user_id() ) . "',
} );"
);
@@ -224,6 +229,7 @@ class Jetpack_WooCommerce_Analytics_Universal {
'pc': '" . esc_js( $product_details['category'] ) . "',
'pp': '" . esc_js( $product_details['price'] ) . "',
'pq': '" . esc_js( $cart_item['quantity'] ) . "',
+ 'pt': '" . esc_js( $product_details['type'] ) . "',
'ui': '" . esc_js( $this->get_user_id() ) . "',
} );";
}
@@ -255,6 +261,7 @@ class Jetpack_WooCommerce_Analytics_Universal {
'pc': '" . esc_js( $product_details['category'] ) . "',
'pp': '" . esc_js( $product_details['price'] ) . "',
'pq': '" . esc_js( $order_item->get_quantity() ) . "',
+ 'pt': '" . esc_js( $product_details['type'] ) . "',
'oi': '" . esc_js( $order->get_order_number() ) . "',
'ui': '" . esc_js( $this->get_user_id() ) . "',
} );";
@@ -339,8 +346,12 @@ class Jetpack_WooCommerce_Analytics_Universal {
$quantity = ( $quantity == 0 ) ? 1 : $quantity;
// check for existing data
- $data = WC()->session->get( 'wca_session_data' );
- if ( empty( $data ) || ! is_array( $data ) ) {
+ if ( is_object( WC()->session ) ) {
+ $data = WC()->session->get( 'wca_session_data' );
+ if ( empty( $data ) || ! is_array( $data ) ) {
+ $data = array();
+ }
+ } else {
$data = array();
}
diff --git a/plugins/jetpack/modules/woocommerce-analytics/wp-woocommerce-analytics.php b/plugins/jetpack/modules/woocommerce-analytics/wp-woocommerce-analytics.php
index 3413ef07..d078af40 100644
--- a/plugins/jetpack/modules/woocommerce-analytics/wp-woocommerce-analytics.php
+++ b/plugins/jetpack/modules/woocommerce-analytics/wp-woocommerce-analytics.php
@@ -38,6 +38,14 @@ class Jetpack_WooCommerce_Analytics {
* @return bool
*/
public static function shouldTrackStore() {
+ /**
+ * Make sure WooCommerce is installed and active
+ *
+ * This action is documented in https://docs.woocommerce.com/document/create-a-plugin
+ */
+ if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', Jetpack::get_active_plugins() ) ) ) {
+ return false;
+ }
// Tracking only Site pages
if ( is_admin() ) {
return false;
@@ -50,15 +58,6 @@ class Jetpack_WooCommerce_Analytics {
if ( ! Jetpack::is_active() ) {
return false;
}
- /**
- * Make sure WooCommerce is installed and active
- *
- * This action is documented in https://docs.woocommerce.com/document/create-a-plugin
- */
- if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', Jetpack::get_active_plugins() ) ) ) {
- return false;
- }
-
// Ensure the WooCommerce class exists and is a valid version
$minimum_woocommerce_active = class_exists( 'WooCommerce' ) && version_compare( WC_VERSION, '3.0', '>=' );
if ( ! $minimum_woocommerce_active ) {
diff --git a/plugins/jetpack/modules/wordads/php/params.php b/plugins/jetpack/modules/wordads/php/params.php
index 5443ff48..ef3f3326 100644
--- a/plugins/jetpack/modules/wordads/php/params.php
+++ b/plugins/jetpack/modules/wordads/php/params.php
@@ -208,7 +208,7 @@ class WordAds_Params {
return false;
}
- if ( is_archive() && ! $this->options['wordads_display_archive'] ) {
+ if ( ( is_archive() || is_search() ) && ! $this->options['wordads_display_archive'] ) {
return false;
}
diff --git a/plugins/jetpack/modules/wordads/wordads.php b/plugins/jetpack/modules/wordads/wordads.php
index e1ce5c37..3d3a886f 100644
--- a/plugins/jetpack/modules/wordads/wordads.php
+++ b/plugins/jetpack/modules/wordads/wordads.php
@@ -23,28 +23,30 @@ class WordAds {
* @var array
*/
public static $ad_tag_ids = array(
- 'mrec' => array(
+ 'mrec' => array(
'tag' => '300x250_mediumrectangle',
'height' => '250',
'width' => '300',
),
- 'lrec' => array(
- 'tag' => '336x280_largerectangle',
- 'height' => '280',
- 'width' => '336',
- ),
- 'leaderboard' => array(
+ 'leaderboard' => array(
'tag' => '728x90_leaderboard',
'height' => '90',
'width' => '728',
),
- 'wideskyscraper' => array(
+ 'mobile_leaderboard' => array(
+ 'tag' => '320x50_mobileleaderboard',
+ 'height' => '50',
+ 'width' => '320',
+ ),
+ 'wideskyscraper' => array(
'tag' => '160x600_wideskyscraper',
'height' => '600',
'width' => '160',
),
);
+ public static $SOLO_UNIT_CSS = 'float:left;margin-right:5px;margin-top:0px;';
+
/**
* Convenience function for grabbing options from params->options
*
@@ -63,6 +65,26 @@ class WordAds {
}
/**
+ * Returns the ad tag property array for supported ad types.
+ * @return array array with ad tags
+ *
+ * @since 7.1.0
+ */
+ function get_ad_tags() {
+ return self::$ad_tag_ids;
+ }
+
+ /**
+ * Returns the solo css for unit
+ * @return string the special css for solo units
+ *
+ * @since 7.1.0
+ */
+ function get_solo_unit_css() {
+ return self::$SOLO_UNIT_CSS;
+ }
+
+ /**
* Instantiate the plugin
*
* @since 4.5.0
@@ -77,20 +99,15 @@ class WordAds {
* @since 4.5.0
*/
function init() {
- // bail on infinite scroll
- if ( self::is_infinite_scroll() ) {
- return;
- }
-
require_once WORDADS_ROOT . '/php/params.php';
$this->params = new WordAds_Params();
- if ( is_admin() ) {
- require_once WORDADS_ROOT . '/php/admin.php';
+ if ( $this->should_bail() || self::is_infinite_scroll() ) {
return;
}
- if ( $this->should_bail() ) {
+ if ( is_admin() ) {
+ require_once WORDADS_ROOT . '/php/admin.php';
return;
}
@@ -415,14 +432,14 @@ HTML;
$width = 300;
$height = 250;
- $snippet = $this->get_ad_snippet( $section_id, $height, $width, $spot, 'float:left;margin-right:5px;margin-top:0px;' );
+ $snippet = $this->get_ad_snippet( $section_id, $height, $width, $spot, self::$SOLO_UNIT_CSS );
if ( $this->option( 'wordads_second_belowpost', true ) ) {
$section_id2 = 0 === $this->params->blog_id ? WORDADS_API_TEST_ID2 : $this->params->blog_id . '4';
$snippet .= $this->get_ad_snippet( $section_id2, $height, $width, $spot, 'float:left;margin-top:0px;' );
}
} elseif ( 'inline' === $spot ) {
$section_id = 0 === $this->params->blog_id ? WORDADS_API_TEST_ID : $this->params->blog_id . '5';
- $snippet = $this->get_ad_snippet( $section_id, $height, $width, $spot, 'mrec', 'float:left;margin-right:5px;margin-top:0px;' );
+ $snippet = $this->get_ad_snippet( $section_id, $height, $width, $spot, 'mrec', self::$SOLO_UNIT_CSS );
}
} elseif ( 'house' == $type ) {
$leaderboard = 'top' == $spot && ! $this->params->mobile_device;
@@ -432,18 +449,7 @@ HTML;
}
}
- $header = 'top' == $spot ? 'wpcnt-header' : '';
- $about = __( 'Advertisements', 'jetpack' );
- return <<<HTML
- <div class="wpcnt $header">
- <div class="wpa">
- <span class="wpa-about">$about</span>
- <div class="u $spot">
- $snippet
- </div>
- </div>
- </div>
-HTML;
+ return $this->get_ad_div( $spot, $snippet );
}
@@ -465,12 +471,10 @@ HTML;
'width' => $width,
'height' => $height,
);
- $ad_number = count( $this->ads );
- // Max 6 ads per page.
- if ( $ad_number > 5 && 'top' !== $location ) {
- return;
- }
+ $ad_number = count( $this->ads ) . '-' . uniqid();
+
$data_tags = $this->params->cloudflare ? ' data-cfasync="false"' : '';
+ $css = esc_attr( $css );
return <<<HTML
<div style="padding-bottom:15px;width:{$width}px;height:{$height}px;$css">
@@ -492,6 +496,41 @@ HTML;
}
/**
+ * Returns the complete ad div with snippet to be inserted into the page
+ *
+ * @param string $spot top, side, inline, or belowpost
+ * @param string $snippet The snippet to insert into the div
+ * @param array $css_classes
+ * @return string The supporting ad unit div
+ *
+ * @since 7.1
+ */
+ function get_ad_div( $spot, $snippet, array $css_classes = array() ) {
+ if ( empty( $css_classes ) ) {
+ $css_classes = array();
+ }
+
+ $css_classes[] = 'wpcnt';
+ if ( 'top' == $spot ) {
+ $css_classes[] = 'wpcnt-header';
+ }
+
+ $spot = esc_attr( $spot );
+ $classes = esc_attr( implode( ' ', $css_classes ) );
+ $about = esc_html__( 'Advertisements', 'jetpack' );
+ return <<<HTML
+ <div class="$classes">
+ <div class="wpa">
+ <span class="wpa-about">$about</span>
+ <div class="u $spot">
+ $snippet
+ </div>
+ </div>
+ </div>
+HTML;
+ }
+
+ /**
* Check the reasons to bail before we attempt to insert ads.
*
* @return true if we should bail (don't insert ads)