From 8e04e41e42d5c14fca8107eac866ff28d6320dc5 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 20 Nov 2014 11:12:37 +0000 Subject: [PATCH] Revert [28948] for the 4.0 branch, which caused a regression. see #29573 for 4.0. see #28350. Built from https://develop.svn.wordpress.org/branches/4.0@30410 git-svn-id: http://core.svn.wordpress.org/branches/4.0@30405 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index d230667c68..30573e8811 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1205,12 +1205,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 . '';