Skip to content

Commit

Permalink
Footnotes: register meta field for pages (#52024)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored Jun 29, 2023
1 parent dc1dab9 commit 14e1c6f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/block-library/src/footnotes/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ function render_block_core_footnotes( $attributes, $content, $block ) {
* Registers the `core/footnotes` block on the server.
*/
function register_block_core_footnotes() {
register_post_meta(
'post',
'footnotes',
array(
'show_in_rest' => true,
'single' => true,
'type' => 'string',
)
);
foreach ( array( 'post', 'page' ) as $post_type ) {
register_post_meta(
$post_type,
'footnotes',
array(
'show_in_rest' => true,
'single' => true,
'type' => 'string',
)
);
}
register_block_type_from_metadata(
__DIR__ . '/footnotes',
array(
Expand Down

0 comments on commit 14e1c6f

Please sign in to comment.