@wordpress/block-library 9.33.2-next.36001005c.0 → 9.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/accordion/block.json +1 -1
  3. package/build/accordion/edit.js +11 -9
  4. package/build/accordion/edit.js.map +2 -2
  5. package/build/accordion-heading/block.json +1 -1
  6. package/build/accordion-item/block.json +2 -2
  7. package/build/accordion-panel/block.json +1 -1
  8. package/build/breadcrumbs/block.json +3 -4
  9. package/build/breadcrumbs/edit.js +43 -77
  10. package/build/breadcrumbs/edit.js.map +2 -2
  11. package/build/buttons/transforms.js +1 -0
  12. package/build/buttons/transforms.js.map +2 -2
  13. package/build/categories/edit.js +8 -4
  14. package/build/categories/edit.js.map +2 -2
  15. package/build/code/transforms.js +2 -0
  16. package/build/code/transforms.js.map +2 -2
  17. package/build/home-link/block.json +2 -1
  18. package/build/image/view.js +4 -1
  19. package/build/image/view.js.map +2 -2
  20. package/build/latest-comments/block.json +4 -3
  21. package/build/latest-comments/deprecated.js +56 -0
  22. package/build/latest-comments/deprecated.js.map +7 -0
  23. package/build/latest-comments/edit.js +16 -10
  24. package/build/latest-comments/edit.js.map +2 -2
  25. package/build/latest-comments/index.js +3 -1
  26. package/build/latest-comments/index.js.map +3 -3
  27. package/build/math/deprecated.js +54 -0
  28. package/build/math/deprecated.js.map +7 -0
  29. package/build/math/edit.js +1 -0
  30. package/build/math/edit.js.map +2 -2
  31. package/build/math/index.js +3 -1
  32. package/build/math/index.js.map +3 -3
  33. package/build/math/save.js +2 -3
  34. package/build/math/save.js.map +2 -2
  35. package/build/navigation/menu-items-to-blocks.js +8 -3
  36. package/build/navigation/menu-items-to-blocks.js.map +2 -2
  37. package/build/navigation/view.js +2 -2
  38. package/build/navigation/view.js.map +2 -2
  39. package/build/navigation-link/link-ui/page-creator.js +20 -0
  40. package/build/navigation-link/link-ui/page-creator.js.map +3 -3
  41. package/build/post-date/block.json +1 -1
  42. package/build/post-date/edit.js +11 -5
  43. package/build/post-date/edit.js.map +3 -3
  44. package/build/post-date/variations.js +4 -7
  45. package/build/post-date/variations.js.map +2 -2
  46. package/build/post-template/edit.js +13 -1
  47. package/build/post-template/edit.js.map +2 -2
  48. package/build/query/index.js +11 -1
  49. package/build/query/index.js.map +2 -2
  50. package/build/query/variations.js +16 -11
  51. package/build/query/variations.js.map +2 -2
  52. package/build/search/view.js +4 -4
  53. package/build/search/view.js.map +2 -2
  54. package/build/terms-query/edit/inspector-controls/index.js +1 -1
  55. package/build/terms-query/edit/inspector-controls/index.js.map +2 -2
  56. package/build/terms-query/edit/inspector-controls/inherit-control.js +2 -4
  57. package/build/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
  58. package/build/utils/get-transformed-attributes.js +1 -10
  59. package/build/utils/get-transformed-attributes.js.map +2 -2
  60. package/build-module/accordion/block.json +1 -1
  61. package/build-module/accordion/edit.js +11 -9
  62. package/build-module/accordion/edit.js.map +2 -2
  63. package/build-module/accordion-heading/block.json +1 -1
  64. package/build-module/accordion-item/block.json +2 -2
  65. package/build-module/accordion-panel/block.json +1 -1
  66. package/build-module/breadcrumbs/block.json +3 -4
  67. package/build-module/breadcrumbs/edit.js +44 -78
  68. package/build-module/breadcrumbs/edit.js.map +2 -2
  69. package/build-module/buttons/transforms.js +1 -0
  70. package/build-module/buttons/transforms.js.map +2 -2
  71. package/build-module/categories/edit.js +8 -4
  72. package/build-module/categories/edit.js.map +2 -2
  73. package/build-module/code/transforms.js +2 -0
  74. package/build-module/code/transforms.js.map +2 -2
  75. package/build-module/home-link/block.json +2 -1
  76. package/build-module/image/view.js +4 -1
  77. package/build-module/image/view.js.map +2 -2
  78. package/build-module/latest-comments/block.json +4 -3
  79. package/build-module/latest-comments/deprecated.js +36 -0
  80. package/build-module/latest-comments/deprecated.js.map +7 -0
  81. package/build-module/latest-comments/edit.js +17 -10
  82. package/build-module/latest-comments/edit.js.map +2 -2
  83. package/build-module/latest-comments/index.js +3 -1
  84. package/build-module/latest-comments/index.js.map +2 -2
  85. package/build-module/math/deprecated.js +34 -0
  86. package/build-module/math/deprecated.js.map +7 -0
  87. package/build-module/math/edit.js +1 -0
  88. package/build-module/math/edit.js.map +2 -2
  89. package/build-module/math/index.js +3 -1
  90. package/build-module/math/index.js.map +2 -2
  91. package/build-module/math/save.js +2 -3
  92. package/build-module/math/save.js.map +2 -2
  93. package/build-module/navigation/menu-items-to-blocks.js +8 -3
  94. package/build-module/navigation/menu-items-to-blocks.js.map +2 -2
  95. package/build-module/navigation/view.js +2 -2
  96. package/build-module/navigation/view.js.map +2 -2
  97. package/build-module/navigation-link/link-ui/page-creator.js +21 -1
  98. package/build-module/navigation-link/link-ui/page-creator.js.map +2 -2
  99. package/build-module/post-date/block.json +1 -1
  100. package/build-module/post-date/edit.js +11 -5
  101. package/build-module/post-date/edit.js.map +2 -2
  102. package/build-module/post-date/variations.js +4 -7
  103. package/build-module/post-date/variations.js.map +2 -2
  104. package/build-module/post-template/edit.js +13 -1
  105. package/build-module/post-template/edit.js.map +2 -2
  106. package/build-module/query/index.js +11 -1
  107. package/build-module/query/index.js.map +2 -2
  108. package/build-module/query/variations.js +16 -11
  109. package/build-module/query/variations.js.map +2 -2
  110. package/build-module/search/view.js +4 -4
  111. package/build-module/search/view.js.map +2 -2
  112. package/build-module/terms-query/edit/inspector-controls/index.js +1 -1
  113. package/build-module/terms-query/edit/inspector-controls/index.js.map +2 -2
  114. package/build-module/terms-query/edit/inspector-controls/inherit-control.js +2 -4
  115. package/build-module/terms-query/edit/inspector-controls/inherit-control.js.map +2 -2
  116. package/build-module/utils/get-transformed-attributes.js +1 -10
  117. package/build-module/utils/get-transformed-attributes.js.map +2 -2
  118. package/build-style/editor-rtl.css +5 -0
  119. package/build-style/editor.css +6 -0
  120. package/build-style/math/editor-rtl.css +49 -0
  121. package/build-style/math/editor.css +50 -0
  122. package/build-style/math/style-rtl.css +4 -0
  123. package/build-style/math/style.css +4 -0
  124. package/build-style/style-rtl.css +5 -0
  125. package/build-style/style.css +5 -0
  126. package/package.json +37 -37
  127. package/src/accordion/block.json +1 -1
  128. package/src/accordion/edit.js +16 -16
  129. package/src/accordion-heading/block.json +1 -1
  130. package/src/accordion-item/block.json +2 -2
  131. package/src/accordion-panel/block.json +1 -1
  132. package/src/breadcrumbs/block.json +3 -4
  133. package/src/breadcrumbs/edit.js +96 -132
  134. package/src/breadcrumbs/index.php +203 -50
  135. package/src/buttons/transforms.js +1 -0
  136. package/src/categories/edit.js +10 -6
  137. package/src/categories/index.php +1 -1
  138. package/src/code/transforms.js +2 -0
  139. package/src/editor.scss +1 -0
  140. package/src/home-link/block.json +2 -1
  141. package/src/image/index.php +9 -9
  142. package/src/image/view.js +11 -1
  143. package/src/latest-comments/block.json +4 -3
  144. package/src/latest-comments/deprecated.js +37 -0
  145. package/src/latest-comments/edit.js +17 -10
  146. package/src/latest-comments/index.js +2 -0
  147. package/src/latest-comments/index.php +11 -2
  148. package/src/math/deprecated.js +44 -0
  149. package/src/math/edit.js +1 -0
  150. package/src/math/editor.scss +7 -0
  151. package/src/math/index.js +2 -0
  152. package/src/math/save.js +6 -5
  153. package/src/math/style.scss +4 -0
  154. package/src/navigation/index.php +7 -7
  155. package/src/navigation/menu-items-to-blocks.js +12 -2
  156. package/src/navigation/test/menu-items-to-blocks.js +144 -0
  157. package/src/navigation/view.js +2 -2
  158. package/src/navigation-link/link-ui/page-creator.js +25 -2
  159. package/src/post-date/block.json +1 -1
  160. package/src/post-date/edit.js +15 -10
  161. package/src/post-date/variations.js +2 -5
  162. package/src/post-template/edit.js +13 -1
  163. package/src/query/index.js +10 -0
  164. package/src/query/variations.js +17 -11
  165. package/src/query-pagination-next/index.php +1 -1
  166. package/src/query-pagination-previous/index.php +1 -1
  167. package/src/search/index.php +2 -2
  168. package/src/search/view.js +4 -4
  169. package/src/style.scss +1 -0
  170. package/src/term-template/index.php +8 -2
  171. package/src/terms-query/edit/inspector-controls/index.js +2 -2
  172. package/src/terms-query/edit/inspector-controls/inherit-control.js +1 -3
  173. package/src/utils/get-transformed-attributes.js +5 -16
