forked from andersthorborg/ACF-Image-Crop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathacf-image-crop.php
33 lines (26 loc) · 1.19 KB
/
acf-image-crop.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/*
Plugin Name: Advanced Custom Fields: Advanced Image Crop Add-on
Plugin URI: https://github.com/danielsetreus/ACF-Image-Crop
Description: An image field making it possible/required for the user to crop the selected image to the specified image size or dimensions
Version: 1.5.0
Author: Anders Thorborg, Daniel Setréus
Author URI: https://github.com/danielsetreus/ACF-Image-Crop
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
// 1. set text domain
// Reference: https://codex.wordpress.org/Function_Reference/load_plugin_textdomain
load_plugin_textdomain( 'acf-image_crop', false, dirname( plugin_basename(__FILE__) ) . '/lang/' );
// 2. Include field type for ACF5
// $version = 5 and can be ignored until ACF6 exists
function include_field_types_image_crop( $version ) {
include_once('acf-image-crop-v5.php');
}
add_action('acf/include_field_types', 'include_field_types_image_crop');
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'acf_image_crop_action_links' );
function acf_image_crop_action_links( $links ) {
$links[] = '<a href="'. get_admin_url(null, 'options-media.php') .'">'.__('Settings','acf-image_crop').'</a>';
return $links;
}
?>