eewee_setup

Eewee setup.

Description

eewee_setup(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function eewee_setup() { 
  2.  
  3. // GENERAL 
  4. // Make Eewee Boostrap Twitter available for translation. 
  5. // Translations can be added to the /languages/ directory. 
  6. load_theme_textdomain( 'eewee', get_template_directory() . '/languages' ); 
  7.  
  8. // This theme styles the visual editor with editor-style.css to match the theme style. 
  9. add_editor_style(); 
  10.  
  11. // add css 
  12. require_once( get_template_directory() . '/inc/addCss.php' ); 
  13.  
  14. // add js 
  15. require_once( get_template_directory() . '/inc/addJs.php' ); 
  16.  
  17. // CONTROLLERS 
  18. require_once( get_template_directory() . '/inc/controllers/ToolsController.php' ); 
  19. require_once( get_template_directory() . '/inc/controllers/ShortcodeController.php' ); 
  20. require_once( get_template_directory() . '/inc/controllers/GravatarController.php' ); 
  21. require_once( get_template_directory() . '/inc/controllers/ReseauxSociauxController.php' ); 
  22. require_once( get_template_directory() . '/inc/controllers/HomeController.php' ); 
  23. require_once( get_template_directory() . '/inc/controllers/LeftColumnController.php' ); 
  24. require_once( get_template_directory() . '/inc/controllers/FooterController.php' ); 
  25. //require_once( get_template_directory() . '/inc/controllers/WidgetEeweeAdsController.php' ); 
  26.  
  27. // MODELS 
  28. require_once( get_template_directory() . '/inc/models/TTaxonomy.php' ); 
  29. require_once( get_template_directory() . '/inc/models/TPage.php' ); 
  30. require_once( get_template_directory() . '/inc/models/TPost.php' ); 
  31.  
  32. // VIEWS 
  33. require_once( get_template_directory() . '/inc/views/helpers/EeweeBT_Tools.php' ); 
  34.  
  35. // MENU : wp_nav_menus() 
  36. register_nav_menus(  
  37. array( 
  38. 'top_menu' => __( 'Top Menu', 'eewee' ),  
  39. 'footer_menu' => __( 'Footer Menu', 'eewee' ) 
  40. ); 
  41.  
  42. // INIT  
  43. // shortcode 
  44. $initShortcode = new ShortcodeController(); 
  45. // footer 
  46. $initFooter = new FooterController(); 
  47.  
  48.  
  49.  
  50.  
  51.  
  52. // Add default posts and comments RSS feed links to <head>. 
  53. add_theme_support( 'automatic-feed-links' ); 
  54.  
  55. // Add support for a variety of post formats 
  56. add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); 
  57.  
  58. // Add support for custom backgrounds. 
  59. add_theme_support( 'custom-background', array( 
  60. 'default-color' => 'ffffff',  
  61. ) );  
  62.  
  63. // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images 
  64. add_theme_support( 'post-thumbnails' ); 
  65.  
  66. // Add support for custom headers. 
  67. $custom_header_support = array( 
  68. // The default header text color. 
  69. 'default-text-color' => '000',  
  70. // The height and width of our custom header. 
  71. 'width' => apply_filters( 'eewee_header_image_width', 1000 ),  
  72. 'height' => apply_filters( 'eewee_header_image_height', 288 ),  
  73. // Support flexible heights. 
  74. 'flex-height' => true,  
  75. // Random image rotation by default. 
  76. 'random-default' => true,  
  77. // Callback for styling the header. 
  78. 'wp-head-callback' => 'eewee_header_style',  
  79. // Callback for styling the header preview in the admin. 
  80. 'admin-head-callback' => 'teewee_admin_header_style',  
  81. // Callback used to display the header preview in the admin. 
  82. 'admin-preview-callback' => 'eewee_admin_header_image',  
  83. ); 
  84.  
  85. add_theme_support( 'custom-header', $custom_header_support ); 
  86.  
  87. // Config image 
  88. set_post_thumbnail_size( 150, 150, true ); // (width, height, true/false) 
  89. add_image_size( 'large-feature', 800, 600, true ); 
  90. add_image_size( 'medium-feature', 500, 300 ); 
  91. add_image_size( 'small-feature', 200, 200 );