From 83e1175f2a434597f79ee30a96bfe720b65942aa Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 13 Jul 2009 04:26:26 -0400 Subject: [PATCH] hide auto attach on media page --- addons/Core/Core.inc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/addons/Core/Core.inc b/addons/Core/Core.inc index 97b2c29..01b898e 100644 --- a/addons/Core/Core.inc +++ b/addons/Core/Core.inc @@ -53,6 +53,8 @@ class ComicPressAddonCore extends ComicPressAddon { } function setup_comic_metadata_buttons($form_fields, $post) { + global $pagenow; + $comic_image_types = array( 'none' => __('Not a comic', 'comicpress'), 'comic' => __('Comic', 'comicpress'), @@ -82,14 +84,16 @@ class ComicPressAddonCore extends ComicPressAddon { 'input' => 'html', 'html' => '
' . implode("\n", $field_html_lines) . '
' ); - - $form_fields['auto_attach'] = array( - 'label' => __("Auto-attach?", 'comicpress'), - 'input' => 'html', - 'html' => ' ' - . __('Attach to this post w/o needing to insert into post', 'comicpress') - . '' - ); + + if ($pagenow !== "media.php") { + $form_fields['auto_attach'] = array( + 'label' => __("Auto-attach?", 'comicpress'), + 'input' => 'html', + 'html' => ' ' + . __('Attach to this post w/o needing to insert into post', 'comicpress') + . '' + ); + } return $form_fields; }