WordPress.org

Make WordPress Core

Changeset 18917


Ignore:
Timestamp:
10/07/2011 04:59:33 PM (10 years ago)
Author:
azaozz
Message:

Add cap check before showing a link to image options, improved handling for translation, props SergeyBiryukov, see #18881

File:
1 edited

Legend:

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

    r18902 r18917  
    19941994<p class="hide-if-no-js"><label>
    19951995<input name="image_resize" type="checkbox" id="image_resize" value="true"<?php echo $checked; ?> />
    1996 <?php _e('Scale images to match the large size selected in'); ?> <a href="options-media.php" target="_blank"><?php _e('image options'); ?></a> <?php printf( __('(%1$d &times; %2$d).'), (int) get_option( 'large_size_w' ), (int) get_option( 'large_size_h' ) ); ?>
     1996<?php
     1997if ( current_user_can( 'manage_options' ) )
     1998    printf( __( 'Scale images to match the large size selected in %1$simage options%2$s (%3$d &times; %4$d).' ), '<a href="' . admin_url( 'options-media.php' ) . '" target="_blank">', '</a>', (int) get_option( 'large_size_w' ), (int) get_option( 'large_size_h' ) );
     1999else
     2000    printf( __( 'Scale images to match the large size selected in %1$simage options%2$s (%3$d &times; %4$d).' ), '', '', (int) get_option( 'large_size_w' ), (int) get_option( 'large_size_h' ) );
     2001?>
    19972002</label></p>
    19982003<?php
Note: See TracChangeset for help on using the changeset viewer.