AP_Update_Helper::__construct( boolean $init = false )

Description #

Init class.

Parameters #

  • $init
    boolean (Optional) Should send initial response. Default value: false

Source #

File: admin/update.php

	public function __construct( $init = false ) {
		if ( ! get_option( 'ap_update_helper', false ) ) {
			return;
		}

		// Disable sending email while upgrading.
		define( 'AP_DISABLE_EMAIL', true );

		// Also disable inserting of reputations and notifications.
		define( 'AP_DISABLE_INSERT_NOTI', true );

		if ( $init ) {
			foreach ( $this->get_tasks() as $slug => $status ) {
				if ( ! $status ) {
					$this->send( true, $slug, '' );
				}
			}
		}

		$this->check_old_meta_table_exists();
		$this->check_tables();
		$this->migrate_post_data();
		$this->migrate_reputations();
		$this->migrate_category_data();
	}

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