[wp-trac] Re: [WordPress Trac] #5379: Add admin_menu_permission hook to menu.php

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 22 16:04:22 GMT 2007


#5379: Add admin_menu_permission hook to menu.php
-------------------------+--------------------------------------------------
 Reporter:  donncha      |        Owner:  westi   
     Type:  enhancement  |       Status:  assigned
 Priority:  normal       |    Milestone:  2.3.2   
Component:  General      |      Version:  2.3.1   
 Severity:  normal       |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by westi):

  * owner:  anonymous => westi
  * status:  new => assigned

Comment:

 Looking at the mu code (http://trac.mu.wordpress.org/browser/trunk/wp-
 admin/menu.php) would we not do better with an action inside the failure
 case:

 e.g.

 {{{
 if (! user_can_access_admin_page()) {
     do_action('admin_page_access_denied');
     wp_die( __('You do not have sufficient permissions to access this
 page.') );
 }
 }}}

 mu can then hook on that and do the redirect if necessary before the
 wp_die

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5379#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list