@automattic/newspack-blocks 4.24.1 → 4.25.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 (102) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/author-profile/view-rtl.css +1 -1
  3. package/dist/author-profile/view.asset.php +1 -1
  4. package/dist/author-profile/view.css +1 -1
  5. package/dist/blocks/author-list/block.json +2 -1
  6. package/dist/blocks/author-profile/block.json +18 -1
  7. package/dist/blocks/carousel/block.json +2 -1
  8. package/dist/blocks/donate/block.json +2 -1
  9. package/dist/blocks/homepage-articles/block.json +2 -1
  10. package/dist/blocks/iframe/block.json +2 -1
  11. package/dist/editor-rtl.css +2 -2
  12. package/dist/editor.asset.php +1 -1
  13. package/dist/editor.css +2 -2
  14. package/dist/editor.js +23 -19
  15. package/dist/placeholder_blocks.asset.php +1 -1
  16. package/dist/placeholder_blocks.js +1 -1
  17. package/includes/class-modal-checkout.php +43 -11
  18. package/includes/class-newspack-blocks-caching.php +13 -1
  19. package/includes/class-newspack-blocks.php +14 -7
  20. package/languages/newspack-blocks-de_DE-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  21. package/languages/newspack-blocks-de_DE-34e5c64f90b1444f3fc735376442eada.json +1 -1
  22. package/languages/newspack-blocks-de_DE-4fdea541976076f02d56139fb35e5b42.json +1 -1
  23. package/languages/newspack-blocks-de_DE-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  24. package/languages/newspack-blocks-de_DE-78456b164809d080adecb4d2b3895802.json +1 -1
  25. package/languages/newspack-blocks-de_DE-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  26. package/languages/newspack-blocks-de_DE-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  27. package/languages/newspack-blocks-de_DE-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  28. package/languages/newspack-blocks-de_DE.po +594 -493
  29. package/languages/newspack-blocks-es_ES-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  30. package/languages/newspack-blocks-es_ES-34e5c64f90b1444f3fc735376442eada.json +1 -1
  31. package/languages/newspack-blocks-es_ES-4fdea541976076f02d56139fb35e5b42.json +1 -1
  32. package/languages/newspack-blocks-es_ES-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  33. package/languages/newspack-blocks-es_ES-78456b164809d080adecb4d2b3895802.json +1 -1
  34. package/languages/newspack-blocks-es_ES-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  35. package/languages/newspack-blocks-es_ES-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  36. package/languages/newspack-blocks-es_ES-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  37. package/languages/newspack-blocks-es_ES.po +594 -493
  38. package/languages/newspack-blocks-fr_BE-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  39. package/languages/newspack-blocks-fr_BE-34e5c64f90b1444f3fc735376442eada.json +1 -1
  40. package/languages/newspack-blocks-fr_BE-4fdea541976076f02d56139fb35e5b42.json +1 -1
  41. package/languages/newspack-blocks-fr_BE-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  42. package/languages/newspack-blocks-fr_BE-78456b164809d080adecb4d2b3895802.json +1 -1
  43. package/languages/newspack-blocks-fr_BE-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  44. package/languages/newspack-blocks-fr_BE-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  45. package/languages/newspack-blocks-fr_BE-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  46. package/languages/newspack-blocks-fr_BE.po +594 -493
  47. package/languages/newspack-blocks-nb_NO-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  48. package/languages/newspack-blocks-nb_NO-34e5c64f90b1444f3fc735376442eada.json +1 -1
  49. package/languages/newspack-blocks-nb_NO-4fdea541976076f02d56139fb35e5b42.json +1 -1
  50. package/languages/newspack-blocks-nb_NO-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  51. package/languages/newspack-blocks-nb_NO-78456b164809d080adecb4d2b3895802.json +1 -1
  52. package/languages/newspack-blocks-nb_NO-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  53. package/languages/newspack-blocks-nb_NO-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  54. package/languages/newspack-blocks-nb_NO-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  55. package/languages/newspack-blocks-nb_NO.po +594 -493
  56. package/languages/newspack-blocks-pt_PT-2d52b39fdbc5d6c94b3514803f3720b8.json +1 -1
  57. package/languages/newspack-blocks-pt_PT-34e5c64f90b1444f3fc735376442eada.json +1 -1
  58. package/languages/newspack-blocks-pt_PT-4fdea541976076f02d56139fb35e5b42.json +1 -1
  59. package/languages/newspack-blocks-pt_PT-53e2a1d5945b8d2b1c35e81ae1e532f3.json +1 -1
  60. package/languages/newspack-blocks-pt_PT-78456b164809d080adecb4d2b3895802.json +1 -1
  61. package/languages/newspack-blocks-pt_PT-9ef9b2c60c897ad79f92951e6e9949a1.json +1 -1
  62. package/languages/newspack-blocks-pt_PT-eccbc51a43c04f59165364eda71e0be7.json +1 -1
  63. package/languages/newspack-blocks-pt_PT-fbe7f8c598cf05d4603ba49fec909ded.json +1 -1
  64. package/languages/newspack-blocks-pt_PT.po +594 -493
  65. package/languages/newspack-blocks.pot +806 -671
  66. package/newspack-blocks.php +5 -5
  67. package/package.json +1 -1
  68. package/src/blocks/author-list/block.json +3 -2
  69. package/src/blocks/author-list/edit.js +15 -8
  70. package/src/blocks/author-list/index.js +4 -3
  71. package/src/blocks/author-list/view.php +1 -0
  72. package/src/blocks/author-profile/block.json +16 -2
  73. package/src/blocks/author-profile/class-wp-rest-newspack-authors-controller.php +180 -9
  74. package/src/blocks/author-profile/context.js +26 -0
  75. package/src/blocks/author-profile/edit.js +847 -84
  76. package/src/blocks/author-profile/editor.scss +18 -14
  77. package/src/blocks/author-profile/index.js +14 -9
  78. package/src/blocks/author-profile/single-author.js +6 -2
  79. package/src/blocks/author-profile/view.php +386 -15
  80. package/src/blocks/author-profile/view.scss +48 -19
  81. package/src/blocks/carousel/block.json +2 -1
  82. package/src/blocks/carousel/edit.js +120 -117
  83. package/src/blocks/carousel/index.js +2 -1
  84. package/src/blocks/carousel/view.php +1 -0
  85. package/src/blocks/donate/block.json +3 -2
  86. package/src/blocks/donate/edit/FrequencyBasedLayout.tsx +2 -3
  87. package/src/blocks/donate/edit/index.tsx +56 -39
  88. package/src/blocks/donate/index.js +2 -1
  89. package/src/blocks/donate/view.php +1 -0
  90. package/src/blocks/homepage-articles/block.json +2 -1
  91. package/src/blocks/homepage-articles/edit.tsx +42 -37
  92. package/src/blocks/homepage-articles/index.js +2 -1
  93. package/src/blocks/homepage-articles/view.php +13 -1
  94. package/src/blocks/iframe/block.json +3 -2
  95. package/src/blocks/iframe/edit.js +36 -34
  96. package/src/blocks/iframe/index.js +2 -1
  97. package/src/blocks/iframe/view.php +1 -0
  98. package/src/blocks/video-playlist/edit.js +22 -15
  99. package/src/blocks/video-playlist/index.js +1 -0
  100. package/src/blocks/video-playlist/view.php +1 -0
  101. package/src/setup/placeholder-blocks.js +1 -0
  102. package/vendor/composer/installed.php +2 -2
