Repository navigation
Expand file tree
/
Copy pathproject-name-features.php
More file actions
77 lines (66 loc) · 1.98 KB
/
Copy pathproject-name-features.php
File metadata and controls
77 lines (66 loc) · 1.98 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
<?php
/**
* Project Name Features
*
* @package Project_Name\Features
* @author rtCamp
* @copyright 2026 rtCamp
* @license GPL-2.0-or-later
*
* Plugin Name: Project Name Features
* Plugin URI: https://rtcamp.com
* Description: All backend functionality: post types, taxonomies, blocks, REST endpoints, settings, shortcodes, and custom roles.
* Version: 1.0.0
* Author: rtCamp
* Author URI: https://rtcamp.com
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: project-name-features
* Domain Path: /languages
* Requires PHP: 8.2
* Requires at least: 6.7
* Tested up to: 7.1
*/
declare( strict_types = 1 );
namespace Project_Name\Features;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/**
* Define the plugin constants.
*/
function constants(): void {
/**
* File path to the plugin's main file.
*/
define( 'PROJECT_NAME_FEATURES_FILE', __FILE__ );
/**
* Version of the plugin.
*/
define( 'PROJECT_NAME_FEATURES_VERSION', '1.0.0' );
/**
* Root path to the plugin directory.
*/
define( 'PROJECT_NAME_FEATURES_PATH', plugin_dir_path( PROJECT_NAME_FEATURES_FILE ) );
/**
* Root URL to the plugin directory.
*/
define( 'PROJECT_NAME_FEATURES_URL', plugin_dir_url( PROJECT_NAME_FEATURES_FILE ) );
/**
* Whether Tailwind CSS is enabled. Off by default; the scaffold's Tailwind
* feature flips this to true on enable. Define it in wp-config.php to force
* it either way.
*/
if ( ! defined( 'PROJECT_NAME_FEATURES_ENABLE_TAILWIND' ) ) {
define( 'PROJECT_NAME_FEATURES_ENABLE_TAILWIND', false );
}
}
constants();
// If autoloader fails, we cannot proceed.
require_once __DIR__ . '/inc/Autoloader.php';
if ( ! class_exists( Autoloader::class ) || ! Autoloader::autoload() ) {
return;
}
// Load the main plugin class.
if ( class_exists( Main::class ) ) {
Main::get_instance();
}