[wp-trac] [WordPress Trac] #41564: Search for hyphenated post templates for post types with underscores

WordPress Trac noreply at wordpress.org
Fri Aug 4 17:16:31 UTC 2017


#41564: Search for hyphenated post templates for post types with underscores
-----------------------------+-----------------------------
 Reporter:  desrosj          |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  normal           |   Keywords:  dev-feedback
  Focuses:                   |
-----------------------------+-----------------------------
 Custom post type names adhere to the rules within sanitize_key()
 (lowercase alphanumeric characters, dashes, and underscores).

 This means registering a post type `some_post_type` is perfectly fine. The
 archive and single templates would be be `archive-some_post_type.php` and
 `single-some_post_type.php`.

 These file names do not adhere to the core standard for file names.

   Files should be named descriptively using lowercase letters. Hyphens
 should separate words.

 Searching for `archive-some-post-type.php` in addition to
 `archive_some_post_type.php` would allow this standard to be followed
 better.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41564>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list