Changeset 34891
- Timestamp:
- 10/07/2015 01:27:01 AM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-comments.php
r34504 r34891 166 166 ); 167 167 168 get_current_screen()->set_screen_reader_content( array( 169 'heading_views' => __( 'Filter comments list' ), 170 'heading_pagination' => __( 'Comments list navigation' ), 171 'heading_list' => __( 'Comments list' ), 172 ) ); 173 168 174 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 169 175 ?> -
trunk/src/wp-admin/edit-tags.php
r34359 r34891 54 54 55 55 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); 56 57 get_current_screen()->set_screen_reader_content( array( 58 'heading_pagination' => $tax->labels->pagination, 59 'heading_list' => $tax->labels->list, 60 ) ); 56 61 57 62 $location = false; -
trunk/src/wp-admin/edit.php
r34177 r34891 246 246 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 247 247 ); 248 } 248 249 } 250 251 get_current_screen()->set_screen_reader_content( array( 252 'heading_views' => $post_type_object->labels->views, 253 'heading_pagination' => $post_type_object->labels->pagination, 254 'heading_list' => $post_type_object->labels->list, 255 ) ); 249 256 250 257 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) ); -
trunk/src/wp-admin/includes/class-wp-comments-list-table.php
r34508 r34891 444 444 $this->display_tablenav( 'top' ); 445 445 446 $this->screen->render_screen_reader_content( 'heading_list' ); 447 446 448 ?> 447 449 <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>"> -
trunk/src/wp-admin/includes/class-wp-list-table.php
r34728 r34891 382 382 if ( empty( $views ) ) 383 383 return; 384 385 $this->screen->render_screen_reader_content( 'heading_views' ); 384 386 385 387 echo "<ul class='subsubsub'>\n"; … … 735 737 } 736 738 739 if ( 'top' === $which && $total_pages > 1 ) { 740 $this->screen->render_screen_reader_content( 'heading_pagination' ); 741 } 742 737 743 $output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>'; 738 744 … … 1118 1124 1119 1125 $this->display_tablenav( 'top' ); 1126 1127 $this->screen->render_screen_reader_content( 'heading_list' ); 1120 1128 ?> 1121 1129 <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>"> -
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r34839 r34891 218 218 219 219 $views = $this->get_views(); 220 221 $this->screen->render_screen_reader_content( 'heading_views' ); 220 222 ?> 221 223 <div class="wp-filter"> -
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r34760 r34891 259 259 $views = apply_filters( "views_{$this->screen->id}", $views ); 260 260 261 $this->screen->render_screen_reader_content( 'heading_views' ); 261 262 ?> 262 263 <div class="wp-filter"> … … 293 294 ?> 294 295 <div class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>"> 295 296 <?php 297 $this->screen->render_screen_reader_content( 'heading_list' ); 298 ?> 296 299 <div id="the-list"<?php echo $data_attr; ?>> 297 300 <?php $this->display_rows_or_placeholder(); ?> -
trunk/src/wp-admin/includes/class-wp-screen.php
r34422 r34891 142 142 */ 143 143 private $_help_sidebar = ''; 144 145 /** 146 * The accessible hidden headings and text associated with the screen, if any. 147 * 148 * @since 4.4.0 149 * @access private 150 * @var array 151 */ 152 private $_screen_reader_content = array(); 144 153 145 154 /** … … 643 652 public function get_columns() { 644 653 return $this->columns; 654 } 655 656 /** 657 * Get the accessible hidden headings and text used in the screen. 658 * 659 * @since 4.4.0 660 * 661 * @see set_screen_reader_content() For more information on the array format. 662 * 663 * @return array An associative array of screen reader text strings. 664 */ 665 public function get_screen_reader_content() { 666 return $this->_screen_reader_content; 667 } 668 669 /** 670 * Get a screen reader text string. 671 * 672 * @since 4.4.0 673 * 674 * @param string $key Screen reader text array named key. 675 * @return string Screen reader text string. 676 */ 677 public function get_screen_reader_text( $key ) { 678 if ( ! isset( $this->_screen_reader_content[ $key ] ) ) { 679 return null; 680 } 681 return $this->_screen_reader_content[ $key ]; 682 } 683 684 /** 685 * Add accessible hidden headings and text for the screen. 686 * 687 * @since 4.4.0 688 * 689 * @param array $content { 690 * An associative array of screen reader text strings. 691 * 692 * @type string $heading_views Screen reader text for the filter links heading. 693 * Default 'Filter items list'. 694 * @type string $heading_pagination Screen reader text for the pagination heading. 695 * Default 'Items list navigation'. 696 * @type string heading_list Screen reader text for the items list heading. 697 * Default 'Items list'. 698 * } 699 */ 700 public function set_screen_reader_content( $content = array() ) { 701 $defaults = array( 702 'heading_views' => __( 'Filter items list' ), 703 'heading_pagination' => __( 'Items list navigation' ), 704 'heading_list' => __( 'Items list' ), 705 ); 706 $content = wp_parse_args( $content, $defaults ); 707 708 $this->_screen_reader_content = $content; 709 } 710 711 /** 712 * Remove all the accessible hidden headings and text for the screen. 713 * 714 * @since 4.4.0 715 */ 716 public function remove_screen_reader_content() { 717 $this->_screen_reader_content = array(); 645 718 } 646 719 … … 1065 1138 <?php 1066 1139 } 1140 1141 /** 1142 * Render screen reader text. 1143 * 1144 * @since 4.4.0 1145 * 1146 * @param string $key The screen reader text array named key. 1147 * @param string $tag Optional. The HTML tag to wrap the screen reader text. Default h2. 1148 */ 1149 public function render_screen_reader_content( $key = '', $tag = 'h2' ) { 1150 1151 if ( ! isset( $this->_screen_reader_content[ $key ] ) ) { 1152 return; 1153 } 1154 echo "<$tag class='screen-reader-text'>" . $this->_screen_reader_content[ $key ] . "</$tag>"; 1155 } 1067 1156 } -
trunk/src/wp-admin/link-manager.php
r33067 r34891 62 62 ); 63 63 64 get_current_screen()->set_screen_reader_content( array( 65 'heading_list' => __( 'Links list' ), 66 ) ); 67 64 68 include_once( ABSPATH . 'wp-admin/admin-header.php' ); 65 69 -
trunk/src/wp-admin/network/site-themes.php
r33921 r34891 33 33 '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>' 34 34 ); 35 36 get_current_screen()->set_screen_reader_content( array( 37 'heading_views' => __( 'Filter site themes list' ), 38 'heading_pagination' => __( 'Site themes list navigation' ), 39 'heading_list' => __( 'Site themes list' ), 40 ) ); 35 41 36 42 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); -
trunk/src/wp-admin/network/site-users.php
r34742 r34891 36 36 '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>' 37 37 ); 38 39 get_current_screen()->set_screen_reader_content( array( 40 'heading_views' => __( 'Filter site users list' ), 41 'heading_pagination' => __( 'Site users list navigation' ), 42 'heading_list' => __( 'Site users list' ), 43 ) ); 38 44 39 45 $_SERVER['REQUEST_URI'] = remove_query_arg( 'update', $_SERVER['REQUEST_URI'] ); -
trunk/src/wp-admin/network/sites.php
r33194 r34891 46 46 '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>' 47 47 ); 48 49 get_current_screen()->set_screen_reader_content( array( 50 'heading_pagination' => __( 'Sites list navigation' ), 51 'heading_list' => __( 'Sites list' ), 52 ) ); 48 53 49 54 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; -
trunk/src/wp-admin/network/themes.php
r34778 r34891 252 252 ); 253 253 254 get_current_screen()->set_screen_reader_content( array( 255 'heading_views' => __( 'Filter themes list' ), 256 'heading_pagination' => __( 'Themes list navigation' ), 257 'heading_list' => __( 'Themes list' ), 258 ) ); 259 254 260 $title = __('Themes'); 255 261 $parent_file = 'themes.php'; -
trunk/src/wp-admin/network/users.php
r34265 r34891 173 173 ); 174 174 175 get_current_screen()->set_screen_reader_content( array( 176 'heading_views' => __( 'Filter users list' ), 177 'heading_pagination' => __( 'Users list navigation' ), 178 'heading_list' => __( 'Users list' ), 179 ) ); 180 175 181 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 176 182 -
trunk/src/wp-admin/plugin-install.php
r33067 r34891 89 89 ); 90 90 91 get_current_screen()->set_screen_reader_content( array( 92 'heading_views' => __( 'Filter plugins list' ), 93 'heading_pagination' => __( 'Plugins list navigation' ), 94 'heading_list' => __( 'Plugins list' ), 95 ) ); 96 91 97 /** 92 98 * WordPress Administration Template Header. -
trunk/src/wp-admin/plugins.php
r34778 r34891 427 427 ); 428 428 429 get_current_screen()->set_screen_reader_content( array( 430 'heading_views' => __( 'Filter plugins list' ), 431 'heading_pagination' => __( 'Plugins list navigation' ), 432 'heading_list' => __( 'Plugins list' ), 433 ) ); 434 429 435 $title = __('Plugins'); 430 436 $parent_file = 'plugins.php'; -
trunk/src/wp-admin/theme-install.php
r34086 r34891 128 128 <?php install_themes_upload(); ?> 129 129 </div> 130 131 <h2 class="screen-reader-text"><?php _e( 'Filter themes list' ); ?></h2> 130 132 131 133 <div class="wp-filter"> … … 172 174 </div> 173 175 </div> 176 <h2 class="screen-reader-text"><?php _e( 'Themes list' ); ?></h2> 174 177 <div class="theme-browser content-filterable"></div> 175 178 <div class="theme-install-overlay wp-full-overlay expanded"></div> -
trunk/src/wp-admin/upload.php
r34797 r34891 205 205 ); 206 206 207 get_current_screen()->set_screen_reader_content( array( 208 'heading_views' => __( 'Filter media items list' ), 209 'heading_pagination' => __( 'Media items list navigation' ), 210 'heading_list' => __( 'Media items list' ), 211 ) ); 212 207 213 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 208 214 ?> -
trunk/src/wp-admin/users.php
r34636 r34891 68 68 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 69 69 ); 70 71 get_current_screen()->set_screen_reader_content( array( 72 'heading_views' => __( 'Filter users list' ), 73 'heading_pagination' => __( 'Users list navigation' ), 74 'heading_list' => __( 'Users list' ), 75 ) ); 70 76 71 77 if ( empty($_REQUEST) ) { -
trunk/src/wp-includes/post-functions.php
r34886 r34891 1323 1323 * - use_featured_image - Default is Use as featured image. 1324 1324 * - menu_name - Default is the same as `name`. 1325 * - views - String for the table views hidden heading. 1326 * - pagination - String for the table pagination hidden heading. 1327 * - list - String for the table hidden heading. 1325 1328 * 1326 1329 * Above, the first default value is for non-hierarchical post types (like posts) … … 1357 1360 'remove_featured_image' => array( __( 'Remove featured image' ), __( 'Remove featured image' ) ), 1358 1361 'use_featured_image' => array( __( 'Use as featured image' ), __( 'Use as featured image' ) ), 1362 'views' => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ), 1363 'pagination' => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ), 1364 'list' => array( __( 'Posts list' ), __( 'Pages list' ) ), 1359 1365 ); 1360 1366 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; -
trunk/src/wp-includes/taxonomy-functions.php
r34884 r34891 496 496 * - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table. 497 497 * - no_terms - Default is "No tags"/"No categories", used in the posts and media list tables. 498 * - pagination - String for the table pagination hidden heading. 499 * - list - String for the table hidden heading. 498 500 * 499 501 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories). … … 535 537 'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ), 536 538 'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ), 539 'pagination' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ), 540 'list' => array( __( 'Tags list' ), __( 'Categories list' ) ), 537 541 ); 538 542 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
Note: See TracChangeset
for help on using the changeset viewer.