From 4bb67d9a6e42b80b3f33c2f12ba56788ff45f5a0 Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Sun, 5 Jun 2022 14:21:53 -0700
Subject: [PATCH] Revert inconsistent part of
 ce642fd8d5d33f2004163b2276ae9b801e67e360

---
 inc/class-wp-revisions-control-bulk-actions.php | 8 +++++---
 inc/class-wp-revisions-control.php              | 1 -
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/inc/class-wp-revisions-control-bulk-actions.php b/inc/class-wp-revisions-control-bulk-actions.php
index f7e74c8..1e31d3b 100644
--- a/inc/class-wp-revisions-control-bulk-actions.php
+++ b/inc/class-wp-revisions-control-bulk-actions.php
@@ -18,7 +18,7 @@ class WP_Revisions_Control_Bulk_Actions {
 	 *
 	 * @var array
 	 */
-	public static $post_types;
+	protected $post_types;
 
 	/**
 	 * Base for bulk action names.
@@ -38,7 +38,9 @@ class WP_Revisions_Control_Bulk_Actions {
 	 * One-time actions.
 	 */
 	public function setup() {
-		if ( empty( static::$post_types ) || ! is_array( static::$post_types ) ) {
+		$this->post_types = WP_Revisions_Control::get_instance()->get_post_types();
+
+		if ( empty( $this->post_types ) || ! is_array( $this->post_types ) ) {
 			return;
 		}
 
@@ -77,7 +79,7 @@ class WP_Revisions_Control_Bulk_Actions {
 			return;
 		}
 
-		if ( ! array_key_exists( $screen->post_type, static::$post_types ) ) {
+		if ( ! array_key_exists( $screen->post_type, $this->post_types ) ) {
 			return;
 		}
 
diff --git a/inc/class-wp-revisions-control.php b/inc/class-wp-revisions-control.php
index b5a5ebe..ea89a07 100644
--- a/inc/class-wp-revisions-control.php
+++ b/inc/class-wp-revisions-control.php
@@ -122,7 +122,6 @@ class WP_Revisions_Control {
 		add_action( 'save_post', array( $this, 'action_save_post' ) );
 
 		// Bulk actions.
-		WP_Revisions_Control_Bulk_Actions::$post_types = $post_types;
 		WP_Revisions_Control_Bulk_Actions::get_instance();
 	}
 
-- 
GitLab