File tree Expand file tree Collapse file tree 4 files changed +104
-22
lines changed
Expand file tree Collapse file tree 4 files changed +104
-22
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Defines all default globals used throughout the library.
4+ *
5+ * @package CareLib\Globals
6+ * @author WP Site Care
7+ * @copyright Copyright (c) 2016, WP Site Care, LLC
8+ * @license GPL-2.0+
9+ * @since 1.0.0
10+ */
11+
12+ defined ( 'ABSPATH ' ) || exit;
13+
14+ /**
15+ * Provide reliable access to the library's functions before the global
16+ * actions, filters, and classes are initialized.
17+ *
18+ * @since 1.0.0
19+ * @access public
20+ */
21+ do_action ( 'carelib_admin_before_init ' );
22+
23+ require_once CARELIB_DIR . 'admin/dashboard.php ' ;
24+ require_once CARELIB_DIR . 'admin/layouts.php ' ;
25+ require_once CARELIB_DIR . 'admin/metabox-post-layouts.php ' ;
26+ require_once CARELIB_DIR . 'admin/metabox-post-styles.php ' ;
27+ require_once CARELIB_DIR . 'admin/metabox-post-templates.php ' ;
28+ require_once CARELIB_DIR . 'admin/scripts.php ' ;
29+ require_once CARELIB_DIR . 'admin/styles.php ' ;
30+ require_once CARELIB_DIR . 'admin/actions.php ' ;
31+
32+ /**
33+ * Provide reliable access to the library's functions before the global
34+ * actions, filters, and classes are initialized.
35+ *
36+ * @since 1.0.0
37+ * @access public
38+ */
39+ do_action ( 'carelib_admin_after_init ' );
Original file line number Diff line number Diff line change 103103function carelib_init () {
104104 require_once CARELIB_DIR . 'includes/init.php ' ;
105105}
106+
107+ add_action ( 'after_setup_theme ' , 'carelib_admin_init ' , -95 );
108+ /**
109+ * Load and initialize all library functionality.
110+ *
111+ * @since 1.0.0
112+ * @access public
113+ * @return void
114+ */
115+ function carelib_admin_init () {
116+ if ( is_admin () ) {
117+ require_once CARELIB_DIR . 'admin/init.php ' ;
118+ }
119+ }
120+
121+ add_action ( 'after_setup_theme ' , 'carelib_customize_init ' , -95 );
122+ /**
123+ * Load and initialize all library functionality.
124+ *
125+ * @since 1.0.0
126+ * @access public
127+ * @return void
128+ */
129+ function carelib_customize_init () {
130+ if ( is_customize_preview () ) {
131+ require_once CARELIB_DIR . 'customize/init.php ' ;
132+ }
133+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Defines all default globals used throughout the library.
4+ *
5+ * @package CareLib\Globals
6+ * @author WP Site Care
7+ * @copyright Copyright (c) 2016, WP Site Care, LLC
8+ * @license GPL-2.0+
9+ * @since 1.0.0
10+ */
11+
12+ defined ( 'ABSPATH ' ) || exit;
13+
14+ /**
15+ * Provide reliable access to the library's functions before the global
16+ * actions, filters, and classes are initialized.
17+ *
18+ * @since 1.0.0
19+ * @access public
20+ */
21+ do_action ( 'carelib_customize_before_init ' );
22+
23+ require_once CARELIB_DIR . 'customize/control-radio-image.php ' ;
24+ require_once CARELIB_DIR . 'customize/control-layout.php ' ;
25+ require_once CARELIB_DIR . 'customize/register.php ' ;
26+ require_once CARELIB_DIR . 'customize/scripts.php ' ;
27+ require_once CARELIB_DIR . 'customize/styles.php ' ;
28+ require_once CARELIB_DIR . 'customize/actions.php ' ;
29+
30+ /**
31+ * Provide reliable access to the library's functions before the global
32+ * actions, filters, and classes are initialized.
33+ *
34+ * @since 1.0.0
35+ * @access public
36+ */
37+ do_action ( 'carelib_customize_after_init ' );
Original file line number Diff line number Diff line change 1717 *
1818 * @since 1.0.0
1919 * @access public
20- * @param string $version the current library version
2120 */
2221do_action ( 'carelib_before_init ' );
2322
5150require_once CARELIB_DIR . 'includes/actions.php ' ;
5251require_once CARELIB_DIR . 'includes/filters.php ' ;
5352
54- if ( is_admin () ) {
55- require_once CARELIB_DIR . 'admin/dashboard.php ' ;
56- require_once CARELIB_DIR . 'admin/layouts.php ' ;
57- require_once CARELIB_DIR . 'admin/metabox-post-layouts.php ' ;
58- require_once CARELIB_DIR . 'admin/metabox-post-styles.php ' ;
59- require_once CARELIB_DIR . 'admin/metabox-post-templates.php ' ;
60- require_once CARELIB_DIR . 'admin/scripts.php ' ;
61- require_once CARELIB_DIR . 'admin/styles.php ' ;
62- require_once CARELIB_DIR . 'admin/actions.php ' ;
63- }
64-
65- if ( is_customize_preview () ) {
66- require_once CARELIB_DIR . 'customize/control-radio-image.php ' ;
67- require_once CARELIB_DIR . 'customize/control-layout.php ' ;
68- require_once CARELIB_DIR . 'customize/register.php ' ;
69- require_once CARELIB_DIR . 'customize/scripts.php ' ;
70- require_once CARELIB_DIR . 'customize/styles.php ' ;
71- require_once CARELIB_DIR . 'customize/actions.php ' ;
72- }
73-
7453/**
7554 * Provide reliable access to the library's functions before the global
7655 * actions, filters, and classes are initialized.
7756 *
7857 * @since 1.0.0
7958 * @access public
80- * @param string $version the current library version
8159 */
8260do_action ( 'carelib_after_init ' );
You can’t perform that action at this time.
0 commit comments