Make WordPress Core

Changeset 30410


Ignore:
Timestamp:
11/20/2014 11:11:12 AM (10 years ago)
Author:
nacin
Message:

Revert [28948] for the 4.0 branch, which caused a regression.

see #29573 for 4.0. see #28350.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0/src/wp-admin/includes/post.php

    r29695 r30410  
    12061206        }
    12071207    } else {
    1208         if ( function_exists( 'mb_strlen' ) && mb_strlen( $post_name ) > 30 ) {
    1209             $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
    1210         } elseif ( strlen( $post_name ) > 30 ) {
    1211             $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
     1208        if ( function_exists( 'mb_strlen' ) ) {
     1209            if ( mb_strlen( $post_name ) > 30 ) {
     1210                $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
     1211            } else {
     1212                $post_name_abridged = $post_name;
     1213            }
    12121214        } else {
    1213             $post_name_abridged = $post_name;
     1215            if ( strlen( $post_name ) > 30 ) {
     1216                $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
     1217            } else {
     1218                $post_name_abridged = $post_name;
     1219            }
    12141220        }
    12151221
Note: See TracChangeset for help on using the changeset viewer.