“fltAdminPostsListing” triggers a very slow query. Is it safe to remove it?
-
Hi! I have a website with a very big database, and this query takes a lot of time:
class RevisionaryAdminPosts {
// The heavy query populates this array.
private $post_revision_count = array();
function __construct() {
// The heavy query happens here.
add_action('admin_enqueue_scripts', [$this, 'fltAdminPostsListing'], 50); // 'the_posts' filter is not applied on edit.php for hierarchical types
// The $post_revision_count array is used here.
add_filter('display_post_states', [$this, 'flt_display_post_states'], 50, 2);
add_filter('page_row_actions', [$this, 'revisions_row_action_link']);
add_filter('post_row_actions', [$this, 'revisions_row_action_link']);
}
}I would like to remove the hook on “admin_enqueue_scripts”, which will effectively cause $post_revision_count to be empty.
Is there any concern with doing this? Am I right to assume that it will just not display the “Has Revision” post status (to filter by posts that has revisions) and remove the action link? Will that affect the plugin usability in a fundamental way? (I’m not a user of this system, but a developer, so I don’t know it from a usability POV that’s why I ask ?? )
Thank you!!!
- You must be logged in to reply to this topic.