updated plugin GP Premium version 1.12.2

This commit is contained in:
2020-10-20 15:16:06 +00:00
committed by Gitium
parent 7b5257d924
commit dcc1a6ca18
57 changed files with 1566 additions and 1660 deletions

View File

@ -118,6 +118,15 @@ class GeneratePress_Sites_Restore {
update_option( $key, $val );
}
// Re-add non-theme option related theme mods.
if ( isset( $backup_data['site_options']['nav_menu_locations'] ) ) {
set_theme_mod( 'nav_menu_locations', $backup_data['site_options']['nav_menu_locations'] );
}
if ( isset( $backup_data['site_options']['custom_logo'] ) ) {
set_theme_mod( 'custom_logo', $backup_data['site_options']['custom_logo'] );
}
}
wp_send_json( __( 'Theme options restored.', 'gp-premium' ) );
@ -148,7 +157,11 @@ class GeneratePress_Sites_Restore {
if ( 'nav_menu_locations' === $key || 'custom_logo' === $key ) {
set_theme_mod( $key, $val );
} else {
update_option( $key, $val );
if ( ! $val && ! is_numeric( $val ) ) {
delete_option( $key );
} else {
update_option( $key, $val );
}
}
}
}