#17677 closed defect (bug) (fixed)
Notice: Trying to get property of non-object in /wp-admin/includes/template.php on line 1856
| Reported by: | greuben | Owned by: | ryan |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | has-patch twenty-eleven |
| Cc: | Focuses: |
Description
Login as an author to reproduce
Attachments (1)
Change History (7)
#5
follow-up:
↓ 6
@
15 years ago
add_menu_page() and friends does not return false in this case. Can anyone think of a reason why?
#6
in reply to: ↑ 5
@
15 years ago
add_menu_page() and friends does not return false in this case. Can anyone think of a reason why?
Maybe because top level menus should always exist to show low cap level menus if any.
add_action( 'admin_menu', function(){
add_menu_page( 'test', 'test', 'manage_options', 'test', '__return_false' );
add_submenu_page( 'test', 'test-2', 'test-2', 'read', 'test2', '__return_false' );
} );
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In [18135]: