[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
Thu Mar 13 16:57:54 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:  3.9
Component:  Themes        |     Version:  1.5
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  administration
--------------------------+-----------------------------
Changes (by aaroncampbell):

 * keywords:  has-patch => needs-patch


Comment:

 First, we prefer to use "[http://make.wordpress.org/core/handbook/coding-
 standards/php/#yoda-conditions yoda conditions]" so it should be `'themes'
 == basename( dirname( dirname( $file ) ) )`

 Having said that though, we can't actually compare to 'themes' because you
 can specify a custom themes directory using `register_theme_directory()`.
 Take a look at `get_theme_root()` and `get_raw_theme_root()` to see what
 I'm talking about.  They fall back to `WP_CONTENT_DIR/themes/` but they
 allow for something custom first.

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


More information about the wp-trac mailing list