Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_playlist_scripts

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1402      if ( 1 === $instance ) {
1403           /**
1404            * Print and enqueue playlist scripts, styles, and JavaScript templates.
1405            *
1406            * @since 3.9.0
1407            *
1408            * @param string $type  Type of playlist. Possible values are 'audio' or 'video'.
1409            * @param string $style The 'theme' for the playlist. Core provides 'light' and 'dark'.
1410            */
1411           do_action( 'wp_playlist_scripts', $atts['type'], $atts['style'] );
1412      } ?>
1413 <div class="wp-playlist wp-<?php echo $safe_type ?>-playlist wp-playlist-<?php echo $safe_style ?>">
1414      <?php if ( 'audio' === $atts['type'] ): ?>
1415      <div class="wp-playlist-current-item"></div>
1416      <?php endif ?>
1417      <<?php echo $safe_type ?> controls="controls" preload="none" width="<?php
1418           echo (int) $theme_width;
1419      ?>"<?php if ( 'video' === $safe_type ):
1420           echo ' height="', (int) $theme_height, '"';