From 0668c55384afcf192487aeb03e9bc7b56d047dc8 Mon Sep 17 00:00:00 2001 From: jaswsinc Date: Tue, 24 May 2016 04:35:58 -0800 Subject: [PATCH] `action_via` --- src/includes/functions/notices.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/includes/functions/notices.php b/src/includes/functions/notices.php index dabe154..c4a3497 100644 --- a/src/includes/functions/notices.php +++ b/src/includes/functions/notices.php @@ -152,7 +152,7 @@ function wp_php_rv_notice($brand_name = '') $markup .= '

'; $markup .= $icon.sprintf(__('%1$s is not active. It requires WP v%2$s (or higher).', 'wp-php-rv'), esc_html($brand_name), esc_html($wp_min_version)).'
'; $markup .= sprintf(__('You\'re currently running the older WP v%1$s, which is not supported by %2$s.', 'wp-php-rv'), esc_html($wp_version), esc_html($brand_name)).'
'; - $markup .= $arrow.' '.sprintf(__('An upgrade is necessary. Please click here to upgrade now.', 'wp-php-rv'), esc_url(network_admin_url('/update-core.php?action_via=wp-php-rv'))).'
'; + $markup .= $arrow.' '.sprintf(__('An upgrade is necessary. Please click here to upgrade now.', 'wp-php-rv'), esc_url(network_admin_url('/update-core.php'))).'
'; $markup .= sprintf(__('To remove this message, upgrade WordPress or deactivate %1$s.', 'wp-php-rv'), esc_html($brand_name)); $markup .= '

'; break; // All done here. @@ -189,9 +189,10 @@ function wp_php_rv_notice($brand_name = '') 'if (!current_user_can(\'activate_plugins\')) return;'. - 'if (in_array($pagenow, array(\'plugins.php\', \'themes.php\', \'update.php\', \'update-core.php\'), true)'. + 'if (in_array($pagenow, array(\'update-core.php\'), true)) return;'. + 'if (in_array($pagenow, array(\'plugins.php\', \'themes.php\', \'update.php\'), true)'. ' && !empty($_REQUEST[\'action_via\']) && $_REQUEST[\'action_via\'] === \'wp-php-rv\') return;'. - // Not during a plugin install/activate/update action. + // Not during a core update, and not during a plugin install/activate/update. 'if (!apply_filters(\'wp_php_rv_notice_display\', true, get_defined_vars())) return;'.