hide auto attach on media page

This commit is contained in:
John Bintz 2009-07-13 04:26:26 -04:00
parent c0de89ce1f
commit 83e1175f2a
1 changed files with 12 additions and 8 deletions

View File

@ -53,6 +53,8 @@ class ComicPressAddonCore extends ComicPressAddon {
} }
function setup_comic_metadata_buttons($form_fields, $post) { function setup_comic_metadata_buttons($form_fields, $post) {
global $pagenow;
$comic_image_types = array( $comic_image_types = array(
'none' => __('Not a comic', 'comicpress'), 'none' => __('Not a comic', 'comicpress'),
'comic' => __('Comic', 'comicpress'), 'comic' => __('Comic', 'comicpress'),
@ -82,14 +84,16 @@ class ComicPressAddonCore extends ComicPressAddon {
'input' => 'html', 'input' => 'html',
'html' => '<center>' . implode("\n", $field_html_lines) . '</center>' 'html' => '<center>' . implode("\n", $field_html_lines) . '</center>'
); );
$form_fields['auto_attach'] = array( if ($pagenow !== "media.php") {
'label' => __("Auto-attach?", 'comicpress'), $form_fields['auto_attach'] = array(
'input' => 'html', 'label' => __("Auto-attach?", 'comicpress'),
'html' => '<input type="checkbox" name="attachments[' . $post->ID . '][auto_attach]" value="yes" checked="checked" /> <em>' 'input' => 'html',
. __('Attach to this post w/o needing to insert into post', 'comicpress') 'html' => '<input type="checkbox" name="attachments[' . $post->ID . '][auto_attach]" value="yes" checked="checked" /> <em>'
. '</em>' . __('Attach to this post w/o needing to insert into post', 'comicpress')
); . '</em>'
);
}
return $form_fields; return $form_fields;
} }