Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active January 27, 2021 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/084784adb05a6f047677f9113764ffc5 to your computer and use it in GitHub Desktop.
Save KaineLabs/084784adb05a6f047677f9113764ffc5 to your computer and use it in GitHub Desktop.
Reset Widgets
<?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