DEV Community

Vara Prasad Jada
Vara Prasad Jada

Posted on AI-assisted

Building My First WordPress.org Plugin: VaraStudy Vault Access Control

I recently published my first WordPress plugin, VaraStudy Vault Access Control, in the official WordPress.org Plugin Directory.

The plugin was developed for VaraStudy Vault, an independent WordPress-based study-resource project. Its purpose is to provide co

urse-wise and semester-wise access control for contributors while keeping publishing authority with administrators.

The Problem

A study-resource website can contain content for multiple courses, semesters, subjects and resource categories.

When multiple contributors are allowed to submit content, unrestricted access can create problems:

  • Contributors may access content outside their assigned courses.
  • Semester selections may not match their assigned permissions.
  • A contributor may link a resource to an unauthorized subject.
  • Incorrect submissions may become publicly available without administrator review.

I wanted a system that allowed contributors to submit relevant academic resources without giving them unrestricted publishing access.

What I Built

VaraStudy Vault Access Control adds course-group and semester-based permissions to an existing WordPress setup.

The plugin works with these custom post types:

  • subjects
  • study-materials
  • question-papers

It uses the existing course_group taxonomy and configured Advanced Custom Fields (ACF) fields.

1. Course and Semester Permissions

Administrators can assign contributors specific course groups and semesters.

Contributors are restricted to the content associated with their assigned scope rather than receiving unrestricted access.

2. Controlled Subject Selection

Subject selectors are filtered according to the contributor's assigned course groups and semesters.

The plugin also excludes Draft and Pending Review subjects from contributor subject selectors. Administrators retain unrestricted choices.

3. Administrator Moderation

Contributor submissions are automatically sent for Pending Review.

Administrators review the submitted content and decide whether to publish it. Contributors do not receive publishing authority through this workflow.

4. Validation During Saving

The plugin performs additional validation after ACF fields are saved.

For example, a Question Paper's semester must match both the contributor's assignment and the linked Subject's semester. Invalid submissions are kept as drafts and flagged.

5. Administrator Access

Administrators retain unrestricted access to the relevant content and selection options.

Technical Requirements

The plugin is designed to work with an existing WordPress study-resource setup.

  • WordPress 6.0+
  • PHP 7.4+
  • Existing custom post types
  • course_group taxonomy
  • Advanced Custom Fields (ACF)

The plugin does not register the custom post types or create the ACF fields. Those are expected to exist in the website.

Development and Testing

I developed the plugin around the requirements of VaraStudy Vault and tested its functionality in my existing WordPress installation.

Testing included:

  • Contributor access with assigned course groups and semesters.
  • Semester filtering in Subject and Question Paper fields.
  • Subject selection restrictions.
  • Editing the contributor's own Draft and Pending Review content.
  • Validation of unauthorized semester and subject combinations.
  • Administrator access and publishing permissions.

The plugin was released as version 1.0.5.

Published on WordPress.org

Publishing the plugin in the official WordPress.org Plugin Directory was an important milestone for this project.

The plugin is publicly available:

VaraStudy Vault Access Control – WordPress.org

Source code:

GitHub Repository

What I Learned

This project gave me practical experience developing a WordPress plugin around an existing content architecture, working with custom post types and ACF, implementing permission checks, validating submitted data and preparing a release for the WordPress.org Plugin Directory.

More importantly, it was an opportunity to turn a requirement from a real project into a reusable plugin.

This is my first published WordPress plugin, and I plan to continue developing independent software projects under my own name.


Author: Vara Prasad Jada
Project: VaraStudy Vault Access Control
Version: 1.0.5
License: GPL-3.0-or-later

Top comments (0)