Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revisão 11901)
+++ wp-includes/post.php	(cópia de trabalho)
@@ -2689,7 +2689,7 @@
 	}
 
 	// remove intermediate images if there are any
-	$sizes = apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large'));
+	$sizes = get_intermediate_sizes();
 	foreach ( $sizes as $size ) {
 		if ( $intermediate = image_get_intermediate_size($postid, $size) ) {
 			$intermediate_file = apply_filters('wp_delete_file', $intermediate['path']);
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revisão 11901)
+++ wp-includes/media.php	(cópia de trabalho)
@@ -492,6 +492,57 @@
 }
 
 /**
+ * Get the available image sizes
+ * @since 2.9
+ * @return array Returns a filtered array of image size strings
+ */
+function get_intermediate_sizes($unfiltered = false)
+{
+	$core = get_core_intermediate_sizes(true);
+	$custom = get_custom_intermediate_sizes(true);
+	
+	$intermediate_sizes = array_merge($core, $custom);
+	
+	if (!$unfiltered)
+		$intermediate_sizes = apply_filters('intermediate_image_sizes', $intermediate_sizes);
+	return $intermediate_sizes;
+}
+
+/**
+ * Get the core image sizes
+ * @since 2.9
+ * @return array Returns a filtered array of image size strings
+ */
+function get_core_intermediate_sizes($unfiltered = false)
+{
+	$intermediate_sizes = array(__('Thumbnail') => 'thumbnail', __('Medium') => 'medium', __('Large') => 'large');
+	if (!$unfiltered)
+		$intermediate_sizes = apply_filters('intermediate_image_sizes', $intermediate_sizes);
+	return $intermediate_sizes;
+}
+
+/**
+ * Get the custom image sizes
+ * @since 2.9
+ * @return array Returns a filtered array of image size strings
+ */
+function get_custom_intermediate_sizes($unfiltered = false)
+{
+	$intermediate_sizes = array();
+	$custom_sizes = get_option('custom_image_sizes');
+	if (is_array($custom_sizes)) {
+		foreach ($custom_sizes as $size) {
+			$intermediate_sizes[$size] = sanitize_title_with_dashes($size);
+		}
+	}
+
+	if (!$unfiltered)
+		$intermediate_sizes = apply_filters('intermediate_image_sizes', $intermediate_sizes);
+	return $intermediate_sizes;
+}
+
+
+/**
  * Retrieve an image to represent an attachment.
  *
  * A mime icon for files, thumbnail or intermediate size for images.
Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php	(revisão 11901)
+++ wp-admin/admin-ajax.php	(cópia de trabalho)
@@ -1335,6 +1335,83 @@
 
 	die();
 	break;
+case 'custom-image-size-add' :
+	
+	if (isset($_POST['new_size_name'])) {
+		$custom_sizes = get_option('custom_image_sizes');
+		$name = $_POST['new_size_name'];
+		$slug = sanitize_title_with_dashes($name);
+		$protected_names = array('Full size', 'Thumbnail', 'Medium', 'Large');
+		
+		if (is_array($custom_sizes)) {
+			
+			// check for duplicates
+			if ( in_array($name, $custom_sizes) ) {
+				$suffix = 2;
+				do {
+					$alt_name = substr($name, 0, 200-(strlen($suffix)+1)). "-$suffix";
+					$check_name = in_array($alt_name, $custom_sizes);
+					$suffix++;
+				} while ($check_name);
+				$name = $alt_name;
+				$slug = sanitize_title_with_dashes($name);
+			}
+			array_push($custom_sizes, $name);
+		} else {
+			$custom_sizes = array($name);
+		}
+
+		if (!in_array($name, $protected_names) && update_option('custom_image_sizes', $custom_sizes)) {
+			$op = '<tr valign="top">
+				<th scope="row">
+					<span class="size_name">
+						' . $name . '
+					</span>
+					<p style="margin: 0;">
+					<a style="display: none; cursor: pointer;" class="remove_custom_size delete">
+					' . __('Remove') . '
+					</a>
+					</p>
+				</th>
+				<td>
+				<label for="' . $slug . '_size_w">' . __('Max Width') . '</label>
+				<input name="' . $slug . '_size_w" type="text" id="' . $slug . '_size_w" value="" class="small-text" />
+				<label for="' . $slug . '_size_h">' . __('Max Height') . '</label>
+				<input name="' . $slug . '_size_h" type="text" id="' . $slug . '_size_h" value="" class="small-text" /><br />
+				<input name="' . $slug . '_crop" type="checkbox" id="' . $slug . '_crop" value="1" />
+				<label for="' . $slug . '_crop">' . __('Crop image to exact dimensions') . '</label>
+				</td>
+				</tr>';
+			
+				echo $op;
+		}
+		  
+	}
+	
+	break;
+
+case 'custom-image-size-remove' :
+
+	$custom_sizes = get_option('custom_image_sizes');
+	$name = $_POST['size_name'];
+	
+	if (is_array($custom_sizes)) {
+		$key = array_search($name, $custom_sizes);
+		array_splice($custom_sizes, $key, 1);
+		
+		$slug = sanitize_title_with_dashes($name);
+		delete_option($slug . '_size_w');
+		delete_option($slug . '_size_h');
+		delete_option($slug . '_crop');
+		
+		update_option('custom_image_sizes', $custom_sizes);
+		echo 'ok';
+	}
+	
+	
+	
+	break;
+	
 default :
 	do_action( 'wp_ajax_' . $_POST['action'] );
 	die('0');
Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php	(revisão 11901)
+++ wp-admin/includes/media.php	(cópia de trabalho)
@@ -789,9 +789,10 @@
 function image_size_input_fields( $post, $checked = '' ) {
 
 		// get a list of the actual pixel dimensions of each possible intermediate version of this image
-		$size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
+		$size_names = get_intermediate_sizes(); 
+		$size_names[__('Full size')] = 'full';
 
-		foreach ( $size_names as $size => $name ) {
+		foreach ( $size_names as $name => $size ) {
 			$downsize = image_downsize($post->ID, $size);
 
 			// is this size selectable?
Index: wp-admin/includes/image.php
===================================================================
--- wp-admin/includes/image.php	(revisão 11901)
+++ wp-admin/includes/image.php	(cópia de trabalho)
@@ -105,8 +105,7 @@
 		$metadata['file'] = $file;
 
 		// make thumbnails and other intermediate sizes
-		$sizes = array('thumbnail', 'medium', 'large');
-		$sizes = apply_filters('intermediate_image_sizes', $sizes);
+		$sizes = get_intermediate_sizes();
 
 		foreach ($sizes as $size) {
 			$resized = image_make_intermediate_size( $full_path_file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") );
Index: wp-admin/js/options-media.js
===================================================================
--- wp-admin/js/options-media.js	(revisão 0)
+++ wp-admin/js/options-media.js	(revisão 0)
@@ -0,0 +1,88 @@
+jQuery(document).ready(function($) {
+
+	$('#add_new_size').click(function() {
+		addNewSize();
+	});
+	
+	$('#new_size').keypress(function(e) {
+		if (13 == e.keyCode){
+			addNewSize();
+			return false;
+		}
+	});
+	
+	$('#image_sizes_table').find('tr').mouseover(function() {
+		new_size_over($(this))
+		}).mouseout(function() {
+       		new_size_out($(this));
+       	}).find('.remove_custom_size').click(function() {
+    		remove_custom_size($(this));
+    	});
+	
+	function new_size_over(tr) {
+		tr.find('.remove_custom_size').show();
+	}
+	
+	function new_size_out(tr) {
+		tr.find('.remove_custom_size').hide();
+	}
+	
+	function remove_custom_size(button) {
+		if (confirm(messages.confirm_remove)) {
+			var name = button.parents('th').find('span.size_name').html();
+			del_size = $.ajax({
+	            type: 'POST',
+	            url: ajaxurl,
+	            dataType: 'html',
+	            data: {
+					size_name: name,
+					action: 'custom-image-size-remove'
+	            },
+	            
+	            complete: function() {
+	                if (del_size.responseText == 'ok') {
+	                	button.parents('tr').animate({backgroundColor: "#bf5e5e"}, 300).animate({opacity: "hide"}, 1000, "", function(){
+							$(this).remove();
+						});
+	                } else
+	                	alert(messages.error_remove);
+	            }
+	        });
+		}
+	}
+	
+	function addNewSize() {
+		
+		var sizeName = $('#new_size').val();
+		if (!sizeName) {
+			alert(messages.error_add_blank);
+			return;
+		}
+		new_size = $.ajax({
+            type: 'POST',
+            url: ajaxurl,
+            dataType: 'html',
+            data: {
+				new_size_name: sizeName,
+				action: 'custom-image-size-add'
+            },
+            
+            complete: function() {
+                if (new_size.responseText) {
+                	$('#image_sizes_table').append(new_size.responseText).find('tr:last').css('background-color', '#F9F9F9').animate({backgroundColor: "#FFFFE0"}, 400).animate({backgroundColor: "#F9F9F9"}, 1000).mouseover(function() {
+                		new_size_over($(this));
+                	}).mouseout(function() {
+                		new_size_out($(this));
+                	}).find('.remove_custom_size').click(function() {
+                		remove_custom_size($(this));
+                	});
+                } else {
+                	alert(messages.error_add);
+                }
+            }
+        });
+		
+	}
+
+
+});
Index: wp-admin/options-media.php
===================================================================
--- wp-admin/options-media.php	(revisão 11901)
+++ wp-admin/options-media.php	(cópia de trabalho)
@@ -9,6 +9,14 @@
 /** WordPress Administration Bootstrap */
 require_once('admin.php');
 
