' . esc_html__( 'You are not allowed to access this taxonomy.', 'ai-for-seo' ) . '
'; return; } // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Read-only list filters under the content-role and taxonomy-capability gates. $ai4seo_taxonomy_availability = isset( $_GET['ai4seo_taxonomy_availability'] ) && is_string( $_GET['ai4seo_taxonomy_availability'] ) ? sanitize_key( wp_unslash( $_GET['ai4seo_taxonomy_availability'] ) ) : 'active'; $ai4seo_taxonomy_search = isset( $_GET['ai4seo_search'] ) && is_string( $_GET['ai4seo_search'] ) ? sanitize_text_field( wp_unslash( $_GET['ai4seo_search'] ) ) : ''; $ai4seo_taxonomy_page = isset( $_GET['ai4seo_page'] ) && is_scalar( $_GET['ai4seo_page'] ) ? max( 1, absint( $_GET['ai4seo_page'] ) ) : 1; $ai4seo_taxonomy_missing_only = isset( $_GET['ai4seo_filter_status'] ) && 'missing' === $_GET['ai4seo_filter_status']; // phpcs:enable WordPress.Security.NonceVerification.Recommended $ai4seo_taxonomy_list = ai4seo_read_taxonomy_proxy_list_page( $ai4seo_current_taxonomy, $ai4seo_taxonomy_availability, $ai4seo_taxonomy_search, $ai4seo_taxonomy_page, $ai4seo_taxonomy_missing_only ); if ( is_wp_error( $ai4seo_taxonomy_list ) ) { echo ''; return; } // Reuse the post/media control layout while retaining the taxonomy-specific route and filters. $ai4seo_taxonomy_filter_status = $ai4seo_taxonomy_missing_only ? 'missing' : 'all'; echo ''; if ( $ai4seo_taxonomy_list['index_pending'] ) { echo '' . esc_html__( 'Some taxonomy entries are still waiting for synchronization. They will appear after a scheduled update; reload this page afterwards. If this message persists, check that WordPress scheduled tasks are running.', 'ai-for-seo' ) . '
'; } if ( $ai4seo_taxonomy_list['has_errors'] ) { echo ''; } $ai4seo_taxonomy_ids = array_column( $ai4seo_taxonomy_list['rows'], 'post_id' ); $ai4seo_taxonomy_page_inspections = array(); $ai4seo_taxonomy_generation_status = ai4seo_read_taxonomy_generation_status_summary( $ai4seo_current_taxonomy, false, $ai4seo_taxonomy_page_inspections, $ai4seo_taxonomy_ids ); $ai4seo_taxonomy_field_states = array(); $ai4seo_taxonomy_issues = array(); $ai4seo_taxonomy_coverage = ai4seo_read_percentage_of_available_metadata_by_post_ids( $ai4seo_taxonomy_ids, 0, $ai4seo_taxonomy_metadata_known, $ai4seo_taxonomy_field_states, $ai4seo_taxonomy_issues ); $ai4seo_taxonomy_fields = ai4seo_get_active_meta_tags(); $ai4seo_taxonomy_field_names = array(); foreach ( $ai4seo_metadata_field_descriptors as $ai4seo_field_identifier => $ai4seo_field_details ) { if ( in_array( $ai4seo_field_identifier, $ai4seo_taxonomy_fields, true ) && isset( $ai4seo_field_details['name'] ) ) { $ai4seo_taxonomy_field_names[ $ai4seo_field_identifier ] = $ai4seo_field_details['name']; } } echo '| '; ai4seo_echo_wp_kses( ai4seo_get_select_all_checkbox( 'ai4seo_bulk_generation_queue_post_ids', '' ) ); echo ' | '; foreach ( array( __( 'Name', 'ai-for-seo' ), __( 'Parent', 'ai-for-seo' ), __( 'Content count', 'ai-for-seo' ), __( 'Metadata coverage', 'ai-for-seo' ), __( 'Actions', 'ai-for-seo' ) ) as $ai4seo_column_label ) { echo '' . esc_html( $ai4seo_column_label ) . ' | '; } echo '||||
|---|---|---|---|---|---|
| '; if ( ai4seo_can_edit_taxonomy_proxy( $ai4seo_id ) ) { ai4seo_echo_wp_kses( ai4seo_get_bulk_generation_queue_entry_checkbox( 'ai4seo_bulk_generation_queue_post_ids', $ai4seo_id, $ai4seo_taxonomy_row['name'], $ai4seo_known ? '' : __( 'Stored metadata is unavailable.', 'ai-for-seo' ) ) ); } echo ' | ';
if ( $ai4seo_taxonomy_row['archive_url'] ) {
echo '' . esc_html( $ai4seo_taxonomy_row['name'] ) . '';
} else {
echo esc_html( $ai4seo_taxonomy_row['name'] );
}
echo '';
if ( ! $ai4seo_taxonomy_row['available'] ) {
echo ' ' . esc_html__( 'Inactive', 'ai-for-seo' ) . '';
}
echo ' ' . esc_html( $ai4seo_taxonomy_row['source']['slug'] ) . ' | ';
echo '' . esc_html( $ai4seo_parent && ! is_wp_error( $ai4seo_parent ) ? $ai4seo_parent->name : '—' ) . ' | '; echo '' . esc_html( number_format_i18n( $ai4seo_taxonomy_row['source']['count'] ) ) . ' | '; echo '';
if ( $ai4seo_taxonomy_fields ) {
// The shared reader excludes taxonomy proxies from third-party providers and preserves unknown coverage.
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Shared coverage renderer escapes dynamic output, including field details and meter attributes.
echo ai4seo_get_seo_coverage_progress_bar_tag(
$ai4seo_id,
$ai4seo_percentage,
'',
null === $ai4seo_percentage || $ai4seo_percentage < 100,
$ai4seo_taxonomy_row['label'],
$ai4seo_taxonomy_field_names,
$ai4seo_taxonomy_field_states[ $ai4seo_id ] ?? array()
);
} else {
echo ' ' . esc_html__( 'No active meta tags.', 'ai-for-seo' ) . ' ';
}
if ( is_wp_error( $ai4seo_taxonomy_generation_status ) ) {
echo '' . esc_html__( 'Status unavailable', 'ai-for-seo' ) . ' ';
} else {
foreach ( array(
'processing' => __( 'Processing', 'ai-for-seo' ),
'pending' => __( 'Queued', 'ai-for-seo' ),
'failed' => __( 'Needs review', 'ai-for-seo' ),
'auto_queue_disallowed' => __( 'Automatic queueing excluded', 'ai-for-seo' ),
) as $ai4seo_generation_status_key => $ai4seo_generation_status_label ) {
if ( in_array( $ai4seo_id, $ai4seo_taxonomy_generation_status[ $ai4seo_generation_status_key ], true ) ) {
echo '' . esc_html( $ai4seo_generation_status_label ) . ' ';
break;
}
}
}
if ( $ai4seo_taxonomy_row['available'] ) {
$ai4seo_generation_context = ai4seo_get_taxonomy_generation_eligibility( $ai4seo_id );
if ( is_wp_error( $ai4seo_generation_context ) ) {
echo '' . esc_html__( 'Content could not be read', 'ai-for-seo' ) . ' ';
} elseif ( ! $ai4seo_generation_context['has_sufficient_content'] ) {
echo '' . esc_html__( 'Too little content for automatic generation', 'ai-for-seo' ) . ' ';
}
}
echo ' | |
| ' . esc_html__( 'No entries match these filters.', 'ai-for-seo' ) . ' | |||||