Plugin Directory

Changeset 3453885


Ignore:
Timestamp:
02/04/2026 03:02:12 PM (2 months ago)
Author:
whiteshadow
Message:

Fix a PHP notice about enqueueing a style before registering the "menu-editor-base-style" dependency.

This "doing it wrong" warning appeared in WP 6.9.1:

Function WP_Styles::add was called incorrectly. The style with the handle "menu-editor-colours-classic" was enqueued with dependencies that are not registered: menu-editor-base-style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin-menu-editor/trunk/includes/menu-editor-core.php

    r3450654 r3453885  
    15741574        wp_enqueue_auto_versioned_style('jquery-qtip-syle', plugins_url('css/jquery.qtip.min.css', $this->plugin_file));
    15751575
     1576        //Register 'menu-editor-base-style', which is a dependency of all colour schemes.
     1577        //We need this call here and not just in enqueue_scripts() because "admin_print_styles-$page"
     1578        //runs before "admin_print_scripts-$page".
     1579        $this->register_base_dependencies();
     1580
    15761581        wp_register_auto_versioned_style(
    15771582            'menu-editor-colours-classic',
Note: See TracChangeset for help on using the changeset viewer.