-
Notifications
You must be signed in to change notification settings - Fork 4
/
maps-block-apple.php
50 lines (42 loc) · 1.5 KB
/
maps-block-apple.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
48
49
50
<?php
/**
* Plugin Name: Block for Apple Maps
* Plugin URI: https://github.com/10up/maps-block-apple
* Description: An Apple Maps block for the WordPress block editor (Gutenberg).
* Version: 1.1.4
* Requires at least: 6.5
* Requires PHP: 7.4
* Author: 10up
* Author URI: https://10up.com
* License: GPL-2.0-or-later
* License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
* Text Domain: maps-block-apple
*
* @package tenup\Maps_Block_Apple
*/
namespace tenup\Maps_Block_Apple;
// Useful global constants.
define( 'MAPS_BLOCK_APPLE_VERSION', '1.1.4' );
define( 'MAPS_BLOCK_APPLE_URL', plugin_dir_url( __FILE__ ) );
define( 'MAPS_BLOCK_APPLE_PATH', dirname( __FILE__ ) . '/' );
define( 'MAPS_BLOCK_APPLE_INC', MAPS_BLOCK_APPLE_PATH . 'includes/' );
define( 'MAPS_BLOCK_APPLE_BASENAME', plugin_basename( __FILE__ ) );
// Validate Environment.
$is_environment_satisfy = require MAPS_BLOCK_APPLE_INC . 'environment-validation.php';
if ( ! $is_environment_satisfy ) {
return;
}
/**
* Add options
*/
function add_options() {
add_option( 'maps_block_apple_team_id' );
add_option( 'maps_block_apple_key_id' );
add_option( 'maps_block_apple_private_key' );
}
add_action( 'init', __NAMESPACE__ . '\add_options' );
require_once MAPS_BLOCK_APPLE_INC . 'block-assets.php';
require_once MAPS_BLOCK_APPLE_INC . 'rest-routes.php';
require_once MAPS_BLOCK_APPLE_INC . 'settings.php';
// Initialize the settings page.
Settings\setup();