Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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');";
}
 
PREVIOUS NEXT
Tagged: #To #enqueue #css #js #quickly
ADD COMMENT
Topic
Name
4+9 =