The main setup routine for the extension.

Description Description

This method contains the primary logic for setting up an extension’s configuration, setting up backward compatibility for legacy plugins, and hooking the extension’s screen functions into WP and BP.

Marked ‘public’ because it must be accessible to add_action(). However, you should never need to invoke this method yourself – it is called automatically at the right point in the load order by bp_register_group_extension().

Source Source

File: bp-groups/classes/class-bp-group-extension.php

	public function _register() {

		// Detect and parse properties set by legacy extensions.

		// Initialize, if necessary. This should only happen for
		// legacy extensions that don't call parent::init() themselves.
		if ( true !== $this->initialized ) {

		// Set some config values, based on the parsed params.
		$this->group_id          = $this->get_group_id();
		$this->slug              = $this->params['slug'];
		$this->name              = $this->params['name'];
		$this->visibility        = $this->params['visibility'];
		$this->nav_item_position = $this->params['nav_item_position'];
		$this->nav_item_name     = $this->params['nav_item_name'];
		$this->display_hook      = $this->params['display_hook'];
		$this->template_file     = $this->params['template_file'];

		// Configure 'screens': create, admin, and edit contexts.

		// Configure access-related settings.

		// Mirror configuration data so it's accessible to plugins
		// that look for it in its old locations.

		// Hook the extension into BuddyPress.

Top ↑

Changelog Changelog

Version Description
1.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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