Making WordPress.org


Ignore:
Timestamp:
07/22/2020 05:00:49 AM (6 years ago)
Author:
tellyworth
Message:

Plugin directory: catch known problem PHP function calls in block validator.

Some PHP calls are likely indicators of a plugin that is not compatible with the Block Directory. This will produce a warning or error if they are found in a plugin.

See #5303.

File:
1 edited

Legend:

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

    r10078 r10089  
    316316            case 'check_for_single_parent':
    317317                return __( 'Block plugins should contain a single main block, which is added to the editor when the block is installed. If multiple blocks are used (ex: list items in a list block), the list items should set the `parent` property in their `block.json` file.', 'wporg-plugins' );
     318            case 'check_php_function_calls':
     319                return __( 'Block plugins should contain minimal PHP with no UI outside the editor. JavaScript should be used instead of PHP where possible.', 'wporg-plugins' );
    318320            // This is a special case, since multiple values may be collapsed.
    319321            case 'check_block_json_is_valid':
Note: See TracChangeset for help on using the changeset viewer.