initial
This commit is contained in:
commit
9883323161
17470 files changed
+4470592
No files matched your search
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin constants - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* Returns an array of constants for use in other templates.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
return array(
|
||||
'version' => '22.6.0-rc.1',
|
||||
'build_url' => includes_url( 'build/' ),
|
||||
);
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Pages loader - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/pages/font-library/page.php';
|
||||
require_once __DIR__ . '/pages/font-library/page-wp-admin.php';
|
||||
require_once __DIR__ . '/pages/options-connectors/page.php';
|
||||
require_once __DIR__ . '/pages/options-connectors/page-wp-admin.php';
|
||||
@@ -0,0 +1 @@
|
||||
// Empty module loader for page dependencies
|
||||
@@ -0,0 +1,302 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: font-library (wp-admin integrated)
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* This version integrates with the standard WordPress admin interface,
|
||||
* keeping the wp-admin sidebar and scripts/styles intact.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
// Global storage for font-library routes and menu items
|
||||
global $wp_font_library_wp_admin_routes, $wp_font_library_wp_admin_menu_items;
|
||||
$wp_font_library_wp_admin_routes = array();
|
||||
$wp_font_library_wp_admin_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the font-library-wp-admin page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the font-library-wp-admin page.
|
||||
* Note: Menu items are registered but not displayed in single-page mode.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
*/
|
||||
function wp_register_font_library_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) {
|
||||
global $wp_font_library_wp_admin_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
$wp_font_library_wp_admin_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the font-library-wp-admin page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function wp_get_font_library_wp_admin_routes() {
|
||||
global $wp_font_library_wp_admin_routes;
|
||||
return $wp_font_library_wp_admin_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the font-library-wp-admin page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function wp_get_font_library_wp_admin_menu_items() {
|
||||
global $wp_font_library_wp_admin_menu_items;
|
||||
return $wp_font_library_wp_admin_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the font-library-wp-admin page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function wp_font_library_wp_admin_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles for the font-library-wp-admin page.
|
||||
* Hooked to admin_enqueue_scripts.
|
||||
*
|
||||
* @param string $hook_suffix The current admin page.
|
||||
*/
|
||||
function wp_font_library_wp_admin_enqueue_scripts( $hook_suffix ) {
|
||||
// Check all possible ways this page can be accessed:
|
||||
// 1. Menu page via admin.php?page=font-library-wp-admin (plugin)
|
||||
// 2. Direct file via font-library.php (Core) - screen ID will be 'font-library'
|
||||
$current_screen = get_current_screen();
|
||||
$is_our_page = (
|
||||
( isset( $_GET['page'] ) && 'font-library-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
( $current_screen && 'font-library' === $current_screen->id )
|
||||
);
|
||||
|
||||
if ( ! $is_our_page ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
// Fire init action for extensions to register routes and menu items
|
||||
do_action( 'font-library-wp-admin_init' );
|
||||
|
||||
// Preload REST API data
|
||||
wp_font_library_wp_admin_preload_data();
|
||||
|
||||
// Get all registered routes
|
||||
$routes = wp_get_font_library_wp_admin_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'font-library-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
/*
|
||||
* Add inline script to initialize the app using initSinglePage (no menuItems).
|
||||
* The dynamic import is deferred until DOMContentLoaded so that all classic
|
||||
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
|
||||
* wp-theme, etc.) have finished parsing and executing before the boot module
|
||||
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
|
||||
* against the classic-script-printing pass on fast CDN-fronted hosts in
|
||||
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
|
||||
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
|
||||
*/
|
||||
$init_js_function = <<<'JS'
|
||||
( mountId, routes ) => {
|
||||
const run = async () => {
|
||||
const mod = await import( "@wordpress/boot" );
|
||||
mod.initSinglePage( { mountId, routes } );
|
||||
};
|
||||
if ( document.readyState === "loading" ) {
|
||||
document.addEventListener( "DOMContentLoaded", run );
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
}
|
||||
JS;
|
||||
wp_add_inline_script(
|
||||
'font-library-wp-admin-prerequisites',
|
||||
sprintf(
|
||||
'( %s )( %s, %s );',
|
||||
$init_js_function,
|
||||
wp_json_encode( 'font-library-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'font-library-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for font-library-wp-admin module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'font-library-wp-admin',
|
||||
$build_constants['build_url'] . 'pages/font-library/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'font-library-wp-admin-prerequisites' );
|
||||
wp_enqueue_script_module( 'font-library-wp-admin' );
|
||||
wp_enqueue_style( 'font-library-wp-admin-prerequisites' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the font-library-wp-admin page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
* This renders within the normal WordPress admin interface.
|
||||
*/
|
||||
function wp_font_library_wp_admin_render_page() {
|
||||
?>
|
||||
<style>
|
||||
/* Critical styles to prevent layout shifts - inlined for immediate application */
|
||||
|
||||
/* Background colors */
|
||||
#wpwrap {
|
||||
background: var(--wpds-color-fg-content-neutral, #1e1e1e);
|
||||
overflow-y: auto;
|
||||
}
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Reset wp-admin padding */
|
||||
#wpcontent {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
#wpbody-content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* Hide legacy admin elements */
|
||||
#wpbody-content > div:not(.boot-layout-container):not(#screen-meta) {
|
||||
display: none;
|
||||
}
|
||||
#wpfooter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Accessibility regions */
|
||||
.a11y-speak-region {
|
||||
inset-inline-start: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
/* Admin menu indicators */
|
||||
ul#adminmenu a.wp-has-current-submenu::after,
|
||||
ul#adminmenu > li.current > a.current::after {
|
||||
border-inline-end-color: #fff;
|
||||
}
|
||||
|
||||
/* Media frame fix */
|
||||
.media-frame select.attachment-filters:last-of-type {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Responsive overflow fix for #wpwrap */
|
||||
@media (min-width: 782px) {
|
||||
#wpwrap {
|
||||
overflow-y: initial;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="font-library-wp-admin-app" class="boot-layout-container"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Hook the enqueue function to admin_enqueue_scripts
|
||||
add_action( 'admin_enqueue_scripts', 'wp_font_library_wp_admin_enqueue_scripts' );
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: font-library
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
// Global storage for font-library routes and menu items
|
||||
global $wp_font_library_routes, $wp_font_library_menu_items;
|
||||
$wp_font_library_routes = array();
|
||||
$wp_font_library_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the font-library page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the font-library page.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
* @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'.
|
||||
*/
|
||||
function wp_register_font_library_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
|
||||
global $wp_font_library_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) {
|
||||
$menu_item['parent_type'] = $parent_type;
|
||||
}
|
||||
|
||||
$wp_font_library_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the font-library page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function wp_get_font_library_routes() {
|
||||
global $wp_font_library_routes;
|
||||
return $wp_font_library_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the font-library page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function wp_get_font_library_menu_items() {
|
||||
global $wp_font_library_menu_items;
|
||||
return $wp_font_library_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the font-library page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function wp_font_library_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the font-library page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
*/
|
||||
function wp_font_library_render_page() {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
// Set current screen
|
||||
set_current_screen();
|
||||
|
||||
// Remove unwanted deprecated handler
|
||||
remove_action( 'admin_head', 'wp_admin_bar_header' );
|
||||
|
||||
// Remove unwanted scripts and styles that were enqueued during `admin_init`
|
||||
foreach ( wp_scripts()->queue as $script ) {
|
||||
wp_dequeue_script( $script );
|
||||
}
|
||||
foreach ( wp_styles()->queue as $style ) {
|
||||
wp_dequeue_style( $style );
|
||||
}
|
||||
|
||||
// Fire init action for extensions to register routes and menu items
|
||||
do_action( 'font-library_init' );
|
||||
|
||||
// Enqueue command palette assets for boot-based pages
|
||||
if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) {
|
||||
wp_enqueue_command_palette_assets();
|
||||
}
|
||||
|
||||
// Preload REST API data
|
||||
wp_font_library_preload_data();
|
||||
|
||||
// Get all registered routes and menu items
|
||||
$menu_items = wp_get_font_library_menu_items();
|
||||
$routes = wp_get_font_library_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'font-library-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
// Add inline script to initialize the app
|
||||
$init_modules = [];
|
||||
wp_add_inline_script(
|
||||
'font-library-prerequisites',
|
||||
sprintf(
|
||||
'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));',
|
||||
'font-library-app',
|
||||
wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
esc_url( admin_url( '/' ) )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'font-library-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for font-library module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add init modules as static dependencies
|
||||
// No init modules configured
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'font-library',
|
||||
$build_constants['build_url'] . 'pages/font-library/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'font-library-prerequisites' );
|
||||
wp_enqueue_script_module( 'font-library' );
|
||||
wp_enqueue_style( 'font-library-prerequisites' );
|
||||
}
|
||||
|
||||
// Output the HTML
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php echo esc_html( get_admin_page_title() ); ?></title>
|
||||
<style>
|
||||
html {
|
||||
background: #f1f1f1;
|
||||
color: #444;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#wpadminbar { display: none; }
|
||||
</style>
|
||||
<?php
|
||||
global $hook_suffix;
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$hook_suffix = 'font-library';
|
||||
|
||||
// BEGIN see wp-admin/admin-header.php
|
||||
print_admin_styles();
|
||||
print_head_scripts();
|
||||
|
||||
/**
|
||||
* Fires in head section for a specific admin page.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
/**
|
||||
* Fires in head section for all admin pages.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
do_action( 'admin_head' );
|
||||
// END see wp-admin/admin-header.php
|
||||
?>
|
||||
</head>
|
||||
<body class="font-library">
|
||||
<div id="font-library-app" style="height: 100vh; box-sizing: border-box;"></div>
|
||||
<?php
|
||||
// BEGIN see wp-admin/admin-footer.php
|
||||
|
||||
/**
|
||||
* Prints scripts or data before the default footer scripts.
|
||||
*
|
||||
* @since 1.2.0
|
||||
*/
|
||||
do_action( 'admin_footer', '' );
|
||||
|
||||
// Print import map first so it's available for inline scripts
|
||||
wp_script_modules()->print_import_map();
|
||||
print_footer_scripts();
|
||||
wp_script_modules()->print_enqueued_script_modules();
|
||||
wp_script_modules()->print_script_module_preloads();
|
||||
wp_script_modules()->print_script_module_data();
|
||||
|
||||
/**
|
||||
* Prints scripts or data after the default footer scripts.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
// END see wp-admin/admin-footer.php
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intercept admin_init to render the page early.
|
||||
* This bypasses the default WordPress admin template.
|
||||
*/
|
||||
function wp_font_library_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'font-library' === $_GET['page'] ) {
|
||||
wp_font_library_render_page();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Hook the interceptor to admin_init
|
||||
add_action( 'admin_init', 'wp_font_library_intercept_render' );
|
||||
@@ -0,0 +1 @@
|
||||
// Empty module loader for page dependencies
|
||||
@@ -0,0 +1,302 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: options-connectors (wp-admin integrated)
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* This version integrates with the standard WordPress admin interface,
|
||||
* keeping the wp-admin sidebar and scripts/styles intact.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
// Global storage for options-connectors routes and menu items
|
||||
global $wp_options_connectors_wp_admin_routes, $wp_options_connectors_wp_admin_menu_items;
|
||||
$wp_options_connectors_wp_admin_routes = array();
|
||||
$wp_options_connectors_wp_admin_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the options-connectors-wp-admin page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function wp_register_options_connectors_wp_admin_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $wp_options_connectors_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_options_connectors_wp_admin_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the options-connectors-wp-admin page.
|
||||
* Note: Menu items are registered but not displayed in single-page mode.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
*/
|
||||
function wp_register_options_connectors_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) {
|
||||
global $wp_options_connectors_wp_admin_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
$wp_options_connectors_wp_admin_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the options-connectors-wp-admin page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function wp_get_options_connectors_wp_admin_routes() {
|
||||
global $wp_options_connectors_wp_admin_routes;
|
||||
return $wp_options_connectors_wp_admin_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the options-connectors-wp-admin page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function wp_get_options_connectors_wp_admin_menu_items() {
|
||||
global $wp_options_connectors_wp_admin_menu_items;
|
||||
return $wp_options_connectors_wp_admin_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the options-connectors-wp-admin page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function wp_options_connectors_wp_admin_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles for the options-connectors-wp-admin page.
|
||||
* Hooked to admin_enqueue_scripts.
|
||||
*
|
||||
* @param string $hook_suffix The current admin page.
|
||||
*/
|
||||
function wp_options_connectors_wp_admin_enqueue_scripts( $hook_suffix ) {
|
||||
// Check all possible ways this page can be accessed:
|
||||
// 1. Menu page via admin.php?page=options-connectors-wp-admin (plugin)
|
||||
// 2. Direct file via options-connectors.php (Core) - screen ID will be 'options-connectors'
|
||||
$current_screen = get_current_screen();
|
||||
$is_our_page = (
|
||||
( isset( $_GET['page'] ) && 'options-connectors-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
( $current_screen && 'options-connectors' === $current_screen->id )
|
||||
);
|
||||
|
||||
if ( ! $is_our_page ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
// Fire init action for extensions to register routes and menu items
|
||||
do_action( 'options-connectors-wp-admin_init' );
|
||||
|
||||
// Preload REST API data
|
||||
wp_options_connectors_wp_admin_preload_data();
|
||||
|
||||
// Get all registered routes
|
||||
$routes = wp_get_options_connectors_wp_admin_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'options-connectors-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
/*
|
||||
* Add inline script to initialize the app using initSinglePage (no menuItems).
|
||||
* The dynamic import is deferred until DOMContentLoaded so that all classic
|
||||
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
|
||||
* wp-theme, etc.) have finished parsing and executing before the boot module
|
||||
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
|
||||
* against the classic-script-printing pass on fast CDN-fronted hosts in
|
||||
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
|
||||
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
|
||||
*/
|
||||
$init_js_function = <<<'JS'
|
||||
( mountId, routes ) => {
|
||||
const run = async () => {
|
||||
const mod = await import( "@wordpress/boot" );
|
||||
mod.initSinglePage( { mountId, routes } );
|
||||
};
|
||||
if ( document.readyState === "loading" ) {
|
||||
document.addEventListener( "DOMContentLoaded", run );
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
}
|
||||
JS;
|
||||
wp_add_inline_script(
|
||||
'options-connectors-wp-admin-prerequisites',
|
||||
sprintf(
|
||||
'( %s )( %s, %s );',
|
||||
$init_js_function,
|
||||
wp_json_encode( 'options-connectors-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'options-connectors-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for options-connectors-wp-admin module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'options-connectors-wp-admin',
|
||||
$build_constants['build_url'] . 'pages/options-connectors/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'options-connectors-wp-admin-prerequisites' );
|
||||
wp_enqueue_script_module( 'options-connectors-wp-admin' );
|
||||
wp_enqueue_style( 'options-connectors-wp-admin-prerequisites' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the options-connectors-wp-admin page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
* This renders within the normal WordPress admin interface.
|
||||
*/
|
||||
function wp_options_connectors_wp_admin_render_page() {
|
||||
?>
|
||||
<style>
|
||||
/* Critical styles to prevent layout shifts - inlined for immediate application */
|
||||
|
||||
/* Background colors */
|
||||
#wpwrap {
|
||||
background: var(--wpds-color-fg-content-neutral, #1e1e1e);
|
||||
overflow-y: auto;
|
||||
}
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Reset wp-admin padding */
|
||||
#wpcontent {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
#wpbody-content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* Hide legacy admin elements */
|
||||
#wpbody-content > div:not(.boot-layout-container):not(#screen-meta) {
|
||||
display: none;
|
||||
}
|
||||
#wpfooter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Accessibility regions */
|
||||
.a11y-speak-region {
|
||||
inset-inline-start: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
/* Admin menu indicators */
|
||||
ul#adminmenu a.wp-has-current-submenu::after,
|
||||
ul#adminmenu > li.current > a.current::after {
|
||||
border-inline-end-color: #fff;
|
||||
}
|
||||
|
||||
/* Media frame fix */
|
||||
.media-frame select.attachment-filters:last-of-type {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Responsive overflow fix for #wpwrap */
|
||||
@media (min-width: 782px) {
|
||||
#wpwrap {
|
||||
overflow-y: initial;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="options-connectors-wp-admin-app" class="boot-layout-container"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Hook the enqueue function to admin_enqueue_scripts
|
||||
add_action( 'admin_enqueue_scripts', 'wp_options_connectors_wp_admin_enqueue_scripts' );
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: options-connectors
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
// Global storage for options-connectors routes and menu items
|
||||
global $wp_options_connectors_routes, $wp_options_connectors_menu_items;
|
||||
$wp_options_connectors_routes = array();
|
||||
$wp_options_connectors_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the options-connectors page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function wp_register_options_connectors_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $wp_options_connectors_routes;
|
||||
|
||||
$route = array( 'path' => $path );
|
||||
if ( ! empty( $content_module ) ) {
|
||||
$route['content_module'] = $content_module;
|
||||
}
|
||||
if ( ! empty( $route_module ) ) {
|
||||
$route['route_module'] = $route_module;
|
||||
}
|
||||
|
||||
$wp_options_connectors_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the options-connectors page.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
* @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'.
|
||||
*/
|
||||
function wp_register_options_connectors_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
|
||||
global $wp_options_connectors_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) {
|
||||
$menu_item['parent_type'] = $parent_type;
|
||||
}
|
||||
|
||||
$wp_options_connectors_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the options-connectors page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function wp_get_options_connectors_routes() {
|
||||
global $wp_options_connectors_routes;
|
||||
return $wp_options_connectors_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the options-connectors page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function wp_get_options_connectors_menu_items() {
|
||||
global $wp_options_connectors_menu_items;
|
||||
return $wp_options_connectors_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the options-connectors page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function wp_options_connectors_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,image_output_formats,jpeg_interlaced,png_interlaced,gif_interlaced,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the options-connectors page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
*/
|
||||
function wp_options_connectors_render_page() {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
// Set current screen
|
||||
set_current_screen();
|
||||
|
||||
// Remove unwanted deprecated handler
|
||||
remove_action( 'admin_head', 'wp_admin_bar_header' );
|
||||
|
||||
// Remove unwanted scripts and styles that were enqueued during `admin_init`
|
||||
foreach ( wp_scripts()->queue as $script ) {
|
||||
wp_dequeue_script( $script );
|
||||
}
|
||||
foreach ( wp_styles()->queue as $style ) {
|
||||
wp_dequeue_style( $style );
|
||||
}
|
||||
|
||||
// Fire init action for extensions to register routes and menu items
|
||||
do_action( 'options-connectors_init' );
|
||||
|
||||
// Enqueue command palette assets for boot-based pages
|
||||
if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) {
|
||||
wp_enqueue_command_palette_assets();
|
||||
}
|
||||
|
||||
// Preload REST API data
|
||||
wp_options_connectors_preload_data();
|
||||
|
||||
// Get all registered routes and menu items
|
||||
$menu_items = wp_get_options_connectors_menu_items();
|
||||
$routes = wp_get_options_connectors_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = ABSPATH . WPINC . '/js/dist/script-modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'options-connectors-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
// Add inline script to initialize the app
|
||||
$init_modules = [];
|
||||
wp_add_inline_script(
|
||||
'options-connectors-prerequisites',
|
||||
sprintf(
|
||||
'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));',
|
||||
'options-connectors-app',
|
||||
wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
esc_url( admin_url( '/' ) )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'options-connectors-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for options-connectors module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add init modules as static dependencies
|
||||
// No init modules configured
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'options-connectors',
|
||||
$build_constants['build_url'] . 'pages/options-connectors/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'options-connectors-prerequisites' );
|
||||
wp_enqueue_script_module( 'options-connectors' );
|
||||
wp_enqueue_style( 'options-connectors-prerequisites' );
|
||||
}
|
||||
|
||||
// Output the HTML
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php echo esc_html( get_admin_page_title() ); ?></title>
|
||||
<style>
|
||||
html {
|
||||
background: #f1f1f1;
|
||||
color: #444;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#wpadminbar { display: none; }
|
||||
</style>
|
||||
<?php
|
||||
global $hook_suffix;
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$hook_suffix = 'options-connectors';
|
||||
|
||||
// BEGIN see wp-admin/admin-header.php
|
||||
print_admin_styles();
|
||||
print_head_scripts();
|
||||
|
||||
/**
|
||||
* Fires in head section for a specific admin page.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
/**
|
||||
* Fires in head section for all admin pages.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
do_action( 'admin_head' );
|
||||
// END see wp-admin/admin-header.php
|
||||
?>
|
||||
</head>
|
||||
<body class="options-connectors">
|
||||
<div id="options-connectors-app" style="height: 100vh; box-sizing: border-box;"></div>
|
||||
<?php
|
||||
// BEGIN see wp-admin/admin-footer.php
|
||||
|
||||
/**
|
||||
* Prints scripts or data before the default footer scripts.
|
||||
*
|
||||
* @since 1.2.0
|
||||
*/
|
||||
do_action( 'admin_footer', '' );
|
||||
|
||||
// Print import map first so it's available for inline scripts
|
||||
wp_script_modules()->print_import_map();
|
||||
print_footer_scripts();
|
||||
wp_script_modules()->print_enqueued_script_modules();
|
||||
wp_script_modules()->print_script_module_preloads();
|
||||
wp_script_modules()->print_script_module_data();
|
||||
|
||||
/**
|
||||
* Prints scripts or data after the default footer scripts.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*/
|
||||
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
// END see wp-admin/admin-footer.php
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intercept admin_init to render the page early.
|
||||
* This bypasses the default WordPress admin template.
|
||||
*/
|
||||
function wp_options_connectors_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'options-connectors' === $_GET['page'] ) {
|
||||
wp_options_connectors_render_page();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Hook the interceptor to admin_init
|
||||
add_action( 'admin_init', 'wp_options_connectors_intercept_render' );
|
||||
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
* Routes registration - Auto-generated by build process.
|
||||
* Registers all routes on their respective page init hooks.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
// Load routes registry
|
||||
$routes_file = __DIR__ . '/routes/registry.php';
|
||||
if ( ! file_exists( $routes_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$routes = require $routes_file;
|
||||
|
||||
// Group routes by page and store in globals for page-specific functions
|
||||
$routes_by_page = array();
|
||||
foreach ( $routes as $route ) {
|
||||
$page_slug = $route['page'];
|
||||
if ( ! isset( $routes_by_page[ $page_slug ] ) ) {
|
||||
$routes_by_page[ $page_slug ] = array();
|
||||
}
|
||||
$routes_by_page[ $page_slug ][] = $route;
|
||||
}
|
||||
|
||||
// Store routes data in globals for each page
|
||||
foreach ( $routes_by_page as $page_slug => $page_routes ) {
|
||||
$page_slug_underscore = str_replace( '-', '_', $page_slug );
|
||||
$global_name = 'wp_' . $page_slug_underscore . '_routes_data';
|
||||
$GLOBALS[ $global_name ] = $page_routes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic helper function to register routes for a page.
|
||||
*
|
||||
* @param array $page_routes Array of route data for the page.
|
||||
* @param string $register_function_name Name of the function to call for registering each route.
|
||||
*/
|
||||
function wp_register_page_routes( $page_routes, $register_function_name ) {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/constants.php';
|
||||
|
||||
foreach ( $page_routes as $route ) {
|
||||
$content_handle = null;
|
||||
$route_handle = null;
|
||||
|
||||
// Register content module if exists
|
||||
if ( $route['has_content'] ) {
|
||||
$content_asset_path = __DIR__ . "/routes/{$route['name']}/content.min.asset.php";
|
||||
if ( file_exists( $content_asset_path ) ) {
|
||||
$content_asset = require $content_asset_path;
|
||||
$content_handle = 'wp/routes/' . $route['name'] . '/content';
|
||||
$extension = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.js' : '.min.js';
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $content_handle );
|
||||
wp_register_script_module(
|
||||
$content_handle,
|
||||
$build_constants['build_url'] . 'routes/' . $route['name'] . '/content' . $extension,
|
||||
$content_asset['module_dependencies'] ?? array(),
|
||||
$content_asset['version'] ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Register route module if exists
|
||||
if ( $route['has_route'] ) {
|
||||
$route_asset_path = __DIR__ . "/routes/{$route['name']}/route.min.asset.php";
|
||||
if ( file_exists( $route_asset_path ) ) {
|
||||
$route_asset = require $route_asset_path;
|
||||
$route_handle = 'wp/routes/' . $route['name'] . '/route';
|
||||
$extension = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.js' : '.min.js';
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $route_handle );
|
||||
wp_register_script_module(
|
||||
$route_handle,
|
||||
$build_constants['build_url'] . 'routes/' . $route['name'] . '/route' . $extension,
|
||||
$route_asset['module_dependencies'] ?? array(),
|
||||
$route_asset['version'] ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Register route with page
|
||||
if ( function_exists( $register_function_name ) ) {
|
||||
call_user_func( $register_function_name, $route['path'], $content_handle, $route_handle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Page-specific route registration functions
|
||||
// Page-specific route registration functions for options-connectors
|
||||
/**
|
||||
* Register routes for options-connectors page (full-page mode).
|
||||
*/
|
||||
function wp_register_options_connectors_page_routes() {
|
||||
global $wp_options_connectors_routes_data;
|
||||
wp_register_page_routes( $wp_options_connectors_routes_data, 'wp_register_options_connectors_route' );
|
||||
}
|
||||
add_action( 'options-connectors_init', 'wp_register_options_connectors_page_routes' );
|
||||
|
||||
/**
|
||||
* Register routes for options-connectors page (wp-admin mode).
|
||||
*/
|
||||
function wp_register_options_connectors_wp_admin_page_routes() {
|
||||
global $wp_options_connectors_routes_data;
|
||||
wp_register_page_routes( $wp_options_connectors_routes_data, 'wp_register_options_connectors_wp_admin_route' );
|
||||
}
|
||||
add_action( 'options-connectors-wp-admin_init', 'wp_register_options_connectors_wp_admin_page_routes' );
|
||||
|
||||
// Page-specific route registration functions for font-library
|
||||
/**
|
||||
* Register routes for font-library page (full-page mode).
|
||||
*/
|
||||
function wp_register_font_library_page_routes() {
|
||||
global $wp_font_library_routes_data;
|
||||
wp_register_page_routes( $wp_font_library_routes_data, 'wp_register_font_library_route' );
|
||||
}
|
||||
add_action( 'font-library_init', 'wp_register_font_library_page_routes' );
|
||||
|
||||
/**
|
||||
* Register routes for font-library page (wp-admin mode).
|
||||
*/
|
||||
function wp_register_font_library_wp_admin_page_routes() {
|
||||
global $wp_font_library_routes_data;
|
||||
wp_register_page_routes( $wp_font_library_routes_data, 'wp_register_font_library_wp_admin_route' );
|
||||
}
|
||||
add_action( 'font-library-wp-admin_init', 'wp_register_font_library_wp_admin_page_routes' );
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/connectors', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'b614fcaf0d408b3eff9d');
|
||||
@@ -0,0 +1 @@
|
||||
var pa=Object.create;var Ae=Object.defineProperty;var ma=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var wa=Object.getPrototypeOf,ha=Object.prototype.hasOwnProperty;var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),va=(e,t)=>{for(var a in t)Ae(e,a,{get:t[a],enumerable:!0})},xa=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ga(t))!ha.call(e,r)&&r!==a&&Ae(e,r,{get:()=>t[r],enumerable:!(o=ma(t,r))||o.enumerable});return e};var i=(e,t,a)=>(a=e!=null?pa(wa(e)):{},xa(t||!e||!e.__esModule?Ae(a,"default",{value:e,enumerable:!0}):a,e));var te=y((go,qe)=>{qe.exports=window.wp.i18n});var ae=y((wo,Ue)=>{Ue.exports=window.wp.components});var A=y((ho,Qe)=>{Qe.exports=window.ReactJSXRuntime});var x=y((xo,$e)=>{$e.exports=window.wp.element});var G=y((Ao,rt)=>{rt.exports=window.React});var Z=y((ar,yt)=>{yt.exports=window.wp.primitives});var Bt=y((gr,Nt)=>{Nt.exports=window.wp.privateApis});var le=y((as,jt)=>{jt.exports=window.wp.data});var xe=y((os,Yt)=>{Yt.exports=window.wp.coreData});var Ve=y((rs,Rt)=>{Rt.exports=window.wp.notices});var Vt=y((ss,Wt)=>{Wt.exports=window.wp.url});function Je(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=Je(e[t]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function ba(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=Je(e))&&(o&&(o+=" "),o+=t);return o}var v=ba;var et=i(x(),1),tt=i(A(),1),at=(0,et.forwardRef)(({children:e,className:t,ariaLabel:a,as:o="div",...r},s)=>(0,tt.jsx)(o,{ref:s,className:v("admin-ui-navigable-region",t),"aria-label":a,role:"region",tabIndex:"-1",...r,children:e}));at.displayName="NavigableRegion";var ot=at;var it=i(G(),1),st={};function Pe(e,t){let a=it.useRef(st);return a.current===st&&(a.current=e(t)),a}function Le(e,...t){let a=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>a.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${a} for the full message.`}var me=i(G(),1);function Ne(e,t,a,o){let r=Pe(lt).current;return ya(r,e,t,a,o)&&ft(r,[e,t,a,o]),r.callback}function nt(e){let t=Pe(lt).current;return Aa(t,e)&&ft(t,e),t.callback}function lt(){return{callback:null,cleanup:null,refs:[]}}function ya(e,t,a,o,r){return e.refs[0]!==t||e.refs[1]!==a||e.refs[2]!==o||e.refs[3]!==r}function Aa(e,t){return e.refs.length!==t.length||e.refs.some((a,o)=>a!==t[o])}function ft(e,t){if(e.refs=t,t.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){let o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){let s=t[r];if(s!=null)switch(typeof s){case"function":{let l=s(a);typeof l=="function"&&(o[r]=l);break}case"object":{s.current=a;break}default:}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){let s=t[r];if(s!=null)switch(typeof s){case"function":{let l=o[r];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}default:}}}}}}var ct=i(G(),1);var dt=i(G(),1),Pa=parseInt(dt.version,10);function ut(e){return Pa>=e}function Be(e){if(!ct.isValidElement(e))return null;let t=e,a=t.props;return(ut(19)?a?.ref:t.ref)??null}function oe(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function pt(e,t){let a={};for(let o in e){let r=e[o];if(t?.hasOwnProperty(o)){let s=t[o](r);s!=null&&Object.assign(a,s);continue}r===!0?a[`data-${o.toLowerCase()}`]="":r&&(a[`data-${o.toLowerCase()}`]=r.toString())}return a}function mt(e,t){return typeof e=="function"?e(t):e}function gt(e,t){return typeof e=="function"?e(t):e}var se={};function N(e,t,a,o,r){let s={...Ce(e,se)};return t&&(s=re(s,t)),a&&(s=re(s,a)),o&&(s=re(s,o)),r&&(s=re(s,r)),s}function wt(e){if(e.length===0)return se;if(e.length===1)return Ce(e[0],se);let t={...Ce(e[0],se)};for(let a=1;a<e.length;a+=1)t=re(t,e[a]);return t}function re(e,t){return ht(t)?t(e):La(e,t)}function La(e,t){if(!t)return e;for(let a in t){let o=t[a];switch(a){case"style":{e[a]=oe(e.style,o);break}case"className":{e[a]=He(e.className,o);break}default:Na(a,o)?e[a]=Ba(e[a],o):e[a]=o}}return e}function Na(e,t){let a=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return a===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function ht(e){return typeof e=="function"}function Ce(e,t){return ht(e)?e(t):e??se}function Ba(e,t){return t?e?a=>{if(Ha(a)){let r=a;Ca(r);let s=t(r);return r.baseUIHandlerPrevented||e?.(r),s}let o=t(a);return e?.(a),o}:t:e}function Ca(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function He(e,t){return t?e?t+" "+e:t:e}function Ha(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Oa=Object.freeze([]),I=Object.freeze({});var Oe=i(G(),1);function vt(e,t,a={}){let o=t.render,r=Da(t,a);if(a.enabled===!1)return null;let s=a.state??I;return Ta(e,o,r,s)}function Da(e,t={}){let{className:a,style:o,render:r}=e,{state:s=I,ref:l,props:f,stateAttributesMapping:c,enabled:d=!0}=t,Line truncated
|
||||
@@ -0,0 +1,63 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
|
||||
// package-external:@wordpress/core-data
|
||||
var require_core_data = __commonJS({
|
||||
"package-external:@wordpress/core-data"(exports, module) {
|
||||
module.exports = window.wp.coreData;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/data
|
||||
var require_data = __commonJS({
|
||||
"package-external:@wordpress/data"(exports, module) {
|
||||
module.exports = window.wp.data;
|
||||
}
|
||||
});
|
||||
|
||||
// package-external:@wordpress/i18n
|
||||
var require_i18n = __commonJS({
|
||||
"package-external:@wordpress/i18n"(exports, module) {
|
||||
module.exports = window.wp.i18n;
|
||||
}
|
||||
});
|
||||
|
||||
// routes/connectors-home/route.ts
|
||||
var import_core_data = __toESM(require_core_data());
|
||||
var import_data = __toESM(require_data());
|
||||
var import_i18n = __toESM(require_i18n());
|
||||
var route = {
|
||||
title: () => (0, import_i18n.__)("Connectors"),
|
||||
loader: async () => {
|
||||
await (0, import_data.resolveSelect)(import_core_data.store).canUser("create", {
|
||||
kind: "root",
|
||||
name: "plugin"
|
||||
});
|
||||
}
|
||||
};
|
||||
export {
|
||||
route
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-core-data', 'wp-data', 'wp-i18n'), 'version' => 'f3b33cd01621a8692a0f');
|
||||
@@ -0,0 +1 @@
|
||||
var S=Object.create;var p=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var a=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var y=(r,o,e,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of g(o))!v.call(r,t)&&t!==e&&p(r,t,{get:()=>o[t],enumerable:!(i=_(o,t))||i.enumerable});return r};var n=(r,o,e)=>(e=r!=null?S(k(r)):{},y(o||!r||!r.__esModule?p(e,"default",{value:r,enumerable:!0}):e,r));var w=a((D,s)=>{s.exports=window.wp.coreData});var m=a((U,c)=>{c.exports=window.wp.data});var l=a((b,d)=>{d.exports=window.wp.i18n});var x=n(w()),f=n(m()),u=n(l()),h={title:()=>(0,u.__)("Connectors"),loader:async()=>{await(0,f.resolveSelect)(x.store).canUser("create",{kind:"root",name:"plugin"})}};export{h as route};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-style-engine', 'wp-theme'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'f4a76b3cfc58409a8d9c');
|
||||
@@ -0,0 +1,19 @@
|
||||
var Xu=Object.create;var ra=Object.defineProperty;var Ku=Object.getOwnPropertyDescriptor;var Ju=Object.getOwnPropertyNames;var Qu=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty;var ue=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var tf=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ju(e))!$u.call(t,s)&&s!==r&&ra(t,s,{get:()=>e[s],enumerable:!(o=Ku(e,s))||o.enumerable});return t};var u=(t,e,r)=>(r=t!=null?Xu(Qu(t)):{},tf(e||!t||!t.__esModule?ra(r,"default",{value:t,enumerable:!0}):r,t));var ut=Ht((Jg,oa)=>{oa.exports=window.wp.i18n});var X=Ht((Qg,sa)=>{sa.exports=window.wp.components});var z=Ht(($g,na)=>{na.exports=window.ReactJSXRuntime});var yt=Ht((ey,ia)=>{ia.exports=window.wp.element});var _r=Ht((sy,da)=>{da.exports=window.React});var Pr=Ht((Iy,_a)=>{_a.exports=window.wp.primitives});var Vs=Ht((Xy,Pa)=>{Pa.exports=window.wp.privateApis});var cr=Ht((Ky,Aa)=>{Aa.exports=window.wp.compose});var Na=Ht((dv,Va)=>{Va.exports=window.wp.editor});var be=Ht((mv,za)=>{za.exports=window.wp.coreData});var fe=Ht((pv,Ma)=>{Ma.exports=window.wp.data});var Rr=Ht((hv,Ga)=>{Ga.exports=window.wp.blocks});var ce=Ht((gv,ja)=>{ja.exports=window.wp.blockEditor});var Ha=Ht((xv,Ua)=>{Ua.exports=window.wp.styleEngine});var Xa=Ht((Lv,Za)=>{"use strict";Za.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,s,a;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;for(s of e.entries())if(!t(s[1],r.get(s[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),o=a.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=o;s--!==0;){var n=a[s];if(!t(e[n],r[n]))return!1}return!0}return e!==e&&r!==r}});var $a=Ht((Dv,Qa)=>{"use strict";var Pf=function(e){return Af(e)&&!Rf(e)};function Af(t){return!!t&&typeof t=="object"}function Rf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Lf(t)}var Ef=typeof Symbol=="function"&&Symbol.for,If=Ef?Symbol.for("react.element"):60103;function Lf(t){return t.$$typeof===If}function Bf(t){return Array.isArray(t)?[]:{}}function so(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Ir(Bf(t),t,e):t}function Df(t,e,r){return t.concat(e).map(function(o){return so(o,r)})}function Vf(t,e){if(!e.customMerge)return Ir;var r=e.customMerge(t);return typeof r=="function"?r:Ir}function Nf(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Ka(t){return Object.keys(t).concat(Nf(t))}function Ja(t,e){try{return e in t}catch{return!1}}function zf(t,e){return Ja(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Mf(t,e,r){var o={};return r.isMergeableObject(t)&&Ka(t).forEach(function(s){o[s]=so(t[s],r)}),Ka(e).forEach(function(s){zf(t,s)||(Ja(t,s)&&r.isMergeableObject(e[s])?o[s]=Vf(s,r)(t[s],e[s],r):o[s]=so(e[s],r))}),o}function Ir(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Df,r.isMergeableObject=r.isMergeableObject||Pf,r.cloneUnlessOtherwiseSpecified=so;var o=Array.isArray(e),s=Array.isArray(t),a=o===s;return a?o?r.arrayMerge(t,e,r):Mf(t,e,r):so(e,r)}Ir.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(o,s){return Ir(o,s,r)},{})};var Gf=Ir;Qa.exports=Gf});var dn=Ht((H0,Ki)=>{Ki.exports=window.wp.keycodes});var el=Ht((eb,tl)=>{tl.exports=window.wp.apiFetch});var _u=Ht((FF,Tu)=>{Tu.exports=window.wp.date});function aa(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=aa(t[e]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function ef(){for(var t,e,r=0,o="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=aa(t))&&(o&&(o+=" "),o+=e);return o}var ve=ef;var la=u(yt(),1),ua=u(z(),1),fa=(0,la.forwardRef)(({children:t,className:e,ariaLabel:r,as:o="div",...s},a)=>(0,ua.jsx)(o,{ref:a,className:ve("admin-ui-navigaLine truncated
|
||||
`),new y("",c,""),new y("",l,"]"),new y("",l," for "),new y("",Y,""),new y("",f,""),new y("",l," a "),new y("",l," that "),new y(" ",k,""),new y("",l,". "),new y(".",l,""),new y(" ",l,", "),new y("",I,""),new y("",l," with "),new y("",l,"'"),new y("",l," from "),new y("",l," by "),new y("",V,""),new y("",H,""),new y(" the ",l,""),new y("",d,""),new y("",l,". The "),new y("",x,""),new y("",l," on "),new y("",l," as "),new y("",l," is "),new y("",v,""),new y("",m,"ing "),new y("",l,`
|
||||
`),new y("",l,":"),new y(" ",l,". "),new y("",l,"ed "),new y("",W,""),new y("",$,""),new y("",h,""),new y("",l,"("),new y("",k,", "),new y("",_,""),new y("",l," at "),new y("",l,"ly "),new y(" the ",l," of "),new y("",g,""),new y("",A,""),new y(" ",k,", "),new y("",k,'"'),new y(".",l,"("),new y("",x," "),new y("",k,'">'),new y("",l,'="'),new y(" ",l,"."),new y(".com/",l,""),new y(" the ",l," of the "),new y("",k,"'"),new y("",l,". This "),new y("",l,","),new y(".",l," "),new y("",k,"("),new y("",k,"."),new y("",l," not "),new y(" ",l,'="'),new y("",l,"er "),new y(" ",x," "),new y("",l,"al "),new y(" ",x,""),new y("",l,"='"),new y("",x,'"'),new y("",k,". "),new y(" ",l,"("),new y("",l,"ful "),new y(" ",k,". "),new y("",l,"ive "),new y("",l,"less "),new y("",x,"'"),new y("",l,"est "),new y(" ",k,"."),new y("",x,'">'),new y(" ",l,"='"),new y("",k,","),new y("",l,"ize "),new y("",x,"."),new y("\xC2\xA0",l,""),new y(" ",l,","),new y("",k,'="'),new y("",x,'="'),new y("",l,"ous "),new y("",x,", "),new y("",k,"='"),new y(" ",k,","),new y(" ",x,'="'),new y(" ",x,", "),new y("",x,","),new y("",x,"("),new y("",x,". "),new y(" ",x,"."),new y("",x,"='"),new y(" ",x,". "),new y(" ",k,'="'),new y(" ",x,"='"),new y(" ",k,"='")];a.kTransforms=L,a.kNumTransforms=L.length;function it(ot,K){return ot[K]<192?(ot[K]>=97&&ot[K]<=122&&(ot[K]^=32),1):ot[K]<224?(ot[K+1]^=32,2):(ot[K+2]^=5,3)}a.transformDictionaryWord=function(ot,K,gt,R,S){var E=L[S].prefix,et=L[S].suffix,ct=L[S].transform,at=ct<b?0:ct-(b-1),Ct=0,Wt=K,Ot;at>R&&(at=R);for(var J=0;J<E.length;)ot[K++]=E[J++];for(gt+=at,R-=at,ct<=A&&(R-=ct),Ct=0;Ct<R;Ct++)ot[K++]=n.dictionary[gt+Ct];if(Ot=K-R,ct===k)it(ot,Ot);else if(ct===x)for(;R>0;){var St=it(ot,Ot);Ot+=St,R-=St}for(var At=0;At<et.length;)ot[K++]=et[At++];return K-Wt}},{"./dictionary":6}],12:[function(o,s,a){s.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var os=(t=>typeof ue<"u"?ue:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ue<"u"?ue:e)[r]}):t)(function(t){if(typeof ue<"u")return ue.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Rl=(function(){var t,e,r;return(function(){function o(s,a,n){function l(c,d){if(!a[c]){if(!s[c]){var g=typeof os=="function"&&os;if(!d&&g)return g(c,!0);if(m)return m(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var v=a[c]={exports:{}};s[c][0].call(v.exports,function(_){var A=s[c][1][_];return l(A||_)},v,v.exports,o,s,a,n)}return a[c].exports}for(var m=typeof os=="function"&&os,f=0;f<n.length;f++)l(n[f]);return l}return o})()({1:[function(o,s,a){"use strict";var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function l(c,d){return Object.prototype.hasOwnProperty.call(c,d)}a.assign=function(c){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var g=d.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var h in g)l(g,h)&&(c[h]=g[h])}}return c},a.shrinkBuf=function(c,d){return c.length===d?c:c.subarray?c.subarray(0,d):(c.length=d,c)};var m={arraySet:function(c,d,g,h,v){if(d.subarray&&c.subarray){c.set(d.subarray(g,g+h),v);return}for(var _=0;_<h;_++)c[v+_]=d[g+_]},flattenChunks:function(c){var d,g,h,v,_,A;for(h=0,d=0,g=c.length;d<g;d++)h+=c[d].length;for(A=new Uint8Array(h),v=0,d=0,g=c.length;d<g;d++)_=c[d],A.set(_,v),v+=_.length;return A}},f={arraySet:function(c,d,g,h,v){for(var _=0;_<h;_++)c[v+_]=d[g+_]},flattenChunks:function(c){return[].concat.apply([],c)}};a.setTyped=function(c){c?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,m)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,f))},a.setTyped(n)},{}],2:[function(o,s,a){"use strict";var n=o("./common"),l=!0,m=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{m=!1}for(var f=new n.Buf8(256),c=0;c<256;c++)f[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;f[254]=f[254]=1,a.string2buf=function(g){var h,v,_,A,k,x=g.length,b=0;for(A=0;A<x;A++)v=g.charCodeAt(A),(v&64512)===55296&&A+1<x&&(_=g.charCodeAt(A+1),(_&64512)===56320&&(v=65536+(v-55296<<10)+(_-56320),A++)),b+=v<128?1:v<2048?2:v<65536?3:4;for(h=new n.Buf8(b),k=0,A=0;k<b;A++)v=g.charCodeAt(A),(v&64512)===55296&&A+1<x&&(_=g.charCodeAt(A+1),(_&64512)===56320&&(v=65536+(v-55296<<10)+(_-56320),A++)),v<128?h[k++]=v:v<2048?(h[k++]=192|v>>>6,h[k++]=128|v&63):v<65536?(h[k++]=224|v>>>12,h[k++]=128|v>>>6&63,h[k++]=128|v&63):(h[k++]=240|v>>>18,h[k++]=128|v>>>12&63,h[k++]=128|v>>>6&63,h[k++]=128|v&63);return h};function d(g,h){if(h<65534&&(g.subarray&&m||!g.subarray&&l))return String.fromCharCode.apply(null,n.shrinkBuf(g,h));for(var v="",_=0;_<h;_++)v+=String.fromCharCode(g[_]);return v}a.buf2binstring=function(g){return d(g,g.length)},a.binstring2buf=function(g){for(var h=new n.Buf8(g.length),v=0,_=h.length;v<_;v++)h[v]=g.charCodeAt(v);return h},a.buf2string=function(g,h){var v,_,A,k,x=h||g.length,b=new Array(x*2);for(_=0,v
Line truncated
|
||||
@font-face {
|
||||
font-family: "${t}";
|
||||
${a.join(`
|
||||
`)}
|
||||
src: url("${e}") format("${o}");
|
||||
}`,globalThis.document.head.appendChild(s),s}var md=[0,1,0,0],pd=[79,84,84,79],hd=[119,79,70,70],gd=[119,79,70,50];function ns(t,e){if(t.length===e.length){for(let r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function yd(t){let e=[t.getUint8(0),t.getUint8(1),t.getUint8(2),t.getUint8(3)];if(ns(e,md)||ns(e,pd))return"SFNT";if(ns(e,hd))return"WOFF";if(ns(e,gd))return"WOFF2"}function vd(t){if(!t.ok)throw new Error(`HTTP ${t.status} - ${t.statusText}`);return t}var is=class extends Kc{constructor(t,e={}){super(),this.name=t,this.options=e,this.metrics=!1}get src(){return this.__src}set src(t){this.__src=t,(async()=>(globalThis.document&&!this.options.skipStyleSheet&&await dd(this.name,t,this.options),this.loadFont(t)))()}async loadFont(t,e){fetch(t).then(r=>vd(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,e||t)).catch(r=>{let o=new ss("error",r,`Failed to load font at ${e||t}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(t,e){this.fontData=new DataView(t);let r=yd(this.fontData);if(!r)throw new Error(`${e} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new ss("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(t){return fd().then(e=>(t==="SFNT"&&(this.opentype=new td(this,this.fontData,e)),t==="WOFF"&&(this.opentype=new rd(this,this.fontData,e)),t==="WOFF2"&&(this.opentype=new nd(this,this.fontData,e)),this.opentype))}getGlyphId(t){return this.opentype.tables.cmap.getGlyphId(t)}reverse(t){return this.opentype.tables.cmap.reverse(t)}supports(t){return this.getGlyphId(t)!==0}supportsVariation(t){return this.opentype.tables.cmap.supportsVariation(t)!==!1}measureText(t,e=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=t,r.style.fontFamily=this.name,r.style.fontSize=`${e}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let s=this.opentype.tables["OS/2"];return o.fontSize=e,o.ascender=s.sTypoAscender,o.descender=s.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let t=new ss("unload",{font:this});this.dispatch(t),this.onunload&&this.onunload(t)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let t=new ss("load",{font:this});this.dispatch(t),this.onload&&this.onload(t)}}};globalThis.Font=is;var We=class extends Bt{constructor(t,e,r){super(t),this.plaformID=e,this.encodingID=r}},bd=class extends We{constructor(t,e,r){super(t,e,r),this.format=0,this.length=t.uint16,this.language=t.uint16,this.glyphIdArray=[...new Array(256)].map(o=>t.uint8)}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=t&&t<=255}reverse(t){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},wd=class extends We{constructor(t,e,r){super(t,e,r),this.format=2,this.length=t.uint16,this.language=t.uint16,this.subHeaderKeys=[...new Array(256)].map(n=>t.uint16);let o=Math.max(...this.subHeaderKeys),s=t.currentPosition;Z(this,"subHeaders",()=>(t.currentPosition=s,[...new Array(o)].map(n=>new Sd(t))));let a=s+o*8;Z(this,"glyphIndexArray",()=>(t.currentPosition=a,[...new Array(o)].map(n=>t.uint16)))}supports(t){t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let e=t&&255,r=t&&65280,o=this.subHeaders[r],s=this.subHeaders[o],a=s.firstCode,n=a+s.entryCount;return a<=e&&e<=n}reverse(t){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(t=!1){return t?this.subHeaders.map(e=>({firstCode:e.firstCode,lastCode:e.lastCode})):this.subHeaders.map(e=>({start:e.firstCode,end:e.lastCode}))}},Sd=class{constructor(t){this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=t.int16,this.idRangeOffset=t.uint16}},xd=class extends We{constructor(t,e,r){super(t,e,r),this.format=4,this.length=t.uint16,this.language=t.uint16,this.segCountX2=t.uint16,this.segCount=this.segCountX2/2,this.searchRange=t.uint16,this.entrySelector=t.uint16,this.rangeShift=t.uint16;let o=t.currentPosition;Z(this,"endCode",()=>t.readBytes(this.segCount,o,16));let s=o+2+this.segCountX2;Z(this,"startCode",()=>t.readBytes(this.segCount,s,16));let a=s+this.segCountX2;Z(this,"idDelta",()=>t.readBytes(this.segCount,a,16,!0));let n=a+this.segCountX2;Z(this,"idRangeOffset",()=>t.readBytes(this.segCount,n,16));let l=n+this.segCountX2,m=this.length-(l-this.tableStart);Z(this,"glyphIdArray",()=>t.readBytes(m,l,16)),Z(th
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
is-plain-object/dist/is-plain-object.mjs:
|
||||
(*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*)
|
||||
*/
|
||||
@@ -0,0 +1,41 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
|
||||
// package-external:@wordpress/i18n
|
||||
var require_i18n = __commonJS({
|
||||
"package-external:@wordpress/i18n"(exports, module) {
|
||||
module.exports = window.wp.i18n;
|
||||
}
|
||||
});
|
||||
|
||||
// routes/font-list/route.ts
|
||||
var import_i18n = __toESM(require_i18n());
|
||||
var route = {
|
||||
title: () => (0, import_i18n.__)("Fonts")
|
||||
};
|
||||
export {
|
||||
route
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-i18n'), 'version' => '5bf837c01b0b1bb1bc6f');
|
||||
@@ -0,0 +1 @@
|
||||
var m=Object.create;var n=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var f=(t,o)=>()=>(o||t((o={exports:{}}).exports,o),o.exports);var l=(t,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of _(o))!d.call(t,e)&&e!==r&&n(t,e,{get:()=>o[e],enumerable:!(i=x(o,e))||i.enumerable});return t};var u=(t,o,r)=>(r=t!=null?m(c(t)):{},l(o||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t));var s=f((a,p)=>{p.exports=window.wp.i18n});var w=u(s()),b={title:()=>(0,w.__)("Fonts")};export{b as route};
|
||||
@@ -0,0 +1,13 @@
|
||||
// routes/fonts-home/route.ts
|
||||
import { redirect } from "@wordpress/route";
|
||||
var route = {
|
||||
beforeLoad: () => {
|
||||
throw redirect({
|
||||
throw: true,
|
||||
to: "/font-list"
|
||||
});
|
||||
}
|
||||
};
|
||||
export {
|
||||
route
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'module_dependencies' => array(array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '63fba8ad1ac5f2b9aba8');
|
||||
@@ -0,0 +1 @@
|
||||
import{redirect as o}from"@wordpress/route";var r={beforeLoad:()=>{throw o({throw:!0,to:"/font-list"})}};export{r as route};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Route registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package wp
|
||||
*/
|
||||
|
||||
return array(
|
||||
array(
|
||||
'name' => 'connectors-home',
|
||||
'path' => '/',
|
||||
'page' => 'options-connectors',
|
||||
'has_route' => true,
|
||||
'has_content' => true,
|
||||
),
|
||||
array(
|
||||
'name' => 'font-list',
|
||||
'path' => '/font-list',
|
||||
'page' => 'font-library',
|
||||
'has_route' => true,
|
||||
'has_content' => true,
|
||||
),
|
||||
array(
|
||||
'name' => 'fonts-home',
|
||||
'path' => '/',
|
||||
'page' => 'font-library',
|
||||
'has_route' => true,
|
||||
'has_content' => false,
|
||||
)
|
||||
);
|
||||
Reference in new issue
Block a user