From 2ff199d3c2e2670a8581c18628f5547d3589782f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?So=CC=88ren=20Wrede?= Date: Wed, 12 Jun 2019 09:19:42 +0200 Subject: [PATCH 1/2] Fix PHP CS --- packages/block-library/src/rss/index.php | 3 ++- packages/block-library/src/tag-cloud/index.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/rss/index.php b/packages/block-library/src/rss/index.php index 92406d09b6b1d6..1bf217be3a9b59 100644 --- a/packages/block-library/src/rss/index.php +++ b/packages/block-library/src/rss/index.php @@ -109,7 +109,8 @@ function render_block_core_rss( $attributes ) { * Registers the `core/rss` block on server. */ function register_block_core_rss() { - register_block_type( 'core/rss', + register_block_type( + 'core/rss', array( 'attributes' => array( 'align' => array( diff --git a/packages/block-library/src/tag-cloud/index.php b/packages/block-library/src/tag-cloud/index.php index b5095a2998fab1..70d2366b83aaf7 100644 --- a/packages/block-library/src/tag-cloud/index.php +++ b/packages/block-library/src/tag-cloud/index.php @@ -30,7 +30,7 @@ function render_block_core_tag_cloud( $attributes ) { $tag_cloud = wp_tag_cloud( $args ); if ( ! $tag_cloud ) { - $labels = get_taxonomy_labels( get_taxonomy( $attributes['taxonomy'] ) ); + $labels = get_taxonomy_labels( get_taxonomy( $attributes['taxonomy'] ) ); $tag_cloud = esc_html( sprintf( __( 'Your site doesn’t have any %s, so there’s nothing to display here at the moment.' ), strtolower( $labels->name ) ) ); } From 9045fe4b5bfebd511b2fef4f4a312f8fb25ec67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?So=CC=88ren=20Wrede?= Date: Wed, 12 Jun 2019 09:37:30 +0200 Subject: [PATCH 2/2] Add translator comment --- packages/block-library/src/tag-cloud/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/tag-cloud/index.php b/packages/block-library/src/tag-cloud/index.php index 70d2366b83aaf7..cf9c4d24537dbd 100644 --- a/packages/block-library/src/tag-cloud/index.php +++ b/packages/block-library/src/tag-cloud/index.php @@ -31,7 +31,13 @@ function render_block_core_tag_cloud( $attributes ) { if ( ! $tag_cloud ) { $labels = get_taxonomy_labels( get_taxonomy( $attributes['taxonomy'] ) ); - $tag_cloud = esc_html( sprintf( __( 'Your site doesn’t have any %s, so there’s nothing to display here at the moment.' ), strtolower( $labels->name ) ) ); + $tag_cloud = esc_html( + sprintf( + /* translators: %s: taxonomy name */ + __( 'Your site doesn’t have any %s, so there’s nothing to display here at the moment.' ), + strtolower( $labels->name ) + ) + ); } return sprintf(