edit_posts_per_page
Filter HookDescription
Renders the items per page option.Hook Information
File Location |
wp-admin/includes/class-wp-screen.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1270 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into edit_posts_per_page
add_filter('edit_posts_per_page', 'my_custom_filter');
function my_custom_filter() {
// Your custom filtering logic here
return 'modified_value';
}
Source Code Context
wp-admin/includes/class-wp-screen.php:1270
- How this hook is used in WordPress core
<?php
1265 }
1266
1267 // Back compat.
1268 if ( isset( $this->post_type ) ) {
1269 /** This filter is documented in wp-admin/includes/post.php */
1270 $per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type );
1271 }
1272
1273 // This needs a submit button.
1274 add_filter( 'screen_options_show_submit', '__return_true' );
1275
PHP Documentation
<?php
/**
* Renders the items per page option.
*
* @since 3.3.0
*/
Quick Info
- Hook Type: Filter
- Parameters: 0
- File: wp-admin/includes/class-wp-screen.php
Related Hooks
Related hooks will be displayed here in future updates.