Developer Docs: Overview
These guides are for theme and plugin developers who want to work with media offloaded by Media Cloud Sync: reading files, adjusting URLs and paths, reacting to uploads, and making their own content cloud-aware.
- Constants and Configuration
- Hooks Reference
- Making Your Plugin Cloud-Aware
- Helper API and Data Model
- WP-CLI Commands
Before you start
- Namespace: all plugin classes live in
Dudlewebs\WPMCS. - Prefix: every hook starts with
wpmcs_. - Load order: add your hooks on
plugins_loaded(or later) and check the plugin is active first:
add_action( 'plugins_loaded', function () {
if ( ! defined( 'WPMCS_VERSION' ) ) {
return; // Media Cloud Sync isn't active.
}
// Register your wpmcs_* hooks here.
} );
- Prefer WordPress core APIs.
wp_get_attachment_url(),wp_get_attachment_image_src(),wp_get_attachment_image(),wp_calculate_image_srcset(), andget_attached_file()are already filtered by the plugin. They return cloud URLs (or a readable path) automatically. Most integrations need nothing more. - Stability: the hooks and helpers documented here are the supported public surface. Classes and methods that aren’t documented are internal and may change without notice.