It’s your nonce generation and checking…
You also weren’t saving your audio link and I cleaned the setting of the meta up (sanitize the URL and fix the conditionals)
This works locally for me
<?php
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'Sermon',
array(
'labels' => array(
'name' => __( 'Sermons' ),
'slug' => __( 'sermon' ),
'singular_name' => __( 'Sermon' ),
'edit_item' => __( 'Edit Sermon' ),
'add_new_item' => __( 'Add New Sermon' ),
'add_new' => __( 'New Sermon' ),
'not_found' => __( 'Looks like you have not uploaded any sermons! Get started by clicking "Add New Sermon" in the menu bar.' )
),
'public' => true,
'has_archive' => true,
'menu_icon' => 'dashicons-book-alt',
'menu_position' => 5,
'supports' => array( 'title', 'editor', 'revisions', 'date', 'thumbnail' )
)
);
}
function sermon_video_settings_markup( $object ) {
wp_nonce_field( 'sermon_nonce_action', 'sermon_nonce_field' );
?>
<style>
.sermon_video_settings_table {
width: 100%;
}
tr.sermon_video_settings_rows {
width: 50%;
}
.sermon_video_text_input, .sermon_audio_link {
width: 100%;
}
</style>
<table class="sermon_video_settings_table">
<tr class="sermon_video_settings_rows">
<td>
<label>Sermon Vimeo Link:</label>
</td>
<td>
<label>Sermon Youtube Link:</label>
</td>
</tr>
<tr class="sermon_video_settings_rows">
<td>
<input class="sermon_video_text_input" type="text" name="sermon_vimeo_link" value="<?php echo get_post_meta( $object->ID, "sermon_vimeo_link", true ); ?>">
</td>
<td>
<input class="sermon_video_text_input" type="text" name="sermon_youtube_link" value="<?php echo get_post_meta( $object->ID, "sermon_youtube_link", true ); ?>">
</td>
</tr>
<tr>
<td>
<label>Sermon Audio File:</label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<input class="sermon_audio_link" type="text" name="sermon_audio_link" value="<?php echo get_post_meta( $object->ID, "sermon_audio_link", true ); ?>">
</td>
</tr>
</table>
<?php
}
function sermon_video_settings_meta() {
add_meta_box( "sermon_video_settings", "Sermon Video Settings", "sermon_video_settings_markup", "sermon", "normal", "high", null );
}
add_action( "add_meta_boxes", "sermon_video_settings_meta" );
function save_custom_meta_box( $post_id, $post, $update ) {
if ( ! isset( $_POST['sermon_nonce_field'] )
|| ! wp_verify_nonce( $_POST['sermon_nonce_field'], 'sermon_nonce_action' )
) {
return $post_id;
}
if ( ! current_user_can( "edit_post", $post_id ) ) {
return $post_id;
}
if ( defined( "DOING_AUTOSAVE" ) && DOING_AUTOSAVE ) {
return $post_id;
}
$slug = "sermon";
if ( $slug != $post->post_type ) {
return $post_id;
}
if ( isset( $_POST["sermon_vimeo_link"] ) ) {
$value = esc_url_raw( $_POST["sermon_vimeo_link"] );
update_post_meta( $post_id, "sermon_vimeo_link", $value );
}
if ( isset( $_POST["sermon_youtube_link"] ) ) {
$value = esc_url_raw( $_POST["sermon_youtube_link"] );
update_post_meta( $post_id, "sermon_youtube_link", $value );
}
if ( isset( $_POST["sermon_audio_link"] ) ) {
$value = esc_url_raw( $_POST["sermon_audio_link"] );
update_post_meta( $post_id, "sermon_audio_link", $value );
}
}
add_action( "save_post", "save_custom_meta_box", 10, 3 );