-
Notifications
You must be signed in to change notification settings - Fork 0
/
neighborhood-attractions.php
62 lines (51 loc) · 1.93 KB
/
neighborhood-attractions.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
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/*
Plugin Name: Neighborhood Attractions
Plugin URI: https://github.com/BrindleDigital/neighborhood-attractions
Description: Just another attractions map plugin
Version: 1.1.4
Author: Brindle Digital
Author URI: https://brindledigital.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
/* Prevent direct access to the plugin */
if ( !defined( 'ABSPATH' ) ) {
die( "Sorry, you are not allowed to access this page directly." );
}
// Define the version of the plugin
define( 'NEIGHBORHOOD_ATTRACTIONS_VERSION', '1.1.4' );
// Plugin directory
define( 'NEIGHBORHOOD_ATTRACTIONS_URL', plugin_dir_url( __FILE__ ) );
define( 'NEIGHBORHOOD_ATTRACTIONS_DIR', dirname( __FILE__ ) );
//* Include everything in /lib
foreach ( glob( NEIGHBORHOOD_ATTRACTIONS_DIR . "/inc/*.php", GLOB_NOSORT ) as $filename ){
require_once $filename;
}
//* Include everything in /lib/*
foreach ( glob( NEIGHBORHOOD_ATTRACTIONS_DIR . "/inc/*/*.php", GLOB_NOSORT ) as $filename ){
require_once $filename;
}
//* Used for debugging
if ( !function_exists( 'console_log' ) ) {
function console_log( $data ){
echo '<script>';
echo 'console.log('. json_encode( $data ) .')';
echo '</script>';
}
}
//* Plugin Update Checker
require 'vendor/plugin-update-checker/plugin-update-checker.php';
$myUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
'https://github.com/BrindleDigital/neighborhood-attractions',
__FILE__,
'neighborhood-attractions'
);
// Optional: Set the branch that contains the stable release.
$myUpdateChecker->setBranch('main');