[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GKP2VD71ZHJHVSJAT2JX72":3,"skill-same:01M6GKP2VD71ZHJHVSJAT2JX72":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6GKP2VD71ZHJHVSJAT2JX72","wp-hooks-lifecycle",null,"Use when adding, moving or debugging WordPress actions and filters in an Acorn project - add_action\u002Fadd_filter priority and accepted_args, where a hook belongs (setup or filters files vs a provider boot()), load order (mu-plugins, plugins_loaded, after_setup_theme, init), when Acorn boots per profile, hooks that never fire on Acorn routes, REST or Livewire requests (template_redirect, wp_head), save_post firing twice in the block editor, the_content priorities. For ACF hooks use acf-native; for provider structure use acorn-stack.","hekivo\u002Fkivo-wise","hekivo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F278159278?v=4","01M6GKH8S3Z4CAJ9RRR607G1WJ","Hekivo","01M6GKH8XNM7HTVF4DC86MA8RG",14,"MIT","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Fwp-hooks-lifecycle\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"wp hooks lifecycle","lifecycle","hooks","never","theme","filter","project","structure","provider","files","filters","wordpress","use","livewire","stack","REST","actions","debugging","boot","init","2026-11-10 10:12:30",false,"---\nname: wp-hooks-lifecycle\ndescription: Use when adding, moving or debugging WordPress actions and filters in an Acorn project - add_action\u002Fadd_filter priority and accepted_args, where a hook belongs (setup or filters files vs a provider boot()), load order (mu-plugins, plugins_loaded, after_setup_theme, init), when Acorn boots per profile, hooks that never fire on Acorn routes, REST or Livewire requests (template_redirect, wp_head), save_post firing twice in the block editor, the_content priorities. For ACF hooks use acf-native; for provider structure use acorn-stack.\n---\n\n# WordPress hooks and lifecycle under Acorn\n\nThe rules of the Plugin API never change. What changes per profile is **when Acorn boots** relative to WordPress's load order, and therefore which hooks a provider's `boot()` can still catch. Read the profile from the session context.\n\nRunner placeholders (`{{runner.wp}}`, `{{runner.acorn}}`, `{{runner.test}}`, `{{runner.cache}}`) come from the session context; on Lando they default to `lando wp`, `lando wp acorn` and the project's test and cache tooling. Never run WP-CLI or PHP on the host.\n\n## When to use\n\n- Adding a hook and deciding where it lives and at what priority.\n- A hook \"never fires\", fires twice, fires with stale data, or fires on some request types only.\n- Removing a hook added by a plugin, the theme or a package.\n- Content or markup is altered unexpectedly by a core filter (`wpautop`, `wptexturize`, kses).\n\nNot for: ACF-specific hooks and the ACF save flow (`acf-native`), provider structure and caches (`acorn-stack`), REST route design (`acorn-routes-api`).\n\n## Inputs required\n\n1. Profile and the hook that boots Acorn (session context: theme include time, or `after_setup_theme` at a given priority).\n2. The behaviour to implement: side effect (action) or value transformation (filter), and the first moment the data it needs exists.\n3. The request types involved: front end, admin, REST, AJAX, cron, WP-CLI, Acorn route, Livewire update.\n\n### Load order (WordPress 7.1.3 `wp-settings.php`)\n\n```\nmu-plugins: top-level *.php in alphabetical order (subfolders need a loader such as bedrock-autoloader)\n  → muplugins_loaded\n  → core taxonomies and post types created\n  → active plugins (plugin_loaded per file)\n  → pluggable.php (wp_get_current_user, wp_verify_nonce, wp_mail…)\n  → plugins_loaded\n  → setup_theme\n  → theme functions.php: child theme first, then parent\n  → after_setup_theme\n  → $wp->init() (current user set up)\n  → init\n  → wp_loaded\n  → request: parse_request → wp → template_redirect → template (wp_head → content → wp_footer) → shutdown\n```\n\n### When Acorn boots, per profile\n\n| Concern | `sage-theme` | `acorn-mu-plugin` | `radicle-app` |\n|---|---|---|---|\n| Acorn boots (providers `register()` + `boot()`) | While `functions.php` is included: after `setup_theme`, before `after_setup_theme` | Inside the main file's `after_setup_theme` callback (priority set by the plugin) | Inside a committed mu-plugin's `after_setup_theme` callback |\n| Plain hooks without dependencies | `app\u002Fsetup.php`, `app\u002Ffilters.php` (loaded by `functions.php` right after the boot, so `app()` already works there) | Bootstrap files required by the main plugin file at mu-plugin include time (`app()` does **not** work at their file scope) | A provider `boot()`; theme supports and menus from `config\u002Ftheme.php` through the project's theme provider |\n| Hooks for `muplugins_loaded`, `plugins_loaded`, `setup_theme` | Impossible from a theme (already fired); needs a plugin or mu-plugin | Bootstrap files, file scope | A mu-plugin file, file scope |\n| `after_setup_theme` from a provider `boot()` | Any priority | Only priorities **greater** than the boot priority | Only priorities greater than the boot priority |\n| `init` and later from `boot()` | Yes | Yes | Yes |\n\nWhy the strict \"greater\": `WP_Hook` iterates priorities and copies the callback list of the priority it is running, so a callback added at the running priority is skipped for that request; a lower one already ran.\n\n## Procedure\n\n1. **Pick the hook** by when the data exists (table in [references\u002Fhook-timing.md](references\u002Fhook-timing.md)): CPTs on `init`, current user on `init` or later, main query on `template_redirect`, rendered HTML on `the_content` priority ≥ 12.\n2. **Pick the place**:\n   - needs services, config or DI → the feature provider's `boot()`;\n   - plain hook, no dependencies → the profile's bootstrap\u002Fsetup file, delegating to a class (`[Some::class, 'method']`);\n   - must fire before Acorn boots (table above) → a bootstrap file at file scope (mu-plugin profiles) or a separate mu-plugin;\n   - container bindings → `register()`, never hooks there.\n   Patterns and examples: [references\u002Facorn-hook-patterns.md](references\u002Facorn-hook-patterns.md).\n3. **Write the callback**: filters return the value on every path; `$accepted_args` covers every parameter you read; guard the context first (post type, autosave, revision, `is_admin()`, `wp_doing_ajax()`, `wp_doing_cron()`, `defined('WP_CLI')`); keep it thin and named so it can be removed and tested.\n4. **Check the request types** the hook must cover (next section).\n5. **Native first**: before writing custom code, confirm there is no core hook or argument that already does it (read `wp\u002Fwp-includes\u002Fdefault-filters.php`, `class-wp-hook.php`, the plugin's source).\n\n### Requests where template hooks never fire\n\n| Request | Runs | Never runs |\n|---|---|---|\n| Acorn route (`routes\u002Fweb.php`, `routes\u002Fapi.php`, Livewire endpoints) | Full load through `wp_loaded`, then `parse_request`, where Acorn answers and exits; `shutdown` | `wp`, `template_redirect`, `wp_enqueue_scripts`, `wp_head`, `the_content`, `wp_footer` |\n| REST (`\u002Fwp-json\u002F…`) | Full load, `parse_request` → `rest_api_init` → endpoint → exit | Template hooks |\n| Admin, AJAX (`admin-ajax.php`) | `admin_init`, admin enqueue hooks | Front-end template hooks |\n| WP-CLI, cron | Full load | Request and template hooks; `is_admin()` is false in CLI |\n\nAcorn never routes paths under wp-admin, `wp-login.php`, the registration URL, `\u002Fwp-json` or any path ending in `.php`. Language plugins that prefix URLs do not see a prefix on Livewire update requests; see `acorn-livewire`.\n\n### Block editor saves (two requests)\n\nThe block editor saves post fields over REST (`POST \u002Fwp\u002Fv2\u002F\u003Ctype>\u002F\u003Cid>`), then posts the classic meta boxes, ACF included, to `post.php?meta-box-loader=1` (`wp-admin\u002Fedit-form-blocks.php`).\n\n- In the REST request, `wp_insert_post_data`, `transition_post_status` and `save_post` see the **old** meta-box values.\n- In the meta-box request, `save_post` fires again **before** ACF stores the new values.\n- Logic that needs new ACF values hooks `acf\u002Fsave_post` at priority > 10; blocking rules go in `acf\u002Fvalidate_value` (both in `acf-native`).\n- `save_post` also fires for autosaves and revisions: guard with `wp_is_post_autosave()` \u002F `wp_is_post_revision()` and check the type (or use `save_post_{post_type}`).\n- `wp_update_post()` inside `save_post` loops: unhook, update, re-hook, or change `$data` in `wp_insert_post_data` instead.\n\nContent filters (`the_content` order, `wptexturize`, `wpautop`, kses, `pre_get_posts`): [references\u002Ffilter-gotchas.md](references\u002Ffilter-gotchas.md).\n\n## Verification\n\n```bash\n{{runner.wp}} eval 'global $wp_filter; print_r(array_map(fn ($p) => array_keys($p), $wp_filter[\"save_post\"]->callbacks ?? []));'\n{{runner.wp}} eval 'var_dump(did_action(\"after_setup_theme\"), did_action(\"init\"));'\n{{runner.cache}}\n{{runner.test}}\n```\n\nThen exercise every request type the hook must cover (load the page, save in the block editor, call the route) and read the log. For timing questions, log `current_action()` and `did_action()` from the callback. Query Monitor's hooks panel helps when installed; the `$wp_filter` dump works everywhere.\n\n## Failure modes\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| Callback never runs | Registered after the hook fired: `plugins_loaded` \u002F `setup_theme` from a provider, or `after_setup_theme` at a priority ≤ the boot priority | Move it to a bootstrap file or a later hook; compare with the table above |\n| Provider hooks never run on one environment | Provider not registered, or skipped after an exception (logged as `Skipping provider`) | See `acorn-stack` |\n| Filter result is `null` \u002F empty | A code path without `return` | Return the value on every path |\n| Parameters missing | `$accepted_args` too low | Set it to the number of parameters used |\n| Runs twice on save | REST + meta-box requests, autosaves, revisions | Guard; move ACF-dependent logic to `acf\u002Fsave_post` |\n| Sees old ACF values on save | Hooked `save_post` in the REST request | `acf\u002Fsave_post` priority > 10 |\n| Infinite loop on save | `wp_update_post()` inside `save_post` | Unhook \u002F re-hook or use `wp_insert_post_data` |\n| `remove_action()` has no effect | Removed before it was added, different priority, closure, or a different object instance | Remove later with the same callable and priority; closures cannot be removed |\n| Assets or head tags missing on an endpoint | Acorn route or REST request: template hooks do not run | Send what the response needs from the controller or component |\n| Broken markup after a Tailwind arbitrary class | `wptexturize` treated part of the attribute as text | See `filter-gotchas.md`; fix the markup before disabling the filter site-wide |\n| `app()` \u002F facades fatal at file load | Called at file scope before Acorn booted (mu-plugin bootstrap file) | Call them inside callbacks that run after the boot |\n\n## Escalation\n\nStop and ask when: the fix needs a hook earlier than the profile allows and no mu-plugin exists for it; a third-party callback must be removed and it is a closure; disabling a core filter (`wptexturize`, `wpautop`, kses) site-wide is the only option; the hook runs on shared remote infrastructure where testing means changing production data.\n\n\u003C!-- verified:\nwp\u002Fwp-settings.php:506-548 — mu-plugins loop then muplugins_loaded; :565-566 core taxonomies\u002Fpost types; :582-607 active plugins; :612 pluggable.php; :630 plugins_loaded; :705 setup_theme; :741-747 theme functions.php; :757 after_setup_theme; :766 $wp->init(); :779 init; :801 wp_loaded;\nwp\u002Fwp-includes\u002Fload.php:986-994 — mu-plugins are top-level *.php only, sorted; :1096-1112 — wp_get_active_and_valid_themes lists the child (stylesheet) path before the parent (template);\nwp\u002Fwp-includes\u002Fclass-wp-hook.php:339-358 — iteration over priorities, foreach copies the running priority's callbacks;\nwp\u002Fwp-includes\u002Fclass-wp.php:148,418 — do_parse_request filter and parse_request action; :819-841 main() then fires wp;\nwp\u002Fwp-includes\u002Fdefault-filters.php:549 — rest_api_loaded on parse_request; :350 wp_enqueue_scripts runs inside wp_head;\nwp\u002Fwp-admin\u002Fedit-form-blocks.php:187-195 — meta boxes posted to post.php?meta-box-loader=1;\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FApplication\u002FConcerns\u002FBootable.php:212-245 — excluded admin\u002Flogin\u002Fregistration\u002FREST\u002F.php paths, matched routes handled on parse_request; :290-300 handleRequest exits;\nrefs\u002Froots-sage\u002Ffunctions.php:35-61 — Sage boots Acorn, then loads app\u002Fsetup.php and app\u002Ffilters.php;\nmu-plugin and project-root boot on after_setup_theme checked in a real Acorn mu-plugin main file and a Radicle-style project mu-plugin (concept only)\n-->\n","# WordPress hooks and lifecycle under Acorn\n\nThe rules of the Plugin API never change. What changes per profile is **when Acorn boots** relative to WordPress's load order, and therefore which hooks a provider's `boot()` can still catch. Read the profile from the session context.\n\nRunner placeholders (`{{runner.wp}}`, `{{runner.acorn}}`, `{{runner.test}}`, `{{runner.cache}}`) come from the session context; on Lando they default to `lando wp`, `lando wp acorn` and the project's test and cache tooling. Never run WP-CLI or PHP on the host.\n\n## When to use\n\n- Adding a hook and deciding where it lives and at what priority.\n- A hook \"never fires\", fires twice, fires with stale data, or fires on some request types only.\n- Removing a hook added by a plugin, the theme or a package.\n- Content or markup is altered unexpectedly by a core filter (`wpautop`, `wptexturize`, kses).\n\nNot for: ACF-specific hooks and the ACF save flow (`acf-native`), provider structure and caches (`acorn-stack`), REST route design (`acorn-routes-api`).\n\n## Inputs required\n\n1. Profile and the hook that boots Acorn (session context: theme include time, or `after_setup_theme` at a given priority).\n2. The behaviour to implement: side effect (action) or value transformation (filter), and the first moment the data it needs exists.\n3. The request types involved: front end, admin, REST, AJAX, cron, WP-CLI, Acorn route, Livewire update.\n\n### Load order (WordPress 7.1.3 `wp-settings.php`)\n\n```\nmu-plugins: top-level *.php in alphabetical order (subfolders need a loader such as bedrock-autoloader)\n  → muplugins_loaded\n  → core taxonomies and post types created\n  → active plugins (plugin_loaded per file)\n  → pluggable.php (wp_get_current_user, wp_verify_nonce, wp_mail…)\n  → plugins_loaded\n  → setup_theme\n  → theme functions.php: child theme first, then parent\n  → after_setup_theme\n  → $wp->init() (current user set up)\n  → init\n  → wp_loaded\n  → request: parse_request → wp → template_redirect → template (wp_head → content → wp_footer) → shutdown\n```\n\n### When Acorn boots, per profile\n\n| Concern | `sage-theme` | `acorn-mu-plugin` | `radicle-app` |\n|---|---|---|---|\n| Acorn boots (providers `register()` + `boot()`) | While `functions.php` is included: after `setup_theme`, before `after_setup_theme` | Inside the main file's `after_setup_theme` callback (priority set by the plugin) | Inside a committed mu-plugin's `after_setup_theme` callback |\n| Plain hooks without dependencies | `app\u002Fsetup.php`, `app\u002Ffilters.php` (loaded by `functions.php` right after the boot, so `app()` already works there) | Bootstrap files required by the main plugin file at mu-plugin include time (`app()` does **not** work at their file scope) | A provider `boot()`; theme supports and menus from `config\u002Ftheme.php` through the project's theme provider |\n| Hooks for `muplugins_loaded`, `plugins_loaded`, `setup_theme` | Impossible from a theme (already fired); needs a plugin or mu-plugin | Bootstrap files, file scope | A mu-plugin file, file scope |\n| `after_setup_theme` from a provider `boot()` | Any priority | Only priorities **greater** than the boot priority | Only priorities greater than the boot priority |\n| `init` and later from `boot()` | Yes | Yes | Yes |\n\nWhy the strict \"greater\": `WP_Hook` iterates priorities and copies the callback list of the priority it is running, so a callback added at the running priority is skipped for that request; a lower one already ran.\n\n## Procedure\n\n1. **Pick the hook** by when the data exists (table in [references\u002Fhook-timing.md](references\u002Fhook-timing.md)): CPTs on `init`, current user on `init` or later, main query on `template_redirect`, rendered HTML on `the_content` priority ≥ 12.\n2. **Pick the place**:\n   - needs services, config or DI → the feature provider's `boot()`;\n   - plain hook, no dependencies → the profile's bootstrap\u002Fsetup file, delegating to a class (`[Some::class, 'method']`);\n   - must fire before Acorn boots (table above) → a bootstrap file at file scope (mu-plugin profiles) or a separate mu-plugin;\n   - container bindings → `register()`, never hooks there.\n   Patterns and examples: [references\u002Facorn-hook-patterns.md](references\u002Facorn-hook-patterns.md).\n3. **Write the callback**: filters return the value on every path; `$accepted_args` covers every parameter you read; guard the context first (post type, autosave, revision, `is_admin()`, `wp_doing_ajax()`, `wp_doing_cron()`, `defined('WP_CLI')`); keep it thin and named so it can be removed and tested.\n4. **Check the request types** the hook must cover (next section).\n5. **Native first**: before writing custom code, confirm there is no core hook or argument that already does it (read `wp\u002Fwp-includes\u002Fdefault-filters.php`, `class-wp-hook.php`, the plugin's source).\n\n### Requests where template hooks never fire\n\n| Request | Runs | Never runs |\n|---|---|---|\n| Acorn route (`routes\u002Fweb.php`, `routes\u002Fapi.php`, Livewire endpoints) | Full load through `wp_loaded`, then `parse_request`, where Acorn answers and exits; `shutdown` | `wp`, `template_redirect`, `wp_enqueue_scripts`, `wp_head`, `the_content`, `wp_footer` |\n| REST (`\u002Fwp-json\u002F…`) | Full load, `parse_request` → `rest_api_init` → endpoint → exit | Template hooks |\n| Admin, AJAX (`admin-ajax.php`) | `admin_init`, admin enqueue hooks | Front-end template hooks |\n| WP-CLI, cron | Full load | Request and template hooks; `is_admin()` is false in CLI |\n\nAcorn never routes paths under wp-admin, `wp-login.php`, the registration URL, `\u002Fwp-json` or any path ending in `.php`. Language plugins that prefix URLs do not see a prefix on Livewire update requests; see `acorn-livewire`.\n\n### Block editor saves (two requests)\n\nThe block editor saves post fields over REST (`POST \u002Fwp\u002Fv2\u002F\u003Ctype>\u002F\u003Cid>`), then posts the classic meta boxes, ACF included, to `post.php?meta-box-loader=1` (`wp-admin\u002Fedit-form-blocks.php`).\n\n- In the REST request, `wp_insert_post_data`, `transition_post_status` and `save_post` see the **old** meta-box values.\n- In the meta-box request, `save_post` fires again **before** ACF stores the new values.\n- Logic that needs new ACF values hooks `acf\u002Fsave_post` at priority > 10; blocking rules go in `acf\u002Fvalidate_value` (both in `acf-native`).\n- `save_post` also fires for autosaves and revisions: guard with `wp_is_post_autosave()` \u002F `wp_is_post_revision()` and check the type (or use `save_post_{post_type}`).\n- `wp_update_post()` inside `save_post` loops: unhook, update, re-hook, or change `$data` in `wp_insert_post_data` instead.\n\nContent filters (`the_content` order, `wptexturize`, `wpautop`, kses, `pre_get_posts`): [references\u002Ffilter-gotchas.md](references\u002Ffilter-gotchas.md).\n\n## Verification\n\n```bash\n{{runner.wp}} eval 'global $wp_filter; print_r(array_map(fn ($p) => array_keys($p), $wp_filter[\"save_post\"]->callbacks ?? []));'\n{{runner.wp}} eval 'var_dump(did_action(\"after_setup_theme\"), did_action(\"init\"));'\n{{runner.cache}}\n{{runner.test}}\n```\n\nThen exercise every request type the hook must cover (load the page, save in the block editor, call the route) and read the log. For timing questions, log `current_action()` and `did_action()` from the callback. Query Monitor's hooks panel helps when installed; the `$wp_filter` dump works everywhere.\n\n## Failure modes\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| Callback never runs | Registered after the hook fired: `plugins_loaded` \u002F `setup_theme` from a provider, or `after_setup_theme` at a priority ≤ the boot priority | Move it to a bootstrap file or a later hook; compare with the table above |\n| Provider hooks never run on one environment | Provider not registered, or skipped after an exception (logged as `Skipping provider`) | See `acorn-stack` |\n| Filter result is `null` \u002F empty | A code path without `return` | Return the value on every path |\n| Parameters missing | `$accepted_args` too low | Set it to the number of parameters used |\n| Runs twice on save | REST + meta-box requests, autosaves, revisions | Guard; move ACF-dependent logic to `acf\u002Fsave_post` |\n| Sees old ACF values on save | Hooked `save_post` in the REST request | `acf\u002Fsave_post` priority > 10 |\n| Infinite loop on save | `wp_update_post()` inside `save_post` | Unhook \u002F re-hook or use `wp_insert_post_data` |\n| `remove_action()` has no effect | Removed before it was added, different priority, closure, or a different object instance | Remove later with the same callable and priority; closures cannot be removed |\n| Assets or head tags missing on an endpoint | Acorn route or REST request: template hooks do not run | Send what the response needs from the controller or component |\n| Broken markup after a Tailwind arbitrary class | `wptexturize` treated part of the attribute as text | See `filter-gotchas.md`; fix the markup before disabling the filter site-wide |\n| `app()` \u002F facades fatal at file load | Called at file scope before Acorn booted (mu-plugin bootstrap file) | Call them inside callbacks that run after the boot |\n\n## Escalation\n\nStop and ask when: the fix needs a hook earlier than the profile allows and no mu-plugin exists for it; a third-party callback must be removed and it is a closure; disabling a core filter (`wptexturize`, `wpautop`, kses) site-wide is the only option; the hook runs on shared remote infrastructure where testing means changing production data.\n\n\u003C!-- verified:\nwp\u002Fwp-settings.php:506-548 — mu-plugins loop then muplugins_loaded; :565-566 core taxonomies\u002Fpost types; :582-607 active plugins; :612 pluggable.php; :630 plugins_loaded; :705 setup_theme; :741-747 theme functions.php; :757 after_setup_theme; :766 $wp->init(); :779 init; :801 wp_loaded;\nwp\u002Fwp-includes\u002Fload.php:986-994 — mu-plugins are top-level *.php only, sorted; :1096-1112 — wp_get_active_and_valid_themes lists the child (stylesheet) path before the parent (template);\nwp\u002Fwp-includes\u002Fclass-wp-hook.php:339-358 — iteration over priorities, foreach copies the running priority's callbacks;\nwp\u002Fwp-includes\u002Fclass-wp.php:148,418 — do_parse_request filter and parse_request action; :819-841 main() then fires wp;\nwp\u002Fwp-includes\u002Fdefault-filters.php:549 — rest_api_loaded on parse_request; :350 wp_enqueue_scripts runs inside wp_head;\nwp\u002Fwp-admin\u002Fedit-form-blocks.php:187-195 — meta boxes posted to post.php?meta-box-loader=1;\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FApplication\u002FConcerns\u002FBootable.php:212-245 — excluded admin\u002Flogin\u002Fregistration\u002FREST\u002F.php paths, matched routes handled on parse_request; :290-300 handleRequest exits;\nrefs\u002Froots-sage\u002Ffunctions.php:35-61 — Sage boots Acorn, then loads app\u002Fsetup.php and app\u002Ffilters.php;\nmu-plugin and project-root boot on after_setup_theme checked in a real Acorn mu-plugin main file and a Radicle-style project mu-plugin (concept only)\n-->\n",{"name":5,"description":7},"main","4045a2f672c1d4c1b4a5a5712b468c5d73ca6724","plugins\u002Fkivo-wise\u002Fskills\u002Fwp-hooks-lifecycle",0,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise","https:\u002F\u002Fhekivo.github.io\u002Fkivo-wise\u002F","https:\u002F\u002Fgithub.com\u002Fhekivo","https:\u002F\u002Fhekivo.dev","2026-11-08 06:10:39",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add hekivo\u002Fkivo-wise --skill wp-hooks-lifecycle",{"tool":59,"command":60},"bunx","bunx skills add hekivo\u002Fkivo-wise --skill wp-hooks-lifecycle",{"tool":62,"command":63},"pnpm","pnpm dlx skills add hekivo\u002Fkivo-wise --skill wp-hooks-lifecycle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Fwp-hooks-lifecycle\u002FSKILL.md",true,[67,73,77],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Facorn-hook-patterns.md","REFERENCE","参考文档",4218,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Fwp-hooks-lifecycle\u002Freferences\u002Facorn-hook-patterns.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Ffilter-gotchas.md",3746,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Fwp-hooks-lifecycle\u002Freferences\u002Ffilter-gotchas.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fhook-timing.md",5599,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Fwp-hooks-lifecycle\u002Freferences\u002Fhook-timing.md",[82,105,121,141,160,184],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":39},"01M6GKWJDFKQM27HTFXX20QVTP","wp-rest-api","Use when building, extending, or debugging WordPress REST API endpoints\u002Froutes: register_rest_route, WP_REST_Controller\u002Fcontroller classes, schema\u002Fargument validation, permission_callback\u002Fauthentication, response shaping, register_rest_field\u002Fregister_meta, or exposing CPTs\u002Ftaxonomies via show_in_rest.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fthird-party\u002Fwp-rest-api\u002FSKILL.md",[],[34,89,90,91,30,92,36,93,94,95,96,97,98,31,99,100,101,102,103,104],"api","wp rest api","rest api","workflows","authentication","Meta","controller","Bash","shaping","filesystem","schema","show","route","register","with","wp-cli",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":39},"01M6GKWEA5BMJZ2RPPEEJTCC3N","wp-abilities-api","Use when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, \u002Fwp-json\u002Fwp-abilities\u002Fv1\u002F*, @wordpress\u002Fabilities) including defining abilities, categories, meta, REST exposure, and permissions checks for clients.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fthird-party\u002Fwp-abilities-api\u002FSKILL.md",[],[89,112,113,30,92,114,94,34,96,115,116,98,117,31,102,118,119,103,120,104],"wp abilities api","cli","permissions","php","json","node","targets","clients","categories",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":39},"01M6GKWA4GG2BZRFXCR9E73VR7","wp-security-escaping","Use when writing or reviewing code that outputs data, handles input or checks permissions in a WordPress + Acorn project - Blade {{ }} vs {!! !!}, esc_html, esc_attr, esc_url, wp_kses_post, \"&#038; in the URL\", double escaping, sanitize_text_field, nonces, current_user_can, map_meta_cap, permission_callback, $wpdb->prepare, whereRaw, file uploads, escaping ACF values, secrets in .env. For route middleware use acorn-routes-api; for ACF validation use acf-native; for Livewire actions use acorn-livewire.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-security-escaping\u002FSKILL.md",[],[128,129,130,131,132,114,35,94,89,133,32,134,135,101,136,25,137,138,139,140],"security","wp security","wp security escaping","writing","code","secrets","text","cap","map","middleware","native","URL","routes-api",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":39},"01M6GKW6VVY73BMZ3JNDMR4CWZ","wp-phpstan","Use when configuring, running or fixing PHPStan in a WordPress project that uses Acorn - phpstan.neon, baseline, szepeviktor\u002Fphpstan-wordpress stubs, larastan, level raising, \"Cannot access property on mixed\", get_field() types, paths for app\u002F. For Pint or Mago formatting use testing-wp; for runtime errors use roots-debugging.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-phpstan\u002FSKILL.md",[],[148,149,30,36,150,151,31,25,152,153,154,155,156,157,158,159],"wp phpstan","testing","baseline","access","get","neon","runtime","formatting","app","paths","types","errors",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":39},"01M6GKW3JRSRS9N112QFA3SEGT","wp-performance","Use when a WordPress page, query or request is slow or needs profiling - TTFB, slow or N+1 queries, Query Monitor, Server-Timing, wp profile and wp doctor, autoloaded options, Redis object cache hit rate, transients, WP_CACHE_KEY_SALT. Adds the runner and Redis notes on top of the official procedure. For Eloquent query design use acorn-data; for PHP type errors use wp-phpstan.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-performance\u002FSKILL.md",[],[167,168,169,30,170,171,172,173,174,175,176,177,178,31,179,180,181,182,183,159],"performance","wp performance","design","query design","official","notes","monitor","doctor","cache","server","redis","page","queries","runner","query","type","timing",{"skillNo":185,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":39},"01M6GKVZN243XQB5QWZ5ZKMG7P","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-hooks-lifecycle\u002FSKILL.md",[],[20,21,19,30,38,37,36,35,34,33,32,31,22,29,28,27,26,25,24,23]]