WordPress.org

Make WordPress Core

Changeset 34833


Ignore:
Timestamp:
10/05/2015 07:28:19 PM (5 years ago)
Author:
helen
Message:

Permalinks: Slightly lengthen the truncated slug for display.

This brings it closer to the width of the input so there is less jumping around of buttons. We can afford the space now that other buttons in the space are typically no longer there.

fixes #18306.

File:
1 edited

Legend:

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

    r34728 r34833  
    13281328    } else {
    13291329        if ( function_exists( 'mb_strlen' ) ) {
    1330             if ( mb_strlen( $post_name ) > 30 ) {
    1331                 $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
     1330            if ( mb_strlen( $post_name ) > 34 ) {
     1331                $post_name_abridged = mb_substr( $post_name, 0, 16 ) . '…' . mb_substr( $post_name, -16 );
    13321332            } else {
    13331333                $post_name_abridged = $post_name;
    13341334            }
    13351335        } else {
    1336             if ( strlen( $post_name ) > 30 ) {
    1337                 $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
     1336            if ( strlen( $post_name ) > 34 ) {
     1337                $post_name_abridged = substr( $post_name, 0, 16 ) . '…' . substr( $post_name, -16 );
    13381338            } else {
    13391339                $post_name_abridged = $post_name;
Note: See TracChangeset for help on using the changeset viewer.