@wordpress/block-library 8.30.0 → 8.32.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 (362) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/block/edit.js +22 -16
  3. package/build/block/edit.js.map +1 -1
  4. package/build/button/edit.native.js +1 -1
  5. package/build/button/edit.native.js.map +1 -1
  6. package/build/code/save.js +3 -1
  7. package/build/code/save.js.map +1 -1
  8. package/build/cover/edit/index.js +2 -1
  9. package/build/cover/edit/index.js.map +1 -1
  10. package/build/details/edit.js +1 -0
  11. package/build/details/edit.js.map +1 -1
  12. package/build/file/edit.js +2 -0
  13. package/build/file/edit.js.map +1 -1
  14. package/build/heading/index.js +4 -3
  15. package/build/heading/index.js.map +1 -1
  16. package/build/image/edit.js +10 -39
  17. package/build/image/edit.js.map +1 -1
  18. package/build/image/image.js +27 -6
  19. package/build/image/image.js.map +1 -1
  20. package/build/media-text/edit.js +33 -9
  21. package/build/media-text/edit.js.map +1 -1
  22. package/build/media-text/index.js +5 -0
  23. package/build/media-text/index.js.map +1 -1
  24. package/build/media-text/media-container.js +30 -11
  25. package/build/media-text/media-container.js.map +1 -1
  26. package/build/media-text/save.js +2 -2
  27. package/build/media-text/save.js.map +1 -1
  28. package/build/navigation/edit/index.js +23 -29
  29. package/build/navigation/edit/index.js.map +1 -1
  30. package/build/navigation/edit/navigation-menu-delete-control.js +12 -20
  31. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  32. package/build/navigation/edit/navigation-menu-selector.js +24 -23
  33. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  34. package/build/navigation/edit/placeholder/index.js +4 -4
  35. package/build/navigation/edit/placeholder/index.js.map +1 -1
  36. package/build/navigation/use-navigation-menu.js +15 -12
  37. package/build/navigation/use-navigation-menu.js.map +1 -1
  38. package/build/navigation/view.js +12 -2
  39. package/build/navigation/view.js.map +1 -1
  40. package/build/navigation-link/edit.js +52 -27
  41. package/build/navigation-link/edit.js.map +1 -1
  42. package/build/navigation-submenu/edit.js +31 -9
  43. package/build/navigation-submenu/edit.js.map +1 -1
  44. package/build/pattern/edit.js +3 -1
  45. package/build/pattern/edit.js.map +1 -1
  46. package/build/post-author/edit.js +1 -0
  47. package/build/post-author/edit.js.map +1 -1
  48. package/build/post-excerpt/edit.js +1 -0
  49. package/build/post-excerpt/edit.js.map +1 -1
  50. package/build/post-featured-image/edit.js +16 -4
  51. package/build/post-featured-image/edit.js.map +1 -1
  52. package/build/post-featured-image/index.js +13 -2
  53. package/build/post-featured-image/index.js.map +1 -1
  54. package/build/post-featured-image/overlay-controls.js +82 -0
  55. package/build/post-featured-image/overlay-controls.js.map +1 -0
  56. package/build/post-featured-image/overlay.js +5 -54
  57. package/build/post-featured-image/overlay.js.map +1 -1
  58. package/build/post-navigation-link/edit.js +1 -0
  59. package/build/post-navigation-link/edit.js.map +1 -1
  60. package/build/post-terms/edit.js +2 -0
  61. package/build/post-terms/edit.js.map +1 -1
  62. package/build/quote/edit.js +18 -23
  63. package/build/quote/edit.js.map +1 -1
  64. package/build/read-more/edit.js +1 -0
  65. package/build/read-more/edit.js.map +1 -1
  66. package/build/search/edit.js +2 -0
  67. package/build/search/edit.js.map +1 -1
  68. package/build/search/edit.native.js +2 -2
  69. package/build/search/edit.native.js.map +1 -1
  70. package/build/site-tagline/edit.js +13 -4
  71. package/build/site-tagline/edit.js.map +1 -1
  72. package/build/site-tagline/index.js +4 -0
  73. package/build/site-tagline/index.js.map +1 -1
  74. package/build/social-link/edit.js +1 -1
  75. package/build/social-link/edit.js.map +1 -1
  76. package/build/social-link/icons/medium.js +1 -1
  77. package/build/social-link/icons/medium.js.map +1 -1
  78. package/build/social-link/icons/reddit.js +1 -1
  79. package/build/social-link/icons/reddit.js.map +1 -1
  80. package/build/table/deprecated.js +285 -175
  81. package/build/table/deprecated.js.map +1 -1
  82. package/build/table/index.js +1 -1
  83. package/build/template-part/edit/index.js +55 -47
  84. package/build/template-part/edit/index.js.map +1 -1
  85. package/build/template-part/edit/inner-blocks.js +106 -10
  86. package/build/template-part/edit/inner-blocks.js.map +1 -1
  87. package/build/template-part/edit/selection-modal.js +1 -9
  88. package/build/template-part/edit/selection-modal.js.map +1 -1
  89. package/build/utils/caption.js +19 -13
  90. package/build/utils/caption.js.map +1 -1
  91. package/build/utils/hooks.js +1 -0
  92. package/build/utils/hooks.js.map +1 -1
  93. package/build/video/edit.native.js +1 -1
  94. package/build/video/edit.native.js.map +1 -1
  95. package/build-module/block/edit.js +23 -17
  96. package/build-module/block/edit.js.map +1 -1
  97. package/build-module/button/edit.native.js +1 -1
  98. package/build-module/button/edit.native.js.map +1 -1
  99. package/build-module/code/save.js +3 -1
  100. package/build-module/code/save.js.map +1 -1
  101. package/build-module/cover/edit/index.js +2 -1
  102. package/build-module/cover/edit/index.js.map +1 -1
  103. package/build-module/details/edit.js +1 -0
  104. package/build-module/details/edit.js.map +1 -1
  105. package/build-module/file/edit.js +2 -0
  106. package/build-module/file/edit.js.map +1 -1
  107. package/build-module/heading/index.js +4 -3
  108. package/build-module/heading/index.js.map +1 -1
  109. package/build-module/image/edit.js +11 -40
  110. package/build-module/image/edit.js.map +1 -1
  111. package/build-module/image/image.js +27 -6
  112. package/build-module/image/image.js.map +1 -1
  113. package/build-module/media-text/edit.js +34 -10
  114. package/build-module/media-text/edit.js.map +1 -1
  115. package/build-module/media-text/index.js +5 -0
  116. package/build-module/media-text/index.js.map +1 -1
  117. package/build-module/media-text/media-container.js +31 -12
  118. package/build-module/media-text/media-container.js.map +1 -1
  119. package/build-module/media-text/save.js +2 -2
  120. package/build-module/media-text/save.js.map +1 -1
  121. package/build-module/navigation/edit/index.js +24 -30
  122. package/build-module/navigation/edit/index.js.map +1 -1
  123. package/build-module/navigation/edit/navigation-menu-delete-control.js +15 -23
  124. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  125. package/build-module/navigation/edit/navigation-menu-selector.js +24 -23
  126. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  127. package/build-module/navigation/edit/placeholder/index.js +4 -4
  128. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  129. package/build-module/navigation/use-navigation-menu.js +15 -12
  130. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  131. package/build-module/navigation/view.js +12 -2
  132. package/build-module/navigation/view.js.map +1 -1
  133. package/build-module/navigation-link/edit.js +55 -30
  134. package/build-module/navigation-link/edit.js.map +1 -1
  135. package/build-module/navigation-submenu/edit.js +31 -9
  136. package/build-module/navigation-submenu/edit.js.map +1 -1
  137. package/build-module/pattern/edit.js +3 -1
  138. package/build-module/pattern/edit.js.map +1 -1
  139. package/build-module/post-author/edit.js +1 -0
  140. package/build-module/post-author/edit.js.map +1 -1
  141. package/build-module/post-excerpt/edit.js +1 -0
  142. package/build-module/post-excerpt/edit.js.map +1 -1
  143. package/build-module/post-featured-image/edit.js +17 -5
  144. package/build-module/post-featured-image/edit.js.map +1 -1
  145. package/build-module/post-featured-image/index.js +13 -2
  146. package/build-module/post-featured-image/index.js.map +1 -1
  147. package/build-module/post-featured-image/overlay-controls.js +75 -0
  148. package/build-module/post-featured-image/overlay-controls.js.map +1 -0
  149. package/build-module/post-featured-image/overlay.js +7 -56
  150. package/build-module/post-featured-image/overlay.js.map +1 -1
  151. package/build-module/post-navigation-link/edit.js +1 -0
  152. package/build-module/post-navigation-link/edit.js.map +1 -1
  153. package/build-module/post-terms/edit.js +2 -0
  154. package/build-module/post-terms/edit.js.map +1 -1
  155. package/build-module/quote/edit.js +20 -25
  156. package/build-module/quote/edit.js.map +1 -1
  157. package/build-module/read-more/edit.js +1 -0
  158. package/build-module/read-more/edit.js.map +1 -1
  159. package/build-module/search/edit.js +2 -0
  160. package/build-module/search/edit.js.map +1 -1
  161. package/build-module/search/edit.native.js +2 -2
  162. package/build-module/search/edit.native.js.map +1 -1
  163. package/build-module/site-tagline/edit.js +14 -5
  164. package/build-module/site-tagline/edit.js.map +1 -1
  165. package/build-module/site-tagline/index.js +4 -0
  166. package/build-module/site-tagline/index.js.map +1 -1
  167. package/build-module/social-link/edit.js +1 -1
  168. package/build-module/social-link/edit.js.map +1 -1
  169. package/build-module/social-link/icons/medium.js +1 -1
  170. package/build-module/social-link/icons/medium.js.map +1 -1
  171. package/build-module/social-link/icons/reddit.js +1 -1
  172. package/build-module/social-link/icons/reddit.js.map +1 -1
  173. package/build-module/table/deprecated.js +286 -176
  174. package/build-module/table/deprecated.js.map +1 -1
  175. package/build-module/table/index.js +1 -1
  176. package/build-module/template-part/edit/index.js +58 -50
  177. package/build-module/template-part/edit/index.js.map +1 -1
  178. package/build-module/template-part/edit/inner-blocks.js +108 -12
  179. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  180. package/build-module/template-part/edit/selection-modal.js +2 -10
  181. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  182. package/build-module/utils/caption.js +19 -13
  183. package/build-module/utils/caption.js.map +1 -1
  184. package/build-module/utils/hooks.js +1 -0
  185. package/build-module/utils/hooks.js.map +1 -1
  186. package/build-module/video/edit.native.js +1 -1
  187. package/build-module/video/edit.native.js.map +1 -1
  188. package/build-style/audio/theme-rtl.css +1 -1
  189. package/build-style/audio/theme.css +1 -1
  190. package/build-style/cover/style-rtl.css +5 -2
  191. package/build-style/cover/style.css +5 -2
  192. package/build-style/editor-rtl.css +22 -12
  193. package/build-style/editor.css +22 -12
  194. package/build-style/embed/theme-rtl.css +1 -1
  195. package/build-style/embed/theme.css +1 -1
  196. package/build-style/file/editor-rtl.css +3 -0
  197. package/build-style/file/editor.css +3 -0
  198. package/build-style/image/editor-rtl.css +0 -3
  199. package/build-style/image/editor.css +0 -3
  200. package/build-style/image/theme-rtl.css +1 -1
  201. package/build-style/image/theme.css +1 -1
  202. package/build-style/media-text/editor-rtl.css +7 -1
  203. package/build-style/media-text/editor.css +7 -1
  204. package/build-style/pullquote/theme-rtl.css +2 -1
  205. package/build-style/pullquote/theme.css +2 -1
  206. package/build-style/quote/theme-rtl.css +6 -6
  207. package/build-style/quote/theme.css +6 -6
  208. package/build-style/search/style-rtl.css +10 -0
  209. package/build-style/search/style.css +10 -0
  210. package/build-style/social-links/editor-rtl.css +0 -4
  211. package/build-style/social-links/editor.css +0 -4
  212. package/build-style/social-links/style-rtl.css +2 -2
  213. package/build-style/social-links/style.css +2 -2
  214. package/build-style/style-rtl.css +17 -4
  215. package/build-style/style.css +17 -4
  216. package/build-style/table/theme-rtl.css +4 -3
  217. package/build-style/table/theme.css +4 -3
  218. package/build-style/template-part/editor-rtl.css +12 -4
  219. package/build-style/template-part/editor.css +12 -4
  220. package/build-style/template-part/theme-rtl.css +1 -1
  221. package/build-style/template-part/theme.css +1 -1
  222. package/build-style/theme-rtl.css +17 -15
  223. package/build-style/theme.css +17 -15
  224. package/build-style/video/theme-rtl.css +1 -1
  225. package/build-style/video/theme.css +1 -1
  226. package/package.json +34 -34
  227. package/src/archives/index.php +4 -0
  228. package/src/audio/theme.scss +1 -1
  229. package/src/avatar/index.php +6 -0
  230. package/src/block/edit.js +43 -32
  231. package/src/block/index.php +4 -0
  232. package/src/block/test/edit.native.js +67 -0
  233. package/src/button/edit.native.js +1 -1
  234. package/src/calendar/index.php +12 -0
  235. package/src/categories/index.php +6 -0
  236. package/src/code/save.js +7 -1
  237. package/src/comment-author-name/index.php +4 -0
  238. package/src/comment-content/index.php +4 -0
  239. package/src/comment-date/index.php +4 -0
  240. package/src/comment-edit-link/index.php +4 -0
  241. package/src/comment-reply-link/index.php +4 -0
  242. package/src/comment-template/index.php +4 -0
  243. package/src/comments/index.php +10 -0
  244. package/src/comments-pagination/index.php +4 -0
  245. package/src/comments-pagination-next/index.php +4 -0
  246. package/src/comments-pagination-numbers/index.php +4 -0
  247. package/src/comments-pagination-previous/index.php +4 -0
  248. package/src/comments-title/index.php +4 -0
  249. package/src/cover/edit/index.js +4 -1
  250. package/src/cover/index.php +4 -0
  251. package/src/cover/style.scss +6 -2
  252. package/src/details/edit.js +1 -0
  253. package/src/embed/theme.scss +1 -1
  254. package/src/file/edit.js +2 -0
  255. package/src/file/editor.scss +3 -0
  256. package/src/file/index.php +4 -0
  257. package/src/gallery/editor.scss +1 -1
  258. package/src/gallery/index.php +7 -1
  259. package/src/heading/index.js +4 -3
  260. package/src/heading/index.php +4 -0
  261. package/src/home-link/index.php +10 -0
  262. package/src/image/edit.js +11 -40
  263. package/src/image/editor.scss +2 -7
  264. package/src/image/image.js +25 -7
  265. package/src/image/index.php +12 -1
  266. package/src/image/theme.scss +1 -1
  267. package/src/latest-comments/index.php +4 -0
  268. package/src/latest-posts/index.php +8 -0
  269. package/src/loginout/index.php +4 -0
  270. package/src/media-text/block.json +5 -0
  271. package/src/media-text/edit.js +70 -19
  272. package/src/media-text/editor.scss +7 -1
  273. package/src/media-text/index.php +70 -0
  274. package/src/media-text/media-container.js +49 -9
  275. package/src/media-text/save.js +2 -2
  276. package/src/navigation/edit/index.js +67 -71
  277. package/src/navigation/edit/navigation-menu-delete-control.js +22 -49
  278. package/src/navigation/edit/navigation-menu-selector.js +39 -21
  279. package/src/navigation/edit/placeholder/index.js +4 -4
  280. package/src/navigation/edit/test/navigation-menu-selector.js +75 -53
  281. package/src/navigation/index.php +109 -26
  282. package/src/navigation/test/use-navigation-menu.js +21 -21
  283. package/src/navigation/use-navigation-menu.js +23 -9
  284. package/src/navigation/view.js +11 -2
  285. package/src/navigation-link/edit.js +64 -39
  286. package/src/navigation-link/index.php +14 -0
  287. package/src/navigation-submenu/edit.js +34 -10
  288. package/src/navigation-submenu/index.php +8 -0
  289. package/src/page-list/index.php +12 -0
  290. package/src/page-list-item/index.php +2 -0
  291. package/src/pattern/edit.js +4 -0
  292. package/src/pattern/index.php +2 -0
  293. package/src/post-author/edit.js +1 -0
  294. package/src/post-author/index.php +4 -0
  295. package/src/post-author-biography/index.php +4 -0
  296. package/src/post-author-name/index.php +4 -0
  297. package/src/post-comments-form/index.php +6 -0
  298. package/src/post-content/index.php +4 -0
  299. package/src/post-date/index.php +4 -0
  300. package/src/post-excerpt/edit.js +1 -0
  301. package/src/post-excerpt/index.php +4 -0
  302. package/src/post-featured-image/block.json +13 -2
  303. package/src/post-featured-image/edit.js +16 -1
  304. package/src/post-featured-image/editor.scss +1 -1
  305. package/src/post-featured-image/index.php +15 -0
  306. package/src/post-featured-image/overlay-controls.js +88 -0
  307. package/src/post-featured-image/overlay.js +17 -84
  308. package/src/post-navigation-link/edit.js +1 -0
  309. package/src/post-navigation-link/index.php +4 -0
  310. package/src/post-template/index.php +4 -0
  311. package/src/post-terms/edit.js +2 -0
  312. package/src/post-terms/index.php +6 -0
  313. package/src/post-title/index.php +2 -0
  314. package/src/pullquote/theme.scss +3 -1
  315. package/src/query/index.php +2 -0
  316. package/src/query-no-results/index.php +6 -0
  317. package/src/query-pagination/index.php +4 -0
  318. package/src/query-pagination-next/index.php +6 -0
  319. package/src/query-pagination-numbers/index.php +6 -0
  320. package/src/query-pagination-previous/index.php +4 -0
  321. package/src/query-title/index.php +4 -0
  322. package/src/quote/edit.js +27 -37
  323. package/src/quote/test/edit.native.js +4 -6
  324. package/src/quote/theme.scss +1 -2
  325. package/src/read-more/edit.js +1 -0
  326. package/src/read-more/index.php +4 -0
  327. package/src/rss/index.php +4 -0
  328. package/src/search/edit.js +2 -0
  329. package/src/search/edit.native.js +2 -2
  330. package/src/search/index.php +19 -1
  331. package/src/search/style.scss +11 -0
  332. package/src/shortcode/index.php +4 -0
  333. package/src/site-logo/editor.scss +2 -2
  334. package/src/site-logo/index.php +20 -0
  335. package/src/site-tagline/block.json +4 -0
  336. package/src/site-tagline/edit.js +16 -3
  337. package/src/site-tagline/index.php +13 -1
  338. package/src/site-title/index.php +4 -0
  339. package/src/social-link/edit.js +1 -1
  340. package/src/social-link/icons/medium.js +1 -1
  341. package/src/social-link/icons/reddit.js +1 -1
  342. package/src/social-link/index.php +22 -9
  343. package/src/social-link/socials-with-bg.scss +1 -1
  344. package/src/social-link/socials-without-bg.scss +1 -1
  345. package/src/social-links/editor.scss +1 -9
  346. package/src/table/block.json +1 -1
  347. package/src/table/deprecated.js +308 -175
  348. package/src/table/theme.scss +4 -2
  349. package/src/tag-cloud/index.php +4 -0
  350. package/src/template-part/edit/index.js +87 -79
  351. package/src/template-part/edit/inner-blocks.js +126 -13
  352. package/src/template-part/edit/selection-modal.js +1 -22
  353. package/src/template-part/editor.scss +11 -3
  354. package/src/template-part/index.php +12 -0
  355. package/src/template-part/theme.scss +1 -1
  356. package/src/term-description/index.php +4 -0
  357. package/src/utils/caption.js +19 -16
  358. package/src/utils/hooks.js +1 -0
  359. package/src/video/edit.native.js +2 -0
  360. package/src/video/editor.scss +2 -2
  361. package/src/video/theme.scss +1 -1
  362. package/tsconfig.json +1 -0
