[wp-trac] [WordPress Trac] #27201: Any file called index.php is labeled as Main Index Template by theme editor, even if it is not the main index template.

WordPress Trac noreply at wordpress.org
Tue Feb 25 05:50:05 UTC 2014


#27201: Any file called index.php is labeled as Main Index Template by theme
editor, even if it is not the main index template.
--------------------------+------------------------------
 Reporter:  Shelob9       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  administration
--------------------------+------------------------------

Comment (by Shelob9):

 I have attached two patches for this issue. 27201.diff fixes the issue by
 labeling any file called index.php that is not the main index template
 with its path and file name. So, for example, 'inc/index.php' will be
 labeled as 'inc/index.php'. This is a nice easy solution, but not the
 greatest. There must be a better way to label these index files, I just
 don't know what.

 27201.2.diff does the same thing, and also adds braces to the two
 conditionals in the same section of the file, as is called for by
 WordPress coding standards. It seemed odd to have it right for one
 conditional, but wrong for the two right before it, but I was worried
 about the patch exceeding the scope of the issue, so I made two patches.

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


More information about the wp-trac mailing list