'; echo ''; echo ''; echo ''; } // Video meta box display function function bloghub_video_meta_box_callback($post) { wp_nonce_field('video_meta_box_nonce', 'video_meta_box_nonce'); echo '
'; } // Save meta box data. function bloghub_save_audio_meta_box_data($post_id) { if (!isset($_POST['audio_meta_box_nonce']) || !wp_verify_nonce($_POST['audio_meta_box_nonce'], 'audio_meta_box_nonce')) { return; } if (defined('DOING_AUTOSAVE')) { return; } if (!current_user_can('edit_post', $post_id)) { return; } if (isset($_POST['audio_url'])) { $allowed_html = array( 'iframe' => array( 'src' => array(), 'width' => array(), 'height' => array(), 'scrolling' => array(), 'frameborder' => array(), 'allow' => array() ) ); $iframe_code = wp_kses($_POST['audio_url'], $allowed_html); update_post_meta($post_id, 'audio_url', $iframe_code); } } add_action('save_post', 'bloghub_save_audio_meta_box_data'); // Save meta box data. function bloghub_save_video_meta_box_data($post_id) { if (!isset($_POST['video_meta_box_nonce']) || !wp_verify_nonce($_POST['video_meta_box_nonce'], 'video_meta_box_nonce')) { return; } if (defined('DOING_AUTOSAVE')) { return; } if (!current_user_can('edit_post', $post_id)) { return; } if (isset($_POST['video_url'])) { $allowed_html = array( 'iframe' => array( 'src' => array(), 'width' => array(), 'height' => array(), 'scrolling' => array(), 'frameborder' => array(), 'allow' => array() ) ); $iframe_code = wp_kses($_POST['video_url'], $allowed_html); update_post_meta($post_id, 'video_url', $iframe_code); } } add_action('save_post', 'bloghub_save_video_meta_box_data'); /// Gallery Post Format function bloghub_gallery_meta_box_callback($post) { wp_nonce_field('gallery_meta_box_nonce', 'gallery_meta_box_nonce'); $image_ids = get_post_meta($post->ID, 'gallery_image_ids', true); ?>