upload_per_page filter-hookWP 2.9.0

Filters the number of items to list per page when listing media items.

Usage

add_filter( 'upload_per_page', 'wp_kama_upload_per_page_filter' );

/**
 * Function for `upload_per_page` filter-hook.
 * 
 * @param int $media_per_page Number of media to list.
 *
 * @return int
 */
function wp_kama_upload_per_page_filter( $media_per_page ){

	// filter...
	return $media_per_page;
}
$media_per_page(int)
Number of media to list.
Default: 20

Changelog

Since 2.9.0 Introduced.

Where the hook is called

wp_edit_attachments_query_vars()
upload_per_page
wp-admin/includes/post.php 1287
$q['posts_per_page'] = apply_filters( 'upload_per_page', $media_per_page );

Where the hook is used in WordPress

Usage not found.