Skip to content

Commit f6a8f0b

Browse files
committed
initial commit
0 parents  commit f6a8f0b

File tree

1,963 files changed

+193824
-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,963 files changed

+193824
-0
lines changed

cbxtaxonomy.php

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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.1
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.1' );
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+
\Cbx\Taxonomy\CBXTaxonomyHelper::load_orm();
53+
\Cbx\Taxonomy\CBXTaxonomyHelper::active_plugin();
54+
}
55+
56+
/**
57+
* The code that runs during plugin deactivation.
58+
*/
59+
function deactivate_cbxtaxonomy() {
60+
\Cbx\Taxonomy\CBXTaxonomyHelper::load_orm();
61+
}
62+
63+
64+
/**
65+
* Init cbxtaxonomy plugin
66+
*/
67+
function cbxtaxonomy() {
68+
if ( defined( 'CBXTAXONOMY_PLUGIN_NAME' ) ) {
69+
\Cbx\Taxonomy\CBXTaxonomy::instance();
70+
}
71+
}//end function cbxtaxonomy
72+
73+
add_action( 'plugins_loaded', 'cbxtaxonomy' );
74+

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)