# extendify/3.1.3/src/Agent/lib/abilities.js

Extendify, version 3.1.3. 14 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.3/code/src/Agent/lib/abilities.js
- Raw: https://pluginprobe.com/plugins/extendify/3.1.3/raw/src/Agent/lib/abilities.js
- Modified: 2026-07-08T14:57:26+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.3/code/src/Agent/lib/abilities.js#L10-L20`.

```javascript
// Ability workflows are synthesized per-request by the backend under a
// `wp-ability:` id prefix, so they carry no static workflow definition.
export const isAbilityWorkflow = (id) =>
	typeof id === 'string' && id.startsWith('wp-ability:');

// A write to the post the user is looking at won't show until the page reloads.
export const abilityAffectsCurrentPage = (id, input) => {
	const isAbility = (window.extAgentData?.wpAbilities ?? []).some((category) =>
		category.abilities?.some((ability) => ability.name === id),
	);
	const postId = window.extAgentData?.context?.postId;
	return isAbility && Boolean(postId) && Number(input?.id) === Number(postId);
};

```
