'; echo ''; echo ''; } endif; if ( ! function_exists( 'blue_planet_get_main_slider_details' ) ) : /** * Fetch main slider details. * * @since 1.0.0 * * @return array Main slider details. */ function blue_planet_get_main_slider_details() { $bp_options = blue_planet_get_option_all(); $output = array(); for ( $i = 1; $i <= 5 ; $i++ ) { if ( isset( $bp_options[ 'main_slider_image_' . $i ] ) && ! empty( $bp_options[ 'main_slider_image_' . $i ] ) ) { $item = array(); $item['image'] = esc_url( $bp_options[ 'main_slider_image_'.$i ] ); $item['url'] = ( isset( $bp_options[ 'main_slider_url_' . $i ] ) ) ? esc_url( $bp_options[ 'main_slider_url_' . $i ] ) : '' ; $item['caption'] = ( isset( $bp_options[ 'main_slider_caption_' . $i ] ) ) ? esc_html( $bp_options[ 'main_slider_caption_' . $i ] ) : '' ; $item['new_tab'] = ( isset( $bp_options[ 'main_slider_new_tab_' . $i ] ) && 1 === $bp_options[ 'main_slider_new_tab_' . $i ] ) ? 1 : 0 ; $output[] = $item; } } return $output; } endif; if ( ! function_exists( 'blue_planet_generate_social_links' ) ) : /** * Generate social links. * * @since 1.0.0 */ function blue_planet_generate_social_links() { $bp_options = blue_planet_get_option_all(); $social_array = array(); if ( ! empty( $bp_options ) ) { foreach ( $bp_options as $key => $val ) { $pos = strpos( $key, 'social_' ); if ( false !== $pos && 0 === $pos && ! empty( $val ) ) { $new_key = str_replace( 'social_', '', $key ); $social_array[ $new_key ] = $val; } } } if ( ! empty( $social_array ) ) { echo '
'; echo '
'; $link_target = apply_filters( 'blue_planet_filter_social_sites_link_target', '_blank' ); foreach ( $social_array as $key => $site ) { switch ( $key ) { case 'email': echo ''; break; case 'skype': echo ''; break; default: echo ''; break; } } echo '
'; echo '
'; } } endif; if ( ! function_exists( 'blue_planet_header_style' ) ) : /** * Styles the header image and text displayed on the blog. */ function blue_planet_header_style() { $header_text_color = get_header_textcolor(); /* * If no custom options for text are set, let's bail. * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: HEADER_TEXTCOLOR. */ if ( HEADER_TEXTCOLOR === $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?>