ul. */ function athlonx_nav_menu( $menu_id, $close = false ) { if ( has_nav_menu( $menu_id ) ) { echo ''; } } } /** * Display theme dynamic sidebars from widgets. * * @param string $sidebar_id Unique sidebar ID. */ function athlonx_sidebar_widget( $sidebar_id ) { if ( is_active_sidebar( $sidebar_id ) ) { echo '
'; if ( is_active_sidebar( $sidebar_id ) ) { dynamic_sidebar( $sidebar_id ); } else { if ( current_user_can( 'administrator' ) ) { echo '

Specify your sidebar widgets by going to Appearance > Widgets.

'; } } echo '

'; } } /** * Display page specific header area cover class name. * * @param string $class CSS class name. */ function athlonx_cover_class( $class = '' ) { if ( is_archive() || is_search() || is_404() || is_page_template( 'templates/template-sitemap.php' ) ) { return 'cover-sm'; } else if ( is_page_template( 'templates/template-cover.php' ) ) { return 'cover-md'; } return $class; } /** * Display page specific breadcrmb top level. */ function athlonx_beradcrumb_trail() { if ( is_category() ) { echo 'Categories'; } else if ( is_page() ) { echo 'Pages'; } else if ( is_tag() ) { echo 'Tags'; } else if ( is_date() ) { if ( is_year() ) { echo 'Year'; } else if ( is_month() ) { echo 'Month'; } else if ( is_day() ) { echo 'Day'; } } else if ( is_author() ) { echo 'Author'; } else if ( is_search() ) { echo 'Search'; } else if ( is_single() ) { echo 'Blog'; } else if ( is_attachment() ) { echo 'Attachment'; } } /** * Display page specific archive titles. */ function athlonx_archive_title() { if ( is_category() ) { echo ''; } elseif ( is_tag() ) { echo ''; } elseif ( is_date() ) { echo ''; } elseif ( is_author() ) { echo ''; } elseif ( is_search() ) { echo ''; } echo esc_html( str_replace( ' ', ' / ', trim( wp_title( '', false ) ) ) ); } /** * Display grid supported post format icons. */ function athlonx_post_format_icon() { if ( 'audio' === get_post_format() ) { echo ''; } else if ( 'gallery' === get_post_format() ) { echo ''; } else if ( 'image' === get_post_format() ) { echo ''; } else if ( 'link' === get_post_format() ) { echo ''; } else if ( 'quote' === get_post_format() ) { echo ''; } else if ( 'video' === get_post_format() ) { echo ''; } } /** * Display and escape cropped images used in the front page. */ function athlonx_display_cropped_image( $image_id, $type = 'full' ) { if ( ! is_numeric( $image_id ) ) { return false; } echo esc_url_raw( wp_get_attachment_image_src( $image_id, $type )[0] ); }