-
Notifications
You must be signed in to change notification settings - Fork 8
Synchronizations API
Amaury Balmer edited this page Mar 14, 2019
·
4 revisions
It is possible to declare synchronizations from a plugin or the theme with the method: BEA_CSF_Synchronizations::register
Example
add_action( 'plugins_loaded', 'init_bea_content_sync_fusion_register_medias', 11 );
function init_bea_content_sync_fusion_register_medias() {
if ( ! class_exists( 'BEA_CSF_Synchronizations' ) ) {
return;
}
BEA_CSF_Synchronizations::register(
array(
'active' => true,
'label' => 'Medias on network',
'post_type' => 'attachment',
'mode' => 'auto', // manual OR auto
'status' => 'publish', // publish OR pending OR user_selection
'emitters' => array( 'all' ),
'receivers' => array( 'all' )
)
);
}