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
This commit is contained in:
Andrew Ozz 2015-03-18 02:50:17 +00:00
parent 09dd0b59c9
commit 533aefdf13
1 changed files with 5 additions and 0 deletions

View File

@ -971,6 +971,11 @@ class WP_Press_This {
} else if ( ! empty( $data['_meta']['description'] ) ) { } else if ( ! empty( $data['_meta']['description'] ) ) {
$text = $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( $default_html = array(