Custom Post Type UI - Version 1.11.2

Version Description

  • 2022-03-21 =
  • Fixed: Unintended reuse of $delete_with_user variable and can_export option. Props @bogutskyy
  • Fixed: PHP notices around sort array index.
Download this release

Release Info

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

Code changes from version 1.11.0 to 1.11.2

Files changed (4) hide show
  1. custom-post-type-ui.php +4 -4
  2. inc/taxonomies.php +1 -1
  3. inc/utility.php +4 -4
  4. readme.txt +15 -1
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.0
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.0' ); // Left for legacy purposes.
34
- define( 'CPTUI_VERSION', '1.11.0' );
35
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
36
 
37
  /**
@@ -494,7 +494,7 @@ function cptui_register_single_post_type( $post_type = [] ) {
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 = [
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.2
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.11.2' ); // Left for legacy purposes.
34
+ define( 'CPTUI_VERSION', '1.11.2' );
35
  define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
36
 
37
  /**
494
 
495
  $can_export = null;
496
  if ( ! empty( $post_type['can_export'] ) ) {
497
+ $can_export = get_disp_boolean( $post_type['can_export'] );
498
  }
499
 
500
  $args = [
inc/taxonomies.php CHANGED
@@ -1155,7 +1155,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',
1155
  ],
1156
  ],
1157
  ];
1158
+ $selected = ( isset( $current ) && ! empty( $current['sort'] ) ) ? disp_boolean( $current['sort'] ) : '';
1159
  $select['selected'] = ! empty( $selected ) ? $current['sort'] : '';
1160
  echo $ui->get_select_input( [
1161
  'namearray' => 'cpt_custom_tax',
inc/utility.php CHANGED
@@ -873,9 +873,9 @@ function cptui_set_not_new_install() {
873
  * @return string
874
  */
875
  function cptui_get_cptui_post_type_object( $post_type = '' ) {
876
- $post_types = get_option( 'cptui_post_types' );
877
 
878
- if ( array_key_exists( $post_type, $post_types ) ) {
879
  return $post_types[ $post_type ];
880
  }
881
  return [];
@@ -890,9 +890,9 @@ function cptui_get_cptui_post_type_object( $post_type = '' ) {
890
  * @return string
891
  */
892
  function cptui_get_cptui_taxonomy_object( $taxonomy = '' ) {
893
- $taxonomies = get_option( 'cptui_taxonomies' );
894
 
895
- if ( array_key_exists( $taxonomy, $taxonomies ) ) {
896
  return $taxonomies[ $taxonomy ];
897
  }
898
  return [];
873
  * @return string
874
  */
875
  function cptui_get_cptui_post_type_object( $post_type = '' ) {
876
+ $post_types = get_option( 'cptui_post_types', [] );
877
 
878
+ if ( is_array( $post_types ) && array_key_exists( $post_type, $post_types ) ) {
879
  return $post_types[ $post_type ];
880
  }
881
  return [];
890
  * @return string
891
  */
892
  function cptui_get_cptui_taxonomy_object( $taxonomy = '' ) {
893
+ $taxonomies = get_option( 'cptui_taxonomies', [] );
894
 
895
+ if ( is_array( $taxonomies ) && array_key_exists( $taxonomy, $taxonomies ) ) {
896
  return $taxonomies[ $taxonomy ];
897
  }
898
  return [];
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
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.0
8
  License: GPL-2.0+
9
  Requires PHP: 5.6
10
 
@@ -31,6 +31,13 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
31
 
32
  == Changelog ==
33
 
 
 
 
 
 
 
 
34
  = 1.11.0 - 2022-03-17 =
35
  * Added: "sort" argument for taxonomies.
36
  * Added: "can export" argument for post types
@@ -74,6 +81,13 @@ Official development of Custom Post Type UI is on GitHub, with official stable r
74
 
75
  == Upgrade Notice ==
76
 
 
 
 
 
 
 
 
77
  = 1.11.0 - 2022-03-17 =
78
  * Added: "sort" argument for taxonomies.
79
  * Added: "can export" argument for post types
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.2
8
  License: GPL-2.0+
9
  Requires PHP: 5.6
10
 
31
 
32
  == Changelog ==
33
 
34
+ = 1.11.2 - 2022-03-21 =
35
+ * Fixed: Unintended reuse of `$delete_with_user` variable and `can_export` option. Props @bogutskyy
36
+ * Fixed: PHP notices around `sort` array index.
37
+
38
+ = 1.11.1 - 2022-03-18 =
39
+ * Fixed: Errors and warnings around array_key_exists() and bool values
40
+
41
  = 1.11.0 - 2022-03-17 =
42
  * Added: "sort" argument for taxonomies.
43
  * Added: "can export" argument for post types
81
 
82
  == Upgrade Notice ==
83
 
84
+ = 1.11.2 - 2022-03-21 =
85
+ * Fixed: Unintended reuse of `$delete_with_user` variable and `can_export` option. Props @bogutskyy
86
+ * Fixed: PHP notices around `sort` array index.
87
+
88
+ = 1.11.1 - 2022-03-18 =
89
+ * Fixed: Errors and warnings around array_key_exists() and bool values
90
+
91
  = 1.11.0 - 2022-03-17 =
92
  * Added: "sort" argument for taxonomies.
93
  * Added: "can export" argument for post types