функция
wp_register_font_library_route()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_register_font_library_route( string $path, string|null $content_module = null, string|null $route_module = null )
Описание
Регистрирует маршрут для страницы font-library.
Параметры
$path
string
обязательный
Путь маршрута (например, '/types/$type/edit/$id').
$content_module
string|null
необязательный
= null
Идентификатор модуля скрипта для содержимого (stage/inspector).
$route_module
string|null
необязательный
= null
Идентификатор модуля скрипта для хуков жизненного цикла маршрута.
Исходный код
wp-includes/build/pages/font-library/page.php:22
function wp_register_font_library_route( $path, $content_module = null, $route_module = null ) {
global $wp_font_library_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_routes[] = $route;
}

