%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $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( esc_html_x( 'Posted on %s', 'post date', 'bluestick' ), '' . $time_string . '' ); $byline = sprintf( esc_html_x( 'by %s', 'post author', 'bluestick' ), '' . esc_html( get_the_author() ) . '' ); echo '' . $posted_on . ' ' . $byline . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'bluestick_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function bluestick_entry_footer() { // 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__( ', ', 'bluestick' ) ); if ( $categories_list && bluestick_categorized_blog() ) { printf( '' . esc_html__( 'Posted in %1$s', 'bluestick' ) . '', $categories_list ); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html__( ', ', 'bluestick' ) ); if ( $tags_list ) { printf( '' . esc_html__( 'Tagged %1$s', 'bluestick' ) . '', $tags_list ); // WPCS: XSS OK. } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; /* translators: %s: post title */ comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment on %s', 'bluestick' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) ); echo ''; } edit_post_link( sprintf( /* translators: %s: Name of current post */ esc_html__( 'Edit %s', 'bluestick' ), the_title( '"', '"', false ) ), '', '' ); } endif; /** * Returns true if a blog has more than 1 category. * * @return bool */ function bluestick_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'bluestick_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => 'ids', 'hide_empty' => 1, // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'bluestick_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so bluestick_categorized_blog should return true. return true; } else { // This blog has only 1 category so bluestick_categorized_blog should return false. return false; } } /** * Flush out the transients used in bluestick_categorized_blog. */ function bluestick_category_transient_flusher() { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // Like, beat it. Dig? delete_transient( 'bluestick_categories' ); } add_action( 'edit_category', 'bluestick_category_transient_flusher' ); add_action( 'save_post', 'bluestick_category_transient_flusher' ); /** * Function that returns if the menu is sticky */ if ( ! function_exists( 'bluestick_sticky_menu' ) ) : function bluestick_sticky_menu() { $bluestick_menu_style = get_theme_mod( 'bluestick_menu_style', 'sticky' ); if ( $bluestick_menu_style == 'sticky' ) : return 'sticky-nav '; else : return 'not-sticky'; endif; } endif; /** * Function that returns if the menu is sticky */ if ( ! function_exists( 'bluestick_menu_size' ) ) : function bluestick_menu_size() { $bluestick_menu_container_size = get_theme_mod( 'bluestick_menu_container_size', 'theme-container' ); if ( $bluestick_menu_container_size == 'container-full' ) : return 'container-full'; else : return 'theme-container'; endif; } endif; /** * Register Google fonts for bluestick. */ function bluestick_google_font() { $get_fonts_url = ''; $font_families = array(); $font_families = array( 'Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900' ); $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $get_fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' ); return $get_fonts_url; } function bluestick_scripts_styles() { wp_enqueue_style( 'bluestick-fonts', bluestick_google_font(), array(), null ); } add_action( 'wp_enqueue_scripts', 'bluestick_scripts_styles' ); /** * Register Breadcrumb for Multiple Variation */ function bluestick_breadcrumbs_style() { get_template_part( './template-parts/sections/section', 'breadcrumb' ); } /** * Archive Post: This Function Check whether Sidebar active or Not */ if ( ! function_exists( 'bluestick_post_layout' ) ) : function bluestick_post_layout() { $bluestick_archive_blog_pages_layout = get_theme_mod( 'bluestick_archive_blog_pages_layout', 'bluestick_right_sidebar' ); if ( 'bluestick_no_sidebar' !== $bluestick_archive_blog_pages_layout && is_active_sidebar( 'bluestick-sidebar-primary' ) ) { echo 'theme-column-8'; } else { echo 'theme-column-12 mx-auto'; } } endif; /** * Single Post: This Function Check whether Sidebar active or Not */ if ( ! function_exists( 'bluestick_single_post_layout' ) ) : function bluestick_single_post_layout() { $bluestick_single_blog_pages_layout = get_theme_mod( 'bluestick_single_blog_pages_layout', 'bluestick_right_sidebar' ); if ( 'bluestick_no_sidebar' !== $bluestick_single_blog_pages_layout && is_active_sidebar( 'bluestick-sidebar-primary' ) ) { echo 'theme-column-8'; } else { echo 'theme-column-12 mx-auto'; } } endif; /** * Template Post: This Function Check whether Sidebar active or Not */ if ( ! function_exists( 'bluestick_template_layout' ) ) : function bluestick_template_layout() { if ( is_active_sidebar( 'bluestick-sidebar-primary' ) ) { echo 'theme-column-8'; } else { echo 'theme-column-12 mx-auto'; } } endif; if ( ! function_exists( 'bluestick_dynamic_style' ) ) : function bluestick_dynamic_style() { $output_css = ''; /** * Breadcrumb Style */ $bluestick_breadcrumb_height = get_theme_mod( 'bluestick_breadcrumb_height', '246' ); if ( $bluestick_breadcrumb_height !== '' ) { $output_css .= '.breadcrumb-content { min-height: ' . esc_attr( $bluestick_breadcrumb_height ) . "px; }\n"; } $bluestick_breadcrumb_bg_img = get_theme_mod( 'bluestick_breadcrumb_bg_img', esc_url( get_template_directory_uri() . '/assets/images/breadcrumb/breadcrumb.jpg' ) ); $bluestick_breadcrumb_back_attach = get_theme_mod( 'bluestick_breadcrumb_back_attach', 'scroll' ); if ( $bluestick_breadcrumb_bg_img !== '' ) { $output_css .= '.breadcrumb-area { background-image: url(' . esc_url( $bluestick_breadcrumb_bg_img ) . '); background-attachment: ' . esc_attr( $bluestick_breadcrumb_back_attach ) . "; }\n"; } else { $output_css .= ".breadcrumb-area { background: var(--sp-gradient2); }\n"; } $bluestick_site_cntnr_width = get_theme_mod( 'bluestick_site_cntnr_width', '1170' ); if ( $bluestick_site_cntnr_width >= 768 && $bluestick_site_cntnr_width <= 2000 ) { $output_css .= '.post-section .theme-container { max-width: ' . esc_attr( $bluestick_site_cntnr_width ) . "px; }\n"; } $bluestick_footer_effect_enable = get_theme_mod( 'bluestick_footer_effect_enable', '1' ); $bluestick_footer_bg_img = get_theme_mod( 'bluestick_footer_bg_img', esc_url( get_template_directory_uri() . '/assets/images/shape.png' ) ); if ( $bluestick_footer_effect_enable == '1' ) { if ( ! empty( $bluestick_footer_bg_img ) ) : $output_css .= '.footer-section.footer-one{ background-image: url(' . esc_url( $bluestick_footer_bg_img ) . "); background-blend-mode: multiply; } .footer-section.footer-one:after{ content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.75; background: #000000 none repeat scroll 0 0; z-index: -1; }\n"; endif; } else { if ( ! empty( $bluestick_footer_bg_img ) ) : $output_css .= '.footer-section.footer-one{ background: url(' . esc_url( $bluestick_footer_bg_img ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); background-blend-mode: multiply; }\n"; endif; } /** * Background Elements */ $bluestick_bg_elements_enabled = get_theme_mod( 'bluestick_bg_elements_enabled', true ); if ( $bluestick_bg_elements_enabled == '' ) : $output_css .= ".bg-elements { display:none; }\n"; endif; $bluestick_page_header_background_color = get_theme_mod( 'bluestick_page_header_background_color' ); $output_css .= ".breadcrumb-area:before { background-color: $bluestick_page_header_background_color !important; }\n"; /** * Logo Width */ $bluestick_custom_logo_size = get_theme_mod( 'bluestick_custom_logo_size', array( 'slider' => 140, 'suffix' => 'px', ) ); if ( $bluestick_custom_logo_size['slider'] != null ) { $output_css .= '.logo img, .mobile-logo img { max-width: ' . esc_attr( $bluestick_custom_logo_size['slider'] ) . "px; }\n"; } /** * Slider Overlay Settings */ $bluestick_main_slider_overlay_disable = get_theme_mod( 'bluestick_main_slider_overlay_disable', true ); $bluestick_main_slider_overlay_color = get_theme_mod( 'bluestick_main_slider_overlay_color', true ); if ( true === $bluestick_main_slider_overlay_disable ) { $output_css .= ".theme-slider { background: rgba(0,0,0,0.6); }\n"; } /** * Slider Meta Color Settings */ $bluestick_main_slider_text_color_disable = get_theme_mod( 'bluestick_main_slider_text_color_disable', false ); if ( true === $bluestick_main_slider_text_color_disable ) { $bluestick_main_slider_caption_title_color = get_theme_mod( 'bluestick_main_slider_caption_title_color', '#fff' ); $bluestick_main_slider_caption_title_bg_color = get_theme_mod( 'bluestick_main_slider_caption_title_bg_color', '#11104d' ); $bluestick_main_slider_caption_subtitle_title_color = get_theme_mod( 'bluestick_main_slider_caption_subtitle_title_color', '#fff' ); $bluestick_main_slider_caption_subtitle2_title_color = get_theme_mod( 'bluestick_main_slider_caption_subtitle2_title_color', '#d81956' ); $bluestick_main_slider_caption_descrption_title_color = get_theme_mod( 'bluestick_main_slider_caption_descrption_title_color', '#fff' ); $output_css .= ".theme-slider .theme-content h3 { color: $bluestick_main_slider_caption_title_color; } .theme-slider .theme-content h3 { background: $bluestick_main_slider_caption_title_bg_color; } .theme-slider .theme-content h1 { color: $bluestick_main_slider_caption_subtitle_title_color; } .theme-slider .theme-content h1 .primary-color { color: $bluestick_main_slider_caption_subtitle2_title_color; } .theme-slider .theme-content p { color: $bluestick_main_slider_caption_descrption_title_color; }\n"; } /** * About Bg Image Settings */ $bluestick_about_background = get_theme_mod( 'bluestick_about_background' ); if ( ! empty( $bluestick_about_background ) ) : $output_css .= '.about-section { background: url(' . esc_url( $bluestick_about_background ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); }\n"; endif; /** * Service Bg Image Settings */ $bluestick_service_background = get_theme_mod( 'bluestick_service_background' ); if ( ! empty( $bluestick_service_background ) ) : $output_css .= '.service-section { background: url(' . esc_url( $bluestick_service_background ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); }\n"; endif; /** * Portfolio Bg Image Settings */ $bluestick_portfolio_background = get_theme_mod( 'bluestick_portfolio_background' ); if ( ! empty( $bluestick_portfolio_background ) ) : $output_css .= '.portfolio-section { background: url(' . esc_url( $bluestick_portfolio_background ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); }\n"; endif; /** * Cta Bg Image Settings */ $bluestick_cta_background_image = get_theme_mod( 'bluestick_cta_background_image', '' ); if ( ! empty( $bluestick_cta_background_image ) ) : $output_css .= '.cta-section { background: url(' . esc_url( $bluestick_cta_background_image ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); background-blend-mode: multiply; }\n"; endif; /** * Funfact Bg Image Settings */ $bluestick_funfact_background = get_theme_mod( 'bluestick_funfact_background' ); if ( ! empty( $bluestick_funfact_background ) ) : $output_css .= '.funfact-section { background: url(' . esc_url( $bluestick_funfact_background ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); }\n"; endif; /** * Team Bg Image Settings */ $bluestick_team_background = get_theme_mod( 'bluestick_team_background' ); if ( ! empty( $bluestick_team_background ) ) : $output_css .= '.team-section { background: url(' . esc_url( $bluestick_team_background ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); background-blend-mode: multiply; }\n"; endif; /** * Client Bg Image Settings */ $bluestick_client_background = get_theme_mod( 'bluestick_client_background' ); if ( ! empty( $bluestick_client_background ) ) : $output_css .= '.client-section { background: url(' . esc_url( $bluestick_client_background ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); background-blend-mode: multiply; }\n"; endif; /** * Testimonial Bg Image Settings */ $bluestick_testimonial_background = get_theme_mod( 'bluestick_testimonial_background' ); if ( ! empty( $bluestick_testimonial_background ) ) : $output_css .= '.testimonial-section { background: url(' . esc_url( $bluestick_testimonial_background ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); background-blend-mode: multiply; }\n"; endif; /** * Step Bg Image Settings */ $bluestick_step_background = get_theme_mod( 'bluestick_step_background', get_template_directory_uri() . '/assets/images/bg_dotted.png' ); if ( ! empty( $bluestick_step_background ) ) : $output_css .= '.step-section { background: url(' . esc_url( $bluestick_step_background ) . ") no-repeat scroll center center / cover; }\n"; endif; /** * Timeline Bg Image Settings */ $bluestick_timeline_background = get_theme_mod( 'bluestick_timeline_background' ); if ( ! empty( $bluestick_timeline_background ) ) : $output_css .= '.timeline-section { background: url(' . esc_url( $bluestick_timeline_background ) . ") no-repeat scroll center center / cover; }\n"; endif; /** * Map Bg Image Settings */ $bluestick_map_img = get_theme_mod( 'bluestick_map_img' ); if ( ! empty( $bluestick_map_img ) ) : $output_css .= '.contactmap-section .contactmapinfo { background: url(' . esc_url( $bluestick_map_img ) . ") no-repeat scroll center center / cover rgba(0, 0, 0, 0.75); background-blend-mode: multiply; }\n"; endif; /** * Faq Bg Image Settings */ $bluestick_faq_background = get_theme_mod( 'bluestick_faq_background', get_template_directory_uri() . '/assets/images/dotted.png' ); if ( ! empty( $bluestick_faq_background ) ) : $output_css .= '.faq-section { background: url(' . esc_url( $bluestick_faq_background ) . ") no-repeat scroll center center / cover; }\n"; endif; /** * Contact Bg Image Settings */ $bluestick_contact_background = get_theme_mod( 'bluestick_contact_background', get_template_directory_uri() . '/assets/images/dotted.png' ); if ( ! empty( $bluestick_contact_background ) ) : $output_css .= '.contactform-section { background: url(' . esc_url( $bluestick_contact_background ) . ") no-repeat scroll center center / cover; }\n"; endif; /** * Menu-header-3 Custom CSS For Container-full setting */ $bluestick_menu_container_size = get_theme_mod( 'bluestick_menu_container_size', 'theme-container' ); if ( 'container-full' === $bluestick_menu_container_size ) { $output_css .= '@media (min-width: 992px) { .header.header-three { max-width: 95.15%; top: 45px; } }' . "\n"; } /* Css For Menu Design 2*/ $bluestick_menu_design_layout = get_theme_mod( 'bluestick_menu_design_layout', 'menu-layout1' ); if ( 'menu-layout1' !== $bluestick_menu_design_layout ) { $output_css .= '.breadcrumb-content { margin-top: 150px; } @media (max-width: 992px) { .breadcrumb-content { margin-top: 0px; } }' . "\n"; } // Check if the front page display setting is set to 'page'. if ( is_page_template( 'frontpage.php' ) || is_front_page() ) { $output_css .= '/* Hide breadcrumb-section for the front page */ #breadcrumb-section { display: none !important; }' . "\n"; } if ( is_admin() ) { $output_css .= 'body { margin-top: 32px; }\n'; } wp_add_inline_style( 'bluestick-style', $output_css ); } endif; add_action( 'wp_enqueue_scripts', 'bluestick_dynamic_style' );