Last active
December 12, 2018 22:17
-
-
Save carlosonweb/0bf42e6f350c28c0abecc324d4b19072 to your computer and use it in GitHub Desktop.
Better BB Child Theme Helper Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper class for child theme functions. This is a better version as it uses the child theme's version number. | |
* | |
* @class FLChildTheme | |
*/ | |
final class FLChildTheme { | |
/** | |
* Enqueues scripts and styles. | |
* | |
* @return void | |
*/ | |
static public function enqueue_scripts() | |
{ | |
$ver = wp_get_theme()->get( 'Version' ); | |
wp_enqueue_style( 'fl-child-theme', FL_CHILD_THEME_URL . '/style.css', array(), $ver ); | |
// The code below is useful if you want to override the parent theme's JavaScript in the child theme. | |
// | |
// wp_dequeue_script( 'fl-automator' ); | |
// wp_enqueue_script( 'fl-child-theme', FL_CHILD_THEME_URL . '/js/theme.js', array(), $ver ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment