/**
 * Get all theme options.
 *
 * @since 1.0.0
 *
 * @return array Theme options.
 */
function blueplanet_get_option_all()
{
    $defaults = blueplanet_get_default_options();
    $output = get_theme_mod('blueplanet_options', $defaults);
    $output = array_merge($defaults, $output);
    return $output;
}
예제 #2
0
/**
 * Reset theme settings.
 *
 * @since 1.0.0
 *
 * @param int $input Input value.
 * @return bool Always false.
 */
function blue_planet_reset_all_theme_settings($input)
{
    if (true === $input) {
        $defaults = blueplanet_get_default_options();
        $key = 'blueplanet_options';
        set_theme_mod($key, $defaults);
    }
    return false;
}
예제 #3
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function blue_planet_customize_register($wp_customize)
{
    $new_defaults = blueplanet_get_default_options();
    $options = blueplanet_get_option_all();
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Custom Controls.
    require get_template_directory() . '/inc/customizer-includes/controls.php';
    // Theme Settings.
    require get_template_directory() . '/inc/customizer-includes/theme.php';
    // Slider Settings.
    require get_template_directory() . '/inc/customizer-includes/slider.php';
    // Reset Settings.
    require get_template_directory() . '/inc/customizer-includes/reset.php';
}