From 4d3c3577b7be685fd9198dc1c375d767124f2fa6 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Thu, 24 Jan 2019 15:13:27 -0700
Subject: [PATCH] WSOD protection: paused_plugins_notice() should link to
network plugins when displayed on a network screen; move hook to the "Notices
Hooks" section in wp-admin/includes/ms-admin-filters.php.
---
src/wp-admin/includes/ms-admin-filters.php | 1 +
src/wp-admin/includes/plugin.php | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/wp-admin/includes/ms-admin-filters.php b/src/wp-admin/includes/ms-admin-filters.php
index dd4cf9e38b..b88054343a 100644
a
|
b
|
add_filter( 'import_allow_create_users', 'check_import_new_users' ); |
34 | 34 | // Notices Hooks |
35 | 35 | add_action( 'admin_notices', 'site_admin_notice' ); |
36 | 36 | add_action( 'network_admin_notices', 'site_admin_notice' ); |
| 37 | add_action( 'network_admin_notices', 'paused_plugins_notice', 5 ); |
37 | 38 | |
38 | 39 | // Update Hooks |
39 | 40 | add_action( 'network_admin_notices', 'update_nag', 3 ); |
diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
index 05e3861f17..f7fc5aa94e 100644
a
|
b
|
function paused_plugins_notice() { |
2267 | 2267 | __( 'You can find more details and make changes on the Plugins screen.' ), |
2268 | 2268 | sprintf( |
2269 | 2269 | '<a href="%s">%s</a>', |
2270 | | admin_url( 'plugins.php?plugin_status=paused' ), |
| 2270 | is_network_admin() ? |
| 2271 | network_admin_url( 'plugins.php?plugin_status=paused' ) : |
| 2272 | admin_url( 'plugins.php?plugin_status=paused' ), |
2271 | 2273 | 'Go to the Plugins screen' |
2272 | 2274 | ) |
2273 | 2275 | ); |