diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 29bcad4289..966cb3742b 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -36,7 +36,7 @@ if ( 'post' != $post_type ) { $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; } -add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') ); +add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); switch ( $wp_list_table->current_action() ) { diff --git a/wp-admin/edit.php b/wp-admin/edit.php index ab16be088f..671311c4b1 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -215,7 +215,7 @@ if ( 'post' == $post_type ) { ); } -add_screen_option( 'per_page', array('label' => $title, 'default' => 20) ); +add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) ); require_once('./admin-header.php'); ?> diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 14f94fbed7..24cfd2cb8b 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -328,15 +328,15 @@ function set_screen_options() { if ( !preg_match( '/^[a-z_-]+$/', $option ) ) return; - $option = str_replace('-', '_', $option); - $map_option = $option; $type = str_replace('edit_', '', $map_option); $type = str_replace('_per_page', '', $type); - if ( in_array($type, get_post_types()) ) - $map_option = 'edit_per_page'; - if ( in_array( $type, get_taxonomies()) ) + if ( in_array( $type, get_taxonomies() ) ) $map_option = 'edit_tags_per_page'; + elseif ( in_array( $type, get_post_types() ) ) + $map_option = 'edit_per_page'; + else + $option = str_replace('-', '_', $option); switch ( $map_option ) { case 'edit_per_page':