WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9426 closed defect (bug) (worksforme)

Submenu Output does not recorgnize Selection properly if the parameter does not end with .php

Reported by: hakre Owned by: ryan
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords:
Focuses: Cc:

Description

Adding a submenu (API: add_submenu_page() ) needs the $file parameter to be a string ending with '.php'. If not, highlighting the current submenu selection in the Backend will fail.

Additionally it came to my attention that the functions docblock is missing (wp-admin/includes/plugin.php ~648).

Because of this, it is unclear where the bug is located. In the API function (documentation) or in the output function for that menu (currently unknown where that is located for me).

Attachments (1)

9426-plugin.php (1.0 KB) - added by hakre 5 years ago.
plugin as test-case

Download all attachments as: .zip

Change History (6)

comment:1 Denis-de-Bernardy5 years ago

  • Keywords reporter-feedback added; dev-feedback-needed removed

can you confirm this in trunk? I haven't noticed this with any of my plugins that add submenus without a .php extension.

comment:2 ryan5 years ago

  • Component changed from General to Menus
  • Owner changed from anonymous to ryan

comment:3 Denis-de-Bernardy5 years ago

  • Keywords 2nd-opinion added

comment:4 hakre5 years ago

  • Keywords reporter-feedback 2nd-opinion removed
  • Milestone 2.8 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This is not any longer in trunk. worksforme now.. Testcase attached as a plugin so you can check on your own or for regressions.

hakre5 years ago

plugin as test-case

comment:5 hakre5 years ago

just an update of the testcase. better naming, better linking, whatever. might come in handy to test regressions.

Note: See TracTickets for help on using tickets.