Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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