WP HOOKS
filtrod 4.7.0

pre_do_shortcode_tag

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

Opis — z kodu źródłowego

Filters whether to call a shortcode callback.

Returning a non-false value from filter will short-circuit the shortcode generation process, returning that value instead.

Parametry

ParametrTypOpis
$outputfalse | stringShort-circuit return value. Either false or the value to replace the shortcode with.
$tagstringShortcode name.
$attrarrayShortcode attributes array, can be empty if the original arguments string cannot be parsed.
$marrayRegular expression match array.

Wywołanie

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

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

Popularne w tej kategorii