Using filepath instead of uri in asset_path
Sometimes the check file_exists check fails because it wants a path not a uri. Resulting in unrev'ed assets being served.
This commit is contained in:
parent
2b94b6222a
commit
81766fbf3d
|
@ -10,7 +10,7 @@
|
|||
* @return string
|
||||
*/
|
||||
function asset_path($filename) {
|
||||
$manifest_path = get_stylesheet_directory_uri() .'/rev-manifest.json';
|
||||
$manifest_path = get_stylesheet_directory() .'/rev-manifest.json';
|
||||
if ( file_exists($manifest_path ) ) {
|
||||
$manifest = json_decode( file_get_contents( $manifest_path ), TRUE );
|
||||
} else {
|
||||
|
|
Reference in New Issue