Skip to content

Commit ab2faf2

Browse files
committed
add constante for deactive media synchro feature
1 parent 9aba8c3 commit ab2faf2

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ Compatible up to WordPress 4.9.x
2222

2323
## Changelog
2424

25+
### 3.2.1 - June 2018
26+
27+
* Feature: Add a constant for allow deactivate media synchro
28+
2529
### 3.2 - Novembre-December 2017 => April 2018
2630
* Feature: BREAKING, remove old bootstrap script for CRON, now use WP-CLI commands
2731
* Feature: SEO, add a canonical for synchronized contents to original content

bea-content-sync-fusion.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33
Plugin Name: BEA - Content Synchronization - Fusion
44
Plugin URI: https://beapi.fr
55
Description: Manage content synchronization across a WordPress multisite.
6-
Version: 3.2
6+
Version: 3.2.1
77
Author: Be API
88
Author URI: http://beapi.fr
99
Network: true
1010
Required WP : 4.6
1111
12-
Copyright 2013-2017 - Be API Team (technique@beapi.fr)
13-
14-
TODO :
15-
AJAX Taxo for Sync edition
12+
Copyright 2013-2018 - Be API Team (technique@beapi.fr)
1613
*/
1714

1815
// Plugin constants
19-
define( 'BEA_CSF_VERSION', '3.2' );
16+
define( 'BEA_CSF_VERSION', '3.2.1' );
2017
define( 'BEA_CSF_OPTION', 'bea-content-sync-fusion' );
2118
define( 'BEA_CSF_CRON_QTY', 500 );
2219

20+
if ( ! defined( 'BEA_CSF_MEDIA_FEATURE' ) ) {
21+
define( 'BEA_CSF_MEDIA_FEATURE', true );
22+
}
23+
2324
// Define the table relation variables
2425
if ( empty( $GLOBALS['wpdb']->bea_csf_relations ) ) {
2526
$GLOBALS['wpdb']->bea_csf_relations = $GLOBALS['wpdb']->base_prefix . 'bea_csf_relations';
@@ -34,8 +35,8 @@
3435
}
3536

3637
if ( empty( $GLOBALS['wpdb']->bea_csf_queue_maintenance ) ) {
37-
$GLOBALS['wpdb']->bea_csf_queue_maintenance = $GLOBALS['wpdb']->base_prefix . 'bea_csf_queue_maintenance';
38-
$GLOBALS['wpdb']->ms_global_tables[] = 'bea_csf_queue_maintenance';
38+
$GLOBALS['wpdb']->bea_csf_queue_maintenance = $GLOBALS['wpdb']->base_prefix . 'bea_csf_queue_maintenance';
39+
$GLOBALS['wpdb']->ms_global_tables[] = 'bea_csf_queue_maintenance';
3940
}
4041

4142
// Plugin URL and PATH
@@ -113,10 +114,14 @@ function init_bea_content_sync_fusion() {
113114
new BEA_CSF_Client();
114115
new BEA_CSF_Multisite();
115116
new BEA_CSF_Relations();
116-
new BEA_CSF_Media();
117117
new BEA_CSF_SEO();
118118
new BEA_CSF_Query();
119119

120+
// Server optional - MEDIA
121+
if ( true === constant( 'BEA_CSF_MEDIA_FEATURE' ) ) {
122+
new BEA_CSF_Media();
123+
}
124+
120125
// Addons
121126
new BEA_CSF_Addon_Post_Types_Order();
122127
new BEA_CSF_Addon_ACF();

0 commit comments

Comments
 (0)