# desktop-mode/1.0.0/includes/content-graph/assets.php

OpenStation: Desktop Windows, Dock &amp; Virtual Desktops for WP Admin, version 1.0.0. 47 lines.

- Page: https://pluginprobe.com/plugins/desktop-mode/1.0.0/code/includes/content-graph/assets.php
- Raw: https://pluginprobe.com/plugins/desktop-mode/1.0.0/raw/includes/content-graph/assets.php
- Modified: 2026-08-07T20:39:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/desktop-mode/1.0.0/code/includes/content-graph/assets.php#L10-L20`.

```php
<?php
/**
 * OpenStation — Content Graph: asset registration.
 *
 * Mirrors the my-wordpress / recycle-bin / posts-window modules: the
 * bundle script + CSS handles are registered on `init` priority 5, and
 * the native-window sync lazy-loads the script the first time the
 * Content Graph window opens. The CSS is enqueued eagerly in admin
 * context (cheap, ~3KB) so the empty-state spinner has its layout the
 * moment the window mounts.
 *
 * @package OpenStation
 */

defined( 'ABSPATH' ) || exit;

/**
 * Register Content Graph CSS and JS handles.
 */
function openstation_content_graph_register_assets() {
	$version = OPENSTATION_VERSION;
	$suffix  = openstation_asset_suffix();

	$css_path = OPENSTATION_DIR . 'assets/css/content-graph.css';
	wp_register_style(
		'desktop-mode-content-graph',
		OPENSTATION_URL . 'assets/css/content-graph.css',
		array( 'os-variables', 'dashicons' ),
		file_exists( $css_path ) ? (string) filemtime( $css_path ) : $version
	);

	$js_path = OPENSTATION_DIR . 'assets/js/content-graph' . $suffix . '.js';
	wp_register_script(
		'desktop-mode-content-graph',
		OPENSTATION_URL . 'assets/js/content-graph' . $suffix . '.js',
		array( 'wp-i18n' ),
		file_exists( $js_path ) ? (string) filemtime( $js_path ) : $version,
		true
	);
	wp_set_script_translations(
		'desktop-mode-content-graph',
		'desktop-mode',
		OPENSTATION_DIR . 'languages'
	);
}
add_action( 'init', 'openstation_content_graph_register_assets', 5 );

```
