You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e22d49a
Browse filesBrowse the repository at this point in the historyBrowse files
- Add the `page` collection, with the "Set as homepage" and "Set as posts page" actions moved from `@wordpress/editor`. They apply to the pages with the `wp:action-set-homepage` or `wp:action-set-posts-page` REST link ([#84932](https://github.com/WordPress/gutenberg/pull/84932)).
10
+
- Add the "Edit" action of pages, templates, template parts, patterns, and navigation menus to the `post_type_supports` collection, moved from `@wordpress/edit-site` and the extensible site editor. It opens the entity with the entity navigator the screen sets in the editor store.
11
+
- Add the "Quick edit" action of pages to the `page` collection, moved from `@wordpress/edit-site` and the extensible site editor. It opens the quick edit form of the pages with the opener the screen sets in the editor store.
Copy file name to clipboardExpand all lines: packages/core-actions/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,17 @@ WordPress registers them on the server through the entity actions API, like a pl
8
8
9
9
The actions of this package live in folders of `src`, one per collection:
10
10
11
-
-`post_type_supports`: the default actions of every post type (`delete-post`, `duplicate-post`, `move-to-trash`, `order-pages`, `permanently-delete`, `rename-post`, `reset-post`, `restore`, `view-post`, and `view-post-revisions`).
12
-
-`page`: the actions pages have on top of the defaults (`set-as-homepage` and `set-as-posts-page`).
11
+
-`post_type_supports`: the default actions of every post type (`delete-post`, `duplicate-post`, `edit-post`, `move-to-trash`, `order-pages`, `permanently-delete`, `rename-post`, `reset-post`, `restore`, `view-post`, and `view-post-revisions`).
12
+
-`page`: the actions pages have on top of the defaults (`quick-edit`, `set-as-homepage`, and `set-as-posts-page`).
13
13
-`wp_block`: the actions patterns have on top of the defaults (`duplicate-pattern` and `export-pattern`).
14
14
-`wp_template_part`: the actions template parts have on top of the defaults (`duplicate-template-part`).
15
15
16
16
Each action has a folder named after its id, with the data of the action in `action.php` and its JavaScript parts in `action.tsx`. The `index.ts` of each collection is its script module, whose default export maps the id of each action to its JavaScript parts.
17
17
18
18
`src/index.php` registers the actions of each post type exposed in the REST API, on the `wp_entity_actions_api_init` action at priority 0, so a plugin hooking it at the default priority can remove or replace them:
19
19
20
+
-`edit-post`, for pages, templates, template parts, patterns, and navigation menus, when the user can edit them. It is only shown in the lists (its `context` is `list`), and it opens the entity the way the screen showing it does: the screen sets the function opening an entity with the `setEntityNavigator` private action of the editor store, and the action does nothing on a screen that sets none.
21
+
-`quick-edit`, for pages, when the user can edit them. It is only shown in the lists, and it opens the quick edit form of the pages the way the screen listing them does: the screen sets the function opening the form with the `setQuickEditOpener` private action of the editor store, and the action does nothing on a screen that sets none.
20
22
-`view-post`, for the viewable post types.
21
23
-`view-post-revisions`, for the post types supporting `revisions`.
22
24
-`duplicate-post`, for the post types the user can create, except templates, template parts, and patterns. Only in the Gutenberg plugin.
0 commit comments