Example #1
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'))));
 }
function indoor_setup()
{
    /*
     * Registers a new image size
     * 1. parameter  - name of the image size
     * 2. parameter - picture width
     * 3. parameter - picture height
     * 4. parameter - crop (true or false)
     * 
     * uncomment the line if you want to use it
     */
    add_image_size('slider', 920, 398, true);
    /*
     * activate the blank_meta function
     */
    //add_action('xtreme_meta', 'indoor_meta');
    // This theme allows users to set a custom background
    // ATTENTION: WordPress 3.4 deprecates some functions, thatswhy this test
    if (version_compare($GLOBALS['wp_version'], '3.4a', '>=')) {
        add_theme_support('custom-background', array());
    } else {
        add_custom_background();
    }
    /* change the size of the post thumnail in loop */
    add_filter('xtreme_loop_thumbnail_size', 'indoor_thumbnail_size');
}
Example #3
0
 function admired_setup()
 {
     // Available for translation.
     load_theme_textdomain('admired', get_template_directory() . '/languages');
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     add_editor_style();
     // Style the visual editor.
     add_theme_support('automatic-feed-links');
     register_nav_menus(array('primary' => __('Primary Navigation', 'admired'), 'secondary' => __('Secondary Navigation - Top', 'admired')));
     // Post formats
     add_theme_support('post-formats', array('aside', 'link', 'gallery', 'status', 'quote', 'image'));
     // Custom Backgrounds
     if (function_exists('get_custom_header')) {
         // WordPress 3.4+
         add_theme_support('custom-background');
     } else {
         // Backwards Compatibility
         add_custom_background();
     }
     add_theme_support('post-thumbnails');
 }
/**
 * Tell WordPress to run next_saturday_setup() when the 'after_setup_theme' hook is run.
 */
function next_saturday_setup() {

	// Add default posts and comments RSS feed links to head
	add_theme_support( 'automatic-feed-links' );

	// This theme supports post formats.
	add_theme_support( 'post-formats', array( 'aside', 'chat', 'audio', 'image', 'quote', 'gallery', 'video', 'link' ) );

	// Make theme available for translation
	// Translations can be filed in the /languages/ directory
	load_theme_textdomain( 'next-saturday', TEMPLATEPATH . '/languages' );

	// This theme uses wp_nav_menu() in one location.
	register_nav_menus( array(
		'primary' => __( 'Primary Menu', 'next-saturday' ),
	) );

	// This theme allows users to set a custom background.
	add_custom_background();

	// This theme allows users to upload a custom header.
	define( 'HEADER_TEXTCOLOR', 'f3d769' );
	define( 'HEADER_IMAGE', '' );
	define( 'HEADER_IMAGE_WIDTH', 615 ); // use width and height appropriate for your theme
	define( 'HEADER_IMAGE_HEIGHT', 85 );

	// Add a way for the custom header to be styled in the admin panel that controls
	// custom headers. See mystique_admin_header_style(), below.
	add_custom_image_header( 'next_saturday_header_style', 'next_saturday_admin_header_style' );

}
/**
 * Theme setup function.  This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 * @since 0.1.0
 */
