Bundled Themes: Update copyright year in readme.txt.

Add a unit test to ensure the year stays up to date.

Props dkarfa, SergeyBiryukov.
Merges [46719] and [46720] to the 5.3 branch.
Fixes #48566.

git-svn-id: https://develop.svn.wordpress.org/branches/5.3@46721 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-11-12 18:04:34 +00:00
parent 8d18730355
commit fa56af86d8
14 changed files with 166 additions and 139 deletions

View File

@ -22,7 +22,7 @@ For more information about Twenty Eleven please go to https://codex.wordpress.or
== Copyright == == Copyright ==
Twenty Eleven WordPress Theme, Copyright 2011-2018 WordPress.org & Automattic.com Twenty Eleven WordPress Theme, Copyright 2011-2019 WordPress.org & Automattic.com
Twenty Eleven is Distributed under the terms of the GNU GPL Twenty Eleven is Distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -30,7 +30,7 @@ For more information about Twenty Fifteen please go to https://wordpress.org/sup
== Copyright == == Copyright ==
Twenty Fifteen WordPress Theme, Copyright 2014-2018 WordPress.org & Automattic.com Twenty Fifteen WordPress Theme, Copyright 2014-2019 WordPress.org & Automattic.com
Twenty Fifteen is distributed under the terms of the GNU GPL Twenty Fifteen is distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -22,7 +22,7 @@ For more information about Twenty Fourteen please go to https://codex.wordpress.
== Copyright == == Copyright ==
Twenty Fourteen WordPress Theme, Copyright 2013-2018 WordPress.org & Automattic.com Twenty Fourteen WordPress Theme, Copyright 2013-2019 WordPress.org & Automattic.com
Twenty Fourteen is Distributed under the terms of the GNU GPL Twenty Fourteen is Distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -24,7 +24,7 @@ For more information about Twenty Nineteen please go to https://wordpress.org/su
== Copyright == == Copyright ==
Twenty Nineteen WordPress Theme, Copyright 2018 WordPress.org Twenty Nineteen WordPress Theme, Copyright 2018-2019 WordPress.org
Twenty Nineteen is distributed under the terms of the GNU GPL Twenty Nineteen is distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -66,4 +66,4 @@ Initial release
== Resources == == Resources ==
* normalize.css, © 2012-2018 Nicolas Gallagher and Jonathan Neal, MIT * normalize.css, © 2012-2018 Nicolas Gallagher and Jonathan Neal, MIT
* Underscores, © 2012-2018 Automattic, Inc., GNU GPL v2 or later * Underscores, © 2012-2019 Automattic, Inc., GNU GPL v2 or later

View File

@ -16,7 +16,7 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
This theme, like WordPress, is licensed under the GPL. This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others. Use it to make something cool, have fun, and share what you've learned with others.
Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2018 Automattic, Inc. Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2019 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later. Underscores is distributed under the terms of the GNU GPL v2 or later.
Normalizing styles have been helped along thanks to the fine work of Normalizing styles have been helped along thanks to the fine work of

View File

@ -15,7 +15,7 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
This theme, like WordPress, is licensed under the GPL. This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others. Use it to make something cool, have fun, and share what you've learned with others.
Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2018 Automattic, Inc. Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2019 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later. Underscores is distributed under the terms of the GNU GPL v2 or later.
Normalizing styles have been helped along thanks to the fine work of Normalizing styles have been helped along thanks to the fine work of

View File

@ -14,7 +14,7 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
This theme, like WordPress, is licensed under the GPL. This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others. Use it to make something cool, have fun, and share what you've learned with others.
Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2018 Automattic, Inc. Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2019 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later. Underscores is distributed under the terms of the GNU GPL v2 or later.
Normalizing styles have been helped along thanks to the fine work of Normalizing styles have been helped along thanks to the fine work of

View File

