Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Utils_Upgrades::upgrade_alert( array $alerts = array() )


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Parameters Parameters

$alerts

(Optional)

Default value: array()


Top ↑

Return Return

(array)


Top ↑

Source Source

File: classes/Utils/Upgrades.php

	public function upgrade_alert( $alerts = array() ) {
		if ( ! $this->has_uncomplete_upgrades() || ! current_user_can( 'manage_options' ) ) {
			return $alerts;
		}

		// Enqueue admin JS for the batch processor.
		wp_enqueue_script( 'pum-admin-batch' );
		wp_enqueue_style( 'pum-admin-batch' );

		ob_start();
		$this->render_upgrade_notice();
		$this->render_form();
		$html = ob_get_clean();

		$alerts[] = array(
			'code'        => 'upgrades_required',
			'type'        => 'warning',
			'html'        => $html,
			'priority'    => 1000,
			'dismissible' => false,
			'global'      => true,
		);

		return $alerts;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.