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

Commit

Permalink
Merge pull request #1260 from derweili/master
Browse files Browse the repository at this point in the history
use get_stylesheet_directory_uri to support usage as childtheme
  • Loading branch information
olefredrik authored Apr 1, 2018
2 parents 249b49f + e0d1450 commit 296fed5
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 56 deletions.
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.

0 comments on commit 296fed5

Please sign in to comment.