-
Notifications
You must be signed in to change notification settings - Fork 2
/
plugin.php
78 lines (66 loc) · 1.6 KB
/
plugin.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
* Fast post generator.
*
* @package kagg/generator
* @author KAGG Design
* @license GPL-2.0-or-later
* @wordpress-plugin
*
* Plugin Name: KAGG Fast Post Generator
* Plugin URI: https://wordpress.org/plugins/kagg-fast-post-generator/
* Description: Generates posts/pages. Useful to generate millions of records in wp_posts table.
* Version: 1.11.0
* Requires at least: 5.3
* Requires PHP: 7.0
* Author: KAGG Design
* Author URI: https://profiles.wordpress.org/kaggdesign/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: kagg-generator
* Domain Path: /languages/
*/
use KAGG\Generator\Main;
if ( ! defined( 'ABSPATH' ) ) {
// @codeCoverageIgnoreStart
exit;
// @codeCoverageIgnoreEnd
}
if ( defined( 'KAGG_GENERATOR_VERSION' ) ) {
return;
}
/**
* Plugin version.
*/
const KAGG_GENERATOR_VERSION = '1.11.0';
/**
* Path to the plugin dir.
*/
const KAGG_GENERATOR_PATH = __DIR__;
/**
* Plugin dir url.
*/
define( 'KAGG_GENERATOR_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
/**
* Main plugin file.
*/
const KAGG_GENERATOR_FILE = __FILE__;
/**
* Init plugin on plugin load.
*/
require_once constant( 'KAGG_GENERATOR_PATH' ) . '/vendor/autoload.php';
/**
* Get Generator Main class instance.
*
* @return Main
*/
function kagg_generator(): Main {
static $plugin;
if ( ! $plugin ) {
// @codeCoverageIgnoreStart
$plugin = new Main();
// @codeCoverageIgnoreEnd
}
return $plugin;
}
kagg_generator()->init();