WordPress.org

Make WordPress Core

Changeset 38147


Ignore:
Timestamp:
07/23/2016 01:04:47 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Remove a redundant function_exists( 'mb_strlen' ) check in get_sample_permalink_html().

mb_strlen() is always available since [32114].

See #30633.

File:
1 edited

Legend:

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

    r38137 r38147  
    13301330        }
    13311331    } else {
    1332         if ( function_exists( 'mb_strlen' ) ) {
    1333             if ( mb_strlen( $post_name ) > 34 ) {
    1334                 $post_name_abridged = mb_substr( $post_name, 0, 16 ) . '…' . mb_substr( $post_name, -16 );
    1335             } else {
    1336                 $post_name_abridged = $post_name;
    1337             }
     1332        if ( mb_strlen( $post_name ) > 34 ) {
     1333            $post_name_abridged = mb_substr( $post_name, 0, 16 ) . '…' . mb_substr( $post_name, -16 );
    13381334        } else {
    1339             if ( strlen( $post_name ) > 34 ) {
    1340                 $post_name_abridged = substr( $post_name, 0, 16 ) . '…' . substr( $post_name, -16 );
    1341             } else {
    1342                 $post_name_abridged = $post_name;
    1343             }
     1335            $post_name_abridged = $post_name;
    13441336        }
    13451337
Note: See TracChangeset for help on using the changeset viewer.