From 8a78d814887aa10e164f1cce9c28836b7cce1425 Mon Sep 17 00:00:00 2001 From: naxvog Date: Tue, 13 Aug 2019 00:07:54 +0200 Subject: [PATCH] code cleanup + minor style changes + docblocks --- assets/css/admin.css | 21 +++- includes/class-config.php | 4 +- includes/class-redis-connection-params.php | 4 + includes/class-redis.php | 5 + includes/class-update-checker.php | 21 +++- includes/class-wpr-redis.php | 4 +- includes/config-template.php | 4 + languages/wpr-redis-de_AT.mo | Bin 1818 -> 1893 bytes languages/wpr-redis-de_AT.po | 136 +++++++++++---------- languages/wpr-redis-de_CH.mo | Bin 1829 -> 1900 bytes languages/wpr-redis-de_CH.po | 136 +++++++++++---------- languages/wpr-redis-de_CH_informal.mo | Bin 1827 -> 1902 bytes languages/wpr-redis-de_CH_informal.po | 136 +++++++++++---------- languages/wpr-redis-de_DE.mo | Bin 1779 -> 1833 bytes languages/wpr-redis-de_DE.po | 134 ++++++++++---------- languages/wpr-redis-de_DE_formal.mo | Bin 1842 -> 1896 bytes languages/wpr-redis-de_DE_formal.po | 134 ++++++++++---------- languages/wpr-redis.pot | 94 +++++++------- views/admin-settings.php | 4 + wpr-redis.php | 4 +- 20 files changed, 455 insertions(+), 386 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 4f45ddb..cd95e9a 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1,12 +1,21 @@ +input[type="number"] { + text-align: right; +} .pill { - border-radius: 5px; - background-color: #000; - padding: 2px 3px; - color: #fff; + display: inline-block; + padding: .25em .4em; + font-weight: 700; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25rem; } .pill.pill-active { - background-color: darkgreen; + color: #fff; + background-color: #28a745; } .pill.pill-inactive { - background-color: darkred; + color: #fff; + background-color: #dc3545; } \ No newline at end of file diff --git a/includes/class-config.php b/includes/class-config.php index 4adceb1..5089bb1 100644 --- a/includes/class-config.php +++ b/includes/class-config.php @@ -287,8 +287,8 @@ public function register_settings() { * @return void */ public function trigger_save() { - static $once = false; - if ( ! $once ) { + static $once; + if ( ! isset( $once ) ) { $once = true; add_action( 'shutdown', [ Config::class, 'save' ] ); } diff --git a/includes/class-redis-connection-params.php b/includes/class-redis-connection-params.php index 11e60ca..eb17ccb 100644 --- a/includes/class-redis-connection-params.php +++ b/includes/class-redis-connection-params.php @@ -1,4 +1,8 @@ + * @version 1.0.0 + */ namespace WPR_Redis; diff --git a/includes/class-redis.php b/includes/class-redis.php index d0beebd..f024e33 100644 --- a/includes/class-redis.php +++ b/includes/class-redis.php @@ -1,4 +1,8 @@ + * @version 1.0.0 + */ namespace WPR_Redis; @@ -336,6 +340,7 @@ protected static function lua_flush_closure( /** * Retrieved set WP Rocket expiry time * + * @since 1.0.0 * @return int */ protected static function expiry_time() { diff --git a/includes/class-update-checker.php b/includes/class-update-checker.php index 69692e9..0eb6503 100644 --- a/includes/class-update-checker.php +++ b/includes/class-update-checker.php @@ -1,4 +1,8 @@ + * @version 1.0.1 + */ namespace WPR_Redis; @@ -17,12 +21,27 @@ class Update_Checker { * @since 1.0.0 */ public function __construct() { + $slug = 'wpr-redis'; + add_filter( + "puc_manual_check_link-{$slug}", + [ $this, 'manual_check_link' ] + ); require_once WPR_REDIS_VENDOR_PATH . '/yahnis-elsts/plugin-update-checker/plugin-update-checker.php'; $update_checker = \Puc_v4_Factory::buildUpdateChecker( self::GITHUB_REPO, WPR_REDIS_FILE, - 'wpr-redis' + $slug ); } + /** + * Returns the translatable check for updates link label + * + * @since 1.0.1 + * @return string + */ + public function manual_check_link() { + return __( 'Check for updates', 'wpr-redis' ); + } + } // Update_Checker diff --git a/includes/class-wpr-redis.php b/includes/class-wpr-redis.php index 409745b..6ba602c 100644 --- a/includes/class-wpr-redis.php +++ b/includes/class-wpr-redis.php @@ -34,8 +34,8 @@ public function __construct() { * @return string */ public static function meta( $key ) { - static $metadata = null; - if ( null === $metadata ) { + static $metadata; + if ( ! isset( $metadata ) ) { $metadata = get_file_data( WPR_REDIS_FILE, array( diff --git a/includes/config-template.php b/includes/config-template.php index eb9c045..00b6304 100644 --- a/includes/config-template.php +++ b/includes/config-template.php @@ -1,4 +1,8 @@ + * @version 1.0.0 + */ defined( '\\ABSPATH' ) || exit; diff --git a/languages/wpr-redis-de_AT.mo b/languages/wpr-redis-de_AT.mo index b42ead41960f7aceda7933026cfbba5c47944bd9..a1a0a265512ac4d8c238e086beba458ade7dd604 100644 GIT binary patch delta 516 zcmYMwy-Nad7{Kv6J=5OQv?$8rz#`jBT6&=fg!%`f7NM{^48iQwws47t#;k^3meyzz znySU2r5b`ZbF0O{C5WJ*@8by_clUXo-~C>m=gzzz-eN7FohV!bJRzQ{BwQEjzYBzy zVjG^LEVx41=(;uj zh(7Wclwxb>$8Q`&kJH{Kj1lr>tW(?$u9GKRb^#A44ZJoj(lLP?_=!?k1BdYoJ2602 z@_hv54~(PCn?@;Q9>;JMxs^R$-MEioJZg>KqBL-ivi~#sC8!ff2frwPqTg+IFy}5E zs&RkHNTzjj+tLf!&5gW~D?h1K)fJ1)L?=r(&TuoDD!n2k;*K z_<|uEqlq85h2OY{_QL$!Ca%-RP|js>0}n8vR7I62d~BSf48A}aRQL8fxJ=(ex!A`Q ze8LD$kwHouN+od@p9yh{r_x*V;5E-{ly{nF^1fc$(i5?qeK_-hLS+_!-LlDoXGcO7L4u$i)GLB%k@5hCXt?^sBZ~xk5VY42`&z U$`|%B&aY8)Pt3A*A1p`z0bP?ZH~;_u diff --git a/languages/wpr-redis-de_AT.po b/languages/wpr-redis-de_AT.po index 5ac6f8f..ce2b4f7 100644 --- a/languages/wpr-redis-de_AT.po +++ b/languages/wpr-redis-de_AT.po @@ -2,10 +2,10 @@ msgid "" msgstr "" "Project-Id-Version: WP Rocket Redis\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-12 17:26+0000\n" -"PO-Revision-Date: 2019-08-12 18:05+0000\n" -"Last-Translator: admin \n" -"Language-Team: \n" +"POT-Creation-Date: 2019-08-12 22:01+0000\n" +"PO-Revision-Date: 2019-08-12 22:04+0000\n" +"Last-Translator: naxvog \n" +"Language-Team: Deutsch (Österreich)\n" "Language: de_AT\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "MIME-Version: 1.0\n" @@ -15,92 +15,96 @@ msgstr "" "X-Loco-Version: 2.3.0; wp-5.2.2\n" "X-Loco-Template: languages/wpr-redis-de_DE.po" -#. Description of the plugin -msgid "Addon to WP Rocket that allows storage of cache files in Redis." -msgstr "" -"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" -"Dateien zu verwenden." - -#: views/admin-settings.php:31 -msgid "Connected" -msgstr "Verbunden" +#: views/admin-settings.php:19 includes/class-config.php:79 +msgid "WP Rocket Redis Settings" +msgstr "WP Rocket Redis Einstellungen" -#: includes/class-config.php:242 -msgid "Database" -msgstr "Datenbank" +#: views/admin-settings.php:23 +msgid "Remove WPR Redis Caching Integration" +msgstr "WPR Redis Cache Integration entfernen" -#: views/admin-settings.php:35 -msgid "Disconnected" -msgstr "Getrennt" +#: views/admin-settings.php:28 +msgid "Integrate WPR Redis Caching" +msgstr "WPR Redis Caching integrieren" -#: includes/class-config.php:234 -msgid "Host" -msgstr "Host" +#: views/admin-settings.php:32 +msgid "Status" +msgstr "Status" -#. Author URI of the plugin -msgid "https://github.com/naxvog/" -msgstr "https://github.com/naxvog/" +#: views/admin-settings.php:35 +msgid "Redis Connection Status:" +msgstr "Redis Verbindungsstatus:" -#. URI of the plugin -msgid "https://github.com/naxvog/wpr-redis/" -msgstr "https://github.com/naxvog/wpr-redis/" +#: views/admin-settings.php:39 +msgid "Connected" +msgstr "Verbunden" -#: views/admin-settings.php:20 -msgid "Integrate WPR Redis Caching" -msgstr "WPR Redis Caching integrieren" +#: views/admin-settings.php:43 +msgid "Disconnected" +msgstr "Getrennt" -#: views/admin-settings.php:45 +#: views/admin-settings.php:53 msgid "Integrated" msgstr "Eingebunden" -#. Author of the plugin -msgid "naxvog " -msgstr "naxvog " - -#: includes/class-config.php:246 -msgid "Password" -msgstr "Passwort" - -#: views/admin-settings.php:49 +#: views/admin-settings.php:57 msgid "Pending Integration" msgstr "Nicht Eingebunden" -#: includes/class-config.php:238 -msgid "Port" -msgstr "Port" +#: includes/class-update-checker.php:44 +msgid "Check for updates" +msgstr "Auf Updates prüfen" -#: views/admin-settings.php:27 -msgid "Redis Connection Status:" -msgstr "Redis Verbindungsstatus:" - -#: views/admin-settings.php:16 -msgid "Remove WPR Redis Caching Integration" -msgstr "WPR Redis Cache Integration entfernen" - -#: includes/class-config.php:230 -msgid "Scheme" -msgstr "Schema" +#: includes/class-wpr-redis.php:187 +msgid "WP Rocket Redis:" +msgstr "WP Rocket Redis:" -#: includes/class-config.php:55 +#: includes/class-config.php:66 msgid "Settings" msgstr "Einstellungen" -#: includes/class-config.php:138 +#: includes/class-config.php:147 msgid "Setup your Redis connection" msgstr "Konfiguriere deine Redis Verbindung" -#: views/admin-settings.php:24 -msgid "Status" -msgstr "Status" +#: includes/class-config.php:237 +msgid "Scheme" +msgstr "Schema" + +#: includes/class-config.php:241 +msgid "Host" +msgstr "Host" + +#: includes/class-config.php:245 +msgid "Port" +msgstr "Port" + +#: includes/class-config.php:249 +msgid "Database" +msgstr "Datenbank" + +#: includes/class-config.php:253 +msgid "Password" +msgstr "Passwort" #. Name of the plugin msgid "WP Rocket Redis" msgstr "WP Rocket Redis" -#: includes/class-config.php:68 -msgid "WP Rocket Redis Settings" -msgstr "WP Rocket Redis Einstellungen" +#. Description of the plugin +msgid "Addon to WP Rocket that allows storage of cache files in Redis." +msgstr "" +"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" +"Dateien zu verwenden." -#: includes/class-wpr-redis.php:141 -msgid "WP Rocket Redis:" -msgstr "WP Rocket Redis:" +#. URI of the plugin +msgid "https://github.com/naxvog/wpr-redis/" +msgstr "https://github.com/naxvog/wpr-redis/" + +#. Author of the plugin +msgid "naxvog " +msgstr "naxvog " + +#. Author URI of the plugin +msgid "https://github.com/naxvog/" +msgstr "https://github.com/naxvog/" diff --git a/languages/wpr-redis-de_CH.mo b/languages/wpr-redis-de_CH.mo index 0f3051bad55565790372d8772c834af8c849766e..b8f9efe072ff00c19f24af70b008a535298f6fdc 100644 GIT binary patch delta 512 zcmYMwKS%;m9Ki8+o~HftPZmU3Tv%jHCQTKDB-9>31c6~EMo{LTf)?9?ph<+FT7sr% za;+f>TB0d8vpI+Y7isJJ^MsCj_xb(ay?gKXyKDECyHM+~mlRh&BfzLi!gZnjJ5P8? z?!$L%#~*azFLt5Lrj#8$IEcO2fnk(&v*^bd%DPqL%z|1c7-eD~+wdIagDaGcZd&ut z=plbaDYk}QY~TR8bZeg=hRB!jo8tB`P9Aqy1w5cMP-$9F>VrTI{6wj&jzieMPVA#9 zc|U^k2PRS0&7l+$#W7q%Zgs??8;@}uORf2Plm?zq_J2dK1a$)GKzCXl45M_g;4GeK zF>lIDY#YhljFC@oZsg2t`9-U0j!0xCJXO5agUx8VSkV`KF*BdbCQ?RdIgvUrw+<)D b0eeRCNApQz#roDrXCCj8=1%$4ai;wNvhPG{ delta 441 zcmYMuu}eZx6vy#?8c#XrEmp&@7pU4?XcNYNNL*$}+d zf1z3wK`4TtNg)IYqM`4>2R^v(bI#@7bAMyIW7pm{%(mj&WNowh((v8rg+WOtF`Qxm?WOs-D2C~GQO;#Bf(48#RZ|rT9~)OFgX<`R8s2^f*XSQnF7_~l z1Kh$dWRTK^Qb|nU8zIVAr9ZUh!CRhpDDOO=$@{8HvBSm_uHcJzV1(=RpD4*^C;@(P zAH$@U;5mM)Si%E5_x3MQf?uP|Z=wY6q6F_@TrLhNB>A7ux!0%ew;pLLmCYY#oL6Jd VN}c47($0@@=9bM1?GCJ4{SVh$G8F&- diff --git a/languages/wpr-redis-de_CH.po b/languages/wpr-redis-de_CH.po index 50106a4..d145f64 100644 --- a/languages/wpr-redis-de_CH.po +++ b/languages/wpr-redis-de_CH.po @@ -2,10 +2,10 @@ msgid "" msgstr "" "Project-Id-Version: WP Rocket Redis\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-12 17:26+0000\n" -"PO-Revision-Date: 2019-08-12 18:05+0000\n" -"Last-Translator: admin \n" -"Language-Team: \n" +"POT-Creation-Date: 2019-08-12 22:01+0000\n" +"PO-Revision-Date: 2019-08-12 22:04+0000\n" +"Last-Translator: naxvog \n" +"Language-Team: Deutsch (Schweiz)\n" "Language: de_CH\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "MIME-Version: 1.0\n" @@ -15,92 +15,96 @@ msgstr "" "X-Loco-Version: 2.3.0; wp-5.2.2\n" "X-Loco-Template: languages/wpr-redis-de_DE_formal.po" -#. Description of the plugin -msgid "Addon to WP Rocket that allows storage of cache files in Redis." -msgstr "" -"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" -"Dateien zu verwenden." - -#: views/admin-settings.php:31 -msgid "Connected" -msgstr "Verbunden" +#: views/admin-settings.php:19 includes/class-config.php:79 +msgid "WP Rocket Redis Settings" +msgstr "WP Rocket Redis Einstellungen" -#: includes/class-config.php:242 -msgid "Database" -msgstr "Datenbank" +#: views/admin-settings.php:23 +msgid "Remove WPR Redis Caching Integration" +msgstr "WPR Redis Cache Integration entfernen" -#: views/admin-settings.php:35 -msgid "Disconnected" -msgstr "Getrennt" +#: views/admin-settings.php:28 +msgid "Integrate WPR Redis Caching" +msgstr "WPR Redis Caching integrieren" -#: includes/class-config.php:234 -msgid "Host" -msgstr "Host" +#: views/admin-settings.php:32 +msgid "Status" +msgstr "Status" -#. Author URI of the plugin -msgid "https://github.com/naxvog/" -msgstr "https://github.com/naxvog/" +#: views/admin-settings.php:35 +msgid "Redis Connection Status:" +msgstr "Redis Verbindungsstatus:" -#. URI of the plugin -msgid "https://github.com/naxvog/wpr-redis/" -msgstr "https://github.com/naxvog/wpr-redis/" +#: views/admin-settings.php:39 +msgid "Connected" +msgstr "Verbunden" -#: views/admin-settings.php:20 -msgid "Integrate WPR Redis Caching" -msgstr "WPR Redis Caching integrieren" +#: views/admin-settings.php:43 +msgid "Disconnected" +msgstr "Getrennt" -#: views/admin-settings.php:45 +#: views/admin-settings.php:53 msgid "Integrated" msgstr "Eingebunden" -#. Author of the plugin -msgid "naxvog " -msgstr "naxvog " - -#: includes/class-config.php:246 -msgid "Password" -msgstr "Passwort" - -#: views/admin-settings.php:49 +#: views/admin-settings.php:57 msgid "Pending Integration" msgstr "Nicht Eingebunden" -#: includes/class-config.php:238 -msgid "Port" -msgstr "Port" +#: includes/class-update-checker.php:44 +msgid "Check for updates" +msgstr "Auf Updates prüfen" -#: views/admin-settings.php:27 -msgid "Redis Connection Status:" -msgstr "Redis Verbindungsstatus:" - -#: views/admin-settings.php:16 -msgid "Remove WPR Redis Caching Integration" -msgstr "WPR Redis Cache Integration entfernen" - -#: includes/class-config.php:230 -msgid "Scheme" -msgstr "Schema" +#: includes/class-wpr-redis.php:187 +msgid "WP Rocket Redis:" +msgstr "WP Rocket Redis:" -#: includes/class-config.php:55 +#: includes/class-config.php:66 msgid "Settings" msgstr "Einstellungen" -#: includes/class-config.php:138 +#: includes/class-config.php:147 msgid "Setup your Redis connection" msgstr "Konfigurieren Sie Ihre Redis Verbindung" -#: views/admin-settings.php:24 -msgid "Status" -msgstr "Status" +#: includes/class-config.php:237 +msgid "Scheme" +msgstr "Schema" + +#: includes/class-config.php:241 +msgid "Host" +msgstr "Host" + +#: includes/class-config.php:245 +msgid "Port" +msgstr "Port" + +#: includes/class-config.php:249 +msgid "Database" +msgstr "Datenbank" + +#: includes/class-config.php:253 +msgid "Password" +msgstr "Passwort" #. Name of the plugin msgid "WP Rocket Redis" msgstr "WP Rocket Redis" -#: includes/class-config.php:68 -msgid "WP Rocket Redis Settings" -msgstr "WP Rocket Redis Einstellungen" +#. Description of the plugin +msgid "Addon to WP Rocket that allows storage of cache files in Redis." +msgstr "" +"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" +"Dateien zu verwenden." -#: includes/class-wpr-redis.php:141 -msgid "WP Rocket Redis:" -msgstr "WP Rocket Redis:" +#. URI of the plugin +msgid "https://github.com/naxvog/wpr-redis/" +msgstr "https://github.com/naxvog/wpr-redis/" + +#. Author of the plugin +msgid "naxvog " +msgstr "naxvog " + +#. Author URI of the plugin +msgid "https://github.com/naxvog/" +msgstr "https://github.com/naxvog/" diff --git a/languages/wpr-redis-de_CH_informal.mo b/languages/wpr-redis-de_CH_informal.mo index 06a5aa26b70ff92f7945c8de720a328763cc2c26..529aabfd66b991922f90c7acb2edd9c8d49291c4 100644 GIT binary patch delta 516 zcmYMwKS%;`6u|L2_0s;SWkICDfkg%lW?KzWT-Y8#OJLX?Mo|8{f)=-iAR4U6T560Y z*PtQDCE9Aq+*)%Hsv+q6JfY)$_j&Jkzx(~(yKDcaztkA?oGV--j0mGH3D<@C?*ic^ z`2fCSH#X6SKiG#Zm!fzufMFcM9*m=`o5v6uDC^ddGfT<_!8jB9*o76853W!)y6Mc< zFhKr{Qfvc*_=ThBb36M)F-E?EEsD!wirmti0%|A?ytOSU$_IfQ*hH!98^`b$dofH^ z@_rKK55!T{Euj>W#0g9xw{pazA5SofmCpPiNsudrhMy;wxikdi#s`Nn0B#{&gik#bmqX^KAhGK dd#W1o6xGn8ZRu;y_j)$}aA%pj)l=d`iMR;j(D%U$T{!piJco0h^BdR=yZpIk-YULLR*cn=hOessJ)*49FJKGj z@eM=RM-zWBiX&V^dv10vg6s5glyeS-F^5T|%Ibn5z(xsW@D<9SYk&V9m+2o-F23Lj zc5w@TkU>ftO6}n;ei7mf3-tTeEclIY9p#-nGvL*3I>`Y?OoxUWXS UN@ubu#~mA|-nm)S-n-@MKju<0EC2ui diff --git a/languages/wpr-redis-de_CH_informal.po b/languages/wpr-redis-de_CH_informal.po index 7253181..d4ad156 100644 --- a/languages/wpr-redis-de_CH_informal.po +++ b/languages/wpr-redis-de_CH_informal.po @@ -2,10 +2,10 @@ msgid "" msgstr "" "Project-Id-Version: WP Rocket Redis\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-12 17:26+0000\n" -"PO-Revision-Date: 2019-08-12 18:06+0000\n" -"Last-Translator: admin \n" -"Language-Team: \n" +"POT-Creation-Date: 2019-08-12 22:01+0000\n" +"PO-Revision-Date: 2019-08-12 22:03+0000\n" +"Last-Translator: naxvog \n" +"Language-Team: Deutsch (Schweiz, Du)\n" "Language: de_CH_informal\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "MIME-Version: 1.0\n" @@ -15,92 +15,96 @@ msgstr "" "X-Loco-Version: 2.3.0; wp-5.2.2\n" "X-Loco-Template: languages/wpr-redis-de_DE.po" -#. Description of the plugin -msgid "Addon to WP Rocket that allows storage of cache files in Redis." -msgstr "" -"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" -"Dateien zu verwenden." - -#: views/admin-settings.php:31 -msgid "Connected" -msgstr "Verbunden" +#: views/admin-settings.php:19 includes/class-config.php:79 +msgid "WP Rocket Redis Settings" +msgstr "WP Rocket Redis Einstellungen" -#: includes/class-config.php:242 -msgid "Database" -msgstr "Datenbank" +#: views/admin-settings.php:23 +msgid "Remove WPR Redis Caching Integration" +msgstr "WPR Redis Cache Integration entfernen" -#: views/admin-settings.php:35 -msgid "Disconnected" -msgstr "Getrennt" +#: views/admin-settings.php:28 +msgid "Integrate WPR Redis Caching" +msgstr "WPR Redis Caching integrieren" -#: includes/class-config.php:234 -msgid "Host" -msgstr "Host" +#: views/admin-settings.php:32 +msgid "Status" +msgstr "Status" -#. Author URI of the plugin -msgid "https://github.com/naxvog/" -msgstr "https://github.com/naxvog/" +#: views/admin-settings.php:35 +msgid "Redis Connection Status:" +msgstr "Redis Verbindungsstatus:" -#. URI of the plugin -msgid "https://github.com/naxvog/wpr-redis/" -msgstr "https://github.com/naxvog/wpr-redis/" +#: views/admin-settings.php:39 +msgid "Connected" +msgstr "Verbunden" -#: views/admin-settings.php:20 -msgid "Integrate WPR Redis Caching" -msgstr "WPR Redis Caching integrieren" +#: views/admin-settings.php:43 +msgid "Disconnected" +msgstr "Getrennt" -#: views/admin-settings.php:45 +#: views/admin-settings.php:53 msgid "Integrated" msgstr "Eingebunden" -#. Author of the plugin -msgid "naxvog " -msgstr "naxvog " - -#: includes/class-config.php:246 -msgid "Password" -msgstr "Passwort" - -#: views/admin-settings.php:49 +#: views/admin-settings.php:57 msgid "Pending Integration" msgstr "Nicht Eingebunden" -#: includes/class-config.php:238 -msgid "Port" -msgstr "Port" +#: includes/class-update-checker.php:44 +msgid "Check for updates" +msgstr "Auf Updates prüfen" -#: views/admin-settings.php:27 -msgid "Redis Connection Status:" -msgstr "Redis Verbindungsstatus:" - -#: views/admin-settings.php:16 -msgid "Remove WPR Redis Caching Integration" -msgstr "WPR Redis Cache Integration entfernen" - -#: includes/class-config.php:230 -msgid "Scheme" -msgstr "Schema" +#: includes/class-wpr-redis.php:187 +msgid "WP Rocket Redis:" +msgstr "WP Rocket Redis:" -#: includes/class-config.php:55 +#: includes/class-config.php:66 msgid "Settings" msgstr "Einstellungen" -#: includes/class-config.php:138 +#: includes/class-config.php:147 msgid "Setup your Redis connection" msgstr "Konfiguriere deine Redis Verbindung" -#: views/admin-settings.php:24 -msgid "Status" -msgstr "Status" +#: includes/class-config.php:237 +msgid "Scheme" +msgstr "Schema" + +#: includes/class-config.php:241 +msgid "Host" +msgstr "Host" + +#: includes/class-config.php:245 +msgid "Port" +msgstr "Port" + +#: includes/class-config.php:249 +msgid "Database" +msgstr "Datenbank" + +#: includes/class-config.php:253 +msgid "Password" +msgstr "Passwort" #. Name of the plugin msgid "WP Rocket Redis" msgstr "WP Rocket Redis" -#: includes/class-config.php:68 -msgid "WP Rocket Redis Settings" -msgstr "WP Rocket Redis Einstellungen" +#. Description of the plugin +msgid "Addon to WP Rocket that allows storage of cache files in Redis." +msgstr "" +"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" +"Dateien zu verwenden." -#: includes/class-wpr-redis.php:141 -msgid "WP Rocket Redis:" -msgstr "WP Rocket Redis:" +#. URI of the plugin +msgid "https://github.com/naxvog/wpr-redis/" +msgstr "https://github.com/naxvog/wpr-redis/" + +#. Author of the plugin +msgid "naxvog " +msgstr "naxvog " + +#. Author URI of the plugin +msgid "https://github.com/naxvog/" +msgstr "https://github.com/naxvog/" diff --git a/languages/wpr-redis-de_DE.mo b/languages/wpr-redis-de_DE.mo index baa4409e557565c952621f1a4297792e5511b8b4..8fe44e561bea2d6f7bf58608f0f3e8e0c2b9c712 100644 GIT binary patch delta 490 zcmYMwzb^w}7{KxO?t0XZ>QRFz$;puz>qZ7?(xLwVu?WIlBoeCB(B;C&B*lV6Y>0HY z#bA&aEMj9(9jpd}K@1Y#r@h1_?|q)QXih2PkZaih79gQMhmtWw-M&XW(B%>s5%8aQegD0N042VSC77UCe@U1e);(!e&#{`+W2P$iHK?oe*x6{Q2!TG`cd z*0Q&_V*6`FyHr?O*z`8SN3Eurt~;I?t6UpSBXYxMV^2$EOTInTTxA!E_qV>c8qS#q F+8^$^Jt6=A delta 437 zcmYMuJxD@P7{>8)y7x+DTG`MyNPf_&g@Fw%ZVfGMF3!#^4q>!eIbC#cYH<(*hfAA# z5JpQ9I7EwWLDbM#{|AK*ob!9%!})kR(eFt0HRd)9W0kqZd{)D_vHu=X*6HW)5ohrQ z7w`>T{J>58!g-9&OwO(23jGf1Tn^Xp5R=AK%_&8QjSA}F3)Dlk>3$m*>AR?leO$sJ zZs0rekg<+2yO_ovAx^MF|I4omUh*cEQU9Ew%m3z_Vw;Ui4CC$eKo^(k?@-C_Q2_>+ z!Z9j%m?eTSOkf\n" +"POT-Creation-Date: 2019-08-12 22:01+0000\n" +"PO-Revision-Date: 2019-08-12 22:02+0000\n" +"Last-Translator: naxvog \n" "Language-Team: Deutsch\n" "Language: de_DE\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" @@ -14,92 +14,96 @@ msgstr "" "X-Generator: Loco https://localise.biz/\n" "X-Loco-Version: 2.3.0; wp-5.2.2" -#. Description of the plugin -msgid "Addon to WP Rocket that allows storage of cache files in Redis." -msgstr "" -"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" -"Dateien zu verwenden." - -#: views/admin-settings.php:31 -msgid "Connected" -msgstr "Verbunden" +#: views/admin-settings.php:19 includes/class-config.php:79 +msgid "WP Rocket Redis Settings" +msgstr "WP Rocket Redis Einstellungen" -#: includes/class-config.php:242 -msgid "Database" -msgstr "Datenbank" +#: views/admin-settings.php:23 +msgid "Remove WPR Redis Caching Integration" +msgstr "WPR Redis Cache Integration entfernen" -#: views/admin-settings.php:35 -msgid "Disconnected" -msgstr "Getrennt" +#: views/admin-settings.php:28 +msgid "Integrate WPR Redis Caching" +msgstr "WPR Redis Caching integrieren" -#: includes/class-config.php:234 -msgid "Host" -msgstr "Host" +#: views/admin-settings.php:32 +msgid "Status" +msgstr "Status" -#. Author URI of the plugin -msgid "https://github.com/naxvog/" -msgstr "https://github.com/naxvog/" +#: views/admin-settings.php:35 +msgid "Redis Connection Status:" +msgstr "Redis Verbindungsstatus:" -#. URI of the plugin -msgid "https://github.com/naxvog/wpr-redis/" -msgstr "https://github.com/naxvog/wpr-redis/" +#: views/admin-settings.php:39 +msgid "Connected" +msgstr "Verbunden" -#: views/admin-settings.php:20 -msgid "Integrate WPR Redis Caching" -msgstr "WPR Redis Caching integrieren" +#: views/admin-settings.php:43 +msgid "Disconnected" +msgstr "Getrennt" -#: views/admin-settings.php:45 +#: views/admin-settings.php:53 msgid "Integrated" msgstr "Eingebunden" -#. Author of the plugin -msgid "naxvog " -msgstr "naxvog " - -#: includes/class-config.php:246 -msgid "Password" -msgstr "Passwort" - -#: views/admin-settings.php:49 +#: views/admin-settings.php:57 msgid "Pending Integration" msgstr "Nicht Eingebunden" -#: includes/class-config.php:238 -msgid "Port" -msgstr "Port" +#: includes/class-update-checker.php:44 +msgid "Check for updates" +msgstr "Auf Updates prüfen" -#: views/admin-settings.php:27 -msgid "Redis Connection Status:" -msgstr "Redis Verbindungsstatus:" - -#: views/admin-settings.php:16 -msgid "Remove WPR Redis Caching Integration" -msgstr "WPR Redis Cache Integration entfernen" - -#: includes/class-config.php:230 -msgid "Scheme" -msgstr "Schema" +#: includes/class-wpr-redis.php:187 +msgid "WP Rocket Redis:" +msgstr "WP Rocket Redis:" -#: includes/class-config.php:55 +#: includes/class-config.php:66 msgid "Settings" msgstr "Einstellungen" -#: includes/class-config.php:138 +#: includes/class-config.php:147 msgid "Setup your Redis connection" msgstr "Konfiguriere deine Redis Verbindung" -#: views/admin-settings.php:24 -msgid "Status" -msgstr "Status" +#: includes/class-config.php:237 +msgid "Scheme" +msgstr "Schema" + +#: includes/class-config.php:241 +msgid "Host" +msgstr "Host" + +#: includes/class-config.php:245 +msgid "Port" +msgstr "Port" + +#: includes/class-config.php:249 +msgid "Database" +msgstr "Datenbank" + +#: includes/class-config.php:253 +msgid "Password" +msgstr "Passwort" #. Name of the plugin msgid "WP Rocket Redis" msgstr "WP Rocket Redis" -#: includes/class-config.php:68 -msgid "WP Rocket Redis Settings" -msgstr "WP Rocket Redis Einstellungen" +#. Description of the plugin +msgid "Addon to WP Rocket that allows storage of cache files in Redis." +msgstr "" +"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" +"Dateien zu verwenden." -#: includes/class-wpr-redis.php:141 -msgid "WP Rocket Redis:" -msgstr "WP Rocket Redis:" +#. URI of the plugin +msgid "https://github.com/naxvog/wpr-redis/" +msgstr "https://github.com/naxvog/wpr-redis/" + +#. Author of the plugin +msgid "naxvog " +msgstr "naxvog " + +#. Author URI of the plugin +msgid "https://github.com/naxvog/" +msgstr "https://github.com/naxvog/" diff --git a/languages/wpr-redis-de_DE_formal.mo b/languages/wpr-redis-de_DE_formal.mo index c647ff4799e706f2cf55fb260326f4315ee60d27..7b99b55e7862dd31ace6aa6c4144fa181f542b3f 100644 GIT binary patch delta 489 zcmYMwze~eF6u|MjrqTMVO|64e3xWD;taTAZilE>>pg1Tfnj#2Vt924GI5|oY#2<^R zxR^;$5CmOBba1kE6U3no4&tQW*AzT*`Mh_z+`YT=@O#)Tw+8nVt)1RUFG)f>(*I@% zkIAF>iVgUQA^gE+3MHd@ARE4+R93+Reqj?v zsY<>lP;Q_HW!@l4AtTt0Q^=#Xc(vd*_Tp}B`~u|w*C^{hq9s>eA&?XNqTEEh-akR6 zxTD9dC1+vT&aUR|LT+(>!&&$4bxE7)^iZn5cxEK4(SY}C-0Ik9A!|?iv+P{{<}&N7 Jcn9Xb{sT)SK0yEg delta 436 zcmYMwze@sP9LMqJ@$R&lU8IOQfSZZ7>BO$JRxO%kHcw+Vr_IMfbo^H%X}u(nyx((qjCxkbtwdK;f` z0bg+m-_gWh+`>PMq7#~(OW->F9?Cfv<5<9yQZ-ef2(xj9GWZ;2&}Fdi;R<~R<->c7 z;R|l!Co)KBL#adD#~(tR;3<9HngwqMdMNkYp~?NKN3p}k11{n?IPit5^b?fiAyP_! z2&QotC3uO~GM4cGtHJ&SO7JU``7M;-J(S>mOvx|&ppfKty{V7=i5_VybCl1z^?{L; PDwp&BjYsVdt%jZgYp*Y9 diff --git a/languages/wpr-redis-de_DE_formal.po b/languages/wpr-redis-de_DE_formal.po index 59dbc1b..deeb567 100644 --- a/languages/wpr-redis-de_DE_formal.po +++ b/languages/wpr-redis-de_DE_formal.po @@ -2,9 +2,9 @@ msgid "" msgstr "" "Project-Id-Version: WP Rocket Redis\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-12 17:26+0000\n" -"PO-Revision-Date: 2019-08-12 17:46+0000\n" -"Last-Translator: admin \n" +"POT-Creation-Date: 2019-08-12 22:01+0000\n" +"PO-Revision-Date: 2019-08-12 22:03+0000\n" +"Last-Translator: naxvog \n" "Language-Team: Deutsch (Sie)\n" "Language: de_DE_formal\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" @@ -15,92 +15,96 @@ msgstr "" "X-Loco-Version: 2.3.0; wp-5.2.2\n" "X-Loco-Template: languages/wpr-redis-de_DE.po" -#. Description of the plugin -msgid "Addon to WP Rocket that allows storage of cache files in Redis." -msgstr "" -"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" -"Dateien zu verwenden." - -#: views/admin-settings.php:31 -msgid "Connected" -msgstr "Verbunden" +#: views/admin-settings.php:19 includes/class-config.php:79 +msgid "WP Rocket Redis Settings" +msgstr "WP Rocket Redis Einstellungen" -#: includes/class-config.php:242 -msgid "Database" -msgstr "Datenbank" +#: views/admin-settings.php:23 +msgid "Remove WPR Redis Caching Integration" +msgstr "WPR Redis Cache Integration entfernen" -#: views/admin-settings.php:35 -msgid "Disconnected" -msgstr "Getrennt" +#: views/admin-settings.php:28 +msgid "Integrate WPR Redis Caching" +msgstr "WPR Redis Caching integrieren" -#: includes/class-config.php:234 -msgid "Host" -msgstr "Host" +#: views/admin-settings.php:32 +msgid "Status" +msgstr "Status" -#. Author URI of the plugin -msgid "https://github.com/naxvog/" -msgstr "https://github.com/naxvog/" +#: views/admin-settings.php:35 +msgid "Redis Connection Status:" +msgstr "Redis Verbindungsstatus:" -#. URI of the plugin -msgid "https://github.com/naxvog/wpr-redis/" -msgstr "https://github.com/naxvog/wpr-redis/" +#: views/admin-settings.php:39 +msgid "Connected" +msgstr "Verbunden" -#: views/admin-settings.php:20 -msgid "Integrate WPR Redis Caching" -msgstr "WPR Redis Caching integrieren" +#: views/admin-settings.php:43 +msgid "Disconnected" +msgstr "Getrennt" -#: views/admin-settings.php:45 +#: views/admin-settings.php:53 msgid "Integrated" msgstr "Eingebunden" -#. Author of the plugin -msgid "naxvog " -msgstr "naxvog " - -#: includes/class-config.php:246 -msgid "Password" -msgstr "Passwort" - -#: views/admin-settings.php:49 +#: views/admin-settings.php:57 msgid "Pending Integration" msgstr "Nicht Eingebunden" -#: includes/class-config.php:238 -msgid "Port" -msgstr "Port" +#: includes/class-update-checker.php:44 +msgid "Check for updates" +msgstr "Auf Updates prüfen" -#: views/admin-settings.php:27 -msgid "Redis Connection Status:" -msgstr "Redis Verbindungsstatus:" - -#: views/admin-settings.php:16 -msgid "Remove WPR Redis Caching Integration" -msgstr "WPR Redis Cache Integration entfernen" - -#: includes/class-config.php:230 -msgid "Scheme" -msgstr "Schema" +#: includes/class-wpr-redis.php:187 +msgid "WP Rocket Redis:" +msgstr "WP Rocket Redis:" -#: includes/class-config.php:55 +#: includes/class-config.php:66 msgid "Settings" msgstr "Einstellungen" -#: includes/class-config.php:138 +#: includes/class-config.php:147 msgid "Setup your Redis connection" msgstr "Konfigurieren Sie Ihre Redis Verbindung" -#: views/admin-settings.php:24 -msgid "Status" -msgstr "Status" +#: includes/class-config.php:237 +msgid "Scheme" +msgstr "Schema" + +#: includes/class-config.php:241 +msgid "Host" +msgstr "Host" + +#: includes/class-config.php:245 +msgid "Port" +msgstr "Port" + +#: includes/class-config.php:249 +msgid "Database" +msgstr "Datenbank" + +#: includes/class-config.php:253 +msgid "Password" +msgstr "Passwort" #. Name of the plugin msgid "WP Rocket Redis" msgstr "WP Rocket Redis" -#: includes/class-config.php:68 -msgid "WP Rocket Redis Settings" -msgstr "WP Rocket Redis Einstellungen" +#. Description of the plugin +msgid "Addon to WP Rocket that allows storage of cache files in Redis." +msgstr "" +"Erweiterung für WP Rocket die es erlaubt Redis als Speicherort für Cache-" +"Dateien zu verwenden." -#: includes/class-wpr-redis.php:141 -msgid "WP Rocket Redis:" -msgstr "WP Rocket Redis:" +#. URI of the plugin +msgid "https://github.com/naxvog/wpr-redis/" +msgstr "https://github.com/naxvog/wpr-redis/" + +#. Author of the plugin +msgid "naxvog " +msgstr "naxvog " + +#. Author URI of the plugin +msgid "https://github.com/naxvog/" +msgstr "https://github.com/naxvog/" diff --git a/languages/wpr-redis.pot b/languages/wpr-redis.pot index fe25089..09590e1 100644 --- a/languages/wpr-redis.pot +++ b/languages/wpr-redis.pot @@ -3,9 +3,9 @@ msgid "" msgstr "" "Project-Id-Version: WP Rocket Redis\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-12 17:26+0000\n" +"POT-Creation-Date: 2019-08-12 22:01+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"Last-Translator: naxvog \n" "Language-Team: \n" "Language: \n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" @@ -15,90 +15,94 @@ msgstr "" "X-Generator: Loco https://localise.biz/\n" "X-Loco-Version: 2.3.0; wp-5.2.2" -#. Description of the plugin -msgid "Addon to WP Rocket that allows storage of cache files in Redis." -msgstr "" - -#: views/admin-settings.php:31 -msgid "Connected" +#: views/admin-settings.php:19 includes/class-config.php:79 +msgid "WP Rocket Redis Settings" msgstr "" -#: includes/class-config.php:242 -msgid "Database" +#: views/admin-settings.php:23 +msgid "Remove WPR Redis Caching Integration" msgstr "" -#: views/admin-settings.php:35 -msgid "Disconnected" +#: views/admin-settings.php:28 +msgid "Integrate WPR Redis Caching" msgstr "" -#: includes/class-config.php:234 -msgid "Host" +#: views/admin-settings.php:32 +msgid "Status" msgstr "" -#. Author URI of the plugin -msgid "https://github.com/naxvog/" +#: views/admin-settings.php:35 +msgid "Redis Connection Status:" msgstr "" -#. URI of the plugin -msgid "https://github.com/naxvog/wpr-redis/" +#: views/admin-settings.php:39 +msgid "Connected" msgstr "" -#: views/admin-settings.php:20 -msgid "Integrate WPR Redis Caching" +#: views/admin-settings.php:43 +msgid "Disconnected" msgstr "" -#: views/admin-settings.php:45 +#: views/admin-settings.php:53 msgid "Integrated" msgstr "" -#. Author of the plugin -msgid "naxvog " +#: views/admin-settings.php:57 +msgid "Pending Integration" msgstr "" -#: includes/class-config.php:246 -msgid "Password" +#: includes/class-update-checker.php:44 +msgid "Check for updates" msgstr "" -#: views/admin-settings.php:49 -msgid "Pending Integration" +#: includes/class-wpr-redis.php:187 +msgid "WP Rocket Redis:" msgstr "" -#: includes/class-config.php:238 -msgid "Port" +#: includes/class-config.php:66 +msgid "Settings" msgstr "" -#: views/admin-settings.php:27 -msgid "Redis Connection Status:" +#: includes/class-config.php:147 +msgid "Setup your Redis connection" msgstr "" -#: views/admin-settings.php:16 -msgid "Remove WPR Redis Caching Integration" +#: includes/class-config.php:237 +msgid "Scheme" msgstr "" -#: includes/class-config.php:230 -msgid "Scheme" +#: includes/class-config.php:241 +msgid "Host" msgstr "" -#: includes/class-config.php:55 -msgid "Settings" +#: includes/class-config.php:245 +msgid "Port" msgstr "" -#: includes/class-config.php:138 -msgid "Setup your Redis connection" +#: includes/class-config.php:249 +msgid "Database" msgstr "" -#: views/admin-settings.php:24 -msgid "Status" +#: includes/class-config.php:253 +msgid "Password" msgstr "" #. Name of the plugin msgid "WP Rocket Redis" msgstr "" -#: includes/class-config.php:68 -msgid "WP Rocket Redis Settings" +#. Description of the plugin +msgid "Addon to WP Rocket that allows storage of cache files in Redis." msgstr "" -#: includes/class-wpr-redis.php:141 -msgid "WP Rocket Redis:" +#. URI of the plugin +msgid "https://github.com/naxvog/wpr-redis/" +msgstr "" + +#. Author of the plugin +msgid "naxvog " +msgstr "" + +#. Author URI of the plugin +msgid "https://github.com/naxvog/" msgstr "" diff --git a/views/admin-settings.php b/views/admin-settings.php index 1a92edb..a23172d 100644 --- a/views/admin-settings.php +++ b/views/admin-settings.php @@ -1,4 +1,8 @@ + * @version 1.0.1 + */ namespace WPR_Redis; diff --git a/wpr-redis.php b/wpr-redis.php index b802773..9d113ba 100644 --- a/wpr-redis.php +++ b/wpr-redis.php @@ -35,8 +35,8 @@ $loader->add_namespace( 'WP_Rocket', WPR_REDIS_OVERRIDE_PATH . '/wp-rocket' ); function wpr_redis() { - static $instance = null; - if ( null === $instance ) { + static $instance; + if ( ! isset( $instance ) ) { $instance = new WPR_Redis\WPR_Redis(); } return $instance;