Custom Post Type UI - Version 1.12.0

Version Description

  • 2022-05-09 =
  • Added: Tested on WordPress 6.0.
  • Added: Auto-check, but not force, "page-attributes" when setting a post type as hierarchical.
  • Added: "rest_namespace" parameters for both post types and taxonomies.
  • Added: "register_meta_box_cb" parameter for post types.
  • Fixed: undefined index notices for "can_export".
  • Updated: list of reserved taxonomy names with more that are considered reserved.
  • Updated: readme descriptions and screenshots.
Download this release

Release Info

Developer tw2113
Plugin Icon 128x128 Custom Post Type UI
Version 1.12.0
Comparing to
See all releases

Code changes from version 1.11.1 to 1.12.0

custom-post-type-ui.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
17
  * Description: Admin panel for creating custom post types and custom taxonomies in WordPress
18
  * Author: WebDevStudios
19
- * Version: 1.11.1
20
  * Author URI: https://webdevstudios.com/
21
  * Text Domain: custom-post-type-ui
22
  * Domain Path: /languages
@@ -30,8 +30,8 @@ if ( ! defined( 'ABSPATH' ) ) {
30
  exit;
31
  }
32
 
33
- define( 'CPT_VERSION', '1.11.1' ); // Left for legacy purposes.
34
- define( 'CPTUI_VERSION', '1.11.1' );
35
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
36
 
