deleted file style.css
This commit is contained in:
@ -1,162 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the back to top button.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_back_to_top_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Back to Top', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'back-to-top-colors',
|
||||
),
|
||||
'active_callback' => function() {
|
||||
if ( generate_get_option( 'back_to_top' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_back_to_top_background_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'back-to-top-colors',
|
||||
'items' => array(
|
||||
'back_to_top_background_color',
|
||||
'back_to_top_background_color_hover',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[back_to_top_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['back_to_top_background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'back-to-top-colors',
|
||||
'wrapper' => 'back_to_top_background_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'a.generate-back-to-top',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[back_to_top_background_color_hover]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['back_to_top_background_color_hover'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'back-to-top-colors',
|
||||
'wrapper' => 'back_to_top_background_color_hover',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'a.generate-back-to-top:hover, a.generate-back-to-top:focus',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_back_to_top_text_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'back-to-top-colors',
|
||||
'items' => array(
|
||||
'back_to_top_text_color',
|
||||
'back_to_top_text_color_hover',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[back_to_top_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['back_to_top_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'button-colors',
|
||||
'wrapper' => 'back_to_top_text_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'a.generate-back-to-top',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[back_to_top_text_color_hover]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['back_to_top_text_color_hover'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'back-to-top-colors',
|
||||
'wrapper' => 'back_to_top_text_color_hover',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'a.generate-back-to-top:hover, a.generate-back-to-top:focus',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,156 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the Body.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_body_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Body', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'base-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $defaults['background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'base-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'body',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $defaults['text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'base-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'body',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_body_link_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'base-colors',
|
||||
'items' => array(
|
||||
'link_color',
|
||||
'link_color_hover',
|
||||
'link_color_visited',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $defaults['link_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'toggleId' => 'base-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'a, a:visited',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[link_color_hover]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $defaults['link_color_hover'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'link_color_hover',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'toggleId' => 'base-colors',
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => 'a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
if ( '' !== generate_get_option( 'link_color_visited' ) ) {
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[link_color_visited]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $defaults['link_color_visited'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'refresh',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Color Visited', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'link_color_visited',
|
||||
'tooltip' => __( 'Choose Visited Color', 'generatepress' ),
|
||||
'toggleId' => 'base-colors',
|
||||
'hideLabel' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
@ -1,158 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the Body.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_buttons_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Buttons', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'button-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_buttons_background_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'button-colors',
|
||||
'items' => array(
|
||||
'form_button_background_color',
|
||||
'form_button_background_color_hover',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$buttons_selector = 'button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.button:visited, a.wp-block-button__link:not(.has-background)';
|
||||
$buttons_hover_selector = 'button:hover, html input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, a.button:hover, button:focus, html input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, a.button:focus, a.wp-block-button__link:not(.has-background):active, a.wp-block-button__link:not(.has-background):focus, a.wp-block-button__link:not(.has-background):hover';
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_button_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_button_background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'button-colors',
|
||||
'wrapper' => 'form_button_background_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $buttons_selector,
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_button_background_color_hover]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_button_background_color_hover'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'button-colors',
|
||||
'wrapper' => 'form_button_background_color_hover',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $buttons_hover_selector,
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_buttons_text_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'button-colors',
|
||||
'items' => array(
|
||||
'form_button_text_color',
|
||||
'form_button_text_color_hover',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_button_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_button_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'button-colors',
|
||||
'wrapper' => 'form_button_text_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $buttons_selector,
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_button_text_color_hover]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_button_text_color_hover'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'button-colors',
|
||||
'wrapper' => 'form_button_text_color_hover',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $buttons_hover_selector,
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,372 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the content.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_content_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Content', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$content_colors = '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header';
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[content_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['content_background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $content_colors,
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[content_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['content_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $content_colors,
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_content_link_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'content-colors',
|
||||
'items' => array(
|
||||
'content_link_color',
|
||||
'content_link_hover_color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[content_link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['content_link_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'content_link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.inside-article a:not(.button):not(.wp-block-button__link), .inside-article a:not(.button):not(.wp-block-button__link):visited, .paging-navigation a, .paging-navigation a:visited, .comments-area a, .comments-area a:visited, .page-header a, .page-header a:visited',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[content_link_hover_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['content_link_hover_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'content_link_hover_color',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'toggleId' => 'content-colors',
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.inside-article a:not(.button):not(.wp-block-button__link):hover, .paging-navigation a:hover, .comments-area a:hover, .page-header a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[content_title_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['content_title_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Content Title', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.entry-header h1,.page-header h1',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_archive_content_title_link_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'content-colors',
|
||||
'items' => array(
|
||||
'blog_post_title_color',
|
||||
'blog_post_title_hover_color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[blog_post_title_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['blog_post_title_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Archive Content Title', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'blog_post_title_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.entry-title a,.entry-title a:visited',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[blog_post_title_hover_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['blog_post_title_hover_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Archive Content Title Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'blog_post_title_hover_color',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'toggleId' => 'content-colors',
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.entry-title a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[entry_meta_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['entry_meta_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Entry Meta Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.entry-meta',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_entry_meta_link_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'content-colors',
|
||||
'items' => array(
|
||||
'entry_meta_link_color',
|
||||
'entry_meta_link_color_hover',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[entry_meta_link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['entry_meta_link_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Entry Meta Links', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'entry_meta_link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.entry-meta a',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[entry_meta_link_color_hover]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['entry_meta_link_color_hover'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Entry Meta Links Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'wrapper' => 'entry_meta_link_color_hover',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'toggleId' => 'content-colors',
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.entry-meta a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$headings = array(
|
||||
array(
|
||||
'slug' => 'h1_color',
|
||||
'label' => __( 'Heading 1 (H1) Color', 'generatepress' ),
|
||||
'selector' => 'h1',
|
||||
),
|
||||
array(
|
||||
'slug' => 'h2_color',
|
||||
'label' => __( 'Heading 2 (H2) Color', 'generatepress' ),
|
||||
'selector' => 'h2',
|
||||
),
|
||||
array(
|
||||
'slug' => 'h3_color',
|
||||
'label' => __( 'Heading 3 (H3) Color', 'generatepress' ),
|
||||
'selector' => 'h3',
|
||||
),
|
||||
array(
|
||||
'slug' => 'h4_color',
|
||||
'label' => __( 'Heading 4 (H4) Color', 'generatepress' ),
|
||||
'selector' => 'h4',
|
||||
),
|
||||
array(
|
||||
'slug' => 'h5_color',
|
||||
'label' => __( 'Heading 5 (H5) Color', 'generatepress' ),
|
||||
'selector' => 'h5',
|
||||
),
|
||||
array(
|
||||
'slug' => 'h6_color',
|
||||
'label' => __( 'Heading 6 (H6) Color', 'generatepress' ),
|
||||
'selector' => 'h6',
|
||||
),
|
||||
);
|
||||
|
||||
foreach ( $headings as $heading ) {
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[' . $heading['slug'] . ']',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults[ $heading['slug'] ],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => $heading['label'],
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'content-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $heading['selector'],
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
@ -1,138 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the footer bar.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_footer_bar_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Footer Bar', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-bar-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'footer-bar-colors',
|
||||
'wrapper' => 'footer_background_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-info',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-bar-colors',
|
||||
'wrapper' => 'footer_text_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-info',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_footer_bar_colors_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'footer-bar-colors',
|
||||
'items' => array(
|
||||
'footer_link_color',
|
||||
'footer_link_hover_color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_link_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-bar-colors',
|
||||
'wrapper' => 'footer_link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-info a',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_link_hover_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_link_hover_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-bar-colors',
|
||||
'wrapper' => 'footer_link_hover_color',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-info a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,161 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the footer widgets.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_footer_widgets_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Footer Widgets', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-widget-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_widget_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_widget_background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'footer-widget-colors',
|
||||
'wrapper' => 'footer_widget_background_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.footer-widgets',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_widget_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_widget_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-widget-colors',
|
||||
'wrapper' => 'footer_widget_text_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.footer-widgets',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_footer_widget_colors_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'footer-widget-colors',
|
||||
'items' => array(
|
||||
'footer_widget_link_color',
|
||||
'footer_widget_link_hover_color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_widget_link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_widget_link_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-widget-colors',
|
||||
'wrapper' => 'footer_widget_link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.footer-widgets a',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_widget_link_hover_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_widget_link_hover_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-widget-colors',
|
||||
'wrapper' => 'footer_widget_link_hover_color',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.footer-widgets a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[footer_widget_title_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['footer_widget_title_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Widget Title', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'footer-widget-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.footer-widgets .widget-title',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,226 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the Body.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_forms_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Forms', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'form-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_forms_background_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'form-colors',
|
||||
'items' => array(
|
||||
'form_background_color',
|
||||
'form_background_color_focus',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$forms_selector = 'input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], input[type="tel"], textarea, select';
|
||||
$forms_focus_selector = 'input[type="text"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="number"]:focus, input[type="tel"]:focus, textarea:focus, select:focus';
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'form-colors',
|
||||
'wrapper' => 'form_background_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $forms_selector,
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_background_color_focus]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_background_color_focus'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background Focus', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'form-colors',
|
||||
'wrapper' => 'form_background_color_focus',
|
||||
'tooltip' => __( 'Choose Focus Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $forms_focus_selector,
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_forms_text_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'form-colors',
|
||||
'items' => array(
|
||||
'form_text_color',
|
||||
'form_text_color_focus',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'form-colors',
|
||||
'wrapper' => 'form_text_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $forms_selector,
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_text_color_focus]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_text_color_focus'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text Focus', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'form-colors',
|
||||
'wrapper' => 'form_text_color_focus',
|
||||
'tooltip' => __( 'Choose Focus Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $forms_focus_selector,
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_forms_border_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'form-colors',
|
||||
'items' => array(
|
||||
'form_border_color',
|
||||
'form_border_color_focus',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_border_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_border_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Border', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'form-colors',
|
||||
'wrapper' => 'form_border_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $forms_selector,
|
||||
'property' => 'border-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[form_border_color_focus]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['form_border_color_focus'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Border Focus', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'form-colors',
|
||||
'wrapper' => 'form_border_color_focus',
|
||||
'tooltip' => __( 'Choose Focus Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => $forms_focus_selector,
|
||||
'property' => 'border-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,180 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the header.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_header_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Header', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'header-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[header_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['header_background_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'header-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-header',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[header_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['header_text_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'header-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-header',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_header_link_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'header-colors',
|
||||
'items' => array(
|
||||
'header_link_color',
|
||||
'header_link_hover_color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[header_link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['header_link_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'header-colors',
|
||||
'wrapper' => 'header_link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-header a:not([rel="home"])',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[header_link_hover_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['header_link_hover_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'header-colors',
|
||||
'wrapper' => 'header_link_hover_color',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-header a:not([rel="home"]):hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[site_title_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['site_title_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Site Title', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'header-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.main-title a, .main-title a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[site_tagline_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['site_tagline_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Tagline', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'header-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.site-description',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,214 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the primary navigation.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*
|
||||
* @var array $color_defaults
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
$menu_hover_selectors = '.navigation-search input[type="search"], .navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a, .main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a, .main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a';
|
||||
$menu_current_selectors = '.main-navigation .main-nav ul li[class*="current-menu-"] > a';
|
||||
$submenu_hover_selectors = '.main-navigation .main-nav ul ul li:not([class*="current-menu-"]):hover > a,.main-navigation .main-nav ul ul li:not([class*="current-menu-"]):focus > a,.main-navigation .main-nav ul ul li.sfHover:not([class*="current-menu-"]) > a';
|
||||
$submenu_current_selectors = '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a';
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_primary_navigation_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Primary Navigation', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'primary-navigation-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Navigation background group.
|
||||
GeneratePress_Customize_Field::add_color_field_group(
|
||||
'primary_navigation_background',
|
||||
'generate_colors_section',
|
||||
'primary-navigation-colors',
|
||||
array(
|
||||
'generate_settings[navigation_background_color]' => array(
|
||||
'default_value' => $color_defaults['navigation_background_color'],
|
||||
'label' => __( 'Navigation Background', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'element' => '.main-navigation',
|
||||
'property' => 'background-color',
|
||||
'hide_label' => false,
|
||||
),
|
||||
'generate_settings[navigation_background_hover_color]' => array(
|
||||
'default_value' => $color_defaults['navigation_background_hover_color'],
|
||||
'label' => __( 'Navigation Background Hover', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'element' => $menu_hover_selectors,
|
||||
'property' => 'background-color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
'generate_settings[navigation_background_current_color]' => array(
|
||||
'default_value' => $color_defaults['navigation_background_current_color'],
|
||||
'label' => __( 'Navigation Background Current', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Current Color', 'generatepress' ),
|
||||
'element' => $menu_current_selectors,
|
||||
'property' => 'background-color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Navigation text group.
|
||||
GeneratePress_Customize_Field::add_color_field_group(
|
||||
'primary_navigation_text',
|
||||
'generate_colors_section',
|
||||
'primary-navigation-colors',
|
||||
array(
|
||||
'generate_settings[navigation_text_color]' => array(
|
||||
'default_value' => $color_defaults['navigation_text_color'],
|
||||
'label' => __( 'Navigation Text', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'element' => '.main-navigation .main-nav ul li a, .main-navigation .menu-toggle, .main-navigation button.menu-toggle:hover, .main-navigation button.menu-toggle:focus, .main-navigation .mobile-bar-items a, .main-navigation .mobile-bar-items a:hover, .main-navigation .mobile-bar-items a:focus, .main-navigation .menu-bar-items',
|
||||
'property' => 'color',
|
||||
'hide_label' => false,
|
||||
),
|
||||
'generate_settings[navigation_text_hover_color]' => array(
|
||||
'default_value' => $color_defaults['navigation_text_hover_color'],
|
||||
'label' => __( 'Navigation Text Hover', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'element' => $menu_hover_selectors,
|
||||
'property' => 'color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
'generate_settings[navigation_text_current_color]' => array(
|
||||
'default_value' => $color_defaults['navigation_text_current_color'],
|
||||
'label' => __( 'Navigation Text Current', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Current Color', 'generatepress' ),
|
||||
'element' => $menu_current_selectors,
|
||||
'property' => 'color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Sub-Menu background group.
|
||||
GeneratePress_Customize_Field::add_color_field_group(
|
||||
'primary_navigation_submenu_background',
|
||||
'generate_colors_section',
|
||||
'primary-navigation-colors',
|
||||
array(
|
||||
'generate_settings[subnavigation_background_color]' => array(
|
||||
'default_value' => $color_defaults['subnavigation_background_color'],
|
||||
'label' => __( 'Sub-Menu Background', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'element' => '.main-navigation ul ul',
|
||||
'property' => 'background-color',
|
||||
'hide_label' => false,
|
||||
),
|
||||
'generate_settings[subnavigation_background_hover_color]' => array(
|
||||
'default_value' => $color_defaults['subnavigation_background_hover_color'],
|
||||
'label' => __( 'Sub-Menu Background Hover', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'element' => $submenu_hover_selectors,
|
||||
'property' => 'background-color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
'generate_settings[subnavigation_background_current_color]' => array(
|
||||
'default_value' => $color_defaults['subnavigation_background_current_color'],
|
||||
'label' => __( 'Sub-Menu Background Current', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Current Color', 'generatepress' ),
|
||||
'element' => $submenu_current_selectors,
|
||||
'property' => 'background-color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Sub-Menu text group.
|
||||
GeneratePress_Customize_Field::add_color_field_group(
|
||||
'primary_navigation_submenu_text',
|
||||
'generate_colors_section',
|
||||
'primary-navigation-colors',
|
||||
array(
|
||||
'generate_settings[subnavigation_text_color]' => array(
|
||||
'default_value' => $color_defaults['subnavigation_text_color'],
|
||||
'label' => __( 'Sub-Menu Text', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'element' => '.main-navigation .main-nav ul ul li a',
|
||||
'property' => 'color',
|
||||
'hide_label' => false,
|
||||
),
|
||||
'generate_settings[subnavigation_text_hover_color]' => array(
|
||||
'default_value' => $color_defaults['subnavigation_text_hover_color'],
|
||||
'label' => __( 'Sub-Menu Text Hover', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'element' => $submenu_hover_selectors,
|
||||
'property' => 'color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
'generate_settings[subnavigation_text_current_color]' => array(
|
||||
'default_value' => $color_defaults['subnavigation_text_current_color'],
|
||||
'label' => __( 'Sub-Menu Text Current', 'generatepress' ),
|
||||
'tooltip' => __( 'Choose Current Color', 'generatepress' ),
|
||||
'element' => $submenu_current_selectors,
|
||||
'property' => 'color',
|
||||
'hide_label' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_navigation_search_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Navigation Search', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'primary-navigation-search-colors',
|
||||
),
|
||||
'active_callback' => function() {
|
||||
if ( 'enable' === generate_get_option( 'nav_search' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[navigation_search_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['navigation_search_background_color'],
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'primary-navigation-search-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[navigation_search_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['navigation_search_text_color'],
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'primary-navigation-search-colors',
|
||||
),
|
||||
)
|
||||
);
|
@ -1,97 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the Search Modal.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_search_modal_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Search Modal', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'search-modal-colors',
|
||||
),
|
||||
'active_callback' => function() {
|
||||
if ( generate_get_option( 'nav_search_modal' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[search_modal_bg_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['search_modal_bg_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Field Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'search-modal-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => ':root',
|
||||
'property' => '--gp-search-modal-bg-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[search_modal_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['search_modal_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Field Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'search-modal-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => ':root',
|
||||
'property' => '--gp-search-modal-text-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[search_modal_overlay_bg_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['search_modal_overlay_bg_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Overlay Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'search-modal-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => ':root',
|
||||
'property' => '--gp-search-modal-overlay-bg-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,161 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the sidebar widgets.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_sidebar_widgets_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Sidebar Widgets', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'sidebar-widget-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[sidebar_widget_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['sidebar_widget_background_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'sidebar-widget-colors',
|
||||
'wrapper' => 'sidebar_widget_background_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.sidebar .widget',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[sidebar_widget_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['sidebar_widget_text_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'sidebar-widget-colors',
|
||||
'wrapper' => 'sidebar_widget_text_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.sidebar .widget',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_sidebar_widget_colors_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'sidebar-widget-colors',
|
||||
'items' => array(
|
||||
'sidebar_widget_link_color',
|
||||
'sidebar_widget_link_hover_color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[sidebar_widget_link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['sidebar_widget_link_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'sidebar-widget-colors',
|
||||
'wrapper' => 'sidebar_widget_link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.sidebar .widget a',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[sidebar_widget_link_hover_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['sidebar_widget_link_hover_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'sidebar-widget-colors',
|
||||
'wrapper' => 'sidebar_widget_link_hover_color',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.sidebar .widget a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[sidebar_widget_title_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['sidebar_widget_title_color'],
|
||||
'sanitize_callback' => 'generate_sanitize_hex_color',
|
||||
'transport' => 'postMessage',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Widget Title', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'toggleId' => 'sidebar-widget-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.sidebar .widget .widget-title',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
@ -1,139 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This file handles the customizer fields for the top bar.
|
||||
*
|
||||
* @package GeneratePress
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // No direct access, please.
|
||||
}
|
||||
|
||||
GeneratePress_Customize_Field::add_title(
|
||||
'generate_top_bar_colors_title',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'title' => __( 'Top Bar', 'generatepress' ),
|
||||
'choices' => array(
|
||||
'toggleId' => 'top-bar-colors',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[top_bar_background_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['top_bar_background_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Background', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'settings' => 'generate_settings[top_bar_background_color]',
|
||||
'active_callback' => 'generate_is_top_bar_active',
|
||||
'choices' => array(
|
||||
'alpha' => true,
|
||||
'toggleId' => 'top-bar-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.top-bar',
|
||||
'property' => 'background-color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[top_bar_text_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['top_bar_text_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Text', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'active_callback' => 'generate_is_top_bar_active',
|
||||
'choices' => array(
|
||||
'toggleId' => 'top-bar-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.top-bar',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_wrapper(
|
||||
'generate_top_bar_link_wrapper',
|
||||
array(
|
||||
'section' => 'generate_colors_section',
|
||||
'choices' => array(
|
||||
'type' => 'color',
|
||||
'toggleId' => 'top-bar-colors',
|
||||
'items' => array(
|
||||
'top_bar_link_color',
|
||||
'top_bar_link_color_hover',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[top_bar_link_color]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['top_bar_link_color'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'active_callback' => 'generate_is_top_bar_active',
|
||||
'choices' => array(
|
||||
'wrapper' => 'top_bar_link_color',
|
||||
'tooltip' => __( 'Choose Initial Color', 'generatepress' ),
|
||||
'toggleId' => 'top-bar-colors',
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.top-bar a',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
GeneratePress_Customize_Field::add_field(
|
||||
'generate_settings[top_bar_link_color_hover]',
|
||||
'GeneratePress_Customize_Color_Control',
|
||||
array(
|
||||
'default' => $color_defaults['top_bar_link_color_hover'],
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'generate_sanitize_rgba_color',
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Link Hover', 'generatepress' ),
|
||||
'section' => 'generate_colors_section',
|
||||
'active_callback' => 'generate_is_top_bar_active',
|
||||
'choices' => array(
|
||||
'wrapper' => 'top_bar_link_color_hover',
|
||||
'tooltip' => __( 'Choose Hover Color', 'generatepress' ),
|
||||
'toggleId' => 'top-bar-colors',
|
||||
'hideLabel' => true,
|
||||
),
|
||||
'output' => array(
|
||||
array(
|
||||
'element' => '.top-bar a:hover',
|
||||
'property' => 'color',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
Reference in New Issue
Block a user