wp_playlist_scripts хук-событиеWP 3.9.0

Prints and enqueues playlist scripts, styles, and JavaScript templates.

Использование

add_action( 'wp_playlist_scripts', 'wp_kama_playlist_scripts_action', 10, 2 );

/**
 * Function for `wp_playlist_scripts` action-hook.
 * 
 * @param string $type  Type of playlist. Possible values are 'audio' or 'video'.
 * @param string $style The 'theme' for the playlist. Core provides 'light' and 'dark'.
 *
 * @return void
 */
function wp_kama_playlist_scripts_action( $type, $style ){

	// action...
}
$type(строка)
Type of playlist. Possible values are 'audio' or 'video'.
$style(строка)
The 'theme' for the playlist. Core provides 'light' and 'dark'.

Список изменений

С версии 3.9.0 Введена.

Где вызывается хук

wp_playlist_shortcode()
wp_playlist_scripts
wp-includes/media.php 2911
do_action( 'wp_playlist_scripts', $atts['type'], $atts['style'] );

Где используется хук в WordPress

wp-includes/default-filters.php 613
add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' );