advantage_setup

The Advantage advantage setup function.

Description

advantage_setup(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function advantage_setup() { 
  2. global $content_width; 
  3. if ( ! isset( $content_width ) )  
  4. $content_width = 700; 
  5.  
  6. add_theme_support( 'post-thumbnails' ); 
  7. add_theme_support( 'automatic-feed-links' ); 
  8. add_theme_support( 'post-formats', array( 'aside', 'link', 'quote' ) ); 
  9.  
  10. load_theme_textdomain( 'advantage', get_template_directory() . '/languages' ); 
  11. add_editor_style(); 
  12. add_theme_support( 'custom-background', array( 
  13. 'default-color' => '', //Default background color 
  14. ) ); 
  15. $custom_header_support = array( 
  16. 'default-image' => get_template_directory_uri() . '/images/logo.png',  
  17. 'flex-width' => true,  
  18. 'flex-height' => true,  
  19. 'header-text' => true,  
  20. 'default-text-color' => '000000',  
  21. 'width' => apply_filters( 'advantage_header_image_width', 200 ),  
  22. 'height' => apply_filters( 'advantage_header_image_height', 60 ),  
  23. // Callback for styling the header. 
  24. 'wp-head-callback' => 'advantage_header_style',  
  25. // Callback for styling the header preview in the admin. 
  26. 'admin-head-callback' => 'advantage_admin_header_style',  
  27. // Callback used to display the header preview in the admin. 
  28. 'admin-preview-callback' => 'advantage_admin_header_image',  
  29. ); 
  30. add_theme_support( 'custom-header', $custom_header_support );  
  31. register_default_headers( array( 
  32. 'header' => array( 
  33. 'url' => '%s/images/logo.png',  
  34. 'thumbnail_url' => '%s/images/logo.png',  
  35. 'description' => __( 'Logo', 'advantage' ) 
  36. ),  
  37. ) ); 
  38.  
  39. remove_filter('term_description', 'wpautop'); 
  40.  
  41. register_nav_menus( array( 
  42. 'section-menu' => __( 'Section Menu', 'advantage' ),  
  43. 'footer' => __( 'Footer Menu', 'advantage' ),  
  44. ));