WP HOOKS
akcjadynamicznyod 4.6.0

post_action_{$action}

Args 1Plik wp-admin/post.php

Opis — z kodu źródłowego

Fires for a given custom post action request.

The dynamic portion of the hook name, $action, refers to the custom post action.

Parametry

ParametrTypOpis
$post_idintPost ID sent with the request.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_action( 'post_action_{$action}', 'twoja_funkcja' );

function twoja_funkcja($param_1) {
	// Twój kod
}

Popularne w tej kategorii