public static function CustomFieldCollectionInterface()
{
global $CUSTOM_WRITE_PANEL, $wpdb, $mf_domain, $post;
if (empty($CUSTOM_WRITE_PANEL)) {
return false;
}
//getting information of the CustomWrite Panel
$groups = RCCWP_CustomWritePanel::GetCustomGroups($CUSTOM_WRITE_PANEL->id, "id");
foreach ($groups as $group) {
//Only is drawed the group if has at least one field
$hasfields = RCCWP_CustomGroup::HasCustomfields($group->id);
if (!$hasfields) {
continue;
}
if ($group->name == "__default") {
$lang = get_bloginfo('language');
$name = "Magic Fields Custom Fields";
if ($lang == "en-US") {
$name = Inflect::singularize($CUSTOM_WRITE_PANEL->name);
}
} else {
$name = $group->name;
}
add_meta_box('panel_' . $group->id, $name, array('RCCWP_WritePostPage', 'metaboxContent'), $CUSTOM_WRITE_PANEL->type, 'normal', 'high', $group);
}
}