Uname: Linux p3plzcpnl499967.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Software: Apache
PHP version: 8.2.30 [ PHP INFO ] PHP os: Linux
Server Ip: 208.109.40.231
Your Ip: 216.73.216.26
User: nayff91c5tsx (10005085) | Group: nayff91c5tsx (10005085)
Safe Mode: OFF
Disable Function:
NONE

name : lifterlms.php
<?php
/**
 * LifterLMS integration.
 *
 * @package Page Builder Framework Premium Add-On
 * @subpackage Integration
 */

defined( 'ABSPATH' ) || die( "Can't access directly" );

/**
 * Remove LifterLMS post type from Blog Layouts post type array.
 *
 * @param array $post_types The post types
 *
 * @return array The updated post types
 */
function wpbf_lifterlms_remove_blog_layouts_post_type( $post_types ) {

	unset(
		$post_types['course'],
		$post_types['lesson'],
		$post_types['llms_quiz'],
		$post_types['llms_membership'],
		$post_types['llms_certificate'],
		$post_types['llms_my_certificate']
	);

	return $post_types;

}
add_filter( 'wpbf_blog_layouts_archive_array', 'wpbf_lifterlms_remove_blog_layouts_post_type' );

/**
 * Remove LifterLMS post type from Template Settings post type array.
 *
 * @param array $post_types The post types
 *
 * @return array The updated post types
 */
function wpbf_lifterlms_remove_template_settings_post_type( $post_types ) {

	unset(
		$post_types['llms_quiz'],
		$post_types['llms_certificate'],
		$post_types['llms_my_certificate']
	);

	return $post_types;

}
add_filter( 'wpbf_template_settings_post_type_array', 'wpbf_lifterlms_remove_template_settings_post_type' );

/**
 * Add LifterLMS hooks to custom sections.
 *
 * @param array $hooks The custom section hooks
 *
 * @return array The updated custom section hooks
 */
function wpbf_lifterlms_custom_section_hooks( $hooks ) {

	$custom_hooks = array(
		'LifterLMS Catalog' => array(
			'lifterlms_archive_description',
			'lifterlms_before_main_content',
			'lifterlms_after_main_content',
		),
		'LifterLMS Checkout Page' => array(
			'lifterlms_before_checkout_form',
			'lifterlms_after_checkout_form',
		),
		'LifterLMS Course Template' => array(
			'lifterlms_single_course_before_summary',
			'lifterlms_single_course_after_summary',
		),
		'LifterLMS Lesson Template' => array(
			'lifterlms_single_lesson_before_summary',
			'lifterlms_single_lesson_after_summary',
		),
		'LifterLMS Student Dashboard' => array(
			'lifterlms_before_student_dashboard_content',
			'lifterlms_student_dashboard_header',
			'lifterlms_student_dashboard_index',
		),
	);

	$hooks = array_merge( $hooks, $custom_hooks );

	return $hooks;

}
add_filter( 'wpbf_custom_section_hooks', 'wpbf_lifterlms_custom_section_hooks' );
© 2026 GrazzMean