PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 All 128 releases
← All changes | src/Agent/workflows/content/update-post-status.js +21 -0 3.0.5 → 3.2.2 View file →
@@ -1,5 +1,6 @@
1 1 import { UpdatePostStatusConfirm } from '@agent/workflows/content/components/UpdatePostStatusConfirm';
2 +import { __ } from '@wordpress/i18n';
2 3
3 4 const { context, abilities } = window.extAgentData;
4 5
5 6 export default {
@@ -6,5 +7,25 @@
6 7 available: () =>
7 8 abilities?.canEditPosts && !context?.adminPage && context?.postId,
8 9 id: 'update-post-status',
9 10 whenFinished: { component: UpdatePostStatusConfirm },
11 + example: {
12 + text: __('Publish this page', 'extendify-local'),
13 + agentResponse: {
14 + // translators: Shown when the user clicks the "Publish this page" suggestion, above a confirm card.
15 + reply: __('Ready to publish this page?', 'extendify-local'),
16 + whenFinishedTool: {
17 + id: 'update-post-status',
18 + inputs: {
19 + postId: context?.postId,
20 + postType: context?.postType,
21 + updatedStatus: 'publish',
22 + postStatus: context?.postStatus,
23 + },
24 + labels: {
25 + confirm: __('Published the page', 'extendify-local'),
26 + cancel: __('Canceled publishing the page', 'extendify-local'),
27 + },
28 + },
29 + },
30 + },
10 31 };