I am getting the error with the following message when i active my plugins "WordPress Admin Bar Improved":
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in C:\xampp\htdocs\flexisim\wp-includes\functions.php on line 4094
Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in C:\xampp\htdocs\flexisim\wp-includes\functions.php on line 4094
Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in C:\xampp\htdocs\flexisim\wp-includes\functions.php on line 4094
Following is the related code i found from my plugins which include wp_enqueue_scripts:
public function admin_scripts()
{
wp_enqueue_script('wpabi_admin_js', plugins_url('wpabi-admin.js', __FILE__), array('jquery'), '1.0');
}
public function admin_styles()
{
wp_enqueue_style('wpabi_admin_css', plugins_url('wpabi-admin.css', __FILE__), '', '2.0', 'all');
}
What i can do to resolve this kind of error?
Looking for the help,
Thank you very much.