Shared Counts Custom Icons

<?php
/*
 * Update icons
 */
function wd_shared_counts_icons( $link ) {

     if ( 'facebook' === $link['type'] ) {
          $link['icon'] = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="#C8102E" d="M23.625 12C23.625 5.578 18.422.375 12 .375S.375 5.578.375 12c0 5.813 4.219 10.64 9.797 11.484v-8.109H7.219V12h2.953V9.469c0-2.906 1.734-4.547 4.36-4.547 1.312 0 2.624.234 2.624.234v2.86h-1.453c-1.453 0-1.922.89-1.922 1.828V12h3.235l-.516 3.375h-2.719v8.11c5.578-.844 9.844-5.672 9.844-11.485Z"/></svg>';
     }

     if ( 'twitter' === $link['type'] ) {
          $link['icon'] = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="20" fill="none"><path fill="#C8102E" d="M21.516 5.125c.937-.703 1.78-1.547 2.437-2.531a9.225 9.225 0 0 1-2.812.75A4.809 4.809 0 0 0 23.297.625c-.938.563-2.016.984-3.094 1.219a4.922 4.922 0 0 0-3.61-1.547 4.921 4.921 0 0 0-4.921 4.922c0 .375.047.75.14 1.125A14.28 14.28 0 0 1 1.642 1.187c-.422.704-.657 1.547-.657 2.485 0 1.687.844 3.187 2.204 4.078-.797-.047-1.594-.234-2.25-.61v.048c0 2.39 1.687 4.359 3.937 4.828-.375.093-.844.187-1.266.187-.328 0-.609-.047-.937-.094.61 1.97 2.437 3.375 4.594 3.422a9.895 9.895 0 0 1-6.094 2.11c-.422 0-.797-.047-1.172-.094 2.156 1.406 4.734 2.203 7.547 2.203 9.047 0 13.969-7.453 13.969-13.969v-.656Z"/></svg>';
     }

     if ( 'email' === $link['type'] ) {
          $link['icon'] = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="18" fill="none"><path fill="#C8102E" d="M0 3c0-1.64 1.313-3 3-3h18c1.64 0 3 1.36 3 3v12c0 1.688-1.36 3-3 3H3c-1.688 0-3-1.313-3-3V3Zm2.25 0v1.078l8.063 6.61a2.615 2.615 0 0 0 3.328 0l8.109-6.61V3c0-.375-.375-.75-.75-.75H3c-.422 0-.75.375-.75.75Zm0 3.984V15c0 .422.328.75.75.75h18c.375 0 .75-.328.75-.75V6.984l-6.656 5.438a4.881 4.881 0 0 1-6.235 0L2.25 6.984Z"/></svg>';
     }

     return $link;
}
add_filter( 'shared_counts_link', 'wd_shared_counts_icons' );