Repository navigation
Posts: add bulk restore action for trashed posts and pages - #864
Merged
AllTerrainDeveloper merged 5 commits intoOct 9, 2026
Merged
AllTerrainDeveloper merged 5 commits into
AllTerrainDeveloper merged 5 commits into
Conversation
Collaborator
|
I will solve conflicts :) Sorry, we have been busier than usual |
Resolve conflicts with the new `{ mode }` argument on the
`openstation.postsWindow.bulkActions` filter: pass `mode` to
resolveBulkActions() alongside the new restore dispatch, and fold both
changes into the BulkAction JSDoc and the hooks/example docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes #863
Adds a Restore bulk action to the native Posts and Pages windows when filtering items by the
Trashstatus, allowing users to restore selected posts and pages directly from the window's bulk action bar.Why?
Previously, selecting items while viewing the
Trashfilter in the Posts and Pages windows only displayed the "Move to trash" button in the bulk action bar. Trashing an already-trashed item is non-functional, and users had no way to restore items from within the list itself without opening the separate Recycle Bin app.How?
apps/posts/parts/query.php:openstation_posts_app_restore()to untrash selected IDs using nativewp_untrash_post().apps/posts/posts.os.php&apps/pages/pages.os.php:restoreaction on thedesktop-mode-postsanddesktop-mode-pagesapp manifests.apps/posts/parts/columns.ts:defaultBulkActions()to include therestorebulk action.apps/posts/parts/app.ts:bulkBarto wire therestoreaction dispatch (( ids ) => ctx.dispatch( 'restore', { ids } )).restorewhenctx.state.status === 'trash'andtrashin all other views.apps/posts/parts/types.ts:BulkActionJSDoc comments to document both default actions.docs/hooks-reference.md&docs/examples/native-posts.md:openstation.postsWindow.bulkActionsshipping bothtrashandrestoreactions.apps/posts/posts.test.ts:restoreaction.tests/phpunit/tests/postsApp.php:restoreserver action.Testing Instructions
Screencast
Restore-Demo.mov
Use of AI Tools
AI assistance: Yes
Tool(s): Antigravity
Model(s): Gemini
Used for: For suggesting changes and adding tests. Final decisions and edits were made by me.