protected function get_additional_fields( $object_type = null ) {

		if ( ! $object_type ) {
			$object_type = $this->get_object_type();
		}

		if ( ! $object_type ) {
			return array();
		}

		global $wp_rest_additional_fields;

		if ( ! $wp_rest_additional_fields || ! isset( $wp_rest_additional_fields[ $object_type ] ) ) {
			return array();
		}

		return $wp_rest_additional_fields[ $object_type ];
	}
protected function get_additional_fields( $object_type = null ) {

		if ( ! $object_type ) {
			$object_type = $this->get_object_type();
		}

		if ( ! $object_type ) {
			return array();
		}

		global $wp_rest_additional_fields;

		if ( ! $wp_rest_additional_fields || ! isset( $wp_rest_additional_fields[ $object_type ] ) ) {
			return array();
		}

		return $wp_rest_additional_fields[ $object_type ];
	}
protected function get_additional_fields ( $ object_type = null ) { if ( ! $ object_type ) { $ object_type = $ this -> get_object_type ( ) ; } if ( ! $ object_type ) { return array ( ) ; } global $ wp_rest_additional_fields ; if ( ! $ wp_rest_additional_fields || ! isset ( $ wp_rest_additional_fields [ $ object_type ] ) ) { return array ( ) ; } return $ wp_rest_additional_fields [ $ object_type ] ; }
Get all the registered additional fields for a given object-type.

@param  string $object_type
@return array
Get all the registered additional fields for a given object - type .