kirki
Last commit date
ComponentLibrary
2 weeks ago
app
4 days ago
assets
4 days ago
bootstrap
4 days ago
config
4 days ago
customizer
1 month ago
database
1 month ago
includes
4 days ago
languages
4 days ago
libraries
4 days ago
routes
4 days ago
vendor
4 days ago
config.php
4 days ago
kirki.php
4 days ago
readme.txt
4 days ago
config.php
285 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Kirki Configurations |
| 4 | * |
| 5 | * @package kirki |
| 6 | */ |
| 7 | |
| 8 | defined('ABSPATH') || exit; |
| 9 | |
| 10 | if (!defined('KIRKI_APP_PREFIX')) { |
| 11 | define('KIRKI_APP_PREFIX', 'kirki'); |
| 12 | } |
| 13 | if (!defined('KIRKI_PREFIX')) { |
| 14 | define('KIRKI_PREFIX', 'kirki_'); |
| 15 | } |
| 16 | if (!defined('KIRKI_ENV_MODE')) { |
| 17 | define('KIRKI_ENV_MODE', 'production'); |
| 18 | } |
| 19 | if (!defined('KIRKI_CORE_PLUGIN_URL')) { |
| 20 | define('KIRKI_CORE_PLUGIN_URL', 'https://kirki.com'); |
| 21 | } |
| 22 | if (!defined('KIRKI_PUBLIC_ASSETS_URL')) { |
| 23 | define('KIRKI_PUBLIC_ASSETS_URL', 'https://d31d7414w5c76z.cloudfront.net'); |
| 24 | } |
| 25 | |
| 26 | if (!defined('KIRKI_META_NAME_FOR_POST_EDITOR_MODE')) { |
| 27 | define('KIRKI_META_NAME_FOR_POST_EDITOR_MODE', 'kirki_editor_mode'); |
| 28 | } |
| 29 | if (!defined('KIRKI_META_NAME_FOR_USED_STYLE_BLOCK_IDS')) { |
| 30 | define('KIRKI_META_NAME_FOR_USED_STYLE_BLOCK_IDS', 'kirki_used_style_block_ids'); |
| 31 | } |
| 32 | if (!defined('KIRKI_META_NAME_FOR_USED_FONT_LIST')) { |
| 33 | define('KIRKI_META_NAME_FOR_USED_FONT_LIST', 'kirki_used_font_list'); |
| 34 | } |
| 35 | if (!defined('KIRKI_META_NAME_FOR_STAGED_VERSIONS')) { |
| 36 | define('KIRKI_META_NAME_FOR_STAGED_VERSIONS', 'kirki_stage_versions'); |
| 37 | } |
| 38 | if (!defined('KIRKI_META_NAME_FOR_PAGE_HF_SYMBOL_DISABLE_STATUS')) { |
| 39 | define('KIRKI_META_NAME_FOR_PAGE_HF_SYMBOL_DISABLE_STATUS', 'kirki_disabled_page_symbols'); |
| 40 | } |
| 41 | |
| 42 | |
| 43 | // droip apps. |
| 44 | if (!defined('IS_DEVELOPING_KIRKI_APPS')) { |
| 45 | define('IS_DEVELOPING_KIRKI_APPS', false); |
| 46 | } |
| 47 | if (IS_DEVELOPING_KIRKI_APPS) { |
| 48 | if (!defined('KIRKI_APPS_BASE_URL')) { |
| 49 | define('KIRKI_APPS_BASE_URL', content_url() . '/kirki-apps-dev/build'); |
| 50 | } |
| 51 | } else { |
| 52 | if (!defined('KIRKI_APPS_BASE_URL')) { |
| 53 | define('KIRKI_APPS_BASE_URL', KIRKI_PUBLIC_ASSETS_URL . '/kirki-apps'); |
| 54 | } |
| 55 | } |
| 56 | if (!defined('KIRKI_DEVELOPING_APPS_INCLUDES')) { |
| 57 | define('KIRKI_DEVELOPING_APPS_INCLUDES', plugin_dir_path(__FILE__) . '../../kirki-apps-dev/index.php'); |
| 58 | } |
| 59 | |
| 60 | |
| 61 | /* all types of file paths start */ |
| 62 | if (!defined('KIRKI_PLUGIN_PATH')) { |
| 63 | define('KIRKI_PLUGIN_PATH', plugin_dir_path(__FILE__)); |
| 64 | } |
| 65 | if (!defined('KIRKI_PLUGIN_REL_URL')) { |
| 66 | define('KIRKI_PLUGIN_REL_URL', dirname(plugin_basename(__FILE__))); |
| 67 | } |
| 68 | if (!defined('KIRKI_ROOT_URL')) { |
| 69 | define('KIRKI_ROOT_URL', plugin_dir_url(__FILE__)); |
| 70 | } |
| 71 | if (!defined('KIRKI_ASSETS_URL')) { |
| 72 | define('KIRKI_ASSETS_URL', KIRKI_ROOT_URL . 'assets/'); |
| 73 | } |
| 74 | if (!defined('KIRKI_PLUGIN_FILE')) { |
| 75 | define('KIRKI_PLUGIN_FILE', KIRKI_PLUGIN_PATH . 'kirki.php'); |
| 76 | } |
| 77 | if (!defined('KIRKI_FULL_CANVAS_TEMPLATE_PATH')) { |
| 78 | define('KIRKI_FULL_CANVAS_TEMPLATE_PATH', str_replace('\\', '/', KIRKI_PLUGIN_PATH . 'includes' . DIRECTORY_SEPARATOR . 'Frontend' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'page.php')); |
| 79 | } |
| 80 | /* all types of file paths end */ |
| 81 | |
| 82 | /* all types of post types start */ |
| 83 | if (!defined('KIRKI_GLOBAL_DATA_POST_TYPE_NAME')) { |
| 84 | define('KIRKI_GLOBAL_DATA_POST_TYPE_NAME', 'kirki_global_data'); |
| 85 | } |
| 86 | if (!defined('KIRKI_POST_TYPE')) { |
| 87 | define('KIRKI_POST_TYPE', 'kirki_post'); |
| 88 | } |
| 89 | if (!defined('KIRKI_SYMBOL_TYPE')) { |
| 90 | define('KIRKI_SYMBOL_TYPE', 'kirki_symbol'); |
| 91 | } |
| 92 | if (!defined('KIRKI_CONTENT_MANAGER_PREFIX')) { |
| 93 | define('KIRKI_CONTENT_MANAGER_PREFIX', 'kirki_cm'); |
| 94 | } |
| 95 | /* all types of post types end */ |
| 96 | |
| 97 | /* all types of option meta types start */ |
| 98 | if (!defined('KIRKI_USER_CONTROLLER_META_KEY')) { |
| 99 | define('KIRKI_USER_CONTROLLER_META_KEY', 'kirki_user_controller'); |
| 100 | } |
| 101 | if (!defined('KIRKI_GLOBAL_STYLE_BLOCK_META_KEY')) { |
| 102 | define('KIRKI_GLOBAL_STYLE_BLOCK_META_KEY', 'kirki_global_style_block'); |
| 103 | } |
| 104 | if (!defined('KIRKI_USER_SAVED_DATA_META_KEY')) { |
| 105 | define('KIRKI_USER_SAVED_DATA_META_KEY', 'kirki_user_saved_data'); |
| 106 | } |
| 107 | if (!defined('KIRKI_USER_CUSTOM_FONTS_META_KEY')) { |
| 108 | define('KIRKI_USER_CUSTOM_FONTS_META_KEY', 'kirki_user_custom_fonts'); |
| 109 | } |
| 110 | if (!defined('KIRKI_PAGE_SEO_SETTINGS_META_KEY')) { |
| 111 | define('KIRKI_PAGE_SEO_SETTINGS_META_KEY', 'kirki_page_seo_settings'); |
| 112 | } |
| 113 | if (!defined('KIRKI_PAGE_CUSTOM_CODE')) { |
| 114 | define('KIRKI_PAGE_CUSTOM_CODE', 'kirki_page_custom_code'); |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * @deprecated Use Kirki\App\Constants\OptionKeys::WP_ADMIN_COMMON_DATA instead of this. |
| 119 | * @see Kirki\App\Constants\OptionKeys |
| 120 | */ |
| 121 | if (!defined('KIRKI_WP_ADMIN_COMMON_DATA')) { |
| 122 | define('KIRKI_WP_ADMIN_COMMON_DATA', 'kirki_wp_admin_common_data'); |
| 123 | } |
| 124 | /* all types of option meta types end */ |
| 125 | |
| 126 | /* all types of user meta types start */ |
| 127 | if (!defined('KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY')) { |
| 128 | define('KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY', 'kirki_user_walkthrough_shown_state'); |
| 129 | } |
| 130 | /* all types of user meta types end */ |
| 131 | |
| 132 | if (!defined('KIRKI_EDITOR_ACTION')) { |
| 133 | define('KIRKI_EDITOR_ACTION', 'kirki'); |
| 134 | } |
| 135 | |
| 136 | if (!defined('KIRKI_ACCESS_LEVELS')) { |
| 137 | define( |
| 138 | 'KIRKI_ACCESS_LEVELS', |
| 139 | array( |
| 140 | 'NO_ACCESS' => 'no', |
| 141 | 'FULL_ACCESS' => 'full', |
| 142 | 'CONTENT_ACCESS' => 'content', |
| 143 | 'VIEW_ACCESS' => 'view', |
| 144 | ) |
| 145 | ); |
| 146 | } |
| 147 | if (!defined('KIRKI_USERS_DEFAULT_FULL_ACCESS')) { |
| 148 | define('KIRKI_USERS_DEFAULT_FULL_ACCESS', array('administrator', 'editor')); |
| 149 | } |
| 150 | |
| 151 | /* Custom DB table names */ |
| 152 | if (!defined('KIRKI_FORM_TABLE')) { |
| 153 | define('KIRKI_FORM_TABLE', 'kirki_forms'); |
| 154 | } |
| 155 | if (!defined('KIRKI_FORM_DATA_TABLE')) { |
| 156 | define('KIRKI_FORM_DATA_TABLE', 'kirki_forms_data'); |
| 157 | } |
| 158 | if (!defined('KIRKI_COLLABORATION_TABLE')) { |
| 159 | define('KIRKI_COLLABORATION_TABLE', 'kirki_collaborations'); |
| 160 | } |
| 161 | if (!defined('KIRKI_CM_REFERENCE_TABLE')) { |
| 162 | define('KIRKI_CM_REFERENCE_TABLE', 'kirki_cm_reference'); |
| 163 | } |
| 164 | if (!defined('KIRKI_COMMENTS_TABLE')) { |
| 165 | define('KIRKI_COMMENTS_TABLE', 'kirki_comments'); |
| 166 | } |
| 167 | /* Custom DB table names */ |
| 168 | |
| 169 | if (!defined('KIRKI_SUPPORTED_MEDIA_TYPES')) { |
| 170 | define( |
| 171 | 'KIRKI_SUPPORTED_MEDIA_TYPES', |
| 172 | array( |
| 173 | 'image' => array('image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp'), |
| 174 | 'video' => array('video/mp4', 'video/ogg', 'video/quicktime'), |
| 175 | 'svg' => array('image/svg+xml'), |
| 176 | 'audio' => array('audio/mpeg', 'audio/ogg'), |
| 177 | 'json' => array('application/json'), |
| 178 | 'lottie' => array('text/plain', 'application/json'), |
| 179 | 'pdf' => array('application/pdf'), |
| 180 | ) |
| 181 | ); |
| 182 | } |
| 183 | |
| 184 | |
| 185 | /** |
| 186 | * @deprecated Use config('form-uploads.accepted_mime_types') instead. |
| 187 | */ |
| 188 | if (!defined('KIRKI_SUPPORTED_MEDIA_TYPES_FOR_FILE_INPUT')) { |
| 189 | define( |
| 190 | 'KIRKI_SUPPORTED_MEDIA_TYPES_FOR_FILE_INPUT', |
| 191 | array( |
| 192 | 'default' => array('image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp', 'video/mp4', 'video/ogg', 'video/quicktime', 'application/pdf', 'application/msword', 'text/plain'), |
| 193 | '.doc, .pdf, .txt' => array('application/pdf', 'application/msword', 'text/plain'), |
| 194 | '.mp4, .mov' => array('video/mp4', 'video/ogg', 'video/quicktime'), |
| 195 | '.jpg, .jpeg, .png, .gif' => array('image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp'), |
| 196 | ) |
| 197 | ); |
| 198 | } |
| 199 | |
| 200 | if (!defined('KIRKI_WORDPRESS_SORT_BY_OPTIONS')) { |
| 201 | define( |
| 202 | 'KIRKI_WORDPRESS_SORT_BY_OPTIONS', |
| 203 | array('none', 'ID', 'author', 'title', 'name', 'type', 'date', 'modified', 'parent', 'comment_count', 'menu_order') |
| 204 | ); |
| 205 | } |
| 206 | |
| 207 | if (!defined('KIRKI_PRESERVED_CLASS_LIST')) { |
| 208 | define( |
| 209 | 'KIRKI_PRESERVED_CLASS_LIST', |
| 210 | array( |
| 211 | 'kirki-current-tab', |
| 212 | 'kirki-tab-active', |
| 213 | 'kirki-slide-active', |
| 214 | 'kirki-slider-nav-item-active', |
| 215 | 'kirki-slider-arrow-left-active', |
| 216 | 'kirki-slider-arrow-right-active', |
| 217 | 'kirki-navigation-item-active', |
| 218 | 'kirki-active', |
| 219 | 'kirki-pagination-item-active', |
| 220 | 'kirki-active-link', |
| 221 | ) |
| 222 | ); |
| 223 | } |
| 224 | |
| 225 | if (!defined('KIRKI_PLUGIN_SETTINGS')) { |
| 226 | define( |
| 227 | 'KIRKI_PLUGIN_SETTINGS', |
| 228 | array( |
| 229 | 'INPUT_TEXT' => array( |
| 230 | 'type' => 'inputtext', |
| 231 | 'placeholder' => 'Placeholder text', |
| 232 | ), |
| 233 | 'INPUT' => array( |
| 234 | 'type' => 'input', |
| 235 | 'placeholder' => 'Placeholder text', |
| 236 | ), |
| 237 | 'INPUT_NUMBER' => array( |
| 238 | 'type' => 'inputnumber', |
| 239 | 'placeholder' => 'Placeholder text', |
| 240 | ), |
| 241 | 'DYNAMIC_INPUT' => array( |
| 242 | 'type' => 'dynamicinput', |
| 243 | 'placeholder' => 'Placeholder text', |
| 244 | ), |
| 245 | 'CHECKBOX' => array('type' => 'checkbox'), |
| 246 | 'TOGGLER' => array('type' => 'toggler'), |
| 247 | 'COLOR_PICKER' => array( |
| 248 | 'type' => 'colorpicker', |
| 249 | 'title' => 'Heading Color', |
| 250 | ), |
| 251 | 'SELECT' => array( |
| 252 | 'type' => 'select', |
| 253 | 'options' => array( |
| 254 | array( |
| 255 | 'value' => 'value1', |
| 256 | 'title' => 'Value One', |
| 257 | ), |
| 258 | array( |
| 259 | 'value' => 'value2', |
| 260 | 'title' => 'Value Two', |
| 261 | ), |
| 262 | ), |
| 263 | ), |
| 264 | 'DIVIDER_FULL' => array( |
| 265 | 'type' => 'divider', |
| 266 | 'style' => 'full', |
| 267 | ), |
| 268 | 'DIVIDER_HALF' => array( |
| 269 | 'type' => 'divider', |
| 270 | 'style' => 'half', |
| 271 | ), |
| 272 | 'DIVIDER_TRANSPARENT' => array('type' => 'divider_tansparent'), |
| 273 | 'TAB' => array( |
| 274 | 'type' => 'tab', |
| 275 | 'tabs' => array(), |
| 276 | ), |
| 277 | 'DATEPICKER' => array('type' => 'datepicker'), |
| 278 | 'SELECT_WITH_WP_POST_SUGGESTION' => array( |
| 279 | 'postType' => 'kirki_popup', |
| 280 | 'type' => 'select_with_wp_post_suggestion', |
| 281 | ), |
| 282 | ) |
| 283 | ); |
| 284 | } |
| 285 |