onetone_widgets_init

The Onetone onetone widgets init function.

Description

onetone_widgets_init(); 

Usage

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

Defined (1)

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

/includes/theme-widget.php  
  1. function onetone_widgets_init() { 
  2.  
  3. global $sidebars ; 
  4. $sidebars = array( 
  5. '' => __( 'No Sidebar', 'onetone' ),  
  6. 'default_sidebar' => __( 'Default Sidebar', 'onetone' ),  
  7. 'sidebar-1' => __( 'Sidebar 1', 'onetone' ),  
  8. 'sidebar-2' => __( 'Sidebar 2', 'onetone' ),  
  9. 'sidebar-3' => __( 'Sidebar 3', 'onetone' ),  
  10. 'sidebar-4' => __( 'Sidebar 4', 'onetone' ),  
  11. 'sidebar-5' => __( 'Sidebar 5', 'onetone' ),  
  12. 'sidebar-5' => __( 'Sidebar 5', 'onetone' ),  
  13. 'sidebar-6' => __( 'Sidebar 6', 'onetone' ),  
  14. 'sidebar-7' => __( 'Sidebar 7', 'onetone' ),  
  15. 'sidebar-8' => __( 'Sidebar 8', 'onetone' ),  
  16. 'footer_widget_1' => __( 'Footer Area One', 'onetone' ),  
  17. 'footer_widget_2' => __( 'Footer Area Two', 'onetone' ),  
  18. 'footer_widget_3' => __( 'Footer Area Three', 'onetone' ),  
  19. 'footer_widget_4' => __( 'Footer Area Four', 'onetone' ),  
  20. ); 
  21.  
  22. foreach( $sidebars as $k => $v ) { 
  23. if( $k !='' ) { 
  24. register_sidebar(array( 
  25. 'name' => $v,  
  26. 'id' => $k,  
  27. 'before_widget' => '<div id="%1$s" class="widget widget-box %2$s">',  
  28. 'after_widget' => '<span class="seperator extralight-border"></span></div>',  
  29. 'before_title' => '<h2 class="widget-title">',  
  30. 'after_title' => '</h2>'  
  31. )); 
  32.  
  33.