Skip to content

Commit

Permalink
Update Assets call.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Zimmerman committed Jun 20, 2017
1 parent 1316fb5 commit 90db79a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
9 changes: 5 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
* ------------------------------------------------------------------------ */

function pressbooks_book_info_page () {
$assets_pb = new Assets( 'pressbooks', 'assets/dist', 'plugin' );
$assets = new Assets( 'pressbooks-book', 'dist', 'theme' );
$assets = new Assets( 'pressbooks-book', 'theme' );
$assets->setSrcDirectory( 'assets' )->setDistDirectory( 'dist' );

if ( is_front_page() ) {
wp_enqueue_style( 'pressbooks-book-info', $assets->getPath( 'styles/book-info.css' ), [], null, 'all' );
Expand All @@ -41,7 +41,7 @@ function pressbooks_book_info_page () {
wp_enqueue_script( 'columnizer-load', $assets->getPath( 'scripts/columnizer-load.js' ), [ 'jquery', 'columnizer' ], '1.7.0', false );

// Sharer.js
wp_enqueue_script( 'sharer', $assets_pb->getPath( 'scripts/sharer.js' ) );
wp_enqueue_script( 'sharer', $assets->getPath( 'scripts/sharer.js' ) );
}
}
add_action( 'wp_enqueue_scripts', 'pressbooks_book_info_page' );
Expand Down Expand Up @@ -75,7 +75,8 @@ function pressbooks_async_scripts( $tag, $handle, $src ) {
* Register and enqueue scripts and stylesheets.
* ------------------------------------------------------------------------ */
function pb_enqueue_scripts() {
$assets = new Assets( 'pressbooks-book', 'dist', 'theme' );
$assets = new Assets( 'pressbooks-book', 'theme' );
$assets->setSrcDirectory( 'assets' )->setDistDirectory( 'dist' );
wp_enqueue_style( 'pressbooks/structure', $assets->getPath( 'styles/structure.css' ), [], '1.7.0', 'screen, print' );
wp_enqueue_style( 'pressbooks/webfonts', 'https://fonts.googleapis.com/css?family=Oswald|Open+Sans+Condensed:300,300italic&subset=latin,cyrillic,greek,cyrillic-ext,greek-ext', false, null );

Expand Down
12 changes: 0 additions & 12 deletions theme-information.php

This file was deleted.

0 comments on commit 90db79a

Please sign in to comment.