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 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.
本文标签: Creating query to show which editor (classic or block) was last used to edit a postpage
版权声明:本文标题:Creating query to show which editor (classic or block) was last used to edit a postpage 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742191756a2430343.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论