function prototype_theme_setup()
{
    /* Get action/filter hook prefix. */
    $prefix = hybrid_get_prefix();
    /* Add theme support for core framework features. */
    add_theme_support('hybrid-core-menus', array('primary', 'secondary', 'subsidiary'));
    add_theme_support('hybrid-core-sidebars', array('primary', 'secondary', 'header', 'subsidiary', 'after-singular'));
    add_theme_support('hybrid-core-widgets');
    add_theme_support('hybrid-core-shortcodes');
    add_theme_support('hybrid-core-theme-settings', array('about', 'footer'));
    add_theme_support('hybrid-core-drop-downs');
    add_theme_support('hybrid-core-seo');
    add_theme_support('hybrid-core-template-hierarchy');
    /* Add theme support for framework extensions. */
    add_theme_support('theme-layouts', array('1c', '2c-l', '2c-r', '3c-l', '3c-r', '3c-c'));
    add_theme_support('post-stylesheets');
    add_theme_support('dev-stylesheet');
    add_theme_support('loop-pagination');
    add_theme_support('get-the-image');
    add_theme_support('breadcrumb-trail');
    add_theme_support('cleaner-gallery');
    /* Add theme support for WordPress features. */
    add_theme_support('automatic-feed-links');
    add_custom_background();
    /* Add the search form to the secondary menu. */
    add_action("{$prefix}_close_menu_secondary", 'get_search_form');
    /* Embed width/height defaults. */
    add_filter('embed_defaults', 'prototype_embed_defaults');
    /* Filter the sidebar widgets. */
    add_filter('sidebars_widgets', 'prototype_disable_sidebars');
    add_action('template_redirect', 'prototype_one_column');
    /* Set the content width. */
    hybrid_set_content_width(600);
}
Example #6
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 post thumbnails.
  *
  * @since Patchwork 1.0
  */
 function patchwork_setup()
 {
     /**
      * Custom template tags for this theme.
      */
     require get_template_directory() . '/inc/template-tags.php';
     /**
      * Custom functions that act independently of the theme templates
      */
     require get_template_directory() . '/inc/tweaks.php';
     /**
      * Custom Theme Options
      */
     require get_template_directory() . '/inc/theme-options/theme-options.php';
     /**
      * WordPress.com-specific functions and definitions
      */
     //require( get_template_directory() . '/inc/wpcom.php' );
     /* Jetpack Infinite Scroll */
     add_theme_support('infinite-scroll', array('container' => 'content', 'footer' => 'main', 'footer_widgets' => 'infinite_scroll_has_footer_widgets'));
     function infinite_scroll_has_footer_widgets()
     {
         if (jetpack_is_mobile('', true) && is_active_sidebar('sidebar-1')) {
             return true;
         }
         return false;
     }
     /**
      * Make theme available for translation
      * Translations can be filed in the /languages/ directory
      * If you're building a theme based on Patchwork, use a find and replace
      * to change 'patchwork' to the name of your theme in all the template files
      */
     load_theme_textdomain('patchwork', get_template_directory() . '/languages');
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     /**
      * 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 Menu', 'patchwork')));
     /**
      * Add support for custom backgrounds
      */
     $args = array('default-color' => 'ece8de', 'default-image' => get_template_directory_uri() . '/images/texture.png');
     $args = apply_filters('patchwork_custom_background_args', $args);
     if (function_exists('wp_get_theme')) {
         add_theme_support('custom-background', $args);
     } else {
         define('BACKGROUND_COLOR', $args['default-color']);
         define('BACKGROUND_IMAGE', $args['default-image']);
         add_custom_background();
     }
 }
Example #7
0
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * @since Quality Control 0.1
 * @global array $qc_options User-defined settings.
 */
function qc_setup()
{
    global $qc_options;
    $qc_options = new scbOptions('qc_options', false, array('assigned_perms' => 'protected', 'ticket_status_new' => false, 'ticket_status_closed' => false, 'repository' => array()));
    require dirname(__FILE__) . '/includes/classes/qc-taxonomy.php';
    require dirname(__FILE__) . '/includes/modules/states.php';
    require dirname(__FILE__) . '/includes/special-pages.php';
    require dirname(__FILE__) . '/includes/widgets.php';
    require dirname(__FILE__) . '/includes/template-tags.php';
    require dirname(__FILE__) . '/includes/tickets.php';
    require dirname(__FILE__) . '/includes/comments.php';
    require dirname(__FILE__) . '/includes/theme-header.php';
    require dirname(__FILE__) . '/includes/theme-footer.php';
    add_theme_support('ticket-priorities');
    add_theme_support('ticket-milestones');
    add_theme_support('ticket-tags');
    add_theme_support('ticket-categories');
    add_theme_support('ticket-attachments');
    add_theme_support('ticket-assignment');
    add_theme_support('ticket-notifications');
    add_theme_support('changesets');
    add_theme_support('automatic-feed-links');
    add_custom_background();
    add_editor_style();
    register_sidebar(array('name' => __('Primary Widget Area', APP_TD), 'id' => 'primary-widget-area', 'description' => __('The primary widget area', APP_TD), 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
    appthemes_load_textdomain();
    if (is_admin()) {
        require dirname(__FILE__) . '/includes/admin/dashboard.php';
        require dirname(__FILE__) . '/includes/admin/options.php';
        require dirname(__FILE__) . '/includes/admin/admin.php';
    }
}
function minimalist_setup()
{
    /*
     * Registers a new image size
     * 1. parameter  - name of the image size
     * 2. parameter - picture width
     * 3. parameter - picture height
     * 4. parameter - crop (true or false)
     *
     * the image size for index, archive etc.
     */
    add_image_size('featured', 284, 84, true);
    // the image size for the sliders
    add_image_size('slider', 928, 250, true);
    //add meta data - see function minimalist_meta below
    //add_action('xtreme_meta', 'minimalist_meta');
    //remove authorbox on single view
    //remove_action('xtreme_after_single_post', 'xtreme_author_box', 2);
    // This theme allows users to set a custom background
    // ATTENTION: WordPress 3.4 deprecates some functions, thatswhy this test
    global $wp_version;
    if (version_compare($wp_version, '3.4a', '>=')) {
        add_theme_support('custom-background', array());
    } else {
        add_custom_background();
    }
}
Example #9
0
function grisaille_setup_theme()
{
    add_theme_support('automatic-feed-links');
    /**
     * Add Menu Support
     **/
    register_nav_menu('main', 'Primary Navigation');
    /**
     * Add editor style - recommended according to Theme-Check
     **/
    add_editor_style();
    // Custom backgrounds support
    $args = array('default-color' => 'efedee', 'default-image' => get_template_directory_uri() . '/images/background.jpg');
    $args = apply_filters('grisaille_custom_background_args', $args);
    if (function_exists('wp_get_theme')) {
        add_theme_support('custom-background', $args);
    } else {
        define('BACKGROUND_COLOR', $args['default-color']);
        define('BACKGROUND_IMAGE', $args['default-image']);
        add_custom_background();
    }
    /**
     * Thumbnail support
     **/
    add_theme_support('post-thumbnails');
    set_post_thumbnail_size(590, 275, true);
    // 590 pixels wide by 275 pixels tall, hard crop mode
    add_image_size('following-post-thumbnails', 250, 200, true);
    // 250 pixels wide by 200 pixels tall, hard crop mode
}
 function flexishop_setup()
 {
     // 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');
     // Make theme available for translation
     // Translations can be filed in the /languages/ directory
     load_theme_textdomain('flexishop', TEMPLATEPATH . '/languages');
     $locale = get_locale();
     $locale_file = TEMPLATEPATH . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Navigation', 'flexishop')));
     // This theme allows users to set a custom background
     add_custom_background();
     define('HEADER_TEXTCOLOR', '');
     define('HEADER_IMAGE_WIDTH', apply_filters('flexishop_header_image_width', 75));
     define('HEADER_IMAGE_HEIGHT', apply_filters('flexishop_header_image_height', 75));
     // 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_image_size('promotion', 980, 375, true);
     // Feature size
     add_image_size('blog', 690, 282, true);
     // Feature Blog Size
     // Don't support text inside the header image.
     define('NO_HEADER_TEXT', true);
 }
 /**
  * Sets up theme defaults and registers support for various WordPress features.
  */
 function minileven_setup()
 {
     global $wp_version;
     /**
      * Custom template tags for this theme.
      */
     require get_template_directory() . '/inc/template-tags.php';
     /**
      * Custom functions that act independently of the theme templates
      */
     require get_template_directory() . '/inc/tweaks.php';
     /* Make Minileven available for translation.
      * Translations can be added to the /languages/ directory.
      * If you're building a theme based on Minileven, use a find and replace
      * to change 'minileven' to the name of your theme in all the template files.
      */
     load_theme_textdomain('minileven', TEMPLATEPATH . '/languages');
     // 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', 'jetpack'));
     // Add support for a variety of post formats
     add_theme_support('post-formats', array('gallery'));
     // Add support for custom backgrounds
     if (version_compare($wp_version, '3.4', '>=')) {
         add_theme_support('custom-background');
     } else {
         add_custom_background();
     }
     // Add support for post thumbnails
     add_theme_support('post-thumbnails');
 }
function vintagefolio_setup()
{
    /*
     * Registers a new image size
     * 1. parameter  - name of the image size
     * 2. parameter - picture width
     * 3. parameter - picture height
     * 4. parameter - crop (true or false)
     *
     * uncomment the line if you want to use it
     */
    add_image_size('slider', 910, 300, true);
    add_image_size('featured', 587, 140, true);
    add_image_size('sidebar', 263, 80, true);
    /*
     * activate the vintagefolio_meta function
     */
    //add_action('xtreme_meta', 'vintagefolio_meta');
    // This theme allows users to set a custom background
    // ATTENTION: WordPress 3.4 deprecates some functions, thatswhy this test
    global $wp_version;
    if (version_compare($wp_version, '3.4a', '>=')) {
        add_theme_support('custom-background', array());
    } else {
        add_custom_background();
    }
    add_filter('xtreme_loop_thumbnail_size', 'vintagefolio_index_image_size');
    add_filter('xtreme_loop_thumbnail_align', 'vintagefolio_index_image_align');
    /*
     *  activate post formats
     */
    //add_theme_support('post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image', 'video', 'audio', 'chat' ) );
}
/**
 * Add custom background (not mobi)
 * 
 * @author Tim Bednar 
 * @version v2.0
 * @since v2.0
*/
function ashford_background()
{
    // Background support
    if (function_exists('add_custom_background') && IS_MOBI == 'false') {
        add_custom_background();
    }
}
Example #14
0
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * @since Quality Control 0.1
 */
function quality_setup()
{
    global $quality_options;
    $quality_options = get_option('quality_options');
    // Add default posts and comments RSS feed links to head
    add_theme_support('automatic-feed-links');
    // Add support for custom backgrounds... Why not?
    add_custom_background();
    // Make the editor more "What you get"
    add_editor_style();
    // This theme uses wp_nav_menu() in one location.
    register_nav_menus(array('primary' => __('Primary Navigation', 'quality')));
    // Make theme available for translation
    load_theme_textdomain('quality', TEMPLATEPATH . '/languages');
    $locale = get_locale();
    $locale_file = TEMPLATEPATH . "/languages/{$locale}.php";
    if (is_readable($locale_file)) {
        require_once $locale_file;
    }
    if (!is_admin()) {
        wp_enqueue_script('jquery');
        wp_enqueue_script('custom', QC_JS_URL . '/jquery.custom.js');
    }
    // Require other files, to keep things organized.
    require_once QC_INC_PATH . '/options.php';
    require_once QC_INC_PATH . '/tickets.php';
    require_once QC_INC_PATH . '/updates.php';
    require_once QC_INC_PATH . '/widgets/category-taxonomy.php';
}
Example #15
0
function blank_setup()
{
    /*
     * Registers a new image size
     * 1. parameter  - name of the image size
     * 2. parameter - picture width
     * 3. parameter - picture height
     * 4. parameter - crop (true or false)
     * 
     * uncomment the line if you want to use it
     */
    //add_image_size('featured', 284, 84, true);
    //add_image_size('slider', 928, 280, true);
    /*
     * activate the blank_meta function
     */
    //add_action('xtreme_meta', 'blank_meta');
    // This theme allows users to set a custom background
    // ATTENTION: WordPress 3.4 deprecates some functions, thatswhy this test
    global $wp_version;
    if (version_compare($wp_version, '3.4a', '>=')) {
        add_theme_support('custom-background', array());
    } else {
        add_custom_background();
    }
    /*
     *  activate post formats
     */
    //add_theme_support('post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image', 'video', 'audio', 'chat' ) );
    // include custom widget - Xtreme_Example_Widget
    require_once 'widgets/xtreme-custom-widget-example.php';
}
Example #16
0
function bones_theme_support()
{
    add_theme_support('post-thumbnails');
    // wp thumbnails (sizes handled in functions.php)
    set_post_thumbnail_size(125, 125, true);
    // default thumb size
    add_custom_background();
    // wp custom background
    add_theme_support('automatic-feed-links');
    // rss thingy
    // to add header image support go here: http://themble.com/support/adding-header-background-image-support/
    // adding post format support
    /*add_theme_support( 'post-formats',      // post formats
    		array( 
    			'aside',   // title less blurb
    			'gallery', // gallery of images
    			'link',    // quick link to other site
    			'image',   // an image
    			'quote',   // a quick quote
    			'status',  // a Facebook like status update
    			'video',   // video 
    			'audio',   // audio
    			'chat'     // chat transcript 
    		)
    	);	*/
    add_theme_support('menus');
    // wp menus
    register_nav_menus(array('main_nav' => 'The Main Menu', 'footer_links' => 'Footer Links'));
}
function bouquet_setup() {

	// This theme has an options page that lets users pick layout, color scheme, featured post title text and configure a twitter icon
	//require_once( dirname( __FILE__ ) . '/inc/theme-options.php' );

	// Make theme available for translation
	load_theme_textdomain( 'bouquet', get_template_directory() . '/languages' );

	 // 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 Menu', 'bouquet' ),
	) );

	// This theme allows users to set a custom background.
	add_custom_background();

	// This theme allows users to upload a custom header.
	define( 'HEADER_TEXTCOLOR', bouquet_header_text_color() );
	define( 'HEADER_IMAGE', '' );
	define( 'HEADER_IMAGE_WIDTH', 1100 ); // use width and height appropriate for your theme
	define( 'HEADER_IMAGE_HEIGHT', 180 );

	// Add a way for the custom header to be styled in the admin panel that controls
	// custom headers. See bouquet_admin_header_style(), below.
	add_custom_image_header( 'bouquet_header_style', 'bouquet_admin_header_style' );

	// Add support for Post Formats
	add_theme_support( 'post-formats', array( 'aside', 'image', 'gallery' ) );
}
function pinktouch_setup()
{
    load_theme_textdomain('pinktouch', 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 uses wp_nav_menu() in one location.
    register_nav_menu('primary', __('Primary Menu', 'pinktouch'));
    // Add default posts and comments RSS feed links to head.
    add_theme_support('automatic-feed-links');
    // Enable Post Formats.
    add_theme_support('post-formats', array('aside', 'gallery', 'image', 'quote', 'link', 'chat', 'audio', 'video'));
    // Add support for custom backgrounds.
    add_custom_background();
    // The default header text color
    define('HEADER_TEXTCOLOR', '000000');
    define('HEADER_IMAGE', '');
    define('HEADER_IMAGE_WIDTH', 690);
    define('HEADER_IMAGE_HEIGHT', 185);
    /**
     * Add a way for the custom header to be styled in the admin panel that controls custom headers.
     * See pinktouch_admin_header_style(), below.
     */
    add_custom_image_header('pinktouch_header_style', 'pinktouch_admin_header_style');
}
Example #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 post thumbnails.
  *
  * To override foghorn_setup() in a child theme, add your own foghorn_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 and automatic feed links.
  * @uses register_nav_menus() To add support for navigation menus.
  * @uses add_custom_background() To add support for a custom background.
  * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
  *
  * @since Foghorn 0.1
  */
 function foghorn_setup()
 {
     /**
      * Set the content width based on the theme's design and stylesheet.
      */
     if (!isset($content_width)) {
         $content_width = 560;
     }
     // Make Foghorn translatable
     load_theme_textdomain('foghorn', TEMPLATEPATH . '/languages');
     $locale = get_locale();
     $locale_file = TEMPLATEPATH . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     // Styles the visual editor with editor-style.css to match the theme style
     add_editor_style();
     // 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', 'foghorn'));
     // Adds support for custom backgrounds
     add_custom_background();
     // Adds theme support for thumbnails
     add_theme_support('post-thumbnails');
     // Creates an image thumbnail size for multiple displays
     add_image_size('multiple-thumb', 325, 205, true);
     // Sets up the option panel functions
     require_once TEMPLATEPATH . '/extensions/options-functions.php';
 }
Example #20
0
 function cudazi_setup_theme()
 {
     // Add default posts and comments RSS feed links to head
     add_theme_support('automatic-feed-links');
     // Post Formats
     add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
     // Adding support for structured-post-formats
     // Disables the default filtering into the_content
     add_theme_support('structured-post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
     // Custom background WP function
     add_custom_background();
     // Make theme available for translation
     // Translations can be filed in the /languages/ directory
     load_theme_textdomain('cudazi', TEMPLATEPATH . '/languages');
     $locale = get_locale();
     $locale_file = TEMPLATEPATH . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Menu', 'cudazi')));
     // Content Width
     if (!isset($content_width)) {
         $content_width = 780;
     }
     // Editor CSS
     add_editor_style(array('css/base.css', 'css/skeleton.css', 'css/screen.css'));
 }
 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'))));
 }
function tuscany_setup()
{
    /*
     * Registers a new image size
     * 1. parameter  - name of the image size
     * 2. parameter - picture width
     * 3. parameter - picture height
     * 4. parameter - crop (true or false)
     * 
     * uncomment the line if you want to use it
     */
    add_image_size('92x92', 92, 92, true);
    add_image_size('slider', 936, 240, true);
    /*
     * activate the tuscany_meta function
     */
    //add_action('xtreme_meta', 'tuscany_meta');
    // This theme allows users to set a custom background
    // ATTENTION: WordPress 3.4 deprecates some functions, thatswhy this test
    global $wp_version;
    if (version_compare($wp_version, '3.4a', '>=')) {
        add_theme_support('custom-background', array());
    } else {
        add_custom_background();
    }
    /*
    *  activate post formats
    */
    add_theme_support('post-formats', array('aside', 'link', 'gallery', 'status', 'quote', 'image', 'video', 'audio', 'chat'));
}
Example #23
0
 /**
  * Setup theme.
  *
  * @return void
  **/
 function theme_setup()
 {
     load_theme_textdomain(THEME_TEXT_DOMAIN, get_template_directory() . '/languages');
     add_theme_support('post-thumbnails', array('directory_listing'));
     add_theme_support('automatic-feed-links', array('directory_listing'));
     register_nav_menus(array('top_menu' => __('Top Menu', 'directory_listing')));
     // This theme allows users to set a custom background
     add_custom_background();
 }
Example #24
0
function mad_theme_setup()
{
    add_theme_support('post-thumbnails');
    add_filter('the_content', 'addhighslideclass_replace');
    add_action('init', 'mad_register_menus');
    add_action('wp_head', 'catch_that_image');
    add_custom_background();
    mad_register_menus();
}
Example #25
0
 /**
  * Sets up theme defaults and registers support for various NXTClass and BuddyPress 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 bp_dtheme_setup() in a child theme, add your own bp_dtheme_setup to your child theme's
  * functions.php file.
  *
  * @global object $bp Global BuddyPress settings object
  * @since 1.5
  */
 function bp_dtheme_setup()
 {
     global $bp;
     // Load the AJAX functions for the theme
     require TEMPLATEPATH . '/_inc/ajax.php';
     // 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');
     // Add responsive layout support to bp-default without forcing child
     // themes to inherit it if they don't want to
     add_theme_support('bp-default-responsive');
     // This theme uses nxt_nav_menu() in one location.
     register_nav_menus(array('primary' => __('Primary Navigation', 'buddypress')));
     // This theme allows users to set a custom background
     add_custom_background('bp_dtheme_custom_background_style');
     // Add custom header support if allowed
     if (!defined('BP_DTHEME_DISABLE_CUSTOM_HEADER')) {
         define('HEADER_TEXTCOLOR', 'FFFFFF');
         // 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 bp_dtheme_header_image_width and bp_dtheme_header_image_height to change these values.
         define('HEADER_IMAGE_WIDTH', apply_filters('bp_dtheme_header_image_width', 1250));
         define('HEADER_IMAGE_HEIGHT', apply_filters('bp_dtheme_header_image_height', 133));
         // We'll be using post thumbnails for custom header images on posts and pages. We want them to be 1250 pixels wide by 133 pixels tall.
         // Larger images will be auto-cropped to fit, smaller ones will be ignored.
         set_post_thumbnail_size(HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true);
         // Add a way for the custom header to be styled in the admin panel that controls custom headers.
         add_custom_image_header('bp_dtheme_header_style', 'bp_dtheme_admin_header_style');
     }
     if (!is_admin()) {
         // Register buttons for the relevant component templates
         // Friends button
         if (bp_is_active('friends')) {
             add_action('bp_member_header_actions', 'bp_add_friend_button');
         }
         // Activity button
         if (bp_is_active('activity')) {
             add_action('bp_member_header_actions', 'bp_send_public_message_button');
         }
         // Messages button
         if (bp_is_active('messages')) {
             add_action('bp_member_header_actions', 'bp_send_private_message_button');
         }
         // Group buttons
         if (bp_is_active('groups')) {
             add_action('bp_group_header_actions', 'bp_group_join_button');
             add_action('bp_group_header_actions', 'bp_group_new_topic_button');
             add_action('bp_directory_groups_actions', 'bp_group_join_button');
         }
         // Blog button
         if (bp_is_active('blogs')) {
             add_action('bp_directory_blogs_actions', 'bp_blogs_visit_blog_button');
         }
     }
 }
Example #26
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 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'))));
 }
