Skip to content

Add rest field based on support for revisions, rather than whether UI… #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
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
4 changes: 2 additions & 2 deletions revision-notes.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public function init() {
add_filter( 'wp_post_revision_title_expanded', array( $this, 'wp_post_revision_title_expanded' ), 10, 2 );

// Use post_type_supports() to make showing/hiding of the field easy for devs.
// By default we'll show it for any post type that has an edit UI.
$post_types = get_post_types( array( 'show_ui' => true ) );
// By default we'll show it for any post type that supports revisions.
$post_types = get_post_types_by_support( 'revisions' );

if ( ! empty( $post_types ) ) {
foreach ( $post_types as $post_type ) {
Expand Down