You appear to be a bot. Output may be restricted
Description
Locate and require a config file.
First, search child theme for the config. If config file doesn't exist in the child, search the parent for the config file.
Usage
$array = genesis_get_config( $config );
Parameters
- $config
- ( string ) required – The config file to look for (not including .php file extension).
Returns
array The config data.
Source
File name: genesis/lib/functions/general.php
Lines:
1 to 19 of 19
function genesis_get_config( $config ) { $parent_file = sprintf( '%s/config/%s.php', get_template_directory(), $config ); $child_file = sprintf( '%s/config/%s.php', get_stylesheet_directory(), $config ); $data = []; if ( is_readable( $child_file ) ) { $data = require $child_file; } if ( empty( $data ) && is_readable( $parent_file ) ) { $data = require $parent_file; } return (array) $data; }