WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r30410 r29695  
    12061206        }
    12071207    } else {
    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             }
     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 );
    12141212        } else {
    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             }
     1213            $post_name_abridged = $post_name;
    12201214        }
    12211215
Note: See TracChangeset for help on using the changeset viewer.