Title: wp_register_font_library_wp_admin_route
Published: May 20, 2026

---

# wp_register_font_library_wp_admin_route( string $path, string|null $content_module = null, string|null $route_module = null )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_register_font_library_wp_admin_route/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/wp_register_font_library_wp_admin_route/?output_format=md#source)

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

Register a route for the font-library-wp-admin page.

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

 `$path`stringrequired

Route path (e.g., `'/types/$type/edit/$id'`).

`$content_module`string|nulloptional

Script module ID for content (stage/inspector).

Default:`null`

`$route_module`string|nulloptional

Script module ID for route lifecycle hooks.

Default:`null`

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

    ```php
    function wp_register_font_library_wp_admin_route( $path, $content_module = null, $route_module = null ) {
    	global $wp_font_library_wp_admin_routes;

    	$route = array( 'path' => $path );
    	if ( ! empty( $content_module ) ) {
    		$route['content_module'] = $content_module;
    	}
    	if ( ! empty( $route_module ) ) {
    		$route['route_module'] = $route_module;
    	}

    	$wp_font_library_wp_admin_routes[] = $route;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/build/pages/font-library/page-wp-admin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/build/pages/font-library/page-wp-admin.php#L25)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/build/pages/font-library/page-wp-admin.php#L25-L37)

## User Contributed Notes

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