Make WordPress Core

Changeset 61121


Ignore:
Timestamp:
11/04/2025 07:03:38 AM (6 weeks ago)
Author:
wildworks
Message:

Command Palette: Add network admin check

To prevent the registration of commands that would cause a 404 error in the network admin screen, pass the result of the is_network_admin() check to the command palette initialization function.

Follow-up to [61022].

Props jorbin, ntsekouras, soean, tobiasbg
Fixes #64125.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r61117 r61121  
    34313431    global $menu, $submenu;
    34323432
    3433     $command_palette_settings = array();
     3433    $command_palette_settings = array(
     3434        'is_network_admin' => is_network_admin(),
     3435    );
    34343436
    34353437    if ( $menu ) {
Note: See TracChangeset for help on using the changeset viewer.