bbPress::instance()
Main bbPress Instance
Description Description
bbPress is fun Please load it only one time For this, we thank you
Insures that only one instance of bbPress exists in memory at any one time. Also prevents needing to define globals all over the place.
See also See also
Return Return
(bbPress) The one true bbPress
Source Source
File: bbpress.php
public static function instance() { // Store the instance locally to avoid private static replication static $instance = null; // Only run these methods if they haven't been ran previously if ( null === $instance ) { $instance = new bbPress(); $instance->setup_environment(); $instance->includes(); $instance->setup_variables(); $instance->setup_actions(); } // Always return the instance return $instance; }
Changelog Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |