Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dans .htaccess :
- # Simulation nouveaux fichiers CSS et JS pour NitroPack
- RewriteRule ^(.*)-([\d]*)-nitrokek\.(.*)$ /$1.$3 [L]
- Dans functions.php :
- <?php
- // styles du child theme
- function akn_enqueue_styles() {
- $ver = 'BASE';
- if (file_exists(get_stylesheet_directory().'/style.css'))
- $ver = date('YmdHis',filemtime(get_stylesheet_directory().'/style.css'));
- wp_enqueue_style('akn-style', get_stylesheet_directory_uri().'/style-'.$ver.'-nitrokek.css', array(), false);
- }
- add_action('wp_enqueue_scripts', 'akn_enqueue_styles');
- // javascript du child theme
- function akn_enqueue_scripts() {
- $ver = 'BASE';
- if (file_exists(get_stylesheet_directory().'/js/rAthus.js'))
- $ver = date('YmdHis',filemtime(get_stylesheet_directory().'/js/rAthus.js'));
- wp_enqueue_script('script-rathus', get_stylesheet_directory_uri().'/js/rAthus-'.$ver.'-nitrokek.js', array('jquery'), false, true);
- }
- add_action('wp_enqueue_scripts', 'akn_enqueue_scripts');
Add Comment
Please, Sign In to add comment