Making WordPress.org


Ignore:
Timestamp:
07/06/2021 08:33:48 PM (3 years ago)
Author:
ryelle
Message:

Plugin Directory: Increase error level of block.json issues in Block Plugin Checker.

Most issues when parsing the block.json files have the potential to prevent blocks from showing up in the editor, so the notice to plugin developers should make that clear.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php

    r10737 r11097  
    384384            if ( empty( $results_by_type[ $type ] ) ) {
    385385                // Print out the warning wrapper if we have block.json issues.
    386                 if ( 'warning' !== $type || empty( $block_json_issues ) ) {
     386                if ( 'error' !== $type || empty( $block_json_issues ) ) {
    387387                    continue;
    388388                }
     
    405405            }
    406406            // Collapse block.json warnings into one details at the end of warnings list.
    407             if ( 'warning' === $type && ! empty( $block_json_issues ) ) {
     407            if ( 'error' === $type && ! empty( $block_json_issues ) ) {
    408408                $messages = wp_list_pluck( $block_json_issues, 'message' );
    409409                $details = '<p>' . implode( '</p><p>', (array) $messages ) . '</p>';
Note: See TracChangeset for help on using the changeset viewer.