diff --git a/classes/ComicPressAdmin.inc b/classes/ComicPressAdmin.inc index f63a2a4..114ec73 100644 --- a/classes/ComicPressAdmin.inc +++ b/classes/ComicPressAdmin.inc @@ -101,37 +101,17 @@ class ComicPressAdmin { function setup_comic_metadata_buttons($form_fields, $post) { global $pagenow; - $current_type = get_post_meta($post->ID, 'comic_image_type', true); - if (empty($current_type)) { $current_type = reset(array_keys($this->comic_image_types)); } - - $field_html_lines = array(); - $field_html_lines[] = ''; - foreach ($this->comic_image_types as $field => $label) { - $field_html_lines[] = ''; - } - - $form_fields['comic_image_type'] = array( - 'label' => __("Comic Image Type", 'comicpress'), - 'input' => 'html', - 'html' => '
' . implode("\n", $field_html_lines) . '
' - ); + $comicpress_management = get_post_meta($post->ID, 'comicpress_management', true); if ($pagenow !== "media.php") { $form_fields['auto_attach'] = array( - 'label' => __("Auto-attach?", 'comicpress'), + 'label' => __("Let ComicPress Manage?", 'comicpress'), 'input' => 'html', - 'html' => ' ' - . __('Attach to this post w/o needing to insert into post', 'comicpress') - . '' + 'html' => '' + . '' + . '' ); } @@ -233,14 +213,12 @@ class ComicPressAdmin { */ function handle_update_attachments() { foreach ($_POST['attachments'] as $post_id => $settings) { - if (isset($settings['comic_image_type'])) { - update_post_meta($post_id, 'comic_image_type', $settings['comic_image_type']); - } - if (isset($settings['auto_attach']) && isset($settings['post_parent'])) { + if (isset($settings['comicpress_management'])) { $media_post = get_post($post_id); $media_post->post_parent = $settings['post_parent']; wp_update_post($media_post); } + update_post_meta($post_id, 'comicpress_management', isset($settings['comicpress_management'])); } }