diff --git wp-admin/includes/class-wp-terms-list-table.php wp-admin/includes/class-wp-terms-list-table.php
index 4d1b556..c5653d2 100644
|
|
class WP_Terms_List_Table extends WP_List_Table { |
41 | 41 | function prepare_items() { |
42 | 42 | global $taxonomy; |
43 | 43 | |
44 | | $tags_per_page = $this->get_items_per_page( 'edit_' . $taxonomy . '_per_page' ); |
| 44 | $tags_per_page = $this->get_items_per_page( 'edit_' . str_replace( '-', '_', $taxonomy ) . '_per_page' ); |
45 | 45 | |
46 | 46 | if ( 'post_tag' == $taxonomy ) { |
47 | 47 | $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); |
diff --git wp-admin/includes/misc.php wp-admin/includes/misc.php
index e3d3dad..8378dad 100644
|
|
function set_screen_options() { |
328 | 328 | if ( !preg_match( '/^[a-z_-]+$/', $option ) ) |
329 | 329 | return; |
330 | 330 | |
| 331 | $map_option = $option; |
| 332 | $type = str_replace( array( 'edit_', '_per_page' ), '', $map_option); |
331 | 333 | $option = str_replace('-', '_', $option); |
332 | 334 | |
333 | | $map_option = $option; |
334 | | $type = str_replace('edit_', '', $map_option); |
335 | | $type = str_replace('_per_page', '', $type); |
336 | 335 | if ( in_array($type, get_post_types()) ) |
337 | 336 | $map_option = 'edit_per_page'; |
338 | 337 | if ( in_array( $type, get_taxonomies()) ) |
339 | 338 | $map_option = 'edit_tags_per_page'; |
340 | 339 | |
341 | | |
342 | 340 | switch ( $map_option ) { |
343 | 341 | case 'edit_per_page': |
344 | 342 | case 'users_per_page': |
diff --git wp-admin/includes/template.php wp-admin/includes/template.php
index e2d2cf0..77e83c5 100644
|
|
function screen_options($screen) { |
1879 | 1879 | $per_page_label = $wp_current_screen_options['per_page']['label']; |
1880 | 1880 | |
1881 | 1881 | if ( empty($wp_current_screen_options['per_page']['option']) ) { |
1882 | | $option = str_replace( '-', '_', "{$screen->id}_per_page" ); |
| 1882 | $option = $map_option = str_replace( '-', '_', "{$screen->id}_per_page" ); |
1883 | 1883 | } else { |
1884 | 1884 | $option = $wp_current_screen_options['per_page']['option']; |
| 1885 | $map_option = str_replace( '-', '_', $option ); |
1885 | 1886 | } |
1886 | 1887 | |
1887 | | $per_page = (int) get_user_option( $option ); |
| 1888 | $per_page = (int) get_user_option( $map_option ); |
1888 | 1889 | if ( empty( $per_page ) || $per_page < 1 ) { |
1889 | 1890 | if ( isset($wp_current_screen_options['per_page']['default']) ) |
1890 | 1891 | $per_page = $wp_current_screen_options['per_page']['default']; |
… |
… |
function screen_options($screen) { |
1892 | 1893 | $per_page = 20; |
1893 | 1894 | } |
1894 | 1895 | |
1895 | | if ( 'edit_comments_per_page' == $option ) |
| 1896 | if ( 'edit_comments_per_page' == $option ) { |
1896 | 1897 | $per_page = apply_filters( 'comments_per_page', $per_page, isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all' ); |
1897 | | elseif ( 'categories_per_page' == $option ) |
| 1898 | } |
| 1899 | elseif ( 'categories_per_page' == $option ) { |
1898 | 1900 | $per_page = apply_filters( 'edit_categories_per_page', $per_page ); |
1899 | | else |
| 1901 | } |
| 1902 | else { |
1900 | 1903 | $per_page = apply_filters( $option, $per_page ); |
| 1904 | $per_page = apply_filters( $map_option, $per_page ); // backward compat |
| 1905 | } |
1901 | 1906 | |
1902 | 1907 | // Back compat |
1903 | 1908 | if ( isset( $screen->post_type ) ) |