wp/wp-admin/media.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
--- a/wp/wp-admin/media.php	Mon Jun 08 16:11:51 2015 +0000
+++ b/wp/wp-admin/media.php	Tue Jun 09 03:35:32 2015 +0200
@@ -14,7 +14,7 @@
 
 wp_reset_vars(array('action'));
 
-switch( $action ) :
+switch ( $action ) {
 case 'editattachment' :
 	$attachment_id = (int) $_POST['attachment_id'];
 	check_admin_referer('media-form');
@@ -40,7 +40,7 @@
 		exit;
 	}
 
-	// no break
+	// No break.
 case 'edit' :
 	$title = __('Edit Media');
 
@@ -80,8 +80,8 @@
 
 	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" target="_blank">Documentation on Edit Media</a>') . '</p>' .
+	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
 	);
 
 	require( ABSPATH . 'wp-admin/admin-header.php' );
@@ -90,12 +90,12 @@
 	$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 attachment updated.');
+				$class = 'updated';
+				break;
+		}
 	}
 	if ( $message )
 		echo "<div id='message' class='$class'><p>$message</p></div>\n";
@@ -103,7 +103,6 @@
 ?>
 
 <div class="wrap">
-<?php screen_icon(); ?>
 <h2>
 <?php
 echo esc_html( $title );
@@ -112,13 +111,13 @@
 <?php } ?>
 </h2>
 
-<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>
@@ -144,4 +143,4 @@
 	wp_redirect( admin_url('upload.php') );
 	exit;
 
-endswitch;
+}