From 22b3bdc333f61c35d4ddb23fc5b2133c1f7debce Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 23 Jul 2016 13:04:47 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/post.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 86ba666f38..790b736cdf 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1329,18 +1329,10 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $return .= '' . __('Change Permalinks') . "\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; - } + if ( mb_strlen( $post_name ) > 34 ) { + $post_name_abridged = mb_substr( $post_name, 0, 16 ) . '…' . mb_substr( $post_name, -16 ); } 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_abridged = $post_name; } $post_name_html = '' . esc_html( $post_name_abridged ) . '';