+wp_enqueue_script('options-media', admin_url() . '/js/options-media.js', array('jquery'));
+wp_localize_script('options-media', 'messages', array(
+    'confirm_remove' => __('Are you sure you want to remove this size?'),
+    'error_remove' => __('Fail to remove this size'),
+    'error_add' => __('Fail to add size. Try using a different name'),
+    'error_add_blank' => __('Please fill in a name for the new size')
+));
+
 if ( ! current_user_can('manage_options') )
 	wp_die(__('You do not have sufficient permissions to manage options for this blog.'));
 
@@ -29,7 +37,7 @@
 <h3><?php _e('Image sizes') ?></h3>
 <p><?php _e('The sizes listed below determine the maximum dimensions in pixels to use when inserting an image into the body of a post.'); ?></p>
 
-<table class="form-table">
+<table class="form-table" id="image_sizes_table">
 <tr valign="top">
 <th scope="row"><?php _e('Thumbnail size') ?></th>
 <td>
@@ -62,9 +70,54 @@
 </fieldset></td>
 </tr>
 
+<?php 
+
+$custom_sizes = get_custom_intermediate_sizes();
+
+if (is_array($custom_sizes)) :
+	foreach ($custom_sizes as $name => $size) : 
+?>
+		<tr valign="top">
+			<th scope="row">
+				<span class="size_name"><?php echo $name; ?></span>
+				<p style="margin: 0;">
+					<a style="display: none; cursor: pointer;" class="remove_custom_size delete">
+						<?php _e('Remove'); ?>
+					</a>
+				</p>
+			</th>
+			<td>
+				<label for="<?php echo $size; ?>_size_w"><?php _e('Max Width'); ?></label>
+				<input name="<?php echo $size; ?>_size_w" type="text" id="<?php echo $size; ?>_size_w" value="<?php form_option($size . '_size_w'); ?>" class="small-text" />
+				<label for="<?php echo $size; ?>_size_h"><?php _e('Max Height'); ?></label>
+				<input name="<?php echo $size; ?>_size_h" type="text" id="<?php echo $size; ?>_size_h" value="<?php form_option($size . '_size_h'); ?>" class="small-text" /><br />
+				<input name="<?php echo $size; ?>_crop" type="checkbox" id="<?php echo $size; ?>_crop" value="1" <?php checked('1', get_option($size . '_crop')); ?>/>
+				<label for="<?php echo $size; ?>_crop"><?php _e('Crop image to exact dimensions'); ?></label>
+			</td>
+		</tr>
+
+<?php 
+	endforeach;
+endif; //is_array($custom_sizes)
+
+?>
+</table>
+
+<table class="form-table">
+<tr valign="top">
+<th scope="row"><?php _e('Add new') ?></th>
+<td>
+<label for="new_size"><?php _e('New size name'); ?></label>
+<input name="new_size" type="text" id="new_size" value="" />
+<a style="cursor: pointer;" id="add_new_size"><?php _e('Add') ?></a>
+</td>
+</tr>
+
+
 <?php do_settings_fields('media', 'default'); ?>
 </table>
 
