-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path{{slug}}.php
More file actions
50 lines (44 loc) · 1.37 KB
/
{{slug}}.php
File metadata and controls
50 lines (44 loc) · 1.37 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
<?php
/**
* Plugin Name: {{name}}
* Plugin URI: {{plugin_uri}}
* Description: {{description}}
* Version: {{version}}
* Requires at least: {{requires_wp}}
* Requires PHP: {{requires_php}}
* Requires Plugins: secure-custom-fields
* Author: {{author}}
* Author URI: {{author_uri}}
* License: {{license}}
* License URI: {{license_uri}}
* Text Domain: {{textdomain}}
* Domain Path: /languages
*
* @package {{namespace}}
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Plugin constants.
define( '{{namespace|upper}}_VERSION', '{{version}}' );
define( '{{namespace|upper}}_DIR', plugin_dir_path( __FILE__ ) );
define( '{{namespace|upper}}_URL', plugin_dir_url( __FILE__ ) );
define( '{{namespace|upper}}_BASENAME', plugin_basename( __FILE__ ) );
// Include helper functions.
require_once {{namespace|upper}}_DIR . 'inc/helper-functions.php';
// Include the Core class.
require_once {{namespace|upper}}_DIR . 'inc/class-core.php';
/**
* Initialise the plugin and return the main instance.
*
* @return \{{namespace}}\classes\Core Main plugin instance.
*/
function {{namespace}}_init() {
global ${{namespace}};
if ( null === ${{namespace}} ) {
${{namespace}} = new \{{namespace}}\classes\Core();
}
return ${{namespace}};
}
// Initialize the plugin.
{{namespace}}_init();