Title: WP_Icon_Collections_Registry::get_instance
Published: August 20, 2026

---

# WP_Icon_Collections_Registry::get_instance(): 󠀁[WP_Icon_Collections_Registry](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/)󠁿

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#changelog)

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

Utility method to retrieve the main instance of the class.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#description)󠁿

The instance will be created if it does not exist yet.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#return)󠁿

 [WP_Icon_Collections_Registry](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/)
The main instance.

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

    ```php
    public static function get_instance() {
    	if ( null === self::$instance ) {
    		self::$instance = new self();
    	}

    	return self::$instance;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-icon-collections-registry.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/class-wp-icon-collections-registry.php#L220)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-wp-icon-collections-registry.php#L220-L226)

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

| Used by | Description | 
| [WP_REST_Icon_Collections_Controller::get_items()](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_items/)`wp-includes/rest-api/endpoints/class-wp-rest-icon-collections-controller.php` |

Retrieves all icon collections.

  | 
| [WP_REST_Icon_Collections_Controller::get_icon_collection()](https://developer.wordpress.org/reference/classes/wp_rest_icon_collections_controller/get_icon_collection/)`wp-includes/rest-api/endpoints/class-wp-rest-icon-collections-controller.php` |

Retrieves a specific icon collection from the registry.

  | 
| [wp_register_icon_collection()](https://developer.wordpress.org/reference/functions/wp_register_icon_collection/)`wp-includes/icons.php` |

Registers a new icon collection.

  | 
| [wp_unregister_icon_collection()](https://developer.wordpress.org/reference/functions/wp_unregister_icon_collection/)`wp-includes/icons.php` |

Unregisters an icon collection.

  | 
| [WP_REST_Icons_Controller::get_items()](https://developer.wordpress.org/reference/classes/wp_rest_icons_controller/get_items/)`wp-includes/rest-api/endpoints/class-wp-rest-icons-controller.php` |

Retrieves all icons, optionally scoped to a collection.

  | 
| [WP_Icons_Registry::register()](https://developer.wordpress.org/reference/classes/wp_icons_registry/register/)`wp-includes/class-wp-icons-registry.php` |

Registers an icon.

  |

[Show 1 more](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_icon_collections_registry/get_instance/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

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