文件操作 - abilities.js
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/extendify/src/Agent/lib/abilities.js
编辑文件内容
// 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); };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件