WP HOOKS
filtrod 3.1.0

wp_insert_post_parent

Args 4Plik wp-includes/post.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the post parent -- used to check for and prevent hierarchy loops.

Parametry

ParametrTypOpis
$post_parentintPost parent ID.
$post_idintPost ID.
$new_postarrarrayArray of parsed post data.
$postarrarrayArray of sanitized, but otherwise unmodified post data.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_insert_post_parent', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}

Popularne w tej kategorii