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 badges2 Answers
Reset to default 1Can 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.