From 27fefdf04bda2ce9112f111afa2bb62fc2d9b6df Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 8 Dec 2014 21:13:56 +0000 Subject: [PATCH] Revert [28948], which caused a regression. see #29573 for trunk. see #28350. git-svn-id: https://develop.svn.wordpress.org/trunk@30791 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 719f6ebc7c..4906030922 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1214,12 +1214,18 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $return .= '' . __('Change Permalinks') . "\n"; } } else { - if ( function_exists( 'mb_strlen' ) && mb_strlen( $post_name ) > 30 ) { - $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 ); - } elseif ( strlen( $post_name ) > 30 ) { - $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 ); + if ( function_exists( 'mb_strlen' ) ) { + if ( mb_strlen( $post_name ) > 30 ) { + $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 ); + } else { + $post_name_abridged = $post_name; + } } else { - $post_name_abridged = $post_name; + if ( strlen( $post_name ) > 30 ) { + $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 ); + } else { + $post_name_abridged = $post_name; + } } $post_name_html = '' . $post_name_abridged . '';