diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2020-01-06 14:32:30 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2020-01-06 14:32:30 -0500 |
commit | 10ef81bf85ad0a4bad0d204838e14c99ca2526f7 (patch) | |
tree | b4bb36a326d41de12d1a6181d2a2baf34696ac24 /plugins/jetpack/_inc/lib/class.media-summary.php | |
parent | Updating script for Update (diff) | |
download | blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.gz blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.tar.bz2 blogs-gentoo-10ef81bf85ad0a4bad0d204838e14c99ca2526f7.zip |
Update jetpack 8.0
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/_inc/lib/class.media-summary.php')
-rw-r--r-- | plugins/jetpack/_inc/lib/class.media-summary.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/jetpack/_inc/lib/class.media-summary.php b/plugins/jetpack/_inc/lib/class.media-summary.php index 732706d4..6d5f2d48 100644 --- a/plugins/jetpack/_inc/lib/class.media-summary.php +++ b/plugins/jetpack/_inc/lib/class.media-summary.php @@ -131,7 +131,7 @@ class Jetpack_Media_Summary { $poster_image = get_post_meta( $post_id, 'vimeo_poster_image', true ); if ( !empty( $poster_image ) ) { $return['image'] = $poster_image; - $poster_url_parts = parse_url( $poster_image ); + $poster_url_parts = wp_parse_url( $poster_image ); $return['secure']['image'] = 'https://secure-a.vimeocdn.com' . $poster_url_parts['path']; } } @@ -162,12 +162,12 @@ class Jetpack_Media_Summary { $poster_image = get_post_meta( $post_id, 'vimeo_poster_image', true ); if ( !empty( $poster_image ) ) { $return['image'] = $poster_image; - $poster_url_parts = parse_url( $poster_image ); + $poster_url_parts = wp_parse_url( $poster_image ); $return['secure']['image'] = 'https://secure-a.vimeocdn.com' . $poster_url_parts['path']; } } else if ( false !== strpos( $embed, 'dailymotion' ) ) { $return['image'] = str_replace( 'dailymotion.com/video/','dailymotion.com/thumbnail/video/', $embed ); - $return['image'] = parse_url( $return['image'], PHP_URL_SCHEME ) === null ? 'http://' . $return['image'] : $return['image']; + $return['image'] = wp_parse_url( $return['image'], PHP_URL_SCHEME ) === null ? 'http://' . $return['image'] : $return['image']; $return['secure']['image'] = self::https( $return['image'] ); } @@ -348,8 +348,8 @@ class Jetpack_Media_Summary { static function split_content_in_words( $text ) { $words = preg_split( '/[\s!?;,.]+/', $text, null, PREG_SPLIT_NO_EMPTY ); - // Return an empty array if the split above fails. - return $words ? $words : array(); + // Return an empty array if the split above fails. + return $words ? $words : array(); } static function get_word_count( $post_content ) { @@ -358,7 +358,7 @@ class Jetpack_Media_Summary { static function get_word_remaining_count( $post_content, $excerpt_content ) { $content_word_count = count( self::split_content_in_words( self::clean_text( $post_content ) ) ); - $excerpt_word_count = count( self::split_content_in_words( self::clean_text( $excerpt_content ) ) ); + $excerpt_word_count = count( self::split_content_in_words( self::clean_text( $excerpt_content ) ) ); return (int) $content_word_count - $excerpt_word_count; } |