From f26a2e8113969da14074e653df2670beffca7c29 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 18 Mar 2015 02:51:27 +0000 Subject: [PATCH] Press This: ignore site descriptions that end with an ellipsis. These are most likely auto-generated. Props kraftbj. Fixes #31639. Built from https://develop.svn.wordpress.org/trunk@31810 git-svn-id: http://core.svn.wordpress.org/trunk@31792 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-press-this.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-press-this.php b/wp-admin/includes/class-wp-press-this.php index 472eddd5bf..c943a6297b 100644 --- a/wp-admin/includes/class-wp-press-this.php +++ b/wp-admin/includes/class-wp-press-this.php @@ -971,6 +971,11 @@ class WP_Press_This { } else if ( ! empty( $data['_meta']['description'] ) ) { $text = $data['_meta']['description']; } + + // If there is an ellipsis at the end, the description is very likely auto-generated. Better to ignore it. + if ( $text && substr( $text, -3 ) === '...' ) { + $text = ''; + } } $default_html = array( diff --git a/wp-includes/version.php b/wp-includes/version.php index e7170d54de..23e597071c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta1-31809'; +$wp_version = '4.2-beta1-31810'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.