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
[vc_row][vc_column][kleo_grid type="3" colored_icons="yes" bordered_icons="yes" divided="yes"][kleo_feature_item title="Featured item 1" icon="twitter" icon_position="center"][/kleo_feature_item][kleo_feature_item title="Featured item 1" icon="twitter" icon_position="center"][/kleo_feature_item][kleo_feature_item title="Featured item 1" icon="twitter" icon_position="center"][/kleo_feature_item][kleo_feature_item title="Featured item 1" icon="twitter" icon_position="center"][/kleo_feature_item][kleo_feature_item title="Featured item 1" icon="twitter" icon_position="center"][/kleo_feature_item][kleo_feature_item title="Featured item 1" icon="twitter" icon_position="center"][/kleo_feature_item][/kleo_grid][/vc_column][/vc_row] |
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 | |
//https://themeforest.net/item/kleo-pro-community-focused-multipurpose-buddypress-theme/6776630?ref=SeventhQueen | |
//https://wordpress.org/plugins/essential-real-estate/ | |
if ( ! function_exists( 'kleo_ere_before_main_content' ) ) { | |
function kleo_ere_before_main_content() { | |
remove_action( 'kleo_before_main_content', 'kleo_title_main_content' ); | |
get_template_part( 'page-parts/general-before-wrap' ); | |
} | |
add_action( 'ere_before_main_content', 'kleo_ere_before_main_content' ); |
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 | |
/** | |
* Check if user used Facebook login | |
* | |
* @param int $user_id The user ID to check. | |
* @return bool | |
*/ | |
function sq_is_facebook_user( $user_id = null ) { | |
if ( ! is_user_logged_in() ) { |
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 | |
/* | |
Add the PMPro meta box to a CPT | |
*/ | |
function my_sensei_course_meta_wrapper() | |
{ | |
//duplicate this row for each CPT | |
add_meta_box('pmpro_page_meta', 'Require Membership', 'pmpro_page_meta', 'course', 'side'); | |
} | |
function pmpro_cpt_init() |
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 | |
/** | |
* Restrict users to your site and redirect them to register page | |
* @author SeventhQueen | |
* | |
* @return void | |
*/ | |
function sq_restrict_my_website(){ |
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 | |
/* Redirect user to levels page until he subscribes for a membership */ | |
add_action( 'template_redirect', 'sq_membership_restrict' ); | |
function sq_membership_restrict() { | |
global $pmpro_pages, $post; | |
if ( is_user_logged_in() && ! pmpro_hasMembershipLevel() ) { | |
if (isset( $post->ID ) && ! in_array( $post->ID, $pmpro_pages )) { | |
wp_redirect( pmpro_url() ); |
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
function sanitize_chinese_user( $username, $raw_username, $strict ) { | |
if ( $username != $raw_username ) { | |
$username = $raw_username; | |
} | |
$username = strip_tags( $username ); | |
// Kill Chinese characters | |
$username = preg_replace( '|[^a-z0-9 _.\-@一-龥]|ui', '', $username ); | |
// Consolidate contiguous whitespace |
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
<html> | |
<head> | |
<title>page title</title> | |
</head> | |
<body <?php body_class(); ?> <?php kleo_schema_org_markup();?>> | |
</body> | |
</html> |
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 | |
/** | |
* Send an auto-reply email to the bbPress topic author when a new topic is created | |
* @param int $topic_id The ID of this topic | |
* @param object $topic The object of this topic | |
* @return mixed | |
*/ | |
function kleo_bbp_email_new_topic( $topic_id = 0, $topic ) { | |
// Bail if this isn't a topic | |
if ( $topic->post_type != 'topic' ) { |
NewerOlder