GymGuyz Network Trainer Sync
A specialized WordPress Multisite plugin designed to synchronize trainer profiles, metadata, and profile pictures from an external API endpoint across multiple sub-sites within a large WordPress network.
by Kostiantyn Liashkovskyi · github.com/mordecai03/gymguyz-network-trainer-sync
★ 0stars
0forks
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/mordecai03/gymguyz-network-trainer-sync/archive/refs/heads/main.zipReadme
GymGuyz Network Trainer Sync
A specialized WordPress Multisite plugin designed to synchronize trainer profiles, metadata, and profile pictures from an external API endpoint across multiple sub-sites within a large WordPress network.
Features
- Multisite Architecture: Centralized network settings panel (
manage_networkcapability) with automated execution across sub-sites based on unique studio IDs (mindbody_id). - Automated Background Sync: Integrated custom WP-Cron schedules (ranging from hourly to daily) with dynamic interval registration.
- Smart Media Handling: Leverages
media_handle_sideload()for remote image processing, caching check via post meta (_gg_api_image_url) to prevent redundant downloads, and automatic cleanup of outdated attachments. - Data Integrity & Cleanup: Automatically creates, updates, and removes local
trainerscustom post types to match the current state of the remote API payload. - Quick Actions UI: Adds custom shortcuts to the WordPress Admin Bar for both network-wide and single-site manual triggers.
Technical Stack
- PHP 8.x (Object-Oriented patterns, closures, array filtering)
- WordPress Multisite API (
switch_to_blog,restore_current_blog,get_sites, site options) - WordPress HTTP API (
wp_remote_get,wp_remote_retrieve_body) - WP-Cron API (
wp_schedule_event, custom cron intervals)
Installation
- Upload the
gymguyz-network-trainer-syncfolder to the/wp-content/plugins/directory of your WordPress network. - Network Activate the plugin through the WP Network Administrator dashboard.
- Navigate to GG Sync Trainers in the Network Admin menu to configure your API Bearer Token, Endpoint URL, and synchronization frequency.