WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_REST_Controller::get_additional_fields() WP 4.7.0

Retrieves all of the registered additional fields for a given object-type.

Это метод класса: WP_REST_Controller

Хуков нет.

Возвращает

Массив. Registered additional fields (if any), empty array if none or if the object type could not be inferred.

Использование

$WP_REST_Controller = new WP_REST_Controller();
$var = $WP_REST_Controller->get_additional_fields( $object_type );
$object_type(строка)
The object type.
По умолчанию: null

Код WP REST Controller::get additional fields: wp-includes/rest-api/endpoints/class-wp-rest-controller.php WP 5.2

<?php
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 ];
}