+
 <?php do_settings_sections('media'); ?>
 
 <p class="submit">
Index: wp-admin/options.php
===================================================================
--- wp-admin/options.php	(revisão 11901)
+++ wp-admin/options.php	(cópia de trabalho)
@@ -25,7 +25,7 @@
 	'general' => array( 'blogname', 'blogdescription', 'admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'default_role', 'timezone_string' ),
 	'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),
 	'misc' => array( 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path' ),
-	'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
+	'media' => array( 'image_default_size', 'image_default_align', 'image_default_link_type' ),
 	'privacy' => array( 'blog_public' ),
 	'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ),
 	'writing' => array( 'default_post_edit_rows', 'use_smilies', 'ping_sites', 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ),
@@ -33,6 +33,16 @@
 if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl';
 if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home';
 
+// Get image sizes
+if ($image_sizes = get_intermediate_sizes()) {
+	foreach ($image_sizes as $size) {
+		array_push($whitelist_options['media'], $size . '_size_w');
+		array_push($whitelist_options['media'], $size . '_size_h');
+		array_push($whitelist_options['media'], $size . '_crop');
+	}
+}
+    #array_merge($whitelist_options['media'], $custom_image_sizes);
+
 $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options );
 
 if ( !current_user_can('manage_options') )
Index: wp-admin/css/media.css
===================================================================
--- wp-admin/css/media.css	(revisão 11901)
+++ wp-admin/css/media.css	(cópia de trabalho)
@@ -1 +1 @@
-div#media-upload-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;height:2.5em;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;position:absolute;left:0;bottom:-1px;}div#media-upload-error{margin:1em;font-weight:bold;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}.media-upload-form p.help{margin:0;padding:0;}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em 0;padding:0;}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left;}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left;}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left;}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left;}tr.image-size td{width:460px;}tr.image-size div.image-size-item{float:left;width:25%;margin:0;}#library-form .progress,#gallery-form .progress,#flash-upload-ui,.insert-gallery,.describe.startopen,.describe.startclosed{display:none;}.media-item .thumbnail{max-width:128px;max-height:128px;}thead.media-item-info tr{background-color:transparent;}thead.media-item-info th,thead.media-item-info td{border:none;margin:0;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.describe td{vertical-align:middle;padding:0 5px 0 0;}.describe td.A1{width:132px;}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid;}.describe-toggle-on,.describe-toggle-off{display:block;line-height:36px;float:right;margin-right:20px;}.describe-toggle-off{display:none;}.hidden{height:0;width:0;overflow:hidden;border:none;}#media-upload .media-upload-form p{margin:0 1em 1em 0;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}#media-upload tr.image-size td.field{text-align:center;}#media-upload #media-items{border-width:1px;border-style:solid;border-bottom:none;width:623px;}#media-upload .media-item{border-bottom-width:1px;border-bottom-style:solid;min-height:36px;width:100%;}#media-upload .ui-sortable .media-item{cursor:move;}.filename{line-height:36px;padding:0 10px;overflow:hidden;}#media-upload .describe{padding:5px;width:100%;clear:both;cursor:default;}#media-upload .slidetoggle{border-top-width:1px;border-top-style:solid;}#media-upload .describe th.label{padding-top:.5em;text-align:left;min-width:120px;}#media-upload tr.align td.field{text-align:center;}#media-upload tr.image-size{margin-bottom:1em;height:3em;}#media-upload #filter{width:623px;}#media-upload #filter .subsubsub{margin:8px 0;}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto;}#media-upload .del-attachment{display:none;margin:5px 0;}.menu_order{float:right;font-size:11px;margin:10px 10px 0;}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px;}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60);}#media-upload th.order-head{width:25%;text-align:center;}#media-upload .widefat{width:626px;border-style:solid solid none;}.sorthelper{height:37px;width:623px;display:block;}#gallery-settings th.label{width:160px;}#gallery-settings #basic th.label{padding:5px 5px 5px 0;}#gallery-settings .title{clear:both;padding:0 0 3px;border-bottom-style:solid;border-bottom-width:1px;font-family:Georgia,"Times New Roman",Times,serif;font-size:1.6em;border-bottom-color:#DADADA;color:#5A5A5A;}h3.media-title{color:#5A5A5A;font-family:Georgia,"Times New Roman",Times,serif;font-size:1.6em;font-weight:normal;}#gallery-settings .describe td{vertical-align:middle;height:3.5em;}#gallery-settings .describe th.label{padding-top:.5em;text-align:left;}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default;}#gallery-settings .describe select{width:15em;border:1px solid #dfdfdf;}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px;}#gallery-settings .align .field label{margin:0 1.5em 0 0;}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf;}#gallery-settings select#columns{width:6em;}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px;}#sort-buttons a{text-decoration:none;}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px;}#sort-buttons span{margin-right:25px;}
\ No newline at end of file
+div#media-upload-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;height:2.5em;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;position:absolute;left:0;bottom:-1px;}div#media-upload-error{margin:1em;font-weight:bold;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}.media-upload-form p.help{margin:0;padding:0;}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em 0;padding:0;}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left;}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left;}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left;}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left;}tr.image-size td{width:460px;}tr.image-size div.image-size-item{float:left;width:25%;margin:0;min-height: 45px;height: auto !important;height: 45px;}#library-form .progress,#gallery-form .progress,#flash-upload-ui,.insert-gallery,.describe.startopen,.describe.startclosed{display:none;}.media-item .thumbnail{max-width:128px;max-height:128px;}thead.media-item-info tr{background-color:transparent;}thead.media-item-info th,thead.media-item-info td{border:none;margin:0;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.describe td{vertical-align:middle;padding:0 5px 0 0;}.describe td.A1{width:132px;}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid;}.describe-toggle-on,.describe-toggle-off{display:block;line-height:36px;float:right;margin-right:20px;}.describe-toggle-off{display:none;}.hidden{height:0;width:0;overflow:hidden;border:none;}#media-upload .media-upload-form p{margin:0 1em 1em 0;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}#media-upload tr.image-size td.field{text-align:center;}#media-upload #media-items{border-width:1px;border-style:solid;border-bottom:none;width:623px;}#media-upload .media-item{border-bottom-width:1px;border-bottom-style:solid;min-height:36px;width:100%;}#media-upload .ui-sortable .media-item{cursor:move;}.filename{line-height:36px;padding:0 10px;overflow:hidden;}#media-upload .describe{padding:5px;width:100%;clear:both;cursor:default;}#media-upload .slidetoggle{border-top-width:1px;border-top-style:solid;}#media-upload .describe th.label{padding-top:.5em;text-align:left;min-width:120px;}#media-upload tr.align td.field{text-align:center;}#media-upload tr.image-size{margin-bottom:1em;height:3em;}#media-upload #filter{width:623px;}#media-upload #filter .subsubsub{margin:8px 0;}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto;}#media-upload .del-attachment{display:none;margin:5px 0;}.menu_order{float:right;font-size:11px;margin:10px 10px 0;}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px;}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60);}#media-upload th.order-head{width:25%;text-align:center;}#media-upload .widefat{width:626px;border-style:solid solid none;}.sorthelper{height:37px;width:623px;display:block;}#gallery-settings th.label{width:160px;}#gallery-settings #basic th.label{padding:5px 5px 5px 0;}#gallery-settings .title{clear:both;padding:0 0 3px;border-bottom-style:solid;border-bottom-width:1px;font-family:Georgia,"Times New Roman",Times,serif;font-size:1.6em;border-bottom-color:#DADADA;color:#5A5A5A;}h3.media-title{color:#5A5A5A;font-family:Georgia,"Times New Roman",Times,serif;font-size:1.6em;font-weight:normal;}#gallery-settings .describe td{vertical-align:middle;height:3.5em;}#gallery-settings .describe th.label{padding-top:.5em;text-align:left;}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default;}#gallery-settings .describe select{width:15em;border:1px solid #dfdfdf;}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px;}#gallery-settings .align .field label{margin:0 1.5em 0 0;}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf;}#gallery-settings select#columns{width:6em;}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px;}#sort-buttons a{text-decoration:none;}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px;}#sort-buttons span{margin-right:25px;}
\ No newline at end of file
Index: wp-admin/css/media.dev.css
===================================================================
--- wp-admin/css/media.dev.css	(revisão 11901)
+++ wp-admin/css/media.dev.css	(cópia de trabalho)
@@ -79,6 +79,9 @@
 	float: left;
 	width: 25%;
 	margin: 0;
+	min-height: 45px;
+	height: auto !important;
+	height: 45px;
 }
 
 #library-form .progress,
