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

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

- Page: https://pluginprobe.com/plugins/desktop-mode/0.8.7/code/includes/content-graph/assets.php
- Raw: https://pluginprobe.com/plugins/desktop-mode/0.8.7/raw/includes/content-graph/assets.php
- Modified: 2026-05-08T19:30:26+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/0.8.7/code/includes/content-graph/assets.php#L10-L20`.

```php
<?php
/**
 * Desktop Mode — 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 WPDesktopMode
 * @since   0.8.2
 */

defined( 'ABSPATH' ) || exit;

/**
 * Register Content Graph CSS and JS handles.
 *
 * @since 0.8.2
 */
function desktop_mode_content_graph_register_assets() {
	$version = DESKTOP_MODE_VERSION;
	$suffix  = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';

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

	$js_path = DESKTOP_MODE_DIR . 'assets/js/content-graph' . $suffix . '.js';
	wp_register_script(
		'desktop-mode-content-graph',
		DESKTOP_MODE_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',
		DESKTOP_MODE_DIR . 'languages'
	);
}
add_action( 'init', 'desktop_mode_content_graph_register_assets', 5 );

```
