WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#51819 new defect (bug)

use_block_editor_for_post() not avaialble by front end

Reported by: theMikeD Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

I have a use case where I need to know if a post is using the block editor in front end code. The normal function for this check would be use_block_editor_for_post() but this is loaded for admin-only, as part of wp-admin/includes/post.php

If there is an alternative I'm all ears, but this would seem to be the right function to use, and the docs give no indication that this is admin-only.

Change History (1)

#1 @SergeyBiryukov
2 months ago

  • Component changed from General to Editor
Note: See TracTickets for help on using tickets.