WP Manifestindependent plugin directory
manifest / users / wp-content-access-manager

WP Content Access Manager

A custom WordPress plugin with admin settings, secure REST APIs, and frontend content restriction.

by Yash Mule · github.com/yashmuledev/wp-content-access-manager · website

0stars
0forks

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/yashmuledev/wp-content-access-manager/archive/refs/heads/main.zip

A custom WordPress plugin that allows administrators to manage frontend content access using an admin settings page and secure REST API endpoints.


🚀 Features

  • Admin settings page to configure access message
  • Secure form handling using WordPress nonces
  • Custom REST API endpoints (GET & POST)
  • Permission-based access control
  • Frontend content restriction for unauthenticated users
  • REST API tested using Postman

🧱 Plugin Structure

wp-content-access-manager/ ├── wp-content-access-manager.php ├── includes/ │ ├── admin-menu.php │ ├── rest-api.php │ └── content-filter.php


🔌 REST API Endpoints

GET /wp-json/wpcam/v1/settings

POST /wp-json/wpcam/v1/settings

Example request body:

{ "access_message": "Please login to view this content" }

Authentication required: WordPress Application Passwords


🧪 Testing

  • REST APIs tested using Postman
  • Unauthorized requests correctly return 401
  • Permission checks enforced using permission_callback
  • Admin-only access for sensitive operations

🛠 Tech Stack

  • WordPress Plugin API
  • WordPress REST API
  • PHP
  • Postman

👨‍💻 Author

Yash Mule
GitHub: https://github.com/YashMuleDev