Created
July 17, 2019 21:58
-
-
Save endurtech/37d073695aadc5dcb86f6bf508b32fa6 to your computer and use it in GitHub Desktop.
Remove the frontend and backend notice of present editor type from admin bar when using Enfold WordPress Theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'display_post_states', 'remove_ALB_post_state', 999, 2 ); | |
| function remove_ALB_post_state( $post_states, $post ) | |
| { | |
| if( !has_blocks( $post->ID ) ) | |
| { | |
| unset( $post_states['wp_editor'] ); | |
| } | |
| if( != Avia_Builder()->get_alb_builder_status($post->ID) ) | |
| { | |
| unset( $post_states['avia_alb'] ); | |
| } | |
| return $post_states; | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'avf_gutenberg_admin_bar_edit_page_info', 'modify_admin_bar_edit_page_info', 10, 1 ); | |
| function modify_admin_bar_edit_page_info( $show ) | |
| { | |
| $show = 'hide'; | |
| return $show; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment