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/update-notice.php +7 -7 0.9.81.1.10 View file →
@@ -3,9 +3,9 @@
3 3 * Reports a pending WordPress core update to the shell as the `coreUpdate`
4 4 * config value. The shell resolves the release art and renders the
5 5 * notification client-side (see `src/update-notice.ts`).
6 6 *
7 - * @package DesktopMode
7 + * @package OpenStation
8 8 */
9 9
10 10 defined( 'ABSPATH' ) || exit;
11 11
@@ -16,9 +16,9 @@
16 16 * @param string $installed Installed version.
17 17 * @param string $available Available version.
18 18 * @return bool
19 19 */
20 -function desktop_mode_is_major_update( $installed, $available ) {
20 +function openstation_is_major_update( $installed, $available ) {
21 21 $branch = static function ( $v ) {
22 22 $p = explode( '.', (string) $v );
23 23 return ( isset( $p[0] ) ? $p[0] : '0' ) . '.' . ( isset( $p[1] ) ? $p[1] : '0' );
24 24 };
@@ -30,9 +30,9 @@
30 30 *
31 31 * @param string $version Version string.
32 32 * @return string
33 33 */
34 -function desktop_mode_release_branch( $version ) {
34 +function openstation_release_branch( $version ) {
35 35 $p = explode( '.', (string) $version );
36 36 return ( isset( $p[0] ) ? $p[0] : '0' ) . '.' . ( isset( $p[1] ) ? $p[1] : '0' );
37 37 }
38 38
@@ -45,9 +45,9 @@
45 45 * version (the dismissal key); `crossing` flags a new major.
46 46 *
47 47 * @return array{version:string,available:string,branch:string,url:string,crossing:bool}|null
48 48 */
49 -function desktop_mode_get_core_update() {
49 +function openstation_get_core_update() {
50 50 if ( ! current_user_can( 'update_core' ) ) {
51 51 return null;
52 52 }
53 53
@@ -73,14 +73,14 @@
73 73 * to hide it.
74 74 *
75 75 * @param bool $show Default true.
76 76 */
77 - if ( ! apply_filters( 'desktop_mode_show_core_update_notice', true ) ) {
77 + if ( ! apply_filters( 'openstation_show_core_update_notice', true ) ) {
78 78 return null;
79 79 }
80 80
81 - $branch = desktop_mode_release_branch( $available );
82 - $crossing = desktop_mode_is_major_update( get_bloginfo( 'version' ), $available );
81 + $branch = openstation_release_branch( $available );
82 + $crossing = openstation_is_major_update( get_bloginfo( 'version' ), $available );
83 83
84 84 return array(
85 85 'version' => $crossing ? $branch : $available,
86 86 'available' => $available,