Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Get the logo and display
- *
- * @uses get_transient, catchresponsive_get_theme_options, get_header_textcolor, get_bloginfo, set_transient, display_header_text
- * @get logo from options and make it polylang compatible
- *
- * @display logo
- *
- * @action
- *
- * @since Catch Responsive 1.0
- */
- function catchresponsive_site_branding() {
- $options = catchresponsive_get_theme_options();
- $catchresponsive_site_logo = '';
- //Checking Logo
- if ( function_exists( 'has_custom_logo' ) ) {
- if ( has_custom_logo() ) {
- $custom_logo_id = get_theme_mod( 'custom_logo' );
- $image = wp_get_attachment_image_src( $custom_logo_id , 'full' );
- $catchresponsive_site_logo = '
- <div id="site-logo">
- <a href="' . esc_url( pll_home_url() ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" rel="home">
- <img src="' . esc_url( $image ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '">
- </a>
- </div><!-- #site-logo -->';
- }
- }
- else if ( '' != $options['logo'] && !$options['logo_disable'] ) {
- $catchresponsive_site_logo = '
- <div id="site-logo">
- <a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" rel="home">
- <img src="' . esc_url( $options['logo'] ) . '" alt="' . esc_attr( $options['logo_alt_text'] ). '">
- </a>
- </div><!-- #site-logo -->';
- }
- $catchresponsive_header_text = '
- <div id="site-header">
- <h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a></h1>
- <h2 class="site-description">' . get_bloginfo( 'description' ) . '</h2>
- </div><!-- #site-header -->';
- $text_color = get_header_textcolor();
- $catchresponsive_site_branding = '<div id="site-branding">';
- $catchresponsive_site_branding .= $catchresponsive_header_text;
- if ( function_exists( 'has_custom_logo' ) ) {
- if ( has_custom_logo() ) {
- if ( ! $options['move_title_tagline'] && 'blank' != $text_color ) {
- $catchresponsive_site_branding = '<div id="site-branding" class="logo-left">';
- $catchresponsive_site_branding .= $catchresponsive_site_logo;
- $catchresponsive_site_branding .= $catchresponsive_header_text;
- }
- else {
- $catchresponsive_site_branding = '<div id="site-branding" class="logo-right">';
- $catchresponsive_site_branding .= $catchresponsive_header_text;
- $catchresponsive_site_branding .= $catchresponsive_site_logo;
- }
- }
- }
- else if ( '' != $options['logo'] && !$options['logo_disable'] ) {
- if ( ! $options['move_title_tagline'] && 'blank' != $text_color ) {
- $catchresponsive_site_branding = '<div id="site-branding" class="logo-left">';
- $catchresponsive_site_branding .= $catchresponsive_site_logo;
- $catchresponsive_site_branding .= $catchresponsive_header_text;
- }
- else {
- $catchresponsive_site_branding = '<div id="site-branding" class="logo-right">';
- $catchresponsive_site_branding .= $catchresponsive_header_text;
- $catchresponsive_site_branding .= $catchresponsive_site_logo;
- }
- }
- $catchresponsive_site_branding .= '</div><!-- #site-branding-->';
- echo $catchresponsive_site_branding ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement