[wp-trac] [WordPress Trac] #18850: hidden admin page
WordPress Trac
wp-trac at lists.automattic.com
Mon May 7 16:38:58 UTC 2012
#18850: hidden admin page
-------------------------------+------------------------------
Reporter: ibotty | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: admin page hidden |
-------------------------------+------------------------------
Comment (by SidHarrell):
I made it more generic, so:
{{{
add_action('admin_menu', 'add_non_menu_pages');
function add_non_menu_pages() {
global $_registered_pages;
$pages = get_non_menu_pages();
foreach ($pages as $menu_slug => $callback) {
$hookname = get_plugin_page_hookname($menu_slug, '');
if (!empty($hookname)) {
add_action($hookname, $callback);
}
$_registered_pages[$hookname] = true;
}
}
function get_non_menu_pages() {
return array(
'pricing_editor' => 'render_edit_page'
);
}
function render_edit_page() {
echo "hello world!";
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18850#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list