Created
March 18, 2020 13:07
-
-
Save herbie4/1174c0d14f9847030c8f94dd70dff4fe to your computer and use it in GitHub Desktop.
Enfold theme: removes editor status from post/page list in wp-admin
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 | |
// 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