WP HOOKS
filtrod 3.6.0

wp_video_shortcode_override

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

Opis — z kodu źródłowego

Filters the default video shortcode output.

If the filtered output isn't empty, it will be used instead of generating the default video template.

Parametry

ParametrTypOpis
$htmlstringEmpty variable to be replaced with shortcode markup.
$attrarrayAttributes of the shortcode. See {@see \wp_video_shortcode()}.
$contentstringVideo shortcode content.
$instanceintUnique numeric ID of this video shortcode instance.

Wywołanie

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

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

Popularne w tej kategorii