-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelay-wp-l10n.php
43 lines (38 loc) · 1.07 KB
/
relay-wp-l10n.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
* Plugin Name: Relay Localizations
* Plugin URI: https://relay.so
* Description: Faster WordPress localization using Relay's in-memory cache.
* Version: 1.0.1
* Author: CacheWerk
* Author URI: https://cachewerk.com
* License: MIT
* Requires PHP: 7.4
*/
declare(strict_types=1);
if (! defined('RELAY_L10N_CONFIG') || ! is_array(RELAY_L10N_CONFIG)) {
return;
}
require_once __DIR__ . '/src/plugin.php';
require_once __DIR__ . '/src/connector.php';
require_once __DIR__ . '/src/translations.php';
(function ($config) {
$config = (object) array_merge([
'scheme' => 'tcp',
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
'username' => null,
'password' => null,
'prefix' => null,
'timeout' => 0.5,
'read_timeout' => 0.5,
'backoff' => 'smart',
'retries' => 3,
'retry_interval' => 20,
'tls_options' => false,
'persistent' => false,
'footnote' => true,
], $config);
RelayWordPressLocalization::boot(__FILE__, $config);
})(RELAY_L10N_CONFIG);