Repository navigation
Expand file tree
/
Copy pathwp-relationships.php
More file actions
49 lines (43 loc) · 1.9 KB
/
Copy pathwp-relationships.php
File metadata and controls
49 lines (43 loc) · 1.9 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
<?php
/**
* The plugin bootstrap file.
*
* This file is read by WordPress to generate the plugin information in the plugin
* Dashboard. This file also includes all the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @package TSB\WP\Plugin\Relationships
* @copyright Copyright (C) 2025-2025, 26B - IT Consulting <hello@26b.io>
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3 or higher
*
* @wordpress-plugin
* Plugin Name: WP Relationships
* Description: A relationship API for WordPress entities.
* Version: Unreleased
* Author: 26B - IT Consulting
* Author URI: https://26b.io/
* License: GPL v3
* Requires at least: 6.5
* Requires PHP: 8.1.0
* Text Domain: wp-relationships
* Domain Path: /languages
*/
// Useful global constants.
define( 'WP_RELATIONSHIPS_PLUGIN_VERSION', 'Unreleased' );
define( 'WP_RELATIONSHIPS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'WP_RELATIONSHIPS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'WP_RELATIONSHIPS_PLUGIN_INC', WP_RELATIONSHIPS_PLUGIN_PATH . 'includes/' );
define( 'WP_RELATIONSHIPS_PLUGIN_DIST_URL', WP_RELATIONSHIPS_PLUGIN_URL . 'build/' );
define( 'WP_RELATIONSHIPS_PLUGIN_DIST_PATH', WP_RELATIONSHIPS_PLUGIN_PATH . 'build/' );
// Require Composer autoloader if it exists.
if ( file_exists( WP_RELATIONSHIPS_PLUGIN_PATH . 'vendor/autoload.php' ) ) {
include_once WP_RELATIONSHIPS_PLUGIN_PATH . 'vendor/autoload.php';
}
// Include files.
require_once WP_RELATIONSHIPS_PLUGIN_INC . '/core.php';
// Activation/Deactivation.
register_activation_hook( __FILE__, '\TSB\WP\Plugin\Relationships\Core\activate' );
register_deactivation_hook( __FILE__, '\TSB\WP\Plugin\Relationships\Core\deactivate' );
// Bootstrap.
TSB\WP\Plugin\Relationships\Core\setup();