我如何阻止我的帖子的特色图片被裁剪?
这是我在functions.php上找到的最接近的代码:
函数thickbox_fields($form_fields,$post){ unset( $form_fields‘’image size‘);
$size = 'full';
$css_id = "image-size-{$size}-{$post->ID}";
$html = "<div style='display: none;' class='image-size-item'><input type='radio' name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'checked='checked' /></div>";
//set as image-size field
$form_fields['image-size'] = array(
'label' => '', //leave with no label
'input' => 'html', //input type is html
'html' => $html //the actual html
);
return $form_fields;谢谢!!
发布于 2013-12-27 02:22:27
You should use following code in function.php:
Syntax: add_image_size( $name, $width, $height, $crop );
Example: add_image_size( 'homepage-thumb', 220, 180, false );
If $crop is set to be "true" then it will be cropped.
Try it and inform me what happened?https://stackoverflow.com/questions/20785343
复制相似问题