Linux 软件免费装
Banner图

Advanced Custom Fields: Image Crop Add-on

开发者 andersthorborg
更新时间 2017年7月28日 20:04
PHP版本: 3.5 及以上
WordPress版本: 4.6
版权: GPLv2 or later
版权网址: 版权信息

标签

image advanced custom fields crop afc image crop

下载

1.1.4 1.4.7 0.8 1.0 1.1 1.1.1 1.1.2 1.1.3 1.2 1.3 1.4 1.4.1 1.4.10 1.4.11 1.4.12 1.4.2 1.4.3 1.4.4 1.4.8 1.4.9

详情介绍:

ACF image crop is an extended version of the native Image-field in ACF. The field gives the developer/administrator the option to predefine a size for the image, which the user is prompted to crop on the various edit screens. This solves the common issue of images being cropped inappropriately by the automated center-crop, that wordpress performs. The plugin supports the defined image sizes as well as a custom option, enabling the developer to specify the dimensions from within the field edit screen. The field can be configured to enforce a hard crop or a minimal-dimension-based crop. The hard crop will lock the aspect ratio of the crop where as the minimal-dimension-based crop will not allow the user to crop the image below the specified dimensions. This plugin diverts from plugins like Manual Image Crop in that when the user crops an image, a new attachment is generated, so that the relevant crop only applies in the context it is edited. It also keeps the user from dealing with the concept of various image sizes. As of version 1.0 the field can be configured to either create the cropped image as a media-item (the default behavior) or simply create it and refer directly to the file without adding it to the media library. This will prevent the media library from being cluttered with several cropped versions of the same image. When this option is selected the only available return type for the field is URL. Compatibility This add-on will work with:

安装:

This add-on can be treated as both a WP plugin and a theme include. Plugin
  1. Copy the 'acf-image_crop' folder into your plugins folder
  2. Activate the plugin via the Plugins admin page
Include
  1. Copy the 'acf-image_crop' folder into your theme folder (can use sub folders). You can place the folder anywhere inside the 'wp-content' directory
  2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-image_crop.php file) ` add_action('acf/register_fields', 'my_register_fields');
function my_register_fields() { include_once('acf-image-crop/acf-image-crop.php'); } `

屏幕截图:

  • Use a registered image size as the field target size
  • Or use custom dimensions on the fly
  • On the edit screen, select/upload an image as usual
  • A crop-button will appear beneath the image (If desired, use the "Force user crop"-option to initialize the crop as soon as the user selects the image)
  • The image is cropped to the desired format, using the restrictions set under field options
  • The new format is shown using the specified preview size. The original image is kept with the field, so the image can be re-cropped at any time.

更新日志:

1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4 1.3 1.2 1.1.4 1.1.3 1.1.2 1.1.1 1.1 1.0 0.8 0.7 0.6 0.5