Skip to content

Commit efd7378

Browse files
committed
bug fix
1 parent 46def46 commit efd7378

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

custom-api-creator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public function save_custom_api_meta( $post_id ) {
258258

259259
foreach ( $fields as $meta_key => $post_key ) {
260260
if ( isset( $_POST[ $post_key ] ) ) {
261-
$value = $post_key === 'custom_api_sections' ? $this->sanitize_sections( $_POST[ $post_key ] ) : $this->sanitize_array_or_string( $_POST[ $post_key ] );
261+
$value = $post_key === 'custom_api_sections' ? $this->sanitize_sections( sanitize_text_field( wp_unslash( $_POST[ $post_key ] ) ) ) : $this->sanitize_array_or_string( sanitize_text_field( wp_unslash( $_POST[ $post_key ] ) ) );
262262
update_post_meta( $post_id, $meta_key, $value );
263263
} else {
264264
delete_post_meta( $post_id, $meta_key );

readme.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Stable tag: 1.0.1
88
Requires PHP: 7.0
99
License: GPLv2 or later
1010
License URI: https://www.gnu.org/licenses/gpl-2.0.html
11-
1211
Custom API Creator is a WordPress plugin that lets developers create flexible, secure REST API endpoints, customize data, and control access with role restrictions.
1312

1413

0 commit comments

Comments
 (0)