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 | |
add_filter( 'sensei_question_image_size', 'custom_sensei_question_image_size', 10, 2 ); | |
function custom_sensei_question_image_size( $size, $question_id ) { | |
$size = 'large'; | |
return $size; | |
} | |
?> |
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 | |
/** | |
* Check if a lesson contains a quiz | |
* | |
* @param integer $lesson_id ID of lesson | |
* @return boolean True if lesson contains a quiz, false if not | |
*/ | |
if( ! function_exists( 'sensei_lesson_has_quiz' ) ) { | |
function sensei_lesson_has_quiz( $lesson_id = 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
<?php | |
function sensei_remove_user_from_course( $course_id = 0, $user_id = 0 ) { | |
global $woothemes_sensei; | |
$course_id = intval( $course_id ); | |
$user_id = intval( $user_id ); | |
if( $course_id > 0 && $user_id > 0 ) { | |
// Get all course lessons |
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 | |
add_filter( 'wp_default_editor', 'set_html_content_editor' ); | |
function set_html_content_editor( $tab ) { | |
if( ! current_user_can( 'administrator' ) ) { | |
$tab = 'html'; | |
} | |
return $tab; | |
} | |
?> |
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 | |
add_filter( 'woothemes_testimonials_content', 'custom_testimonials_content', 10, 2 ); | |
function custom_testimonials_content( $content, $post ) { | |
$content = $post->post_excerpt; | |
return $content; | |
} | |
?> |
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 | |
session_start(); | |
add_filter( 'posts_orderby', 'randomise_with_pagination' ); | |
function randomise_with_pagination( $orderby ) { | |
if( is_front_page() ) { | |
// Reset seed on load of initial archive page |
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 | |
function woocommerce_get_order_statuses() { | |
$order_statuses = get_terms( 'shop_order_status', array( 'hide_empty' => false ) ); | |
$statuses = array(); | |
foreach ( $order_statuses as $status ) { | |
$statuses[ $status->slug ] = $status->name; | |
} | |
return $statuses; | |
} | |
?> |
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 | |
$identify = array( | |
'user_id' => $user->user_email, | |
'traits' => apply_filters( 'segment_identify_traits', array( | |
'username' => $user->user_login, | |
'email' => $user->user_email, | |
'name' => $user->display_name, | |
'firstName' => $user->user_firstname, | |
'lastName' => $user->user_lastname, | |
'url' => $user->user_url |
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
#billing_email-2_field { float: right; } |
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 | |
class Tag_Checklist { | |
private $taxonomy; | |
private $post_type; | |
function __construct( $taxonomy, $post_type ) { | |
$this->taxonomy = $taxonomy; | |
$this->post_type = $post_type; |