OS : Linux
PHP Version : 7.4.33
Software : Apache/2.4.6 (CentOS) PHP/7.4.33
Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64=' ) ) {
return;
}
Jetpack::check_privacy( __FILE__ );
}
add_action( 'jetpack_before_activate_default_modules', 'jetpack_enhanced_distribution_before_activate_default_modules' );
/**
* If a request has ?get_freshly_pressed_data=true appended
* to the end, then let's provide the necessary data back via JSON.
*/
if ( isset( $_GET['get_freshly_pressed_data'] ) ) {
add_action( 'template_redirect', 'jetpack_get_freshly_pressed_data' );
function jetpack_get_freshly_pressed_data() {
if ( is_single() ) {
wp_send_json_success( array(
'blog_id' => Jetpack_Options::get_option( 'id' ),
'post_id' => get_the_ID(),
) );
} else {
wp_send_json_error( array(
'message' => 'Not Singular',
) );
}
}
}
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( '