WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/18/2015 02:50:17 AM (7 years ago)
Author:
azaozz
Message:

Press This: ignore site descriptions that end with an ellipsis. These are most likely auto-generated.
Props kraftbj. Fixes #31639.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r31808 r31810  
    972972                $text = $data['_meta']['description'];
    973973            }
     974
     975            // If there is an ellipsis at the end, the description is very likely auto-generated. Better to ignore it.
     976            if ( $text && substr( $text, -3 ) === '...' ) {
     977                $text = '';
     978            }
    974979        }
    975980
Note: See TracChangeset for help on using the changeset viewer.