/** * Update a video in the Brightcove Video Cloud * * Updates a video with the provided id and optional other data in the video cloud. * * @since 1.0.0 * * @param string $video_id the id of the video to update * @param array $args optional array of other arguments used in video creation * * @return array|bool array of data about the updated video or false on failure. */ public function video_update($video_id, $args = array()) { $data = array(); $video_id = utf8_uri_encode(sanitize_text_field($video_id)); $data = BC_Utility::sanitize_payload_args_recursive($args); return $this->send_request(esc_url_raw(self::CMS_BASE_URL . $this->get_account_id() . '/videos/' . $video_id), 'PATCH', $data); }
public static function sanitize_payload_item($item) { if (is_array($item)) { return BC_Utility::sanitize_payload_args_recursive($item); } return utf8_uri_encode(sanitize_text_field($item)); }