[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.49.90: ~ $
<?php
/**
 * Course Metaboxes.
 *
 * Introduces metaboxes at Add/Edit Course page to be used as
 * a wrapper by the React application at front-end.
 *
 * @since 3.0.0
 * @package LearnDash\Course
 */

namespace LearnDash\Course\Metaboxes;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Adds the meta boxes to course post type.
 *
 * Fires on `learndash_add_meta_boxes` and `add_meta_boxes_sfwd-courses` hook.
 *
 * @since 3.0.0
 */
function add_meta_boxes() {

	$screen = get_current_screen();

	if ( 'sfwd-courses' !== get_post_type( get_the_ID() ) &&
		'sfwd-courses_page_courses-builder' !== $screen->id ) {
		return;
	}

	add_meta_box(
		'sfwd-course-lessons',
		sprintf( '%s', \LearnDash_Custom_Label::get_label( 'lessons' ) ),
		'LearnDash\Course\Metaboxes\meta_box_lessons_callback',
		null,
		'side'
	);

	add_meta_box(
		'sfwd-course-topics',
		sprintf( '%s', \LearnDash_Custom_Label::get_label( 'topics' ) ),
		'LearnDash\Course\Metaboxes\meta_box_topics_callback',
		null,
		'side'
	);

	add_meta_box(
		'sfwd-course-quizzes',
		sprintf( '%s', \LearnDash_Custom_Label::get_label( 'quizzes' ) ),
		'LearnDash\Course\Metaboxes\meta_box_quizzes_callback',
		null,
		'side'
	);

}
add_action( 'add_meta_boxes_sfwd-courses', 'LearnDash\Course\Metaboxes\add_meta_boxes' );
add_action( 'learndash_add_meta_boxes', 'LearnDash\Course\Metaboxes\add_meta_boxes' );

/**
 * Prints the lesson metabox content.
 *
 * @since 3.0.0
 */
function meta_box_lessons_callback() {
	?>
	<div id="sfwd-lessons-app"></div>
	<?php
}

/**
 * Prints the topics metabox content.
 *
 * @since 3.0.0
 */
function meta_box_topics_callback() {
	?>
	<div id="sfwd-topics-app"></div>
	<?php
}

/**
 * Prints the quizzes meta box content.
 *
 * @since 3.0.0
 */
function meta_box_quizzes_callback() {
	?>
	<div id="sfwd-quizzes-app"></div>
	<?php
}

Filemanager

Name Type Size Permission Actions
ld-activity-functions.php File 24.32 KB 0644
ld-course-functions-legacy.php File 51.63 KB 0644
ld-course-functions.php File 51.51 KB 0644
ld-course-info-widget.php File 22.98 KB 0644
ld-course-list-shortcode.php File 199 B 0644
ld-course-metaboxes.php File 1.78 KB 0644
ld-course-navigation.php File 27.17 KB 0644
ld-course-progress.php File 89.44 KB 0644
ld-course-steps-functions.php File 44.03 KB 0644
ld-course-user-functions.php File 36.49 KB 0644
ld-course-video.php File 37.82 KB 0644