Changeset 10461 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-meta.php
- Timestamp:
- 11/23/2020 09:41:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-meta.php
r10458 r10461 112 112 'single' => false, 113 113 'sanitize_callback' => __NAMESPACE__ . '\sanitize_locale', 114 'show_in_rest' => true, 115 ) 116 ); 117 118 register_post_meta( 119 $post_type, 120 'linked_lesson_id', 121 array( 122 'description' => __( 'The post ID of a lesson that covers this workshop.', 'wporg_learn' ), 123 'type' => 'integer', 124 'single' => true, 125 'sanitize_callback' => 'absint', 114 126 'show_in_rest' => true, 115 127 ) … … 312 324 $locales = get_locales_with_english_names(); 313 325 $captions = get_post_meta( $post->ID, 'video_caption_language' ) ?: array(); 326 $all_lessons = get_posts( array( 327 'post_type' => 'lesson', 328 'post_status' => 'publish', 329 'posts_per_page' => 999, 330 'orderby' => 'title', 331 'order' => 'asc', 332 ) ); 314 333 315 334 require get_views_path() . 'metabox-workshop-details.php'; … … 374 393 } 375 394 } 395 396 $lesson_id = filter_input( INPUT_POST, 'linked-lesson-id', FILTER_SANITIZE_NUMBER_INT ); 397 update_post_meta( $post_id, 'linked_lesson_id', $lesson_id ); 376 398 377 399 $presenter_wporg_username = filter_input( INPUT_POST, 'presenter-wporg-username' );
Note: See TracChangeset
for help on using the changeset viewer.