LLMS_Twenty_Twenty_One::init()

Static “constructor”


Return Return

(void)


Top ↑

Source Source

File: includes/theme-support/class-llms-twenty-twenty-one.php

	public static function init() {

		// This theme doesn't have a sidebar.
		remove_action( 'lifterlms_sidebar', 'lifterlms_get_sidebar', 10 );

		// Handle content wrappers.
		remove_action( 'lifterlms_before_main_content', 'lifterlms_output_content_wrapper', 10 );
		remove_action( 'lifterlms_after_main_content', 'lifterlms_output_content_wrapper_end', 10 );

		add_action( 'lifterlms_before_main_content', array( __CLASS__, 'handle_page_header_wrappers' ) );

		// Theme has no extra wrappers, add this class to the main list element to fix the layout.
		add_filter( 'llms_get_loop_list_classes', array( __CLASS__, 'add_max_width_class' ) );
		add_filter( 'llms_get_pagination_wrapper_classes', array( __CLASS__, 'add_pagination_classes' ) );

		// Modify catalog & checkout columns when the catalog page isn't full width.
		add_filter( 'lifterlms_loop_columns', array( __CLASS__, 'modify_columns_count' ) );
		add_filter( 'llms_checkout_columns', array( __CLASS__, 'modify_columns_count' ) );

		add_filter( 'navigation_markup_template', array( __CLASS__, 'maybe_disable_post_navigation' ) );

		// Use theme colors for various LifterLMS elements.
		add_action( 'wp_enqueue_scripts', array( __CLASS__, 'add_inline_styles' ) );
		add_action( 'enqueue_block_editor_assets', array( __CLASS__, 'add_inline_editor_styles' ) );

		add_action( 'wp', array( __CLASS__, 'handle_certificate_title' ) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Add handle_certificicate_title callback.
4.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.