Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 更改Wordpress中特征图像的默认裁剪原点(缩略图)_Image_Wordpress_Thumbnails_Crop_Featured - Fatal编程技术网

Image 更改Wordpress中特征图像的默认裁剪原点(缩略图)

Image 更改Wordpress中特征图像的默认裁剪原点(缩略图),image,wordpress,thumbnails,crop,featured,Image,Wordpress,Thumbnails,Crop,Featured,我想改变Wordpress裁剪特色图片缩略图的方式。生成的缩略图从中心裁剪。我可以控制它设置为左上方吗? 提到了a,但它并不真的存在:3 接缝不影响特征图像缩略图 有什么想法吗?在wp includes/media.php第360行,我发现: $s_x = floor( ($orig_w - $crop_w) / 2 ); $s_y = floor( ($orig_h - $crop_h) / 2 ); …并改为: $s_x = 0; $s_y = 0; 。。

我想改变Wordpress裁剪特色图片缩略图的方式。生成的缩略图从中心裁剪。我可以控制它设置为左上方吗? 提到了a,但它并不真的存在:3 接缝不影响特征图像缩略图


有什么想法吗?

wp includes/media.php第360行,我发现:

    $s_x = floor( ($orig_w - $crop_w) / 2 );
    $s_y = floor( ($orig_h - $crop_h) / 2 );
…并改为:

    $s_x = 0;
    $s_y = 0;

。。。要在wp includes/media.php的第360行中定义裁剪到右上方的

,我发现:

    $s_x = floor( ($orig_w - $crop_w) / 2 );
    $s_y = floor( ($orig_h - $crop_h) / 2 );
…并改为:

    $s_x = 0;
    $s_y = 0;

。。。要定义裁剪到右上角,修改Wordpress的核心不是一个好主意。您可以使用该插件选择图像的一个角点或中心点,从中裁剪图像

修改Wordpress的核心不是个好主意。您可以使用该插件选择图像的一个角点或中心点,从中裁剪图像

update_选项('thumbnail_-crop',数组('left','top');
值可以是:左、中、右

update_选项('thumbnail_-crop',数组('left','top'));
值可以是:左、中、右