Posts, Post Types: Remove a redundant function_exists( 'mb_strlen' )
check in get_sample_permalink_html()
.
`mb_strlen()` is always available since [32114]. See #30633. git-svn-id: https://develop.svn.wordpress.org/trunk@38147 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6f5f178e8c
commit
22b3bdc333
@ -1329,19 +1329,11 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
|
||||
}
|
||||
} else {
|
||||
if ( function_exists( 'mb_strlen' ) ) {
|
||||
if ( mb_strlen( $post_name ) > 34 ) {
|
||||
$post_name_abridged = mb_substr( $post_name, 0, 16 ) . '…' . mb_substr( $post_name, -16 );
|
||||
} else {
|
||||
$post_name_abridged = $post_name;
|
||||
}
|
||||
} else {
|
||||
if ( strlen( $post_name ) > 34 ) {
|
||||
$post_name_abridged = substr( $post_name, 0, 16 ) . '…' . substr( $post_name, -16 );
|
||||
} else {
|
||||
$post_name_abridged = $post_name;
|
||||
}
|
||||
}
|
||||
|
||||
$post_name_html = '<span id="editable-post-name">' . esc_html( $post_name_abridged ) . '</span>';
|
||||
$display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, esc_html( urldecode( $permalink ) ) );
|
||||
|
Loading…
Reference in New Issue
Block a user