layers_backup_site

Port Widgets between Layers Parent theme and Child themes.

Description

layers_backup_site( $value ); 

Parameters (1)

0. $value
The value.

Usage

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

Defined (1)

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

/functions.php  
  1. function layers_backup_site( $value ) { 
  2. $theme = wp_get_theme(); 
  3.  
  4. $widget_data = $value[ 'data' ]; 
  5. if( isset( $widget_data[ 'wp_inactive_widgets' ] ) ) unset( $widget_data[ 'wp_inactive_widgets' ] ); 
  6.  
  7. update_option( 'layers_tm_backup', get_theme_mods() ); 
  8. update_option( 'layers_wgt_backup', $widget_data ); 
  9.