[wp-trac] [WordPress Trac] #32784: Admin_init removes theme editor - admin_menu does not.

WordPress Trac noreply at wordpress.org
Tue Sep 1 21:53:42 UTC 2015


#32784: Admin_init removes theme editor - admin_menu does not.
-------------------------------+------------------------------
 Reporter:  paaljoachim        |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Menus              |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  close 2nd-opinion  |     Focuses:  administration
-------------------------------+------------------------------
Changes (by jasonlcrane):

 * keywords:   => close 2nd-opinion


Comment:

 Take a look at the Notes section on the remove_submenu_page Codex page
 here:
 https://codex.wordpress.org/Function_Reference/remove_submenu_page#notes

 I can confirm that giving admin_menu a priority of 110 solves this issue.
 This may be beyond the scope of your tutorial, but I think it's also worth
 noting that removing the item from the menu doesn't prevent a user from
 accessing theme-editor.php directly. For that situation specifically, it
 may better to disable editing from the dashboard completely with
 {{{
 define('DISALLOW_FILE_EDIT', true);
 }}}
 in the wp-config file, as noted here:
 http://codex.wordpress.org/Hardening_WordPress#Disable_File_Editing

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32784#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list