@ -1,125 +1,125 @@
=== Twenty Seventeen === === Twenty Seventeen ===
Contributors: wordpressdotorg Contributors: wordpressdotorg
Tested up to: 5.0 Tested up to: 5.0
Version: 2.2 Version: 2.2
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
== Description == == Description ==
Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device. Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
For more information about Twenty Seventeen please go to https://wordpress.org/support/article/twenty-seventeen/. For more information about Twenty Seventeen please go to https://wordpress.org/support/article/twenty-seventeen/.
== Installation == == Installation ==
1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button. 1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button.
2. Type in Twenty Seventeen in the search form and press the 'Enter' key on your keyboard. 2. Type in Twenty Seventeen in the search form and press the 'Enter' key on your keyboard.
3. Click on the 'Activate' button to use your new theme right away. 3. Click on the 'Activate' button to use your new theme right away.
4. Go to https://wordpress.org/support/article/twenty-seventeen/ for a guide on how to customize this theme. 4. Go to https://wordpress.org/support/article/twenty-seventeen/ for a guide on how to customize this theme.
5. Navigate to Appearance > Customize in your admin panel and customize to taste. 5. Navigate to Appearance > Customize in your admin panel and customize to taste.
== Copyright == == Copyright ==
Twenty Seventeen WordPress Theme, Copyright 2016 WordPress.org Twenty Seventeen WordPress Theme, Copyright 2016-2019 WordPress.org
Twenty Seventeen is distributed under the terms of the GNU GPL Twenty Seventeen is distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or the Free Software Foundation, either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
Twenty Seventeen bundles the following third-party resources: Twenty Seventeen bundles the following third-party resources:
HTML5 Shiv, Copyright 2014 Alexander Farkas HTML5 Shiv, Copyright 2014 Alexander Farkas
Licenses: MIT/GPL2 Licenses: MIT/GPL2
Source: https://github.com/aFarkas/html5shiv Source: https://github.com/aFarkas/html5shiv
jQuery scrollTo, Copyright 2007-2015 Ariel Flesler jQuery scrollTo, Copyright 2007-2015 Ariel Flesler
License: MIT License: MIT
Source: https://github.com/flesler/jquery.scrollTo Source: https://github.com/flesler/jquery.scrollTo
normalize.css, Copyright 2012-2016 Nicolas Gallagher and Jonathan Neal normalize.css, Copyright 2012-2016 Nicolas Gallagher and Jonathan Neal
License: MIT License: MIT
Source: https://necolas.github.io/normalize.css/ Source: https://necolas.github.io/normalize.css/
Font Awesome icons, Copyright Dave Gandy Font Awesome icons, Copyright Dave Gandy
License: SIL Open Font License, version 1.1. License: SIL Open Font License, version 1.1.
Source: http://fontawesome.io/ Source: http://fontawesome.io/
Bundled header image, Copyright Alvin Engler Bundled header image, Copyright Alvin Engler
License: CC0 1.0 Universal (CC0 1.0) License: CC0 1.0 Universal (CC0 1.0)
Source: https://unsplash.com/@englr?photo=bIhpiQA009k Source: https://unsplash.com/@englr?photo=bIhpiQA009k
== Changelog == == Changelog ==
= 2.2 = = 2.2 =
* Released: May 7, 2019 * Released: May 7, 2019
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.2 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.2
= 2.1 = = 2.1 =
* Released: February 21, 2019 * Released: February 21, 2019
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.1 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.1
= 2.0 = = 2.0 =
* Released: January 9, 2019 * Released: January 9, 2019
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.0 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.0
= 1.9 = = 1.9 =
* Released: December 19, 2018 * Released: December 19, 2018
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.9 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.9
= 1.8 = = 1.8 =
* Released: December 6, 2018 * Released: December 6, 2018
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.8 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.8
= 1.7 = = 1.7 =
* Released: August 2, 2018 * Released: August 2, 2018
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.7 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.7
= 1.6 = = 1.6 =
* Released: May 17, 2018 * Released: May 17, 2018
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.6 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.6
= 1.5 = = 1.5 =
* Released: April 4, 2018 * Released: April 4, 2018
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.5 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.5
= 1.4 = = 1.4 =
* Released: November 14, 2017 * Released: November 14, 2017
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.4 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.4
= 1.3 = = 1.3 =
* Released: June 8, 2017 * Released: June 8, 2017
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.3 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.3
= 1.2 = = 1.2 =
* Released: April 18, 2017 * Released: April 18, 2017
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.2 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.2
= 1.1 = = 1.1 =
* Released: January 6, 2017 * Released: January 6, 2017
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.1 https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.1
= 1.0 = = 1.0 =
* Released: December 6, 2016 * Released: December 6, 2016
Initial release Initial release

