/**
 * 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  1.0.0
 * @access public
 * @return void
 */
function kuorinka_child_dev_theme_setup()
{
    /* Load child theme text domain. */
    load_child_theme_textdomain('kuorinka-child-dev', get_stylesheet_directory() . '/languages');
    /*
     * Add a custom background to overwrite the defaults. Remove this section if you want to use 
     * the parent theme defaults instead.
     *
     * @link http://codex.wordpress.org/Custom_Backgrounds
     */
    add_theme_support('custom-background', array('default-color' => 'f7f7f7', 'default-image' => ''));
    /*
     * Add a custom header to overwrite the defaults. Remove this section if you want to use the 
     * the parent theme defaults instead.
     *
     * @link http://codex.wordpress.org/Custom_Headers
     */
    add_theme_support('custom-header', array('default-text-color' => '2e2e2e', 'default-image' => get_stylesheet_directory_uri() . '/images/headers/child.jpg'));
    /*
     * Registers default headers for the theme. If you don't want to add custom headers, remove 
     * this section. Note: Header thumbnail sizes should be 230x78.
     *
     * @link http://codex.wordpress.org/Function_Reference/register_default_headers
     */
    register_default_headers(array('child' => array('url' => '%2$s/images/headers/child.jpg', 'thumbnail_url' => '%2$s/images/headers/child-thumbnail.jpg', 'description' => __('Test header', 'kuorinka-child-dev'))));
    /* Add child theme fonts to editor styles. */
    add_editor_style(kuorinka_child_dev_fonts_url());
}
Exemple #2
0
 function blogolife_setup()
 {
     // Make theme available for translation.
     load_theme_textdomain('blogolife', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     // Let WordPress manage the document title.
     add_theme_support('title-tag');
     // Add support for a variety of post formats
     add_theme_support('post-formats', array('aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video'));
     //Enable support for Post Thumbnails on posts and pages.
     add_theme_support('post-thumbnails');
     //set_post_thumbnail_size( 850, 478, true );
     update_option('thumbnail_size_w', 250);
     update_option('thumbnail_size_h', 141);
     update_option('medium_size_w', 850);
     update_option('medium_size_h', 478);
     update_option('medium_crop', 1);
     update_option('large_size_w', 1200);
     update_option('large_size_h', 675);
     update_option('large_crop', 1);
     //Add theme Support Custom Background
     add_theme_support('custom-background');
     // Add default headers
     register_default_headers(array('headerimage' => array('url' => get_template_directory_uri() . '/assets/images/header.jpg', 'thumbnail_url' => get_template_directory_uri() . '/assets/images/header-t.jpg', 'description' => __('Girls - by Kevin Schmitz', 'blogolife'))));
     //Add theme Support  Custom Header
     $blogolife_custom_header_defaults = array('default-image' => '', 'width' => 1200, 'height' => 450, 'flex-height' => true, 'flex-width' => true, 'uploads' => true, 'random-default' => false, 'header-text' => false, 'default-text-color' => '', 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '');
     add_theme_support('custom-header', $blogolife_custom_header_defaults);
     // This theme uses wp_nav_menu().
     register_nav_menus(array('blogolife_main_menu' => __('Blogolife Main Menu', 'blogolife'), 'blogolife_social_menu' => __('Blogolife Social Links Menu', 'blogolife')));
     // This theme uses wp_nav_menu() in two locations.
     // Switch default core markup for search form, comment form, and comments to output valid HTML5.
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
 }
/**
 * Custom Header
 *
 * @file           custom-header.php
 * @package        Encounters Lite 
 * @author         Styled Themes 
 * @copyright      2013 Styledthemes.com
 * @license        license.txt
 * @version        Release: 1.0
 */
function encounters_lite_custom_header_setup()
{
    $args = array('default-image' => get_template_directory_uri() . '/images/demo-header.jpg', 'height' => 350, 'width' => 1170, 'max-width' => 1170, 'flex-height' => true, 'flex-width' => true, 'random-default' => false, 'default-text-color' => '', 'header-text' => false, 'admin-preview-callback' => 'encounters_lite_admin_header_image');
    //register the default header
    register_default_headers(array('mypic' => array('url' => get_template_directory_uri() . '/images/demo-header.jpg', 'thumbnail_url' => get_template_directory_uri() . '/images/demo-header.jpg', 'description' => _x('Default Header', 'Default Header', 'encounters-lite'))));
    add_theme_support('custom-header', $args);
}
/**
 * Techozoic Theme setup
 *
 * Setup theme translation, theme features, menus, and custom header
 * 
 *
 * @access    private
 * @since     2.0
 */
function techozoic_setup()
{
    global $content_width;
    load_theme_textdomain('techozoic', get_template_directory() . '/languages');
    $locale = get_locale();
    $locale_file = get_template_directory() . "/languages/{$locale}.php";
    if (is_readable($locale_file)) {
        require_once $locale_file;
    }
    // Include other custom functions files
    include get_template_directory() . '/functions/tech-widget.php';
    include get_template_directory() . '/functions/tech-comments-functions.php';
    include get_template_directory() . '/functions/tech-css.php';
    add_theme_support('post-thumbnails');
    add_image_size('single-post-thumbnail', $content_width, 9999);
    //WP 2.9 Post Thumbnail Support
    add_theme_support('automatic-feed-links');
    //WP Auto Feed Links
    add_theme_support('post-formats', array('aside', 'gallery', 'quote', 'status'));
    //WP Post Format
    register_nav_menus(array('primary' => __('Header Navigation', 'techozoic'), 'sidebar' => __('Sidebar Navigation', 'techozoic'), 'footer' => __('Footer Navigation', 'techozoic')));
    //WP Navigation Menu
    add_theme_support('custom-header', array('random-default' => true));
    //WP Custom Header - random roation by default
    define('HEADER_TEXTCOLOR', '');
    define('HEADER_IMAGE', '');
    define('HEADER_IMAGE_HEIGHT', of_get_option('header_height', '200'));
    define('HEADER_IMAGE_WIDTH', of_get_option('header_width', '1000'));
    define('NO_HEADER_TEXT', true);
    add_custom_image_header('techozoic_header_style', 'techozoic_admin_header_style', 'techozoic_admin_header_image');
    register_default_headers(array('grunge' => array('url' => '%s/images/headers/Grunge.jpg', 'thumbnail_url' => '%s/images/headers/Grunge-thumbnail.jpg', 'description' => __('Grunge', 'techozoic')), 'landscape' => array('url' => '%s/images/headers/Landscape.jpg', 'thumbnail_url' => '%s/images/headers/Landscape-thumbnail.jpg', 'description' => __('Landscape', 'techozoic')), 'random_lines_1' => array('url' => '%s/images/headers/Random_Lines_1.jpg', 'thumbnail_url' => '%s/images/headers/Random_Lines_1-thumbnail.jpg', 'description' => __('Random Lines 1', 'techozoic')), 'random_lines_2' => array('url' => '%s/images/headers/Random_Lines_2.jpg', 'thumbnail_url' => '%s/images/headers/Random_Lines_2-thumbnail.jpg', 'description' => __('Random Lines 2', 'techozoic')), 'technology' => array('url' => '%s/images/headers/Technology.jpg', 'thumbnail_url' => '%s/images/headers/Technology-thumbnail.jpg', 'description' => __('Technology', 'techozoic'))));
}
Exemple #5
0
/**
 * Adds support for the WordPress 'custom-header' theme feature and registers custom headers.
 *
 * @since  1.0.0
 * @access public
 * @return void
 */
function stargazer_custom_header_setup()
{
    // Adds support for WordPress' "custom-header" feature.
    add_theme_support('custom-header', array('default-image' => '%s/images/headers/orange-burn.jpg', 'random-default' => false, 'width' => 1175, 'height' => 400, 'flex-width' => true, 'flex-height' => true, 'default-text-color' => '252525', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => 'stargazer_custom_header_wp_head'));
    // Registers default headers for the theme.
    register_default_headers(array('horizon' => array('url' => '%s/images/headers/horizon.jpg', 'thumbnail_url' => '%s/images/headers/horizon-thumb.jpg', 'description' => __('Horizon', 'stargazer')), 'orange-burn' => array('url' => '%s/images/headers/orange-burn.jpg', 'thumbnail_url' => '%s/images/headers/orange-burn-thumb.jpg', 'description' => __('Orange Burn', 'stargazer')), 'planets-blue' => array('url' => '%s/images/headers/planets-blue.jpg', 'thumbnail_url' => '%s/images/headers/planets-blue-thumb.jpg', 'description' => __('Blue Planets', 'stargazer')), 'planet-burst' => array('url' => '%s/images/headers/planet-burst.jpg', 'thumbnail_url' => '%s/images/headers/planet-burst-thumb.jpg', 'description' => __('Planet Burst', 'stargazer')), 'space-splatters' => array('url' => '%s/images/headers/space-splatters.jpg', 'thumbnail_url' => '%s/images/headers/space-splatters-thumb.jpg', 'description' => __('Space Splatters', 'stargazer'))));
}
 /**
  * Sets up theme defaults and registers support for various WordPress features.
  *
  * To override onemozilla_setup() in a child theme, add your own onemozilla_setup to your child theme's
  * functions.php file.
  *
  * @uses load_theme_textdomain() For translation/localization support.
  * @uses add_editor_style() To style the visual editor.
  * @uses add_theme_support() To add support for post thumbnails.
  * @uses register_nav_menus() To add support for navigation menus.
  * @uses add_custom_background() To add support for a custom background.
  * @uses add_custom_image_header() To add support for a custom header.
  * @uses register_default_headers() To register the default custom header images provided with the theme.
  * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
  *
  */
 function onemozilla_setup()
 {
     /* Make the theme available for translation.
      * Translations can be added to the /languages/ directory.
      */
     load_theme_textdomain('onemozilla', get_template_directory() . '/languages');
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     // Load up our theme options page and related code.
     require get_template_directory() . '/inc/theme-options.php';
     // This theme uses wp_nav_menu() in one location.
     register_nav_menu('primary', __('Primary Menu', 'onemozilla'));
     // This theme uses Featured Images (also known as post thumbnails)
     add_theme_support('post-thumbnails');
     // The height and width of your custom header.
     // Add a filter to onemozilla_header_image_width and onemozilla_header_image_height to change these values.
     define('HEADER_IMAGE_WIDTH', apply_filters('onemozilla_header_image_width', 340));
     define('HEADER_IMAGE_HEIGHT', apply_filters('onemozilla_header_image_height', 240));
     // Add a way for the custom header to be styled in the admin panel that controls
     // custom headers. See onemozilla_admin_header_style(), below.
     global $wp_version;
     if (version_compare($wp_version, '3.4', '>=')) {
         $defaults = array('wp-head-callback' => 'onemozilla_header_style', 'admin-head-callback' => 'onemozilla_admin_header_style', 'admin-preview-callback' => 'onemozilla_admin_header_image');
         add_theme_support('custom-header', $defaults);
     } else {
         add_custom_image_header('onemozilla_header_style', 'onemozilla_admin_header_style', 'onemozilla_admin_header_image');
     }
     // Disable the header text and color options
     define('NO_HEADER_TEXT', true);
     // ... and thus ends the changeable header business.
     // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
     register_default_headers(array('firefox' => array('url' => '%s/img/headers/firefox.png', 'thumbnail_url' => '%s/img/headers/firefox-thumbnail.png', 'description' => __('Firefox Logo', 'onemozilla'))));
     // We've moved the share_posts and hide_authors out of theme options but we'll bring over those settings (if they exist)
     $options = get_option('onemozilla_theme_options');
     // Stash the values in variables
     if (isset($options['color_scheme'])) {
         $color_scheme = $options['color_scheme'];
     }
     if (isset($options['share_posts'])) {
         $share_posts = $options['share_posts'];
     }
     if (isset($options['hide_author'])) {
         $hide_authors = $options['hide_author'];
     }
     if (isset($share_posts) && get_option('onemozilla_share_posts') == null) {
         update_option('onemozilla_share_posts', $share_posts);
     }
     if (isset($hide_authors) && get_option('onemozilla_hide_authors') == null) {
         update_option('onemozilla_hide_authors', $hide_authors);
     }
     // Remove the old values from theme_options, we're only keeping the color scheme (if set)
     if (isset($color_scheme)) {
         update_option('onemozilla_theme_options', array('color_scheme' => $color_scheme));
     } else {
         update_option('onemozilla_theme_options', array('color_scheme' => 'stone'));
     }
 }
Exemple #7
0
 function natural_lite_setup()
 {
     // Make theme available for translation.
     load_theme_textdomain('natural-lite');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     // Add title tag.
     add_theme_support('title-tag');
     // Enable support for Post Thumbnails.
     add_theme_support('post-thumbnails');
     add_image_size('natural-lite-featured-large', 2400, 1800, true);
     // Large Featured Image.
     add_image_size('natural-lite-featured-medium', 1800, 1200, true);
     // Medium Featured Image.
     add_image_size('natural-lite-featured-small', 640, 640);
     // Small Featured Image.
     // Create Menus.
     register_nav_menus(array('header-menu' => esc_html__('Header Menu', 'natural-lite'), 'social-menu' => esc_html__('Social Menu', 'natural-lite')));
     /*
      * Enable support for custom logo.
      */
     add_theme_support('custom-logo', array('height' => 180, 'width' => 400, 'flex-height' => true, 'flex-width' => true, 'header-text' => array('site-title')));
     // Custom Header.
     register_default_headers(array('default' => array('url' => get_template_directory_uri() . '/images/default-header.jpg', 'thumbnail_url' => get_template_directory_uri() . '/images/default-header.jpg', 'description' => esc_html__('Default Custom Header', 'natural-lite'))));
     $defaults = array('width' => 1600, 'height' => 480, 'default-image' => get_template_directory_uri() . '/images/default-header.jpg', 'flex-height' => true, 'flex-width' => true, 'default-text-color' => 'ffffff', 'header-text' => true, 'uploads' => true);
     add_theme_support('custom-header', $defaults);
     // Custom Background.
     $defaults = array('default-color' => '827768', 'default-image' => get_template_directory_uri() . '/images/default-pattern.png', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '');
     add_theme_support('custom-background', $defaults);
     // Switch default core markup for search form, comment form, and comments to output valid HTML5.
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
 }
Exemple #8
0
 function gk_setup()
 {
     //支持语言包
     load_theme_textdomain('gkwp', __PROOT__ . '/languages');
     $languages = gk_config('languages');
     foreach ($languages as $name => $path) {
         load_theme_textdomain($name, $path);
     }
     //设置主题支持
     $theme_supports = gk_config('theme_support');
     foreach ($theme_supports as $key => $support) {
         is_numeric($key) ? add_theme_support($support) : add_theme_support($key, $support);
     }
     register_nav_menus(gk_config('register_nav_menus'));
     //设置缩略图
     $thumbnails = gk_config('thumbnails');
     foreach ($thumbnails as $name => $setting) {
         set_post_thumbnail_size($setting[0], $setting[1], $setting[2]);
         add_image_size($name, $setting[0], $setting[1], $setting[2]);
     }
     //支持 register_default_headers
     $register_default_headers_config = gk_config('register_default_headers');
     if (!empty($register_default_headers_config)) {
         register_default_headers($register_default_headers_config);
     }
     require_once get_gk_file('lib/walker.php');
 }
Exemple #9
0
 /**
  * Sets up theme defaults and registers support for WordPress features. 
  */
 function yoko()
 {
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style();
     // This theme uses post thumbnails
     add_theme_support('post-thumbnails');
     // Add default posts and comments RSS feed links to head
     add_theme_support('automatic-feed-links');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Navigation', 'yoko')));
     // Add support for Post Formats
     add_theme_support('post-formats', array('aside', 'gallery', 'link', 'video', 'image', 'quote'));
     // This theme allows users to set a custom background
     add_custom_background();
     // Your changeable header business starts here
     define('HEADER_TEXTCOLOR', '');
     // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI.
     define('HEADER_IMAGE', '%s/images/headers/ginko.jpg');
     // The height and width of your custom header. You can hook into the theme's own filters to change these values.
     // Add a filter to yoko_header_image_width and yoko_header_image_height to change these values.
     define('HEADER_IMAGE_WIDTH', apply_filters('yoko_header_image_width', 1102));
     define('HEADER_IMAGE_HEIGHT', apply_filters('yoko_header_image_height', 350));
     // We'll be using post thumbnails for custom header images on posts and pages.
     // We want them to be 940 pixels wide by 350 pixels tall.
     // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
     set_post_thumbnail_size(HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);
     // Don't support text inside the header image.
     define('NO_HEADER_TEXT', true);
     // Add a way for the custom header to be styled in the admin panel that controls
     // custom headers. See yoko_admin_header_style(), below.
     add_custom_image_header('', 'yoko_admin_header_style');
     // ... and thus ends the changeable header business.
     // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
     register_default_headers(array('ginko' => array('url' => '%s/images/headers/ginko.jpg', 'thumbnail_url' => '%s/images/headers/ginko-thumbnail.jpg', 'description' => __('Ginko', 'yoko')), 'flowers' => array('url' => '%s/images/headers/flowers.jpg', 'thumbnail_url' => '%s/images/headers/flowers-thumbnail.jpg', 'description' => __('Flowers', 'yoko')), 'plant' => array('url' => '%s/images/headers/plant.jpg', 'thumbnail_url' => '%s/images/headers/plant-thumbnail.jpg', 'description' => __('Plant', 'yoko')), 'sailing' => array('url' => '%s/images/headers/sailing.jpg', 'thumbnail_url' => '%s/images/headers/sailing-thumbnail.jpg', 'description' => __('Sailing', 'yoko')), 'cape' => array('url' => '%s/images/headers/cape.jpg', 'thumbnail_url' => '%s/images/headers/cape-thumbnail.jpg', 'description' => __('Cape', 'yoko')), 'seagull' => array('url' => '%s/images/headers/seagull.jpg', 'thumbnail_url' => '%s/images/headers/seagull-thumbnail.jpg', 'description' => __('Seagull', 'yoko'))));
 }
/**
 * 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');
}
 function danhuaer_setup()
 {
     add_editor_style();
     add_theme_support('post-thumbnails');
     add_theme_support('automatic-feed-links');
     load_theme_textdomain('danhuaer', get_template_directory() . '/languages');
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     register_nav_menus(array('primary' => __('Primary Navigation', 'danhuaer')));
     add_custom_background();
     if (!defined('HEADER_TEXTCOLOR')) {
         define('HEADER_TEXTCOLOR', '');
     }
     // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI.
     if (!defined('HEADER_IMAGE')) {
         define('HEADER_IMAGE', '%s/i/headers/home-banner.jpg');
     }
     // The height and width of your custom header. You can hook into the theme's own filters to change these values.
     // Add a filter to danhuaer_header_image_width and danhuaer_header_image_height to change these values.
     define('HEADER_IMAGE_WIDTH', apply_filters('danhuaer_header_image_width', 1440));
     define('HEADER_IMAGE_HEIGHT', apply_filters('danhuaer_header_image_height', 198));
     // Don't support text inside the header image.
     if (!defined('NO_HEADER_TEXT')) {
         define('NO_HEADER_TEXT', true);
     }
     // Add a way for the custom header to be styled in the admin panel that controls
     // custom headers. See danhuaer_admin_header_style(), below.
     add_custom_image_header('', 'danhuaer_admin_header_style');
     // ... and thus ends the changeable header business.
     // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
     register_default_headers(array('berries' => array('url' => '%s/i/headers/neihan-banner.jpg', 'thumbnail_url' => '%s/i/headers/neihan-banner.jpg', 'description' => __('Berries', 'danhuaer')), 'path' => array('url' => '%s/i/headers/home-banner.jpg', 'thumbnail_url' => '%s/i/headers/home-banner.jpg', 'description' => __('Path', 'danhuaer'))));
 }
Exemple #12
0
 function setup()
 {
     register_default_headers(array('tree' => array('url' => '%s/images/headers/tree.jpg', 'thumbnail_url' => '%s/images/headers/tree-thumbnail.jpg', 'description' => __('Ancient Tree', 'fastfood')), 'vector' => array('url' => '%s/images/headers/vector.jpg', 'thumbnail_url' => '%s/images/headers/vector-thumbnail.jpg', 'description' => __('Vector Flowers', 'fastfood')), 'globe' => array('url' => '%s/images/headers/globe.jpg', 'thumbnail_url' => '%s/images/headers/globe-thumbnail.jpg', 'description' => __('Globe', 'fastfood')), 'bamboo' => array('url' => '%s/images/headers/bamboo.jpg', 'thumbnail_url' => '%s/images/headers/bamboo-thumbnail.jpg', 'description' => __('Bamboo Forest', 'fastfood')), 'stripes' => array('url' => '%s/images/headers/stripes.jpg', 'thumbnail_url' => '%s/images/headers/stripes-thumbnail.jpg', 'description' => __('Orange stripes', 'fastfood')), 'abstract' => array('url' => '%s/images/headers/abstract.jpg', 'thumbnail_url' => '%s/images/headers/abstract-thumbnail.jpg', 'description' => __('Abstract', 'fastfood')), 'carps' => array('url' => '%s/images/headers/carps.jpg', 'thumbnail_url' => '%s/images/headers/carps-thumbnail.jpg', 'description' => __('Carps', 'fastfood'))));
     $args = array('width' => absint(FastfoodOptions::get_opt('fastfood_body_width')), 'height' => absint(FastfoodOptions::get_opt('fastfood_head_h')), 'default-image' => get_template_directory_uri() . '/images/headers/tree.jpg', 'header-text' => true, 'default-text-color' => '404040', 'wp-head-callback' => array($this, 'header_style_front'), 'flex-height' => false, 'flex-width' => false);
     $args = apply_filters('fastfood_filter_custom_header_args', $args);
     add_theme_support('custom-header', $args);
 }
function weaver2010_setup()
{
    /* Called after the theme stuff has been added.
       It adds additional default header images plus secondary menu and the top/bottom widget areas */
    $ttw_dir = get_template_directory_uri();
    register_default_headers(array('wheat' => array('url' => "{$ttw_dir}/images/headers/wheat.jpg", 'thumbnail_url' => "{$ttw_dir}/images/headers/wheat-thumbnail.jpg", 'description' => __('Wheat 940x198 Header', TTW_TRANS)), 'sopris' => array('url' => "{$ttw_dir}/images/headers/sopris.png", 'thumbnail_url' => "{$ttw_dir}/images/headers/sopris-thumbnail.png", 'description' => __('Sopris 940x198 Header', TTW_TRANS)), 'mum' => array('url' => "{$ttw_dir}/images/headers/mum.jpg", 'thumbnail_url' => "{$ttw_dir}/images/headers/mum-thumbnail.jpg", 'description' => __('Mum 940x198 Header', TTW_TRANS)), 'ivorydrive' => array('url' => "{$ttw_dir}/images/headers/ivorydrive.png", 'thumbnail_url' => "{$ttw_dir}/images/headers/ivorydrive-thumbnail.png", 'description' => __('Ivory Drive 940x198 Blank Header BG', TTW_TRANS)), 'indieave' => array('url' => "{$ttw_dir}/images/headers/indieave.png", 'thumbnail_url' => "{$ttw_dir}/images/headers/indieave-thumbnail.png", 'description' => __('Indie Ave 940x180 Blank Header BG', TTW_TRANS)), 'wpweaver' => array('url' => "{$ttw_dir}/images/headers/wpweaver.jpg", 'thumbnail_url' => "{$ttw_dir}/images/headers/wpweaver-thumbnail.jpg", 'description' => __('WPWeaver 940x140 Header', TTW_TRANS))));
    ## secondary menu
    register_nav_menus(array('secondary' => __('Secondary Navigation', TTW_TRANS)));
    ## top widget area
    register_sidebar(array('name' => __('Weaver Top Widget Area', TTW_TRANS), 'id' => 'top-widget-area', 'description' => __('The top widget area appears above the content area.', TTW_TRANS), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => "</li>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
    ## bottom widget area
    register_sidebar(array('name' => __('Weaver Bottom Widget Area', TTW_TRANS), 'id' => 'bottom-widget-area', 'description' => __('The bottom widget area appears below the content.', TTW_TRANS), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => "</li>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
    ## Special Post Pages Top Widget area
    register_sidebar(array('name' => __('Weaver Post Pages Widget Area', TTW_TRANS), 'id' => 'postpages-widget-area', 'description' => __('This widget area will appear at the top of special post pages (archives, attachment, author, category, single post) This is not used on the main blog page.', TTW_TRANS), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => "</li>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
    ## alternative widget area
    register_sidebar(array('name' => __('Weaver Alternative Widget Area', TTW_TRANS), 'id' => 'alternative-widget-area', 'description' => __('An alternative widget area used only by the Alternative Left and Right page templates.', TTW_TRANS), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
    ## bottom widget area
    register_sidebar(array('name' => __('Weaver Header Widget Area', TTW_TRANS), 'id' => 'header-widget-area', 'description' => __("The header widget area appears at the top of the page. It is intended\n\t\tfor more advanced web pages, and is designed primarily to use Text Widgets to show social feeds\n\t\tor other custom items. Styling is via '#ttw-head-widget', '#ttw-head-widget .textwidget',\n\t\tand inline span style rules. Unless you add widgets, it doesn't show.", TTW_TRANS), 'before_widget' => '', 'after_widget' => '', 'before_title' => '<em class="head-widget-title">', 'after_title' => '</em>'));
    ttw_initopts();
    /* load opts */
    do_action('ttwx_extended_setup');
    do_action('ttwx_themes_setup');
    // needs to before get subtheme because might change it
    $cur_theme = ttw_getopt('ttw_subtheme');
    if ($cur_theme == '' && TTW_START_THEME != TTW_DEFAULT_THEME) {
        require_once 'ttw-subthemes.php';
        // we only need to include this once on first install.
        st_set_subtheme(TTW_START_THEME);
    }
}
 /**
  * Initial setup
  *
  * This function is attached to the 'after_setup_theme' action hook.
  *
  * @uses	load_theme_textdomain()
  * @uses	get_locale()
  * @uses	BAVOTASAN_THEME_TEMPLATE
  * @uses	add_theme_support()
  * @uses	add_editor_style()
  * @uses	add_custom_background()
  * @uses	add_custom_image_header()
  * @uses	register_default_headers()
  *
  * @since 1.0.0
  */
 function bavotasan_setup()
 {
     load_theme_textdomain('arcade', BAVOTASAN_THEME_TEMPLATE . '/library/languages');
     // Add default posts and comments RSS feed links to <head>.
     add_theme_support('automatic-feed-links');
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style('library/css/admin/editor-style.css');
     // This theme uses wp_nav_menu() in two location.
     register_nav_menu('primary', __('Primary Menu', 'arcade'));
     // Add support for a variety of post formats
     add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside'));
     // This theme uses Featured Images (also known as post thumbnails) for archive pages
     add_theme_support('post-thumbnails');
     add_image_size('half', 570, 220, true);
     add_image_size('square100', 100, 100, true);
     // Add a filter to bavotasan_header_image_width and bavotasan_header_image_height to change the width and height of your custom header.
     add_theme_support('custom-header', array('header-text' => false, 'flex-height' => true, 'flex-width' => true, 'random-default' => true, 'width' => apply_filters('bavotasan_header_image_width', 1800), 'height' => apply_filters('bavotasan_header_image_height', 1200)));
     // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
     register_default_headers(array('header01' => array('url' => '%s/library/images/header01.jpg', 'thumbnail_url' => '%s/library/images/header01-thumbnail.jpg', 'description' => __('Default Header 1', 'arcade'))));
     // Add support for custom backgrounds
     add_theme_support('custom-background');
     // Add HTML5 elements
     add_theme_support('html5', array('comment-list', 'comment-form'));
     // Add title tag support
     add_theme_support('title-tag');
     // Remove default gallery styles
     add_filter('use_default_gallery_style', '__return_false');
     // Infinite scroll
     add_theme_support('infinite-scroll', array('type' => 'scroll', 'container' => 'primary', 'wrapper' => false, 'footer' => false));
     // Add Woocommerce support
     add_theme_support('woocommerce');
 }
Exemple #15
0
function thirtyten_setup(){

/* Add additional default headers  All Photos are by Aaron Hockley of Hockley Photography */
	$thirty_ten_dir =	get_bloginfo('stylesheet_directory');
	register_default_headers( array (
		'lights' => array (
			'url' => "$thirty_ten_dir/images/lights.jpg",
			'thumbnail_url' => "$thirty_ten_dir/images/lights-thumbnail.jpg",
			'description' => __( 'Lights by Aaron Hockley', 'thirtyten' )
		),
		'train' => array (
			'url' => "$thirty_ten_dir/images/train.jpg",
			'thumbnail_url' => "$thirty_ten_dir/images/train-thumbnail.jpg",
			'description' => __( 'Train by Aaron Hockley', 'thirtyten' )
		),
		'bridge' => array (
			'url' => "$thirty_ten_dir/images/bridge.jpg",
			'thumbnail_url' => "$thirty_ten_dir/images/bridge-thumbnail.jpg",
			'description' => __( 'Bridge by Aaron Hockley', 'thirtyten' )
		)

	));

	/* Remove the twenty ten keep reading link and add my own */
	remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );
	add_filter ('excerpt_more', 'thirtyten_excerpt_more' );

}
Exemple #16
0
/**
 * Custom Header feature
 * http://codex.wordpress.org/Custom_Headers
 *
 * @package sleeky
 */
function sleeky_custom_header_setup()
{
    add_theme_support('custom-header', apply_filters('sleeky_custom_header_args', array('default-image' => get_template_directory_uri() . '/img/banner.jpg', 'random-default' => false, 'flex-width' => true, 'width' => 2560, 'flex-height' => true, 'height' => 500, 'uploads' => true, 'header-text' => false, 'admin-preview-callback' => 'sleeky_admin_header_image')));
    /*
    *Register a selection of default headers to be displayed by the custom header admin UI.
    */
    register_default_headers(array('mypic' => array('url' => get_template_directory_uri() . '/img/banner.jpg', 'thumbnail_url' => get_template_directory_uri() . '/img/banner.jpg', 'description' => _x('Default header', 'Default header', 'sleeky'))));
}
function SLUG_custom_header_setup()
{
    define('HEADER_TEXTCOLOR', '000000');
    define('HEADER_IMAGE_WIDTH', 980);
    define('HEADER_IMAGE_HEIGHT', 176);
    add_theme_support('custom-header', array('wp-head-callback' => 'SLUG_custom_header', 'admin-head-callback' => 'SLUG_admin_custom_header'));
    register_default_headers(array('Mundo' => array('url' => '%s/img/headers/image001.jpg', 'thumbnail_url' => '%s/img/headers/image001-thumbnail.jpg'), 'Árvores' => array('url' => '%s/img/headers/image002.jpg', 'thumbnail_url' => '%s/img/headers/image002-thumbnail.jpg', 'description' => 'barco'), 'Caminho' => array('url' => '%s/img/headers/image003.jpg', 'thumbnail_url' => '%s/img/headers/image003-thumbnail.jpg')));
}
/**
 * Setup the WordPress core custom header feature.
 *
 * Use add_theme_support to register support for WordPress 3.4+
 * as well as provide backward compatibility for previous versions.
 * Use feature detection of wp_get_theme() which was introduced
 * in WordPress 3.4.
 *
 * @todo Rework this function to remove WordPress 3.4 support when WordPress 3.6 is released.
 *
 * @uses ecvetstep_header_style()
 * @uses ecvetstep_admin_header_style()
 * @uses ecvetstep_header_image()
 *
 * @package ECVET STEP Themes
 */
function ecvetstep_custom_header_setup()
{
    $args = array('default-text-color' => '000', 'default-image' => '', 'height' => 85, 'width' => 84, 'max-width' => 1280, 'flex-height' => true, 'flex-width' => true, 'random-default' => false, 'wp-head-callback' => 'ecvetstep_header_style', 'admin-head-callback' => 'ecvetstep_admin_header_style', 'admin-preview-callback' => 'ecvetstep_header_image');
    $args = apply_filters('ecvetstep_custom_header_args', $args);
    add_theme_support('custom-header', $args);
    // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
    register_default_headers(array('defaultlogo' => array('url' => '%s/images/logo.png', 'thumbnail_url' => '%s/images/logo.png', 'description' => __('Default Logo', 'ecvetstep')), 'ecvetsteplogo' => array('url' => '%s/images/ecvetstep.png', 'thumbnail_url' => '%s/images/ecvetstep.png', 'description' => __('ECVET STEP Logo', 'ecvetstep'))));
}
Exemple #19
0
 /**
  * Sets up theme defaults and registers support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which
  * runs before the init hook. The init hook is too late for some features, such
  * as indicating support for post thumbnails.
  */
 function parallax_one_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      * If you're building a theme based on parallax-one, use a find and replace
      * to change 'parallax-one' to the name of your theme in all the template files
      */
     load_theme_textdomain('parallax-one', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     /*
      * Let WordPress manage the document title.
      * By adding theme support, we declare that this theme does not use a
      * hard-coded <title> tag in the document head, and expect WordPress to
      * provide it for us.
      */
     add_theme_support('title-tag');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => esc_html__('Primary Menu', 'parallax-one'), 'parallax_footer_menu' => esc_html__('Footer Menu', 'parallax-one')));
     /* Switch default core markup for search form, comment form, and comments
      * to output valid HTML5.
      */
     add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
     /*
      * Enable support for Post Formats.
      * See http://codex.wordpress.org/Post_Formats
      */
     add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
     // Set up the WordPress core custom background feature.
     add_theme_support('custom-background', apply_filters('parallax_one_custom_background_args', array('default-repeat' => 'no-repeat', 'default-position-x' => 'center', 'default-attachment' => 'fixed')));
     /*
      * This feature enables Custom_Headers support for a theme as of Version 3.4.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Custom_Header
      */
     add_theme_support('custom-header', apply_filters('parallax_one_custom_header_args', array('default-image' => parallax_get_file('/images/background-images/background.jpg'), 'width' => 1000, 'height' => 680, 'flex-height' => true, 'flex-width' => true, 'header-text' => false)));
     register_default_headers(array('parallax_one_default_header_image' => array('url' => parallax_get_file('/images/background-images/background.jpg'), 'thumbnail_url' => parallax_get_file('/images/background-images/background_thumbnail.jpg'))));
     //Theme Support for WooCommerce
     add_theme_support('woocommerce');
     /*
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     /* Set the image size by cropping the image */
     add_image_size('parallax-one-post-thumbnail-big', 730, 340, true);
     add_image_size('parallax-one-post-thumbnail-mobile', 500, 233, true);
     // Latest news Section (homepage)
     add_image_size('parallax-one-post-thumbnail-latest-news', 150, 150, true);
     add_image_size('parallax_one_team', 268, 273, true);
     add_image_size('parallax_one_services', 60, 62, true);
     add_image_size('parallax_one_customers', 75, 75, true);
     if (!get_option('parallax_one_migrate_translation')) {
         add_option('parallax_one_migrate_translation', false);
     }
 }
/**
 * Set up the WordPress core custom header feature.
 *
 * @uses colinear_header_style()
 * @uses colinear_admin_header_style()
 * @uses colinear_admin_header_image()
 */
function colinear_custom_header_setup()
{
    /*
     * Default custom headers packaged with the theme.
     * %s is a placeholder for the theme template directory URI.
     */
    register_default_headers(array('header-image-1' => array('url' => '%s/images/header-image-1.jpg', 'thumbnail_url' => '%s/images/header-image-1-thumb.jpg'), 'header-image-2' => array('url' => '%s/images/header-image-2.jpg', 'thumbnail_url' => '%s/images/header-image-2-thumb.jpg'), 'header-image-3' => array('url' => '%s/images/header-image-3.jpg', 'thumbnail_url' => '%s/images/header-image-3.jpg')));
    add_theme_support('custom-header', apply_filters('colinear_custom_header_args', array('default-image' => '%s/images/header-image-1.jpg', 'default-text-color' => '000000', 'width' => 1188, 'height' => 240, 'flex-height' => true, 'wp-head-callback' => 'colinear_header_style')));
}
Exemple #21
0
/**
 * Setup the WordPress core custom header feature.
 *
 * @uses unconditional_header_style()
 * @uses unconditional_admin_header_style()
 * @uses unconditional_admin_header_image()
 *
 * @package unconditional
 */
function unconditional_custom_header_setup()
{
    add_theme_support('custom-header', apply_filters('unconditional_custom_header_args', array('default-image' => '%s/assets/images/header.jpg', 'default-text-color' => '#f33f3f', 'width' => 3200, 'height' => 520, 'flex-width' => true, 'flex-height' => true, 'wp-head-callback' => 'unconditional_header_style', 'admin-head-callback' => 'unconditional_admin_header_style', 'admin-preview-callback' => 'unconditional_admin_header_image')));
    /*
     * Default custom headers packaged with the theme.
     * %s is a placeholder for the theme template directory URI.
     */
    register_default_headers(array('header-image' => array('url' => '%s/assets/images/header.jpg', 'thumbnail_url' => '%s/assets/images/header-thumbnail.jpg', 'description' => __('Header Image', 'unconditional'))));
}
Exemple #22
0
 function xinmag_setup()
 {
     register_nav_menus(array('top-bar' => __('Top Menu', 'xinmag'), 'footer' => __('Footer Menu', 'xinmag')));
     // Custom Header
     $custom_header_support = array('default-image' => get_template_directory_uri() . '/images/logo.png', 'flex-width' => true, 'flex-height' => true, 'header-text' => true, 'default-text-color' => '000000', 'width' => apply_filters('xinwp_header_image_width', 300), 'height' => apply_filters('xinwp_header_image_height', 110), 'wp-head-callback' => 'xinwp_header_style_cb', 'admin-head-callback' => 'xinwp_admin_header_style_cb', 'admin-preview-callback' => 'xinwp_admin_header_image_cb');
     add_theme_support('custom-header', $custom_header_support);
     register_default_headers(array('header' => array('url' => '%s/images/logo.png', 'thumbnail_url' => '%s/images/logo.png', 'description' => __('Logo', 'xinwp'))));
     add_image_size('xinmag-section', 400, 250, true);
 }
Exemple #23
0
function xsbf_spot_after_setup_theme()
{
    // These args will override the ones in the parent theme
    $args = array('header-text' => false, 'default-text-color' => 'fff', 'default-image' => get_stylesheet_directory_uri() . '/images/headers/notepad-blue.jpg', 'width' => 1600, 'height' => 900);
    add_theme_support('custom-header', $args);
    //The %2$s references the child theme directory (ie the stylesheet directory), use
    // %s to reference the parent directory.
    register_default_headers(array('abstract' => array('url' => '%2$s/images/headers/abstract-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/abstract-blue-thumbnail.jpg', 'description' => __('Abstract', 'flat-bootstrap')), 'book' => array('url' => '%2$s/images/headers/book-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/book-blue-thumbnail.jpg', 'description' => __('Book', 'flat-bootstrap')), 'briefcase' => array('url' => '%2$s/images/headers/briefcase-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/briefcase-blue-thumbnail.jpg', 'description' => __('Briefcase', 'flat-bootstrap')), 'camera' => array('url' => '%2$s/images/headers/camera-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/camera-blue-thumbnail.jpg', 'description' => __('Camera', 'flat-bootstrap')), 'city' => array('url' => '%2$s/images/headers/city-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/city-blue-thumbnail.jpg', 'description' => __('City', 'flat-bootstrap')), 'desk' => array('url' => '%2$s/images/headers/desk-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/desk-blue-thumbnail.jpg', 'description' => __('Desk', 'flat-bootstrap')), 'guitar' => array('url' => '%2$s/images/headers/guitar-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/guitar-blue-thumbnail.jpg', 'description' => __('Guitar', 'flat-bootstrap')), 'notepad' => array('url' => '%2$s/images/headers/notepad-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/notepad-blue-thumbnail.jpg', 'description' => __('Guitar', 'flat-bootstrap')), 'skyline' => array('url' => '%2$s/images/headers/skyline-blue.jpg', 'thumbnail_url' => '%2$s/images/headers/skyline-blue-thumbnail.jpg', 'description' => __('Skyline', 'flat-bootstrap'))));
}
Exemple #24
0
 function uw_setup()
 {
     $defaultImage = reset($this->DEFAULT_HEADERS);
     add_theme_support('automatic-feed-links');
     add_theme_support('post-thumbnails');
     add_theme_support('post-formats', array('gallery'));
     add_theme_support('custom-header', array('default-image' => $defaultImage['url'], 'random-default' => false, 'header-text' => false, 'width' => 1600, 'height' => 343, 'header-text' => false, 'uploads' => true));
     register_default_headers($this->DEFAULT_HEADERS);
 }
function overridableSetup()
{
    register_nav_menus(array('featured' => __('Featured Navigation (optional)'), 'primary' => __('Navigation'), 'mobile' => __('Mobile Navigation (optional)')));
    // Add support for custom headers.
    $custom_header_support = array('width' => 775, 'height' => 85, 'header-text' => false, 'admin-head-callback' => 'wipCustomHeaderStyle', 'admin-preview-callback' => 'wipCustomHeaderDiv');
    add_theme_support('custom-header', $custom_header_support);
    // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
    register_default_headers(array('crimson' => array('url' => 'http://images.wsu.edu/sids/sid-zr.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zr.jpg', 'description' => __('Graphic Crimson', 'wsu')), 'darkgray' => array('url' => 'http://images.wsu.edu/sids/sid-zt.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zt.jpg', 'description' => __('Graphic Dark Gray', 'wsu')), 'gray' => array('url' => 'http://images.wsu.edu/sids/sid-zu.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zu.jpg', 'description' => __('Graphic Gray', 'wsu')), 'brown' => array('url' => 'http://images.wsu.edu/sids/sid-zv.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zv.jpg', 'description' => __('Graphic Brown', 'wsu')), 'blue' => array('url' => 'http://images.wsu.edu/sids/sid-zw.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zw.jpg', 'description' => __('Graphic Blue', 'wsu')), 'aqua' => array('url' => 'http://images.wsu.edu/sids/sid-zx.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zx.jpg', 'description' => __('Graphic Aqua', 'wsu')), 'green' => array('url' => 'http://images.wsu.edu/sids/sid-zy.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zy.jpg', 'description' => __('Graphic Green', 'wsu')), 'orange' => array('url' => 'http://images.wsu.edu/sids/sid-zz.jpg', 'thumbnail_url' => 'http://images.wsu.edu/sids-thumbs/sid-zz.jpg', 'description' => __('Graphic Orange', 'wsu'))));
}
Exemple #26
0
 function uw_setup()
 {
     $defaultImage = reset($this->DEFAULT_HEADERS);
     add_theme_support('automatic-feed-links');
     add_theme_support('post-thumbnails');
     add_theme_support('custom-header', array('default-image' => $defaultImage['url'], 'random-default' => false, 'header-text' => false, 'width' => 1280, 'height' => 193, 'header-text' => false));
     register_default_headers($this->DEFAULT_HEADERS);
     $this->register_navigation_menus();
 }
/**
 * Setup the WordPress core custom header feature.
 *
 * @uses radiate_header_style()
 * @uses radiate_admin_header_style()
 * @uses radiate_admin_header_image()
 *
 * @package radiate
 */
function radiate_custom_header_setup()
{
    add_theme_support('custom-header', apply_filters('radiate_custom_header_args', array('default-image' => '%s/images/header/header-image-one.jpg', 'default-text-color' => '444444', 'width' => 1500, 'height' => 500, 'flex-width' => true, 'flex-height' => true, 'wp-head-callback' => 'radiate_header_style', 'admin-head-callback' => 'radiate_admin_header_style', 'admin-preview-callback' => 'radiate_admin_header_image')));
    /*
     * Default custom headers packaged with the theme.
     * %s is a placeholder for the theme template directory URI.
     */
    register_default_headers(array('header-image-one' => array('url' => '%s/images/header/header-image-one.jpg', 'thumbnail_url' => '%s/images/header/header-image-one-thumbnail.jpg', 'description' => __('Header Image One', 'radiate'))));
}
 /**
  * Sets up theme defaults and registers support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which runs
  * before the init hook. The init hook is too late for some features, such as indicating
  * support post thumbnails.
  *
  * To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
  * functions.php file.
  *
  * @uses load_theme_textdomain() For translation/localization support.
  * @uses add_editor_style() To style the visual editor.
  * @uses add_theme_support() To add support for post thumbnails, automatic feed links, and Post Formats.
  * @uses register_nav_menus() To add support for navigation menus.
  * @uses add_custom_background() To add support for a custom background.
  * @uses add_custom_image_header() To add support for a custom header.
  * @uses register_default_headers() To register the default custom header images provided with the theme.
  * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
  *
  * @since Twenty Eleven 1.0
  */
 function twentyeleven_setup()
 {
     /* Make Twenty Eleven available for translation.
      * Translations can be added to the /languages/ directory.
      * If you're building a theme based on Twenty Eleven, use a find and replace
      * to change 'twentyeleven' to the name of your theme in all the template files.
      */
     load_theme_textdomain('twentyeleven', get_template_directory() . '/languages');
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     // This theme styles the visual editor with editor-style.css to match the theme style.
     add_editor_style();
     // Load up our theme options page and related code.
     require get_template_directory() . '/inc/theme-options.php';
     // Grab Twenty Eleven's Ephemera widget.
     require get_template_directory() . '/inc/widgets.php';
     // Add default posts and comments RSS feed links to <head>.
     add_theme_support('automatic-feed-links');
     // This theme uses wp_nav_menu() in one location.
     register_nav_menu('primary', __('Primary Menu', 'twentyeleven'));
     // Add support for a variety of post formats
     add_theme_support('post-formats', array('aside', 'link', 'gallery', 'status', 'quote', 'image'));
     // Add support for custom backgrounds
     add_custom_background();
     // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images
     add_theme_support('post-thumbnails');
     // The next four constants set how Twenty Eleven supports custom headers.
     // The default header text color
     define('HEADER_TEXTCOLOR', '000');
     // By leaving empty, we allow for random image rotation.
     define('HEADER_IMAGE', '');
     // The height and width of your custom header.
     // Add a filter to twentyeleven_header_image_width and twentyeleven_header_image_height to change these values.
     define('HEADER_IMAGE_WIDTH', apply_filters('twentyeleven_header_image_width', 1000));
     define('HEADER_IMAGE_HEIGHT', apply_filters('twentyeleven_header_image_height', 110));
     // We'll be using post thumbnails for custom header images on posts and pages.
     // We want them to be the size of the header image that we just defined
     // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
     set_post_thumbnail_size(HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);
     // Add Twenty Eleven's custom image sizes
     add_image_size('large-feature', HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);
     // Used for large feature (header) images
     add_image_size('small-feature', 500, 300);
     // Used for featured posts if a large-feature doesn't exist
     // Turn on random header image rotation by default.
     add_theme_support('custom-header', array('random-default' => true));
     // Add a way for the custom header to be styled in the admin panel that controls
     // custom headers. See twentyeleven_admin_header_style(), below.
     add_custom_image_header('twentyeleven_header_style', 'twentyeleven_admin_header_style', 'twentyeleven_admin_header_image');
     // ... and thus ends the changeable header business.
     // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
     register_default_headers(array('wheel' => array('url' => '%s/images/headers/wheel.jpg', 'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', 'description' => __('Wheel', 'twentyeleven')), 'shore' => array('url' => '%s/images/headers/shore.jpg', 'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', 'description' => __('Shore', 'twentyeleven')), 'trolley' => array('url' => '%s/images/headers/trolley.jpg', 'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg', 'description' => __('Trolley', 'twentyeleven')), 'pine-cone' => array('url' => '%s/images/headers/pine-cone.jpg', 'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg', 'description' => __('Pine Cone', 'twentyeleven')), 'chessboard' => array('url' => '%s/images/headers/chessboard.jpg', 'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg', 'description' => __('Chessboard', 'twentyeleven')), 'lanterns' => array('url' => '%s/images/headers/lanterns.jpg', 'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg', 'description' => __('Lanterns', 'twentyeleven')), 'willow' => array('url' => '%s/images/headers/willow.jpg', 'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg', 'description' => __('Willow', 'twentyeleven')), 'hanoi' => array('url' => '%s/images/headers/hanoi.jpg', 'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg', 'description' => __('Hanoi Plant', 'twentyeleven'))));
 }
Exemple #29
0
function shandora_custom_header_setup()
{
    $args = array('default-image' => '%s/assets/images/headers/silhouette1.png', 'height' => 120, 'width' => 1240, 'header-text' => false, 'wp-head-callback' => 'shandora_header_style', 'admin-head-callback' => 'shandora_admin_header_style', 'admin-preview-callback' => 'shandora_admin_header_image');
    add_theme_support('custom-header', $args);
    /*
     * Default custom headers packaged with the theme.
     * %s is a placeholder for the theme template directory URI.
     */
    register_default_headers(array('silhouette1' => array('url' => '%s/assets/images/headers/silhouette1.png', 'thumbnail_url' => '%s/assets/images/headers/thumb-silhouette1.png', 'description' => _x('Silhouette 1', 'header image description', 'bon'))));
}
Exemple #30
0
/**
 * Set up the WordPress core custom header arguments and settings.
 *
 * @uses add_theme_support() to register support for 3.4 and up.
 * @uses twentythirteen_header_style() to style front-end.
 * @uses twentythirteen_admin_header_style() to style wp-admin form.
 * @uses twentythirteen_admin_header_image() to add custom markup to wp-admin form.
 * @uses register_default_headers() to set up the bundled header images.
 *
 * @since Twenty Thirteen 1.0
 */
function twentythirteen_custom_header_setup()
{
    $args = array('default-text-color' => '220e10', 'default-image' => '', '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_theme_support('custom-header', $args);
    /*
     * Default custom headers packaged with the theme.
     * %s is a placeholder for the theme template directory URI.
     */
    register_default_headers(array('circle' => array('url' => '', 'thumbnail_url' => '', 'description' => _x('Circle', 'header image description', 'twentythirteen')), 'diamond' => array('url' => '%s/images/headers/diamond.png', 'thumbnail_url' => '%s/images/headers/diamond-thumbnail.png', 'description' => _x('Diamond', 'header image description', 'twentythirteen')), 'star' => array('url' => '%s/images/headers/star.png', 'thumbnail_url' => '%s/images/headers/star-thumbnail.png', 'description' => _x('Star', 'header image description', 'twentythirteen'))));
}