Title: WP_REST_Icons_Controller::__construct
Published: May 20, 2026

---

# WP_REST_Icons_Controller::__construct()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_icons_controller/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_icons_controller/__construct/?output_format=md#related)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rest_icons_controller/__construct/?output_format=md#wp--skip-link--target)

Constructs the controller.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_rest_icons_controller/__construct/?output_format=md#source)󠁿

    ```php
    public function __construct() {
    	$this->namespace = 'wp/v2';
    	$this->rest_base = 'icons';
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-icons-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-icons-controller.php#L26)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/rest-api/endpoints/class-wp-rest-icons-controller.php#L26-L29)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rest_icons_controller/__construct/?output_format=md#related)󠁿

| Used by | Description | 
| [create_initial_rest_routes()](https://developer.wordpress.org/reference/functions/create_initial_rest_routes/)`wp-includes/rest-api.php` |

Registers default REST API routes.

  |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_rest_icons_controller%2F__construct%2F)
before being able to contribute a note or feedback.