Plugin Architecture & File Structure
PlayCourse follows standard WordPress plugin conventions with a clear separation of concerns.
File structure
playcourse-lms/
playcourse-lms.php # bootstrap, constants, hooks
includes/
class-playcourse.php # main loader (singleton)
post-types/ # courses, lessons, quizzes (CPTs)
rest/ # REST API controllers
shortcodes/ # shortcode handlers
widgets/ # Elementor widgets
templates/ # overridable front-end templates
assets/ # css, js, images
languages/ # .pot / translationsData model
- Courses, lessons, topics and quizzes are custom post types.
- Curriculum order and relationships are stored as post meta.
- Enrollments and progress live in dedicated tables for performance.
Request lifecycle
On plugins_loaded the main class boots, registers CPTs and routes, then wires the front-end renderer. Pro hooks into the same lifecycle and adds its features only when a valid license is active.
Was this article helpful?