AnsPress_Admin::update_db()

Description #

Updates AnsPress DB tables.

Source #

File: admin/anspress-admin.php

	public static function update_db() {
		if ( current_user_can( 'manage_options' ) ) {
			require_once ANSPRESS_DIR . '/activate.php';

			$activate = \AP_Activate::get_instance();
			$activate->insert_tables();
			update_option( 'anspress_db_version', AP_DB_VERSION );
		}

		wp_redirect( admin_url( 'admin.php?page=anspress_options' ) ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect

		exit;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment