From 411d5d72a4e7b4e05124b3bae3ecca76aa0fd9a4 Mon Sep 17 00:00:00 2001
From: Greta Thunberg
Date: Tue, 17 Aug 2021 08:32:06 +0200
Subject: [PATCH] Updates.
---
.../multiple-domain/MultipleDomain.php | 922 ++++++++++++++++++
.../MultipleDomainSettings.php | 355 +++++++
.../languages/multiple-domain-en_US.mo | Bin 0 -> 2613 bytes
.../languages/multiple-domain-en_US.po | 88 ++
.../languages/multiple-domain-pt_BR.mo | Bin 0 -> 2703 bytes
.../languages/multiple-domain-pt_BR.po | 89 ++
.../plugins/multiple-domain/locales.csv | 564 +++++++++++
.../multiple-domain/multiple-domain.php | 139 +++
wp-content/plugins/multiple-domain/readme.txt | 280 ++++++
.../plugins/multiple-domain/settings.js | 21 +
.../plugins/multiple-domain/views/domains.php | 29 +
.../plugins/multiple-domain/views/fields.php | 51 +
.../plugins/multiple-domain/views/heading.php | 4 +
.../plugins/multiple-domain/views/lang.php | 19 +
.../plugins/multiple-domain/views/options.php | 42 +
.../uploads/2021/08/analfabeten-150x127.png | Bin 0 -> 8692 bytes
.../uploads/2021/08/analfabeten-300x117.png | Bin 0 -> 19507 bytes
wp-content/uploads/2021/08/analfabeten.png | Bin 0 -> 13989 bytes
.../uploads/2021/08/dodsstraff-150x80.png | Bin 0 -> 7712 bytes
wp-content/uploads/2021/08/dodsstraff.png | Bin 0 -> 8782 bytes
.../uploads/2021/08/fanskapet-150x105.png | Bin 0 -> 6530 bytes
.../uploads/2021/08/fanskapet-300x93.png | Bin 0 -> 15609 bytes
wp-content/uploads/2021/08/fanskapet.png | Bin 0 -> 13201 bytes
.../uploads/2021/08/fanskapet2-150x115.png | Bin 0 -> 9046 bytes
.../uploads/2021/08/fanskapet2-300x108.png | Bin 0 -> 21362 bytes
wp-content/uploads/2021/08/fanskapet2.png | Bin 0 -> 15026 bytes
wp-content/uploads/2021/08/image-1-150x98.png | Bin 0 -> 5681 bytes
wp-content/uploads/2021/08/image-1-300x51.png | Bin 0 -> 10914 bytes
wp-content/uploads/2021/08/image-1-500x85.png | Bin 0 -> 23216 bytes
wp-content/uploads/2021/08/image-1.png | Bin 0 -> 22396 bytes
wp-content/uploads/2021/08/image-150x150.png | Bin 0 -> 21847 bytes
wp-content/uploads/2021/08/image-2-150x98.png | Bin 0 -> 3189 bytes
wp-content/uploads/2021/08/image-2-300x51.png | Bin 0 -> 8064 bytes
wp-content/uploads/2021/08/image-2-500x85.png | Bin 0 -> 16419 bytes
wp-content/uploads/2021/08/image-2.png | Bin 0 -> 21123 bytes
wp-content/uploads/2021/08/image-260x300.png | Bin 0 -> 65199 bytes
.../uploads/2021/08/image-3-150x150.png | Bin 0 -> 16315 bytes
.../uploads/2021/08/image-3-300x160.png | Bin 0 -> 36774 bytes
.../uploads/2021/08/image-3-500x266.png | Bin 0 -> 79296 bytes
.../uploads/2021/08/image-3-686x288.png | Bin 0 -> 50677 bytes
wp-content/uploads/2021/08/image-3.png | Bin 0 -> 47875 bytes
.../uploads/2021/08/image-4-150x150.png | Bin 0 -> 14667 bytes
wp-content/uploads/2021/08/image-4-300x82.png | Bin 0 -> 22795 bytes
.../uploads/2021/08/image-4-500x136.png | Bin 0 -> 49167 bytes
wp-content/uploads/2021/08/image-4.png | Bin 0 -> 37264 bytes
.../uploads/2021/08/image-5-150x150.png | Bin 0 -> 14667 bytes
wp-content/uploads/2021/08/image-5-300x82.png | Bin 0 -> 22795 bytes
.../uploads/2021/08/image-5-500x136.png | Bin 0 -> 49167 bytes
wp-content/uploads/2021/08/image-5.png | Bin 0 -> 37264 bytes
wp-content/uploads/2021/08/image-768x888.png | Bin 0 -> 371844 bytes
wp-content/uploads/2021/08/image-828x288.png | Bin 0 -> 135730 bytes
wp-content/uploads/2021/08/image.png | Bin 0 -> 564886 bytes
.../uploads/2021/08/kastrering-142x300.png | Bin 0 -> 34355 bytes
.../uploads/2021/08/kastrering-150x150.png | Bin 0 -> 17278 bytes
.../uploads/2021/08/kastrering-331x288.png | Bin 0 -> 33838 bytes
wp-content/uploads/2021/08/kastrering.png | Bin 0 -> 77989 bytes
.../uploads/2021/08/korkskalle-150x83.png | Bin 0 -> 4190 bytes
.../uploads/2021/08/korkskalle-300x63.png | Bin 0 -> 9499 bytes
wp-content/uploads/2021/08/korkskalle.png | Bin 0 -> 9474 bytes
.../uploads/2021/08/namntack-1-150x81.png | Bin 0 -> 7081 bytes
wp-content/uploads/2021/08/namntack-1.png | Bin 0 -> 9988 bytes
.../uploads/2021/08/namntack-150x81.png | Bin 0 -> 7081 bytes
wp-content/uploads/2021/08/namntack.png | Bin 0 -> 9988 bytes
.../uploads/2021/08/peddoaset-150x122.png | Bin 0 -> 5393 bytes
.../uploads/2021/08/peddoaset-300x65.png | Bin 0 -> 11193 bytes
.../uploads/2021/08/peddoaset-500x109.png | Bin 0 -> 23247 bytes
wp-content/uploads/2021/08/peddoaset.png | Bin 0 -> 18817 bytes
.../uploads/2021/08/pedopartiet-150x150.png | Bin 0 -> 8909 bytes
.../uploads/2021/08/pedopartiet-300x99.png | Bin 0 -> 17672 bytes
.../uploads/2021/08/pedopartiet-500x165.png | Bin 0 -> 37481 bytes
wp-content/uploads/2021/08/pedopartiet.png | Bin 0 -> 30196 bytes
.../uploads/2021/08/sammakryp-1-150x95.png | Bin 0 -> 4772 bytes
.../uploads/2021/08/sammakryp-1-300x47.png | Bin 0 -> 10430 bytes
.../uploads/2021/08/sammakryp-1-500x79.png | Bin 0 -> 21994 bytes
wp-content/uploads/2021/08/sammakryp-1.png | Bin 0 -> 18851 bytes
.../uploads/2021/08/sammakryp-150x95.png | Bin 0 -> 4772 bytes
.../uploads/2021/08/sammakryp-2-150x95.png | Bin 0 -> 4772 bytes
.../uploads/2021/08/sammakryp-2-300x47.png | Bin 0 -> 10430 bytes
.../uploads/2021/08/sammakryp-2-500x79.png | Bin 0 -> 21994 bytes
wp-content/uploads/2021/08/sammakryp-2.png | Bin 0 -> 18851 bytes
.../uploads/2021/08/sammakryp-300x47.png | Bin 0 -> 10430 bytes
.../uploads/2021/08/sammakryp-500x79.png | Bin 0 -> 21994 bytes
wp-content/uploads/2021/08/sammakryp.png | Bin 0 -> 18851 bytes
.../2021/08/sinnesnarvaro_0-1-150x99.png | Bin 0 -> 5028 bytes
.../2021/08/sinnesnarvaro_0-1-300x45.png | Bin 0 -> 12062 bytes
.../2021/08/sinnesnarvaro_0-1-500x76.png | Bin 0 -> 23950 bytes
.../uploads/2021/08/sinnesnarvaro_0-1.png | Bin 0 -> 19910 bytes
.../2021/08/sinnesnarvaro_0-150x99.png | Bin 0 -> 5028 bytes
.../2021/08/sinnesnarvaro_0-300x45.png | Bin 0 -> 12062 bytes
.../2021/08/sinnesnarvaro_0-500x76.png | Bin 0 -> 23950 bytes
.../uploads/2021/08/sinnesnarvaro_0.png | Bin 0 -> 19910 bytes
.../uploads/2021/08/vanstern-1-150x141.png | Bin 0 -> 4621 bytes
.../uploads/2021/08/vanstern-1-300x65.png | Bin 0 -> 12328 bytes
.../uploads/2021/08/vanstern-1-500x108.png | Bin 0 -> 25763 bytes
wp-content/uploads/2021/08/vanstern-1.png | Bin 0 -> 24441 bytes
.../uploads/2021/08/vanstern-150x141.png | Bin 0 -> 4621 bytes
.../uploads/2021/08/vanstern-300x65.png | Bin 0 -> 12328 bytes
.../uploads/2021/08/vanstern-500x108.png | Bin 0 -> 25763 bytes
wp-content/uploads/2021/08/vanstern.png | Bin 0 -> 24441 bytes
.../07/cropped-killing-covid-1000x288.jpg | Bin 0 -> 36255 bytes
.../2021/07/cropped-killing-covid-150x150.jpg | Bin 0 -> 14921 bytes
.../2021/07/cropped-killing-covid-300x86.jpg | Bin 0 -> 16050 bytes
.../2021/07/cropped-killing-covid-500x144.jpg | Bin 0 -> 21217 bytes
.../2021/07/cropped-killing-covid-768x221.jpg | Bin 0 -> 29195 bytes
.../sites/2/2021/07/cropped-killing-covid.jpg | Bin 0 -> 36237 bytes
.../uploads/sites/2/2021/07/e-1000x288.jpg | Bin 0 -> 46437 bytes
.../uploads/sites/2/2021/07/e-1024x652.jpg | Bin 0 -> 94834 bytes
.../uploads/sites/2/2021/07/e-150x150.jpg | Bin 0 -> 6282 bytes
.../uploads/sites/2/2021/07/e-1536x978.jpg | Bin 0 -> 176340 bytes
.../uploads/sites/2/2021/07/e-300x191.jpg | Bin 0 -> 15880 bytes
.../uploads/sites/2/2021/07/e-471x300.jpg | Bin 0 -> 31175 bytes
.../uploads/sites/2/2021/07/e-768x489.jpg | Bin 0 -> 62950 bytes
wp-content/uploads/sites/2/2021/07/e.jpg | Bin 0 -> 184570 bytes
.../uploads/sites/2/2021/07/g-1000x288.jpg | Bin 0 -> 56973 bytes
.../uploads/sites/2/2021/07/g-1024x610.jpg | Bin 0 -> 115487 bytes
.../uploads/sites/2/2021/07/g-150x150.jpg | Bin 0 -> 9247 bytes
.../uploads/sites/2/2021/07/g-1536x915.jpg | Bin 0 -> 217440 bytes
.../uploads/sites/2/2021/07/g-300x179.jpg | Bin 0 -> 17887 bytes
.../uploads/sites/2/2021/07/g-500x298.jpg | Bin 0 -> 40714 bytes
.../uploads/sites/2/2021/07/g-768x458.jpg | Bin 0 -> 75989 bytes
wp-content/uploads/sites/2/2021/07/g.jpg | Bin 0 -> 235399 bytes
.../2/2021/07/killing-covid-1000x288.jpg | Bin 0 -> 36057 bytes
.../2/2021/07/killing-covid-1024x535.jpg | Bin 0 -> 45338 bytes
.../sites/2/2021/07/killing-covid-150x150.jpg | Bin 0 -> 14982 bytes
.../sites/2/2021/07/killing-covid-300x157.jpg | Bin 0 -> 17467 bytes
.../sites/2/2021/07/killing-covid-500x261.jpg | Bin 0 -> 24192 bytes
.../sites/2/2021/07/killing-covid-768x401.jpg | Bin 0 -> 34471 bytes
.../uploads/sites/2/2021/07/killing-covid.jpg | Bin 0 -> 60732 bytes
128 files changed, 2603 insertions(+)
create mode 100644 wp-content/plugins/multiple-domain/MultipleDomain.php
create mode 100644 wp-content/plugins/multiple-domain/MultipleDomainSettings.php
create mode 100644 wp-content/plugins/multiple-domain/languages/multiple-domain-en_US.mo
create mode 100644 wp-content/plugins/multiple-domain/languages/multiple-domain-en_US.po
create mode 100644 wp-content/plugins/multiple-domain/languages/multiple-domain-pt_BR.mo
create mode 100644 wp-content/plugins/multiple-domain/languages/multiple-domain-pt_BR.po
create mode 100644 wp-content/plugins/multiple-domain/locales.csv
create mode 100644 wp-content/plugins/multiple-domain/multiple-domain.php
create mode 100644 wp-content/plugins/multiple-domain/readme.txt
create mode 100644 wp-content/plugins/multiple-domain/settings.js
create mode 100644 wp-content/plugins/multiple-domain/views/domains.php
create mode 100644 wp-content/plugins/multiple-domain/views/fields.php
create mode 100644 wp-content/plugins/multiple-domain/views/heading.php
create mode 100644 wp-content/plugins/multiple-domain/views/lang.php
create mode 100644 wp-content/plugins/multiple-domain/views/options.php
create mode 100644 wp-content/uploads/2021/08/analfabeten-150x127.png
create mode 100644 wp-content/uploads/2021/08/analfabeten-300x117.png
create mode 100644 wp-content/uploads/2021/08/analfabeten.png
create mode 100644 wp-content/uploads/2021/08/dodsstraff-150x80.png
create mode 100644 wp-content/uploads/2021/08/dodsstraff.png
create mode 100644 wp-content/uploads/2021/08/fanskapet-150x105.png
create mode 100644 wp-content/uploads/2021/08/fanskapet-300x93.png
create mode 100644 wp-content/uploads/2021/08/fanskapet.png
create mode 100644 wp-content/uploads/2021/08/fanskapet2-150x115.png
create mode 100644 wp-content/uploads/2021/08/fanskapet2-300x108.png
create mode 100644 wp-content/uploads/2021/08/fanskapet2.png
create mode 100644 wp-content/uploads/2021/08/image-1-150x98.png
create mode 100644 wp-content/uploads/2021/08/image-1-300x51.png
create mode 100644 wp-content/uploads/2021/08/image-1-500x85.png
create mode 100644 wp-content/uploads/2021/08/image-1.png
create mode 100644 wp-content/uploads/2021/08/image-150x150.png
create mode 100644 wp-content/uploads/2021/08/image-2-150x98.png
create mode 100644 wp-content/uploads/2021/08/image-2-300x51.png
create mode 100644 wp-content/uploads/2021/08/image-2-500x85.png
create mode 100644 wp-content/uploads/2021/08/image-2.png
create mode 100644 wp-content/uploads/2021/08/image-260x300.png
create mode 100644 wp-content/uploads/2021/08/image-3-150x150.png
create mode 100644 wp-content/uploads/2021/08/image-3-300x160.png
create mode 100644 wp-content/uploads/2021/08/image-3-500x266.png
create mode 100644 wp-content/uploads/2021/08/image-3-686x288.png
create mode 100644 wp-content/uploads/2021/08/image-3.png
create mode 100644 wp-content/uploads/2021/08/image-4-150x150.png
create mode 100644 wp-content/uploads/2021/08/image-4-300x82.png
create mode 100644 wp-content/uploads/2021/08/image-4-500x136.png
create mode 100644 wp-content/uploads/2021/08/image-4.png
create mode 100644 wp-content/uploads/2021/08/image-5-150x150.png
create mode 100644 wp-content/uploads/2021/08/image-5-300x82.png
create mode 100644 wp-content/uploads/2021/08/image-5-500x136.png
create mode 100644 wp-content/uploads/2021/08/image-5.png
create mode 100644 wp-content/uploads/2021/08/image-768x888.png
create mode 100644 wp-content/uploads/2021/08/image-828x288.png
create mode 100644 wp-content/uploads/2021/08/image.png
create mode 100644 wp-content/uploads/2021/08/kastrering-142x300.png
create mode 100644 wp-content/uploads/2021/08/kastrering-150x150.png
create mode 100644 wp-content/uploads/2021/08/kastrering-331x288.png
create mode 100644 wp-content/uploads/2021/08/kastrering.png
create mode 100644 wp-content/uploads/2021/08/korkskalle-150x83.png
create mode 100644 wp-content/uploads/2021/08/korkskalle-300x63.png
create mode 100644 wp-content/uploads/2021/08/korkskalle.png
create mode 100644 wp-content/uploads/2021/08/namntack-1-150x81.png
create mode 100644 wp-content/uploads/2021/08/namntack-1.png
create mode 100644 wp-content/uploads/2021/08/namntack-150x81.png
create mode 100644 wp-content/uploads/2021/08/namntack.png
create mode 100644 wp-content/uploads/2021/08/peddoaset-150x122.png
create mode 100644 wp-content/uploads/2021/08/peddoaset-300x65.png
create mode 100644 wp-content/uploads/2021/08/peddoaset-500x109.png
create mode 100644 wp-content/uploads/2021/08/peddoaset.png
create mode 100644 wp-content/uploads/2021/08/pedopartiet-150x150.png
create mode 100644 wp-content/uploads/2021/08/pedopartiet-300x99.png
create mode 100644 wp-content/uploads/2021/08/pedopartiet-500x165.png
create mode 100644 wp-content/uploads/2021/08/pedopartiet.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-1-150x95.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-1-300x47.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-1-500x79.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-1.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-150x95.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-2-150x95.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-2-300x47.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-2-500x79.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-2.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-300x47.png
create mode 100644 wp-content/uploads/2021/08/sammakryp-500x79.png
create mode 100644 wp-content/uploads/2021/08/sammakryp.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0-1-150x99.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0-1-300x45.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0-1-500x76.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0-1.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0-150x99.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0-300x45.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0-500x76.png
create mode 100644 wp-content/uploads/2021/08/sinnesnarvaro_0.png
create mode 100644 wp-content/uploads/2021/08/vanstern-1-150x141.png
create mode 100644 wp-content/uploads/2021/08/vanstern-1-300x65.png
create mode 100644 wp-content/uploads/2021/08/vanstern-1-500x108.png
create mode 100644 wp-content/uploads/2021/08/vanstern-1.png
create mode 100644 wp-content/uploads/2021/08/vanstern-150x141.png
create mode 100644 wp-content/uploads/2021/08/vanstern-300x65.png
create mode 100644 wp-content/uploads/2021/08/vanstern-500x108.png
create mode 100644 wp-content/uploads/2021/08/vanstern.png
create mode 100644 wp-content/uploads/sites/2/2021/07/cropped-killing-covid-1000x288.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/cropped-killing-covid-150x150.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/cropped-killing-covid-300x86.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/cropped-killing-covid-500x144.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/cropped-killing-covid-768x221.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/cropped-killing-covid.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e-1000x288.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e-1024x652.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e-150x150.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e-1536x978.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e-300x191.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e-471x300.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e-768x489.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/e.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g-1000x288.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g-1024x610.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g-150x150.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g-1536x915.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g-300x179.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g-500x298.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g-768x458.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/g.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/killing-covid-1000x288.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/killing-covid-1024x535.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/killing-covid-150x150.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/killing-covid-300x157.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/killing-covid-500x261.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/killing-covid-768x401.jpg
create mode 100644 wp-content/uploads/sites/2/2021/07/killing-covid.jpg
diff --git a/wp-content/plugins/multiple-domain/MultipleDomain.php b/wp-content/plugins/multiple-domain/MultipleDomain.php
new file mode 100644
index 000000000..bf1e3bbe0
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/MultipleDomain.php
@@ -0,0 +1,922 @@
+
+ * - Alexander Nosov
+ * - João Faria
+ * - Raphael Stäbler
+ * - Tobias Keller
+ * - Maxime Granier
+ *
+ * @author Gustavo Straube
+ * @version 1.0.6
+ * @package multiple-domain
+ */
+class MultipleDomain
+{
+
+ /**
+ * The plugin version.
+ *
+ * @var string
+ * @since 0.3
+ */
+ const VERSION = '1.0.6';
+
+ /**
+ * The number of the default HTTP port.
+ *
+ * @var integer
+ */
+ const PORT_HTTP = 80;
+
+ /**
+ * The number of the default HTTPS port.
+ *
+ * @var integer
+ */
+ const PORT_HTTPS = 443;
+
+ /**
+ * The plugin instance.
+ *
+ * @var \MultipleDomain
+ * @since 0.8.4
+ */
+ private static $instance;
+
+ /**
+ * The current domain.
+ *
+ * This property's value also may include the host port when it's
+ * different than `80` (the default HTTP port) and `443` (the default HTTPS
+ * port).
+ *
+ * @var string
+ * @since 0.2
+ */
+ private $domain = null;
+
+ /**
+ * The original domain set in WordPress installation.
+ *
+ * This property's value also may include the host port when it's
+ * different than `80` (the default HTTP port) and `443` (the default HTTPS
+ * port).
+ *
+ * @var string
+ * @since 0.3
+ */
+ private $originalDomain = null;
+
+ /**
+ * The list of available domains.
+ *
+ * This array holds all available domains as its keys. Each item in the
+ * array is also an array containing the following keys:
+ *
+ * - `base`
+ * - `lang`
+ * - `protocol`
+ *
+ * @var string
+ */
+ private $domains = [];
+
+ /**
+ * Indicate whether the default ports should be ingored.
+ *
+ * This check is used when redirecting from a domain to another, for
+ * example.
+ *
+ * @var bool
+ * @since 0.11.0
+ */
+ private $ignoreDefaultPorts = false;
+
+ /**
+ * Indicate whether canonical link should be added to pages.
+ *
+ * @var bool
+ * @since 0.11.0
+ */
+ private $addCanonical = false;
+
+ /**
+ * Plugin activation tasks.
+ *
+ * The required plugin options are added to WordPress. We also make sure
+ * this plugin is the first loaded here.
+ *
+ * @return void
+ * @since 0.7
+ */
+ public static function activate()
+ {
+ add_option('multiple-domain-domains', []);
+ add_option('multiple-domain-ignore-default-ports', true);
+ add_option('multiple-domain-add-canonical', false);
+
+ self::loadFirst();
+ }
+
+ /**
+ * Update plugin loading order to load this plugin before any other plugin
+ * and make sure all plugins use the right domain replacements.
+ *
+ * @return void
+ * @since 0.8.7
+ */
+ public static function loadFirst()
+ {
+ /*
+ * Relative path to this plugin. The array of active plugins has the
+ * plugin path as its keys. We'll use this path to move Multiple Domain
+ * to the first position in that array.
+ */
+ $path = str_replace(WP_PLUGIN_DIR . '/', '', MULTIPLE_DOMAIN_PLUGIN);
+ $plugins = get_option('active_plugins');
+
+ if (empty($plugins)) {
+ return;
+ }
+
+ if (($key = array_search($path, $plugins))) {
+ array_splice($plugins, $key, 1);
+ array_unshift($plugins, $path);
+ update_option('active_plugins', $plugins);
+ }
+ }
+
+ /**
+ * Get the single plugin instance.
+ *
+ * @return \MultipleDomain The plugin instance.
+ * @since 0.8.4
+ */
+ public static function instance()
+ {
+ if (!isset(self::$instance)) {
+ self::$instance = new self();
+ }
+ return self::$instance;
+ }
+
+ /**
+ * Create a new instance.
+ *
+ * Adds actions and filters required by the plugin.
+ */
+ private function __construct()
+ {
+ $this->initAttributes();
+ $this->hookActions();
+ $this->hookFilters();
+ $this->hookShortcodes();
+
+ new MultipleDomainSettings($this);
+ }
+
+ //
+ // WordPress API integration
+ //
+
+ /**
+ * Initialize the class attributes.
+ *
+ * @return void
+ * @since 0.8
+ */
+ private function initAttributes()
+ {
+ $this->ignoreDefaultPorts = (bool) get_option('multiple-domain-ignore-default-ports');
+ $this->originalDomain = $this->getDomainFromUrl(get_option('home'), $this->ignoreDefaultPorts);
+
+ $this->domain = $this->getDomainFromRequest();
+
+ $domains = (array) get_option('multiple-domain-domains');
+ $this->resetDomains();
+ foreach ($domains as $domain => $options) {
+ $options = wp_parse_args($options, [
+ 'base' => null,
+ 'lang' => null,
+ 'protocol' => null,
+ ]);
+ $this->addDomain($domain, $options['base'], $options['lang'], $options['protocol']);
+ }
+
+ if (!array_key_exists($this->domain, $this->domains)) {
+ $this->domain = $this->originalDomain;
+ }
+
+ $this->addCanonical = (bool) get_option('multiple-domain-add-canonical');
+ }
+
+ /**
+ * Hook plugin actions to WordPress.
+ *
+ * @return void
+ * @since 0.8
+ */
+ private function hookActions()
+ {
+ add_action('init', [ $this, 'redirect' ]);
+ add_action('wp_head', [ $this, 'addHrefLangTags' ]);
+ add_action('wp_head', [ $this, 'addCanonicalTag' ]);
+ add_action('plugins_loaded', [ $this, 'loaded' ]);
+ add_action('activated_plugin', [ self::class, 'loadFirst' ]);
+ add_action('wpseo_register_extra_replacements', [ $this, 'registerYoastVars' ]);
+ }
+
+ /**
+ * Hook plugin filters to WordPress.
+ *
+ * @return void
+ * @since 0.8
+ */
+ private function hookFilters()
+ {
+
+ // Generic domain replacement
+ add_filter('content_url', [ $this, 'fixUrl' ]);
+ add_filter('option_siteurl', [ $this, 'fixUrl' ]);
+ add_filter('option_home', [ $this, 'fixUrl' ]);
+ add_filter('plugins_url', [ $this, 'fixUrl' ]);
+ add_filter('wp_get_attachment_url', [ $this, 'fixUrl' ]);
+ add_filter('get_the_guid', [ $this, 'fixUrl' ]);
+
+ // Specific domain replacement filters
+ add_filter('upload_dir', [ $this, 'fixUploadDir' ]);
+ add_filter('the_content', [ $this, 'fixContentUrls' ], 20);
+ add_filter('allowed_http_origins', [ $this, 'addAllowedOrigins' ]);
+
+ // Add body class based on domain
+ add_filter('body_class', [ $this, 'addDomainBodyClass' ]);
+
+ // Stop WP built in Canonical URL if this plugin has 'Add canonical links' enabled
+ add_filter('get_canonical_url', [ $this, 'getCanonicalUrl' ]);
+ }
+
+ /**
+ * Hook plugin shortcodes to WordPress.
+ *
+ * @return void
+ * @since 0.8.5
+ */
+ private function hookShortcodes()
+ {
+ add_shortcode('multiple_domain', [ $this, 'shortcode' ]);
+ }
+
+ //
+ //
+ //
+
+ /**
+ * Return the current domain.
+ *
+ * Since this value is checked against plugin settings, it may not reflect
+ * the actual current domain in `HTTP_HOST` key from global `$_SERVER` var.
+ *
+ * Depending on the plugin settings, the domain also may include the host
+ * port when it's different than `80` (the default HTTP port) and `443` (the
+ * default HTTPS port).
+ *
+ * @return string|null The domain.
+ * @since 0.2
+ */
+ public function getDomain()
+ {
+ return $this->domain;
+ }
+
+ /**
+ * Return original domain set in WordPress installation.
+ *
+ * Notice this method may return an unexpected value when running the site
+ * using the `server` command from wp-cli. That's because wp-cli changes the
+ * value of `site_url` and `home_url` options through a filter.
+ * Unfortunately, it's not possible to change this behaviour.
+ *
+ * The domain also may include the host port when it's different than `80`
+ * (the default HTTP port) and `443` (the default HTTPS port).
+ *
+ * @return string The domain.
+ * @since 0.3
+ */
+ public function getOriginalDomain()
+ {
+ return $this->originalDomain;
+ }
+
+ /**
+ * Return all domains available.
+ *
+ * The keys in the returned array are the domain name. Each item in the
+ * array is also an array containing the following keys:
+ *
+ * - `base`
+ * - `lang`
+ * - `protocol`
+ *
+ * @return array The list of domains.
+ * @since 0.11.0
+ */
+ public function getDomains()
+ {
+ return $this->domains;
+ }
+
+ /**
+ * Indicate whether the default ports (`80` or `443`) should be ingored.
+ *
+ * This check is used when redirecting from a domain to another, for
+ * example.
+ *
+ * @return bool A boolean indicating if the default port should be ignored.
+ * @since 0.8.2
+ */
+ public function shouldIgnoreDefaultPorts()
+ {
+ return $this->ignoreDefaultPorts;
+ }
+
+ /**
+ * Indicate whether the canonical tags should be added to page.
+ *
+ * @return bool A boolean indicating if the default port should be ignored.
+ * @since 0.11.0
+ */
+ public function shouldAddCanonical()
+ {
+ return $this->addCanonical;
+ }
+
+ /**
+ * Get the base path associated to the given domain.
+ *
+ * If no domain is passed to the function, it'll return the base path for
+ * the current domain.
+ *
+ * Notice this function may return `null` when no base path is set for a
+ * given domain in the plugin config.
+ *
+ * @param string|null $domain The domain.
+ * @return string|null The base path.
+ * @since 0.10.3
+ */
+ public function getDomainBase($domain = null)
+ {
+ return $this->getDomainAttribute('base', $domain);
+ }
+
+ /**
+ * Get the language associated to the given domain.
+ *
+ * If no domain is passed to the function, it'll return the language for
+ * the current domain.
+ *
+ * Notice this function may return `null` when no language is set for a
+ * given domain in the plugin config.
+ *
+ * @param string|null $domain The domain.
+ * @return string|null The language code.
+ * @since 0.8
+ */
+ public function getDomainLang($domain = null)
+ {
+ return $this->getDomainAttribute('lang', $domain);
+ }
+
+ /**
+ * Get the protocol option for the given domain.
+ *
+ * If no domain is passed to the function, it'll return the option for the
+ * current domain.
+ *
+ * The possible returned values are `http`, `https`, or `auto` (default). If
+ * no protocol is defined for a given domain, the default value will be
+ * returned.
+ *
+ * @param string|null $domain The domain.
+ * @return string The protocol option.
+ * @since 0.10.0
+ */
+ public function getDomainProtocol($domain = null)
+ {
+ $protocol = $this->getDomainAttribute('protocol', $domain);
+ return in_array($protocol, [ 'http', 'https' ]) ? $protocol : 'auto';
+ }
+
+ /**
+ * Reset the list of domains.
+ *
+ * In case the `$keepOriginal` param is `true`, which is the default, the
+ * list of domains will have only the original domain where WordPress was
+ * installed.
+ *
+ * @param bool $keepOriginal Indicates whether the original domain should
+ * be kept.
+ * @return void
+ * @since 1.0.0
+ */
+ public function resetDomains($keepOriginal = true)
+ {
+ if (!$keepOriginal || empty($this->originalDomain)) {
+ $this->domains = [];
+ return;
+ }
+
+ $this->domains = [
+ $this->originalDomain => [
+ 'base' => null,
+ 'lang' => null,
+ 'protocol' => 'auto',
+ ],
+ ];
+ }
+
+ /**
+ * Add a new domain to the list of domains.
+ *
+ * Besides the `$domain` param, all other are optional.
+ *
+ * @param string $domain The domain.
+ * @param string $base The base path.
+ * @param string $lang The language.
+ * @param string $protocol The protocol option. It can be `http`, `https`
+ * or `auto`.
+ * @return void
+ * @since 1.0.0
+ */
+ public function addDomain($domain, $base = null, $lang = null, $protocol = 'auto')
+ {
+ $this->domains[$domain] = [
+ 'base' => $base,
+ 'lang' => $lang,
+ 'protocol' => $protocol,
+ ];
+ }
+
+ /**
+ * Store the current list of domains in the WordPress options.
+ *
+ * This is can be used to persist changes made to the list of domains with
+ * `resetDomains` and `addDomain` methods.
+ *
+ * @return void
+ * @since 1.0.0
+ */
+ public function storeDomains()
+ {
+ update_option('multiple-domain-domains', $this->domains);
+ }
+
+ /**
+ * When the current domain has a base URL restriction and the current
+ * request URI doesn't match it, redirects the user.
+ *
+ * @return void
+ */
+ public function redirect()
+ {
+ /*
+ * Allow developers to create their own logic for redirection.
+ */
+ do_action('multiple_domain_redirect', $this->domain);
+
+ $base = $this->getDomainBase();
+ $uri = !empty($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null;
+
+ $base = ltrim($base, '/');
+ $uri = ltrim($uri, '/');
+
+ if (empty($base) || preg_match('/^wp-[a-z]+(\.php|\/|$)/i', $uri)) {
+ return;
+ }
+
+ if (strpos($uri, $base) !== 0) {
+ wp_redirect(home_url('/' . $base));
+ exit;
+ }
+ }
+
+ /**
+ * Replaces the domain in the given URL.
+ *
+ * The domain in the given URL is replaced with the current domain. If the
+ * URL contains `/wp-admin/` it'll be ignored when replacing the domain and
+ * returned as is.
+ *
+ * @param string $url The URL to fix.
+ * @return string The domain replaced URL.
+ * @since 0.10.0
+ */
+ public function fixUrl($url)
+ {
+ if (!preg_match('/\/wp-admin\/?/', $url)) {
+ $domain = $this->getDomainFromUrl($url);
+ $url = $this->replaceDomain($domain, $url);
+ }
+ return $url;
+ }
+
+ /**
+ * Replaces the domain in `upload_dir` filter used by `wp_upload_dir()`.
+ *
+ * The domain in the given `url` and `baseurl` is replaced by the current
+ * domain.
+ *
+ * @param array $uploads The array of `url`, `baseurl` and other
+ * properties.
+ * @return array The domain-replaced values.
+ * @since 0.4
+ */
+ public function fixUploadDir($uploads)
+ {
+ $uploads['url'] = $this->fixUrl($uploads['url']);
+ $uploads['baseurl'] = $this->fixUrl($uploads['baseurl']);
+ return $uploads;
+ }
+
+ /**
+ * Replaces the domain in post content.
+ *
+ * All occurrences of any of the available domains (i.e. all domains set in
+ * the plugin config) will be replaced with the current domain.
+ *
+ * @param string $content The content to fix.
+ * @return string The domain replaced content.
+ * @since 0.8
+ */
+ public function fixContentUrls($content)
+ {
+ foreach (array_keys($this->domains) as $domain) {
+ $content = $this->replaceDomain($domain, $content);
+ }
+ return $content;
+ }
+
+ /**
+ * Add all available domains to allowed origins.
+ *
+ * This filter is used to prevent CORS issues.
+ *
+ * @param array $origins The default list of allowed origins.
+ * @return array The updated list of allowed origins.
+ * @since 0.8
+ */
+ public function addAllowedOrigins($origins)
+ {
+ foreach (array_keys($this->domains) as $domain) {
+ $origins[] = 'https://' . $domain;
+ $origins[] = 'http://' . $domain;
+ }
+ return array_values(array_unique($origins));
+ }
+
+ /**
+ * Add the current domain to the body class in a sanitized version.
+ *
+ * If the current domain is `example.com`, the class added to the page body
+ * will be `multiple-domain-example-com`. Notice this filter only has effect
+ * when the `body_class()` function is added to the page's ` tag`.
+ *
+ * @param array $classes The initial list of body class names.
+ * @return array Updated list of body class names.
+ * @since 0.9.0
+ */
+ public function addDomainBodyClass($classes)
+ {
+ $classes[] = 'multiple-domain-' . preg_replace('/[^a-z0-9]+/i', '-', $this->domain);
+ return $classes;
+ }
+
+ /**
+ * Add `hreflang` links to head for SEO purpose.
+ *
+ * @return void
+ * @author Alexander Nosov
+ * @since 0.4
+ */
+ public function addHrefLangTags()
+ {
+ /**
+ * The WP class instance.
+ *
+ * @var WP
+ */
+ global $wp;
+
+ $uri = trailingslashit('/' . ltrim(add_query_arg([], $wp->request), '/'));
+ $currentProtocol = $this->getCurrentProtocol();
+
+ foreach (array_keys($this->domains) as $domain) {
+ $protocol = $this->getDomainProtocol($domain);
+ if ($protocol === 'auto') {
+ $protocol = $currentProtocol;
+ }
+ $protocol .= '://';
+
+ $lang = $this->getDomainLang($domain);
+
+ if (!empty($lang)) {
+ $this->outputHrefLangTag($protocol . $domain . $uri, $lang);
+ }
+
+ if ($domain === $this->originalDomain) {
+ $this->outputHrefLangTag($protocol . $domain . $uri);
+ }
+ }
+ }
+
+ /**
+ * Add `canonical` links to head for SEO purpose.
+ *
+ * @return void
+ * @since 0.11.0
+ */
+ public function addCanonicalTag()
+ {
+ if (!$this->shouldAddCanonical()) {
+ return;
+ }
+
+ /**
+ * The WP class instance.
+ *
+ * @var WP
+ */
+ global $wp;
+
+ $uri = home_url(add_query_arg([], $wp->request), 'relative') . '/';
+ $currentProtocol = $this->getCurrentProtocol();
+
+ $protocol = $this->getDomainProtocol($this->originalDomain);
+ if ($protocol === 'auto') {
+ $protocol = $currentProtocol;
+ }
+ $protocol .= '://';
+
+ $this->outputCanonicalTag($protocol . $this->originalDomain . $uri);
+ }
+
+ /**
+ * This shortcode simply returns the current domain.
+ *
+ * @return string The current domain.
+ * @since 0.8.5
+ */
+ public function shortcode()
+ {
+ return $this->domain;
+ }
+
+ /**
+ * Load text domain when plugin is loaded.
+ *
+ * @return void
+ * @since 0.8.6
+ */
+ public function loaded()
+ {
+ $path = dirname(plugin_basename(MULTIPLE_DOMAIN_PLUGIN)) . '/languages/';
+ load_plugin_textdomain('multiple-domain', false, $path);
+ }
+
+ /**
+ * Register vars to be used as text replacements in Yoast tags.
+ *
+ * @return void
+ * @since 0.11.0
+ */
+ public function registerYoastVars()
+ {
+ wpseo_register_var_replacement(
+ '%%multiple_domain%%',
+ [ $this, 'getDomain' ],
+ 'advanced',
+ __('The current domain from Multiple Domain', 'multiple-domain')
+ );
+ }
+
+ /**
+ * Get the current domain via request headers parsing.
+ *
+ * @return string|null The current domain.
+ * @since 0.8.7
+ */
+ private function getDomainFromRequest()
+ {
+ $domain = $this->getHostHeader();
+
+ if (empty($domain)) {
+ return null;
+ }
+
+ $matches = [];
+ if (preg_match('/^(.*):(\d+)$/', $domain, $matches) && $this->isDefaultPort($matches[2])) {
+ $domain = $matches[1];
+ }
+ return $domain;
+ }
+
+ /**
+ * Get the `Host` HTTP header value.
+ *
+ * To make it compatible with proxies, this function first tries to get the
+ * value from `X-Host` header and, then, falls back to the regular `Host`
+ * header.
+ *
+ * It returns `null` in case both headers are empty.
+ *
+ * @return string|null The HTTP `Host` header value.
+ * @since 0.8.7
+ */
+ private function getHostHeader()
+ {
+ if (!empty($_SERVER['HTTP_X_HOST'])) {
+ return $_SERVER['HTTP_X_HOST'];
+ }
+
+ if (!empty($_SERVER['HTTP_HOST'])) {
+ return $_SERVER['HTTP_HOST'];
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the current URL protocol based on server settings.
+ *
+ * The possible returned values are `http` and `https`.
+ *
+ * @return string The protocol.
+ */
+ private function getCurrentProtocol()
+ {
+ return empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off' ? 'http' : 'https';
+ }
+
+ /**
+ * Get an attribute by its name for the given domain.
+ *
+ * If no domain is passed to the function, it'll return the attribute value
+ * for the current domain.
+ *
+ * Notice this function may return `null` when the attribute is not set in
+ * the plugin config or doesn't exist.
+ *
+ * @param string $name The attribute name.
+ * @param string|null $domain The domain.
+ * @return string The attribute value.
+ * @since 0.10.0
+ */
+ private function getDomainAttribute($name, $domain = null)
+ {
+ if (empty($domain)) {
+ $domain = $this->domain;
+ }
+ $attribute = null;
+ if (!empty($this->domains[$domain][$name])) {
+ $attribute = $this->domains[$domain][$name];
+ }
+ return $attribute;
+ }
+
+ /**
+ * Replaces the domain.
+ *
+ * All occurrences of the given domain will be replaced with the current
+ * domain in the content.
+ *
+ * The protocol may also be replaced following the protocol settings defined
+ * in the plugin config for the current domain.
+ *
+ * @param string $domain The domain to replace.
+ * @param string $content The content that will have the domain replaced.
+ * @return string The domain-replaced content.
+ */
+ private function replaceDomain($domain, $content)
+ {
+ if (MULTIPLE_DOMAIN_LOW_MEMORY) {
+ return $this->replaceDomainUsingLessMemory($domain, $content);
+ }
+ if (array_key_exists($domain, $this->domains)) {
+ $regex = '/(https?):\/\/' . preg_quote($domain, '/') . '(?![a-z0-9.\-:])/i';
+ $protocol = $this->getDomainProtocol($this->domain);
+ $replace = ($protocol === 'auto' ? '${1}' : $protocol) . '://' . $this->domain;
+ $content = preg_replace($regex, $replace, $content);
+ }
+ return $content;
+ }
+
+ /**
+ * Replaces the domain using less memory.
+ *
+ * This function does the same as `replaceDoamin`, however it uses
+ * `mb_eregi_replace` instead of `preg_replace` for less memory consumption.
+ * On the other hand, it takes more time to execute.
+ *
+ * @param string $domain The domain to replace.
+ * @param string $content The content that will have the domain replaced.
+ * @return string The domain-replaced content.
+ * @since 1.0.2
+ */
+ private function replaceDomainUsingLessMemory($domain, $content)
+ {
+ if (array_key_exists($domain, $this->domains)) {
+ $regex = '(https?):\/\/' . preg_quote($domain, '/') . '(?![a-z0-9.\-:])';
+ $protocol = $this->getDomainProtocol($this->domain);
+ $replace = ($protocol === 'auto' ? '\\1' : $protocol) . '://' . $this->domain;
+ $content = mb_eregi_replace($regex, $replace, $content);
+ }
+ return $content;
+ }
+
+ /**
+ * Parses the given URL to return only its domain.
+ *
+ * The server port may be included in the returning value depending on its
+ * number and plugin settings.
+ *
+ * @param string $url The URL to parse.
+ * @param bool $ignoreDefaultPorts If `true` is passed to this value, a
+ * default HTTP or HTTPS port will be ignored even if it's present
+ * in the URL.
+ * @return string The domain.
+ * @since 0.2
+ */
+ private function getDomainFromUrl($url, $ignoreDefaultPorts = false)
+ {
+ $parts = parse_url($url);
+ $domain = $parts['host'];
+ if (!empty($parts['port']) && !($ignoreDefaultPorts && $this->isDefaultPort($parts['port']))) {
+ $domain .= ':' . $parts['port'];
+ }
+ return $domain;
+ }
+
+ /**
+ * Checks if the given port is a default HTTP (`80`) or HTTPS (`443`) port.
+ *
+ * @param int $port The port to check.
+ * @return bool Indicates if the port is a default one.
+ * @since 0.2
+ */
+ private function isDefaultPort($port)
+ {
+ $port = (int) $port;
+ return $port === self::PORT_HTTP || $port === self::PORT_HTTPS;
+ }
+
+ /**
+ * Prints a `hreflang` link tag.
+ *
+ * @param string $url The URL to be set into `href` attribute.
+ * @param string $lang The language code to be set into `hreflang`
+ * attribute. Defaults to `x-default`.
+ * @return void
+ * @since 0.5
+ */
+ private function outputHrefLangTag($url, $lang = 'x-default')
+ {
+ $url = htmlentities($url);
+ $lang = str_replace('_', '-', $lang);
+ printf('', $url, $lang);
+ }
+
+ /**
+ * Prints a `canonical` link tag.
+ *
+ * @param string $url The canonical URL to be set into `href` attribute.
+ * @return void
+ * @since 0.11.0
+ */
+ private function outputCanonicalTag($url)
+ {
+ $url = htmlentities($url);
+ printf('', $url);
+ }
+
+ /**
+ * Filter override WordPress built-in canonical tag generation if using the this plugin's canonical tag feature
+ *
+ * @param $url
+ * @return string
+ */
+ public function getCanonicalUrl($url)
+ {
+ // If *not* using the plugin's canonical tags, then return this URL. Otherwise, don't
+ if (!$this->shouldAddCanonical()) {
+ return $url;
+ }
+ return '';
+ }
+}
diff --git a/wp-content/plugins/multiple-domain/MultipleDomainSettings.php b/wp-content/plugins/multiple-domain/MultipleDomainSettings.php
new file mode 100644
index 000000000..5ec48ee6e
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/MultipleDomainSettings.php
@@ -0,0 +1,355 @@
+
+ * @version 1.0.6
+ * @since 0.11.0
+ * @package multiple-domain
+ */
+class MultipleDomainSettings
+{
+
+ /**
+ * The plugin core instance.
+ *
+ * @var \MultipleDomain
+ */
+ private $core;
+
+ /**
+ * Create a new instance.
+ *
+ * Adds actions and filters required by the plugin for the admin.
+ *
+ * @param \MultipleDomain $core The core plugin class instance.
+ */
+ public function __construct(MultipleDomain $core)
+ {
+ $this->core = $core;
+
+ $this->hookActions();
+ $this->hookFilters();
+ }
+
+ //
+ // WordPress API integration
+ //
+
+ /**
+ * Hook plugin actions to WordPress.
+ *
+ * @return void
+ */
+ private function hookActions()
+ {
+ add_action('admin_init', [ $this, 'settings' ]);
+ add_action('admin_enqueue_scripts', [ $this, 'scripts' ]);
+ }
+
+ /**
+ * Hook plugin filters to WordPress.
+ *
+ * @return void
+ */
+ private function hookFilters()
+ {
+ add_filter('plugin_action_links_' . plugin_basename(MULTIPLE_DOMAIN_PLUGIN), [ $this, 'actionLinks' ]);
+ }
+
+ //
+ //
+ //
+
+ /**
+ * Sets up the required settings to show in the admin.
+ *
+ * @return void
+ */
+ public function settings()
+ {
+ add_settings_section('multiple-domain', __('Multiple Domain', 'multiple-domain'), [
+ $this,
+ 'settingsHeading',
+ ], 'general');
+ add_settings_field('multiple-domain-domains', __('Domains', 'multiple-domain'), [
+ $this,
+ 'settingsFieldsForDomains',
+ ], 'general', 'multiple-domain');
+ add_settings_field('multiple-domain-options', __('Options', 'multiple-domain'), [
+ $this,
+ 'settingsFieldsForOptions',
+ ], 'general', 'multiple-domain');
+
+ register_setting('general', 'multiple-domain-domains', [
+ $this,
+ 'sanitizeDomainsSettings',
+ ]);
+ register_setting('general', 'multiple-domain-ignore-default-ports', [
+ $this,
+ 'castToBool',
+ ]);
+ register_setting('general', 'multiple-domain-add-canonical', [
+ $this,
+ 'castToBool',
+ ]);
+ }
+
+ /**
+ * Sanitizes the domain settings.
+ *
+ * It takes the value sent by the user in the settings form and parses it
+ * to store in the internal format used by the plugin.
+ *
+ * @param array $value The user defined option value.
+ * @return array The sanitized option value.
+ */
+ public function sanitizeDomainsSettings($value)
+ {
+ $domains = [];
+ if (is_array($value)) {
+ foreach ($value as $row) {
+ if (empty($row['host'])) {
+ continue;
+ }
+ $host = preg_replace('/^https?:\/\//i', '', $row['host']);
+ $base = !empty($row['base']) ? $row['base'] : null;
+ $lang = !empty($row['lang']) ? $row['lang'] : null;
+ $proto = !empty($row['protocol']) ? $row['protocol'] : 'auto';
+ $domains[$host] = [
+ 'base' => $base,
+ 'lang' => $lang,
+ 'protocol' => $proto,
+ ];
+ }
+ }
+ return $domains;
+ }
+
+ /**
+ * Casts the given value to boolean.
+ *
+ * @param mixed $value The value to cast.
+ * @return bool A bolean representing the passed value.
+ */
+ public function castToBool($value)
+ {
+ return (bool) $value;
+ }
+
+ /**
+ * Renders the settings heading.
+ *
+ * @return void
+ */
+ public function settingsHeading()
+ {
+ echo $this->loadView('heading');
+ }
+
+ /**
+ * Renders the fields for setting domains.
+ *
+ * @return void
+ */
+ public function settingsFieldsForDomains()
+ {
+ $fields = '';
+ $counter = 0;
+
+ foreach ($this->core->getDomains() as $domain => $values) {
+ $base = null;
+ $lang = null;
+ $protocol = null;
+
+ /*
+ * Backward compatibility with earlier versions.
+ */
+ if (is_string($values)) {
+ $base = $values;
+ } else {
+ $base = !empty($values['base']) ? $values['base'] : null;
+ $lang = !empty($values['lang']) ? $values['lang'] : null;
+ $protocol = !empty($values['protocol']) ? $values['protocol'] : null;
+ }
+ $fields .= $this->getDomainFields($counter++, $domain, $base, $lang, $protocol);
+ }
+
+ /*
+ * Adds a row of empty fields to the settings when no domain is set.
+ */
+ if ($counter === 0) {
+ $fields = $this->getDomainFields($counter);
+ }
+
+ $fieldsToAdd = $this->getDomainFields('COUNT');
+ echo $this->loadView('domains', compact('fields', 'fieldsToAdd'));
+ }
+
+ /**
+ * Renders the fields for plugin options.
+ *
+ * @return void
+ */
+ public function settingsFieldsForOptions()
+ {
+ $ignoreDefaultPorts = $this->core->shouldIgnoreDefaultPorts();
+ $addCanonical = $this->core->shouldAddCanonical();
+ echo $this->loadView('options', compact('ignoreDefaultPorts', 'addCanonical'));
+ }
+
+ /**
+ * Enqueues the required scripts.
+ *
+ * @param string $hook The current admin page.
+ * @return void
+ */
+ public function scripts($hook)
+ {
+ if ($hook !== 'options-general.php') {
+ return;
+ }
+ $settingsPath = plugins_url('settings.js', MULTIPLE_DOMAIN_PLUGIN);
+ wp_enqueue_script('multiple-domain-settings', $settingsPath, [ 'jquery' ], MultipleDomain::VERSION, true);
+ }
+
+ /**
+ * Add the "Settings" link to the plugin row in the plugins page.
+ *
+ * @param array $links The default list of links.
+ * @return array The updated list of links.
+ */
+ public function actionLinks($links)
+ {
+ $url = admin_url('options-general.php#multiple-domain');
+ $link = '' . __('Settings', 'multiple-domain') . '';
+ array_unshift($links, $link);
+ return $links;
+ }
+
+ /**
+ * Returns the fields for a domain setting.
+ *
+ * @param int $count The field count. It's used within the field name,
+ * since it's an array.
+ * @param string $host The host field value.
+ * @param string $base The base URL field value.
+ * @param string $lang The language field value.
+ * @param string $protocol The protocol handling option.
+ * @return string The rendered group of fields.
+ */
+ private function getDomainFields($count, $host = null, $base = null, $lang = null, $protocol = null)
+ {
+ $langField = $this->getLangField($count, $lang);
+ return $this->loadView('fields', compact('count', 'host', 'base', 'protocol', 'langField'));
+ }
+
+ /**
+ * Gets the language field for domain settings.
+ *
+ * @param int $count The field count. It's used within the field name,
+ * since it's an array.
+ * @param string $lang The selected language.
+ * @return string The rendered field.
+ */
+ private function getLangField($count, $lang = null)
+ {
+ /*
+ * Backward compability with a locale defined in previous versions.
+ *
+ * The HTML `lang` attribute uses a dash (`en-US`) to separate language
+ * and region, but WP languages have an underscore (`en_US`).
+ */
+ if (!empty($lang)) {
+ $lang = str_replace('-', '_', $lang);
+ }
+
+ $locales = $this->getLocales();
+
+ return $this->loadView('lang', compact('count', 'lang', 'locales'));
+ }
+
+ /**
+ * Get the list of locales.
+ *
+ * The keys of the returned array are locale codes and the values are
+ * their names.
+ *
+ * A cached version will be returned if available.
+ *
+ * @return array The locales list.
+ */
+ private function getLocales()
+ {
+ $locales = wp_cache_get('locales', 'multiple-domain');
+
+ if (empty($locales)) {
+ $locales = $this->getLocalesFromFile();
+ wp_cache_set('locales', $locales, 'multiple-domain');
+ }
+
+ return $locales;
+ }
+
+ /**
+ * Get the list of locales from the source file.
+ *
+ * The keys of the returned array are locale codes and the values are
+ * their names.
+ *
+ * @return array The locales list.
+ */
+ private function getLocalesFromFile()
+ {
+ $locales = [];
+
+ $handle = fopen(dirname(MULTIPLE_DOMAIN_PLUGIN) . '/locales.csv', 'r');
+ while (($row = fgetcsv($handle)) !== false) {
+ $locales[$row[0]] = $row[1];
+ }
+ fclose($handle);
+ asort($locales);
+
+ return $locales;
+ }
+
+ /**
+ * Load a view and return its contents.
+ *
+ * @param string $name The view name.
+ * @param array|null $data The data to pass to the view. Each key will be
+ * extracted as a variable into the view file.
+ * @return string The view contents.
+ */
+ private function loadView($name, $data = null)
+ {
+ $path = sprintf('%s/views/%s.php', dirname(MULTIPLE_DOMAIN_PLUGIN), $name);
+ if (!is_file($path)) {
+ return false;
+ }
+
+ ob_start();
+ if (is_array($data)) {
+ extract($this->replaceNull($data));
+ }
+ include $path;
+ return ob_get_clean();
+ }
+
+ /**
+ * Replace all `null` values in an array.
+ *
+ * @param array $array The original array.
+ * @param mixed $replacement The value to replace the `null` occurrences.
+ * @return array The array with replaced values.
+ */
+ private function replaceNull($array, $replacement = '')
+ {
+ return array_map(function ($value) use ($replacement) {
+ return $value === null ? $replacement : $value;
+ }, $array);
+ }
+}
diff --git a/wp-content/plugins/multiple-domain/languages/multiple-domain-en_US.mo b/wp-content/plugins/multiple-domain/languages/multiple-domain-en_US.mo
new file mode 100644
index 0000000000000000000000000000000000000000..dd37e7fa40ec65429e8e14e7d491ff534d92e1b9
GIT binary patch
literal 2613
zcmeHHy>A>v6dxdb9iWH^M1#$zr=nO`%i3Mou`CoKP^NT*uuAbMu^veIq*5)7r^I%UjbhOehoYi{I2=`Baroe
z2EG8i4`hyC8XTSz;(OTs6}SeTdr)ScpPGh
zqE|dQFJW|^`Lv=qF*wg~V61Q^$*hXKO30gsR6^PuZ|~fd#Vl8w?eTV0NgLOtPL|F|
zt7tPeiP~1RdKjBxvt9im)~tnXCU4KAPaD}P%~PcpZfAOW)=JwTF!uBz%J@2ubN-AA
zX9z>Ok|Y@iQRc_1u(aY3bmy{huK4;KR!OxZZWU{#7
z#oYJvOn-WD>idiPdpUJ={AF{!)T#+{EHtD?YR9FoT;MuLOk5U9drFl|LIIx}55)Ui
z4;;bM1tG3g<8tjE~utDC)N~IK{lDIi-%Lkd9DJAnrxUq9E}EasZPsAr@8KBLfx`txDc(c
zubs%a1wwJ#loU%%h%glk$Lq>-gl0K5rKMZOCIj?^W4=tY4{)vZ1>
zI^CeVLEU$vwe_IW>vW(P9H=`PTX~G$yHT%K>+MPBgOQcm<eXG}p5>T7
zeTq|QQU6!i(v@>EH(Z)FQt&f8blvcL(abPe+JoUm}*oCD247gUg
zR3i#ogS@md53U%Ti#tC0S0M(ddb|I^|6H-#WG-T(jq
literal 0
HcmV?d00001
diff --git a/wp-content/plugins/multiple-domain/languages/multiple-domain-en_US.po b/wp-content/plugins/multiple-domain/languages/multiple-domain-en_US.po
new file mode 100644
index 000000000..0df61d314
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/languages/multiple-domain-en_US.po
@@ -0,0 +1,88 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Multiple Domain\n"
+"POT-Creation-Date: 2019-01-18 15:34-0200\n"
+"PO-Revision-Date: 2019-01-18 16:22-0200\n"
+"Last-Translator: \n"
+"Language-Team: Straube \n"
+"Language: en_US\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2.1\n"
+"X-Poedit-Basepath: .\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-KeywordsList: __;_e\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: MultipleDomain.php:181
+msgid "Multiple Domain"
+msgstr "Multiple Domain"
+
+#: MultipleDomain.php:185
+msgid "Domains"
+msgstr "Domains"
+
+#: MultipleDomain.php:189
+msgid "Options"
+msgstr "Options"
+
+#: MultipleDomain.php:251
+msgid ""
+"You can use multiple domains in your WordPress defining them below. It's "
+"possible to limit the access for each domain to a base URL."
+msgstr ""
+"You can use multiple domains in your WordPress defining them below. It’s "
+"possible to limit the access for each domain to a base URL."
+
+#: MultipleDomain.php:283
+msgid "Add domain"
+msgstr "Add domain"
+
+#: MultipleDomain.php:285
+msgid ""
+"A domain may contain the port number. If a base URL restriction is set for a "
+"domain, all requests that don't start with the base URL will be redirected "
+"to the base URL. Example: the domain and base URL are example."
+"com and /base/path, when requesting example.com/"
+"other/path it will be redirected to example.com/base/path"
+"code>. Additionaly, it's possible to set a language for each domain, which "
+"will be used to add <link> tags with a hreflang"
+"code> attribute to the document head."
+msgstr ""
+"A domain may contain the port number. If a base URL restriction is set for a "
+"domain, all requests that don’t start with the base URL will be redirected "
+"to the base URL. Example: the domain and base URL are example."
+"com and /base/path, when requesting example.com/"
+"other/path it will be redirected to example.com/base/path"
+"code>. Additionaly, it’s possible to set a language for each domain, which "
+"will be used to add <link> tags with a hreflang"
+"code> attribute to the document head."
+
+#: MultipleDomain.php:305
+msgid "Ignore default ports"
+msgstr "Ignore default ports"
+
+#: MultipleDomain.php:306
+msgid ""
+"When enabled, removes the port from URL when redirecting and it's a default "
+"HTTP (80) or HTTPS (443) port."
+msgstr ""
+"When enabled, removes the port from URL when redirecting and it’s a default "
+"HTTP (80) or HTTPS (443) port."
+
+#: MultipleDomain.php:412
+msgid "Settings"
+msgstr "Settings"
+
+#: MultipleDomain.php:609
+msgid "Domain"
+msgstr "Domain"
+
+#: MultipleDomain.php:612
+msgid "Base path restriction"
+msgstr "Base path restriction"
+
+#: MultipleDomain.php:615
+msgid "Remove"
+msgstr "Remove"
diff --git a/wp-content/plugins/multiple-domain/languages/multiple-domain-pt_BR.mo b/wp-content/plugins/multiple-domain/languages/multiple-domain-pt_BR.mo
new file mode 100644
index 0000000000000000000000000000000000000000..607b8ef07716987e813561f8b4b71da1a8762cc3
GIT binary patch
literal 2703
zcmZ`)%Z}Vc6g5eBH6TO;Y(VI)@{ro@M*ySUz>%T#=-tUkv
zLH+^BKK`ub&Z#K+1-Ac!RPggPluu*-Unsu=dE(`8?mbBSqO5B?_
z7RH3bPI=ambpl2Yl$&@LbAty82Zj=7GG%1yWJXRurIOIvaQ*rNQA~5W))}r3{B9k(
zD6>Uy!bn<6btczkP)|}_tabbfv1Zupu=CDTxJkX&rh|zro3K?mUbfQFD2zFJh!m%D
zT<}XFEICZ*a+WDBqR0>1uyod<=+>%XE;)TJtDszz<4TOBudo#9WM1ThiNagsy|STb
zB5N`{le^Vim7kv(yVWLtC&o6^U)1SMj2y9#MngEXc33$d0^=alX;sM5(L{vYc(aLYS8
z&DO<>7v_6B0!j3#t|%2Hp~6%&fd}MS!mu3b%FtbHvMtPoWq+#V7!YOwQ0Mvp^Yd(T
zb5#I3oQX(NKE?xdq`eG)#l$7imeHSKFyf6Yz9WrAwFdM|6HgRrh
z2b~UBfEO@e>#bWGx2`Wj>m}XRRgejA6Ym~Q5s8xzTxXhtT~;Zb2m^Fq+S|PmuPpS8
zDD6m^_%`fVMO!!cjlzCq3+h*O-yWKparg+R7^<^7w`}
zg&j~i^{@6)f0e@HrE?{%Q}6uh;`qn%@Bsa@o65QY?eDMd%hsl_2%SU9gJ-OSNgUAB
z?O)km9N&?`q?0Z9kGmW}v{&$m%pR9Y1Mr#jyebV<1(mZWg)|x{@uMIT+L2fn^$5)#
z&3^EkOtYRI85aRknZU3a!B!gUZNMbcmW1`Zg^t3&uNVSCxKGX=ffEaU1f=GM
ztu)>j6E1)tG8pmp7dkcRN|3G&q>I>^#DLrop=C2mbl31nL&lv{6snwPPlNSl8*yS%
zbrZbvFH5F6x^hN01{%X0|MxiQhu$ZEVsm|#&mZHO$yfQjb0#<0rrA%PeP@sF%N!MV
z(jZ>po2D`aQVZ5o6lz`sPC$aFIg-i>WD+V^n>OV6HUxAW9dk=C=YesXA}%p9x+sR+
z#eBl`$1gClW;PB<03&r@z@hwco&%}Q-M5NK*`sp)Q1dg=WUliF$QTyKFmymxP0=R8
zbdS^+qgJnf5;{2%LzOFsQZ#%Gn0VWSx-t0XEuS}z5g@t#JO@E{Dts88nj2<5O4`-`
zl6Df^(dq1G*ujXQCx(jI6aTfroHRwUei--@TODC;RtV&cfW%O!2RfnILzuEQz{0aO
VOk$f!n<@G!Jm8&kXl5*l{sS;{X-EJ7
literal 0
HcmV?d00001
diff --git a/wp-content/plugins/multiple-domain/languages/multiple-domain-pt_BR.po b/wp-content/plugins/multiple-domain/languages/multiple-domain-pt_BR.po
new file mode 100644
index 000000000..2490b9802
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/languages/multiple-domain-pt_BR.po
@@ -0,0 +1,89 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Multiple Domain\n"
+"POT-Creation-Date: 2019-01-18 15:34-0200\n"
+"PO-Revision-Date: 2019-01-18 16:22-0200\n"
+"Language-Team: Straube \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.2.1\n"
+"X-Poedit-Basepath: .\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Poedit-KeywordsList: __;_e\n"
+"Last-Translator: \n"
+"Language: pt_BR\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: MultipleDomain.php:181
+msgid "Multiple Domain"
+msgstr "Multiple Domain"
+
+#: MultipleDomain.php:185
+msgid "Domains"
+msgstr "Domínios"
+
+#: MultipleDomain.php:189
+msgid "Options"
+msgstr "Opções"
+
+#: MultipleDomain.php:251
+msgid ""
+"You can use multiple domains in your WordPress defining them below. It's "
+"possible to limit the access for each domain to a base URL."
+msgstr ""
+"Você pode usar múltiplos domínios com o seu WordPress os definindo abaixo. É "
+"possível limitar o acesso a cada domínio a uma URL base."
+
+#: MultipleDomain.php:283
+msgid "Add domain"
+msgstr "Adicionar domínio"
+
+#: MultipleDomain.php:285
+msgid ""
+"A domain may contain the port number. If a base URL restriction is set for a "
+"domain, all requests that don't start with the base URL will be redirected "
+"to the base URL. Example: the domain and base URL are example."
+"com and /base/path, when requesting example.com/"
+"other/path it will be redirected to example.com/base/path"
+"code>. Additionaly, it's possible to set a language for each domain, which "
+"will be used to add <link> tags with a hreflang"
+"code> attribute to the document head."
+msgstr ""
+"Um domínio pode conter um número de porta. Se uma restrição de URL base for "
+"definida para um domínio, todos as requisições que não começarem com a URL "
+"base serão direcionadas para a URL base. Exemplo: o domínio e a base "
+"são example.com e /caminho/base, quando "
+"requisitando example.com/outro/caminho será redirecionado para "
+"example.com/caminho/base. Adicionalmente, é possível determinar "
+"um idioma para cada domínio, que será usado para adicionar tags <"
+"link> com o atributo hreflang ao cabeçalho do "
+"documento."
+
+#: MultipleDomain.php:305
+msgid "Ignore default ports"
+msgstr "Ignorar portas padrão"
+
+#: MultipleDomain.php:306
+msgid ""
+"When enabled, removes the port from URL when redirecting and it's a default "
+"HTTP (80) or HTTPS (443) port."
+msgstr ""
+"Quando habilitado, remove a porta da URL quando redirecionando e é uma porta "
+"padrão HTTP (80) ou HTTPS (443)."
+
+#: MultipleDomain.php:412
+msgid "Settings"
+msgstr "Configurações"
+
+#: MultipleDomain.php:609
+msgid "Domain"
+msgstr "Domínio"
+
+#: MultipleDomain.php:612
+msgid "Base path restriction"
+msgstr "Restrição de caminho base"
+
+#: MultipleDomain.php:615
+msgid "Remove"
+msgstr "Remover"
diff --git a/wp-content/plugins/multiple-domain/locales.csv b/wp-content/plugins/multiple-domain/locales.csv
new file mode 100644
index 000000000..583fd3446
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/locales.csv
@@ -0,0 +1,564 @@
+id,value
+af,Afrikaans
+af_NA,"Afrikaans (Namibia)"
+af_ZA,"Afrikaans (South Africa)"
+ak,Akan
+ak_GH,"Akan (Ghana)"
+sq,Albanian
+sq_AL,"Albanian (Albania)"
+sq_XK,"Albanian (Kosovo)"
+sq_MK,"Albanian (Macedonia)"
+am,Amharic
+am_ET,"Amharic (Ethiopia)"
+ar,Arabic
+ar_DZ,"Arabic (Algeria)"
+ar_BH,"Arabic (Bahrain)"
+ar_TD,"Arabic (Chad)"
+ar_KM,"Arabic (Comoros)"
+ar_DJ,"Arabic (Djibouti)"
+ar_EG,"Arabic (Egypt)"
+ar_ER,"Arabic (Eritrea)"
+ar_IQ,"Arabic (Iraq)"
+ar_IL,"Arabic (Israel)"
+ar_JO,"Arabic (Jordan)"
+ar_KW,"Arabic (Kuwait)"
+ar_LB,"Arabic (Lebanon)"
+ar_LY,"Arabic (Libya)"
+ar_MR,"Arabic (Mauritania)"
+ar_MA,"Arabic (Morocco)"
+ar_OM,"Arabic (Oman)"
+ar_PS,"Arabic (Palestinian Territories)"
+ar_QA,"Arabic (Qatar)"
+ar_SA,"Arabic (Saudi Arabia)"
+ar_SO,"Arabic (Somalia)"
+ar_SS,"Arabic (South Sudan)"
+ar_SD,"Arabic (Sudan)"
+ar_SY,"Arabic (Syria)"
+ar_TN,"Arabic (Tunisia)"
+ar_AE,"Arabic (United Arab Emirates)"
+ar_EH,"Arabic (Western Sahara)"
+ar_YE,"Arabic (Yemen)"
+hy,Armenian
+hy_AM,"Armenian (Armenia)"
+as,Assamese
+as_IN,"Assamese (India)"
+az,Azerbaijani
+az_AZ,"Azerbaijani (Azerbaijan)"
+az_Cyrl_AZ,"Azerbaijani (Cyrillic, Azerbaijan)"
+az_Cyrl,"Azerbaijani (Cyrillic)"
+az_Latn_AZ,"Azerbaijani (Latin, Azerbaijan)"
+az_Latn,"Azerbaijani (Latin)"
+bm,Bambara
+bm_Latn_ML,"Bambara (Latin, Mali)"
+bm_Latn,"Bambara (Latin)"
+eu,Basque
+eu_ES,"Basque (Spain)"
+be,Belarusian
+be_BY,"Belarusian (Belarus)"
+bn,Bengali
+bn_BD,"Bengali (Bangladesh)"
+bn_IN,"Bengali (India)"
+bs,Bosnian
+bs_BA,"Bosnian (Bosnia & Herzegovina)"
+bs_Cyrl_BA,"Bosnian (Cyrillic, Bosnia & Herzegovina)"
+bs_Cyrl,"Bosnian (Cyrillic)"
+bs_Latn_BA,"Bosnian (Latin, Bosnia & Herzegovina)"
+bs_Latn,"Bosnian (Latin)"
+br,Breton
+br_FR,"Breton (France)"
+bg,Bulgarian
+bg_BG,"Bulgarian (Bulgaria)"
+my,Burmese
+my_MM,"Burmese (Myanmar (Burma))"
+ca,Catalan
+ca_AD,"Catalan (Andorra)"
+ca_FR,"Catalan (France)"
+ca_IT,"Catalan (Italy)"
+ca_ES,"Catalan (Spain)"
+zh,Chinese
+zh_CN,"Chinese (China)"
+zh_HK,"Chinese (Hong Kong SAR China)"
+zh_MO,"Chinese (Macau SAR China)"
+zh_Hans_CN,"Chinese (Simplified, China)"
+zh_Hans_HK,"Chinese (Simplified, Hong Kong SAR China)"
+zh_Hans_MO,"Chinese (Simplified, Macau SAR China)"
+zh_Hans_SG,"Chinese (Simplified, Singapore)"
+zh_Hans,"Chinese (Simplified)"
+zh_SG,"Chinese (Singapore)"
+zh_TW,"Chinese (Taiwan)"
+zh_Hant_HK,"Chinese (Traditional, Hong Kong SAR China)"
+zh_Hant_MO,"Chinese (Traditional, Macau SAR China)"
+zh_Hant_TW,"Chinese (Traditional, Taiwan)"
+zh_Hant,"Chinese (Traditional)"
+kw,Cornish
+kw_GB,"Cornish (United Kingdom)"
+hr,Croatian
+hr_BA,"Croatian (Bosnia & Herzegovina)"
+hr_HR,"Croatian (Croatia)"
+cs,Czech
+cs_CZ,"Czech (Czech Republic)"
+da,Danish
+da_DK,"Danish (Denmark)"
+da_GL,"Danish (Greenland)"
+nl,Dutch
+nl_AW,"Dutch (Aruba)"
+nl_BE,"Dutch (Belgium)"
+nl_BQ,"Dutch (Caribbean Netherlands)"
+nl_CW,"Dutch (Curaçao)"
+nl_NL,"Dutch (Netherlands)"
+nl_SX,"Dutch (Sint Maarten)"
+nl_SR,"Dutch (Suriname)"
+dz,Dzongkha
+dz_BT,"Dzongkha (Bhutan)"
+en,English
+en_AS,"English (American Samoa)"
+en_AI,"English (Anguilla)"
+en_AG,"English (Antigua & Barbuda)"
+en_AU,"English (Australia)"
+en_BS,"English (Bahamas)"
+en_BB,"English (Barbados)"
+en_BE,"English (Belgium)"
+en_BZ,"English (Belize)"
+en_BM,"English (Bermuda)"
+en_BW,"English (Botswana)"
+en_IO,"English (British Indian Ocean Territory)"
+en_VG,"English (British Virgin Islands)"
+en_CM,"English (Cameroon)"
+en_CA,"English (Canada)"
+en_KY,"English (Cayman Islands)"
+en_CX,"English (Christmas Island)"
+en_CC,"English (Cocos (Keeling) Islands)"
+en_CK,"English (Cook Islands)"
+en_DG,"English (Diego Garcia)"
+en_DM,"English (Dominica)"
+en_ER,"English (Eritrea)"
+en_FK,"English (Falkland Islands)"
+en_FJ,"English (Fiji)"
+en_GM,"English (Gambia)"
+en_GH,"English (Ghana)"
+en_GI,"English (Gibraltar)"
+en_GD,"English (Grenada)"
+en_GU,"English (Guam)"
+en_GG,"English (Guernsey)"
+en_GY,"English (Guyana)"
+en_HK,"English (Hong Kong SAR China)"
+en_IN,"English (India)"
+en_IE,"English (Ireland)"
+en_IM,"English (Isle of Man)"
+en_JM,"English (Jamaica)"
+en_JE,"English (Jersey)"
+en_KE,"English (Kenya)"
+en_KI,"English (Kiribati)"
+en_LS,"English (Lesotho)"
+en_LR,"English (Liberia)"
+en_MO,"English (Macau SAR China)"
+en_MG,"English (Madagascar)"
+en_MW,"English (Malawi)"
+en_MY,"English (Malaysia)"
+en_MT,"English (Malta)"
+en_MH,"English (Marshall Islands)"
+en_MU,"English (Mauritius)"
+en_FM,"English (Micronesia)"
+en_MS,"English (Montserrat)"
+en_NA,"English (Namibia)"
+en_NR,"English (Nauru)"
+en_NZ,"English (New Zealand)"
+en_NG,"English (Nigeria)"
+en_NU,"English (Niue)"
+en_NF,"English (Norfolk Island)"
+en_MP,"English (Northern Mariana Islands)"
+en_PK,"English (Pakistan)"
+en_PW,"English (Palau)"
+en_PG,"English (Papua New Guinea)"
+en_PH,"English (Philippines)"
+en_PN,"English (Pitcairn Islands)"
+en_PR,"English (Puerto Rico)"
+en_RW,"English (Rwanda)"
+en_WS,"English (Samoa)"
+en_SC,"English (Seychelles)"
+en_SL,"English (Sierra Leone)"
+en_SG,"English (Singapore)"
+en_SX,"English (Sint Maarten)"
+en_SB,"English (Solomon Islands)"
+en_ZA,"English (South Africa)"
+en_SS,"English (South Sudan)"
+en_SH,"English (St. Helena)"
+en_KN,"English (St. Kitts & Nevis)"
+en_LC,"English (St. Lucia)"
+en_VC,"English (St. Vincent & Grenadines)"
+en_SD,"English (Sudan)"
+en_SZ,"English (Swaziland)"
+en_TZ,"English (Tanzania)"
+en_TK,"English (Tokelau)"
+en_TO,"English (Tonga)"
+en_TT,"English (Trinidad & Tobago)"
+en_TC,"English (Turks & Caicos Islands)"
+en_TV,"English (Tuvalu)"
+en_UM,"English (U.S. Outlying Islands)"
+en_VI,"English (U.S. Virgin Islands)"
+en_UG,"English (Uganda)"
+en_GB,"English (United Kingdom)"
+en_US,"English (United States)"
+en_VU,"English (Vanuatu)"
+en_ZM,"English (Zambia)"
+en_ZW,"English (Zimbabwe)"
+eo,Esperanto
+et,Estonian
+et_EE,"Estonian (Estonia)"
+ee,Ewe
+ee_GH,"Ewe (Ghana)"
+ee_TG,"Ewe (Togo)"
+fo,Faroese
+fo_FO,"Faroese (Faroe Islands)"
+fi,Finnish
+fi_FI,"Finnish (Finland)"
+fr,French
+fr_DZ,"French (Algeria)"
+fr_BE,"French (Belgium)"
+fr_BJ,"French (Benin)"
+fr_BF,"French (Burkina Faso)"
+fr_BI,"French (Burundi)"
+fr_CM,"French (Cameroon)"
+fr_CA,"French (Canada)"
+fr_CF,"French (Central African Republic)"
+fr_TD,"French (Chad)"
+fr_KM,"French (Comoros)"
+fr_CG,"French (Congo - Brazzaville)"
+fr_CD,"French (Congo - Kinshasa)"
+fr_CI,"French (Côte d’Ivoire)"
+fr_DJ,"French (Djibouti)"
+fr_GQ,"French (Equatorial Guinea)"
+fr_FR,"French (France)"
+fr_GF,"French (French Guiana)"
+fr_PF,"French (French Polynesia)"
+fr_GA,"French (Gabon)"
+fr_GP,"French (Guadeloupe)"
+fr_GN,"French (Guinea)"
+fr_HT,"French (Haiti)"
+fr_LU,"French (Luxembourg)"
+fr_MG,"French (Madagascar)"
+fr_ML,"French (Mali)"
+fr_MQ,"French (Martinique)"
+fr_MR,"French (Mauritania)"
+fr_MU,"French (Mauritius)"
+fr_YT,"French (Mayotte)"
+fr_MC,"French (Monaco)"
+fr_MA,"French (Morocco)"
+fr_NC,"French (New Caledonia)"
+fr_NE,"French (Niger)"
+fr_RE,"French (Réunion)"
+fr_RW,"French (Rwanda)"
+fr_SN,"French (Senegal)"
+fr_SC,"French (Seychelles)"
+fr_BL,"French (St. Barthélemy)"
+fr_MF,"French (St. Martin)"
+fr_PM,"French (St. Pierre & Miquelon)"
+fr_CH,"French (Switzerland)"
+fr_SY,"French (Syria)"
+fr_TG,"French (Togo)"
+fr_TN,"French (Tunisia)"
+fr_VU,"French (Vanuatu)"
+fr_WF,"French (Wallis & Futuna)"
+ff,Fulah
+ff_CM,"Fulah (Cameroon)"
+ff_GN,"Fulah (Guinea)"
+ff_MR,"Fulah (Mauritania)"
+ff_SN,"Fulah (Senegal)"
+gl,Galician
+gl_ES,"Galician (Spain)"
+lg,Ganda
+lg_UG,"Ganda (Uganda)"
+ka,Georgian
+ka_GE,"Georgian (Georgia)"
+de,German
+de_AT,"German (Austria)"
+de_BE,"German (Belgium)"
+de_DE,"German (Germany)"
+de_LI,"German (Liechtenstein)"
+de_LU,"German (Luxembourg)"
+de_CH,"German (Switzerland)"
+el,Greek
+el_CY,"Greek (Cyprus)"
+el_GR,"Greek (Greece)"
+gu,Gujarati
+gu_IN,"Gujarati (India)"
+ha,Hausa
+ha_GH,"Hausa (Ghana)"
+ha_Latn_GH,"Hausa (Latin, Ghana)"
+ha_Latn_NE,"Hausa (Latin, Niger)"
+ha_Latn_NG,"Hausa (Latin, Nigeria)"
+ha_Latn,"Hausa (Latin)"
+ha_NE,"Hausa (Niger)"
+ha_NG,"Hausa (Nigeria)"
+he,Hebrew
+he_IL,"Hebrew (Israel)"
+hi,Hindi
+hi_IN,"Hindi (India)"
+hu,Hungarian
+hu_HU,"Hungarian (Hungary)"
+is,Icelandic
+is_IS,"Icelandic (Iceland)"
+ig,Igbo
+ig_NG,"Igbo (Nigeria)"
+id,Indonesian
+id_ID,"Indonesian (Indonesia)"
+ga,Irish
+ga_IE,"Irish (Ireland)"
+it,Italian
+it_IT,"Italian (Italy)"
+it_SM,"Italian (San Marino)"
+it_CH,"Italian (Switzerland)"
+ja,Japanese
+ja_JP,"Japanese (Japan)"
+kl,Kalaallisut
+kl_GL,"Kalaallisut (Greenland)"
+kn,Kannada
+kn_IN,"Kannada (India)"
+ks,Kashmiri
+ks_Arab_IN,"Kashmiri (Arabic, India)"
+ks_Arab,"Kashmiri (Arabic)"
+ks_IN,"Kashmiri (India)"
+kk,Kazakh
+kk_Cyrl_KZ,"Kazakh (Cyrillic, Kazakhstan)"
+kk_Cyrl,"Kazakh (Cyrillic)"
+kk_KZ,"Kazakh (Kazakhstan)"
+km,Khmer
+km_KH,"Khmer (Cambodia)"
+ki,Kikuyu
+ki_KE,"Kikuyu (Kenya)"
+rw,Kinyarwanda
+rw_RW,"Kinyarwanda (Rwanda)"
+ko,Korean
+ko_KP,"Korean (North Korea)"
+ko_KR,"Korean (South Korea)"
+ky,Kyrgyz
+ky_Cyrl_KG,"Kyrgyz (Cyrillic, Kyrgyzstan)"
+ky_Cyrl,"Kyrgyz (Cyrillic)"
+ky_KG,"Kyrgyz (Kyrgyzstan)"
+lo,Lao
+lo_LA,"Lao (Laos)"
+lv,Latvian
+lv_LV,"Latvian (Latvia)"
+ln,Lingala
+ln_AO,"Lingala (Angola)"
+ln_CF,"Lingala (Central African Republic)"
+ln_CG,"Lingala (Congo - Brazzaville)"
+ln_CD,"Lingala (Congo - Kinshasa)"
+lt,Lithuanian
+lt_LT,"Lithuanian (Lithuania)"
+lu,Luba-Katanga
+lu_CD,"Luba-Katanga (Congo - Kinshasa)"
+lb,Luxembourgish
+lb_LU,"Luxembourgish (Luxembourg)"
+mk,Macedonian
+mk_MK,"Macedonian (Macedonia)"
+mg,Malagasy
+mg_MG,"Malagasy (Madagascar)"
+ms,Malay
+ms_BN,"Malay (Brunei)"
+ms_Latn_BN,"Malay (Latin, Brunei)"
+ms_Latn_MY,"Malay (Latin, Malaysia)"
+ms_Latn_SG,"Malay (Latin, Singapore)"
+ms_Latn,"Malay (Latin)"
+ms_MY,"Malay (Malaysia)"
+ms_SG,"Malay (Singapore)"
+ml,Malayalam
+ml_IN,"Malayalam (India)"
+mt,Maltese
+mt_MT,"Maltese (Malta)"
+gv,Manx
+gv_IM,"Manx (Isle of Man)"
+mr,Marathi
+mr_IN,"Marathi (India)"
+mn,Mongolian
+mn_Cyrl_MN,"Mongolian (Cyrillic, Mongolia)"
+mn_Cyrl,"Mongolian (Cyrillic)"
+mn_MN,"Mongolian (Mongolia)"
+ne,Nepali
+ne_IN,"Nepali (India)"
+ne_NP,"Nepali (Nepal)"
+nd,"North Ndebele"
+nd_ZW,"North Ndebele (Zimbabwe)"
+se,"Northern Sami"
+se_FI,"Northern Sami (Finland)"
+se_NO,"Northern Sami (Norway)"
+se_SE,"Northern Sami (Sweden)"
+no,Norwegian
+no_NO,"Norwegian (Norway)"
+nb,"Norwegian Bokmål"
+nb_NO,"Norwegian Bokmål (Norway)"
+nb_SJ,"Norwegian Bokmål (Svalbard & Jan Mayen)"
+nn,"Norwegian Nynorsk"
+nn_NO,"Norwegian Nynorsk (Norway)"
+or,Oriya
+or_IN,"Oriya (India)"
+om,Oromo
+om_ET,"Oromo (Ethiopia)"
+om_KE,"Oromo (Kenya)"
+os,Ossetic
+os_GE,"Ossetic (Georgia)"
+os_RU,"Ossetic (Russia)"
+ps,Pashto
+ps_AF,"Pashto (Afghanistan)"
+fa,Persian
+fa_AF,"Persian (Afghanistan)"
+fa_IR,"Persian (Iran)"
+pl,Polish
+pl_PL,"Polish (Poland)"
+pt,Portuguese
+pt_AO,"Portuguese (Angola)"
+pt_BR,"Portuguese (Brazil)"
+pt_CV,"Portuguese (Cape Verde)"
+pt_GW,"Portuguese (Guinea-Bissau)"
+pt_MO,"Portuguese (Macau SAR China)"
+pt_MZ,"Portuguese (Mozambique)"
+pt_PT,"Portuguese (Portugal)"
+pt_ST,"Portuguese (São Tomé & Príncipe)"
+pt_TL,"Portuguese (Timor-Leste)"
+pa,Punjabi
+pa_Arab_PK,"Punjabi (Arabic, Pakistan)"
+pa_Arab,"Punjabi (Arabic)"
+pa_Guru_IN,"Punjabi (Gurmukhi, India)"
+pa_Guru,"Punjabi (Gurmukhi)"
+pa_IN,"Punjabi (India)"
+pa_PK,"Punjabi (Pakistan)"
+qu,Quechua
+qu_BO,"Quechua (Bolivia)"
+qu_EC,"Quechua (Ecuador)"
+qu_PE,"Quechua (Peru)"
+ro,Romanian
+ro_MD,"Romanian (Moldova)"
+ro_RO,"Romanian (Romania)"
+rm,Romansh
+rm_CH,"Romansh (Switzerland)"
+rn,Rundi
+rn_BI,"Rundi (Burundi)"
+ru,Russian
+ru_BY,"Russian (Belarus)"
+ru_KZ,"Russian (Kazakhstan)"
+ru_KG,"Russian (Kyrgyzstan)"
+ru_MD,"Russian (Moldova)"
+ru_RU,"Russian (Russia)"
+ru_UA,"Russian (Ukraine)"
+sg,Sango
+sg_CF,"Sango (Central African Republic)"
+gd,"Scottish Gaelic"
+gd_GB,"Scottish Gaelic (United Kingdom)"
+sr,Serbian
+sr_BA,"Serbian (Bosnia & Herzegovina)"
+sr_Cyrl_BA,"Serbian (Cyrillic, Bosnia & Herzegovina)"
+sr_Cyrl_XK,"Serbian (Cyrillic, Kosovo)"
+sr_Cyrl_ME,"Serbian (Cyrillic, Montenegro)"
+sr_Cyrl_RS,"Serbian (Cyrillic, Serbia)"
+sr_Cyrl,"Serbian (Cyrillic)"
+sr_XK,"Serbian (Kosovo)"
+sr_Latn_BA,"Serbian (Latin, Bosnia & Herzegovina)"
+sr_Latn_XK,"Serbian (Latin, Kosovo)"
+sr_Latn_ME,"Serbian (Latin, Montenegro)"
+sr_Latn_RS,"Serbian (Latin, Serbia)"
+sr_Latn,"Serbian (Latin)"
+sr_ME,"Serbian (Montenegro)"
+sr_RS,"Serbian (Serbia)"
+sh,Serbo-Croatian
+sh_BA,"Serbo-Croatian (Bosnia & Herzegovina)"
+sn,Shona
+sn_ZW,"Shona (Zimbabwe)"
+ii,"Sichuan Yi"
+ii_CN,"Sichuan Yi (China)"
+si,Sinhala
+si_LK,"Sinhala (Sri Lanka)"
+sk,Slovak
+sk_SK,"Slovak (Slovakia)"
+sl,Slovenian
+sl_SI,"Slovenian (Slovenia)"
+so,Somali
+so_DJ,"Somali (Djibouti)"
+so_ET,"Somali (Ethiopia)"
+so_KE,"Somali (Kenya)"
+so_SO,"Somali (Somalia)"
+es,Spanish
+es_AR,"Spanish (Argentina)"
+es_BO,"Spanish (Bolivia)"
+es_IC,"Spanish (Canary Islands)"
+es_EA,"Spanish (Ceuta & Melilla)"
+es_CL,"Spanish (Chile)"
+es_CO,"Spanish (Colombia)"
+es_CR,"Spanish (Costa Rica)"
+es_CU,"Spanish (Cuba)"
+es_DO,"Spanish (Dominican Republic)"
+es_EC,"Spanish (Ecuador)"
+es_SV,"Spanish (El Salvador)"
+es_GQ,"Spanish (Equatorial Guinea)"
+es_GT,"Spanish (Guatemala)"
+es_HN,"Spanish (Honduras)"
+es_MX,"Spanish (Mexico)"
+es_NI,"Spanish (Nicaragua)"
+es_PA,"Spanish (Panama)"
+es_PY,"Spanish (Paraguay)"
+es_PE,"Spanish (Peru)"
+es_PH,"Spanish (Philippines)"
+es_PR,"Spanish (Puerto Rico)"
+es_ES,"Spanish (Spain)"
+es_US,"Spanish (United States)"
+es_UY,"Spanish (Uruguay)"
+es_VE,"Spanish (Venezuela)"
+sw,Swahili
+sw_KE,"Swahili (Kenya)"
+sw_TZ,"Swahili (Tanzania)"
+sw_UG,"Swahili (Uganda)"
+sv,Swedish
+sv_AX,"Swedish (Åland Islands)"
+sv_FI,"Swedish (Finland)"
+sv_SE,"Swedish (Sweden)"
+tl,Tagalog
+tl_PH,"Tagalog (Philippines)"
+ta,Tamil
+ta_IN,"Tamil (India)"
+ta_MY,"Tamil (Malaysia)"
+ta_SG,"Tamil (Singapore)"
+ta_LK,"Tamil (Sri Lanka)"
+te,Telugu
+te_IN,"Telugu (India)"
+th,Thai
+th_TH,"Thai (Thailand)"
+bo,Tibetan
+bo_CN,"Tibetan (China)"
+bo_IN,"Tibetan (India)"
+ti,Tigrinya
+ti_ER,"Tigrinya (Eritrea)"
+ti_ET,"Tigrinya (Ethiopia)"
+to,Tongan
+to_TO,"Tongan (Tonga)"
+tr,Turkish
+tr_CY,"Turkish (Cyprus)"
+tr_TR,"Turkish (Turkey)"
+uk,Ukrainian
+uk_UA,"Ukrainian (Ukraine)"
+ur,Urdu
+ur_IN,"Urdu (India)"
+ur_PK,"Urdu (Pakistan)"
+ug,Uyghur
+ug_Arab_CN,"Uyghur (Arabic, China)"
+ug_Arab,"Uyghur (Arabic)"
+ug_CN,"Uyghur (China)"
+uz,Uzbek
+uz_AF,"Uzbek (Afghanistan)"
+uz_Arab_AF,"Uzbek (Arabic, Afghanistan)"
+uz_Arab,"Uzbek (Arabic)"
+uz_Cyrl_UZ,"Uzbek (Cyrillic, Uzbekistan)"
+uz_Cyrl,"Uzbek (Cyrillic)"
+uz_Latn_UZ,"Uzbek (Latin, Uzbekistan)"
+uz_Latn,"Uzbek (Latin)"
+uz_UZ,"Uzbek (Uzbekistan)"
+vi,Vietnamese
+vi_VN,"Vietnamese (Vietnam)"
+cy,Welsh
+cy_GB,"Welsh (United Kingdom)"
+fy,"Western Frisian"
+fy_NL,"Western Frisian (Netherlands)"
+yi,Yiddish
+yo,Yoruba
+yo_BJ,"Yoruba (Benin)"
+yo_NG,"Yoruba (Nigeria)"
+zu,Zulu
+zu_ZA,"Zulu (South Africa)"
\ No newline at end of file
diff --git a/wp-content/plugins/multiple-domain/multiple-domain.php b/wp-content/plugins/multiple-domain/multiple-domain.php
new file mode 100644
index 000000000..eb396e212
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/multiple-domain.php
@@ -0,0 +1,139 @@
+getDomain();
+$originalDomain = $multipleDomain->getOriginalDomain();
+$domainLang = $multipleDomain->getDomainLang();
+
+
+/**
+ * The current domain.
+ *
+ * Since this value is checked against plugin settings, it may not reflect the
+ * actual domain in `HTTP_HOST` element from `$_SERVER`. It also may include
+ * the host port when it's different than 80 (default HTTP port) or 443
+ * (default HTTPS port).
+ *
+ * @var string
+ * @since 1.0.2
+ */
+define('MULTIPLE_DOMAIN_DOMAIN', $domain);
+
+
+/**
+ * The original domain set in WordPress installation.
+ *
+ * @var string
+ * @since 1.0.2
+ */
+define('MULTIPLE_DOMAIN_ORIGINAL_DOMAIN', $originalDomain);
+
+
+/**
+ * The current domain language.
+ *
+ * This value is the language associated with the current domain in the plugin
+ * settings. No check is made to verifiy if it reflects the actual user
+ * language or locale. Also, notice this constant may be `null` when no
+ * language is set in the plugin config.
+ *
+ * @var string
+ * @since 1.0.2
+ */
+define('MULTIPLE_DOMAIN_DOMAIN_LANG', $domainLang);
+
+
+/**
+ * Keeping back compability with prior versions.
+ *
+ * This constant will be removed in a future release.
+ *
+ * @var string
+ * @since 0.2
+ * @see MULTIPLE_DOMAIN_DOMAIN
+ * @deprecated
+ */
+define('MULTPLE_DOMAIN_DOMAIN', MULTIPLE_DOMAIN_DOMAIN);
+
+
+/**
+ * Keeping back compability with prior versions.
+ *
+ * This constant will be removed in a future release.
+ *
+ * @var string
+ * @since 0.3
+ * @see MULTIPLE_DOMAIN_ORIGINAL_DOMAIN
+ * @deprecated
+ */
+define('MULTPLE_DOMAIN_ORIGINAL_DOMAIN', MULTIPLE_DOMAIN_ORIGINAL_DOMAIN);
+
+
+/**
+ * Keeping back compability with prior versions.
+ *
+ * This constant will be removed in a future release.
+ *
+ * @var string
+ * @since 0.8
+ * @see MULTIPLE_DOMAIN_DOMAIN_LANG
+ * @deprecated
+ */
+define('MULTPLE_DOMAIN_DOMAIN_LANG', MULTIPLE_DOMAIN_DOMAIN_LANG);
diff --git a/wp-content/plugins/multiple-domain/readme.txt b/wp-content/plugins/multiple-domain/readme.txt
new file mode 100644
index 000000000..44950c4c7
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/readme.txt
@@ -0,0 +1,280 @@
+=== Multiple Domain ===
+Contributors: sirjavik, mrelliwood, goinput, GustavoStraube, cyberaleks, jffaria
+Tags: multiple, domains, redirect
+Requires at least: 4.0
+Tested up to: 5.7
+Stable tag: 1.0.7
+License: GPLv2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+
+This plugin allows you to have multiple domains in a single Wordpress installation and enables custom redirects for each
+domain.
+
+== Description ==
+
+Important: This plugin has a new maintainer. So the plugin will now be active developed again, and it's now part of [goINPUT](https://goinput.de).
+
+Multiple Domain allows you having more than one domain in a single WordPress installation. This plugin doesn't support
+more than one theme or advanced customizations for each domain. It's only intended to enable constant navigation under
+many domains. For a more complex setup, there is
+[WordPress Multisite (MU)](https://codex.wordpress.org/Create_A_Network).
+
+When there is more than one domain set in your host, all links and resources will point to the default domain. This is
+the default WordPress behavior. With Multiple Domain installed and properly configured, it'll update all link on the
+fly. This way, the user navigation will be end-to-end under the same domain.
+
+You can also set an optional base URL. If you want only a set of URL's available under a given domain, you can use this
+restriction.
+
+Additionally, a language can be set for each domain. The language will be used to add `` tags with `hreflang`
+attribute to document head. This is for SEO purposes.
+
+== Installation ==
+
+Follow the steps below to install the plugin:
+
+1. Upload the plugin files to the `/wp-content/plugins/multiple-domain` directory, or install the plugin through the
+ WordPress plugins screen directly.
+2. Activate the plugin through the 'Plugins' screen in WordPress.
+3. Use the Settings -> General screen to configure your additional domains.
+
+== Frequently Asked Questions ==
+
+= How can I help the plugin development? =
+
+Feel free to open a [pull request](https://github.com/goINPUT-IT-Solutions/multiple-domain/pulls) to address any of the
+[issues](https://github.com/goINPUT-IT-Solutions/multiple-domain/issues) reported by the plugin users. In case you have questions
+on how to fix or the best approach, start a discussion on the appropriate thread.
+
+If you want to add a new feature, please [open an issue](https://github.com/goINPUT-IT-Solutions/multiple-domain/issues/new)
+explaining the feature and how it would help the users before start writing your code.
+
+**Donations**
+
+If you find this plugin helpful, you can support the work involved buying me a coffee, beer or a Playstation 4 game.
+You can send donations over PayPal to paypal@goinput.de.
+
+= Does this plugin set extra domains within my host? =
+
+No. You have to set additional domains, DNS, and everything else to use this plugin.
+
+= Can I have a different theme/content/plugins for each domain? =
+
+Nope. If you want a complex set up like this, you may be interested in WordPress Multisite. It's delivered with every
+WordPress installation since 3.0, you can find more info here: https://codex.wordpress.org/Create_A_Network.
+
+= There is a way to add domain based logic to my themes? =
+
+Absolutely. You can use the `MULTIPLE_DOMAIN_DOMAIN` and `MULTIPLE_DOMAIN_ORIGINAL_DOMAIN` constants to get the current
+and original domains. Just notice that since the value of the first one is checked against plugin settings, it may not
+reflect the actual domain in `HTTP_HOST` element from `$_SERVER` or user's browser. They also may include the host port
+when it's different than 80 (default HTTP port) or 443 (default HTTPS port).
+
+**Notice**: in prior versions these constants were wrongly prefixed with `MULTPLE_`, missing the "I". The old constants
+are now deprecated. They still available for backcompat but will be removed in future releases.
+
+= Can I create a custom access restriction logic for each domain? =
+
+Yes. You can use the `multiple_domain_redirect` action to do that. Please check
+https://github.com/straube/multiple-domain/issues/2 for an example on how to do that.
+
+= Can I get the language associated with the current domain? =
+
+Yes. You can use the `MULTIPLE_DOMAIN_DOMAIN_LANG` constant to get the language associated with the current domain. Keep
+in mind the value in this constant doesn't necessarily reflect the actual user language or locale. This is just the
+language set in the plugin config. Also notice the language may be `null`.
+
+**Notice**: in prior versions these constants were wrongly prefixed with `MULTPLE_`, missing the "I". The old constants
+are now deprecated. They still available for backcompat but will be removed in future releases.
+
+= Can I show the current domain in the content of posts or pages? =
+
+Yes. There is a shortcode available for that. Just add `[multiple_domain]` to the post/page and it'll be replaced by
+the current domain when viewing the content. You can write things like "Welcome to [multiple_domain]!", which would be
+rendered as "Welcome to mydomain.com!".
+
+= What domains should I add to the plugin setup? =
+
+Any domain you're site is served from must be added to the plugin configuration. Even `www` variations and the original
+domain where your WordPress was installed in must be added. You'll probably see some unexpected output when accessing
+the site from a non-mapped domain.
+
+= Can I disable `hreflang` tags output even for the original domain? =
+
+Yes. You may notice that even if you don't set a language for any domain, you still get a default `hreflang` tag in
+your page head. To disable this behavior, follow the instructions from
+https://github.com/straube/multiple-domain/issues/51.
+
+= I locked myself out, and what am I doing now? =
+
+Under certain circumstances, in the case of a wrong configuration, you may not be able to log in to the admin area
+and your page will be redirected. In this case, there are two ways to solve this.
+
+1. Delete the plugin directory `wp-content/plugins/multiple-domain`. You should be able to do that from the hosting
+ panel, from an FTP client, or via SSH. The downside of this technique is that it won’t be possible to install the
+ plugin again since the configuration will still be in the database.
+2. Remove the plugin configuration from the database using the following SQL query `DELETE FROM {YOUR-PREFIX}_options
+ WHERE option_name LIKE 'multiple-domain-%'`; (Remember to replace the prefix from your own table name). This can be
+ done from the hosting panel when PHPMyAdmin is available or using a MySQL client.
+
+== Screenshots ==
+
+== Changelog ==
+
+= 1.0.7 =
+* Changed the author to the new one.
+* Tested suport for WP 5.7
+
+= 1.0.6 =
+
+* Fix URI generated for canonical tag.
+
+= 1.0.5 =
+
+* Fixed issue with system routes when a base path is defined.
+
+= 1.0.4 =
+
+* Fixed assertions in admin views.
+
+= 1.0.3 =
+
+* Fixed XSS vulnerability in canonical/alternate tags.
+
+= 1.0.2 =
+
+* Added low memory option. (Refer to https://github.com/straube/multiple-domain/issues/45 on how to enable it)
+* Constants starting with `MULTPLE_` are now deprecated. They have a matching `MULTIPLE_` prefixed constant.
+* Fixed constants starting with `MULTPLE_`, changed to `MULTIPLE`.
+
+= 1.0.1 =
+
+* Fixed issue with regex used in domain replacement.
+
+= 1.0.0 =
+
+* Locked out instructions to readme file.
+* API to programmatically change the domains list.
+* Don't add canonical link if settings are `false`.
+
+= 0.11.2 =
+
+* FAQ about removal of `hreflang` tags.
+* Fixed bug in domain replacement when it contains a slash (the regex delimiter).
+* Fixed issue in the domain replacement regex.
+
+= 0.11.1 =
+
+* Fixed URI validation when there is a domain's base restriction.
+
+= 0.11.0 =
+
+* Add CHANGELOG.md file.
+* Added option to enable canonical tags.
+* Added `%%multiple_domain%%` advanced variable for Yoast.
+* Moved WordPress admin features to a separate class.
+* Renamed hreflang related methods.
+* Inline documentation review.
+* Minor refactoring.
+* Fixed issue with domain replacement.
+
+= 0.10.3 =
+
+* Added public method to retrieve a given (or current) domain base path: `getDomainBase($domain = null)`.
+* Minor code refactoring.
+
+= 0.10.2 =
+
+* Fix minor notice message when loading the non-mapped original domain.
+* Added FAQ about plugin settings and domains.
+
+= 0.10.1 =
+
+* Fix bug introduced in 0.10.0 with setups where the original domain is not present in the plugin settings.
+
+= 0.10.0 =
+
+* Fix #31: Don't add SSL when accessing via a Tor domain name
+* Moved HTML to view files.
+
+= 0.9.0 =
+
+* Fixed bug in backward compatibility logic.
+* Added a class to `` tag containing the domain name (e.g. `multipled-domain-name-tld`) to allow front-end customizations.
+
+= 0.8.7 =
+
+* Loading Multiple Domain before other plugins to fix issue with paths.
+* Fix #38: Missing locales on language list (this issue was reopened and now it's fixed)
+* Refactored `initAttributes` method.
+
+= 0.8.6 =
+
+* Fix #39: Rolling back changes introduced in 0.8.4 and 0.8.5 regarding to avoid URL changes in the WP admin.
+
+= 0.8.5 =
+
+* Fixed an issue introduced in 0.8.4 that breaks the admin URLs.
+* Fix #38: Missing locales on language list
+* Add `[multiple_domain]` shortcode to show the current language.
+
+= 0.8.4 =
+
+* Fix: #36 Wrong host in URLs returned by the JSON API
+* Using singleton pattern for main plugin class.
+* Avoiding URL changes in the admin panel.
+
+= 0.8.3 =
+
+* Fix: #34 hreflang tag error
+
+= 0.8.2 =
+
+* Fix: #32 Image URLs not being re-written properly via Tor.
+
+= 0.8.1 =
+
+* Fix: #23 Undefined index when using wp-cli.
+
+= 0.8.0 =
+
+* Moved `MultipleDomain` class to its own file.
+* Fix: #14 Remove `filter_input` from plugin.
+* Attempt to fix #22.
+* Added `MULTIPLE_DOMAIN_DOMAIN_LANG` constant for theme/plugin customization.
+* Fix: #21 No 'Access-Control-Allow-Origin' header is present on the requested resource
+
+= 0.7.1 =
+* Make the plugin compatible with PHP 5.4 again.
+
+= 0.7 =
+* Code review/refactoring.
+* Added activation hook to fix empty settings bug.
+
+= 0.6 =
+* Fix: #11 Redirect to original domain if SSL/https.
+
+= 0.5 =
+* Added http/https for alternate link.
+
+= 0.4 =
+* Fixed resolving host name to boolean.
+* Added Reflang links to head for SEO purpose. E.g.
+ ``
+ ``
+
+= 0.3 =
+* Fixed bug when removing the port from current domain.
+* Added `MULTIPLE_DOMAIN_ORIGINAL_DOMAIN` constant to hold the original WP home domain.
+* Allowing developers to create custom URL restriction logic through `multiple_domain_redirect` action.
+* Improved settings interface.
+
+= 0.2 =
+* Improved port verification.
+* Added `MULTIPLE_DOMAIN_DOMAIN` constant for theme/plugin customization.
+* And, last but not least, code refactoring.
+
+= 0.1 =
+This is the first release. It supports setting domains and an optional base URL for each one.
+
+== Upgrade Notice ==
diff --git a/wp-content/plugins/multiple-domain/settings.js b/wp-content/plugins/multiple-domain/settings.js
new file mode 100644
index 000000000..4c3162363
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/settings.js
@@ -0,0 +1,21 @@
+(function ($) {
+
+ 'use strict';
+
+ var $d = $(document);
+ var count = null;
+
+ $d.on('click', '.multiple-domain-remove', function (event) {
+ event.preventDefault();
+ $(this).parent().remove();
+ });
+
+ $d.on('click', '.multiple-domain-add', function (event) {
+ event.preventDefault();
+ if (count === null) {
+ count = $('.multiple-domain-domain').length;
+ }
+ $(this).parent().before(multipleDomainFields.replace(/COUNT/g, count++));
+ });
+
+})(jQuery);
\ No newline at end of file
diff --git a/wp-content/plugins/multiple-domain/views/domains.php b/wp-content/plugins/multiple-domain/views/domains.php
new file mode 100644
index 000000000..a8810bfc8
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/views/domains.php
@@ -0,0 +1,29 @@
+
+
+
+
+
+ Example
: the domain and base URL are example.com and /base/path, '
+ . 'when requesting example.com/other/path it will be redirected to '
+ . 'example.com/base/path. '
+ . 'Additionaly, it\'s possible to set a language for each domain, which will be used to add '
+ . '<link> tags with a hreflang attribute to the document head.',
+ 'multiple-domain'
+ ); ?>
+
+
diff --git a/wp-content/plugins/multiple-domain/views/fields.php b/wp-content/plugins/multiple-domain/views/fields.php
new file mode 100644
index 000000000..874e2422f
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/views/fields.php
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
diff --git a/wp-content/plugins/multiple-domain/views/heading.php b/wp-content/plugins/multiple-domain/views/heading.php
new file mode 100644
index 000000000..7a646cf21
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/views/heading.php
@@ -0,0 +1,4 @@
+
+
+
diff --git a/wp-content/plugins/multiple-domain/views/lang.php b/wp-content/plugins/multiple-domain/views/lang.php
new file mode 100644
index 000000000..957b25a34
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/views/lang.php
@@ -0,0 +1,19 @@
+
diff --git a/wp-content/plugins/multiple-domain/views/options.php b/wp-content/plugins/multiple-domain/views/options.php
new file mode 100644
index 000000000..fcf7fb11f
--- /dev/null
+++ b/wp-content/plugins/multiple-domain/views/options.php
@@ -0,0 +1,42 @@
+
+
+ 80) or HTTPS (443) port.', 'multiple-domain'); ?>
+