filtrod 4.7.0
pre_do_shortcode_tag
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
| Parametr | Typ | Opis |
|---|---|---|
$output | false | string | Short-circuit return value. Either false or the value to replace the shortcode with. |
$tag | string | Shortcode name. |
$attr | array | Shortcode attributes array, can be empty if the original arguments string cannot be parsed. |
$m | array | Regular 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
}
// 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