﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
10011	Use of add_theme_page() causes Wordpress on IIS to crash.	bforchhammer		"The P2 Theme uses the following line to add a theme settings page:
{{{
add_theme_page('Prologue Options', 'Prologue Options', 8, __FILE__, 'prologue_options_page');
}}}

On IIS this causes a 500 Error and the admin section can not be loaded anymore.

When we substitute `__FILE__` by a string, e.g. ""p2"" everything starts behaving again.

The following might be the cause of the problem:

`__FILE__` is passed through the function `plugin_basename()` in `add_submenu_page()`... usually that function strips out the path and returns only the plugin filename; for themes that does not work and the function returns the full path to the theme's `functions.php`.

I don't know why it only crashes on IIS but the value of `plugin_basename()` is used for a few things including for registering an action hook (which means that it's probably used as a key of an array at some point).

"	defect (bug)	closed	normal	2.9	Plugins	2.7.1	major	wontfix	needs-patch early close	westi
