'selector' => '.et_pb_slider_fullwidth_off .et_pb_slide_description',
et_pb_print_module_styles_css( 'et_pb_pricing_tables', array(
'key' => 'header_font_size',
'selector' => '.et_pb_pricing_heading h2',
'key' => 'subheader_font_size',
'selector' => '.et_pb_best_value',
'key' => 'price_font_size',
'selector' => '.et_pb_sum',
et_pb_print_module_styles_css( 'et_pb_cta', array(
'key' => 'header_font_size',
'selector' => '.et_pb_promo h2',
'type' => 'padding-call-to-action',
'key' => 'custom_padding',
et_pb_print_module_styles_css( 'et_pb_audio', array(
'key' => 'title_font_size',
'selector' => '.et_pb_audio_module_content h2',
'key' => 'caption_font_size',
'selector' => '.et_pb_audio_module p',
et_pb_print_module_styles_css( 'et_pb_signup', array(
'key' => 'header_font_size',
'selector' => '.et_pb_subscribe h2',
'selector' => '.et_pb_subscribe',
et_pb_print_module_styles_css( 'et_pb_login', array(
'key' => 'header_font_size',
'selector' => '.et_pb_login h2',
'type' => 'padding-top-bottom',
'key' => 'custom_padding',
'selector' => '.et_pb_login',
et_pb_print_module_styles_css( 'et_pb_portfolio', array(
'key' => 'title_font_size',
'selector' => '.et_pb_portfolio .et_pb_portfolio_item h2, .et_pb_fullwidth_portfolio .et_pb_portfolio_item h3, .et_pb_portfolio_grid .et_pb_portfolio_item h2',
'key' => 'caption_font_size',
'selector' => '.et_pb_portfolio .et_pb_portfolio_item .post-meta, .et_pb_fullwidth_portfolio .et_pb_portfolio_item .post-meta, .et_pb_portfolio_grid .et_pb_portfolio_item .post-meta',
/* Filterable Portfolio */
et_pb_print_module_styles_css( 'et_pb_filterable_portfolio', array(
'key' => 'title_font_size',
'selector' => '.et_pb_filterable_portfolio .et_pb_portfolio_item h2',
'key' => 'caption_font_size',
'selector' => '.et_pb_filterable_portfolio .et_pb_portfolio_item .post-meta',
'key' => 'filter_font_size',
'selector' => '.et_pb_filterable_portfolio .et_pb_portfolio_filters li',
et_pb_print_module_styles_css( 'et_pb_counters', array(
'key' => 'title_font_size',
'selector' => '.et_pb_counters .et_pb_counter_title',
'key' => 'percent_font_size',
'selector' => '.et_pb_counters .et_pb_counter_amount',
'selector' => '.et_pb_counter_amount',
et_pb_print_module_styles_css( 'et_pb_circle_counter', array(
'key' => 'number_font_size',
'selector' => '.et_pb_circle_counter .percent p',
'key' => 'title_font_size',
'selector' => '.et_pb_circle_counter h3',
et_pb_print_module_styles_css( 'et_pb_number_counter', array(
'key' => 'number_font_size',
'selector' => '.et_pb_number_counter .percent p',
'key' => 'title_font_size',
'selector' => '.et_pb_number_counter h3',
et_pb_print_module_styles_css( 'et_pb_accordion', array(
'key' => 'toggle_font_size',
'selector' => '.et_pb_accordion .et_pb_toggle_title',
'key' => 'custom_padding',
'selector' => '.et_pb_accordion .et_pb_toggle_open, .et_pb_accordion .et_pb_toggle_close',
et_pb_print_module_styles_css( 'et_pb_toggle', array(
'key' => 'title_font_size',
'selector' => '.et_pb_toggle.et_pb_toggle_item h5',
'key' => 'custom_padding',
'selector' => '.et_pb_toggle.et_pb_toggle_item',
et_pb_print_module_styles_css( 'et_pb_contact_form', array(
'key' => 'title_font_size',
'selector' => '.et_pb_contact_form_container .et_pb_contact_main_title',
'key' => 'form_field_font_size',
'selector' => '.et_pb_contact_form_container .et_pb_contact p input, .et_pb_contact_form_container .et_pb_contact p textarea',
'key' => 'captcha_font_size',
'selector' => '.et_pb_contact_captcha_question',
'selector' => '.et_pb_contact p input, .et_pb_contact p textarea',
et_pb_print_module_styles_css( 'et_pb_sidebar', array(
'key' => 'header_font_size',
'selector' => '.et_pb_widget_area h4',
et_pb_print_module_styles_css( 'et_pb_team_member', array(
'key' => 'header_font_size',
'selector' => '.et_pb_team_member h4',
'key' => 'subheader_font_size',
'selector' => '.et_pb_team_member .et_pb_member_position',
et_pb_print_module_styles_css( 'et_pb_blog', array(
'key' => 'header_font_size',
'selector' => '.et_pb_posts .et_pb_post h2',
'key' => 'meta_font_size',
'selector' => '.et_pb_posts .et_pb_post .post-meta',
et_pb_print_module_styles_css( 'et_pb_blog_masonry', array(
'key' => 'header_font_size',
'selector' => '.et_pb_blog_grid .et_pb_post h2',
'key' => 'meta_font_size',
'selector' => '.et_pb_blog_grid .et_pb_post .post-meta',
et_pb_print_module_styles_css( 'et_pb_shop', array(
'key' => 'title_font_size',
'selector' => '.woocommerce ul.products li.product h3, .woocommerce-page ul.products li.product h3',
'key' => 'sale_badge_font_size',
'selector' => '.woocommerce span.onsale, .woocommerce-page span.onsale',
'key' => 'price_font_size',
'selector' => '.woocommerce ul.products li.product .price .amount, .woocommerce-page ul.products li.product .price .amount',
'key' => 'sale_price_font_size',
'selector' => '.woocommerce ul.products li.product .price ins .amount, .woocommerce-page ul.products li.product .price ins .amount',
et_pb_print_module_styles_css( 'et_pb_countdown_timer', array(
'key' => 'header_font_size',
'selector' => '.et_pb_countdown_timer .title',
et_pb_print_module_styles_css( 'et_pb_social_media_follow', array(
'type' => 'social-icon-size',
et_pb_print_module_styles_css( 'et_pb_fullwidth_slider', array(
'key' => 'header_font_size',
'selector' => '.et_pb_fullwidth_section .et_pb_slide_description .et_pb_slide_title',
'key' => 'body_font_size',
'selector' => '.et_pb_fullwidth_section .et_pb_slide_content',
'type' => 'padding-slider',
'selector' => '.et_pb_fullwidth_section .et_pb_slide_description',
) ); // <<<--------- END MODULE CUSTOMIZER CSS --------->>>
* Filter Module Customizer CSS output.
* @param string $module_customizer_css
$css_output[] = apply_filters( 'et_divi_module_customizer_css_output', ob_get_clean() );
// Give the output to the style manager so a static resource can be created and served.
$styles_manager->set_data( implode( '\n', $css_output ) );
add_action( 'wp', 'et_divi_add_customizer_css' );
* Outputting saved customizer style settings
function et_pb_print_css( $setting ) {
// Parse given settings aginst defaults
$setting = wp_parse_args( $setting, $defaults );
$setting['key'] !== false ||
$setting['selector'] !== false ||
$setting['type'] !== false ||
$setting['settings'] !== false
// Some attribute requires !important tag
if ( $setting['important'] ) {
$important = "!important";
$value = et_get_option( $setting['key'], $setting['default'] );
// Output css based on its type
if ( $value !== false && $value != $setting['default'] ) {
switch ( $setting['type'] ) {
printf( '%1$s { font-size: %2$spx %3$s; }',
esc_html( $setting['selector'] ),
case 'font-size-post-header':
$posts_font_size = intval( $value ) * ( 26 / 30 );
printf( 'body.home-posts #left-area .et_pb_post h2, body.archive #left-area .et_pb_post h2, body.search #left-area .et_pb_post h2 { font-size:%1$spx }
body.single .et_post_meta_wrapper h1 { font-size:%2$spx; }',
esc_html( $posts_font_size ),
esc_html( $setting['selector'] ),
et_pb_print_font_style( $value, $important )
printf( '%1$s { letter-spacing: %2$spx %3$s; }',
esc_html( $setting['selector'] ),
printf( '%1$s { line-height: %2$sem %3$s; }',
esc_html( $setting['selector'] ),
printf( '%1$s { color: %2$s; }',
esc_html( $setting['selector'] ),
printf( '%1$s { background-color: %2$s; }',
esc_html( $setting['selector'] ),
printf( '%1$s { -moz-border-radius: %2$spx; -webkit-border-radius: %2$spx; border-radius: %2$spx; }',
esc_html( $setting['selector'] ),
printf( '%1$s { width: %2$spx; }',
esc_html( $setting['selector'] ),
printf( '%1$s { height: %2$spx; }',
esc_html( $setting['selector'] ),
printf( '%1$s { padding: %2$spx; }',
esc_html( $setting['selector'] ),
case 'padding-top-bottom':
printf( '%1$s { padding: %2$spx 0; }',
esc_html( $setting['selector'] ),
printf( '%1$s { padding: %2$spx %3$spx; }',
esc_html( $setting['selector'] ),
esc_html( ( intval( $value ) * 0.5 ) ),
case 'padding-fullwidth-slider':
printf( '%1$s { padding: %2$s %3$s; }',
esc_html( $setting['selector'] ),
esc_html( $value ) . '%',
printf( '%1$s { padding: %2$s %3$s; }',
esc_html( $setting['selector'] ),
esc_html( $value ) . '%',
esc_html( ( intval( $value ) / 2 ) ) . '%'
$icon_margin = intval( $value ) * 0.57;