Mô tả
Field to select registered image sizes within the WordPress dashboard.
Compatibility
This ACF field type is compatible with:
* ACF 5
How to Use
Once activated, this plugin will create a Image Size field type in ACF. This field type will list all registered field types as a drop down within the field group.
To use this field within your custom templates you will use the following code:
$my_image_id = get_field('my_image_id'); // ACF Image return type set to ID for this demo
$my_image_size = get_field('my_image_size'); // The selected image size (eg. large)
echo wp_get_attachment_image( $my_image_id, $my_image_size ); // Output the image based on the ID, and the Image Size selected.
Cài đặt
- Copy the
acf-image-size-select
folder into yourwp-content/plugins
folder - Activate the Image Size Select plugin via the plugins admin page
- Create a new field via ACF and select the Image Size Select type
Đánh giá
Người đóng góp & Lập trình viên
“Advanced Custom Fields: Image Size Select Field” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.
Những người đóng gópDịch “Advanced Custom Fields: Image Size Select Field” sang ngôn ngữ của bạn.
Muốn tham gia phát triển?
Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.
Nhật ký thay đổi
1.0.3
- Add Github Action for Releases
- Update Tested version to 6.3
1.0.2
- Added medium_large to list of WordPress images to check
- Removed automated github to SVN sync
1.0.1
- Updated line formatting
- Added github to SVN sync
1.0.0
- Initial Release.