[wp-trac] [WordPress Trac] #7575: Theme Editor not displaying
custom template names
WordPress Trac
wp-trac at lists.automattic.com
Fri Aug 22 22:30:07 GMT 2008
#7575: Theme Editor not displaying custom template names
----------------------------+-----------------------------------------------
Reporter: Terragg | Owner: anonymous
Type: defect | Status: new
Priority: low | Milestone:
Component: Administration | Version: 2.6.1
Severity: minor | Keywords:
----------------------------+-----------------------------------------------
== Symptoms ==
Wordpress Dashboard -> Design -> Theme Editor -> Theme Files listing
Any non-standard Theme Files are listed as just the file name
"my_template.php (my_template.php)" instead of "My Template
(my_template.php)". This occurs despite the existence of the "/* Template
Name: My Template */" code block at the beginning of the file.
== Cause ==
The template name passed to get_file_description() in file.php from theme-
editor.php lines 128 and 139 is relative to the wordpress/wp-content/
directory rather than the absolute path of the installation.
get_file_description() uses the ABSPATH to attempt to read in the file.
The file can't be found and it returns the just the filename. theme-
editor.php does as expected and displays the returned value as the
template name.
== Solution ==
Replace instances of ABSPATH with WP_CONTENT_PATH in the
get_file_description() subroutine, as get_file_description() is only
referenced in theme-editor.php.
Suggested fix in file.php.diff (attached).
--
Ticket URL: <http://trac.wordpress.org/ticket/7575>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list