update_pos_widget

The Responsive Minimal update pos widget function.

Description

update_pos_widget( $get_widgets ); 

Parameters (1)

0. $get_widgets
The get widgets.

Usage

  1. if ( !function_exists( 'update_pos_widget' ) ) { 
  2. require_once '/functions/layout_callback.php'; 
  3.  
  4. // The get widgets. 
  5. $get_widgets = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = update_pos_widget($get_widgets); 
  9.  

Defined (1)

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

/functions/layout_callback.php  
  1. function update_pos_widget($get_widgets) { 
  2. $counter=1; 
  3. $new_widget=array(); 
  4. foreach ($get_widgets as $sidebar=> $value) { 
  5. if (substr_count($sidebar, 'sidebar-')>0) { 
  6. $new_widget['sidebar-'.$counter]=$value; 
  7. $counter++; 
  8.  
  9. else{ 
  10. $new_widget[$sidebar]=$value;  
  11. return $new_widget;