Tagged: admin bar, enfold 4.5.3
Does anyone know how to remove the “Edit Page (Advanced Layout Builder)” text, specifically the “(Advanced Layout Builder)” or “(Classic Editor)” text from the frontend view in the Admin Bar?
The theme informing me what type of editor is to be called provides little value and takes up valuable admin bar space. Again, completely subjective but perhaps others will desire the same.
Inspecting how I can hook into this code to alter it I see that it is being called from the “class-avia-gutenberg.php” file under config-gutenberg directory. But I do not know of a way to hook into the function to replace/eliminate it.
Any help or guidance in this regard would be greatly appreciate.
Hey Manny,
Thank you for using enfold.
I added a filter for the next update.
Meanwhile please replace
enfold\config-gutenberg\class-avia-gutenberg.php
with
Then you can use a filter:
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;
}
Best regards,
Günter
And by the way – to get rid of this info in list view Pages / Posts in the backend – ad to functions.php of child-theme:
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;
}
Excellent work sir @Günter. Thank you kindly. MUCH BETTER!
SWEET! Thank you for that helpful information @Guenni007. You have restored and simplified my post/page list view within the backend!
Hi,
Glad this issue is resolved!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
Don’t forget to bookmark Enfold Documentation for future reference.
Thank you for using Enfold :)
Best regards,
Vinay