kirki
Last commit date
ComponentLibrary
3 days ago
app
3 days ago
assets
3 days ago
bootstrap
3 weeks ago
config
3 weeks ago
customizer
3 weeks ago
database
3 weeks ago
includes
3 days ago
languages
3 days ago
libraries
1 week ago
routes
3 days ago
vendor
1 week ago
config.php
3 weeks ago
kirki.php
3 days ago
readme.txt
3 days ago
config.php
278 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 | if (!defined('KIRKI_WP_ADMIN_COMMON_DATA')) { |
| 118 | define( 'KIRKI_WP_ADMIN_COMMON_DATA','kirki_wp_admin_common_data' ); |
| 119 | } |
| 120 | /* all types of option meta types end */ |
| 121 | |
| 122 | /* all types of user meta types start */ |
| 123 | if (!defined('KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY')) { |
| 124 | define( 'KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY','kirki_user_walkthrough_shown_state' ); |
| 125 | } |
| 126 | /* all types of user meta types end */ |
| 127 | |
| 128 | if (!defined('KIRKI_EDITOR_ACTION')) { |
| 129 | define( 'KIRKI_EDITOR_ACTION', 'kirki' ); |
| 130 | } |
| 131 | |
| 132 | if (!defined('KIRKI_ACCESS_LEVELS')) { |
| 133 | define( |
| 134 | 'KIRKI_ACCESS_LEVELS', |
| 135 | array( |
| 136 | 'NO_ACCESS' => 'no', |
| 137 | 'FULL_ACCESS' => 'full', |
| 138 | 'CONTENT_ACCESS' => 'content', |
| 139 | 'VIEW_ACCESS' => 'view', |
| 140 | ) |
| 141 | ); |
| 142 | } |
| 143 | if (!defined('KIRKI_USERS_DEFAULT_FULL_ACCESS')) { |
| 144 | define( 'KIRKI_USERS_DEFAULT_FULL_ACCESS', array( 'administrator', 'editor' ) ); |
| 145 | } |
| 146 | |
| 147 | /* Custom DB table names */ |
| 148 | if (!defined('KIRKI_FORM_TABLE')) { |
| 149 | define( 'KIRKI_FORM_TABLE','kirki_forms' ); |
| 150 | } |
| 151 | if (!defined('KIRKI_FORM_DATA_TABLE')) { |
| 152 | define( 'KIRKI_FORM_DATA_TABLE','kirki_forms_data' ); |
| 153 | } |
| 154 | if (!defined('KIRKI_COLLABORATION_TABLE')) { |
| 155 | define( 'KIRKI_COLLABORATION_TABLE','kirki_collaborations' ); |
| 156 | } |
| 157 | if (!defined('KIRKI_CM_REFERENCE_TABLE')) { |
| 158 | define( 'KIRKI_CM_REFERENCE_TABLE','kirki_cm_reference' ); |
| 159 | } |
| 160 | if (!defined('KIRKI_COMMENTS_TABLE')) { |
| 161 | define( 'KIRKI_COMMENTS_TABLE','kirki_comments' ); |
| 162 | } |
| 163 | /* Custom DB table names */ |
| 164 | |
| 165 | if (!defined('KIRKI_SUPPORTED_MEDIA_TYPES')) { |
| 166 | define( |
| 167 | 'KIRKI_SUPPORTED_MEDIA_TYPES', |
| 168 | array( |
| 169 | 'image' => array( 'image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp' ), |
| 170 | 'video' => array( 'video/mp4', 'video/ogg', 'video/quicktime' ), |
| 171 | 'svg' => array( 'image/svg+xml' ), |
| 172 | 'audio' => array( 'audio/mpeg', 'audio/ogg' ), |
| 173 | 'json' => array( 'application/json' ), |
| 174 | 'lottie' => array( 'text/plain', 'application/json' ), |
| 175 | 'pdf' => array( 'application/pdf' ), |
| 176 | ) |
| 177 | ); |
| 178 | } |
| 179 | |
| 180 | |
| 181 | if (!defined('KIRKI_SUPPORTED_MEDIA_TYPES_FOR_FILE_INPUT')) { |
| 182 | define( |
| 183 | 'KIRKI_SUPPORTED_MEDIA_TYPES_FOR_FILE_INPUT', |
| 184 | array( |
| 185 | 'default' => array( 'image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp', 'video/mp4', 'video/ogg', 'video/quicktime', 'application/pdf', 'application/msword', 'text/plain' ), |
| 186 | '.doc, .pdf, .txt' => array( 'application/pdf', 'application/msword', 'text/plain' ), |
| 187 | '.mp4, .mov' => array( 'video/mp4', 'video/ogg', 'video/quicktime' ), |
| 188 | '.jpg, .jpeg, .png, .gif' => array( 'image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp' ), |
| 189 | ) |
| 190 | ); |
| 191 | } |
| 192 | |
| 193 | if (!defined('KIRKI_WORDPRESS_SORT_BY_OPTIONS')) { |
| 194 | define( |
| 195 | 'KIRKI_WORDPRESS_SORT_BY_OPTIONS', |
| 196 | array( 'none', 'ID', 'author', 'title', 'name', 'type', 'date', 'modified', 'parent', 'comment_count', 'menu_order' ) |
| 197 | ); |
| 198 | } |
| 199 | |
| 200 | if (!defined('KIRKI_PRESERVED_CLASS_LIST')) { |
| 201 | define( |
| 202 | 'KIRKI_PRESERVED_CLASS_LIST', |
| 203 | array( |
| 204 | 'kirki-current-tab', |
| 205 | 'kirki-tab-active', |
| 206 | 'kirki-slide-active', |
| 207 | 'kirki-slider-nav-item-active', |
| 208 | 'kirki-slider-arrow-left-active', |
| 209 | 'kirki-slider-arrow-right-active', |
| 210 | 'kirki-navigation-item-active', |
| 211 | 'kirki-active', |
| 212 | 'kirki-pagination-item-active', |
| 213 | 'kirki-active-link', |
| 214 | ) |
| 215 | ); |
| 216 | } |
| 217 | |
| 218 | if (!defined('KIRKI_PLUGIN_SETTINGS')) { |
| 219 | define( |
| 220 | 'KIRKI_PLUGIN_SETTINGS', |
| 221 | array( |
| 222 | 'INPUT_TEXT' => array( |
| 223 | 'type' => 'inputtext', |
| 224 | 'placeholder' => 'Placeholder text', |
| 225 | ), |
| 226 | 'INPUT' => array( |
| 227 | 'type' => 'input', |
| 228 | 'placeholder' => 'Placeholder text', |
| 229 | ), |
| 230 | 'INPUT_NUMBER' => array( |
| 231 | 'type' => 'inputnumber', |
| 232 | 'placeholder' => 'Placeholder text', |
| 233 | ), |
| 234 | 'DYNAMIC_INPUT' => array( |
| 235 | 'type' => 'dynamicinput', |
| 236 | 'placeholder' => 'Placeholder text', |
| 237 | ), |
| 238 | 'CHECKBOX' => array( 'type' => 'checkbox' ), |
| 239 | 'TOGGLER' => array( 'type' => 'toggler' ), |
| 240 | 'COLOR_PICKER' => array( |
| 241 | 'type' => 'colorpicker', |
| 242 | 'title' => 'Heading Color', |
| 243 | ), |
| 244 | 'SELECT' => array( |
| 245 | 'type' => 'select', |
| 246 | 'options' => array( |
| 247 | array( |
| 248 | 'value' => 'value1', |
| 249 | 'title' => 'Value One', |
| 250 | ), |
| 251 | array( |
| 252 | 'value' => 'value2', |
| 253 | 'title' => 'Value Two', |
| 254 | ), |
| 255 | ), |
| 256 | ), |
| 257 | 'DIVIDER_FULL' => array( |
| 258 | 'type' => 'divider', |
| 259 | 'style' => 'full', |
| 260 | ), |
| 261 | 'DIVIDER_HALF' => array( |
| 262 | 'type' => 'divider', |
| 263 | 'style' => 'half', |
| 264 | ), |
| 265 | 'DIVIDER_TRANSPARENT' => array( 'type' => 'divider_tansparent' ), |
| 266 | 'TAB' => array( |
| 267 | 'type' => 'tab', |
| 268 | 'tabs' => array(), |
| 269 | ), |
| 270 | 'DATEPICKER' => array( 'type' => 'datepicker' ), |
| 271 | 'SELECT_WITH_WP_POST_SUGGESTION' => array( |
| 272 | 'postType' =>'kirki_popup', |
| 273 | 'type' => 'select_with_wp_post_suggestion', |
| 274 | ), |
| 275 | ) |
| 276 | ); |
| 277 | } |
| 278 |