Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Template activation: remove reset action
  • Loading branch information
ellatrix committed Oct 24, 2025
commit eb115cae65ac99c551b540fe9b0d6600e3d343c2
7 changes: 3 additions & 4 deletions packages/fields/src/actions/reset-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import apiFetch from '@wordpress/api-fetch';
/**
* Internal dependencies
*/
import { getItemTitle, isTemplateOrTemplatePart } from './utils';
import { getItemTitle } from './utils';
import type { CoreDataError, Template, TemplatePart } from '../types';

const isTemplateRevertable = (
Expand Down Expand Up @@ -180,10 +180,9 @@ const resetPostAction: Action< Template | TemplatePart > = {
label: __( 'Reset' ),
isEligible: ( item ) => {
return (
isTemplateOrTemplatePart( item ) &&
item.type === 'wp_template_part' &&
item?.source === 'custom' &&
( Boolean( item.type === 'wp_template' && item?.plugin ) ||
item?.has_theme_file )
item?.has_theme_file
);
},
icon: backup,
Expand Down
Loading