Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/12/2012 08:33:13 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Code Improvement:

  • Turn bbPress::extend into an stdClass in setup_globals.
  • Add phpdoc to bbPress::data variable with verbose explanation of how it works.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbpress.php

    r3954 r3955  
    3434final class bbPress {
    3535
    36         /** Byref *****************************************************************/
     36        /** Magic *****************************************************************/
     37
     38        /**
     39         * bbPress uses many variables, most of which can be filtered to customize
     40         * the way that it works. To prevent unauthorized access, these variables
     41         * are stored in a private array that is magically updated using PHP 5.2+
     42         * methods. This is to prevent third party plugins from tampering with
     43         * essential information indirectly, which would cause issues later.
     44         *
     45         * @see bbPress::setup_globals()
     46         * @var array
     47         */
     48        private $data;
     49
     50        /** Not Magic *************************************************************/
    3751
    3852        /**
     
    4155        public $current_user = false;
    4256
    43         /** Arrays ****************************************************************/
     57        /**
     58         * @var obj Add-ons append to this (Akismet, BuddyPress, etc...)
     59         */
     60        public $extend;
    4461
    4562        /**
     
    4966
    5067        /**
    51          * @var array Add-ons append to this (Akismet, BuddyPress, etc...)
    52          */
    53         public $extend       = array();
    54 
    55         /**
    5668         * @var array Overloads get_option()
    5769         */
     
    6476
    6577        /** Singleton *************************************************************/
    66 
    67         /**
    68          * @var array Magic data store to get and set various runtime information.
    69          */
    70         private $data;
    7178
    7279        /**
     
    229236                /** Misc **************************************************************/
    230237
     238                $this->extend         = new stdClass(); // Plugins add data here
    231239                $this->errors         = new WP_Error(); // Feedback
    232240                $this->tab_index      = apply_filters( 'bbp_default_tab_index', 100 );
Note: See TracChangeset for help on using the changeset viewer.