post_title."\n"; $content .= get_permalink( $data['post']->ID )."\n"; $headers[] = sprintf( 'From: %1$s <%2$s>', $data['name'], $data['source'] ); wp_mail( $data['target'], '['.__( 'Shared Post', 'jetpack' ).'] '.$data['post']->post_title, $content, $headers ); } function sharing_add_meta_box() { $post_types = get_post_types( array( 'public' => true ) ); $title = apply_filters( 'sharing_meta_box_title', __( 'Sharing', 'jetpack' ) ); foreach( $post_types as $post_type ) { add_meta_box( 'sharing_meta', $title, 'sharing_meta_box_content', $post_type, 'advanced', 'high' ); } } function sharing_meta_box_content( $post ) { do_action( 'start_sharing_meta_box_content', $post ); $disabled = get_post_meta( $post->ID, 'sharing_disabled', true ); ?>
'.__( 'Settings', 'jetpack' ).''; array_unshift( $links, $settings_link ); return $links; } function sharing_add_plugin_settings($links, $file) { if ( $file == basename( dirname( __FILE__ ) ).'/'.basename( __FILE__ ) ) { $links[] = '' . __( 'Settings', 'jetpack' ) . ''; $links[] = '' . __( 'Support', 'jetpack' ) . ''; } return $links; } function sharing_restrict_to_single( $services ) { // This removes Press This from non-multisite blogs - doesnt make much sense if ( is_multisite() === false ) { unset( $services['press-this'] ); } return $services; } function sharing_init() { if ( get_option( 'sharedaddy_disable_resources' ) ) { add_filter( 'sharing_js', 'sharing_disable_js' ); remove_action( 'wp_head', 'sharing_add_header', 1 ); } } function sharing_disable_js() { return false; } function sharing_global_resources() { $disable = get_option( 'sharedaddy_disable_resources' ); ?>