From efc2415aa5e7f0dd162f49f93c9ac75148b697af Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:33:35 +1200 Subject: [PATCH] Remove linking tutorials with lessons (#2846) This functionality exists to link a tutorial with a lesson quiz, and is no longer needed with the new site architecture. Closes #2823 --- wp-content/plugins/wporg-learn/inc/post-meta.php | 10 ---------- .../views/metabox-workshop-details.php | 16 +--------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/wp-content/plugins/wporg-learn/inc/post-meta.php b/wp-content/plugins/wporg-learn/inc/post-meta.php index deaab24cb..d1b7c9547 100644 --- a/wp-content/plugins/wporg-learn/inc/post-meta.php +++ b/wp-content/plugins/wporg-learn/inc/post-meta.php @@ -483,13 +483,6 @@ function render_metabox_workshop_details( WP_Post $post ) { $duration_interval = get_workshop_duration( $post, 'interval' ); $locales = get_locales_with_english_names(); $captions = get_post_meta( $post->ID, 'video_caption_language' ) ?: array(); - $all_lessons = get_posts( array( - 'post_type' => 'lesson', - 'post_status' => 'publish', - 'posts_per_page' => 999, - 'orderby' => 'title', - 'order' => 'asc', - ) ); require get_views_path() . 'metabox-workshop-details.php'; } @@ -576,9 +569,6 @@ function save_workshop_meta_fields( $post_id ) { } } - $lesson_id = filter_input( INPUT_POST, 'linked-lesson-id', FILTER_SANITIZE_NUMBER_INT ); - update_post_meta( $post_id, 'linked_lesson_id', $lesson_id ); - $presenter_wporg_username = filter_input( INPUT_POST, 'presenter-wporg-username' ); $presenter_usernames = array_map( 'trim', explode( ',', $presenter_wporg_username ) ); delete_post_meta( $post_id, 'presenter_wporg_username' ); diff --git a/wp-content/plugins/wporg-learn/views/metabox-workshop-details.php b/wp-content/plugins/wporg-learn/views/metabox-workshop-details.php index bff1983cb..c13d248c9 100644 --- a/wp-content/plugins/wporg-learn/views/metabox-workshop-details.php +++ b/wp-content/plugins/wporg-learn/views/metabox-workshop-details.php @@ -7,8 +7,6 @@ /** @var DateInterval $duration_interval */ /** @var array $locales */ /** @var array $captions */ -/** @var array $all_lessons */ -/** @var array $selected_lessons */ ?>
@@ -76,20 +74,8 @@ class="tiny-text"
-- - -
-