Exemple #1
0
 /**
  * Get meta value
  * If field is cloneable, value is saved as a single entry in DB
  * Otherwise value is saved as multiple entries (for backward compatibility)
  *
  * @see "save" method for better understanding
  *
  * @param $post_id
  * @param $saved
  * @param $field
  *
  * @return array
  */
 static function meta($post_id, $saved, $field)
 {
     if (isset($field['parent']) && $field['parent']) {
         $post = get_post($post_id);
         return $post->post_parent;
     }
     return parent::meta($post_id, $saved, $field);
 }