BBP_Converter::__construct()

The main Forums Converter loader

Description

Source

File: bp-forums/admin/converter.php

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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.