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:
parent
09dd0b59c9
commit
533aefdf13
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue