- ';
$output .= wp_list_pages(
array(
'echo' => false,
'title_li' => false,
)
);
$output .= '
'; } } endif; add_action( 'wp_head', 'zakra_pingback_header' ); if ( ! function_exists( 'zakra_header_class' ) ) : /** * Adds css classes into header * * @param string $class css classname. */ function zakra_header_class( $class = '' ) { $classes = array(); $classes = array_map( 'esc_attr', $classes ); $classes = apply_filters( 'zakra_header_class', $classes, $class ); $classes = array_unique( $classes ); echo join( ' ', $classes ); // WPCS: XSS ok. } endif; if ( ! function_exists( 'zakra_header_top_class' ) ) : /** * Adds css classes into header * * @param string $class css classname. */ function zakra_header_top_class( $class = '' ) { $classes = array(); $classes = array_map( 'esc_attr', $classes ); $classes = apply_filters( 'zakra_header_top_class', $classes, $class ); $classes = array_unique( $classes ); echo join( ' ', $classes ); // WPCS: XSS ok. } endif; if ( ! function_exists( 'zakra_css_class' ) ) : /** * Adds css classes to elements dynamically. * * @param string $tag Filter tag name. * * @return string CSS classes. */ function zakra_css_class( $tag, $echo = true ) { // Get list of css classes in array for the `$tag` aka element. $classes = Zakra_Dynamic_Filter::filter_via_tag( $tag ); // Filter for the element classes. $classes = apply_filters( $tag, $classes ); // Remove duplicate classes if any. $classes = array_unique( $classes ); // Output in string format. if ( true === $echo ) { echo join( ' ', $classes ); // WPCS: XSS ok. } else { return join( ' ', $classes ); } } endif; if ( ! function_exists( 'zakra_primary_menu_class' ) ) : /** * Adds css classes into primary menu * * @param string $class css classname. */ function zakra_primary_menu_class( $class = '' ) { $classes = array(); $classes = array_map( 'esc_attr', $classes ); $classes = apply_filters( 'zakra_primary_menu_class', $classes, $class ); $classes = array_unique( $classes ); echo join( ' ', $classes ); // WPCS: XSS ok. } endif; if ( ! function_exists( 'zakra_footer_class' ) ) : /** * Adds css classes into the footer * * @param string $class css classname. */ function zakra_footer_class( $class = '' ) { $classes = array(); $classes = array_map( 'esc_attr', $classes ); $classes = apply_filters( 'zakra_footer_class', $classes, $class ); $classes = array_unique( $classes ); echo join( ' ', $classes ); // WPCS: XSS ok. } endif; if ( ! function_exists( 'zakra_footer_widget_container_class' ) ) : /** * Adds css classes into the footer widget area * * @param string $class css classname. */ function zakra_footer_widget_container_class( $class = '' ) { $classes = array(); $classes = array_map( 'esc_attr', $classes ); $classes = apply_filters( 'zakra_footer_widget_container_class', $classes, $class ); $classes = array_unique( $classes ); echo join( ' ', $classes ); // WPCS: XSS ok. } endif; if ( ! function_exists( 'zakra_footer_bar_classes' ) ) : /** * Adds css classes into the footer bar * * @param string $class css classname. */ function zakra_footer_bar_classes( $class = '' ) { $classes = array(); $classes = array_map( 'esc_attr', $classes ); $classes = apply_filters( 'zakra_footer_bar_class', $classes, $class ); $classes = array_unique( $classes ); echo join( ' ', $classes ); // WPCS: XSS ok. } endif; if ( ! function_exists( 'zakra_sidebar_class' ) ) : /** * Adds css classes into the sidebar * * @param string $class css classname. */ function zakra_sidebar_class( $class = '' ) { $classes = array(); $classes = array_map( 'esc_attr', $classes ); $clasess = apply_filters( 'zakra_sidebar_class', $classes, $class ); $classes = array_unique( $clasess ); echo join( ' ', $classes ); // WPCS: XSS ok. } endif; if ( ! function_exists( 'zakra_get_title' ) ) : /** * Returns page title. * * @return string */ function zakra_get_title() { if ( is_archive() ) { if ( is_author() ) : /** * Queue the first post, that way we know * what author we're dealing with (if that is the case). */ the_post(); $author_title = apply_filters( 'zakra_author_title_prefix', 'Author :' ); /* translators: %1$s: Author prefix, %2$s: Author. */ $page_title = sprintf( esc_html__( '%1$s %2$s', 'zakra' ), $author_title, '' . get_the_author() . '' ); /** * Since we called the_post() above, we need to * rewind the loop back to the beginning that way * we can run the loop properly, in full. */ rewind_posts(); elseif ( is_post_type_archive() ) : $page_title = post_type_archive_title( '', false ); elseif ( is_day() ) : $day_title = apply_filters( 'zakra_day_title_prefix', 'Day:' ); /* translators: %1$s: Day prefix, %2$s: Day. */ $page_title = sprintf( esc_html__( '%1$s %2$s', 'zakra' ), $day_title, '' . get_the_date() . '' ); elseif ( is_month() ) : $month_title = apply_filters( 'zakra_month_title_prefix', 'Month:' ); /* translators: %1$s: Month prefix, %2$s: Month. */ $page_title = sprintf( esc_html__( '%1$s %2$s', 'zakra' ), $month_title, '' . get_the_date( 'F Y' ) . '' ); elseif ( is_year() ) : $year_title = apply_filters( 'zakra_year_title_prefix', 'Year:' ); /* translators: %1$s: Year prefix, %2$s: Year. */ $page_title = sprintf( esc_html__( '%1$s %2$s', 'zakra' ), $year_title, '' . get_the_date( 'Y' ) . '' ); elseif ( zakra_is_woocommerce_active() && function_exists( 'is_woocommerce' ) && is_woocommerce() ) : $page_title = woocommerce_page_title( false ); else : $page_title = single_cat_title( '', false ); endif; } elseif ( is_404() ) { // Page header. if ( 'page-header' === zakra_is_page_title_enabled() ) { $page_title = esc_html__( 'Page Not Found', 'zakra' ); } else { // Content area. $page_title = esc_html__( 'Oops! That page can’t be found.', 'zakra' ); } } elseif ( is_search() ) { $page_title = esc_html__( 'Search Results', 'zakra' ); } elseif ( is_page() ) { $page_title = get_the_title(); } elseif ( is_single() ) { $page_title = get_the_title(); } elseif ( is_home() ) { $queried_id = get_option( 'page_for_posts' ); $page_title = get_the_title( $queried_id ); } else { $page_title = ''; } return apply_filters( 'zakra_title', $page_title ); } endif; if ( ! function_exists( 'zakra_entry_title' ) ) : /** * Generate title for page, post, archive. */ function zakra_entry_title() { if ( 'page-header' !== zakra_is_page_title_enabled() ) { if ( is_singular() ) : the_title( '