',
'condition' => ( is_front_page() || is_home() ) && ! is_page(),
);
$args = wp_parse_args( $args, $defaults );
/**
* Filters the arguments for `twentytwenty_site_logo()`.
*
* @param array $args Parsed arguments.
* @param array $defaults Function's default arguments.
*/
$args = apply_filters( 'themeoo_site_logo_args', $args, $defaults );
if ( has_custom_logo() ) {
$contents = sprintf( $args['logo'], $logo, esc_html( $site_title ) );
$classname = $args['logo_class'];
} else {
$contents = sprintf( $args['title'], esc_url( get_home_url( null, '/' ) ), esc_html( $site_title ) );
$classname = $args['title_class'];
}
$wrap = $args['condition'] ? 'home_wrap' : 'single_wrap';
$html = sprintf( $args[ $wrap ], $classname, $contents );
/**
* Filters the arguments for `twentytwenty_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( 'themeoo_site_logo', $html, $args, $classname, $contents );
if ( ! $echo ) {
return $html;
}
echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
if ( ! function_exists( 'themeoo_post_meta' ) ) :
/**
* Prints HTML with meta information for the current post-date/time, author & comments.
*
* @return void
*/
function themeoo_post_meta() {
?>
/
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() {
?>