onetone_setup

The Onetone onetone setup function.

Description

onetone_setup(); 

Usage

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

Defined (1)

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

/includes/theme-setup.php  
  1. function onetone_setup() { 
  2.  
  3. global $content_width, $onetone_options, $onetone_default_options, $onetone_option_name; 
  4.  
  5. $lang = get_template_directory(). '/languages'; 
  6. load_theme_textdomain('onetone', $lang); 
  7. add_theme_support( 'post-thumbnails' );  
  8. $args = array(); 
  9. $header_args = array(  
  10. 'default-image' => '',  
  11. 'default-repeat' => 'repeat',  
  12. 'default-text-color' => '333333',  
  13. 'width' => 1120,  
  14. 'height' => 80,  
  15. 'flex-height' => true 
  16. ); 
  17. // Enable support for Post Formats. 
  18. add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio' ) ); 
  19.  
  20. add_theme_support( 'custom-background', $args ); 
  21. add_theme_support( 'custom-header', $header_args ); 
  22. add_theme_support( 'automatic-feed-links' ); 
  23. add_theme_support('nav_menus'); 
  24. add_theme_support( "title-tag" ); 
  25. add_theme_support( 'wc-product-gallery-zoom' ); 
  26. add_theme_support( 'wc-product-gallery-lightbox' ); 
  27. add_theme_support( 'wc-product-gallery-slider' ); 
  28.  
  29. register_nav_menus( array( 
  30. 'primary' => __( 'Primary Menu', 'onetone' ),  
  31. 'home_menu' => __( 'Home Page Header Menu', 'onetone' ),  
  32. 'top_bar_menu' => __( 'Top Bar Menu', 'onetone' ),  
  33. 'custom_menu_1' => __( 'Custom Menu 1', 'onetone' ),  
  34. 'custom_menu_2' => __( 'Custom Menu 2', 'onetone' ),  
  35. 'custom_menu_3' => __( 'Custom Menu 3', 'onetone' ),  
  36. 'custom_menu_4' => __( 'Custom Menu 4', 'onetone' ),  
  37. 'custom_menu_5' => __( 'Custom Menu 5', 'onetone' ),  
  38. 'custom_menu_6' => __( 'Custom Menu 6', 'onetone' ),  
  39.  
  40. )); 
  41.  
  42. /** 
  43. * Switch default core markup for search form, comment form, and comments 
  44. * to output valid HTML5. 
  45. */ 
  46. add_theme_support( 'html5', array( 
  47. 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',  
  48. ) ); 
  49.  
  50.  
  51. add_editor_style("editor-style.css"); 
  52. if ( ! isset( $content_width ) ) $content_width = 1120; 
  53.  
  54. // get options  
  55. $onetone_options = onetone_of_get_options(); 
  56.