The official way adds a lot of junk HTML markup and wrappers, what is the cleaner way to just get the custom_logo image URL via PHP snippet? The only example I found was this, which is still not very clean
https://buildawesomewebsites.com/add-a-dynamic-custom-logo-to-a-wordpress-theme/
<?php $custom_logo_id = get_theme_mod( 'custom_logo' ); $logo = wp_get_attachment_image_src( $custom_logo_id , 'full' ); if ( has_custom_logo() ) { echo ''; } else { echo '<h1>'. get_bloginfo( 'name' ) .'</h1>'; } ?>
from the article post
Enter the destination URL
Or link to existing content