Vanilla::callback_forum_parent( int $parent )

Clean Root Parent ID -1 to 0

Description

Parameters

$parent

(int) (Required) Vanilla v2.x Parent ID

Return

(int)

Source

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

	public function callback_forum_parent( $parent = 0 ) {
		if ( $parent == -1 ) {
			return 0;
		} else {
			return $parent;
		}
	}

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.