This repository has been archived by the owner on Sep 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
simple-taxonomy.php
executable file
·88 lines (70 loc) · 2.89 KB
/
simple-taxonomy.php
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
78
79
80
81
82
83
84
85
86
87
88
<?php
/*
Plugin Name: Simple Taxonomy
Version: 3.4.1
Plugin URI: https://github.com/herewithme/simple-taxonomy
Description: WordPress 3.1 and up allow for reasonably simple custom taxonomy, this plugin makes it even simpler, removing the need for you to write <em>any</em> code.
Author: Amaury Balmer
Author URI: http://www.beapi.fr
----
Copyright 2010-2012 Amaury Balmer ([email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
Todo :
Core :
Make a class for CPT object (add, delete, update, etc)
Admin
Extras
Client
*/
// Folder name
define ( 'STAXO_VERSION', '3.4.1' );
define ( 'STAXO_OPTION', 'simple-taxonomy' );
define ( 'STAXO_FOLDER', 'simple-taxonomy' );
define ( 'STAXO_URL', plugins_url('', __FILE__) );
define ( 'STAXO_DIR', dirname(__FILE__) );
// Library
require( STAXO_DIR . '/inc/functions.inc.php' );
// require( STAXO_DIR . '/inc/functions.tpl.php' );
// Call client classes
// require( STAXO_DIR . '/inc/class.base.php' );
require( STAXO_DIR . '/inc/class.client.php' );
require( STAXO_DIR . '/inc/class.widget.php' );
if ( is_admin() ) { // Call admin classes
require( STAXO_DIR . '/inc/class.admin.php' );
require( STAXO_DIR . '/inc/class.admin.conversion.php' );
require( STAXO_DIR . '/inc/class.admin.import.php' );
require( STAXO_DIR . '/inc/class.admin.post.php' );
}
// Activate/Desactive Simple Taxonomy
// register_activation_hook ( __FILE__, array('SimpleTaxonomy_Base', 'activate') );
// register_deactivation_hook( __FILE__, array('SimpleTaxonomy_Base', 'deactivate') );
add_action( 'plugins_loaded', 'init_simple_taxonomy' );
function init_simple_taxonomy() {
global $simple_taxonomy;
// Load translations
load_plugin_textdomain ( 'simple-taxonomy', false, basename(rtrim(dirname(__FILE__), '/')) . '/languages' );
// Client
$simple_taxonomy['client-base'] = new SimpleTaxonomy_Client();
// Admin
if ( is_admin() ) {
// Class admin
$simple_taxonomy['admin-base'] = new SimpleTaxonomy_Admin();
$simple_taxonomy['admin-post'] = new SimpleTaxonomy_Admin_Post();
$simple_taxonomy['admin-conversion'] = new SimpleTaxonomy_Admin_Conversion();
$simple_taxonomy['admin-import'] = new SimpleTaxonomy_Admin_Import();
}
// Widget
add_action( 'widgets_init', create_function('', 'return register_widget("SimpleTaxonomy_Widget");') );
}
?>