Languages: English • 中文(简体) • 日本語 (Add your language)
Enqueues all scripts, styles, settings, and templates necessary to use all media JavaScript APIs.
This function should be called from the 'admin_enqueue_scripts' action hook, or later.
<?php wp_enqueue_media( $args ); ?>
This function does not return a value.
Default usage:
wp_enqueue_media();
Enqueue the media scripts for a particular post:
<?php $args = array( 'post' => 34 ); wp_enqueue_media( $args ); ?>
Since: 3.5.0
wp_enqueue_media() is located in wp-includes/media.php
Enqueue Styles
Enqueue Scripts
Front-End Hooks
Admin Hooks
Login Hooks