From df12ec8be276ab9f9d2017475ef1b7ca5e07b468 Mon Sep 17 00:00:00 2001 From: idocme Date: Sun, 4 Oct 2020 12:39:54 +0300 Subject: [PATCH] Update api-template.php This edit will give the developer the control over acf_maybe_get_field when using get_field_object. this solves some possible issues. --- includes/api/api-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/api-template.php b/includes/api/api-template.php index 7a4dea7f..a6603864 100644 --- a/includes/api/api-template.php +++ b/includes/api/api-template.php @@ -107,7 +107,7 @@ function the_field( $selector, $post_id = false, $format_value = true ) { * @return $field (array) */ -function get_field_object( $selector, $post_id = false, $format_value = true, $load_value = true ) { +function get_field_object( $selector, $post_id = false, $format_value = true, $load_value = true, $strict = true ) { // compatibilty if( is_array($format_value) ) extract( $format_value ); @@ -118,7 +118,7 @@ function get_field_object( $selector, $post_id = false, $format_value = true, $l // get field key - $field = acf_maybe_get_field( $selector, $post_id ); + $field = acf_maybe_get_field( $selector, $post_id, $strict ); // bail early if no field found