Usage
PHP
nebula()->manifest_json_location($uri)
Parameters
$uri
(Optional) (Boolean) Return the URI of the file
Default: true
Parameter Notes
If $uri is false, the path will be returned.
Source File
Located in /libs/Functions.php on line 381.
1 Hook
Find these filters and actions in the source code below to hook into them. Use do_action() and add_filter() in your functions file or plugin.
Filters
"pre_manifest_json_location"Need a new filter hook? Request one here.
Actions
This function has no action hooks available. Request one?
PHP
public function manifest_json_location($uri=true){
$override = apply_filters('pre_manifest_json_location', null, $uri);
if ( isset($override) ){return $override;}
if ( !empty($uri) ){
return get_theme_file_uri('/inc/manifest.json');
}
return get_theme_file_path('/inc/manifest.json');
}
Override
To override this PHP function, use this hook in your child theme or plugin ("my_custom" can be changed):
PHP
add_filter('pre_manifest_json_location', 'my_custom_manifest_json_location', 10, 2); //The last integer must be 1 more than the actual parameters
function my_custom_manifest_json_location($null, $uri){ //$null is required, but can be ignored
//Write your own code here
return true; //Return true to prevent the original function from running afterwords
}
You can completely disable this PHP function with a single line actions:
PHP
add_filter('pre_manifest_json_location', '__return_false');