]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/media.php
WordPress 4.7
[autoinstalls/wordpress.git] / wp-admin / media.php
index 1462f7d42af97441cb8c192d5367e3345c83d0d0..3fbb9265d5b2a31526d78fa58dbfa76b3876785d 100644 (file)
@@ -14,13 +14,13 @@ $submenu_file = 'upload.php';
 
 wp_reset_vars(array('action'));
 
-switch( $action ) :
+switch ( $action ) {
 case 'editattachment' :
        $attachment_id = (int) $_POST['attachment_id'];
        check_admin_referer('media-form');
 
        if ( !current_user_can('edit_post', $attachment_id) )
-               wp_die ( __('You are not allowed to edit this attachment.') );
+               wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
 
        $errors = media_upload_form_handler();
 
@@ -40,7 +40,7 @@ case 'editattachment' :
                exit;
        }
 
-       // no break
+       // No break.
 case 'edit' :
        $title = __('Edit Media');
 
@@ -54,7 +54,7 @@ case 'edit' :
        $att_id = (int) $_GET['attachment_id'];
 
        if ( !current_user_can('edit_post', $att_id) )
-               wp_die ( __('You are not allowed to edit this attachment.') );
+               wp_die ( __('Sorry, you are not allowed to edit this attachment.') );
 
        $att = get_post($att_id);
 
@@ -80,8 +80,8 @@ case 'edit' :
 
        get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="http://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
-       '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Media_Add_New_Screen#Edit_Media">Documentation on Edit Media</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
        );
 
        require( ABSPATH . 'wp-admin/admin-header.php' );
@@ -90,12 +90,12 @@ case 'edit' :
        $message = '';
        $class = '';
        if ( isset($_GET['message']) ) {
-               switch ( $_GET['message'] ) :
-               case 'updated' :
-                       $message = __('Media attachment updated.');
-                       $class = 'updated';
-                       break;
-               endswitch;
+               switch ( $_GET['message'] ) {
+                       case 'updated' :
+                               $message = __('Media file updated.');
+                               $class = 'updated';
+                               break;
+               }
        }
        if ( $message )
                echo "<div id='message' class='$class'><p>$message</p></div>\n";
@@ -103,21 +103,21 @@ case 'edit' :
 ?>
 
 <div class="wrap">
-<h2>
+<h1>
 <?php
 echo esc_html( $title );
 if ( current_user_can( 'upload_files' ) ) { ?>
-       <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a>
+       <a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a>
 <?php } ?>
-</h2>
+</h1>
 
-<form method="post" action="" class="media-upload-form" id="media-single-form">
+<form method="post" class="media-upload-form" id="media-single-form">
 <p class="submit" style="padding-bottom: 0;">
 <?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
 </p>
 
 <div class="media-single">
-<div id='media-item-<?php echo $att_id; ?>' class='media-item'>
+<div id="media-item-<?php echo $att_id; ?>" class="media-item">
 <?php echo get_media_item( $att_id, array( 'toggle' => false, 'send' => false, 'delete' => false, 'show_title' => false, 'errors' => !empty($errors[$att_id]) ? $errors[$att_id] : null ) ); ?>
 </div>
 </div>
@@ -143,4 +143,4 @@ default:
        wp_redirect( admin_url('upload.php') );
        exit;
 
-endswitch;
+}