} ?> </ul> <!--!Custom Fields --> <h4 style="text-decoration: underline;"><?php _e('Custom Fields', CCTM_TXTDOMAIN); ?> </h4> <ul style="margin-left:20px;"> <?php foreach ($data['custom_field_defs'] as $fieldname => $d) { $img = ''; $desc = ''; $icon_src = CCTM::get_custom_icons_src_dir() . $d['type'] . '.png'; if (!CCTM::is_valid_img($icon_src)) { $icon_src = self::get_custom_icons_src_dir() . 'default.png'; } $img = '<img src="' . $icon_src . '" height="16" width="16" alt="wp"/>'; $desc = $d['description']; printf('<li><strong>%s %s</strong>: %s</li>', $img, $fieldname, $desc); } ?> </ul> <br /> <hr /> <strong><?php _e('Source file', CCTM_TXTDOMAIN); ?>
} if (isset($metaboxes['advanced'])) { foreach ($metaboxes['advanced'] as $m => $items) { $data['advanced_boxes'] .= CCTM_Metabox::get_metabox_holder($m, $items); } } if (isset($metaboxes['side'])) { foreach ($metaboxes['side'] as $m => $items) { $data['side_boxes'] .= CCTM_Metabox::get_metabox_holder($m, $items); } } //print_r($data); exit; // List the unused custom fields $remaining_custom_fields = array_diff($all_custom_fields, $active_custom_fields); foreach ($remaining_custom_fields as $cf) { $d = self::$data['custom_field_defs'][$cf]; if (!($FieldObj = CCTM::load_object($d['type'], 'fields'))) { continue; } $d['icon'] = $FieldObj->get_icon(); if (!CCTM::is_valid_img($d['icon'])) { $d['icon'] = self::get_custom_icons_src_dir() . 'default.png'; } $d['class'] = 'ui-state-default'; $d['metabox'] = ''; $d['edit_field_link'] = sprintf('<a href="%s/wp-admin/admin.php?page=cctm_fields&a=edit_custom_field&field=%s&_wpnonce=%s" title="%s" class="linklike">%s</a>', get_site_url(), $d['name'], wp_create_nonce('cctm_edit_field'), __('Edit this custom field', CCTM_TXTDOMAIN), __('Edit', CCTM_TXTDOMAIN)); $data['unused'] .= CCTM::load_view('li_field.php', $d); } $data['content'] = CCTM::load_view('metaboxes.php', $data); print CCTM::load_view('templates/default.php', $data); /*EOF*/