????
Current Path : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/framework/ |
Current File : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/framework/get_mods.php |
<?php /** * Gets and stores all theme mods for use with the theme. * * @package Wanderfuls WordPress Theme * @subpackage Framework */ /** * Returns global mods * * @since 2.1.0 */ function tb_get_mods() { global $tb_theme_mods; return $tb_theme_mods; } /** * Returns theme mod from global var * * @since 2.1.0 */ function tb_get_mod( $id, $default = '' ) { // Return get_theme_mod on customize_preview if ( is_customize_preview() ) { return get_theme_mod( $id, $default ); } // Get global object global $tb_theme_mods; // Return data from global object if ( ! empty( $tb_theme_mods ) ) { // Return value if ( isset( $tb_theme_mods[$id] ) ) { return $tb_theme_mods[$id]; } // Return default else { return $default; } } // Global object not found return using get_theme_mod else { return get_theme_mod( $id, $default ); } }