Make WordPress Core

Ticket #46060: 46060.2.diff

File 46060.2.diff, 1.7 KB (added by pbiron, 6 years ago)
  • src/wp-admin/includes/ms-admin-filters.php

    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' ); 
    3434// Notices Hooks
    3535add_action( 'admin_notices', 'site_admin_notice' );
    3636add_action( 'network_admin_notices', 'site_admin_notice' );
     37add_action( 'network_admin_notices', 'paused_plugins_notice', 5 );
    3738
    3839// Update Hooks
    3940add_action( 'network_admin_notices', 'update_nag', 3 );
  • src/wp-admin/includes/plugin.php

    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() { 
    22672267                __( 'You can find more details and make changes on the Plugins screen.' ),
    22682268                sprintf(
    22692269                        '<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' ),
    22712273                        'Go to the Plugins screen'
    22722274                )
    22732275        );