Make WordPress Core

Changeset 30791


Ignore:
Timestamp:
12/08/2014 09:13:56 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Revert [28948], which caused a regression.

see #29573 for trunk. see #28350.

File:
1 edited

Legend:

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

    r30755 r30791  
    12151215        }
    12161216    } else {
    1217         if ( function_exists( 'mb_strlen' ) && mb_strlen( $post_name ) > 30 ) {
    1218             $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
    1219         } elseif ( strlen( $post_name ) > 30 ) {
    1220             $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
     1217        if ( function_exists( 'mb_strlen' ) ) {
     1218            if ( mb_strlen( $post_name ) > 30 ) {
     1219                $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
     1220            } else {
     1221                $post_name_abridged = $post_name;
     1222            }
    12211223        } else {
    1222             $post_name_abridged = $post_name;
     1224            if ( strlen( $post_name ) > 30 ) {
     1225                $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
     1226            } else {
     1227                $post_name_abridged = $post_name;
     1228            }
    12231229        }
    12241230
Note: See TracChangeset for help on using the changeset viewer.