From 83a971e5f840d5654dca9cff4ec6e5577eb8c264 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Wed, 26 Feb 2020 11:49:30 -0500 Subject: [PATCH] Block Library: Social Link: Use placeholder for default label --- packages/block-library/src/social-link/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index a414cb6c275ee..1604812e70a93 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -15,7 +15,10 @@ function render_block_core_social_link( $attributes ) { $service = ( isset( $attributes['service'] ) ) ? $attributes['service'] : 'Icon'; $url = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false; - $label = ( isset( $attributes['label'] ) ) ? $attributes['label'] : __( 'Link to ' ) . block_core_social_link_get_name( $service ); + $label = ( isset( $attributes['label'] ) ) ? + $attributes['label'] : + /* translators: %s: Social Link service name */ + sprintf( __( 'Link to %s' ), block_core_social_link_get_name( $service ) ); // Don't render a link if there is no URL set. if ( ! $url ) {