From 57aabc1712d46279ed555440740b3170dbf597a8 Mon Sep 17 00:00:00 2001 From: Sapayth Hossain Date: Mon, 20 Oct 2025 15:21:49 +0600 Subject: [PATCH 1/2] fix: Custom Taxonomies Pro Fields --- includes/Ajax/Admin_Form_Builder_Ajax.php | 10 +----- includes/Traits/FieldableTrait.php | 44 +++++++++++++++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/includes/Ajax/Admin_Form_Builder_Ajax.php b/includes/Ajax/Admin_Form_Builder_Ajax.php index c9762113e..014dac5e6 100644 --- a/includes/Ajax/Admin_Form_Builder_Ajax.php +++ b/includes/Ajax/Admin_Form_Builder_Ajax.php @@ -95,10 +95,6 @@ public function wpuf_get_post_taxonomies_old() { wp_send_json_error( __( 'Unauthorized operation', 'wp-user-frontend' ) ); } - if ( ! current_user_can( wpuf_admin_role() ) ) { - wp_send_json_error( __( 'Unauthorized operation', 'wp-user-frontend' ) ); - } - if ( isset( $post_type ) && empty( $post_data['post_type'] ) ) { wp_send_json_error( __( 'Invalid post type', 'wp-user-frontend' ) ); } @@ -146,10 +142,6 @@ public function get_post_taxonomies() { wp_send_json_error( __( 'Unauthorized operation', 'wp-user-frontend' ) ); } - if ( ! current_user_can( wpuf_admin_role() ) ) { - wp_send_json_error( __( 'Unauthorized operation', 'wp-user-frontend' ) ); - } - if ( isset( $post_type ) && empty( $post_data['post_type'] ) ) { wp_send_json_error( __( 'Invalid post type', 'wp-user-frontend' ) ); } @@ -186,7 +178,7 @@ public function get_post_taxonomies() { $cat .= '
'; $cat .= '
'; $cat .= '
'; $cat .= '