-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmake-post-dirty.php
More file actions
43 lines (37 loc) · 1006 Bytes
/
make-post-dirty.php
File metadata and controls
43 lines (37 loc) · 1006 Bytes
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
<?php
/**
* Plugin Name: Make Post Dirty
* Plugin URI: https://github.com/badasswp/make-post-dirty
* Description: A useful tool for populating the block editor title and content.
* Version: 1.2.0
* Author: badasswp
* Author URI: https://github.com/badasswp
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: make-post-dirty
* Domain Path: /languages
*
* @package MakePostDirty
*/
namespace badasswp\MakePostDirty;
if ( ! defined( 'WPINC' ) ) {
exit;
}
define( 'MAKE_POST_DIRTY_AUTOLOAD', __DIR__ . '/vendor/autoload.php' );
// Composer Check.
if ( ! file_exists( MAKE_POST_DIRTY_AUTOLOAD ) ) {
add_action(
'admin_notices',
function () {
vprintf(
/* translators: Plugin directory path. */
esc_html__( 'Fatal Error: Composer not setup in %s', 'make-post-dirty' ),
[ __DIR__ ]
);
}
);
return;
}
// Run Plugin.
require_once MAKE_POST_DIRTY_AUTOLOAD;
( \MakePostDirty\Plugin::get_instance() )->run();