import_value() public method

Import value to the property.
public import_value ( mixed $value, string $slug, integer $post_id ) : mixed
$value mixed
$slug string
$post_id integer
return mixed
 /**
  * Update value.
  *
  * @param  Papi_Core_Property $property
  * @param  mixed  $value
  * @param  string $slug
  * @param  int    $post_id
  *
  * @return array
  */
 protected function update_value($property, $value, $slug, $post_id)
 {
     if (!is_array($value) || !$this->should_update_array($slug)) {
         return $property->import_value($value, $slug, $post_id);
     }
     $old = papi_get_field($post_id, $slug, []);
     $value = array_merge($old, $value);
     $value = $property->import_value($value, $slug, $post_id);
     if ($property->import_setting('property_array_slugs')) {
         return papi_from_property_array_slugs($value, $slug);
     }
     return $property->update_value($value, $slug, $post_id);
 }