Epic Learning Sync for LearnPress
Epic Learning Sync plugin for LearnPress
by ThinkRED Technologies · github.com/thinkredtech/epic-learning-sync
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/thinkredtech/epic-learning-sync/archive/refs/heads/main.zip
🔍 Overview
Epic Learning Sync is a WordPress plugin that seamlessly synchronizes LearnPress courses with data from the Epic Learning Network API. It provides a robust, secure, and user-friendly way to manage course content while ensuring data integrity and performance.
🚀 Features
- Automated Course Synchronization: Import and update courses from Epic Learning Network API
- Selective Sync: Choose which courses to synchronize
- Asynchronous Processing: Perform sync operations without blocking the WordPress admin interface
- Backup & Restore: Create automatic backups before sync/delete operations with easy restore functionality
- Secure API Integration: Safely connect to Epic Learning Network with proper authentication
- Detailed Logging: Comprehensive error logging with rotation for troubleshooting
- Clean Uninstallation: Properly remove all plugin data when uninstalled
- Developer-Friendly: Extendable with hooks and filters
📦 Installation
Manual Installation
- Download the plugin zip file
- Navigate to WordPress Admin Dashboard → Plugins → Add New
- Click "Upload Plugin" and select the downloaded zip file
- Click "Install Now"
- After installation completes, click "Activate Plugin"
Via WP-CLI
wp plugin install epic-learning-sync.zip --activate
⚙️ Configuration
- Navigate to Settings → Epic Learning Sync in your WordPress admin dashboard
- Enter your Epic Learning Network API credentials:
- API Application ID
- API Key
- Save your settings
- You're ready to start syncing courses!
🧩 Usage
Synchronizing Courses
- Go to Settings → Epic Learning Sync
- Click the "Start Sync" button
- The plugin will fetch course data from the Epic Learning Network API and create or update LearnPress courses accordingly
- A progress bar will show the sync status
- You can continue using WordPress while the sync runs in the background
Deleting Courses
- Go to Settings → Epic Learning Sync
- Click the "Delete All Courses" button
- Confirm the deletion when prompted
- The plugin will remove all LearnPress courses and related data
- A progress bar will show the deletion status
Managing Backups
- Go to Settings → Epic Learning Sync
- Scroll down to the "Backup Management" section
- View available backups with timestamps
- Click "Restore" on any backup to revert to that state
- Confirm the restoration when prompted
🪝 Hooks & Filters
Epic Learning Sync provides several hooks and filters for developers to extend its functionality:
Actions
/**
* Fires before course sync begins
*/
do_action( 'epic_learning_sync_before_sync' );
/**
* Fires after course sync completes
*
* @param int $total_processed Number of courses processed
*/
do_action( 'epic_learning_sync_after_sync', $total_processed );
/**
* Fires before course deletion begins
*/
do_action( 'epic_learning_sync_before_delete' );
/**
* Fires after course deletion completes
*/
do_action( 'epic_learning_sync_after_delete' );
/**
* Fires when storing additional course data
*
* @param int $post_id The course post ID
* @param array $additional_data Additional course data from API
*/
do_action( 'epic_learning_sync_store_course_data', $post_id, $additional_data );
Filters
/**
* Filter the batch size for course processing
*
* @param int $batch_size Default batch size (10)
* @return int Modified batch size
*/
$batch_size = apply_filters( 'epic_learning_sync_batch_size', 10 );
/**
* Filter the batch size for course deletion
*
* @param int $batch_size Default batch size (50)
* @return int Modified batch size
*/
$batch_size = apply_filters( 'epic_learning_sync_delete_batch_size', 50 );
/**
* Filter the course data before processing
*
* @param array $course Course data from API
* @return array Modified course data
*/
$course = apply_filters( 'epic_learning_sync_course_data', $course );
/**
* Filter the post data before creating/updating a course
*
* @param array $post_data WordPress post data
* @param array $course Course data from API
* @return array Modified post data
*/
$post_data = apply_filters( 'epic_learning_sync_post_data', $post_data, $course );
🧰 Development
Requirements
- PHP 7.4 or higher
- WordPress 6.0 or higher
- LearnPress plugin installed and activated
File Structure
epic-learning-sync/
├── admin/
│ └── partials/
│ └── epic-learning-sync-admin-display.php
├── assets/
│ ├── css/
│ │ └── epic-learning-sync-admin.css
│ ├── js/
│ │ └── epic-learning-sync-admin.js
│ └── images/
│ └── epic-learning-sync-logo.png
├── includes/
│ ├── class-epic-learning-sync.php
│ ├── class-epic-learning-sync-admin.php
│ ├── class-epic-learning-sync-api.php
│ ├── class-epic-learning-sync-course-handler.php
│ ├── class-epic-learning-sync-logger.php
│ └── class-epic-learning-sync-uninstaller.php
├── languages/
│ └── epic-learning-sync.pot
├── epic-learning-sync.php
├── index.php
├── LICENSE
├── README.md
└── uninstall.php
Coding Standards
This plugin follows the WordPress Coding Standards for PHP, HTML, CSS, and JavaScript.
📃 License
Epic Learning Sync is licensed under the GPL v3.
🙋 Support
For support, please contact ThinkRED Technologies.
📊 Changelog
2.1.0
- Major refactor for improved security, performance, and code structure
- Added backup and restore functionality
- Improved error handling and logging
- Enhanced UI with better progress indicators
- Added developer hooks and filters
- Added internationalization support
1.0.0
- Initial release
✍️ Credits
This plugin was developed by ThinkRED Technologies.