if ( $parsed_args['toggle'
] ) { $class =
empty( $parsed_args['errors'
] ) ? 'startclosed' : 'startopen';
$toggle_links = "
<a class='toggle describe-toggle-on' href='#'>
$toggle_on</a>
<a class='toggle describe-toggle-off' href='#'>
$toggle_off</a>";
} else { $class = '';
$toggle_links = '';
} $display_title =
( !
empty( $title ) ) ?
$title :
$filename; // $title shouldn't ever be empty, but just in case.
$display_title =
$parsed_args['show_title'
] ? "<div class='filename new'><span class='title'>" .
wp_html_excerpt( $display_title, 60, '…'
) . '</span></div>' : '';
$gallery =
( ( isset( $_REQUEST['tab'
] ) && 'gallery' ===
$_REQUEST['tab'
] ) || ( isset( $redir_tab ) && 'gallery' ===
$redir_tab ) );
$order = '';
foreach ( $form_fields as $key =>
$val ) { if ( 'menu_order' ===
$key ) { if ( $gallery ) { $order = "<div class='menu_order'> <input class='menu_order_input' type='text' id='attachments[
$attachment_id][menu_order]' name='attachments[
$attachment_id][menu_order]' value='" .
esc_attr( $val['value'
] ) . "' /></div>";
} else { $order = "<input type='hidden' name='attachments[
$attachment_id][menu_order]' value='" .
esc_attr( $val['value'
] ) . "' />";
}