', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'bizes_pingback_header' ); if ( ! function_exists( 'bizes_excerpt_length' ) ) : /** * Excerpt length * Since 1.0.0 */ function bizes_excerpt_length( $length ){ if ( is_admin() ) { return $length; } $length = get_theme_mod( 'post_excerpt_count', 20 ); return absint( $length ); } endif; add_filter( 'excerpt_length', 'bizes_excerpt_length', 999); if ( ! function_exists( 'bizes_auto_excerpt_more' ) ) : function bizes_auto_excerpt_more( $more ) { if ( is_admin() ) { return $more; } $excerpt_dots = get_theme_mod('post_excerpt_dots'); return '' . wp_kses_post( $excerpt_dots ). ''; } endif; add_filter( 'excerpt_more', 'bizes_auto_excerpt_more' ); if ( ! function_exists( 'bizes_get_posts_pagination' ) ) : /** * Pagination * Since 1.0.0 */ function bizes_get_posts_pagination( $query = null ) { $classes = []; if ( empty( $query ) ) { $query = $GLOBALS['wp_query']; } if ( empty( $query->max_num_pages ) || ! is_numeric( $query->max_num_pages ) || $query->max_num_pages < 2 ) { return; } $paged = get_query_var( 'paged' ); if ( ! $paged && is_front_page() && ! is_home() ) { $paged = get_query_var( 'page' ); } $paged = $paged ? intval( $paged ) : 1; $pagenum_link = html_entity_decode( get_pagenum_link() ); $query_args = array(); $url_parts = explode( '?', $pagenum_link ); if ( isset( $url_parts[1] ) ) { wp_parse_str( $url_parts[1], $query_args ); } $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; $html_prev = ''; $html_next = ''; $links = paginate_links( array( 'base' => $pagenum_link, 'total' => $query->max_num_pages, 'current' => $paged, 'mid_size' => 2, 'add_args' => array_map( 'urlencode', $query_args ), 'prev_text' => $html_prev, 'next_text' => $html_next, 'type' => 'array', ) ); $bizes_animation = get_theme_mod( 'bizes_animation_disable', 0 ) ? 'animate-box':''; if ( is_array( $links ) ) { $r = '"; printf( $r ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } endif; function bizes_render_posts_pagination() { /** * Pagination for archive. * Since 1.0.0 */ $pagination_type = get_theme_mod( 'pagination_type', 'numeric' ); if ( 'default' === $pagination_type ) : the_posts_navigation(); else : bizes_get_posts_pagination(); endif; } add_action( 'bizes_posts_pagination', 'bizes_render_posts_pagination', 10 ); if ( ! function_exists( 'bizes_site_logo' ) ) : /** * Site Branding * Since 1.0.0 */ function bizes_site_logo() { $logo_option = get_theme_mod( 'site_logo_option' ); $sticky_logo = get_theme_mod( 'bizes_sticky_logo' ); if ( 'logo-only' == $logo_option ) { ?>