@@ -578,7 +578,7 @@ export function updatePostLock( lock ) {
578578 *
579579 * @return {Object } Action object.
580580 */
581- export function fetchReusableBlocks ( id ) {
581+ export function __experimentalFetchReusableBlocks ( id ) {
582582 return {
583583 type : 'FETCH_REUSABLE_BLOCKS' ,
584584 id,
@@ -595,7 +595,7 @@ export function fetchReusableBlocks( id ) {
595595 *
596596 * @return {Object } Action object.
597597 */
598- export function receiveReusableBlocks ( results ) {
598+ export function __experimentalReceiveReusableBlocks ( results ) {
599599 return {
600600 type : 'RECEIVE_REUSABLE_BLOCKS' ,
601601 results,
@@ -610,7 +610,7 @@ export function receiveReusableBlocks( results ) {
610610 *
611611 * @return {Object } Action object.
612612 */
613- export function saveReusableBlock ( id ) {
613+ export function __experimentalSaveReusableBlock ( id ) {
614614 return {
615615 type : 'SAVE_REUSABLE_BLOCK' ,
616616 id,
@@ -624,7 +624,7 @@ export function saveReusableBlock( id ) {
624624 *
625625 * @return {Object } Action object.
626626 */
627- export function deleteReusableBlock ( id ) {
627+ export function __experimentalDeleteReusableBlock ( id ) {
628628 return {
629629 type : 'DELETE_REUSABLE_BLOCK' ,
630630 id,
@@ -640,7 +640,7 @@ export function deleteReusableBlock( id ) {
640640 *
641641 * @return {Object } Action object.
642642 */
643- export function updateReusableBlockTitle ( id , title ) {
643+ export function __experimentalUpdateReusableBlockTitle ( id , title ) {
644644 return {
645645 type : 'UPDATE_REUSABLE_BLOCK_TITLE' ,
646646 id,
@@ -655,7 +655,7 @@ export function updateReusableBlockTitle( id, title ) {
655655 *
656656 * @return {Object } Action object.
657657 */
658- export function convertBlockToStatic ( clientId ) {
658+ export function __experimentalConvertBlockToStatic ( clientId ) {
659659 return {
660660 type : 'CONVERT_BLOCK_TO_STATIC' ,
661661 clientId,
@@ -669,7 +669,7 @@ export function convertBlockToStatic( clientId ) {
669669 *
670670 * @return {Object } Action object.
671671 */
672- export function convertBlockToReusable ( clientIds ) {
672+ export function __experimentalConvertBlockToReusable ( clientIds ) {
673673 return {
674674 type : 'CONVERT_BLOCK_TO_REUSABLE' ,
675675 clientIds : castArray ( clientIds ) ,
@@ -821,3 +821,80 @@ export const createSuccessNotice = partial( createNotice, 'success' );
821821export const createInfoNotice = partial ( createNotice , 'info' ) ;
822822export const createErrorNotice = partial ( createNotice , 'error' ) ;
823823export const createWarningNotice = partial ( createNotice , 'warning' ) ;
824+
825+ //
826+ // Deprecated
827+ //
828+
829+ export function fetchReusableBlocks ( id ) {
830+ deprecated ( "wp.data.dispatch( 'core/editor' ).fetchReusableBlocks( id )" , {
831+ alternative : "wp.data.select( 'core' ).getEntityRecords( 'postType', 'wp_block' )" ,
832+ plugin : 'Gutenberg' ,
833+ version : '4.4.0' ,
834+ } ) ;
835+
836+ return __experimentalFetchReusableBlocks ( id ) ;
837+ }
838+
839+ export function receiveReusableBlocks ( results ) {
840+ deprecated ( "wp.data.dispatch( 'core/editor' ).receiveReusableBlocks( results )" , {
841+ alternative : "wp.data.select( 'core' ).getEntityRecords( 'postType', 'wp_block' )" ,
842+ plugin : 'Gutenberg' ,
843+ version : '4.4.0' ,
844+ } ) ;
845+
846+ return __experimentalReceiveReusableBlocks ( results ) ;
847+ }
848+
849+ export function saveReusableBlock ( id ) {
850+ deprecated ( "wp.data.dispatch( 'core/editor' ).saveReusableBlock( id )" , {
851+ alternative : "wp.data.dispatch( 'core' ).saveEntityRecord( 'postType', 'wp_block', reusableBlock )" ,
852+ plugin : 'Gutenberg' ,
853+ version : '4.4.0' ,
854+ } ) ;
855+
856+ return __experimentalSaveReusableBlock ( id ) ;
857+ }
858+
859+ export function deleteReusableBlock ( id ) {
860+ deprecated ( 'deleteReusableBlock action (`core/editor` store)' , {
861+ alternative : '__experimentalDeleteReusableBlock action (`core/edtior` store)' ,
862+ plugin : 'Gutenberg' ,
863+ version : '4.4.0' ,
864+ hint : 'Using experimental APIs is strongly discouraged as they are subject to removal without notice.' ,
865+ } ) ;
866+
867+ return __experimentalDeleteReusableBlock ( id ) ;
868+ }
869+
870+ export function updateReusableBlockTitle ( id , title ) {
871+ deprecated ( "wp.data.dispatch( 'core/editor' ).updateReusableBlockTitle( id, title )" , {
872+ alternative : "wp.data.dispatch( 'core' ).saveEntityRecord( 'postType', 'wp_block', reusableBlock )" ,
873+ plugin : 'Gutenberg' ,
874+ version : '4.4.0' ,
875+ } ) ;
876+
877+ return __experimentalUpdateReusableBlockTitle ( id , title ) ;
878+ }
879+
880+ export function convertBlockToStatic ( id ) {
881+ deprecated ( 'convertBlockToStatic action (`core/editor` store)' , {
882+ alternative : '__experimentalConvertBlockToStatic action (`core/edtior` store)' ,
883+ plugin : 'Gutenberg' ,
884+ version : '4.4.0' ,
885+ hint : 'Using experimental APIs is strongly discouraged as they are subject to removal without notice.' ,
886+ } ) ;
887+
888+ return __experimentalConvertBlockToStatic ( id ) ;
889+ }
890+
891+ export function convertBlockToReusable ( id ) {
892+ deprecated ( 'convertBlockToReusable action (`core/editor` store)' , {
893+ alternative : '__experimentalConvertBlockToReusable action (`core/edtior` store)' ,
894+ plugin : 'Gutenberg' ,
895+ version : '4.4.0' ,
896+ hint : 'Using experimental APIs is strongly discouraged as they are subject to removal without notice.' ,
897+ } ) ;
898+
899+ return __experimentalConvertBlockToReusable ( id ) ;
900+ }
0 commit comments