Example #1
0
/**
 * Setup function.  All child themes should run their setup within this function.  The idea is to add/remove 
 * filters and actions after the parent theme has been set up.  This function provides you that opportunity.
 *
 * @since  0.1.0
 * @access public
 * @return void
 */
function illumination_setup()
{
    /*
     * Add a custom background to overwrite the defaults.
     * @since 0.1.0
     * @link http://codex.wordpress.org/Custom_Backgrounds
     */
    add_theme_support('custom-background', array('default-color' => '330000', 'default-image' => '%2$s/images/backgrounds/xmas-balls.jpg'));
    /*
     * Add a custom header to overwrite the defaults.
     * @since 0.1.0
     * @link http://codex.wordpress.org/Custom_Headers
     */
    add_theme_support('custom-header', array('default-text-color' => 'CC3300', 'default-image' => '%2$s/images/headers/candles.jpg', 'random-default' => false));
    /**
     * Un-Register default Parent Theme headers for the child theme.
     * @since 0.1.1
     */
    unregister_default_headers(array('horizon', 'orange-burn', 'planets-blue', 'planet-burst', 'space-splatters'));
    /*
     * Registers default headers for the child theme.
     * @since 0.1.0
     * @link http://codex.wordpress.org/Function_Reference/register_default_headers
     */
    register_default_headers(array('candle' => array('url' => '%2$s/images/headers/candle.png', 'thumbnail_url' => '%2$s/images/headers/candle-thumb.png', 'description' => __('Candle', 'illumination')), 'candles' => array('url' => '%2$s/images/headers/candles.jpg', 'thumbnail_url' => '%2$s/images/headers/candles-thumb.jpg', 'description' => __('Candles', 'illumination'))));
    /* Register default background images. */
    add_filter('hybrid_default_backgrounds', 'illumination_default_backgrounds', 11);
    /* Add a custom default color for the "primary" color option. */
    add_filter('theme_mod_color_primary', 'illumination_color_primary');
}
Example #2
0
function twentythirteen_holi_custom_header_setup()
{
    $holi_colors = array('orange' => __('Orange', 'holi'), 'green' => __('Green', 'holi'), 'purple' => __('Purple', 'holi'), 'pink' => __('Pink', 'holi'), 'red' => __('Red', 'holi'), 'blue' => __('Blue', 'holi'), 'yellow' => __('Yellow', 'holi'), 'turquoise' => __('Turquoise', 'holi'), 'sepia' => __('Sepia', 'holi'), 'gray' => __('Gray', 'holi'));
    if ('' != get_option('twentythirteen_scheme')) {
        $color_scheme = get_option('twentythirteen_scheme');
    } else {
        $color_scheme = 'green';
    }
    // remove the header support
    remove_theme_support('custom-header');
    $args = array('default-text-color' => '100e22', 'default-image' => '%2$s/images/headers/' . $color_scheme . '/circle.png', 'height' => 230, 'width' => 1600, 'wp-head-callback' => 'twentythirteen_header_style', 'admin-head-callback' => 'twentythirteen_admin_header_style', 'admin-preview-callback' => 'twentythirteen_admin_header_image');
    // add it back, with changes
    add_theme_support('custom-header', $args);
    // remove the default headers
    unregister_default_headers(array('circle', 'diamond', 'star'));
    // replace with new ones
    $new_headers = array();
    foreach ($holi_colors as $holi_color_value => $holi_color_name) {
        $new_headers[$holi_color_value . '-circle'] = array('url' => '%2$s/images/headers/' . $holi_color_value . '/circle.png', 'thumbnail_url' => '%2$s/images/headers/' . $holi_color_value . '/circle-thumbnail.png', 'description' => $holi_color_name);
        $new_headers[$holi_color_value . '-diamond'] = array('url' => '%2$s/images/headers/' . $holi_color_value . '/circle.png', 'thumbnail_url' => '%2$s/images/headers/' . $holi_color_value . '/circle-thumbnail.png', 'description' => _x('Circle', 'header image description', 'twentythirteen'));
        $new_headers[$holi_color_value . '-star'] = array('url' => '%2$s/images/headers/' . $holi_color_value . '/diamond.png', 'thumbnail_url' => '%2$s/images/headers/' . $holi_color_value . '/diamond-thumbnail.png', 'description' => $holi_color_name);
    }
    register_default_headers($new_headers);
}
Example #3
0
/**
 * Setup stuffs.
 *
 * @since 1.0.0
 */
function buntu_theme_setup()
{
    unregister_default_headers(array('horizon', 'orange-burn', 'planets-blue', 'planet-burst', 'space-splatters'));
}
Example #4
0
/**
 * THATCamp Twenty Ten functions. Loads before the Twenty Ten functions.php file. 
 * @since Twenty Ten 1.0
 */
function jorbin_remove_twenty_ten_headers()
{
    unregister_default_headers(array('berries', 'cherryblossom', 'concave', 'fern', 'forestfloor', 'inkwell', 'path', 'sunset'));
}
function wptips_remove_header_images()
{
    unregister_default_headers(array('wheel', 'shore', 'trolley', 'pine-cone', 'chessboard', 'lanterns', 'willow', 'hanoi'));
}
Example #6
0
/**
 * THATCamp Graphene functions. Loads before the Graphene functions.php file. 
 */
function thatcamp_remove_graphene_headers()
{
    unregister_default_headers(array('Schematic', 'Flow', 'Fluid', 'Techno', 'Fireworks', 'Nebula', 'Sparkle'));
}