media_upload_max_image_resize() - WordPress 函数参考中文文档

返回介绍

media_upload_max_image_resize()

发布于 2017-09-11 字数1867 浏览 732 评论 0

media_upload_max_image_resize()

Displays the checkbox to scale images.


描述


源代码

File: wp-admin/includes/media.php

function media_upload_max_image_resize() {
	$checked = get_user_setting('upload_resize') ? ' checked="true"' : '';
	$a = $end = '';

	if ( current_user_can( 'manage_options' ) ) {
		$a = '<a href="' . esc_url( admin_url( 'options-media.php' ) ) . '" target="_blank">';
		$end = '</a>';
	}
?>
<p class="hide-if-no-js"><label>
<input name="image_resize" type="checkbox" id="image_resize" value="true"<?php echo $checked; ?> />
<?php
	/* translators: %1$s is link start tag, %2$s is link end tag, %3$d is width, %4$d is height*/
	printf( __( 'Scale images to match the large size selected in %1$simage options%2$s (%3$d &times; %4$d).' ), $a, $end, (int) get_option( 'large_size_w', '1024' ), (int) get_option( 'large_size_h', '1024' ) );
?>
</label></p>
<?php
}

更新日志

Version 描述
3.3.0 Introduced.

相关函数

Uses

  • wp-includes/capabilities.php:
    current_user_can()
  • wp-includes/l10n.php:
    __()
  • wp-includes/formatting.php:
    esc_url()
  • wp-includes/link-template.php:
    admin_url()
  • wp-includes/option.php:
    get_user_setting()
  • wp-includes/option.php:
    get_option()
  • Show 1 more use
    Hide more uses


User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!