Automator_Load::check_automator32_php8_compat_message()

check_automator32_php8_compat_message


Description Description

Callback function from check_automator32_php8_compat. Shows an admin notice.


Top ↑

Return Return

(void)


Source Source

File: src/class-automator-load.php

	public function check_automator32_php8_compat_message() {
		$class   = 'notice notice-error';
		$version = '3.2';
		// An old version of Uncanny Automator is running
		$url = admin_url( 'plugins.php#uncanny-automator-pro-update' );

		/* translators: 1. Trademarked term. 2. Trademarked term */
		$message        = sprintf( __( "%2\$s recipes have been disabled because your version of PHP (%3\$s) is not fully compatible with the version of %1\$s that's installed.", 'uncanny-automator' ), 'Uncanny Automator Pro', 'Uncanny Automator', PHP_VERSION );
		$message_update = sprintf( __( 'Please update %1$s to version %2$s or later.', 'uncanny-automator' ), 'Uncanny Automator Pro', $version );

		printf( '<div class="%1$s"><h3 style="font-weight: bold; color: red"><span class="dashicons dashicons-warning"></span>%2$s <a href="%3$s">' . esc_html( $message_update ) . '</a></h3></div>', esc_attr( $class ), esc_html( $message ), esc_url_raw( $url ) );
	}