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


Top ↑

Return Return

(bbPress) The one true bbPress


Top ↑

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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.