-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
130 lines (117 loc) · 8.27 KB
/
Copy pathindex.php
File metadata and controls
130 lines (117 loc) · 8.27 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
/**
* @Author Jonathon byrd
* @link http://www.jonathonbyrd.com
* @Package Wordpress
* @SubPackage Total Widget Control
* @copyright Proprietary Software, Copyright Byrd Incorporated. All Rights Reserved
* @Since 1.0.0
*
*
* Plugin Name: Total Widget Control
* Plugin URI: http://www.5twentystudios.com
* Description: <a href="http://www.totalwidgetcontrol.com" target="_blank">Total Widget Control</a> is a plugin for WordPress that allows administrators to display widgets when, where and to whom they want. Additionally, TWC makes theme development a breeze by providing template codes for managing and creating widgets and sidebars. Visit the dedicated community at <a href="http://www.totalwidgetcontrol.com" target="_blank">www.totalwidgetcontrol.com</a>
* Version: 1.6.16
* Author: 5Twenty Studios
* Author URI: http://www.5twentystudios.com
*
*
*/
defined('ABSPATH') or die("Cannot access pages directly.");
/**
* Initializing
*
* The directory separator is different between linux and microsoft servers.
* Thankfully php sets the DIRECTORY_SEPARATOR constant so that we know what
* to use.
*/
defined("TWC_AFFILIATE_ID") or define("TWC_AFFILIATE_ID", '1');
/**
* Initializing
*
* The directory separator is different between linux and microsoft servers.
* Thankfully php sets the DIRECTORY_SEPARATOR constant so that we know what
* to use.
*/
defined("DS") or define("DS", DIRECTORY_SEPARATOR);
/**
* Initializing
*
* The directory separator is different between linux and microsoft servers.
* Thankfully php sets the DIRECTORY_SEPARATOR constant so that we know what
* to use.
*/
defined("TWC_VERSION") or define("TWC_VERSION", '1.6.16');
/**
* Initialize Localization
*
* @tutorial http://codex.wordpress.org/I18n_for_WordPress_Developers
* function call loads the localization files from the current folder
*/
if (function_exists('load_theme_textdomain')) load_theme_textdomain('twc');
/**
* Set Dates Default Timezone
*
* The server has a timezone, mysql has a timezone, php has a timezone and wordpress
* it's own timezone. The following setting will synchronize the wordpress timezone
* with the php timezone. This program uses the php timezone for publishing settings.
*/
if (function_exists('date_default_timezone_set')) date_default_timezone_set(get_site_option('timezone_string', 'UTC'));
if (function_exists('ini_set')) ini_set('date.timezone', get_site_option('timezone_string', 'UTC'));
/**
* Lite License
*
* This is the lite license that can be used on any domain.
*/
defined("TWC_LITE_LICENSE") or define("TWC_LITE_LICENSE", 'aWYgKGZ1bmN0aW9uX2V4aXN0cygidHdjX2Vycm9yX2xvZyIpICYmIGdldF9vcHRpb24oInR3Y19yZWNlaXZlZF9hX2xpY2Vuc2UiLCBmYWxzZSkpCnsKCXVwZGF0ZV9vcHRpb24oJ3R3Y19yZWNlaXZlZF9hX2xpY2Vuc2UnLCBmYWxzZSk7Cgl0d2NfZXJyb3JfbG9nKCJUaGUgbGljZW5zZSBoYXMgYmVlbiBsb2FkZWQgZmluZS48aHI+Iik7Cn0KJEdMT0JBTFNbIlRXQ0FVVEgiXSA9IGZhbHNlOwpyZW1vdmVfYWxsX2FjdGlvbnMoInR3Y19kaXNwbGF5X2FkbWluIik7CmFkZF9hY3Rpb24oImluaXQiLCAidHdjX3dpZGdldF9nbG9iYWwiKTsKYWRkX2FjdGlvbigndHdjX2luaXQnLCAndHdjX2J1bGtfYWN0aW9ucycsIDQpOwphZGRfYWN0aW9uKCJ0d2NfaW5pdCIsICJ0d2NfY2xlYXIiLCA1KTsKYWRkX2FjdGlvbigidHdjX2luaXQiLCAidHdjX3JlZ2lzdGVyX3BsYWNlaG9sZGVyX3NpZGViYXIiLCAxMCk7CmFkZF9hY3Rpb24oInR3Y19pbml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SAoaXNzZXQoJHdpZGdldFsncCddWyd0d2NwX3dpZGdldF90aXRsZSddKSAmJiBzdHJsZW4odHJpbSgkd2lkZ2V0WydwJ11bJ3R3Y3Bfd2lkZ2V0X3RpdGxlJ10pKSk7CglpZiAoJGlzcHJvKSByZXR1cm4gJHdpZGdldFsncCddWyd0d2NwX3dpZGdldF90aXRsZSddOwoJcmV0dXJuICR0aXRsZTsKfQo=');
/**
* User Control Level
*
* Allows the developer to hook into this system and set the access level for this plugin.
* If the user does not have the capability to view this plguin, they may still be
* able to view the default widget area. This will not cause problems with the script,
* however the editing user will not be able to add or delete viewable pages to the
* widget.
*
* @TODO need to set this to call get_option from the db
*/
defined("TWC_ACCESS_CAPABILITY") or define("TWC_ACCESS_CAPABILITY", "edit_theme_options" );
/**
* Are Sortables Turned On
*
* You probably shouldn't turn on this constant at all, it's still very much in
* the development stage.
*/
defined("TWC_SORTABLES") or define("TWC_SORTABLES", FALSE);
/**
* Startup
*
* This block of functions is only preloading a set of functions that I've prebuilt
* and that I use throughout my websites.
*
* @TODO Need to test this system while it's using the bootstrap file, currently it's being
* overridden by the 520 plugin
*
* @copyright Proprietary Software, Copyright Byrd Incorporated. All Rights Reserved
* @since 1.0
*/
require_once ABSPATH.WPINC.DS."pluggable.php";
require_once dirname(__file__).DS."bootstrap.php";
require_once dirname(__file__).DS."total-widget-control.php";
require_once dirname(__file__).DS."template-codes.php";
require_once dirname(__file__).DS."widgets.php";
/**
* Initialize the Framework
*
*/
set_controller_path( dirname( __FILE__ ) );
require_once dirname(__file__).DS."auth.php";
twc_initialize();
/**
* Initializing
*
* The directory separator is different between linux and microsoft servers.
* Thankfully php sets the DIRECTORY_SEPARATOR constant so that we know what
* to use.
*/
defined("TWC_LICENSE") or define("TWC_LICENSE", 'lite');