Skip to content

Commit

Permalink
Block Library: Social Link: Use placeholder for default label (#20475)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and jorgefilipecosta committed Mar 2, 2020
1 parent 6d22d8d commit d3eadc1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/social-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit d3eadc1

Please sign in to comment.