The content approval grid
The Pending Approval block is a card that contains a grid of posts in pending (or pending review) status. It is the main content-approval surface on the dashboard.
What appears in the grid
Source: Posts whose status is "pending", "pending review", "pending_review", or any status containing "pending". They are loaded via fetchPendingPosts (with pagination and optional date filters) and cached (see below).
Columns: The grid uses the same column system as the main Posts grid but with a reduced set (e.g. category can be hidden via customColumns). You see enough to identify the post and take action.
Behavior: Inline editing (status, author, date, categories, labels, etc.) and row actions (e.g. edit, trash) are available so you can approve, reject, or edit without leaving the dashboard.
Approve All
Button: "Approve All" is shown in the Pending Approval card header when there is at least one pending post.
Action: When you click it, the dashboard runs approveAllPendingPosts: it processes posts in chunks (e.g. 10 at a time with a short delay between chunks), updates each post's status to "publish", and shows a loading toast with progress (e.g. "Approving posts: 10/25…").
After completion: A success (or partial failure) toast is shown, the pending list is refreshed (force refresh to bypass cache), and dashboard KPIs are refreshed. If the list goes from having items to zero, a confetti animation is triggered near the empty-state illustration.
Benefit: Clear the queue quickly when you trust all pending items and want to publish them in one go.
Empty state
When there are no pending posts, the grid shows an empty state: illustration, title like "You have no pending approval posts." and a short message that new submissions will appear there for quick review.
Benefit: Clear signal that there's nothing left to approve.
Caching and refresh
Pending posts are cached (e.g. in localStorage) with keys derived from the request (e.g. no filter, date-from, date-to, or range). After approve all (or single status changes that remove a post from "pending"), the pending posts cache is invalidated so the next load shows fresh data.
Clear Cache in the header also invalidates the pending posts cache and invalidates React Query for posts, so the pending grid reflects the latest statuses.