LLMS_Meta_Box_Video::save( int $post_id, object $post )
Static save method cleans variables and saves using update_post_meta
Description Description
Parameters Parameters
- $post_id
-
(int) (Required) id of post object
- $post
-
(object) (Required) WP post object
Return Return
(void)
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.video.php
public static function save( $post_id, $post ) { global $wpdb; if ( isset( $_POST['_video_embed'] ) ) { $video = ( llms_clean( $_POST['_video_embed'] ) ); update_post_meta( $post_id, '_video_embed', ( '' === $video ) ? '' : $video ); } if ( isset( $_POST['_audio_embed'] ) ) { $audio = ( llms_clean( $_POST['_audio_embed'] ) ); update_post_meta( $post_id, '_audio_embed', ( '' === $audio ) ? '' : $audio ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
?? | Introduced. |