| 1 |
<?php |
| 2 |
|
| 3 |
// Include part of site URL hash in HTML settings to update when site URL changes |
| 4 |
$sitehash = substr( md5( WPUltimatePostGrid::get()->coreUrl ), 0, 8 ); |
| 5 |
|
| 6 |
$template_editor_button = WPUltimatePostGrid::is_addon_active( 'template-editor' ) ? 'grid_template_open_template_editor_active' . $sitehash : 'grid_template_open_template_editor_disabled'; |
| 7 |
|
| 8 |
$admin_menu = array( |
| 9 |
'title' => 'WP Ultimate Post Grid ' . __('Settings', 'wp-ultimate-post-grid'), |
| 10 |
'logo' => WPUltimatePostGrid::get()->coreUrl . '/img/logo.png', |
| 11 |
'menus' => array( |
| 12 |
//=-=-=-=-=-=-= GRID TEMPLATE =-=-=-=-=-=-= |
| 13 |
array( |
| 14 |
'title' => __('Grid Template', 'wp-ultimate-post-grid'), |
| 15 |
'name' => 'grid_template', |
| 16 |
'icon' => 'font-awesome:fa-picture-o', |
| 17 |
'menus' => array( |
| 18 |
array( |
| 19 |
'title' => __('Template Editor', 'wp-ultimate-post-grid'), |
| 20 |
'name' => 'grid_template_template_editor_menu', |
| 21 |
'controls' => array( |
| 22 |
array( |
| 23 |
'type' => 'notebox', |
| 24 |
'name' => 'grid_template_premium_not_installed', |
| 25 |
'label' => 'WP Ultimate Post Grid Premium', |
| 26 |
'description' => __('These features are only available in', 'wp-ultimate-post-grid') . ' <a href="http://bootstrapped.ventures/wp-ultimate-post-grid/" target="_blank">WP Ultimate Post Grid Premium</a></strong>.', |
| 27 |
'status' => 'warning', |
| 28 |
'dependency' => array( |
| 29 |
'field' => '', |
| 30 |
'function' => 'wpupg_admin_premium_not_installed', |
| 31 |
), |
| 32 |
), |
| 33 |
array( |
| 34 |
'type' => 'section', |
| 35 |
'title' => __('Template Editor', 'wp-ultimate-post-grid'), |
| 36 |
'name' => 'grid_template_editor', |
| 37 |
'fields' => array( |
| 38 |
array( |
| 39 |
'type' => 'html', |
| 40 |
'name' => $template_editor_button, |
| 41 |
'binding' => array( |
| 42 |
'field' => '', |
| 43 |
'function' => 'wpupg_admin_template_editor', |
| 44 |
), |
| 45 |
), |
| 46 |
array( |
| 47 |
'type' => 'select', |
| 48 |
'name' => 'template_editor_preview_grid', |
| 49 |
'label' => __('Preview Grid', 'wp-ultimate-post-grid'), |
| 50 |
'description' => __( 'This grid will be used for the preview in the editor.', 'wp-ultimate-post-grid' ), |
| 51 |
'items' => array( |
| 52 |
'data' => array( |
| 53 |
array( |
| 54 |
'source' => 'function', |
| 55 |
'value' => 'wpupg_admin_grids', |
| 56 |
), |
| 57 |
), |
| 58 |
), |
| 59 |
'default' => array( |
| 60 |
'{{first}}', |
| 61 |
), |
| 62 |
), |
| 63 |
), |
| 64 |
), |
| 65 |
), |
| 66 |
), |
| 67 |
array( |
| 68 |
'title' => __('Advanced', 'wp-ultimate-post-grid'), |
| 69 |
'name' => 'grid_template_advanced_menu', |
| 70 |
'controls' => array( |
| 71 |
array( |
| 72 |
'type' => 'section', |
| 73 |
'title' => 'CSS', |
| 74 |
'name' => 'grid_template_advanced_styling', |
| 75 |
'fields' => array( |
| 76 |
array( |
| 77 |
'type' => 'toggle', |
| 78 |
'name' => 'grid_template_force_style', |
| 79 |
'label' => __('Force CSS style', 'wp-ultimate-post-grid'), |
| 80 |
'description' => __( 'This ensures maximum compatibility with most themes. Can be disabled for advanced usage.', 'wp-ultimate-post-grid' ), |
| 81 |
'default' => '1', |
| 82 |
), |
| 83 |
array( |
| 84 |
'type' => 'toggle', |
| 85 |
'name' => 'grid_template_inline_css', |
| 86 |
'label' => __('Output Inline CSS', 'wp-ultimate-post-grid'), |
| 87 |
'description' => __( 'When disabled the Template Editor will not output any inline CSS.', 'wp-ultimate-post-grid' ), |
| 88 |
'default' => '1', |
| 89 |
), |
| 90 |
), |
| 91 |
), |
| 92 |
), |
| 93 |
), |
| 94 |
), |
| 95 |
), |
| 96 |
//=-=-=-=-=-=-= GRID =-=-=-=-=-=-= |
| 97 |
array( |
| 98 |
'title' => __('Grid', 'wp-ultimate-post-grid'), |
| 99 |
'name' => 'grid', |
| 100 |
'icon' => 'font-awesome:fa-th-large', |
| 101 |
'controls' => array( |
| 102 |
array( |
| 103 |
'type' => 'section', |
| 104 |
'title' => __('Animations', 'wp-ultimate-post-grid'), |
| 105 |
'name' => 'grid_animations', |
| 106 |
'fields' => array( |
| 107 |
array( |
| 108 |
'type' => 'slider', |
| 109 |
'name' => 'grid_animation_speed', |
| 110 |
'label' => __( 'Animation Speed', 'wp-ultimate-post-grid' ), |
| 111 |
'description' => __( 'Duration of the animations in seconds.', 'wp-ultimate-post-grid' ), |
| 112 |
'min' => '0', |
| 113 |
'max' => '5', |
| 114 |
'step' => '0.05', |
| 115 |
'default' => '0.8', |
| 116 |
), |
| 117 |
), |
| 118 |
), |
| 119 |
), |
| 120 |
), |
| 121 |
//=-=-=-=-=-=-= GRID =-=-=-=-=-=-= |
| 122 |
array( |
| 123 |
'title' => __('Filters', 'wp-ultimate-post-grid'), |
| 124 |
'name' => 'filters', |
| 125 |
'icon' => 'font-awesome:fa-filter', |
| 126 |
'controls' => array( |
| 127 |
array( |
| 128 |
'type' => 'notebox', |
| 129 |
'name' => 'filters_premium_not_installed', |
| 130 |
'label' => 'WP Ultimate Post Grid Premium', |
| 131 |
'description' => __('These features are only available in', 'wp-ultimate-post-grid') . ' <a href="http://bootstrapped.ventures/wp-ultimate-post-grid/" target="_blank">WP Ultimate Post Grid Premium</a></strong>.', |
| 132 |
'status' => 'warning', |
| 133 |
'dependency' => array( |
| 134 |
'field' => '', |
| 135 |
'function' => 'wpupg_admin_premium_not_installed', |
| 136 |
), |
| 137 |
), |
| 138 |
array( |
| 139 |
'type' => 'section', |
| 140 |
'title' => __( 'Dropdown Filters', 'wp-ultimate-post-grid' ), |
| 141 |
'name' => 'filters_dropdown', |
| 142 |
'fields' => array( |
| 143 |
array( |
| 144 |
'type' => 'color', |
| 145 |
'name' => 'filters_dropdown_border_color', |
| 146 |
'label' => __( 'Border Color', 'wp-ultimate-post-grid' ), |
| 147 |
'default' => '#AAAAAA', |
| 148 |
'format' => 'hex', |
| 149 |
), |
| 150 |
array( |
| 151 |
'type' => 'color', |
| 152 |
'name' => 'filters_dropdown_text_color', |
| 153 |
'label' => __( 'Default Text Color', 'wp-ultimate-post-grid' ), |
| 154 |
'default' => '#444444', |
| 155 |
'format' => 'hex', |
| 156 |
), |
| 157 |
array( |
| 158 |
'type' => 'color', |
| 159 |
'name' => 'filters_dropdown_highlight_background_color', |
| 160 |
'label' => __( 'Highlight Background Color', 'wp-ultimate-post-grid' ), |
| 161 |
'default' => '#5897FB', |
| 162 |
'format' => 'hex', |
| 163 |
), |
| 164 |
array( |
| 165 |
'type' => 'color', |
| 166 |
'name' => 'filters_dropdown_highlight_text_color', |
| 167 |
'label' => __( 'Highlight Text Color', 'wp-ultimate-post-grid' ), |
| 168 |
'default' => '#FFFFFF', |
| 169 |
'format' => 'hex', |
| 170 |
), |
| 171 |
), |
| 172 |
), |
| 173 |
), |
| 174 |
), |
| 175 |
//=-=-=-=-=-=-= ADVANCED =-=-=-=-=-=-= |
| 176 |
array( |
| 177 |
'title' => __('Advanced', 'wp-ultimate-post-grid'), |
| 178 |
'name' => 'advanced', |
| 179 |
'icon' => 'font-awesome:fa-wrench', |
| 180 |
'controls' => array( |
| 181 |
array( |
| 182 |
'type' => 'section', |
| 183 |
'title' => __('Shortcode Editor', 'wp-ultimate-post-grid'), |
| 184 |
'name' => 'advanced_section_shortcode', |
| 185 |
'fields' => array( |
| 186 |
array( |
| 187 |
'type' => 'multiselect', |
| 188 |
'name' => 'shortcode_editor_post_types', |
| 189 |
'label' => __('Show shortcode editor for', 'wp-ultimate-post-grid'), |
| 190 |
'description' => __( 'Where do you want to be able to insert grids with the shortcode editor?', 'wp-ultimate-post-grid' ), |
| 191 |
'items' => array( |
| 192 |
'data' => array( |
| 193 |
array( |
| 194 |
'source' => 'function', |
| 195 |
'value' => 'wpupg_admin_post_types', |
| 196 |
), |
| 197 |
), |
| 198 |
), |
| 199 |
'default' => array( |
| 200 |
'post', |
| 201 |
'page', |
| 202 |
), |
| 203 |
), |
| 204 |
), |
| 205 |
), |
| 206 |
array( |
| 207 |
'type' => 'section', |
| 208 |
'title' => __('Assets', 'wp-ultimate-post-grid'), |
| 209 |
'name' => 'advanced_section_assets', |
| 210 |
'fields' => array( |
| 211 |
array( |
| 212 |
'type' => 'toggle', |
| 213 |
'name' => 'assets_use_cache', |
| 214 |
'label' => __('Cache Assets', 'wp-ultimate-post-grid'), |
| 215 |
'description' => __( 'Disable this while developing.', 'wp-ultimate-post-grid' ), |
| 216 |
'default' => '1', |
| 217 |
), |
| 218 |
), |
| 219 |
), |
| 220 |
), |
| 221 |
), |
| 222 |
//=-=-=-=-=-=-= CUSTOM CODE =-=-=-=-=-=-= |
| 223 |
array( |
| 224 |
'title' => __('Custom Code', 'wp-ultimate-post-grid'), |
| 225 |
'name' => 'custom_code', |
| 226 |
'icon' => 'font-awesome:fa-code', |
| 227 |
'controls' => array( |
| 228 |
array( |
| 229 |
'type' => 'codeeditor', |
| 230 |
'name' => 'custom_code_public_css', |
| 231 |
'label' => __('Public CSS', 'wp-ultimate-post-grid'), |
| 232 |
'theme' => 'github', |
| 233 |
'mode' => 'css', |
| 234 |
), |
| 235 |
), |
| 236 |
), |
| 237 |
//=-=-=-=-=-=-= FAQ & SUPPORT =-=-=-=-=-=-= |
| 238 |
array( |
| 239 |
'title' => __('FAQ & Support', 'wp-ultimate-post-grid'), |
| 240 |
'name' => 'faq_support', |
| 241 |
'icon' => 'font-awesome:fa-book', |
| 242 |
'controls' => array( |
| 243 |
array( |
| 244 |
'type' => 'notebox', |
| 245 |
'name' => 'faq_support_notebox', |
| 246 |
'label' => __('Need more help?', 'wp-ultimate-post-grid'), |
| 247 |
'description' => '<a href="mailto:[email protected]" target="_blank">WP Ultimate Post Grid ' .__('FAQ & Support', 'wp-ultimate-post-grid') . '</a>', |
| 248 |
'status' => 'info', |
| 249 |
), |
| 250 |
), |
| 251 |
), |
| 252 |
), |
| 253 |
); |