the_app_setup

Sets up theme defaults and registers support for various WordPress features.

Description

the_app_setup(); 

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.


Usage

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

Defined (1)

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

/functions.php  
  1. function the_app_setup() { 
  2. if ( ! isset( $content_width ) ) 
  3. $content_width = 640; /** pixels */ 
  4.  
  5. load_theme_textdomain( 'the-app', get_template_directory() . '/languages' ); 
  6. add_theme_support( 'automatic-feed-links' ); 
  7. add_theme_support('woocommerce'); 
  8. add_theme_support( 'post-thumbnails' ); 
  9. add_theme_support( 'title-tag' ); 
  10. add_image_size('homepage-thumb', 240, 145, true); 
  11. register_nav_menus( array( 
  12. 'primary' => __( 'Primary Menu', '' ),  
  13. ) ); 
  14. add_theme_support( 'custom-background', array( 
  15. 'default-image' => get_template_directory_uri().'/images/body_bg.jpg',  
  16. 'default-repeat' => 'no-repeat',  
  17. 'default-position-x' => 'center',  
  18. 'default-attachment' => 'fixed',  
  19. ) ); 
  20. add_editor_style( 'editor-style.css' );