diff -r be944660c56a -r 3d72ae0968f4 wp/wp-includes/blocks/social-link.php --- a/wp/wp-includes/blocks/social-link.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-includes/blocks/social-link.php Tue Sep 27 16:37:53 2022 +0200 @@ -17,35 +17,37 @@ function render_block_core_social_link( $attributes, $content, $block ) { $open_in_new_tab = isset( $block->context['openInNewTab'] ) ? $block->context['openInNewTab'] : false; - $service = ( isset( $attributes['service'] ) ) ? $attributes['service'] : 'Icon'; - $url = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false; - $label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : sprintf( - /* translators: %1$s: Social-network name. %2$s: URL. */ - __( '%1$s: %2$s' ), - block_core_social_link_get_name( $service ), - $url - ); - $class_name = isset( $attributes['className'] ) ? ' ' . $attributes['className'] : false; + $service = ( isset( $attributes['service'] ) ) ? $attributes['service'] : 'Icon'; + $url = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false; + $label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : block_core_social_link_get_name( $service ); + $show_labels = array_key_exists( 'showLabels', $block->context ) ? $block->context['showLabels'] : false; // Don't render a link if there is no URL set. if ( ! $url ) { return ''; } - $attribute = ''; + $rel_target_attributes = ''; if ( $open_in_new_tab ) { - $attribute = 'rel="noopener nofollow" target="_blank"'; + $rel_target_attributes = 'rel="noopener nofollow" target="_blank"'; } $icon = block_core_social_link_get_icon( $service ); $wrapper_attributes = get_block_wrapper_attributes( array( - 'class' => 'wp-social-link wp-social-link-' . $service . $class_name, + 'class' => 'wp-social-link wp-social-link-' . $service, 'style' => block_core_social_link_get_color_styles( $block->context ), ) ); - return '
  • ' . $icon . '
  • '; + $link = '
  • '; + $link .= ''; + $link .= $icon; + $link .= ''; + $link .= esc_html( $label ); + $link .= '
  • '; + + return $link; } /** @@ -106,171 +108,171 @@ $services_data = array( 'fivehundredpx' => array( 'name' => '500px', - 'icon' => '', + 'icon' => '', ), 'amazon' => array( 'name' => 'Amazon', - 'icon' => '', + 'icon' => '', ), 'bandcamp' => array( 'name' => 'Bandcamp', - 'icon' => '', + 'icon' => '', ), 'behance' => array( 'name' => 'Behance', - 'icon' => '', + 'icon' => '', ), 'chain' => array( 'name' => 'Link', - 'icon' => '', + 'icon' => '', ), 'codepen' => array( 'name' => 'CodePen', - 'icon' => '', + 'icon' => '', ), 'deviantart' => array( 'name' => 'DeviantArt', - 'icon' => '', + 'icon' => '', ), 'dribbble' => array( 'name' => 'Dribbble', - 'icon' => '', + 'icon' => '', ), 'dropbox' => array( 'name' => 'Dropbox', - 'icon' => '', + 'icon' => '', ), 'etsy' => array( 'name' => 'Etsy', - 'icon' => '', + 'icon' => '', ), 'facebook' => array( 'name' => 'Facebook', - 'icon' => '', + 'icon' => '', ), 'feed' => array( 'name' => 'RSS Feed', - 'icon' => '', + 'icon' => '', ), 'flickr' => array( 'name' => 'Flickr', - 'icon' => '', + 'icon' => '', ), 'foursquare' => array( 'name' => 'Foursquare', - 'icon' => '', + 'icon' => '', ), 'goodreads' => array( 'name' => 'Goodreads', - 'icon' => '', + 'icon' => '', ), 'google' => array( 'name' => 'Google', - 'icon' => '', + 'icon' => '', ), 'github' => array( 'name' => 'GitHub', - 'icon' => '', + 'icon' => '', ), 'instagram' => array( 'name' => 'Instagram', - 'icon' => '', + 'icon' => '', ), 'lastfm' => array( 'name' => 'Last.fm', - 'icon' => '', + 'icon' => '', ), 'linkedin' => array( 'name' => 'LinkedIn', - 'icon' => '', + 'icon' => '', ), 'mail' => array( 'name' => 'Mail', - 'icon' => '', + 'icon' => '', ), 'mastodon' => array( 'name' => 'Mastodon', - 'icon' => '', + 'icon' => '', ), 'meetup' => array( 'name' => 'Meetup', - 'icon' => '', + 'icon' => '', ), 'medium' => array( 'name' => 'Medium', - 'icon' => '', + 'icon' => '', ), 'patreon' => array( 'name' => 'Patreon', - 'icon' => '', + 'icon' => '', ), 'pinterest' => array( 'name' => 'Pinterest', - 'icon' => '', + 'icon' => '', ), 'pocket' => array( 'name' => 'Pocket', - 'icon' => '', + 'icon' => '', ), 'reddit' => array( 'name' => 'Reddit', - 'icon' => '', + 'icon' => '', ), 'skype' => array( 'name' => 'Skype', - 'icon' => '', + 'icon' => '', ), 'snapchat' => array( 'name' => 'Snapchat', - 'icon' => '', + 'icon' => '', ), 'soundcloud' => array( 'name' => 'Soundcloud', - 'icon' => '', + 'icon' => '', ), 'spotify' => array( 'name' => 'Spotify', - 'icon' => '', + 'icon' => '', ), 'telegram' => array( 'name' => 'Telegram', - 'icon' => '', + 'icon' => '', ), 'tiktok' => array( 'name' => 'TikTok', - 'icon' => '', + 'icon' => '', ), 'tumblr' => array( 'name' => 'Tumblr', - 'icon' => '', + 'icon' => '', ), 'twitch' => array( 'name' => 'Twitch', - 'icon' => '', + 'icon' => '', ), 'twitter' => array( 'name' => 'Twitter', - 'icon' => '', + 'icon' => '', ), 'vimeo' => array( 'name' => 'Vimeo', - 'icon' => '', + 'icon' => '', ), 'vk' => array( 'name' => 'VK', - 'icon' => '', + 'icon' => '', ), 'wordpress' => array( 'name' => 'WordPress', - 'icon' => '', + 'icon' => '', ), 'yelp' => array( 'name' => 'Yelp', - 'icon' => '', + 'icon' => '', ), 'youtube' => array( 'name' => 'YouTube', - 'icon' => '', + 'icon' => '', ), 'share' => array( 'name' => 'Share Icon',