Skip to content

Commit

Permalink
merge in 1.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tw2113 committed Dec 16, 2022
1 parent 0268154 commit c91e555
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
10 changes: 4 additions & 6 deletions custom-post-type-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
/**
* Plugin Name: Custom Post Type UI
* Plugin URI: https://github.com/WebDevStudios/custom-post-type-ui/
* Description: Admin panel for creating custom post types and custom taxonomies in WordPress
* Description: Admin UI panel for registering custom post types and taxonomies in WordPress
* Author: WebDevStudios
* Version: 1.13.3
* Version: 1.13.4
* Author URI: https://webdevstudios.com/
* Text Domain: custom-post-type-ui
* Domain Path: /languages
Expand All @@ -26,15 +26,13 @@
// phpcs:disable WebDevStudios.All.RequireAuthor
// phpcs:set WordPress.WP.I18n check_translator_comments false



// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}

define( 'CPT_VERSION', '1.13.3' ); // Left for legacy purposes.
define( 'CPTUI_VERSION', '1.13.3' );
define( 'CPT_VERSION', '1.13.4' ); // Left for legacy purposes.
define( 'CPTUI_VERSION', '1.13.4' );
define( 'CPTUI_WP_VERSION', get_bloginfo( 'version' ) );

/**
Expand Down
10 changes: 5 additions & 5 deletions inc/post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ function cptui_process_post_type() {
} elseif ( isset( $_POST['cpt_delete'] ) ) {
check_admin_referer( 'cptui_addedit_post_type_nonce_action', 'cptui_addedit_post_type_nonce_field' );

$filtered_data = filter_input( INPUT_POST, 'cpt_custom_post_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$filtered_data = filter_input( INPUT_POST, 'cpt_custom_post_type', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$result = cptui_delete_post_type( $filtered_data );
add_filter( 'cptui_post_type_deleted', '__return_true' );
}
Expand Down Expand Up @@ -2394,8 +2394,8 @@ function cptui_do_convert_post_type_posts() {
if ( apply_filters( 'cptui_convert_post_type_posts', false ) ) {
check_admin_referer( 'cptui_addedit_post_type_nonce_action', 'cptui_addedit_post_type_nonce_field' );

$original = filter_input( INPUT_POST, 'cpt_original', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
$new = filter_input( INPUT_POST, 'cpt_custom_post_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$original = filter_input( INPUT_POST, 'cpt_original', FILTER_SANITIZE_SPECIAL_CHARS );
$new = filter_input( INPUT_POST, 'cpt_custom_post_type', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );

// Return early if either fails to successfully validate.
if ( ! $original || ! $new ) {
Expand Down Expand Up @@ -2455,7 +2455,7 @@ function cptui_filtered_post_type_post_global() {

$items_arrays = array_merge( $default_arrays, $third_party_items_arrays );
foreach ( $items_arrays as $item ) {
$first_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$first_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );

if ( $first_result ) {
$filtered_data[ $item ] = $first_result;
Expand All @@ -2475,7 +2475,7 @@ function cptui_filtered_post_type_post_global() {
$items_string = array_merge( $default_strings, $third_party_items_strings );

foreach ( $items_string as $item ) {
$second_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
$second_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_SPECIAL_CHARS );
if ( $second_result ) {
$filtered_data[ $item ] = $second_result;
}
Expand Down
10 changes: 5 additions & 5 deletions inc/taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,7 @@ function cptui_process_taxonomy() {
} elseif ( isset( $_POST['cpt_delete'] ) ) {
check_admin_referer( 'cptui_addedit_taxonomy_nonce_action', 'cptui_addedit_taxonomy_nonce_field' );

$filtered_data = filter_input( INPUT_POST, 'cpt_custom_tax', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$filtered_data = filter_input( INPUT_POST, 'cpt_custom_tax', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$result = cptui_delete_taxonomy( $filtered_data );
add_filter( 'cptui_taxonomy_deleted', '__return_true' );
}
Expand Down Expand Up @@ -2016,8 +2016,8 @@ function cptui_do_convert_taxonomy_terms() {
if ( apply_filters( 'cptui_convert_taxonomy_terms', false ) ) {
check_admin_referer( 'cptui_addedit_taxonomy_nonce_action', 'cptui_addedit_taxonomy_nonce_field' );

$original = filter_input( INPUT_POST, 'tax_original', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
$new = filter_input( INPUT_POST, 'cpt_custom_tax', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$original = filter_input( INPUT_POST, 'tax_original', FILTER_SANITIZE_SPECIAL_CHARS );
$new = filter_input( INPUT_POST, 'cpt_custom_tax', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );

// Return early if either fails to successfully validate.
if ( ! $original || ! $new ) {
Expand Down Expand Up @@ -2076,7 +2076,7 @@ function cptui_filtered_taxonomy_post_global() {

$items_arrays = array_merge( $default_arrays, $third_party_items_arrays );
foreach ( $items_arrays as $item ) {
$first_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );
$first_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_REQUIRE_ARRAY );

if ( $first_result ) {
$filtered_data[ $item ] = $first_result;
Expand All @@ -2095,7 +2095,7 @@ function cptui_filtered_taxonomy_post_global() {

$items_strings = array_merge( $default_strings, $third_party_items_strings );
foreach ( $items_strings as $item ) {
$second_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_FULL_SPECIAL_CHARS );
$second_result = filter_input( INPUT_POST, $item, FILTER_SANITIZE_SPECIAL_CHARS );
if ( $second_result ) {
$filtered_data[ $item ] = $second_result;
}
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: custom post types, CPT, CMS, post, types, post type, taxonomy, tax, custom, content types, post types
Requires at least: 5.9
Tested up to: 6.1.1
Stable tag: 1.13.3
Stable tag: 1.13.4
License: GPL-2.0+
Requires PHP: 5.6

Expand Down Expand Up @@ -36,6 +36,9 @@ Custom Post Type UI development is managed on GitHub, with official releases pub

== Changelog ==

= 1.13.4 - 2022-12-16 =
* Fixed: Character encoding issue on CPTUI setting save in conjunction with PHP8 compatibility.

= 1.13.3 - 2022-12-15 =
* Fixed: Multiple PHP8 compatibility notices and warnings.
* Fixed: "Invalid argument for foreach" based notices around labels.
Expand Down Expand Up @@ -88,6 +91,9 @@ Custom Post Type UI development is managed on GitHub, with official releases pub

== Upgrade Notice ==

= 1.13.4 - 2022-12-16 =
* Fixed: Character encoding issue on CPTUI setting save in conjunction with PHP8 compatibility.

= 1.13.3 - 2022-12-15 =
* Fixed: Multiple PHP8 compatibility notices and warnings.
* Fixed: "Invalid argument for foreach" based notices around labels.
Expand Down

0 comments on commit c91e555

Please sign in to comment.