PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.12
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.12
1.1.12 1.1.11 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 All 36 releases
← All changes | includes/games/alphabet-soup.php +24 -8 1.1.2 → 1.1.12 View file →
@@ -53,8 +53,19 @@
53 53 'title' => __( 'Alphabet Soup', 'desktop-mode' ),
54 54 'description' => __( 'The daily word search: a seeded letter soup that is the same for every player worldwide — the seed is today’s date. Pick a pot (8×8, 12×12, or 16×16 with more words), drag across the letters to fish them out, chain streaks, and clear waves; Time Attack stirs a different pot against the clock. Your first run of each puzzle earns the shareable score card.', 'desktop-mode' ),
55 55 'icon_svg' => openstation_alphabet_soup_icon_svg(),
56 56 'script' => 'os-game-alphabet-soup',
57 + // Mirrors the `window` block in
58 + // `src/games/alphabet-soup/index.ts`. Declared here as well
59 + // so the window opens at the right size on the very first
60 + // play, before the bundle that carries the def has been
61 + // fetched. Keep the two in step.
62 + 'window' => array(
63 + 'width' => 860,
64 + 'height' => 660,
65 + 'minWidth' => 600,
66 + 'minHeight' => 500,
67 + ),
57 68 'score_columns' => array(
58 69 array(
59 70 'key' => 'score',
60 71 'label' => __( 'Score', 'desktop-mode' ),
@@ -108,15 +119,20 @@
108 119 }
109 120 add_action( 'init', 'openstation_alphabet_soup_register', 20 );
110 121
111 122 /**
112 - * Enqueue the Alphabet Soup window styles. The game's script is
113 - * lazily loaded by the framework on first launch, but its CSS is
114 - * tiny and must already be present when the window opens.
123 + * Ride the Alphabet Soup window styles on the Games window as a
124 + * companion — same shape as Inkfall; see
125 + * `openstation_inkfall_window_styles()` for the reasoning.
126 + *
127 + * @param array $window_args Args passed to `openstation_register_window()`.
128 + * @return array
115 129 */
116 -function openstation_alphabet_soup_enqueue_styles() {
117 - if ( ! function_exists( 'openstation_games_user_can_use' ) || ! openstation_games_user_can_use() ) {
118 - return;
130 +function openstation_alphabet_soup_window_styles( $window_args ) {
131 + if ( ! is_array( $window_args ) ) {
132 + return $window_args;
119 133 }
120 - wp_enqueue_style( 'os-game-alphabet-soup' );
134 + $window_args['styles'] = isset( $window_args['styles'] ) ? (array) $window_args['styles'] : array();
135 + $window_args['styles'][] = 'os-game-alphabet-soup';
136 + return $window_args;
121 137 }
122 -add_action( 'admin_enqueue_scripts', 'openstation_alphabet_soup_enqueue_styles', 30 );
138 +add_filter( 'openstation_games_window_args', 'openstation_alphabet_soup_window_styles' );