PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | js/utils/screen.ts +6 -1 3.10.0-beta.2 → trunk View file →
@@ -1,6 +1,8 @@
1 +// `pagenow` is only defined inside wp-admin. This module is also reached from
2 +// the admin bar bundle, which loads on the front end, so read it defensively.
1 3 export const isNetworkAdmin = (): boolean =>
2 - window.pagenow.endsWith('-network')
4 + true === window.pagenow?.endsWith('-network')
3 5
4 6 export const isMacOS = (): boolean =>
5 7 null !== /mac/i.exec(window.navigator.userAgent)
6 8
@@ -5,7 +7,10 @@
5 7 null !== /mac/i.exec(window.navigator.userAgent)
6 8
7 9 export const isLicensed = (): boolean =>
8 10 !!window.CODE_SNIPPETS?.isLicensed
11 +
12 +export const isCloudConnected = (): boolean =>
13 + !!window.CODE_SNIPPETS?.isCloudConnected
9 14
10 15 export const shouldShowUpsell = () =>
11 16 !isLicensed() && !window.CODE_SNIPPETS?.hideUpsell