[wp-trac] Re: [WordPress Trac] #10011: Use of add_theme_page() causes Wordpress on IIS to crash.

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 5 08:05:27 GMT 2009


#10011: Use of add_theme_page() causes Wordpress on IIS to crash.
--------------------------+-------------------------------------------------
 Reporter:  bforchhammer  |        Type:  defect (bug)
   Status:  new           |    Priority:  normal      
Milestone:  2.8           |   Component:  Plugins     
  Version:  2.7.1         |    Severity:  major       
 Keywords:  needs-patch   |  
--------------------------+-------------------------------------------------

Comment(by bforchhammer):

 `add_submenu_page( $parent, $page_title, $menu_title, $access_level,
 $file, $function = '' )`

 If `$file` is set to `__FILE__` in a plugin then the `$file` parameter
 gets cleaned up, and the absolute path to the file converted to a relative
 one (relative to `WP_PLUGIN_DIR`).

 If the same thing is done in a theme's `functions.php` then the absolute
 path is ''not'' converted to a relative path!

 I think the example in Codex does not recommend the use of `__FILE__`
 anymore but there are probably still many themes out there using it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10011#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list