Title: wp_register_icon
Published: August 20, 2026

---

# wp_register_icon( string $icon_name, array $args ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_register_icon/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_register_icon/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_register_icon/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_register_icon/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_register_icon/?output_format=md#changelog)

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

Registers a new icon.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_register_icon/?output_format=md#parameters)󠁿

 `$icon_name`stringrequired

Namespaced icon name in the form "collection/icon-name" (e.g. "my-plugin/arrow-left").
The "core" collection is reserved for WordPress core icons; third-party code should
register icons under its own collection rather than the "core" collection.

`$args`arrayrequired

List of properties for the icon.

 * `label` string
 * Required. A human-readable label for the icon.
 * `content` string
 * Optional. SVG markup for the icon.
    If not provided, the content will be retrieved
   from the `file_path` if set. If both `content` and `file_path` are not set, the
   icon will not be registered.
 * `file_path` string
 * Optional. The full path to the file containing the icon content.

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

 bool True if the icon was registered successfully, else false.

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

    ```php
    function wp_register_icon( $icon_name, $args ) {
    	return WP_Icons_Registry::get_instance()->register( $icon_name, $args );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/icons.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/icons.php#L61)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/icons.php#L61-L63)

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

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

Utility method to retrieve the main instance of the class.

  |

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

Registers the default core icons from the manifest.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_register_icon/?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%2Ffunctions%2Fwp_register_icon%2F)
before being able to contribute a note or feedback.