user_email ) {
				$cloudflare_signup_email = $current_user->user_email;
			}
			if ( $current_user->user_login && 'admin' !== $current_user->user_login ) {
				$cloudflare_signup_user = $current_user->user_login;
			}
		}
		$extensions['cloudflare'] = array(
			'name'            => 'CloudFlare',
			'author'          => 'W3 EDGE',
			'description'     => wp_kses(
				sprintf(
					// translators:	1 opening HTML a tag to CloudFlare signup page with affiliate association, 2 closing HTML a tag,
					// translators: 3 opening HTML abbr tag, 4 closing HTML abbr tag,
					// translators: 5 opening HTML a tag to CloudFlare account page, 6 closing HTML a tag,
					// translators: 7 opening HTML a tag to CloudFlare help page, 8 closing HTML a tag.
					__(
						'CloudFlare protects and accelerates websites. %1$sSign up now for free%2$s to get started, or if you have an account simply log in to obtain your %3$sAPI%4$s token / global key from the %5$saccount page%6$s to enter it on the General Settings box that appears after plugin activation. Contact the CloudFlare %7$ssupport team%8$s with any questions.',
						'w3-total-cache'
					),
					'',
					'',
					'',
					'',
					'',
					'',
					'',
					''
				),
				array(
					'a'    => array(
						'href'   => array(),
						'target' => array(),
					),
					'abbr' => array(
						'title' => array(),
					),
				)
			),
			'author_uri'      => 'https://www.w3-edge.com/',
			'extension_uri'   => 'https://www.w3-edge.com/',
			'extension_id'    => 'cloudflare',
			'settings_exists' => true,
			'version'         => '0.3',
			'enabled'         => true,
			'requirements'    => implode( ', ', $message ),
			'path'            => 'w3-total-cache/Extension_CloudFlare_Plugin.php',
		);
		return $extensions;
	}
	function run() {
		$c             = Dispatcher::config();
		$this->api     = new Extension_CloudFlare_Api(
			array(
				'email'                 => $c->get_string( array( 'cloudflare', 'email' ) ),
				'key'                   => $c->get_string( array( 'cloudflare', 'key' ) ),
				'zone_id'               => $c->get_string( array( 'cloudflare', 'zone_id' ) ),
				'timelimit_api_request' => $c->get_integer( array( 'cloudflare', 'timelimit.api_request' ) ),
			)
		);
		$this->_config = $c;
		add_filter( 'w3tc_dashboard_actions', array( $this, 'w3tc_dashboard_actions' ) );
		$widget = new Extension_CloudFlare_Widget();
		$widget->init();
		// modify settings page.
		add_filter( 'w3tc_ui_config_item_cdnfsd.enabled', array( $this, 'w3tc_ui_config_item_cdnfsd_enabled' ) );
		add_filter( 'w3tc_ui_config_item_cdnfsd.engine', array( $this, 'w3tc_ui_config_item_cdnfsd_engine' ) );
		add_filter( 'w3tc_settings_general_anchors', array( $this, 'w3tc_settings_general_anchors' ) );
		add_action( 'w3tc_settings_general_boxarea_cloudflare', array( $this, 'w3tc_settings_general_boxarea_cloudflare' ) );
		add_action( 'wp_ajax_w3tc_cloudflare_api_request', array( $this, 'action_cloudflare_api_request' ) );
		// modify main menu.
		add_filter( 'w3tc_admin_bar_menu', array( $this, 'w3tc_admin_bar_menu' ) );
		// dashboard.
		add_action( 'admin_print_scripts-toplevel_page_w3tc_dashboard', array( $this, 'admin_print_scripts_w3tc_dashboard' ) );
		add_filter( 'w3tc_admin_actions', array( $this, 'w3tc_admin_actions' ) );
		// own settings page.
		add_action( 'w3tc_extension_page_cloudflare', array( '\W3TC\Extension_CloudFlare_Page', 'w3tc_extension_page_cloudflare' ) );
		add_action( 'w3tc_ajax', array( '\W3TC\Extension_CloudFlare_Popup', 'w3tc_ajax' ) );
		$cdnfsd_engine = $c->get_string( 'cdnfsd.engine' );
		if ( empty( $cdnfsd_engine ) || 'cloudflare' === $cdnfsd_engine ) {
			add_action( 'w3tc_settings_box_cdnfsd', array( '\W3TC\Extension_CloudFlare_Page', 'w3tc_settings_box_cdnfsd' ) );
		}
		// add notices about api health.
		if ( Util_Admin::is_w3tc_admin_page() ) {
			add_action( 'admin_notices', array( $this, 'admin_notices' ) );
			add_action( 'network_admin_notices', array( $this, 'admin_notices' ) );
		}
		$this->check_ip_versions();
	}
	/**
	 * Admin notices.
	 */
	public function admin_notices() {
		$plugins = get_plugins();
		if ( array_key_exists( 'cloudflare/cloudflare.php', $plugins ) && $this->_config->get_boolean( 'notes.cloudflare_plugin' ) ) {
			echo wp_kses(
				sprintf(
					// translators: 1 opening HTML div tag with class "error" followed by opening HTML p tag,
					// translators: 2 HTML button with lable "Hide this message" that will hide the error message,
					// translators: 3 closing HTML p tag followed by closing HTML div tag.
					__(
						'%1$sCloudFlare plugin detected. We recommend removing the plugin as it offers no additional capabilities when W3 Total Cache is installed. This message will disappear when CloudFlare is removed. %2$s%3$s',
						'w3-total-cache'
					),
					'
',
					Util_Ui::button_hide_note( 'Hide this message', 'cloudflare_plugin' ),
					'