Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function catchadaptive_site_branding() {
- $options = catchadaptive_get_theme_options();
- $logo_alt = ( '' != $options['logo_alt_text'] ) ? $options['logo_alt_text'] : get_bloginfo( 'name', 'display' );
- $catchadaptive_site_logo = '';
- //Checking Logo
- if ( function_exists( 'has_custom_logo' ) ) {
- if ( has_custom_logo() ) {
- $catchadaptive_site_logo = get_custom_logo();
- }
- }
- else if ( '' != $options['logo'] && !$options['logo_disable'] ) {
- //@remove Remove this else if block when WordPress 4.8 is released
- $catchadaptive_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( $logo_alt ). '">
- </a>';
- //</div><!-- #site-logo -->';
- }
- if ( display_header_text() ){
- // Show header text if display_header_text is checked
- $catchadaptive_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 -->';
- }
- else {
- $catchadaptive_header_text = '';
- }
- $catchadaptive_site_branding = '<div id="site-branding">';
- $catchadaptive_site_branding .= $catchadaptive_header_text;
- if ( function_exists( 'has_custom_logo' ) ) {
- if ( has_custom_logo() ) {
- if ( ! $options['move_title_tagline'] ) {
- $catchadaptive_site_branding = '<div id="site-branding" class="logo-left">';
- $catchadaptive_site_branding .= $catchadaptive_site_logo;
- $catchadaptive_site_branding .= $catchadaptive_header_text;
- }
- else {
- $catchadaptive_site_branding = '<div id="site-branding" class="logo-right">';
- $catchadaptive_site_branding .= $catchadaptive_header_text;
- $catchadaptive_site_branding .= $catchadaptive_site_logo;
- }
- }
- }
- else if ( '' != $options['logo'] && !$options['logo_disable'] ) {
- if( ! $options['move_title_tagline'] ) {
- $catchadaptive_site_branding = '<div id="site-branding">';
- $catchadaptive_site_branding .= $catchadaptive_site_logo;
- $catchadaptive_site_branding .= $catchadaptive_header_text;
- }
- else {
- $catchadaptive_site_branding = '<div id="site-branding">';
- $catchadaptive_site_branding .= $catchadaptive_header_text;
- $catchadaptive_site_branding .= $catchadaptive_site_logo;
- }
- }
- $catchadaptive_site_branding .= '</div><!-- #site-branding-->';
- echo $catchadaptive_site_branding ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement