-
Notifications
You must be signed in to change notification settings - Fork 0
/
acf-google-map-extended.php
47 lines (39 loc) · 1.43 KB
/
acf-google-map-extended.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: ACF: Google Map Extended
Plugin URI: https://github.com/codewahoo/acf-gme
Description: ACF field. Saves map center, zoom level. Disables map zooming on scroll. Shows location coordinates. Bonus for programmers.
Version: 1.0.4
Author: CodeFish
Author URI: http://code.fish
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: acf-gme
Domain Path: /lang
*/
class acf_field_google_map_extended_plugin {
const version = '1.0.3';
function __construct() {
add_action('acf_gme_shortcodes', array($this, 'acf_gme_shortcodes'));
add_action('plugins_loaded', array($this, 'plugins_loaded') );
add_action('acf/register_fields', array($this, 'register_fields'));
add_action('acf/include_field_types', array($this, 'include_field_types'));
}
function plugins_loaded() {
load_plugin_textdomain('acf-gme', false, dirname( plugin_basename(__FILE__) ) . '/lang/' );
do_action('acf_gme_shortcodes');
}
function register_fields() {
include_once('acf-google-map-extended-base.php');
include_once('acf-google-map-extended-v4.php');
}
function include_field_types($version) {// $version = 5 and can be ignored until ACF6 exists
include_once('acf-google-map-extended-base.php');
include_once('acf-google-map-extended-v5.php');
}
function acf_gme_shortcodes(){
include_once('acf-google-map-extended-sc.php');
}
}
new acf_field_google_map_extended_plugin();
?>