diff --git a/wp-admin/gears-manifest.php b/wp-admin/gears-manifest.php index 961fdb23f3..ba965a4e05 100644 --- a/wp-admin/gears-manifest.php +++ b/wp-admin/gears-manifest.php @@ -64,7 +64,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); ?> { "betaManifestVersion" : 1, -"version" : "_20080710", +"version" : "_20080710a", "entries" : [ @@ -131,7 +131,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311c" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311d" }, { "url" : "../wp-includes/js/tinymce/tiny_mce.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=311" }, @@ -148,7 +148,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311c" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311d" }, { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" }, @@ -161,7 +161,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311c" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311d" }, { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index fe9eb265ea..0cb7e373f3 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -67,7 +67,7 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { - if ( empty($alt) ) return $html; + if ( empty($alt) || ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) ) return $html; $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; preg_match( '/width="([0-9]+)/', $html, $matches ); @@ -77,8 +77,8 @@ function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { $html = preg_replace( '/align[^\s\'"]+\s?/', '', $html ); if ( empty($align) ) $align = 'none'; - $shcode = '[wp_caption id="' . $id . '" align="align' . $align - . '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/wp_caption]'; + $shcode = '[caption id="' . $id . '" align="align' . $align + . '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/caption]'; return apply_filters( 'image_add_caption_shortcode', $shcode, $html ); } @@ -508,8 +508,14 @@ function media_upload_library() { function image_attachment_fields_to_edit($form_fields, $post) { if ( substr($post->post_mime_type, 0, 5) == 'image' ) { $form_fields['post_title']['required'] = true; - $form_fields['post_excerpt']['label'] = __('Caption'); - $form_fields['post_excerpt']['helps'][] = __('Alternate text, e.g. "The Mona Lisa"'); + + if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) { + $form_fields['post_excerpt']['label'] = __('Alternate Text'); + $form_fields['post_excerpt']['helps'][] = __('Alt text for the image, e.g. "The Mona Lisa"'); + } else { + $form_fields['post_excerpt']['label'] = __('Caption'); + $form_fields['post_excerpt']['helps'][] = __('Also used as alternate text for the image'); + } $form_fields['post_content']['label'] = __('Description'); @@ -598,13 +604,18 @@ function get_attachment_fields_to_edit($post, $errors = null) { $file = wp_get_attachment_url($post->ID); $link = get_attachment_link($post->ID); + if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) + $alt = __('Alternate Text'); + else + $alt = __('Caption'); + $form_fields = array( 'post_title' => array( 'label' => __('Title'), 'value' => $edit_post->post_title, ), 'post_excerpt' => array( - 'label' => __('Caption'), + 'label' => $alt, 'value' => $edit_post->post_excerpt, ), 'post_content' => array( @@ -1007,7 +1018,9 @@ var addExtImage = { if ( f.alt.value ) { alt = f.alt.value.replace(/['"<>]+/g, ''); + caption = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); + } cls = caption ? '' : ' class="'+t.align+'"'; @@ -1018,7 +1031,7 @@ var addExtImage = { html = ''+html+''; if ( caption ) - html = '[wp_caption id="" align="'+t.align+'" width="'+t.width+'" caption="'+caption+'"]'+html+'[/wp_caption]'; + html = '[caption id="" align="'+t.align+'" width="'+t.width+'" caption="'+caption+'"]'+html+'[/caption]'; var win = window.dialogArguments || opener || parent || top; win.send_to_editor(html); @@ -1262,7 +1275,7 @@ jQuery(function($){ } function type_form_image() { - return ' + $form = '
@@ -1279,7 +1292,20 @@ function type_form_image() { | |
---|---|
+ + | +
+ ' . __('Alt text for the image, e.g. "The Mona Lisa"') . ' |
+
@@ -1287,7 +1313,9 @@ function type_form_image() { |
' . __('Also used as alternate text for the image') . ' |
@@ -1321,6 +1349,8 @@ function type_form_image() { |
|
)*\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*(?:
|
)*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?: