Skip to:

Opened 12 years ago

Closed 12 years ago

Last modified 7 months ago

#1847 closed task (blessed) (fixed)

Reduce duplication by using magic get/set methods in main bbPress class

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Tools - Code Improvements Keywords:


The main bbPress class sets some default variables, then overrides most of them in the setup_globals() method. This is wasteful, and that data can all just be set inside of setup_globals.

While we're moving things around, we may as well move everything into using magic getters and setters. The only exception to this is bbpress()->current_user, which is passed by reference.

Change History (1)

#1 @johnjamesjacoby
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3951]) Code Improvement:

  • Move preset bbPress class variables into bbPress::setup_globals() action.
  • Introduce magic get/set methods to handle main bbPress class variables.
  • Keeps by-reference bbPress->current_user outside of bbPress->data.
  • Reduces code duplication in bbPress class.
  • Fixes #1847.
Note: See TracTickets for help on using tickets.