'custom-logo', ); $image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true ); if ( empty( $image_alt ) ) { $custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' ); } if ( get_theme_mod( 'twentig_header_sticky' ) ) { $custom_logo_attr['class'] = 'custom-logo logo-primary'; $custom_logo_transparent_attr = $custom_logo_attr; $custom_logo_transparent_attr['class'] = 'custom-logo logo-transparent'; $html = sprintf( '%2$s', esc_url( home_url( '/' ) ), wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr ) . ' ' . wp_get_attachment_image( $custom_logo_transparent_id, 'full', false, $custom_logo_transparent_attr ) ); } else { $html = sprintf( '%2$s', esc_url( home_url( '/' ) ), wp_get_attachment_image( $custom_logo_transparent_id, 'full', false, $custom_logo_attr ) ); } } return $html; } add_filter( 'get_custom_logo', 'twentig_logo_transparent' ); /** * Hide the tagline by returning an empty string. */ function twentig_hide_tagline( $html ) { if ( ! get_theme_mod( 'twentig_header_tagline', true ) ) { return ''; } return $html; } add_filter( 'twentytwenty_site_description', 'twentig_hide_tagline' ); /** * Determines if social icons should be displayed in the location. */ function twentig_is_socials_location( $location ) { $locations = get_theme_mod( 'twentig_socials_location', array( 'modal-desktop', 'modal-mobile', 'footer' ) ); return in_array( $location, $locations ); } /** * Adds social links in the primary menu. */ function twentig_nav_menu_social_icons( $items, $args ) { if ( 'primary' === $args->theme_location && has_nav_menu( 'social' ) && twentig_is_socials_location( 'primary-menu' ) ) { $items = $items . '