/** * Drawing our custom fields */ 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); 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") { $name = "Magic Fields Custom Fields"; } else { $name = $group->name; } add_meta_box('panel_' . $group->id, $name, array('RCCWP_WritePostPage', 'metaboxContent'), $CUSTOM_WRITE_PANEL->type, 'normal', 'high', $group); } }