acf_form_attachment::admin_enqueue_scripts
This action is run after post query but before any admin script / head actions. It is a good place to register all actions.
Method of the class: acf_form_attachment{}
No Hooks.
Returns
N/A.
Usage
$acf_form_attachment = new acf_form_attachment(); $acf_form_attachment->admin_enqueue_scripts();
Changelog
| Since 3.6.0 | Introduced. |
acf_form_attachment::admin_enqueue_scripts() acf form attachment::admin enqueue scripts code ACF 6.8.8
function admin_enqueue_scripts() {
// bail early if not valid screen
if ( ! acf_is_screen( array( 'attachment', 'upload' ) ) ) {
return;
}
// load acf scripts
acf_enqueue_scripts(
array(
'uploader' => true,
)
);
// actions
if ( acf_is_screen( 'upload' ) ) {
add_action( 'admin_footer', array( $this, 'admin_footer' ), 0 );
}
}