Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove metadata registration in block [tests fail now].
  • Loading branch information
peterwilsoncc committed Feb 6, 2024
commit c86c1a1fcfece98b84d000c17e97a13cd91abe5d
21 changes: 0 additions & 21 deletions src/wp-includes/blocks/footnotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,6 @@ function render_block_core_footnotes( $attributes, $content, $block ) {
* @since 6.3.0
*/
function register_block_core_footnotes() {
$post_types = get_post_types(
array(
'show_in_rest' => true,
'public' => true,
)
);
foreach ( $post_types as $post_type ) {
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
if ( post_type_supports( $post_type, 'editor' ) && post_type_supports( $post_type, 'custom-fields' ) && post_type_supports( $post_type, 'revisions' ) ) {
register_post_meta(
$post_type,
'footnotes',
array(
'show_in_rest' => true,
'single' => true,
'type' => 'string',
'revisions_enabled' => true,
)
);
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause the tests to fail but is required for testing wp_register_footnotes_meta_field works as expected.

register_block_type_from_metadata(
__DIR__ . '/footnotes',
array(
Expand Down