formatting and file check and type0
This commit is contained in:
parent
4b01b22fb4
commit
524418e204
|
@ -11,7 +11,7 @@
|
||||||
*/
|
*/
|
||||||
function asset_path($filename) {
|
function asset_path($filename) {
|
||||||
$manifest_path = get_stylesheet_directory_uri() .'/rev-manifest.json';
|
$manifest_path = get_stylesheet_directory_uri() .'/rev-manifest.json';
|
||||||
if (isset($manifest_path)) {
|
if ( file_exists($manifest_path ) ) {
|
||||||
$manifest = json_decode( file_get_contents( $manifest_path ), TRUE );
|
$manifest = json_decode( file_get_contents( $manifest_path ), TRUE );
|
||||||
} else {
|
} else {
|
||||||
$manifest = [];
|
$manifest = [];
|
||||||
|
@ -28,12 +28,12 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
|
||||||
*/
|
*/
|
||||||
function understrap_scripts() {
|
function understrap_scripts() {
|
||||||
|
|
||||||
wp_enqueue_style( 'understrap-styles', get_stylesheet_directory_uri() . '/'. asset_path('css/child-theme.min.css'), array(), null);
|
wp_enqueue_style( 'understrap-styles', get_stylesheet_directory_uri() . '/'. asset_path('css/theme.min.css'), array(), null);
|
||||||
|
|
||||||
wp_enqueue_script( 'jquery');
|
wp_enqueue_script( 'jquery');
|
||||||
wp_enqueue_script( 'popper-scripts', get_template_directory_uri() . '/js/popper.min.js', array(), false, true);
|
wp_enqueue_script( 'popper-scripts', get_template_directory_uri() . '/js/popper.min.js', array(), false, true);
|
||||||
|
|
||||||
wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . '/' . asset_path('js/child-theme.min.js'), array(), null, true );
|
wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . '/' . asset_path('js/theme.min.js'), array(), null, true );
|
||||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||||
wp_enqueue_script( 'comment-reply' );
|
wp_enqueue_script( 'comment-reply' );
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue