Exemplo n.º 1
0
function mb_artwork_theme_setup()
{
    add_theme_support('post-thumbnails', array('post', MBUDM_PT_ARTWORK));
    if (function_exists('register_sidebar')) {
        $sidebars = array('artwork-tabs' => __('Artwork Tabs', TEMPLATE_DOMAIN), 'artwork-footer' => __('Artwork Footer', TEMPLATE_DOMAIN));
        mbudm_register_sidebars($sidebars);
    }
}
Exemplo n.º 2
0
function mbudm_theme_setup()
{
    global $mbudm_image_sizes;
    // show admin bar only for admins
    if (!current_user_can('manage_options')) {
        add_filter('show_admin_bar', '__return_false');
    }
    $defaults = array('header-text' => true);
    add_theme_support('custom-header', $defaults);
    add_theme_support('post-thumbnails');
    /* Disable the Admin Bar. */
    //remove_action( 'init', 'wp_admin_bar_init' );
    //define( 'NO_HEADER_TEXT', true );
    load_theme_textdomain(TEMPLATE_DOMAIN);
    if (function_exists('register_sidebar')) {
        $sidebars = array('home-hero' => __('Home Hero', TEMPLATE_DOMAIN), 'home-secondary' => __('Home Secondary', TEMPLATE_DOMAIN), 'home-tertiary' => __('Home Tertiary', TEMPLATE_DOMAIN), 'index' => __('Index', TEMPLATE_DOMAIN), 'single-post' => __('Single Post', TEMPLATE_DOMAIN), 'page' => __('Page', TEMPLATE_DOMAIN), 'header-sbar' => __('Header', TEMPLATE_DOMAIN), 'footer-sbar' => __('Footer', TEMPLATE_DOMAIN));
        mbudm_register_sidebars($sidebars);
    }
    define('MBUDM_IMAGESIZE_PREFIX', 'image-');
    define('MBUDM_IMAGESIZE_BANNER', MBUDM_IMAGESIZE_PREFIX . '24-banner');
    define('MBUDM_IMAGESIZE_20', MBUDM_IMAGESIZE_PREFIX . '20');
    define('MBUDM_IMAGESIZE_18', MBUDM_IMAGESIZE_PREFIX . '18');
    define('MBUDM_IMAGESIZE_WIDE_18', MBUDM_IMAGESIZE_PREFIX . 'wide-18');
    define('MBUDM_IMAGESIZE_16', MBUDM_IMAGESIZE_PREFIX . '16');
    define('MBUDM_IMAGESIZE_12', MBUDM_IMAGESIZE_PREFIX . '12');
    define('MBUDM_IMAGESIZE_8', MBUDM_IMAGESIZE_PREFIX . '8');
    define('MBUDM_IMAGESIZE_6', MBUDM_IMAGESIZE_PREFIX . '6');
    define('MBUDM_IMAGESIZE_THUMB_6', MBUDM_IMAGESIZE_PREFIX . 'thumb-6');
    define('MBUDM_IMAGESIZE_WIDE_6', MBUDM_IMAGESIZE_PREFIX . 'wide-6');
    define('MBUDM_IMAGESIZE_5', MBUDM_IMAGESIZE_PREFIX . '5');
    define('MBUDM_IMAGESIZE_4', MBUDM_IMAGESIZE_PREFIX . '4');
    define('MBUDM_IMAGESIZE_3', MBUDM_IMAGESIZE_PREFIX . '3');
    define('MBUDM_IMAGESIZE_2', MBUDM_IMAGESIZE_PREFIX . '2');
    define('MBUDM_IMAGESIZE_1', MBUDM_IMAGESIZE_PREFIX . '1');
    mbudm_add_image_size('Full width banner (950 x 400)', MBUDM_IMAGESIZE_BANNER, 950, 400);
    //banner
    mbudm_add_image_size('5/6 (790 x 790)', MBUDM_IMAGESIZE_20, 790, 790);
    mbudm_add_image_size('3/4 (710 x 710)', MBUDM_IMAGESIZE_18, 710, 710);
    mbudm_add_image_size('3/4 WIDE (950 x 710)', MBUDM_IMAGESIZE_WIDE_18, 950, 710);
    //a bit taller than a banner
    mbudm_add_image_size('2/3 (630 x 630)', MBUDM_IMAGESIZE_16, 630, 630);
    mbudm_add_image_size('1/2 (470 x 470)', MBUDM_IMAGESIZE_12, 470, 470);
    mbudm_add_image_size('1/3 (310 x 310)', MBUDM_IMAGESIZE_8, 310, 310);
    mbudm_add_image_size('1/4 (230 x 230)', MBUDM_IMAGESIZE_6, 230, 230);
    mbudm_add_image_size('1/4 WIDE (950 x 230)', MBUDM_IMAGESIZE_WIDE_6, 950, 230);
    // for category/search result layout
    mbudm_add_image_size('1/4 Thumb (230 wide)', MBUDM_IMAGESIZE_THUMB_6, 230, 950);
    // for hp blog archive grid layout
    mbudm_add_image_size('1/5 (182 x 182)', MBUDM_IMAGESIZE_5, 182, 182);
    // not 5 cols but close
    mbudm_add_image_size('1/6 (150 x 150)', MBUDM_IMAGESIZE_4, 150, 150);
    mbudm_add_image_size('1/8 (110 x 110) - cropped', MBUDM_IMAGESIZE_3, 110, 110, true);
    // thumbnails
    mbudm_add_image_size('1/12 (70 x 70) - cropped', MBUDM_IMAGESIZE_2, 70, 70, true);
    // tiny thumbnails
    mbudm_add_image_size('1/24 (30 x 30) - cropped', MBUDM_IMAGESIZE_1, 30, 30, true);
    //only avatars really
    define('MBUDM_HERO_TILE', 'simple_tile');
    define('MBUDM_HERO_LARGE', 'simple_large');
    define('MBUDM_HERO_SINGLE', 'simple_single');
    define('MBUDM_HERO_SWIPER', 'swiper');
}