admin管理员组

文章数量:1325756

I have a WordPress site that has some pages created/edited in Classic Editor, and some pages that built/edited with Gutenberg/Block Editor. I am trying to create a report of which pages use each editor. Is there a meta value that tracks which editor was used to edit a post?

I have a WordPress site that has some pages created/edited in Classic Editor, and some pages that built/edited with Gutenberg/Block Editor. I am trying to create a report of which pages use each editor. Is there a meta value that tracks which editor was used to edit a post?

Share Improve this question asked Aug 12, 2020 at 19:08 Bill DaileyBill Dailey 112 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

Can you not just go by date? Assuming you made a clean switch from classic to Gutenberg?

Otherwise, there's no definitive meta value, but you could just check the post content for common Gutenberg comments, such as <!-- wp:paragraph -->.

Check the post type support for editors

post_type_supports($post_type, 'editor'); For classic editor gutenberg_can_edit_post_type( $post_type ); or use_block_editor_for_post_type( $post_type ); to check the block editor support.

Next create a meta key and change its value to the choice of editor (every time you choose to change the editor.)

'classic_editor_enabled_editors_for_post' you can use this filter if you are using the classic editor plugin.

本文标签: Creating query to show which editor (classic or block) was last used to edit a postpage