post_type === 'blyzer_event'; } public static function bodyClass($classes): string { $classes = (string) $classes; return self::isPluginScreen() ? $classes . ' blyzer-admin' : $classes; } public static function header(): void { if (!self::isPluginScreen()) return; ?>
base === 'blyzer_event_page_blyzer-preview') wp_enqueue_style('blyzer-events'); wp_enqueue_script('blyzer-events-admin', BLYZER_EVENTS_URL . 'assets/js/admin.js', [], Plugin::assetVersion('assets/js/admin.js'), true); wp_localize_script('blyzer-events-admin', 'blyzerEventsAdmin', [ 'copied' => __('Copied', 'blyzer-events'), 'show' => __('Show', 'blyzer-events'), 'hide' => __('Hide', 'blyzer-events'), 'confirmReplace' => __('Replace the current template with the built-in one?', 'blyzer-events'), 'verifyUrl' => esc_url_raw(rest_url(Rest::NAMESPACE . '/verify')), 'nonce' => wp_create_nonce('wp_rest'), 'keyLength' => Connection::KEY_LENGTH, /* translators: 1: expected number of characters (64), 2: number of characters the user entered */ 'lengthMismatch' => __('The key has %1$d characters, you have %2$d – copy all of it.', 'blyzer-events'), 'badChars' => __('The key may contain only letters and digits.', 'blyzer-events'), 'looksGood' => __('Looks good. Click “Check connection”.', 'blyzer-events'), 'empty' => __('Paste the key first.', 'blyzer-events'), 'pasteFailed' => __('The browser did not allow pasting. Press Ctrl+V (or Cmd+V) in the field.', 'blyzer-events'), 'checking' => __('Checking…', 'blyzer-events'), 'works' => __('Connection works', 'blyzer-events'), 'notWorks' => __('The connection does not work.', 'blyzer-events'), 'failed' => __('The check failed. Try again in a moment.', 'blyzer-events'), ]); } }