mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Add core support for Playlists and Video Playlists.
* Playlists operate like galleries in the admin. * Provide default UI and JS support in themes using MediaElement and Backbone. * The shortcodes are clickable, editable, and configurable using the media modal. * Playlists support images for each item, whether or not the current theme supports images for `attachment:audio` and `attachment:video` * Playlists respond to `$content_width` and resize videos accordingly. * All playlist data is included inline, using a script tag with `type="application/json"`, allowing anyone to unenqueue the WP playlist JS and roll their own. * Playlist styles are minimal and work out of the box in the last 5 default themes. They inherit and adapt to the current theme's font styles, and their rules are easily overrideable. See #26631. git-svn-id: https://develop.svn.wordpress.org/trunk@27239 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -315,6 +315,8 @@ function wp_default_scripts( &$scripts ) {
|
||||
'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
|
||||
) );
|
||||
|
||||
$scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 );
|
||||
|
||||
$scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' );
|
||||
did_action( 'init' ) && $scripts->localize( 'zxcvbn-async', '_zxcvbnSettings', array(
|
||||
'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js',
|
||||
|
||||
Reference in New Issue
Block a user