array( 'ID', 'display_name', 'user_nicename' ) ) ); // Sort authors $sorted_authors = []; if ( ! empty( $authors ) ) { // Loop through authors... foreach ( $authors as $author ) { // Relevant data $first_char = mb_strtolower( mb_substr( $author->display_name, 0, 1, 'UTF-8' ), 'UTF-8' ); // Normalize for numbers and other non-alphabetical characters if ( ! preg_match( '/\p{L}/u', $first_char ) ) { $first_char = '#'; // Group under '#' } // Add index if necessary if ( ! isset( $sorted_authors[ $first_char ] ) ) { $sorted_authors[ $first_char ] = []; } $sorted_authors[ $first_char ][] = array( 'id' => $author->ID, 'name' => $author->display_name, 'link' => get_author_posts_url( $author->ID, $author->user_nicename ) ); } // Sort by index ksort( $sorted_authors ); } // Last key end( $sorted_authors ); $last_key = key( $sorted_authors ); reset( $sorted_authors ); ?>
'page', 'post_id' => $post_id, 'breadcrumbs' => array( [fcntr( 'frontpage' ), get_home_url()] ) ); // Add current breadcrumb $footer_args['breadcrumbs'][] = $this_breadcrumb; // Get footer with breadcrumbs get_footer( null, $footer_args ); ?>