' . esc_html( '%1$s' ) . '', $categories_list ); // WPCS: XSS OK. } } endif; if( ! function_exists( 'bakery_shop_comments' ) ) : /** * Function that list categories */ function bakery_shop_comments( $blog = false ){ if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'bakery-shop' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'bakery_shop_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function bakery_shop_posted_on() { $time_string = ''; $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); echo '' . $time_string . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'bakery_shop_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function bakery_shop_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 */ $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'bakery-shop' ) ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '', $tags_list ); // WPCS: XSS OK. } } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'bakery-shop' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if( ! function_exists( 'bakery_shop_sidebar_layout' ) ) : /** * Return sidebar layouts for pages */ function bakery_shop_sidebar_layout(){ global $post; if( get_post_meta( $post->ID, 'bakery_shop_sidebar_layout', true ) ){ return get_post_meta( $post->ID, 'bakery_shop_sidebar_layout', true ); }else{ return 'right-sidebar'; } } endif; if( ! function_exists( 'bakery_shop_social_link_cb' ) ) : /** * Header Top * * @since 1.0.1 */ function bakery_shop_social_link_cb(){ $bakery_shop_button_url_fb = get_theme_mod( 'bakery_shop_facebook', '#' ); $bakery_shop_button_url_tw = get_theme_mod( 'bakery_shop_twitter', '#' ); $bakery_shop_button_url_ln = get_theme_mod( 'bakery_shop_linkedin', '#' ); $bakery_shop_button_url_ins = get_theme_mod( 'bakery_shop_instagram', '#' ); $bakery_shop_button_url_gp = get_theme_mod( 'bakery_shop_google', '#' ); $bakery_shop_button_url_pin = get_theme_mod( 'bakery_shop_pinterest', '#' ); $bakery_shop_button_url_yt = get_theme_mod( 'bakery_shop_youtube', '#' ); ?>
'; $fields['email'] = ''; $fields['url'] = ''; return $fields; } endif; add_filter( 'comment_form_default_fields', 'bakery_shop_change_comment_form_default_fields' ); if( ! function_exists( 'bakery_shop_change_comment_form_defaults' ) ) : /** * Change Comment Form defaults * https://blog.josemcastaneda.com/2016/08/08/copy-paste-hurting-theme/ */ function bakery_shop_change_comment_form_defaults( $defaults ){ // Change the "cancel" to "I would rather not comment" and use a span instead $defaults['comment_field'] = ''; $defaults['label_submit'] = esc_attr__( 'Submit', 'bakery-shop' ); return $defaults; } endif; add_filter( 'comment_form_defaults', 'bakery_shop_change_comment_form_defaults' ); /* Homepage Section End*/ if( ! function_exists( 'bakery_shope_breadcrumbs_cb' ) ) : /** * App Landing Page Breadcrumb * * @since 1.0.1 */ function bakery_shop_breadcrumbs_cb() { $showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = get_theme_mod( 'bakery_shop_breadcrumb_separator', '>' ); // delimiter between crumbs $home = get_theme_mod( 'bakery_shop_breadcrumb_home_text', __( 'Home', 'bakery-shop' ) ); // text for the 'Home' link $showCurrent = get_theme_mod( 'bakery_shop_ed_current', '1' ); // 1 - show current post/page title in breadcrumbs, 0 - don't show $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb global $post; $homeLink = esc_url( home_url( ) ); if( get_theme_mod( 'bakery_shop_ed_breadcrumb' ) ){ if ( is_front_page() ) { if ( $showOnHome == 1 ) echo ''; } else { echo '