Skip to content

exelearning/wp-exelearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

eXeLearning

CI codecov WordPress Version PHP Version License: AGPL v3 Downloads Last Commit Open Issues

WordPress plugin for eXeLearning content management. Upload, manage and embed eXeLearning .elpx files directly in your WordPress site.

Demo

Try eXeLearning instantly in your browser using WordPress Playground! Note that all changes will be lost when you close the browser window, as everything runs locally in your browser.

Preview in WordPress Playground

⚠️ The embedded eXeLearning editor is not included in this preview. You can install it from Settings > eXeLearning using the "Download & Install Editor" button. All other plugin features (ELP upload, shortcode, Gutenberg block, preview) work normally.

Features

  • ELPX File Support: Upload and manage eXeLearning .elpx files through the WordPress Media Library
  • Automatic Extraction: ELPX files are automatically extracted and ready to display
  • Embedded Editor: Edit eXeLearning content directly from WordPress without leaving the browser
  • Gutenberg Block: Embed eXeLearning content using the native block editor
  • Shortcode Support: Use [exelearning id="123"] to embed content in classic editor
  • Media Library Integration: View ELPX metadata directly in the media library

Installation

From Releases (Recommended)

  1. Download the latest release from the GitHub Releases page.
  2. Upload the downloaded ZIP file via Plugins > Add New > Upload Plugin.
  3. Activate the plugin.

From Source (Development)

If you clone the repository directly, you must build the eXeLearning editor:

git clone https://github.com/exelearning/wp-exelearning.git
cd wp-exelearning
make build-editor

By default, make build-editor fetches https://github.com/exelearning/exelearning from main using a shallow checkout. You can override source/ref at runtime:

EXELEARNING_EDITOR_REF=vX.Y.Z EXELEARNING_EDITOR_REF_TYPE=tag make build-editor
# or
EXELEARNING_EDITOR_REF=my-feature EXELEARNING_EDITOR_REF_TYPE=branch make build-editor

Important: It is recommended to download from Releases for production use, which includes the embedded editor pre-built. If you clone the repository without building the editor, you can install it from the WordPress admin panel at Settings > eXeLearning using the "Download & Install Editor" button, which fetches the latest static editor package from GitHub Releases automatically. No remote loading or proxy is used at runtime.

Usage

Uploading ELPX Files

  1. Go to Media > Add New in your WordPress admin
  2. Upload your .elpx file
  3. The file will be automatically validated and extracted

Embedding Content

Using Gutenberg Block:

  1. Add a new block in the editor
  2. Search for "eXeLearning"
  3. Select an ELPX file from your media library

Using Shortcode:

[exelearning id="123"]

Replace 123 with the attachment ID of your ELPX file.

Viewing ELPX Files

  • Go to Media > Library to see all uploaded files
  • ELPX files display metadata including license, language, and resource type
  • Click on an ELPX file to preview its content

Managing styles

Administrators can upload eXeLearning style packages and control which styles the embedded editor exposes from Settings → eXeLearning → Styles.

  • Upload one or more .zip style packages. A valid package contains a config.xml that declares at least a <name>, plus a style.css and any supporting assets.
  • Uploaded styles extract to wp-content/uploads/exelearning-styles/<slug>/ and are never written inside dist/static/, so reinstalling the embedded editor does not destroy them.
  • Each built-in style can be hidden individually. Hidden built-ins disappear from the editor's style selector but remain on disk.
  • The editor refuses to install styles from imported content or other unapproved sources while the admin-managed registry is active.
  • Projects that reference a disabled or deleted style fall back to the editor's default style instead of failing to open.

Uploaded ZIPs are validated against path traversal, absolute paths, oversize archives (default 20 MB, filterable via exelearning_styles_max_zip_size), and a strict file-extension allow-list.

Development

For development, you can bring up a local WordPress environment with the plugin pre-installed:

make up

This will start a Dockerized WordPress instance at http://localhost:8888 with credentials:

  • Username: admin
  • Password: password

Available Commands

make up          # Start development environment
make down        # Stop containers
make test        # Run PHPUnit tests
make lint        # Check code style
make fix         # Auto-fix code style

Requirements

  • WordPress 6.1 or higher
  • PHP 8.0 or higher

License

This plugin is licensed under the AGPL v3 or later.