WP HOOKS
filtrod 4.7.4

media_library_show_audio_playlist

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

Opis — z kodu źródłowego

Allows showing or hiding the "Create Audio Playlist" button in the media library.

By default, the "Create Audio Playlist" button will always be shown in the media library. If this filter returns null, a query will be run to determine whether the media library contains any audio items. This was the default behavior prior to version 4.8.0, but this query is expensive for large media libraries.

Parametry

ParametrTypOpis
$showbool | nullWhether to show the button, or <code>null</code> to decide based on whether any audio files exist in the media library.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'media_library_show_audio_playlist', 'twoja_funkcja' );

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

Popularne w tej kategorii