dashboard.php
3 weeks ago
modules.php
4 months ago
usersettings.php
3 weeks ago
widgets.php
3 weeks ago
modules.php
60 lines
| 1 | <?php |
| 2 | $modules_all = \ElementsKit_Lite\Config\Module_List::instance()->get_list( 'optional' ); |
| 3 | $modules_active = \ElementsKit_Lite\Config\Module_List::instance()->get_list( 'active' ); |
| 4 | ?> |
| 5 | <pre> |
| 6 | <?php |
| 7 | $x = \ElementsKit_Lite\Libs\Framework\Attr::instance()->utils->get_option( 'module_list', array() ); |
| 8 | // print_r($modules_active) ; |
| 9 | ?> |
| 10 | </pre> |
| 11 | <!-- this blank input is for empty form submission --> |
| 12 | <input checked="checked" type="checkbox" value="_null" style="display:none" name="module_list[]" > |
| 13 | |
| 14 | <div class="ekit-admin-fields-container"> |
| 15 | <span class="ekit-admin-fields-container-description"><?php esc_html_e( 'You can disable the modules you are not using on your site. That will disable all associated assets of those modules to improve your site loading speed.', 'elementskit-lite' ); ?></span> |
| 16 | |
| 17 | <div class="ekit-admin-fields-container-fieldset"> |
| 18 | <div class="attr-hidden" id="elementskit-template-admin-menu"> |
| 19 | <li><a href="edit.php?post_type=elementskit_template"><?php esc_html_e( 'Header Footer', 'elementskit-lite' ); ?></a></li> |
| 20 | </div> |
| 21 | <div class="attr-hidden" id="elementskit-template-widget-menu"> |
| 22 | <li><a href="edit.php?post_type=elementskit_widget"><?php esc_html_e( 'Widget Builder', 'elementskit-lite' ); ?></a></li> |
| 23 | </div> |
| 24 | <div class="attr-row"> |
| 25 | <?php |
| 26 | foreach ( $modules_all as $module => $module_config ) : |
| 27 | if ( ! isset( $module_config['package'] ) ) { |
| 28 | $module_config['package'] = ''; // for avoiding error when add module from theme |
| 29 | } |
| 30 | |
| 31 | $data_attr = ( $module_config['package'] != 'pro-disabled' ? '' : 'data-attr-toggle="modal" data-target="#elementskit_go_pro_modal"' ); |
| 32 | |
| 33 | // Skip upcoming modules |
| 34 | $attributes = isset($module_config['attributes']) ? $module_config['attributes'] : array(); |
| 35 | if(in_array('upcoming', $attributes)) { |
| 36 | continue; |
| 37 | } |
| 38 | ?> |
| 39 | <div class="attr-col-md-6 attr-col-lg-4" <?php echo esc_attr($data_attr); ?>> |
| 40 | <?php |
| 41 | $this->utils->input( |
| 42 | array( |
| 43 | 'type' => 'switch', |
| 44 | 'name' => 'module_list[]', |
| 45 | 'value' => $module, |
| 46 | 'class' => 'ekit-content-type-' . $module_config['package'], |
| 47 | 'attr' => ( $module_config['package'] != 'pro-disabled' ? array() : array( 'disabled' => 'disabled' ) ), |
| 48 | 'label' => $module_config['title'], |
| 49 | 'options' => array( |
| 50 | 'checked' => ( isset( $modules_active[ $module ] ) ? true : false ), |
| 51 | ), |
| 52 | ) |
| 53 | ); |
| 54 | ?> |
| 55 | </div> |
| 56 | <?php endforeach; ?> |
| 57 | </div> |
| 58 | </div> |
| 59 | </div> |
| 60 |