%1$s', $svg_image ); } else { $aria_current = is_front_page() && ! is_paged() ? ' aria-current="page"' : ''; $html = sprintf( '', 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( '', $image ); } else { $aria_current = is_front_page() && ! is_paged() ? ' aria-current="page"' : ''; $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( '' ); // 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() { ?>

%2$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), // @phpstan-ignore-line sprintf( /* translators: %s: Author name. */ esc_html__( 'View all of %s\'s posts.', 'ayyash' ), get_the_author() ) ); ?>
12 ) { $content_grid = themeoo_get_default( 'layout_global_content_grid' ); } $classes[] = 'col-md-' . absint( $content_grid ); } list( $classes, $class ) = themeoo_class_attribute_helper( $classes, $class ); /** * Filters the list of CSS main (primary div) names for the current post or page. * * @param string[] $classes An array of body class names. * @param string[] $class An array of additional class names added to the body. */ $classes = apply_filters( 'themeoo_main_class', $classes, $class ); $classes = array_unique( $classes ); // Separates class names with a single space, collates class names for body element. echo 'class="' . esc_attr( implode( ' ', $classes ) ) . '"'; } endif; if ( ! function_exists( 'themeoo_title_bar' ) ) : /** * Prints the Title Bar Container * * @param string $view view. * * @return void */ function themeoo_title_bar( $view ) { $title_bar = (int) themeoo_get_mod( 'layout_' . $view . '_title-bar' ); $single_title_bar = themeoo_get_post_layout_options( 'titlebar' ); $container_class = apply_filters( 'themeoo_content_container_class', themeoo_get_mod( 'layout_global_content_layout' ) ); $has_wc = class_exists( 'WooCommerce', false ); if ( $has_wc && is_post_type_archive( 'product' ) ) { $maye_show_titlebar = themeoo_get_mod( 'woocommerce_shop_archive_title-bar' ); } elseif ( $has_wc && is_cart() ) { $maye_show_titlebar = ( 1 === (int) themeoo_get_mod( 'woocommerce_cart_title-bar' ) && ( 'default' === $single_title_bar ) || 'enable' === $single_title_bar ); } elseif ( $has_wc && is_checkout() ) { $maye_show_titlebar = ( 1 === (int) themeoo_get_mod( 'woocommerce_checkout_title-bar' ) && ( 'default' === $single_title_bar ) || 'enable' === $single_title_bar ); } elseif ( $has_wc && is_account_page() ) { $maye_show_titlebar = ( 1 === (int) themeoo_get_mod( 'woocommerce_myaccount_title-bar' ) && ( 'default' === $single_title_bar ) || 'enable' === $single_title_bar ); } elseif ( $has_wc && is_product_category() ) { $maye_show_titlebar = (int) themeoo_get_mod( 'woocommerce_product_catalog_title-bar' ) === 1; } elseif ( is_front_page() == true ) { $maye_show_titlebar = ( 'default' === $single_title_bar ) || 'enable' === $single_title_bar; } elseif ( is_home() ) { $maye_show_titlebar = 1 === $title_bar; } else { $maye_show_titlebar = ( $title_bar && 'default' === $single_title_bar ) || 'enable' === $single_title_bar; } if ( apply_filters( 'themeoo_show_title_bar', $maye_show_titlebar ) ) { ?>

  • >
    ' . __( 'Edit', 'ayyash' ), '', '' ); ?>
  • $depth, 'max_depth' => $args['max_depth'], 'reply_text' => '' . esc_html__( 'Reply', 'ayyash' ), 'login_text' => '' . esc_html__( 'Log in to Reply', 'ayyash' ), ] ); ?>
  • >
    ' . esc_html__( 'Edit', 'ayyash' ), '', '' ); ?>
    comment_approved ) : ?>

  • '' . esc_html__( 'Previous', 'ayyash' ) . '', 'next_text' => '' . esc_html__( 'Next', 'ayyash' ) . '', ] ); // We need it to be array, always... $args['type'] = 'array'; // Generate the pagination links; $pages = paginate_links( $args ); if ( is_array( $pages ) ) { ?>
    '', 'delimiter' => '', 'before' => '
  • ', 'after' => '
  • ', ) ); return; } echo ''; return; } // @TODO Add Yoast SEO (WP-SEO) Breadcrumbs Support. if ( ! is_front_page() ) { echo '
  • ' . esc_html__( 'Home', 'ayyash' ) . '
  • '; } if ( ( ! is_tag() && is_tax() ) || is_category() || is_single() && ! is_singular( 'portfolio' ) ) { if ( ( ! is_tag() && is_tax() ) || is_category() ) { $category = array( get_queried_object() ); } else { $category = get_the_category(); } if ( isset( $category[0] ) && is_a( $category[0], 'WP_Term' ) ) { $categories = get_category_parents( $category[0]->term_id, true, '-|-' ); if ( ! is_wp_error( $categories ) ) { // split into array of string. $categories = explode( '-|-', $categories ); $categories = array_filter( $categories ); if ( ! empty( $categories ) ) { /** @noinspection PhpParamsInspection */ echo '
  • ' . implode( '
  • ', $categories ) . '
  • '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } } if ( $post && is_singular( 'portfolio' ) ) { // @phpstan-ignore-next-line echo get_the_term_list( $post->ID, 'portfolio_category', '
  • ', ' - ', '
  • ' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } if ( is_home() ) { echo '
  • ' . esc_html( get_option( 'blog_title', __( 'Blog', 'ayyash' ) ) ) . '
  • '; } if ( is_single() || is_page() ) { ?>
  • ' . esc_html__( '404 - Page not Found', 'ayyash' ) . ''; } if ( is_search() ) { echo '
  • ' . esc_html__( 'Search', 'ayyash' ) . '
  • '; } if ( is_year() ) { echo '
  • ' . esc_html( get_the_date( _x( 'Y', 'yearly archives date format', 'ayyash' ) ) ) . '
  • '; // @phpstan-ignore-line } echo ''; } endif; /** * @return bool */ function themeoo_has_social_icons() { return themeoo_get_mod( 'layout_footer_social' ) && ! empty( themeoo_get_mod( 'social_profiles' ) ); } if ( ! function_exists( 'themeoo_footer_social_icons' ) ) : /** * Prints Footer Social Icons HTML markup * * @return void */ function themeoo_footer_social_icons() { themeoo_header_social_icons(); } endif; if ( ! function_exists( 'themeoo_header_social_icons' ) ) : /** * Prints Header Social Icons HTML markup * * @return void */ function themeoo_header_social_icons() { $profiles = (array) themeoo_get_mod( 'social_profiles' ); $defaults = array( 'label' => '', 'url' => '', 'icon' => '', ); foreach ( $profiles as $profile ) { $profile = wp_parse_args( $profile, $defaults ); if ( ! $profile['label'] || ! $profile['url'] || ! $profile['icon'] ) { continue; } $attributes = ''; // don't open hash tag, tel or mailto in new tab. if ( false !== strpos( $profile['url'], 'http' ) ) { $attributes .= ' rel="noopener"'; $attributes .= ' target="_blank"'; } /** @noinspection HtmlUnknownTarget */ /** @noinspection HtmlUnknownAttribute */ printf( '
  • %1$s
  • ', esc_attr( $profile['label'] ), esc_url( $profile['url'] ), esc_attr( $profile['icon'] ), esc_attr( $attributes ) ); } } endif; if ( ! function_exists( 'themeoo_second_header_icons' ) ) : /** * Prints markup for Secondary Header Social icons * * @return void */ function themeoo_second_header_icons() { ?>

    ID ); $thumb_sizes = $thumb_id ? wp_get_attachment_metadata( $thumb_id, true ) : false; if ( $thumb_sizes ) { $width = floatval( $thumb_sizes['width'] ); $width = $width >= 1140 ? 1140 : $width; $width = "width:{$width}px;max-width:100%"; } } return $width; } endif; if ( ! function_exists( 'themeoo_the_title' ) ) { /** * Display Post Title. * * @return void */ function themeoo_the_title() { $themeoo_page_title = themeoo_get_post_layout_options( 'page_title' ); $themeoo_view = themeoo_get_current_screen(); $show_title = 'enable' === $themeoo_page_title || ( 'default' === $themeoo_page_title && (int) themeoo_get_mod( 'layout_' . $themeoo_view . '_title' ) ); if ( apply_filters( 'themeoo_show_page_title', $show_title ) ) { ?>

    post_type ); // @phpstan-ignore-line $has_thumb = has_post_thumbnail( $the_post ); do_action( 'themeoo_' . $themeoo_view . '_before_feature_image', $is_single, $has_thumb ); if ( $has_thumb ) { $_attr = [ 'alt' => get_the_title( $the_post ), // @phpstan-ignore-line 'link' => true, 'link_classes' => '', 'wrapper' => true, 'wrapper_classes' => 'post-image effect slide-top', 'extra_classes' => '', 'lazy_loading' => true, ]; $attr = wp_parse_args( $attr, $_attr ); $format = '%s'; $lazy = $attr['lazy_loading']; // Permalink. if ( $attr['link'] ) { $format = '%s'; // @phpstan-ignore-line } // Post Image Wrapper. if ( $attr['wrapper'] ) { if ( ! empty( $attr['extra_classes'] ) ) { $attr['wrapper_classes'] .= ' ' . trim( $attr['extra_classes'] ); } if ( 'medium' === $themeoo_layout ) { $attr['wrapper_classes'] .= ' medium-left'; } $wrap_attrs = $attr['wrapper_classes'] . ' ' . ( $is_single ? 'single-featured' : 'loop-featured' ); $wrap_attrs = 'class="' . esc_attr( $attr['wrapper_classes'] ) . '"'; $wrap_attrs = $wrap_attrs . ( $is_single ? ' style="' . themeoo_featured_image_width( $themeoo_view, $the_post ) . '"' : '' ); $wrap_attrs = str_replace( [ '%' ], '%%', $wrap_attrs ); $format = '
    ' . $format . '
    '; } unset( $attr['link'], $attr['wrapper'], $attr['link_classes'], $attr['extra_classes'], $attr['wrapper_classes'] ); if ( ! $lazy ) { add_filter( 'themeoo_lazyload_post_thumbnail', '__return_false' ); } // Print the thumbnail. printf( $format, get_the_post_thumbnail( $the_post, $size, $attr ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( ! $lazy ) { remove_filter( 'themeoo_lazyload_post_thumbnail', '__return_false' ); } } do_action( 'themeoo_' . $themeoo_view . '_after_feature_image', $is_single, $has_thumb ); } } if ( ! function_exists( 'themeoo_edit_post_link' ) ) { /** * Display Post Title. * * @return void */ function themeoo_edit_post_link() { edit_post_link( ' ' . esc_html__( 'Edit', 'ayyash' ), '', '' ); } } if ( ! function_exists( 'themeoo_link_pages' ) ) { /** * The formatted output of a list of pages. * * @param string|array $args Optional. Array or string of default arguments. * * @see wp_link_pages() for detaild arguments. * * @return string */ function themeoo_link_pages( $args = '' ) { $defaults = array( 'before' => '', ); $parsed_args = wp_parse_args( $args, $defaults ); return wp_link_pages( $parsed_args ); } } if ( ! function_exists( 'themeoo_post_format_get_post_audio' ) ) { /** * Output Audio Player for post-format-audio * * @param string $layout Layout. * @param WP_Post|null|int $post Current post. * * @return void */ function themeoo_post_format_get_post_audio( $layout = '', $post = null ) { $post = get_post( $post ); if ( ! $post ) { return; } if ( ! $layout ) { $layout = themeoo_get_content_layout(); } if ( 'medium' === $layout ) { get_template_part( 'partials/content', 'sticky' ); } $type = get_post_meta( $post->ID, 'themeoo_audio_source', true ); $source = get_post_meta( $post->ID, 'themeoo_audio_' . $type, true ); $mime = 'hosted' === $type ? get_post_mime_type( $source['id'] ) : false; $content = get_the_content( null, false, $post ); if ( 'embedded' === $type && ! empty( $source ) ) { /** * @var string|false $found */ $found = themeoo_render_embedded( $source, false ); if ( $found ) { ?>
    >
    >
    [ 'title' => [], 'width' => [], 'height' => [], 'src' => [], 'frameborder' => [], 'loading' => [], 'allow' => [], 'allowfullscreen' => [], ], ] ); } } } if ( $found ) { ?>
    >
    ID, 'themeoo_gallery', true ); $gallery = wp_parse_id_list( $gallery ); $slider_id = 'blog-gallery-slider' . $post->ID; if ( ! empty( $gallery ) ) { ?>
    >
    >
    ID, false ); $image_alt = sprintf( /* translators: 1: Post title, 2. Image Number. */ __( '%1$s Gallery Image %2$d', 'ayyash' ), get_the_title( $post ), '#1' // @phpstan-ignore-line ); if ( ! empty( $gallery ) && isset( $gallery['src'] ) && is_array( $gallery['src'] ) && ! empty( $gallery['src'] ) ) { ?>
    >
    > false ], $post ); ?>
    ID ) && has_block( 'core/image', $content ) ) { ?>
    >
    > [ 'width' => [], 'height' => [], 'src' => [], 'alt' => [], 'frameborder' => [], 'allowfullscreen' => [], ], ] ); ?>
    ID, 'themeoo_link_url', true ); if ( ! empty( $link ) ) { ?>
    >
    >
    ID, 'themeoo_quote_text', true ); $author = get_post_meta( $post->ID, 'themeoo_quote_author', true ); if ( ! empty( $quote ) ) { ?>
    >

    >
    >
    >
    ID, 'themeoo_video_source', true ); $source = get_post_meta( $post->ID, 'themeoo_video_' . $type, true ); $duration = get_post_meta( $post->ID, 'themeoo_video_durations', true ); $mime = 'hosted' === $type && isset( $source['id'] ) ? get_post_mime_type( $source['id'] ) : false; if ( 'embedded' === $type && ! empty( $source ) ) { /** * @var string|false $found */ $found = themeoo_render_embedded( $source, false ); if ( $found ) { ?>
    >
    >
    [ 'title' => [], 'width' => [], 'height' => [], 'src' => [], 'frameborder' => [], 'loading' => [], 'allow' => [], 'allowfullscreen' => [], ], ] ); } } } if ( $found ) { ?>
    >