%4$s'; $on = __( 'Updated on ', 'travel-booking' ); }else{ $time_string = ''; } }else{ $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( '%1$s %2$s', ' '. esc_html( $on ) .'', '' . $time_string . '' ); echo ''. $posted_on .''; } endif; if( ! function_exists( 'travel_booking_posted_by' ) ) : /** * Posted By */ function travel_booking_posted_by(){ echo ''; } endif; if( ! function_exists( 'travel_booking_categories' ) ) : /** * Blog Categories */ function travel_booking_categories(){ // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( esc_html__( ' ', 'travel-booking' ) ); if ( $categories_list ) { echo wp_kses_post( $categories_list ); } } } endif; if( ! function_exists( 'travel_booking_tags' ) ) : /** * Blog Categories */ function travel_booking_tags(){ // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space */ $tags_list = get_the_tag_list( '', esc_html_x( ' ', 'list item separator', 'travel-booking' ) ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '
' ); // WPCS: XSS OK. } } } endif; if ( ! function_exists( 'travel_booking_comment_count' ) ) : /** * Comments counts */ function travel_booking_comment_count(){ if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'travel-booking' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '1', '%' ); echo ''; } } endif; if( ! function_exists( 'travel_booking_sidebar_layout' ) ) : /** * Return sidebar layouts for pages */ function travel_booking_sidebar_layout(){ global $post; $return = false; // Default sidebar layout $default_layout = get_theme_mod( 'default_sidebar_layout', 'right-sidebar' ); if( is_singular( 'trip' ) ){ $wpte_option_setting = get_option('wp_travel_engine_settings', array() ); $hide_sidebar = false; if( ! empty( $wpte_option_setting ) && isset( $wpte_option_setting['booking'] ) ) $hide_sidebar = true; if( is_active_sidebar( 'wte-sidebar-id' ) || false == $hide_sidebar ){ if( $default_layout == 'left-sidebar' ){ $return = 'leftsidebar'; }elseif( $default_layout == 'right-sidebar' ){ $return = 'rightsidebar'; }else{ $return = 'fullwidth'; } }else{ $return = 'fullwidth'; } }elseif( is_singular( 'product' ) ){ if( is_active_sidebar( 'shop-sidebar' ) ){ if( $default_layout == 'left-sidebar' ){ $return = 'leftsidebar'; }elseif( $default_layout == 'right-sidebar' ){ $return = 'rightsidebar'; }else{ $return = 'fullwidth'; } }else{ $return = 'fullwidth'; } }elseif( is_page() ){ $page_layout = get_theme_mod( 'page_sidebar_layout', 'right-sidebar' ); $sidebar_layout = get_post_meta( $post->ID, '_tb_sidebar_layout', true ); $sidebar_layout = ! empty( $sidebar_layout ) ? $sidebar_layout : 'default-sidebar'; if( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'no-sidebar' ){ $return = 'fullwidth'; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = 'rightsidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = 'leftsidebar'; }elseif( $sidebar_layout == 'default-sidebar' && $page_layout == 'no-sidebar' ){ $return = 'fullwidth'; } }else{ $return = 'fullwidth'; } }elseif( is_single() ){ $post_layout = get_theme_mod( 'post_sidebar_layout', 'right-sidebar' ); $sidebar_layout = get_post_meta( $post->ID, '_tb_sidebar_layout', true ); $sidebar_layout = ! empty( $sidebar_layout ) ? $sidebar_layout : 'default-sidebar'; if( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'no-sidebar' ){ $return = 'fullwidth'; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = 'rightsidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = 'leftsidebar'; }elseif( $sidebar_layout == 'default-sidebar' && $post_layout == 'no-sidebar' ){ $return = 'fullwidth'; } }else{ $return = 'fullwidth'; } }elseif( ! is_active_sidebar( 'sidebar' ) && ! is_singular( 'trip' ) ){ $return = 'fullwidth'; }elseif( is_post_type_archive( 'trip' ) ){ $return = 'fullwidth'; }elseif( travel_booking_is_woocommerce_activated() && is_post_type_archive( 'product' ) ){ if( is_active_sidebar( 'shop-sidebar' ) ){ if( $default_layout == 'right-sidebar' ){ $return = 'rightsidebar'; }elseif ( $default_layout == 'left-sidebar' ) { $return = 'leftsidebar'; }else{ $return = 'fullwidth'; } }else{ $return = 'fullwidth'; } }elseif( is_404() ){ $return = ''; }else{ if( is_active_sidebar( 'sidebar' ) ){ if( $default_layout == 'right-sidebar' ){ $return = 'rightsidebar'; }elseif ( $default_layout == 'left-sidebar' ) { $return = 'leftsidebar'; }else{ $return = 'fullwidth'; } } else{ $return = 'fullwidth'; } } return $return; } endif; if( ! function_exists( 'travel_booking_comment_list' ) ) : /** * Callback function for Comment List * * @link https://codex.wordpress.org/Function_Reference/wp_list_comments */ function travel_booking_comment_list( $comment, $args, $depth ) { if ( 'div' === $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">