Add city-only Provider Listings meta box with JSON-safe persistence - #2
Merged
Merged
Conversation
20 tasks
Copilot
AI
changed the title
[WIP] Add admin UI meta box for editing provider listings in community plugin
Add city-only Provider Listings meta box with JSON-safe persistence
Jul 6, 2026
sanruiz
marked this pull request as ready for review
July 7, 2026 18:02
Collaborator
|
LGTM |
sanruiz
approved these changes
Jul 7, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d8464a878
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
$wpdb->update()/insert() bypass update_post_meta() on purpose (it calls wp_unslash() and would corrupt the JSON's \" escapes), but that also skips WordPress' own cache invalidation. With a persistent object cache active, get_post_meta( $post_id, 'provider_listings' ) — including the WPGraphQL resolver — could keep serving the pre-edit JSON after a save. Addresses review feedback from Codex on PR #2.
miguelcolmenares
force-pushed
the
copilot/feat-add-admin-ui-meta-box
branch
from
August 17, 2026 07:28
5d8464a to
847ca70
Compare
miguelcolmenares
added a commit
that referenced
this pull request
Aug 17, 2026
…ors (#4) Fix silently-swallowed CI failures + resolve pre-existing PHPStan errors (#4) - Resolved all 3 pre-existing PHPStan errors in community-listings via real refactors, no suppressions - Fixed Makefile phpcs/phpstan/install/install-dev/build targets to propagate failures across all sub-plugins instead of only the last one in the loop - Aligned make phpcs with CI's own --warning-severity=0 behavior - Backfilled CHANGELOG entries for #2 and #3
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.
communityposts currently storeprovider_listingsas a raw JSON string consumed by WPGraphQL, but editors had no admin UI to maintain it. This change adds an editor-facing meta box for city pages and preserves JSON escape integrity by writing via$wpdbinstead of metadata APIs that unslash values.Admin UI (city-level only)
communityedit screens only whenlisting_type = city.normalcontext withhighpriority.JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) when parseable.Editor feedback in-box
Save path and data integrity
wp_create_nonce/wp_verify_nonce) andedit_postscapability gating.json_decode; invalid payloads are not persisted and surface an admin notice:Provider Listings not saved: invalid JSON.wp_postmetausing$wpdb->update()(with insert fallback when row is missing), avoidingupdate_post_meta()unslash corruption.Plugin wiring
ProviderListingsMetaBoxadmin component and registers it in plugin bootstrap.