From 2dd4d7031a33220fa3b27b4336748733a25253be Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 12 Jul 2008 18:02:29 +0000 Subject: [PATCH] Denote CAPTIONS_OFF as temporary. see #6812 git-svn-id: https://develop.svn.wordpress.org/trunk@8321 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0cb7e373f3..abdb44d761 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -67,6 +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 ) { + // CAPTIONS_OFF is temporary. Do not use it. if ( empty($alt) || ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) ) return $html; $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; @@ -509,6 +510,7 @@ function image_attachment_fields_to_edit($form_fields, $post) { if ( substr($post->post_mime_type, 0, 5) == 'image' ) { $form_fields['post_title']['required'] = true; + // CAPTIONS_OFF is temporary. Do not use it. 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"'); @@ -604,6 +606,7 @@ function get_attachment_fields_to_edit($post, $errors = null) { $file = wp_get_attachment_url($post->ID); $link = get_attachment_link($post->ID); + // CAPTIONS_OFF is temporary. Do not use it. if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) $alt = __('Alternate Text'); else @@ -1018,7 +1021,7 @@ var addExtImage = { if ( f.alt.value ) { alt = f.alt.value.replace(/['"<>]+/g, ''); - + caption = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); } @@ -1293,6 +1296,7 @@ function type_form_image() {

'; + // CAPTIONS_OFF is temporary. Do not use it. if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) { $form .= '