Skip to content

Instantly share code, notes, and snippets.

@bonny
Created October 3, 2012 21:42
Show Gist options
  • Save bonny/3830056 to your computer and use it in GitHub Desktop.
Save bonny/3830056 to your computer and use it in GitHub Desktop.
example: simple_fields_get_post_value
<?
/**
* get all values or just the from a field in a field group
* @param $post_id
* @param $field_name_or_id name as string or field group id and field id as array.
* for example array(3,2) to fetch field 2 from field group 3
* @param $single bool return a single (the first) value or all values (as array)
* @return string or array
*/
simple_fields_get_post_value($post_id, $field_name_or_id, $single = true)
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment