| 1 |
<?php |
| 2 |
/** |
| 3 |
* Module Name: Enhanced Distribution |
| 4 |
* Module Description: Share your public posts and comments to search engines and other services in real-time. |
| 5 |
* Sort Order: 100 |
| 6 |
* First Introduced: 1.2 |
| 7 |
* Requires Connection: Yes |
| 8 |
* Auto Activate: Public |
| 9 |
* Module Tags: Writing |
| 10 |
*/ |
| 11 |
|
| 12 |
Jetpack_Sync::sync_posts( __FILE__ ); |
| 13 |
Jetpack_Sync::sync_comments( __FILE__ ); |
| 14 |
|
| 15 |
function jetpack_enhanced_distribution_activate() { |
| 16 |
Jetpack::check_privacy( __FILE__ ); |
| 17 |
} |
| 18 |
|
| 19 |
|
| 20 |
// In case it's active prior to upgrading to 1.9 |
| 21 |
function jetpack_enhanced_distribution_before_activate_default_modules() { |
| 22 |
$old_version = Jetpack_Options::get_option( 'old_version' ); |
| 23 |
list( $old_version ) = explode( ':', $old_version ); |
| 24 |
|
| 25 |
if ( version_compare( $old_version, '1.9-something', '>=' ) ) { |
| 26 |
return; |
| 27 |
} |
| 28 |
|
| 29 |
Jetpack::check_privacy( __FILE__ ); |
| 30 |
} |
| 31 |
|
| 32 |
add_action( 'jetpack_activate_module_enhanced-distribution', 'jetpack_enhanced_distribution_activate' ); |
| 33 |
add_action( 'jetpack_before_activate_default_modules', 'jetpack_enhanced_distribution_before_activate_default_modules' ); |
| 34 |
|