mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-19 22:43:24 +09:00
Fix admin enqueue scripts
This commit is contained in:
@@ -170,9 +170,14 @@ class Display_Featured_Image_Genesis {
|
||||
wp_register_script( 'displayfeaturedimage-upload', plugins_url( '/includes/js/settings-upload.js', dirname( __FILE__ ) ), array( 'jquery', 'media-upload', 'thickbox' ), $version );
|
||||
wp_register_script( 'widget_selector', plugins_url( '/includes/js/widget-selector.js', dirname( __FILE__ ) ), array( 'jquery' ), $version );
|
||||
|
||||
$screen = get_current_screen();
|
||||
$screen = get_current_screen();
|
||||
$screen_ids = array(
|
||||
'appearance_page_displayfeaturedimagegenesis',
|
||||
'profile',
|
||||
'user-edit'
|
||||
);
|
||||
|
||||
if ( 'appearance_page_displayfeaturedimagegenesis' === $screen->id || ! empty( $screen->taxonomy ) || 'profile' === $screen->id ) {
|
||||
if ( in_array( $screen->id, $screen_ids ) || ! empty( $screen->taxonomy ) ) {
|
||||
wp_enqueue_media();
|
||||
wp_enqueue_script( 'displayfeaturedimage-upload' );
|
||||
wp_localize_script( 'displayfeaturedimage-upload', 'objectL10n', array(
|
||||
|
||||
Reference in New Issue
Block a user