diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-12-12 20:29:44 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-12-12 20:29:55 -0500 |
commit | 73ce9c10188ce4f5014c97ad4c0f8c9f69410113 (patch) | |
tree | ac0b7b2f7cb14a145e2308d705033f89cebc736d /plugins/jetpack/modules/theme-tools | |
parent | Update wordpress-mobile-pack 3.2 (diff) | |
download | blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.gz blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.bz2 blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.zip |
Update jetpack 5.6
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/theme-tools')
-rw-r--r-- | plugins/jetpack/modules/theme-tools/content-options/blog-display.php | 2 | ||||
-rw-r--r-- | plugins/jetpack/modules/theme-tools/responsive-videos.php | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/plugins/jetpack/modules/theme-tools/content-options/blog-display.php b/plugins/jetpack/modules/theme-tools/content-options/blog-display.php index d37b6255..3b87c1d2 100644 --- a/plugins/jetpack/modules/theme-tools/content-options/blog-display.php +++ b/plugins/jetpack/modules/theme-tools/content-options/blog-display.php @@ -47,7 +47,7 @@ function jetpack_blog_display_custom_excerpt( $content ) { * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'. * Do not translate into your own language. */ - if ( strpos( _x( 'words', 'Word count type. Do not translate!', 'jetpack' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) { + if ( strpos( _x( 'words', 'Word count type. Do not translate!' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) { $text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' ); preg_match_all( '/./u', $text, $words ); $words = array_slice( $words[0], 0, $excerpt_length + 1 ); diff --git a/plugins/jetpack/modules/theme-tools/responsive-videos.php b/plugins/jetpack/modules/theme-tools/responsive-videos.php index 59913a96..c7a5d72f 100644 --- a/plugins/jetpack/modules/theme-tools/responsive-videos.php +++ b/plugins/jetpack/modules/theme-tools/responsive-videos.php @@ -33,6 +33,18 @@ function jetpack_responsive_videos_embed_html( $html ) { 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. + $video_widget_wrapper = 'class="wp-video"'; + + $mejs_wrapped = strpos( $html, $video_widget_wrapper ); + + // If this is a video widget wrapped by mejs, return the html. + if ( false !== $mejs_wrapped ) { + return $html; + } + if ( defined( 'SCRIPT_DEBUG' ) && true == SCRIPT_DEBUG ) { wp_enqueue_script( 'jetpack-responsive-videos-script', plugins_url( 'responsive-videos/responsive-videos.js', __FILE__ ), array( 'jquery' ), '1.2', true ); } else { |