Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@@ -11,17 +11,17 @@ class PHPVersionWarnings {
|
||||
const DISMISS_NOTICE_TIMEOUT_SECONDS = 2592000; // 30 days
|
||||
const OPTION_NAME = 'dismissed-php-version-outdated-notice';
|
||||
|
||||
function init($php_version, $should_display) {
|
||||
public function init($php_version, $should_display) {
|
||||
if ($should_display && $this->isOutdatedPHPVersion($php_version)) {
|
||||
return $this->display($php_version);
|
||||
}
|
||||
}
|
||||
|
||||
function isOutdatedPHPVersion($php_version) {
|
||||
public function isOutdatedPHPVersion($php_version) {
|
||||
return version_compare($php_version, '7.0', '<') && !get_transient(self::OPTION_NAME);
|
||||
}
|
||||
|
||||
function display($php_version) {
|
||||
public function display($php_version) {
|
||||
$error_string = __('Your website is running on PHP %s which MailPoet does not officially support. Read our [link]simple PHP upgrade guide[/link] or let MailPoet’s support team upgrade it for you.', 'mailpoet');
|
||||
$error_string = sprintf($error_string, $php_version);
|
||||
$get_in_touch_string = __('[link]Yes, I want MailPoet to help me upgrade for free[/link]', 'mailpoet');
|
||||
@@ -37,7 +37,7 @@ class PHPVersionWarnings {
|
||||
return Notice::displayWarning($error, $extra_classes, self::OPTION_NAME);
|
||||
}
|
||||
|
||||
function disable() {
|
||||
public function disable() {
|
||||
WPFunctions::get()->setTransient(self::OPTION_NAME, true, self::DISMISS_NOTICE_TIMEOUT_SECONDS);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user