backpress_convert_object
The BuddyPress backpress convert object function.
Description
Parameters (2)
- 0. $object
- The object.
- 1. $output
- The output.
Usage
if ( !function_exists( 'backpress_convert_object' ) ) { require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/backpress/functions.core.php'; } // The object. $object = &$object; // The output. $output = null; // NOTICE! Understand what this does before running. $result = backpress_convert_object($object, $output);
Defined (2)
The function is defined in the following location(s).
- /bp-forums/bbpress/bb-includes/backpress/functions.core.php
- function backpress_convert_object( &$object, $output ) {
- if ( is_array( $object ) ) {
- foreach ( array_keys( $object ) as $key )
- backpress_convert_object( $object[$key], $output );
- } else {
- switch ( $output ) {
- case OBJECT : break;
- case ARRAY_A : $object = get_object_vars($object); break;
- case ARRAY_N : $object = array_values(get_object_vars($object)); break;
- }
- }
- }
- /bp-forums/bp-forums-bbpress-sa.php
- function backpress_convert_object( &$object, $output ) {
- if ( is_array( $object ) ) {
- foreach ( array_keys( $object ) as $key )
- backpress_convert_object( $object[$key], $output );
- } else {
- switch ( $output ) {
- case OBJECT : break;
- case ARRAY_A : $object = get_object_vars($object); break;
- case ARRAY_N : $object = array_values(get_object_vars($object)); break;
- }
- }
- }