-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.php
More file actions
53 lines (47 loc) · 1.97 KB
/
Copy pathplugin.php
File metadata and controls
53 lines (47 loc) · 1.97 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
<?php
/**
* Plugin Name: HM Primary Category
* Plugin URI: https://github.com/humanmade/wp-primary-category
* Description: Lets an editor mark one term per taxonomy as a post's primary one, and use it in blocks, permalinks and templates.
* Version: 0.6.0
* Author: Human Made Limited
* Author URI: https://humanmade.com
* Text Domain: hm-primary-category
* Requires at least: 6.6
* Requires PHP: 8.1
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* @package HM\Primary_Term
*/
namespace HM\Primary_Term;
// Only here, not in `inc/`: those files are Composer-autoloaded and so are
// read before WordPress exists. They define functions and do nothing else;
// this is the file that actually runs something.
defined( 'ABSPATH' ) || exit;
/*
* Two copies on disk — a stale directory left behind by a changed install
* path, or a hand-dropped one alongside the Composer-managed install — are two
* different `__DIR__`s, so `require_once` below will not stop the second
* redeclaring the first. That is a fatal, and it fires on activation, when
* somebody is least able to read a stack trace. Stand down instead.
*
* Keyed on this file having run, not on the functions existing: Composer's
* `files` autoload defines them before this file is reached in a normal
* install, and bailing there would skip `bootstrap()` and register nothing.
*/
if ( defined( __NAMESPACE__ . '\\LOADED' ) ) {
return;
}
define( __NAMESPACE__ . '\\LOADED', true );
// `require_once` so this is a no-op when Composer's `files` autoload has
// already loaded them, which it will have in a Composer-managed install.
require_once __DIR__ . '/inc/api.php';
require_once __DIR__ . '/inc/bindings.php';
require_once __DIR__ . '/inc/block.php';
require_once __DIR__ . '/inc/breadcrumbs.php';
require_once __DIR__ . '/inc/cli.php';
require_once __DIR__ . '/inc/editor.php';
require_once __DIR__ . '/inc/migrate.php';
require_once __DIR__ . '/inc/namespace.php';
bootstrap();