Don't use missing $taxonomy in screen_options(). $tax->name has the taxonomy slug/name we need

git-svn-id: https://develop.svn.wordpress.org/trunk@14168 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Nikolay Bachiyski 2010-04-20 15:13:27 +00:00
parent 0cab071f77
commit 81d0b63fde
1 changed files with 3 additions and 3 deletions

View File

@ -3776,10 +3776,10 @@ function screen_options($screen) {
$option = str_replace( '-', '_', "{$screen->id}_per_page" ); $option = str_replace( '-', '_', "{$screen->id}_per_page" );
if ( 'edit_tags_per_page' == $option ) { if ( 'edit_tags_per_page' == $option ) {
if ( 'category' == $taxonomy ) if ( 'category' == $tax->name )
$option = 'categories_per_page'; $option = 'categories_per_page';
elseif ( 'post_tag' != $taxonomy ) elseif ( 'post_tag' != $tax->name )
$option = 'edit_' . $taxonomy . '_per_page'; $option = 'edit_' . $tax->name . '_per_page';
} }
$per_page = (int) get_user_option( $option ); $per_page = (int) get_user_option( $option );