Skip to:
Content

bbPress.org

Opened 12 months ago

Last modified 3 months ago

#3564 new feature request

Add a static instance variable reference to the BBP_Users_Admin class

Reported by: terresquall's profile terresquall Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: General Keywords:
Cc:

Description

This is in reference to the BBP_Users_Admin class at includes/admin/users.php. There are some action hooks that reference the instance object itself in setup_actions(), but because the instantiation of the class is not assigned to a variable, there is no way to get a reference of the class.

To rectify this, we can add a static instance variable to it, then assign it in the construct function, like so:

/**
 * The bbPress users admin loader
 *
 * @since 2.0.0 bbPress (r2515)
 */
static $instance;
public function __construct() {
	self::$instance = $this;
	$this->setup_actions();
}

This makes it possible to remove the actions that are hooked by this class.

Change History (0)

Note: See TracTickets for help on using tickets.