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:
Sergey Biryukov 2016-07-23 13:04:47 +00:00
parent 6f5f178e8c
commit 22b3bdc333
1 changed files with 3 additions and 11 deletions

View File

@ -1329,18 +1329,10 @@ 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 ) . '&hellip;' . mb_substr( $post_name, -16 );
} else {
$post_name_abridged = $post_name;
}
if ( mb_strlen( $post_name ) > 34 ) {
$post_name_abridged = mb_substr( $post_name, 0, 16 ) . '&hellip;' . mb_substr( $post_name, -16 );
} else {
if ( strlen( $post_name ) > 34 ) {
$post_name_abridged = substr( $post_name, 0, 16 ) . '&hellip;' . substr( $post_name, -16 );
} else {
$post_name_abridged = $post_name;
}
$post_name_abridged = $post_name;
}
$post_name_html = '<span id="editable-post-name">' . esc_html( $post_name_abridged ) . '</span>';