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:
Johan Nielsen 2018-06-25 22:52:22 +02:00 committed by GitHub
parent 2b94b6222a
commit 81766fbf3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 {