post_type, $a2zaal_active_post_types ) ) { return; } namespace\add_post_a2zaal_info( $a2zaal_post ); } /** * make the a2zaal list page titles more readable * * @author: nvwd * @since: 2.0.0 * @param $archive_title * @return string */ function filter_archive_title( $archive_title ) { if ( ! namespace\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 = '#'; } return sprintf( __( '%1$s: %2$s' ), $post_type_labels->label, $group_title_initial ); } /** * customize the a2zaal list page description * * @author: nvwd * @since: 2.0.0 * @param $archive_description * @return string */ function filter_archive_description( $archive_description ) { if ( ! namespace\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', A2ZAAL_TEXT_DOMAIN ); } return sprintf( __( '%1$s beginning with %2$s.' ), $post_type_labels->label, $group_title_initial ); }