Title: _wp_register_default_icons
Published: August 20, 2026

---

# _wp_register_default_icons()

## In this article

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

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

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Registers the default core icons from the manifest.

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

    ```php
    function _wp_register_default_icons() {
    	$icons_directory = ABSPATH . WPINC . '/images/icon-library/';
    	$manifest_path   = ABSPATH . WPINC . '/assets/icon-library-manifest.php';

    	if ( ! is_readable( $manifest_path ) ) {
    		wp_trigger_error(
    			__FUNCTION__,
    			__( 'Core icon collection manifest is missing or unreadable.' )
    		);
    		return;
    	}

    	$collection = include $manifest_path;

    	if ( empty( $collection ) ) {
    		wp_trigger_error(
    			__FUNCTION__,
    			__( 'Core icon collection manifest is empty or invalid.' )
    		);
    		return;
    	}

    	foreach ( $collection as $icon_name => $icon_data ) {
    		if (
    			empty( $icon_data['filePath'] )
    			|| ! is_string( $icon_data['filePath'] )
    		) {
    			_doing_it_wrong(
    				__FUNCTION__,
    				__( 'Core icon collection manifest must provide a valid "filePath" for each icon.' ),
    				'7.0.0'
    			);
    			return;
    		}

    		wp_register_icon(
    			'core/' . $icon_name,
    			array(
    				'label'     => $icon_data['label'],
    				'file_path' => $icons_directory . $icon_data['filePath'],
    			)
    		);
    	}
    }
    ```

[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#L100)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/icons.php#L100-L143)

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

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

Registers a new icon.

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

Generates a user-level error/warning/notice/deprecation message.

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

Retrieves the translation of $text.

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

Marks something as being incorrectly called.

  |

[Show 2 more](https://developer.wordpress.org/reference/functions/_wp_register_default_icons/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/_wp_register_default_icons/?output_format=md#)

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