Index: wp-admin/js/options-media.js
===================================================================
--- wp-admin/js/options-media.js	(revisão 0)
+++ wp-admin/js/options-media.js	(revisão 0)
@@ -0,0 +1,88 @@
+jQuery(document).ready(function($) {
+
+	$('#add_new_size').click(function() {
+		addNewSize();
+	});
+	
+	$('#new_size').keypress(function(e) {
+		if (13 == e.keyCode){
+			addNewSize();
+			return false;
+		}
+	});
+	
+	$('#image_sizes_table').find('tr').mouseover(function() {
+		new_size_over($(this))
+		}).mouseout(function() {
+       		new_size_out($(this));
+       	}).find('.remove_custom_size').click(function() {
+    		remove_custom_size($(this));
+    	});
+	
+	function new_size_over(tr) {
+		tr.find('.remove_custom_size').show();
+	}
+	
+	function new_size_out(tr) {
+		tr.find('.remove_custom_size').hide();
+	}
+	
+	function remove_custom_size(button) {
+		if (confirm(messages.confirm_remove)) {
+			var name = button.parents('th').find('span.size_name').html();
+			del_size = $.ajax({
+	            type: 'POST',
+	            url: ajaxurl,
+	            dataType: 'html',
+	            data: {
+					size_name: name,
+					action: 'custom-image-size-remove'
+	            },
+	            
+	            complete: function() {
+	                if (del_size.responseText == 'ok') {
+	                	button.parents('tr').animate({backgroundColor: "#bf5e5e"}, 300).animate({opacity: "hide"}, 1000, "", function(){
+							$(this).remove();
+						});
+	                } else
+	                	alert(messages.error_remove);
+	            }
+	        });
+		}
+	}
+	
+	function addNewSize() {
+		
+		var sizeName = $('#new_size').val();
+		if (!sizeName) {
+			alert(messages.error_add_blank);
+			return;
+		}
+		new_size = $.ajax({
+            type: 'POST',
+            url: ajaxurl,
+            dataType: 'html',
+            data: {
+				new_size_name: sizeName,
+				action: 'custom-image-size-add'
+            },
+            
+            complete: function() {
+                if (new_size.responseText) {
+                	$('#image_sizes_table').append(new_size.responseText).find('tr:last').css('background-color', '#F9F9F9').animate({backgroundColor: "#FFFFE0"}, 400).animate({backgroundColor: "#F9F9F9"}, 1000).mouseover(function() {
+                		new_size_over($(this));
+                	}).mouseout(function() {
+                		new_size_out($(this));
+                	}).find('.remove_custom_size').click(function() {
+                		remove_custom_size($(this));
+                	});
+                } else {
+                	alert(messages.error_add);
+                }
+            }
+        });
+		
+	}
+
+
+});
