filtrdynamicznyod 3.0.0
edit_{$post_type}_per_page
Args 1Plik wp-admin/includes/post.php
Opis — z kodu źródłowego
Filters the number of items per page to show for a specific 'per_page' type.
The dynamic portion of the hook name, $post_type, refers to the post type.
Possible hook names include:
edit_post_per_pageedit_page_per_pageedit_attachment_per_page
Hook dynamiczny — możliwe nazwy
edit_attachment_per_pageedit_page_per_pageedit_post_per_pageParametry
| Parametr | Typ | Opis |
|---|---|---|
$posts_per_page | int | Number of posts to display per page for the given post type. Default 20. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'edit_{$post_type}_per_page', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'edit_{$post_type}_per_page', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii