/** * Get Field Value * * Get the value if it is a post type or another page form * * @param mixed|string $field * @param string $group * @param string $sub * * @return mixed|null|string */ protected function get_field_value($field, $group, $sub) { global $post; $group = $this->get_opt_by_test($group, $this->group); if (isset($post->ID)) { $value = acpt_get::meta("{$group}[{$field}]{$sub}"); } else { $value = acpt_get::option("{$group}[{$field}]{$sub}"); } return $value; }