PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.10
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.10
1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 All 34 releases
← All changes | includes/content-graph/assets.php +19 -21 0.8.71.1.10 View file →
@@ -1,17 +1,17 @@
1 1 <?php
2 2 /**
3 - * Desktop Mode — Content Graph: asset registration.
3 + * OpenStation — Content Graph: asset registration.
4 4 *
5 - * Mirrors the my-wordpress / recycle-bin / posts-window modules: the
6 - * bundle script + CSS handles are registered on `init` priority 5, and
7 - * the native-window sync lazy-loads the script the first time the
8 - * Content Graph window opens. The CSS is enqueued eagerly in admin
9 - * context (cheap, ~3KB) so the empty-state spinner has its layout the
10 - * moment the window mounts.
5 + * Mirrors the my-wordpress / posts-window modules: the bundle script
6 + * + CSS handles are registered on `init` priority 5, and the
7 + * native-window sync lazy-loads BOTH the first time the Content Graph
8 + * window opens — the script via the registration's `script` arg, the
9 + * CSS as a `styles` companion (see the registration in `window.php`).
10 + * Nothing is enqueued eagerly; a session that never opens the
11 + * Corkboard downloads neither.
11 12 *
12 - * @package WPDesktopMode
13 - * @since 0.8.2
13 + * @package OpenStation
14 14 */
15 15
16 16 defined( 'ABSPATH' ) || exit;
17 17
@@ -16,27 +16,25 @@
16 16 defined( 'ABSPATH' ) || exit;
17 17
18 18 /**
19 19 * Register Content Graph CSS and JS handles.
20 - *
21 - * @since 0.8.2
22 20 */
23 -function desktop_mode_content_graph_register_assets() {
24 - $version = DESKTOP_MODE_VERSION;
25 - $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
21 +function openstation_content_graph_register_assets() {
22 + $version = OPENSTATION_VERSION;
23 + $suffix = openstation_asset_suffix();
26 24
27 - $css_path = DESKTOP_MODE_DIR . 'assets/css/content-graph.css';
25 + $css_path = OPENSTATION_DIR . 'assets/css/content-graph.css';
28 26 wp_register_style(
29 27 'desktop-mode-content-graph',
30 - DESKTOP_MODE_URL . 'assets/css/content-graph.css',
31 - array( 'desktop-mode-variables', 'dashicons' ),
28 + OPENSTATION_URL . 'assets/css/content-graph.css',
29 + array( 'os-variables', 'dashicons' ),
32 30 file_exists( $css_path ) ? (string) filemtime( $css_path ) : $version
33 31 );
34 32
35 - $js_path = DESKTOP_MODE_DIR . 'assets/js/content-graph' . $suffix . '.js';
33 + $js_path = OPENSTATION_DIR . 'assets/js/content-graph' . $suffix . '.js';
36 34 wp_register_script(
37 35 'desktop-mode-content-graph',
38 - DESKTOP_MODE_URL . 'assets/js/content-graph' . $suffix . '.js',
36 + OPENSTATION_URL . 'assets/js/content-graph' . $suffix . '.js',
39 37 array( 'wp-i18n' ),
40 38 file_exists( $js_path ) ? (string) filemtime( $js_path ) : $version,
41 39 true
42 40 );
@@ -42,8 +40,8 @@
42 40 );
43 41 wp_set_script_translations(
44 42 'desktop-mode-content-graph',
45 43 'desktop-mode',
46 - DESKTOP_MODE_DIR . 'languages'
44 + OPENSTATION_DIR . 'languages'
47 45 );
48 46 }
49 -add_action( 'init', 'desktop_mode_content_graph_register_assets', 5 );
47 +add_action( 'init', 'openstation_content_graph_register_assets', 5 );