Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Last active December 8, 2016 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thomasplevy/6e69efd3fa05cbaacc0d1f6098e3fd2f to your computer and use it in GitHub Desktop.
Save thomasplevy/6e69efd3fa05cbaacc0d1f6098e3fd2f to your computer and use it in GitHub Desktop.
<?php // don't copy this line into your functions.php file!
/**
* Ensure LifterLMS Sidebars are registered with the same settings as Avada Sidebars
* This ensures visual consistency between regular sidebars and LifterLMS Sidebars
*
* @param array $args array of sidebar registration arguments
* @return array
*/
function llms_avada_sidebar_compat( $args ) {
$args = array_merge( $args, array(
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="heading"><h4 class="widget-title">',
'after_title' => '</h4></div>',
) );
return $args;
}
add_filter( 'lifterlms_register_lesson_sidebar', 'llms_avada_sidebar_compat' );
add_filter( 'lifterlms_register_course_sidebar', 'llms_avada_sidebar_compat' );
/**
* Declare explicit theme support for LifterLMS course and lesson sidebars
* @return void
*/
function my_llms_theme_support(){
add_theme_support( 'lifterlms-sidebars' );
}
add_action( 'after_setup_theme', 'my_llms_theme_support' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment