Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: For passing the PHP Coding Standards #16107

Merged
merged 2 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/block-library/src/rss/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 8 additions & 2 deletions packages/block-library/src/tag-cloud/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ function render_block_core_tag_cloud( $attributes ) {
$tag_cloud = wp_tag_cloud( $args );

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 ) ) );
$labels = get_taxonomy_labels( get_taxonomy( $attributes['taxonomy'] ) );
$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(
Expand Down