PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.11
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.11
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 0.8.8 All 35 releases
← All changes | includes/desktop-files/wallpaper-menu.php +7 -12 0.9.0 → 1.1.11 View file →
@@ -1,7 +1,7 @@
1 1 <?php
2 2 /**
3 - * Desktop Mode — Wallpaper context-menu server side.
3 + * OpenStation — Wallpaper context-menu server side.
4 4 *
5 5 * Builds the array shipped to the shell as
6 6 * `serverWallpaperMenuItems`. Plugins extend the menu by
7 7 * filtering the array — empty by default, so no menu items
@@ -6,19 +6,18 @@
6 6 * `serverWallpaperMenuItems`. Plugins extend the menu by
7 7 * filtering the array — empty by default, so no menu items
8 8 * arrive from the server unless plugins add them.
9 9 *
10 - * The four built-in items (Create folder, Show desktop, OS
11 - * Settings, Wallpapers) are JS-defined inside the shell — they
10 + * The built-in items (Create folder, New URL, Sort by, Show
11 + * desktop, OS Settings) are JS-defined inside the shell — they
12 12 * need access to closures we'd lose across the wire. Server
13 13 * items take a `callbackId` string the JS bundle resolves in
14 14 * its `serverCallbacks` map; plugins that don't ship a JS
15 15 * callback subscribe via the
16 - * `desktop-mode.wallpaper-context-menu.activated` action
16 + * `os.wallpaper-context-menu.activated` action
17 17 * instead.
18 18 *
19 - * @package WPDesktopMode
20 - * @since 0.9.0
19 + * @package OpenStation
21 20 */
22 21
23 22 defined( 'ABSPATH' ) || exit;
24 23
@@ -24,13 +23,11 @@
24 23
25 24 /**
26 25 * Builds the server-borne wallpaper-menu items.
27 26 *
28 - * @since 0.9.0
29 - *
30 27 * @return array[]
31 28 */
32 -function desktop_mode_build_wallpaper_menu_items() {
29 +function openstation_build_wallpaper_menu_items() {
33 30 $items = array();
34 31
35 32 /**
36 33 * Filter the server-borne wallpaper context-menu items.
@@ -37,13 +34,11 @@
37 34 *
38 35 * Each item must have at least `id` and `label`. Optional:
39 36 * `icon`, `sort`, `disabled`, `callbackId`.
40 37 *
41 - * @since 0.9.0
42 - *
43 38 * @param array[] $items Items list.
44 39 */
45 - $items = (array) apply_filters( 'desktop_mode_wallpaper_context_menu_items', $items );
40 + $items = (array) apply_filters( 'openstation_wallpaper_context_menu_items', $items );
46 41
47 42 $out = array();
48 43 foreach ( $items as $entry ) {
49 44 if ( ! is_array( $entry ) || empty( $entry['id'] ) || empty( $entry['label'] ) ) {