37
  /**
@@ -434,6 +434,7 @@ function cptui_register_single_post_type( $post_type = [] ) {
434
  }
435
 
436
  $menu_icon = ! empty( $post_type['menu_icon'] ) ? $post_type['menu_icon'] : null;
 
437
 
438
  if ( in_array( $post_type['query_var'], [ 'true', 'false', '0', '1' ], true ) ) {
439
  $post_type['query_var'] = get_disp_boolean( $post_type['query_var'] );
@@ -492,9 +493,14 @@ function cptui_register_single_post_type( $post_type = [] ) {
492
  $rest_controller_class = $post_type['rest_controller_class'];
493
  }
494
 
 
 
 
 
 
495
  $can_export = null;
496
  if ( ! empty( $post_type['can_export'] ) ) {
497
- $delete_with_user = get_disp_boolean( $post_type['can_export'] );
498
  }
499
 
500
  $args = [
@@ -510,6 +516,7 @@ function cptui_register_single_post_type( $post_type = [] ) {
510
  'show_in_rest' => get_disp_boolean( $post_type['show_in_rest'] ),
511
  'rest_base' => $rest_base,
512
  'rest_controller_class' => $rest_controller_class,
 
513
  'exclude_from_search' => $exclude_from_search,
514
  'capability_type' => $capability_type,
515
  'map_meta_cap' => $post_type['map_meta_cap'],
@@ -518,6 +525,7 @@ function cptui_register_single_post_type( $post_type = [] ) {
518
  'rewrite' => $rewrite,
519
  'menu_position' => $menu_position,
520
  'menu_icon' => $menu_icon,
 
521
  'query_var' => $post_type['query_var'],
522
  'supports' => $post_type['supports'],
523
  'taxonomies' => $post_type['taxonomies'],
@@ -717,6 +725,11 @@ function cptui_register_single_taxonomy( $taxonomy = [] ) {
717
  $rest_controller_class = $taxonomy['rest_controller_class'];
718
  }
719
 
 
 
 
 
 
720
  $meta_box_cb = null;
721
  if ( ! empty( $taxonomy['meta_box_cb'] ) ) {
722
  $meta_box_cb = ( false !== get_disp_boolean( $taxonomy['meta_box_cb'] ) ) ? $taxonomy['meta_box_cb'] : false;
@@ -752,6 +765,7 @@ function cptui_register_single_taxonomy( $taxonomy = [] ) {
752
  'show_in_rest' => $show_in_rest,
753
  'rest_base' => $rest_base,
754
  'rest_controller_class' => $rest_controller_class,
 
755
  'show_in_quick_edit' => $show_in_quick_edit,
756
  'sort' => $sort,
757
  'meta_box_cb' => $meta_box_cb,
16
  * Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
17
  * Description: Admin panel for creating custom post types and custom taxonomies in WordPress
18
  * Author: WebDevStudios
19
+ * Version: 1.12.0
20
  * Author URI: https://webdevstudios.com/
21
  * Text Domain: custom-post-type-ui
22
  * Domain Path: /languages
30
  exit;
31
  }
32
 
33
+ define( 'CPT_VERSION', '1.12.0' ); // Left for legacy purposes.
34
+ define( 'CPTUI_VERSION', '1.12.0' );
35
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
36
 
37
  /**
434
  }
435
 
436
  $menu_icon = ! empty( $post_type['menu_icon'] ) ? $post_type['menu_icon'] : null;
437
+ $register_meta_box_cb = ! empty( $post_type['register_meta_box_cb'] ) ? $post_type['register_meta_box_cb'] : null;
438
 
439
  if ( in_array( $post_type['query_var'], [ 'true', 'false', '0', '1' ], true ) ) {
440
  $post_type['query_var'] = get_disp_boolean( $post_type['query_var'] );
493
  $rest_controller_class = $post_type['rest_controller_class'];
494
  }
495
 
496
+ $rest_namespace = null;
497
+ if ( ! empty( $post_type['rest_namespace'] ) ) {
498
+ $rest_namespace = $post_type['rest_namespace'];
499
+ }
500
+
501
  $can_export = null;
502
  if ( ! empty( $post_type['can_export'] ) ) {
503
+ $can_export = get_disp_boolean( $post_type['can_export'] );
504
  }
505
 
506
  $args = [
516
  'show_in_rest' => get_disp_boolean( $post_type['show_in_rest'] ),
517
  'rest_base' => $rest_base,
518
  'rest_controller_class' => $rest_controller_class,
519
+ 'rest_namespace' => $rest_namespace,
520
  'exclude_from_search' => $exclude_from_search,
521
  'capability_type' => $capability_type,
522
  'map_meta_cap' => $post_type['map_meta_cap'],
525
  'rewrite' => $rewrite,
526
  'menu_position' => $menu_position,
527
  'menu_icon' => $menu_icon,
528
+ 'register_meta_box_cb' => $register_meta_box_cb,
529
  'query_var' => $post_type['query_var'],
530
  'supports' => $post_type['supports'],
531
  'taxonomies' => $post_type['taxonomies'],
725
  $rest_controller_class = $taxonomy['rest_controller_class'];
726
  }
727
 
728
+ $rest_namespace = null;
729
+ if ( ! empty( $taxonomy['rest_namespace'] ) ) {
730
+ $rest_namespace = $taxonomy['rest_namespace'];
731
+ }
732
+
733
  $meta_box_cb = null;
734
  if ( ! empty( $taxonomy['meta_box_cb'] ) ) {
735
  $meta_box_cb = ( false !== get_disp_boolean( $taxonomy['meta_box_cb'] ) ) ? $taxonomy['meta_box_cb'] : false;
765
  'show_in_rest' => $show_in_rest,
766
  'rest_base' => $rest_base,
767
  'rest_controller_class' => $rest_controller_class,
768
+ 'rest_namespace' => $rest_namespace,
769
  'show_in_quick_edit' => $show_in_quick_edit,
770
  'sort' => $sort,
771
  'meta_box_cb' => $meta_box_cb,
inc/about.php CHANGED
@@ -85,8 +85,10 @@ function cptui_settings() {
85
  <div class="changelog about-integrations">
86
  <div class="cptui-feature feature-section col three-col">
87
  <div class="col">
88
- <h2><?php esc_html_e( 'Dashicon Picker UI', 'custom-post-type-ui' ); ?></h2>
89
- <p><?php esc_html_e( 'You no longer have to know the Dashicon class values ahead of time or look them up in the WordPress Developer Documentation. We now provide a visual picker that shows them all for you. All you have to do is choose one.', 'custom-post-type-ui' ); ?></p>
 
 
90
  </div>
91
  </div>
92
  </div>
85
  <div class="changelog about-integrations">
86
  <div class="cptui-feature feature-section col three-col">
87
  <div class="col">
88
+ <h2><?php esc_html_e( 'Auto-selection of "page attributes" for post types', 'custom-post-type-ui' ); ?></h2>
89
+ <p><?php esc_html_e( 'When setting a post type to be hierarchical, you also want to make sure you have `page_attributes` selected in the "Supports" section to set hierarchy. We do not force this, if you want to still turn it off, but this helps prevent potentially missing this setting.', 'custom-post-type-ui' ); ?></p>
90
+ <h2><?php esc_html_e( 'More post type and taxonomy settings', 'custom-post-type-ui' ); ?></h2>
91
+ <p><?php esc_html_e( 'We have updated the available settings to include the `rest_namespace` field as well as `register_meta_box_cb` for post types.', 'custom-post-type-ui' ); ?></p>
92
  </div>
93
  </div>
94
  </div>
inc/post-types.php CHANGED
@@ -937,6 +937,14 @@ function cptui_manage_post_types() {
937
  'textvalue' => isset( $current['rest_controller_class'] ) ? esc_attr( $current['rest_controller_class'] ) : '',
938
  ] );
939
 
 
 
 
 
 
 
 
 
940
  echo $ui->get_tr_start() . $ui->get_th_start();
941
  echo $ui->get_label( 'has_archive', esc_html__( 'Has Archive', 'custom-post-type-ui' ) );
942
  echo $ui->get_p( esc_html__( 'If left blank, the archive slug will default to the post type slug.', 'custom-post-type-ui' ) );
@@ -1187,6 +1195,14 @@ function cptui_manage_post_types() {
1187
 
1188
  echo $ui->get_td_end() . $ui->get_tr_end();
1189
 
 
 
 
 
 
 
 
 
1190
  echo $ui->get_tr_start() . $ui->get_th_start() . esc_html__( 'Supports', 'custom-post-type-ui' );
1191
 
1192
  echo $ui->get_p( esc_html__( 'Add support for various available post editor features on the right. A checked value means the post type feature is supported.', 'custom-post-type-ui' ) );
@@ -1727,6 +1743,11 @@ function cptui_update_post_type( $data = [] ) {
1727
  $data['cpt_custom_post_type']['menu_icon'] = null;
1728
  }
1729
 
 
 
 
 
 
1730
  $label = ucwords( str_replace( '_', ' ', $data['cpt_custom_post_type']['name'] ) );
1731
  if ( ! empty( $data['cpt_custom_post_type']['label'] ) ) {
1732
  $label = str_replace( '"', '', htmlspecialchars_decode( $data['cpt_custom_post_type']['label'] ) );
@@ -1743,6 +1764,7 @@ function cptui_update_post_type( $data = [] ) {
1743
  $description = stripslashes_deep( $data['cpt_custom_post_type']['description'] );
1744
  $rest_base = trim( $data['cpt_custom_post_type']['rest_base'] );
1745
  $rest_controller_class = trim( $data['cpt_custom_post_type']['rest_controller_class'] );
 
1746
  $has_archive_string = trim( $data['cpt_custom_post_type']['has_archive_string'] );
1747
  $capability_type = trim( $data['cpt_custom_post_type']['capability_type'] );
1748
  $rewrite_slug = trim( $data['cpt_custom_post_type']['rewrite_slug'] );
@@ -1766,6 +1788,7 @@ function cptui_update_post_type( $data = [] ) {
1766
  'show_in_rest' => disp_boolean( $data['cpt_custom_post_type']['show_in_rest'] ),
1767
  'rest_base' => $rest_base,
1768
  'rest_controller_class' => $rest_controller_class,
 
1769
  'has_archive' => disp_boolean( $data['cpt_custom_post_type']['has_archive'] ),
1770
  'has_archive_string' => $has_archive_string,
1771
  'exclude_from_search' => disp_boolean( $data['cpt_custom_post_type']['exclude_from_search'] ),
@@ -1781,6 +1804,7 @@ function cptui_update_post_type( $data = [] ) {
1781
  'show_in_menu' => disp_boolean( $data['cpt_custom_post_type']['show_in_menu'] ),
1782
  'show_in_menu_string' => $show_in_menu_string,
1783
  'menu_icon' => $menu_icon,
 
1784
  'supports' => $data['cpt_supports'],
1785
  'taxonomies' => $data['cpt_addon_taxes'],
1786
  'labels' => $data['cpt_labels'],
937
  'textvalue' => isset( $current['rest_controller_class'] ) ? esc_attr( $current['rest_controller_class'] ) : '',
938
  ] );
939
 
940
+ echo $ui->get_text_input( [
941
+ 'namearray' => 'cpt_custom_post_type',
942
+ 'name' => 'rest_namespace',
943
+ 'labeltext' => esc_html__( 'REST API namespace', 'custom-post-type-ui' ),
944
+ 'aftertext' => esc_attr__( '(default: wp/v2) To change the namespace URL of REST API route.', 'custom-post-type-ui' ),
945
+ 'textvalue' => isset( $current['rest_namespace'] ) ? esc_attr( $current['rest_namespace'] ) : '',
946
+ ] );
947
+
948
  echo $ui->get_tr_start() . $ui->get_th_start();
949
  echo $ui->get_label( 'has_archive', esc_html__( 'Has Archive', 'custom-post-type-ui' ) );
950
  echo $ui->get_p( esc_html__( 'If left blank, the archive slug will default to the post type slug.', 'custom-post-type-ui' ) );
1195
 
1196
  echo $ui->get_td_end() . $ui->get_tr_end();
1197
 
1198
+ echo $ui->get_text_input( [
1199
+ 'namearray' => 'cpt_custom_post_type',
1200
+ 'name' => 'register_meta_box_cb',
1201
+ 'textvalue' => isset( $current['register_meta_box_cb'] ) ? esc_attr( $current['register_meta_box_cb'] ) : '',
1202
+ 'labeltext' => esc_html__( 'Metabox callback', 'custom-post-type-ui' ),
1203
+ 'helptext' => esc_html__( 'Provide a callback function that sets up the meta boxes for the edit form. Do `remove_meta_box()` and `add_meta_box()` calls in the callback. Default null.', 'custom-post-type-ui' ),
1204
+ ] );
1205
+
1206
  echo $ui->get_tr_start() . $ui->get_th_start() . esc_html__( 'Supports', 'custom-post-type-ui' );
1207
 
1208
  echo $ui->get_p( esc_html__( 'Add support for various available post editor features on the right. A checked value means the post type feature is supported.', 'custom-post-type-ui' ) );
1743
  $data['cpt_custom_post_type']['menu_icon'] = null;
1744
  }
1745
 
1746
+ $register_meta_box_cb = trim( $data['cpt_custom_post_type']['register_meta_box_cb'] );
1747
+ if ( empty( $register_meta_box_cb ) ) {
1748
+ $register_meta_box_cb = null;
1749
+ }
1750
+
1751
  $label = ucwords( str_replace( '_', ' ', $data['cpt_custom_post_type']['name'] ) );
1752
  if ( ! empty( $data['cpt_custom_post_type']['label'] ) ) {
1753
  $label = str_replace( '"', '', htmlspecialchars_decode( $data['cpt_custom_post_type']['label'] ) );
1764
  $description = stripslashes_deep( $data['cpt_custom_post_type']['description'] );
1765
  $rest_base = trim( $data['cpt_custom_post_type']['rest_base'] );
1766
  $rest_controller_class = trim( $data['cpt_custom_post_type']['rest_controller_class'] );
1767
+ $rest_namespace = trim( $data['cpt_custom_post_type']['rest_namespace'] );
1768
  $has_archive_string = trim( $data['cpt_custom_post_type']['has_archive_string'] );
1769
  $capability_type = trim( $data['cpt_custom_post_type']['capability_type'] );
1770
  $rewrite_slug = trim( $data['cpt_custom_post_type']['rewrite_slug'] );
1788
  'show_in_rest' => disp_boolean( $data['cpt_custom_post_type']['show_in_rest'] ),
1789
  'rest_base' => $rest_base,
1790
  'rest_controller_class' => $rest_controller_class,
1791
+ 'rest_namespace' => $rest_namespace,
1792
  'has_archive' => disp_boolean( $data['cpt_custom_post_type']['has_archive'] ),
1793
  'has_archive_string' => $has_archive_string,
1794
  'exclude_from_search' => disp_boolean( $data['cpt_custom_post_type']['exclude_from_search'] ),
1804
  'show_in_menu' => disp_boolean( $data['cpt_custom_post_type']['show_in_menu'] ),
1805
  'show_in_menu_string' => $show_in_menu_string,
1806
  'menu_icon' => $menu_icon,
1807
+ 'register_meta_box_cb' => $register_meta_box_cb,
1808
  'supports' => $data['cpt_supports'],
1809
  'taxonomies' => $data['cpt_addon_taxes'],
1810
  'labels' => $data['cpt_labels'],
inc/taxonomies.php CHANGED
@@ -1096,6 +1096,14 @@ function cptui_manage_taxonomies() {
1096
  'textvalue' => isset( $current['rest_controller_class'] ) ? esc_attr( $current['rest_controller_class'] ) : '',
1097
  ] );
1098
 
 
 
 
 
 
 
 
 
1099
  $select = [
1100
  'options' => [
1101
  [
@@ -1155,7 +1163,7 @@ function cptui_manage_taxonomies() {
1155
  ],
1156
  ],
1157
  ];
1158
- $selected = isset( $current ) ? disp_boolean( $current['sort'] ) : '';
1159
  $select['selected'] = ! empty( $selected ) ? $current['sort'] : '';
1160
  echo $ui->get_select_input( [
1161
  'namearray' => 'cpt_custom_tax',
@@ -1523,6 +1531,7 @@ function cptui_update_taxonomy( $data = [] ) {
1523
  $rewrite_slug = trim( $data['cpt_custom_tax']['rewrite_slug'] );
1524
  $rest_base = trim( $data['cpt_custom_tax']['rest_base'] );
1525
  $rest_controller_class = trim( $data['cpt_custom_tax']['rest_controller_class'] );
 
1526
  $show_quickpanel_bulk = ! empty( $data['cpt_custom_tax']['show_in_quick_edit'] ) ? disp_boolean( $data['cpt_custom_tax']['show_in_quick_edit'] ) : '';
1527
  $default_term = trim( $data['cpt_custom_tax']['default_term'] );
1528
 
@@ -1557,6 +1566,7 @@ function cptui_update_taxonomy( $data = [] ) {
1557
  'show_in_quick_edit' => $show_quickpanel_bulk,
1558
  'rest_base' => $rest_base,
1559
  'rest_controller_class' => $rest_controller_class,
 
1560
  'labels' => $data['cpt_tax_labels'],
1561
  'meta_box_cb' => $meta_box_cb,
1562
  'default_term' => $default_term,
@@ -1630,12 +1640,14 @@ function cptui_reserved_taxonomies() {
1630
  'category_name',
1631
  'comments_per_page',
1632
  'comments_popup',
 
 
1633
  'customize_messenger_channel',
1634
  'customized',
1635
- 'cpage',
1636
- 'day',
1637
  'date',
 
1638
  'debug',
 
1639
  'error',
1640
  'exact',
1641
  'feed',
@@ -1654,6 +1666,7 @@ function cptui_reserved_taxonomies() {
1654
  'offset',
1655
  'order',
1656
  'orderby',
 
1657
  'p',
1658
  'page',
1659
  'page_id',
@@ -1680,6 +1693,7 @@ function cptui_reserved_taxonomies() {
1680
  'sentence',
1681
  'showposts',
1682
  'static',
 
1683
  'subpost',
1684
  'subpost_id',
1685
  'tag',
@@ -1692,14 +1706,15 @@ function cptui_reserved_taxonomies() {
1692
  'taxonomy',
1693
  'tb',
1694
  'term',
 
1695
  'theme',
 
1696
  'type',
1697
  'types',
1698
  'w',
1699
  'withcomments',
1700
  'withoutcomments',
1701
  'year',
1702
- 'output',
1703
  ];
1704
 
1705
  /**
1096
  'textvalue' => isset( $current['rest_controller_class'] ) ? esc_attr( $current['rest_controller_class'] ) : '',
1097
  ] );
1098
 
1099
+ echo $ui->get_text_input( [
1100
+ 'namearray' => 'cpt_custom_tax',
1101
+ 'name' => 'rest_namespace',
1102
+ 'labeltext' => esc_html__( 'REST API namespace', 'custom-post-type-ui' ),
1103
+ 'aftertext' => esc_attr__( '(default: wp/v2) To change the namespace URL of REST API route.', 'custom-post-type-ui' ),
1104
+ 'textvalue' => isset( $current['rest_namespace'] ) ? esc_attr( $current['rest_namespace'] ) : '',
1105
+ ] );
1106
+
1107
  $select = [
1108
  'options' => [
1109
  [
1163
  ],
1164
  ],
1165
  ];
1166
+ $selected = ( isset( $current ) && ! empty( $current['sort'] ) ) ? disp_boolean( $current['sort'] ) : '';
1167
  $select['selected'] = ! empty( $selected ) ? $current['sort'] : '';
1168
  echo $ui->get_select_input( [
1169
  'namearray' => 'cpt_custom_tax',
1531
  $rewrite_slug = trim( $data['cpt_custom_tax']['rewrite_slug'] );
1532
  $rest_base = trim( $data['cpt_custom_tax']['rest_base'] );
1533
  $rest_controller_class = trim( $data['cpt_custom_tax']['rest_controller_class'] );
1534
+ $rest_namespace = trim( $data['cpt_custom_tax']['rest_namespace'] );
1535
  $show_quickpanel_bulk = ! empty( $data['cpt_custom_tax']['show_in_quick_edit'] ) ? disp_boolean( $data['cpt_custom_tax']['show_in_quick_edit'] ) : '';
1536
  $default_term = trim( $data['cpt_custom_tax']['default_term'] );
1537
 
1566
  'show_in_quick_edit' => $show_quickpanel_bulk,
1567
  'rest_base' => $rest_base,
1568
  'rest_controller_class' => $rest_controller_class,
1569
+ 'rest_namespace' => $rest_namespace,
1570
  'labels' => $data['cpt_tax_labels'],
1571
  'meta_box_cb' => $meta_box_cb,
1572
  'default_term' => $default_term,
1640
  'category_name',
1641
  'comments_per_page',
1642
  'comments_popup',
1643
+ 'cpage',
1644
+ 'custom',
1645
  'customize_messenger_channel',
1646
  'customized',
 
 
1647
  'date',
1648
+ 'day',
1649
  'debug',
1650
+ 'embed',
1651
  'error',
1652
  'exact',
1653
  'feed',
1666
  'offset',
1667
  'order',
1668
  'orderby',
1669
+ 'output',
1670
  'p',
1671
  'page',
1672
  'page_id',
1693
  'sentence',
1694
  'showposts',
1695
  'static',
1696
+ 'status',
1697
  'subpost',
1698
  'subpost_id',
1699
  'tag',
1706
  'taxonomy',
1707
  'tb',
1708
  'term',
1709
+ 'terms',
1710
  'theme',
1711
+ 'title',
1712
  'type',
1713
  'types',
1714
  'w',
1715
  'withcomments',
1716
  'withoutcomments',
1717
  'year',
 
1718
  ];
1719
 
1720
  /**
inc/tools.php CHANGED
@@ -279,6 +279,7 @@ function cptui_get_single_taxonomy_registery( $taxonomy = [] ) {
279
  $show_in_rest = ( ! empty( $taxonomy['show_in_rest'] ) && false !== get_disp_boolean( $taxonomy['show_in_rest'] ) ) ? 'true' : 'false';
280
  $rest_base = ! empty( $taxonomy['rest_base'] ) ? $taxonomy['rest_base'] : $taxonomy['name'];
281
  $rest_controller_class = ! empty( $taxonomy['rest_controller_class'] ) ? $taxonomy['rest_controller_class'] : 'WP_REST_Terms_Controller';
 
282
 
283
  if ( ! empty( $taxonomy['meta_box_cb'] ) ) {
284
  $meta_box_cb = ( false !== get_disp_boolean( $taxonomy['meta_box_cb'] ) ) ? '"' . $taxonomy['meta_box_cb'] . '"' : 'false';
@@ -345,6 +346,7 @@ foreach ( $taxonomy['labels'] as $key => $label ) {
345
  "show_tagcloud" => <?php echo $show_tagcloud; ?>,
346
  "rest_base" => "<?php echo $rest_base; ?>",
347
  "rest_controller_class" => "<?php echo $rest_controller_class; ?>",
 
348
  "show_in_quick_edit" => <?php echo $show_in_quick_edit; ?>,
349
  "sort" => <?php echo disp_boolean( $taxonomy['sort'] ); ?>,
350
  <?php if ( $show_graphql ) : ?>
@@ -495,6 +497,7 @@ function cptui_get_single_post_type_registery( $post_type = [] ) {
495
  $post_type['show_in_rest'] = 'false';
496
  }
497
  $rest_controller_class = ! empty( $post_type['rest_controller_class'] ) ? $post_type['rest_controller_class'] : 'WP_REST_Posts_Controller';
 
498
 
499
  $show_in_menu = get_disp_boolean( $post_type['show_in_menu'] );
500
  if ( false !== $show_in_menu ) {
@@ -511,6 +514,11 @@ function cptui_get_single_post_type_registery( $post_type = [] ) {
511
  $delete_with_user = disp_boolean( $post_type['delete_with_user'] );
512
  }
513
 
 
 
 
 
 
514
  $public = isset( $post_type['public'] ) ? disp_boolean( $post_type['public'] ) : 'true';
515
  $show_in_nav_menus = ( ! empty( $post_type['show_in_nav_menus'] ) && false !== get_disp_boolean( $post_type['show_in_nav_menus'] ) ) ? 'true' : 'false';
516
  if ( empty( $post_type['show_in_nav_menus'] ) ) {
@@ -569,6 +577,7 @@ function cptui_get_single_post_type_registery( $post_type = [] ) {
569
  "show_in_rest" => <?php echo disp_boolean( $post_type['show_in_rest'] ); ?>,
570
  "rest_base" => "<?php echo $post_type['rest_base']; ?>",
571
  "rest_controller_class" => "<?php echo $rest_controller_class; ?>",
 
572
  "has_archive" => <?php echo $has_archive; ?>,
573
  "show_in_menu" => <?php echo $show_in_menu; ?>,
574
  "show_in_nav_menus" => <?php echo $show_in_nav_menus; ?>,
@@ -577,7 +586,7 @@ function cptui_get_single_post_type_registery( $post_type = [] ) {
577
  "capability_type" => <?php echo $capability_type; ?>,
578
  "map_meta_cap" => <?php echo disp_boolean( $post_type['map_meta_cap'] ); ?>,
579
  "hierarchical" => <?php echo disp_boolean( $post_type['hierarchical'] ); ?>,
580
- "can_export" => <?php echo disp_boolean( $post_type['can_export'] ); ?>,
581
  "rewrite" => <?php echo $rewrite; ?>,
582
  "query_var" => <?php echo $post_type['query_var']; ?>,
583
  <?php if ( ! empty( $post_type['menu_position'] ) ) { ?>
@@ -586,6 +595,9 @@ function cptui_get_single_post_type_registery( $post_type = [] ) {
586
  <?php if ( ! empty( $post_type['menu_icon'] ) ) { ?>
587
  "menu_icon" => "<?php echo $post_type['menu_icon']; ?>",
588
  <?php } ?>
 
 
 
589
  <?php if ( ! empty( $supports ) ) { ?>
590
  "supports" => <?php echo $supports; ?>,
591
  <?php } ?>
279
  $show_in_rest = ( ! empty( $taxonomy['show_in_rest'] ) && false !== get_disp_boolean( $taxonomy['show_in_rest'] ) ) ? 'true' : 'false';
280
  $rest_base = ! empty( $taxonomy['rest_base'] ) ? $taxonomy['rest_base'] : $taxonomy['name'];
281
  $rest_controller_class = ! empty( $taxonomy['rest_controller_class'] ) ? $taxonomy['rest_controller_class'] : 'WP_REST_Terms_Controller';
282
+ $rest_namespace = ! empty( $taxonomy['rest_namespace'] ) ? $taxonomy['rest_namespace'] : 'wp/v2';
283
 
284
  if ( ! empty( $taxonomy['meta_box_cb'] ) ) {
285
  $meta_box_cb = ( false !== get_disp_boolean( $taxonomy['meta_box_cb'] ) ) ? '"' . $taxonomy['meta_box_cb'] . '"' : 'false';
346
  "show_tagcloud" => <?php echo $show_tagcloud; ?>,
347
  "rest_base" => "<?php echo $rest_base; ?>",
348
  "rest_controller_class" => "<?php echo $rest_controller_class; ?>",
349
+ "rest_namespace" => "<?php echo $rest_namespace; ?>",
350
  "show_in_quick_edit" => <?php echo $show_in_quick_edit; ?>,
351
  "sort" => <?php echo disp_boolean( $taxonomy['sort'] ); ?>,
352
  <?php if ( $show_graphql ) : ?>
497
  $post_type['show_in_rest'] = 'false';
498
  }
499
  $rest_controller_class = ! empty( $post_type['rest_controller_class'] ) ? $post_type['rest_controller_class'] : 'WP_REST_Posts_Controller';
500
+ $rest_namespace = ! empty( $post_type['rest_namespace'] ) ? $post_type['rest_namespace'] : 'wp/v2';
501
 
502
  $show_in_menu = get_disp_boolean( $post_type['show_in_menu'] );
503
  if ( false !== $show_in_menu ) {
514
  $delete_with_user = disp_boolean( $post_type['delete_with_user'] );
515
  }
516
 
517
+ $can_export = 'true';
518
+ if ( isset( $post_type['can_export'] ) ) {
519
+ $can_export = disp_boolean( $post_type['can_export'] );
520
+ }
521
+
522
  $public = isset( $post_type['public'] ) ? disp_boolean( $post_type['public'] ) : 'true';
523
  $show_in_nav_menus = ( ! empty( $post_type['show_in_nav_menus'] ) && false !== get_disp_boolean( $post_type['show_in_nav_menus'] ) ) ? 'true' : 'false';
524
  if ( empty( $post_type['show_in_nav_menus'] ) ) {
577
  "show_in_rest" => <?php echo disp_boolean( $post_type['show_in_rest'] ); ?>,
578
  "rest_base" => "<?php echo $post_type['rest_base']; ?>",
579
  "rest_controller_class" => "<?php echo $rest_controller_class; ?>",
580
+ "rest_namespace" => "<?php echo $rest_namespace; ?>",
581
  "has_archive" => <?php echo $has_archive; ?>,
582
  "show_in_menu" => <?php echo $show_in_menu; ?>,
583
  "show_in_nav_menus" => <?php echo $show_in_nav_menus; ?>,
586
  "capability_type" => <?php echo $capability_type; ?>,
587
  "map_meta_cap" => <?php echo disp_boolean( $post_type['map_meta_cap'] ); ?>,
588
  "hierarchical" => <?php echo disp_boolean( $post_type['hierarchical'] ); ?>,
589
+ "can_export" => <?php echo $can_export; ?>,
590
  "rewrite" => <?php echo $rewrite; ?>,
591
  "query_var" => <?php echo $post_type['query_var']; ?>,
592
  <?php if ( ! empty( $post_type['menu_position'] ) ) { ?>
595
  <?php if ( ! empty( $post_type['menu_icon'] ) ) { ?>
596
  "menu_icon" => "<?php echo $post_type['menu_icon']; ?>",
597
  <?php } ?>
598
+ <?php if ( ! empty( $post_type['register_meta_box_cb'] ) ) { ?>
599
+ "register_meta_box_cb" => "<?php echo $post_type['register_meta_box_cb']; ?>",
600
+ <?php } ?>
601
  <?php if ( ! empty( $supports ) ) { ?>
602
  "supports" => <?php echo $supports; ?>,
603
  <?php } ?>
js/cptui.js CHANGED
@@ -16,6 +16,17 @@ postboxes.add_postbox_toggles(pagenow);
16
  var original_slug = $('#name').val();
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
19
  // Switch to newly selected post type or taxonomy automatically.
20
  $('#post_type').on('change',function(){
21
  $('#cptui_select_post_type').submit();
16
  var original_slug = $('#name').val();
17
  }
18
 
19
+ // Automatically toggle the "page attributes" checkbox if
20
+ // setting a hierarchical post type.
21
+ $('#hierarchical').on('change', function() {
22
+ var hierarchical = $(this).val();
23
+ if ('1' === hierarchical) {
24
+ $('#page-attributes').prop('checked', true);
25
+ } else {
26
+ $('#page-attributes').prop('checked', false);
27
+ }
28
+ });
29
+
30
  // Switch to newly selected post type or taxonomy automatically.
31
  $('#post_type').on('change',function(){
32
  $('#cptui_select_post_type').submit();
js/cptui.min.js CHANGED
@@ -1 +1 @@
1
- postboxes.add_postbox_toggles(pagenow),function($){if($("#cptui_select_post_type_submit").hide(),$("#cptui_select_taxonomy_submit").hide(),"edit"===function(name,url){url=url||window.location.href;name=name.replace(/[\[\]]/g,"\\$&");var results=new RegExp("[?&]"+name+"(=([^&#]*)|&|#|$)").exec(url);return results?results[2]?decodeURIComponent(results[2].replace(/\+/g," ")):"":null}("action"))var original_slug=$("#name").val();function composePreviewContent(value){var is_url=/(http|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/.test(value);if(!value)return"";if(0===value.indexOf("dashicons-"))return $('<div class="dashicons-before"><br></div>').addClass(function(str){return String(str).replace(/[^-\w. ]/gi,function(c){return"&#"+c.charCodeAt(0)+";"})}(value));if(is_url){var imgsrc=encodeURI(value),theimg=document.createElement("IMG");return theimg.src=imgsrc,theimg}}$("#post_type").on("change",function(){$("#cptui_select_post_type").submit()}),$("#taxonomy").on("change",function(){$("#cptui_select_taxonomy").submit()}),$(".cptui-delete-top, .cptui-delete-bottom").on("click",function(e){e.preventDefault();var msg="";"undefined"!=typeof cptui_type_data?msg=cptui_type_data.confirm:"undefined"!=typeof cptui_tax_data&&(msg=cptui_tax_data.confirm);$('<div class="cptui-submit-delete-dialog">'+msg+"</div>").appendTo("#poststuff").dialog({dialogClass:"wp-dialog",modal:!0,autoOpen:!0,buttons:{OK:function(){$(e.target).closest("form");$(e.target).off("click").click()},Cancel:function(){$(this).dialog("close")}}})}),$("#support .question").each(function(){var tis=$(this),state=!1,answer=tis.next("div").slideUp();tis.on("click keydown",function(e){"keydown"===e.type&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),state=!state,answer.slideToggle(state),tis.toggleClass("active",state),tis.attr("aria-expanded",state.toString()),tis.focus())})}),$("#name").on("keyup",function(e){var value,original_value;if(value=original_value=$(this).val(),9!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode&&(value=function(s){s="cpt-ui_page_cptui_manage_post_types"===window.pagenow?s.replace(/[^a-z0-9\s-]/gi,"_"):s.replace(/[^a-z0-9\s]/gi,"_");return s}(value=function(word){return word.split("").map(function(char){return cyrillic[char]||char}).join("")}(value=function(s){for(var diacritics=[/[\300-\306]/g,/[\340-\346]/g,/[\310-\313]/g,/[\350-\353]/g,/[\314-\317]/g,/[\354-\357]/g,/[\322-\330]/g,/[\362-\370]/g,/[\331-\334]/g,/[\371-\374]/g,/[\321]/g,/[\361]/g,/[\307]/g,/[\347]/g],chars=["A","a","E","e","I","i","O","o","U","u","N","n","C","c"],i=0;i<diacritics.length;i++)s=s.replace(diacritics[i],chars[i]);return s}(value=(value=value.replace(/ /g,"_")).toLowerCase()))))!==original_value&&$(this).prop("value",value),void 0!==original_slug){var $slugchanged=$("#slugchanged");value!=original_slug?$slugchanged.removeClass("hidemessage"):$slugchanged.addClass("hidemessage")}var $slugexists=$("#slugexists");"undefined"!=typeof cptui_type_data&&(cptui_type_data.existing_post_types.hasOwnProperty(value)&&value!==original_slug?$slugexists.removeClass("hidemessage"):$slugexists.addClass("hidemessage")),"undefined"!=typeof cptui_tax_data&&(cptui_tax_data.existing_taxonomies.hasOwnProperty(value)&&value!==original_slug?$slugexists.removeClass("hidemessage"):$slugexists.addClass("hidemessage"))});var cyrillic={"Ё":"YO","Й":"I","Ц":"TS","У":"U","К":"K","Е":"E","Н":"N","Г":"G","Ш":"SH","Щ":"SCH","З":"Z","Х":"H","Ъ":"'","ё":"yo","й":"i","ц":"ts","у":"u","к":"k","е":"e","н":"n","г":"g","ш":"sh","щ":"sch","з":"z","х":"h","ъ":"'","Ф":"F","Ы":"I","В":"V","А":"a","П":"P","Р":"R","О":"O","Л":"L","Д":"D","Ж":"ZH","Э":"E","ф":"f","ы":"i","в":"v","а":"a","п":"p","р":"r","о":"o","л":"l","д":"d","ж":"zh","э":"e","Я":"Ya","Ч":"CH","С":"S","М":"M","И":"I","Т":"T","Ь":"'","Б":"B","Ю":"YU","я":"ya","ч":"ch","с":"s","м":"m","и":"i","т":"t","ь":"'","б":"b","ю":"yu"};if(null!=wp.media)var _custom_media=!0,_orig_send_attachment=wp.media.editor.send.attachment;$("#cptui_choose_icon").on("click",function(e){e.preventDefault();var button=$(this),id=jQuery("#menu_icon").attr("id");return _custom_media=!0,wp.media.editor.send.attachment=function(props,attachment){if(!_custom_media)return _orig_send_attachment.apply(this,[props,attachment]);$("#"+id).val(attachment.url).change()},wp.media.editor.open(button),!1}),$("#menu_icon").on("change",function(){var value=$(this).val();value=value.trim(),$("#menu_icon_preview").html(composePreviewContent(value))}),$(".cptui-help").on("click",function(e){e.preventDefault()}),$(".cptui-taxonomy-submit").on("click",function(e){if(0==$(".cptui-table :checkbox:checked").length){e.preventDefault();$('<div class="cptui-taxonomy-empty-types-dialog">'+cptui_tax_data.no_associated_type+"</div>").appendTo("#poststuff").dialog({dialogClass:"wp-dialog",modal:!0,autoOpen:!0,buttons:{OK:function(){$(this).dialog("close")}}})}}),$("#auto-populate").on("click tap",function(e){e.preventDefault();var slug=$("#name").val(),plural=$("#label").val(),singular=$("#singular_label").val(),fields=$('.cptui-labels input[type="text"]');""!==slug&&(""===plural&&(plural=slug),""===singular&&(singular=slug),$(fields).each(function(i,el){var newval=$(el).data("label"),plurality=$(el).data("plurality");"undefined"!==newval&&(newval="plural"===plurality?newval.replace(/item/gi,plural):newval.replace(/item/gi,singular),""===$(el).val()&&$(el).val(newval))}))}),$("#auto-clear").on("click tap",function(e){e.preventDefault();var fields=$('.cptui-labels input[type="text"]');$(fields).each(function(i,el){$(el).val("")})})}(jQuery);
1
+ postboxes.add_postbox_toggles(pagenow),function($){if($("#cptui_select_post_type_submit").hide(),$("#cptui_select_taxonomy_submit").hide(),"edit"===function(name,url){url=url||window.location.href;name=name.replace(/[\[\]]/g,"\\$&");var results=new RegExp("[?&]"+name+"(=([^&#]*)|&|#|$)").exec(url);return results?results[2]?decodeURIComponent(results[2].replace(/\+/g," ")):"":null}("action"))var original_slug=$("#name").val();function composePreviewContent(value){var is_url=/(http|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/.test(value);if(!value)return"";if(0===value.indexOf("dashicons-"))return $('<div class="dashicons-before"><br></div>').addClass(function(str){return String(str).replace(/[^-\w. ]/gi,function(c){return"&#"+c.charCodeAt(0)+";"})}(value));if(is_url){var imgsrc=encodeURI(value),theimg=document.createElement("IMG");return theimg.src=imgsrc,theimg}}$("#hierarchical").on("change",function(){"1"===$(this).val()?$("#page-attributes").prop("checked",!0):$("#page-attributes").prop("checked",!1)}),$("#post_type").on("change",function(){$("#cptui_select_post_type").submit()}),$("#taxonomy").on("change",function(){$("#cptui_select_taxonomy").submit()}),$(".cptui-delete-top, .cptui-delete-bottom").on("click",function(e){e.preventDefault();var msg="";"undefined"!=typeof cptui_type_data?msg=cptui_type_data.confirm:"undefined"!=typeof cptui_tax_data&&(msg=cptui_tax_data.confirm);$('<div class="cptui-submit-delete-dialog">'+msg+"</div>").appendTo("#poststuff").dialog({dialogClass:"wp-dialog",modal:!0,autoOpen:!0,buttons:{OK:function(){$(e.target).closest("form");$(e.target).off("click").click()},Cancel:function(){$(this).dialog("close")}}})}),$("#support .question").each(function(){var tis=$(this),state=!1,answer=tis.next("div").slideUp();tis.on("click keydown",function(e){"keydown"===e.type&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),state=!state,answer.slideToggle(state),tis.toggleClass("active",state),tis.attr("aria-expanded",state.toString()),tis.focus())})}),$("#name").on("keyup",function(e){var value,original_value;if(value=original_value=$(this).val(),9!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode&&(value=function(s){s="cpt-ui_page_cptui_manage_post_types"===window.pagenow?s.replace(/[^a-z0-9\s-]/gi,"_"):s.replace(/[^a-z0-9\s]/gi,"_");return s}(value=function(word){return word.split("").map(function(char){return cyrillic[char]||char}).join("")}(value=function(s){for(var diacritics=[/[\300-\306]/g,/[\340-\346]/g,/[\310-\313]/g,/[\350-\353]/g,/[\314-\317]/g,/[\354-\357]/g,/[\322-\330]/g,/[\362-\370]/g,/[\331-\334]/g,/[\371-\374]/g,/[\321]/g,/[\361]/g,/[\307]/g,/[\347]/g],chars=["A","a","E","e","I","i","O","o","U","u","N","n","C","c"],i=0;i<diacritics.length;i++)s=s.replace(diacritics[i],chars[i]);return s}(value=(value=value.replace(/ /g,"_")).toLowerCase()))))!==original_value&&$(this).prop("value",value),void 0!==original_slug){var $slugchanged=$("#slugchanged");value!=original_slug?$slugchanged.removeClass("hidemessage"):$slugchanged.addClass("hidemessage")}var $slugexists=$("#slugexists");"undefined"!=typeof cptui_type_data&&(cptui_type_data.existing_post_types.hasOwnProperty(value)&&value!==original_slug?$slugexists.removeClass("hidemessage"):$slugexists.addClass("hidemessage")),"undefined"!=typeof cptui_tax_data&&(cptui_tax_data.existing_taxonomies.hasOwnProperty(value)&&value!==original_slug?$slugexists.removeClass("hidemessage"):$slugexists.addClass("hidemessage"))});var cyrillic={"Ё":"YO","Й":"I","Ц":"TS","У":"U","К":"K","Е":"E","Н":"N","Г":"G","Ш":"SH","Щ":"SCH","З":"Z","Х":"H","Ъ":"'","ё":"yo","й":"i","ц":"ts","у":"u","к":"k","е":"e","н":"n","г":"g","ш":"sh","щ":"sch","з":"z","х":"h","ъ":"'","Ф":"F","Ы":"I","В":"V","А":"a","П":"P","Р":"R","О":"O","Л":"L","Д":"D","Ж":"ZH","Э":"E","ф":"f","ы":"i","в":"v","а":"a","п":"p","р":"r","о":"o","л":"l","д":"d","ж":"zh","э":"e","Я":"Ya","Ч":"CH","С":"S","М":"M","И":"I","Т":"T","Ь":"'","Б":"B","Ю":"YU","я":"ya","ч":"ch","с":"s","м":"m","и":"i","т":"t","ь":"'","б":"b","ю":"yu"};if(null!=wp.media)var _custom_media=!0,_orig_send_attachment=wp.media.editor.send.attachment;$("#cptui_choose_icon").on("click",function(e){e.preventDefault();var button=$(this),id=jQuery("#menu_icon").attr("id");return _custom_media=!0,wp.media.editor.send.attachment=function(props,attachment){if(!_custom_media)return _orig_send_attachment.apply(this,[props,attachment]);$("#"+id).val(attachment.url).change()},wp.media.editor.open(button),!1}),$("#menu_icon").on("change",function(){var value=$(this).val();value=value.trim(),$("#menu_icon_preview").html(composePreviewContent(value))}),$(".cptui-help").on("click",function(e){e.preventDefault()}),$(".cptui-taxonomy-submit").on("click",function(e){if(0==$(".cptui-table :checkbox:checked").length){e.preventDefault();$('<div class="cptui-taxonomy-empty-types-dialog">'+cptui_tax_data.no_associated_type+"</div>").appendTo("#poststuff").dialog({dialogClass:"wp-dialog",modal:!0,autoOpen:!0,buttons:{OK:function(){$(this).dialog("close")}}})}}),$("#auto-populate").on("click tap",function(e){e.preventDefault();var slug=$("#name").val(),plural=$("#label").val(),singular=$("#singular_label").val(),fields=$('.cptui-labels input[type="text"]');""!==slug&&(""===plural&&(plural=slug),""===singular&&(singular=slug),$(fields).each(function(i,el){var newval=$(el).data("label"),plurality=$(el).data("plurality");"undefined"!==newval&&(newval="plural"===plurality?newval.replace(/item/gi,plural):newval.replace(/item/gi,singular),""===$(el).val()&&$(el).val(newval))}))}),$("#auto-clear").on("click tap",function(e){e.preventDefault();var fields=$('.cptui-labels input[type="text"]');$(fields).each(function(i,el){$(el).val("")})})}(jQuery);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webdevstudios, pluginize, tw2113, vegasgeek, modemlooper, williams
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056
4
  Tags: custom post types, CPT, CMS, post, types, post type, taxonomy, tax, custom, content types, post types
5
  Requires at least: 5.9
6
- Tested up to: 5.9.0
7
- Stable tag: 1.11.1
8
  License: GPL-2.0+
9
  Requires PHP: 5.6
10
 
@@ -14,24 +14,42 @@ Admin UI for creating custom post types and custom taxonomies for WordPress
14
 
15
  Custom Post Type UI provides an easy to use interface for registering and managing custom post types and taxonomies for your website.
16
 
17
- While CPTUI helps solve the problem of creating custom post types, displaying the data gleaned from them can be a whole new challenge. That’s why we created [Custom Post Type UI Extended](https://pluginize.com/product/custom-post-type-ui-extended/?utm_source=cptui-desription&utm_medium=text&utm_campaign=wporg). [View our Layouts page](https://pluginize.com/cpt-ui-extended-features/?utm_source=cptui-description-examples&utm_medium=text&utm_campaign=wporg) to see some examples that are available with Custom Post Type UI Extended.
18
 
19
- Official development of Custom Post Type UI is on GitHub, with official stable releases published on WordPress.org. The GitHub repo can be found at [https://github.com/WebDevStudios/custom-post-type-ui](https://github.com/WebDevStudios/custom-post-type-ui). Please use the Support tab for potential bugs, issues, or enhancement ideas.
20
 
21
- [Pluginize](https://pluginize.com/?utm_source=cptui&utm_medium=text&utm_campaign=wporg) was launched in 2016 by [WebDevStudios](https://webdevstudios.com/) to promote, support, and house all of their [WordPress products](https://pluginize.com/shop/?utm_source=cptui-&utm_medium=text&utm_campaign=wporg). Pluginize is not only [creating new products for WordPress all the time, like CPTUI Extended](https://pluginize.com/product/custom-post-type-ui-extended/?utm_source=cptui&utm_medium=text&utm_campaign=wporg), but also provides ongoing support and development for WordPress community favorites like [CMB2](https://wordpress.org/plugins/cmb2/) and more.
 
 
 
 
 
 
22
 
23
  == Screenshots ==
24
 
25
  1. Add new post type screen and tab.
26
  2. Add new taxonomy screen and tab.
27
  3. Registered post types and taxonomies from CPTUI
28
- 4. Import/Export Post Types screen.
29
- 5. Get Code screen.
30
- 6. Help/support screen.
31
 
32
  == Changelog ==
33
 
34
- = 1.11.1 - 2022 03-18 =
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  * Fixed: Errors and warnings around array_key_exists() and bool values
36
 
37
  = 1.11.0 - 2022-03-17 =
@@ -58,26 +76,22 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
58
  * Fixed: Hardened up various parts of our code to ensure security.
59
  * Fixed: Incorrectly referenced variable from post types instead of taxonomies, for the rest_controller_class property.
60
 
61
- = 1.9.2 - 2021-06-16 =
62
- * Added: "date" as a reserved taxonomy slug.
63
- * Fixed: duplicate "show_in_graphql" attribute output in "Get Code" output.
64
- * Updated: image optimization for smaller file sizes.
65
- * Updated: removed duplicate taxonomy labels.
66
-
67
- = 1.9.1 - 2021-04-19 =
68
- * Fixed: missed WPGraphQL settings in our Get Tools/Export functionality.
69
- * Updated: note about needing a published item to set parent/child relationships in post types.
70
 
71
- = 1.9.0 - 2021-03-30 =
72
- * Added: WPGraphQL Support when WPGraphQL is installed and active.
73
- * Fixed: Better handling of code in post_format based helper functions.
74
- * Updated: Cleaned up unused CSS.
75
- * Updated: Added `types` to disallowed taxonomy slugs.
76
- * Updated: Amended some helper text on the listings page regarding templates. Props @tarecord
 
 
77
 
78
- == Upgrade Notice ==
 
 
79
 
80
- = 1.11.1 - 2022 03-18 =
81
  * Fixed: Errors and warnings around array_key_exists() and bool values
82
 
83
  = 1.11.0 - 2022-03-17 =
@@ -104,23 +118,6 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
104
  * Fixed: Hardened up various parts of our code to ensure security.
105
  * Fixed: Incorrectly referenced variable from post types instead of taxonomies, for the rest_controller_class property.
106
 
107
- = 1.9.2 - 2021-06-16 =
108
- * Added: "date" as a reserved taxonomy slug.
109
- * Fixed: duplicate "show_in_graphql" attribute output in "Get Code" output.
110
- * Updated: image optimization for smaller file sizes.
111
- * Updated: removed duplicate taxonomy labels.
112
-
113
- = 1.9.1 - 2021-04-19 =
114
- * Fixed: missed WPGraphQL settings in our Get Tools/Export functionality.
115
- * Updated: note about needing a published item to set parent/child relationships in post types.
116
-
117
- = 1.9.0 - 2021-03-30 =
118
- * Added: WPGraphQL Support when WPGraphQL is installed and active.
119
- * Fixed: Better handling of code in post_format based helper functions.
120
- * Updated: Cleaned up unused CSS.
121
- * Updated: Added `types` to disallowed taxonomy slugs.
122
- * Updated: Amended some helper text on the listings page regarding templates. Props @tarecord
123
-
124
  == Installation ==
125
 
126
  = Admin Installer via search =
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056
4
  Tags: custom post types, CPT, CMS, post, types, post type, taxonomy, tax, custom, content types, post types
5
  Requires at least: 5.9
6
+ Tested up to: 6.0
7
+ Stable tag: 1.12.0
8
  License: GPL-2.0+
9
  Requires PHP: 5.6
10
 
14
 
15
  Custom Post Type UI provides an easy to use interface for registering and managing custom post types and taxonomies for your website.
16
 
17
+ = Custom Post Type UI Extended =
18
 
19
+ CPTUI helps create custom content types, but displaying that content can be a whole new challenge. We created [Custom Post Type UI Extended](https://pluginize.com/product/custom-post-type-ui-extended/?utm_source=cptui-desription&utm_medium=text&utm_campaign=wporg) to help with displaying your crafted content. [View our Layouts page](https://pluginize.com/cpt-ui-extended-features/?utm_source=cptui-description-examples&utm_medium=text&utm_campaign=wporg) to see available layout examples with Custom Post Type UI Extended.
20
 
21
+ Beginning with version 1.7.0, Custom Post Type UI Extended has properly moved in to the Block editor experience and is working to get all the layouts available in the new "Custom Post Type UI Block". It's now even easier to start showing your content with the existing and future layouts available with Custom Post Type UI Extended.
22
+
23
+ [Pluginize](https://pluginize.com/?utm_source=cptui&utm_medium=text&utm_campaign=wporg) was launched in 2016 by [WebDevStudios](https://webdevstudios.com/) to promote, support, and house all of their [WordPress products](https://pluginize.com/shop/?utm_source=cptui-&utm_medium=text&utm_campaign=wporg). Pluginize is not only [creating new products for WordPress, like CPTUI Extended](https://pluginize.com/product/custom-post-type-ui-extended/?utm_source=cptui&utm_medium=text&utm_campaign=wporg), but also provides ongoing support and development for WordPress community favorites like [CMB2](https://wordpress.org/plugins/cmb2/) and more.
24
+
25
+ = Plugin development =
26
+
27
+ Custom Post Type UI development is managed on GitHub, with official releases published on WordPress.org. The GitHub repo can be found at [https://github.com/WebDevStudios/custom-post-type-ui](https://github.com/WebDevStudios/custom-post-type-ui). Please use the WordPress.org support tab for potential bugs, issues, or enhancement ideas.
28
 
29
  == Screenshots ==
30
 
31
  1. Add new post type screen and tab.
32
  2. Add new taxonomy screen and tab.
33
  3. Registered post types and taxonomies from CPTUI
34
+ 4. Tools screen.
35
+ 5. Help/support screen.
 
36
 
37
  == Changelog ==
38
 
39
+ = 1.12.0 - 2022-05-09 =
40
+ * Added: Tested on WordPress 6.0.
41
+ * Added: Auto-check, but not force, "page-attributes" when setting a post type as hierarchical.
42
+ * Added: "rest_namespace" parameters for both post types and taxonomies.
43
+ * Added: "register_meta_box_cb" parameter for post types.
44
+ * Fixed: undefined index notices for "can_export".
45
+ * Updated: list of reserved taxonomy names with more that are considered reserved.
46
+ * Updated: readme descriptions and screenshots.
47
+
48
+ = 1.11.2 - 2022-03-21 =
49
+ * Fixed: Unintended reuse of `$delete_with_user` variable and `can_export` option. Props @bogutskyy
50
+ * Fixed: PHP notices around `sort` array index.
51
+
52
+ = 1.11.1 - 2022-03-18 =
53
  * Fixed: Errors and warnings around array_key_exists() and bool values
54
 
55
  = 1.11.0 - 2022-03-17 =
76
  * Fixed: Hardened up various parts of our code to ensure security.
77
  * Fixed: Incorrectly referenced variable from post types instead of taxonomies, for the rest_controller_class property.
78
 
79
+ == Upgrade Notice ==
 
 
 
 
 
 
 
 
80
 
81
+ = 1.12.0 - 2022-05-09 =
82
+ * Added: Tested on WordPress 6.0.
83
+ * Added: Auto-check, but not force, "page-attributes" when setting a post type as hierarchical.
84
+ * Added: "rest_namespace" parameters for both post types and taxonomies.
85
+ * Added: "register_meta_box_cb" parameter for post types.
86
+ * Fixed: undefined index notices for "can_export".
87
+ * Updated: list of reserved taxonomy names with more that are considered reserved.
88
+ * Updated: readme descriptions and screenshots.
89
 
90
+ = 1.11.2 - 2022-03-21 =
91
+ * Fixed: Unintended reuse of `$delete_with_user` variable and `can_export` option. Props @bogutskyy
92
+ * Fixed: PHP notices around `sort` array index.
93
 
94
+ = 1.11.1 - 2022-03-18 =
95
  * Fixed: Errors and warnings around array_key_exists() and bool values
96
 
97
  = 1.11.0 - 2022-03-17 =
118
  * Fixed: Hardened up various parts of our code to ensure security.
119
  * Fixed: Incorrectly referenced variable from post types instead of taxonomies, for the rest_controller_class property.
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  == Installation ==
122
 
123
  = Admin Installer via search =