Skip to content

Commit

Permalink
The EDD CSS files were too aggressively loaded
Browse files Browse the repository at this point in the history
The jQuery UI scripts in particular were being used throughout the admin and altering non-EDD page layouts.
  • Loading branch information
zackkatz committed Mar 5, 2014
1 parent e57e274 commit 5b36292
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions includes/scripts.php
Expand Up @@ -143,8 +143,11 @@ function edd_register_styles() {
* @return void
*/
function edd_load_admin_scripts( $hook ) {
global $wp_version;

global $wp_version,$typenow,$plugin_page;

// Make sure we're on an EDD page: either "download" post type, or `?page=edd-*`
if($typenow !== 'download' && strpos($plugin_page, 'edd-') === false) { return; }

$js_dir = EDD_PLUGIN_URL . 'assets/js/';
$css_dir = EDD_PLUGIN_URL . 'assets/css/';

Expand Down

0 comments on commit 5b36292

Please sign in to comment.