Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( isset( $_POST['slide_duration'] ) && is_numeric( $_POST['slide_duration'] ) && $_POST['slide_duration'] >= 1 ) {
- $slide_duration = intval($_POST['slide_duration']);
- update_post_meta( $post_id, 'slide_duration', $slide_duration );
- }
- else {
- delete_post_meta( $post_id, 'slide_duration' );
- }
- if ( isset( $_POST['background-video'] ) ) {
- update_post_meta( $post_id, 'slide_duration', $video_meta['length'] );
- }
- <?php
- $slide_duration = isset( $theme_stored_meta['slide_duration'] ) ? intval($theme_stored_meta['slide_duration'][0]) : '';
- ?>
- <input type="number" name="slide_duration" value="<?=$slide_duration?>" min="1" step="1" style="width: 70px;" /> <?=__('seconds', 'theme')?>
Add Comment
Please, Sign In to add comment