%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=bigbang_big_title_title' ) ), __( 'Customizer', 'bigbang' ) ) ) : false;
$bigbang_big_title_title = get_theme_mod( 'bigbang_big_title_title', $title_default );
if ( ! empty( $bigbang_big_title_title ) ) {
$section_content['title'] = $bigbang_big_title_title;
}
/* translators: 1 - link to customizer setting. 2 - 'customizer' */
$text_default = current_user_can( 'edit_theme_options' ) ? sprintf( esc_html__( 'Change in the %s', 'bigbang' ), sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=bigbang_big_title_text' ) ), __( 'Customizer', 'bigbang' ) ) ) : false;
$bigbang_big_title_text = get_theme_mod( 'bigbang_big_title_text', $text_default );
if ( ! empty( $bigbang_big_title_text ) ) {
$section_content['text'] = $bigbang_big_title_text;
}
$button_text_default = current_user_can( 'edit_theme_options' ) ? esc_html__( 'Change in the Customizer', 'bigbang' ) : false;
$bigbang_big_title_button_text = get_theme_mod( 'bigbang_big_title_button_text', $button_text_default );
if ( ! empty( $bigbang_big_title_button_text ) ) {
$section_content['button_text'] = $bigbang_big_title_button_text;
}
$button_link_default = current_user_can( 'edit_theme_options' ) ? esc_url( admin_url( 'customize.php?autofocus[control]=bigbang_big_title_button_text' ) ) : false;
$bigbang_big_title_button_link = get_theme_mod( 'bigbang_big_title_button_link', $button_link_default );
if ( ! empty( $bigbang_big_title_button_link ) ) {
$section_content['button_link'] = $bigbang_big_title_button_link;
}
return $section_content;
}
if ( ! function_exists( 'bigbang_slider_compatibility' ) ) :
/**
* Check for previously set slider and make theme compatible.
*/
function bigbang_slider_compatibility() {
$bigbang_big_title_background = get_theme_mod( 'bigbang_big_title_background' );
$bigbang_big_title_title = get_theme_mod( 'bigbang_big_title_title' );
$bigbang_big_title_text = get_theme_mod( 'bigbang_big_title_text' );
$bigbang_big_title_button_text = get_theme_mod( 'bigbang_big_title_button_text' );
$bigbang_big_title_button_link = get_theme_mod( 'bigbang_big_title_button_link' );
$bigbang_slider_content = get_theme_mod( 'bigbang_slider_content' );
if ( ! empty( $bigbang_big_title_background ) || ! empty( $bigbang_big_title_title ) || ! empty( $bigbang_big_title_text ) || ! empty( $bigbang_big_title_button_text ) || ! empty( $bigbang_big_title_button_link ) ) {
bigbang_big_title();
} else {
if ( ! empty( $bigbang_slider_content ) ) {
bigbang_slider();
} else {
bigbang_big_title();
}
}
}
endif;
add_action( 'bigbang_header', 'bigbang_slider_compatibility' );
/**
* In lite there isn't a control bigbang_slider_type because video header isn't enabled so
* we need a different check to enable parallax scripts. Here we just check if both layers
* are activated and if so, we return 'parallax'.
*
* @since 1.1.72
*/
function bigbang_enable_parallax_in_lite() {
$bigbang_parallax_layer1 = get_theme_mod( 'bigbang_parallax_layer1' );
$bigbang_parallax_layer2 = get_theme_mod( 'bigbang_parallax_layer2' );
if ( ! empty( $bigbang_parallax_layer1 ) && ! empty( $bigbang_parallax_layer2 ) ) {
return 'parallax';
}
return false;
}
add_filter( 'bigbang_enable_parallax', 'bigbang_enable_parallax_in_lite' );