/**
 * Adds Custom Background support
 *
 * @author	Konstantin Obenland
 * @since	1.2.5 - 11.04.2012
 *
 * @return	void
 */
function the_bootstrap_custom_background_setup()
{
    $args = apply_filters('the_bootstrap_custom_background_args', array('default-color' => 'EFEFEF'));
    add_theme_support('custom-background', $args);
    if (!function_exists('wp_get_theme')) {
        // Compat: Versions of WordPress prior to 3.4.
        define('BACKGROUND_COLOR', $args['default-color']);
        add_custom_background();
    }
}
Example #28
0
/**
 * Theme setup function.  This function adds support for theme features and defines the default theme
 * actions and filters.
 *
 */
function ascetica_theme_setup()
{
    /* Get action/filter hook prefix. */
    $prefix = hybrid_get_prefix();
    /* Add theme support for core framework features. */
    add_theme_support('hybrid-core-menus', array('primary'));
    add_theme_support('hybrid-core-sidebars', array('primary', 'secondary', 'subsidiary', 'after-singular'));
    add_theme_support('hybrid-core-widgets');
    add_theme_support('hybrid-core-theme-settings', array('footer'));
    add_theme_support('hybrid-core-meta-box-footer');
    add_theme_support('hybrid-core-shortcodes');
    add_theme_support('hybrid-core-template-hierarchy');
    /* Add theme support for framework extensions. */
    add_theme_support('loop-pagination');
    add_theme_support('get-the-image');
    add_theme_support('cleaner-gallery');
    /* Add theme support for WordPress features. */
    add_theme_support('automatic-feed-links');
    /* Embed width/height defaults. */
    add_filter('embed_defaults', 'ascetica_embed_defaults');
    /* Filter the sidebar widgets. */
    add_filter('sidebars_widgets', 'ascetica_disable_sidebars');
    /* Image sizes */
    add_action('init', 'ascetica_image_sizes');
    /* Excerpt ending */
    add_filter('excerpt_more', 'ascetica_excerpt_more');
    /* Custom excerpt length */
    add_filter('excerpt_length', 'ascetica_excerpt_length');
    /* Filter the pagination trail arguments. */
    add_filter('loop_pagination_args', 'ascetica_pagination_args');
    /* Filter the comments arguments */
    add_filter("{$prefix}_list_comments_args", 'ascetica_comments_args');
    /* Filter the commentform arguments */
    add_filter('comment_form_defaults', 'ascetica_commentform_args', 11, 1);
    /* Enqueue scripts (and related stylesheets) */
    add_action('wp_enqueue_scripts', 'ascetica_scripts');
    /* Enqueue Google fonts */
    add_action('wp_enqueue_scripts', 'ascetica_google_fonts');
    /* Style settings */
    add_action('wp_head', 'ascetica_style_settings');
    /* Add support for custom backgrounds */
    add_custom_background();
    /* Add theme settings */
    if (is_admin()) {
        require_once trailingslashit(TEMPLATEPATH) . 'admin/functions-admin.php';
    }
    /* Default footer settings */
    add_filter("{$prefix}_default_theme_settings", 'ascetica_default_footer_settings');
    /* Widgets */
    add_action('widgets_init', 'ascetica_register_widgets');
    /* Undergister sidebar */
    add_action('widgets_init', 'ascetica_unregister_sidebar', 999);
    /* Add support for Post Formats */
    add_theme_support('post-formats', array('gallery'));
}
 /**
  * Set up theme specific settings
  *
  * @uses add_theme_support() To add support for post thumbnails and automatic feed links.
  * @uses register_nav_menus() To add support for navigation menus.
  * @uses add_editor_style() To style the visual editor.
  * @uses load_theme_textdomain() For translation/localization support.
  * @uses add_image_size() To set custom image sizes.
  *
  * @since Esplanade 1.0
  */
 function esplanade_theme_setup()
 {
     // Set default content width based on the theme's layout. This affects the width of post images and embedded media.
     global $content_width;
     if (!isset($content_width)) {
         $content_width = 700;
     }
     // Automatically add feed links to document head
     add_theme_support('automatic-feed-links');
     // Register Primary Navigation Menu
     register_nav_menus(array('primary_nav' => 'Primary Menu'));
     // Add support for Post Formats
     add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
     // Add support for post thumbnails and custom image sizes specific to theme locations
     add_theme_support('post-thumbnails', array('post'));
     add_image_size('slider-thumb', 640, 395, 1);
     add_image_size('blog-thumb', 268, 200, 1);
     add_image_size('teaser-thumb', 310, 190, 1);
     add_image_size('gallery-thumb', 100, 100, 1);
     add_image_size('video-thumb', 640, 395, 1);
     add_image_size('attachment-thumb', 700, 9999);
     // no crop flag, unlimited height
     if (esplanade_is_wp_version('3.4')) {
         // Allows users to set a custom background
         add_theme_support('custom-background');
         // Allows users to set a custom header image
         add_theme_support('custom-header', array('width' => 1082, 'height' => esplanade_get_option('header_image_height'), 'default-text-color' => '333', 'flex-height' => true, 'wp-head-callback' => 'esplanade_header_style', 'admin-head-callback' => 'esplanade_admin_header_style', 'admin-preview-callback' => 'esplanade_admin_header_image'));
     } else {
         // Allows users to set a custom background
         add_custom_background();
         // Allows users to set a custom header image
         if (!defined('HEADER_TEXTCOLOR')) {
             define('HEADER_TEXTCOLOR', '333');
         }
         // The height and width of your custom header.
         if (!defined('HEADER_IMAGE_WIDTH')) {
             define('HEADER_IMAGE_WIDTH', 1082);
         }
         if (!defined('HEADER_IMAGE_HEIGHT')) {
             define('HEADER_IMAGE_HEIGHT', esplanade_get_option('header_image_height'));
         }
         // Add a way for the custom header to be styled in the admin panel
         add_custom_image_header('esplanade_header_style', 'esplanade_admin_header_style', 'esplanade_admin_header_image');
     }
     // Styles the post editor
     add_editor_style();
     // Makes theme translation ready
     load_theme_textdomain('esplanade', get_template_directory() . '/languages');
     $locale = get_locale();
     $locale_file = get_template_directory() . "/languages/{$locale}.php";
     if (is_readable($locale_file)) {
         require_once $locale_file;
     }
 }