@@ -35,6 +35,7 @@ import { __, _x, sprintf } from '@wordpress/i18n';
35
35
  import { pencil } from '@wordpress/icons';
36
36
  import { DOWN } from '@wordpress/keycodes';
37
37
  import { useSelect, useDispatch } from '@wordpress/data';
38
+ import { store as blocksStore } from '@wordpress/blocks';
38
39
 
39
40
  /**
40
41
  * Internal dependencies
@@ -42,14 +43,12 @@ import { useSelect, useDispatch } from '@wordpress/data';
42
43
  import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
43
44
 
44
45
  export default function PostDateEdit( {
45
- attributes: { datetime, textAlign, format, isLink, metadata },
46
+ attributes,
46
47
  context: { postType: postTypeSlug, queryId },
47
48
  setAttributes,
49
+ name,
48
50
  } ) {
49
- const displayType =
50
- metadata?.bindings?.datetime?.source === 'core/post-data' &&
51
- metadata?.bindings?.datetime?.args?.field;
52
-
51
+ const { datetime, textAlign, format, isLink } = attributes;
53
52
  const blockProps = useBlockProps( {
54
53
  className: clsx( {
55
54
  [ `has-text-align-${ textAlign }` ]: textAlign,
@@ -90,7 +89,6 @@ export default function PostDateEdit( {
90
89
  ( select ) => {
91
90
  const { getPostType, getEntityRecord } = select( coreStore );
92
91
  const siteSettings = getEntityRecord( 'root', 'site' );
93
-
94
92
  return {
95
93
  siteFormat: siteSettings?.date_format,
96
94
  siteTimeFormat: siteSettings?.time_format,
@@ -99,6 +97,12 @@ export default function PostDateEdit( {
99
97
  },
100
98
  [ postTypeSlug ]
101
99
  );
100
+ const activeBlockVariationName = useSelect(
101
+ ( select ) =>
102
+ select( blocksStore ).getActiveBlockVariation( name, attributes )
103
+ ?.name,
104
+ [ name, attributes ]
105
+ );
102
106
 
103
107
  const blockEditingMode = useBlockEditingMode();
104
108
 
@@ -120,7 +124,6 @@ export default function PostDateEdit( {
120
124
  </a>
121
125
  );
122
126
  }
123
-
124
127
  return (
125
128
  <>
126
129
  { ( blockEditingMode === 'default' ||
@@ -133,15 +136,17 @@ export default function PostDateEdit( {
133
136
  } }
134
137
  />
135
138
 
136
- { displayType !== 'modified' &&
137
- ! isDescendentOfQueryLoop && (
139
+ { activeBlockVariationName !== 'post-date-modified' &&
140
+ ( ! isDescendentOfQueryLoop ||
141
+ ! activeBlockVariationName ) && (
138
142
  <ToolbarGroup>
139
143
  <Dropdown
140
144
  popoverProps={ popoverProps }
141
145
  renderContent={ ( { onClose } ) => (
142
146
  <PublishDateTimePicker
143
147
  title={
144
- displayType === 'date'
148
+ activeBlockVariationName ===
149
+ 'post-date'
145
150
  ? __( 'Publish Date' )
146
151
  : __( 'Date' )
147
152
  }
@@ -2,7 +2,6 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
- import { postDate } from '@wordpress/icons';
6
5
 
7
6
  const variations = [
8
7
  {
@@ -19,13 +18,12 @@ const variations = [
19
18
  },
20
19
  },
21
20
  },
22
- scope: [ 'block', 'inserter', 'transform' ],
21
+ scope: [ 'inserter', 'transform' ],
23
22
  isActive: ( blockAttributes ) =>
24
23
  blockAttributes?.metadata?.bindings?.datetime?.source ===
25
24
  'core/post-data' &&
26
25
  blockAttributes?.metadata?.bindings?.datetime?.args?.field ===
27
26
  'date',
28
- icon: postDate,
29
27
  },
30
28
  {
31
29
  name: 'post-date-modified',
@@ -42,13 +40,12 @@ const variations = [
42
40
  },
43
41
  className: 'wp-block-post-date__modified-date',
44
42
  },
45
- scope: [ 'block', 'inserter', 'transform' ],
43
+ scope: [ 'inserter', 'transform' ],
46
44
  isActive: ( blockAttributes ) =>
47
45
  blockAttributes?.metadata?.bindings?.datetime?.source ===
48
46
  'core/post-data' &&
49
47
  blockAttributes?.metadata?.bindings?.datetime?.args?.field ===
50
48
  'modified',
51
- icon: postDate,
52
49
  },
53
50
  ];
54
51
 
@@ -23,7 +23,19 @@ import { list, grid } from '@wordpress/icons';
23
23
 
24
24
  const TEMPLATE = [
25
25
  [ 'core/post-title' ],
26
- [ 'core/post-date' ],
26
+ [
27
+ 'core/post-date',
28
+ {
29
+ metadata: {
30
+ bindings: {
31
+ datetime: {
32
+ source: 'core/post-data',
33
+ args: { field: 'date' },
34
+ },
35
+ },
36
+ },
37
+ },
38
+ ],
27
39
  [ 'core/post-excerpt' ],
28
40
  ];
29
41
 
@@ -51,6 +51,16 @@ export const settings = {
51
51
  },
52
52
  {
53
53
  name: 'core/post-date',
54
+ attributes: {
55
+ metadata: {
56
+ bindings: {
57
+ datetime: {
58
+ source: 'core/post-data',
59
+ args: { field: 'date' },
60
+ },
61
+ },
62
+ },
63
+ },
54
64
  },
55
65
  {
56
66
  name: 'core/post-excerpt',
@@ -13,6 +13,20 @@ import {
13
13
  imageDateTitle,
14
14
  } from './icons';
15
15
 
16
+ const postDate = [
17
+ 'core/post-date',
18
+ {
19
+ metadata: {
20
+ bindings: {
21
+ datetime: {
22
+ source: 'core/post-data',
23
+ args: { field: 'date' },
24
+ },
25
+ },
26
+ },
27
+ },
28
+ ];
29
+
16
30
  const variations = [
17
31
  {
18
32
  name: 'title-date',
@@ -20,11 +34,7 @@ const variations = [
20
34
  icon: titleDate,
21
35
  attributes: {},
22
36
  innerBlocks: [
23
- [
24
- 'core/post-template',
25
- {},
26
- [ [ 'core/post-title' ], [ 'core/post-date' ] ],
27
- ],
37
+ [ 'core/post-template', {}, [ [ 'core/post-title' ], postDate ] ],
28
38
  [ 'core/query-pagination' ],
29
39
  [ 'core/query-no-results' ],
30
40
  ],
@@ -55,11 +65,7 @@ const variations = [
55
65
  [
56
66
  'core/post-template',
57
67
  {},
58
- [
59
- [ 'core/post-title' ],
60
- [ 'core/post-date' ],
61
- [ 'core/post-excerpt' ],
62
- ],
68
+ [ [ 'core/post-title' ], postDate, [ 'core/post-excerpt' ] ],
63
69
  ],
64
70
  [ 'core/query-pagination' ],
65
71
  [ 'core/query-no-results' ],
@@ -77,7 +83,7 @@ const variations = [
77
83
  {},
78
84
  [
79
85
  [ 'core/post-featured-image' ],
80
- [ 'core/post-date' ],
86
+ postDate,
81
87
  [ 'core/post-title' ],
82
88
  ],
83
89
  ],
@@ -77,7 +77,7 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
77
77
  ) ) {
78
78
  $p->set_attribute( 'data-wp-key', 'query-pagination-next' );
79
79
  $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
80
- $p->set_attribute( 'data-wp-on-async--mouseenter', 'core/query::actions.prefetch' );
80
+ $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' );
81
81
  $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' );
82
82
  $content = $p->get_updated_html();
83
83
  }
@@ -70,7 +70,7 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
70
70
  ) ) {
71
71
  $p->set_attribute( 'data-wp-key', 'query-pagination-previous' );
72
72
  $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
73
- $p->set_attribute( 'data-wp-on-async--mouseenter', 'core/query::actions.prefetch' );
73
+ $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' );
74
74
  $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' );
75
75
  $content = $p->get_updated_html();
76
76
  }
@@ -183,8 +183,8 @@ function render_block_core_search( $attributes ) {
183
183
  data-wp-interactive="core/search"
184
184
  ' . $form_context . '
185
185
  data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
186
- data-wp-on-async--keydown="actions.handleSearchKeydown"
187
- data-wp-on-async--focusout="actions.handleSearchFocusout"
186
+ data-wp-on--keydown="actions.handleSearchKeydown"
187
+ data-wp-on--focusout="actions.handleSearchFocusout"
188
188
  ';
189
189
  }
190
190
 
@@ -49,15 +49,15 @@ const { actions } = store(
49
49
  const ctx = getContext();
50
50
  ctx.isSearchInputVisible = false;
51
51
  },
52
- handleSearchKeydown( event ) {
52
+ handleSearchKeydown: withSyncEvent( ( event ) => {
53
53
  const { ref } = getElement();
54
54
  // If Escape close the menu.
55
55
  if ( event?.key === 'Escape' ) {
56
56
  actions.closeSearchInput();
57
57
  ref.querySelector( 'button' ).focus();
58
58
  }
59
- },
60
- handleSearchFocusout( event ) {
59
+ } ),
60
+ handleSearchFocusout: withSyncEvent( ( event ) => {
61
61
  const { ref } = getElement();
62
62
  // If focus is outside search form, and in the document, close menu
63
63
  // event.target === The element losing focus
@@ -70,7 +70,7 @@ const { actions } = store(
70
70
  ) {
71
71
  actions.closeSearchInput();
72
72
  }
73
- },
73
+ } ),
74
74
  },
75
75
  },
76
76
  { lock: true }
package/src/style.scss CHANGED
@@ -32,6 +32,7 @@
32
32
  @use "./latest-posts/style.scss" as *;
33
33
  @use "./list/style.scss" as *;
34
34
  @use "./loginout/style.scss" as *;
35
+ @use "./math/style.scss" as *;
35
36
  @use "./media-text/style.scss" as *;
36
37
  @use "./navigation/style.scss" as *;
37
38
  @use "./navigation-link/style.scss" as *;
@@ -38,10 +38,16 @@ function render_block_core_term_template( $attributes, $content, $block ) {
38
38
  // Get the current term and taxonomy from the queried object.
39
39
  $queried_object = get_queried_object();
40
40
 
41
- // For hierarchical taxonomies, show direct children of the current term.
41
+ // For hierarchical taxonomies, show children of the current term.
42
42
  // For non-hierarchical taxonomies, show all terms (don't set parent).
43
43
  if ( is_taxonomy_hierarchical( $queried_object->taxonomy ) ) {
44
- $query_args['parent'] = $queried_object->term_id;
44
+ // If showNested is true, use child_of to include nested terms.
45
+ // Otherwise, use parent to show only direct children.
46
+ if ( ! empty( $query['showNested'] ) ) {
47
+ $query_args['child_of'] = $queried_object->term_id;
48
+ } else {
49
+ $query_args['parent'] = $queried_object->term_id;
50
+ }
45
51
  }
46
52
  $query_args['taxonomy'] = $queried_object->taxonomy;
47
53
  } else {
@@ -55,8 +55,8 @@ export default function TermsQueryInspectorControls( {
55
55
  templateSlug?.startsWith( 'taxonomy-' ) ||
56
56
  templateSlug?.startsWith( 'category-' ) ||
57
57
  templateSlug?.startsWith( 'tag-' );
58
- // Only display the showNested control if the taxonomy is hierarchical and not inheriting.
59
- const displayShowNestedControl = isTaxonomyHierarchical && ! inheritQuery;
58
+ // Display the showNested control if the taxonomy is hierarchical.
59
+ const displayShowNestedControl = isTaxonomyHierarchical;
60
60
  const hasIncludeFilter = !! include?.length;
61
61
 
62
62
  // Labels shared between ToolsPanelItem and its child control.
@@ -17,14 +17,12 @@ export default function InheritControl( { value, onChange, label } ) {
17
17
  onChange={ ( newValue ) => {
18
18
  onChange( {
19
19
  inherit: newValue === 'default',
20
- // When enabling inherit, hierarchical is not supported.
21
- ...( newValue === 'default' ? { showNested: false } : {} ),
22
20
  } );
23
21
  } }
24
22
  help={
25
23
  value
26
24
  ? __(
27
- 'Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows direct children of the current term. For non-hierarchical taxonomies, shows all terms.'
25
+ 'Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms.'
28
26
  )
29
27
  : __( 'Display terms based on specific criteria.' )
30
28
  }
@@ -27,7 +27,8 @@ export function getTransformedAttributes(
27
27
 
28
28
  const transformedAttributes = {};
29
29
 
30
- // Handle attributes derived from block support.
30
+ // Handle attributes derived from block support. The custom class name
31
+ // attribute is handled in the `core/customClassName/addTransforms` hook.
31
32
  if (
32
33
  hasBlockSupport( newBlockType, 'allowedBlocks' ) &&
33
34
  attributes.allowedBlocks
@@ -43,31 +44,19 @@ export function getTransformedAttributes(
43
44
  ) {
44
45
  transformedAttributes.ariaLabel = attributes.ariaLabel;
45
46
  }
46
- if (
47
- hasBlockSupport( newBlockType, 'className' ) &&
48
- attributes.className
49
- ) {
50
- transformedAttributes.className = attributes.className;
51
- }
52
47
 
53
48
  // Handle metadata transformation.
54
49
  if ( attributes.metadata ) {
55
50
  // The metadata properties that should be preserved after the transform.
56
- const transformedMetadata = [ 'noteId' ];
51
+ // The noteId, name, and blockVisibility properties are separately handled
52
+ // in the `core/metadata/addTransforms` hook.
53
+ const transformedMetadata = [];
57
54
 
58
55
  // If there is a transform bindings callback, add the `id` and `bindings` properties.
59
56
  if ( bindingsCallback ) {
60
57
  transformedMetadata.push( 'id', 'bindings' );
61
58
  }
62
59
 
63
- // Handle metadata properties derived from block support.
64
- if ( hasBlockSupport( newBlockType, 'renaming', true ) ) {
65
- transformedMetadata.push( 'name' );
66
- }
67
- if ( hasBlockSupport( newBlockType, 'blockVisibility', true ) ) {
68
- transformedMetadata.push( 'blockVisibility' );
69
- }
70
-
71
60
  // Only process metadata if there are supported properties.
72
61
  if ( transformedMetadata.length > 0 ) {
73
62
  const newMetadata = Object.entries( attributes.metadata ).reduce(