Skip to content

Instantly share code, notes, and snippets.

@endurtech
Created July 17, 2019 21:58
Show Gist options
  • Select an option

  • Save endurtech/37d073695aadc5dcb86f6bf508b32fa6 to your computer and use it in GitHub Desktop.

Select an option

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
<?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;
}
?>
<?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