Search
 
SCRIPT & CODE EXAMPLE
 

PHP

To enqueue css & js quickly

// js
#!/usr/bin/env php
<?php
foreach (glob('*.js') as $js) {
   echo "wp_enqueue_script('wptheme-{$js}', get_template_directory_uri() . '/js/{$js}', array('jquery'), '1.0', true);";
}

// Css
#!/usr/bin/env php
<?php
foreach (glob('*.css') as $css) {
   echo "wp_enqueue_style('wptheme-{$css}', get_template_directory_uri() . '/css/{$css}', null, '1.0');";
}
Comment

PREVIOUS NEXT
Code Example
Php :: phpunit run group 
Php :: laravel repository error 
Php :: laravel belongsto with condition date 
Php :: laravel validation error messages are not showing on register oage 
Php :: @sectionMissing 
Php :: opencart set page title config php 
Php :: php random array name 
Php :: preg_replace encoding 
Php :: Laravel, return view with Request::old 
Php :: woocommerce hook after order complete 
Php :: when user click back clear form data laravel 
Php :: phpmyadmin arch 
Php :: image_store 
Php :: escape class wordpress 
Php :: Prevent infinite loop when saving Statamic entry 
Php :: laravel One to Many relationship using custom primary keys 
Php :: traduction website 
Php :: newrelic apache virtual hosts 
Php :: chunk in laravel 
Php :: laravel blade if links exists 
Php :: join in php 
Php :: php calling abstract static function from inside abstrac class 
Php :: laravel form collective add asterisk 
Php :: ajax call php bootstrap validation 
Php :: Add laravel sail build as alias 
Php :: php parameters 
Php :: verify that a valid login cookie was sent in order to do special things for that logged-in 
Php :: Class PHPUnit_Util_Log_TeamCity does not exist 
Php :: laravel eloquent where if a variable has value 
Php :: if isset post php 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =