LLMS_Twenty_Twenty::init()

Constructor.


Return Return

(void)


Top ↑

Source Source

File: includes/theme-support/class-llms-twenty-twenty.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__, 'output_content_wrapper' ), 10 );
		add_action( 'lifterlms_after_main_content', array( __CLASS__, 'output_content_wrapper_end' ), 10 );

		// Add the proper Twenty Twenty Body class on the catalogs.
		add_filter( 'body_class', array( __CLASS__, 'body_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' ) );

		// Prevent meta output for LifterLMS custom Post Types.
		add_filter( 'twentytwenty_disallowed_post_types_for_meta_output', array( __CLASS__, 'hide_meta_output' ) );

		add_filter( 'twentytwenty_get_elements_array', array( __CLASS__, 'add_elements' ) );

		add_action( 'wp_head', array( __CLASS__, 'add_inline_styles' ), 100 );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.37.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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