Changeset 3412256
- Timestamp:
- 12/05/2025 02:12:54 PM (9 days ago)
- Location:
- custom-post-type-ui
- Files:
-
- 47 added
- 9 edited
-
tags/1.18.2 (added)
-
tags/1.18.2/LICENSE (added)
-
tags/1.18.2/build (added)
-
tags/1.18.2/build/cptui-styles.css (added)
-
tags/1.18.2/build/cptui-styles.css.map (added)
-
tags/1.18.2/build/cptui-styles.min.css (added)
-
tags/1.18.2/build/cptui-styles.min.css.map (added)
-
tags/1.18.2/build/cptui.asset.php (added)
-
tags/1.18.2/build/cptui.js (added)
-
tags/1.18.2/build/cptui.js.map (added)
-
tags/1.18.2/build/cptui.min.js (added)
-
tags/1.18.2/build/cptui.min.js.map (added)
-
tags/1.18.2/build/dashiconsPicker.asset.php (added)
-
tags/1.18.2/build/dashiconsPicker.js (added)
-
tags/1.18.2/build/dashiconsPicker.js.map (added)
-
tags/1.18.2/build/dashiconsPicker.min.js (added)
-
tags/1.18.2/build/dashiconsPicker.min.js.map (added)
-
tags/1.18.2/classes (added)
-
tags/1.18.2/classes/class.cptui_admin_ui.php (added)
-
tags/1.18.2/classes/class.cptui_debug_info.php (added)
-
tags/1.18.2/custom-post-type-ui.php (added)
-
tags/1.18.2/external (added)
-
tags/1.18.2/external/wpgraphql.php (added)
-
tags/1.18.2/images (added)
-
tags/1.18.2/images/cptui-icon-173x173.png (added)
-
tags/1.18.2/images/wds_ads (added)
-
tags/1.18.2/images/wds_ads/buddypages.png (added)
-
tags/1.18.2/images/wds_ads/cptui-extended.png (added)
-
tags/1.18.2/images/wds_ads/themeswitcher-pro.png (added)
-
tags/1.18.2/images/wds_ads/wp-search-with-algolia-pro.png (added)
-
tags/1.18.2/inc (added)
-
tags/1.18.2/inc/about.php (added)
-
tags/1.18.2/inc/listings.php (added)
-
tags/1.18.2/inc/post-types.php (added)
-
tags/1.18.2/inc/support.php (added)
-
tags/1.18.2/inc/taxonomies.php (added)
-
tags/1.18.2/inc/tools-sections (added)
-
tags/1.18.2/inc/tools-sections/tools-debug.php (added)
-
tags/1.18.2/inc/tools-sections/tools-get-code.php (added)
-
tags/1.18.2/inc/tools-sections/tools-post-types.php (added)
-
tags/1.18.2/inc/tools-sections/tools-taxonomies.php (added)
-
tags/1.18.2/inc/tools.php (added)
-
tags/1.18.2/inc/utility.php (added)
-
tags/1.18.2/inc/wp-cli.php (added)
-
tags/1.18.2/readme.txt (added)
-
tags/1.18.2/wordfence-vendor.txt (added)
-
tags/1.18.2/wpml-config.xml (added)
-
trunk/custom-post-type-ui.php (modified) (7 diffs)
-
trunk/external/wpgraphql.php (modified) (6 diffs)
-
trunk/inc/post-types.php (modified) (7 diffs)
-
trunk/inc/taxonomies.php (modified) (1 diff)
-
trunk/inc/tools-sections/tools-debug.php (modified) (1 diff)
-
trunk/inc/tools-sections/tools-get-code.php (modified) (2 diffs)
-
trunk/inc/tools-sections/tools-post-types.php (modified) (6 diffs)
-
trunk/inc/tools-sections/tools-taxonomies.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-post-type-ui/trunk/custom-post-type-ui.php
r3399912 r3412256 17 17 * Description: Admin UI panel for registering custom post types and taxonomies 18 18 * Author: WebDevStudios 19 * Version: 1.18. 119 * Version: 1.18.2 20 20 * Author URI: https://webdevstudios.com/ 21 21 * Text Domain: custom-post-type-ui 22 * Domain Path: /languages23 22 * License: GPL-2.0+ 24 23 * Requires at least: 6.6 … … 34 33 } 35 34 36 define( 'CPT_VERSION', '1.18. 1' ); // Left for legacy purposes.37 define( 'CPTUI_VERSION', '1.18. 1' );35 define( 'CPT_VERSION', '1.18.2' ); // Left for legacy purposes. 36 define( 'CPTUI_VERSION', '1.18.2' ); 38 37 define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) ); 39 38 … … 110 109 } 111 110 register_deactivation_hook( __FILE__, 'cptui_deactivation' ); 112 113 /**114 * Register our text domain.115 *116 * @since 0.8.0117 *118 * @internal119 */120 function cptui_load_textdomain() {121 load_plugin_textdomain( 'custom-post-type-ui' );122 }123 add_action( 'init', 'cptui_load_textdomain' );124 111 125 112 /** … … 936 923 if ( 'add' === $action ) { 937 924 if ( $success ) { 925 // translators: placeholder holds content name. 938 926 $message .= sprintf( esc_html__( '%s has been successfully added', 'custom-post-type-ui' ), $object_type ); 939 927 } else { 928 // translators: placeholder holds content name. 940 929 $message .= sprintf( esc_html__( '%s has failed to be added', 'custom-post-type-ui' ), $object_type ); 941 930 } 942 931 } elseif ( 'update' === $action ) { 943 932 if ( $success ) { 933 // translators: placeholder holds content name. 944 934 $message .= sprintf( esc_html__( '%s has been successfully updated', 'custom-post-type-ui' ), $object_type ); 945 935 } else { 936 // translators: placeholder holds content name. 946 937 $message .= sprintf( esc_html__( '%s has failed to be updated', 'custom-post-type-ui' ), $object_type ); 947 938 } 948 939 } elseif ( 'delete' === $action ) { 949 940 if ( $success ) { 941 // translators: placeholder holds content name. 950 942 $message .= sprintf( esc_html__( '%s has been successfully deleted', 'custom-post-type-ui' ), $object_type ); 951 943 } else { 944 // translators: placeholder holds content name. 952 945 $message .= sprintf( esc_html__( '%s has failed to be deleted', 'custom-post-type-ui' ), $object_type ); 953 946 } 954 947 } elseif ( 'import' === $action ) { 955 948 if ( $success ) { 949 // translators: placeholder holds content name. 956 950 $message .= sprintf( esc_html__( '%s has been successfully imported', 'custom-post-type-ui' ), $object_type ); 957 951 } else { 952 // translators: placeholder holds content name. 958 953 $message .= sprintf( esc_html__( '%s has failed to be imported', 'custom-post-type-ui' ), $object_type ); 959 954 } … … 1040 1035 $preserved_labels = [ 1041 1036 'post_types' => [ 1037 // translators: placeholder holds content label. 1042 1038 'add_new_item' => sprintf( esc_html__( 'Add new %s', 'custom-post-type-ui' ), $singular ), 1039 // translators: placeholder holds content label. 1043 1040 'edit_item' => sprintf( esc_html__( 'Edit %s', 'custom-post-type-ui' ), $singular ), 1041 // translators: placeholder holds content label. 1044 1042 'new_item' => sprintf( esc_html__( 'New %s', 'custom-post-type-ui' ), $singular ), 1043 // translators: placeholder holds content label. 1045 1044 'view_item' => sprintf( esc_html__( 'View %s', 'custom-post-type-ui' ), $singular ), 1045 // translators: placeholder holds content label. 1046 1046 'view_items' => sprintf( esc_html__( 'View %s', 'custom-post-type-ui' ), $plural ), 1047 // translators: placeholder holds content label. 1047 1048 'all_items' => sprintf( esc_html__( 'All %s', 'custom-post-type-ui' ), $plural ), 1049 // translators: placeholder holds content label. 1048 1050 'search_items' => sprintf( esc_html__( 'Search %s', 'custom-post-type-ui' ), $plural ), 1051 // translators: placeholder holds content label. 1049 1052 'not_found' => sprintf( esc_html__( 'No %s found.', 'custom-post-type-ui' ), $plural ), 1053 // translators: placeholder holds content label. 1050 1054 'not_found_in_trash' => sprintf( esc_html__( 'No %s found in trash.', 'custom-post-type-ui' ), $plural ), 1051 1055 ], 1052 1056 'taxonomies' => [ 1057 // translators: placeholder holds content label. 1053 1058 'search_items' => sprintf( esc_html__( 'Search %s', 'custom-post-type-ui' ), $plural ), 1059 // translators: placeholder holds content label. 1054 1060 'popular_items' => sprintf( esc_html__( 'Popular %s', 'custom-post-type-ui' ), $plural ), 1061 // translators: placeholder holds content label. 1055 1062 'all_items' => sprintf( esc_html__( 'All %s', 'custom-post-type-ui' ), $plural ), 1063 // translators: placeholder holds content label. 1056 1064 'parent_item' => sprintf( esc_html__( 'Parent %s', 'custom-post-type-ui' ), $singular ), 1065 // translators: placeholder holds content label. 1057 1066 'parent_item_colon' => sprintf( esc_html__( 'Parent %s:', 'custom-post-type-ui' ), $singular ), 1067 // translators: placeholder holds content label. 1058 1068 'edit_item' => sprintf( esc_html__( 'Edit %s', 'custom-post-type-ui' ), $singular ), 1069 // translators: placeholder holds content label. 1059 1070 'update_item' => sprintf( esc_html__( 'Update %s', 'custom-post-type-ui' ), $singular ), 1071 // translators: placeholder holds content label. 1060 1072 'add_new_item' => sprintf( esc_html__( 'Add new %s', 'custom-post-type-ui' ), $singular ), 1073 // translators: placeholder holds content label. 1061 1074 'new_item_name' => sprintf( esc_html__( 'New %s name', 'custom-post-type-ui' ), $singular ), 1075 // translators: placeholder holds content label. 1062 1076 'separate_items_with_commas' => sprintf( esc_html__( 'Separate %s with commas', 'custom-post-type-ui' ), $plural ), 1077 // translators: placeholder holds content label. 1063 1078 'add_or_remove_items' => sprintf( esc_html__( 'Add or remove %s', 'custom-post-type-ui' ), $plural ), 1079 // translators: placeholder holds content label. 1064 1080 'choose_from_most_used' => sprintf( esc_html__( 'Choose from the most used %s', 'custom-post-type-ui' ), $plural ), 1065 1081 ], … … 1082 1098 'post_types' => [ 1083 1099 'singular' => [ 1100 // translators: placeholder holds content label. 1084 1101 'add_new_item' => esc_html__( 'Add new %s', 'custom-post-type-ui' ), 1102 // translators: placeholder holds content label. 1085 1103 'edit_item' => esc_html__( 'Edit %s', 'custom-post-type-ui' ), 1104 // translators: placeholder holds content label. 1086 1105 'new_item' => esc_html__( 'New %s', 'custom-post-type-ui' ), 1106 // translators: placeholder holds content label. 1087 1107 'view_item' => esc_html__( 'View %s', 'custom-post-type-ui' ), 1108 // translators: placeholder holds content label. 1088 1109 'template_name' => esc_html__( 'Single item: %s', 'custom-post-type-ui' ), 1089 1110 ], 1090 1111 'plural' => [ 1112 // translators: placeholder holds content label. 1091 1113 'view_items' => esc_html__( 'View %s', 'custom-post-type-ui' ), 1114 // translators: placeholder holds content label. 1092 1115 'all_items' => esc_html__( 'All %s', 'custom-post-type-ui' ), 1116 // translators: placeholder holds content label. 1093 1117 'search_items' => esc_html__( 'Search %s', 'custom-post-type-ui' ), 1118 // translators: placeholder holds content label. 1094 1119 'not_found' => esc_html__( 'No %s found.', 'custom-post-type-ui' ), 1120 // translators: placeholder holds content label. 1095 1121 'not_found_in_trash' => esc_html__( 'No %s found in trash.', 'custom-post-type-ui' ), 1096 1122 ], … … 1098 1124 'taxonomies' => [ 1099 1125 'singular' => [ 1126 // translators: placeholder holds content label. 1100 1127 'parent_item' => esc_html__( 'Parent %s', 'custom-post-type-ui' ), 1128 // translators: placeholder holds content label. 1101 1129 'parent_item_colon' => esc_html__( 'Parent %s:', 'custom-post-type-ui' ), 1130 // translators: placeholder holds content label. 1102 1131 'edit_item' => esc_html__( 'Edit %s', 'custom-post-type-ui' ), 1132 // translators: placeholder holds content label. 1103 1133 'update_item' => esc_html__( 'Update %s', 'custom-post-type-ui' ), 1134 // translators: placeholder holds content label. 1104 1135 'add_new_item' => esc_html__( 'Add new %s', 'custom-post-type-ui' ), 1136 // translators: placeholder holds content label. 1105 1137 'new_item_name' => esc_html__( 'New %s name', 'custom-post-type-ui' ), 1138 // translators: placeholder holds content label. 1106 1139 'template_name' => esc_html__( '%s Archives', 'custom-post-type-ui' ), 1107 1140 ], 1108 1141 'plural' => [ 1142 // translators: placeholder holds content label. 1109 1143 'search_items' => esc_html__( 'Search %s', 'custom-post-type-ui' ), 1144 // translators: placeholder holds content label. 1110 1145 'popular_items' => esc_html__( 'Popular %s', 'custom-post-type-ui' ), 1146 // translators: placeholder holds content label. 1111 1147 'all_items' => esc_html__( 'All %s', 'custom-post-type-ui' ), 1148 // translators: placeholder holds content label. 1112 1149 'separate_items_with_commas' => esc_html__( 'Separate %s with commas', 'custom-post-type-ui' ), 1150 // translators: placeholder holds content label. 1113 1151 'add_or_remove_items' => esc_html__( 'Add or remove %s', 'custom-post-type-ui' ), 1152 // translators: placeholder holds content label. 1114 1153 'choose_from_most_used' => esc_html__( 'Choose from the most used %s', 'custom-post-type-ui' ), 1115 1154 ], -
custom-post-type-ui/trunk/external/wpgraphql.php
r2781658 r3412256 189 189 190 190 <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> 192 192 </h2> 193 193 <div class="handle-actions hide-if-no-js"> 194 194 <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> 196 196 <span class="toggle-indicator" aria-hidden="true"></span> 197 197 </button> … … 207 207 [ 208 208 'attr' => '0', 209 'text' => esc_attr__( 'False', ' wp-graphql-custom-post-type-ui' ),209 'text' => esc_attr__( 'False', 'custom-post-type-ui' ), 210 210 ], 211 211 [ 212 212 'attr' => '1', 213 'text' => esc_attr__( 'True', ' wp-graphql-custom-post-type-ui' ),213 'text' => esc_attr__( 'True', 'custom-post-type-ui' ), 214 214 ], 215 215 ], … … 221 221 echo $ui->get_select_input( // phpcs:ignore. 222 222 [ 223 'namearray' => $name_array,223 'namearray' => esc_attr( $name_array ), 224 224 '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' ), 227 227 'selections' => $selections, // phpcs:ignore. 228 228 'default' => false, … … 233 233 echo $ui->get_text_input( // phpcs:ignore. 234 234 [ 235 'namearray' => $name_array,235 'namearray' => esc_attr( $name_array ), 236 236 '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' ), 239 239 'textvalue' => ( isset( $current['graphql_single_name'] ) ) ? esc_attr( $current['graphql_single_name'] ) : '', // phpcs:ignore. 240 240 'required' => true, … … 244 244 echo $ui->get_text_input( // phpcs:ignore. 245 245 [ 246 'namearray' => $name_array,246 'namearray' => esc_attr( $name_array ), 247 247 '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' ), 250 250 'textvalue' => ( isset( $current['graphql_plural_name'] ) ) ? esc_attr( $current['graphql_plural_name'] ) : '', // phpcs:ignore. 251 251 'required' => true, … … 338 338 echo sprintf( 339 339 // phpcs:ignore. 340 esc_html__( 'Custom Post Type UI has native support for WPGraphQL. Please <a href="%s">de-activ e</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 ) 342 342 ); 343 343 ?> -
custom-post-type-ui/trunk/inc/post-types.php
r3399912 r3412256 780 780 ); 781 781 782 echo $ui->get_text_input( // phpcs:ignore. Z782 echo $ui->get_text_input( // phpcs:ignore. 783 783 [ 784 784 'labeltext' => esc_html__( 'Attributes', 'custom-post-type-ui' ), … … 1233 1233 echo $ui->get_label( 'hierarchical', esc_html__( 'Hierarchical', 'custom-post-type-ui' ) ); // phpcs:ignore. 1234 1234 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. 1236 1236 1237 1237 $select = [ … … 1456 1456 'textvalue' => isset( $current['show_in_menu_string'] ) ? esc_attr( $current['show_in_menu_string'] ) : '', // phpcs:ignore. 1457 1457 '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. 1458 1459 'helptext_after' => true, 1459 1460 'wrap' => false, … … 1523 1524 echo $ui->get_p( esc_html__( 'Featured images and Post Formats need theme support added, to be used.', 'custom-post-type-ui' ) ); // phpcs:ignore. 1524 1525 1525 echo $ui->get_p( 1526 echo $ui->get_p( // phpcs:ignore. 1526 1527 sprintf( 1527 1528 '<a href="%s" target="_blank">%s</a><br/><a href="%s" target="_blank">%s</a>', … … 1769 1770 'namearray' => 'cpt_addon_taxes', 1770 1771 'textvalue' => esc_attr( $add_tax->name ), 1771 'labeltext' => $add_tax->label . ' ' . $core_label,1772 'labeltext' => esc_html( $add_tax->label . ' ' . $core_label ), 1772 1773 // phpcs:ignore. 1773 1774 'helptext' => sprintf( esc_attr__( 'Adds %s support', 'custom-post-type-ui' ), $add_tax->label ), … … 2139 2140 // in the cptui_filtered_post_type_post_global() function. So we clean this up from the $_POST 2140 2141 // global afterwards here. 2141 $description = wp_kses_post( stripslashes_deep( $_POST['cpt_custom_post_type']['description'] ));2142 $description = cptui_get_saved_description(); 2142 2143 2143 2144 $name = trim( $data['cpt_custom_post_type']['name'] ); … … 2589 2590 } 2590 2591 add_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 */ 2600 function 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 378 378 true 379 379 ) ? 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 381 381 [ 382 'checkvalue' => $post_type->name,382 'checkvalue' => esc_attr( $post_type->name ), 383 383 'checked' => ( ! empty( $current['object_types'] ) && is_array( $current['object_types'] ) && in_array( $post_type->name, $current['object_types'], true ) ) ? 'true' : 'false', // phpcs:ignore. 384 384 'name' => esc_attr( $post_type->name ), -
custom-post-type-ui/trunk/inc/tools-sections/tools-debug.php
r2887675 r3412256 23 23 if ( wp_verify_nonce( 'cptui_debuginfo_nonce_field', 'cptui_debuginfo_nonce_action' ) ) { 24 24 $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'] ) ); 26 26 $debuginfo->send_email( $email_args ); 27 27 } -
custom-post-type-ui/trunk/inc/tools-sections/tools-get-code.php
r2781658 r3412256 32 32 <?php 33 33 $type = ! empty( $post_type['label'] ) ? esc_html( $post_type['label'] ) : esc_html( $post_type['name'] ); 34 // translators: placeholder will hold post type name. 34 35 printf( esc_html__( '%s Post Type', 'custom-post-type-ui' ), esc_html( $type ) ); ?></h2> 35 36 <p> … … 57 58 <?php 58 59 $tax = ! empty( $taxonomy['label'] ) ? esc_html( $taxonomy['label'] ) : esc_html( $taxonomy['name'] ); 60 // translators: placeholder will hold taxonomy name. 59 61 printf( esc_html__( '%s Taxonomy', 'custom-post-type-ui' ), esc_html( $tax ) ); 60 62 ?> -
custom-post-type-ui/trunk/inc/tools-sections/tools-post-types.php
r3278325 r3412256 33 33 } 34 34 } 35 ?> 36 35 ob_start(); 36 ?> 37 37 function <?php echo esc_html( $callback ); ?>() { 38 38 <?php 39 39 // Space before this line reflects in textarea. 40 40 foreach ( $cptui_post_types as $type ) { 41 echocptui_get_single_post_type_registery( $type );41 cptui_get_single_post_type_registery( $type ); 42 42 } 43 43 ?> … … 49 49 esc_html_e( 'No post types to display at this time', 'custom-post-type-ui' ); 50 50 } 51 echo esc_html( trim( ob_get_clean() ) ); 51 52 } 52 53 … … 195 196 196 197 /** 197 * Post Type: <?php echo $post_type['label']; ?>.198 * Post Type: <?php echo esc_html( $post_type['label'] ); ?>. 198 199 */ 199 200 200 201 $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 ); ?>" ), 203 204 <?php 204 205 foreach ( $post_type['labels'] as $key => $label ) { … … 206 207 if ( 'parent' === $key && ! array_key_exists( 'parent_item_colon', $post_type['labels'] ) ) { 207 208 // 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"; 209 210 } 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"; 211 212 } 212 213 } … … 216 217 217 218 $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 ); ?>" ), 219 220 "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'] ); ?>, 239 240 <?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'] ); ?>, 241 242 <?php } ?> 242 243 <?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'] ); ?>", 244 245 <?php } ?> 245 246 <?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'] ); ?>", 247 248 <?php } ?> 248 249 <?php if ( ! empty( $supports ) ) { ?> 249 "supports" => <?php echo $supports; ?>,250 "supports" => <?php echo esc_html( $supports ); ?>, 250 251 <?php } ?> 251 252 <?php if ( ! empty( $taxonomies ) ) { ?> 252 "taxonomies" => <?php echo $taxonomies; ?>,253 "taxonomies" => <?php echo esc_html( $taxonomies ); ?>, 253 254 <?php } ?> 254 255 <?php if ( true === $yarpp ) { ?> 255 "yarpp_support" => <?php echo disp_boolean( $yarpp); ?>,256 "yarpp_support" => <?php echo disp_boolean( esc_html( $yarpp ) ); ?>, 256 257 <?php } ?> 257 258 <?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'] ) ); ?>, 259 260 "graphql_single_name" => "<?php echo esc_html( $post_type['graphql_single_name'] ); ?>", 260 261 "graphql_plural_name" => "<?php echo esc_html( $post_type['graphql_plural_name'] ); ?>", … … 264 265 ]; 265 266 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 38 38 <?php 39 39 foreach ( $cptui_taxonomies as $tax ) { 40 echocptui_get_single_taxonomy_registery( $tax );40 cptui_get_single_taxonomy_registery( $tax ); 41 41 } 42 42 ?> … … 47 47 esc_html_e( 'No taxonomies to display at this time', 'custom-post-type-ui' ); 48 48 } 49 echo trim( ob_get_clean() );49 echo esc_html( trim( ob_get_clean() ) ); 50 50 } 51 51 … … 164 164 165 165 $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 ); ?>" ), 167 167 "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 ); ?>, 184 184 <?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'] ) ); ?>, 186 186 "graphql_single_name" => "<?php echo esc_html( $taxonomy['graphql_single_name'] ); ?>", 187 187 "graphql_plural_name" => "<?php echo esc_html( $taxonomy['graphql_plural_name'] ); ?>", 188 188 <?php else: ?> 189 "show_in_graphql" => <?php echo disp_boolean( false); ?>,189 "show_in_graphql" => <?php echo esc_html( disp_boolean( false ) ); ?>, 190 190 <?php endif; ?> 191 191 <?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 ); ?>, 193 193 <?php } ?> 194 194 <?php if ( ! empty( $default_term ) ) { ?> 195 "default_term" => <?php echo $default_term; ?>,195 "default_term" => <?php echo esc_html( $default_term ); ?>, 196 196 <?php } ?> 197 197 ]; 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 4 4 Tags: custom post types, post type, taxonomy, content types, types 5 5 Requires at least: 6.6 6 Tested up to: 6. 8.27 Stable tag: 1.18. 16 Tested up to: 6.9 7 Stable tag: 1.18.2 8 8 License: GPL-2.0+ 9 9 Requires PHP: 7.4 … … 32 32 33 33 == 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. 34 39 35 40 = 1.18.1 - 2025-11-20 = … … 89 94 90 95 = 1.18.1 = 91 Security fixes, javascript touchups, CPTUI about screen cleanup.96 Security fixes, internationalization details. 92 97 93 98 == Installation ==
Note: See TracChangeset
for help on using the changeset viewer.