Post Meta Checker
Viewer meta modern (AJAX + jQuery) dengan pencarian, read-only untuk meta protected/hidden, edit terbatas, ekspor/impor, admin-only, dan fallback bila REST dibatasi.
by WordPress Developer · github.com/sadewadee/post-meta-checker
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/sadewadee/post-meta-checker/archive/refs/heads/main.zipReadme
Post Meta Checker
A modern WordPress plugin for viewing and editing post meta with AJAX-first approach, REST API fallback, and comprehensive security features.
Features
- AJAX-First Architecture: Primary operations use admin-ajax with REST API as optional enhancement
- Comprehensive Meta Support: View meta for posts, users, comments, and terms
- Security-Focused: Admin-only access with proper capability checks and nonce verification
- Protected Meta Handling: Read-only display for protected/hidden meta (underscore prefix)
- No Create/Delete: Only allows updating existing meta keys, prevents accidental data creation/loss
- Modern UI: Clean, responsive interface with search, filtering, and accessibility features
- Export/Import: JSON-based meta export and import functionality
- REST Fallback: Automatic detection and fallback when REST API is disabled
- i18n Ready: Full internationalization support
Requirements
- WordPress 6.8 or higher
- PHP 7.4 or higher
- Administrator capability (
manage_options)
Installation
- Upload the plugin files to
/wp-content/plugins/post-meta-checker/ - Activate the plugin through the 'Plugins' menu in WordPress
- The meta viewer will appear as a meta box on post edit screens
Usage
Viewing Meta
- Navigate to any post edit screen (Block Editor or Classic Editor)
- Scroll down to find the "Post Meta Checker" meta box
- All meta keys and values will be displayed in a searchable table
Editing Meta
- Only non-protected meta keys can be edited
- Protected meta (starting with underscore) is displayed as read-only
- Changes are saved automatically when you modify values
- Different input types are provided based on value type (text, number, checkbox, textarea for JSON)
Search and Filtering
- Use the search box to find specific meta keys or values
- Toggle "Hide Protected Meta" to hide underscore-prefixed keys
- Toggle "Only Editable" to show only meta that can be modified
Export/Import
- Click "Export" to download all meta as a JSON file
- Click "Import" to upload and restore meta from a JSON file
- Import only updates existing meta keys, never creates new ones
Security Features
- Admin-Only Access: Only users with
manage_optionscapability can use the plugin - Nonce Verification: All AJAX requests are protected with WordPress nonces
- Protected Meta: Meta keys starting with underscore are read-only
- No Meta Creation: Plugin never creates new meta keys, only updates existing ones
- Sanitization: All input is sanitized using WordPress
sanitize_meta()function - Capability Checks: Consistent capability checking throughout the plugin
Technical Architecture
AJAX-First Approach
- Primary data operations use
admin-ajax.phpendpoints - REST API is used optionally for enhanced editability detection
- Automatic fallback when REST is disabled by security plugins
Meta Box Integration
- Uses WordPress
add_meta_box()for consistent UI placement - Compatible with both Block Editor (Gutenberg) and Classic Editor
- Positioned in "normal" context with "high" priority
File Structure
post-meta-checker/
├── post-meta-checker.php # Main plugin file
├── assets/
│ ├── admin.css # Admin styling
│ └── admin.js # jQuery-based functionality
├── languages/
│ └── morden-post-meta-viewer.pot # Translation template
├── docs/
│ └── Readme.md # Detailed documentation
└── README.md # This file
AJAX Endpoints
mmv_get_all_post_meta- Retrieve all post metammv_get_all_user_meta- Retrieve all user metammv_get_all_comment_meta- Retrieve all comment metammv_get_all_term_meta- Retrieve all term metammv_update_meta- Update existing meta valuemmv_export_meta- Export meta as JSONmmv_import_meta- Import meta from JSON
Settings
Optional settings page available at Settings > Meta Viewer:
- Force AJAX-only: Disable REST API usage entirely
Compatibility
WordPress Versions
- Tested with WordPress 6.8+
- Compatible with Block Editor and Classic Editor
- Follows WordPress Coding Standards (WPCS)
Security Plugins
- Automatically detects when REST API is disabled
- Falls back gracefully to admin-ajax only mode
- No functionality loss when REST is blocked
Themes and Plugins
- Uses standard WordPress hooks and APIs
- No theme dependencies
- Minimal plugin conflicts due to admin-only scope
Development
Coding Standards
- Follows WordPress Coding Standards (WPCS)
- PSR-4 autoloading compatible structure
- Comprehensive DocBlock documentation
Hooks and Filters
- Uses standard WordPress action and filter hooks
- Respects existing meta sanitization filters
- Compatible with custom meta registration
Testing
- Manual testing procedures documented
- Capability and security testing included
- Cross-browser compatibility verified
Changelog
1.0.0 - 2024-01-01
- Initial release
- AJAX-first meta viewer implementation
- REST API fallback support
- Export/import functionality
- Admin-only security model
- i18n support
License
This plugin is licensed under the GPL-3.0-or-later license.
Support
For support and bug reports, please use the WordPress plugin support forums or contact the plugin author.
Contributing
Contributions are welcome! Please follow WordPress coding standards and include appropriate tests for any new functionality.