This file contains hidden or 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
/********************* | |
* Sensei Integration | |
*********************/ | |
/** | |
* Declare that your theme now supports Sensei | |
*/ | |
add_action( 'after_setup_theme','foundationpress_sensei_support' ); | |
function foundationpress_sensei_support () { |
This file contains hidden or 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 | |
// Hook in | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
// Our hooked in function - $fields is passed via the filter! | |
function custom_override_checkout_fields( $fields ) { | |
unset($fields['billing']['billing_fax']); | |
return $fields; | |
} |
This file contains hidden or 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
/** | |
* Allows shortcodes in the product vendor's description | |
* | |
* @param string $desc | |
* @return string | |
*/ | |
function wc_vendors_use_sc_in_desc( $desc ) { | |
return do_shortcode( $desc ); | |
} | |
add_filter( 'product_vendors_page_description', 'wc_vendors_use_sc_in_desc' ); |
This file contains hidden or 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('template_redirect', 'custom_remove_sensei_quiz_view'); | |
function custom_remove_sensei_quiz_view(){ | |
if( is_singular('quiz') ){ | |
global $post; | |
//redirect back to the lesson page | |
$lesson_id = $post->post_parent; | |
//make sure this does not run again | |
$lesson_link = add_query_arg( 'sa', '1', get_permalink( $lesson_id ) ); |
This file contains hidden or 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
/** | |
* Allows shortcodes in the product vendor's description | |
* | |
* @param string $desc | |
* @return string | |
*/ | |
function wc_vendors_use_sc_in_desc( $desc ) { | |
return do_shortcode( $desc ); | |
} | |
add_filter( 'product_vendors_page_description', 'wc_vendors_use_sc_in_desc' ); |
This file contains hidden or 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
/********************* | |
* Sensei Integration | |
*********************/ | |
/** | |
* Declare that your theme now supports Sensei | |
*/ | |
add_action( 'after_setup_theme','twentyten_sensei_support' ); | |
function twentyten_sensei_support () { |
This file contains hidden or 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
/********************* | |
* Sensei Integration | |
*********************/ | |
/** | |
* Declare that your theme now supports Sensei | |
*/ | |
add_action( 'after_setup_theme','storefront_sensei_support' ); | |
function storefront_sensei_support () { |
This file contains hidden or 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
/********************* | |
* Sensei Integration | |
*********************/ | |
/** | |
* Declare that your theme now supports Sensei | |
*/ | |
add_action( 'after_setup_theme','customizr_sensei_support' ); | |
function customizr_sensei_support () { | |
add_theme_support( 'sensei' ); |
This file contains hidden or 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
/* from Sensei 1.8 we have removed the javascript animation on the course progress meter on the My Courses page. If you wish | |
* to restore the animation, copy this CSS into your theme's CSS file. | |
*/ | |
.meter span { | |
-webkit-animation: meter 2s 1; | |
-moz-animation: meter 2s 1; | |
-ms-animation: meter 2s 1; | |
animation: meter 2s 1; | |
} |
This file contains hidden or 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
/********************* | |
* Sensei Integration | |
*********************/ | |
/** | |
* Declare that your theme now supports Sensei | |
*/ | |
add_action( 'after_setup_theme','the_7_sensei_support' ); | |
function the_7_sensei_support () { | |
add_theme_support( 'sensei' ); |