',
esc_url( home_url( '/' ) ),
$aria_current,
$svg_image
);
}
} else {
$retina_logo_id = get_theme_mod( 'retina_logo' );
$custom_logo_attr = [
'class' => 'custom-logo normal',
'loading' => false,
];
$retina_logo_attr = [
'class' => 'custom-logo retina',
'loading' => false,
];
if ( $unlink_homepage_logo && is_front_page() && ! is_paged() ) {
/*
* If on the home page, set the logo alt attribute to an empty string,
* as the image is decorative and doesn't need its purpose to be described.
*/
$custom_logo_attr['alt'] = '';
$retina_logo_attr['alt'] = '';
} else {
/*
* If the logo alt attribute is empty, get the site title and explicitly pass it
* to the attributes used by wp_get_attachment_image().
*/
$image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true );
if ( empty( $image_alt ) ) {
$custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' );
$retina_logo_attr['alt'] = get_bloginfo( 'name', 'display' );
}
}
/**
* Filters the list of custom logo image attributes.
*
* @since 5.5.0
*
* @param array $custom_logo_attr Custom logo image attributes.
* @param int $custom_logo_id Custom logo attachment ID.
* @param int $blog_id ID of the blog to get the custom logo for.
*/
$custom_logo_attr = apply_filters( 'get_custom_logo_image_attributes', $custom_logo_attr, $custom_logo_id, $blog_id );
$retina_logo_attr = apply_filters( 'get_retina_logo_image_attributes', $retina_logo_attr, $retina_logo_id, $blog_id );
/*
* If the alt attribute is not empty, there's no need to explicitly pass it
* because wp_get_attachment_image() already adds the alt attribute.
*/
$image = wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr );
$retina = wp_get_attachment_image( $retina_logo_id, 'full', false, $retina_logo_attr );
$image .= $retina ? $retina : wp_get_attachment_image( $custom_logo_id, 'full', false, $retina_logo_attr );
if ( $unlink_homepage_logo && is_front_page() && ! is_paged() ) {
// If on the home page, don't link the logo to home.
$html = sprintf( '
',
esc_url( home_url( '/' ) ),
$aria_current,
$image
);
}
}
} elseif ( is_customize_preview() ) {
// If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
$html = sprintf(
'
',
esc_url( home_url( '/' ) )
);
}
if ( $switched_blog ) {
restore_current_blog();
}
/**
* Filters the custom logo output.
*
* @since 4.5.0
* @since 4.6.0 Added the `$blog_id` parameter.
*
* @param string $html Custom logo HTML output.
* @param int $blog_id ID of the blog to get the custom logo for.
*/
return apply_filters( 'get_custom_logo', $html, $blog_id );
}
}
if ( ! function_exists( 'themeoo_site_branding' ) ) :
/**
* Site Branding (Logo)
*
* @return void
*/
function themeoo_site_branding() {
$logo = themeoo_get_custom_logo();
$description = get_bloginfo( 'description', 'display' );
$blog_info = get_bloginfo( 'name' );
$hide_title = themeoo_get_mod( 'title_tagline_hide_title' );
$header_class = ! $hide_title ? 'site-title' : 'screen-reader-text';
$is_home = ( is_front_page() || is_home() ) && ! is_page();
$mobile_grid = themeoo_get_mod( 'layout_header_menu_mobileshow' );
switch ( $mobile_grid ) {
case 'sm':
$mobile_grid = 'hide-sm';
break;
case 'md':
$mobile_grid = 'hide-md';
break;
case 'lg':
$mobile_grid = 'hide-lg';
break;
case 'xl':
$mobile_grid = 'hide-xl';
break;
default:
$mobile_grid = '';
}
?>
/
No Comments on “%s”', 'ayyash' ), $post_title ),
/* translators: %s: Post title. */
sprintf( __( ' 1 Comment on “%s”', 'ayyash' ), $post_title ),
/* translators: %s: Post title. */
sprintf( __( ' %% Comments on “%s”', 'ayyash' ), $post_title ),
'post-comment-stat'
);
}
endif;
if ( ! function_exists( 'themeoo_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*
* @return void
*/
function themeoo_posted_on() {
$time_string = '';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '';
}
// @phpstan-ignore-next-line
$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() ) );
?>
' . $time_string . '' // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
);
?>
' . esc_html( get_the_author() ) . ''
);
?>
'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( 'themeoo_category_count', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so themeoo_categorized_blog should return true.
return true;
} else {
// This blog has only 1 category so themeoo_categorized_blog should return false.
return false;
}
}
endif;
if ( ! function_exists( 'themeoo_post_taxonomy' ) ) :
/**
* Shim for `themeoo_post_taxonomy()`.
*
* Display category, tag, or term description.
*
* @param string $view view.
*
* @return void
*/
function themeoo_post_taxonomy( $view ) {
// Categories.
if ( themeoo_get_mod( 'layout_' . $view . '_meta-cats' ) ) :
echo get_the_category_list(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
endif;
// Tags.
if ( themeoo_get_mod( 'layout_' . $view . '_meta-tags' ) ) :
// Replicates category output.
// @phpstan-ignore-next-line
echo get_the_tag_list( '
', "
\n
", '
' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
endif;
}
endif;
if ( ! function_exists( 'themeoo_post_single_navigation' ) ) :
/**
* Shim for `the_archive_description()`.
*
* Display category, tag, or term description.
*
* @return void
*/
function themeoo_post_single_navigation() {
?>