Skip to content

Commit ef86903

Browse files
authored
Release1135 (#925)
* revise nonce checking to prevent untintentional emailing of debug info * move textdomain loading to init instead of plugins_loaded * add empty checks for can_export * update version and tested up to * changelog * update version in main php file * juggle tags and update short description * these two parameters got moved to main file only as of WP 5.8 * update readme with release date
1 parent c91e555 commit ef86903

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed

custom-post-type-ui.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
* Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
1717
* Description: Admin UI panel for registering custom post types and taxonomies in WordPress
1818
* Author: WebDevStudios
19-
* Version: 1.13.4
19+
* Version: 1.13.5
2020
* Author URI: https://webdevstudios.com/
2121
* Text Domain: custom-post-type-ui
2222
* Domain Path: /languages
2323
* License: GPL-2.0+
24+
* Requires at least: 5.9
25+
* Requires PHP: 5.6
2426
*/
2527

2628
// phpcs:disable WebDevStudios.All.RequireAuthor
@@ -31,8 +33,8 @@
3133
exit;
3234
}
3335

34-
define( 'CPT_VERSION', '1.13.4' ); // Left for legacy purposes.
35-
define( 'CPTUI_VERSION', '1.13.4' );
36+
define( 'CPT_VERSION', '1.13.5' ); // Left for legacy purposes.
37+
define( 'CPTUI_VERSION', '1.13.5' );
3638
define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );
3739

3840
/**
@@ -118,7 +120,7 @@ function cptui_deactivation() {
118120
function cptui_load_textdomain() {
119121
load_plugin_textdomain( 'custom-post-type-ui' );
120122
}
121-
add_action( 'plugins_loaded', 'cptui_load_textdomain' );
123+
add_action( 'init', 'cptui_load_textdomain' );
122124

123125
/**
124126
* Load our main menu.

inc/post-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ function cptui_manage_post_types() {
12231223
],
12241224
];
12251225

1226-
$selected = isset( $current ) ? disp_boolean( $current['can_export'] ) : '';
1226+
$selected = ( isset( $current ) && ! empty( $current['can_export'] ) ) ? disp_boolean( $current['can_export'] ) : '';
12271227
$select['selected'] = ! empty( $selected ) ? $current['can_export'] : '';
12281228
echo $ui->get_select_input( // phpcs:ignore.
12291229
[

inc/tools-sections/tools-debug.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function cptui_render_debuginfo_section() {
2020
wp_nonce_field( 'cptui_debuginfo_nonce_action', 'cptui_debuginfo_nonce_field' );
2121

2222
if ( ! empty( $_POST ) && isset( $_POST['cptui_debug_info_email'] ) && isset( $_POST['cptui_debuginfo_nonce_field'] ) ) {
23-
wp_verify_nonce( 'cptui_debuginfo_nonce_field', 'cptui_debuginfo_nonce_action' );
24-
25-
$email_args = [];
26-
$email_args['email'] = sanitize_text_field( $_POST['cptui_debug_info_email'] );
27-
$debuginfo->send_email( $email_args );
23+
if ( wp_verify_nonce( 'cptui_debuginfo_nonce_field', 'cptui_debuginfo_nonce_action' ) ) {
24+
$email_args = [];
25+
$email_args['email'] = sanitize_text_field( $_POST['cptui_debug_info_email'] );
26+
$debuginfo->send_email( $email_args );
27+
}
2828
}
2929

3030
echo '<p><label for="cptui_debug_info_email">' . esc_html__( 'Please provide an email address to send debug information to: ', 'custom-post-type-ui' ) . '</label><input type="email" id="cptui_debug_info_email" name="cptui_debug_info_email" value="" /></p>';

readme.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
=== Custom Post Type UI ===
22
Contributors: webdevstudios, pluginize, tw2113, vegasgeek, modemlooper, williamsba1
33
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
4+
Tags: custom post types, post type, taxonomy, content types, CPT, CMS, post, types, custom
55
Requires at least: 5.9
6-
Tested up to: 6.1.1
7-
Stable tag: 1.13.4
6+
Tested up to: 6.2
7+
Stable tag: 1.13.5
88
License: GPL-2.0+
99
Requires PHP: 5.6
1010

11-
Admin UI for creating custom post types and custom taxonomies for WordPress
11+
Admin UI for creating custom content types like post types and taxonomies
1212

1313
== Description ==
1414

@@ -36,6 +36,11 @@ Custom Post Type UI development is managed on GitHub, with official releases pub
3636

3737
== Changelog ==
3838

39+
= 1.13.5 - 2023-03-27 =
40+
* Fixed: Security issue in CPTUI Debug Info screen.
41+
* Fixed: Added `empty()` check for `can_export` parameters.
42+
* Updated: Changed textdomain loading from `plugins_loaded` to `init`.
43+
3944
= 1.13.4 - 2022-12-16 =
4045
* Fixed: Character encoding issue on CPTUI setting save in conjunction with PHP8 compatibility.
4146

@@ -91,6 +96,11 @@ Custom Post Type UI development is managed on GitHub, with official releases pub
9196

9297
== Upgrade Notice ==
9398

99+
= 1.13.5 - 2023-03-27 =
100+
* Fixed: Security issue in CPTUI Debug Info screen.
101+
* Fixed: Added `empty()` check for `can_export` parameters.
102+
* Updated: Changed textdomain loading from `plugins_loaded` to `init`.
103+
94104
= 1.13.4 - 2022-12-16 =
95105
* Fixed: Character encoding issue on CPTUI setting save in conjunction with PHP8 compatibility.
96106

0 commit comments

Comments
 (0)