-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
82 lines (69 loc) · 2.11 KB
/
index.php
File metadata and controls
82 lines (69 loc) · 2.11 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/*
Plugin Name: Settings
Description: Settings API for WordPress
Plugin URI: https://italystrap.com
Author: Enea Overclokk
Author URI: https://italystrap.com
Version: 1.0.0
License: GPL2
Text Domain: ItalyStrap
Domain Path: languages
*/
/*
Copyright (C) Year Enea Overclokk Email
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italystrap-extended\italystrap.php
*/
if ( ! defined( 'ITALYSTRAP_FILE' ) ) {
define( 'ITALYSTRAP_FILE', __FILE__ );
}
/**
* Example = F:\xampp\htdocs\italystrap\wp-content\plugins\italystrap-extended/
*/
if ( ! defined( 'ITALYSTRAP_PLUGIN_PATH' ) ) {
define( 'ITALYSTRAP_PLUGIN_PATH', plugin_dir_path( ITALYSTRAP_FILE ) );
}
/**
* Example: 'http://192.168.1.10/italystrap/wp-content/plugins/italystrap-extended/'
*/
if ( ! defined( 'ITALYSTRAP_PLUGIN_URL' ) ) {
define( 'ITALYSTRAP_PLUGIN_URL', plugin_dir_url( ITALYSTRAP_FILE ) );
}
/**
* Example = italystrap-extended/italystrap.php
*/
if ( ! defined( 'ITALYSTRAP_BASENAME' ) ) {
define( 'ITALYSTRAP_BASENAME', plugin_basename( ITALYSTRAP_FILE ) );
}
if ( ! \function_exists( 'd_footer' ) ) {
function d_footer( ...$args ) {
\add_action( 'shutdown', function () use ( $args ) {
d( ...$args );
} );
}
}
/**
* This could be loaded on MU plugins
*/
function italystrap_settings_load () {
$files = [
'vendor/autoload.php',
'example.php',
];
foreach ( $files as $file ) {
require $file;
}
}
\add_action( 'plugins_loaded', 'italystrap_settings_load' );