mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Themes: Remove memoization from stylesheet and theme directories.
This fixes bugs introduced in [56635] whereby the template or stylesheet path could be memoized incorrectly if `get_template_directory()` or `get_stylesheet_directory()` were called before the theme has been fully initialized. Props partyfrikadelle, coreyw, kdowns, rebasaurus, meta4, flixos90, mukesh27, joemcgill. Fixes #59847. git-svn-id: https://develop.svn.wordpress.org/trunk@57129 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
7
tests/phpunit/data/themedir2/test-parent/functions.php
Normal file
7
tests/phpunit/data/themedir2/test-parent/functions.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Dummy theme.
|
||||
|
||||
echo __DIR__ . '/' . basename(__FILE__);
|
||||
|
||||
?>
|
||||
7
tests/phpunit/data/themedir2/test-parent/index.php
Normal file
7
tests/phpunit/data/themedir2/test-parent/index.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Dummy theme.
|
||||
|
||||
echo __DIR__ . '/' . basename(__FILE__);
|
||||
|
||||
?>
|
||||
12
tests/phpunit/data/themedir2/test-parent/style.css
Normal file
12
tests/phpunit/data/themedir2/test-parent/style.css
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Theme Name: Test Parent Theme
|
||||
Theme URI: http://example.org/
|
||||
Description: An example parent theme
|
||||
Version: 1.3
|
||||
Author: Minnie Bannister
|
||||
Author URI: http://example.com/
|
||||
Template: test-parent
|
||||
*/
|
||||
|
||||
|
||||
|
||||
7
tests/phpunit/data/themedir2/test/functions.php
Normal file
7
tests/phpunit/data/themedir2/test/functions.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Dummy theme.
|
||||
|
||||
echo __DIR__ . '/' . basename(__FILE__);
|
||||
|
||||
?>
|
||||
7
tests/phpunit/data/themedir2/test/index.php
Normal file
7
tests/phpunit/data/themedir2/test/index.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Dummy theme.
|
||||
|
||||
echo __DIR__ . '/' . basename(__FILE__);
|
||||
|
||||
?>
|
||||
12
tests/phpunit/data/themedir2/test/style.css
Normal file
12
tests/phpunit/data/themedir2/test/style.css
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Theme Name: Test Theme
|
||||
Theme URI: http://example.org/
|
||||
Description: An example theme
|
||||
Version: 1.3
|
||||
Author: Minnie Bannister
|
||||
Author URI: http://example.com/
|
||||
Template: test-parent
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user