File tree Expand file tree Collapse file tree
packages/editor/src/store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -462,11 +462,6 @@ export const autosave =
462462 async ( { select, dispatch } ) => {
463463 const post = select . getCurrentPost ( ) ;
464464
465- // Currently template autosaving is not supported.
466- if ( post . type === 'wp_template' ) {
467- return ;
468- }
469-
470465 if ( local ) {
471466 const isPostNew = select . isEditedPostNew ( ) ;
472467 const title = select . getEditedPostAttribute ( 'title' ) ;
Original file line number Diff line number Diff line change @@ -389,12 +389,6 @@ export const getAutosaveAttribute = createRegistrySelector(
389389 }
390390
391391 const postType = getCurrentPostType ( state ) ;
392-
393- // Currently template autosaving is not supported.
394- if ( postType === 'wp_template' ) {
395- return false ;
396- }
397-
398392 const postId = getCurrentPostId ( state ) ;
399393 const currentUserId = select ( coreStore ) . getCurrentUser ( ) ?. id ;
400394 const autosave = select ( coreStore ) . getAutosave (
@@ -616,12 +610,7 @@ export const isEditedPostAutosaveable = createRegistrySelector(
616610 const postType = getCurrentPostType ( state ) ;
617611 const postTypeObject = select ( coreStore ) . getPostType ( postType ) ;
618612
619- // Currently template autosaving is not supported.
620- // @todo : Remove hardcode check for template after bumping required WP version to 6.8.
621- if (
622- postType === 'wp_template' ||
623- ! postTypeObject ?. supports ?. autosave
624- ) {
613+ if ( ! postTypeObject ?. supports ?. autosave ) {
625614 return false ;
626615 }
627616
You can’t perform that action at this time.
0 commit comments