edit_attachment_per_page filter-hookWP 3.0.0

Filters the number of items per page to show for a specific 'per_page' type.

This is one of the variants of the dynamic hook edit_(post_type)_per_page

Usage

add_filter( 'edit_attachment_per_page', 'wp_kama_edit_attachment_per_page_filter' );

/**
 * Function for `edit_attachment_per_page` filter-hook.
 * 
 * @param int $posts_per_page Number of posts to display per page for the given post type.
 *
 * @return int
 */
function wp_kama_edit_attachment_per_page_filter( $posts_per_page ){

	// filter...
	return $posts_per_page;
}
$posts_per_page(int)
Number of posts to display per page for the given post type.
Default: 20

Changelog

Since 3.0.0 Introduced.

Where the hook is called

wp_edit_posts_query()
edit_attachment_per_page
wp-admin/includes/post.php 1212
$posts_per_page = apply_filters( "edit_{$post_type}_per_page", $posts_per_page );

Where the hook is used in WordPress

Usage not found.