BBP_Converter::__construct()

The main Forums Converter loader

Description

Source

File: bp-forums/admin/converter.php

	public function __construct() {

		// "I wonder where I'll float next."
		if ( empty( $_SERVER['REQUEST_METHOD'] ) )
			return;

		// Bail if request is not correct
		switch ( strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {

			// Converter is converting
			case 'POST' :
				if ( ( empty( $_POST['action'] ) || ( 'bbconverter_process' !=  $_POST['action'] ) ) )
					return;

				break;

			// Some other admin page
			case 'GET'  :
				if ( ( empty( $_GET['page'] ) || ( 'bbp-converter' !=  $_GET['page'] ) ) )
					return;

				break;
		}

		// Proceed with the actions
		$this->setup_actions();
	}

Changelog

Changelog
Version Description
bbPress (r3813) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.