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
//check if the current user has bookmarked any post | |
if(class_exists('CBXWPBookmarkHelper')){ | |
$current_user = wp_get_current_user(); | |
$user_id = $current_user->ID ; | |
global $post; | |
$post_id = $post->ID; //if you are trying outside of | |
$bookmark_by_user = CBXWPBookmarkHelper::isBookmarkedUser($post_id, $user_id); //true or false |
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
if(class_exists('CBXWPBookmarkHelper')){ | |
$post_id = ''; put post id here | |
//check if post is bookmarked once for post id $post_id | |
$is_bookmarked = CBXWPBookmarkHelper::isBookmarked($post_id); | |
//is_bookmarked is true or false | |
} |
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
if(class_exists('CBXWPBookmarkHelper')){ | |
$post_id = ''; put post id here | |
//get total bookmark count for post id $post_id | |
$bookmark_count = CBXWPBookmarkHelper::getTotalBookmark($post_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
add_filter('get_next_post_sort', 'cbx_custom_get_next_post_sort', 10, 2); //first param query, 2nd param $post object | |
add_filter('get_previous_post_sort', 'cbx_custom_get_previous_post_sort', 10, 2); //first param query, 2nd param $post object | |
/** | |
* Filter get next adjacent post sort sql | |
* | |
* @param $sort_sql | |
* @param $post | |
* |
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
quicktags({id : 'id_of_the_html_div'}); | |
tinyMCE.execCommand('mceAddEditor', false, 'id_of_the_html_div'); |
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
global $wpdb; | |
//old name | |
$table_booking_logs_old = $wpdb->prefix . 'rbookinglogs'; | |
$table_branch_manager_old = $wpdb->prefix . 'branch_manager'; | |
//new name | |
$table_booking_logs = $wpdb->prefix . 'cbxrbooking_log_manager'; | |
$table_branch_manager = $wpdb->prefix . 'cbxrbooking_branch_manager'; |
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
if (!function_exists('cbxbookmarkmypost_html')) { | |
function cbxbookmarkmypost_html($instance, $echo = false) | |
{ | |
$limit = isset($instance['limit']) ? intval($instance['limit']) : 10; | |
$orderby = isset($instance['orderby']) ? esc_attr($instance['orderby']) : 'id'; | |
$order = isset($instance['order']) ? esc_attr($instance['order']) : 'desc'; | |
$type = isset($instance['type']) ? esc_attr($instance['type']) : ''; //object type(post types) | |
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
<div class="slideritem slider-one text-center item active"> | |
<div class="container-fluid"> | |
<div class="featured-image hidden-sm hidden-xs"> | |
</div> | |
<div class="featured"> | |
<div class="featured_content"> | |
<h2 class="h1 section-heading">Make Education Free for All</h2> | |
<p> | |
Aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |
Sed cursus erat ut placerat dictum. <br> |
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
<header id="header"> | |
<div class="container"> | |
<div class="row"> | |
<nav class="navbar "> | |
<!-- Brand and toggle get grouped for better mobile display --> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar-collapse" aria-expanded="false"> | |
<span class="sr-only">Toggle navigation</span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> |
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_filter('cbxuseronline_member_profile_link', array($this, 'member_profile_link_custom'), 10, 2); | |
function member_profile_link_custom($profile_link, $userid){ | |
//modify $profile_link as need | |
return $profile_link; | |
} |