true ) ); foreach ( $post_types as $post_type ) { register_rest_field( $post_type, 'jetpack_sharing_enabled', array( 'get_callback' => function ( array $post ) { if ( ! isset( $post['id'] ) ) { return false; } return (bool) ! get_post_meta( $post['id'], 'sharing_disabled', true ); }, 'schema' => array( 'description' => __( 'Are sharing buttons enabled?', 'jetpack' ), 'type' => 'boolean', ), ) ); add_post_type_support( $post_type, 'jetpack-sharing-buttons' ); } } } );