Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b7ba582
add caching
kt-12 Apr 15, 2024
3bba97f
transient implementation
kt-12 Apr 15, 2024
97806ea
Improve caching key computation
kt-12 Apr 16, 2024
341e218
improving performace for non persistance cache.
kt-12 Apr 16, 2024
9c92f65
cache related call only for non development mode
kt-12 Apr 16, 2024
cce7c9a
cache clear code
kt-12 Apr 16, 2024
7c7bcec
change cache invalidating logic
kt-12 Apr 16, 2024
b55aa6f
remove get compute style from constructor
kt-12 Apr 16, 2024
2732050
remove uncessary check
kt-12 Apr 16, 2024
2afb765
attach clear_compute_style_properties_cache directly to hook
kt-12 Apr 16, 2024
974a292
Update src/wp-includes/class-wp-theme-json.php
kt-12 Apr 23, 2024
99ac114
global style caching
kt-12 May 17, 2024
fc6c235
update old test
kt-12 May 17, 2024
d1bd38a
remove additional function
kt-12 May 17, 2024
2957ae4
update function name
kt-12 May 17, 2024
ffa4771
cs fixes
kt-12 May 17, 2024
cbc7be5
cache is set check
kt-12 May 17, 2024
a4fc0b5
cache is set check
kt-12 May 17, 2024
23270b2
assert if it's not empty after
kt-12 May 17, 2024
672525f
Merge branch 'WordPress:trunk' into enhancement/object-cache-compute-…
joemcgill May 22, 2024
d0b243c
Update unit tests
joemcgill May 24, 2024
fbbb4cf
Fix typo
joemcgill May 24, 2024
8d8e99d
update cache related chanage
kt-12 May 27, 2024
5899f63
remove repetition
kt-12 May 27, 2024
23c518e
Merge branch 'trunk' into enhancement/object-cache-compute-style-prop…
kt-12 May 27, 2024
2c26302
update style block caching logic
kt-12 May 28, 2024
4c8dfe2
update test cases.
kt-12 May 28, 2024
b08183e
revert test changes
kt-12 May 28, 2024
48a310c
unregster bug fix
kt-12 May 29, 2024
8b16eb5
Revert "unregster bug fix"
joemcgill May 31, 2024
76435fc
Clear theme json data between theme unit tests
joemcgill May 31, 2024
a8c7453
Merge branch 'trunk' into update/59595-fix-tests
joemcgill May 31, 2024
21c2922
Don't cache nodes without names
joemcgill May 31, 2024
c938aa5
Merge branch 'trunk' into enhancement/object-cache-compute-style-prop…
joemcgill Jun 3, 2024
6becf8d
Merge branch 'enhancement/object-cache-compute-style-properties' into…
joemcgill Jun 3, 2024
accffb6
remove test case
kt-12 Jun 3, 2024
b6de61f
cache node with no name
kt-12 Jun 3, 2024
0947a38
test cases fixes
kt-12 Jun 3, 2024
2083f0b
Fix enqueueing inline styles for nodes without block names.
joemcgill Jun 3, 2024
561ee41
Inline docs improvements
joemcgill Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove test case
  • Loading branch information
kt-12 committed Jun 3, 2024
commit accffb6d3704029c0d8e2ca945c2e922f2f39d21
8 changes: 0 additions & 8 deletions src/wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -1052,14 +1052,6 @@ protected static function get_blocks_metadata() {
$blocks = $registry->get_all_registered();
$style_registry = WP_Block_Styles_Registry::get_instance();

// Unset old blocks from static variable.
$blocks_to_unset = array_diff_key( static::$blocks_metadata, $blocks );
if ( ! empty( $blocks_to_unset ) ) {
foreach ( $blocks_to_unset as $block_name => $block_meta ) {
unset( static::$blocks_metadata[ $block_name ] );
}
}

// Is there metadata for all currently registered blocks?
$blocks = array_diff_key( $blocks, static::$blocks_metadata );
if ( empty( $blocks ) ) {
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/tests/theme/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function tear_down() {

wp_clean_themes_cache();
wp_clean_theme_json_cache();
wp_clean_theme_json_cache();
unset( $GLOBALS['wp_themes'] );

parent::tear_down();
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class Tests_Theme_WpAddGlobalStylesForBlocks extends WP_Theme_UnitTestCase {

public function set_up() {
parent::set_up();
switch_theme( 'default' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
}

Expand All @@ -33,7 +32,6 @@ public function tear_down() {
$this->test_blocks = array();
}

switch_theme( 'default' );
parent::tear_down();
}

Expand Down