Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks.

function my_admin_scripts() {
  wp_enqueue_style( 'admin-css', get_stylesheet_directory_uri() . '/admin/css/admin.css' );
  wp_enqueue_script( 'admin-js', get_stylesheet_directory_uri() . '/admin/js/admin.js', true );
}
add_action( 'admin_enqueue_scripts', 'my_admin_scripts' );
Comment

PREVIOUS NEXT
Code Example
Php :: compare hashed password and a text password in laravel 
Php :: utf8 encode php 
Php :: trim comma from variable in php 
Php :: random number generator in php 
Php :: wordpress if is in category 
Php :: formate date using carbon in laravel blade 
Php :: npm watch laravel 
Php :: add leading zeros in php 
Php :: laravel optimize clear 
Php :: page load time in php 
Php :: php remove nbsp from string 
Php :: php check if non-object 
Php :: laravel 8 delete by id 
Php :: get user ip laravel 
Php :: print session in laravel 
Php :: larael drop foreign key 
Php :: php clean html tags 
Php :: wordpress user enumeration 
Php :: laravel migration change column name 
Php :: php get first character of string 
Php :: get the current page id in wordpress 
Php :: how to connect to a database in php 
Php :: laravel assign active based on route name 
Php :: php artisan migrate reset 
Php :: convert date to reverse date in php 
Php :: php create file html 
Php :: php get all elements of array except last 
Php :: send variable to get_template_part 
Php :: get page name wp 
Php :: get contents of a tmp file php 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =