Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
chromed
/
wp-content
/
plugins
/
extendify
/
src
/
Agent
/
lib
:
abilities.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
// 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); };