diff options
Diffstat (limited to 'plugins/jetpack/modules/enhanced-distribution.php')
-rw-r--r-- | plugins/jetpack/modules/enhanced-distribution.php | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/plugins/jetpack/modules/enhanced-distribution.php b/plugins/jetpack/modules/enhanced-distribution.php index dd2fdab0..754b90e7 100644 --- a/plugins/jetpack/modules/enhanced-distribution.php +++ b/plugins/jetpack/modules/enhanced-distribution.php @@ -11,9 +11,6 @@ * Additional Search Queries: google, seo, firehose, search, broadcast, broadcasting */ -Jetpack_Sync::sync_posts( __FILE__ ); -Jetpack_Sync::sync_comments( __FILE__ ); - function jetpack_enhanced_distribution_activate() { Jetpack::check_privacy( __FILE__ ); } @@ -53,3 +50,24 @@ if ( isset( $_GET['get_freshly_pressed_data'] ) ) { } } } + +add_action( 'rss_head', 'jetpack_enhanced_distribution_feed_id' ); +add_action( 'rss_item', 'jetpack_enhanced_distribution_post_id' ); +add_action( 'rss2_head', 'jetpack_enhanced_distribution_feed_id' ); +add_action( 'rss2_item', 'jetpack_enhanced_distribution_post_id' ); + +function jetpack_enhanced_distribution_feed_id(){ + (int) $id = Jetpack_Options::get_option( 'id' ); + if ( $id > 0 ) { + $output = sprintf( '<site xmlns="com-wordpress:feed-additions:1">%d</site>', $id ); + echo $output; + } +} + +function jetpack_enhanced_distribution_post_id(){ + $id = get_the_ID(); + if ( $id ) { + $output = sprintf( '<post-id xmlns="com-wordpress:feed-additions:1">%d</post-id>', $id ); + echo $output; + } +} |