Function: wp_enqueue_media

wp_enqueue_media( array $args )

Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs.


Name Type(s) Default Value Description
$args array array()

{ Arguments for enqueuing media scripts.

@type int|WP_Post A post object or ID.


WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.