-
Notifications
You must be signed in to change notification settings - Fork 0
/
goliath-acf-annotated-image.php
47 lines (35 loc) · 1.29 KB
/
goliath-acf-annotated-image.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/*
* Plugin Name: Advanced Custom Fields: Annotated Image Field
* Plugin URI: https://github.com/studio-goliath/goliath-acf-annotated-image
* Description: An ACF 5 field type to handle annotated images
* Version: 1.0.0
* Author: Alain Diart for Studio-Goliath
* Author URI: http://studio-goliath.com
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('ABSPATH'))
exit;
if (!class_exists('acf_plugin_annotated_image')) :
class acf_plugin_annotated_image
{
function __construct()
{
include_once('helpers/helpers.php');
$this->settings = array(
'version' => '1.0.0',
'url' => plugin_dir_url(__FILE__),
'path' => plugin_dir_path(__FILE__)
);
load_plugin_textdomain('goliath-acf-annotated-image', false, plugin_basename(dirname(__FILE__)) . '/lang');
add_action('acf/include_field_types', array($this, 'include_field_types'));
}
function include_field_types()
{
include_once('fields/acf-annotated-image-v5.php');
new acf_field_annotated_image($this->settings);
}
}
new acf_plugin_annotated_image();
endif;