wp-includes/rest-api/endpoints/class-wp-rest-icons-controller.php:150Retrieves all icons, optionally scoped to a collection.
$requestWP_REST_RequestWP_REST_Response|WP_Error public function get_items( $request ) { $collection = $request->get_param( 'collection' ); if ( null !== $collection && ! WP_Icon_Collections_Registry::get_instance()->is_registered( $collection ) ) { return new WP_Error( 'rest_icon_collection_not_found', sprintf( /* translators: %s: Icon collection slug. */ __( 'Icon collection not found: "%s".' ), $collection ), array( 'status' => 404 ) ); } $response = array(); $search = $request->get_param( 'search' ); $icons = WP_Icons_Registry::get_instance()->get_registered_icons( $search ); foreach ( $icons as $icon ) { if ( null !== $collection && ( ! isset( $icon['collection'] ) || $icon['collection'] !== $collection ) ) { continue; } $prepared_icon = $this->prepare_item_for_response( $icon, $request ); $response[] = $this->prepare_response_for_collection( $prepared_icon ); } return rest_ensure_response( $response ); }Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/rest-api/endpoints/class-wp-rest-icons-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.