Plugin Directory

Changeset 3412256


Ignore:
Timestamp:
12/05/2025 02:12:54 PM (9 days ago)
Author:
webdevstudios
Message:

release version 1.18.2

Location:
custom-post-type-ui
Files:
47 added
9 edited

Legend:

Unmodified
Added
Removed
  • custom-post-type-ui/trunk/custom-post-type-ui.php

    r3399912 r3412256  
    1717 * Description: Admin UI panel for registering custom post types and taxonomies
    1818 * Author: WebDevStudios
    19  * Version: 1.18.1
     19 * Version: 1.18.2
    2020 * Author URI: https://webdevstudios.com/
    2121 * Text Domain: custom-post-type-ui
    22  * Domain Path: /languages
    2322 * License: GPL-2.0+
    2423 * Requires at least: 6.6
     
    3433}
    3534
    36 define( 'CPT_VERSION', '1.18.1' ); // Left for legacy purposes.
    37 define( 'CPTUI_VERSION', '1.18.1' );
     35define( 'CPT_VERSION', '1.18.2' ); // Left for legacy purposes.
     36define( 'CPTUI_VERSION', '1.18.2' );
    3837define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
    3938
     
    110109}
    111110register_deactivation_hook( __FILE__, 'cptui_deactivation' );
    112 
    113 /**
    114  * Register our text domain.
    115  *
    116  * @since 0.8.0
    117  *
    118  * @internal
    119  */
    120 function cptui_load_textdomain() {
    121     load_plugin_textdomain( 'custom-post-type-ui' );
    122 }
    123 add_action( 'init', 'cptui_load_textdomain' );
    124111
    125112/**
     
    936923    if ( 'add' === $action ) {
    937924        if ( $success ) {
     925            // translators: placeholder holds content name.
    938926            $message .= sprintf( esc_html__( '%s has been successfully added', 'custom-post-type-ui' ), $object_type );
    939927        } else {
     928            // translators: placeholder holds content name.
    940929            $message .= sprintf( esc_html__( '%s has failed to be added', 'custom-post-type-ui' ), $object_type );
    941930        }
    942931    } elseif ( 'update' === $action ) {
    943932        if ( $success ) {
     933            // translators: placeholder holds content name.
    944934            $message .= sprintf( esc_html__( '%s has been successfully updated', 'custom-post-type-ui' ), $object_type );
    945935        } else {
     936            // translators: placeholder holds content name.
    946937            $message .= sprintf( esc_html__( '%s has failed to be updated', 'custom-post-type-ui' ), $object_type );
    947938        }
    948939    } elseif ( 'delete' === $action ) {
    949940        if ( $success ) {
     941            // translators: placeholder holds content name.
    950942            $message .= sprintf( esc_html__( '%s has been successfully deleted', 'custom-post-type-ui' ), $object_type );
    951943        } else {
     944            // translators: placeholder holds content name.
    952945            $message .= sprintf( esc_html__( '%s has failed to be deleted', 'custom-post-type-ui' ), $object_type );
    953946        }
    954947    } elseif ( 'import' === $action ) {
    955948        if ( $success ) {
     949            // translators: placeholder holds content name.
    956950            $message .= sprintf( esc_html__( '%s has been successfully imported', 'custom-post-type-ui' ), $object_type );
    957951        } else {
     952            // translators: placeholder holds content name.
    958953            $message .= sprintf( esc_html__( '%s has failed to be imported', 'custom-post-type-ui' ), $object_type );
    959954        }
     
    10401035    $preserved_labels = [
    10411036        'post_types' => [
     1037            // translators: placeholder holds content label.
    10421038            'add_new_item'       => sprintf( esc_html__( 'Add new %s', 'custom-post-type-ui' ), $singular ),
     1039            // translators: placeholder holds content label.
    10431040            'edit_item'          => sprintf( esc_html__( 'Edit %s', 'custom-post-type-ui' ), $singular ),
     1041            // translators: placeholder holds content label.
    10441042            'new_item'           => sprintf( esc_html__( 'New %s', 'custom-post-type-ui' ), $singular ),
     1043            // translators: placeholder holds content label.
    10451044            'view_item'          => sprintf( esc_html__( 'View %s', 'custom-post-type-ui' ), $singular ),
     1045            // translators: placeholder holds content label.
    10461046            'view_items'         => sprintf( esc_html__( 'View %s', 'custom-post-type-ui' ), $plural ),
     1047            // translators: placeholder holds content label.
    10471048            'all_items'          => sprintf( esc_html__( 'All %s', 'custom-post-type-ui' ), $plural ),
     1049            // translators: placeholder holds content label.
    10481050            'search_items'       => sprintf( esc_html__( 'Search %s', 'custom-post-type-ui' ), $plural ),
     1051            // translators: placeholder holds content label.
    10491052            'not_found'          => sprintf( esc_html__( 'No %s found.', 'custom-post-type-ui' ), $plural ),
     1053            // translators: placeholder holds content label.
    10501054            'not_found_in_trash' => sprintf( esc_html__( 'No %s found in trash.', 'custom-post-type-ui' ), $plural ),
    10511055        ],
    10521056        'taxonomies' => [
     1057            // translators: placeholder holds content label.
    10531058            'search_items'               => sprintf( esc_html__( 'Search %s', 'custom-post-type-ui' ), $plural ),
     1059            // translators: placeholder holds content label.
    10541060            'popular_items'              => sprintf( esc_html__( 'Popular %s', 'custom-post-type-ui' ), $plural ),
     1061            // translators: placeholder holds content label.
    10551062            'all_items'                  => sprintf( esc_html__( 'All %s', 'custom-post-type-ui' ), $plural ),
     1063            // translators: placeholder holds content label.
    10561064            'parent_item'                => sprintf( esc_html__( 'Parent %s', 'custom-post-type-ui' ), $singular ),
     1065            // translators: placeholder holds content label.
    10571066            'parent_item_colon'          => sprintf( esc_html__( 'Parent %s:', 'custom-post-type-ui' ), $singular ),
     1067            // translators: placeholder holds content label.
    10581068            'edit_item'                  => sprintf( esc_html__( 'Edit %s', 'custom-post-type-ui' ), $singular ),
     1069            // translators: placeholder holds content label.
    10591070            'update_item'                => sprintf( esc_html__( 'Update %s', 'custom-post-type-ui' ), $singular ),
     1071            // translators: placeholder holds content label.
    10601072            'add_new_item'               => sprintf( esc_html__( 'Add new %s', 'custom-post-type-ui' ), $singular ),
     1073            // translators: placeholder holds content label.
    10611074            'new_item_name'              => sprintf( esc_html__( 'New %s name', 'custom-post-type-ui' ), $singular ),
     1075            // translators: placeholder holds content label.
    10621076            'separate_items_with_commas' => sprintf( esc_html__( 'Separate %s with commas', 'custom-post-type-ui' ), $plural ),
     1077            // translators: placeholder holds content label.
    10631078            'add_or_remove_items'        => sprintf( esc_html__( 'Add or remove %s', 'custom-post-type-ui' ), $plural ),
     1079            // translators: placeholder holds content label.
    10641080            'choose_from_most_used'      => sprintf( esc_html__( 'Choose from the most used %s', 'custom-post-type-ui' ), $plural ),
    10651081        ],
     
    10821098        'post_types' => [
    10831099            'singular' => [
     1100                // translators: placeholder holds content label.
    10841101                'add_new_item'  => esc_html__( 'Add new %s', 'custom-post-type-ui' ),
     1102                // translators: placeholder holds content label.
    10851103                'edit_item'     => esc_html__( 'Edit %s', 'custom-post-type-ui' ),
     1104                // translators: placeholder holds content label.
    10861105                'new_item'      => esc_html__( 'New %s', 'custom-post-type-ui' ),
     1106                // translators: placeholder holds content label.
    10871107                'view_item'     => esc_html__( 'View %s', 'custom-post-type-ui' ),
     1108                // translators: placeholder holds content label.
    10881109                'template_name' => esc_html__( 'Single item: %s', 'custom-post-type-ui' ),
    10891110            ],
    10901111            'plural'   => [
     1112                // translators: placeholder holds content label.
    10911113                'view_items'         => esc_html__( 'View %s', 'custom-post-type-ui' ),
     1114                // translators: placeholder holds content label.
    10921115                'all_items'          => esc_html__( 'All %s', 'custom-post-type-ui' ),
     1116                // translators: placeholder holds content label.
    10931117                'search_items'       => esc_html__( 'Search %s', 'custom-post-type-ui' ),
     1118                // translators: placeholder holds content label.
    10941119                'not_found'          => esc_html__( 'No %s found.', 'custom-post-type-ui' ),
     1120                // translators: placeholder holds content label.
    10951121                'not_found_in_trash' => esc_html__( 'No %s found in trash.', 'custom-post-type-ui' ),
    10961122            ],
     
    10981124        'taxonomies' => [
    10991125            'singular' => [
     1126                // translators: placeholder holds content label.
    11001127                'parent_item'       => esc_html__( 'Parent %s', 'custom-post-type-ui' ),
     1128                // translators: placeholder holds content label.
    11011129                'parent_item_colon' => esc_html__( 'Parent %s:', 'custom-post-type-ui' ),
     1130                // translators: placeholder holds content label.
    11021131                'edit_item'         => esc_html__( 'Edit %s', 'custom-post-type-ui' ),
     1132                // translators: placeholder holds content label.
    11031133                'update_item'       => esc_html__( 'Update %s', 'custom-post-type-ui' ),
     1134                // translators: placeholder holds content label.
    11041135                'add_new_item'      => esc_html__( 'Add new %s', 'custom-post-type-ui' ),
     1136                // translators: placeholder holds content label.
    11051137                'new_item_name'     => esc_html__( 'New %s name', 'custom-post-type-ui' ),
     1138                // translators: placeholder holds content label.
    11061139                'template_name'     => esc_html__( '%s Archives', 'custom-post-type-ui' ),
    11071140            ],
    11081141            'plural'   => [
     1142                // translators: placeholder holds content label.
    11091143                'search_items'               => esc_html__( 'Search %s', 'custom-post-type-ui' ),
     1144                // translators: placeholder holds content label.
    11101145                'popular_items'              => esc_html__( 'Popular %s', 'custom-post-type-ui' ),
     1146                // translators: placeholder holds content label.
    11111147                'all_items'                  => esc_html__( 'All %s', 'custom-post-type-ui' ),
     1148                // translators: placeholder holds content label.
    11121149                'separate_items_with_commas' => esc_html__( 'Separate %s with commas', 'custom-post-type-ui' ),
     1150                // translators: placeholder holds content label.
    11131151                'add_or_remove_items'        => esc_html__( 'Add or remove %s', 'custom-post-type-ui' ),
     1152                // translators: placeholder holds content label.
    11141153                'choose_from_most_used'      => esc_html__( 'Choose from the most used %s', 'custom-post-type-ui' ),
    11151154            ],
  • custom-post-type-ui/trunk/external/wpgraphql.php

    r2781658 r3412256  
    189189
    190190                <h2 class="hndle ui-sortable-handle">
    191                     <span><?php esc_html_e( 'WPGraphQL', 'wp-graphql-custom-post-type-ui' ); ?></span>
     191                    <span><?php esc_html_e( 'WPGraphQL', 'custom-post-type-ui' ); ?></span>
    192192                </h2>
    193193                <div class="handle-actions hide-if-no-js">
    194194                    <button type="button" class="handlediv">
    195                         <span class="screen-reader-text"><?php esc_html_e( 'Toggle panel: GraphQL Settings', 'wp-graphql-custom-post-type-ui' ); ?></span>
     195                        <span class="screen-reader-text"><?php esc_html_e( 'Toggle panel: GraphQL Settings', 'custom-post-type-ui' ); ?></span>
    196196                        <span class="toggle-indicator" aria-hidden="true"></span>
    197197                    </button>
     
    207207                                [
    208208                                    'attr' => '0',
    209                                     'text' => esc_attr__( 'False', 'wp-graphql-custom-post-type-ui' ),
     209                                    'text' => esc_attr__( 'False', 'custom-post-type-ui' ),
    210210                                ],
    211211                                [
    212212                                    'attr' => '1',
    213                                     'text' => esc_attr__( 'True', 'wp-graphql-custom-post-type-ui' ),
     213                                    'text' => esc_attr__( 'True', 'custom-post-type-ui' ),
    214214                                ],
    215215                            ],
     
    221221                        echo $ui->get_select_input( // phpcs:ignore.
    222222                            [
    223                                 'namearray'  => $name_array,
     223                                'namearray'  => esc_attr( $name_array ),
    224224                                'name'       => 'show_in_graphql',
    225                                 'labeltext'  => esc_html__( 'Show in GraphQL', 'wp-graphql-custom-post-type-ui' ),
    226                                 'aftertext'  => esc_html__( 'Whether or not to show data of this type in the WPGraphQL. Default: false', 'wp-graphql-custom-post-type-ui' ),
     225                                'labeltext'  => esc_html__( 'Show in GraphQL', 'custom-post-type-ui' ),
     226                                'aftertext'  => esc_html__( 'Whether or not to show data of this type in the WPGraphQL. Default: false', 'custom-post-type-ui' ),
    227227                                'selections' => $selections, // phpcs:ignore.
    228228                                'default'    => false,
     
    233233                        echo $ui->get_text_input( // phpcs:ignore.
    234234                            [
    235                                 'namearray' => $name_array,
     235                                'namearray' => esc_attr( $name_array ),
    236236                                'name'      => 'graphql_single_name',
    237                                 'labeltext' => esc_html__( 'GraphQL Single Name', 'wp-graphql-custom-post-type-ui' ),
    238                                 'aftertext' => esc_attr__( 'Singular name for reference in the GraphQL API.', 'wp-graphql-custom-post-type-ui' ),
     237                                'labeltext' => esc_html__( 'GraphQL Single Name', 'custom-post-type-ui' ),
     238                                'aftertext' => esc_attr__( 'Singular name for reference in the GraphQL API.', 'custom-post-type-ui' ),
    239239                                'textvalue' => ( isset( $current['graphql_single_name'] ) ) ? esc_attr( $current['graphql_single_name'] ) : '', // phpcs:ignore.
    240240                                'required'  => true,
     
    244244                        echo $ui->get_text_input( // phpcs:ignore.
    245245                            [
    246                                 'namearray' => $name_array,
     246                                'namearray' => esc_attr( $name_array ),
    247247                                'name'      => 'graphql_plural_name',
    248                                 'labeltext' => esc_html__( 'GraphQL Plural Name', 'wp-graphql-custom-post-type-ui' ),
    249                                 'aftertext' => esc_attr__( 'Plural name for reference in the GraphQL API.', 'wp-graphql-custom-post-type-ui' ),
     248                                'labeltext' => esc_html__( 'GraphQL Plural Name', 'custom-post-type-ui' ),
     249                                'aftertext' => esc_attr__( 'Plural name for reference in the GraphQL API.', 'custom-post-type-ui' ),
    250250                                'textvalue' => ( isset( $current['graphql_plural_name'] ) ) ? esc_attr( $current['graphql_plural_name'] ) : '', // phpcs:ignore.
    251251                                'required'  => true,
     
    338338                echo sprintf(
    339339                    // phpcs:ignore.
    340                     esc_html__( 'Custom Post Type UI has native support for WPGraphQL. Please <a href="%s">de-active</a> the "WPGraphQL for Custom Post Type UI" extension to proceed.', 'custom-post-type-ui' ),
    341                     $link // phpcs:ignore.
     340                    esc_html__( 'Custom Post Type UI has native support for WPGraphQL. Please <a href="%s">de-activate</a> the "WPGraphQL for Custom Post Type UI" extension to proceed.', 'custom-post-type-ui' ),
     341                    esc_url( $link )
    342342                );
    343343                ?>
  • custom-post-type-ui/trunk/inc/post-types.php

    r3399912 r3412256  
    780780                                );
    781781
    782                                 echo $ui->get_text_input( // phpcs:ignore.Z
     782                                echo $ui->get_text_input( // phpcs:ignore.
    783783                                    [
    784784                                        'labeltext' => esc_html__( 'Attributes', 'custom-post-type-ui' ),
     
    12331233                            echo $ui->get_label( 'hierarchical', esc_html__( 'Hierarchical', 'custom-post-type-ui' ) ); // phpcs:ignore.
    12341234                            echo $ui->get_p( esc_html__( '"False" behaves like posts, "True" behaves like pages.', 'custom-post-type-ui' ) ); // phpcs:ignore.
    1235                             echo $ui->get_th_end() . $ui->get_td_start();
     1235                            echo $ui->get_th_end() . $ui->get_td_start(); // phpcs:ignore.
    12361236
    12371237                            $select = [
     
    14561456                                    'textvalue'      => isset( $current['show_in_menu_string'] ) ? esc_attr( $current['show_in_menu_string'] ) : '', // phpcs:ignore.
    14571457                                    'helptext'       => $ui->get_label( 'show_in_menu_string', esc_attr__( 'The top-level admin menu page file name for which the post type should be in the sub menu of.', 'custom-post-type-ui' ) ),
     1458                                    // phpcs:ignore.
    14581459                                    'helptext_after' => true,
    14591460                                    'wrap'           => false,
     
    15231524                            echo $ui->get_p( esc_html__( 'Featured images and Post Formats need theme support added, to be used.', 'custom-post-type-ui' ) ); // phpcs:ignore.
    15241525
    1525                             echo $ui->get_p(
     1526                            echo $ui->get_p( // phpcs:ignore.
    15261527                                sprintf(
    15271528                                    '<a href="%s" target="_blank">%s</a><br/><a href="%s" target="_blank">%s</a>',
     
    17691770                                            'namearray'  => 'cpt_addon_taxes',
    17701771                                            'textvalue'  => esc_attr( $add_tax->name ),
    1771                                             'labeltext'  => $add_tax->label . ' ' . $core_label,
     1772                                            'labeltext'  => esc_html( $add_tax->label . ' ' . $core_label ),
    17721773                                            // phpcs:ignore.
    17731774                                            'helptext'   => sprintf( esc_attr__( 'Adds %s support', 'custom-post-type-ui' ), $add_tax->label ),
     
    21392140    // in the cptui_filtered_post_type_post_global() function. So we clean this up from the $_POST
    21402141    // global afterwards here.
    2141     $description = wp_kses_post( stripslashes_deep( $_POST['cpt_custom_post_type']['description'] ) );
     2142    $description = cptui_get_saved_description();
    21422143
    21432144    $name                  = trim( $data['cpt_custom_post_type']['name'] );
     
    25892590}
    25902591add_filter( 'enter_title_here', 'cptui_custom_enter_title_here', 10, 2 );
     2592
     2593/**
     2594 * Get saved description value with added nonce check for extra security.
     2595 *
     2596 * @since NEXT
     2597 *
     2598 * @return string
     2599 */
     2600function cptui_get_saved_description() {
     2601    if ( ! current_user_can( 'manage_options' ) ) {
     2602        return '';
     2603    }
     2604
     2605    if ( empty( $_POST['cpt_custom_post_type']['description'] ) ) {
     2606        return '';
     2607    }
     2608
     2609    if ( ! empty( $_POST['cptui_select_post_type_nonce_field'] ) ) {
     2610        check_admin_referer( 'cptui_select_post_type_nonce_action', 'cptui_select_post_type_nonce_field' );
     2611    }
     2612
     2613    return wp_kses_post( stripslashes_deep( $_POST['cpt_custom_post_type']['description'] ) );
     2614}
  • custom-post-type-ui/trunk/inc/taxonomies.php

    r3399912 r3412256  
    378378                                        true
    379379                                    ) ? esc_html__( '(WP Core)', 'custom-post-type-ui' ) : '';
    380                                     echo $ui->get_check_input( // phpcs:ignore.
     380                                    echo $ui->get_check_input( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    381381                                        [
    382                                             'checkvalue' => $post_type->name,
     382                                            'checkvalue' => esc_attr( $post_type->name ),
    383383                                            'checked'    => ( ! empty( $current['object_types'] ) && is_array( $current['object_types'] ) && in_array( $post_type->name, $current['object_types'], true ) ) ? 'true' : 'false', // phpcs:ignore.
    384384                                            'name'       => esc_attr( $post_type->name ),
  • custom-post-type-ui/trunk/inc/tools-sections/tools-debug.php

    r2887675 r3412256  
    2323        if ( wp_verify_nonce( 'cptui_debuginfo_nonce_field', 'cptui_debuginfo_nonce_action' ) ) {
    2424            $email_args          = [];
    25             $email_args['email'] = sanitize_text_field( $_POST['cptui_debug_info_email'] );
     25            $email_args['email'] = sanitize_text_field( wp_unslash( $_POST['cptui_debug_info_email'] ) );
    2626            $debuginfo->send_email( $email_args );
    2727        }
  • custom-post-type-ui/trunk/inc/tools-sections/tools-get-code.php

    r2781658 r3412256  
    3232                <?php
    3333                $type = ! empty( $post_type['label'] ) ? esc_html( $post_type['label'] ) : esc_html( $post_type['name'] );
     34                // translators: placeholder will hold post type name.
    3435                printf( esc_html__( '%s Post Type', 'custom-post-type-ui' ), esc_html( $type ) ); ?></h2>
    3536            <p>
     
    5758                <?php
    5859                $tax = ! empty( $taxonomy['label'] ) ? esc_html( $taxonomy['label'] ) : esc_html( $taxonomy['name'] );
     60                // translators: placeholder will hold taxonomy name.
    5961                printf( esc_html__( '%s Taxonomy', 'custom-post-type-ui' ), esc_html( $tax ) );
    6062                ?>
  • custom-post-type-ui/trunk/inc/tools-sections/tools-post-types.php

    r3278325 r3412256  
    3333            }
    3434        }
    35 ?>
    36 
     35        ob_start();
     36        ?>
    3737function <?php echo esc_html( $callback ); ?>() {
    3838<?php
    3939// Space before this line reflects in textarea.
    4040        foreach ( $cptui_post_types as $type ) {
    41             echo cptui_get_single_post_type_registery( $type );
     41            cptui_get_single_post_type_registery( $type );
    4242        }
    4343?>
     
    4949        esc_html_e( 'No post types to display at this time', 'custom-post-type-ui' );
    5050    }
     51    echo esc_html( trim( ob_get_clean() ) );
    5152}
    5253
     
    195196
    196197    /**
    197      * Post Type: <?php echo $post_type['label']; ?>.
     198     * Post Type: <?php echo esc_html( $post_type['label'] ); ?>.
    198199     */
    199200
    200201    $labels = [
    201         "name" => esc_html__( "<?php echo $post_type['label']; ?>", "<?php echo $textdomain; ?>" ),
    202         "singular_name" => esc_html__( "<?php echo $post_type['singular_label']; ?>", "<?php echo $textdomain; ?>" ),
     202        "name" => esc_html__( "<?php echo esc_html( $post_type['label'] ); ?>", "<?php echo esc_html( $textdomain ); ?>" ),
     203        "singular_name" => esc_html__( "<?php echo esc_html( $post_type['singular_label'] ); ?>", "<?php echo esc_html( $textdomain ); ?>" ),
    203204<?php
    204205    foreach ( $post_type['labels'] as $key => $label ) {
     
    206207            if ( 'parent' === $key && ! array_key_exists( 'parent_item_colon', $post_type['labels'] ) ) {
    207208                // Fix for incorrect label key. See #439.
    208                 echo "\t\t" . '"' . 'parent_item_colon' . '" => esc_html__( "' . $label . '", "' . $textdomain . '" ),' . "\n";
     209                echo "\t\t" . '"' . 'parent_item_colon' . '" => esc_html__( "' . esc_html( $label ) . '", "' . esc_html( $textdomain ) . '" ),' . "\n";
    209210            } else {
    210                 echo "\t\t" . '"' . $key . '" => esc_html__( "' . $label . '", "' . $textdomain . '" ),' . "\n";
     211                echo "\t\t" . '"' . esc_html( $key ) . '" => esc_html__( "' . esc_html( $label ) . '", "' . esc_html( $textdomain ) . '" ),' . "\n";
    211212            }
    212213        }
     
    216217
    217218    $args = [
    218         "label" => esc_html__( "<?php echo $post_type['label']; ?>", "<?php echo $textdomain; ?>" ),
     219        "label" => esc_html__( "<?php echo esc_html( $post_type['label'] ); ?>", "<?php echo esc_html( $textdomain ); ?>" ),
    219220        "labels" => $labels,
    220         "description" => "<?php echo $post_type['description']; ?>",
    221         "public" => <?php echo disp_boolean( $post_type['public'] ); ?>,
    222         "publicly_queryable" => <?php echo disp_boolean( $post_type['publicly_queryable'] ); ?>,
    223         "show_ui" => <?php echo disp_boolean( $post_type['show_ui'] ); ?>,
    224         "show_in_rest" => <?php echo disp_boolean( $post_type['show_in_rest'] ); ?>,
    225         "rest_base" => "<?php echo $post_type['rest_base']; ?>",
    226         "rest_controller_class" => "<?php echo $rest_controller_class; ?>",
    227         "rest_namespace" => "<?php echo $rest_namespace; ?>",
    228         "has_archive" => <?php echo $has_archive; ?>,
    229         "show_in_menu" => <?php echo $show_in_menu; ?>,
    230         "show_in_nav_menus" => <?php echo $show_in_nav_menus; ?>,
    231         "delete_with_user" => <?php echo $delete_with_user; ?>,
    232         "exclude_from_search" => <?php echo disp_boolean( $post_type['exclude_from_search'] ); ?>,
    233         "capability_type" => <?php echo $capability_type; ?>,
    234         "map_meta_cap" => <?php echo disp_boolean( $post_type['map_meta_cap'] ); ?>,
    235         "hierarchical" => <?php echo disp_boolean( $post_type['hierarchical'] ); ?>,
    236         "can_export" => <?php echo $can_export; ?>,
    237         "rewrite" => <?php echo $rewrite; ?>,
    238         "query_var" => <?php echo $post_type['query_var']; ?>,
     221        "description" => "<?php echo esc_html( $post_type['description'] ); ?>",
     222        "public" => <?php echo disp_boolean( esc_html( $post_type['public'] ) ); ?>,
     223        "publicly_queryable" => <?php echo disp_boolean( esc_html( $post_type['publicly_queryable'] ) ); ?>,
     224        "show_ui" => <?php echo disp_boolean( esc_html( $post_type['show_ui'] ) ); ?>,
     225        "show_in_rest" => <?php echo disp_boolean( esc_html( $post_type['show_in_rest'] ) ); ?>,
     226        "rest_base" => "<?php echo esc_html( $post_type['rest_base'] ); ?>",
     227        "rest_controller_class" => "<?php echo esc_html( $rest_controller_class ); ?>",
     228        "rest_namespace" => "<?php echo esc_html( $rest_namespace ); ?>",
     229        "has_archive" => <?php echo esc_html( $has_archive ); ?>,
     230        "show_in_menu" => <?php echo esc_html( $show_in_menu ); ?>,
     231        "show_in_nav_menus" => <?php echo esc_html( $show_in_nav_menus ); ?>,
     232        "delete_with_user" => <?php echo esc_html( $delete_with_user ); ?>,
     233        "exclude_from_search" => <?php echo disp_boolean( esc_html( $post_type['exclude_from_search'] ) ); ?>,
     234        "capability_type" => <?php echo esc_html( $capability_type ); ?>,
     235        "map_meta_cap" => <?php echo disp_boolean( esc_html( $post_type['map_meta_cap'] ) ); ?>,
     236        "hierarchical" => <?php echo disp_boolean( esc_html( $post_type['hierarchical'] ) ); ?>,
     237        "can_export" => <?php echo esc_html( $can_export ); ?>,
     238        "rewrite" => <?php echo esc_html( $rewrite ); ?>,
     239        "query_var" => <?php echo esc_html( $post_type['query_var'] ); ?>,
    239240<?php if ( ! empty( $post_type['menu_position'] ) ) { ?>
    240         "menu_position" => <?php echo $post_type['menu_position']; ?>,
     241        "menu_position" => <?php echo esc_html( $post_type['menu_position'] ); ?>,
    241242<?php } ?>
    242243<?php if ( ! empty( $post_type['menu_icon'] ) ) { ?>
    243         "menu_icon" => "<?php echo $post_type['menu_icon']; ?>",
     244        "menu_icon" => "<?php echo esc_html( $post_type['menu_icon'] ); ?>",
    244245<?php } ?>
    245246<?php if ( ! empty( $post_type['register_meta_box_cb'] ) ) { ?>
    246         "register_meta_box_cb" => "<?php echo $post_type['register_meta_box_cb']; ?>",
     247        "register_meta_box_cb" => "<?php echo esc_html( $post_type['register_meta_box_cb'] ); ?>",
    247248<?php } ?>
    248249<?php if ( ! empty( $supports ) ) { ?>
    249         "supports" => <?php echo $supports; ?>,
     250        "supports" => <?php echo esc_html( $supports ); ?>,
    250251<?php } ?>
    251252<?php if ( ! empty( $taxonomies ) ) { ?>
    252         "taxonomies" => <?php echo $taxonomies; ?>,
     253        "taxonomies" => <?php echo esc_html( $taxonomies ); ?>,
    253254<?php } ?>
    254255<?php if ( true === $yarpp ) { ?>
    255         "yarpp_support" => <?php echo disp_boolean( $yarpp ); ?>,
     256        "yarpp_support" => <?php echo disp_boolean( esc_html( $yarpp ) ); ?>,
    256257<?php } ?>
    257258<?php if ( $show_graphql ) : ?>
    258         "show_in_graphql" => <?php echo disp_boolean( $post_type['show_in_graphql'] ); ?>,
     259        "show_in_graphql" => <?php echo disp_boolean( esc_html( $post_type['show_in_graphql'] ) ); ?>,
    259260        "graphql_single_name" => "<?php echo esc_html( $post_type['graphql_single_name'] ); ?>",
    260261        "graphql_plural_name" => "<?php echo esc_html( $post_type['graphql_plural_name'] ); ?>",
     
    264265    ];
    265266
    266     register_post_type( "<?php echo esc_html( $post_type['name'] ); ?>", $args );
    267 <?php
    268 }
     267    register_post_type( "<?php echo esc_html( esc_html( $post_type['name'] ) ); ?>", $args );
     268<?php
     269}
  • custom-post-type-ui/trunk/inc/tools-sections/tools-taxonomies.php

    r3278325 r3412256  
    3838<?php
    3939    foreach ( $cptui_taxonomies as $tax ) {
    40         echo cptui_get_single_taxonomy_registery( $tax );
     40        cptui_get_single_taxonomy_registery( $tax );
    4141    }
    4242?>
     
    4747        esc_html_e( 'No taxonomies to display at this time', 'custom-post-type-ui' );
    4848    }
    49     echo trim( ob_get_clean() );
     49    echo esc_html( trim( ob_get_clean() ) );
    5050}
    5151
     
    164164
    165165    $args = [
    166         "label" => esc_html__( "<?php echo $taxonomy['label']; ?>", "<?php echo $textdomain; ?>" ),
     166        "label" => esc_html__( "<?php echo esc_html( $taxonomy['label'] ); ?>", "<?php echo esc_html( $textdomain ); ?>" ),
    167167        "labels" => $labels,
    168         "public" => <?php echo $public; ?>,
    169         "publicly_queryable" => <?php echo $publicly_queryable; ?>,
    170         "hierarchical" => <?php echo $taxonomy['hierarchical']; ?>,
    171         "show_ui" => <?php echo disp_boolean( $taxonomy['show_ui'] ); ?>,
    172         "show_in_menu" => <?php echo $show_in_menu; ?>,
    173         "show_in_nav_menus" => <?php echo $show_in_nav_menus; ?>,
    174         "query_var" => <?php echo disp_boolean( $taxonomy['query_var'] ); ?>,
    175         "rewrite" => <?php echo $rewrite; ?>,
    176         "show_admin_column" => <?php echo $taxonomy['show_admin_column']; ?>,
    177         "show_in_rest" => <?php echo $show_in_rest; ?>,
    178         "show_tagcloud" => <?php echo $show_tagcloud; ?>,
    179         "rest_base" => "<?php echo $rest_base; ?>",
    180         "rest_controller_class" => "<?php echo $rest_controller_class; ?>",
    181         "rest_namespace" => "<?php echo $rest_namespace; ?>",
    182         "show_in_quick_edit" => <?php echo $show_in_quick_edit; ?>,
    183         "sort" => <?php echo $sort; ?>,
     168        "public" => <?php echo esc_html( $public ); ?>,
     169        "publicly_queryable" => <?php echo esc_html( $publicly_queryable ); ?>,
     170        "hierarchical" => <?php echo esc_html( $taxonomy['hierarchical'] ); ?>,
     171        "show_ui" => <?php echo disp_boolean( esc_html( $taxonomy['show_ui'] ) ); ?>,
     172        "show_in_menu" => <?php echo esc_html( $show_in_menu ); ?>,
     173        "show_in_nav_menus" => <?php echo esc_html( $show_in_nav_menus ); ?>,
     174        "query_var" => <?php echo disp_boolean( esc_html( $taxonomy['query_var'] ) ); ?>,
     175        "rewrite" => <?php echo esc_html( $rewrite ); ?>,
     176        "show_admin_column" => <?php echo esc_html( $taxonomy['show_admin_column'] ); ?>,
     177        "show_in_rest" => <?php echo esc_html( $show_in_rest ); ?>,
     178        "show_tagcloud" => <?php echo esc_html( $show_tagcloud ); ?>,
     179        "rest_base" => "<?php echo esc_html( $rest_base ); ?>",
     180        "rest_controller_class" => "<?php echo esc_html( $rest_controller_class ); ?>",
     181        "rest_namespace" => "<?php echo esc_html( $rest_namespace ); ?>",
     182        "show_in_quick_edit" => <?php echo esc_html( $show_in_quick_edit ); ?>,
     183        "sort" => <?php echo esc_html( $sort ); ?>,
    184184<?php if ( $show_graphql ) : ?>
    185         "show_in_graphql" => <?php echo disp_boolean( $taxonomy['show_in_graphql'] ); ?>,
     185        "show_in_graphql" => <?php echo disp_boolean( esc_html( $taxonomy['show_in_graphql'] ) ); ?>,
    186186        "graphql_single_name" => "<?php echo esc_html( $taxonomy['graphql_single_name'] ); ?>",
    187187        "graphql_plural_name" => "<?php echo esc_html( $taxonomy['graphql_plural_name'] ); ?>",
    188188<?php else: ?>
    189         "show_in_graphql" => <?php echo disp_boolean( false ); ?>,
     189        "show_in_graphql" => <?php echo esc_html( disp_boolean( false ) ); ?>,
    190190<?php endif; ?>
    191191<?php if ( ! empty( $meta_box_cb ) ) { ?>
    192         "meta_box_cb" => <?php echo $meta_box_cb; ?>,
     192        "meta_box_cb" => <?php echo esc_html( $meta_box_cb ); ?>,
    193193<?php } ?>
    194194<?php if ( ! empty( $default_term ) ) { ?>
    195         "default_term" => <?php echo $default_term; ?>,
     195        "default_term" => <?php echo esc_html( $default_term ); ?>,
    196196<?php } ?>
    197197    ];
    198     register_taxonomy( "<?php echo esc_html( $taxonomy['name'] ); ?>", <?php echo $post_types; ?>, $args );
    199 <?php
    200 }
     198    register_taxonomy( "<?php echo esc_html( $taxonomy['name'] ); ?>", <?php echo esc_html( $post_types ); ?>, $args );
     199<?php
     200}
  • custom-post-type-ui/trunk/readme.txt

    r3399912 r3412256  
    44Tags: custom post types, post type, taxonomy, content types, types
    55Requires at least: 6.6
    6 Tested up to: 6.8.2
    7 Stable tag: 1.18.1
     6Tested up to: 6.9
     7Stable tag: 1.18.2
    88License: GPL-2.0+
    99Requires PHP: 7.4
     
    3232
    3333== Changelog ==
     34
     35= 1.18.2 - 2025-12-05 =
     36* Fixed: Security issue around Get Code functionality.
     37* Fixed: Potential security issue around post type descriptions.
     38* Updated: various internationalization details.
    3439
    3540= 1.18.1 - 2025-11-20 =
     
    8994
    9095= 1.18.1 =
    91 Security fixes, javascript touchups, CPTUI about screen cleanup.
     96Security fixes, internationalization details.
    9297
    9398== Installation ==
Note: See TracChangeset for help on using the changeset viewer.