mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Docs: Improve documentation for block pattern properties.
Includes: * Adding the `templateTypes` property to the `WP_Block_Patterns_Registry::register()` DocBlock. * Adding `@since` notes for the `postTypes` and `templateTypes` properties to: * `_register_theme_block_patterns()` * `WP_Block_Patterns_Registry::register()` * Bringing some consistency to the order of properties between: * `_register_theme_block_patterns()` * `WP_Block_Patterns_Registry::register()` * `WP_REST_Block_Patterns_Controller::prepare_item_for_response()` * `WP_REST_Block_Patterns_Controller::get_item_schema()` Follow-up to [52943], [53152], [54263], [55168]. See #56792. git-svn-id: https://develop.svn.wordpress.org/trunk@55173 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -78,9 +78,9 @@ class Tests_REST_WpRestBlockPatternsController extends WP_Test_REST_Controller_T
|
||||
'test/one',
|
||||
array(
|
||||
'title' => 'Pattern One',
|
||||
'categories' => array( 'test' ),
|
||||
'viewportWidth' => 1440,
|
||||
'content' => '<!-- wp:heading {"level":1} --><h1>One</h1><!-- /wp:heading -->',
|
||||
'viewportWidth' => 1440,
|
||||
'categories' => array( 'test' ),
|
||||
'templateTypes' => array( 'page' ),
|
||||
)
|
||||
);
|
||||
@@ -89,8 +89,8 @@ class Tests_REST_WpRestBlockPatternsController extends WP_Test_REST_Controller_T
|
||||
'test/two',
|
||||
array(
|
||||
'title' => 'Pattern Two',
|
||||
'categories' => array( 'test' ),
|
||||
'content' => '<!-- wp:paragraph --><p>Two</p><!-- /wp:paragraph -->',
|
||||
'categories' => array( 'test' ),
|
||||
'templateTypes' => array( 'single' ),
|
||||
)
|
||||
);
|
||||
@@ -99,8 +99,8 @@ class Tests_REST_WpRestBlockPatternsController extends WP_Test_REST_Controller_T
|
||||
'test/three',
|
||||
array(
|
||||
'title' => 'Pattern Three',
|
||||
'categories' => array( 'test', 'buttons', 'query' ),
|
||||
'content' => '<!-- wp:paragraph --><p>Three</p><!-- /wp:paragraph -->',
|
||||
'categories' => array( 'test', 'buttons', 'query' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user