diff options
Diffstat (limited to 'plugins/jetpack/modules/theme-tools')
16 files changed, 450 insertions, 16 deletions
diff --git a/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.php b/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.php index adaa42b7..b51149c6 100644 --- a/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.php +++ b/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.php @@ -1,7 +1,7 @@ <?php /** * Jetpack Compatibility File - * See: http://jetpack.com/ + * See: https://jetpack.com/ */ function twentyfifteen_jetpack_setup() { diff --git a/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php b/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php index fcc8b8c1..12d9b74a 100644 --- a/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php +++ b/plugins/jetpack/modules/theme-tools/compat/twentynineteen.php @@ -1,7 +1,7 @@ <?php /** * Jetpack Compatibility File - * See: http://jetpack.com/ + * See: https://jetpack.com/ */ function twentynineteen_jetpack_setup() { diff --git a/plugins/jetpack/modules/theme-tools/compat/twentyseventeen.php b/plugins/jetpack/modules/theme-tools/compat/twentyseventeen.php index 4a60e504..284b54a4 100644 --- a/plugins/jetpack/modules/theme-tools/compat/twentyseventeen.php +++ b/plugins/jetpack/modules/theme-tools/compat/twentyseventeen.php @@ -1,7 +1,7 @@ <?php /** * Jetpack Compatibility File - * See: http://jetpack.com/ + * See: https://jetpack.com/ */ function twentyseventeen_jetpack_setup() { diff --git a/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php index 816a74b5..439a3e95 100644 --- a/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php +++ b/plugins/jetpack/modules/theme-tools/compat/twentysixteen.php @@ -1,7 +1,7 @@ <?php /** * Jetpack Compatibility File - * See: http://jetpack.com/ + * See: https://jetpack.com/ */ function twentysixteen_jetpack_setup() { diff --git a/plugins/jetpack/modules/theme-tools/compat/twentytwenty-rtl.css b/plugins/jetpack/modules/theme-tools/compat/twentytwenty-rtl.css new file mode 100644 index 00000000..fc248ab3 --- /dev/null +++ b/plugins/jetpack/modules/theme-tools/compat/twentytwenty-rtl.css @@ -0,0 +1 @@ +.infinite-scroll .pagination-wrapper,.infinite-scroll.neverending #site-footer,.infinite-scroll.neverending .footer-nav-widgets-wrapper{display:none}.infinite-end.neverending .footer-nav-widgets-wrapper,.infinity-end.neverending #site-footer{display:block}.infinite-loader{margin:calc(3 * 1rem) auto}.infinite-loader .spinner{margin:0 auto;right:inherit!important}#site-content #infinite-handle{margin:0 auto;max-width:58rem;width:calc(100% - 8rem)}#site-content #infinite-handle span{background:100% 0;display:block;font-size:1.7rem;text-align:center}#site-content #infinite-handle span button,#site-content #infinite-handle span button:focus,#site-content #infinite-handle span button:hover{-webkit-appearance:none;-moz-appearance:none;border:none;background:#cd2653;border-radius:0;color:#fff;cursor:pointer;display:inline-block;font-size:1.5rem;font-weight:600;letter-spacing:.0333em;line-height:1.25;margin:0;opacity:1;padding:1.1em 1.44em;text-align:center;text-decoration:none;text-transform:uppercase;transition:opacity .15s linear}#site-content #infinite-handle span button:hover{text-decoration:underline}#site-content .infinite-wrap .hentry:first-of-type{padding:4rem 0 0}.entry-content #jp-relatedposts h3.jp-relatedposts-headline,.entry-content div.sharedaddy h3.sd-title,.entry-content h3.sd-title{font-size:2.8rem;font-weight:700;letter-spacing:-.016875em;line-height:1.5}@media (min-width:700px){.entry-content #jp-relatedposts h3.jp-relatedposts-headline,.entry-content div.sharedaddy h3.sd-title,.entry-content h3.sd-title{font-size:4rem}}.entry-content div.sharedaddy h3.sd-title:before,.entry-content h3.sd-title:before{border:0 none}.entry-content #jp-relatedposts h3.jp-relatedposts-headline em:before{border:0 none}.widget_authors ul{margin-right:0}.widget_authors li{margin-top:1rem;list-style:none}.widget_authors li:first-child{margin-top:2rem}.widget_eu_cookie_law_widget #eu-cookie-law,.widget_eu_cookie_law_widget #eu-cookie-law .accept{font-size:1.6rem;font-weight:500;padding:2rem}.widget_eu_cookie_law_widget #eu-cookie-law .accept{font-size:1.4rem;font-weight:600;letter-spacing:.0333em;line-height:1.25;padding:1.1em 1.44em;text-decoration:none;text-transform:uppercase;transition:opacity .15s linear}@media (max-width:600px){.widget_eu_cookie_law_widget #eu-cookie-law{font-size:1.4rem;padding:1.5rem 1.5rem 6.5rem}.widget_eu_cookie_law_widget #eu-cookie-law .accept{font-size:1.2rem;bottom:1.5rem;left:auto;right:1.5rem;padding:1rem;margin:0}}.entry-content #jp-relatedposts{max-width:120rem;margin:1em auto;width:calc(100% - 4rem)}@media (min-width:700px){.entry-content #jp-relatedposts{width:calc(100% - 8rem)}}#jp-relatedposts .jp-relatedposts-grid{display:flex;flex-grow:1;flex-basis:0;justify-content:space-between;box-sizing:border-box}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post,#jp-relatedposts .jp-relatedposts-post{width:calc(33% - 2rem);margin-right:0;margin-left:0}@media only screen and (max-width:640px){#jp-relatedposts .jp-relatedposts-grid{flex-direction:column}#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post,#jp-relatedposts .jp-relatedposts-post{width:100%}}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post{padding-left:0}#jp-relatedposts#jp-relatedposts .jp-relatedposts-items p,#jp-relatedposts#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title{font-size:inherit;line-height:1.5}#jp-relatedposts .jp-relatedposts-items-visual{margin-left:0}#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img{width:100%}.entry-content .jetpack-recipe{margin:1em auto}.jp-related-posts-i2__post li{margin:0}.wp-block-jetpack-gif{margin:1em auto!important}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/compat/twentytwenty.css b/plugins/jetpack/modules/theme-tools/compat/twentytwenty.css new file mode 100644 index 00000000..794c197e --- /dev/null +++ b/plugins/jetpack/modules/theme-tools/compat/twentytwenty.css @@ -0,0 +1,232 @@ +/** + * Infinite scroll + */ + +/* Globally hidden elements when Infinite Scroll is supported and in use. */ +.infinite-scroll .pagination-wrapper, +.infinite-scroll.neverending .footer-nav-widgets-wrapper, +.infinite-scroll.neverending #site-footer { + /* Theme Footer (when set to scrolling) */ + display: none; +} + + /* When Infinite Scroll has reached its end we need to re-display elements that were hidden (via .neverending) before. */ +.infinite-end.neverending .footer-nav-widgets-wrapper, +.infinity-end.neverending #site-footer { + display: block; +} + +.infinite-loader { + margin: calc(3 * 1rem) auto; +} + +.infinite-loader .spinner { + margin: 0 auto; + left: inherit !important; +} + +#site-content #infinite-handle { + margin: 0 auto; + max-width: 58rem; + width: calc(100% - 8rem); +} + +#site-content #infinite-handle span { + background: transparent; + display: block; + font-size: 1.7rem; + text-align: center; +} + +#site-content #infinite-handle span button, +#site-content #infinite-handle span button:hover, +#site-content #infinite-handle span button:focus { + -webkit-appearance: none; + -moz-appearance: none; + border: none; + background: #cd2653; + border-radius: 0; + color: #fff; + cursor: pointer; + display: inline-block; + font-size: 1.5rem; + font-weight: 600; + letter-spacing: 0.0333em; + line-height: 1.25; + margin: 0; + opacity: 1; + padding: 1.1em 1.44em; + text-align: center; + text-decoration: none; + text-transform: uppercase; + transition: opacity 0.15s linear; +} + +#site-content #infinite-handle span button:hover { + text-decoration: underline; +} + +#site-content .infinite-wrap .hentry:first-of-type { + padding: 4rem 0 0; +} + +/** + * Sharing & Related Posts + */ + +.entry-content div.sharedaddy h3.sd-title, +.entry-content h3.sd-title, +.entry-content #jp-relatedposts h3.jp-relatedposts-headline { + font-size: 2.8rem; + font-weight: 700; + letter-spacing: -0.016875em; + line-height: 1.5; +} + +@media (min-width: 700px) { + .entry-content div.sharedaddy h3.sd-title, + .entry-content h3.sd-title, + .entry-content #jp-relatedposts h3.jp-relatedposts-headline { + font-size: 4rem; + } +} + +.entry-content div.sharedaddy h3.sd-title:before, +.entry-content h3.sd-title:before { + border: 0 none; +} + +.entry-content #jp-relatedposts h3.jp-relatedposts-headline em:before { + border: 0 none; +} + +/* Authors widget */ +.widget_authors ul { + margin-left: 0; +} + +.widget_authors li { + margin-top: 1rem; + list-style: none; +} + +.widget_authors li:first-child { + margin-top: 2rem; +} + +/* EU cookie law */ +.widget_eu_cookie_law_widget #eu-cookie-law, +.widget_eu_cookie_law_widget #eu-cookie-law .accept { + font-size: 1.6rem; + font-weight: 500; + padding: 2rem; +} + +.widget_eu_cookie_law_widget #eu-cookie-law .accept { + font-size: 1.4rem; + font-weight: 600; + letter-spacing: 0.0333em; + line-height: 1.25; + padding: 1.1em 1.44em; + text-decoration: none; + text-transform: uppercase; + transition: opacity 0.15s linear; +} + +@media (max-width: 600px) { + .widget_eu_cookie_law_widget #eu-cookie-law { + font-size: 1.4rem; + padding: 1.5rem 1.5rem 6.5rem; + } + + .widget_eu_cookie_law_widget #eu-cookie-law .accept { + font-size: 1.2rem; + bottom: 1.5rem; + right: auto; + left: 1.5rem; + padding: 1rem; + margin: 0; + } +} + +/* Related Posts */ + +.entry-content #jp-relatedposts { + max-width: 120rem; + margin: 1em auto; + width: calc(100% - 4rem); +} + +@media (min-width: 700px) { + .entry-content #jp-relatedposts { + width: calc(100% - 8rem); + } +} + +#jp-relatedposts .jp-relatedposts-grid { + display: flex; + flex-grow: 1; + flex-basis: 0; + justify-content: space-between; + box-sizing: border-box; +} + +#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post, +#jp-relatedposts .jp-relatedposts-post { + width: calc(33% - 2rem); + margin-left: 0; + margin-right: 0; +} + +@media only screen and (max-width: 640px) { + #jp-relatedposts .jp-relatedposts-grid { + flex-direction: column; + } + + #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post, + #jp-relatedposts .jp-relatedposts-post { + width: 100%; + } +} + +#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post { + padding-right: 0; +} + +#jp-relatedposts#jp-relatedposts .jp-relatedposts-items p, +#jp-relatedposts#jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title { + font-size: inherit; + line-height: 1.5; +} + +#jp-relatedposts .jp-relatedposts-items-visual { + margin-right: 0; +} + +#jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img { + width: 100%; +} + +/** + * Shortcodes + */ + +/* Recipe */ +.entry-content .jetpack-recipe { + margin: 1em auto; +} + +/** + * Blocks + */ + +/* Related Posts Block */ +.jp-related-posts-i2__post li { + margin: 0; +} + +/* GIF Block */ +.wp-block-jetpack-gif { + /* !important because the gif block styles are loaded in the footer after this file */ + margin: 1em auto !important; +} diff --git a/plugins/jetpack/modules/theme-tools/compat/twentytwenty.php b/plugins/jetpack/modules/theme-tools/compat/twentytwenty.php new file mode 100644 index 00000000..f1620e08 --- /dev/null +++ b/plugins/jetpack/modules/theme-tools/compat/twentytwenty.php @@ -0,0 +1,132 @@ +<?php +/** + * Jetpack Compatibility File + * See: https://jetpack.com/ + * + * @package Jetpack + */ + +/** + * Add Jetpack extra functionality to Twenty Twenty. + */ +function twentytwenty_jetpack_setup() { + /** + * Add theme support for Infinite Scroll. + */ + add_theme_support( + 'infinite-scroll', + array( + 'type' => 'click', + 'container' => 'site-content', + 'render' => 'twentytwenty_infinite_scroll_render', + 'footer' => 'site-content', + ) + ); + + /** + * Add theme support for geo-location. + */ + add_theme_support( 'jetpack-geo-location' ); +} +add_action( 'after_setup_theme', 'twentytwenty_jetpack_setup' ); + +/** + * Custom render function for Infinite Scroll. + */ +function twentytwenty_infinite_scroll_render() { + while ( have_posts() ) { + echo '<hr class="post-separator styled-separator is-style-wide section-inner" aria-hidden="true" />'; + the_post(); + get_template_part( 'template-parts/content', get_post_type() ); + } +} + +/** + * Remove Sharing buttons and Likes from excerpts that are used as intro on single post views. + */ +function twentytwenty_no_sharing_on_excerpts() { + if ( is_single() ) { + // Remove sharing buttons. + remove_filter( 'the_excerpt', 'sharing_display', 19 ); + + // Remove Likes. + if ( class_exists( 'Jetpack_Likes' ) ) { + remove_filter( 'the_excerpt', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 ); + } + } +} +add_action( 'loop_start', 'twentytwenty_no_sharing_on_excerpts' ); + +/** + * We do not need to display the Likes Heading here. + * + * @param string $heading Headline structure. + * @param string $title Title. + * @param string $module Module name. + */ +function twentytwenty_no_likes_heading( $heading, $title, $module ) { + if ( 'likes' === $module ) { + return ''; + } + + return $heading; +} +add_filter( 'jetpack_sharing_headline_html', 'twentytwenty_no_likes_heading', 10, 3 ); + +/** + * Disable Ads in post excerpts, that are used as intro on single post views. + */ +add_filter( 'wordads_excerpt_disable', '__return_true' ); + +/** + * Add our compat CSS file for Infinite Scroll and custom widget stylings and such. + * Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production + * or skip it entirely for wpcom. + */ +function twentytwenty_enqueue_jetpack_style() { + $version = Jetpack::is_development_version() + ? filemtime( JETPACK__PLUGIN_DIR . 'modules/theme-tools/compat/twentytwenty.css' ) + : JETPACK__VERSION; + + wp_enqueue_style( 'twentytwenty-jetpack', plugins_url( 'twentytwenty.css', __FILE__ ), array(), $version ); + wp_style_add_data( 'twentytwenty-jetpack', 'rtl', 'replace' ); +} +add_action( 'wp_enqueue_scripts', 'twentytwenty_enqueue_jetpack_style' ); + +/** + * Add inline custom CSS with custom accent color if there is any set. + */ +function twentytwenty_infinity_accent_color_css() { + // Bail early if no custom color was set. + if ( + 'custom' !== get_theme_mod( 'accent_hue_active' ) + || empty( get_theme_mod( 'accent_accessible_colors' ) ) + ) { + return; + } + + $color_info = get_theme_mod( 'accent_accessible_colors' ); + $custom_css = sprintf( + ' + .infinite-scroll #site-content #infinite-handle span button, + .infinite-scroll #site-content #infinite-handle span button:hover, + .infinite-scroll #site-content #infinite-handle span button:focus { + background: %1$s; + color: %2$s; + } + #site-content .entry-content div.sharedaddy h3.sd-title, + #site-content .entry-content h3.sd-title, + #site-content .entry-content #jp-relatedposts h3.jp-relatedposts-headline { + color: %3$s; + } + ', + $color_info['content']['accent'], + $color_info['content']['background'], + $color_info['content']['secondary'] + ); + + // Add our custom style to the existing Twenty Twenty CSS compat file. + wp_add_inline_style( 'twentytwenty-jetpack', $custom_css ); +} +add_action( 'wp_enqueue_scripts', 'twentytwenty_infinity_accent_color_css' ); + diff --git a/plugins/jetpack/modules/theme-tools/featured-content.php b/plugins/jetpack/modules/theme-tools/featured-content.php index 1df0f069..c70408c8 100644 --- a/plugins/jetpack/modules/theme-tools/featured-content.php +++ b/plugins/jetpack/modules/theme-tools/featured-content.php @@ -1,5 +1,7 @@ <?php +use Automattic\Jetpack\Constants; + if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'plugins.php' !== $GLOBALS['pagenow'] ) { /** @@ -501,7 +503,7 @@ if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'pl Add Featured Content settings. * * Sanitization callback registered in Featured_Content::validate_settings(). - * See http://themeshaper.com/2013/04/29/validation-sanitization-in-customizer/comment-page-1/#comment-12374 + * See https://themeshaper.com/2013/04/29/validation-sanitization-in-customizer/comment-page-1/#comment-12374 */ $wp_customize->add_setting( 'featured-content[tag-name]', @@ -714,7 +716,7 @@ if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'pl return $request; } - if ( Jetpack_Constants::is_true( 'IS_WPCOM' ) && Jetpack_Constants::is_true( 'REST_API_REQUEST' ) ) { + if ( Constants::is_true( 'IS_WPCOM' ) && Constants::is_true( 'REST_API_REQUEST' ) ) { add_filter( 'rest_request_before_callbacks', 'wpcom_rest_request_before_callbacks'); } diff --git a/plugins/jetpack/modules/theme-tools/random-redirect.php b/plugins/jetpack/modules/theme-tools/random-redirect.php index d866d336..e78e0277 100644 --- a/plugins/jetpack/modules/theme-tools/random-redirect.php +++ b/plugins/jetpack/modules/theme-tools/random-redirect.php @@ -5,12 +5,12 @@ Plugin URI: https://wordpress.org/extend/plugins/random-redirect/ Description: Allows you to create a link to yourblog.example.com/?random which will redirect someone to a random post on your blog, in a StumbleUpon-like fashion. Version: 1.2-wpcom Author: Matt Mullenweg -Author URI: http://photomatt.net/ +Author URI: https://ma.tt/ */ function jetpack_matt_random_redirect() { // Verify that the Random Redirect plugin this code is from is not active - // See http://plugins.trac.wordpress.org/ticket/1898 + // See https://plugins.trac.wordpress.org/ticket/1898 if ( ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; if ( is_plugin_active( 'random-redirect/random-redirect.php' ) ) { @@ -49,7 +49,7 @@ function jetpack_matt_random_redirect() { // Persistent AppEngine abuse. ORDER BY RAND is expensive. if ( strstr( $_SERVER['HTTP_USER_AGENT'], 'AppEngine-Google' ) ) { - wp_die( 'Please <a href="http://en.support.wordpress.com/contact/" rel="noopener noreferrer" target="_blank">contact support</a>' ); + wp_die( 'Please <a href="https://en.support.wordpress.com/contact/" rel="noopener noreferrer" target="_blank">contact support</a>' ); } // Set the category ID if the parameter is set. diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos.php b/plugins/jetpack/modules/theme-tools/responsive-videos.php index 61987a8d..9bd35dae 100644 --- a/plugins/jetpack/modules/theme-tools/responsive-videos.php +++ b/plugins/jetpack/modules/theme-tools/responsive-videos.php @@ -42,6 +42,11 @@ function jetpack_responsive_videos_embed_html( $html ) { return $html; } + // Short-circuit for AMP responses, since custom scripts are not allowed in AMP and videos are naturally responsive. + if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) { + return $html; + } + // The customizer video widget wraps videos with a class of wp-video // mejs as of 4.9 apparently resizes videos too which causes issues // skip the video if it is wrapped in wp-video. @@ -79,6 +84,11 @@ function jetpack_responsive_videos_maybe_wrap_oembed( $html, $url = null ) { return $html; } + // Short-circuit for AMP responses, since custom scripts are not allowed in AMP and videos are naturally responsive. + if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) { + return $html; + } + $jetpack_video_wrapper = '<div class="jetpack-video-wrapper">'; $already_wrapped = strpos( $html, $jetpack_video_wrapper ); diff --git a/plugins/jetpack/modules/theme-tools/site-logo.php b/plugins/jetpack/modules/theme-tools/site-logo.php index 04f16b71..cef77e69 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo.php +++ b/plugins/jetpack/modules/theme-tools/site-logo.php @@ -1,7 +1,7 @@ <?php /* * Site Logo. - * @see http://jetpack.com/support/site-logo/ + * @see https://jetpack.com/support/site-logo/ * * This feature will only be activated for themes that declare their support. * This can be done by adding code similar to the following during the diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css index d5441db1..e0d9a2c4 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css +++ b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.css @@ -1,6 +1,37 @@ +/* Do not modify this file directly. It is concatenated from individual module CSS files. */ /** - * RTL styles for the Site Logo control. Just swaps the button sides. + * Styles for the Site Logo control. */ +#customize-control-site_logo .current { + margin-bottom: 6px; +} + +#customize-control-site_logo .current span { + border: 1px solid #eee; + border-radius: 2px; + color: #555; + display: block; + overflow: hidden; + line-height: 40px; + min-height: 40px; + padding: 0 6px; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; +} + +#customize-control-site_logo .current img { + max-width: 100%; +} + +#customize-control-site_logo button.new, +#customize-control-site_logo button.change, +#customize-control-site_logo button.remove { + height: auto; + width: 48%; + white-space: normal; +} + #customize-control-site_logo .remove { float: right; margin-left: 3px; @@ -10,3 +41,9 @@ #customize-control-site_logo .change { float: left; } + +#customize-control-site_logo .customize-control-description { + display: block; + clear: both; + margin-bottom: 10px; +}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css index 1893fe9c..f07c2f74 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css +++ b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control-rtl.min.css @@ -1 +1 @@ -#customize-control-site_logo .remove{float:right;margin-left:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:left}
\ No newline at end of file +#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:right;margin-left:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:left}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css index 7fcee5ae..0c1eede3 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css +++ b/plugins/jetpack/modules/theme-tools/site-logo/css/site-logo-control.min.css @@ -1 +1,2 @@ -#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:left;margin-right:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:right}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px}
\ No newline at end of file +/* Do not modify this file directly. It is concatenated from individual module CSS files. */ +#customize-control-site_logo .current{margin-bottom:6px}#customize-control-site_logo .current span{border:1px solid #eee;border-radius:2px;color:#555;display:block;overflow:hidden;line-height:40px;min-height:40px;padding:0 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap}#customize-control-site_logo .current img{max-width:100%}#customize-control-site_logo button.change,#customize-control-site_logo button.new,#customize-control-site_logo button.remove{height:auto;width:48%;white-space:normal}#customize-control-site_logo .remove{float:left;margin-right:3px}#customize-control-site_logo .change,#customize-control-site_logo .new{float:right}#customize-control-site_logo .customize-control-description{display:block;clear:both;margin-bottom:10px}
\ No newline at end of file diff --git a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php index 5e23507d..209cc000 100644 --- a/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php +++ b/plugins/jetpack/modules/theme-tools/site-logo/inc/class-site-logo-control.php @@ -54,8 +54,27 @@ class Site_Logo_Image_Control extends WP_Customize_Control { // Enqueues all needed media resources. wp_enqueue_media(); - // Enqueue our control script and styles. - wp_enqueue_style( 'site-logo-control', plugins_url( '../css/site-logo-control.css', __FILE__ ) ); + /* + * Enqueue our control script and styles. + */ + + // We only enqueue a minified version of the file on prod. Jetpack. + $min = ( + ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) + || ( defined( 'IS_WPCOM' ) && IS_WPCOM ) + ) + ? '' + : '.min'; + + wp_enqueue_style( + 'site-logo-control', + plugins_url( '../css/site-logo-control.css', __FILE__ ), + array(), + JETPACK__VERSION + ); + wp_style_add_data( 'site-logo-control', 'rtl', 'replace' ); + wp_style_add_data( 'site-logo-control', 'suffix', $min ); + wp_enqueue_script( 'site-logo-control', plugins_url( '../js/site-logo-control.js', __FILE__ ), array( 'media-views', 'customize-controls', 'underscore' ), '', true ); } 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 896d255f..333dc504 100644 --- a/plugins/jetpack/modules/theme-tools/social-menu/social-menu.svg +++ b/plugins/jetpack/modules/theme-tools/social-menu/social-menu.svg @@ -74,7 +74,7 @@ c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091 <path d="M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"/> </symbol> <symbol id="icon-medium" viewBox="0 0 24 24"> -<path d="M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"/> +<path d="M5.727 8.027a.623.623 0 0 0-.204-.527L4.02 5.687v-.273H8.69l3.614 7.926 3.175-7.926h4.457v.274l-1.285 1.234a.367.367 0 0 0-.144.36v9.066a.374.374 0 0 0 .144.363l1.258 1.234v.27h-6.324v-.27l1.3-1.265c.13-.13.13-.164.13-.36V8.988l-3.621 9.196h-.489L6.691 8.988v6.164c-.035.258.051.52.235.707l1.691 2.055v.27h-4.8v-.27l1.69-2.055a.814.814 0 0 0 .22-.707zm0 0"/> </symbol> <symbol id="icon-pinterest" viewBox="0 0 24 24"> <path d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"/> |