| @@ 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 ); |
|
| @@ 447-451 (lines=5) @@ | ||
| 444 | } |
|
| 445 | ||
| 446 | // Get the posted data and sanitize it for use as an HTML class. |
|
| 447 | if ( 'lesson_video_embed' == $post_key) { |
|
| 448 | $new_meta_value = esc_html( $_POST[$post_key] ); |
|
| 449 | } else { |
|
| 450 | $new_meta_value = ( isset( $_POST[$post_key] ) ? sanitize_html_class( $_POST[$post_key] ) : '' ); |
|
| 451 | } // End If Statement |
|
| 452 | ||
| 453 | // update field with the new value |
|
| 454 | if( -1 != $new_meta_value ){ |
|