'%1$s%2$s', 'logo_class' => 'site-logo site-branding', 'title' => '%2$s', 'title_class' => 'site-title', 'home_wrap' => '

%2$s

', 'single_wrap' => '
%2$s
', 'condition' => (is_front_page() || is_home()) && !is_page(), ); $args = wp_parse_args($args, $defaults); /** * Filters the arguments for `architect_contractor_site_logo()`. * * @param array $args Parsed arguments. * @param array $defaults Function's default arguments. */ $args = apply_filters('architect_contractor_site_logo_args', $args, $defaults); if ( has_custom_logo() ) { $contents = sprintf($args['logo'], $architect_contractor_logo, esc_html($architect_contractor_site_title)); $contents .= sprintf($args['title'], esc_url( get_home_url(null, '/') ), esc_html($architect_contractor_site_title)); $classname = $args['logo_class']; } else { if ( get_theme_mod('architect_contractor_display_header_title', true) == true ) : $contents = sprintf($args['title'], esc_url( get_home_url(null, '/') ), esc_html($architect_contractor_site_title)); $classname = $args['title_class']; endif; } $wrap = $args['condition'] ? 'home_wrap' : 'single_wrap'; // $wrap = 'home_wrap'; $html = sprintf($args[$wrap], $classname, $contents); /** * Filters the arguments for `architect_contractor_site_logo()`. * * @param string $html Compiled html based on our arguments. * @param array $args Parsed arguments. * @param string $classname Class name based on current view, home or single. * @param string $contents HTML for site title or logo. */ $html = apply_filters('architect_contractor_site_logo', $html, $args, $classname, $contents); if (!$echo) { return $html; } echo $html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if( !function_exists('architect_contractor_site_description') ): /** * Displays the site description. * * @param boolean $echo Echo or return the html. * * @return string $html The HTML to display. */ function architect_contractor_site_description($echo = true){ if ( get_theme_mod('architect_contractor_display_header_text', false) == true ) : $architect_contractor_description = get_bloginfo('description'); if (!$architect_contractor_description) { return; } $wrapper = '
%s
'; $html = sprintf($wrapper, esc_html($architect_contractor_description)); /** * Filters the html for the site description. * * @param string $html The HTML to display. * @param string $architect_contractor_description Site description via `bloginfo()`. * @param string $wrapper The format used in case you want to reuse it in a `sprintf()`. * @since 1.0.0 * */ $html = apply_filters('architect_contractor_site_description', $html, $architect_contractor_description, $wrapper); if (!$echo) { return $html; } echo $html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped endif; } endif; if( !function_exists('architect_contractor_posted_on') ): /** * Prints HTML with meta information for the current post-date/time. */ function architect_contractor_posted_on( $icon = true, $animation_class = '' ){ $architect_contractor_default = architect_contractor_get_default_theme_options(); $architect_contractor_post_date = absint( get_theme_mod( 'architect_contractor_post_date',$architect_contractor_default['architect_contractor_post_date'] ) ); if( $architect_contractor_post_date ){ $architect_contractor_time_string = ''; if (get_the_time('U') !== get_the_modified_time('U')) { $architect_contractor_time_string = ''; } $architect_contractor_time_string = sprintf($architect_contractor_time_string, esc_attr(get_the_date(DATE_W3C)), esc_html(get_the_date()), esc_attr(get_the_modified_date(DATE_W3C)), esc_html(get_the_modified_date()) ); $architect_contractor_year = get_the_date('Y'); $architect_contractor_month = get_the_date('m'); $architect_contractor_day = get_the_date('d'); $link = get_day_link($architect_contractor_year, $architect_contractor_month, $architect_contractor_day); $posted_on = '' . $architect_contractor_time_string . ''; echo '
'; echo '
'; if( $icon ){ echo ''; } echo '' . $posted_on . ''; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } endif; if( !function_exists('architect_contractor_posted_by') ) : /** * Prints HTML with meta information for the current author. */ function architect_contractor_posted_by( $icon = true, $animation_class = '' ){ $architect_contractor_default = architect_contractor_get_default_theme_options(); $architect_contractor_post_author = absint( get_theme_mod( 'architect_contractor_post_author',$architect_contractor_default['architect_contractor_post_author'] ) ); if( $architect_contractor_post_author ){ echo '
'; echo '
'; if( $icon ){ echo ''; } $byline = '' . esc_html(get_the_author()) . ''; echo ''; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } endif; if( !function_exists('architect_contractor_posted_by_avatar') ) : /** * Prints HTML with meta information for the current author. */ function architect_contractor_posted_by_avatar( $date = false ){ $architect_contractor_default = architect_contractor_get_default_theme_options(); $architect_contractor_post_author = absint( get_theme_mod( 'architect_contractor_post_author',$architect_contractor_default['architect_contractor_post_author'] ) ); if( $architect_contractor_post_author ){ echo '
'; echo '
'; echo wp_kses_post( get_avatar( get_the_author_meta( 'ID' ) ) ); echo '
'; echo '
'; echo '
'; $byline = '' . esc_html(get_the_author()) . ''; echo '
' . $byline . '
'; if( $date ){ architect_contractor_posted_on($icon = false); } echo '
'; } } endif; if( !function_exists('architect_contractor_entry_footer') ): /** * Prints HTML with meta information for the categories, tags and comments. */ function architect_contractor_entry_footer( $cats = true, $tags = true, $edits = true){ $architect_contractor_default = architect_contractor_get_default_theme_options(); $architect_contractor_post_category = absint( get_theme_mod( 'architect_contractor_post_category',$architect_contractor_default['architect_contractor_post_category'] ) ); $architect_contractor_post_tags = absint( get_theme_mod( 'architect_contractor_post_tags',$architect_contractor_default['architect_contractor_post_tags'] ) ); // Hide category and tag text for pages. if ('post' === get_post_type()) { if( $cats && $architect_contractor_post_category ){ /* translators: used between list items, there is a space after the comma */ $categories = get_the_category(); if ($categories) { echo '
'; echo '
'; /* translators: 1: list of categories. */ echo ''; foreach( $categories as $category ){ $cat_name = $category->name; $cat_slug = $category->slug; $cat_url = get_category_link( $category->term_id ); ?> '; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } if( $tags && $architect_contractor_post_tags ){ /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html_x(', ', 'list item separator', 'architect-contractor')); if( $tags_list ){ echo '
'; echo '
'; /* translators: 1: list of tags. */ echo ''; echo wp_kses_post($tags_list) . ''; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } if( $edits ){ edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __('Edit %s', 'architect-contractor'), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } } } endif; if ( !function_exists('architect_contractor_post_thumbnail') ) : /** * Displays an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. */ function architect_contractor_post_thumbnail($architect_contractor_image_size = 'full'){ if( post_password_required() || is_attachment() || !has_post_thumbnail() ){ return; } if ( is_singular() ) : ?> user_id > 0) { $user = get_userdata($comment->user_id); $post = get_post($comment->comment_post_ID); if (!empty($user) && !empty($post)) { return $comment->user_id === $post->post_author; } } return false; } endif; if( !function_exists('architect_contractor_breadcrumb') ) : /** * Architect Contractor Breadcrumb */ function architect_contractor_breadcrumb($comment = null){ echo '
'; breadcrumb_trail(); echo '
'; } endif;