@@ -23,7 +23,7 @@ import { aspectLandscape, aspectPortrait, aspectSquare } from 'newspack-icons';
23
23
  */
24
24
  import { __, sprintf } from '@wordpress/i18n';
25
25
  import { Component, Fragment, RawHTML } from '@wordpress/element';
26
- import { BlockControls, InspectorControls, PanelColorSettings, RichText, withColors, AlignmentControl } from '@wordpress/block-editor';
26
+ import { BlockControls, InspectorControls, PanelColorSettings, RichText, withColors, AlignmentControl, useBlockProps } from '@wordpress/block-editor';
27
27
  import {
28
28
  PanelBody,
29
29
  Placeholder,
@@ -549,7 +549,7 @@ class Edit extends Component< HomepageArticlesProps > {
549
549
  * Constants
550
550
  */
551
551
 
552
- const { attributes, className, setAttributes, isSelected, latestPosts, textColor, error } = this.props;
552
+ const { attributes, setAttributes, isSelected, latestPosts, textColor, error, blockProps } = this.props;
553
553
 
554
554
  const {
555
555
  showImage,
@@ -570,7 +570,7 @@ class Edit extends Component< HomepageArticlesProps > {
570
570
  textAlign,
571
571
  } = attributes;
572
572
 
573
- const classes = classNames( className, {
573
+ const classes = classNames( blockProps.className, {
574
574
  'is-grid': postLayout === 'grid',
575
575
  'show-image': showImage,
576
576
  [ `columns-${ columns }` ]: postLayout === 'grid',
@@ -658,7 +658,23 @@ class Edit extends Component< HomepageArticlesProps > {
658
658
 
659
659
  return (
660
660
  <Fragment>
661
+ <BlockControls>
662
+ <Toolbar>
663
+ <AlignmentControl
664
+ value={ textAlign }
665
+ onChange={ ( nextAlign: string ) => {
666
+ setAttributes( { textAlign: nextAlign } );
667
+ } }
668
+ />
669
+ </Toolbar>
670
+ <Toolbar controls={ blockControls } />
671
+ { showImage && <Toolbar controls={ blockControlsImages } /> }
672
+ { showImage && <Toolbar controls={ blockControlsImageShape } /> }
673
+ </BlockControls>
674
+ <InspectorControls>{ this.renderInspectorControls() }</InspectorControls>
675
+ <InspectorControls group="styles">{ this.renderStylesInspectorControls() }</InspectorControls>
661
676
  <div
677
+ { ...blockProps }
662
678
  className={ classes }
663
679
  style={ {
664
680
  color: textColor.color,
@@ -684,46 +700,35 @@ class Edit extends Component< HomepageArticlesProps > {
684
700
 
685
701
  { latestPosts && latestPosts.map( post => this.renderPost( post ) ) }
686
702
  </div>
687
- </div>
688
703
 
689
- { ! specificMode && latestPosts && moreButton && ! isBlogPrivate() && (
690
- /*
691
- * The "More" button option is hidden for private sites, so we should
692
- * also hide the button in case it was previously enabled.
693
- */
694
- <div className="wpnbha__wp-block-button__wrapper">
695
- <div className="wp-block-button">
696
- <RichText
697
- placeholder={ __( 'Load more posts', 'newspack-blocks' ) }
698
- value={ moreButtonText }
699
- onChange={ ( value: string ) => setAttributes( { moreButtonText: value } ) }
700
- className="wp-block-button__link"
701
- allowedFormats={ [] }
702
- />
704
+ { ! specificMode && latestPosts && moreButton && ! isBlogPrivate() && (
705
+ /*
706
+ * The "More" button option is hidden for private sites, so we should
707
+ * also hide the button in case it was previously enabled.
708
+ */
709
+ <div className="wpnbha__wp-block-button__wrapper">
710
+ <div className="wp-block-button">
711
+ <RichText
712
+ placeholder={ __( 'Load more posts', 'newspack-blocks' ) }
713
+ value={ moreButtonText }
714
+ onChange={ ( value: string ) => setAttributes( { moreButtonText: value } ) }
715
+ className="wp-block-button__link"
716
+ allowedFormats={ [] }
717
+ />
718
+ </div>
703
719
  </div>
704
- </div>
705
- ) }
706
-
707
- <BlockControls>
708
- <Toolbar>
709
- <AlignmentControl
710
- value={ textAlign }
711
- onChange={ ( nextAlign: string ) => {
712
- setAttributes( { textAlign: nextAlign } );
713
- } }
714
- />
715
- </Toolbar>
716
- <Toolbar controls={ blockControls } />
717
- { showImage && <Toolbar controls={ blockControlsImages } /> }
718
- { showImage && <Toolbar controls={ blockControlsImageShape } /> }
719
- </BlockControls>
720
- <InspectorControls>{ this.renderInspectorControls() }</InspectorControls>
721
- <InspectorControls group="styles">{ this.renderStylesInspectorControls() }</InspectorControls>
720
+ ) }
721
+ </div>
722
722
  </Fragment>
723
723
  );
724
724
  }
725
725
  }
726
726
 
727
+ const EditWithBlockProps = ( props: any ) => {
728
+ const blockProps = useBlockProps();
729
+ return <Edit { ...props } blockProps={ blockProps } />;
730
+ };
731
+
727
732
  export default compose( [ withColors( { textColor: 'color' } ), withSelect( postsBlockSelector ), withDispatch( postsBlockDispatch ) ] as any )(
728
- Edit
733
+ EditWithBlockProps
729
734
  );
@@ -22,7 +22,7 @@ import edit from './edit';
22
22
  import './editor.scss';
23
23
  import './view.scss';
24
24
  import metadata from './block.json';
25
- const { name, attributes, category } = metadata;
25
+ const { name, attributes, apiVersion, category } = metadata;
26
26
 
27
27
  // Name must be exported separately.
28
28
  export { name };
@@ -30,6 +30,7 @@ export { name };
30
30
  export const title = __( 'Content Loop', 'newspack-blocks' );
31
31
 
32
32
  export const settings = {
33
+ apiVersion,
33
34
  title,
34
35
  icon: {
35
36
  src: icon,
@@ -44,8 +44,19 @@ function newspack_blocks_hpb_maximum_image_width() {
44
44
  * @param array $sizes Sizes for the sizes attribute.
45
45
  */
46
46
  function newspack_blocks_filter_hpb_sizes( $sizes ) {
47
+ /**
48
+ * Disables automatic image sizes optimization for Homepage Posts Block.
49
+ * By default, Newspack optimizes the 'sizes' attribute based on the
50
+ * computed maximum image width. Set to true to use default WordPress behavior.
51
+ *
52
+ * @constant NEWSPACK_DISABLE_HPB_IMAGE_OPTIMISATION
53
+ * @type bool
54
+ * @default Image optimization enabled
55
+ * @status draft
56
+ *
57
+ * @example define( 'NEWSPACK_DISABLE_HPB_IMAGE_OPTIMISATION', true );
58
+ */
47
59
  if ( defined( 'NEWSPACK_DISABLE_HPB_IMAGE_OPTIMISATION' ) && NEWSPACK_DISABLE_HPB_IMAGE_OPTIMISATION ) {
48
- // Allow disabling the image optimisation per-site.
49
60
  return $sizes;
50
61
  }
51
62
  global $newspack_blocks_hpb_current_theme;
@@ -429,6 +440,7 @@ function newspack_blocks_register_homepage_articles() {
429
440
  apply_filters(
430
441
  'newspack_blocks_block_args',
431
442
  array(
443
+ 'api_version' => $block['apiVersion'],
432
444
  'attributes' => $block['attributes'],
433
445
  'render_callback' => 'newspack_blocks_render_block_homepage_articles',
434
446
  'supports' => [],
@@ -1,7 +1,8 @@
1
1
  {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
3
+ "apiVersion": 3,
2
4
  "name": "iframe",
3
5
  "category": "newspack",
4
- "apiVersion": 3,
5
6
  "attributes": {
6
7
  "className": {
7
8
  "type": "string",
@@ -32,4 +33,4 @@
32
33
  "default": "iframe"
33
34
  }
34
35
  }
35
- }
36
+ }
@@ -7,7 +7,7 @@ import { iframe as icon } from 'newspack-icons';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { Fragment, useState } from '@wordpress/element';
10
- import { InspectorControls, BlockControls } from '@wordpress/block-editor';
10
+ import { InspectorControls, BlockControls, useBlockProps } from '@wordpress/block-editor';
11
11
  import {
12
12
  PanelBody,
13
13
  ToggleControl,
@@ -27,6 +27,7 @@ import apiFetch from '@wordpress/api-fetch';
27
27
  import IframePlaceholder from './iframe-placeholder';
28
28
 
29
29
  const IframeEdit = ( { attributes, setAttributes } ) => {
30
+ const blockProps = useBlockProps();
30
31
  const label = __( 'Iframe', 'block title' );
31
32
  const { mode, src, archiveFolder, isFullScreen, height, width } = attributes;
32
33
  const [ showPreview, setShowPreview ] = useState( true );
@@ -156,39 +157,6 @@ const IframeEdit = ( { attributes, setAttributes } ) => {
156
157
 
157
158
  return (
158
159
  <Fragment>
159
- { isFullScreen && (
160
- <Notice status="warning" className="wp-block-newspack-blocks-iframe-notice" isDismissible={ false }>
161
- { __( 'This block will take over the page content.', 'newspack-blocks' ) }
162
- </Notice>
163
- ) }
164
- { src && showPreview ? (
165
- <div className="iframe-container">
166
- <FocusableIframe
167
- title={ __( 'Newspack embedded iframe', 'newspack-blocks' ) }
168
- src={ 'document' === mode ? `https://docs.google.com/gview?embedded=true&url=${ encodeURIComponent( src ) }` : src }
169
- style={ {
170
- width: isFullScreen ? '100vw' : width,
171
- height: isFullScreen ? '100vh' : height,
172
- maxWidth: '100%',
173
- maxHeight: '100%',
174
- pointerEvents: 'none',
175
- } }
176
- />
177
- </div>
178
- ) : (
179
- <IframePlaceholder
180
- icon={ icon }
181
- label={ label }
182
- src={ src }
183
- onSelectURL={ embedURL }
184
- onSelectMedia={ setIframeArchiveFromMedia }
185
- isUploadingArchive={ isUploadingArchive }
186
- archiveFolder={ archiveFolder }
187
- uploadIframeArchive={ uploadIframeArchive }
188
- error={ error }
189
- />
190
- ) }
191
-
192
160
  <BlockControls>
193
161
  <Toolbar controls={ src && iframeControls } />
194
162
  </BlockControls>
@@ -223,6 +191,40 @@ const IframeEdit = ( { attributes, setAttributes } ) => {
223
191
  </Fragment>
224
192
  </PanelBody>
225
193
  </InspectorControls>
194
+ <div { ...blockProps }>
195
+ { isFullScreen && (
196
+ <Notice status="warning" className="wp-block-newspack-blocks-iframe-notice" isDismissible={ false }>
197
+ { __( 'This block will take over the page content.', 'newspack-blocks' ) }
198
+ </Notice>
199
+ ) }
200
+ { src && showPreview ? (
201
+ <div className="iframe-container">
202
+ <FocusableIframe
203
+ title={ __( 'Newspack embedded iframe', 'newspack-blocks' ) }
204
+ src={ 'document' === mode ? `https://docs.google.com/gview?embedded=true&url=${ encodeURIComponent( src ) }` : src }
205
+ style={ {
206
+ width: isFullScreen ? '100vw' : width,
207
+ height: isFullScreen ? '100vh' : height,
208
+ maxWidth: '100%',
209
+ maxHeight: '100%',
210
+ pointerEvents: 'none',
211
+ } }
212
+ />
213
+ </div>
214
+ ) : (
215
+ <IframePlaceholder
216
+ icon={ icon }
217
+ label={ label }
218
+ src={ src }
219
+ onSelectURL={ embedURL }
220
+ onSelectMedia={ setIframeArchiveFromMedia }
221
+ isUploadingArchive={ isUploadingArchive }
222
+ archiveFolder={ archiveFolder }
223
+ uploadIframeArchive={ uploadIframeArchive }
224
+ error={ error }
225
+ />
226
+ ) }
227
+ </div>
226
228
  </Fragment>
227
229
  );
228
230
  };
@@ -15,7 +15,7 @@ import { __ } from '@wordpress/i18n';
15
15
  */
16
16
  import edit from './edit';
17
17
  import metadata from './block.json';
18
- const { name, attributes, category } = metadata;
18
+ const { name, attributes, apiVersion, category } = metadata;
19
19
 
20
20
  /**
21
21
  * Style dependencies - will load in editor
@@ -28,6 +28,7 @@ export const title = __( 'Iframe', 'newspack-blocks' );
28
28
  export { name };
29
29
 
30
30
  export const settings = {
31
+ apiVersion,
31
32
  title,
32
33
  icon: {
33
34
  src: icon,
@@ -30,6 +30,7 @@ function newspack_blocks_register_iframe() {
30
30
  register_block_type(
31
31
  'newspack-blocks/' . $block_json['name'],
32
32
  [
33
+ 'api_version' => $block_json['apiVersion'],
33
34
  'attributes' => $block_json['attributes'],
34
35
  'render_callback' => 'newspack_blocks_render_block_iframe',
35
36
  ]
@@ -5,7 +5,7 @@ import { __, sprintf } from '@wordpress/i18n';
5
5
  import apiFetch from '@wordpress/api-fetch';
6
6
  import { Component, Fragment } from '@wordpress/element';
7
7
  import { Notice, Placeholder, Spinner, PanelBody } from '@wordpress/components';
8
- import { InspectorControls } from '@wordpress/block-editor';
8
+ import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
9
9
  import { addQueryArgs } from '@wordpress/url';
10
10
  import { decodeEntities } from '@wordpress/html-entities';
11
11
 
@@ -187,19 +187,6 @@ class Edit extends Component {
187
187
 
188
188
  return (
189
189
  <Fragment>
190
- <div>
191
- { ( isLoading || '' === embed ) && this.renderPlaceholder() }
192
- { ! ( isLoading || '' === embed ) && (
193
- <div className="wpbnbvp-preview">
194
- <div dangerouslySetInnerHTML={ { __html: embed } } />
195
- </div>
196
- ) }
197
- { ! isLoading && (
198
- <div className="wpbnbvp__overlay">
199
- <Warning />
200
- </div>
201
- ) }
202
- </div>
203
190
  <InspectorControls>
204
191
  <PanelBody title={ __( 'Settings', 'newspack-blocks' ) } initialOpen={ true }>
205
192
  <Notice status="warning" isDismissible={ false }>
@@ -207,9 +194,29 @@ class Edit extends Component {
207
194
  </Notice>
208
195
  </PanelBody>
209
196
  </InspectorControls>
197
+ <div { ...this.props.blockProps }>
198
+ <div>
199
+ { ( isLoading || '' === embed ) && this.renderPlaceholder() }
200
+ { ! ( isLoading || '' === embed ) && (
201
+ <div className="wpbnbvp-preview">
202
+ <div dangerouslySetInnerHTML={ { __html: embed } } />
203
+ </div>
204
+ ) }
205
+ { ! isLoading && (
206
+ <div className="wpbnbvp__overlay">
207
+ <Warning />
208
+ </div>
209
+ ) }
210
+ </div>
211
+ </div>
210
212
  </Fragment>
211
213
  );
212
214
  }
213
215
  }
214
216
 
215
- export default Edit;
217
+ const EditWithBlockProps = props => {
218
+ const blockProps = useBlockProps();
219
+ return <Edit { ...props } blockProps={ blockProps } />;
220
+ };
221
+
222
+ export default EditWithBlockProps;
@@ -23,6 +23,7 @@ export const name = 'youtube-video-playlist';
23
23
  export const title = __( 'YouTube Video Playlist (DEPRECATED)', 'newspack-blocks' );
24
24
 
25
25
  export const settings = {
26
+ apiVersion: 3,
26
27
  title,
27
28
  icon: {
28
29
  src: icon,
@@ -26,6 +26,7 @@ function newspack_blocks_register_video_playlist() {
26
26
  register_block_type(
27
27
  'newspack-blocks/youtube-video-playlist',
28
28
  array(
29
+ 'api_version' => 3,
29
30
  'attributes' => array(
30
31
  'className' => array(
31
32
  'type' => 'string',
@@ -57,6 +57,7 @@ function registerPlaceholderBlock( blockName, { title, description, icon, messag
57
57
  );
58
58
  };
59
59
  registerBlockType( blockName, {
60
+ apiVersion: 3,
60
61
  title,
61
62
  description,
62
63
  icon,
@@ -3,7 +3,7 @@
3
3
  'name' => 'automattic/newspack-blocks',
4
4
  'pretty_version' => 'dev-trunk',
5
5
  'version' => 'dev-trunk',
6
- 'reference' => '257df20fd810f6d30564e134d4484a85caa90604',
6
+ 'reference' => '273b48738c9190050662edcda6204eae7e156ca6',
7
7
  'type' => 'wordpress-plugin',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -13,7 +13,7 @@
13
13
  'automattic/newspack-blocks' => array(
14
14
  'pretty_version' => 'dev-trunk',
15
15
  'version' => 'dev-trunk',
16
- 'reference' => '257df20fd810f6d30564e134d4484a85caa90604',
16
+ 'reference' => '273b48738c9190050662edcda6204eae7e156ca6',
17
17
  'type' => 'wordpress-plugin',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),