(option) хук-фильтрWP 2.9.0

Filters the number of items to be displayed on each page of the list table.

The dynamic hook name, $option, refers to the per_page option depending on the type of list table in use. Possible filter names include:

Использование

add_filter( '(option)', 'wp_kama_option_filter' );

/**
 * Function for `(option)` filter-hook.
 * 
 * @param int $per_page Number of items to be displayed.
 *
 * @return int
 */
function wp_kama_option_filter( $per_page ){

	// filter...
	return $per_page;
}
$per_page(int)
Number of items to be displayed.
По умолчанию: 20

Список изменений

С версии 2.9.0 Введена.

Где вызывается хук

WP_List_Table::get_items_per_page()
(option)
WP_Screen::render_per_page_options()
(option)
wp-admin/includes/class-wp-list-table.php 1007
return (int) apply_filters( "{$option}", $per_page );
wp-admin/includes/class-wp-screen.php 1264
$per_page = apply_filters( "{$option}", $per_page );

Где используется хук в WordPress

Использование не найдено.