CSS & JS enqueueing generator

PHOTO EMBED

Sat May 14 2022 10:28:41 GMT+0000 (Coordinated Universal Time)

Saved by @QQcoder #generator #css #js

// 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');";
}
content_copyCOPY