[wp-trac] [WordPress Trac] #47394: Gutenberg doesn't respond is_admin on firing save_post action

WordPress Trac noreply at wordpress.org
Sun May 26 19:42:38 UTC 2019


#47394: Gutenberg doesn't respond is_admin on firing save_post action
--------------------------+------------------------------
 Reporter:  SGr33n        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  5.2.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 There's a
 [https://developer.wordpress.org/reference/classes/wp_screen/is_block_editor/
 WP_Screen::is_block_editor()] method that might be helpful:
 {{{
 global $current_screen;
 $is_block_editor = ( $current_screen instanceof WP_Screen ) &&
 $current_screen->is_block_editor();
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47394#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list