id ) ) { return; } if ( $screen->id === 'media_page_isc-sources' ) { Helpers::enqueue_script( 'isc_sources_script', 'admin/assets/js/sources.js' ); } // check if we are on the media library page with list view if ( Admin_Utils::is_media_library_list_view_page() ) { return; } if ( in_array( $screen->id, [ 'upload', 'widgets', 'customize' ], true ) ) { Helpers::enqueue_script( 'isc_attachment_compat', 'admin/assets/js/wp.media.view.AttachmentCompat.js', [ 'media-upload' ] ); } } /** * Display scripts in
section of admin page. Useful for creating js variables in the js global namespace. */ public function admin_head_scripts() { global $pagenow; $screen = get_current_screen(); // texts in JavaScript on sources page if ( 'upload.php' === $pagenow && isset( $_GET['page'] ) && 'isc-sources' === $_GET['page'] ) { ?> id ) && $screen->id === 'attachment' ) { // Meta field in media view ?>