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( 'sensei_course_slug', 'sensei_custom_course_slug', 10 ); | |
function sensei_custom_course_slug () { | |
$slug = "workshop"; | |
return $slug; | |
} |
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( 'sensei_complete_lesson_text', 'sensei_custom_complete_lesson_text', 10 ); | |
function sensei_custom_complete_lesson_text () { | |
$text = "Mark Lesson Complete"; | |
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_action( 'sensei_before_main_content', 'sensei_conditional_lesson_display', 10 ); | |
function sensei_conditional_lesson_display() { | |
if( !is_singular('course') ) return; | |
global $post, $current_user, $woothemes_sensei; | |
$is_user_taking_course = Sensei_Utils::user_started_course( $post->ID, $current_user->ID ); | |
if ( ! ( $is_user_taking_course || sensei_all_access() ) ) { | |
remove_action( 'sensei_single_course_content_inside_after' , array( 'Sensei_Course','the_course_lessons_title'), 9 ); |
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
/** | |
* Remove checkout field | |
* | |
* @filter woocommerce_checkout_fields | |
* @since 1.0.0 | |
* | |
*/ | |
function apk_override_checkout_fields( $fields ) { |
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
function change_course_taxonomy_order( $query ) { | |
// Are we querying a course-category archive? | |
if ( is_tax( 'course-category' ) && $query->is_main_query() ) { | |
$query->set( 'posts_per_page', '6' ); | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'change_course_taxonomy_order' ); |
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( 'course_category_archive_title', 'custom_course_category_title', 10 ); | |
function custom_course_category_title( $title ) { | |
global $wp_query; | |
$taxonomy_obj = $wp_query->get_queried_object(); | |
$title = sprintf( __( 'Course Category: %s', 'woothemes-sensei' ), $taxonomy_obj->name ); | |
$title = '<header class="archive-header"><h1>' . $title . '</h1></header>'; | |
return $title; | |
} |
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( 'after_setup_theme', 'declare_sensei_support' ); | |
function declare_sensei_support() { | |
add_theme_support( 'sensei' ); | |
} |
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
function woo_display_top_section() { | |
global $woo_options, $post; | |
$title = ''; | |
if ( is_category() ) { | |
$title = __('Archive', 'woothemes') . ' | ' . single_cat_title( '', false ); | |
} elseif ( is_day() ) { | |
$title = __('Archive', 'woothemes') . ' | ' . get_the_time( get_option( 'date_format' ) ); |
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
// IF Twenty Ten | |
case 'twentyten' : | |
echo '<div id="container"><div id="content" role="main">'; | |
break; |
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
// IF Twenty Ten | |
case 'twentyten' : | |
?> | |
</div><!-- #content --> | |
</div><!-- #container --> | |
<?php get_sidebar(); ?> | |
<?php | |
break; |