#14800 closed defect (bug) (duplicate)
'edit_posts_per_page' filter missing in 'wp-admin/includes/template.php'
Reported by: | sorich87 | Owned by: | sorich87 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.1 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
When I modify the default number of posts, e.g. to 30 posts per page, in the posts list with the following code, the number of posts per line is set to 30, but the screen option remains 20.
function my_edit_post_per_page( $per_page, $post_type ) {
if( !get_user_option( 'edit_' . $post_type . '_per_page' ) ) { if the current user did not customize the setting
$per_page = 30; set the number of rows in the table
}
return $per_page;
}
add_filter( 'edit_posts_per_page', 'my_edit_post_per_page' );
The bug, does not occur when I use a post type specific filter 'edit_post_per_page' or 'edit_page_per_page' e.g., instead of the global filter 'edit_post_per_page'.
The attached patch fixes the issue.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Can you take a look at #14135? There is likely some crossover.