wp/wp-includes/blocks/tag-cloud.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    27 		'smallest'   => floatVal( $attributes['smallestFontSize'] ),
    27 		'smallest'   => floatVal( $attributes['smallestFontSize'] ),
    28 		'largest'    => floatVal( $attributes['largestFontSize'] ),
    28 		'largest'    => floatVal( $attributes['largestFontSize'] ),
    29 	);
    29 	);
    30 	$tag_cloud = wp_tag_cloud( $args );
    30 	$tag_cloud = wp_tag_cloud( $args );
    31 
    31 
    32 	if ( ! $tag_cloud ) {
    32 	if ( empty( $tag_cloud ) ) {
    33 		$tag_cloud = __( 'There’s no content to show here yet.' );
    33 		// Display placeholder content when there are no tags only in editor.
       
    34 		if ( wp_is_serving_rest_request() ) {
       
    35 			$tag_cloud = __( 'There’s no content to show here yet.' );
       
    36 		} else {
       
    37 			return '';
       
    38 		}
    34 	}
    39 	}
    35 
    40 
    36 	$wrapper_attributes = get_block_wrapper_attributes();
    41 	$wrapper_attributes = get_block_wrapper_attributes();
    37 
    42 
    38 	return sprintf(
    43 	return sprintf(