| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Registers the actions of WordPress core through the entity actions API, like a plugin registers its own. The folders next to this file are the script modules of the actions: `post_type_supports` for the actions of every post type, `page` for the actions of pages, `wp_block` for the actions of patterns, and `wp_template_part` for the actions of template parts. Each action has a folder named after its id, whose `action.php` returns the serializable part of the action, and whose `action.tsx` holds its JavaScript parts.
| File Size: | 100 lines (5 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| register_core_entity_actions() X-Ref |
| Registers the actions of WordPress core on each post type exposed in the REST API, from what it supports and what the current user can do: - `view-post`, for the viewable post types. - `view-post-revisions`, for the post types supporting `revisions`. - `duplicate-post`, for the post types the user can create, except patterns, templates, and template parts. Only in the Gutenberg plugin. - `duplicate-template-part`, for template parts, when the user can create them and the theme is a block theme. - `duplicate-pattern`, for patterns, when the user can create them. - `rename-post`, for the post types supporting `title`. - `order-pages`, for the post types supporting `page-attributes`. - `export-pattern`, for patterns. - `restore`, `reset-post`, `delete-post`, `move-to-trash`, and `permanently-delete`, for every post type: each one checks which posts it applies to. - `set-as-homepage` and `set-as-posts-page`, for pages, when the user can manage the site options and the theme has no `front-page` template: each one applies to the pages with its `action-*` REST link. The actions are registered in that order, which is the order they are shown in, each with the script module of its folder. The registry is built for each request, so the actions only depending on the user are registered for the current one. Hooked at priority 0, so a plugin hooking `wp_entity_actions_api_init` at the default priority sees the core actions registered, and can unregister or replace them. |
| Generated : Thu Oct 22 08:20:34 2026 | Cross-referenced by PHPXref |