Plugin Directory

Changeset 3444831


Ignore:
Timestamp:
01/22/2026 12:38:02 PM (2 months ago)
Author:
whiteshadow
Message:

Minor: Add a utility method for checking if menu lookup is working.

This matters because methods like get_current_menu_item() will only return the expected result if the reverse item lookup has been populated, which only happens if there is a saved admin menu configuration.

File:
1 edited

Legend:

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

    r3432118 r3444831  
    42104210    }
    42114211
     4212    public function can_find_items_by_url() {
     4213        return !empty($this->reverse_item_lookup);
     4214    }
     4215
    42124216    public function castValuesToBool($capabilities) {
    42134217        if ( !is_array($capabilities) ) {
Note: See TracChangeset for help on using the changeset viewer.