[wp-trac] [WordPress Trac] #36972: Add version number for all single PHP files in bundled themes

WordPress Trac noreply at wordpress.org
Sat Jun 4 21:39:33 UTC 2016


#36972: Add version number for all single PHP files in bundled themes
---------------------------+------------------------------
 Reporter:  zodiac1978     |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by zodiac1978):

 As the title says, I suggest adding a version number in every PHP template
 file in a (default)theme which could be overridden by a child theme (so
 for for a `functions.php` this doesn't make any sense).

 As an example I took the doc block from `search.php` of Twenty Fifteen. My
 suggestion would be changing:
 {{{
 /**
  * The template for displaying search results pages.
  *
  * @package WordPress
  * @subpackage Twenty_Fifteen
  * @since Twenty Fifteen 1.0
  */
 }}}

 to this:

 {{{
 /**
  * The template for displaying search results pages.
  *
  * @package WordPress
  * @subpackage Twenty_Fifteen
  * @since Twenty Fifteen 1.0
  * @version 1.0.0
  */
 }}}

 If you copy the file to your child theme the version number can now be
 used to check if an update of the parent theme (in this case Twenty
 Fifteen) is relevant for your child theme and you maybe should add the
 changes manually to your child theme. This is the idea of the plugin and
 in the end my idea for core, but I thought this could be a first step.

 I know that this is not easy to add for an existing theme, so maybe we
 start using that in the next bundled theme?

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


More information about the wp-trac mailing list