Make WordPress Core


Ignore:
Timestamp:
11/09/2012 04:57:25 AM (12 years ago)
Author:
koopersmith
Message:

Media: Add wp_enqueue_media to easily include all media dependencies.

Also, media templates now print on wp_footer.

props sushkov. fixes #22060, see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22488 r22489  
    12921292
    12931293/**
     1294 * Enqueues all scripts, styles, settings, and templates necessary to use
     1295 * all media JS APIs.
     1296 *
     1297 * @since 3.5.0
     1298 */
     1299function wp_enqueue_media() {
     1300    wp_enqueue_script( 'media-upload' );
     1301    wp_enqueue_style( 'media-views' );
     1302    wp_plupload_default_settings();
     1303    add_action( 'admin_footer', 'wp_print_media_templates' );
     1304    add_action( 'wp_footer', 'wp_print_media_templates' );
     1305}
     1306
     1307/**
    12941308 * Prints the templates used in the media manager.
    12951309 *
Note: See TracChangeset for help on using the changeset viewer.