post_parent) ? get_post($post->post_parent) : $post; $field['value'] = str_replace('parent.', '', $field['value']); $value = $this->getCustomFieldsValues($post, $field); $field = $fieldBeforeReplacedValue; } else { $value = $this->getCustomFieldsValues($post, $field); } return $value; } }