Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

use get_stylesheet_directory_uri to support usage as childtheme #1260

Merged
merged 1 commit into from
Apr 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/enqueue-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function foundationpress_asset_path( $filename ) {
function foundationpress_scripts() {

// Enqueue the main Stylesheet.
wp_enqueue_style( 'main-stylesheet', get_template_directory_uri() . '/dist/assets/css/' . foundationpress_asset_path( 'app.css' ), array(), '2.10.4', 'all' );
wp_enqueue_style( 'main-stylesheet', get_stylesheet_directory_uri() . '/dist/assets/css/' . foundationpress_asset_path( 'app.css' ), array(), '2.10.4', 'all' );

// Deregister the jquery version bundled with WordPress.
wp_deregister_script( 'jquery' );
Expand All @@ -55,7 +55,7 @@ function foundationpress_scripts() {
// wp_enqueue_script( 'jquery-migrate' );

// Enqueue Foundation scripts
wp_enqueue_script( 'foundation', get_template_directory_uri() . '/dist/assets/js/' . foundationpress_asset_path( 'app.js' ), array( 'jquery' ), '2.10.4', true );
wp_enqueue_script( 'foundation', get_stylesheet_directory_uri() . '/dist/assets/js/' . foundationpress_asset_path( 'app.js' ), array( 'jquery' ), '2.10.4', true );

// Enqueue FontAwesome from CDN. Uncomment the line below if you need FontAwesome.
//wp_enqueue_script( 'fontawesome', 'https://use.fontawesome.com/5016a31c8c.js', array(), '4.7.0', true );
Expand Down
208 changes: 154 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.