Skip to content

Commit

Permalink
Add copy to title. Reorder actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Apr 15, 2024
1 parent e4ecc68 commit 87d377c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion packages/editor/src/components/post-actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,13 @@ export const duplicatePostAction = {
RenderModal: ( { items, closeModal, onActionPerformed } ) => {
const [ item ] = items;
const [ isCreatingPage, setIsCreatingPage ] = useState( false );
const [ title, setTitle ] = useState( getItemTitle( item ) );
const [ title, setTitle ] = useState(
sprintf(
/* translators: %s: Existing item title */
__( '%s (Copy)' ),
getItemTitle( item )
)
);

const { saveEntityRecord } = useDispatch( coreStore );
const { createErrorNotice, createSuccessNotice } =
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const {
const POST_ACTIONS_WHILE_EDITING = [
'view-post',
'view-post-revisions',
'duplicate-post',
'rename-post',
'move-to-trash',
'duplicate-post',
];

export default function PostActions( { onActionPerformed } ) {
Expand Down

0 comments on commit 87d377c

Please sign in to comment.