View File

@ -28,7 +28,7 @@ For more information about Twenty Sixteen please go to https://wordpress.org/sup
== Copyright == == Copyright ==
Twenty Sixteen WordPress Theme, Copyright 2014-2018 WordPress.org Twenty Sixteen WordPress Theme, Copyright 2014-2019 WordPress.org
Twenty Sixteen is distributed under the terms of the GNU GPL Twenty Sixteen is distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -21,7 +21,7 @@ For more information about Twenty Ten theme please go to https://codex.wordpress
== Copyright == == Copyright ==
Twenty Ten WordPress Theme, Copyright 2010-2018 WordPress.org & Automattic.com Twenty Ten WordPress Theme, Copyright 2010-2019 WordPress.org & Automattic.com
Twenty Ten is Distributed under the terms of the GNU GPL Twenty Ten is Distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -21,7 +21,7 @@ For more information about Twenty Thirteen please go to https://codex.wordpress.
== Copyright == == Copyright ==
Twenty Thirteen WordPress Theme, Copyright 2013-2018 WordPress.org & Automattic.com Twenty Thirteen WordPress Theme, Copyright 2013-2019 WordPress.org & Automattic.com
Twenty Thirteen is Distributed under the terms of the GNU GPL Twenty Thirteen is Distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -21,7 +21,7 @@ For more information about Twenty Twelve please go to https://codex.wordpress.or
== Copyright == == Copyright ==
Twenty Twelve WordPress Theme, Copyright 2012-2018 WordPress.org & Automattic.com Twenty Twelve WordPress Theme, Copyright 2012-2019 WordPress.org & Automattic.com
Twenty Twelve is Distributed under the terms of the GNU GPL Twenty Twelve is Distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -68,7 +68,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
Source: WordPress Social Link Block (See wp-includes\blocks\social-link.php) Source: WordPress Social Link Block (See wp-includes\blocks\social-link.php)
Code from Twenty Nineteen Code from Twenty Nineteen
Copyright (c) 2018 WordPress.org Copyright (c) 2018-2019 WordPress.org
License: GPLv2 License: GPLv2
Source: https://wordpress.org/themes/twentynineteen/ Source: https://wordpress.org/themes/twentynineteen/
Included as part of the following classes and functions: Included as part of the following classes and functions:
@ -78,7 +78,7 @@ Included as part of the following classes and functions:
- twentytwenty_nav_menu_social_icons() - twentytwenty_nav_menu_social_icons()
Code from Twenty Seventeen Code from Twenty Seventeen
Copyright (c) 2016 WordPress.org Copyright (c) 2016-2019 WordPress.org
License: GPLv2 License: GPLv2
Source: https://wordpress.org/themes/twentyseventeen/ Source: https://wordpress.org/themes/twentyseventeen/
Included as part of the following classes and functions: Included as part of the following classes and functions:

View File

@ -210,6 +210,33 @@ class Tests_Theme extends WP_UnitTestCase {
} }
} }
/**
* @ticket 48566
*/
function test_year_in_readme() {
// This test is designed to only run on trunk/master.
$this->skipOnAutomatedBranches();
foreach ( $this->default_themes as $theme ) {
$wp_theme = wp_get_theme( $theme );
$path_to_readme_txt = $wp_theme->get_theme_root() . '/' . $wp_theme->get_stylesheet() . '/readme.txt';
$this->assertFileExists( $path_to_readme_txt );
$readme = file_get_contents( $path_to_readme_txt );
$this_year = gmdate( 'Y' );
preg_match( '#Copyright (\d+) WordPress.org#', $readme, $matches );
if ( $matches ) {
$this->assertEquals( $this_year, trim( $matches[1] ), "Bundled themes readme.txt's year needs to be updated to $this_year." );
}
preg_match( '#Copyright 20\d\d-(\d+) WordPress.org#', $readme, $matches );
if ( $matches ) {
$this->assertEquals( $this_year, trim( $matches[1] ), "Bundled themes readme.txt's year needs to be updated to $this_year." );
}
}
}
/** /**
* @ticket 20897 * @ticket 20897
* @expectedDeprecated get_theme_data * @expectedDeprecated get_theme_data