# extendify/3.1.5/src/Agent/workflows/content/update-post-status.js

Extendify, version 3.1.5. 39 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.5/code/src/Agent/workflows/content/update-post-status.js
- Raw: https://pluginprobe.com/plugins/extendify/3.1.5/raw/src/Agent/workflows/content/update-post-status.js
- Modified: 2026-07-09T15:49:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.1.5/code/src/Agent/workflows/content/update-post-status.js#L10-L20`.

```javascript
import { UpdatePostStatusConfirm } from '@agent/workflows/content/components/UpdatePostStatusConfirm';
import { __ } from '@wordpress/i18n';

const { context, abilities } = window.extAgentData;

export default {
	available: () =>
		abilities?.canEditPosts && !context?.adminPage && context?.postId,
	id: 'update-post-status',
	whenFinished: { component: UpdatePostStatusConfirm },
	example: {
		text: __('Publish this page', 'extendify-local'),
		agentResponse: {
			// translators: Shown when the user clicks the "Publish this page" suggestion, above a confirm card.
			reply: __('Ready to publish this page?', 'extendify-local'),
			recommendations: [
				{
					workflowId: 'add-post-to-menu',
					label: __('Add this to the menu', 'extendify-local'),
					icon: 'pencil',
				},
			],
			whenFinishedTool: {
				id: 'update-post-status',
				inputs: {
					postId: context?.postId,
					postType: context?.postType,
					updatedStatus: 'publish',
					postStatus: context?.postStatus,
				},
				labels: {
					confirm: __('Published the page', 'extendify-local'),
					cancel: __('Canceled publishing the page', 'extendify-local'),
				},
			},
		},
	},
};

```
