twentythirteen_setup

Twenty Thirteen setup.

Description

twentythirteen_setup(); 

Sets up theme defaults and registers the various WordPress features that Twenty Thirteen supports.


Usage

  1. if ( !function_exists( 'twentythirteen_setup' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentythirteen_setup(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function twentythirteen_setup() { 
  2. /** 
  3. * Makes Twenty Thirteen available for translation. 
  4. * Translations can be added to the /languages/ directory. 
  5. * If you're building a theme based on Twenty Thirteen, use a find and 
  6. * replace to change 'twentythirteen' to the name of your theme in all 
  7. * template files. 
  8. */ 
  9. load_theme_textdomain( 'twentythirteen', get_template_directory() . '/languages' ); 
  10.  
  11. /** 
  12. * This theme styles the visual editor to resemble the theme style,  
  13. * specifically font, colors, icons, and column width. 
  14. */ 
  15. add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url() ) ); 
  16.  
  17. // Adds RSS feed links to <head> for posts and comments. 
  18. add_theme_support( 'automatic-feed-links' ); 
  19.  
  20. /** 
  21. * Switches default core markup for search form, comment form,  
  22. * and comments to output valid HTML5. 
  23. */ 
  24. add_theme_support( 'html5', array( 
  25. 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' 
  26. ) ); 
  27.  
  28. /** 
  29. * This theme supports all available post formats by default. 
  30. * See https://codex.wordpress.org/Post_Formats 
  31. */ 
  32. add_theme_support( 'post-formats', array( 
  33. 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' 
  34. ) ); 
  35.  
  36. // This theme uses wp_nav_menu() in one location. 
  37. register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) ); 
  38.  
  39. /** 
  40. * This theme uses a custom image size for featured images, displayed on 
  41. * "standard" posts and pages. 
  42. */ 
  43. add_theme_support( 'post-thumbnails' ); 
  44. set_post_thumbnail_size( 604, 270, true ); 
  45.  
  46. // This theme uses its own gallery styles. 
  47. add_filter( 'use_default_gallery_style', '__return_false' ); 
  48.  
  49. // Indicate widget sidebars can use selective refresh in the Customizer. 
  50. add_theme_support( 'customize-selective-refresh-widgets' );