This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //<- don' copy this whole line! | |
// Copy from under this line and paste into your child theme's functions.php or in the LifterLMS Customization plugin | |
add_filter( 'register_post_type_args', 'my_llms_show_quiz_questions_ui', 10, 2 ); | |
function my_llms_show_quiz_questions_ui( $args, $post_type ) { | |
if ( in_array( $post_type, array( 'llms_quiz', 'llms_question' ) ) ) { | |
$args['show_ui'] = true; | |
} | |
return $args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
$unslash_iterarions = 2; //at least 2 times | |
for ( $i = 1; $i <= $unslash_iterarions; $i++ ) { | |
add_filter( 'llms_access_before_save_plan', 'wp_unslash', $i ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('tc_show_single_post_content', 'thumbnails_css_in_pages'); | |
function thumbnails_css_in_pages( $bool ){ | |
global $wp_current_filter, $post; | |
if ( is_page() && isset( $post ) && ! in_array( '__loop', $wp_current_filter) ) | |
return true; | |
return $bool; | |
} | |
/* do not copy the following in your child-theme functions.php*/ | |
/* Following code must be copied in your child-theme style.css without the comments */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body.llms-is-focused .content-area { | |
background: #fff none; | |
padding:0; | |
overflow-y: auto; | |
position:fixed; | |
width:100%; | |
height:100%; | |
top:0; | |
left:0; | |
bottom:0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_head', 'move_tagline_below_logo'); | |
function move_tagline_below_logo(){ | |
if ( ! method_exists('TC_header_main', 'tc_tagline_display') ) | |
return; | |
remove_action('__navbar', array(TC_header_main::$instance, 'tc_tagline_display'), is_rtl() ? 10 : 20 ); | |
add_action('__after_logo', array(TC_header_main::$instance, 'tc_tagline_display') ); | |
add_filter('tc_tagline_class', 'span7_to_12'); | |
function span7_to_12( $_class){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('tc_display_post_thumbnail', 'strip_and_nofollow'); | |
add_filter('tc_tag_list', 'strip_and_nofollow'); | |
add_filter('tc_date_meta', 'strip_and_nofollow', 9999); | |
add_filter('tc_show_link_to_post_after_metas', 'strip_and_nofollow', 9999); | |
add_filter('tc_author_meta', 'strip_and_nofollow', 9999); | |
function strip_and_nofollow($text){ | |
$text = stripslashes($text); | |
$text = preg_replace_callback('|<a (.+?)>|i', 'strip_and_nofollow_callback', $text); | |
return($text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tc_disabled_front_js_parts', 'pc_disable_dropdown_placement_script' ); | |
function pc_disable_dropdown_placement_script( $_parts ){ | |
return array_merge( $_parts, array('Czr_DropdownPlace' => array()) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('pre_get_posts', 'only_parent_category'); | |
function only_parent_category( $query ){ | |
if ( is_admin() || ! $query -> is_main_query() || ! is_category() ) | |
return; | |
$query->set('category__and', get_queried_object_id()); | |
//or with the same effect | |
//$query->set('category__in', get_queried_object_id()); | |
//see https://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters | |
} |