From cc32d9e7ca74a5e216b689864cdf2330c36351c7 Mon Sep 17 00:00:00 2001 From: Arshid Date: Sat, 4 Sep 2021 10:21:02 +0530 Subject: [PATCH 1/3] Update class-acf-field.php --- includes/fields/class-acf-field.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/fields/class-acf-field.php b/includes/fields/class-acf-field.php index 65ba4b2e..bf85248d 100755 --- a/includes/fields/class-acf-field.php +++ b/includes/fields/class-acf-field.php @@ -1,8 +1,8 @@ Date: Sat, 4 Sep 2021 17:19:43 +0530 Subject: [PATCH 2/3] Update class-acf-walker-taxonomy-field.php esc_attr() function expect string value. `$term->term_id = (int) $term->term_id;` casted to int. --- includes/walkers/class-acf-walker-taxonomy-field.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/walkers/class-acf-walker-taxonomy-field.php b/includes/walkers/class-acf-walker-taxonomy-field.php index bb780f7d..ff6bb5e8 100644 --- a/includes/walkers/class-acf-walker-taxonomy-field.php +++ b/includes/walkers/class-acf-walker-taxonomy-field.php @@ -94,6 +94,7 @@ public function end_lvl( &$output, $depth = 0, $args = array() ) { * @param int $id ID of the current term. */ public function start_el( &$output, $term, $depth = 0, $args = array(), $id = 0 ) { + $term->term_id = (int) $term->term_id; $is_selected = in_array( $term->term_id, $this->field['value'] ); // Generate array of checkbox input attributes. @@ -106,7 +107,7 @@ public function start_el( &$output, $term, $depth = 0, $args = array(), $id = 0 $input_attrs['checked'] = true; } - $output .= "\n" . '
  • ' . + $output .= "\n" . '
  • ' . '' . ' ' . '' . acf_esc_html( $term->name ) . '' . From 3a8d13d6daeb14a3ccc5b6a9c415ec316d0aa379 Mon Sep 17 00:00:00 2001 From: Arshid Date: Sat, 4 Sep 2021 17:27:34 +0530 Subject: [PATCH 3/3] Update form-comment.php Get post id from global $post. --- includes/forms/form-comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/forms/form-comment.php b/includes/forms/form-comment.php index 9defdce7..cbbfa9f2 100644 --- a/includes/forms/form-comment.php +++ b/includes/forms/form-comment.php @@ -209,7 +209,7 @@ function comment_form_field_comment( $html ) { global $post; // vars - $post_id = false; + $post_id = $post->ID;; // get field groups $field_groups = acf_get_field_groups(