@@ -13,25 +13,25 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | // Prevent direct file access |
| 16 | -defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); |
|
| 16 | +defined('ABSPATH') or die('No script kiddies please!'); |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Prevent loading the library more than once |
| 20 | 20 | */ |
| 21 | -if( defined( 'AMARKAL_WIDGET' ) ) return false; |
|
| 22 | -define( 'AMARKAL_WIDGET', true ); |
|
| 21 | +if (defined('AMARKAL_WIDGET')) return false; |
|
| 22 | +define('AMARKAL_WIDGET', true); |
|
| 23 | 23 | |
| 24 | -if(!function_exists('amarkal_widget_assets')) |
|
| 24 | +if (!function_exists('amarkal_widget_assets')) |
|
| 25 | 25 | { |
| 26 | 26 | /** |
| 27 | 27 | * Print widget styles |
| 28 | 28 | */ |
| 29 | - function amarkal_widget_scripts( $hook ) |
|
| 29 | + function amarkal_widget_scripts($hook) |
|
| 30 | 30 | { |
| 31 | - if( 'widgets.php' === $hook ) |
|
| 31 | + if ('widgets.php' === $hook) |
|
| 32 | 32 | { |
| 33 | - \wp_enqueue_style('amarkal-widget',\Amarkal\Core\Utility::path_to_url(__DIR__.'/widget.css')); |
|
| 34 | - \wp_enqueue_script('amarkal-widget',\Amarkal\Core\Utility::path_to_url(__DIR__.'/widget.js'),array('jquery','amarkal-ui')); |
|
| 33 | + \wp_enqueue_style('amarkal-widget', \Amarkal\Core\Utility::path_to_url(__DIR__.'/widget.css')); |
|
| 34 | + \wp_enqueue_script('amarkal-widget', \Amarkal\Core\Utility::path_to_url(__DIR__.'/widget.js'), array('jquery', 'amarkal-ui')); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | add_action('admin_enqueue_scripts', 'amarkal_widget_scripts'); |
@@ -18,7 +18,9 @@ |
||
| 18 | 18 | /** |
| 19 | 19 | * Prevent loading the library more than once |
| 20 | 20 | */ |
| 21 | -if( defined( 'AMARKAL_WIDGET' ) ) return false; |
|
| 21 | +if( defined( 'AMARKAL_WIDGET' ) ) { |
|
| 22 | + return false; |
|
| 23 | +} |
|
| 22 | 24 | define( 'AMARKAL_WIDGET', true ); |
| 23 | 25 | |
| 24 | 26 | if(!function_exists('amarkal_widget_assets')) |