WP HOOKS
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_page
  • edit_page_per_page
  • edit_attachment_per_page

Hook dynamiczny — możliwe nazwy

edit_attachment_per_pageedit_page_per_pageedit_post_per_page

Parametry

ParametrTypOpis
$posts_per_pageintNumber 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
}

Popularne w tej kategorii