Skip to content

Commit

Permalink
Include footnotes on non public cpts
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Feb 12, 2024
1 parent f5c207a commit d6efccb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/block-library/src/footnotes/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,8 @@ function register_block_core_footnotes() {
*
* @since 6.5.0
*/
function wp_register_footnotes_post_meta() {
$post_types = get_post_types(
array(
'show_in_rest' => true,
'public' => true,
)
);
function register_block_core_footnotes_post_meta() {
$post_types = get_post_types( array( 'show_in_rest' => true ) );
foreach ( $post_types as $post_type ) {
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
if (
Expand All @@ -111,7 +106,7 @@ function wp_register_footnotes_post_meta() {
}
}
// Use a priority of 20 to be higher than the default of 10 the priority with which most post types are registered.
add_action( 'init', 'wp_register_footnotes_post_meta', 20 );
add_action( 'init', 'register_block_core_footnotes_post_meta', 20 );

/**
* Adds the footnotes field to the revisions display.
Expand Down

0 comments on commit d6efccb

Please sign in to comment.