WPUM Data install fix
function wpumfix_tables() { | |
if ( isset( $_GET['wpumfixdata'] ) ) { | |
delete_option( 'wpum_setup_is_complete' ); | |
delete_option( 'wpum_version_upgraded_from' ); | |
delete_option('wpum_version_upgraded_from'); | |
wpum_install_default_field_group(); | |
wpum_install_fields(); | |
wpum_install_cover_image_field(); | |
wpum_setup_default_custom_search_fields(); | |
wpum_install_registration_form(); | |
update_option( 'wpum_setup_is_complete', true ); | |
$current_version = get_option( 'wpum_version' ); | |
if ( $current_version ) { | |
update_option( 'wpum_version_upgraded_from', $current_version ); | |
} | |
wp_die('done data.'); | |
} | |
} | |
add_action( 'admin_init', 'wpumfix_tables' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment