X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/wordpress.git/blobdiff_plain/9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f..874d2a2f468a0d1e69aab49b1fe2d9d79d3e1142:/wp-admin/includes/post.php
diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php
index d230667c..30573e88 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 . '';