*/
/** Load WordPress Administration Bootstrap */
-require_once('./admin.php');
+require_once( dirname( __FILE__ ) . '/admin.php' );
$parent_file = 'upload.php';
$submenu_file = 'upload.php';
$att = get_post($att_id);
if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn’t exist. Perhaps it was deleted?') );
+ if ( 'attachment' !== $att->post_type ) wp_die( __('You attempted to edit an item that isn’t an attachment. Please go back and try again.') );
if ( $att->post_status == 'trash' ) wp_die( __('You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') );
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
- require( './admin-header.php' );
+ require( ABSPATH . 'wp-admin/admin-header.php' );
$parent_file = 'upload.php';
$message = '';
?>
<div class="wrap">
-<?php screen_icon(); ?>
<h2>
<?php
echo esc_html( $title );
<?php
- require( './admin-footer.php' );
+ require( ABSPATH . 'wp-admin/admin-footer.php' );
exit;
exit;
endswitch;
-
-
-?>