From 533aefdf13b277768979a3bf76533a5689555672 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 18 Mar 2015 02:50:17 +0000 Subject: [PATCH] Press This: ignore site descriptions that end with an ellipsis. These are most likely auto-generated. Props kraftbj. Fixes #31639. git-svn-id: https://develop.svn.wordpress.org/trunk@31810 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-press-this.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php index 472eddd5bf..c943a6297b 100644 --- a/src/wp-admin/includes/class-wp-press-this.php +++ b/src/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(