mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
Administration: Add a missing closing </span>
tag for column sorting indicators.
Includes wrapping a few other long markup lines for better readability. Follow-up to [55971], [56004], [56260]. See #32170, #57839. Built from https://develop.svn.wordpress.org/trunk@56261 git-svn-id: http://core.svn.wordpress.org/trunk@55773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c0adc40452
commit
45cf0edf28
@ -773,7 +773,9 @@ class WP_List_Table {
|
||||
}
|
||||
|
||||
printf(
|
||||
"<a href='%s' class='%s' id='view-switch-$mode'$aria_current><span class='screen-reader-text'>%s</span></a>\n",
|
||||
"<a href='%s' class='%s' id='view-switch-$mode'$aria_current>" .
|
||||
"<span class='screen-reader-text'>%s</span>" .
|
||||
"</a>\n",
|
||||
esc_url( remove_query_arg( 'attachment-filter', add_query_arg( 'mode', $mode ) ) ),
|
||||
implode( ' ', $classes ),
|
||||
$title
|
||||
@ -819,20 +821,27 @@ class WP_List_Table {
|
||||
if ( ! $approved_comments && ! $pending_comments ) {
|
||||
// No comments at all.
|
||||
printf(
|
||||
'<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>',
|
||||
'<span aria-hidden="true">—</span>' .
|
||||
'<span class="screen-reader-text">%s</span>',
|
||||
__( 'No comments' )
|
||||
);
|
||||
} elseif ( $approved_comments && 'trash' === get_post_status( $post_id ) ) {
|
||||
// Don't link the comment bubble for a trashed post.
|
||||
printf(
|
||||
'<span class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
|
||||
'<span class="post-com-count post-com-count-approved">' .
|
||||
'<span class="comment-count-approved" aria-hidden="true">%s</span>' .
|
||||
'<span class="screen-reader-text">%s</span>' .
|
||||
'</span>',
|
||||
$approved_comments_number,
|
||||
$pending_comments ? $approved_phrase : $approved_only_phrase
|
||||
);
|
||||
} elseif ( $approved_comments ) {
|
||||
// Link the comment bubble to approved comments.
|
||||
printf(
|
||||
'<a href="%s" class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
|
||||
'<a href="%s" class="post-com-count post-com-count-approved">' .
|
||||
'<span class="comment-count-approved" aria-hidden="true">%s</span>' .
|
||||
'<span class="screen-reader-text">%s</span>' .
|
||||
'</a>',
|
||||
esc_url(
|
||||
add_query_arg(
|
||||
array(
|
||||
@ -848,7 +857,10 @@ class WP_List_Table {
|
||||
} else {
|
||||
// Don't link the comment bubble when there are no approved comments.
|
||||
printf(
|
||||
'<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
|
||||
'<span class="post-com-count post-com-count-no-comments">' .
|
||||
'<span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span>' .
|
||||
'<span class="screen-reader-text">%s</span>' .
|
||||
'</span>',
|
||||
$approved_comments_number,
|
||||
$pending_comments ?
|
||||
/* translators: Hidden accessibility text. */
|
||||
@ -860,7 +872,10 @@ class WP_List_Table {
|
||||
|
||||
if ( $pending_comments ) {
|
||||
printf(
|
||||
'<a href="%s" class="post-com-count post-com-count-pending"><span class="comment-count-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>',
|
||||
'<a href="%s" class="post-com-count post-com-count-pending">' .
|
||||
'<span class="comment-count-pending" aria-hidden="true">%s</span>' .
|
||||
'<span class="screen-reader-text">%s</span>' .
|
||||
'</a>',
|
||||
esc_url(
|
||||
add_query_arg(
|
||||
array(
|
||||
@ -875,7 +890,10 @@ class WP_List_Table {
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
'<span class="post-com-count post-com-count-pending post-com-count-no-pending"><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
|
||||
'<span class="post-com-count post-com-count-pending post-com-count-no-pending">' .
|
||||
'<span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span>' .
|
||||
'<span class="screen-reader-text">%s</span>' .
|
||||
'</span>',
|
||||
$pending_comments_number,
|
||||
$approved_comments ?
|
||||
/* translators: Hidden accessibility text. */
|
||||
@ -1004,7 +1022,10 @@ class WP_List_Table {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='first-page button' href='%s'>" .
|
||||
"<span class='screen-reader-text'>%s</span>" .
|
||||
"<span aria-hidden='true'>%s</span>" .
|
||||
'</a>',
|
||||
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'First page' ),
|
||||
@ -1016,7 +1037,10 @@ class WP_List_Table {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">‹</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='prev-page button' href='%s'>" .
|
||||
"<span class='screen-reader-text'>%s</span>" .
|
||||
"<span aria-hidden='true'>%s</span>" .
|
||||
'</a>',
|
||||
esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Previous page' ),
|
||||
@ -1026,23 +1050,29 @@ class WP_List_Table {
|
||||
|
||||
if ( 'bottom' === $which ) {
|
||||
$html_current_page = $current;
|
||||
$total_pages_before = '<span class="screen-reader-text">' .
|
||||
$total_pages_before = sprintf(
|
||||
'<span class="screen-reader-text">%s</span>' .
|
||||
'<span id="table-paging" class="paging-input">' .
|
||||
'<span class="tablenav-paging-text">',
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Current Page' ) .
|
||||
'</span><span id="table-paging" class="paging-input"><span class="tablenav-paging-text">';
|
||||
__( 'Current Page' )
|
||||
);
|
||||
} else {
|
||||
$html_current_page = sprintf(
|
||||
"%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>",
|
||||
'<label for="current-page-selector" class="screen-reader-text">' .
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Current Page' ) .
|
||||
'</label>',
|
||||
'<label for="current-page-selector" class="screen-reader-text">%s</label>' .
|
||||
"<input class='current-page' id='current-page-selector' type='text'
|
||||
name='paged' value='%s' size='%d' aria-describedby='table-paging' />" .
|
||||
"<span class='tablenav-paging-text'>",
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Current Page' ),
|
||||
$current,
|
||||
strlen( $total_pages )
|
||||
);
|
||||
}
|
||||
|
||||
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
|
||||
$page_links[] = $total_pages_before . sprintf(
|
||||
|
||||
$page_links[] = $total_pages_before . sprintf(
|
||||
/* translators: 1: Current page, 2: Total pages. */
|
||||
_x( '%1$s of %2$s', 'paging' ),
|
||||
$html_current_page,
|
||||
@ -1053,7 +1083,10 @@ class WP_List_Table {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">›</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='next-page button' href='%s'>" .
|
||||
"<span class='screen-reader-text'>%s</span>" .
|
||||
"<span aria-hidden='true'>%s</span>" .
|
||||
'</a>',
|
||||
esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Next page' ),
|
||||
@ -1065,7 +1098,10 @@ class WP_List_Table {
|
||||
$page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">»</span>';
|
||||
} else {
|
||||
$page_links[] = sprintf(
|
||||
"<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
|
||||
"<a class='last-page button' href='%s'>" .
|
||||
"<span class='screen-reader-text'>%s</span>" .
|
||||
"<span aria-hidden='true'>%s</span>" .
|
||||
'</a>',
|
||||
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Last page' ),
|
||||
@ -1421,8 +1457,21 @@ class WP_List_Table {
|
||||
}
|
||||
|
||||
// Print an 'abbr' attribute if a value is provided via get_sortable_columns().
|
||||
$abbr_attr = $abbr ? ' abbr="' . esc_attr( $abbr ) . '"' : '';
|
||||
$column_display_name = '<a href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicators"><span class="sorting-indicator asc" aria-hidden="true"></span><span class="sorting-indicator desc" aria-hidden="true"></span>' . $order_text . '</a>';
|
||||
$abbr_attr = $abbr ? ' abbr="' . esc_attr( $abbr ) . '"' : '';
|
||||
|
||||
$column_display_name = sprintf(
|
||||
'<a href="%1$s">' .
|
||||
'<span>%2$s</span>' .
|
||||
'<span class="sorting-indicators">' .
|
||||
'<span class="sorting-indicator asc" aria-hidden="true"></span>' .
|
||||
'<span class="sorting-indicator desc" aria-hidden="true"></span>' .
|
||||
'</span>' .
|
||||
'%3$s' .
|
||||
'</a>',
|
||||
esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ),
|
||||
$column_display_name,
|
||||
$order_text
|
||||
);
|
||||
}
|
||||
|
||||
$tag = ( 'cb' === $column_key ) ? 'td' : 'th';
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-beta4-56260';
|
||||
$wp_version = '6.3-beta4-56261';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user