-
Notifications
You must be signed in to change notification settings - Fork 7
/
wc-shortcodes.php
112 lines (73 loc) · 3.93 KB
/
wc-shortcodes.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
/*
Plugin Name: Shortcodes by Angie Makes
Plugin URI: http://angiemakes.com/feminine-wordpress-blog-themes-women/
Description: A plugin that adds a useful family of shortcodes to your WordPress theme.
Author: Chris Baldelomar
Author URI: http://angiemakes.com/
Version: 3.46
License: GPLv2 or later
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/*----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
require_once( plugin_dir_path( __FILE__ ) . 'public/class-vars.php' );
WPC_Shortcodes_Vars::init_vars();
require_once( plugin_dir_path( __FILE__ ) . 'public/functions.php' ); // Adds basic filters and actions
require_once( plugin_dir_path( __FILE__ ) . 'public/class-public.php' );
require_once( plugin_dir_path( __FILE__ ) . 'public/class-sanitize.php' );
require_once( plugin_dir_path( __FILE__ ) . 'public/class-register.php' );
require_once( plugin_dir_path( __FILE__ ) . 'public/class-hooks.php' );
if ( WC_SHORTCODES_SLIDE_POST_TYPE_ENABLED ) {
require_once( plugin_dir_path( __FILE__ ) . 'public/post-types/class-slide-post-type.php' ); //Adds basic filters and actions
}
if ( WC_SHORTCODES_COLLAGE_POST_TYPE_ENABLED ) {
require_once( plugin_dir_path( __FILE__ ) . 'public/post-types/class-collage-post-type.php' ); //Adds basic filters and actions
}
require_once( plugin_dir_path( __FILE__ ) . 'public/class-ajax-front.php' );
require_once( plugin_dir_path( __FILE__ ) . 'public/class-widget-options.php' );
require_once( plugin_dir_path( __FILE__ ) . 'public/class-widget-base.php' );
foreach ( glob( plugin_dir_path( __FILE__ ) . 'public/widgets/widget-*.php' ) as $filename ) {
require_once( $filename );
}
require_once( plugin_dir_path( __FILE__ ) . 'public/class-widgets.php' );
// Initialize classes.
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Public', 'get_instance' ) );
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Register', 'get_instance' ) );
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Hooks', 'get_instance' ) );
if ( WC_SHORTCODES_SLIDE_POST_TYPE_ENABLED ) {
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Slide_Post_Type', 'get_instance' ) );
}
if ( WC_SHORTCODES_COLLAGE_POST_TYPE_ENABLED ) {
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Collage_Post_Type', 'get_instance' ) );
}
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Ajax_Front', 'get_instance' ) );
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Widgets', 'get_instance' ) );
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*/
// register_activation_hook( __FILE__, array( 'WPC_Shortcode_Public', 'single_activate' ) );
// register_deactivation_hook( __FILE__, array( 'WPC_Shortcode_Public', 'single_deactivate' ) );
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
if ( is_admin() ) {
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-admin.php' );
require_once( plugin_dir_path( __FILE__ ) . 'includes/vendors/wpc-settings-framework/init.php' );
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-options.php' );
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-tinymce-buttons.php' );
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Admin', 'get_instance' ) );
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Options', 'get_instance' ) );
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_TinyMCE_Buttons', 'get_instance' ) );
}
else {
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-ajax.php' );
add_action( 'plugins_loaded', array( 'WPC_Shortcodes_Ajax', 'get_instance' ) );
}
}