Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herbie4/1174c0d14f9847030c8f94dd70dff4fe to your computer and use it in GitHub Desktop.
Save herbie4/1174c0d14f9847030c8f94dd70dff4fe to your computer and use it in GitHub Desktop.
Enfold theme: removes editor status from post/page list in wp-admin
<?php
// ENFOLD remove wp-admin editor listing from post/page lists
add_filter('display_post_states','hhdev_remove_post_state',999,2);
function hhdev_remove_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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment