Skip to content

Commit 5bfa2f8

Browse files
committed
master fix
1 parent 686d820 commit 5bfa2f8

File tree

1,965 files changed

+194085
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,965 files changed

+194085
-0
lines changed

cbxtaxonomy.php

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
3+
/**
4+
* The plugin bootstrap file
5+
*
6+
* This file is read by WordPress to generate the plugin information in the plugin
7+
* admin area. This file also includes all of the dependencies used by the plugin,
8+
* registers the activation and deactivation functions, and defines a function
9+
* that starts the plugin.
10+
*
11+
* @link https://codeboxr.com
12+
* @since 1.0.0
13+
* @package cbxtaxonomy
14+
*
15+
* @wordpress-plugin
16+
* Plugin Name: CBX Taxonomy
17+
* Plugin URI: https://wordpress.org/plugins/cbxtaxonomy
18+
* Description: Custom taxonomy system for custom table/custom object types. This feature plugin is required for CBXResume, CBXJob and others codeboxr's plugins.
19+
* Version: 1.0.0
20+
* Requires at least: 3.5
21+
* Requires PHP: 7.4
22+
* Author: Codeboxr
23+
* Author URI: https://codeboxr.com
24+
* License: GPL-2.0+
25+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
26+
* Text Domain: cbxtaxonomy
27+
* Domain Path: /languages
28+
*/
29+
30+
// If this file is called directly, abort.
31+
if (!defined('WPINC')) {
32+
die;
33+
}
34+
35+
defined('CBXTAXONOMY_PLUGIN_NAME') or define('CBXTAXONOMY_PLUGIN_NAME', 'cbxtaxonomy');
36+
defined('CBXTAXONOMY_PLUGIN_VERSION') or define('CBXTAXONOMY_PLUGIN_VERSION', '1.0.0');
37+
defined('CBXTAXONOMY_BASE_NAME') or define('CBXTAXONOMY_BASE_NAME', plugin_basename(__FILE__));
38+
defined('CBXTAXONOMY_ROOT_PATH') or define('CBXTAXONOMY_ROOT_PATH', plugin_dir_path(__FILE__));
39+
defined('CBXTAXONOMY_ROOT_URL') or define('CBXTAXONOMY_ROOT_URL', plugin_dir_url(__FILE__));
40+
defined('CBXTAXONOMY_DEV_MODE') or define('CBXTAXONOMY_DEV_MODE', true);
41+
42+
require_once CBXTAXONOMY_ROOT_PATH . "lib/autoload.php";
43+
44+
register_activation_hook(__FILE__, 'activate_cbxtaxonomy');
45+
register_deactivation_hook(__FILE__, 'deactivate_cbxtaxonomy');
46+
47+
/**
48+
* * The code that runs during plugin activation.
49+
* The code that runs during plugin deactivation.
50+
*/
51+
function activate_cbxtaxonomy()
52+
{
53+
\Cbx\Taxonomy\CBXTaxonomyHelper::load_orm();
54+
\Cbx\Taxonomy\CBXTaxonomyHelper::active_plugin();
55+
}
56+
57+
/**
58+
* The code that runs during plugin deactivation.
59+
*/
60+
function deactivate_cbxtaxonomy()
61+
{
62+
\Cbx\Taxonomy\CBXTaxonomyHelper::load_orm();
63+
}
64+
65+
66+
/**
67+
* Init cbxtaxonomy plugin
68+
*/
69+
function cbxtaxonomy()
70+
{
71+
if (defined('CBXTAXONOMY_PLUGIN_NAME')) {
72+
\Cbx\Taxonomy\CBXTaxonomy::instance();
73+
}
74+
}//end function cbxtaxonomy
75+
76+
add_action('plugins_loaded', 'cbxtaxonomy');
77+

composer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "cbx/taxonomy",
3+
"description": "cbx taxonomy plugin",
4+
"type": "library",
5+
"license": "MIT",
6+
"config": {
7+
"vendor-dir": "lib"
8+
},
9+
"require": {
10+
"illuminate/database": "^8.83",
11+
"illuminate/pagination": "^8.83",
12+
"spatie/laravel-sluggable": "^2.6"
13+
},
14+
"autoload": {
15+
"psr-4": {
16+
"Cbx\\Taxonomy\\": "includes/"
17+
},
18+
"files": [
19+
"includes/cbxtaxonomy-tpl-loader.php",
20+
"includes/cbxtaxonomy-functions.php"
21+
]
22+
}
23+
}

0 commit comments

Comments
 (0)