bp_media_messages_save_gif_data( $message )
Save gif data into messages meta key “_gif_data”
Description
Parameters
- $message
-
(Required)
Source
File: bp-media/bp-media-filters.php
function bp_media_messages_save_gif_data( &$message ) { if ( ! bp_is_messages_gif_support_enabled() || empty( $_POST['gif_data'] ) ) { return; } $gif_data = $_POST['gif_data']; $still = bp_media_sideload_attachment( $gif_data['images']['480w_still']['url'] ); $mp4 = bp_media_sideload_attachment( $gif_data['images']['original_mp4']['mp4'] ); bp_messages_update_meta( $message->id, '_gif_data', [ 'still' => $still, 'mp4' => $mp4, ] ); bp_messages_update_meta( $message->id, '_gif_raw_data', $gif_data ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.