This page is a short summary for people who build on Public LMS. The full developer reference, with every hook, REST route and command, ships with the plugin’s source.
Blocks and shortcodes
The plugin’s front-end screens are blocks. The blocks are: course-grid, course-filters, course-hero, course-outcomes, course-faq, enroll-button, course-curriculum, course-progress, course-meta, course-instructors, course-reviews, student-dashboard, instructor-dashboard, certificate-verify, login, profile and checkout.
Every block has a shortcode in the form [publms_{block}]. These aliases also work: [publms_dashboard], [publms_courses], [publms_course_search], [publms_verify_certificate] and [publms_instructor_dashboard].
Elementor, Bricks and Divi have widgets that wrap the same blocks.
Template overrides
The plugin ships its front-end templates in its templates/ folder. To change one, copy the file to a public-learning-management-system/ folder inside your theme, with the same relative path.
Each template has a version, raised whenever the plugin changes it. LMS → Status lists your theme’s copies that are older than the plugin’s under Template overrides. See The Status screen.
WP-CLI commands
Every command is under wp publms. Add --help to any of them for the full synopsis.
| Command | What it does |
|---|---|
wp publms course list | List courses. |
wp publms course create | Create a course. |
wp publms course curriculum | Show a course’s curriculum. |
wp publms course add-section | Add a section. |
wp publms course add-item | Add a lesson, quiz or assignment to a section. |
wp publms course duplicate | Duplicate a course. |
wp publms course delete | Trash a course and its curriculum. |
wp publms course export <id> [--file=<path>] | Export a course as JSON. |
wp publms course import <file> | Import a course from JSON (as a draft). |
wp publms question list | List a quiz’s questions. |
wp publms question add | Add a question from JSON. |
wp publms question delete | Delete a question. |
wp publms question types | The question types this site can use. |
wp publms enrollment list | List enrollments. |
wp publms enrollment add | Enroll a user in a course. |
wp publms enrollment remove | Cancel a user’s enrollment (their progress stays, so re-enrolling resumes it). |
wp publms enrollment progress | Show a user’s progress in a course. |
wp publms enrollment reset | Start a course over: clear a user’s progress and reactivate the enrollment. |
wp publms pages list | List the pages and their state. |
wp publms pages create | Create the missing pages and the default course levels. |
wp publms pages assign | Point a page key at an existing page. |
wp publms settings list | List every setting with its value. |
wp publms settings get | Get one setting. |
wp publms settings set | Set one setting. |
wp publms settings reset | Restore every default. |
wp publms settings export | Export the settings as JSON (secrets left out). |
wp publms settings import | Import settings from a JSON file produced by export. |
wp publms status | Report the plugin’s edition, database, roles, pages, scheduling, stores and feature availability. |
wp publms migrate sources | List the plugins this site holds courses for. |
wp publms migrate run | Bring everything over from one plugin. Safe to run again: what was brought over before is skipped, and new students and progress are added. |
To preview a move from another LMS, add --dry-run to wp publms migrate run. See Moving from another LMS.
REST API and Abilities API
The plugin has a REST API; its routes are under public-learning-management-system/v1. It also registers abilities with WordPress’s Abilities API.
Hooks
The plugin has actions and filters for extending it, for example to add a payment gateway, an email, a status check or a dashboard section. The hook reference in the plugin’s source lists each one with its parameters.
Browser events
The plugin fires a publms:enrolled browser event after a free enrollment and a publms:purchase event when the receipt of a paid order is shown, and pushes publms_enrolled and publms_purchase to window.dataLayer when the page has one. Developers can change or remove the events with the publms_browser_events filter. See Analytics events.