' . $single_widget_column . '';
}
$preview_cache_widgets_output .= '
' . $single_widget_column . '
';
}
ct_add_customizer_preview_cache(
ct_html_tag(
'div',
[ 'data-id' => 'footer-columns' ],
ct_footer_widgets_structure(
$preview_cache_widgets_output
)
)
);
if (
get_theme_mod( 'has_widget_area', 'yes' ) === 'yes'
&&
! empty( trim( $footer_widgets_output ) )
) {
echo ct_footer_widgets_structure( $footer_widgets_output );
}
}
function ct_footer_widgets_structure( $output ) {
$columns_structure = get_theme_mod( 'footer_widgets_structure', '3' );
$divider_output = '';
if ( get_theme_mod( 'footer_widgets_divider', 'yes' ) === 'yes' ) {
$divider_output = 'data-divider';
}
$class = 'footer-widgets-area';
$class .= ' ' . ct_visibility_classes(get_theme_mod('footer_widgets_visibility', [
'desktop' => true,
'tablet' => true,
'mobile' => false,
]));
ob_start();
?>
'footer',
'depth' => 1,
'container' => false,
'menu_id' => 'footer-menu',
'menu_class' => 'footer-menu menu',
'fallback_cb' => 'ct_link_to_menu_editor',
]
);
$output = ob_get_clean();
}
if ( $kind === 'custom_text' ) {
$output = '' . get_theme_mod( 'section_' . $number . '_text', 'Sample text' ) . '
';
}
if ( $kind === 'social_icons' ) {
$output = ct_social_icons(
get_theme_mod('footer_socials_' . $number, [
[
'id' => 'facebook',
'enabled' => true,
],
[
'id' => 'twitter',
'enabled' => true,
],
[
'id' => 'gplus',
'enabled' => true,
],
]),
'simple'
);
}
return '';
}
function ct_footer_main_area_sections_cache() {
ob_start();
wp_nav_menu(
[
'theme_location' => 'footer',
'depth' => 1,
'container' => false,
'menu_id' => 'footer-menu',
'menu_class' => 'footer-menu menu',
'fallback_cb' => 'ct_link_to_menu_editor',
]
);
$output = '';
ct_add_customizer_preview_cache(
ct_html_tag(
'div',
[ 'data-id' => 'footer-main-area-menu' ],
$output
)
);
$output = '';
$output .= '' . get_theme_mod( 'section_1_text', 'Sample text' ) . '';
$output .= '';
ct_add_customizer_preview_cache(
ct_html_tag(
'div',
[ 'data-id' => 'footer-main-area-text' ],
$output
)
);
ct_add_customizer_preview_cache(
ct_html_tag(
'div',
[ 'data-id' => 'footer-main-area-socials' ],
'' . ct_social_icons( null, 'simple' ) . ''
)
);
}