widget-options
widget-options copied to clipboard
Plugin loads custom css in admin on pages unrelated to plugin
I am working on a commercial site, and your plugin functionality is great; but unfortunately it is interfering with other plugins in the admin.
This block essentially loads your plugins custom styles on all but a couple admin pages:
if( !in_array( $hook, apply_filters( 'widgetopts_exclude_jqueryui', array( 'toplevel_page_et_divi_options', 'toplevel_page_wpcf7', 'edit.php' ) ) ) ){ wp_enqueue_style( 'widgetopts-jquery-ui', $css_dir . 'jqueryui/1.11.4/themes/ui-lightness/jquery-ui.css' , array(), null ); wp_enqueue_style( 'jquery-ui' ); }
You should be loading your plugins scripts and styles only on your plugins pages, you can use the $hook_suffix global and an if block to accomplish this.