Skip to content

Commit

Permalink
Add cap check before showing a link to image options, improved handli…
Browse files Browse the repository at this point in the history
…ng for translation, props SergeyBiryukov, see #18881

git-svn-id: http://svn.automattic.com/wordpress/trunk@18917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
azaozz committed Oct 7, 2011
1 parent 5026384 commit 18630a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,12 @@ function media_upload_max_image_resize() {
?>
<p class="hide-if-no-js"><label>
<input name="image_resize" type="checkbox" id="image_resize" value="true"<?php echo $checked; ?> />
<?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' ) ); ?>
<?php
if ( current_user_can( 'manage_options' ) )
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' ) );
else
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' ) );
?>
</label></p>
<?php
}
Expand Down

0 comments on commit 18630a3

Please sign in to comment.