base ) { return; } if ( wp_doing_ajax() ) { return; } wp_enqueue_style( 'cptui-css' ); } add_action( 'admin_enqueue_scripts', 'cptui_listings_assets' ); /** * Output the content for the "Registered Types/Taxes" page. * * @since 1.1.0 * * @internal */ function cptui_listings() { ?>

' . esc_html__( 'Post Types', 'custom-post-type-ui' ) . ''; if ( ! empty( $post_types ) ) { ?>

' . esc_html( $head ) . ''; } ?> $post_type_settings ) { $rowclass = ( 0 === $counter % 2 ) ? '' : 'alternate'; $strings = []; $supports = []; $taxonomies = []; $archive = ''; foreach ( $post_type_settings as $settings_key => $settings_value ) { if ( 'labels' === $settings_key ) { continue; } if ( is_string( $settings_value ) ) { $strings[ $settings_key ] = $settings_value; } else { if ( 'supports' === $settings_key ) { $supports[ $settings_key ] = $settings_value; } if ( 'taxonomies' === $settings_key ) { $taxonomies[ $settings_key ] = $settings_value; // In case they are not associated from the post type settings. if ( empty( $taxonomies['taxonomies'] ) ) { $taxonomies['taxonomies'] = get_object_taxonomies( $post_type ); } } } $archive = get_post_type_archive_link( $post_type ); } ?> ' . esc_html( $head ) . ''; } ?>
%s
%s
', esc_attr( $post_type_link_url ), sprintf( /* translators: %s: Post type slug */ esc_html__( 'Edit %1$s (%2$s)', 'custom-post-type-ui' ), esc_html( $post_type_settings['label'] ), esc_html( $post_type ) ), esc_attr( admin_url( 'admin.php?page=cptui_tools&action=get_code#' . $post_type ) ), esc_html__( 'Get code', 'custom-post-type-ui' ) ); if ( $archive ) { ?>
$value ) { printf( '%s: ', esc_html( $key ) ); if ( in_array( $value, [ '1', '0' ], true ) ) { echo esc_html( disp_boolean( $value ) ); } else { echo ! empty( $value ) ? esc_html( $value ) : '""'; } echo '
'; } ?>
'; } ?> '; } } else { printf( '%s', esc_html__( 'No associated taxonomies', 'custom-post-type-ui' ) ); } ?> $value ) { if ( 'parent' === $key && array_key_exists( 'parent_item_colon', $post_type_settings['labels'] ) ) { continue; } printf( '%s: %s
', esc_html( $key ), esc_html( $value ) ); } } else { printf( '%s', esc_html__( 'No custom labels to display', 'custom-post-type-ui' ) ); } ?>


archive-.php
archive.php
index.php


single--post_slug.php *
single-.php
single.php
singular.php
index.php

%s', esc_html__( 'Template hierarchy Theme Handbook', 'custom-post-type-ui' ) ); ?>

' . esc_html__( 'Taxonomies', 'custom-post-type-ui' ) . ''; if ( ! empty( $taxonomies ) ) { ?>

' . esc_html( $head ) . ''; } ?> $taxonomy_settings ) { $rowclass = ( 0 === $counter % 2 ) ? '' : 'alternate'; $strings = []; $object_types = []; foreach ( $taxonomy_settings as $settings_key => $settings_value ) { if ( 'labels' === $settings_key ) { continue; } if ( is_string( $settings_value ) ) { $strings[ $settings_key ] = $settings_value; } else { if ( 'object_types' === $settings_key ) { $object_types[ $settings_key ] = $settings_value; // In case they are not associated from the post type settings. if ( empty( $object_types['object_types'] ) ) { $types = get_taxonomy( $taxonomy ); $object_types['object_types'] = $types->object_type; } } } } ?> ' . esc_html( $head ) . ''; } ?>
%s
%s', esc_attr( $taxonomy_link_url ), sprintf( /* translators: %s: Taxonomy slug */ esc_html__( 'Edit %1$s (%2$s)', 'custom-post-type-ui' ), esc_html( $taxonomy_settings['label'] ), esc_html( $taxonomy ) ), esc_attr( admin_url( 'admin.php?page=cptui_tools&action=get_code#' . $taxonomy ) ), esc_html__( 'Get code', 'custom-post-type-ui' ) ); ?>
$value ) { printf( '%s: ', esc_html( $key ) ); if ( in_array( $value, [ '1', '0' ], true ) ) { echo esc_html( disp_boolean( $value ) ); } else { echo ! empty( $value ) ? esc_html( $value ) : '""'; } echo '
'; } ?>
'; } } ?> $value ) { printf( '%s: %s
', esc_html( $key ), esc_html( $value ) ); } } else { printf( '%s', esc_html__( 'No custom labels to display', 'custom-post-type-ui' ) ); } ?>


taxonomy--term_slug.php *
taxonomy-.php
taxonomy.php
archive.php
index.php

%s', esc_html__( 'Template hierarchy Theme Handbook', 'custom-post-type-ui' ) ); ?>

' . sprintf( /* translators: 1st %s: Link to manage post types section 2nd %s Link text */ esc_html__( 'No post types registered for display. Visit %s to get started.', 'custom-post-type-ui' ), sprintf( '%s', esc_attr( admin_url( 'admin.php?page=cptui_manage_post_types' ) ), esc_html__( 'Add/Edit Post Types', 'custom-post-type-ui' ) ) ) . '

'; } add_action( 'cptui_no_post_types_listing', 'cptui_no_post_types_to_list' ); /** * Displays a message for when no taxonomies are registered. * * Uses the `cptui_no_taxonomies_listing` hook. * * @since 1.3.0 * * @internal */ function cptui_no_taxonomies_to_list() { echo '

' . sprintf( /* translators: %s: Link to manage taxonomies section */ esc_html__( 'No taxonomies registered for display. Visit %s to get started.', 'custom-post-type-ui' ), sprintf( '%s', esc_attr( admin_url( 'admin.php?page=cptui_manage_taxonomies' ) ), esc_html__( 'Add/Edit Taxonomies', 'custom-post-type-ui' ) ) ) . '

'; } add_action( 'cptui_no_taxonomies_listing', 'cptui_no_taxonomies_to_list' );