From 0ef8e683f2d8824fc8bae8ec7e16c10b85936f9c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 8 Dec 2014 21:14:23 +0000 Subject: [PATCH] Revert [28948], which caused a regression. see #29573 for trunk. see #28350. Built from https://develop.svn.wordpress.org/trunk@30791 git-svn-id: http://core.svn.wordpress.org/trunk@30781 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 16 +++++++++++----- wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 719f6ebc7c..4906030922 100644 --- a/wp-admin/includes/post.php +++ b/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 . ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index 7cfb6ef5c3..c7646c7e3a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30790'; +$wp_version = '4.1-beta2-30791'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.