/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
client/document/utils/bilmur.js
19 строк
460 B
flootr
chore: migrate `client/document` to `import/order` (#55007)
29 июл 2021, 12:18
Не верифицирован
29 июл 2021, 12:18
a8c4d26
Код
Авторство
О чём код?
import config from '@automattic/calypso-config'; export function isBilmurEnabled() { return config.isEnabled( 'bilmur-script' ); } /** * Get the cache-busted URL for the bilmur script. */ export function getBilmurUrl() { const baseUrl = config( 'bilmur_url' ); if ( ! isBilmurEnabled() || ! baseUrl ) { return undefined; } const oneWeek = 1000 * 60 * 60 * 24 * 7; return `${ config( 'bilmur_url' ) }?w=${ Math.floor( Date.now() / oneWeek ) }`; }