Make WordPress Core


Ignore:
Timestamp:
05/09/2013 12:22:02 AM (13 years ago)
Author:
SergeyBiryukov
Message:
  • Pass ellipsis as a parameter to wp_html_excerpt() instead of appending it manually.
  • Consolidate the logic to avoid appending ellipsis if the entire string is shown.
  • Show ellipsis after truncated filenames and post titles.

props solarissmoke, bpetty, SergeyBiryukov. fixes #11446.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-manager.php

    r23591 r24214  
    898898            $choices = array( 0 => __( '— Select —' ) );
    899899            foreach ( $menus as $menu ) {
    900                 $truncated_name = wp_html_excerpt( $menu->name, 40 );
    901                 $truncated_name = ( $truncated_name == $menu->name ) ? $menu->name : trim( $truncated_name ) . '…';
    902                 $choices[ $menu->term_id ] = $truncated_name;
     900                $choices[ $menu->term_id ] = wp_html_excerpt( $menu->name, 40, '…' );
    903901            }
    904902
Note: See TracChangeset for help on using the changeset viewer.