Simplify a condition in get_sample_permalink_html().
see #28350. Built from https://develop.svn.wordpress.org/trunk@28948 git-svn-id: http://core.svn.wordpress.org/trunk@28745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fc24029d65
commit
27ba686eee
|
@ -1198,18 +1198,12 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
|||
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
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 );
|
||||
} else {
|
||||
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_abridged = $post_name;
|
||||
}
|
||||
|
||||
$post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
|
||||
|
|
Loading…
Reference in New Issue