PUM_Extension_Activator::missing_popmake_notice()

Display notice if Popup Maker isn’t installed


Description Description


Source Source

File: classes/Extension/Activator.php

	public function missing_popmake_notice() {
		switch ( $this->get_status() ) {
			case 'not_activated':
				$url  = esc_url( wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $this->core_path ), 'activate-plugin_' . $this->core_path ) );
				$link = '<a href="' . $url . '">' . __( 'activate it' ) . '</a>';
				echo '<div class="error"><p>' . sprintf( __( 'The plugin "%s" requires %s! Please %s to continue!' ), $this->extension_name, '<strong>' . __( 'Popup Maker' ) . '</strong>', $link ) . '</p></div>';

				break;
			case 'not_updated':
				$url  = esc_url( wp_nonce_url( admin_url( 'update.php?action=upgrade-plugin&plugin=' . $this->core_path ), 'upgrade-plugin_' . $this->core_path ) );
				$link = '<a href="' . $url . '">' . __( 'update it' ) . '</a>';
				echo '<div class="error"><p>' . sprintf( __( 'The plugin "%s" requires %s v%s or higher! Please %s to continue!' ), $this->extension_name, '<strong>' . __( 'Popup Maker' ) . '</strong>', '<strong>' . $this->required_core_version . '</strong>', $link ) . '</p></div>';

				break;
			case 'not_installed':
				$url  = esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=popup-maker' ), 'install-plugin_popup-maker' ) );
				$link = '<a href="' . $url . '">' . __( 'install it' ) . '</a>';
				echo '<div class="error"><p>' . sprintf( __( 'The plugin "%s" requires %s! Please %s to continue!' ), $this->extension_name, '<strong>' . __( 'Popup Maker' ) . '</strong>', $link ) . '</p></div>';

				break;
			case 'active':
			default:
				return;
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

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