Lines:
1 to 29 of 29
<?php /** * Extend the REST API functionality for VideoPress users. * * @package automattic/jetpack */ /* class WPCOM_REST_API_V2_Attachment_VideoPress_Data */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::register_fields() – Registers the jetpack_videopress field and adds a filter to remove it for attachments that are not videos. */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::get_schema() – Defines data structure and what elements are visible in which contexts */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::get() – Getter: Retrieve current VideoPress data for a given attachment. */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::get_videopress_data() – Gets the VideoPress GUID for a given attachment. */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::is_video() – Checks if the given attachment is a video. */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::remove_field_for_non_videos() – Removes the jetpack_videopress field from the response if the given attachment is not a video. */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::update() – Setter: It does nothing since `jetpack_videopress` is a read-only field. */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::get_permission_check() – Permission Check for the field’s getter. Delegate the responsibility to the attachment endpoint, so it always returns true. */ /* function WPCOM_REST_API_V2_Attachment_VideoPress_Data::update_permission_check() – Permission Check for the field’s setter. Delegate the responsibility to the attachment endpoint, so it always returns true. */ if ( ( method_exists( 'Jetpack', 'is_connection_ready' ) && Jetpack::is_connection_ready() ) || ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) { wpcom_rest_api_v2_load_plugin( 'WPCOM_REST_API_V2_Attachment_VideoPress_Data' ); }