Changeset 10866 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-meta.php
- Timestamp:
- 04/01/2021 09:01:06 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-meta.php
r10461 r10866 66 66 function register_workshop_meta() { 67 67 $post_type = 'wporg_workshop'; 68 69 register_post_meta( 70 $post_type, 71 'video_url', 72 array( 73 'description' => __( "The URL of the Workshop's video.", 'wporg_learn' ), 74 'type' => 'string', 75 'single' => true, 76 'sanitize_callback' => 'esc_url_raw', 77 'show_in_rest' => true, 78 ) 79 ); 68 80 69 81 register_post_meta( … … 377 389 } 378 390 391 $video_url = filter_input( INPUT_POST, 'video-url', FILTER_SANITIZE_URL ); 392 update_post_meta( $post_id, 'video_url', $video_url ); 393 379 394 $duration = filter_input( INPUT_POST, 'duration', FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY ); 380 395 if ( isset( $duration['h'], $duration['m'], $duration['s'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.