Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function yit_setup_theme() {
- /**
- * Set up the content width value based on the theme's design.
- *
- * @see yit_content_width()
- *
- * @since Twenty Fourteen 1.0
- */
- if ( ! isset( $GLOBALS['content_width'] ) ) {
- $GLOBALS['content_width'] = apply_filters( 'yit-container-width-std', 1170 );
- }
- //This theme have a CSS file for the editor TinyMCE
- add_editor_style( 'css/editor-style.css' );
- //This theme support post thumbnails
- add_theme_support( 'post-thumbnails' );
- //This theme uses the menus
- add_theme_support( 'menus' );
- //Add default posts and comments RSS feed links to head
- add_theme_support( 'automatic-feed-links' );
- //This theme support post formats
- add_theme_support( 'post-formats', apply_filters( 'yit_post_formats_support', array( 'gallery', 'audio', 'video', 'quote' ) ) );
- if ( ! defined( 'HEADER_TEXTCOLOR' ) )
- define( 'HEADER_TEXTCOLOR', '' );
- // 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 twentyten_header_image_width and twentyten_header_image_height to change these values.
- define( 'HEADER_IMAGE_WIDTH', apply_filters( 'yiw_header_image_width', 1170 ) );
- define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'yiw_header_image_height', 410 ) );
- // Don't support text inside the header image.
- if ( ! defined( 'NO_HEADER_TEXT' ) )
- define( 'NO_HEADER_TEXT', true );
- //This theme support custom header
- add_theme_support( 'custom-header' );
- //This theme support custom backgrounds
- add_theme_support( 'custom-backgrounds' );
- /*
- * 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',
- ) );
- // We'll be using post thumbnails for custom header images on posts and pages.
- // We want them to be 940 pixels wide by 198 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 );
- $image_sizes = array(
- 'blog_small' => array( 283, 170, true ),
- 'blog_small_xl' => array( 406, 175, true ),
- 'blog_masonry' => array( 283, 0 ),
- 'blog_masonry_xl' => array( 420, 0 ),
- 'blog_big' => array( 1138, 547, true ),
- 'blog_big_xl' => array( 1776, 794, true ),
- 'blog_single_big' => array( 1138, 547, true ),
- 'blog_single_big_xl' => array( 1776, 794, true ),
- 'blog_section' => array( 116, 84, true ),
- 'blog_widget_compact' => array( 84, 84, true ),
- 'portfolio_small' => array( 263, 325, true ),
- 'portfolio_small_xl' => array( 504, 623, true ),
- 'portfolio_thumb' => array( 65, 65, true ),
- 'portfolio_single_big_featured' => array( 763, 532, true ),
- 'portfolio_single_big_featured_xl' => array( 1175, 819, true ),
- 'portfolio_single_big_lookbook' => array( 763, 0, false ),
- 'portfolio_single_big_lookbook_xl' => array( 1175, 0, false ),
- 'testimonial_thumb' => array( 58, 58, true ),
- 'thumb_team_big' => array( 360, 262, true ),
- 'thumb_team_big_xl' => array( 420, 423, true ),
- 'featured_product_widget' => array( 261, 324, true ),
- 'featured_product_widget_xl' => array( 420, 521, true ),
- );
- $image_sizes = apply_filters( 'yit_add_image_size', $image_sizes );
- foreach ( $image_sizes as $id_size => $size ) {
- add_image_size( $id_size, apply_filters( 'yit_' . $id_size . '_width', $size[0] ), apply_filters( 'yit_' . $id_size . '_height', $size[1] ), isset( $size[2] ) ? $size[2] : false );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement