Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/media.php

    r14139 r16812  
    4949
    5050    if ( empty( $_GET['attachment_id'] ) ) {
    51         wp_redirect('upload.php');
     51        wp_redirect( admin_url('upload.php') );
    5252        exit();
    5353    }
     
    6767    wp_enqueue_script('image-edit');
    6868    wp_enqueue_style('imgareaselect');
     69
     70    add_contextual_help( $current_screen,
     71    '<p>' . __('This screen allows you to edit five fields for metadata in a file within the media library.') . '</p>' .
     72    '<p>' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '</p>' .
     73    '<p>' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '</p>' .
     74    '<p>' . __('Remember to click Update Media to save metadata entered or changed.') . '</p>' .
     75    '<p><strong>' . __('For more information:') . '</strong></p>' .
     76    '<p>' . __('<a href="http://codex.wordpress.org/Media_Add_New_SubPanel#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
     77    '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
     78);
    6979
    7080    require( './admin-header.php' );
     
    92102<form method="post" action="" class="media-upload-form" id="media-single-form">
    93103<p class="submit" style="padding-bottom: 0;">
    94 <input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('Update Media'); ?>" />
     104<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
    95105</p>
    96106
    97107<div class="media-single">
    98108<div id='media-item-<?php echo $att_id; ?>' class='media-item'>
    99 <?php echo get_media_item( $att_id, array( 'toggle' => false, 'send' => false, 'delete' => false, 'show_title' => false, 'errors' => $errors ) ); ?>
     109<?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 ) ); ?>
    100110</div>
    101111</div>
    102112
    103 <p class="submit">
    104 <input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('Update Media'); ?>" />
     113<?php submit_button( __( 'Update Media' ), 'primary', 'save' ); ?>
    105114<input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? esc_attr($post_id) : ''; ?>" />
    106115<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" />
     
    108117<?php wp_original_referer_field(true, 'previous'); ?>
    109118<?php wp_nonce_field('media-form'); ?>
    110 </p>
     119
    111120</form>
    112121
     
    120129
    121130default:
    122     wp_redirect( 'upload.php' );
     131    wp_redirect( admin_url('upload.php') );
    123132    exit;
    124133
Note: See TracChangeset for help on using the changeset viewer.