mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
* 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. git-svn-id: https://develop.svn.wordpress.org/trunk@24214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -105,7 +105,7 @@ wp_enqueue_script('admin-comments');
|
||||
enqueue_comment_hotkeys_js();
|
||||
|
||||
if ( $post_id )
|
||||
$title = sprintf(__('Comments on “%s”'), wp_html_excerpt(_draft_or_post_title($post_id), 50));
|
||||
$title = sprintf( __( 'Comments on “%s”' ), wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ) );
|
||||
else
|
||||
$title = __('Comments');
|
||||
|
||||
@@ -143,17 +143,17 @@ require_once('./admin-header.php');
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php
|
||||
if ( $post_id )
|
||||
echo sprintf(__('Comments on “%s”'),
|
||||
sprintf('<a href="%s">%s</a>',
|
||||
get_edit_post_link($post_id),
|
||||
wp_html_excerpt(_draft_or_post_title($post_id), 50)
|
||||
echo sprintf( __( 'Comments on “%s”' ),
|
||||
sprintf( '<a href="%s">%s</a>',
|
||||
get_edit_post_link( $post_id ),
|
||||
wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' )
|
||||
)
|
||||
);
|
||||
else
|
||||
echo __('Comments');
|
||||
|
||||
if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
|
||||
printf( '<span class="subtitle">' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50 ) ) . '</span>' ); ?>
|
||||
printf( '<span class="subtitle">' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) ) . '</span>' ); ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user