| 1 |
<?php |
| 2 |
|
| 3 |
$config = apply_filters('customify_filter_fields', array() ); |
| 4 |
|
| 5 |
$customify_sections = array(); |
| 6 |
|
| 7 |
if ( isset( $config['sections'] ) && ! empty( $config['sections'] ) ) { |
| 8 |
|
| 9 |
foreach ( $config['sections'] as $id => $section ) { |
| 10 |
$customify_sections[$id] = $section['title']; |
| 11 |
} |
| 12 |
|
| 13 |
} |
| 14 |
|
| 15 |
if ( isset( $config['panels'] ) && ! empty( $config['panels'] ) ) { |
| 16 |
|
| 17 |
foreach ( $config['panels'] as $panel_id => $panel ) { |
| 18 |
|
| 19 |
if ( isset( $panel['sections'] ) && ! empty( $panel['sections'] ) ) { |
| 20 |
foreach ( $panel['sections'] as $id => $section ) { |
| 21 |
$customify_sections[$id] = $section['title']; |
| 22 |
} |
| 23 |
} |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
$general_settings = array( |
| 28 |
'type' => 'postbox', |
| 29 |
'label' => 'General Settings', |
| 30 |
'options' => array( |
| 31 |
'values_store_mod' => array( |
| 32 |
'name' => 'values_store_mod', |
| 33 |
'label' => __( 'Store values as:', 'pixcustomify_txtd' ), |
| 34 |
'desc' => __( 'You can store the values globally so you can use them with other themes or store them as a "theme_mod" which will make an individual set of options only for the current theme', 'pixcustomify_txtd' ), |
| 35 |
'default' => 'option', |
| 36 |
'type' => 'select', |
| 37 |
'options' => array( |
| 38 |
'option' => __( 'Option (global options)', 'pixcustomify_txtd' ), |
| 39 |
'theme_mod' => __( 'Theme Mod (per theme options)', 'pixcustomify_txtd' ), |
| 40 |
), |
| 41 |
), |
| 42 |
|
| 43 |
'disable_default_sections' => array( |
| 44 |
'name' => 'disable_default_sections', |
| 45 |
'label' => __( 'Disable default sections', 'pixcustomify_txtd' ), |
| 46 |
'desc' => __( 'You can disable default sections', 'pixcustomify_txtd' ), |
| 47 |
'type' => 'multicheckbox', |
| 48 |
'options' => array( |
| 49 |
'nav' => __( 'Navigation', 'pixcustomify_txtd' ), |
| 50 |
'static_front_page' => __( 'Front Page', 'pixcustomify_txtd' ), |
| 51 |
'title_tagline' => __( 'Title', 'pixcustomify_txtd' ), |
| 52 |
'colors' => __( 'Colors', 'pixcustomify_txtd' ), |
| 53 |
'background_image' => __( 'Background', 'pixcustomify_txtd' ), |
| 54 |
'header_image' => __( 'Header', 'pixcustomify_txtd' ), |
| 55 |
'widgets' => __( 'Widgets', 'pixcustomify_txtd' ), |
| 56 |
), |
| 57 |
), |
| 58 |
|
| 59 |
'enable_reset_buttons' => array( |
| 60 |
'name' => 'enable_reset_buttons', |
| 61 |
'label' => __( 'Enable Reset Buttons', 'pixcustomify_txtd' ), |
| 62 |
'desc' => __( 'You can enable "Reset to defaults" buttons for panels / sections or all settings. We have disabled this feature by default to avoid accidental resets. If you are sure that you need it please enable this.', 'pixcustomify_txtd' ), |
| 63 |
'default' => false, |
| 64 |
'type' => 'switch', |
| 65 |
), |
| 66 |
|
| 67 |
'enable_editor_style' => array( |
| 68 |
'name' => 'enable_editor_style', |
| 69 |
'label' => __( 'Enable Editor Style', 'pixcustomify_txtd' ), |
| 70 |
'desc' => __( 'The styling added by Customify in front-end can be added in the WordPress editor too by enabling this option', 'pixcustomify_txtd' ), |
| 71 |
'default' => true, |
| 72 |
'type' => 'switch', |
| 73 |
), |
| 74 |
) |
| 75 |
); # config |
| 76 |
|
| 77 |
if ( !empty( $customify_sections ) ) { |
| 78 |
$general_settings['options']['disable_customify_sections'] = array( |
| 79 |
'name' => 'disable_customify_sections', |
| 80 |
'label' => __( 'Disable Customify sections', 'pixcustomify_txtd' ), |
| 81 |
'desc' => __( 'You can also disable Customify\'s sections', 'pixcustomify_txtd' ), |
| 82 |
'type' => 'multicheckbox', |
| 83 |
'options' => $customify_sections |
| 84 |
); |
| 85 |
} |
| 86 |
|
| 87 |
return $general_settings; |