Example #30
0
 function priimo_setup()
 {
     /* Make Priimo available for translation.
      * Translations can be added to the /languages/ directory.
      * If you're building a theme based on Priimo, use a find and replace
      * to change 'priimo' to the name of your theme in all the template files.
      */
     load_theme_textdomain('priimo', get_template_directory() . '/languages');
     add_editor_style();
     add_theme_support('automatic-feed-links');
     add_theme_support('post-thumbnails');
     /**
      * This sets up the image size for the slideshow.
      * If you change the width/height of your content and the slider,
      * you will have to modify the width and height mentioned below as well
      * Default width for the slide is set as: WRAPPER_WIDTH - 90px
      * Default height for slide is set as SLIDER_HEIGHT - 80px
      */
     add_image_size('priimo-slide-image', 760, 300, true);
     /**
      * This sets up the image size for the thumbnail in the magazine style layout.
      * If you want to change the width/height of the thumbnail,
      * you will have to modify the width and height mentioned below
      */
     add_image_size('priimo-featured-image', 200, 200, true);
     /**
      * This sets up the image size for the thumbnail in the portfolio.
      * If you want to change the width/height of the thumbnail,
      * you will have to modify the width and height mentioned below
      */
     add_image_size('priimo-portfolio-image', 200, 160, true);
     register_nav_menu('primary', __('Primary Menu', 'priimo'));
     add_theme_support('post-formats', array('link', 'gallery', 'status', 'quote', 'image', 'video'));
     if (priimo_is_wp_version('3.4')) {
         add_theme_support('custom-background');
     } else {
         add_custom_background();
     }
     if (priimo_is_wp_version('3.4')) {
         $defaults = array('default_image' => '', 'random-default' => true, 'width' => PRIIMO_WRAPPER_WIDTH, 'height' => PRIIMO_HEADER_HEIGHT, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => 'ffffff', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => 'priimo_header_style', 'admin-head-callback' => 'priimo_admin_header_style');
         add_theme_support('custom-header', $defaults);
     } else {
         // default header title text color
         define('HEADER_TEXTCOLOR', 'ffffff');
         // default header image
         define('HEADER_IMAGE', '');
         //%s/images/headers/header1.jpg
         define('HEADER_IMAGE_WIDTH', PRIIMO_WRAPPER_WIDTH);
         define('HEADER_IMAGE_HEIGHT', PRIIMO_HEADER_HEIGHT);
         add_theme_support('custom-header', array('random-default' => true));
         add_custom_image_header('priimo_header_style', 'priimo_admin_header_style');
     }
 }