Ticket #32147: 32147.5.patch
File 32147.5.patch, 18.0 KB (added by , 9 years ago) |
---|
-
src/wp-admin/edit-comments.php
136 136 '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' 137 137 ); 138 138 139 get_current_screen()->set_screen_reader_content( array( 140 'heading_views' => __( 'Filter comments list' ), 141 'heading_pagination' => __( 'Comments list navigation' ), 142 'heading_list' => __( 'Comments list' ), 143 ) ); 144 139 145 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 140 146 ?> 141 147 -
src/wp-admin/edit-tags.php
45 45 46 46 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); 47 47 48 get_current_screen()->set_screen_reader_content( array( 49 'heading_pagination' => $tax->labels->pagination, 50 'heading_list' => $tax->labels->list, 51 ) ); 52 48 53 $location = false; 49 54 50 55 switch ( $wp_list_table->current_action() ) { -
src/wp-admin/edit.php
236 236 '<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' . 237 237 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 238 238 ); 239 239 240 } 240 241 242 get_current_screen()->set_screen_reader_content( array( 243 'heading_views' => $post_type_object->labels->views, 244 'heading_pagination' => $post_type_object->labels->pagination, 245 'heading_list' => $post_type_object->labels->list, 246 ) ); 247 241 248 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) ); 242 249 243 250 $bulk_counts = array( -
src/wp-admin/includes/class-wp-comments-list-table.php
394 394 395 395 $this->display_tablenav( 'top' ); 396 396 397 $this->screen->render_screen_reader_content( 'heading_list' ); 398 397 399 ?> 398 400 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>"> 399 401 <thead> -
src/wp-admin/includes/class-wp-list-table.php
380 380 if ( empty( $views ) ) 381 381 return; 382 382 383 $this->screen->render_screen_reader_content( 'heading_views' ); 384 383 385 echo "<ul class='subsubsub'>\n"; 384 386 foreach ( $views as $class => $view ) { 385 387 $views[ $class ] = "\t<li class='$class'>$view"; … … 691 693 $infinite_scroll = $this->_pagination_args['infinite_scroll']; 692 694 } 693 695 696 if ( 'top' === $which && $total_pages > 1 ) { 697 $this->screen->render_screen_reader_content( 'heading_pagination' ); 698 } 699 694 700 $output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>'; 695 701 696 702 $current = $this->get_pagenum(); … … 980 986 $singular = $this->_args['singular']; 981 987 982 988 $this->display_tablenav( 'top' ); 989 990 $this->screen->render_screen_reader_content( 'heading_list' ); 983 991 ?> 984 992 <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>"> 985 993 <thead> -
src/wp-admin/includes/class-wp-media-list-table.php
200 200 global $mode; 201 201 202 202 $views = $this->get_views(); 203 204 $this->screen->render_screen_reader_content( 'heading_views' ); 203 205 ?> 204 206 <div class="wp-filter"> 205 207 <div class="filter-items"> -
src/wp-admin/includes/class-wp-plugin-install-list-table.php
257 257 /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ 258 258 $views = apply_filters( "views_{$this->screen->id}", $views ); 259 259 260 $this->screen->render_screen_reader_content( 'heading_views' ); 260 261 ?> 261 262 <div class="wp-filter"> 262 263 <ul class="filter-links"> … … 291 292 292 293 ?> 293 294 <div class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>"> 294 295 <?php 296 $this->screen->render_screen_reader_content( 'heading_list' ); 297 ?> 295 298 <div id="the-list"<?php echo $data_attr; ?>> 296 299 <?php $this->display_rows_or_placeholder(); ?> 297 300 </div> -
src/wp-admin/includes/screen.php
328 328 private $_help_sidebar = ''; 329 329 330 330 /** 331 * The accessible hidden headings and text associated with the screen, if any. 332 * 333 * @since 4.3.0 334 * @access private 335 * @var array 336 */ 337 private $_screen_reader_content = array(); 338 339 /** 331 340 * Stores old string-based help. 332 341 * 333 342 * @static … … 804 813 } 805 814 806 815 /** 816 * Get the accessible hidden headings and text used in the screen. 817 * 818 * @since 4.3.0 819 * 820 * @see set_screen_reader_content() For more information on the array format. 821 * 822 * @return array An associative array of screen reader text strings. 823 */ 824 public function get_screen_reader_content() { 825 return $this->_screen_reader_content; 826 } 827 828 /** 829 * Get a screen reader text string. 830 * 831 * @since 4.3.0 832 * 833 * @param string $key Screen reader text array named key. 834 * @return string Screen reader text string. 835 */ 836 public function get_screen_reader_text( $key ) { 837 if ( ! isset( $this->_screen_reader_content[ $key ] ) ) { 838 return null; 839 } 840 return $this->_screen_reader_content[ $key ]; 841 } 842 843 /** 844 * Add accessible hidden headings and text for the screen. 845 * 846 * @since 4.3.0 847 * 848 * @param array $content { 849 * An associative array of screen reader text strings. 850 * 851 * @type string $heading_views Screen reader text for the filter links heading. 852 * Default 'Filter items list'. 853 * @type string $heading_pagination Screen reader text for the pagination heading. 854 * Default 'Items list navigation'. 855 * @type string heading_list Screen reader text for the items list heading. 856 * Default 'Items list'. 857 * } 858 */ 859 public function set_screen_reader_content( $content = array() ) { 860 $defaults = array( 861 'heading_views' => __( 'Filter items list' ), 862 'heading_pagination' => __( 'Items list navigation' ), 863 'heading_list' => __( 'Items list' ), 864 ); 865 $content = wp_parse_args( $content, $defaults ); 866 867 $this->_screen_reader_content = $content; 868 } 869 870 /** 871 * Remove all the accessible hidden headings and text for the screen. 872 * 873 * @since 4.3.0 874 */ 875 public function remove_screen_reader_content() { 876 $this->_screen_reader_content = array(); 877 } 878 879 /** 807 880 * Render the screen's help section. 808 881 * 809 882 * This will trigger the deprecated filters for backwards compatibility. … … 1214 1287 </div> 1215 1288 <?php 1216 1289 } 1290 1291 /** 1292 * Render screen reader text. 1293 * 1294 * @since 4.3.0 1295 * 1296 * @param string $key The screen reader text array named key. 1297 * @param string $tag Optional. The HTML tag to wrap the screen reader text. Default h2. 1298 */ 1299 public function render_screen_reader_content( $key = '', $tag = 'h2' ) { 1300 1301 if ( ! isset( $this->_screen_reader_content[ $key ] ) ) { 1302 return; 1303 } 1304 echo "<$tag class='screen-reader-text'>" . $this->_screen_reader_content[ $key ] . "</$tag>"; 1305 } 1217 1306 } -
src/wp-admin/link-manager.php
61 61 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 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 66 70 if ( ! current_user_can('manage_links') ) -
src/wp-admin/network/site-themes.php
33 33 '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>' 34 34 ); 35 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 ) ); 41 36 42 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); 37 43 38 44 $action = $wp_list_table->current_action(); -
src/wp-admin/network/site-users.php
36 36 '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>' 37 37 ); 38 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 ) ); 44 39 45 $_SERVER['REQUEST_URI'] = remove_query_arg( 'update', $_SERVER['REQUEST_URI'] ); 40 46 $referer = remove_query_arg( 'update', wp_get_referer() ); 41 47 -
src/wp-admin/network/sites.php
46 46 '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>' 47 47 ); 48 48 49 get_current_screen()->set_screen_reader_content( array( 50 'heading_pagination' => __( 'Sites list navigation' ), 51 'heading_list' => __( 'Sites list' ), 52 ) ); 53 49 54 $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; 50 55 51 56 if ( isset( $_GET['action'] ) ) { -
src/wp-admin/network/themes.php
251 251 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 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'; 256 262 -
src/wp-admin/network/users.php
280 280 '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>' 281 281 ); 282 282 283 get_current_screen()->set_screen_reader_content( array( 284 'heading_views' => __( 'Filter users list' ), 285 'heading_pagination' => __( 'Users list navigation' ), 286 'heading_list' => __( 'Users list' ), 287 ) ); 288 283 289 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 284 290 285 291 if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) { -
src/wp-admin/plugin-install.php
88 88 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 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. 93 99 */ -
src/wp-admin/plugins.php
395 395 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 396 396 ); 397 397 398 get_current_screen()->set_screen_reader_content( array( 399 'heading_views' => __( 'Filter plugins list' ), 400 'heading_pagination' => __( 'Plugins list navigation' ), 401 'heading_list' => __( 'Plugins list' ), 402 ) ); 403 398 404 $title = __('Plugins'); 399 405 $parent_file = 'plugins.php'; 400 406 -
src/wp-admin/theme-install.php
126 126 <?php install_themes_upload(); ?> 127 127 </div> 128 128 129 <h2 class="screen-reader-text"><?php _e( 'Filter themes list' ); ?></h2> 130 129 131 <div class="wp-filter"> 130 132 <div class="filter-count"> 131 133 <span class="count theme-count"></span> … … 169 171 </div> 170 172 </div> 171 173 </div> 174 <h2 class="screen-reader-text"><?php _e( 'Themes list' ); ?></h2> 172 175 <div class="theme-browser content-filterable"></div> 173 176 <div class="theme-install-overlay wp-full-overlay expanded"></div> 174 177 -
src/wp-admin/upload.php
202 202 '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' 203 203 ); 204 204 205 get_current_screen()->set_screen_reader_content( array( 206 'heading_views' => __( 'Filter media items list' ), 207 'heading_pagination' => __( 'Media items list navigation' ), 208 'heading_list' => __( 'Media items list' ), 209 ) ); 210 205 211 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 206 212 ?> 207 213 -
src/wp-admin/users.php
63 63 '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 64 64 ); 65 65 66 get_current_screen()->set_screen_reader_content( array( 67 'heading_views' => __( 'Filter users list' ), 68 'heading_pagination' => __( 'Users list navigation' ), 69 'heading_list' => __( 'Users list' ), 70 ) ); 71 66 72 if ( empty($_REQUEST) ) { 67 73 $referer = '<input type="hidden" name="wp_http_referer" value="'. esc_attr( wp_unslash( $_SERVER['REQUEST_URI'] ) ) . '" />'; 68 74 } elseif ( isset($_REQUEST['wp_http_referer']) ) { -
src/wp-includes/post.php
1629 1629 * - remove_featured_image - Default is Remove featured image. 1630 1630 * - use_featured_image - Default is Use as featured image. 1631 1631 * - menu_name - Default is the same as `name`. 1632 * - views - String for the table views hidden heading. 1633 * - pagination - String for the table pagination hidden heading. 1634 * - list - String for the table hidden heading. 1632 1635 * 1633 1636 * Above, the first default value is for non-hierarchical post types (like posts) 1634 1637 * and the second one is for hierarchical post types (like pages). … … 1658 1661 'set_featured_image' => array( __( 'Set featured image' ), __( 'Set featured image' ) ), 1659 1662 'remove_featured_image' => array( __( 'Remove featured image' ), __( 'Remove featured image' ) ), 1660 1663 'use_featured_image' => array( __( 'Use as featured image' ), __( 'Use as featured image' ) ), 1664 'views' => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ), 1665 'pagination' => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ), 1666 'list' => array( __( 'Posts list' ), __( 'Pages list' ) ), 1661 1667 ); 1662 1668 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; 1663 1669 -
src/wp-includes/taxonomy.php
472 472 * - add_or_remove_items - This string isn't used on hierarchical taxonomies. Default is "Add or remove tags", used in the meta box when JavaScript is disabled. 473 473 * - choose_from_most_used - This string isn't used on hierarchical taxonomies. Default is "Choose from the most used tags", used in the meta box. 474 474 * - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table. 475 * - pagination - String for the table pagination hidden heading. 476 * - list - String for the table hidden heading. 475 477 * 476 478 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories). 477 479 * … … 508 510 'add_or_remove_items' => array( __( 'Add or remove tags' ), null ), 509 511 'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ), 510 512 'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ), 513 'pagination' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ), 514 'list' => array( __( 'Tags list' ), __( 'Categories list' ) ), 511 515 ); 512 516 $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; 513 517