diff --git a/wp-admin/css/wp-admin-rtl.dev.css b/wp-admin/css/wp-admin-rtl.dev.css index c57f39be41..23968433fc 100644 --- a/wp-admin/css/wp-admin-rtl.dev.css +++ b/wp-admin/css/wp-admin-rtl.dev.css @@ -696,12 +696,6 @@ th.sorted a span { float: right; } -.postarea #add-media-button { - float: left; - right: auto; - left: 10px; -} - #edButtonPreview, #edButtonHTML { margin: 5px 0 0 5px; @@ -713,10 +707,6 @@ th.sorted a span { margin-left: 15px; } -.wp-media-buttons a { - padding: 0 10px 5px 0; -} - .submitbox .submit { text-align: right; } @@ -1566,8 +1556,9 @@ ol.ol-decimal { } #dashboard_quick_press #media-buttons { margin: 0 5em .5em 0; - padding: 0 10px 0 0; + padding: 0; } + #dashboard-widgets #dashboard_quick_press form p.submit { margin-left: 0; margin-right: 4.6em; diff --git a/wp-admin/css/wp-admin.dev.css b/wp-admin/css/wp-admin.dev.css index 6284428fa1..0c6607d223 100644 --- a/wp-admin/css/wp-admin.dev.css +++ b/wp-admin/css/wp-admin.dev.css @@ -2819,27 +2819,6 @@ input#link_url { float: left; } -.postarea #add-media-button { - float: right; - margin: 7px 0pt 0pt; - position: relative; - right: 10px; -} - -.wp-media-buttons { - cursor: default; - padding: 8px 8px 0; -} - -.wp-media-buttons a { - cursor: pointer; - padding: 0 0 5px 10px; -} - -.wp-media-buttons img { - vertical-align: middle; -} - #submitpost #ajax-loading, #submitpost .ajax-loading { vertical-align: middle; @@ -5291,20 +5270,13 @@ div.postbox div.inside { margin: 0 0 1em 5em; } -#media-buttons { +#dashboard_quick_press #media-buttons { margin: 0 0 .5em 5em; - padding: 0 0 0 10px; - line-height: 17px; + padding: 0; +} + +#dashboard_quick_press #media-buttons a { color: #777; - cursor: default; -} - -#media-buttons a { - margin: 0 3px; -} - -#media-buttons a img { - vertical-align: middle; } #dashboard-widgets #dashboard_quick_press form p.submit { diff --git a/wp-admin/images/media-button.png b/wp-admin/images/media-button.png new file mode 100644 index 0000000000..82550734ae Binary files /dev/null and b/wp-admin/images/media-button.png differ diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 7b15606f6c..4c817ed3c2 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -374,25 +374,25 @@ document.body.className = c; * @since 2.5.0 */ function media_buttons($editor_id = 'content') { - $out = _media_button(__('Add Media'), 'images/media-button-video.gif?ver=20100531', 'media', $editor_id); - $context = apply_filters('media_buttons_context', __('Upload/Insert %s')); - printf($context, $out); + $img = ''; + + echo '' . sprintf( $context, $img ) . ''; } add_action( 'media_buttons', 'media_buttons' ); function _media_button($title, $icon, $type, $id) { - return "$title"; + return "$title"; } -function get_upload_iframe_src($type) { +function get_upload_iframe_src( $type = null ) { global $post_ID; $uploading_iframe_ID = (int) $post_ID; $upload_iframe_src = add_query_arg( 'post_id', $uploading_iframe_ID, admin_url('media-upload.php') ); - if ( 'media' != $type ) + if ( $type && 'media' != $type ) $upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src); $upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src); @@ -1456,7 +1456,7 @@ function media_upload_type_url_form($type = null, $errors = null, $id = null) { -

+