@@ -95,6 +95,7 @@ export default function PostTermsEdit( {
95
95
  { isLoading && hasPost && <Spinner /> }
96
96
  { ! isLoading && ( isSelected || prefix ) && (
97
97
  <RichText
98
+ identifier="prefix"
98
99
  allowedFormats={ ALLOWED_FORMATS }
99
100
  className="wp-block-post-terms__prefix"
100
101
  aria-label={ __( 'Prefix' ) }
@@ -138,6 +139,7 @@ export default function PostTermsEdit( {
138
139
  __( 'Term items not found.' ) ) }
139
140
  { ! isLoading && ( isSelected || suffix ) && (
140
141
  <RichText
142
+ identifier="suffix"
141
143
  allowedFormats={ ALLOWED_FORMATS }
142
144
  className="wp-block-post-terms__suffix"
143
145
  aria-label={ __( 'Suffix' ) }
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Renders the `core/post-terms` block on the server.
10
10
  *
11
+ * @since 5.8.0
12
+ *
11
13
  * @param array $attributes Block attributes.
12
14
  * @param string $content Block default content.
13
15
  * @param WP_Block $block Block instance.
@@ -61,6 +63,8 @@ function render_block_core_post_terms( $attributes, $content, $block ) {
61
63
  /**
62
64
  * Returns the available variations for the `core/post-terms` block.
63
65
  *
66
+ * @since 6.5.0
67
+ *
64
68
  * @return array The available variations for the block.
65
69
  */
66
70
  function block_core_post_terms_build_variations() {
@@ -110,6 +114,8 @@ function block_core_post_terms_build_variations() {
110
114
 
111
115
  /**
112
116
  * Registers the `core/post-terms` block on the server.
117
+ *
118
+ * @since 5.8.0
113
119
  */
114
120
  function register_block_core_post_terms() {
115
121
  register_block_type_from_metadata(
@@ -60,6 +60,8 @@ function render_block_core_post_title( $attributes, $content, $block ) {
60
60
 
61
61
  /**
62
62
  * Registers the `core/post-title` block on the server.
63
+ *
64
+ * @since 5.8.0
63
65
  */
64
66
  function register_block_core_post_title() {
65
67
  register_block_type_from_metadata(
@@ -1,9 +1,11 @@
1
- .wp-block-pullquote {
1
+ :where(.wp-block-pullquote) {
2
2
  border-top: 4px solid currentColor;
3
3
  border-bottom: 4px solid currentColor;
4
4
  margin-bottom: 1.75em;
5
5
  color: currentColor;
6
+ }
6
7
 
8
+ .wp-block-pullquote {
7
9
  cite,
8
10
  footer,
9
11
  &__citation {
@@ -77,6 +77,8 @@ function render_block_core_query( $attributes, $content, $block ) {
77
77
 
78
78
  /**
79
79
  * Registers the `core/query` block on the server.
80
+ *
81
+ * @since 5.8.0
80
82
  */
81
83
  function register_block_core_query() {
82
84
  register_block_type_from_metadata(
@@ -8,6 +8,10 @@
8
8
  /**
9
9
  * Renders the `core/query-no-results` block on the server.
10
10
  *
11
+ * @since 6.0.0
12
+ *
13
+ * @global WP_Query $wp_query WordPress Query object.
14
+ *
11
15
  * @param array $attributes Block attributes.
12
16
  * @param string $content Block default content.
13
17
  * @param WP_Block $block Block instance.
@@ -47,6 +51,8 @@ function render_block_core_query_no_results( $attributes, $content, $block ) {
47
51
 
48
52
  /**
49
53
  * Registers the `core/query-no-results` block on the server.
54
+ *
55
+ * @since 6.0.0
50
56
  */
51
57
  function register_block_core_query_no_results() {
52
58
  register_block_type_from_metadata(
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Renders the `core/query-pagination` block on the server.
10
10
  *
11
+ * @since 5.9.0
12
+ *
11
13
  * @param array $attributes Block attributes.
12
14
  * @param string $content Block default content.
13
15
  *
@@ -35,6 +37,8 @@ function render_block_core_query_pagination( $attributes, $content ) {
35
37
 
36
38
  /**
37
39
  * Registers the `core/query-pagination` block on the server.
40
+ *
41
+ * @since 5.8.0
38
42
  */
39
43
  function register_block_core_query_pagination() {
40
44
  register_block_type_from_metadata(
@@ -8,6 +8,10 @@
8
8
  /**
9
9
  * Renders the `core/query-pagination-next` block on the server.
10
10
  *
11
+ * @since 5.8.0
12
+ *
13
+ * @global WP_Query $wp_query WordPress Query object.
14
+ *
11
15
  * @param array $attributes Block attributes.
12
16
  * @param string $content Block default content.
13
17
  * @param WP_Block $block Block instance.
@@ -84,6 +88,8 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
84
88
 
85
89
  /**
86
90
  * Registers the `core/query-pagination-next` block on the server.
91
+ *
92
+ * @since 5.8.0
87
93
  */
88
94
  function register_block_core_query_pagination_next() {
89
95
  register_block_type_from_metadata(
@@ -8,6 +8,10 @@
8
8
  /**
9
9
  * Renders the `core/query-pagination-numbers` block on the server.
10
10
  *
11
+ * @since 5.8.0
12
+ *
13
+ * @global WP_Query $wp_query WordPress Query object.
14
+ *
11
15
  * @param array $attributes Block attributes.
12
16
  * @param string $content Block default content.
13
17
  * @param WP_Block $block Block instance.
@@ -115,6 +119,8 @@ function render_block_core_query_pagination_numbers( $attributes, $content, $blo
115
119
 
116
120
  /**
117
121
  * Registers the `core/query-pagination-numbers` block on the server.
122
+ *
123
+ * @since 5.8.0
118
124
  */
119
125
  function register_block_core_query_pagination_numbers() {
120
126
  register_block_type_from_metadata(
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Renders the `core/query-pagination-previous` block on the server.
10
10
  *
11
+ * @since 5.8.0
12
+ *
11
13
  * @param array $attributes Block attributes.
12
14
  * @param string $content Block default content.
13
15
  * @param WP_Block $block Block instance.
@@ -72,6 +74,8 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
72
74
 
73
75
  /**
74
76
  * Registers the `core/query-pagination-previous` block on the server.
77
+ *
78
+ * @since 5.8.0
75
79
  */
76
80
  function register_block_core_query_pagination_previous() {
77
81
  register_block_type_from_metadata(
@@ -10,6 +10,8 @@
10
10
  * For now it only supports Archive title,
11
11
  * using queried object information
12
12
  *
13
+ * @since 5.8.0
14
+ *
13
15
  * @param array $attributes Block attributes.
14
16
  *
15
17
  * @return string Returns the query title based on the queried object.
@@ -60,6 +62,8 @@ function render_block_core_query_title( $attributes ) {
60
62
 
61
63
  /**
62
64
  * Registers the `core/query-title` block on the server.
65
+ *
66
+ * @since 5.8.0
63
67
  */
64
68
  function register_block_core_query_title() {
65
69
  register_block_type_from_metadata(
package/src/quote/edit.js CHANGED
@@ -10,21 +10,21 @@ import { __ } from '@wordpress/i18n';
10
10
  import {
11
11
  AlignmentControl,
12
12
  BlockControls,
13
- RichText,
14
13
  useBlockProps,
15
14
  useInnerBlocksProps,
16
15
  store as blockEditorStore,
17
16
  } from '@wordpress/block-editor';
18
17
  import { BlockQuotation } from '@wordpress/components';
19
- import { useDispatch, useSelect, useRegistry } from '@wordpress/data';
20
- import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
18
+ import { useDispatch, useRegistry } from '@wordpress/data';
21
19
  import { Platform, useEffect } from '@wordpress/element';
22
20
  import deprecated from '@wordpress/deprecated';
21
+ import { verse } from '@wordpress/icons';
23
22
 
24
23
  /**
25
24
  * Internal dependencies
26
25
  */
27
26
  import { migrateToQuoteV2 } from './deprecated';
27
+ import { Caption } from '../utils/caption';
28
28
 
29
29
  const isWebPlatform = Platform.OS === 'web';
30
30
 
@@ -73,17 +73,12 @@ export default function QuoteEdit( {
73
73
  clientId,
74
74
  className,
75
75
  style,
76
+ isSelected,
76
77
  } ) {
77
- const { textAlign, citation } = attributes;
78
+ const { textAlign } = attributes;
78
79
 
79
80
  useMigrateOnLoad( attributes, clientId );
80
81
 
81
- const hasSelection = useSelect( ( select ) => {
82
- const { isBlockSelected, hasSelectedInnerBlock } =
83
- select( blockEditorStore );
84
- return hasSelectedInnerBlock( clientId ) || isBlockSelected( clientId );
85
- }, [] );
86
-
87
82
  const blockProps = useBlockProps( {
88
83
  className: classNames( className, {
89
84
  [ `has-text-align-${ textAlign }` ]: textAlign,
@@ -94,6 +89,7 @@ export default function QuoteEdit( {
94
89
  template: TEMPLATE,
95
90
  templateInsertUpdatesSelection: true,
96
91
  __experimentalCaptureToolbars: true,
92
+ renderAppender: false,
97
93
  } );
98
94
 
99
95
  return (
@@ -108,33 +104,27 @@ export default function QuoteEdit( {
108
104
  </BlockControls>
109
105
  <BlockQuotation { ...innerBlocksProps }>
110
106
  { innerBlocksProps.children }
111
- { ( ! RichText.isEmpty( citation ) || hasSelection ) && (
112
- <RichText
113
- identifier="citation"
114
- tagName={ isWebPlatform ? 'cite' : undefined }
115
- style={ { display: 'block' } }
116
- value={ citation }
117
- onChange={ ( nextCitation ) => {
118
- setAttributes( {
119
- citation: nextCitation,
120
- } );
121
- } }
122
- __unstableMobileNoFocusOnMount
123
- aria-label={ __( 'Quote citation' ) }
124
- placeholder={
125
- // translators: placeholder text used for the
126
- // citation
127
- __( 'Add citation' )
128
- }
129
- className="wp-block-quote__citation"
130
- __unstableOnSplitAtEnd={ () =>
131
- insertBlocksAfter(
132
- createBlock( getDefaultBlockName() )
133
- )
134
- }
135
- { ...( ! isWebPlatform ? { textAlign } : {} ) }
136
- />
137
- ) }
107
+ <Caption
108
+ attributeKey="citation"
109
+ tagName={ isWebPlatform ? 'cite' : undefined }
110
+ style={ isWebPlatform && { display: 'block' } }
111
+ isSelected={ isSelected }
112
+ attributes={ attributes }
113
+ setAttributes={ setAttributes }
114
+ __unstableMobileNoFocusOnMount
115
+ icon={ verse }
116
+ label={ __( 'Quote citation' ) }
117
+ placeholder={
118
+ // translators: placeholder text used for the
119
+ // citation
120
+ __( 'Add citation' )
121
+ }
122
+ addLabel={ __( 'Add citation' ) }
123
+ removeLabel={ __( 'Remove citation' ) }
124
+ className="wp-block-quote__citation"
125
+ insertBlocksAfter={ insertBlocksAfter }
126
+ { ...( ! isWebPlatform ? { textAlign } : {} ) }
127
+ />
138
128
  </BlockQuotation>
139
129
  </>
140
130
  );
@@ -10,7 +10,6 @@ import {
10
10
  getEditorHtml,
11
11
  fireEvent,
12
12
  within,
13
- waitFor,
14
13
  typeInRichText,
15
14
  } from 'test/helpers';
16
15
 
@@ -40,14 +39,9 @@ describe( 'Quote', () => {
40
39
  },
41
40
  }
42
41
  );
43
- // Await inner blocks to be rendered
44
- const citationBlock = await waitFor( () =>
45
- screen.getByPlaceholderText( 'Add citation' )
46
- );
47
42
 
48
43
  // Act
49
44
  fireEvent.press( quoteBlock );
50
- // screen.debug();
51
45
  let quoteTextInput =
52
46
  within( quoteBlock ).getByPlaceholderText( 'Start writing…' );
53
47
  typeInRichText( quoteTextInput, 'A great statement.' );
@@ -61,6 +55,10 @@ describe( 'Quote', () => {
61
55
  'Start writing…'
62
56
  )[ 1 ];
63
57
  typeInRichText( quoteTextInput, 'Again.' );
58
+ fireEvent.press( screen.getByLabelText( 'Navigate Up' ) );
59
+ fireEvent.press( screen.getByLabelText( 'Add citation' ) );
60
+ const citationBlock =
61
+ await screen.findByPlaceholderText( 'Add citation' );
64
62
  const citationTextInput =
65
63
  within( citationBlock ).getByPlaceholderText( 'Add citation' );
66
64
  typeInRichText( citationTextInput, 'A person' );
@@ -1,8 +1,7 @@
1
- .wp-block-quote {
1
+ :where(.wp-block-quote) {
2
2
  border-left: 0.25em solid currentColor;
3
3
  margin: 0 0 1.75em 0;
4
4
  padding-left: 1em;
5
-
6
5
  cite,
7
6
  footer {
8
7
  color: currentColor;
@@ -33,6 +33,7 @@ export default function ReadMore( {
33
33
  </PanelBody>
34
34
  </InspectorControls>
35
35
  <RichText
36
+ identifier="content"
36
37
  tagName="a"
37
38
  aria-label={ __( '“Read more” link text' ) }
38
39
  placeholder={ __( 'Read more' ) }
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Renders the `core/read-more` block on the server.
10
10
  *
11
+ * @since 6.0.0
12
+ *
11
13
  * @param array $attributes Block attributes.
12
14
  * @param string $content Block default content.
13
15
  * @param WP_Block $block Block instance.
@@ -47,6 +49,8 @@ function render_block_core_read_more( $attributes, $content, $block ) {
47
49
 
48
50
  /**
49
51
  * Registers the `core/read-more` block on the server.
52
+ *
53
+ * @since 6.0.0
50
54
  */
51
55
  function register_block_core_read_more() {
52
56
  register_block_type_from_metadata(
package/src/rss/index.php CHANGED
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Renders the `core/rss` block on server.
10
10
  *
11
+ * @since 5.2.0
12
+ *
11
13
  * @param array $attributes The block attributes.
12
14
  *
13
15
  * @return string Returns the block content with received rss items.
@@ -107,6 +109,8 @@ function render_block_core_rss( $attributes ) {
107
109
 
108
110
  /**
109
111
  * Registers the `core/rss` block on server.
112
+ *
113
+ * @since 5.2.0
110
114
  */
111
115
  function register_block_core_rss() {
112
116
  register_block_type_from_metadata(
@@ -347,6 +347,7 @@ export default function SearchEdit( {
347
347
 
348
348
  { ! buttonUseIcon && (
349
349
  <RichText
350
+ identifier="buttonText"
350
351
  className={ buttonClasses }
351
352
  style={ buttonStyles }
352
353
  aria-label={ __( 'Button text' ) }
@@ -546,6 +547,7 @@ export default function SearchEdit( {
546
547
 
547
548
  { showLabel && (
548
549
  <RichText
550
+ identifier="label"
549
551
  className={ labelClassnames }
550
552
  aria-label={ __( 'Label text' ) }
551
553
  placeholder={ __( 'Add label…' ) }
@@ -395,7 +395,7 @@ export default function SearchEdit( {
395
395
  >
396
396
  <RichText
397
397
  className="wp-block-search__button"
398
- identifier="text"
398
+ identifier="buttonText"
399
399
  tagName="p"
400
400
  style={ richTextButtonStyle }
401
401
  placeholder={ buttonPlaceholderText }
@@ -449,7 +449,7 @@ export default function SearchEdit( {
449
449
  >
450
450
  <RichText
451
451
  className="wp-block-search__label"
452
- identifier="text"
452
+ identifier="label"
453
453
  tagName="p"
454
454
  style={ styles.richTextLabel }
455
455
  placeholder={ __( 'Add label…' ) }
@@ -207,6 +207,8 @@ function render_block_core_search( $attributes ) {
207
207
 
208
208
  /**
209
209
  * Registers the `core/search` block on the server.
210
+ *
211
+ * @since 5.2.0
210
212
  */
211
213
  function register_block_core_search() {
212
214
  register_block_type_from_metadata(
@@ -221,6 +223,8 @@ add_action( 'init', 'register_block_core_search' );
221
223
  /**
222
224
  * Builds the correct top level classnames for the 'core/search' block.
223
225
  *
226
+ * @since 5.6.0
227
+ *
224
228
  * @param array $attributes The block attributes.
225
229
  *
226
230
  * @return string The classnames used in the block.
@@ -265,6 +269,8 @@ function classnames_for_block_core_search( $attributes ) {
265
269
  * or not, the generated rule is injected into the appropriate collection of
266
270
  * styles for later application in the block's markup.
267
271
  *
272
+ * @since 6.1.0
273
+ *
268
274
  * @param array $attributes The block attributes.
269
275
  * @param string $property Border property to generate rule for e.g. width or color.
270
276
  * @param string $side Optional side border. The dictates the value retrieved and final CSS property.
@@ -310,6 +316,8 @@ function apply_block_core_search_border_style( $attributes, $property, $side, &$
310
316
  * injects rules into the provided wrapper, button and input style arrays for
311
317
  * uniform "flat" borders or those with individual sides configured.
312
318
  *
319
+ * @since 6.1.0
320
+ *
313
321
  * @param array $attributes The block attributes.
314
322
  * @param string $property Border property to generate rule for e.g. width or color.
315
323
  * @param array $wrapper_styles Current collection of wrapper styles.
@@ -331,6 +339,8 @@ function apply_block_core_search_border_styles( $attributes, $property, &$wrappe
331
339
  * inner input or button and a second for the inner wrapper should the block
332
340
  * be positioning the button "inside".
333
341
  *
342
+ * @since 5.8.0
343
+ *
334
344
  * @param array $attributes The block attributes.
335
345
  *
336
346
  * @return array Style HTML attribute.
@@ -457,7 +467,9 @@ function styles_for_block_core_search( $attributes ) {
457
467
  }
458
468
 
459
469
  /**
460
- * Returns typography classnames depending on whether there are named font sizes/families .
470
+ * Returns typography classnames depending on whether there are named font sizes/families.
471
+ *
472
+ * @since 6.1.0
461
473
  *
462
474
  * @param array $attributes The block attributes.
463
475
  *
@@ -483,6 +495,8 @@ function get_typography_classes_for_block_core_search( $attributes ) {
483
495
  * Returns typography styles to be included in an HTML style tag.
484
496
  * This excludes text-decoration, which is applied only to the label and button elements of the search block.
485
497
  *
498
+ * @since 6.1.0
499
+ *
486
500
  * @param array $attributes The block attributes.
487
501
  *
488
502
  * @return string A string of typography CSS declarations.
@@ -533,6 +547,8 @@ function get_typography_styles_for_block_core_search( $attributes ) {
533
547
  /**
534
548
  * Returns border color classnames depending on whether there are named or custom border colors.
535
549
  *
550
+ * @since 5.9.0
551
+ *
536
552
  * @param array $attributes The block attributes.
537
553
  *
538
554
  * @return string The border color classnames to be applied to the block elements.
@@ -556,6 +572,8 @@ function get_border_color_classes_for_block_core_search( $attributes ) {
556
572
  /**
557
573
  * Returns color classnames depending on whether there are named or custom text and background colors.
558
574
  *
575
+ * @since 5.9.0
576
+ *
559
577
  * @param array $attributes The block attributes.
560
578
  *
561
579
  * @return string The color classnames to be applied to the block elements.
@@ -97,6 +97,17 @@ $button-spacing-y: math.div($grid-unit-15, 2); // 6px
97
97
  }
98
98
  }
99
99
 
100
+ // We are lowering the specificity so that the input element can override the rule for the input element inside the search block.
101
+ :where(.wp-block-search__input) {
102
+ font-family: inherit;
103
+ font-weight: inherit;
104
+ font-size: inherit;
105
+ line-height: inherit;
106
+ letter-spacing: inherit;
107
+ text-transform: inherit;
108
+ font-style: inherit;
109
+ }
110
+
100
111
  // We are lowering the specificity so that the button element can override the rule for the button inside the search block.
101
112
  :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
102
113
  padding: $grid-unit-05;
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Performs wpautop() on the shortcode block content.
10
10
  *
11
+ * @since 5.0.0
12
+ *
11
13
  * @param array $attributes The block attributes.
12
14
  * @param string $content The block content.
13
15
  *
@@ -19,6 +21,8 @@ function render_block_core_shortcode( $attributes, $content ) {
19
21
 
20
22
  /**
21
23
  * Registers the `core/shortcode` block on server.
24
+ *
25
+ * @since 5.0.0
22
26
  */
23
27
  function register_block_core_shortcode() {
24
28
  register_block_type_from_metadata(
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  // Provide special styling for the placeholder.
34
- // @todo: this particular minimal style of placeholder could be componentized further.
34
+ // @todo this particular minimal style of placeholder could be componentized further.
35
35
  .wp-block-site-logo.wp-block-site-logo {
36
36
 
37
37
  &.is-default-size .components-placeholder {
@@ -54,7 +54,7 @@
54
54
  border-radius: inherit;
55
55
 
56
56
  // Provide a minimum size for the placeholder, for when the logo is resized.
57
- // @todo: resizing is currently only possible by adding an image, resizing,
57
+ // @todo resizing is currently only possible by adding an image, resizing,
58
58
  // and then removing the image again. We might want to enable resizing on the
59
59
  // placeholder itself.
60
60
  min-height: $grid-unit-60;
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Renders the `core/site-logo` block on the server.
10
10
  *
11
+ * @since 5.8.0
12
+ *
11
13
  * @param array $attributes The block attributes.
12
14
  *
13
15
  * @return string The render.
@@ -60,6 +62,8 @@ function render_block_core_site_logo( $attributes ) {
60
62
 
61
63
  /**
62
64
  * Register a core site setting for a site logo
65
+ *
66
+ * @since 5.8.0
63
67
  */
64
68
  function register_block_core_site_logo_setting() {
65
69
  register_setting(
@@ -79,6 +83,8 @@ add_action( 'rest_api_init', 'register_block_core_site_logo_setting', 10 );
79
83
 
80
84
  /**
81
85
  * Register a core site setting for a site icon
86
+ *
87
+ * @since 5.9.0
82
88
  */
83
89
  function register_block_core_site_icon_setting() {
84
90
  register_setting(
@@ -96,6 +102,8 @@ add_action( 'rest_api_init', 'register_block_core_site_icon_setting', 10 );
96
102
 
97
103
  /**
98
104
  * Registers the `core/site-logo` block on the server.
105
+ *
106
+ * @since 5.8.0
99
107
  */
100
108
  function register_block_core_site_logo() {
101
109
  register_block_type_from_metadata(
@@ -111,6 +119,8 @@ add_action( 'init', 'register_block_core_site_logo' );
111
119
  /**
112
120
  * Overrides the custom logo with a site logo, if the option is set.
113
121
  *
122
+ * @since 5.8.0
123
+ *
114
124
  * @param string $custom_logo The custom logo set by a theme.
115
125
  *
116
126
  * @return string The site logo if set.
@@ -125,6 +135,8 @@ add_filter( 'theme_mod_custom_logo', '_override_custom_logo_theme_mod' );
125
135
  /**
126
136
  * Updates the site_logo option when the custom_logo theme-mod gets updated.
127
137
  *
138
+ * @since 5.8.0
139
+ *
128
140
  * @param mixed $value Attachment ID of the custom logo or an empty value.
129
141
  * @return mixed
130
142
  */
@@ -143,6 +155,8 @@ add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' );
143
155
  /**
144
156
  * Deletes the site_logo when the custom_logo theme mod is removed.
145
157
  *
158
+ * @since 5.8.0
159
+ *
146
160
  * @param array $old_value Previous theme mod settings.
147
161
  * @param array $value Updated theme mod settings.
148
162
  */
@@ -161,6 +175,8 @@ function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
161
175
 
162
176
  /**
163
177
  * Deletes the site logo when all theme mods are being removed.
178
+ *
179
+ * @since 5.8.0
164
180
  */
165
181
  function _delete_site_logo_on_remove_theme_mods() {
166
182
  global $_ignore_site_logo_changes;
@@ -179,6 +195,8 @@ function _delete_site_logo_on_remove_theme_mods() {
179
195
  * Hooks `_delete_site_logo_on_remove_theme_mods` in `delete_option_theme_mods_$theme`.
180
196
  *
181
197
  * Runs on `setup_theme` to account for dynamically-switched themes in the Customizer.
198
+ *
199
+ * @since 5.8.0
182
200
  */
183
201
  function _delete_site_logo_on_remove_custom_logo_on_setup_theme() {
184
202
  $theme = get_option( 'stylesheet' );
@@ -189,6 +207,8 @@ add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_the
189
207
 
190
208
  /**
191
209
  * Removes the custom_logo theme-mod when the site_logo option gets deleted.
210
+ *
211
+ * @since 5.9.0
192
212
  */
193
213
  function _delete_custom_logo_on_remove_site_logo() {
194
214
  global $_ignore_site_logo_changes;
@@ -10,6 +10,10 @@
10
10
  "attributes": {
11
11
  "textAlign": {
12
12
  "type": "string"
13
+ },
14
+ "level": {
15
+ "type": "number",
16
+ "default": 0
13
17
  }
14
18
  },
15
19
  "example": {},