@@ 874-885 (lines=12) @@ | ||
871 | Sensei()->notices->maybe_print_notices(); |
|
872 | } // End sensei_frontend_messages() |
|
873 | ||
874 | public function sensei_lesson_video( $post_id = 0 ) { |
|
875 | if ( 0 < intval( $post_id ) ) { |
|
876 | $lesson_video_embed = get_post_meta( $post_id, '_lesson_video_embed', true ); |
|
877 | if ( 'http' == substr( $lesson_video_embed, 0, 4) ) { |
|
878 | // V2 - make width and height a setting for video embed |
|
879 | $lesson_video_embed = wp_oembed_get( esc_url( $lesson_video_embed )/*, array( 'width' => 100 , 'height' => 100)*/ ); |
|
880 | } // End If Statement |
|
881 | if ( '' != $lesson_video_embed ) { |
|
882 | ?><div class="video"><?php echo html_entity_decode($lesson_video_embed); ?></div><?php |
|
883 | } // End If Statement |
|
884 | } // End If Statement |
|
885 | } // End sensei_lesson_video() |
|
886 | ||
887 | public function sensei_complete_lesson_button() { |
|
888 | global $post; |
@@ 2862-2885 (lines=24) @@ | ||
2859 | * |
|
2860 | * @since 1.9.0 |
|
2861 | */ |
|
2862 | public static function the_course_video(){ |
|
2863 | ||
2864 | global $post; |
|
2865 | ||
2866 | if ( ! is_singular( 'course' ) ) { |
|
2867 | return; |
|
2868 | } |
|
2869 | // Get the meta info |
|
2870 | $course_video_embed = get_post_meta( $post->ID, '_course_video_embed', true ); |
|
2871 | ||
2872 | if ( 'http' == substr( $course_video_embed, 0, 4) ) { |
|
2873 | ||
2874 | $course_video_embed = wp_oembed_get( esc_url( $course_video_embed ) ); |
|
2875 | ||
2876 | } // End If Statement |
|
2877 | ||
2878 | if ( '' != $course_video_embed ) { ?> |
|
2879 | ||
2880 | <div class="course-video"> |
|
2881 | <?php echo html_entity_decode($course_video_embed); ?> |
|
2882 | </div> |
|
2883 | ||
2884 | <?php } // End If Statement |
|
2885 | } |
|
2886 | ||
2887 | /** |
|
2888 | * Output the title for the single lesson page |