@@ 429-433 (lines=5) @@ | ||
426 | // Get the meta key. |
|
427 | $meta_key = '_' . $post_key; |
|
428 | // Get the posted data and sanitize it for use as an HTML class. |
|
429 | if ( 'course_video_embed' == $post_key) { |
|
430 | $new_meta_value = esc_html( $_POST[$post_key] ); |
|
431 | } else { |
|
432 | $new_meta_value = ( isset( $_POST[$post_key] ) ? sanitize_html_class( $_POST[$post_key] ) : '' ); |
|
433 | } // End If Statement |
|
434 | ||
435 | // update field with the new value |
|
436 | return update_post_meta( $post_id, $meta_key, $new_meta_value ); |
@@ 456-460 (lines=5) @@ | ||
453 | } |
|
454 | ||
455 | // Get the posted data and sanitize it for use as an HTML class. |
|
456 | if ( 'lesson_video_embed' == $post_key) { |
|
457 | $new_meta_value = esc_html( $_POST[$post_key] ); |
|
458 | } else { |
|
459 | $new_meta_value = ( isset( $_POST[$post_key] ) ? sanitize_html_class( $_POST[$post_key] ) : '' ); |
|
460 | } // End If Statement |
|
461 | ||
462 | // update field with the new value |
|
463 | if( -1 != $new_meta_value ){ |