find_all_galleries( $order_by, $order_dir , TRUE, $limit, $start, false);
$albumlist = $nggdb->find_all_album( 'name', $order_dir, $limit, $start);
?>
defaults, $field );
// extract( $field, EXTR_SKIP ); //Declare each item in $field as its own variable i.e.: $name, $value, $label, $time_format, $date_format and $show_week_number
$values = array();
foreach( $value as $key=>$item ) {
$items = explode( ',', $item );
foreach( $items as $item ) {
if ( is_numeric( $item ) )
$values[$key]['ngg_id'] = intval ( $item );
else
$values[$key]['ngg_form'] = strval( $item );
}
}
return $values;
}
/*
* format_value_for_api()
*
* This filter is applied to the $value after it is loaded from the db and before it is passed back to the api functions such as the_field
*
* @type filter
* @since 3.6
* @date 23/01/13
*
* @param $value - the value which was loaded from the database
* @param $post_id - the $post_id from which the value was loaded
* @param $field - the field array holding all the field options
*
* @return $value - the modified value
*/
function format_value_for_api( $value, $post_id, $field )
{
if ( $value[0]['ngg_form'] == 'null' ) {
$value = false;
}
return $value;
}
}
// create field
new ACF_NGGallery_Field();
?>