WordPress.org

Make WordPress Core


Ignore:
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.