Make WordPress Core


Ignore:
Timestamp:
02/27/2024 09:03:54 PM (9 months ago)
Author:
joemcgill
Message:

Docs: Improve docblock for WP_Block_Patterns_Registry::register.

This documents the new filePath property supported by WP_Block_Patterns_Registry::register and also updates the property name to camel case formatting to be consistent with other block pattern properties.

Props thekt12, spacedmonkey, joemcgill.
See #59532.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/wpBlockPatternsRegistry.php

    r57703 r57731  
    580580
    581581        $this->assertTrue(
    582             isset( $registered_patterns[ $pattern_name ]['file_path'] ) &&
     582            isset( $registered_patterns[ $pattern_name ]['filePath'] ) &&
    583583            ! isset( $registered_patterns[ $pattern_name ]['content'] ),
    584584            'Pattern was not lazy loaded.'
     
    634634
    635635        $this->assertTrue(
    636             isset( $registered_patterns[ $pattern_name ]['file_path'] ) &&
     636            isset( $registered_patterns[ $pattern_name ]['filePath'] ) &&
    637637            ! isset( $registered_patterns[ $pattern_name ]['content'] ),
    638638            'Pattern was not lazy loaded.'
Note: See TracChangeset for help on using the changeset viewer.