Advertisement
Guest User

Untitled

a guest
Feb 21st, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.56 KB | None | 0 0
  1. if ( ! function_exists( 'untitled_setup' ) ) :
  2. /**
  3.  * Sets up theme defaults and registers support for various WordPress features.
  4.  *
  5.  * Note that this function is hooked into the after_setup_theme hook, which runs
  6.  * before the init hook. The init hook is too late for some features, such as indicating
  7.  * support post thumbnails.
  8.  *
  9.  * @since untitled 1.0
  10.  */
  11. function untitled_setup() {
  12.  
  13.     /**
  14.      * Make theme available for translation
  15.      * Translations can be filed in the /languages/ directory
  16.      * If you're building a theme based on untitled, use a find and replace
  17.      * to change 'untitled' to the name of your theme in all the template files
  18.      */
  19.     load_theme_textdomain( 'untitled', get_template_directory() . '/languages' );
  20.  
  21.     /**
  22.      * Add default posts and comments RSS feed links to head
  23.      */
  24.     add_theme_support( 'automatic-feed-links' );
  25.  
  26.     /**
  27.      * Enable support for Post Thumbnails
  28.      */
  29.     add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
  30.     set_post_thumbnail_size( 150, 150 );
  31.     add_image_size( 'slider-img', 1440, 400, true );
  32.     add_image_size( 'content-img', 300, 168, true );
  33.     add_image_size( 'thumbnail-img', 62, 62, true );
  34.     add_image_size( 'feat-img', 1000 );
  35.  
  36.     /**
  37.      * This theme uses wp_nav_menu() in one location.
  38.      */
  39.     register_nav_menus( array(
  40.         'primary' => __( 'Primary Menu', 'untitled' ),
  41.     ) );
  42.  
  43.     /**
  44.      * Enable support for Post Formats
  45.      */
  46.     add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
  47. }
  48. endif; // untitled_setup
  49. add_action( 'after_setup_theme', 'untitled_setup' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement