Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#13923 closed defect (bug) (fixed)

menu_page_url returns url with questionmark instead of ampersand

Reported by: eskapism's profile eskapism Owned by: nacin's profile nacin
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Plugins Keywords:
Focuses: Cc:

Description

menu_page_url() returns url with questionmark instead of ampersand, making the url invalid, in this case wordpress error is "Invalid post type".

Example code:

add_pages_page("test", "test", "edit_pages", "cms-tpv-pages-page", "cms_tpv_pages_page" );

echo menu_page_url("cms-tpv-pages-page");

output: http://localhost/wordpress3/wp-admin/edit.php?post_type=page?page=cms-tpv-pages-page

excpected output:
http://localhost/wordpress3/wp-admin/edit.php?post_type=page&page=cms-tpv-pages-page

This seem to happen if menu_slug contains a questionmark, like the one for pages ("?post_type=page").

Attachments (2)

13923.patch (685 bytes) - added by ocean90 14 years ago.
An idea.
13923.unit-tests.diff (1.4 KB) - added by nacin 14 years ago.
Unit tests

Download all attachments as: .zip

Change History (8)

#1 @ocean90
14 years ago

  • Owner set to westi
  • Status changed from new to reviewing
  • Version set to 3.0

#2 @ocean90
14 years ago

Related #13829, Changeset [15203]

@ocean90
14 years ago

An idea.

#3 @nacin
14 years ago

  • Component changed from General to Plugins
  • Milestone changed from Unassigned to 3.0
  • Owner changed from westi to nacin
  • Status changed from reviewing to accepted

#4 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [15268]) Use add_query_arg() in menu_page_url(). fixes #13923.

@nacin
14 years ago

Unit tests

#5 @nacin
14 years ago

  • Keywords has-unit-tests added
Note: See TracTickets for help on using tickets.