Vanilla::callback_topic_status( int $status )

Translate the topic status from Vanilla v2.x numeric’s to WordPress’s strings.

Description

Parameters

$status

(Required) Vanilla v2.x numeric topic status

Return

(string) WordPress safe

Source

File: bp-forums/admin/converters/Vanilla.php

489
490
491
492
493
494
495
496
497
498
499
500
501
public function callback_topic_status( $status = 0 ) {
    switch ( $status ) {
        case 1 :
            $status = 'closed';
            break;
 
        case 0  :
        default :
            $status = 'publish';
            break;
    }
    return $status;
}

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.