checkPHP70Version($php_version); return $error; } function checkPHP70Version($php_version) { $error_string = null; if(version_compare($php_version, '7.0', '<') && !get_transient('dismissed-php-version-outdated-notice')) { $error_string = __('Your website is running on PHP %s. MailPoet will require version 7 by the end of the year. Please consider upgrading your site\'s PHP version. [link]Your host can help you.[/link]', 'mailpoet'); $error_string = sprintf($error_string, $php_version); $error = Helpers::replaceLinkTags($error_string, 'https://beta.docs.mailpoet.com/article/251-upgrading-the-websites-php-version', array('target' => '_blank')); $class = 'notice notice-error notice-php-warning mailpoet_notice_server is-dismissible'; return sprintf('

%2$s

', $class, $error); } } function ajaxDismissNoticeHandler() { set_transient('dismissed-php-version-outdated-notice', true, self::DISMISS_NOTICE_TIMEOUT_SECONDS); } }