Skip to content

Commit

Permalink
Merge pull request #32 from tedgeving/patch-2
Browse files Browse the repository at this point in the history
Update asset path, props @tedgeving
  • Loading branch information
kasparsd authored Jan 8, 2018
2 parents 6d8256f + f41f4ad commit 95f5c43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions class/class-widget-context.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ function admin_scripts( $page ) {

wp_enqueue_style(
'widget-context-css',
plugins_url( 'css/admin.css', plugin_basename( __FILE__ ) ),
plugins_url( '../css/admin.css', plugin_basename( __FILE__ ) ),
null,
$this->asset_version
);

wp_enqueue_script(
'widget-context-js',
plugins_url( 'js/widget-context.js', plugin_basename( __FILE__ ) ),
plugins_url( '../js/widget-context.js', plugin_basename( __FILE__ ) ),
array( 'jquery' ),
$this->asset_version
);
Expand Down

3 comments on commit 95f5c43

@dcmouser
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a needed bugfix -- I was just about to post something similar.
An alternate fix would be to change those lines to
plugins_url( 'css/admin.css', dirname( plugin_basename( FILE ) ) ),
plugins_url( 'js/widget-context.js', dirname( plugin_basename( FILE ) ) ),

@kasparsd
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dcmouser I just released version 1.0.6 which includes this fix.

@dcmouser
Copy link

@dcmouser dcmouser commented on 95f5c43 Jan 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Great work on this plugin.

Please sign in to comment.