diff --git a/CHANGELOG.md b/CHANGELOG.md index fb032b6..1c0d111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 1.0.1 - 2017-05-24 + +* The action hook was changed in the add() method. + ## 1.0.0 - 2017-03-24 * Added `Josantonius\WP_Register\WP_Register` class. diff --git a/composer.json b/composer.json index 96e580d..4340667 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "josantonius/wp_register", - "version": "1.0.0", + "version": "1.0.1", "type": "library", "description": "Register css and JavaScript resources.", "keywords": [ diff --git a/src/WP_Register.php b/src/WP_Register.php index 184783d..a36ac99 100644 --- a/src/WP_Register.php +++ b/src/WP_Register.php @@ -77,7 +77,7 @@ public static function add($type, $data = []) { $type = ucfirst($type); - $hook = ($isAdmin) ? 'admin_init' : 'wp_enqueue_scripts'; + $hook = ($isAdmin) ? 'admin_enqueue_scripts' : 'wp_enqueue_scripts'; if (!isset(self::$data[$type][$hook])) {