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

Fix php error in asset_path function #1129

Merged
merged 2 commits into from
Oct 13, 2017
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion library/enqueue-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

if ( ! function_exists( 'foundationpress_asset_path' ) ) :
function foundationpress_asset_path( $filename ) {
$dir = end( explode ( '.' , $filename) );
$tmp = explode('.', $filename);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JPOak please push another commit with the following changes:

  1. Let's use a more descriptive name than $tmp. Change it to $filename_split.
  2. Put spaces after opening parentheses and before closing parentheses.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok Ok!

$dir = end($tmp);
$manifest_path = dirname( dirname(__FILE__) ) . '/dist/assets/' . $dir . '/rev-manifest.json';

if ( file_exists($manifest_path ) ) {
Expand Down