CSS and JS files should only be included for the plugin page, not the entire WordPress dashboard #9

Closed
bradt opened this Issue Feb 22, 2013 · 0 comments

1 participant

@bradt
Delicious Brains member

Hello, i suggest to add in FUNCTION admin_menu these lines in order to avoid css problems (see the arrows):

`
if(@$GET['page'] == 'wp-migrate-db'){ <-------
$src = plugins_url( 'asset/css/styles.css', __FILE_
);
wp_enqueue_style( 'wp-migrate-db-styles', $src );
$src = plugins_url( 'asset/js/script.js', FILE );
wp_enqueue_script( 'wp-migrate-db-script', $src, array( 'jquery' ), false, true );
} <----

http://wordpress.org/support/topic/css-problem-on-backoffice?replies=1#post-3860412

@bradt bradt added a commit that closed this issue May 3, 2013
@bradt bradt Use proper hooks to limit execution to plugin
Fixes #9: CSS and JS files should only be included for the plugin
page, not the entire WordPress dashboard
eb0d238
@bradt bradt closed this in eb0d238 May 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment