post_type, $a2zaal_active_post_types, true ) ) { return; } add_post_a2zaal_info( $a2zaal_post ); } /** * Make the a2zaal list page titles more readable * * @author nvwd * * @since 2.0.0 * * @param string $archive_title archive page title. * * @return string */ function filter_archive_title( string $archive_title ) { if ( ! is_a2zaal_query() ) { return $archive_title; } $post_type_labels = \get_post_type_object( \get_query_var( 'post_type' ) ); $group_title_initial = \get_query_var( A2ZAAL_REWRITE_TAG ); if ( '0' === $group_title_initial ) { $group_title_initial = '#'; } /* translators: 1: post type title 2: initial of the archive grouping */ return sprintf( __( '%1$s: %2$s', 'nvwd-a2zaal' ), $post_type_labels->label, $group_title_initial ); } /** * Customize the a2zaal list page description * * @author nvwd * * @since 2.0.0 * * @param string $archive_description archive page description. * * @return string */ function filter_archive_description( string $archive_description ) { if ( ! is_a2zaal_query() ) { return $archive_description; } $post_type_labels = \get_post_type_object( \get_query_var( 'post_type' ) ); $group_title_initial = \get_query_var( A2ZAAL_REWRITE_TAG ); if ( '0' === $group_title_initial ) { $group_title_initial = 'a number'; } /* translators: 1: post type title 2: initial of the archive grouping */ return sprintf( __( '%1$s beginning with %2$s.', 'nvwd-a2zaal' ), $post_type_labels->label, $group_title_initial ); }