PluginProbe
MB Custom Post Types & Custom Taxonomies / 2.12.2
MB Custom Post Types & Custom Taxonomies v2.12.2
2.12.2 2.12.1 2.12.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.7.0 1.8.1 1.8.2 1.8.3 All 98 releases
mb-custom-post-type / mb-custom-post-type.php

mb-custom-post-type.php in MB Custom Post Types & Custom Taxonomies 2.12.2, at mb-custom-post-type.php

87 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: MB Custom Post Types & Custom Taxonomies
4 * Plugin URI: https://metabox.io/plugins/custom-post-type/
5 * Description: Create custom post types and custom taxonomies with easy-to-use UI
6 * Version: 2.12.2
7 * Author: MetaBox.io
8 * Author URI: https://metabox.io
9 * License: GPL-2.0+
10 * Text Domain: mb-custom-post-type
11 *
12 * Copyright (C) 2010-2025 Tran Ngoc Tuan Anh. All rights reserved.
13 *
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28 // Prevent loading this file directly.
29 if ( ! defined( 'ABSPATH' ) ) {
30 return;
31 }
32
33 if ( ! function_exists( 'mb_cpt_load' ) ) {
34 if ( file_exists( __DIR__ . '/vendor' ) ) {
35 require __DIR__ . '/vendor/autoload.php';
36 }
37
38 add_action( 'init', 'mb_cpt_load', 0 );
39
40 function mb_cpt_load() {
41 define( 'MB_CPT_DIR', __DIR__ );
42 define( 'MB_CPT_VER', '2.12.2' );
43
44 if ( class_exists( 'RWMB_Loader' ) ) {
45 list( , $url ) = RWMB_Loader::get_path( __DIR__ );
46 define( 'MB_CPT_URL', $url );
47 } else {
48 define( 'MB_CPT_URL', plugin_dir_url( __FILE__ ) );
49 }
50
51 new MBCPT\Integrations\WPML\Manager();
52 new MBCPT\Integrations\Polylang\Manager();
53
54 new MBCPT\PostTypeRegister();
55 new MBCPT\TaxonomyRegister();
56 new MBCPT\PostTypeReorder();
57 new MBCPT\TaxonomyReorder();
58 new MBCPT\Abilities();
59
60 if ( ! is_admin() ) {
61 return;
62 }
63
64 // Create Meta Box menu if Meta Box is not installed.
65 if ( ! defined( 'RWMB_VER' ) ) {
66 new MBCPT\Menu();
67 }
68
69 // Show Meta Box admin menu.
70 add_filter( 'rwmb_admin_menu', '__return_true' );
71
72 new MBCPT\Edit( 'mb-post-type' );
73 new MBCPT\Edit( 'mb-taxonomy' );
74 new MBCPT\Warning();
75 new MBCPT\Import();
76 new MBCPT\Export();
77 new MBCPT\PostListTable();
78 new MBCPT\ListTableColumns();
79 new MBCPT\ToggleStatusColumn();
80
81 if ( defined( 'CPTUI_VERSION' ) ) {
82 new MBCPT\Migration();
83 new MBCPT\Ajax();
84 }
85 }
86 }
87