Last active
January 27, 2021 04:25
-
-
Save KaineLabs/084784adb05a6f047677f9113764ffc5 to your computer and use it in GitHub Desktop.
Reset Widgets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Reset Widgets. | |
*/ | |
function yzc_reset_widgets() { | |
if ( ! get_option( 'youzify_reset_widgets100' ) ) { | |
// Delete OLD DATA. | |
delete_option( 'youzify_profile_main_widgets' ); | |
delete_option( 'youzify_profile_sidebar_widgets' ); | |
delete_option( 'youzify_profile_left_sidebar_widgets' ); | |
update_option( 'youzify_reset_widgets100', 1, 'no' ); | |
} | |
} | |
add_action( 'init', 'yzc_reset_widgets' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment