BP_REST_Settings_Endpoint::get_unserialize_data( array $array )

Unserialize array values.

Description

Parameters

$array

(Required) Array with serialize data.

Return

(array)

Source

File: bp-core/classes/class-bp-rest-settings-endpoint.php

	public function get_unserialize_data( $array ) {
		if ( empty( $array ) ) {
			return $array;
		}

		if ( ! empty( $array ) ) {
			$new_array = array();
			foreach ( $array as $key => $value ) {
				$new_array[ $key ] = maybe_unserialize( $value );
			}

			return $new_array;
		}

		return $array;

	}

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.