PDF rausgenommen
2
msd2/wordpress/wp-content/index.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Silence is golden.
|
BIN
msd2/wordpress/wp-content/languages/admin-de_DE.mo
Normal file
11942
msd2/wordpress/wp-content/languages/admin-de_DE.po
Normal file
BIN
msd2/wordpress/wp-content/languages/admin-network-de_DE.mo
Normal file
1348
msd2/wordpress/wp-content/languages/admin-network-de_DE.po
Normal file
BIN
msd2/wordpress/wp-content/languages/continents-cities-de_DE.mo
Normal file
2117
msd2/wordpress/wp-content/languages/continents-cities-de_DE.po
Normal file
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Disable tips":["Tipps deaktivieren"],"Got it":["Verstanden"],"See next tip":["N\u00e4chsten Tipp ansehen"],"Editor tips":["Editor-Tipps"]}},"comment":{"reference":"wp-includes\/js\/dist\/nux.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Reusable Blocks":["Wiederverwendbare Bl\u00f6cke"],"Embeds":["Einbettungen"],"Layout Elements":["Layout-Elemente"],"Formatting":["Formatierung"],"Common Blocks":["Allgemeine Bl\u00f6cke"],"Widgets":["Widgets"]}},"comment":{"reference":"wp-includes\/js\/dist\/blocks.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"An unknown error occurred.":["Ein unbekannter Fehler ist aufgetreten."],"The response is not a valid JSON response.":["Die Antwort ist keine g\u00fcltige JSON-Antwort."]}},"comment":{"reference":"wp-includes\/js\/dist\/api-fetch.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Reusable block imported successfully!":["Wiederverwendbarer Block erfolgreich importiert!"],"Import from JSON":["Import von JSON"],"button label\u0004Import":["Importieren"],"File":["Datei"],"Unknown error":["Unbekannter Fehler"],"Invalid Reusable Block JSON file":["Ung\u00fcltige JSON-Datei f\u00fcr wiederverwendbaren Block"],"Invalid JSON file":["Ung\u00fcltige JSON-Datei"]}},"comment":{"reference":"wp-includes\/js\/dist\/list-reusable-blocks.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Annotation":["Anmerkung"]}},"comment":{"reference":"wp-includes\/js\/dist\/annotations.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Unlink":["Link entfernen"],"Link removed.":["Link entfernt."],"Link edited.":["Link bearbeitet."],"%s (opens in a new tab)":["%s (\u00f6ffnet in neuem Tab)"],"Inline Image":["Inline-Bild"],"media":["Medien"],"photo":["Foto"],"Open in New Tab":["In neuem Tab \u00f6ffnen"],"Warning: the link has been inserted but may have errors. Please test it.":["Warnung: Der Link wurde eingef\u00fcgt, k\u00f6nnte aber fehlerhaft sein. Bitte teste ihn."],"Edit":["Bearbeiten"],"Link":["Link"],"Strikethrough":["Durchgestrichen"],"Apply":["\u00dcbernehmen"],"Link inserted.":["Link eingef\u00fcgt."],"Image":["Bild"],"Code":["Code"],"Italic":["Kursiv"],"Bold":["Fett"]}},"comment":{"reference":"wp-includes\/js\/dist\/format-library.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Error loading block: %s":["Fehler beim Laden des Blocks: %s"],"Number of items":["Anzahl Elemente"],"All":["Alle"],"Category":["Kategorie"],"Z \u2192 A":["Z → A"],"A \u2192 Z":["A → Z"],"Oldest to Newest":["Alt nach Neu"],"Newest to Oldest":["Neu nach Alt"],"Order by":["Reihenfolge von"],"Dismiss this notice":["Diesen Hinweis verwerfen"],"Remove item":["Element entfernen"],"Item removed.":["Element entfernt."],"Item added.":["Element hinzugef\u00fcgt."],"Separate with commas":["Mit Kommas trennen"],"Add item":["Element hinzuf\u00fcgen"],"%1$s (%2$s of %3$s)":["%1$s (%2$s of %3$s)"],"Custom font size":["Individuelle Schriftgr\u00f6\u00dfe"],"Font size: %s":["Schriftgr\u00f6\u00dfe: %s"],"Font Size":["Schriftgr\u00f6\u00dfe"],"font size name\u0004Custom":["Individuell"],"font size name\u0004Normal":["Normal"],"Reset":["Zur\u00fccksetzen"],"Calendar Help":["Kalender-Hilfe"],"Go to the first (home) or last (end) day of a week.":["Gehe zum ersten (Start) oder letzten (Ende) Tag der Woche."],"Home\/End":["Start\/Ende"],"Home and End":["Start und Ende"],"Move backward (PgUp) or forward (PgDn) by one month.":["Zur\u00fcck (Bild-auf) oder vorw\u00e4rts (Bild-ab) bewegen um einen Monat."],"PgUp\/PgDn":["Bild-auf\/Bild-ab"],"Page Up and Page Down":["Bild-auf und Bild-ab"],"Move backward (up) or forward (down) by one week.":["Zur\u00fcck (hoch) oder vorw\u00e4rts (runter) bewegen um eine Woche."],"Up and Down Arrows":["Pfeile hoch und runter"],"Move backward (left) or forward (right) by one day.":["Zur\u00fcck (links) oder vorw\u00e4rts (rechts) bewegen um einen Tag."],"Left and Right Arrows":["Pfeile links und rechts"],"Select the date in focus.":["Datum im Fokus ausw\u00e4hlen."],"keyboard button\u0004Enter":["Eingabetaste"],"Navigating with a keyboard":["Navigation mit einer Tastatur"],"Click the desired day to select it.":["Klicke den gew\u00fcnschten Tag an, um ihn auszuw\u00e4hlen."],"Click the right or left arrows to select other months in the past or the future.":["Klicke die Pfeile nach rechts oder links an, um Monate in der Vergangenheit oder der Zukunft auszuw\u00e4hlen."],"Click to Select":["Klicken zum Ausw\u00e4hlen"],"Minutes":["Minuten"],"Hours":["\u00d6ffnungszeiten"],"Color: %s":["Farbe: %s"],"Color code: %s":["Farbcode: %s"],"Custom color picker":["Individueller Farbw\u00e4hler"],"Use your arrow keys to change the base color. Move up to lighten the color, down to darken, left to increase saturation, and right to decrease saturation.":["Benutze deine Pfeiltasten, um die Basisfarbe zu \u00e4ndern. Hoch, um die Farbe aufzuhellen, runter zum Verdunkeln, links um die S\u00e4ttigung zu erh\u00f6hen, rechts um sie zu verringern."],"Choose a shade":["Farbton ausw\u00e4hlen"],"Change color format":["Farbformat wechseln"],"Color value in HSL":["HSL-Farbwert"],"Color value in RGB":["RGB-Farbwert"],"Color value in hexadecimal":["Hexadezimaler Farbwert"],"Hex color mode active":["Hex-Farbmodus aktiv"],"Hue\/saturation\/lightness mode active":["Farbton\/S\u00e4ttigung\/Helligkeit-Modus aktiv"],"RGB mode active":["RGB-Modus aktiv"],"Move the arrow left or right to change hue.":["Bewege den Pfeil nach rechts oder links zum \u00c4ndern des Farbtons."],"Hue value in degrees, from 0 to 359.":["Farbtonwert in Grad, von 0 bis 359."],"Alpha value, from 0 (transparent) to 1 (fully opaque).":["Alphawert von 0 (transparent) bis 1 (volle Deckkraft)."],"No results.":["Keine Ergebnisse."],"%d result found, use up and down arrow keys to navigate.":["%d Ergebnis gefunden, benutze die Pfeile nach oben oder unten zum Navigieren.","%d Ergebnisse gefunden, benutze die Pfeile nach oben oder unten zum Navigieren."],"Close dialog":["Dialog schlie\u00dfen"],"Time":["Zeit"],"Day":["Tag"],"Month":["Monat"],"Date":["Datum"],"PM":["PM"],"AM":["AM"],"December":["Dezember"],"November":["November"],"October":["Oktober"],"September":["September"],"August":["August"],"July":["Juli"],"June":["Juni"],"May":["Mai"],"April":["April"],"March":["M\u00e4rz"],"February":["Februar"],"January":["Januar"],"Year":["Jahr"],"Custom Size":["Individuelle Gr\u00f6\u00dfe"],"Drop files to upload":["Dateien f\u00fcr den Upload bereitstellen"],"(opens in a new tab)":["(\u00f6ffnet in neuem Tab)"],"Clear":["Leeren"],"Close":["Schlie\u00dfen"],"No results found.":["Es wurden keine Ergebnisse gefunden, die deinen Suchkriterien entsprechen."]}},"comment":{"reference":"wp-includes\/js\/dist\/components.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-28 20:52:36+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Backtick":["Backtick"],"Period":["Punkt"],"Comma":["Komma"]}},"comment":{"reference":"wp-includes\/js\/dist\/keycodes.js"}}
|
BIN
msd2/wordpress/wp-content/languages/de_DE.mo
Normal file
16015
msd2/wordpress/wp-content/languages/de_DE.po
Normal file
BIN
msd2/wordpress/wp-content/languages/plugins/akismet-de_DE.mo
Normal file
900
msd2/wordpress/wp-content/languages/plugins/akismet-de_DE.po
Normal file
@ -0,0 +1,900 @@
|
||||
# Translation of Plugins - Akismet Anti-Spam - Stable (latest release) in German
|
||||
# This file is distributed under the same license as the Plugins - Akismet Anti-Spam - Stable (latest release) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2018-11-12 20:00:30+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Plugins - Akismet Anti-Spam - Stable (latest release)\n"
|
||||
|
||||
#: class.akismet-cli.php:165
|
||||
msgid "Stats response could not be decoded."
|
||||
msgstr "Antwort mit Statistiken konnte nicht dekodiert werden."
|
||||
|
||||
#: class.akismet-cli.php:159
|
||||
msgid "Currently unable to fetch stats. Please try again."
|
||||
msgstr "Konnte Statistiken aktuell nicht abrufen. Bitte nochmal versuchen."
|
||||
|
||||
#: class.akismet-cli.php:134
|
||||
msgid "API key must be set to fetch stats."
|
||||
msgstr "API-Key muss konfiguriert sein, um die Statistiken abzurufen."
|
||||
|
||||
#: views/notice.php:138
|
||||
msgid "To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on below."
|
||||
msgstr "Um deine Website mit Transparenz gemäß Datenschutzgesetzen wie der DSGVO zu unterstützen, kann Akismet deinen Benutzern unter den Kommentarfeldern eine Benachrichtigung anzeigen. Diese Funktion ist standardmäßig deaktiviert, du kannst sie jedoch unten aktivieren."
|
||||
|
||||
#: views/config.php:162
|
||||
msgid "To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on above."
|
||||
msgstr "Um deine Website mit Transparenz gemäß Datenschutzgesetzen wie der DSGVO zu unterstützen, kann Akismet deinen Benutzern unter den Kommentarfeldern eine Benachrichtigung anzeigen. Diese Funktion ist standardmäßig deaktiviert, du kannst sie jedoch oben aktivieren."
|
||||
|
||||
#: views/notice.php:139
|
||||
msgid " Please <a href=\"%s\">enable</a> or <a href=\"%s\">disable</a> this feature. <a href=\"%s\" id=\"akismet-privacy-notice-control-notice-info-link\" target=\"_blank\">More information</a>."
|
||||
msgstr "Bitte<a href=\"%s\">aktiviere</a> oder <a href=\"%s\">deaktiviere</a> dieses Feature. <a href=\"%s\" id=\"akismet-privacy-notice-control-notice-info-link\" target=\"_blank\">Weitere Informationen</a>."
|
||||
|
||||
#: views/notice.php:137
|
||||
msgid "Akismet & Privacy."
|
||||
msgstr "Akismet & Datenschutz."
|
||||
|
||||
#: views/config.php:160
|
||||
msgid "Do not display privacy notice."
|
||||
msgstr "Datenschutz-Hinweis nicht anzeigen."
|
||||
|
||||
#: views/config.php:159
|
||||
msgid "Display a privacy notice under your comment forms."
|
||||
msgstr "Zeige einen Datenschutz-Hinweis unter den Kommentarformularen an."
|
||||
|
||||
#: views/config.php:158
|
||||
msgid "Akismet privacy notice"
|
||||
msgstr "Akismet Datenschutz-Hinweis"
|
||||
|
||||
#: views/config.php:155
|
||||
msgid "Privacy"
|
||||
msgstr "Datenschutz"
|
||||
|
||||
#: class.akismet.php:1423
|
||||
msgid "This site uses Akismet to reduce spam. <a href=\"%s\" target=\"_blank\" rel=\"nofollow noopener\">Learn how your comment data is processed</a>."
|
||||
msgstr "Diese Website verwendet Akismet, um Spam zu reduzieren. <a href=\"%s\" target=\"_blank\" rel=\"nofollow noopener\">Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden</a>."
|
||||
|
||||
#: class.akismet-admin.php:89
|
||||
msgid "We collect information about visitors who comment on Sites that use our Akismet anti-spam service. The information we collect depends on how the User sets up Akismet for the Site, but typically includes the commenter's IP address, user agent, referrer, and Site URL (along with other information directly provided by the commenter such as their name, username, email address, and the comment itself)."
|
||||
msgstr "Wir sammeln Informationen über Besucher, die Kommentare auf Websites, die unseren Akismet Anti-Spam Service benutzen, hinterlassen. Das Ausmaß an Informationen, die wir sammeln, hängt davon ab, wie der Benutzer seine Website eingestellt hat. Normalerweise beinhalten diese Daten die IP-Adresse des Benutzers, den User Agent, Referrer und Website-URL (sowie die Informationen, die der Benutzer direkt eingegeben hat wie z.B. Namen, Benutzernamen, E-Mail-Adresse und den Kommentar selbst)."
|
||||
|
||||
#: class.akismet.php:226
|
||||
msgid "Comment discarded."
|
||||
msgstr "Kommentar verworfen."
|
||||
|
||||
#: class.akismet-rest-api.php:174
|
||||
msgid "This site's API key is hardcoded and cannot be deleted."
|
||||
msgstr "Der API-Schlüssel dieser Website ist im Quelltext festgeschrieben und kann nicht gelöscht werden."
|
||||
|
||||
#: class.akismet-rest-api.php:158
|
||||
msgid "The value provided is not a valid and registered API key."
|
||||
msgstr "Der eingegebene Wert ist kein gültiger und registrierter API-Schlüssel."
|
||||
|
||||
#: class.akismet-rest-api.php:152
|
||||
msgid "This site's API key is hardcoded and cannot be changed via the API."
|
||||
msgstr "Der API-Schlüssel dieser Website ist im Quelltext festgeschrieben und kann nicht über die API verändert werden."
|
||||
|
||||
#: class.akismet-rest-api.php:71 class.akismet-rest-api.php:80
|
||||
msgid "The time period for which to retrieve stats. Options: 60-days, 6-months, all"
|
||||
msgstr "Der Zeitraum, für den Statistiken abgerufen werden. Optionen: 60 Tage, 6 Monate, alle"
|
||||
|
||||
#: class.akismet-rest-api.php:56
|
||||
msgid "If true, show the number of approved comments beside each comment author in the comments list page."
|
||||
msgstr "Wenn wahr, zeige die Anzahl der genehmigten Kommentare neben jedem Kommentarautor in der Kommentarliste an."
|
||||
|
||||
#: class.akismet-rest-api.php:51
|
||||
msgid "If true, Akismet will automatically discard the worst spam automatically rather than putting it in the spam folder."
|
||||
msgstr "Wenn wahr, wird Akismet automatisch den schlimmsten Spam automatisch aussortieren, anstatt ihn in den Spam-Ordner zu legen."
|
||||
|
||||
#: class.akismet-rest-api.php:27 class.akismet-rest-api.php:101
|
||||
#: class.akismet-rest-api.php:114 class.akismet-rest-api.php:127
|
||||
msgid "A 12-character Akismet API key. Available at akismet.com/get/"
|
||||
msgstr "Ein 12-stelliger Akismet-API-Schlüssel. Erhältlich unter akismet.com/get/"
|
||||
|
||||
#: class.akismet-admin.php:398
|
||||
msgid "(%1$s%)"
|
||||
msgstr "(%1$s%)"
|
||||
|
||||
#: views/notice.php:49
|
||||
msgid "Your site can’t connect to the Akismet servers."
|
||||
msgstr "Deine Website konnte keine Verbindung zu den Akismet-Servern herstellen."
|
||||
|
||||
#: views/start.php:97
|
||||
msgid "An Akismet API key has been defined in the %s file for this site."
|
||||
msgstr "Ein Akismet-API-Schlüssel wurde in der Datei %s für diese Website definiert."
|
||||
|
||||
#: views/start.php:96
|
||||
msgid "Manual Configuration"
|
||||
msgstr "Manuelle Konfiguration"
|
||||
|
||||
#: class.akismet-admin.php:232
|
||||
msgid "On this page, you are able to update your Akismet settings and view spam stats."
|
||||
msgstr "Auf dieser Seite kannst du deine Akismet-Einstellungen aktualisieren und Spam-Statistiken betrachten."
|
||||
|
||||
#. Description of the plugin
|
||||
msgid "Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key."
|
||||
msgstr "Von Millionen genutzt, ist Akismet wahrscheinlich der beste Weg in der Welt, <strong>um deine Website oder deinen Blog vor Spam zu schützen</strong>. Es schützt deine Website auch während du schläfst. Um zu beginnen: Aktiviere das Akismet Plugin und gehe dann auf deine Akismet-Einstellungen Seite, um deinen API-Schlüssel einzurichten."
|
||||
|
||||
#. Plugin Name of the plugin
|
||||
#: class.akismet-admin.php:114 class.akismet-admin.php:117
|
||||
msgid "Akismet Anti-Spam"
|
||||
msgstr "Akismet Anti-Spam"
|
||||
|
||||
#: views/stats.php:4
|
||||
msgid "Akismet Settings"
|
||||
msgstr "Akismet-Einstellungen"
|
||||
|
||||
#: views/start.php:90
|
||||
msgid "Connect with API key"
|
||||
msgstr "Mit API-Schlüssel verbinden"
|
||||
|
||||
#: views/start.php:84
|
||||
msgid "(What is an API key?)"
|
||||
msgstr "(Was ist ein API-Schlüssel?)"
|
||||
|
||||
#: views/start.php:83
|
||||
msgid "Or enter an API key"
|
||||
msgstr "Oder gib einen API-Schlüssel ein"
|
||||
|
||||
#: views/start.php:67
|
||||
msgid "Or sign up with a different email address"
|
||||
msgstr "Oder melde dich mit einer anderen E-Mail-Adresse an"
|
||||
|
||||
#: views/start.php:31 views/start.php:63
|
||||
msgid "You are connected as %s."
|
||||
msgstr "Du bist als %s verbunden."
|
||||
|
||||
#: views/start.php:28 views/start.php:60
|
||||
msgid "Connect with Jetpack"
|
||||
msgstr "Mit Jetpack verbinden"
|
||||
|
||||
#: views/start.php:22 views/start.php:55
|
||||
msgid "Use your Jetpack connection to activate Akismet."
|
||||
msgstr "Verwende deine Jetpack-Verbindung, um Akismet zu aktivieren."
|
||||
|
||||
#: views/start.php:21 views/start.php:35 views/start.php:54
|
||||
msgid "Connect via Jetpack"
|
||||
msgstr "Mit Jetpack verbinden"
|
||||
|
||||
#: views/start.php:14
|
||||
msgid "Select one of the options below to get started."
|
||||
msgstr "Wähle eine der folgenden Optionen aus, um zu beginnen."
|
||||
|
||||
#: views/start.php:13
|
||||
msgid "Eliminate spam from your site"
|
||||
msgstr "Beseitige Spam von deiner Website"
|
||||
|
||||
#: views/notice.php:101
|
||||
msgid "Would you like to <a href=\"%s\">check pending comments</a>?"
|
||||
msgstr "Möchtest du <a href=\"%s\">ausstehende Kommentare überprüfen</a>?"
|
||||
|
||||
#: views/notice.php:99
|
||||
msgid "Akismet is now protecting your site from spam. Happy blogging!"
|
||||
msgstr "Akismet schützt deine Website ab sofort vor Spam. Fröhliches Bloggen!"
|
||||
|
||||
#: views/notice.php:8
|
||||
msgid "Set up your Akismet account"
|
||||
msgstr "Eröffne dein Akismet-Konto"
|
||||
|
||||
#: views/config.php:26
|
||||
msgid "Detailed Stats"
|
||||
msgstr "Detaillierte Statistiken"
|
||||
|
||||
#: views/config.php:22
|
||||
msgid "Statistics"
|
||||
msgstr "Statistiken"
|
||||
|
||||
#: class.akismet-admin.php:1170
|
||||
msgid "Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started, just go to <a href=\"admin.php?page=akismet-key-config\">your Akismet Settings page</a> to set up your API key."
|
||||
msgstr "Von Millionen genutzt, ist Akismet wahrscheinlich der beste Weg in der Welt, <strong>um deine Website oder deinen Blog vor Spam zu schützen</strong>. Es schützt deine Website auch während du schläfst. Um zu beginnen: Aktiviere das Akismet Plugin und gehe dann auf <a href=\"admin.php?page=akismet-key-config\">deine Akismet-Einstellungen</a> Seite, um deinen API-Schlüssel einzurichten."
|
||||
|
||||
#: class.akismet-admin.php:1167
|
||||
msgid "Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Your site is fully configured and being protected, even while you sleep."
|
||||
msgstr "Von Millionen genutzt, ist Akismet wahrscheinlich der beste Weg in der Welt, <strong>um deine Website oder deinen Blog vor Spam zu schützen</strong>. Deine Website ist vollständig konfiguriert und geschützt, auch während du schläfst."
|
||||
|
||||
#: class.akismet-admin.php:1058
|
||||
msgid "%s comment was caught as spam."
|
||||
msgid_plural "%s comments were caught as spam."
|
||||
msgstr[0] "%s Kommentar wurde als Spam erkannt."
|
||||
msgstr[1] "%s Kommentare wurden als Spam erkannt."
|
||||
|
||||
#: class.akismet-admin.php:1055
|
||||
msgid "No comments were caught as spam."
|
||||
msgstr "Es wurden keine Kommentare als Spam erkannt."
|
||||
|
||||
#: class.akismet-admin.php:1051
|
||||
msgid "Akismet checked %s comment."
|
||||
msgid_plural "Akismet checked %s comments."
|
||||
msgstr[0] "Akismet überprüfte %s Kommentar."
|
||||
msgstr[1] "Akismet überprüfte %s Kommentare."
|
||||
|
||||
#: class.akismet-admin.php:1048
|
||||
msgid "There were no comments to check. Akismet will only check comments in the Pending queue."
|
||||
msgstr "Es gab keine Kommentare zu überprüfen. Akismet überprüft ausschließlich Kommentare, die sich in der Warteschlange befinden."
|
||||
|
||||
#: class.akismet-admin.php:397
|
||||
msgid "Checking for Spam"
|
||||
msgstr "Auf Spam prüfen"
|
||||
|
||||
#: class.akismet.php:507
|
||||
msgid "Comment not found."
|
||||
msgstr "Kommentar nicht gefunden."
|
||||
|
||||
#: class.akismet-cli.php:88
|
||||
msgid "%d comment could not be checked."
|
||||
msgid_plural "%d comments could not be checked."
|
||||
msgstr[0] "%d Kommentar konnte nicht überprüft werden."
|
||||
msgstr[1] "%d Kommentare konnten nicht überprüft werden."
|
||||
|
||||
#: class.akismet-cli.php:85
|
||||
msgid "%d comment moved to Spam."
|
||||
msgid_plural "%d comments moved to Spam."
|
||||
msgstr[0] "%d Kommentar in Spam verschoben."
|
||||
msgstr[1] "%d Kommentare in Spam verschoben."
|
||||
|
||||
#: class.akismet-cli.php:84
|
||||
msgid "Processed %d comment."
|
||||
msgid_plural "Processed %d comments."
|
||||
msgstr[0] "%d Kommentar bearbeitet."
|
||||
msgstr[1] "%d Kommentare bearbeitet."
|
||||
|
||||
#: class.akismet-cli.php:46
|
||||
msgid "Comment #%d could not be checked."
|
||||
msgstr "Kommentar #%d konnte nicht überprüft werden."
|
||||
|
||||
#: class.akismet-cli.php:43
|
||||
msgid "Failed to connect to Akismet."
|
||||
msgstr "Verbindung zu Akismet fehlgeschlagen."
|
||||
|
||||
#: class.akismet-cli.php:39
|
||||
msgid "Comment #%d is not spam."
|
||||
msgstr "Kommentar #%d ist kein Spam."
|
||||
|
||||
#: class.akismet-cli.php:36
|
||||
msgid "Comment #%d is spam."
|
||||
msgstr "Kommentar #%d ist Spam."
|
||||
|
||||
#: views/config.php:49
|
||||
msgid "%s false positive"
|
||||
msgid_plural "%s false positives"
|
||||
msgstr[0] "%s falsches Positiv"
|
||||
msgstr[1] "%s falsche Positive"
|
||||
|
||||
#: views/config.php:47
|
||||
msgid "%s missed spam"
|
||||
msgid_plural "%s missed spam"
|
||||
msgstr[0] "%s verpasster Spam"
|
||||
msgstr[1] "%s verpasste Spam"
|
||||
|
||||
#: views/start.php:79
|
||||
msgid "Log in or sign up now."
|
||||
msgstr "Anmelden oder jetzt registrieren."
|
||||
|
||||
#: views/start.php:84
|
||||
msgid "Already have your key? Enter it here."
|
||||
msgstr "Du hast bereits einen Schlüssel? Gib ihn hier ein."
|
||||
|
||||
#: views/start.php:69
|
||||
msgid "Sign up with a different email address"
|
||||
msgstr "Registriere dich mit einer anderen E-Mail-Adresse"
|
||||
|
||||
#: views/start.php:71
|
||||
msgid "Choose this option to use Akismet independently of your Jetpack connection."
|
||||
msgstr "Wähle diese Option aus, um Akismet unabhängig von deiner Jetpack-Verbindung zu verwenden."
|
||||
|
||||
#: views/notice.php:79
|
||||
msgid "You don’t have an Akismet plan."
|
||||
msgstr "Da hast kein Akismet Tarif-Paket."
|
||||
|
||||
#: views/notice.php:64
|
||||
msgid "Your Akismet subscription is suspended."
|
||||
msgstr "Dein Akismet-Abonnement wurde unterbrochen."
|
||||
|
||||
#: views/notice.php:59
|
||||
msgid "Your Akismet plan has been cancelled."
|
||||
msgstr "Dein Akismet-Tarif wurde beendet."
|
||||
|
||||
#: views/notice.php:55
|
||||
msgid "We cannot process your payment. Please <a href=\"%s\" target=\"_blank\">update your payment details</a>."
|
||||
msgstr "Wir konnten deine Bezahlung nicht ausführen. Bitte <a href=\"%s\" target=\"_blank\">aktualisiere deine Angaben zur Bezahlung</a>."
|
||||
|
||||
#: views/notice.php:54
|
||||
msgid "Please update your payment information."
|
||||
msgstr "Bitte aktualisiere deine Zahlungsinformationen."
|
||||
|
||||
#: views/notice.php:11
|
||||
msgid "<strong>Almost done</strong> - configure Akismet and say goodbye to spam"
|
||||
msgstr "<strong>Fast fertig</strong> - konfiguriere Akismet und verabschiede dich von Spam."
|
||||
|
||||
#: class.akismet-admin.php:979
|
||||
msgid "Akismet has saved you %d minute!"
|
||||
msgid_plural "Akismet has saved you %d minutes!"
|
||||
msgstr[0] "Akismet hat dir %d Minute erspart!"
|
||||
msgstr[1] "Akismet hat dir %d Minuten erspart!"
|
||||
|
||||
#: class.akismet-admin.php:977
|
||||
msgid "Akismet has saved you %d hour!"
|
||||
msgid_plural "Akismet has saved you %d hours!"
|
||||
msgstr[0] "Akismet hat dir %d Stunde erspart!"
|
||||
msgstr[1] "Akismet hat dir %d Stunden erspart!"
|
||||
|
||||
#: class.akismet-admin.php:975
|
||||
msgid "Akismet has saved you %s day!"
|
||||
msgid_plural "Akismet has saved you %s days!"
|
||||
msgstr[0] "Akismet hat dir %s Tag erspart!"
|
||||
msgstr[1] "Akismet hat dir %s Tage erspart!"
|
||||
|
||||
#: class.akismet-admin.php:180 class.akismet-admin.php:218
|
||||
#: class.akismet-admin.php:231
|
||||
msgid "Akismet filters out spam, so you can focus on more important things."
|
||||
msgstr "Akismet filtert Spam heraus, sodass du dich auf wichtigere Dinge konzentrieren kannst."
|
||||
|
||||
#: views/notice.php:129
|
||||
msgid "To continue your service, <a href=\"%s\" target=\"_blank\">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites."
|
||||
msgstr "Um deine Aktion fortzusetzen, <a href=\"%s\" target=\"_blank\"> Upgrade auf ein Enterprise Abonnement</a>, womit eine beliebige Anzahl an Websites abgedeckt werden kann."
|
||||
|
||||
#: views/notice.php:122
|
||||
msgid "Your Pro subscription allows the use of Akismet on only one site. Please <a href=\"%s\" target=\"_blank\">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites."
|
||||
msgstr "Dein Pro-Abonnement erlaubt die Benutzung von Akismet nur für eine Website. Bitte <a href=\"%s\" target=\"_blank\">erwerbe weitere Pro-Abonnements</a> oder mache ein Upgrade auf ein Enterprise-Abonnement, das dir erlaubt Akismet auf beliebig vielen Websites zu benutzen."
|
||||
|
||||
#: views/notice.php:115
|
||||
msgid "The connection to akismet.com could not be established. Please refer to <a href=\"%s\" target=\"_blank\">our guide about firewalls</a> and check your server configuration."
|
||||
msgstr "Die Verbindung zu akismet.com konnte nicht eingerichtet werden. Schau dir <a href=\"%s\" target=\"_blank\">unser Handbuch zu Firefalls</a> an und prüfe deine Server-Konfiguration."
|
||||
|
||||
#: views/notice.php:114
|
||||
msgid "The API key you entered could not be verified."
|
||||
msgstr "Der eingegebene API-Schlüssel konnte nicht verifiziert werden."
|
||||
|
||||
#: views/notice.php:110
|
||||
msgid "Your API key is no longer valid. Please enter a new key or contact support@akismet.com."
|
||||
msgstr "Dein API-Schlüssel ist nicht mehr gültig. Bitte gib einen neuen Schlüssel ein oder kontaktiere support@akismet.com."
|
||||
|
||||
#: views/notice.php:83 views/notice.php:124 views/notice.php:131
|
||||
msgid "Please <a href=\"%s\" target=\"_blank\">contact our support team</a> with any questions."
|
||||
msgstr "Bitte <a href=\"%s\" target=\"_blank\">kontaktiere unser Support-Team</a> bei offenen Fragen."
|
||||
|
||||
#: views/notice.php:81
|
||||
msgid "In 2012, Akismet began using subscription plans for all accounts (even free ones). A plan has not been assigned to your account, and we’d appreciate it if you’d <a href=\"%s\" target=\"_blank\">sign into your account</a> and choose one."
|
||||
msgstr "Im Jahr 2012 begann Akismet Abonnement-Tarife für alle Konten (sogar die kostenlosen) einzuführen. Bisher wurde deinem Konto kein Tarif zugeordnet und wir würden es begrüßen, wenn du dich <a href=\"%s\" target=\"_blank\">bei deinem Konto anmelden</a> und einen Tarif wählen würdest."
|
||||
|
||||
#: views/config.php:95
|
||||
msgid "All systems functional."
|
||||
msgstr "Alle Systeme laufen ordnungsgemäß."
|
||||
|
||||
#: views/config.php:95
|
||||
msgid "Enabled."
|
||||
msgstr "Aktiviert."
|
||||
|
||||
#: views/config.php:92
|
||||
msgid "Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly."
|
||||
msgstr "Akismet hatte ein Probelm mit einer kürzlich erfolgten SSL-Anfrage und hat dies temporär deaktiviert. Akismet wird in Kürze wieder SSL-Anfragen nutzen."
|
||||
|
||||
#: views/config.php:92
|
||||
msgid "Temporarily disabled."
|
||||
msgstr "Temporär deaktiviert."
|
||||
|
||||
#: views/config.php:86
|
||||
msgid "Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests."
|
||||
msgstr "Dein Webserver kann keine SSL-Anfragen herstellen. Kontaktiere deinen Web-Hoster und bitte ihn, Unterstützung für SSL-Anfragen hinzuzufügen."
|
||||
|
||||
#: views/config.php:86
|
||||
msgid "Disabled."
|
||||
msgstr "Deaktiviert."
|
||||
|
||||
#: views/config.php:79
|
||||
msgid "SSL Status"
|
||||
msgstr "SSL-Status"
|
||||
|
||||
#: class.akismet-admin.php:608
|
||||
msgid "This comment was reported as not spam."
|
||||
msgstr "Dieser Kommentar wurde als Kein-Spam bewertet."
|
||||
|
||||
#: class.akismet-admin.php:600
|
||||
msgid "This comment was reported as spam."
|
||||
msgstr "Dieser Kommentar wurde als Spam bewertet."
|
||||
|
||||
#: class.akismet-admin.php:149
|
||||
msgid "(undo)"
|
||||
msgstr "(rückgängig)"
|
||||
|
||||
#: class.akismet-admin.php:148
|
||||
msgid "URL removed"
|
||||
msgstr "URL entfernt"
|
||||
|
||||
#: class.akismet-admin.php:147
|
||||
msgid "Removing..."
|
||||
msgstr "Entferne …"
|
||||
|
||||
#: class.akismet-admin.php:88 class.akismet-admin.php:1189
|
||||
msgid "Akismet"
|
||||
msgstr "Akismet"
|
||||
|
||||
#: views/config.php:60 class.akismet-admin.php:107 class.akismet-admin.php:239
|
||||
#: class.akismet-admin.php:658
|
||||
msgid "Settings"
|
||||
msgstr "Einstellungen"
|
||||
|
||||
#: class.akismet-admin.php:150
|
||||
msgid "Re-adding..."
|
||||
msgstr "Wieder-Einfügen …"
|
||||
|
||||
#: class.akismet-admin.php:177 class.akismet-admin.php:215
|
||||
#: class.akismet-admin.php:228
|
||||
msgid "Overview"
|
||||
msgstr "Überblick"
|
||||
|
||||
#: class.akismet-admin.php:179 class.akismet-admin.php:190
|
||||
#: class.akismet-admin.php:201
|
||||
msgid "Akismet Setup"
|
||||
msgstr "Akismet-Einstellungen"
|
||||
|
||||
#: class.akismet-admin.php:181
|
||||
msgid "On this page, you are able to set up the Akismet plugin."
|
||||
msgstr "Auf dieser Seite kannst du das Akismet-Plugin konfigurieren."
|
||||
|
||||
#: class.akismet-admin.php:188
|
||||
msgid "New to Akismet"
|
||||
msgstr "Neu bei Akismet"
|
||||
|
||||
#: class.akismet-admin.php:191
|
||||
msgid "You need to enter an API key to activate the Akismet service on your site."
|
||||
msgstr "Du musst einen API-Schlüssel eingeben, um Akismet auf deiner Website zu aktivieren."
|
||||
|
||||
#: class.akismet-admin.php:199
|
||||
msgid "Enter an API Key"
|
||||
msgstr "Gib einen API-Schlüssel ein"
|
||||
|
||||
#: class.akismet-admin.php:192
|
||||
msgid "Sign up for an account on %s to get an API Key."
|
||||
msgstr "Registriere dich auf %s, um einen API-Schlüssel zu erhalten."
|
||||
|
||||
#: class.akismet-admin.php:202
|
||||
msgid "If you already have an API key"
|
||||
msgstr "Wenn du bereits einen API-Schlüssel hast"
|
||||
|
||||
#: class.akismet-admin.php:204
|
||||
msgid "Copy and paste the API key into the text field."
|
||||
msgstr "Kopiere den API-Schlüssel und füge ihn in das Text-Feld ein."
|
||||
|
||||
#: class.akismet-admin.php:205
|
||||
msgid "Click the Use this Key button."
|
||||
msgstr "Drücke die Schaltfläche „Nutze diesen Schlüssel“."
|
||||
|
||||
#: class.akismet-admin.php:217
|
||||
msgid "Akismet Stats"
|
||||
msgstr "Akismet-Statistiken"
|
||||
|
||||
#: class.akismet-admin.php:219
|
||||
msgid "On this page, you are able to view stats on spam filtered on your site."
|
||||
msgstr "Auf dieser Seite kannst du den Statistiken entnehmen, wie viel Spam auf deiner Website ausgefiltert wurde."
|
||||
|
||||
#: class.akismet-admin.php:230 class.akismet-admin.php:241
|
||||
#: class.akismet-admin.php:254
|
||||
msgid "Akismet Configuration"
|
||||
msgstr "Akismet-Konfiguration"
|
||||
|
||||
#: views/config.php:70 class.akismet-admin.php:242
|
||||
msgid "API Key"
|
||||
msgstr "API-Schlüssel"
|
||||
|
||||
#: class.akismet-admin.php:242
|
||||
msgid "Enter/remove an API key."
|
||||
msgstr "API-Schlüssel hinzufügen/entfernen."
|
||||
|
||||
#: views/config.php:105 class.akismet-admin.php:243
|
||||
msgid "Comments"
|
||||
msgstr "Kommentare"
|
||||
|
||||
#: class.akismet-admin.php:243
|
||||
msgid "Show the number of approved comments beside each comment author in the comments list page."
|
||||
msgstr "Zeige auf der Seite mit den Kommentar-Listen neben jedem Kommentar-Autor die Anzahl der zugelassenen Kommentare."
|
||||
|
||||
#: class.akismet-admin.php:244
|
||||
msgid "Choose to either discard the worst spam automatically or to always put all spam in spam folder."
|
||||
msgstr "Wähle aus, ob der schlimmste Spam automatisch gelöscht wird oder immer in den Spam-Ordner kommen soll."
|
||||
|
||||
#: views/config.php:128 class.akismet-admin.php:244
|
||||
msgid "Strictness"
|
||||
msgstr "Genauigkeit"
|
||||
|
||||
#: views/config.php:188 class.akismet-admin.php:252
|
||||
msgid "Account"
|
||||
msgstr "Konto"
|
||||
|
||||
#: views/config.php:196 class.akismet-admin.php:255
|
||||
msgid "Subscription Type"
|
||||
msgstr "Abonnement-Art"
|
||||
|
||||
#: class.akismet-admin.php:256
|
||||
msgid "The subscription status - active, cancelled or suspended"
|
||||
msgstr "Der Abonnement-Status – aktiv, abgelaufen oder unterbrochen"
|
||||
|
||||
#: views/config.php:203 class.akismet-admin.php:256
|
||||
msgid "Status"
|
||||
msgstr "Status"
|
||||
|
||||
#: class.akismet-admin.php:255
|
||||
msgid "The Akismet subscription plan"
|
||||
msgstr "Das Akismet-Abonnement"
|
||||
|
||||
#: class.akismet-admin.php:266
|
||||
msgid "Akismet FAQ"
|
||||
msgstr "Akismet FAQ"
|
||||
|
||||
#: class.akismet-admin.php:265
|
||||
msgid "For more information:"
|
||||
msgstr "Weitere Informationen:"
|
||||
|
||||
#: class.akismet-admin.php:267
|
||||
msgid "Akismet Support"
|
||||
msgstr "Akismet Support"
|
||||
|
||||
#: class.akismet-admin.php:273
|
||||
msgid "Cheatin’ uh?"
|
||||
msgstr "Nicht mogeln!"
|
||||
|
||||
#: class.akismet-admin.php:343
|
||||
msgctxt "comments"
|
||||
msgid "Spam"
|
||||
msgstr "Spam"
|
||||
|
||||
#: class.akismet-admin.php:345
|
||||
msgid "<a href=\"%1$s\">Akismet</a> has protected your site from <a href=\"%2$s\">%3$s spam comment</a>."
|
||||
msgid_plural "<a href=\"%1$s\">Akismet</a> has protected your site from <a href=\"%2$s\">%3$s spam comments</a>."
|
||||
msgstr[0] "<a href=\"%1$s\">Akismet</a> hat deine Website vor <a href=\"%2$s\">%3$s Spam-Kommentar</a> geschützt."
|
||||
msgstr[1] "<a href=\"%1$s\">Akismet</a> hat deine Website vor <a href=\"%2$s\">%3$s Spam-Kommentaren</a> geschützt."
|
||||
|
||||
#: class.akismet-admin.php:355
|
||||
msgid "<a href=\"%1$s\">Akismet</a> has protected your site from %2$s spam comment already. "
|
||||
msgid_plural "<a href=\"%1$s\">Akismet</a> has protected your site from %2$s spam comments already. "
|
||||
msgstr[0] "<a href=\"%1$s\">Akismet</a> hat deine Website bereits vor %2$s Spam-Kommentar geschützt."
|
||||
msgstr[1] "<a href=\"%1$s\">Akismet</a> hat deine Website bereits vor %2$s Spam-Kommentaren geschützt."
|
||||
|
||||
#: class.akismet-admin.php:361
|
||||
msgid "<a href=\"%s\">Akismet</a> blocks spam from getting to your blog. "
|
||||
msgstr "<a href=\"%s\">Akismet</a> sorgt dafür, dass kein Spam in deinen Blog gelangt."
|
||||
|
||||
#: class.akismet-admin.php:367
|
||||
msgid "There’s <a href=\"%2$s\">%1$s comment</a> in your spam queue right now."
|
||||
msgid_plural "There are <a href=\"%2$s\">%1$s comments</a> in your spam queue right now."
|
||||
msgstr[0] "In deiner Spam-Warteliste gibt es gerade <a href=\"%2$s\">%1$s Kommentar</a>."
|
||||
msgstr[1] "In deiner Spam-Warteliste gibt es gerade <a href=\"%2$s\">%1$s Kommentare</a>."
|
||||
|
||||
#: class.akismet-admin.php:373
|
||||
msgid "There’s nothing in your <a href='%s'>spam queue</a> at the moment."
|
||||
msgstr "Es gibt im Moment keinen Eintrag in deiner <a href='%s'>Spam-Liste</a>."
|
||||
|
||||
#: class.akismet-admin.php:587
|
||||
msgid "Akismet re-checked and cleared this comment."
|
||||
msgstr "Akismet hat erneut überprüft und diesen Kommentar bereinigt."
|
||||
|
||||
#: class.akismet-admin.php:581
|
||||
msgid "Akismet re-checked and caught this comment as spam."
|
||||
msgstr "Akismet hat den Kommentar erneut überprüft und nun als Spam bewertet."
|
||||
|
||||
#: class.akismet-admin.php:402
|
||||
msgid "Check for Spam"
|
||||
msgstr "Auf Spam prüfen"
|
||||
|
||||
#: class.akismet-admin.php:624
|
||||
msgid "Akismet was unable to recheck this comment (response: %s)."
|
||||
msgstr "Akismet konnte diesen Kommentar (Antwort: %s) nicht nochmal überprüfen."
|
||||
|
||||
#: class.akismet-admin.php:509
|
||||
msgid "Flagged as spam by Akismet"
|
||||
msgstr "Als Spam markiert durch Akismet"
|
||||
|
||||
#: class.akismet-admin.php:505
|
||||
msgid "Awaiting spam check"
|
||||
msgstr "Warten auf Spam-Prüfung"
|
||||
|
||||
#: class.akismet-admin.php:515
|
||||
msgid "Flagged as spam by %s"
|
||||
msgstr "Als Spam markiert von %s"
|
||||
|
||||
#: class.akismet-admin.php:511
|
||||
msgid "Cleared by Akismet"
|
||||
msgstr "Bereinigt durch Akismet"
|
||||
|
||||
#: class.akismet-admin.php:517
|
||||
msgid "Un-spammed by %s"
|
||||
msgstr "Als Kein-Spam markiert von %s"
|
||||
|
||||
#: class.akismet-admin.php:552
|
||||
msgid "%s approved"
|
||||
msgid_plural "%s approved"
|
||||
msgstr[0] "%s Genehmigt"
|
||||
msgstr[1] "%s Genehmigte"
|
||||
|
||||
#: class.akismet-admin.php:529
|
||||
msgid "History"
|
||||
msgstr "Verlauf"
|
||||
|
||||
#: class.akismet-admin.php:529 class.akismet-admin.php:537
|
||||
msgid "View comment history"
|
||||
msgstr "Kommentar-Verlauf ansehen"
|
||||
|
||||
#: class.akismet-admin.php:865
|
||||
msgid "Please check your <a href=\"%s\">Akismet configuration</a> and contact your web host if problems persist."
|
||||
msgstr "Bitte überprüfe deine <a href=\"%s\">Akismet-Konfiguration</a> und kontaktiere deinen Webhoster, wenn die Probleme bestehen bleiben."
|
||||
|
||||
#: class.akismet-admin.php:646
|
||||
msgid "%s ago"
|
||||
msgstr "vor %s"
|
||||
|
||||
#: class.akismet-admin.php:972
|
||||
msgid "Cleaning up spam takes time."
|
||||
msgstr "Spam aussortieren braucht Zeit."
|
||||
|
||||
#: class.akismet-widget.php:12
|
||||
msgid "Akismet Widget"
|
||||
msgstr "Akismet-Widget"
|
||||
|
||||
#: class.akismet-widget.php:13
|
||||
msgid "Display the number of spam comments Akismet has caught"
|
||||
msgstr "Zeige die Anzahl der Spam-Kommentare, die Akismet blockiert hat."
|
||||
|
||||
#: class.akismet-widget.php:74
|
||||
msgid "Title:"
|
||||
msgstr "Titel:"
|
||||
|
||||
#: class.akismet-widget.php:69 class.akismet-widget.php:90
|
||||
msgid "Spam Blocked"
|
||||
msgstr "Spam wurde blockiert"
|
||||
|
||||
#: class.akismet-widget.php:102
|
||||
msgid "<strong class=\"count\">%1$s spam</strong> blocked by <strong>Akismet</strong>"
|
||||
msgid_plural "<strong class=\"count\">%1$s spam</strong> blocked by <strong>Akismet</strong>"
|
||||
msgstr[0] "<strong class=\"count\">%1$s Spam</strong> von <strong>Akismet</strong> blockiert."
|
||||
msgstr[1] "<strong class=\"count\">%1$s Spam</strong> von <strong>Akismet</strong> blockiert."
|
||||
|
||||
#: class.akismet-admin.php:584
|
||||
msgid "Akismet caught this comment as spam."
|
||||
msgstr "Akismet hat den Kommentar als Spam bewertet."
|
||||
|
||||
#: class.akismet-admin.php:632
|
||||
msgid "Comment status was changed to %s"
|
||||
msgstr "Kommentar-Status wurde geändert auf %s"
|
||||
|
||||
#: class.akismet-admin.php:590
|
||||
msgid "Akismet cleared this comment."
|
||||
msgstr "Akismet hat diesen Kommentar bereinigt."
|
||||
|
||||
#: class.akismet-admin.php:593
|
||||
msgid "Comment was caught by wp_blacklist_check."
|
||||
msgstr "Kommentar wurde durch wp_blacklist_check abgefangen."
|
||||
|
||||
#: class.akismet-admin.php:619
|
||||
msgid "Akismet was unable to check this comment (response: %s) but will automatically retry later."
|
||||
msgstr "Akismet konnte diesen Kommentar (Antwort: %s) nicht überprüfen, wird dies aber später automatisch nochmal versuchen."
|
||||
|
||||
#: class.akismet-admin.php:638
|
||||
msgid "%1$s changed the comment status to %2$s."
|
||||
msgstr "%1$s hat den Kommentar-Status auf „%2$s“ geändert."
|
||||
|
||||
#: class.akismet-admin.php:597
|
||||
msgid "%s reported this comment as spam."
|
||||
msgstr "%s haben diesen Kommentar als Spam bewertet."
|
||||
|
||||
#: class.akismet-admin.php:605
|
||||
msgid "%s reported this comment as not spam."
|
||||
msgstr "%s haben diesen Kommentar als Kein-Spam bewertet."
|
||||
|
||||
#: class.akismet-admin.php:612
|
||||
msgid "Akismet caught this comment as spam during an automatic retry."
|
||||
msgstr "Akismet hat diesen Kommentar durch eine erneute Überprüfung als Spam erkannt."
|
||||
|
||||
#: class.akismet-admin.php:615
|
||||
msgid "Akismet cleared this comment during an automatic retry."
|
||||
msgstr "Akismet hat diesen Kommentar durch eine erneute Überprüfung als frei von Spam erkannt. "
|
||||
|
||||
#: class.akismet.php:1268
|
||||
msgid "Please <a href=\"%1$s\">upgrade WordPress</a> to a current version, or <a href=\"%2$s\">downgrade to version 2.4 of the Akismet plugin</a>."
|
||||
msgstr "Bitte <a href=\"%1$s\">aktualisiere WordPress</a> auf eine aktuelle Version oder führe ein <a href=\"%2$s\">Downgrade auf Version 2.4 des Akismet-Plugins</a> durch."
|
||||
|
||||
#: class.akismet.php:1268
|
||||
msgid "Akismet %s requires WordPress %s or higher."
|
||||
msgstr "Akismet %s benötigt WordPress %s oder höher."
|
||||
|
||||
#: views/config.php:37 views/config.php:42
|
||||
msgid "Spam blocked"
|
||||
msgid_plural "Spam blocked"
|
||||
msgstr[0] "Spam abgewehrt"
|
||||
msgstr[1] ""
|
||||
|
||||
#: views/config.php:35
|
||||
msgid "Past six months"
|
||||
msgstr "Letzte sechs Monate"
|
||||
|
||||
#: views/config.php:40
|
||||
msgid "All time"
|
||||
msgstr "Gesamte Zeit"
|
||||
|
||||
#: views/config.php:45
|
||||
msgid "Accuracy"
|
||||
msgstr "Genauigkeit"
|
||||
|
||||
#: views/config.php:109
|
||||
msgid "Show approved comments"
|
||||
msgstr "Genehmigte Kommentare anzeigen"
|
||||
|
||||
#: views/config.php:122
|
||||
msgid "Show the number of approved comments beside each comment author"
|
||||
msgstr "Zeige neben jedem Kommentar-Autor die Anzahl der genehmigten Kommentare."
|
||||
|
||||
#: views/config.php:131
|
||||
msgid "Akismet anti-spam strictness"
|
||||
msgstr "Akismet Anti-Spam-Genauigkeit"
|
||||
|
||||
#: views/config.php:132
|
||||
msgid "Silently discard the worst and most pervasive spam so I never see it."
|
||||
msgstr "Den ganzen Spam-Kram still und leise im Hintergrund entsorgen, damit ich diesen nie sehen muss."
|
||||
|
||||
#: views/config.php:133
|
||||
msgid "Always put spam in the Spam folder for review."
|
||||
msgstr "Spam immer in den Spam-Ordner zur Überprüfung ablegen."
|
||||
|
||||
#: views/config.php:141
|
||||
msgid "Spam in the <a href=\"%1$s\">spam folder</a> older than 1 day is deleted automatically."
|
||||
msgid_plural "Spam in the <a href=\"%1$s\">spam folder</a> older than %2$d days is deleted automatically."
|
||||
msgstr[0] "Spam, der länger als 1 Tag im <a href=\"%1$s\">Spam-Ordner</a> war, wird automatisch gelöscht."
|
||||
msgstr[1] "Spam, der länger als %2$d Tage im <a href=\"%1$s\">Spam-Ordner</a> war, wird automatisch gelöscht."
|
||||
|
||||
#: views/config.php:135
|
||||
msgid "Note:"
|
||||
msgstr "Hinweis: "
|
||||
|
||||
#: views/config.php:208
|
||||
msgid "Cancelled"
|
||||
msgstr "Abgelaufen"
|
||||
|
||||
#: views/config.php:176
|
||||
msgid "Save Changes"
|
||||
msgstr "Änderungen speichern"
|
||||
|
||||
#: views/config.php:170
|
||||
msgid "Disconnect this account"
|
||||
msgstr "Dieses Konto abkoppeln"
|
||||
|
||||
#: views/config.php:210
|
||||
msgid "Suspended"
|
||||
msgstr "Unterbrochen"
|
||||
|
||||
#: views/config.php:214
|
||||
msgid "No Subscription Found"
|
||||
msgstr "Kein Abonnement gefunden"
|
||||
|
||||
#: views/config.php:212
|
||||
msgid "Missing"
|
||||
msgstr "Fehlend"
|
||||
|
||||
#: views/config.php:222
|
||||
msgid "Next Billing Date"
|
||||
msgstr "Nächstes Rechnungs-Datum"
|
||||
|
||||
#: views/config.php:216
|
||||
msgid "Active"
|
||||
msgstr "Aktiv"
|
||||
|
||||
#: views/config.php:233
|
||||
msgid "Upgrade"
|
||||
msgstr "Aktualisierung"
|
||||
|
||||
#: views/config.php:233
|
||||
msgid "Change"
|
||||
msgstr "Ändern"
|
||||
|
||||
#: views/notice.php:17
|
||||
msgid "Akismet has detected a problem."
|
||||
msgstr "Akismet hat ein Problem festgestellt."
|
||||
|
||||
#: views/notice.php:18
|
||||
msgid "Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation and will automatically be rechecked later."
|
||||
msgstr "Einige Kommentare wurden nicht durch Akismet auf Spam überprüft. Sie wurden temporär in die Moderation eingereiht und werden automatisch später nachgeprüft."
|
||||
|
||||
#: views/notice.php:25
|
||||
msgid "Akismet Error Code: %s"
|
||||
msgstr "Akismet Fehler-Code: %s"
|
||||
|
||||
#. translators: the placeholder is a clickable URL that leads to more
|
||||
#. information regarding an error code.
|
||||
#: views/notice.php:30
|
||||
msgid "For more information: %s"
|
||||
msgstr "Für weitere Informationen: %s"
|
||||
|
||||
#: views/notice.php:45
|
||||
msgid "Your web host or server administrator has disabled PHP’s <code>gethostbynamel</code> function. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href=\"%s\" target=\"_blank\">this information about Akismet’s system requirements</a>."
|
||||
msgstr "Dein Webhoster oder Server-Administrator hat die <code>gethostbynamel</code>-Funktionen von PHP deaktiviert. <strong>Akismet funktioniert nicht korrekt, solange dies nicht korrigiert wurde.</strong> Bitte kontaktiere deinen Webhoster oder Firewall-Administrator und gib ihm <a href=\"%s\" target=\"_blank\">diese Informationen über die Systemvoraussetzungen von Akismet</a>."
|
||||
|
||||
#: views/notice.php:44
|
||||
msgid "Network functions are disabled."
|
||||
msgstr "Netzwerkfunktionen sind deaktiviert."
|
||||
|
||||
#: views/notice.php:50
|
||||
msgid "Your firewall may be blocking Akismet from connecting to its API. Please contact your host and refer to <a href=\"%s\" target=\"_blank\">our guide about firewalls</a>."
|
||||
msgstr "Deine Firewall dürfte Akismet daran hindern, sich mit seiner API zu verbinden. Bitte wende dich an deinen Host und verweise auf <a href=\"%s\" target=\"_blank\">unseren Leitfaden über Firewalls</a>."
|
||||
|
||||
#: views/notice.php:60
|
||||
msgid "Please visit your <a href=\"%s\" target=\"_blank\">Akismet account page</a> to reactivate your subscription."
|
||||
msgstr "Bitte besuche die <a href=\"%s\" target=\"_blank\">Akismet-Konto-Seite</a>, um dein Abonnement wieder zu aktivieren."
|
||||
|
||||
#: views/notice.php:65 views/notice.php:75
|
||||
msgid "Please contact <a href=\"%s\" target=\"_blank\">Akismet support</a> for assistance."
|
||||
msgstr "Bitte kontaktiere den <a href=\"%s\" target=\"_blank\">Akismet Support</a>, um Unterstützung zu erhalten."
|
||||
|
||||
#: views/notice.php:70
|
||||
msgid "You can help us fight spam and upgrade your account by <a href=\"%s\" target=\"_blank\">contributing a token amount</a>."
|
||||
msgstr "Du kannst uns bei der Spam-Bekämpfung helfen und dein Konto upgraden mit einer <a href=\"%s\" target=\"_blank\">Spende eines symbolischen Betrags</a>."
|
||||
|
||||
#: views/notice.php:74
|
||||
msgid "There is a problem with your API key."
|
||||
msgstr "Es gibt ein Problem mit deinem API-Schlüssel."
|
||||
|
||||
#: views/notice.php:106
|
||||
msgid "The key you entered is invalid. Please double-check it."
|
||||
msgstr "Der Schlüssel, den du eingegeben hast, ist ungültig. Überprüfe ihn bitte nochmal."
|
||||
|
||||
#: views/notice.php:120
|
||||
msgid "You’re using your Akismet key on more sites than your Pro subscription allows."
|
||||
msgstr "Du benutzt deinen Akismet-Schlüssel auf mehr Websites, als es dein Pro-Abonnement erlaubt."
|
||||
|
||||
#: views/notice.php:127
|
||||
msgid "You’re using Akismet on far too many sites for your Pro subscription."
|
||||
msgstr "Du benutzt Akismet auf viel zu vielen Websites für dein Pro-Abonnement."
|
||||
|
||||
#: views/start.php:47
|
||||
msgid "Connected via Jetpack"
|
||||
msgstr "Mit Jetpack verbunden"
|
||||
|
||||
#: views/start.php:41
|
||||
msgid "Reactivate Akismet"
|
||||
msgstr "Reaktiviere Akismet"
|
||||
|
||||
#: views/start.php:43
|
||||
msgid "Your subscription for %s is cancelled."
|
||||
msgstr "Dein Abonnement für %s ist beendet."
|
||||
|
||||
#: views/start.php:48
|
||||
msgid "Your subscription for %s is suspended."
|
||||
msgstr "Dein Abonnement für %s wurde unterbrochen."
|
||||
|
||||
#: views/start.php:49
|
||||
msgid "No worries! Get in touch and we’ll sort this out."
|
||||
msgstr "Keine Sorge! Nimm einfach Kontakt auf, wir wissen wie wir dir helfen können."
|
||||
|
||||
#: views/start.php:50
|
||||
msgid "Contact Akismet support"
|
||||
msgstr "Kontaktiere den Akismet-Support"
|
||||
|
||||
#: views/start.php:75
|
||||
msgid "Activate Akismet"
|
||||
msgstr "Aktiviere Akismet"
|
||||
|
||||
#: views/start.php:77
|
||||
msgid "Get your API key"
|
||||
msgstr "Hol dir deinen API-Schlüssel"
|
||||
|
||||
#. Plugin URI of the plugin
|
||||
msgid "https://akismet.com/"
|
||||
msgstr "https://akismet.com/"
|
||||
|
||||
#. Author URI of the plugin
|
||||
msgid "https://automattic.com/wordpress-plugins/"
|
||||
msgstr "https://wordpress.org/plugins/akismet/"
|
||||
|
||||
#. Author of the plugin
|
||||
msgid "Automattic"
|
||||
msgstr "Automattic"
|
||||
|
||||
#: class.akismet-admin.php:146
|
||||
msgid "Remove this URL"
|
||||
msgstr "Entferne diese URL"
|
||||
|
||||
#: class.akismet-admin.php:84
|
||||
msgid "Comment History"
|
||||
msgstr "Kommentar-Verlauf"
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-25 14:00:56+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Display as carousel":["Als Carousel darstellen"],"Add lightbox effect":["Lightbox-Effekt verwenden"],"Maximum font size":["Maximale Schriftgr\u00f6sse"],"The min font size must less than the max font size.":["Die minimale Schriftgr\u00f6sse muss kleiner als die maximale sein."],"Minimum font size":["Minimale Schriftgr\u00f6sse"],"The height must be greater than the max font size.":["Die H\u00f6he muss gr\u00f6sser als die maximale Schriftgr\u00f6sse sein."],"Height":["H\u00f6he"],"XL":["XL"],"L":["L"],"M":["M"],"S":["S"],"Use AMP Fit Text":["AMP Fit Text verwenden"],"AMP Noloading":["AMP Noloading"],"AMP Layout (modifies width\/height)":["AMP Layout (\u00e4ndert Breite\/H\u00f6he)"],"AMP Layout":["AMP Layout"],"Default":["Standard"],"Intrinsic":["Intrinsisch"],"Flex Item":["Flex Element"],"Fill":["F\u00fcllen"],"Fixed height":["Fixe H\u00f6he"],"Responsive":["Responsiv"],"Fixed":["Fixiert"],"No Display":["Verbergen"],"AMP Settings":["AMP Einstellungen"]}},"comment":{"reference":"assets\/js\/amp-editor-blocks.js"}}
|
@ -0,0 +1 @@
|
||||
{"translation-revision-date":"2019-04-25 14:00:56+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=2; plural=n != 1;","lang":"de"},"Some issues may be due to content here.":["Einige der Fehler k\u00f6nnten vom Inhalt hier stammen."],"The issue may not be due to content here":["Der Fehler scheint nicht vom Inhalt hier zu stammen."],"The issues are not directly due to content here.":["Die Fehler stammen nicht direkt vom Inhalt hier."],"There is %s issue from AMP validation.":["Es gibt %s AMP Validierungsfehler.","Es gibt %s AMP Validierungsfehler."],"unknown":["unbekannt"],"Error code: ":["Fehlercode:"],"Invalid attribute: ":["Ung\u00fcltiges Attribut:"],"Invalid element: ":["Ung\u00fcltiges Element:"],"The issue is not directly due to content here.":["Der Fehler stammt nicht direkt vom Inhalt hier."],"%s issue is directly due to content here.":["%s Fehler wurde direkt vom Inhalt hier verursacht.","%s Fehler wurden direkt vom Inhalt hier verursacht."],"There is %s issue from AMP validation which needs review.":["Es gibt %s AMP Validierungsfehler, welcher eine \u00dcberpr\u00fcfung erfordert.","Es gibt %s AMP Validierungsfehler, welche eine \u00dcberpr\u00fcfung erfordern."],"Review issues":["Fehler pr\u00fcfen"],"Non-accepted validation errors prevent AMP from being served, and the user will be redirected to the non-AMP version.":["Nicht akzeptierte Validierungsfehler verhindern die Ausieferung von AMP und Besucher werden auf die Nicht-AMP Version weitergeleitet."]}},"comment":{"reference":"assets\/js\/amp-block-validation.js"}}
|
BIN
msd2/wordpress/wp-content/languages/plugins/amp-de_DE.mo
Normal file
1812
msd2/wordpress/wp-content/languages/plugins/amp-de_DE.po
Normal file
@ -0,0 +1,438 @@
|
||||
# Translation of Plugins - Antispam Bee - Stable (latest release) in German
|
||||
# This file is distributed under the same license as the Plugins - Antispam Bee - Stable (latest release) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2019-02-15 07:22:46+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Plugins - Antispam Bee - Stable (latest release)\n"
|
||||
|
||||
#: antispam_bee.php:1862
|
||||
msgctxt "Word count type. Do not translate!"
|
||||
msgid "words"
|
||||
msgstr "words"
|
||||
|
||||
#: inc/gui.class.php:540
|
||||
msgid "https://wordpress.org/support/plugin/antispam-bee"
|
||||
msgstr "https://wordpress.org/support/plugin/antispam-bee"
|
||||
|
||||
#: inc/gui.class.php:537
|
||||
msgid "https://github.com/pluginkollektiv/antispam-bee/wiki/"
|
||||
msgstr "https://github.com/pluginkollektiv/antispam-bee/wiki/de-Home"
|
||||
|
||||
#: inc/gui.class.php:477
|
||||
msgid "Delete Antispam Bee data when uninstalling"
|
||||
msgstr "Antispam Bee Daten bei Deinstallation löschen"
|
||||
|
||||
#: antispam_bee.php:2523
|
||||
msgid "Trackback"
|
||||
msgstr "Trackback"
|
||||
|
||||
#: antispam_bee.php:2523
|
||||
msgid "Comment"
|
||||
msgstr "Kommentar"
|
||||
|
||||
#: antispam_bee.php:437
|
||||
msgid "Identical Post title and blog title"
|
||||
msgstr "Identischer Beitrags- und Blog-Titel"
|
||||
|
||||
#: inc/gui.class.php:478
|
||||
msgid "If checked, you will delete all data Antispam Bee creates, when uninstalling the plugin."
|
||||
msgstr "Wenn diese Option aktiviert ist, werden alle von Antispam Bee erstellten Daten bei der Deinstallation des Plugins gelöscht."
|
||||
|
||||
#: inc/gui.class.php:275
|
||||
msgid "Block or allow comments from specific countries"
|
||||
msgstr "Kommentare aus bestimmten Ländern blockieren oder zulassen"
|
||||
|
||||
#: antispam_bee.php:428
|
||||
msgid "Honeypot"
|
||||
msgstr "Honeypot"
|
||||
|
||||
#. translators: The number of spam comments Antispam Bee blocked so far.
|
||||
#: antispam_bee.php:697
|
||||
msgid "%d Blocked"
|
||||
msgstr "%d blockiert"
|
||||
|
||||
#. Description of the plugin
|
||||
msgid "Antispam plugin with a sophisticated toolset for effective day to day comment and trackback spam-fighting. Built with data protection and privacy in mind."
|
||||
msgstr "Antispam-Plugin mit einem hochentwickelten Tool-Set für effektive tägliche Kommentar- und Trackback-Spam-Bekämpfung. Entwickelt mit Blick auf Datenschutz und Privatsphäre."
|
||||
|
||||
#: inc/gui.class.php:564
|
||||
msgid "Spanish"
|
||||
msgstr "Spanisch"
|
||||
|
||||
#: inc/gui.class.php:563
|
||||
msgid "Italian"
|
||||
msgstr "Italienisch"
|
||||
|
||||
#: inc/gui.class.php:562
|
||||
msgid "French"
|
||||
msgstr "Französisch"
|
||||
|
||||
#: inc/gui.class.php:561
|
||||
msgid "English"
|
||||
msgstr "Englisch"
|
||||
|
||||
#: inc/gui.class.php:560
|
||||
msgid "German"
|
||||
msgstr "Deutsch"
|
||||
|
||||
#. translators: 1: opening <a> tag with link to documentation. 2: closing </a>
|
||||
#. tag.
|
||||
#: inc/gui.class.php:353
|
||||
msgid "Detect and approve only the specified language. Please note the %1$sprivacy notice%2$s for this option."
|
||||
msgstr "Kommentare nur in angegebener Sprache zulassen. Bitte beachte den %1$sDatenschutzhinweis%2$s für diese Option."
|
||||
|
||||
#: antispam_bee.php:432
|
||||
msgid "Local DB Spam"
|
||||
msgstr "Lokale Spam-DB"
|
||||
|
||||
#: antispam_bee.php:435
|
||||
msgid "Comment Language"
|
||||
msgstr "Kommentarsprache"
|
||||
|
||||
#: antispam_bee.php:431
|
||||
msgid "Fake IP"
|
||||
msgstr "Gefälschte IP"
|
||||
|
||||
#. translators: 1: opening <a> tag with link to documentation. 2: closing </a>
|
||||
#. tag.
|
||||
#: inc/gui.class.php:287
|
||||
msgid "Filtering the requests depending on country. Please note the %1$sprivacy notice%2$s for this option."
|
||||
msgstr "Kommentare nach Ursprungsländern filtern. Bitte beachte den %1$sDatenschutzhinweis%2$s für diese Option."
|
||||
|
||||
#: inc/gui.class.php:299
|
||||
msgid "https://www.iso.org/iso/country_names_and_code_elements"
|
||||
msgstr "https://www.iso.org/iso/country_names_and_code_elements"
|
||||
|
||||
#: inc/gui.class.php:340
|
||||
msgid "Allow comments only in certain language"
|
||||
msgstr "Kommentare nur in einer bestimmten Sprache zulassen"
|
||||
|
||||
#: inc/gui.class.php:346
|
||||
msgid "https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation#allow-comments-only-in-certain-language"
|
||||
msgstr "https://github.com/pluginkollektiv/antispam-bee/wiki/de-Dokumentation#kommentare-nur-in-einer-sprache-zulassen"
|
||||
|
||||
#. translators: 1: opening <a> tag with link to documentation. 2: closing </a>
|
||||
#. tag
|
||||
#: inc/gui.class.php:222
|
||||
msgid "Check if commenter has a Gravatar image. Please note the %1$sprivacy notice%2$s for this option."
|
||||
msgstr "Prüfung auf Nutzung eines Gravatar-Bildes. Bitte beachte den %1$sDatenschutzhinweis%2$s für diese Option."
|
||||
|
||||
#: inc/gui.class.php:374
|
||||
msgid "Language"
|
||||
msgstr "Sprache"
|
||||
|
||||
#: inc/gui.class.php:252
|
||||
msgid "Validation of the IP address used"
|
||||
msgstr "Gültigkeitsprüfung der verwendeten IP-Adresse"
|
||||
|
||||
#: inc/gui.class.php:402
|
||||
msgid "Spam-Notification by email"
|
||||
msgstr "Bei Spam per E-Mail benachrichtigen"
|
||||
|
||||
#: inc/gui.class.php:441
|
||||
msgid "Comments"
|
||||
msgstr "Kommentare"
|
||||
|
||||
#: inc/gui.class.php:442
|
||||
msgid "Pings"
|
||||
msgstr "Pings"
|
||||
|
||||
#: inc/gui.class.php:491
|
||||
msgid "Various options"
|
||||
msgstr "Verschiedene Optionen"
|
||||
|
||||
#: inc/gui.class.php:498
|
||||
msgid "Generate statistics as a dashboard widget"
|
||||
msgstr "Statistiken als Dashboard-Widget generieren"
|
||||
|
||||
#: inc/gui.class.php:534
|
||||
msgid "FAQ"
|
||||
msgstr "FAQ"
|
||||
|
||||
#: inc/gui.class.php:260
|
||||
msgid "Predefined and custom patterns by plugin hook"
|
||||
msgstr "Vordefinierte und eigene Muster via Plugin-Hook"
|
||||
|
||||
#: inc/gui.class.php:537
|
||||
msgid "Manual"
|
||||
msgstr "Dokumentation"
|
||||
|
||||
#: antispam_bee.php:429
|
||||
msgid "Comment time"
|
||||
msgstr "Kommentarzeit"
|
||||
|
||||
#: antispam_bee.php:430
|
||||
msgid "Empty Data"
|
||||
msgstr "Unausgefüllte Felder"
|
||||
|
||||
#: antispam_bee.php:433
|
||||
msgid "Country Check"
|
||||
msgstr "Ländererkennung"
|
||||
|
||||
#: antispam_bee.php:434
|
||||
msgid "BBCode"
|
||||
msgstr "BBCode"
|
||||
|
||||
#: antispam_bee.php:436
|
||||
msgid "Regular Expression"
|
||||
msgstr "Regulärer Ausdruck"
|
||||
|
||||
#: inc/gui.class.php:531 antispam_bee.php:557
|
||||
msgid "Donate"
|
||||
msgstr "Spenden"
|
||||
|
||||
#: inc/gui.class.php:540 antispam_bee.php:558
|
||||
msgid "Support"
|
||||
msgstr "Support"
|
||||
|
||||
#: inc/gui.class.php:281
|
||||
msgid "https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation#block-comments-from-specific-countries"
|
||||
msgstr "https://github.com/pluginkollektiv/antispam-bee/wiki/de-Dokumentation#bestimmte-länder-blockieren-bzw-erlauben"
|
||||
|
||||
#: inc/gui.class.php:216
|
||||
msgid "https://github.com/pluginkollektiv/antispam-bee/wiki/en-Documentation#trust-commenters-with-a-gravatar"
|
||||
msgstr "https://github.com/pluginkollektiv/antispam-bee/wiki/de-Dokumentation#kommentatoren-mit-gravatar-vertrauen"
|
||||
|
||||
#: inc/gui.class.php:202
|
||||
msgid "No review of already commented users"
|
||||
msgstr "Keine Prüfung bereits kommentierender Benutzer"
|
||||
|
||||
#. translators: 1: opening <a> tag with link to ISO codes reference. 2: closing
|
||||
#. </a> tag.
|
||||
#: inc/gui.class.php:326
|
||||
msgid "Whitelist %1$sISO Codes%2$s for this option."
|
||||
msgstr "%1$sISO-Codes%2$s, die immer erlaubt sind. (Whitelist)"
|
||||
|
||||
#. translators: 1: opening <a> tag with link to ISO codes reference. 2: closing
|
||||
#. </a> tag.
|
||||
#: inc/gui.class.php:311
|
||||
msgid "Blacklist %1$sISO Codes%2$s for this option."
|
||||
msgstr "%1$sISO-Codes%2$s, die nicht erlaubt sind. (Blacklist)"
|
||||
|
||||
#: inc/gui.class.php:534
|
||||
msgid "https://wordpress.org/plugins/antispam-bee/faq/"
|
||||
msgstr "https://de.wordpress.org/plugins/antispam-bee/#faq"
|
||||
|
||||
#: inc/gui.class.php:305 inc/gui.class.php:320
|
||||
msgid "e.g. BF, SG, YE"
|
||||
msgstr "z. B. BF, SG, YE"
|
||||
|
||||
#: inc/gui.class.php:515
|
||||
msgid "No spam check for link notifications"
|
||||
msgstr "Keine Spam-Prüfung für Link-Benachrichtigungen"
|
||||
|
||||
#: inc/gui.class.php:268
|
||||
msgid "Check for spam data on your own blog"
|
||||
msgstr "Den Spam-Bestand des eigenen Blogs durchsuchen"
|
||||
|
||||
#: antispam_bee.php:2538
|
||||
msgid "Trash it"
|
||||
msgstr "In den Papierkorb"
|
||||
|
||||
#: antispam_bee.php:533
|
||||
msgid "Settings"
|
||||
msgstr "Einstellungen"
|
||||
|
||||
#: antispam_bee.php:804
|
||||
msgid "No data available."
|
||||
msgstr "Noch keine Daten vorhanden."
|
||||
|
||||
#: antispam_bee.php:2514
|
||||
msgid "Author"
|
||||
msgstr "Autor"
|
||||
|
||||
#: antispam_bee.php:2522
|
||||
msgid "Type"
|
||||
msgstr "Typ"
|
||||
|
||||
#: antispam_bee.php:2544
|
||||
msgid "Delete it"
|
||||
msgstr "Löschen"
|
||||
|
||||
#: antispam_bee.php:2550
|
||||
msgid "Approve it"
|
||||
msgstr "Freigeben"
|
||||
|
||||
#: antispam_bee.php:2558
|
||||
msgid "Notify message by Antispam Bee"
|
||||
msgstr "Benachrichtigung von Antispam Bee"
|
||||
|
||||
#: antispam_bee.php:2559
|
||||
msgid "http://antispambee.com"
|
||||
msgstr "http://antispambee.de"
|
||||
|
||||
#: inc/gui.class.php:25 inc/gui.class.php:29
|
||||
msgid "Cheatin’ uh?"
|
||||
msgstr "Schummeln, was?"
|
||||
|
||||
#: inc/gui.class.php:191
|
||||
msgid "Antispam filter"
|
||||
msgstr "Antispam-Regeln"
|
||||
|
||||
#: inc/gui.class.php:201
|
||||
msgid "Trust approved commenters"
|
||||
msgstr "Genehmigten Kommentatoren vertrauen"
|
||||
|
||||
#: inc/gui.class.php:210
|
||||
msgid "Trust commenters with a Gravatar"
|
||||
msgstr "Kommentatoren mit Gravatar vertrauen"
|
||||
|
||||
#: inc/gui.class.php:235
|
||||
msgid "Consider the comment time"
|
||||
msgstr "Kommentarzeit berücksichtigen"
|
||||
|
||||
#: inc/gui.class.php:243
|
||||
msgid "BBCode is spam"
|
||||
msgstr "BBCode als Spam einstufen"
|
||||
|
||||
#: inc/gui.class.php:244
|
||||
msgid "Review the comment contents for BBCode links"
|
||||
msgstr "Analyse der Kommentarinhalte auf BBCode-Links"
|
||||
|
||||
#: inc/gui.class.php:251
|
||||
msgid "Validate the ip address of commenters"
|
||||
msgstr "IP-Adresse des Kommentators validieren"
|
||||
|
||||
#: inc/gui.class.php:259
|
||||
msgid "Use regular expressions"
|
||||
msgstr "Reguläre Ausdrücke anwenden"
|
||||
|
||||
#: inc/gui.class.php:384
|
||||
msgid "Advanced"
|
||||
msgstr "Erweitert"
|
||||
|
||||
#: inc/gui.class.php:387
|
||||
msgid "Other antispam tools"
|
||||
msgstr "Weitere Steuerungselemente"
|
||||
|
||||
#: inc/gui.class.php:395
|
||||
msgid "Keep the spam in my blog."
|
||||
msgstr "Markierung als Spam / Aufbewahrung im Blog"
|
||||
|
||||
#: inc/gui.class.php:425
|
||||
msgid "Cleaning up the database from old entries"
|
||||
msgstr "Säuberung der Datenbank von alten Einträgen"
|
||||
|
||||
#. translators: %s is the select field.
|
||||
#: inc/gui.class.php:437
|
||||
msgid "Limit approval to %s"
|
||||
msgstr "Aufbewahrung gilt nur für %s"
|
||||
|
||||
#: inc/gui.class.php:457
|
||||
msgid "For multiple selections press Ctrl/CMD"
|
||||
msgstr "Mehrfachauswahl bzw. Abwahl mit Strg/CMD"
|
||||
|
||||
#: inc/gui.class.php:488
|
||||
msgid "More"
|
||||
msgstr "Sonstiges"
|
||||
|
||||
#: inc/gui.class.php:499
|
||||
msgid "Daily updates of spam detection rate"
|
||||
msgstr "Verlauf der Erkennungsrate mit täglichen Werten"
|
||||
|
||||
#: inc/gui.class.php:514
|
||||
msgid "Do not check trackbacks / pingbacks"
|
||||
msgstr "Eingehende Ping- und Trackbacks ignorieren"
|
||||
|
||||
#: inc/gui.class.php:523
|
||||
msgid "Check for comment forms on archive pages"
|
||||
msgstr "Überwachung des Formulars auf Archivseiten"
|
||||
|
||||
#: inc/gui.class.php:543
|
||||
msgid "Save Changes"
|
||||
msgstr "Änderungen speichern"
|
||||
|
||||
#. Plugin Name of the plugin
|
||||
msgid "Antispam Bee"
|
||||
msgstr "Antispam Bee"
|
||||
|
||||
#. Author of the plugin
|
||||
msgid "pluginkollektiv"
|
||||
msgstr "pluginkollektiv"
|
||||
|
||||
#: antispam_bee.php:2503
|
||||
msgid "Content removed by Antispam Bee"
|
||||
msgstr "Inhalt von Antispam Bee entfernt"
|
||||
|
||||
#: inc/gui.class.php:194
|
||||
msgid "Filter in the execution order"
|
||||
msgstr "Filter in der Ausführungsreihenfolge"
|
||||
|
||||
#. Plugin URI of the plugin
|
||||
msgid "https://wordpress.org/plugins/antispam-bee/"
|
||||
msgstr "https://de.wordpress.org/plugins/antispam-bee/"
|
||||
|
||||
#: inc/gui.class.php:394
|
||||
msgid "Mark as spam, do not delete"
|
||||
msgstr "Erkannten Spam markieren, nicht löschen"
|
||||
|
||||
#: inc/gui.class.php:403
|
||||
msgid "Notify admins by e-mail about incoming spam"
|
||||
msgstr "E-Mail-Benachrichtigung an den Admin bei erkanntem Spam"
|
||||
|
||||
#: antispam_bee.php:2495
|
||||
msgid "Comment marked as spam"
|
||||
msgstr "Kommentar als Spam markiert"
|
||||
|
||||
#: inc/gui.class.php:522
|
||||
msgid "Comment form used outside of posts"
|
||||
msgstr "Kommentarformular wird außerhalb von Beiträgen verwendet"
|
||||
|
||||
#: inc/gui.class.php:236
|
||||
msgid "Not recommended when using page caching"
|
||||
msgstr "Nicht empfohlen beim Caching von Blog-Seiten"
|
||||
|
||||
#. translators: $s is an input field containing the number of days.
|
||||
#: inc/gui.class.php:421
|
||||
msgid "Delete existing spam after %s days"
|
||||
msgstr "Vorhandenen Spam nach %s Tagen löschen"
|
||||
|
||||
#. Author URI of the plugin
|
||||
msgid "https://pluginkollektiv.org"
|
||||
msgstr "https://pluginkollektiv.org"
|
||||
|
||||
#: inc/gui.class.php:267
|
||||
msgid "Look in the local spam database"
|
||||
msgstr "Lokale Spam-Datenbank miteinbeziehen"
|
||||
|
||||
#: inc/gui.class.php:507
|
||||
msgid "Amount of identified spam comments"
|
||||
msgstr "Menge der identifizierten Spam-Kommentare"
|
||||
|
||||
#: inc/gui.class.php:456
|
||||
msgid "Delete comments by spam reasons"
|
||||
msgstr "Bei definierten Spam-Gründen sofort löschen"
|
||||
|
||||
#: inc/gui.class.php:410
|
||||
msgid "Do not save the spam reason"
|
||||
msgstr "Spam-Grund des Kommentars nicht speichern"
|
||||
|
||||
#: antispam_bee.php:2510
|
||||
msgid "New spam comment on your post"
|
||||
msgstr "Neuer Spam-Kommentar zu deinem Beitrag"
|
||||
|
||||
#: inc/gui.class.php:449
|
||||
msgid "Other types of spam will be deleted immediately"
|
||||
msgstr "Andere Spam-Typen werden sofort gelöscht"
|
||||
|
||||
#: inc/gui.class.php:506
|
||||
msgid "Spam counter on the dashboard"
|
||||
msgstr "Spam-Zähler auf dem Dashboard anzeigen"
|
||||
|
||||
#: antispam_bee.php:2554
|
||||
msgid "Spam list"
|
||||
msgstr "Spam-Liste"
|
||||
|
||||
#: inc/gui.class.php:468 inc/columns.class.php:28 antispam_bee.php:2529
|
||||
msgid "Spam Reason"
|
||||
msgstr "Spam-Grund"
|
||||
|
||||
#: inc/gui.class.php:411
|
||||
msgid "Spam reason as a table column in the spam overview"
|
||||
msgstr "Spam-Grund als Spalte in der Spam-Übersicht"
|
BIN
msd2/wordpress/wp-content/languages/plugins/cachify-de_DE.mo
Normal file
130
msd2/wordpress/wp-content/languages/plugins/cachify-de_DE.po
Normal file
@ -0,0 +1,130 @@
|
||||
# Translation of Plugins - Cachify - Stable (latest release) in German
|
||||
# This file is distributed under the same license as the Plugins - Cachify - Stable (latest release) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2018-04-10 04:47:10+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Plugins - Cachify - Stable (latest release)\n"
|
||||
|
||||
#: inc/cachify.class.php:576
|
||||
msgid "Settings"
|
||||
msgstr "Einstellungen"
|
||||
|
||||
#: inc/cachify.class.php:648
|
||||
msgid "Caching method"
|
||||
msgstr "Caching-Methode"
|
||||
|
||||
#: inc/cachify.class.php:650
|
||||
msgid "Empty"
|
||||
msgstr "Leerer"
|
||||
|
||||
#: inc/cachify.class.php:717
|
||||
msgid "Flush the cachify cache"
|
||||
msgstr "Cachify-Cache leeren"
|
||||
|
||||
#: inc/cachify.class.php:1514
|
||||
msgid "Remove"
|
||||
msgstr "Löschen"
|
||||
|
||||
#: inc/cachify.class.php:1516
|
||||
msgid "Edit"
|
||||
msgstr "Bearbeiten"
|
||||
|
||||
#: inc/cachify.class.php:1518
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: inc/cachify.class.php:1519
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
#. #-#-#-#-# tmp-cachify.pot (Cachify 2.2.3) #-#-#-#-#
|
||||
#. Plugin Name of the plugin/theme
|
||||
#: inc/cachify.class.php:1534 inc/cachify.class.php:1535
|
||||
msgid "Cachify"
|
||||
msgstr "Cachify"
|
||||
|
||||
#: inc/cachify.class.php:1559
|
||||
msgid "Database"
|
||||
msgstr "Datenbank"
|
||||
|
||||
#: inc/cachify.class.php:1561
|
||||
msgid "Hard disk"
|
||||
msgstr "Festplatte"
|
||||
|
||||
#: inc/cachify.class.php:1596
|
||||
msgid "No minify"
|
||||
msgstr "Keine Minimierung"
|
||||
|
||||
#: inc/cachify.class.php:1730
|
||||
msgid "Cache expiration"
|
||||
msgstr "Cache-Gültigkeit"
|
||||
|
||||
#: inc/cachify.class.php:1735
|
||||
msgid "Hours"
|
||||
msgstr "Stunden"
|
||||
|
||||
#: inc/cachify.class.php:1742
|
||||
msgid "Cache generation"
|
||||
msgstr "Cache-Generierung"
|
||||
|
||||
#: inc/cachify.class.php:1763
|
||||
msgid "Cache exceptions"
|
||||
msgstr "Cache-Ausnahmen"
|
||||
|
||||
#: inc/cachify.class.php:1784
|
||||
msgid "Cache minify"
|
||||
msgstr "Cache-Minimierung"
|
||||
|
||||
#: inc/cachify.class.php:1804
|
||||
msgid "Manual"
|
||||
msgstr "Dokumentation"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "pluginkollektiv"
|
||||
msgstr "pluginkollektiv"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "http://pluginkollektiv.org"
|
||||
msgstr "http://pluginkollektiv.org"
|
||||
|
||||
#. Plugin URI of the plugin/theme
|
||||
msgid "https://wordpress.org/plugins/cachify/"
|
||||
msgstr "https://de.wordpress.org/plugins/cachify/"
|
||||
|
||||
#: inc/cachify.class.php:1755
|
||||
msgid "Flush the cache at new comments"
|
||||
msgstr "Cache bei neuen Kommentaren leeren"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "Easy to use WordPress caching plugin. Serving static blog pages from database, disk, Memcached or APC."
|
||||
msgstr "Smarter Cache für WordPress. Zwischenspeicherung der Inhalte als statische Dateien. Wahlweise in der Datenbank, Festplatte, Memcached oder APC."
|
||||
|
||||
#: inc/cachify.class.php:830
|
||||
msgid "Cachify cache is flushed."
|
||||
msgstr "Der Cachify-Cache wurde geleert."
|
||||
|
||||
#: inc/cachify.class.php:1748
|
||||
msgid "No cache generation by logged in users"
|
||||
msgstr "Kein Cache-Aufbau durch angemeldete Benutzer"
|
||||
|
||||
#: inc/cachify.class.php:1483
|
||||
msgid "Total cache"
|
||||
msgstr "Gesamter Cache"
|
||||
|
||||
#: inc/cachify.class.php:1484
|
||||
msgid "Page cache"
|
||||
msgstr "Cache der Seite"
|
||||
|
||||
#: inc/cachify.class.php:1715
|
||||
msgid "Cache method"
|
||||
msgstr "Cache-Methode"
|
||||
|
||||
#: inc/cachify.class.php:1667
|
||||
msgid "The server configuration file (e.g. .htaccess) needs to be adjusted"
|
||||
msgstr "Die Serverkonfigurationsdatei (z. B. .htaccess) muss jetzt erweitert werden"
|
1453
msd2/wordpress/wp-content/languages/plugins/contact-form-7-de_DE.po
Normal file
@ -0,0 +1,259 @@
|
||||
# Translation of Plugins - Limit Login Attempts - Stable (latest release) in German
|
||||
# This file is distributed under the same license as the Plugins - Limit Login Attempts - Stable (latest release) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2018-02-27 20:22:48+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Plugins - Limit Login Attempts - Stable (latest release)\n"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "http://devel.kostdoktorn.se"
|
||||
msgstr "http://devel.kostdoktorn.se"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "Johan Eenfeldt"
|
||||
msgstr "Johan Eenfeldt"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "Limit rate of login attempts, including by way of cookies, for each IP."
|
||||
msgstr "Maximale Anzahl an Anmeldeversuchen beschränken, auch durch Cookies, für jede IP."
|
||||
|
||||
#. Plugin URI of the plugin/theme
|
||||
msgid "http://devel.kostdoktorn.se/limit-login-attempts"
|
||||
msgstr "http://devel.kostdoktorn.se/limit-login-attempts"
|
||||
|
||||
#. Plugin Name of the plugin/theme
|
||||
msgid "Limit Login Attempts"
|
||||
msgstr "Limit Login Attempts"
|
||||
|
||||
#: limit-login-attempts.php:1094
|
||||
msgid "Clear Log"
|
||||
msgstr "Protokoll zurücksetzen"
|
||||
|
||||
#: limit-login-attempts.php:1089
|
||||
msgid "Lockout log"
|
||||
msgstr "Protokoll der durchgeführten Sperrungen"
|
||||
|
||||
#: limit-login-attempts.php:1081
|
||||
msgid "Change Options"
|
||||
msgstr "Einstellungen speichern"
|
||||
|
||||
#: limit-login-attempts.php:1076
|
||||
msgid "lockouts"
|
||||
msgstr "Aussperrungen"
|
||||
|
||||
#: limit-login-attempts.php:1076
|
||||
msgid "Email to admin after"
|
||||
msgstr "E-Mail an den Administrator nach"
|
||||
|
||||
#: limit-login-attempts.php:1075
|
||||
msgid "Log IP"
|
||||
msgstr "IP protokollieren"
|
||||
|
||||
#: limit-login-attempts.php:1073
|
||||
msgid "Notify on lockout"
|
||||
msgstr "Benachrichtigung im Falle einer Sperrung"
|
||||
|
||||
#: limit-login-attempts.php:1069
|
||||
msgid "No"
|
||||
msgstr "Nein"
|
||||
|
||||
#: limit-login-attempts.php:1069
|
||||
msgid "Yes"
|
||||
msgstr "Ja"
|
||||
|
||||
#: limit-login-attempts.php:1067
|
||||
msgid "Handle cookie login"
|
||||
msgstr "Anmeldungen via Cookies berücksichtigen"
|
||||
|
||||
#: limit-login-attempts.php:1061
|
||||
msgid "From behind a reversy proxy"
|
||||
msgstr "Über einen Reverse-Proxy-Server"
|
||||
|
||||
#: limit-login-attempts.php:1056
|
||||
msgid "Direct connection"
|
||||
msgstr "Direkte Verbindung"
|
||||
|
||||
#: limit-login-attempts.php:1050
|
||||
msgid "Site connection"
|
||||
msgstr "Verbindungsweg zu dieser Website"
|
||||
|
||||
#: limit-login-attempts.php:1046
|
||||
msgid "hours until retries are reset"
|
||||
msgstr "Stunden bis fehlgeschlagene Anmeldeversuche zurückgesetzt werden"
|
||||
|
||||
#: limit-login-attempts.php:1045
|
||||
msgid "hours"
|
||||
msgstr "Stunden"
|
||||
|
||||
#: limit-login-attempts.php:1045
|
||||
msgid "lockouts increase lockout time to"
|
||||
msgstr "Sperrungen erhöhen die insgesamte Sperrzeit um"
|
||||
|
||||
#: limit-login-attempts.php:1044
|
||||
msgid "minutes lockout"
|
||||
msgstr "Minuten Sperrung nach Überschreiten der zulässigen Anmeldeversuche"
|
||||
|
||||
#: limit-login-attempts.php:1043
|
||||
msgid "allowed retries"
|
||||
msgstr "erlaubte Anmeldeversuche"
|
||||
|
||||
#: limit-login-attempts.php:1041
|
||||
msgid "Lockout"
|
||||
msgstr "Sperrung"
|
||||
|
||||
#: limit-login-attempts.php:1036
|
||||
msgid "Options"
|
||||
msgstr "Optionen"
|
||||
|
||||
#: limit-login-attempts.php:1030
|
||||
msgid "%d IP is currently blocked from trying to log in"
|
||||
msgstr "%d IP ist derzeit für Anmeldeversuche gesperrt"
|
||||
|
||||
#: limit-login-attempts.php:1029
|
||||
msgid "Restore Lockouts"
|
||||
msgstr "Aussperrungen aufheben"
|
||||
|
||||
#: limit-login-attempts.php:1027
|
||||
msgid "Active lockouts"
|
||||
msgstr "Aktive Sperrungen"
|
||||
|
||||
#: limit-login-attempts.php:1022
|
||||
msgid "No lockouts yet"
|
||||
msgstr "Derzeit sind keine Sperrungen aktiv"
|
||||
|
||||
#: limit-login-attempts.php:1021
|
||||
msgid "%d lockout since last reset"
|
||||
msgid_plural "%d lockouts since last reset"
|
||||
msgstr[0] "%d Sperrung seit dem letzten Zurücksetzen"
|
||||
msgstr[1] "%d Sperrungen seit letztem Zurücksetzen"
|
||||
|
||||
#: limit-login-attempts.php:1020
|
||||
msgid "Reset Counter"
|
||||
msgstr "Zähler zurücksetzen"
|
||||
|
||||
#: limit-login-attempts.php:1017
|
||||
msgid "Total lockouts"
|
||||
msgstr "Bisher vorgenommene Sperrungen"
|
||||
|
||||
#: limit-login-attempts.php:1012
|
||||
msgid "Statistics"
|
||||
msgstr "Statistik"
|
||||
|
||||
#: limit-login-attempts.php:1011
|
||||
msgid "Limit Login Attempts Settings"
|
||||
msgstr "Limit Login Attempts Einstellungen"
|
||||
|
||||
#: limit-login-attempts.php:1003
|
||||
msgid "<strong>Current setting appears to be invalid</strong>. Please make sure it is correct. Further information can be found <a href=\"%s\" title=\"FAQ\">here</a>"
|
||||
msgstr "<strong>Die aktuellen Einstellungen scheinen ungültig zu sein.</strong> Bitte stelle sicher, dass sie korrekt sind. Weitere Infos zu den Einstellungen findest du <a href=\"%s\" title=\"FAQ\">hier</a>"
|
||||
|
||||
#: limit-login-attempts.php:995
|
||||
msgid "It appears the site is reached through a proxy server (proxy IP: %s, your IP: %s)"
|
||||
msgstr "Der Zugriff auf diese Webseite erfolgt über einen Proxy-Server (IP des Proxy-Servers: %s – deine IP: %s)"
|
||||
|
||||
#: limit-login-attempts.php:993
|
||||
msgid "It appears the site is reached directly (from your IP: %s)"
|
||||
msgstr "Der Zugriff auf diese Webseite erfolgt auf direktem Weg (von deiner IP: %s)"
|
||||
|
||||
#: limit-login-attempts.php:975
|
||||
msgid "Options changed"
|
||||
msgstr "Einstellungen wurden geändert"
|
||||
|
||||
#: limit-login-attempts.php:946
|
||||
msgid "Cleared current lockouts"
|
||||
msgstr "Sperrungen wurden deaktiviert"
|
||||
|
||||
#: limit-login-attempts.php:938
|
||||
msgid "Reset lockout count"
|
||||
msgstr "Anzahl Sperrungen zurücksetzen"
|
||||
|
||||
#: limit-login-attempts.php:930
|
||||
msgid "Cleared IP log"
|
||||
msgstr "Protokoll wurde gelöscht"
|
||||
|
||||
#: limit-login-attempts.php:901
|
||||
msgid "%d lockout"
|
||||
msgid_plural "%d lockouts"
|
||||
msgstr[0] "%d Sperrung"
|
||||
msgstr[1] "%d Sperrungen"
|
||||
|
||||
#: limit-login-attempts.php:896
|
||||
msgid "Tried to log in as"
|
||||
msgstr "Anmeldeversuch als"
|
||||
|
||||
#: limit-login-attempts.php:896
|
||||
msgctxt "Internet address"
|
||||
msgid "IP"
|
||||
msgstr "IP"
|
||||
|
||||
#: limit-login-attempts.php:728
|
||||
msgid "<strong>ERROR</strong>: Incorrect username or password."
|
||||
msgstr "<strong>FEHLER</strong>: Ungültiger Benutzername oder Passwort."
|
||||
|
||||
#: limit-login-attempts.php:657
|
||||
msgid "<strong>%d</strong> attempt remaining."
|
||||
msgid_plural "<strong>%d</strong> attempts remaining."
|
||||
msgstr[0] "Es ist noch <strong>%d</strong> Anmeldeversuch möglich."
|
||||
msgstr[1] "Es sind noch <strong>%d</strong> Anmeldeversuche möglich."
|
||||
|
||||
#: limit-login-attempts.php:628
|
||||
msgid "Please try again in %d minute."
|
||||
msgid_plural "Please try again in %d minutes."
|
||||
msgstr[0] "Bitte versuche es in %d Minute noch einmal."
|
||||
msgstr[1] "Bitte versuche es in %d Minuten noch einmal."
|
||||
|
||||
#: limit-login-attempts.php:626
|
||||
msgid "Please try again in %d hour."
|
||||
msgid_plural "Please try again in %d hours."
|
||||
msgstr[0] "Bitte versuche es in %d Stunde noch einmal."
|
||||
msgstr[1] "Bitte versuche es in %d Stunden noch einmal."
|
||||
|
||||
#: limit-login-attempts.php:619
|
||||
msgid "Please try again later."
|
||||
msgstr "Bitte versuche es später noch einmal."
|
||||
|
||||
#: limit-login-attempts.php:615
|
||||
msgid "<strong>ERROR</strong>: Too many failed login attempts."
|
||||
msgstr "<strong>FEHLER</strong>: Zu viele ungültige Anmeldeversuche."
|
||||
|
||||
#: limit-login-attempts.php:553
|
||||
msgid "IP was blocked for %s"
|
||||
msgstr "IP wurde gesperrt für %s."
|
||||
|
||||
#: limit-login-attempts.php:551
|
||||
msgid "IP was NOT blocked because of external whitelist."
|
||||
msgstr "IP wurde NICHT blockiert, weil sie auf einer Whitelist steht."
|
||||
|
||||
#: limit-login-attempts.php:547
|
||||
msgid "Last user attempted: %s"
|
||||
msgstr "Letzter Anmeldeversuch erfolgte mit dem Benutzernamen: %s"
|
||||
|
||||
#: limit-login-attempts.php:543
|
||||
msgid "%d failed login attempts (%d lockout(s)) from IP: %s"
|
||||
msgstr "%d ungültige Anmeldeversuche (%d Sperrung(en)) von IP: %s"
|
||||
|
||||
#: limit-login-attempts.php:538
|
||||
msgid "[%s] Too many failed login attempts"
|
||||
msgstr "[%s] Zu viele ungültige Anmeldeversuche"
|
||||
|
||||
#: limit-login-attempts.php:534
|
||||
msgid "[%s] Failed login attempts from whitelisted IP"
|
||||
msgstr "[%s] fehlgeschlagene Loginversuche von whitegelisteter IP"
|
||||
|
||||
#: limit-login-attempts.php:528
|
||||
msgid "%d minute"
|
||||
msgid_plural "%d minutes"
|
||||
msgstr[0] "%d Minute"
|
||||
msgstr[1] "%d Minuten"
|
||||
|
||||
#: limit-login-attempts.php:522
|
||||
msgid "%d hour"
|
||||
msgid_plural "%d hours"
|
||||
msgstr[0] "%d Stunde"
|
||||
msgstr[1] "%d Stunden"
|
@ -0,0 +1,32 @@
|
||||
# Translation of Plugins - Really Simple CAPTCHA - Stable (latest release) in German
|
||||
# This file is distributed under the same license as the Plugins - Really Simple CAPTCHA - Stable (latest release) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2018-02-07 23:20:23+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Plugins - Really Simple CAPTCHA - Stable (latest release)\n"
|
||||
|
||||
#. Author URI of the plugin/theme
|
||||
msgid "https://ideasilo.wordpress.com/"
|
||||
msgstr "https://ideasilo.wordpress.com/"
|
||||
|
||||
#. Author of the plugin/theme
|
||||
msgid "Takayuki Miyoshi"
|
||||
msgstr "Takayuki Miyoshi"
|
||||
|
||||
#. Description of the plugin/theme
|
||||
msgid "Really Simple CAPTCHA is a CAPTCHA module intended to be called from other plugins. It is originally created for my Contact Form 7 plugin."
|
||||
msgstr "Really Simple CAPTCHA ist ein CAPTCHA-Modul, welches von anderen Plugins verwendet werden kann. Es wurde ursprünglich für mein Plugin Contact Form 7 erstellt."
|
||||
|
||||
#. Plugin URI of the plugin/theme
|
||||
msgid "https://contactform7.com/captcha/"
|
||||
msgstr "https://contactform7.com/captcha/"
|
||||
|
||||
#. Plugin Name of the plugin/theme
|
||||
msgid "Really Simple CAPTCHA"
|
||||
msgstr "Really Simple CAPTCHA"
|
5490
msd2/wordpress/wp-content/languages/plugins/wordpress-seo-de_DE.po
Normal file
BIN
msd2/wordpress/wp-content/languages/plugins/wp-piwik-de_DE.mo
Normal file
1407
msd2/wordpress/wp-content/languages/plugins/wp-piwik-de_DE.po
Normal file
@ -0,0 +1,339 @@
|
||||
# Translation of Themes - Twenty Fifteen in German
|
||||
# This file is distributed under the same license as the Themes - Twenty Fifteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2019-01-29 05:14:01+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Themes - Twenty Fifteen\n"
|
||||
|
||||
#. Description of the theme
|
||||
msgid "Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer."
|
||||
msgstr "Unser Standard-Theme für 2015 ist reduziert, stellt das Bloggen in den Mittelpunkt und ist auf ein klares Erscheinungsbild ausgerichtet. Twenty Fifteens einfache, gradlinige Typografie lässt sich in verschiedenen Bildschirmauflösungen und zahlreichen Sprachen gut lesen. Wir sind bei unserem Design primär von mobilen Endgeräten ausgegangen, so dass deine Inhalte im Mittelpunkt stehen – ganz gleich, ob deine Besucher die Seiten mit einem Smartphone, Tablet, Laptop oder Desktop-Computer ansehen."
|
||||
|
||||
#. Theme Name of the theme
|
||||
msgid "Twenty Fifteen"
|
||||
msgstr "Twenty Fifteen"
|
||||
|
||||
#: functions.php:243
|
||||
msgid "Light Blue"
|
||||
msgstr "Hellblau"
|
||||
|
||||
#: functions.php:238
|
||||
msgid "Bright Blue"
|
||||
msgstr "Hellblau"
|
||||
|
||||
#: functions.php:193
|
||||
msgid "Light Gray"
|
||||
msgstr "Hellblau"
|
||||
|
||||
#: functions.php:188
|
||||
msgid "Dark Gray"
|
||||
msgstr "Dunkelgrau"
|
||||
|
||||
#: functions.php:208
|
||||
msgid "Dark Brown"
|
||||
msgstr "Dunkelbraun"
|
||||
|
||||
#: functions.php:198
|
||||
msgid "White"
|
||||
msgstr "Weiß"
|
||||
|
||||
#: functions.php:218
|
||||
msgid "Light Pink"
|
||||
msgstr "Helles Pink"
|
||||
|
||||
#: functions.php:213
|
||||
msgid "Medium Pink"
|
||||
msgstr "Mittleres Pink"
|
||||
|
||||
#: functions.php:233
|
||||
msgid "Blue Gray"
|
||||
msgstr "Blau-Grau"
|
||||
|
||||
#: functions.php:223
|
||||
msgid "Dark Purple"
|
||||
msgstr "Dunkles Lila"
|
||||
|
||||
#. translators: %s: post title
|
||||
#: comments.php:31
|
||||
msgctxt "comments title"
|
||||
msgid "One thought on “%s”"
|
||||
msgstr "Ein Gedanke zu „%s“"
|
||||
|
||||
#. translators: %s: post title
|
||||
#: inc/template-tags.php:130
|
||||
msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
|
||||
msgstr "Schreibe einen Kommentar<span class=\"screen-reader-text\"> zu %s</span>"
|
||||
|
||||
#: single.php:39
|
||||
msgid "Previous post:"
|
||||
msgstr "Vorheriger Beitrag:"
|
||||
|
||||
#: single.php:38
|
||||
msgid "Previous"
|
||||
msgstr "Zurück"
|
||||
|
||||
#: single.php:36
|
||||
msgid "Next post:"
|
||||
msgstr "Nächster Beitrag:"
|
||||
|
||||
#: single.php:35
|
||||
msgid "Next"
|
||||
msgstr "Weiter"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Suchergebnisse für: %s"
|
||||
|
||||
#: inc/template-tags.php:120
|
||||
msgctxt "Used before full size attachment link."
|
||||
msgid "Full size"
|
||||
msgstr "Volle Größe"
|
||||
|
||||
#: inc/template-tags.php:108
|
||||
msgctxt "Used before tag names."
|
||||
msgid "Tags"
|
||||
msgstr "Schlagwörter"
|
||||
|
||||
#: inc/template-tags.php:99
|
||||
msgctxt "Used before category names."
|
||||
msgid "Categories"
|
||||
msgstr "Kategorien"
|
||||
|
||||
#: inc/template-tags.php:95 inc/template-tags.php:104
|
||||
msgctxt "Used between list items, there is a space after the comma."
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: inc/template-tags.php:89
|
||||
msgctxt "Used before post author name."
|
||||
msgid "Author"
|
||||
msgstr "Autor"
|
||||
|
||||
#: inc/template-tags.php:79
|
||||
msgctxt "Used before publish date."
|
||||
msgid "Posted on"
|
||||
msgstr "Veröffentlicht am"
|
||||
|
||||
#: inc/template-tags.php:56
|
||||
msgctxt "Used before post format."
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: inc/template-tags.php:49
|
||||
msgid "Featured"
|
||||
msgstr "Hervorgehoben"
|
||||
|
||||
#: inc/template-tags.php:30
|
||||
msgid "Newer Comments"
|
||||
msgstr "Neuere Kommentare"
|
||||
|
||||
#: inc/template-tags.php:26
|
||||
msgid "Older Comments"
|
||||
msgstr "Ältere Kommentare"
|
||||
|
||||
#: inc/template-tags.php:23
|
||||
msgid "Comment navigation"
|
||||
msgstr "Kommentar-Navigation"
|
||||
|
||||
#: inc/customizer.php:237
|
||||
msgid "Blue"
|
||||
msgstr "Blau"
|
||||
|
||||
#: functions.php:228 inc/customizer.php:226
|
||||
msgid "Purple"
|
||||
msgstr "Violett"
|
||||
|
||||
#: inc/customizer.php:215
|
||||
msgid "Pink"
|
||||
msgstr "Pink"
|
||||
|
||||
#: functions.php:203 inc/customizer.php:204
|
||||
msgid "Yellow"
|
||||
msgstr "Gelb"
|
||||
|
||||
#: inc/customizer.php:193
|
||||
msgid "Dark"
|
||||
msgstr "Dunkel"
|
||||
|
||||
#: inc/customizer.php:182
|
||||
msgid "Default"
|
||||
msgstr "Standard"
|
||||
|
||||
#: inc/customizer.php:103
|
||||
msgid "Header and Sidebar Background Color"
|
||||
msgstr "Header- und Seitenleisten-Hintergrundfarbe"
|
||||
|
||||
#: inc/customizer.php:79 inc/customizer.php:104 inc/customizer.php:111
|
||||
msgid "Applied to the header on small screens and the sidebar on wide screens."
|
||||
msgstr "Das Header-Bild wird bei diesem Theme bei kleinen Bildschirmen (Mobil-Geräte) auf den Header angewandt und bei großen Bildschirmen (Desktop) auf die Seitenleiste."
|
||||
|
||||
#: inc/customizer.php:78
|
||||
msgid "Header and Sidebar Text Color"
|
||||
msgstr "Header- und Seitenleisten-Textfarbe"
|
||||
|
||||
#: inc/customizer.php:55
|
||||
msgid "Base Color Scheme"
|
||||
msgstr "Basis-Farbschema"
|
||||
|
||||
#: inc/back-compat.php:37 inc/back-compat.php:48 inc/back-compat.php:64
|
||||
msgid "Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Fifteen erfordert mindestens WordPress in der Version 4.1. Du benutzt Version %s. Bitte aktualisiere dein WordPress und versuche es noch einmal."
|
||||
|
||||
#: image.php:88
|
||||
msgctxt "Parent post link"
|
||||
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%title</span>"
|
||||
msgstr "<span class=\"meta-nav\">Veröffentlicht in</span><span class=\"post-title\">%title</span>"
|
||||
|
||||
#: image.php:25
|
||||
msgid "Next Image"
|
||||
msgstr "Nächstes Bild"
|
||||
|
||||
#: image.php:25
|
||||
msgid "Previous Image"
|
||||
msgstr "Vorheriges Bild"
|
||||
|
||||
#: header.php:49
|
||||
msgid "Menu and widgets"
|
||||
msgstr "Menü und Widgets"
|
||||
|
||||
#: header.php:26
|
||||
msgid "Skip to content"
|
||||
msgstr "Springe zum Inhalt"
|
||||
|
||||
#: functions.php:399
|
||||
msgid "collapse child menu"
|
||||
msgstr "Untermenü verbergen"
|
||||
|
||||
#: functions.php:398
|
||||
msgid "expand child menu"
|
||||
msgstr "Untermenü anzeigen"
|
||||
|
||||
#: functions.php:319
|
||||
msgctxt "Add new subset (greek, cyrillic, devanagari, vietnamese)"
|
||||
msgid "no-subset"
|
||||
msgstr "no-subset"
|
||||
|
||||
#: functions.php:311
|
||||
msgctxt "Inconsolata font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: functions.php:303
|
||||
msgctxt "Noto Serif font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: functions.php:295
|
||||
msgctxt "Noto Sans font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: functions.php:268
|
||||
msgid "Add widgets here to appear in your sidebar."
|
||||
msgstr "Widgets hier hinzufügen, um sie in die Seitenleiste einzubauen."
|
||||
|
||||
#: functions.php:266
|
||||
msgid "Widget Area"
|
||||
msgstr "Widgetbereich"
|
||||
|
||||
#: functions.php:87
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Social-Links-Menü"
|
||||
|
||||
#: functions.php:86
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primäres Menü"
|
||||
|
||||
#: footer.php:31
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolz präsentiert von %s"
|
||||
|
||||
#: content-none.php:31
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Es sieht so aus, als ob wir nicht das finden konnten, wonach du gesucht hast. Möglicherweise hilft eine Suche."
|
||||
|
||||
#: content-none.php:26
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Entschuldigung, aber zu deinen Suchbegriffen wurde nichts passendes gefunden. Bitte versuche es mit anderen Stichworten noch einmal."
|
||||
|
||||
#: content-none.php:22
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Bereit, um deinen ersten Beitrag zu veröffentlichen? <a href=\"%1$s\">Starte hier</a>."
|
||||
|
||||
#: content-none.php:15
|
||||
msgid "Nothing Found"
|
||||
msgstr "Nichts gefunden"
|
||||
|
||||
#: content-link.php:60 content.php:61 image.php:74 content-search.php:28
|
||||
#: content-search.php:33 content-page.php:37
|
||||
msgid "Edit"
|
||||
msgstr "Bearbeiten"
|
||||
|
||||
#: content-link.php:39 content.php:41 image.php:61 content-page.php:26
|
||||
msgid "Pages:"
|
||||
msgstr "Seiten:"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: content-link.php:32 content.php:34 inc/template-tags.php:249
|
||||
msgid "Continue reading %s"
|
||||
msgstr "%s weiterlesen"
|
||||
|
||||
#: comments.php:71
|
||||
msgid "Comments are closed."
|
||||
msgstr "Kommentare sind geschlossen."
|
||||
|
||||
#. translators: 1: number of comments, 2: post title
|
||||
#: comments.php:35
|
||||
msgctxt "comments title"
|
||||
msgid "%1$s thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "Ein Gedanke zu „%2$s“"
|
||||
msgstr[1] "%1$s Gedanken zu „%2$s“"
|
||||
|
||||
#: author-bio.php:34
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Zeige alle Beiträge von %s"
|
||||
|
||||
#: author-bio.php:12
|
||||
msgid "Published by"
|
||||
msgstr "Veröffentlicht von"
|
||||
|
||||
#: content-link.php:43 index.php:50 content.php:45 archive.php:53 search.php:43
|
||||
#: image.php:65 content-page.php:30
|
||||
msgid "Page"
|
||||
msgstr "Seite"
|
||||
|
||||
#: index.php:49 archive.php:52 search.php:42
|
||||
msgid "Next page"
|
||||
msgstr "Nächste Seite"
|
||||
|
||||
#: index.php:48 archive.php:51 search.php:41
|
||||
msgid "Previous page"
|
||||
msgstr "Vorherige Seite"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Wie es aussieht, wurde an dieser Stelle nichts gefunden. Möchtest du eine Suche starten?"
|
||||
|
||||
#: 404.php:17
|
||||
msgid "Oops! That page can’t be found."
|
||||
msgstr "Die Seite konnte nicht gefunden werden."
|
||||
|
||||
#. Author of the theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "dem WordPress-Team"
|
||||
|
||||
#. Theme URI of the theme
|
||||
msgid "https://wordpress.org/themes/twentyfifteen/"
|
||||
msgstr "https://wordpress.org/themes/twentyfifteen/"
|
||||
|
||||
#. Author URI of the theme
|
||||
#: footer.php:30
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://de.wordpress.org/"
|
@ -0,0 +1,389 @@
|
||||
# Translation of Themes - Twenty Nineteen in German
|
||||
# This file is distributed under the same license as the Themes - Twenty Nineteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2019-04-13 19:47:23+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Themes - Twenty Nineteen\n"
|
||||
|
||||
#. Description of the theme
|
||||
msgid "Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes."
|
||||
msgstr "Unser 2019 Standard-Theme wurde entwickelt, um die Leistungsfähigkeit des Block-Editors zu demonstrieren. Es bietet benutzerdefinierte Stile für alle Standardblöcke und ist so aufgebaut, dass du das, was du im Editor siehst, auch auf deiner Website sehen wirst. Twenty Nineteen wurde entwickelt, um sich an eine Vielzahl von Websites anzupassen, egal du einen Fotoblog betreibst, ein neues Unternehmen startest oder eine gemeinnützige Organisation unterstützt. Mit reichlich Whitespace und modernen serifenlosen Überschriften, gepaart mit klassischem serifenbetontem Fließtext wird es auf allen Bildschirmgrößen schön aussehen."
|
||||
|
||||
#. Theme Name of the theme
|
||||
msgid "Twenty Nineteen"
|
||||
msgstr "Twenty Nineteen"
|
||||
|
||||
#. translators: %s: parent post link
|
||||
#: single.php:31
|
||||
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%s</span>"
|
||||
msgstr "<span class=\"meta-nav\">Veröffentlicht in</span><span class=\"post-title\">%s</span>"
|
||||
|
||||
#: image.php:87
|
||||
msgctxt "Parent post link"
|
||||
msgid "<span class=\"meta-nav\">Published in</span><br><span class=\"post-title\">%title</span>"
|
||||
msgstr "<span class=\"meta-nav\">Veröffentlicht in</span><br><span class=\"post-title\">%title</span>"
|
||||
|
||||
#: template-parts/content/content.php:18
|
||||
#: template-parts/content/content-excerpt.php:18
|
||||
msgctxt "post"
|
||||
msgid "Featured"
|
||||
msgstr "Hervorgehoben"
|
||||
|
||||
#: inc/back-compat.php:39 inc/back-compat.php:53 inc/back-compat.php:73
|
||||
msgid "Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Nineteen erfordert mindestens WordPress Version 4.7. Deine Version ist %s. Bitte führe ein Upgrade durch und versuche es erneut."
|
||||
|
||||
#: inc/template-functions.php:216
|
||||
msgid "Back"
|
||||
msgstr "Zurück"
|
||||
|
||||
#: inc/template-functions.php:209
|
||||
msgid "More"
|
||||
msgstr "Mehr"
|
||||
|
||||
#: inc/customizer.php:98
|
||||
msgid "Apply a filter to featured images using the primary color"
|
||||
msgstr "Für hervorgehobene Bilder einen Filter unter Benutzung der Primärfarbe anwenden"
|
||||
|
||||
#: inc/customizer.php:78
|
||||
msgid "Apply a custom color for buttons, links, featured images, etc."
|
||||
msgstr "Für Buttons, Links, hervorgehobene Bilder etc. eine individuelle Farbe anwenden"
|
||||
|
||||
#: inc/customizer.php:56
|
||||
msgctxt "primary color"
|
||||
msgid "Custom"
|
||||
msgstr "Individuell"
|
||||
|
||||
#: inc/customizer.php:55
|
||||
msgctxt "primary color"
|
||||
msgid "Default"
|
||||
msgstr "Standard"
|
||||
|
||||
#: functions.php:170
|
||||
msgid "White"
|
||||
msgstr "Weiß"
|
||||
|
||||
#: functions.php:165
|
||||
msgid "Light Gray"
|
||||
msgstr "Hellgrau"
|
||||
|
||||
#: functions.php:160
|
||||
msgid "Dark Gray"
|
||||
msgstr "Dunkelgrau"
|
||||
|
||||
#: functions.php:155
|
||||
msgid "Secondary"
|
||||
msgstr "Sekundär"
|
||||
|
||||
#: functions.php:134
|
||||
msgid "XL"
|
||||
msgstr "XL"
|
||||
|
||||
#: functions.php:133
|
||||
msgid "Huge"
|
||||
msgstr "Riesig"
|
||||
|
||||
#: functions.php:128
|
||||
msgid "L"
|
||||
msgstr "L"
|
||||
|
||||
#: functions.php:127
|
||||
msgid "Large"
|
||||
msgstr "Groß"
|
||||
|
||||
#: functions.php:122
|
||||
msgid "M"
|
||||
msgstr "M"
|
||||
|
||||
#: functions.php:121
|
||||
msgid "Normal"
|
||||
msgstr "Normal"
|
||||
|
||||
#: functions.php:115
|
||||
msgid "Small"
|
||||
msgstr "Klein"
|
||||
|
||||
#: functions.php:116
|
||||
msgid "S"
|
||||
msgstr "S"
|
||||
|
||||
#: functions.php:60 footer.php:37
|
||||
msgid "Footer Menu"
|
||||
msgstr "Footer-Menü"
|
||||
|
||||
#: image.php:70
|
||||
msgctxt "Used before full size attachment link."
|
||||
msgid "Full size"
|
||||
msgstr "Vollständige Größe"
|
||||
|
||||
#: image.php:56
|
||||
msgid "Page"
|
||||
msgstr "Seite"
|
||||
|
||||
#: functions.php:194
|
||||
msgid "Add widgets here to appear in your footer."
|
||||
msgstr "Füge hier Widgets hinzu, die in deinem Footer erscheinen sollen."
|
||||
|
||||
#: template-parts/footer/footer-widgets.php:12 functions.php:192
|
||||
msgid "Footer"
|
||||
msgstr "Footer"
|
||||
|
||||
#: inc/customizer.php:53
|
||||
msgid "Primary Color"
|
||||
msgstr "Primäre Farbe"
|
||||
|
||||
#: template-parts/post/discussion-meta.php:18
|
||||
msgid "No comments"
|
||||
msgstr "Keine Kommentare"
|
||||
|
||||
#. translators: %1(X comments)$s
|
||||
#: template-parts/post/discussion-meta.php:16
|
||||
msgid "%d Comment"
|
||||
msgid_plural "%d Comments"
|
||||
msgstr[0] "%d Kommentar"
|
||||
msgstr[1] "%d Kommentare"
|
||||
|
||||
#: template-parts/post/author-bio.php:26
|
||||
msgid "View more posts"
|
||||
msgstr "Mehr Beiträge anzeigen"
|
||||
|
||||
#. translators: %s: post author
|
||||
#: template-parts/post/author-bio.php:17
|
||||
msgid "Published by %s"
|
||||
msgstr "Veröffentlicht von %s"
|
||||
|
||||
#: template-parts/header/site-branding.php:33
|
||||
msgid "Top Menu"
|
||||
msgstr "Oberes Menü"
|
||||
|
||||
#. translators: %s: Name of current post. Only visible to screen readers
|
||||
#: template-parts/content/content.php:36
|
||||
#: template-parts/content/content-single.php:27
|
||||
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
|
||||
msgstr "<span class=\"screen-reader-text\">\"%s\"</span> weiterlesen"
|
||||
|
||||
#: template-parts/content/content.php:49
|
||||
#: template-parts/content/content-page.php:27
|
||||
#: template-parts/content/content-single.php:40 image.php:52
|
||||
msgid "Pages:"
|
||||
msgstr "Seiten:"
|
||||
|
||||
#: template-parts/content/content-none.php:46
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Es sieht so aus, als ob wir nicht das finden konnten, wonach du gesucht hast. Möglicherweise hilft eine Suche."
|
||||
|
||||
#: template-parts/content/content-none.php:39
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Es gibt keine passenden Suchergebnisse. Bitte versuche es mit anderen Suchbegriffen."
|
||||
|
||||
#. translators: 1: link to WP admin new post page.
|
||||
#: template-parts/content/content-none.php:26
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Bereit, deinen ersten Beitrag zu veröffentlichen? <a href=\"%1$s\">Starte hier</a>."
|
||||
|
||||
#: template-parts/content/content-none.php:16
|
||||
msgid "Nothing Found"
|
||||
msgstr "Nichts gefunden"
|
||||
|
||||
#: single.php:42
|
||||
msgid "Previous post:"
|
||||
msgstr "Vorheriger Beitrag:"
|
||||
|
||||
#: single.php:41
|
||||
msgid "Previous Post"
|
||||
msgstr "Vorheriger Beitrag"
|
||||
|
||||
#: single.php:39
|
||||
msgid "Next post:"
|
||||
msgstr "Nächster Beitrag:"
|
||||
|
||||
#: single.php:38
|
||||
msgid "Next Post"
|
||||
msgstr "Nächster Beitrag"
|
||||
|
||||
#: search.php:22
|
||||
msgid "Search results for:"
|
||||
msgstr "Suchergebnisse für:"
|
||||
|
||||
#: inc/template-tags.php:234
|
||||
msgid "Older posts"
|
||||
msgstr "Ältere Beiträge"
|
||||
|
||||
#: inc/template-tags.php:230
|
||||
msgid "Newer posts"
|
||||
msgstr "Neuere Beiträge"
|
||||
|
||||
#: inc/template-tags.php:104
|
||||
msgid "Tags:"
|
||||
msgstr "Schlagwörter:"
|
||||
|
||||
#: inc/template-tags.php:92
|
||||
msgid "Posted in"
|
||||
msgstr "Veröffentlicht in"
|
||||
|
||||
#. translators: used between list items, there is a space after the comma.
|
||||
#: inc/template-tags.php:86 inc/template-tags.php:98
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#. translators: %s: Name of current post. Only visible to screen readers.
|
||||
#: inc/template-tags.php:63
|
||||
msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
|
||||
msgstr "Veröffentliche einen Kommentar <span class=\"screen-reader-text\">zu %s</span>"
|
||||
|
||||
#: inc/template-tags.php:46
|
||||
msgid "Posted by"
|
||||
msgstr "Veröffentlicht von"
|
||||
|
||||
#: inc/template-functions.php:82
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr "F Y"
|
||||
|
||||
#: inc/template-functions.php:80
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr "Y"
|
||||
|
||||
#: inc/template-functions.php:92
|
||||
msgid "Archives:"
|
||||
msgstr "Archive:"
|
||||
|
||||
#. translators: %s: Taxonomy singular name
|
||||
#: inc/template-functions.php:90
|
||||
msgid "%s Archives:"
|
||||
msgstr "%s-Archive:"
|
||||
|
||||
#: inc/template-functions.php:86
|
||||
msgid "Post Type Archives: "
|
||||
msgstr "Archive für Inhaltstypen:"
|
||||
|
||||
#: inc/template-functions.php:84
|
||||
msgid "Daily Archives: "
|
||||
msgstr "Tägliche Archive:"
|
||||
|
||||
#: inc/template-functions.php:82
|
||||
msgid "Monthly Archives: "
|
||||
msgstr "Monatliche Archive:"
|
||||
|
||||
#: inc/template-functions.php:80
|
||||
msgid "Yearly Archives: "
|
||||
msgstr "Jährliche Archive:"
|
||||
|
||||
#: inc/template-functions.php:78
|
||||
msgid "Author Archives: "
|
||||
msgstr "Autor-Archive:"
|
||||
|
||||
#: inc/template-functions.php:76
|
||||
msgid "Tag Archives: "
|
||||
msgstr "Schlagwort-Archive:"
|
||||
|
||||
#: inc/template-functions.php:74
|
||||
msgid "Category Archives: "
|
||||
msgstr "Kategorie-Archive:"
|
||||
|
||||
#. translators: %s: Name of current post. Only visible to screen readers
|
||||
#. translators: %s: Name of current post. Only visible to screen readers.
|
||||
#: template-parts/content/content-page.php:41
|
||||
#: template-parts/header/entry-header.php:32 inc/template-tags.php:120
|
||||
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
|
||||
msgstr "<span class=\"screen-reader-text\">%s</span> bearbeiten"
|
||||
|
||||
#: header.php:24
|
||||
msgid "Skip to content"
|
||||
msgstr "Zum Inhalt springen"
|
||||
|
||||
#: template-parts/header/site-branding.php:46 functions.php:61
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Social-Links-Menü"
|
||||
|
||||
#: functions.php:59 functions.php:150
|
||||
msgid "Primary"
|
||||
msgstr "Primär"
|
||||
|
||||
#. translators: %s: WordPress.
|
||||
#: footer.php:28
|
||||
msgid "Proudly powered by %s."
|
||||
msgstr "Stolz präsentiert von %s."
|
||||
|
||||
#: comments.php:116
|
||||
msgid "Comments are closed."
|
||||
msgstr "Kommentare sind geschlossen."
|
||||
|
||||
#: comments.php:96
|
||||
msgid "Next"
|
||||
msgstr "Weiter"
|
||||
|
||||
#: comments.php:95
|
||||
msgid "Previous"
|
||||
msgstr "Zurück"
|
||||
|
||||
#: comments.php:92 comments.php:95 comments.php:96
|
||||
msgid "Comments"
|
||||
msgstr "Kommentare"
|
||||
|
||||
#. translators: 1: number of comments, 2: post title
|
||||
#: comments.php:44
|
||||
msgctxt "comments title"
|
||||
msgid "%1$s reply on “%2$s”"
|
||||
msgid_plural "%1$s replies on “%2$s”"
|
||||
msgstr[0] "%1$s Antwort auf „%2$s“"
|
||||
msgstr[1] "%1$s Antworten auf „%2$s“"
|
||||
|
||||
#. translators: %s: post title
|
||||
#: comments.php:40
|
||||
msgctxt "comments title"
|
||||
msgid "One reply on “%s”"
|
||||
msgstr "Eine Antwort auf „%s“"
|
||||
|
||||
#: comments.php:35 comments.php:105 comments.php:107
|
||||
msgid "Leave a comment"
|
||||
msgstr "Schreib einen Kommentar"
|
||||
|
||||
#: comments.php:33
|
||||
msgid "Join the Conversation"
|
||||
msgstr "Beteilige dich an der Unterhaltung"
|
||||
|
||||
#: classes/class-twentynineteen-walker-comment.php:100
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr "Dein Kommentar wartet auf Freigabe."
|
||||
|
||||
#: classes/class-twentynineteen-walker-comment.php:95
|
||||
msgid "Edit"
|
||||
msgstr "Bearbeiten"
|
||||
|
||||
#. translators: 1: comment date, 2: comment time
|
||||
#: classes/class-twentynineteen-walker-comment.php:87
|
||||
msgid "%1$s at %2$s"
|
||||
msgstr "%1$s um %2$s"
|
||||
|
||||
#: classes/class-twentynineteen-walker-comment.php:67
|
||||
msgid "%s <span class=\"screen-reader-text says\">says:</span>"
|
||||
msgstr "%s <span class=\"screen-reader-text says\">sagt:</span>"
|
||||
|
||||
#: 404.php:24
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Wie es aussieht, wurde an dieser Stelle nichts gefunden. Möchtest du eine Suche starten?"
|
||||
|
||||
#: 404.php:20
|
||||
msgid "Oops! That page can’t be found."
|
||||
msgstr "Die Seite konnte leider nicht gefunden werden."
|
||||
|
||||
#. Author of the theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "Das WordPress-Team"
|
||||
|
||||
#. Theme URI of the theme
|
||||
msgid "https://github.com/WordPress/twentynineteen"
|
||||
msgstr "https://github.com/WordPress/twentynineteen"
|
||||
|
||||
#. Author URI of the theme
|
||||
#: footer.php:25
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://de.wordpress.org/"
|
@ -0,0 +1,331 @@
|
||||
# Translation of Themes - Twenty Seventeen in German
|
||||
# This file is distributed under the same license as the Themes - Twenty Seventeen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2019-01-22 14:48:31+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Themes - Twenty Seventeen\n"
|
||||
|
||||
#. Description of the theme
|
||||
msgid "Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device."
|
||||
msgstr "Twenty Seventeen bringt Leben in deine Website durch ein Header-Video und beeindruckende Beitragsbilder. Mit einem Fokus auf Business-Websites zeichnet sich die Startseite durch mehrere Inhalts-Abschnitte aus, ebenso wie Widgets, Navigations- und Social-Menüs, einem Logo und vielem mehr. Gestalte das asymmetrische Raster des Themes in eigenen Farben und präsentiere deine multimedialen Inhalte in entsprechenden Beitragsformaten. Unser Standard-Theme für 2017 funktioniert großartig in vielen Sprachen, für jede Anwendergruppe und auf allen Geräten."
|
||||
|
||||
#. Theme Name of the theme
|
||||
msgid "Twenty Seventeen"
|
||||
msgstr "Twenty Seventeen"
|
||||
|
||||
#: template-parts/footer/footer-widgets.php:18
|
||||
msgid "Footer"
|
||||
msgstr "Footer"
|
||||
|
||||
#: functions.php:338
|
||||
msgid "Add widgets here to appear in your sidebar on blog posts and archive pages."
|
||||
msgstr "Widgets hier hinzufügen, um sie in der Seitenleiste von Blogbeiträgen und Archivseiten anzuzeigen."
|
||||
|
||||
#: sidebar.php:18 functions.php:336
|
||||
msgid "Blog Sidebar"
|
||||
msgstr "Blog-Seitenleiste"
|
||||
|
||||
#: template-parts/navigation/navigation-top.php:31
|
||||
#: template-parts/header/site-branding.php:34
|
||||
msgid "Scroll down to content"
|
||||
msgstr "Zum Inhalt nach unten scrollen"
|
||||
|
||||
#: functions.php:179
|
||||
msgctxt "Theme starter content"
|
||||
msgid "Coffee"
|
||||
msgstr "Kaffee"
|
||||
|
||||
#: functions.php:175
|
||||
msgctxt "Theme starter content"
|
||||
msgid "Sandwich"
|
||||
msgstr "Sandwich"
|
||||
|
||||
#: functions.php:171
|
||||
msgctxt "Theme starter content"
|
||||
msgid "Espresso"
|
||||
msgstr "Espresso"
|
||||
|
||||
#: inc/custom-header.php:128
|
||||
msgid "Pause background video"
|
||||
msgstr "Hintergrund-Video pausieren"
|
||||
|
||||
#: inc/custom-header.php:127
|
||||
msgid "Play background video"
|
||||
msgstr "Hintergrund-Video abspielen"
|
||||
|
||||
#: inc/template-tags.php:151
|
||||
msgid "Front Page Section %1$s Placeholder"
|
||||
msgstr "Platzhalter für Startseiten-Abschnitt %1$s"
|
||||
|
||||
#: inc/customizer.php:109
|
||||
msgid "When the two-column layout is assigned, the page title is in one column and content is in the other."
|
||||
msgstr "Wenn das Zwei-Spalten-Layout gewählt wird, erscheint der Seitentitel in einer Spalte und der Inhalt in der anderen."
|
||||
|
||||
#: single.php:34
|
||||
msgid "Next Post"
|
||||
msgstr "Nächster Beitrag"
|
||||
|
||||
#: index.php:27
|
||||
msgid "Posts"
|
||||
msgstr "Beiträge"
|
||||
|
||||
#: inc/template-tags.php:89
|
||||
msgid "Tags"
|
||||
msgstr "Schlagwörter"
|
||||
|
||||
#: inc/template-tags.php:85
|
||||
msgid "Categories"
|
||||
msgstr "Kategorien"
|
||||
|
||||
#. translators: used between list items, there is a space after the comma
|
||||
#: inc/template-tags.php:66
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#. translators: %s: post date
|
||||
#: inc/template-tags.php:52
|
||||
msgid "<span class=\"screen-reader-text\">Posted on</span> %s"
|
||||
msgstr "<span class=\"screen-reader-text\">Veröffentlicht am</span> %s"
|
||||
|
||||
#. translators: %s: post author
|
||||
#: inc/template-tags.php:21
|
||||
msgid "by %s"
|
||||
msgstr "von %s"
|
||||
|
||||
#: inc/icon-functions.php:44
|
||||
msgid "Please define an SVG icon filename."
|
||||
msgstr "Bitte definiere einen SVG-Icon-Dateinamen."
|
||||
|
||||
#: inc/icon-functions.php:39
|
||||
msgid "Please define default parameters in the form of an array."
|
||||
msgstr "Bitte definiere Standard-Parameter in Form eines Arrays."
|
||||
|
||||
#: inc/customizer.php:143
|
||||
msgid "Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed."
|
||||
msgstr "Wähle die Seiten für jeden Abschnitt über das Drop-down-Menü. Du kannst einem Abschnitt ein Bild hinzufügen, indem du im Editor für die Seite ein Beitragsbild festlegst. Leere Abschnitte werden nicht dargestellt."
|
||||
|
||||
#. translators: %d is the front page section number
|
||||
#: inc/customizer.php:142
|
||||
msgid "Front Page Section %d Content"
|
||||
msgstr "Inhalt im Startseiten-Abschnitt %d"
|
||||
|
||||
#: inc/customizer.php:112 inc/customizer.php:171
|
||||
msgid "Two Column"
|
||||
msgstr "Zwei Spalten"
|
||||
|
||||
#: inc/customizer.php:111 inc/customizer.php:170
|
||||
msgid "One Column"
|
||||
msgstr "Eine Spalte"
|
||||
|
||||
#: inc/customizer.php:106
|
||||
msgid "Page Layout"
|
||||
msgstr "Seitenlayout"
|
||||
|
||||
#: inc/customizer.php:89
|
||||
msgid "Theme Options"
|
||||
msgstr "Theme-Optionen"
|
||||
|
||||
#: inc/customizer.php:64
|
||||
msgid "Custom"
|
||||
msgstr "Individuell"
|
||||
|
||||
#: inc/customizer.php:62
|
||||
msgid "Light"
|
||||
msgstr "Hell"
|
||||
|
||||
#: inc/customizer.php:60
|
||||
msgid "Color Scheme"
|
||||
msgstr "Farbschema"
|
||||
|
||||
#: inc/custom-header.php:56
|
||||
msgid "Default Header Image"
|
||||
msgstr "Standard Header-Bild"
|
||||
|
||||
#: functions.php:360
|
||||
msgid "Footer 2"
|
||||
msgstr "Footer 2"
|
||||
|
||||
#: functions.php:350 functions.php:362
|
||||
msgid "Add widgets here to appear in your footer."
|
||||
msgstr "Widgets hier hinzufügen, um sie im Footer anzuzeigen."
|
||||
|
||||
#: functions.php:348
|
||||
msgid "Footer 1"
|
||||
msgstr "Footer 1"
|
||||
|
||||
#: functions.php:289
|
||||
msgctxt "Libre Franklin font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: template-parts/navigation/navigation-top.php:12 functions.php:64
|
||||
#: functions.php:203
|
||||
msgid "Top Menu"
|
||||
msgstr "Oberes Menü"
|
||||
|
||||
#: comments.php:62
|
||||
msgid "Reply"
|
||||
msgstr "Antworten"
|
||||
|
||||
#: template-parts/post/content-none.php:28
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Es sieht so aus, als ob wir nicht das finden konnten, wonach du gesucht hast. Möglicherweise hilft eine Suche."
|
||||
|
||||
#: search.php:54
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Es gibt keine passenden Suchergebnisse. Bitte versuche es mit anderen Suchbegriffen."
|
||||
|
||||
#: template-parts/post/content-none.php:24
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Bereit, deinen ersten Beitrag zu veröffentlichen? <a href=\"%1$s\">Starte hier</a>."
|
||||
|
||||
#: template-parts/post/content-none.php:17 search.php:21
|
||||
msgid "Nothing Found"
|
||||
msgstr "Nichts gefunden"
|
||||
|
||||
#: single.php:33
|
||||
msgid "Previous Post"
|
||||
msgstr "Vorheriger Beitrag"
|
||||
|
||||
#: single.php:33 comments.php:71
|
||||
msgid "Previous"
|
||||
msgstr "Zurück"
|
||||
|
||||
#: single.php:34 comments.php:72
|
||||
msgid "Next"
|
||||
msgstr "Weiter"
|
||||
|
||||
#: searchform.php:20
|
||||
msgctxt "submit button"
|
||||
msgid "Search"
|
||||
msgstr "Suche"
|
||||
|
||||
#: searchform.php:19
|
||||
msgctxt "placeholder"
|
||||
msgid "Search …"
|
||||
msgstr "Suche …"
|
||||
|
||||
#: searchform.php:17
|
||||
msgctxt "label"
|
||||
msgid "Search for:"
|
||||
msgstr "Suche nach:"
|
||||
|
||||
#: search.php:19
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Suchergebnisse für: %s"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: template-parts/page/content-front-page-panels.php:45
|
||||
#: template-parts/page/content-front-page.php:42
|
||||
#: template-parts/post/content-audio.php:84 template-parts/post/content.php:57
|
||||
#: template-parts/post/content-gallery.php:71
|
||||
#: template-parts/post/content-video.php:83
|
||||
#: template-parts/post/content-image.php:61 functions.php:390
|
||||
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
|
||||
msgstr "<span class=\"screen-reader-text\">„%s“</span> weiterlesen"
|
||||
|
||||
#: inc/customizer.php:63
|
||||
msgid "Dark"
|
||||
msgstr "Dunkel"
|
||||
|
||||
#: inc/back-compat.php:39 inc/back-compat.php:52 inc/back-compat.php:70
|
||||
msgid "Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Sixteen benötigt mindestens WordPress-Version 4.7. Du verwendest Version %s. Bitte aktualisiere und versuche es erneut."
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: inc/template-tags.php:117
|
||||
msgid "Edit<span class=\"screen-reader-text\"> \"%s\"</span>"
|
||||
msgstr "<span class=\"screen-reader-text\">„%s“</span> bearbeiten"
|
||||
|
||||
#: template-parts/page/content-page.php:26
|
||||
#: template-parts/post/content-audio.php:91 template-parts/post/content.php:64
|
||||
#: template-parts/post/content-gallery.php:78
|
||||
#: template-parts/post/content-video.php:90
|
||||
#: template-parts/post/content-image.php:68
|
||||
msgid "Pages:"
|
||||
msgstr "Seiten:"
|
||||
|
||||
#: template-parts/navigation/navigation-top.php:17
|
||||
msgid "Menu"
|
||||
msgstr "Menü"
|
||||
|
||||
#: header.php:27
|
||||
msgid "Skip to content"
|
||||
msgstr "Zum Inhalt springen"
|
||||
|
||||
#: functions.php:482
|
||||
msgid "Collapse child menu"
|
||||
msgstr "Untermenü verbergen"
|
||||
|
||||
#: functions.php:481
|
||||
msgid "Expand child menu"
|
||||
msgstr "Untermenü anzeigen"
|
||||
|
||||
#: functions.php:65 functions.php:214
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Social-Links-Menü"
|
||||
|
||||
#: template-parts/footer/site-info.php:19
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolz präsentiert von %s"
|
||||
|
||||
#: footer.php:26
|
||||
msgid "Footer Social Links Menu"
|
||||
msgstr "Social-Links-Menü im Footer"
|
||||
|
||||
#: comments.php:82
|
||||
msgid "Comments are closed."
|
||||
msgstr "Kommentare sind geschlossen."
|
||||
|
||||
#. translators: 1: number of comments, 2: post title
|
||||
#: comments.php:41
|
||||
msgctxt "comments title"
|
||||
msgid "%1$s Reply to “%2$s”"
|
||||
msgid_plural "%1$s Replies to “%2$s”"
|
||||
msgstr[0] "%1$s Antwort auf „%2$s“"
|
||||
msgstr[1] "%1$s Antworten auf „%2$s“"
|
||||
|
||||
#. translators: %s: post title
|
||||
#: comments.php:37
|
||||
msgctxt "comments title"
|
||||
msgid "One Reply to “%s”"
|
||||
msgstr "Eine Antwort auf „%s“"
|
||||
|
||||
#: archive.php:50 search.php:47 index.php:54
|
||||
msgid "Page"
|
||||
msgstr "Seite"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "Oops! That page can’t be found."
|
||||
msgstr "Die Seite konnte leider nicht gefunden werden."
|
||||
|
||||
#: 404.php:24
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Wie es aussieht, wurde an dieser Stelle nichts gefunden. Möchtest du eine Suche starten?"
|
||||
|
||||
#: archive.php:48 search.php:45 index.php:52
|
||||
msgid "Previous page"
|
||||
msgstr "Vorherige Seite"
|
||||
|
||||
#: archive.php:49 search.php:46 index.php:53
|
||||
msgid "Next page"
|
||||
msgstr "Nächste Seite"
|
||||
|
||||
#. Author of the theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "dem WordPress-Team"
|
||||
|
||||
#. Theme URI of the theme
|
||||
msgid "https://wordpress.org/themes/twentyseventeen/"
|
||||
msgstr "https://de.wordpress.org/themes/twentyseventeen/"
|
||||
|
||||
#. Author URI of the theme
|
||||
#: template-parts/footer/site-info.php:18
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://de.wordpress.org/"
|
@ -0,0 +1,329 @@
|
||||
# Translation of Themes - Twenty Sixteen in German
|
||||
# This file is distributed under the same license as the Themes - Twenty Sixteen package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2018-08-03 00:41:59+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: GlotPress/2.4.0-alpha\n"
|
||||
"Language: de\n"
|
||||
"Project-Id-Version: Themes - Twenty Sixteen\n"
|
||||
|
||||
#. Theme Name of the theme
|
||||
msgid "Twenty Sixteen"
|
||||
msgstr "Twenty Sixteen"
|
||||
|
||||
#. Description of the theme
|
||||
msgid "Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere."
|
||||
msgstr "Twenty Sixteen ist die moderne Interpretation eines allzeit beliebten WordPress-Layouts – einer horizontalen Kopfzeile mit einer optionalen rechten Seitenleiste, die gleichermaßen bei Blogs wie klassischen Websites perfekt funktioniert. Das Theme bietet Einstellungsmöglichkeiten für individuelle Farben mit schönen Standard-Farbvorlagen, ein harmonisches, flexibles Raster mit einem Mobile-First-Ansatz und einem makellosen Schliff in jedem Detail. Twenty Sixteen sorgt für einen tollen Look bei all deinen WordPress-Websites."
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: inc/template-tags.php:194 template-parts/content.php:29
|
||||
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
|
||||
msgstr "<span class=\"screen-reader-text\">„%s“ </span>weiterlesen"
|
||||
|
||||
#. translators: %s: Name of current post
|
||||
#: image.php:88 template-parts/content.php:53
|
||||
#: template-parts/content-single.php:47 template-parts/content-search.php:28
|
||||
#: template-parts/content-search.php:43 template-parts/content-page.php:39
|
||||
msgid "Edit<span class=\"screen-reader-text\"> \"%s\"</span>"
|
||||
msgstr "<span class=\"screen-reader-text\">„%s“</span> bearbeiten"
|
||||
|
||||
#: inc/customizer.php:345
|
||||
msgid "Red"
|
||||
msgstr "Rot"
|
||||
|
||||
#. translators: %s: post title
|
||||
#: comments.php:31
|
||||
msgctxt "comments title"
|
||||
msgid "One thought on “%s”"
|
||||
msgstr "Ein Gedanke zu „%s“"
|
||||
|
||||
#: searchform.php:16
|
||||
msgctxt "submit button"
|
||||
msgid "Search"
|
||||
msgstr "Suche"
|
||||
|
||||
#: searchform.php:14
|
||||
msgctxt "placeholder"
|
||||
msgid "Search …"
|
||||
msgstr "Suche …"
|
||||
|
||||
#: searchform.php:13
|
||||
msgctxt "label"
|
||||
msgid "Search for:"
|
||||
msgstr "Suche nach:"
|
||||
|
||||
#: footer.php:30
|
||||
msgid "Footer Social Links Menu"
|
||||
msgstr "Footer-Social-Links-Menü"
|
||||
|
||||
#: footer.php:17
|
||||
msgid "Footer Primary Menu"
|
||||
msgstr "Primäres Footer-Menü"
|
||||
|
||||
#: functions.php:267
|
||||
msgid "Add widgets here to appear in your sidebar."
|
||||
msgstr "Widgets hier hinzufügen, um sie in die Seitenleiste einzubauen."
|
||||
|
||||
#: template-parts/content.php:14
|
||||
msgid "Featured"
|
||||
msgstr "Empfohlen"
|
||||
|
||||
#: template-parts/content-none.php:28
|
||||
msgid "It seems we can’t find what you’re looking for. Perhaps searching can help."
|
||||
msgstr "Es sieht so aus, als ob wir nicht das finden konnten, wonach du gesucht hast. Möglicherweise hilft eine Suche."
|
||||
|
||||
#: template-parts/content-none.php:23
|
||||
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
|
||||
msgstr "Es gibt keine passenden Suchergebnisse. Bitte versuche es mit anderen Suchbegriffen."
|
||||
|
||||
#: template-parts/content-none.php:19
|
||||
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr "Bereit, deinen ersten Beitrag zu veröffentlichen? <a href=\"%1$s\">Starte hier</a>."
|
||||
|
||||
#: template-parts/content-none.php:13
|
||||
msgid "Nothing Found"
|
||||
msgstr "Nichts gefunden"
|
||||
|
||||
#: template-parts/biography.php:33
|
||||
msgid "View all posts by %s"
|
||||
msgstr "Zeige alle Beiträge von %s"
|
||||
|
||||
#: template-parts/biography.php:28
|
||||
msgid "Author:"
|
||||
msgstr "Autor:"
|
||||
|
||||
#: single.php:42
|
||||
msgid "Previous post:"
|
||||
msgstr "Vorheriger Beitrag:"
|
||||
|
||||
#: single.php:39
|
||||
msgid "Next post:"
|
||||
msgstr "Nächster Beitrag:"
|
||||
|
||||
#: single.php:41
|
||||
msgid "Previous"
|
||||
msgstr "Zurück"
|
||||
|
||||
#: single.php:38
|
||||
msgid "Next"
|
||||
msgstr "Weiter"
|
||||
|
||||
#: search.php:18
|
||||
msgid "Search Results for: %s"
|
||||
msgstr "Suchergebnisse für: %s"
|
||||
|
||||
#: inc/template-tags.php:112
|
||||
msgctxt "Used before tag names."
|
||||
msgid "Tags"
|
||||
msgstr "Schlagwörter"
|
||||
|
||||
#: inc/template-tags.php:103
|
||||
msgctxt "Used before category names."
|
||||
msgid "Categories"
|
||||
msgstr "Kategorien"
|
||||
|
||||
#: inc/template-tags.php:99 inc/template-tags.php:108
|
||||
msgctxt "Used between list items, there is a space after the comma."
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: inc/template-tags.php:83
|
||||
msgctxt "Used before publish date."
|
||||
msgid "Posted on"
|
||||
msgstr "Veröffentlicht am"
|
||||
|
||||
#: inc/template-tags.php:40
|
||||
msgctxt "Used before post format."
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: inc/template-tags.php:52
|
||||
msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
|
||||
msgstr "Schreibe einen Kommentar<span class=\"screen-reader-text\"> zu %s</span>"
|
||||
|
||||
#: inc/template-tags.php:26
|
||||
msgctxt "Used before post author name."
|
||||
msgid "Author"
|
||||
msgstr "Autor"
|
||||
|
||||
#: functions.php:207 inc/customizer.php:355
|
||||
msgid "Yellow"
|
||||
msgstr "Gelb"
|
||||
|
||||
#: inc/customizer.php:335
|
||||
msgid "Gray"
|
||||
msgstr "Grau"
|
||||
|
||||
#: inc/customizer.php:325
|
||||
msgid "Dark"
|
||||
msgstr "Dunkel"
|
||||
|
||||
#: inc/customizer.php:315
|
||||
msgid "Default"
|
||||
msgstr "Standard"
|
||||
|
||||
#: inc/customizer.php:242
|
||||
msgid "Secondary Text Color"
|
||||
msgstr "Sekundäre Textfarbe"
|
||||
|
||||
#: inc/customizer.php:221
|
||||
msgid "Main Text Color"
|
||||
msgstr "Primäre Textfarbe"
|
||||
|
||||
#: inc/customizer.php:200
|
||||
msgid "Link Color"
|
||||
msgstr "Linkfarbe"
|
||||
|
||||
#: inc/customizer.php:176
|
||||
msgid "Page Background Color"
|
||||
msgstr "Hintergrundfarbe des Inhalts"
|
||||
|
||||
#: single.php:31 image.php:107
|
||||
msgctxt "Parent post link"
|
||||
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%title</span>"
|
||||
msgstr "<span class=\"meta-nav\">Veröffentlicht in</span><span class=\"post-title\">%title</span>"
|
||||
|
||||
#: inc/back-compat.php:41 inc/back-compat.php:54 inc/back-compat.php:72
|
||||
msgid "Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again."
|
||||
msgstr "Twenty Sixteen benötigt mindestens WordPress-Version 4.4. Du verwendest Version %s. Bitte aktualisiere und versuche es erneut."
|
||||
|
||||
#: inc/customizer.php:153
|
||||
msgid "Base Color Scheme"
|
||||
msgstr "Basis-Farbvorlage"
|
||||
|
||||
#: image.php:77
|
||||
msgctxt "Used before full size attachment link."
|
||||
msgid "Full size"
|
||||
msgstr "Volle Größe"
|
||||
|
||||
#: image.php:58 template-parts/content.php:36
|
||||
#: template-parts/content-single.php:26 template-parts/content-page.php:24
|
||||
msgid "Pages:"
|
||||
msgstr "Seiten:"
|
||||
|
||||
#: image.php:26
|
||||
msgid "Next Image"
|
||||
msgstr "Nächstes Bild"
|
||||
|
||||
#: image.php:25
|
||||
msgid "Previous Image"
|
||||
msgstr "Vorheriges Bild"
|
||||
|
||||
#: header.php:49
|
||||
msgid "Menu"
|
||||
msgstr "Menü"
|
||||
|
||||
#: header.php:27
|
||||
msgid "Skip to content"
|
||||
msgstr "Zum Inhalt springen"
|
||||
|
||||
#: functions.php:407
|
||||
msgid "expand child menu"
|
||||
msgstr "Untermenü anzeigen"
|
||||
|
||||
#: functions.php:408
|
||||
msgid "collapse child menu"
|
||||
msgstr "Untermenü verbergen"
|
||||
|
||||
#. translators: If there are characters in your language that are not supported
|
||||
#. by Merriweather, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:317
|
||||
msgctxt "Merriweather font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#. translators: If there are characters in your language that are not supported
|
||||
#. by Montserrat, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:322
|
||||
msgctxt "Montserrat font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#. translators: If there are characters in your language that are not supported
|
||||
#. by Inconsolata, translate this to 'off'. Do not translate into your own
|
||||
#. language.
|
||||
#: functions.php:327
|
||||
msgctxt "Inconsolata font: on or off"
|
||||
msgid "on"
|
||||
msgstr "on"
|
||||
|
||||
#: functions.php:277
|
||||
msgid "Content Bottom 1"
|
||||
msgstr "Unterhalb des Inhalts 1"
|
||||
|
||||
#: functions.php:289
|
||||
msgid "Content Bottom 2"
|
||||
msgstr "Unterhalb des Inhalts 2"
|
||||
|
||||
#: functions.php:279 functions.php:291
|
||||
msgid "Appears at the bottom of the content on posts and pages."
|
||||
msgstr "Erscheint unterhalb des Inhalts von Beiträgen und Seiten."
|
||||
|
||||
#: functions.php:265
|
||||
msgid "Sidebar"
|
||||
msgstr "Seitenleiste"
|
||||
|
||||
#: header.php:66 functions.php:93
|
||||
msgid "Social Links Menu"
|
||||
msgstr "Social-Links-Menü"
|
||||
|
||||
#: header.php:53 functions.php:92
|
||||
msgid "Primary Menu"
|
||||
msgstr "Primäres Menü"
|
||||
|
||||
#: footer.php:61
|
||||
msgid "Proudly powered by %s"
|
||||
msgstr "Stolz präsentiert von %s"
|
||||
|
||||
#: comments.php:71
|
||||
msgid "Comments are closed."
|
||||
msgstr "Kommentare sind geschlossen."
|
||||
|
||||
#. translators: 1: number of comments, 2: post title
|
||||
#: comments.php:35
|
||||
msgctxt "comments title"
|
||||
msgid "%1$s thought on “%2$s”"
|
||||
msgid_plural "%1$s thoughts on “%2$s”"
|
||||
msgstr[0] "Ein Gedanke zu „%2$s“"
|
||||
msgstr[1] "%1$s Gedanken zu „%2$s“"
|
||||
|
||||
#: index.php:50 archive.php:53 search.php:41 image.php:62
|
||||
#: template-parts/content.php:40 template-parts/content-single.php:30
|
||||
#: template-parts/content-page.php:28
|
||||
msgid "Page"
|
||||
msgstr "Seite"
|
||||
|
||||
#: index.php:49 archive.php:52 search.php:40
|
||||
msgid "Next page"
|
||||
msgstr "Nächste Seite"
|
||||
|
||||
#: index.php:48 archive.php:51 search.php:39
|
||||
msgid "Previous page"
|
||||
msgstr "Vorherige Seite"
|
||||
|
||||
#: 404.php:21
|
||||
msgid "It looks like nothing was found at this location. Maybe try a search?"
|
||||
msgstr "Wie es aussieht, wurde an dieser Stelle nichts gefunden. Möchtest du eine Suche starten?"
|
||||
|
||||
#: 404.php:17
|
||||
msgid "Oops! That page can’t be found."
|
||||
msgstr "Die Seite konnte leider nicht gefunden werden."
|
||||
|
||||
#. Author of the theme
|
||||
msgid "the WordPress team"
|
||||
msgstr "dem WordPress-Team"
|
||||
|
||||
#. Theme URI of the theme
|
||||
msgid "https://wordpress.org/themes/twentysixteen/"
|
||||
msgstr "https://de.wordpress.org/themes/twentysixteen/"
|
||||
|
||||
#. Author URI of the theme
|
||||
#: footer.php:60
|
||||
msgid "https://wordpress.org/"
|
||||
msgstr "https://de.wordpress.org/"
|
340
msd2/wordpress/wp-content/plugins/amp/LICENSE
Normal file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
620
msd2/wordpress/wp-content/plugins/amp/amp.php
Normal file
@ -0,0 +1,620 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: AMP
|
||||
* Description: Enable AMP on your WordPress site, the WordPress way.
|
||||
* Plugin URI: https://amp-wp.org
|
||||
* Author: AMP Project Contributors
|
||||
* Author URI: https://github.com/ampproject/amp-wp/graphs/contributors
|
||||
* Version: 1.1.1
|
||||
* Text Domain: amp
|
||||
* Domain Path: /languages/
|
||||
* License: GPLv2 or later
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
/**
|
||||
* Print admin notice regarding having an old version of PHP.
|
||||
*
|
||||
* @since 0.7
|
||||
*/
|
||||
function _amp_print_php_version_admin_notice() {
|
||||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: required PHP version */
|
||||
esc_html__( 'The AMP plugin requires PHP %s. Please contact your host to update your PHP version.', 'amp' ),
|
||||
'5.4+'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ( version_compare( phpversion(), '5.4', '<' ) ) {
|
||||
add_action( 'admin_notices', '_amp_print_php_version_admin_notice' );
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print admin notice regarding DOM extension is not installed.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
function _amp_print_php_dom_document_notice() {
|
||||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: PHP extension name */
|
||||
esc_html__( 'The AMP plugin requires the %s extension in PHP. Please contact your host to install this extension.', 'amp' ),
|
||||
'DOM'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ( ! class_exists( 'DOMDocument' ) ) {
|
||||
add_action( 'admin_notices', '_amp_print_php_dom_document_notice' );
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print admin notice regarding DOM extension is not installed.
|
||||
*
|
||||
* @since 1.0.1
|
||||
*/
|
||||
function _amp_print_php_missing_iconv_notice() {
|
||||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: PHP extension name */
|
||||
esc_html__( 'The AMP plugin requires the %s extension in PHP. Please contact your host to install this extension.', 'amp' ),
|
||||
'iconv'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ( ! function_exists( 'iconv' ) ) {
|
||||
add_action( 'admin_notices', '_amp_print_php_missing_iconv_notice' );
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print admin notice when composer install has not been performed.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
function _amp_print_build_needed_notice() {
|
||||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: composer install && npm install && npm run build */
|
||||
__( 'You appear to be running the AMP plugin from source. Please do %s to finish installation.', 'amp' ), // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
'<code>composer install && npm install && npm run build</code>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) || ! file_exists( __DIR__ . '/vendor/sabberworm/php-css-parser' ) || ! file_exists( __DIR__ . '/assets/js/amp-block-editor-toggle-compiled.js' ) ) {
|
||||
add_action( 'admin_notices', '_amp_print_build_needed_notice' );
|
||||
return;
|
||||
}
|
||||
|
||||
define( 'AMP__FILE__', __FILE__ );
|
||||
define( 'AMP__DIR__', dirname( __FILE__ ) );
|
||||
define( 'AMP__VERSION', '1.1.1' );
|
||||
|
||||
/**
|
||||
* Print admin notice if plugin installed with incorrect slug (which impacts WordPress's auto-update system).
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
function _amp_incorrect_plugin_slug_admin_notice() {
|
||||
$actual_slug = basename( AMP__DIR__ );
|
||||
?>
|
||||
<div class="notice notice-warning">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s is the current directory name, and %2$s is the required directory name */
|
||||
__( 'You appear to have installed the AMP plugin incorrectly. It is currently installed in the <code>%1$s</code> directory, but it needs to be placed in a directory named <code>%2$s</code>. Please rename the directory. This is important for WordPress plugin auto-updates.', 'amp' ),
|
||||
$actual_slug,
|
||||
'amp'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ( 'amp' !== basename( AMP__DIR__ ) ) {
|
||||
add_action( 'admin_notices', '_amp_incorrect_plugin_slug_admin_notice' );
|
||||
}
|
||||
|
||||
require_once AMP__DIR__ . '/includes/class-amp-autoloader.php';
|
||||
AMP_Autoloader::register();
|
||||
|
||||
require_once AMP__DIR__ . '/back-compat/back-compat.php';
|
||||
require_once AMP__DIR__ . '/includes/amp-helper-functions.php';
|
||||
require_once AMP__DIR__ . '/includes/admin/functions.php';
|
||||
|
||||
register_activation_hook( __FILE__, 'amp_activate' );
|
||||
|
||||
/**
|
||||
* Handle activation of plugin.
|
||||
*
|
||||
* @since 0.2
|
||||
*/
|
||||
function amp_activate() {
|
||||
amp_after_setup_theme();
|
||||
if ( ! did_action( 'amp_init' ) ) {
|
||||
amp_init();
|
||||
}
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
|
||||
register_deactivation_hook( __FILE__, 'amp_deactivate' );
|
||||
|
||||
/**
|
||||
* Handle deactivation of plugin.
|
||||
*
|
||||
* @since 0.2
|
||||
*/
|
||||
function amp_deactivate() {
|
||||
// We need to manually remove the amp endpoint.
|
||||
global $wp_rewrite;
|
||||
foreach ( $wp_rewrite->endpoints as $index => $endpoint ) {
|
||||
if ( amp_get_slug() === $endpoint[1] ) {
|
||||
unset( $wp_rewrite->endpoints[ $index ] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
|
||||
/*
|
||||
* Register AMP scripts regardless of whether AMP is enabled or it is the AMP endpoint
|
||||
* for the sake of being able to use AMP components on non-AMP documents ("dirty AMP").
|
||||
*/
|
||||
add_action( 'wp_default_scripts', 'amp_register_default_scripts' );
|
||||
|
||||
// Ensure async and custom-element/custom-template attributes are present on script tags.
|
||||
add_filter( 'script_loader_tag', 'amp_filter_script_loader_tag', PHP_INT_MAX, 2 );
|
||||
|
||||
// Ensure crossorigin=anonymous is added to font links.
|
||||
add_filter( 'style_loader_tag', 'amp_filter_font_style_loader_tag_with_crossorigin_anonymous', 10, 4 );
|
||||
|
||||
/**
|
||||
* Set up AMP.
|
||||
*
|
||||
* This function must be invoked through the 'after_setup_theme' action to allow
|
||||
* the AMP setting to declare the post types support earlier than plugins/theme.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
function amp_after_setup_theme() {
|
||||
amp_get_slug(); // Ensure AMP_QUERY_VAR is set.
|
||||
|
||||
/**
|
||||
* Filters whether AMP is enabled on the current site.
|
||||
*
|
||||
* Useful if the plugin is network activated and you want to turn it off on select sites.
|
||||
*
|
||||
* @since 0.2
|
||||
*/
|
||||
if ( false === apply_filters( 'amp_is_enabled', true ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_action( 'init', 'amp_init', 0 ); // Must be 0 because widgets_init happens at init priority 1.
|
||||
}
|
||||
add_action( 'after_setup_theme', 'amp_after_setup_theme', 5 );
|
||||
|
||||
/**
|
||||
* Init AMP.
|
||||
*
|
||||
* @since 0.1
|
||||
*/
|
||||
function amp_init() {
|
||||
|
||||
/**
|
||||
* Triggers on init when AMP plugin is active.
|
||||
*
|
||||
* @since 0.3
|
||||
*/
|
||||
do_action( 'amp_init' );
|
||||
|
||||
add_rewrite_endpoint( amp_get_slug(), EP_PERMALINK );
|
||||
|
||||
add_filter( 'allowed_redirect_hosts', array( 'AMP_HTTP', 'filter_allowed_redirect_hosts' ) );
|
||||
AMP_HTTP::purge_amp_query_vars();
|
||||
AMP_HTTP::send_cors_headers();
|
||||
AMP_HTTP::handle_xhr_request();
|
||||
AMP_Theme_Support::init();
|
||||
AMP_Validation_Manager::init();
|
||||
AMP_Service_Worker::init();
|
||||
add_action( 'init', array( 'AMP_Post_Type_Support', 'add_post_type_support' ), 1000 ); // After post types have been defined.
|
||||
|
||||
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
||||
WP_CLI::add_command( 'amp', new AMP_CLI() );
|
||||
}
|
||||
|
||||
add_filter( 'request', 'amp_force_query_var_value' );
|
||||
add_action( 'admin_init', 'AMP_Options_Manager::register_settings' );
|
||||
add_action( 'wp_loaded', 'amp_editor_core_blocks' );
|
||||
add_action( 'wp_loaded', 'amp_post_meta_box' );
|
||||
add_action( 'wp_loaded', 'amp_editor_core_blocks' );
|
||||
add_action( 'wp_loaded', 'amp_add_options_menu' );
|
||||
add_action( 'wp_loaded', 'amp_admin_pointer' );
|
||||
add_action( 'parse_query', 'amp_correct_query_when_is_front_page' );
|
||||
|
||||
// Redirect the old url of amp page to the updated url.
|
||||
add_filter( 'old_slug_redirect_url', 'amp_redirect_old_slug_to_new_url' );
|
||||
|
||||
if ( class_exists( 'Jetpack' ) && ! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) && version_compare( JETPACK__VERSION, '6.2-alpha', '<' ) ) {
|
||||
require_once AMP__DIR__ . '/jetpack-helper.php';
|
||||
}
|
||||
|
||||
// Add actions for legacy post templates.
|
||||
add_action( 'wp', 'amp_maybe_add_actions' );
|
||||
|
||||
/*
|
||||
* Broadcast plugin updates.
|
||||
* Note that AMP_Options_Manager::get_option( 'version', '0.0' ) cannot be used because
|
||||
* version was new option added, and in that case default would never be used for a site
|
||||
* upgrading from a version prior to 1.0. So this is why get_option() is currently used.
|
||||
*/
|
||||
$options = get_option( AMP_Options_Manager::OPTION_NAME, array() );
|
||||
$old_version = isset( $options['version'] ) ? $options['version'] : '0.0';
|
||||
if ( AMP__VERSION !== $old_version ) {
|
||||
/**
|
||||
* Triggers when after amp_init when the plugin version has updated.
|
||||
*
|
||||
* @param string $old_version Old version.
|
||||
*/
|
||||
do_action( 'amp_plugin_update', $old_version );
|
||||
AMP_Options_Manager::update_option( 'version', AMP__VERSION );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure the `amp` query var has an explicit value.
|
||||
*
|
||||
* This avoids issues when filtering the deprecated `query_string` hook.
|
||||
*
|
||||
* @since 0.3.3
|
||||
*
|
||||
* @param array $query_vars Query vars.
|
||||
* @return array Query vars.
|
||||
*/
|
||||
function amp_force_query_var_value( $query_vars ) {
|
||||
if ( isset( $query_vars[ amp_get_slug() ] ) && '' === $query_vars[ amp_get_slug() ] ) {
|
||||
$query_vars[ amp_get_slug() ] = 1;
|
||||
}
|
||||
return $query_vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditionally add AMP actions or render the transitional mode template(s).
|
||||
*
|
||||
* If the request is for an AMP page and this is in 'canonical mode,' redirect to the non-AMP page.
|
||||
* It won't need this plugin's template system, nor the frontend actions like the 'rel' link.
|
||||
*
|
||||
* @deprecated This function is not used when 'amp' theme support is added.
|
||||
* @global WP_Query $wp_query
|
||||
* @since 0.2
|
||||
* @return void
|
||||
*/
|
||||
function amp_maybe_add_actions() {
|
||||
|
||||
// Short-circuit when theme supports AMP, as everything is handled by AMP_Theme_Support.
|
||||
if ( current_theme_supports( AMP_Theme_Support::SLUG ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The remaining logic here is for transitional mode running in themes that don't support AMP, the template system in AMP<=0.6.
|
||||
global $wp_query;
|
||||
if ( ! ( is_singular() || $wp_query->is_posts_page ) || is_feed() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$is_amp_endpoint = is_amp_endpoint();
|
||||
|
||||
/**
|
||||
* Queried post object.
|
||||
*
|
||||
* @var WP_Post $post
|
||||
*/
|
||||
$post = get_queried_object();
|
||||
if ( ! post_supports_amp( $post ) ) {
|
||||
if ( $is_amp_endpoint ) {
|
||||
/*
|
||||
* Temporary redirect is used for admin users because reader mode and AMP support can be enabled by user at any time,
|
||||
* so they will be able to make AMP available for this URL and see the change without wrestling with the redirect cache.
|
||||
*/
|
||||
wp_safe_redirect( get_permalink( $post->ID ), current_user_can( 'manage_options' ) ? 302 : 301 );
|
||||
exit;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $is_amp_endpoint ) {
|
||||
|
||||
// Prevent infinite URL space under /amp/ endpoint.
|
||||
global $wp;
|
||||
wp_parse_str( $wp->matched_query, $path_args );
|
||||
if ( isset( $path_args[ amp_get_slug() ] ) && '' !== $path_args[ amp_get_slug() ] ) {
|
||||
wp_safe_redirect( amp_get_permalink( $post->ID ), 301 );
|
||||
exit;
|
||||
}
|
||||
|
||||
amp_prepare_render();
|
||||
} else {
|
||||
amp_add_frontend_actions();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix up WP_Query for front page when amp query var is present.
|
||||
*
|
||||
* Normally the front page would not get served if a query var is present other than preview, page, paged, and cpage.
|
||||
*
|
||||
* @since 0.6
|
||||
* @see WP_Query::parse_query()
|
||||
* @link https://github.com/WordPress/wordpress-develop/blob/0baa8ae85c670d338e78e408f8d6e301c6410c86/src/wp-includes/class-wp-query.php#L951-L971
|
||||
*
|
||||
* @param WP_Query $query Query.
|
||||
*/
|
||||
function amp_correct_query_when_is_front_page( WP_Query $query ) {
|
||||
$is_front_page_query = (
|
||||
$query->is_main_query()
|
||||
&&
|
||||
$query->is_home()
|
||||
&&
|
||||
// Is AMP endpoint.
|
||||
false !== $query->get( amp_get_slug(), false )
|
||||
&&
|
||||
// Is query not yet fixed uo up to be front page.
|
||||
! $query->is_front_page()
|
||||
&&
|
||||
// Is showing pages on front.
|
||||
'page' === get_option( 'show_on_front' )
|
||||
&&
|
||||
// Has page on front set.
|
||||
get_option( 'page_on_front' )
|
||||
&&
|
||||
// See line in WP_Query::parse_query() at <https://github.com/WordPress/wordpress-develop/blob/0baa8ae/src/wp-includes/class-wp-query.php#L961>.
|
||||
0 === count( array_diff( array_keys( wp_parse_args( $query->query ) ), array( amp_get_slug(), 'preview', 'page', 'paged', 'cpage' ) ) )
|
||||
);
|
||||
if ( $is_front_page_query ) {
|
||||
$query->is_home = false;
|
||||
$query->is_page = true;
|
||||
$query->is_singular = true;
|
||||
$query->set( 'page_id', get_option( 'page_on_front' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this is in 'canonical mode'.
|
||||
*
|
||||
* Themes can register support for this with `add_theme_support( AMP_Theme_Support::SLUG )`:
|
||||
*
|
||||
* add_theme_support( AMP_Theme_Support::SLUG );
|
||||
*
|
||||
* This will serve templates in native AMP, allowing you to use AMP components in your theme templates.
|
||||
* If you want to make available in transitional mode, where templates are served in AMP or non-AMP documents, do:
|
||||
*
|
||||
* add_theme_support( AMP_Theme_Support::SLUG, array(
|
||||
* 'paired' => true,
|
||||
* ) );
|
||||
*
|
||||
* Transitional mode is also implied if you define a template_dir:
|
||||
*
|
||||
* add_theme_support( AMP_Theme_Support::SLUG, array(
|
||||
* 'template_dir' => 'amp',
|
||||
* ) );
|
||||
*
|
||||
* If you want to have AMP-specific templates in addition to serving native AMP, do:
|
||||
*
|
||||
* add_theme_support( AMP_Theme_Support::SLUG, array(
|
||||
* 'paired' => false,
|
||||
* 'template_dir' => 'amp',
|
||||
* ) );
|
||||
*
|
||||
* If you want to force AMP to always be served on a given template, you can use the templates_supported arg,
|
||||
* for example to always serve the Category template in AMP:
|
||||
*
|
||||
* add_theme_support( AMP_Theme_Support::SLUG, array(
|
||||
* 'templates_supported' => array(
|
||||
* 'is_category' => true,
|
||||
* ),
|
||||
* ) );
|
||||
*
|
||||
* Or if you want to force AMP to be used on all templates:
|
||||
*
|
||||
* add_theme_support( AMP_Theme_Support::SLUG, array(
|
||||
* 'templates_supported' => 'all',
|
||||
* ) );
|
||||
*
|
||||
* @see AMP_Theme_Support::read_theme_support()
|
||||
* @return boolean Whether this is in AMP 'canonical' mode, that is whether it is native and there is not separate AMP URL current URL.
|
||||
*/
|
||||
function amp_is_canonical() {
|
||||
if ( ! current_theme_supports( AMP_Theme_Support::SLUG ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$args = AMP_Theme_Support::get_theme_support_args();
|
||||
if ( isset( $args['paired'] ) ) {
|
||||
return empty( $args['paired'] );
|
||||
}
|
||||
|
||||
// If there is a template_dir, then transitional mode is implied.
|
||||
return empty( $args['template_dir'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Load classes.
|
||||
*
|
||||
* @since 0.2
|
||||
* @deprecated As of 0.6 since autoloading is now employed.
|
||||
*/
|
||||
function amp_load_classes() {
|
||||
_deprecated_function( __FUNCTION__, '0.6' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add frontend actions.
|
||||
*
|
||||
* @since 0.2
|
||||
*/
|
||||
function amp_add_frontend_actions() {
|
||||
add_action( 'wp_head', 'amp_add_amphtml_link' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add post template actions.
|
||||
*
|
||||
* @since 0.2
|
||||
* @deprecated This function is not used when 'amp' theme support is added.
|
||||
*/
|
||||
function amp_add_post_template_actions() {
|
||||
require_once AMP__DIR__ . '/includes/amp-post-template-functions.php';
|
||||
amp_post_template_init_hooks();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add action to do post template rendering at template_redirect action.
|
||||
*
|
||||
* @since 0.2
|
||||
* @since 1.0 The amp_render() function is called at template_redirect action priority 11 instead of priority 10.
|
||||
* @deprecated This function is not used when 'amp' theme support is added.
|
||||
*/
|
||||
function amp_prepare_render() {
|
||||
add_action( 'template_redirect', 'amp_render', 11 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Render AMP for queried post.
|
||||
*
|
||||
* @since 0.1
|
||||
* @deprecated This function is not used when 'amp' theme support is added.
|
||||
*/
|
||||
function amp_render() {
|
||||
// Note that queried object is used instead of the ID so that the_preview for the queried post can apply.
|
||||
$post = get_queried_object();
|
||||
if ( $post instanceof WP_Post ) {
|
||||
amp_render_post( $post );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render AMP post template.
|
||||
*
|
||||
* @since 0.5
|
||||
* @deprecated This function is not used when 'amp' theme support is added.
|
||||
*
|
||||
* @param WP_Post|int $post Post.
|
||||
* @global WP_Query $wp_query
|
||||
*/
|
||||
function amp_render_post( $post ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! ( $post instanceof WP_Post ) ) {
|
||||
$post = get_post( $post );
|
||||
if ( ! $post ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
$post_id = $post->ID;
|
||||
|
||||
/*
|
||||
* If amp_render_post is called directly outside of the standard endpoint, is_amp_endpoint() will return false,
|
||||
* which is not ideal for any code that expects to run in an AMP context.
|
||||
* Let's force the value to be true while we render AMP.
|
||||
*/
|
||||
$was_set = isset( $wp_query->query_vars[ amp_get_slug() ] );
|
||||
if ( ! $was_set ) {
|
||||
$wp_query->query_vars[ amp_get_slug() ] = true;
|
||||
}
|
||||
|
||||
// Prevent New Relic from causing invalid AMP responses due the NREUM script it injects after the meta charset.
|
||||
if ( extension_loaded( 'newrelic' ) ) {
|
||||
newrelic_disable_autorum();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires before rendering a post in AMP.
|
||||
*
|
||||
* This action is not triggered when 'amp' theme support is present. Instead, you should use 'template_redirect' action and check if `is_amp_endpoint()`.
|
||||
*
|
||||
* @since 0.2
|
||||
*
|
||||
* @param int $post_id Post ID.
|
||||
*/
|
||||
do_action( 'pre_amp_render_post', $post_id );
|
||||
|
||||
amp_add_post_template_actions();
|
||||
$template = new AMP_Post_Template( $post );
|
||||
$template->load();
|
||||
|
||||
if ( ! $was_set ) {
|
||||
unset( $wp_query->query_vars[ amp_get_slug() ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstraps the AMP customizer.
|
||||
*
|
||||
* Uses the priority of 12 for the 'after_setup_theme' action.
|
||||
* Many themes run `add_theme_support()` on the 'after_setup_theme' hook, at the default priority of 10.
|
||||
* And that function's documentation suggests adding it to that action.
|
||||
* So this enables themes to `add_theme_support( AMP_Theme_Support::SLUG )`.
|
||||
* And `amp_init_customizer()` will be able to recognize theme support by calling `amp_is_canonical()`.
|
||||
*
|
||||
* @since 0.4
|
||||
*/
|
||||
function _amp_bootstrap_customizer() {
|
||||
add_action( 'after_setup_theme', 'amp_init_customizer', 12 );
|
||||
}
|
||||
add_action( 'plugins_loaded', '_amp_bootstrap_customizer', 9 ); // Should be hooked before priority 10 on 'plugins_loaded' to properly unhook core panels.
|
||||
|
||||
/**
|
||||
* Redirects the old AMP URL to the new AMP URL.
|
||||
*
|
||||
* If post slug is updated the amp page with old post slug will be redirected to the updated url.
|
||||
*
|
||||
* @since 0.5
|
||||
* @deprecated This function is irrelevant when 'amp' theme support is added.
|
||||
*
|
||||
* @param string $link New URL of the post.
|
||||
* @return string URL to be redirected.
|
||||
*/
|
||||
function amp_redirect_old_slug_to_new_url( $link ) {
|
||||
|
||||
if ( is_amp_endpoint() && ! amp_is_canonical() ) {
|
||||
if ( current_theme_supports( AMP_Theme_Support::SLUG ) ) {
|
||||
$link = add_query_arg( amp_get_slug(), '', $link );
|
||||
} else {
|
||||
$link = trailingslashit( trailingslashit( $link ) . amp_get_slug() );
|
||||
}
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
1058
msd2/wordpress/wp-content/plugins/amp/assets/css/admin-bar.css
Normal file
@ -0,0 +1,57 @@
|
||||
.column-error_status .dashicons-editor-help {
|
||||
color: #767676;
|
||||
}
|
||||
.column-sources .dashicons,
|
||||
.column-sources_with_invalid_output .dashicons {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.column-source .dashicons-admin-plugins,
|
||||
.column-sources_with_invalid_output .dashicons-admin-plugins {
|
||||
color: #64a2e9;
|
||||
}
|
||||
.column-source .dashicons-admin-appearance,
|
||||
.column-sources_with_invalid_output .dashicons-admin-appearance {
|
||||
color: #ebb04f;
|
||||
}
|
||||
.column-source, .dashicons-wordpress-alt,
|
||||
.column-sources_with_invalid_output .dashicons-wordpress-alt {
|
||||
color: #92b371;
|
||||
}
|
||||
.amp-logo-icon {
|
||||
background-image: url( '../images/amp-logo-icon.svg' );
|
||||
background-color: transparent;
|
||||
background-size: 20px 20px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
.column-error_status .error-status {
|
||||
line-height: 20px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
}
|
||||
td.column-found_elements_and_attributes {
|
||||
color: #970010;
|
||||
}
|
||||
td.column-found_elements_and_attributes div {
|
||||
margin-bottom: 0.6rem;
|
||||
}
|
||||
.column-error_status .dashicons-flag.new {
|
||||
color: #d98501;
|
||||
}
|
||||
.column-error_status .dashicons-yes.new {
|
||||
color: #ff0000;
|
||||
}
|
||||
.column-error_status .dashicons-warning.rejected {
|
||||
color: #68c6ff;
|
||||
}
|
||||
.column-sources .source,
|
||||
.column-sources_with_invalid_output .source {
|
||||
margin-bottom: 10px;
|
||||
display: block;
|
||||
}
|
||||
.wrap .wp-heading-inline + .page-title-action {
|
||||
margin-left: 1rem;
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
.amp-toggle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
height: 15px;
|
||||
top: 15px;
|
||||
left: 130px;
|
||||
}
|
||||
|
||||
.amp-toggle input,
|
||||
.amp-toggle input.disabled {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.amp-toggle .slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 34px;
|
||||
background-color: #555D66;
|
||||
-webkit-transition: .3s;
|
||||
transition: .3s;
|
||||
transition-property: background-color, transform, -webkit-transform, -ms-transform, opacity;
|
||||
}
|
||||
.amp-toggle input:focus,
|
||||
.amp-toggle input:active {
|
||||
outline: none;
|
||||
}
|
||||
.amp-toggle input:hover + .slider,
|
||||
.amp-toggle input:focus + .slider,
|
||||
.amp-toggle input:active + .slider {
|
||||
box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
|
||||
}
|
||||
|
||||
.amp-toggle .slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 13px;
|
||||
width: 13px;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
border-radius: 50%;
|
||||
background-color: transparent;
|
||||
background-image: url( '../images/amp-white-icon.svg' );
|
||||
background-size: 13px 13px;
|
||||
-webkit-transition: .3s;
|
||||
transition: .3s;
|
||||
}
|
||||
|
||||
.amp-toggle input:checked + .slider {
|
||||
background-color: #0379C4;
|
||||
}
|
||||
|
||||
.amp-toggle input:checked + .slider:before {
|
||||
-webkit-transform: translateX( 15px );
|
||||
-ms-transform: translateX( 15px );
|
||||
transform: translateX( 15px );
|
||||
}
|
||||
|
||||
.amp-toggle input.disabled + .slider {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.amp-toggle .tooltip {
|
||||
position: absolute;
|
||||
bottom: 25px;
|
||||
left: -115px;
|
||||
width: 230px;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
background: #191E23;
|
||||
padding: 15px;
|
||||
z-index: 1;
|
||||
cursor: default;
|
||||
display: none;
|
||||
}
|
||||
.amp-toggle .tooltip a {
|
||||
color: #00a0d2;
|
||||
}
|
||||
.amp-toggle .tooltip a:hover,
|
||||
.amp-toggle .tooltip a:focus,
|
||||
.amp-toggle .tooltip a:active {
|
||||
color: #54cbf1;
|
||||
}
|
||||
|
||||
.amp-toggle .tooltip:before {
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
left: 120px;
|
||||
content: "";
|
||||
border: solid;
|
||||
border-color: #191E23 transparent;
|
||||
border-width: 8px 8px 0 8px;
|
||||
}
|
||||
|
||||
.js .accordion-section-title:after {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#customize-footer-actions .collapse-sidebar-label {
|
||||
font-size: 11px;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.devices-wrapper .preview-desktop {
|
||||
border-left: 1px solid #DDDDDD !important;
|
||||
}
|
||||
|
||||
.wp-full-overlay-footer .devices button:before {
|
||||
vertical-align: initial;
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
|
||||
/*
|
||||
* Prevent cases of amp-img converted from img to appear with stretching by using object-fit to scale.
|
||||
* See <https://github.com/ampproject/amphtml/issues/21371#issuecomment-475443219>.
|
||||
* Also use object-fit:contain in worst case scenario when we can't figure out dimensions for an image.
|
||||
*/
|
||||
amp-img.amp-wp-enforced-sizes[layout=intrinsic] > img,
|
||||
.amp-wp-unknown-size > img {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
amp-fit-text blockquote,
|
||||
amp-fit-text h1,
|
||||
amp-fit-text h2,
|
||||
amp-fit-text h3,
|
||||
amp-fit-text h4,
|
||||
amp-fit-text h5,
|
||||
amp-fit-text h6 {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override a style rule in Twenty Sixteen and Twenty Seventeen.
|
||||
* It set display:none for audio elements.
|
||||
* This selector is the same, though it adds body and uses amp-audio instead of audio.
|
||||
*/
|
||||
body amp-audio:not([controls]) {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
.is-amp-fit-text + .blocks-font-size > .components-font-size-picker__buttons,
|
||||
.is-amp-fit-text + .blocks-font-size > .components-font-size-picker__custom-input {
|
||||
display: none;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* For the custom AMP implementation of the 'playlist' shortcode.
|
||||
*/
|
||||
.wp-playlist .wp-playlist-current-item img {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.wp-playlist .wp-playlist-current-item amp-img {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.wp-playlist audio {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wp-playlist .amp-carousel-button {
|
||||
visibility: hidden;
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/**
|
||||
* 1.0 AMP preview.
|
||||
*
|
||||
* Submit box preview buttons.
|
||||
*/
|
||||
|
||||
/* Core preview button */
|
||||
.wp-core-ui #preview-action.has-amp-preview #post-preview {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
float: none;
|
||||
}
|
||||
|
||||
/* AMP preview button */
|
||||
.wp-core-ui #amp-post-preview.preview {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
text-indent: -9999px;
|
||||
padding-right: 14px;
|
||||
padding-left: 14px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wp-core-ui #amp-post-preview.preview::after {
|
||||
content: "icon";
|
||||
background: no-repeat center url( '../images/amp-icon.svg' );
|
||||
background-size: 14px !important;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.wp-core-ui #amp-post-preview.preview.disabled::after {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* AMP status */
|
||||
.misc-amp-status .amp-icon {
|
||||
float: left;
|
||||
background: transparent url( '../images/amp-icon.svg' ) no-repeat left;
|
||||
background-size: 17px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
margin: 0 8px 0 1px;
|
||||
}
|
||||
|
||||
#amp-status-select fieldset {
|
||||
margin: 7px 0 0 1px;
|
||||
}
|
||||
|
||||
#amp-status-select .notice {
|
||||
margin: 10px 0 -5px 3px;
|
||||
}
|
||||
|
||||
.amp-status-actions {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
#amp-status-select {
|
||||
line-height: 280%;
|
||||
}
|
||||
}
|
||||
|
||||
.amp-block-validation-errors {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.amp-block-validation-errors .amp-block-validation-errors__summary {
|
||||
margin: 0.5em 0;
|
||||
padding: 2px;
|
||||
}
|
||||
.amp-block-validation-errors .amp-block-validation-errors__list {
|
||||
padding-left: 2.5em;
|
||||
}
|
@ -0,0 +1,279 @@
|
||||
#col-left {
|
||||
display: none;
|
||||
}
|
||||
#col-right {
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* Move the 'All dates' filter to the right of the new status and type filters */
|
||||
#filter-by-date {
|
||||
float: none;
|
||||
}
|
||||
|
||||
/* Improve column widths */
|
||||
td.column-details pre,
|
||||
td.column-sources pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
th.column-created_date_gmt,
|
||||
th.column-error_type {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
td.column-error .error-code {
|
||||
font-family: Consolas, Monaco, monospace;
|
||||
}
|
||||
|
||||
th.column-status {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.fixed th.column-posts {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
/* Details column */
|
||||
.column-details .details-attributes__summary {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
details[open] .details-attributes__summary {
|
||||
font-weight: 600;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.column-details .details-attributes__summary::-webkit-details-marker,
|
||||
.column-details .notice details > summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
.details-attributes__summary::after,
|
||||
.single-error-detail-summary::after {
|
||||
order: 99;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-image: url("../images/down-triangle.svg");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
content: "";
|
||||
}
|
||||
|
||||
tr.expanded .details-attributes__summary::after,
|
||||
details.single-error-detail[open] .single-error-detail-summary::after {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.notice .detailed {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.notice .detailed details {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.notice .detailed details .detailed {
|
||||
padding-left: 32px;
|
||||
font-family: Consolas, Monaco, monospace;
|
||||
}
|
||||
|
||||
.details-attributes__title code,
|
||||
.notice .detailed summary code {
|
||||
display: inline-block;
|
||||
min-width: 240px;
|
||||
margin-left: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.details-attributes__title code {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.details-attributes__list {
|
||||
margin-top: 0;
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
font-family: Consolas, Monaco, monospace;
|
||||
}
|
||||
|
||||
.details-attributes__list li {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.details-attributes__attr {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.column-sources_with_invalid_output details[open] .details-attributes__summary {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.column-sources_with_invalid_output details > div {
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
/* Error details toggle button */
|
||||
.manage-column.column-sources_with_invalid_output .error-details-toggle {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.error-details-toggle {
|
||||
float: right;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 14px;
|
||||
padding: 0;
|
||||
margin-top: 4px;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.error-details-toggle.is-open {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.column-details .error-details-toggle::before,
|
||||
.column-details .error-details-toggle::after {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-image: url("../images/down-triangle.svg");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* Status text icons */
|
||||
.status-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 0.6rem;
|
||||
}
|
||||
|
||||
.status-text::before {
|
||||
margin-right: 10px;
|
||||
background-size: 20px 20px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
content: "";
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
.status-text.sanitized::before {
|
||||
background-image: url("../images/amp-logo-icon.svg");
|
||||
}
|
||||
|
||||
.status-text.new::before {
|
||||
background-image: url("../images/baseline-error.svg");
|
||||
}
|
||||
.status-text.new.new-accepted::before, .status-text.new.accepted::before{
|
||||
background-image: url("../images/baseline-error-green.svg");
|
||||
}
|
||||
.status-text.new.new-rejected::before, .status-text.new.rejected::before {
|
||||
background-image: url("../images/baseline-error-red.svg");
|
||||
}
|
||||
.status-text.accepted::before {
|
||||
background-image: url("../images/baseline-check-circle-green.svg");
|
||||
}
|
||||
|
||||
.status-text.rejected::before {
|
||||
background-image: url("../images/error-rejected.svg");
|
||||
}
|
||||
.single-error-detail {
|
||||
margin: 5px 0 5px 0;
|
||||
}
|
||||
.single-error-detail-summary:after {
|
||||
display: inline-block;
|
||||
}
|
||||
.single-error-detail-summary strong {
|
||||
margin-right: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.single-error-detail ul.secondary-details-array .details-attributes__attr {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.single-error-detail ul.secondary-details-array .details-attributes__value {
|
||||
margin-left: 30px;
|
||||
}
|
||||
.single-error-detail .details-attributes__value {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
body.taxonomy-amp_validation_error .wp-list-table .new th,
|
||||
body.taxonomy-amp_validation_error .wp-list-table .new td,
|
||||
tr.expanded.new + tr > td:first-of-type,
|
||||
body.post-type-amp_validated_url .wp-list-table .new th,
|
||||
body.post-type-amp_validated_url .wp-list-table .new td {
|
||||
background-color: #fef7f1;
|
||||
}
|
||||
|
||||
body.taxonomy-amp_validation_error .wp-list-table .new th.check-column,
|
||||
tr.expanded.new + tr > td:first-of-type,
|
||||
body.post-type-amp_validated_url .wp-list-table .new th.check-column {
|
||||
border-left: 4px solid #d54e21;
|
||||
}
|
||||
|
||||
body.taxonomy-amp_validation_error .wp-list-table .new th.check-column input {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.row-actions .amp_validation_error_accept > a {
|
||||
color: #006505;
|
||||
}
|
||||
|
||||
.row-actions .amp_validation_error_reject > a {
|
||||
color: #a00;
|
||||
}
|
||||
|
||||
.notice.accept-reject-error {
|
||||
display: flex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.notice.accept-reject-error > p {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
flex-grow: 10;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.notice.accept-reject-error > .button {
|
||||
display: inline-block;
|
||||
margin: 5px 5px 0 5px;
|
||||
padding: 0 26px 2px;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.notice.accept-reject-error > .button.accept {
|
||||
/* @todo Add green colors */
|
||||
}
|
||||
.notice.accept-reject-error > .button.reject {
|
||||
/* @todo Add red colors */
|
||||
}
|
||||
|
||||
.notice.error-details {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.wp-heading-inline .status-text {
|
||||
display: inline-flex;
|
||||
margin-left: 10px;
|
||||
vertical-align: middle;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-heading-inline code {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/** Details post action. */
|
||||
.details button {
|
||||
display: inline-block;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
color: #0073aa;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
/** Arrow icon on title in error column. */
|
||||
.column-error > .single-url-detail-toggle {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 5px 36px 5px 0;
|
||||
background: none;
|
||||
border: none;
|
||||
text-align: left;
|
||||
line-height: 1.682;
|
||||
color: #0073aa;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.column-error > .single-url-detail-toggle::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 12px;
|
||||
height: 18px;
|
||||
margin-top: 5px;
|
||||
background-image: url("../images/down-triangle.svg");
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
content: "";
|
||||
}
|
||||
|
||||
tr.expanded .single-url-detail-toggle::after {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/** Striped table overrides. */
|
||||
table.striped > tbody > tr.odd {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
table.striped > tbody > tr.even {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/** Hide original details content. */
|
||||
.details-attributes > .detailed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/** Details post action. */
|
||||
.details button {
|
||||
display: inline-block;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
color: #0073aa;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/** Details row styles. */
|
||||
.details details.details-attributes:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.details ul.detailed {
|
||||
padding: 0 32px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.details div.detailed {
|
||||
padding-left: 30px;
|
||||
margin-top: 10px;
|
||||
font-family: Consolas, Monaco, monospace;
|
||||
}
|
||||
|
||||
.details .detailed details {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.details .detailed summary code {
|
||||
display: inline-block;
|
||||
min-width: 240px;
|
||||
margin-left: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.column-status select {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.column-status img {
|
||||
width: 1.5rem;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
#number-errors {
|
||||
text-align: center;
|
||||
background-color: #d3d3d3b8;
|
||||
color: #1e8cbecc;
|
||||
}
|
||||
|
||||
#url-post-filter {
|
||||
float: none;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.tablenav.top,
|
||||
.tablenav.bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.amp-validated-url a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.curtime.misc-pub-section {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* Give enough width to prevent the widest column status, 'New Accepted,' from forcing the <select> below the icon. */
|
||||
.wp-list-table th.column-status {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.wp-list-table th.column-sources_with_invalid_output {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.wp-list-table th.column-error {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.wp-list-table th.column-details {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/** Add space between list table and the filter and search box above it. */
|
||||
#post-body-content button.action,
|
||||
#post-body-content #url-post-filter,
|
||||
#post-body-content .search-box {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#post-body-content button.reject {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
#accept-reject-buttons:not(.hidden) {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#vertical-divider {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 15px;
|
||||
margin-right: 15px;
|
||||
height: 30px;
|
||||
border-right: 1px solid #a0a5aa;
|
||||
}
|
||||
.amp-validation-error-status {
|
||||
width: auto;
|
||||
float: none;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
|
||||
/* @todo This should be moved to admin-tables.css which is then enqueued on both screens. */
|
||||
.tooltip-button {
|
||||
margin: 0 6px;
|
||||
cursor: pointer;
|
||||
color: #767676;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="62px" height="62px" viewBox="0 0 62 62" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>AMP-Icon</title>
|
||||
<g id="AMP-Icon" fill="#82878c">
|
||||
<path d="M41.6288667,28.1614333 L28.6243667,49.8035667 L26.2683667,49.8035667 L28.5975,35.7016667 L21.3838,35.7109667 C21.3838,35.7109667 21.3156,35.7130333 21.2835667,35.7130333 C20.6336,35.7130333 20.1076333,35.1870667 20.1076333,34.5371 C20.1076333,34.2581 20.367,33.7858667 20.367,33.7858667 L33.3291333,12.1695667 L35.7244,12.1799 L33.3363667,26.3035 L40.5872667,26.2942 C40.5872667,26.2942 40.6647667,26.2931667 40.7019667,26.2931667 C41.3519333,26.2931667 41.8779,26.8191333 41.8779,27.4691 C41.8779,27.7326 41.7745667,27.9640667 41.6278333,28.1604 L41.6288667,28.1614333 Z M31,0 C13.8787,0 0,13.8797333 0,31 C0,48.1213 13.8787,62 31,62 C48.1202667,62 62,48.1213 62,31 C62,13.8797333 48.1202667,0 31,0 L31,0 Z" id="Fill-1"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1012 B |
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
||||
<g id="AMP-Logo-Icon" fill="#0075C2">
|
||||
<path d="M13.3,9.1l-4,6.6H8.5l0.7-4.3l-2.2,0h0c-0.2,0-0.4-0.2-0.4-0.4c0-0.1,0.1-0.2,0.1-0.2l4-6.6l0.7,0l-0.7,4.3l2.2,0l0,0
|
||||
c0.2,0,0.4,0.2,0.4,0.4C13.4,9,13.3,9.1,13.3,9.1L13.3,9.1z M10,0.5c-5.3,0-9.6,4.3-9.6,9.5c0,5.3,4.3,9.5,9.6,9.5
|
||||
c5.3,0,9.6-4.3,9.6-9.5C19.6,4.7,15.3,0.5,10,0.5z"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 684 B |
@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="908.3604125976562 898.2000122070312 183.05340576171875 200.39996337890625" style="enable-background:new 0 0 2000 2000;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{opacity:0.8;fill:none;stroke:url(#SVGID_1_);stroke-width:9.6838;stroke-miterlimit:10;enable-background:new ;}
|
||||
.st1{opacity:0.8;fill:none;stroke:url(#SVGID_2_);stroke-width:10.1244;stroke-miterlimit:10;enable-background:new ;}
|
||||
.st2{fill:none;stroke:url(#SVGID_3_);stroke-width:2.4095;stroke-miterlimit:10;}
|
||||
.st3{fill:url(#SVGID_4_);}
|
||||
.st4{fill:#FFFFFF;stroke:url(#SVGID_5_);stroke-width:2.4095;stroke-miterlimit:10;}
|
||||
.st5{fill:none;stroke:url(#SVGID_6_);stroke-width:2.4095;stroke-miterlimit:10;}
|
||||
.st6{fill:#0DD7FF;fill-opacity:0.7;}
|
||||
.st7{opacity:0.7;fill:#0DD7FF;enable-background:new ;}
|
||||
.st8{fill:url(#SVGID_7_);fill-opacity:0.75;}
|
||||
.st9{fill:none;stroke:url(#SVGID_8_);stroke-width:2.4095;stroke-linecap:round;stroke-miterlimit:10;}
|
||||
.st10{fill:none;stroke:url(#SVGID_9_);stroke-width:2.4095;stroke-linecap:round;stroke-miterlimit:10;}
|
||||
.st11{fill:#FFFFFF;fill-opacity:0.75;stroke:url(#SVGID_10_);stroke-width:2.4095;stroke-miterlimit:10;}
|
||||
.st12{fill:url(#SVGID_11_);fill-opacity:0.75;}
|
||||
.st13{fill:none;stroke:url(#SVGID_12_);stroke-width:2.4095;stroke-linecap:round;stroke-miterlimit:10;}
|
||||
.st14{fill:none;stroke:url(#SVGID_13_);stroke-width:2.4095;stroke-linecap:round;stroke-miterlimit:10;}
|
||||
.st15{fill:#FFFFFF;}
|
||||
.st16{fill:#167DD2;}
|
||||
.st17{opacity:0.3;fill:#0DD7FF;enable-background:new ;}
|
||||
.st18{opacity:0.5;fill:none;stroke:#FFFFFF;stroke-width:2.4095;stroke-linecap:round;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-12002.9561" y1="893.2319" x2="-11948.1289" y2="893.2319" gradientTransform="matrix(0.3305 -0.9438 -0.9438 -0.3305 5754.7773 -10044.6777)">
|
||||
<stop offset="0" style="stop-color:#0389FF"/>
|
||||
<stop offset="0.5" style="stop-color:#0DD7FF"/>
|
||||
<stop offset="1" style="stop-color:#FFFFFF"/>
|
||||
</linearGradient>
|
||||
<line class="st0" x1="954.3" y1="935.3" x2="953.8" y2="989.9"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-12020.958" y1="879.0432" x2="-11920.0166" y2="879.0432" gradientTransform="matrix(0.3305 -0.9438 -0.9438 -0.3305 5754.7773 -10044.6777)">
|
||||
<stop offset="0" style="stop-color:#0389FF"/>
|
||||
<stop offset="0.5" style="stop-color:#0DD7FF"/>
|
||||
<stop offset="1" style="stop-color:#FFFFFF"/>
|
||||
</linearGradient>
|
||||
<line class="st1" x1="969.7" y1="910.9" x2="968.5" y2="1014"/>
|
||||
<g>
|
||||
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="1008.2053" y1="1053.8057" x2="1008.2053" y2="1103.8019" gradientTransform="matrix(1 0 0 -1 0 2002)">
|
||||
<stop offset="0" style="stop-color:#1C79C4"/>
|
||||
<stop offset="0.51" style="stop-color:#0389FF"/>
|
||||
<stop offset="1" style="stop-color:#0DD7FF"/>
|
||||
</linearGradient>
|
||||
<line class="st2" x1="1008.2" y1="948.2" x2="1008.2" y2="900.8"/>
|
||||
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="1008.2053" y1="1053.8057" x2="1008.2053" y2="1103.8019" gradientTransform="matrix(1 0 0 -1 0 2002)">
|
||||
<stop offset="0" style="stop-color:#1C79C4"/>
|
||||
<stop offset="0.51" style="stop-color:#0389FF"/>
|
||||
<stop offset="1" style="stop-color:#0DD7FF"/>
|
||||
</linearGradient>
|
||||
<polygon class="st3" points="1018.1,908.8 1016.3,910.4 1008.2,901.7 1000.1,910.4 998.4,908.8 1008.2,898.2 "/>
|
||||
</g>
|
||||
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="941.6317" y1="1014.0682" x2="1040.9495" y2="1014.0682">
|
||||
<stop offset="0" style="stop-color:#187CCE"/>
|
||||
<stop offset="1" style="stop-color:#0DD5FE"/>
|
||||
</linearGradient>
|
||||
<polygon class="st4" points="942.8,1098.6 1039.7,1045.5 1039.7,929.6 942.8,982.7 "/>
|
||||
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="943.079" y1="1027.4312" x2="1041.1453" y2="1027.4312" gradientTransform="matrix(1 0 0 -1 0 2002)">
|
||||
<stop offset="0" style="stop-color:#1C79C4"/>
|
||||
<stop offset="0.51" style="stop-color:#0389FF"/>
|
||||
<stop offset="1" style="stop-color:#0DD7FF"/>
|
||||
</linearGradient>
|
||||
<line class="st5" x1="1040.6" y1="948" x2="943.7" y2="1001.1"/>
|
||||
<ellipse transform="matrix(0.1104 -0.9939 0.9939 0.1104 -124.5549 1829.4717)" class="st6" cx="959.7" cy="984.3" rx="2.8" ry="2.8"/>
|
||||
<ellipse transform="matrix(0.1094 -0.994 0.994 0.1094 -133.3753 1826.4724)" class="st6" cx="952.6" cy="987.7" rx="2.8" ry="2.8"/>
|
||||
<ellipse transform="matrix(0.1094 -0.994 0.994 0.1094 -111.5842 1834.7726)" class="st6" cx="968.1" cy="979.7" rx="2.8" ry="2.8"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 23.327 1872.063)" class="st7" cx="1064.6" cy="922.9" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 -144.5006 1781.6594)" class="st7" cx="929.9" cy="972.1" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 -261.0735 1874.2338)" class="st7" cx="923.7" cy="1084" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 -116.1821 1770.166)" class="st7" cx="937.6" cy="950.4" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 -177.6883 1787.7156)" class="st7" cx="916.7" cy="993.8" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 2.8353 1930.9661)" class="st7" cx="1087.5" cy="963.9" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 14.4208 1901.3986)" class="st7" cx="1076.7" cy="942.6" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 -255.1249 1856.6938)" class="st7" cx="916.8" cy="1071.8" rx="3.4" ry="3.5"/>
|
||||
<ellipse transform="matrix(0.1172 -0.9931 0.9931 0.1172 -141.707 1747.8772)" class="st7" cx="912.3" cy="953.6" rx="3.4" ry="3.5"/>
|
||||
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="988.4651" y1="1030.0048" x2="988.4651" y2="980.6591">
|
||||
<stop offset="0" style="stop-color:#187CCE"/>
|
||||
<stop offset="0" style="stop-color:#187FD0"/>
|
||||
<stop offset="1" style="stop-color:#0DD5FE"/>
|
||||
</linearGradient>
|
||||
<polygon class="st8" points="972.5,1030 1004.4,1013.6 1004.4,980.7 972.5,997 "/>
|
||||
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="976.1646" y1="969.6558" x2="1000.2975" y2="969.6558" gradientTransform="matrix(1 0 0 -1 0 2002)">
|
||||
<stop offset="0" style="stop-color:#1C79C4"/>
|
||||
<stop offset="0.51" style="stop-color:#0389FF"/>
|
||||
<stop offset="1" style="stop-color:#0DD7FF"/>
|
||||
</linearGradient>
|
||||
<line class="st9" x1="977.4" y1="1038.1" x2="999.1" y2="1026.6"/>
|
||||
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="976.1646" y1="961.2227" x2="1000.2975" y2="961.2227" gradientTransform="matrix(1 0 0 -1 0 2002)">
|
||||
<stop offset="0" style="stop-color:#1C79C4"/>
|
||||
<stop offset="0.51" style="stop-color:#0389FF"/>
|
||||
<stop offset="1" style="stop-color:#0DD7FF"/>
|
||||
</linearGradient>
|
||||
<line class="st10" x1="977.4" y1="1046.5" x2="999.1" y2="1035"/>
|
||||
<g>
|
||||
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="1016.4717" y1="1038.5374" x2="1063.432" y2="1038.5374">
|
||||
<stop offset="0" style="stop-color:#187CCE"/>
|
||||
<stop offset="1" style="stop-color:#0DD5FE"/>
|
||||
</linearGradient>
|
||||
<polygon class="st11" points="1062.2,981.4 1017.7,1004.3 1017.7,1095.7 1062.2,1072.8 "/>
|
||||
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="1039.6508" y1="1046.2155" x2="1039.6508" y2="996.8698">
|
||||
<stop offset="0" style="stop-color:#187CCE"/>
|
||||
<stop offset="0" style="stop-color:#187FD0"/>
|
||||
<stop offset="1" style="stop-color:#0DD5FE"/>
|
||||
</linearGradient>
|
||||
<polygon class="st12" points="1023.7,1046.2 1055.6,1029.9 1055.6,996.9 1023.7,1013.2 "/>
|
||||
|
||||
<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="1023.5676" y1="954.687" x2="1056.0122" y2="954.687" gradientTransform="matrix(1 0 0 -1 0 2002)">
|
||||
<stop offset="0" style="stop-color:#1C79C4"/>
|
||||
<stop offset="0.51" style="stop-color:#0389FF"/>
|
||||
<stop offset="1" style="stop-color:#0DD7FF"/>
|
||||
</linearGradient>
|
||||
<line class="st13" x1="1024.8" y1="1055.3" x2="1054.8" y2="1039.4"/>
|
||||
|
||||
<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="1023.5676" y1="945.752" x2="1056.0122" y2="945.752" gradientTransform="matrix(1 0 0 -1 0 2002)">
|
||||
<stop offset="0" style="stop-color:#1C79C4"/>
|
||||
<stop offset="0.51" style="stop-color:#0389FF"/>
|
||||
<stop offset="1" style="stop-color:#0DD7FF"/>
|
||||
</linearGradient>
|
||||
<line class="st14" x1="1024.8" y1="1064.2" x2="1054.8" y2="1048.3"/>
|
||||
<path class="st15" d="M1043.8,1018.9l-5,11.6l-0.9,0.3l0.9-6.7l-2.8,0.9l0,0c-0.2,0.1-0.5-0.1-0.5-0.4c0-0.1,0.1-0.4,0.1-0.4
|
||||
l5-11.6l0.9-0.3l-0.9,6.8l2.8-0.9l0,0c0.3-0.1,0.5,0.1,0.5,0.4C1043.8,1018.6,1043.8,1018.8,1043.8,1018.9L1043.8,1018.9z"/>
|
||||
</g>
|
||||
<polygon class="st16" points="968.6,1083 943.7,1097.1 943.7,1002.4 968.6,989 "/>
|
||||
<polygon class="st17" points="1013.1,975.4 1032.9,964.4 1032.9,973.6 1013.6,984.7 "/>
|
||||
<polygon class="st17" points="1013.1,988.5 1032.9,977.4 1032.9,982.8 1013.6,993.7 "/>
|
||||
<path class="st15" d="M956.2,1000c-4.7,2.2-8.6,8.1-8.6,13.1c0,5,3.9,7.4,8.6,5.2c4.7-2.2,8.6-8.1,8.6-13.1
|
||||
C964.8,1000.2,960.9,997.8,956.2,1000z M948.4,1012.7c0-1.2,0.2-2.4,0.7-3.7l3.7,9.1C950.2,1018,948.4,1016,948.4,1012.7z
|
||||
M956.2,1017.4c-0.8,0.3-1.5,0.6-2.2,0.7l2.3-8.2l2.4,5.8c0,0,0,0.1,0.1,0.1C958,1016.4,957.1,1017,956.2,1017.4z M957.2,1004.8
|
||||
c0.5-0.2,0.9-0.5,0.9-0.5c0.4-0.2,0.4-0.9-0.1-0.7c0,0-1.3,0.7-2.1,1.1c-0.8,0.3-2,0.8-2,0.8c-0.4,0.2-0.5,0.9,0,0.7
|
||||
c0,0,0.4-0.1,0.8-0.3l1.2,3l-1.7,6.2l-2.8-7.6c0.5-0.2,0.9-0.5,0.9-0.5c0.4-0.2,0.4-0.9-0.1-0.7c0,0-1.3,0.7-2.1,1.1
|
||||
c-0.1,0.1-0.3,0.1-0.5,0.2c1.4-2.9,3.8-5.4,6.5-6.7c2-0.9,3.9-1,5.2-0.2c0,0-0.1,0-0.1,0c-0.8,0.3-1.3,1.3-1.3,2.1
|
||||
c0,0.7,0.4,1.1,0.8,1.6c0.3,0.4,0.6,1,0.6,2c0,0.7-0.3,1.6-0.6,2.9l-0.8,3.1L957.2,1004.8z M963,1002.1c0.6,0.9,1,2.1,1,3.5
|
||||
c0,3-1.5,6.4-3.8,8.9l2.3-8.4c0.4-1.4,0.6-2.4,0.6-3.2C963,1002.6,963,1002.3,963,1002.1z"/>
|
||||
<path class="st18" d="M970.6,1021.2"/>
|
||||
<line class="st18" x1="948.6" y1="1028.4" x2="963.6" y2="1020.5"/>
|
||||
<line class="st18" x1="948.6" y1="1036.3" x2="963.6" y2="1028.4"/>
|
||||
<line class="st18" x1="948.6" y1="1044.3" x2="963.6" y2="1036.3"/>
|
||||
</svg>
|
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="62px" height="62px" viewBox="0 0 62 62" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>AMP-White-Icon</title>
|
||||
<g id="amp-logo-internal-site" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="AMP-Brand-White-Icon" fill="#FFFFFF">
|
||||
<path d="M41.6288667,28.1614333 L28.6243667,49.8035667 L26.2683667,49.8035667 L28.5975,35.7016667 L21.3838,35.7109667 C21.3838,35.7109667 21.3156,35.7130333 21.2835667,35.7130333 C20.6336,35.7130333 20.1076333,35.1870667 20.1076333,34.5371 C20.1076333,34.2581 20.367,33.7858667 20.367,33.7858667 L33.3291333,12.1695667 L35.7244,12.1799 L33.3363667,26.3035 L40.5872667,26.2942 C40.5872667,26.2942 40.6647667,26.2931667 40.7019667,26.2931667 C41.3519333,26.2931667 41.8779,26.8191333 41.8779,27.4691 C41.8779,27.7326 41.7745667,27.9640667 41.6278333,28.1604 L41.6288667,28.1614333 Z M31,0 C13.8787,0 0,13.8797333 0,31 C0,48.1213 13.8787,62 31,62 C48.1202667,62 62,48.1213 62,31 C62,13.8797333 48.1202667,0 31,0 L31,0 Z" id="Fill-1"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="#85b649" />
|
||||
</svg>
|
After Width: | Height: | Size: 283 B |
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;}
|
||||
</style>
|
||||
<path class="st0" d="M0,0h20v20H0V0z"/>
|
||||
<g id="AMP-Warning" fill="#84b741">
|
||||
<path d="M10,1c-5,0-9,4.1-9,9s4.1,9,9,9s9-4.1,9-9S15,1,10,1z M10.9,14.6H9.1v-1.8H11v1.8H10.9z M10.9,10.9H9.1V5.4H11v5.4H10.9z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 615 B |
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;}
|
||||
</style>
|
||||
<path class="st0" d="M0,0h20v20H0V0z"/>
|
||||
<g id="AMP-Warning" fill="#FF0000">
|
||||
<path d="M10,1c-5,0-9,4.1-9,9s4.1,9,9,9s9-4.1,9-9S15,1,10,1z M10.9,14.6H9.1v-1.8H11v1.8H10.9z M10.9,10.9H9.1V5.4H11v5.4H10.9z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 615 B |
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;}
|
||||
</style>
|
||||
<path class="st0" d="M0,0h20v20H0V0z"/>
|
||||
<g id="AMP-Warning" fill="#E38000">
|
||||
<path d="M10,1c-5,0-9,4.1-9,9s4.1,9,9,9s9-4.1,9-9S15,1,10,1z M10.9,14.6H9.1v-1.8H11v1.8H10.9z M10.9,10.9H9.1V5.4H11v5.4H10.9z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 615 B |
@ -0,0 +1,3 @@
|
||||
<svg height="1024" width="767.5" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 384l383.75 383.75L767.5 384H0z" fill="#0073aa" />
|
||||
</svg>
|
After Width: | Height: | Size: 140 B |
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g fill="#FF0E57"><path d="M17 10c0-3.87-3.14-7-7-7-3.87 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7zm-6.3 1.48H9.14v-.43c0-.38.08-.7.24-.98s.46-.57.88-.89c.41-.29.68-.53.81-.71.14-.18.2-.39.2-.62 0-.25-.09-.44-.28-.58-.19-.13-.45-.19-.79-.19-.58 0-1.25.19-2 .57l-.64-1.28c.87-.49 1.8-.74 2.77-.74.81 0 1.45.2 1.92.58.48.39.71.91.71 1.55 0 .43-.09.8-.29 1.11-.19.32-.57.67-1.11 1.06-.38.28-.61.49-.71.63-.1.15-.15.34-.15.57v.35zm-1.47 2.74c-.18-.17-.27-.42-.27-.73 0-.33.08-.58.26-.75s.43-.25.77-.25c.32 0 .57.09.75.26s.27.42.27.74c0 .3-.09.55-.27.72-.18.18-.43.27-.75.27-.33 0-.58-.09-.76-.26z"/></g></svg>
|
After Width: | Height: | Size: 713 B |
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g fill="#FF0000"><path d="M12.12 10l3.53 3.53-2.12 2.12L10 12.12l-3.54 3.54-2.12-2.12L7.88 10 4.34 6.46l2.12-2.12L10 7.88l3.54-3.53 2.12 2.12z"/></g></svg>
|
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 243 B |
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Adds an admin pointer that describes new features in 1.0.
|
||||
*/
|
||||
|
||||
/* exported ampAdminPointer */
|
||||
/* global ajaxurl, jQuery */
|
||||
var ampAdminPointer = ( function( $ ) { // eslint-disable-line no-unused-vars
|
||||
'use strict';
|
||||
|
||||
return {
|
||||
|
||||
/**
|
||||
* Loads the pointer.
|
||||
*
|
||||
* @param {Object} data - Module data.
|
||||
* @return {void}
|
||||
*/
|
||||
load: function load( data ) {
|
||||
var options = $.extend(
|
||||
data.pointer.options,
|
||||
{
|
||||
/**
|
||||
* Makes a POST request to store the pointer ID as dismissed for this user.
|
||||
*/
|
||||
close: function() {
|
||||
$.post( ajaxurl, {
|
||||
pointer: data.pointer.pointer_id,
|
||||
action: 'dismiss-wp-pointer'
|
||||
} );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$( data.pointer.target ).pointer( options ).pointer( 'open' );
|
||||
}
|
||||
};
|
||||
}( jQuery ) );
|
@ -0,0 +1,534 @@
|
||||
/**
|
||||
* Validates blocks for AMP compatibility.
|
||||
*
|
||||
* This uses the REST API response from saving a page to find validation errors.
|
||||
* If one exists for a block, it display it inline with a Notice component.
|
||||
*/
|
||||
|
||||
/* exported ampBlockValidation */
|
||||
/* global wp, _ */
|
||||
var ampBlockValidation = ( function() { // eslint-disable-line no-unused-vars
|
||||
'use strict';
|
||||
|
||||
var module = {
|
||||
|
||||
/**
|
||||
* Data exported from server.
|
||||
*
|
||||
* @param {Object}
|
||||
*/
|
||||
data: {
|
||||
i18n: {},
|
||||
ampValidityRestField: '',
|
||||
isSanitizationAutoAccepted: false
|
||||
},
|
||||
|
||||
/**
|
||||
* Name of the store.
|
||||
*
|
||||
* @param {string}
|
||||
*/
|
||||
storeName: 'amp/blockValidation',
|
||||
|
||||
/**
|
||||
* Holds the last states which are used for comparisons.
|
||||
*
|
||||
* @param {Object}
|
||||
*/
|
||||
lastStates: {
|
||||
noticesAreReset: false,
|
||||
validationErrors: [],
|
||||
blockOrder: [],
|
||||
blockValidationErrors: {}
|
||||
},
|
||||
|
||||
/**
|
||||
* Boot module.
|
||||
*
|
||||
* @param {Object} data - Module data.
|
||||
* @return {void}
|
||||
*/
|
||||
boot: function boot( data ) {
|
||||
module.data = data;
|
||||
|
||||
wp.i18n.setLocaleData( module.data.i18n, 'amp' );
|
||||
|
||||
wp.hooks.addFilter(
|
||||
'editor.BlockEdit',
|
||||
'amp/add-notice',
|
||||
module.conditionallyAddNotice,
|
||||
99 // eslint-disable-line
|
||||
);
|
||||
|
||||
module.store = module.registerStore();
|
||||
|
||||
wp.data.subscribe( module.handleValidationErrorsStateChange );
|
||||
},
|
||||
|
||||
/**
|
||||
* Register store.
|
||||
*
|
||||
* @return {Object} Store.
|
||||
*/
|
||||
registerStore: function registerStore() {
|
||||
return wp.data.registerStore( module.storeName, {
|
||||
reducer: function( _state, action ) {
|
||||
var state = _state || {
|
||||
blockValidationErrorsByClientId: {}
|
||||
};
|
||||
|
||||
switch ( action.type ) {
|
||||
case 'UPDATE_BLOCKS_VALIDATION_ERRORS':
|
||||
return _.extend( {}, state, {
|
||||
blockValidationErrorsByClientId: action.blockValidationErrorsByClientId
|
||||
} );
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
updateBlocksValidationErrors: function( blockValidationErrorsByClientId ) {
|
||||
return {
|
||||
type: 'UPDATE_BLOCKS_VALIDATION_ERRORS',
|
||||
blockValidationErrorsByClientId: blockValidationErrorsByClientId
|
||||
};
|
||||
}
|
||||
},
|
||||
selectors: {
|
||||
getBlockValidationErrors: function( state, clientId ) {
|
||||
return state.blockValidationErrorsByClientId[ clientId ] || [];
|
||||
}
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if AMP is enabled for this post.
|
||||
*
|
||||
* @return {boolean} Returns true when the AMP toggle is on; else, false is returned.
|
||||
*/
|
||||
isAMPEnabled: function isAMPEnabled() {
|
||||
var meta = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'meta' );
|
||||
if ( meta && meta.amp_status && window.wpAmpEditor.possibleStati.includes( meta.amp_status ) ) {
|
||||
return 'enabled' === meta.amp_status;
|
||||
}
|
||||
return window.wpAmpEditor.defaultStatus;
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if the validate errors state change handler should wait before processing.
|
||||
*
|
||||
* @return {boolean} Whether should wait.
|
||||
*/
|
||||
waitToHandleStateChange: function waitToHandleStateChange() {
|
||||
var currentPost;
|
||||
|
||||
// @todo Gutenberg currently is not persisting isDirty state if changes are made during save request. Block order mismatch.
|
||||
// We can only align block validation errors with blocks in editor when in saved state, since only here will the blocks be aligned with the validation errors.
|
||||
if ( wp.data.select( 'core/editor' ).isEditedPostDirty() || ( ! wp.data.select( 'core/editor' ).isEditedPostDirty() && wp.data.select( 'core/editor' ).isEditedPostNew() ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Wait for the current post to be set up.
|
||||
currentPost = wp.data.select( 'core/editor' ).getCurrentPost();
|
||||
if ( ! currentPost.hasOwnProperty( 'id' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle state change regarding validation errors.
|
||||
*
|
||||
* This is essentially a JS implementation of \AMP_Validation_Manager::print_edit_form_validation_status() in PHP.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
handleValidationErrorsStateChange: function handleValidationErrorsStateChange() {
|
||||
var currentPost, validationErrors, blockValidationErrors, noticeOptions, noticeMessage, blockErrorCount, ampValidity, rejectedErrors;
|
||||
|
||||
if ( ! module.isAMPEnabled() ) {
|
||||
if ( ! module.lastStates.noticesAreReset ) {
|
||||
module.lastStates.validationErrors = [];
|
||||
module.lastStates.noticesAreReset = true;
|
||||
module.resetWarningNotice();
|
||||
module.resetBlockNotices();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ( module.waitToHandleStateChange() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentPost = wp.data.select( 'core/editor' ).getCurrentPost();
|
||||
ampValidity = currentPost[ module.data.ampValidityRestField ] || {};
|
||||
|
||||
// Show all validation errors which have not been explicitly acknowledged as accepted.
|
||||
validationErrors = _.map(
|
||||
_.filter( ampValidity.results, function( result ) {
|
||||
// @todo Show VALIDATION_ERROR_ACK_REJECTED_STATUS differently since moderated?
|
||||
return (
|
||||
0 /* \AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_NEW_REJECTED_STATUS */ === result.status ||
|
||||
1 /* \AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_NEW_ACCEPTED_STATUS */ === result.status ||
|
||||
2 /* \AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACK_REJECTED_STATUS */ === result.status // eslint-disable-line no-magic-numbers
|
||||
);
|
||||
} ),
|
||||
function( result ) {
|
||||
return result.error;
|
||||
}
|
||||
);
|
||||
|
||||
// Short-circuit if there was no change to the validation errors.
|
||||
if ( ! module.didValidationErrorsChange( validationErrors ) ) {
|
||||
if ( ! validationErrors.length && ! module.lastStates.noticesAreReset ) {
|
||||
module.lastStates.noticesAreReset = true;
|
||||
module.resetWarningNotice();
|
||||
}
|
||||
return;
|
||||
}
|
||||
module.lastStates.validationErrors = validationErrors;
|
||||
module.lastStates.noticesAreReset = false;
|
||||
|
||||
// Remove any existing notice.
|
||||
module.resetWarningNotice();
|
||||
|
||||
noticeMessage = wp.i18n.sprintf(
|
||||
/* translators: %s: number of issues */
|
||||
wp.i18n._n(
|
||||
'There is %s issue from AMP validation which needs review.',
|
||||
'There are %s issues from AMP validation which need review.',
|
||||
validationErrors.length,
|
||||
'amp'
|
||||
),
|
||||
validationErrors.length
|
||||
);
|
||||
|
||||
try {
|
||||
blockValidationErrors = module.getBlocksValidationErrors();
|
||||
module.lastStates.blockValidationErrors = blockValidationErrors.byClientId;
|
||||
wp.data.dispatch( module.storeName ).updateBlocksValidationErrors( blockValidationErrors.byClientId );
|
||||
|
||||
blockErrorCount = validationErrors.length - blockValidationErrors.other.length;
|
||||
if ( blockErrorCount > 0 ) {
|
||||
noticeMessage += ' ' + wp.i18n.sprintf(
|
||||
/* translators: %s: number of block errors. */
|
||||
wp.i18n._n(
|
||||
'%s issue is directly due to content here.',
|
||||
'%s issues are directly due to content here.',
|
||||
blockErrorCount,
|
||||
'amp'
|
||||
),
|
||||
blockErrorCount
|
||||
);
|
||||
} else if ( validationErrors.length === 1 ) {
|
||||
noticeMessage += ' ' + wp.i18n.__( 'The issue is not directly due to content here.', 'amp' );
|
||||
} else {
|
||||
noticeMessage += ' ' + wp.i18n.__( 'The issues are not directly due to content here.', 'amp' );
|
||||
}
|
||||
} catch ( e ) {
|
||||
// Clear out block validation errors in case the block sand errors cannot be aligned.
|
||||
module.resetBlockNotices();
|
||||
|
||||
if ( validationErrors.length === 1 ) {
|
||||
noticeMessage += ' ' + wp.i18n.__( 'The issue may not be due to content here', 'amp' );
|
||||
} else {
|
||||
noticeMessage += ' ' + wp.i18n.__( 'Some issues may be due to content here.', 'amp' );
|
||||
}
|
||||
}
|
||||
|
||||
rejectedErrors = _.filter( ampValidity.results, function( result ) {
|
||||
return (
|
||||
0 /* \AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_NEW_REJECTED_STATUS */ === result.status ||
|
||||
2 /* \AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACK_REJECTED_STATUS */ === result.status // eslint-disable-line no-magic-numbers
|
||||
);
|
||||
} );
|
||||
|
||||
noticeMessage += ' ';
|
||||
// Auto-acceptance is from either checking 'Automatically accept sanitization...' or from being in Native mode.
|
||||
if ( module.data.isSanitizationAutoAccepted ) {
|
||||
if ( 0 === rejectedErrors.length ) {
|
||||
noticeMessage += wp.i18n.__( 'However, your site is configured to automatically accept sanitization of the offending markup.', 'amp' );
|
||||
} else {
|
||||
noticeMessage += wp.i18n._n(
|
||||
'Your site is configured to automatically accept sanitization errors, but this error could be from when auto-acceptance was not selected, or from manually rejecting an error.',
|
||||
'Your site is configured to automatically accept sanitization errors, but these errors could be from when auto-acceptance was not selected, or from manually rejecting an error.',
|
||||
validationErrors.length,
|
||||
'amp'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
noticeMessage += wp.i18n.__( 'Non-accepted validation errors prevent AMP from being served, and the user will be redirected to the non-AMP version.', 'amp' );
|
||||
}
|
||||
|
||||
noticeOptions = {
|
||||
id: 'amp-errors-notice'
|
||||
};
|
||||
if ( ampValidity.review_link ) {
|
||||
noticeOptions.actions = [
|
||||
{
|
||||
label: wp.i18n.__( 'Review issues', 'amp' ),
|
||||
url: ampValidity.review_link
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// Display notice if there were validation errors.
|
||||
if ( validationErrors.length > 0 ) {
|
||||
wp.data.dispatch( 'core/notices' ).createNotice( 'warning', noticeMessage, noticeOptions );
|
||||
}
|
||||
|
||||
module.validationWarningNoticeId = noticeOptions.id;
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if the validation errors have changed.
|
||||
*
|
||||
* @param {Object[]} validationErrors A list of validation errors.
|
||||
* @return {boolean|*} Returns true when the validation errors change.
|
||||
*/
|
||||
didValidationErrorsChange: function didValidationErrorsChange( validationErrors ) {
|
||||
if ( module.areBlocksOutOfSync() ) {
|
||||
module.lastStates.validationErrors = [];
|
||||
}
|
||||
|
||||
return (
|
||||
module.lastStates.validationErrors.length !== validationErrors.length ||
|
||||
( validationErrors && ! _.isEqual( module.lastStates.validationErrors, validationErrors ) )
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks if the block order is out of sync.
|
||||
*
|
||||
* Block change on page load and can get out of sync during normal editing and saving processes. This method gives a check to determine if an "out of sync" condition occurred.
|
||||
*
|
||||
* @return {boolean} Whether out of sync.
|
||||
*/
|
||||
areBlocksOutOfSync: function areBlocksOutOfSync() {
|
||||
var blockOrder = wp.data.select( 'core/editor' ).getBlockOrder();
|
||||
if ( module.lastStates.blockOrder.length !== blockOrder.length || ! _.isEqual( module.lastStates.blockOrder, blockOrder ) ) {
|
||||
module.lastStates.blockOrder = blockOrder;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the validation warning notice.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
resetWarningNotice: function resetWarningNotice() {
|
||||
if ( module.validationWarningNoticeId ) {
|
||||
wp.data.dispatch( 'core/notices' ).removeNotice( module.validationWarningNoticeId );
|
||||
module.validationWarningNoticeId = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the block level validation errors.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
resetBlockNotices: function resetBlockNotices() {
|
||||
wp.data.dispatch( module.storeName ).updateBlocksValidationErrors( {} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Get flattened block order.
|
||||
*
|
||||
* @param {Object[]} blocks - List of blocks which maty have nested blocks inside them.
|
||||
* @return {string[]} Block IDs in flattened order.
|
||||
*/
|
||||
getFlattenedBlockOrder: function getFlattenedBlockOrder( blocks ) {
|
||||
var blockOrder = [];
|
||||
_.each( blocks, function( block ) {
|
||||
blockOrder.push( block.clientId );
|
||||
if ( block.innerBlocks.length > 0 ) {
|
||||
Array.prototype.push.apply( blockOrder, module.getFlattenedBlockOrder( block.innerBlocks ) );
|
||||
}
|
||||
} );
|
||||
return blockOrder;
|
||||
},
|
||||
|
||||
/**
|
||||
* Update blocks' validation errors in the store.
|
||||
*
|
||||
* @return {Object} Validation errors grouped by block ID other ones.
|
||||
*/
|
||||
getBlocksValidationErrors: function getBlocksValidationErrors() {
|
||||
var acceptedStatus, blockValidationErrorsByClientId, editorSelect, currentPost, blockOrder, validationErrors, otherValidationErrors;
|
||||
acceptedStatus = 3; // eslint-disable-line no-magic-numbers
|
||||
editorSelect = wp.data.select( 'core/editor' );
|
||||
currentPost = editorSelect.getCurrentPost();
|
||||
validationErrors = _.map(
|
||||
_.filter( currentPost[ module.data.ampValidityRestField ].results, function( result ) {
|
||||
return result.term_status !== acceptedStatus; // If not accepted by the user.
|
||||
} ),
|
||||
function( result ) {
|
||||
return result.error;
|
||||
}
|
||||
);
|
||||
blockOrder = module.getFlattenedBlockOrder( editorSelect.getBlocks() );
|
||||
|
||||
otherValidationErrors = [];
|
||||
blockValidationErrorsByClientId = {};
|
||||
_.each( blockOrder, function( clientId ) {
|
||||
blockValidationErrorsByClientId[ clientId ] = [];
|
||||
} );
|
||||
|
||||
_.each( validationErrors, function( validationError ) {
|
||||
var i, source, clientId, block, matched;
|
||||
if ( ! validationError.sources ) {
|
||||
otherValidationErrors.push( validationError );
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the inner-most nested block source only; ignore any nested blocks.
|
||||
matched = false;
|
||||
for ( i = validationError.sources.length - 1; 0 <= i; i-- ) {
|
||||
source = validationError.sources[ i ];
|
||||
|
||||
// Skip sources that are not for blocks.
|
||||
if ( ! source.block_name || _.isUndefined( source.block_content_index ) || currentPost.id !== source.post_id ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Look up the block ID by index, assuming the blocks of content in the editor are the same as blocks rendered on frontend.
|
||||
clientId = blockOrder[ source.block_content_index ];
|
||||
if ( _.isUndefined( clientId ) ) {
|
||||
throw new Error( 'undefined_block_index' );
|
||||
}
|
||||
|
||||
// Sanity check that block exists for clientId.
|
||||
block = editorSelect.getBlock( clientId );
|
||||
if ( ! block ) {
|
||||
throw new Error( 'block_lookup_failure' );
|
||||
}
|
||||
|
||||
// Check the block type in case a block is dynamically added/removed via the_content filter to cause alignment error.
|
||||
if ( block.name !== source.block_name ) {
|
||||
throw new Error( 'ordered_block_alignment_mismatch' );
|
||||
}
|
||||
|
||||
blockValidationErrorsByClientId[ clientId ].push( validationError );
|
||||
matched = true;
|
||||
|
||||
// Stop looking for sources, since we aren't looking for parent blocks.
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! matched ) {
|
||||
otherValidationErrors.push( validationError );
|
||||
}
|
||||
} );
|
||||
|
||||
return {
|
||||
byClientId: blockValidationErrorsByClientId,
|
||||
other: otherValidationErrors
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Get message for validation error.
|
||||
*
|
||||
* @param {Object} validationError - Validation error.
|
||||
* @param {string} validationError.code - Validation error code.
|
||||
* @param {string} [validationError.node_name] - Node name.
|
||||
* @param {string} [validationError.message] - Validation error message.
|
||||
* @return {wp.element.Component[]|string[]} Validation error message.
|
||||
*/
|
||||
getValidationErrorMessage: function getValidationErrorMessage( validationError ) {
|
||||
if ( validationError.message ) {
|
||||
return validationError.message;
|
||||
}
|
||||
if ( 'invalid_element' === validationError.code && validationError.node_name ) {
|
||||
return [
|
||||
wp.i18n.__( 'Invalid element: ' ),
|
||||
wp.element.createElement( 'code', { key: 'name' }, validationError.node_name )
|
||||
];
|
||||
} else if ( 'invalid_attribute' === validationError.code && validationError.node_name ) {
|
||||
return [
|
||||
wp.i18n.__( 'Invalid attribute: ' ),
|
||||
wp.element.createElement( 'code', { key: 'name' }, validationError.parent_name ? wp.i18n.sprintf( '%s[%s]', validationError.parent_name, validationError.node_name ) : validationError.node_name )
|
||||
];
|
||||
}
|
||||
return [
|
||||
wp.i18n.__( 'Error code: ', 'amp' ),
|
||||
wp.element.createElement( 'code', { key: 'name' }, validationError.code || wp.i18n.__( 'unknown' ) )
|
||||
];
|
||||
},
|
||||
|
||||
/**
|
||||
* Wraps the edit() method of a block, and conditionally adds a Notice.
|
||||
*
|
||||
* @param {Function} BlockEdit - The original edit() method of the block.
|
||||
* @return {Function} The edit() method, conditionally wrapped in a notice for AMP validation error(s).
|
||||
*/
|
||||
conditionallyAddNotice: function conditionallyAddNotice( BlockEdit ) {
|
||||
return function( ownProps ) {
|
||||
var validationErrors,
|
||||
mergedProps;
|
||||
function AmpNoticeBlockEdit( props ) {
|
||||
var edit, details;
|
||||
edit = wp.element.createElement(
|
||||
BlockEdit,
|
||||
props
|
||||
);
|
||||
|
||||
if ( 0 === props.ampBlockValidationErrors.length ) {
|
||||
return edit;
|
||||
}
|
||||
|
||||
details = wp.element.createElement( 'details', { className: 'amp-block-validation-errors' }, [
|
||||
wp.element.createElement( 'summary', { key: 'summary', className: 'amp-block-validation-errors__summary' }, wp.i18n.sprintf(
|
||||
wp.i18n._n(
|
||||
'There is %s issue from AMP validation.',
|
||||
'There are %s issues from AMP validation.',
|
||||
props.ampBlockValidationErrors.length,
|
||||
'amp'
|
||||
),
|
||||
props.ampBlockValidationErrors.length
|
||||
) ),
|
||||
wp.element.createElement(
|
||||
'ul',
|
||||
{ key: 'list', className: 'amp-block-validation-errors__list' },
|
||||
_.map( props.ampBlockValidationErrors, function( error, key ) {
|
||||
return wp.element.createElement( 'li', { key: key }, module.getValidationErrorMessage( error ) );
|
||||
} )
|
||||
)
|
||||
] );
|
||||
|
||||
return wp.element.createElement(
|
||||
wp.element.Fragment, {},
|
||||
wp.element.createElement(
|
||||
wp.components.Notice,
|
||||
{
|
||||
status: 'warning',
|
||||
isDismissible: false
|
||||
},
|
||||
details
|
||||
),
|
||||
edit
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! module.lastStates.blockValidationErrors[ ownProps.clientId ] ) {
|
||||
validationErrors = wp.data.select( module.storeName ).getBlockValidationErrors( ownProps.clientId );
|
||||
module.lastStates.blockValidationErrors[ ownProps.clientId ] = validationErrors;
|
||||
}
|
||||
|
||||
mergedProps = _.extend( {}, ownProps, {
|
||||
ampBlockValidationErrors: module.lastStates.blockValidationErrors[ ownProps.clientId ]
|
||||
} );
|
||||
|
||||
return AmpNoticeBlockEdit( mergedProps );
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return module;
|
||||
}() );
|
@ -0,0 +1,350 @@
|
||||
/* exported ampCustomizeControls */
|
||||
/* eslint no-magic-numbers: [ "error", { "ignore": [ 0, 1, 250] } ] */
|
||||
|
||||
var ampCustomizeControls = ( function( api, $ ) { // eslint-disable-line no-unused-vars
|
||||
'use strict';
|
||||
|
||||
var component = {
|
||||
data: {
|
||||
queryVar: 'amp',
|
||||
panelId: '',
|
||||
ampUrl: '',
|
||||
l10n: {
|
||||
unavailableMessage: '',
|
||||
unavailableLinkText: ''
|
||||
}
|
||||
},
|
||||
tooltipTimeout: 5000,
|
||||
tooltipVisible: new api.Value( false ),
|
||||
tooltipFocused: new api.Value( 0 )
|
||||
};
|
||||
|
||||
/**
|
||||
* Boot using data sent inline.
|
||||
*
|
||||
* @param {Object} data Object data.
|
||||
* @return {void}
|
||||
*/
|
||||
component.boot = function boot( data ) {
|
||||
component.data = data;
|
||||
|
||||
function initPanel() {
|
||||
api.panel( component.data.panelId, component.panelReady );
|
||||
}
|
||||
|
||||
if ( api.state ) {
|
||||
component.addState();
|
||||
api.bind( 'ready', initPanel );
|
||||
} else { // WP<4.9.
|
||||
api.bind( 'ready', function() {
|
||||
component.addState(); // Needed for WP<4.9.
|
||||
initPanel();
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Add state for AMP.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
component.addState = function addState() {
|
||||
api.state.add( 'ampEnabled', new api.Value( false ) );
|
||||
api.state.add( 'ampAvailable', new api.Value( false ) );
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if the URL is AMPified.
|
||||
*
|
||||
* @param {string} url URL.
|
||||
* @return {boolean} whether it is an AMP URL.
|
||||
*/
|
||||
component.isAmpUrl = function isAmpUrl( url ) {
|
||||
var urlParser = document.createElement( 'a' ),
|
||||
regexEndpoint = new RegExp( '\\/' + component.data.queryVar + '\\/?$' );
|
||||
|
||||
urlParser.href = url;
|
||||
if ( ! _.isUndefined( wp.customize.utils.parseQueryString( urlParser.search.substr( 1 ) )[ component.data.queryVar ] ) ) {
|
||||
return true;
|
||||
}
|
||||
return regexEndpoint.test( urlParser.pathname );
|
||||
};
|
||||
|
||||
/**
|
||||
* Create an non-AMP version of a URL.
|
||||
*
|
||||
* @param {string} url URL.
|
||||
* @return {string} non-AMPified URL.
|
||||
*/
|
||||
component.unampifyUrl = function unampifyUrl( url ) {
|
||||
var urlParser = document.createElement( 'a' ),
|
||||
regexEndpoint = new RegExp( '\\/' + component.data.queryVar + '\\/?$' ),
|
||||
params;
|
||||
|
||||
urlParser.href = url;
|
||||
urlParser.pathname = urlParser.pathname.replace( regexEndpoint, '' );
|
||||
|
||||
if ( 1 < urlParser.search.length ) {
|
||||
params = wp.customize.utils.parseQueryString( urlParser.search.substr( 1 ) );
|
||||
delete params[ component.data.queryVar ];
|
||||
urlParser.search = $.param( params );
|
||||
}
|
||||
|
||||
return urlParser.href;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create an AMP version of a URL.
|
||||
*
|
||||
* @param {string} url URL.
|
||||
* @return {string} AMPified URL.
|
||||
*/
|
||||
component.ampifyUrl = function ampifyUrl( url ) {
|
||||
var urlParser = document.createElement( 'a' );
|
||||
urlParser.href = component.unampifyUrl( url );
|
||||
if ( urlParser.search.length ) {
|
||||
urlParser.search += '&';
|
||||
}
|
||||
urlParser.search += component.data.queryVar + '=1';
|
||||
return urlParser.href;
|
||||
};
|
||||
|
||||
/**
|
||||
* Try to close the tooltip after a given timeout.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
component.tryToCloseTooltip = function tryToCloseTooltip() {
|
||||
clearTimeout( component.tooltipTimeoutId );
|
||||
component.tooltipTimeoutId = setTimeout( function() {
|
||||
if ( ! component.tooltipVisible.get() ) {
|
||||
return;
|
||||
}
|
||||
if ( 0 < component.tooltipFocused.get() ) {
|
||||
component.tryToCloseTooltip();
|
||||
} else {
|
||||
component.tooltipVisible.set( false );
|
||||
}
|
||||
}, component.tooltipTimeout );
|
||||
};
|
||||
|
||||
/**
|
||||
* Make current URL AMPified if toggle is on.
|
||||
*
|
||||
* @param {string} url URL.
|
||||
* @return {string} AMPified URL.
|
||||
*/
|
||||
component.setCurrentAmpUrl = function setCurrentAmpUrl( url ) {
|
||||
var enabled = api.state( 'ampEnabled' ).get();
|
||||
if ( ! enabled && component.isAmpUrl( url ) ) {
|
||||
return component.unampifyUrl( url );
|
||||
} else if ( enabled && ! component.isAmpUrl( url ) ) {
|
||||
return component.ampifyUrl( url );
|
||||
}
|
||||
return url;
|
||||
};
|
||||
|
||||
/**
|
||||
* Swap to AMP version of URL in preview.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
component.updatePreviewUrl = function updatePreviewUrl() {
|
||||
api.previewer.previewUrl.set( component.setCurrentAmpUrl( api.previewer.previewUrl.get() ) );
|
||||
};
|
||||
|
||||
/**
|
||||
* Enable AMP and navigate to the given URL.
|
||||
*
|
||||
* @param {string} url - URL.
|
||||
* @return {void}
|
||||
*/
|
||||
component.enableAndNavigateToUrl = function enableAndNavigateToUrl( url ) {
|
||||
api.state( 'ampEnabled' ).set( true );
|
||||
api.previewer.previewUrl.set( url );
|
||||
};
|
||||
|
||||
/**
|
||||
* Update panel notifications.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
component.updatePanelNotifications = function updatePanelNotifications() {
|
||||
var panel = api.panel( component.data.panelId ),
|
||||
containers;
|
||||
containers = panel.sections().concat( [ panel ] );
|
||||
if ( api.state( 'ampAvailable' ).get() ) {
|
||||
_.each( containers, function( container ) {
|
||||
container.notifications.remove( 'amp_unavailable' );
|
||||
} );
|
||||
} else {
|
||||
_.each( containers, function( container ) {
|
||||
container.notifications.add( new api.Notification( 'amp_unavailable', {
|
||||
message: component.data.l10n.unavailableMessage,
|
||||
type: 'info',
|
||||
linkText: component.data.l10n.unavailableLinkText,
|
||||
url: component.data.ampUrl,
|
||||
templateId: 'customize-amp-unavailable-notification',
|
||||
render: function() {
|
||||
var li = api.Notification.prototype.render.call( this );
|
||||
li.find( 'a' ).on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
component.enableAndNavigateToUrl( this.href );
|
||||
} );
|
||||
return li;
|
||||
}
|
||||
} ) );
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Hook up all AMP preview interactions once panel is ready.
|
||||
*
|
||||
* @param {wp.customize.Panel} panel The AMP panel.
|
||||
* @return {void}
|
||||
*/
|
||||
component.panelReady = function panelReady( panel ) {
|
||||
var ampToggleContainer, checkbox, tooltip, tooltipLink;
|
||||
|
||||
ampToggleContainer = $( wp.template( 'customize-amp-enabled-toggle' )( {
|
||||
message: component.data.l10n.unavailableMessage,
|
||||
linkText: component.data.l10n.unavailableLinkText,
|
||||
url: component.data.ampUrl
|
||||
} ) );
|
||||
checkbox = ampToggleContainer.find( 'input[type=checkbox]' );
|
||||
tooltip = ampToggleContainer.find( '.tooltip' );
|
||||
tooltipLink = tooltip.find( 'a' );
|
||||
|
||||
// AMP panel triggers the input toggle for AMP preview.
|
||||
panel.expanded.bind( function( expanded ) {
|
||||
if ( ! expanded ) {
|
||||
return;
|
||||
}
|
||||
if ( api.state( 'ampAvailable' ).get() ) {
|
||||
api.state( 'ampEnabled' ).set( panel.expanded.get() );
|
||||
} else if ( ! panel.notifications ) {
|
||||
/*
|
||||
* This is only done if panel notifications aren't supported.
|
||||
* If they are (as of 4.9) then a notification will be shown
|
||||
* in the panel and its sections when AMP is not available.
|
||||
*/
|
||||
setTimeout( function() {
|
||||
component.tooltipVisible.set( true );
|
||||
}, 250 );
|
||||
}
|
||||
} );
|
||||
|
||||
if ( panel.notifications ) {
|
||||
api.state( 'ampAvailable' ).bind( component.updatePanelNotifications );
|
||||
component.updatePanelNotifications();
|
||||
api.section.bind( 'add', component.updatePanelNotifications );
|
||||
}
|
||||
|
||||
// Enable AMP toggle if available and mobile device selected.
|
||||
api.previewedDevice.bind( function( device ) {
|
||||
if ( api.state( 'ampAvailable' ).get() ) {
|
||||
api.state( 'ampEnabled' ).set( 'mobile' === device );
|
||||
}
|
||||
} );
|
||||
|
||||
// Message coming from previewer.
|
||||
api.previewer.bind( 'amp-status', function( data ) {
|
||||
api.state( 'ampAvailable' ).set( data.available );
|
||||
} );
|
||||
function setInitialAmpEnabledState( data ) {
|
||||
api.state( 'ampEnabled' ).set( data.enabled );
|
||||
api.previewer.unbind( 'amp-status', setInitialAmpEnabledState );
|
||||
}
|
||||
api.previewer.bind( 'amp-status', setInitialAmpEnabledState );
|
||||
|
||||
/*
|
||||
* Persist the presence or lack of the amp=1 param when navigating in the preview,
|
||||
* even if current page is not yet supported.
|
||||
*/
|
||||
api.previewer.previewUrl.validate = ( function( prevValidate ) {
|
||||
return function( value ) {
|
||||
var val = prevValidate.call( this, value );
|
||||
if ( val ) {
|
||||
val = component.setCurrentAmpUrl( val );
|
||||
}
|
||||
return val;
|
||||
};
|
||||
}( api.previewer.previewUrl.validate ) );
|
||||
|
||||
// Listen for ampEnabled state changes.
|
||||
api.state( 'ampEnabled' ).bind( function( enabled ) {
|
||||
checkbox.prop( 'checked', enabled );
|
||||
component.updatePreviewUrl();
|
||||
} );
|
||||
|
||||
// Listen for ampAvailable state changes.
|
||||
api.state( 'ampAvailable' ).bind( function( available ) {
|
||||
checkbox.toggleClass( 'disabled', ! available );
|
||||
|
||||
// Show the unavailable tooltip if AMP is enabled.
|
||||
if ( api.state( 'ampEnabled' ).get() ) {
|
||||
component.tooltipVisible.set( ! available );
|
||||
}
|
||||
} );
|
||||
|
||||
// Adding checkbox toggle before device selection.
|
||||
$( '.devices-wrapper' ).before( ampToggleContainer );
|
||||
|
||||
// User clicked link within tooltip, go to linked post in preview.
|
||||
tooltipLink.on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
component.enableAndNavigateToUrl( this.href );
|
||||
} );
|
||||
|
||||
// Toggle visibility of tooltip based on tooltipVisible state.
|
||||
component.tooltipVisible.bind( function( visible ) {
|
||||
tooltip.attr( 'aria-hidden', visible ? 'false' : 'true' );
|
||||
if ( visible ) {
|
||||
$( document ).on( 'click.amp-toggle-outside', function( event ) {
|
||||
if ( ! $.contains( ampToggleContainer[ 0 ], event.target ) ) {
|
||||
component.tooltipVisible.set( false );
|
||||
}
|
||||
} );
|
||||
tooltip.fadeIn();
|
||||
component.tryToCloseTooltip();
|
||||
} else {
|
||||
tooltip.fadeOut();
|
||||
component.tooltipFocused.set( 0 );
|
||||
$( document ).off( 'click.amp-toggle-outside' );
|
||||
}
|
||||
} );
|
||||
|
||||
// Handle click on checkbox to either enable the AMP preview or show the tooltip.
|
||||
checkbox.on( 'click', function() {
|
||||
this.checked = ! this.checked; // Undo what we just did, since state is managed in ampAvailable change handler.
|
||||
if ( api.state( 'ampAvailable' ).get() ) {
|
||||
api.state( 'ampEnabled' ).set( ! api.state( 'ampEnabled' ).get() );
|
||||
} else {
|
||||
component.tooltipVisible.set( true );
|
||||
}
|
||||
} );
|
||||
|
||||
// Keep track of the user's state interacting with the tooltip.
|
||||
tooltip.on( 'mouseenter', function() {
|
||||
if ( ! api.state( 'ampAvailable' ).get() ) {
|
||||
component.tooltipVisible.set( true );
|
||||
}
|
||||
component.tooltipFocused.set( component.tooltipFocused.get() + 1 );
|
||||
} );
|
||||
tooltip.on( 'mouseleave', function() {
|
||||
component.tooltipFocused.set( component.tooltipFocused.get() - 1 );
|
||||
} );
|
||||
tooltipLink.on( 'focus', function() {
|
||||
if ( ! api.state( 'ampAvailable' ).get() ) {
|
||||
component.tooltipVisible.set( true );
|
||||
}
|
||||
component.tooltipFocused.set( component.tooltipFocused.get() + 1 );
|
||||
} );
|
||||
tooltipLink.on( 'blur', function() {
|
||||
component.tooltipFocused.set( component.tooltipFocused.get() - 1 );
|
||||
} );
|
||||
};
|
||||
|
||||
return component;
|
||||
}( wp.customize, jQuery ) );
|
@ -0,0 +1,25 @@
|
||||
/* exported ampCustomizePreview */
|
||||
|
||||
var ampCustomizePreview = ( function( api ) { // eslint-disable-line no-unused-vars
|
||||
'use strict';
|
||||
|
||||
var component = {};
|
||||
|
||||
/**
|
||||
* Boot using data sent inline.
|
||||
*
|
||||
* @param {Object} data - PHP exports.
|
||||
* @param {boolean} data.available - Whether AMP is available.
|
||||
* @param {boolean} data.enabled - Whether AMP is enabled.
|
||||
* @return {void}
|
||||
*/
|
||||
component.boot = function boot( data ) {
|
||||
api.bind( 'preview-ready', function() {
|
||||
api.preview.bind( 'active', function() {
|
||||
api.preview.send( 'amp-status', data );
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
||||
return component;
|
||||
}( wp.customize ) );
|
@ -0,0 +1,48 @@
|
||||
/* global amp_customizer_design, console */
|
||||
|
||||
( function( $ ) {
|
||||
'use strict';
|
||||
|
||||
// Nav bar text color.
|
||||
wp.customize( 'amp_customizer[header_color]', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.amp-wp-header a' ).css( 'color', to );
|
||||
$( '.amp-wp-header div' ).css( 'color', to );
|
||||
$( '.amp-wp-header .amp-wp-site-icon' ).css( 'border-color', to ).css( 'background-color', to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Nav bar background color.
|
||||
wp.customize( 'amp_customizer[header_background_color]', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( 'html, .amp-wp-header' ).css( 'background-color', to );
|
||||
$( '.amp-wp-article a, .amp-wp-article a:visited, .amp-wp-footer a, .amp-wp-footer a:visited' ).css( 'color', to );
|
||||
$( 'blockquote, .amp-wp-byline amp-img' ).css( 'border-color', to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// AMP background color scheme.
|
||||
wp.customize( 'amp_customizer[color_scheme]', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
var colors = amp_customizer_design.color_schemes[ to ]; // eslint-disable-line
|
||||
|
||||
if ( ! colors ) {
|
||||
console.error( 'Selected color scheme "%s" not registered.', to ); // eslint-disable-line
|
||||
return;
|
||||
}
|
||||
|
||||
$( 'body' ).css( 'background-color', colors.theme_color );
|
||||
$( 'body, a:hover, a:active, a:focus, blockquote, .amp-wp-article, .amp-wp-title' ).css( 'color', colors.text_color );
|
||||
$( '.amp-wp-meta, .wp-caption .wp-caption-text, .amp-wp-tax-category, .amp-wp-tax-tag, .amp-wp-footer p' ).css( 'color', colors.muted_text_color );
|
||||
$( '.wp-caption .wp-caption-text, .amp-wp-comments-link a, .amp-wp-footer' ).css( 'border-color', colors.border_color );
|
||||
$( '.amp-wp-iframe-placeholder, amp-carousel, amp-iframe, amp-youtube, amp-instagram, amp-vine' ).css( 'background-color', colors.border_color );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Site title.
|
||||
wp.customize( 'blogname', function( setting ) {
|
||||
setting.bind( function( title ) {
|
||||
$( '.amp-wp-header .amp-site-title, .amp-wp-footer h2' ).text( title );
|
||||
} );
|
||||
} );
|
||||
}( jQuery ) );
|
@ -0,0 +1,847 @@
|
||||
/* exported ampEditorBlocks */
|
||||
/* eslint no-magic-numbers: [ "error", { "ignore": [ 1, -1, 0, 4 ] } ] */
|
||||
|
||||
var ampEditorBlocks = ( function() { // eslint-disable-line no-unused-vars
|
||||
var component, __;
|
||||
|
||||
__ = wp.i18n.__;
|
||||
|
||||
component = {
|
||||
|
||||
/**
|
||||
* Holds data.
|
||||
*/
|
||||
data: {
|
||||
ampLayoutOptions: [
|
||||
{
|
||||
value: 'nodisplay',
|
||||
label: __( 'No Display', 'amp' ),
|
||||
notAvailable: [
|
||||
'core-embed/vimeo',
|
||||
'core-embed/dailymotion',
|
||||
'core-embed/hulu',
|
||||
'core-embed/reddit',
|
||||
'core-embed/soundcloud'
|
||||
]
|
||||
},
|
||||
{
|
||||
// Not supported by amp-audio and amp-pixel.
|
||||
value: 'fixed',
|
||||
label: __( 'Fixed', 'amp' ),
|
||||
notAvailable: [
|
||||
'core-embed/soundcloud'
|
||||
]
|
||||
},
|
||||
{
|
||||
// To ensure your AMP element displays, you must specify a width and height for the containing element.
|
||||
value: 'responsive',
|
||||
label: __( 'Responsive', 'amp' ),
|
||||
notAvailable: [
|
||||
'core-embed/soundcloud'
|
||||
]
|
||||
},
|
||||
{
|
||||
value: 'fixed-height',
|
||||
label: __( 'Fixed height', 'amp' ),
|
||||
notAvailable: []
|
||||
},
|
||||
{
|
||||
value: 'fill',
|
||||
label: __( 'Fill', 'amp' ),
|
||||
notAvailable: [
|
||||
'core-embed/soundcloud'
|
||||
]
|
||||
},
|
||||
{
|
||||
value: 'flex-item',
|
||||
label: __( 'Flex Item', 'amp' ),
|
||||
notAvailable: [
|
||||
'core-embed/soundcloud'
|
||||
]
|
||||
},
|
||||
{
|
||||
// Not supported by video.
|
||||
value: 'intrinsic',
|
||||
label: __( 'Intrinsic', 'amp' ),
|
||||
notAvailable: [
|
||||
'core-embed/youtube',
|
||||
'core-embed/facebook',
|
||||
'core-embed/instagram',
|
||||
'core-embed/vimeo',
|
||||
'core-embed/dailymotion',
|
||||
'core-embed/hulu',
|
||||
'core-embed/reddit',
|
||||
'core-embed/soundcloud'
|
||||
]
|
||||
}
|
||||
],
|
||||
defaultWidth: 608, // Max-width in the editor.
|
||||
defaultHeight: 400,
|
||||
mediaBlocks: [
|
||||
'core/image',
|
||||
'core/video'
|
||||
],
|
||||
textBlocks: [
|
||||
'core/paragraph',
|
||||
'core/heading',
|
||||
'core/code',
|
||||
'core/quote',
|
||||
'core/subhead'
|
||||
],
|
||||
ampSettingsLabel: __( 'AMP Settings' ),
|
||||
fontSizes: {
|
||||
small: 14,
|
||||
larger: 48
|
||||
},
|
||||
ampPanelLabel: __( 'AMP Settings' )
|
||||
},
|
||||
hasThemeSupport: true
|
||||
};
|
||||
|
||||
/**
|
||||
* Add filters.
|
||||
*
|
||||
* @param {Object} data Data.
|
||||
*/
|
||||
component.boot = function boot( data ) {
|
||||
if ( data ) {
|
||||
_.extend( component.data, data );
|
||||
}
|
||||
|
||||
wp.hooks.addFilter( 'blocks.registerBlockType', 'ampEditorBlocks/addAttributes', component.addAMPAttributes );
|
||||
wp.hooks.addFilter( 'blocks.getSaveElement', 'ampEditorBlocks/filterSave', component.filterBlocksSave );
|
||||
wp.hooks.addFilter( 'editor.BlockEdit', 'ampEditorBlocks/filterEdit', component.filterBlocksEdit );
|
||||
wp.hooks.addFilter( 'blocks.getSaveContent.extraProps', 'ampEditorBlocks/addExtraAttributes', component.addAMPExtraProps );
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if layout is available for the block.
|
||||
*
|
||||
* @param {string} blockName Block name.
|
||||
* @param {Object} option Layout option object.
|
||||
* @return {boolean} If is available.
|
||||
*/
|
||||
component.isLayoutAvailable = function isLayoutAvailable( blockName, option ) {
|
||||
return -1 === option.notAvailable.indexOf( blockName );
|
||||
};
|
||||
|
||||
/**
|
||||
* Get layout options depending on the block.
|
||||
*
|
||||
* @param {string} blockName Block name.
|
||||
* @return {[*]} Options.
|
||||
*/
|
||||
component.getLayoutOptions = function getLayoutOptions( blockName ) {
|
||||
var layoutOptions = [
|
||||
{
|
||||
value: '',
|
||||
label: __( 'Default', 'amp' )
|
||||
}
|
||||
];
|
||||
|
||||
_.each( component.data.ampLayoutOptions, function( option ) {
|
||||
if ( component.isLayoutAvailable( blockName, option ) ) {
|
||||
layoutOptions.push( {
|
||||
value: option.value,
|
||||
label: option.label
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
return layoutOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add extra data-amp-layout attribute to save to DB.
|
||||
*
|
||||
* @param {Object} props Properties.
|
||||
* @param {Object} blockType Block type.
|
||||
* @param {Object} attributes Attributes.
|
||||
* @return {Object} Props.
|
||||
*/
|
||||
component.addAMPExtraProps = function addAMPExtraProps( props, blockType, attributes ) {
|
||||
var ampAttributes = {};
|
||||
|
||||
// Shortcode props are handled differently.
|
||||
if ( 'core/shortcode' === blockType.name ) {
|
||||
return props;
|
||||
}
|
||||
|
||||
// AMP blocks handle layout and other props on their own.
|
||||
if ( 'amp/' === blockType.name.substr( 0, 4 ) ) {
|
||||
return props;
|
||||
}
|
||||
|
||||
if ( attributes.ampLayout ) {
|
||||
ampAttributes[ 'data-amp-layout' ] = attributes.ampLayout;
|
||||
}
|
||||
if ( attributes.ampNoLoading ) {
|
||||
ampAttributes[ 'data-amp-noloading' ] = attributes.ampNoLoading;
|
||||
}
|
||||
if ( attributes.ampLightbox ) {
|
||||
ampAttributes[ 'data-amp-lightbox' ] = attributes.ampLightbox;
|
||||
}
|
||||
if ( attributes.ampCarousel ) {
|
||||
ampAttributes[ 'data-amp-carousel' ] = attributes.ampCarousel;
|
||||
}
|
||||
|
||||
return _.extend( ampAttributes, props );
|
||||
};
|
||||
|
||||
/**
|
||||
* Add AMP attributes (in this test case just ampLayout) to every core block.
|
||||
*
|
||||
* @param {Object} settings Settings.
|
||||
* @param {string} name Block name.
|
||||
* @return {Object} Settings.
|
||||
*/
|
||||
component.addAMPAttributes = function addAMPAttributes( settings, name ) {
|
||||
// AMP Carousel settings.
|
||||
if ( 'core/shortcode' === name || 'core/gallery' === name ) {
|
||||
if ( ! settings.attributes ) {
|
||||
settings.attributes = {};
|
||||
}
|
||||
settings.attributes.ampCarousel = {
|
||||
type: 'boolean'
|
||||
};
|
||||
settings.attributes.ampLightbox = {
|
||||
type: 'boolean'
|
||||
};
|
||||
}
|
||||
|
||||
// Add AMP Lightbox settings.
|
||||
if ( 'core/image' === name ) {
|
||||
if ( ! settings.attributes ) {
|
||||
settings.attributes = {};
|
||||
}
|
||||
settings.attributes.ampLightbox = {
|
||||
type: 'boolean'
|
||||
};
|
||||
}
|
||||
|
||||
// Fit-text for text blocks.
|
||||
if ( -1 !== component.data.textBlocks.indexOf( name ) ) {
|
||||
if ( ! settings.attributes ) {
|
||||
settings.attributes = {};
|
||||
}
|
||||
settings.attributes.ampFitText = {
|
||||
default: false
|
||||
};
|
||||
settings.attributes.minFont = {
|
||||
default: component.data.fontSizes.small,
|
||||
source: 'attribute',
|
||||
selector: 'amp-fit-text',
|
||||
attribute: 'min-font-size'
|
||||
};
|
||||
settings.attributes.maxFont = {
|
||||
default: component.data.fontSizes.larger,
|
||||
source: 'attribute',
|
||||
selector: 'amp-fit-text',
|
||||
attribute: 'max-font-size'
|
||||
};
|
||||
settings.attributes.height = {
|
||||
default: 50,
|
||||
source: 'attribute',
|
||||
selector: 'amp-fit-text',
|
||||
attribute: 'height'
|
||||
};
|
||||
}
|
||||
|
||||
// Layout settings for embeds and media blocks.
|
||||
if ( 0 === name.indexOf( 'core-embed' ) || -1 !== component.data.mediaBlocks.indexOf( name ) ) {
|
||||
if ( ! settings.attributes ) {
|
||||
settings.attributes = {};
|
||||
}
|
||||
settings.attributes.ampLayout = {
|
||||
type: 'string'
|
||||
};
|
||||
settings.attributes.ampNoLoading = {
|
||||
type: 'boolean'
|
||||
};
|
||||
}
|
||||
return settings;
|
||||
};
|
||||
|
||||
/**
|
||||
* Filters blocks edit function of all blocks.
|
||||
*
|
||||
* @param {Function} BlockEdit Edit function.
|
||||
* @return {Function} Edit function.
|
||||
*/
|
||||
component.filterBlocksEdit = function filterBlocksEdit( BlockEdit ) {
|
||||
var el = wp.element.createElement;
|
||||
|
||||
return function( props ) {
|
||||
var attributes = props.attributes,
|
||||
name = props.name,
|
||||
ampLayout,
|
||||
inspectorControls;
|
||||
|
||||
ampLayout = attributes.ampLayout;
|
||||
|
||||
if ( 'core/shortcode' === name ) {
|
||||
// Lets remove amp-carousel from edit view.
|
||||
if ( component.hasGalleryShortcodeCarouselAttribute( attributes.text || '' ) ) {
|
||||
props.setAttributes( { text: component.removeAmpCarouselFromShortcodeAtts( attributes.text ) } );
|
||||
}
|
||||
// Lets remove amp-lightbox from edit view.
|
||||
if ( component.hasGalleryShortcodeLightboxAttribute( attributes.text || '' ) ) {
|
||||
props.setAttributes( { text: component.removeAmpLightboxFromShortcodeAtts( attributes.text ) } );
|
||||
}
|
||||
|
||||
inspectorControls = component.setUpShortcodeInspectorControls( props );
|
||||
if ( '' === inspectorControls ) {
|
||||
// Return original.
|
||||
return [
|
||||
el( BlockEdit, _.extend( {
|
||||
key: 'original'
|
||||
}, props ) )
|
||||
];
|
||||
}
|
||||
} else if ( 'core/gallery' === name ) {
|
||||
inspectorControls = component.setUpGalleryInpsectorControls( props );
|
||||
} else if ( 'core/image' === name ) {
|
||||
inspectorControls = component.setUpImageInpsectorControls( props );
|
||||
} else if ( -1 !== component.data.mediaBlocks.indexOf( name ) || 0 === name.indexOf( 'core-embed/' ) ) {
|
||||
inspectorControls = component.setUpInspectorControls( props );
|
||||
} else if ( -1 !== component.data.textBlocks.indexOf( name ) ) {
|
||||
inspectorControls = component.setUpTextBlocksInspectorControls( props );
|
||||
}
|
||||
|
||||
// Return just inspector controls in case of 'nodisplay'.
|
||||
if ( ampLayout && 'nodisplay' === ampLayout ) {
|
||||
return [
|
||||
inspectorControls
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
el( BlockEdit, _.extend( {
|
||||
key: 'original'
|
||||
}, props ) ),
|
||||
inspectorControls
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Set width and height in case of image block.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @param {string} layout Layout.
|
||||
*/
|
||||
component.setImageBlockLayoutAttributes = function setImageBlockLayoutAttributes( props, layout ) {
|
||||
var attributes = props.attributes;
|
||||
switch ( layout ) {
|
||||
case 'fixed-height':
|
||||
if ( ! attributes.height ) {
|
||||
props.setAttributes( { height: component.data.defaultHeight } );
|
||||
}
|
||||
// Lightbox doesn't work with fixed height, so unset it.
|
||||
if ( attributes.ampLightbox ) {
|
||||
props.setAttributes( { ampLightbox: false } );
|
||||
}
|
||||
break;
|
||||
|
||||
case 'fixed':
|
||||
if ( ! attributes.height ) {
|
||||
props.setAttributes( { height: component.data.defaultHeight } );
|
||||
}
|
||||
if ( ! attributes.width ) {
|
||||
props.setAttributes( { width: component.data.defaultWidth } );
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Default setup for inspector controls.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object|Element|*|{$$typeof, type, key, ref, props, _owner}} Inspector Controls.
|
||||
*/
|
||||
component.setUpInspectorControls = function setUpInspectorControls( props ) {
|
||||
var isSelected = props.isSelected,
|
||||
el = wp.element.createElement,
|
||||
InspectorControls = wp.editor.InspectorControls,
|
||||
PanelBody = wp.components.PanelBody;
|
||||
|
||||
return isSelected && (
|
||||
el( InspectorControls, { key: 'inspector' },
|
||||
el( PanelBody, { title: component.data.ampPanelLabel },
|
||||
component.getAmpLayoutControl( props ),
|
||||
component.getAmpNoloadingToggle( props )
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get AMP Layout select control.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object} Element.
|
||||
*/
|
||||
component.getAmpLayoutControl = function getAmpLayoutControl( props ) {
|
||||
var ampLayout = props.attributes.ampLayout,
|
||||
el = wp.element.createElement,
|
||||
SelectControl = wp.components.SelectControl,
|
||||
name = props.name,
|
||||
label = __( 'AMP Layout' );
|
||||
|
||||
if ( 'core/image' === name ) {
|
||||
label = __( 'AMP Layout (modifies width/height)' );
|
||||
}
|
||||
|
||||
return el( SelectControl, {
|
||||
label: label,
|
||||
value: ampLayout,
|
||||
options: component.getLayoutOptions( name ),
|
||||
onChange: function( value ) {
|
||||
props.setAttributes( { ampLayout: value } );
|
||||
if ( 'core/image' === props.name ) {
|
||||
component.setImageBlockLayoutAttributes( props, value );
|
||||
}
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Get AMP Noloading toggle control.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object} Element.
|
||||
*/
|
||||
component.getAmpNoloadingToggle = function getAmpNoloadingToggle( props ) {
|
||||
var ampNoLoading = props.attributes.ampNoLoading,
|
||||
el = wp.element.createElement,
|
||||
ToggleControl = wp.components.ToggleControl,
|
||||
label = __( 'AMP Noloading' );
|
||||
|
||||
return el( ToggleControl, {
|
||||
label: label,
|
||||
checked: ampNoLoading,
|
||||
onChange: function() {
|
||||
props.setAttributes( { ampNoLoading: ! ampNoLoading } );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Setup inspector controls for text blocks.
|
||||
*
|
||||
* @todo Consider wrapping the render function to delete the original font size in text settings when ampFitText.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object|Element|*|{$$typeof, type, key, ref, props, _owner}} Inspector Controls.
|
||||
*/
|
||||
component.setUpTextBlocksInspectorControls = function setUpInspectorControls( props ) {
|
||||
var inspectorPanelBodyArgs,
|
||||
ampFitText = props.attributes.ampFitText,
|
||||
minFont = props.attributes.minFont,
|
||||
maxFont = props.attributes.maxFont,
|
||||
height = props.attributes.height,
|
||||
isSelected = props.isSelected,
|
||||
el = wp.element.createElement,
|
||||
InspectorControls = wp.editor.InspectorControls,
|
||||
TextControl = wp.components.TextControl,
|
||||
FontSizePicker = wp.components.FontSizePicker,
|
||||
ToggleControl = wp.components.ToggleControl,
|
||||
PanelBody = wp.components.PanelBody,
|
||||
label = __( 'Use AMP Fit Text' ),
|
||||
FONT_SIZES = [
|
||||
{
|
||||
name: 'small',
|
||||
shortName: __( 'S' ),
|
||||
size: 14
|
||||
},
|
||||
{
|
||||
name: 'regular',
|
||||
shortName: __( 'M' ),
|
||||
size: 16
|
||||
},
|
||||
{
|
||||
name: 'large',
|
||||
shortName: __( 'L' ),
|
||||
size: 36
|
||||
},
|
||||
{
|
||||
name: 'larger',
|
||||
shortName: __( 'XL' ),
|
||||
size: 48
|
||||
}
|
||||
];
|
||||
|
||||
if ( ! isSelected ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
inspectorPanelBodyArgs = [
|
||||
PanelBody,
|
||||
{ title: component.data.ampSettingsLabel, className: ampFitText ? 'is-amp-fit-text' : '' },
|
||||
el( ToggleControl, {
|
||||
label: label,
|
||||
checked: ampFitText,
|
||||
onChange: function() {
|
||||
props.setAttributes( { ampFitText: ! ampFitText } );
|
||||
}
|
||||
} )
|
||||
];
|
||||
|
||||
if ( ampFitText ) {
|
||||
inspectorPanelBodyArgs.push.apply( inspectorPanelBodyArgs, [
|
||||
el( TextControl, {
|
||||
label: __( 'Height' ),
|
||||
value: height,
|
||||
min: 1,
|
||||
onChange: function( nextHeight ) {
|
||||
props.setAttributes( { height: nextHeight } );
|
||||
}
|
||||
} ),
|
||||
parseInt( maxFont ) > parseInt( height ) && el(
|
||||
wp.components.Notice,
|
||||
{
|
||||
status: 'error',
|
||||
isDismissible: false
|
||||
},
|
||||
__( 'The height must be greater than the max font size.' )
|
||||
),
|
||||
el( PanelBody, { title: __( 'Minimum font size' ) },
|
||||
el( FontSizePicker, {
|
||||
fallbackFontSize: 14,
|
||||
value: minFont,
|
||||
fontSizes: FONT_SIZES,
|
||||
onChange: function( nextMinFont ) {
|
||||
if ( ! nextMinFont ) {
|
||||
nextMinFont = component.data.fontSizes.small; // @todo Supplying fallbackFontSize should be done automatically by the component?
|
||||
}
|
||||
if ( parseInt( nextMinFont ) <= parseInt( maxFont ) ) {
|
||||
props.setAttributes( { minFont: nextMinFont } );
|
||||
}
|
||||
}
|
||||
} )
|
||||
),
|
||||
parseInt( minFont ) > parseInt( maxFont ) && el(
|
||||
wp.components.Notice,
|
||||
{
|
||||
status: 'error',
|
||||
isDismissible: false
|
||||
},
|
||||
__( 'The min font size must less than the max font size.' )
|
||||
),
|
||||
el( PanelBody, { title: __( 'Maximum font size' ) },
|
||||
el( FontSizePicker, {
|
||||
value: maxFont,
|
||||
fallbackFontSize: 48,
|
||||
fontSizes: FONT_SIZES,
|
||||
onChange: function( nextMaxFont ) {
|
||||
if ( ! nextMaxFont ) {
|
||||
nextMaxFont = component.data.fontSizes.larger; // @todo Supplying fallbackFontSize should be done automatically by the component?
|
||||
}
|
||||
props.setAttributes( {
|
||||
maxFont: nextMaxFont,
|
||||
height: Math.max( nextMaxFont, height )
|
||||
} );
|
||||
}
|
||||
} )
|
||||
)
|
||||
] );
|
||||
}
|
||||
|
||||
return (
|
||||
el( InspectorControls, { key: 'inspector' },
|
||||
el.apply( null, inspectorPanelBodyArgs )
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up inspector controls for shortcode block.
|
||||
* Adds ampCarousel attribute in case of gallery shortcode.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object} Inspector controls.
|
||||
*/
|
||||
component.setUpShortcodeInspectorControls = function setUpShortcodeInspectorControls( props ) {
|
||||
var isSelected = props.isSelected,
|
||||
el = wp.element.createElement,
|
||||
InspectorControls = wp.editor.InspectorControls,
|
||||
PanelBody = wp.components.PanelBody;
|
||||
|
||||
if ( component.isGalleryShortcode( props.attributes ) ) {
|
||||
return isSelected && (
|
||||
el( InspectorControls, { key: 'inspector' },
|
||||
el( PanelBody, { title: component.data.ampPanelLabel },
|
||||
component.data.hasThemeSupport && component.getAmpCarouselToggle( props ),
|
||||
component.getAmpLightboxToggle( props )
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Get AMP Lightbox toggle control.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object} Element.
|
||||
*/
|
||||
component.getAmpLightboxToggle = function getAmpLightboxToggle( props ) {
|
||||
var ampLightbox = props.attributes.ampLightbox,
|
||||
el = wp.element.createElement,
|
||||
ToggleControl = wp.components.ToggleControl,
|
||||
label = __( 'Add lightbox effect' );
|
||||
|
||||
return el( ToggleControl, {
|
||||
label: label,
|
||||
checked: ampLightbox,
|
||||
onChange: function( nextValue ) {
|
||||
props.setAttributes( { ampLightbox: ! ampLightbox } );
|
||||
if ( nextValue ) {
|
||||
// Lightbox doesn't work with fixed height, so change.
|
||||
if ( 'fixed-height' === props.attributes.ampLayout ) {
|
||||
props.setAttributes( { ampLayout: 'fixed' } );
|
||||
}
|
||||
// In case of lightbox set linking images to 'none'.
|
||||
if ( props.attributes.linkTo && 'none' !== props.attributes.linkTo ) {
|
||||
props.setAttributes( { linkTo: 'none' } );
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Get AMP Carousel toggle control.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object} Element.
|
||||
*/
|
||||
component.getAmpCarouselToggle = function getAmpCarouselToggle( props ) {
|
||||
var ampCarousel = props.attributes.ampCarousel,
|
||||
el = wp.element.createElement,
|
||||
ToggleControl = wp.components.ToggleControl,
|
||||
label = __( 'Display as carousel' );
|
||||
|
||||
return el( ToggleControl, {
|
||||
label: label,
|
||||
checked: ampCarousel,
|
||||
onChange: function() {
|
||||
props.setAttributes( { ampCarousel: ! ampCarousel } );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up inspector controls for Image block.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object} Inspector Controls.
|
||||
*/
|
||||
component.setUpImageInpsectorControls = function setUpImageInpsectorControls( props ) {
|
||||
var isSelected = props.isSelected,
|
||||
el = wp.element.createElement,
|
||||
InspectorControls = wp.editor.InspectorControls,
|
||||
PanelBody = wp.components.PanelBody;
|
||||
|
||||
return isSelected && (
|
||||
el( InspectorControls, { key: 'inspector' },
|
||||
el( PanelBody, { title: component.data.ampPanelLabel },
|
||||
component.getAmpLayoutControl( props ),
|
||||
component.getAmpNoloadingToggle( props ),
|
||||
component.getAmpLightboxToggle( props )
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set up inspector controls for Gallery block.
|
||||
* Adds ampCarousel attribute for displaying the output as amp-carousel.
|
||||
*
|
||||
* @param {Object} props Props.
|
||||
* @return {Object} Inspector controls.
|
||||
*/
|
||||
component.setUpGalleryInpsectorControls = function setUpGalleryInpsectorControls( props ) {
|
||||
var isSelected = props.isSelected,
|
||||
el = wp.element.createElement,
|
||||
InspectorControls = wp.editor.InspectorControls,
|
||||
PanelBody = wp.components.PanelBody;
|
||||
|
||||
return isSelected && (
|
||||
el( InspectorControls, { key: 'inspector' },
|
||||
el( PanelBody, { title: component.data.ampPanelLabel },
|
||||
component.data.hasThemeSupport && component.getAmpCarouselToggle( props ),
|
||||
component.getAmpLightboxToggle( props )
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Filters blocks' save function.
|
||||
*
|
||||
* @param {Object} element Element.
|
||||
* @param {string} blockType Block type.
|
||||
* @param {Object} attributes Attributes.
|
||||
* @return {Object} Output element.
|
||||
*/
|
||||
component.filterBlocksSave = function filterBlocksSave( element, blockType, attributes ) {
|
||||
var text = attributes.text || '',
|
||||
fitTextProps = {
|
||||
layout: 'fixed-height',
|
||||
children: element
|
||||
};
|
||||
|
||||
if ( 'core/shortcode' === blockType.name && component.isGalleryShortcode( attributes ) ) {
|
||||
if ( ! attributes.ampLightbox ) {
|
||||
if ( component.hasGalleryShortcodeLightboxAttribute( attributes.text || '' ) ) {
|
||||
text = component.removeAmpLightboxFromShortcodeAtts( attributes.text );
|
||||
}
|
||||
}
|
||||
if ( attributes.ampCarousel ) {
|
||||
// If the text contains amp-carousel or amp-lightbox, lets remove it.
|
||||
if ( component.hasGalleryShortcodeCarouselAttribute( text ) ) {
|
||||
text = component.removeAmpCarouselFromShortcodeAtts( text );
|
||||
}
|
||||
|
||||
// If lightbox is not set, we can return here.
|
||||
if ( ! attributes.ampLightbox ) {
|
||||
if ( attributes.text !== text ) {
|
||||
return wp.element.createElement(
|
||||
wp.element.RawHTML,
|
||||
{},
|
||||
text
|
||||
);
|
||||
}
|
||||
|
||||
// Else lets return original.
|
||||
return element;
|
||||
}
|
||||
} else if ( ! component.hasGalleryShortcodeCarouselAttribute( attributes.text || '' ) ) {
|
||||
// Add amp-carousel=false attribute to the shortcode.
|
||||
text = attributes.text.replace( '[gallery', '[gallery amp-carousel=false' );
|
||||
} else {
|
||||
text = attributes.text;
|
||||
}
|
||||
|
||||
if ( attributes.ampLightbox && ! component.hasGalleryShortcodeLightboxAttribute( text ) ) {
|
||||
text = text.replace( '[gallery', '[gallery amp-lightbox=true' );
|
||||
}
|
||||
|
||||
if ( attributes.text !== text ) {
|
||||
return wp.element.createElement(
|
||||
wp.element.RawHTML,
|
||||
{},
|
||||
text
|
||||
);
|
||||
}
|
||||
} else if ( -1 !== component.data.textBlocks.indexOf( blockType.name ) && attributes.ampFitText ) {
|
||||
if ( attributes.minFont ) {
|
||||
fitTextProps[ 'min-font-size' ] = attributes.minFont;
|
||||
}
|
||||
if ( attributes.maxFont ) {
|
||||
fitTextProps[ 'max-font-size' ] = attributes.maxFont;
|
||||
}
|
||||
if ( attributes.height ) {
|
||||
fitTextProps.height = attributes.height;
|
||||
}
|
||||
return wp.element.createElement( 'amp-fit-text', fitTextProps );
|
||||
}
|
||||
return element;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if AMP Lightbox is set.
|
||||
*
|
||||
* @param {Object} attributes Attributes.
|
||||
* @return {boolean} If is set.
|
||||
*/
|
||||
component.hasAmpLightboxSet = function hasAmpLightboxSet( attributes ) {
|
||||
return attributes.ampLightbox && false !== attributes.ampLightbox;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if AMP Carousel is set.
|
||||
*
|
||||
* @param {Object} attributes Attributes.
|
||||
* @return {boolean} If is set.
|
||||
*/
|
||||
component.hasAmpCarouselSet = function hasAmpCarouselSet( attributes ) {
|
||||
return attributes.ampCarousel && false !== attributes.ampCarousel;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if AMP NoLoading is set.
|
||||
*
|
||||
* @param {Object} attributes Attributes.
|
||||
* @return {boolean} If is set.
|
||||
*/
|
||||
component.hasAmpNoLoadingSet = function hasAmpNoLoadingSet( attributes ) {
|
||||
return attributes.ampNoLoading && false !== attributes.ampNoLoading;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if AMP Layout is set.
|
||||
*
|
||||
* @param {Object} attributes Attributes.
|
||||
* @return {boolean} If AMP Layout is set.
|
||||
*/
|
||||
component.hasAmpLayoutSet = function hasAmpLayoutSet( attributes ) {
|
||||
return attributes.ampLayout && attributes.ampLayout.length;
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes amp-carousel=false from attributes.
|
||||
*
|
||||
* @param {string} shortcode Shortcode text.
|
||||
* @return {string} Modified shortcode.
|
||||
*/
|
||||
component.removeAmpCarouselFromShortcodeAtts = function removeAmpCarouselFromShortcodeAtts( shortcode ) {
|
||||
return shortcode.replace( ' amp-carousel=false', '' );
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes amp-lightbox=true from attributes.
|
||||
*
|
||||
* @param {string} shortcode Shortcode text.
|
||||
* @return {string} Modified shortcode.
|
||||
*/
|
||||
component.removeAmpLightboxFromShortcodeAtts = function removeAmpLightboxFromShortcodeAtts( shortcode ) {
|
||||
return shortcode.replace( ' amp-lightbox=true', '' );
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if shortcode includes amp-carousel attribute.
|
||||
*
|
||||
* @param {string} text Shortcode.
|
||||
* @return {boolean} If has amp-carousel.
|
||||
*/
|
||||
component.hasGalleryShortcodeCarouselAttribute = function hasGalleryShortcodeCarouselAttribute( text ) {
|
||||
return -1 !== text.indexOf( 'amp-carousel=false' );
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if shortcode includes amp-lightbox attribute.
|
||||
*
|
||||
* @param {string} text Shortcode.
|
||||
* @return {boolean} If has amp-lightbox.
|
||||
*/
|
||||
component.hasGalleryShortcodeLightboxAttribute = function hasGalleryShortcodeLightboxAttribute( text ) {
|
||||
return -1 !== text.indexOf( 'amp-lightbox=true' );
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if shortcode is gallery shortcode.
|
||||
*
|
||||
* @param {Object} attributes Attributes.
|
||||
* @return {boolean} If is gallery shortcode.
|
||||
*/
|
||||
component.isGalleryShortcode = function isGalleryShortcode( attributes ) {
|
||||
return attributes.text && -1 !== attributes.text.indexOf( 'gallery' );
|
||||
};
|
||||
|
||||
return component;
|
||||
}() );
|
@ -0,0 +1,179 @@
|
||||
/* exported ampPostMetaBox */
|
||||
|
||||
/**
|
||||
* AMP Post Meta Box.
|
||||
*
|
||||
* @todo Rename this to be just the ampEditPostScreen?
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
var ampPostMetaBox = ( function( $ ) { // eslint-disable-line no-unused-vars
|
||||
'use strict';
|
||||
|
||||
var component = {
|
||||
|
||||
/**
|
||||
* Holds data.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
data: {
|
||||
canonical: false, // Overridden by amp_is_canonical().
|
||||
previewLink: '',
|
||||
enabled: true, // Overridden by post_supports_amp( $post ).
|
||||
canSupport: true, // Overridden by count( AMP_Post_Type_Support::get_support_errors( $post ) ) === 0.
|
||||
statusInputName: '',
|
||||
l10n: {
|
||||
ampPreviewBtnLabel: ''
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle animation speed.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
toggleSpeed: 200,
|
||||
|
||||
/**
|
||||
* Core preview button selector.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
previewBtnSelector: '#post-preview',
|
||||
|
||||
/**
|
||||
* AMP preview button selector.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
ampPreviewBtnSelector: '#amp-post-preview'
|
||||
};
|
||||
|
||||
/**
|
||||
* Boot plugin.
|
||||
*
|
||||
* @since 0.6
|
||||
* @param {Object} data Object data.
|
||||
* @return {void}
|
||||
*/
|
||||
component.boot = function boot( data ) {
|
||||
component.data = data;
|
||||
$( document ).ready( function() {
|
||||
component.statusRadioInputs = $( '[name="' + component.data.statusInputName + '"]' );
|
||||
if ( component.data.enabled && ! component.data.canonical ) {
|
||||
component.addPreviewButton();
|
||||
}
|
||||
component.listen();
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Events listener.
|
||||
*
|
||||
* @since 0.6
|
||||
* @return {void}
|
||||
*/
|
||||
component.listen = function listen() {
|
||||
$( component.ampPreviewBtnSelector ).on( 'click.amp-post-preview', function( e ) {
|
||||
e.preventDefault();
|
||||
component.onAmpPreviewButtonClick();
|
||||
} );
|
||||
|
||||
component.statusRadioInputs.prop( 'disabled', true ); // Prevent cementing setting default status as overridden status.
|
||||
$( '.edit-amp-status, [href="#amp_status"]' ).click( function( e ) {
|
||||
e.preventDefault();
|
||||
component.statusRadioInputs.prop( 'disabled', false );
|
||||
component.toggleAmpStatus( $( e.target ) );
|
||||
} );
|
||||
|
||||
$( '#submitpost input[type="submit"]' ).on( 'click', function() {
|
||||
$( component.ampPreviewBtnSelector ).addClass( 'disabled' );
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Add AMP Preview button.
|
||||
*
|
||||
* @since 0.6
|
||||
* @return {void}
|
||||
*/
|
||||
component.addPreviewButton = function addPreviewButton() {
|
||||
var previewBtn = $( component.previewBtnSelector );
|
||||
previewBtn
|
||||
.clone()
|
||||
.insertAfter( previewBtn )
|
||||
.prop( {
|
||||
href: component.data.previewLink,
|
||||
id: component.ampPreviewBtnSelector.replace( '#', '' )
|
||||
} )
|
||||
.text( component.data.l10n.ampPreviewBtnLabel )
|
||||
.parent()
|
||||
.addClass( 'has-amp-preview' );
|
||||
};
|
||||
|
||||
/**
|
||||
* AMP Preview button click handler.
|
||||
*
|
||||
* We trigger the Core preview link for events propagation purposes.
|
||||
*
|
||||
* @since 0.6
|
||||
* @return {void}
|
||||
*/
|
||||
component.onAmpPreviewButtonClick = function onAmpPreviewButtonClick() {
|
||||
var $input;
|
||||
|
||||
// Flag the AMP preview referer.
|
||||
$input = $( '<input>' )
|
||||
.prop( {
|
||||
type: 'hidden',
|
||||
name: 'amp-preview',
|
||||
value: 'do-preview'
|
||||
} )
|
||||
.insertAfter( component.ampPreviewBtnSelector );
|
||||
|
||||
// Trigger Core preview button and remove AMP flag.
|
||||
$( component.previewBtnSelector ).click();
|
||||
$input.remove();
|
||||
};
|
||||
|
||||
/**
|
||||
* Add AMP status toggle.
|
||||
*
|
||||
* @since 0.6
|
||||
* @param {Object} $target Event target.
|
||||
* @return {void}
|
||||
*/
|
||||
component.toggleAmpStatus = function toggleAmpStatus( $target ) {
|
||||
var $container = $( '#amp-status-select' ),
|
||||
status = $container.data( 'amp-status' ),
|
||||
$checked,
|
||||
editAmpStatus = $( '.edit-amp-status' );
|
||||
|
||||
// Don't modify status on cancel button click.
|
||||
if ( ! $target.hasClass( 'button-cancel' ) ) {
|
||||
status = component.statusRadioInputs.filter( ':checked' ).val();
|
||||
}
|
||||
|
||||
$checked = $( '#amp-status-' + status );
|
||||
|
||||
// Toggle elements.
|
||||
editAmpStatus.fadeToggle( component.toggleSpeed, function() {
|
||||
if ( editAmpStatus.is( ':visible' ) ) {
|
||||
editAmpStatus.focus();
|
||||
} else {
|
||||
$container.find( 'input[type="radio"]' ).first().focus();
|
||||
}
|
||||
} );
|
||||
$container.slideToggle( component.toggleSpeed );
|
||||
|
||||
// Update status.
|
||||
if ( component.data.canSupport ) {
|
||||
$container.data( 'amp-status', status );
|
||||
$checked.prop( 'checked', true );
|
||||
$( '.amp-status-text' ).text( $checked.next().text() );
|
||||
}
|
||||
};
|
||||
|
||||
return component;
|
||||
}( window.jQuery ) );
|
@ -0,0 +1,9 @@
|
||||
/* global URLS */
|
||||
// See AMP_Service_Workers::add_amp_runtime_caching() and <https://github.com/ampproject/amp-by-example/blob/a4d798cac6a534e0c46e78944a2718a8dab3c057/boilerplate-generator/templates/files/serviceworkerJs.js#L9-L22>.
|
||||
{
|
||||
self.addEventListener( 'install', event => {
|
||||
event.waitUntil(
|
||||
caches.open( wp.serviceWorker.core.cacheNames.runtime ).then( cache => cache.addAll( URLS ) )
|
||||
);
|
||||
} );
|
||||
}
|
@ -0,0 +1,409 @@
|
||||
/* exported ampValidatedUrlPostEditScreen */
|
||||
|
||||
const ampValidatedUrlPostEditScreen = ( function() { // eslint-disable-line no-unused-vars
|
||||
let component = {
|
||||
data: {
|
||||
l10n: {
|
||||
unsaved_changes: '',
|
||||
showing_number_errors: '',
|
||||
page_heading: '',
|
||||
show_all: '',
|
||||
amp_enabled: false
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The id for the 'Showing x of y errors' notice.
|
||||
*
|
||||
* @var {string}
|
||||
*/
|
||||
component.idNumberErrors = 'number-errors';
|
||||
|
||||
/**
|
||||
* The id for the 'Show all' button.
|
||||
*
|
||||
* @var {string}
|
||||
*/
|
||||
component.showAllId = 'show-all-errors';
|
||||
|
||||
/**
|
||||
* Boot.
|
||||
*
|
||||
* @param {Object} data Data.
|
||||
* @param {Object} data.l10n Translations.
|
||||
*/
|
||||
component.boot = function boot( data ) {
|
||||
Object.assign( component.data, data );
|
||||
component.handleShowAll();
|
||||
component.handleFiltering();
|
||||
component.handleSearching();
|
||||
component.handleStatusChange();
|
||||
component.handleBulkActions();
|
||||
component.changeHeading();
|
||||
component.watchForUnsavedChanges();
|
||||
component.showAMPIconIfEnabled();
|
||||
};
|
||||
|
||||
/**
|
||||
* Add prompt when leaving page due to unsaved changes.
|
||||
*/
|
||||
component.addBeforeUnloadPrompt = function addBeforeUnloadPrompt() {
|
||||
if ( component.beforeUnloadPromptAdded ) {
|
||||
return;
|
||||
}
|
||||
window.addEventListener( 'beforeunload', component.onBeforeUnload );
|
||||
|
||||
// Remove prompt when clicking trash or update.
|
||||
document.querySelector( '#major-publishing-actions' ).addEventListener( 'click', function() {
|
||||
window.removeEventListener( 'beforeunload', component.onBeforeUnload );
|
||||
} );
|
||||
|
||||
component.beforeUnloadPromptAdded = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Watch for unsaved changes.
|
||||
*
|
||||
* Add an beforeunload warning when attempting to leave the page when there are unsaved changes,
|
||||
* unless the user is pressing the trash link or update button.
|
||||
*/
|
||||
component.watchForUnsavedChanges = function watchForUnsavedChanges() {
|
||||
const onChange = function( event ) {
|
||||
if ( event.target.matches( 'select' ) ) {
|
||||
document.getElementById( 'post' ).removeEventListener( 'change', onChange );
|
||||
component.addBeforeUnloadPrompt();
|
||||
}
|
||||
};
|
||||
document.getElementById( 'post' ).addEventListener( 'change', onChange );
|
||||
};
|
||||
|
||||
/**
|
||||
* Show message at beforeunload.
|
||||
*
|
||||
* @param {Event} event - The beforeunload event.
|
||||
* @return {string} Message.
|
||||
*/
|
||||
component.onBeforeUnload = function onBeforeUnload( event ) {
|
||||
event.preventDefault();
|
||||
event.returnValue = component.data.l10n.unsaved_changes;
|
||||
return component.data.l10n.unsaved_changes;
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the <tr> with 'Showing x of y validation errors' at the top of the list table with the current count.
|
||||
* If this does not exist yet, it creates the element.
|
||||
*
|
||||
* @param {number} numberErrorsDisplaying - The number of errors displaying.
|
||||
* @param {number} totalErrors - The total number of errors, displaying or not.
|
||||
*/
|
||||
component.updateShowingErrorsRow = function updateShowingErrorsRow( numberErrorsDisplaying, totalErrors ) {
|
||||
const showAllButton = document.getElementById( component.showAllId );
|
||||
let thead, th,
|
||||
tr = document.getElementById( component.idNumberErrors );
|
||||
const theadQuery = document.getElementsByTagName( 'thead' );
|
||||
|
||||
// Only create the <tr> if it does not exist yet.
|
||||
if ( theadQuery[ 0 ] && ! tr ) {
|
||||
thead = theadQuery[ 0 ];
|
||||
tr = document.createElement( 'tr' );
|
||||
th = document.createElement( 'th' );
|
||||
th.setAttribute( 'id', component.idNumberErrors );
|
||||
th.setAttribute( 'colspan', '6' );
|
||||
tr.appendChild( th );
|
||||
thead.appendChild( tr );
|
||||
}
|
||||
|
||||
// If all of the errors are displaying, hide the 'Show all' button and the count notice.
|
||||
if ( showAllButton && numberErrorsDisplaying === totalErrors ) {
|
||||
showAllButton.classList.add( 'hidden' );
|
||||
tr.classList.add( 'hidden' );
|
||||
} else if ( null !== numberErrorsDisplaying ) {
|
||||
// Update the number of errors displaying and create a 'Show all' button if it does not exist yet.
|
||||
document.getElementById( component.idNumberErrors ).innerText = component.data.l10n.showing_number_errors.replace( '%1$s', numberErrorsDisplaying );
|
||||
document.getElementById( component.idNumberErrors ).classList.remove( 'hidden' );
|
||||
component.conditionallyCreateShowAllButton();
|
||||
if ( document.getElementById( component.showAllId ) ) {
|
||||
document.getElementById( component.showAllId ).classList.remove( 'hidden' );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Conditionally creates and appends a 'Show all' button.
|
||||
*/
|
||||
component.conditionallyCreateShowAllButton = function conditionallyCreateShowAllButton() {
|
||||
const buttonContainer = document.getElementById( 'url-post-filter' );
|
||||
let showAllButton = document.getElementById( component.showAllId );
|
||||
|
||||
// There is no 'Show all' <button> yet, but there is a container element for it, create the <button>
|
||||
if ( ! showAllButton && buttonContainer ) {
|
||||
showAllButton = document.createElement( 'button' );
|
||||
showAllButton.id = component.showAllId;
|
||||
showAllButton.classList.add( 'button' );
|
||||
showAllButton.innerText = component.data.l10n.show_all;
|
||||
buttonContainer.appendChild( showAllButton );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* On clicking the 'Show all' <button>, this displays all of the validation errors.
|
||||
* Then, it hides this 'Show all' <button> and the notice for the number of errors showing.
|
||||
*/
|
||||
component.handleShowAll = function handleShowAll() {
|
||||
const onClick = function( event ) {
|
||||
const validationErrors = document.querySelectorAll( '[data-error-type]' );
|
||||
if ( ! event.target.matches( '#' + component.showAllId ) ) {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
|
||||
// Iterate through all of the errors, and remove the 'hidden' class.
|
||||
validationErrors.forEach( function( element ) {
|
||||
element.parentElement.parentElement.classList.remove( 'hidden' );
|
||||
} );
|
||||
|
||||
/*
|
||||
* Update the notice to indicate that all of the errors are displaying.
|
||||
* Like 'Showing 5 of 5 validation errors'.
|
||||
*/
|
||||
component.updateShowingErrorsRow( validationErrors.length, validationErrors.length );
|
||||
|
||||
// Hide this 'Show all' button.
|
||||
event.target.classList.add( 'hidden' );
|
||||
|
||||
// Change the value of the error type <select> element to 'All Error Types'.
|
||||
document.getElementById( 'amp_validation_error_type' ).selectedIndex = 0;
|
||||
};
|
||||
|
||||
document.getElementById( 'url-post-filter' ).addEventListener( 'click', onClick );
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles filtering by error type, triggered by clicking 'Apply Filter'.
|
||||
*
|
||||
* Gets the value of the error type <select> element.
|
||||
* And hides all <tr> elements that do not have the same type of this value.
|
||||
* If 'All Error Types' is selected, this displays all errors.
|
||||
*/
|
||||
component.handleFiltering = function handleFiltering() {
|
||||
const onChange = function( event ) {
|
||||
const showAllButton = document.getElementById( component.showAllId );
|
||||
if ( ! event.target.matches( 'select' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
const isAllErrorTypesSelected = ( '-1' === event.target.value );
|
||||
const errorTypeQuery = document.querySelectorAll( '[data-error-type]' );
|
||||
|
||||
// If the user has chosen 'All Error Types' from the <select>, hide the 'Show all' button.
|
||||
if ( isAllErrorTypesSelected && showAllButton ) {
|
||||
showAllButton.classList.add( 'hidden' );
|
||||
}
|
||||
|
||||
/*
|
||||
* Iterate through all of the <tr> elements in the list table.
|
||||
* If the error type does not match the value (selected error type), hide them.
|
||||
*/
|
||||
let numberErrorsDisplaying = 0;
|
||||
errorTypeQuery.forEach( function( element ) {
|
||||
const errorType = element.getAttribute( 'data-error-type' );
|
||||
|
||||
// If 'All Error Types' was selected, this should display all errors.
|
||||
if ( isAllErrorTypesSelected || ! event.target.value || event.target.value === errorType ) {
|
||||
element.parentElement.parentElement.classList.remove( 'hidden' );
|
||||
numberErrorsDisplaying++;
|
||||
} else {
|
||||
element.parentElement.parentElement.classList.add( 'hidden' );
|
||||
}
|
||||
} );
|
||||
|
||||
component.updateShowingErrorsRow( numberErrorsDisplaying, errorTypeQuery.length );
|
||||
};
|
||||
|
||||
document.getElementById( 'amp_validation_error_type' ).addEventListener( 'change', onChange );
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles searching for errors via the <input> and the 'Search Errors' <button>.
|
||||
*/
|
||||
component.handleSearching = function handleSearching() {
|
||||
const onClick = function( event ) {
|
||||
event.preventDefault();
|
||||
if ( ! event.target.matches( 'input' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
const searchQuery = document.getElementById( 'invalid-url-search-search-input' ).value;
|
||||
const detailsQuery = document.querySelectorAll( 'tbody .column-details' );
|
||||
|
||||
/*
|
||||
* Iterate through the 'Details' column of each row.
|
||||
* If the search query is not present, hide the row.
|
||||
*/
|
||||
let numberErrorsDisplaying = 0;
|
||||
detailsQuery.forEach( function( element ) {
|
||||
let isSearchQueryPresent = false;
|
||||
|
||||
element.querySelectorAll( '.detailed' ).forEach( function( detailed ) {
|
||||
if ( -1 !== detailed.innerText.indexOf( searchQuery ) ) {
|
||||
isSearchQueryPresent = true;
|
||||
}
|
||||
} );
|
||||
|
||||
if ( isSearchQueryPresent ) {
|
||||
element.parentElement.classList.remove( 'hidden' );
|
||||
numberErrorsDisplaying++;
|
||||
} else {
|
||||
element.parentElement.classList.add( 'hidden' );
|
||||
}
|
||||
} );
|
||||
|
||||
component.updateShowingErrorsRow( numberErrorsDisplaying, detailsQuery.length );
|
||||
};
|
||||
|
||||
document.getElementById( 'search-submit' ).addEventListener( 'click', onClick );
|
||||
};
|
||||
|
||||
/**
|
||||
* Update icon for select element.
|
||||
*
|
||||
* @param {HTMLSelectElement} select Select element.
|
||||
*/
|
||||
component.updateSelectIcon = function updateSelectIcon( select ) {
|
||||
const newOption = select.options[ select.selectedIndex ];
|
||||
if ( newOption ) {
|
||||
const iconSrc = newOption.getAttribute( 'data-status-icon' );
|
||||
select.parentNode.querySelector( 'img' ).setAttribute( 'src', iconSrc );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles a change in the error status, like from 'New' to 'Accepted'.
|
||||
*
|
||||
* Gets the data-status-icon value from the newly-selected <option>.
|
||||
* And sets this as the src of the status icon <img>.
|
||||
*/
|
||||
component.handleStatusChange = function handleStatusChange() {
|
||||
const setRowStatusClass = function( { row, select } ) {
|
||||
const acceptedValue = 3;
|
||||
const rejectedValue = 2;
|
||||
const status = parseInt( select.options[ select.selectedIndex ].value );
|
||||
|
||||
row.classList.toggle( 'new', isNaN( status ) );
|
||||
row.classList.toggle( 'accepted', acceptedValue === status );
|
||||
row.classList.toggle( 'rejected', rejectedValue === status );
|
||||
};
|
||||
|
||||
const onChange = function( { event, row, select } ) {
|
||||
if ( event.target.matches( 'select' ) ) {
|
||||
component.updateSelectIcon( event.target );
|
||||
setRowStatusClass( { row, select } );
|
||||
}
|
||||
};
|
||||
|
||||
document.querySelectorAll( 'tr[id^="tag-"]' ).forEach( function( row ) {
|
||||
const select = row.querySelector( '.amp-validation-error-status' );
|
||||
|
||||
if ( select ) {
|
||||
setRowStatusClass( { row, select } );
|
||||
select.addEventListener( 'change', function( event ) {
|
||||
onChange( { event, row, select } );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* On checking a bulk action checkbox, this ensures that the 'Accept' and 'Reject' buttons are present. Handle clicking on buttons.
|
||||
*
|
||||
* They're hidden until one of these boxes is checked.
|
||||
* Also, on unchecking the last checked box, this hides these buttons.
|
||||
*/
|
||||
component.handleBulkActions = function handleBulkActions() {
|
||||
const acceptButton = document.querySelector( 'button.action.accept' );
|
||||
const rejectButton = document.querySelector( 'button.action.reject' );
|
||||
const acceptAndRejectContainer = document.getElementById( 'accept-reject-buttons' );
|
||||
|
||||
const onChange = function( event ) {
|
||||
let areThereCheckedBoxes;
|
||||
|
||||
if ( ! event.target.matches( '[type=checkbox]' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( event.target.checked ) {
|
||||
// This checkbox was checked, so ensure the buttons display.
|
||||
acceptAndRejectContainer.classList.remove( 'hidden' );
|
||||
} else {
|
||||
/*
|
||||
* This checkbox was unchecked.
|
||||
* So find if there are any other checkboxes that are checked.
|
||||
* If not, hide the 'Accept' and 'Reject' buttons.
|
||||
*/
|
||||
areThereCheckedBoxes = false;
|
||||
document.querySelectorAll( '.check-column [type=checkbox]' ).forEach( function( element ) {
|
||||
if ( element.checked ) {
|
||||
areThereCheckedBoxes = true;
|
||||
}
|
||||
} );
|
||||
if ( ! areThereCheckedBoxes ) {
|
||||
acceptAndRejectContainer.classList.add( 'hidden' );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
document.querySelectorAll( '.check-column [type=checkbox]' ).forEach( function( element ) {
|
||||
element.addEventListener( 'change', onChange );
|
||||
} );
|
||||
|
||||
// Handle click on accept button.
|
||||
acceptButton.addEventListener( 'click', function() {
|
||||
Array.prototype.forEach.call( document.querySelectorAll( 'select.amp-validation-error-status' ), function( select ) {
|
||||
if ( select.closest( 'tr' ).querySelector( '.check-column input[type=checkbox]' ).checked ) {
|
||||
select.value = '3';
|
||||
component.updateSelectIcon( select );
|
||||
component.addBeforeUnloadPrompt();
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Handle click on reject button.
|
||||
rejectButton.addEventListener( 'click', function() {
|
||||
Array.prototype.forEach.call( document.querySelectorAll( 'select.amp-validation-error-status' ), function( select ) {
|
||||
if ( select.closest( 'tr' ).querySelector( '.check-column input[type=checkbox]' ).checked ) {
|
||||
select.value = '2';
|
||||
component.updateSelectIcon( select );
|
||||
component.addBeforeUnloadPrompt();
|
||||
}
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Changes the page heading and document title, as this doesn't look to be possible with a PHP filter.
|
||||
*/
|
||||
component.changeHeading = function changeHeading() {
|
||||
const headingQuery = document.getElementsByClassName( 'wp-heading-inline' );
|
||||
if ( headingQuery[ 0 ] && component.data.l10n.page_heading ) {
|
||||
headingQuery[ 0 ].innerText = component.data.l10n.page_heading;
|
||||
document.title = component.data.l10n.page_heading + document.title;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds the AMP icon to the page heading if AMP is enabled on this URL.
|
||||
*/
|
||||
component.showAMPIconIfEnabled = function() {
|
||||
const heading = document.querySelector( 'h1.wp-heading-inline' );
|
||||
if ( heading && true === component.data.l10n.amp_enabled ) {
|
||||
const ampIcon = document.createElement( 'span' );
|
||||
ampIcon.classList.add( 'status-text', 'sanitized' );
|
||||
heading.appendChild( ampIcon );
|
||||
}
|
||||
};
|
||||
|
||||
return component;
|
||||
}() );
|
@ -0,0 +1,34 @@
|
||||
/* exported ampValidatedUrlsIndex */
|
||||
|
||||
const ampValidatedUrlsIndex = ( function() { // eslint-disable-line no-unused-vars
|
||||
let component = {
|
||||
classes: {}
|
||||
};
|
||||
|
||||
/**
|
||||
* The class for the new status
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
component.classes.new = 'new';
|
||||
|
||||
/**
|
||||
* Boot.
|
||||
*/
|
||||
component.boot = function boot() {
|
||||
component.highlightRowsWithNewStatus();
|
||||
};
|
||||
|
||||
/**
|
||||
* Highlight rows with new status.
|
||||
*/
|
||||
component.highlightRowsWithNewStatus = function highlightRowsWithNewStatus() {
|
||||
document.querySelectorAll( 'tr[id^="post-"]' ).forEach( function( row ) {
|
||||
if ( row.querySelector( 'span.status-text.' + component.classes.new ) ) {
|
||||
row.classList.add( 'new' );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
return component;
|
||||
}() );
|
@ -0,0 +1,16 @@
|
||||
// WIP Pointer function
|
||||
function sourcesPointer() {
|
||||
jQuery( document ).on( 'click', '.tooltip-button', function() {
|
||||
jQuery( this ).pointer( {
|
||||
content: jQuery( this ).next( '.tooltip' ).attr( 'data-content' ),
|
||||
position: {
|
||||
edge: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
pointerClass: 'wp-pointer wp-pointer--tooltip'
|
||||
} ).pointer( 'open' );
|
||||
} );
|
||||
}
|
||||
|
||||
// Run at DOM ready.
|
||||
jQuery( sourcesPointer );
|
@ -0,0 +1 @@
|
||||
!function(e){var n={};function t(d){if(n[d])return n[d].exports;var o=n[d]={i:d,l:!1,exports:{}};return e[d].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,d){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:d})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var d=Object.create(null);if(t.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(d,o,function(n){return e[n]}.bind(null,o));return d},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=9)}({9:function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n\n// CONCATENATED MODULE: ./node_modules/@wordpress/dom-ready/build-module/index.js\n/**\n * Specify a function to execute when the DOM is fully loaded.\n *\n * @param {Function} callback A function to execute after the DOM is ready.\n *\n * @example\n * ```js\n * import domReady from '@wordpress/dom-ready';\n *\n * domReady( function() {\n * \t//do something after DOM loads.\n * } );\n * ```\n *\n * @return {void}\n */\nvar domReady = function domReady(callback) {\n if (document.readyState === 'complete' || // DOMContentLoaded + Images/Styles/etc loaded, so we call directly.\n document.readyState === 'interactive' // DOMContentLoaded fires at this point, so we call directly.\n ) {\n return callback();\n } // DOMContentLoaded has not fired yet, delay callback until then.\n\n\n document.addEventListener('DOMContentLoaded', callback);\n};\n\n/* harmony default export */ var build_module = (domReady);\n//# sourceMappingURL=index.js.map\n// CONCATENATED MODULE: ./assets/src/wp-dom-ready.js\n\n\nif (!window.wp) {\n\twindow.wp = {};\n}\n\nwp.domReady = build_module;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9Ad29yZHByZXNzL2RvbS1yZWFkeS9idWlsZC1tb2R1bGUvaW5kZXguanM/ZGE4MSIsIndlYnBhY2s6Ly8vLi9hc3NldHMvc3JjL3dwLWRvbS1yZWFkeS5qcz8yMTJmIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogU3BlY2lmeSBhIGZ1bmN0aW9uIHRvIGV4ZWN1dGUgd2hlbiB0aGUgRE9NIGlzIGZ1bGx5IGxvYWRlZC5cbiAqXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSBjYWxsYmFjayBBIGZ1bmN0aW9uIHRvIGV4ZWN1dGUgYWZ0ZXIgdGhlIERPTSBpcyByZWFkeS5cbiAqXG4gKiBAZXhhbXBsZVxuICogYGBganNcbiAqIGltcG9ydCBkb21SZWFkeSBmcm9tICdAd29yZHByZXNzL2RvbS1yZWFkeSc7XG4gKlxuICogZG9tUmVhZHkoIGZ1bmN0aW9uKCkge1xuICogXHQvL2RvIHNvbWV0aGluZyBhZnRlciBET00gbG9hZHMuXG4gKiB9ICk7XG4gKiBgYGBcbiAqXG4gKiBAcmV0dXJuIHt2b2lkfVxuICovXG52YXIgZG9tUmVhZHkgPSBmdW5jdGlvbiBkb21SZWFkeShjYWxsYmFjaykge1xuICBpZiAoZG9jdW1lbnQucmVhZHlTdGF0ZSA9PT0gJ2NvbXBsZXRlJyB8fCAvLyBET01Db250ZW50TG9hZGVkICsgSW1hZ2VzL1N0eWxlcy9ldGMgbG9hZGVkLCBzbyB3ZSBjYWxsIGRpcmVjdGx5LlxuICBkb2N1bWVudC5yZWFkeVN0YXRlID09PSAnaW50ZXJhY3RpdmUnIC8vIERPTUNvbnRlbnRMb2FkZWQgZmlyZXMgYXQgdGhpcyBwb2ludCwgc28gd2UgY2FsbCBkaXJlY3RseS5cbiAgKSB7XG4gICAgICByZXR1cm4gY2FsbGJhY2soKTtcbiAgICB9IC8vIERPTUNvbnRlbnRMb2FkZWQgaGFzIG5vdCBmaXJlZCB5ZXQsIGRlbGF5IGNhbGxiYWNrIHVudGlsIHRoZW4uXG5cblxuICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdET01Db250ZW50TG9hZGVkJywgY2FsbGJhY2spO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgZG9tUmVhZHk7XG4vLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5qcy5tYXAiLCJpbXBvcnQgZG9tUmVhZHkgZnJvbSAnQHdvcmRwcmVzcy9kb20tcmVhZHknO1xuXG5pZiAoIXdpbmRvdy53cCkge1xuXHR3aW5kb3cud3AgPSB7fTtcbn1cblxud3AuZG9tUmVhZHkgPSBkb21SZWFkeTsiXSwibWFwcGluZ3MiOiI7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDNUJBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///9\n")}});
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Functions for managing legacy templates
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adds hooks to use legacy templates.
|
||||
*
|
||||
* If you want to use the template that shipped with v0.3 and earlier, you can use this to force that.
|
||||
* Note that this may not stick around forever, so use caution and `function_exists`.
|
||||
*/
|
||||
function amp_backcompat_use_v03_templates() {
|
||||
add_filter( 'amp_customizer_is_enabled', '__return_false' );
|
||||
add_filter( 'amp_post_template_dir', '_amp_backcompat_use_v03_templates_callback', 0 ); // Early in case there are other overrides.
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for getting the legacy templates directory.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @param string $templates Template directory.
|
||||
* @return string Legacy template directory.
|
||||
*/
|
||||
function _amp_backcompat_use_v03_templates_callback( $templates ) {
|
||||
return AMP__DIR__ . '/back-compat/templates-v0-3';
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Legacy template for the AMP title bar.
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
$site_icon_url = $this->get( 'site_icon_url' );
|
||||
?>
|
||||
|
||||
<nav class="amp-wp-title-bar">
|
||||
<div>
|
||||
<a href="<?php echo esc_url( $this->get( 'home_url' ) ); ?>">
|
||||
<?php if ( $site_icon_url ) : ?>
|
||||
<amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo esc_html( $this->get( 'blog_name' ) ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Legacy template for the AMP author byline.
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
$post_author = $this->get( 'post_author' );
|
||||
$avatar_url = get_avatar_url(
|
||||
$post_author->user_email,
|
||||
array(
|
||||
'size' => 24,
|
||||
)
|
||||
);
|
||||
?>
|
||||
<li class="amp-wp-byline">
|
||||
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
|
||||
<amp-img src="<?php echo esc_url( $avatar_url ); ?>" width="24" height="24" layout="fixed"></amp-img>
|
||||
<?php endif; ?>
|
||||
<span class="amp-wp-author"><?php echo esc_html( $post_author->display_name ); ?></span>
|
||||
</li>
|
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Legacy template for the AMP post taxonomy term lists.
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
$categories = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'amp' ) );
|
||||
?>
|
||||
<?php if ( $categories ) : ?>
|
||||
<li class="amp-wp-tax-category">
|
||||
<span class="screen-reader-text">Categories:</span>
|
||||
<?php echo $categories; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $tags = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'amp' ) ); ?>
|
||||
<?php if ( $tags && ! is_wp_error( $tags ) ) : ?>
|
||||
<li class="amp-wp-tax-tag">
|
||||
<span class="screen-reader-text">Tags:</span>
|
||||
<?php echo $tags; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Legacy template for the AMP post date.
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
?>
|
||||
<li class="amp-wp-posted-on">
|
||||
<time datetime="<?php echo esc_attr( date( 'c', $this->get( 'post_publish_timestamp' ) ) ); ?>">
|
||||
<?php
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
/* translators: %s: the human-readable time difference. */
|
||||
__( '%s ago', 'amp' ),
|
||||
human_time_diff( $this->get( 'post_publish_timestamp' ), current_time( 'timestamp' ) )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</time>
|
||||
</li>
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Legacy template for the AMP post.
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
?>
|
||||
<!doctype html>
|
||||
<html amp <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<?php do_action( 'amp_post_template_head', $this ); ?>
|
||||
|
||||
<style amp-custom>
|
||||
<?php $this->load_parts( array( 'style' ) ); ?>
|
||||
<?php do_action( 'amp_post_template_css', $this ); ?>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
||||
<div class="amp-wp-content">
|
||||
<h1 class="amp-wp-title"><?php echo wp_kses_data( $this->get( 'post_title' ) ); ?></h1>
|
||||
<ul class="amp-wp-meta">
|
||||
<?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author', 'meta-time', 'meta-taxonomy' ) ) ); ?>
|
||||
</ul>
|
||||
<?php echo $this->get( 'post_amp_content' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
<?php do_action( 'amp_post_template_footer', $this ); ?>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,252 @@
|
||||
<?php
|
||||
/**
|
||||
* Legacy template for the AMP stylesheet.
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
?>
|
||||
/* Merriweather fonts */
|
||||
@font-face {
|
||||
font-family:'Merriweather';
|
||||
src:url('https://s1.wp.com/i/fonts/merriweather/merriweather-regular-webfont.woff2') format('woff2'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-regular-webfont.woff') format('woff'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-regular-webfont.ttf') format('truetype'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-regular-webfont.svg#merriweatherregular') format('svg');
|
||||
font-weight:400;
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family:'Merriweather';
|
||||
src:url('https://s1.wp.com/i/fonts/merriweather/merriweather-italic-webfont.woff2') format('woff2'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-italic-webfont.woff') format('woff'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-italic-webfont.ttf') format('truetype'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-italic-webfont.svg#merriweatheritalic') format('svg');
|
||||
font-weight:400;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family:'Merriweather';
|
||||
src:url('https://s1.wp.com/i/fonts/merriweather/merriweather-bold-webfont.woff2') format('woff2'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-bold-webfont.woff') format('woff'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-bold-webfont.ttf') format('truetype'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-bold-webfont.svg#merriweatherbold') format('svg');
|
||||
font-weight:700;
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family:'Merriweather';
|
||||
src:url('https://s1.wp.com/i/fonts/merriweather/merriweather-bolditalic-webfont.woff2') format('woff2'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-bolditalic-webfont.woff') format('woff'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-bolditalic-webfont.ttf') format('truetype'),
|
||||
url('https://s1.wp.com/i/fonts/merriweather/merriweather-bolditalic-webfont.svg#merriweatherbold_italic') format('svg');
|
||||
font-weight:700;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
/* Generic WP styling */
|
||||
amp-img.alignright { float: right; margin: 0 0 1em 1em; }
|
||||
amp-img.alignleft { float: left; margin: 0 1em 1em 0; }
|
||||
amp-img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
|
||||
.alignright { float: right; }
|
||||
.alignleft { float: left; }
|
||||
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
|
||||
|
||||
.wp-caption.alignleft { margin-right: 1em; }
|
||||
.wp-caption.alignright { margin-left: 1em; }
|
||||
|
||||
.amp-wp-enforced-sizes {
|
||||
/** Our sizes fallback is 100vw, and we have a padding on the container; the max-width here prevents the element from overflowing. **/
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.amp-wp-unknown-size img {
|
||||
/** Worst case scenario when we can't figure out dimensions for an image. **/
|
||||
/** Force the image into a box of fixed dimensions and use object-fit to scale. **/
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* Template Styles */
|
||||
.amp-wp-content, .amp-wp-title-bar div {
|
||||
<?php $content_max_width = absint( $this->get( 'content_max_width' ) ); ?>
|
||||
<?php if ( $content_max_width > 0 ) : ?>
|
||||
max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>;
|
||||
margin: 0 auto;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Merriweather', Serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.8;
|
||||
background: #fff;
|
||||
color: #3d596d;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.amp-wp-content {
|
||||
padding: 16px;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
font-weight: 400;
|
||||
color: #3d596d;
|
||||
}
|
||||
|
||||
.amp-wp-title {
|
||||
margin: 36px 0 0 0;
|
||||
font-size: 36px;
|
||||
line-height: 1.258;
|
||||
font-weight: 700;
|
||||
color: #2e4453;
|
||||
}
|
||||
|
||||
.amp-wp-meta {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
p,
|
||||
ol,
|
||||
ul,
|
||||
figure {
|
||||
margin: 0 0 24px 0;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
color: #0087be;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:active,
|
||||
a:focus {
|
||||
color: #33bbe3;
|
||||
}
|
||||
|
||||
|
||||
/* UI Fonts */
|
||||
.amp-wp-meta,
|
||||
nav.amp-wp-title-bar,
|
||||
.wp-caption-text {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
|
||||
/* Meta */
|
||||
ul.amp-wp-meta {
|
||||
padding: 24px 0 0 0;
|
||||
margin: 0 0 24px 0;
|
||||
}
|
||||
|
||||
ul.amp-wp-meta li {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
ul.amp-wp-meta li:before {
|
||||
content: "\2022";
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
ul.amp-wp-meta li:first-child:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.amp-wp-meta,
|
||||
.amp-wp-meta a {
|
||||
color: #4f748e;
|
||||
}
|
||||
|
||||
.amp-wp-meta .screen-reader-text {
|
||||
/* from twentyfifteen */
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.amp-wp-byline amp-img {
|
||||
border-radius: 50%;
|
||||
border: 0;
|
||||
background: #f3f6f8;
|
||||
position: relative;
|
||||
top: 6px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
/* Titlebar */
|
||||
nav.amp-wp-title-bar {
|
||||
background: <?php echo esc_html( $this->get_customizer_setting( 'navbar_background', self::DEFAULT_NAVBAR_BACKGROUND ) ); // not ideal for escaping here, but better than nothing? ?>;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
nav.amp-wp-title-bar div {
|
||||
line-height: 54px;
|
||||
color: <?php echo esc_html( $this->get_customizer_setting( 'navbar_color', self::DEFAULT_NAVBAR_COLOR ) ); ?>;
|
||||
}
|
||||
|
||||
nav.amp-wp-title-bar a {
|
||||
color: <?php echo esc_html( $this->get_customizer_setting( 'navbar_color', self::DEFAULT_NAVBAR_COLOR ) ); ?>;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav.amp-wp-title-bar .amp-wp-site-icon {
|
||||
/** site icon is 32px **/
|
||||
float: left;
|
||||
margin: 11px 8px 0 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Captions */
|
||||
.wp-caption-text {
|
||||
padding: 8px 16px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
/* Quotes */
|
||||
blockquote {
|
||||
padding: 16px;
|
||||
margin: 8px 0 24px 0;
|
||||
border-left: 2px solid #87a6bc;
|
||||
color: #4f748e;
|
||||
background: #e9eff3;
|
||||
}
|
||||
|
||||
blockquote p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Other Elements */
|
||||
amp-carousel {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
amp-iframe,
|
||||
amp-youtube,
|
||||
amp-instagram,
|
||||
amp-vine {
|
||||
background: #f3f6f8;
|
||||
}
|
||||
|
||||
amp-carousel > amp-img > img {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.amp-wp-iframe-placeholder {
|
||||
background: #f3f6f8 url( <?php echo esc_url( $this->get( 'placeholder_image_url' ) ); ?> ) no-repeat center 40%;
|
||||
background-size: 48px 48px;
|
||||
min-height: 48px;
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin pointer class.
|
||||
*
|
||||
* @package AMP
|
||||
* @since 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* AMP_Admin_Pointer class.
|
||||
*
|
||||
* Outputs an admin pointer to show the new features of v1.0.
|
||||
* Based on https://code.tutsplus.com/articles/integrating-with-wordpress-ui-admin-pointers--wp-26853
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class AMP_Admin_Pointer {
|
||||
|
||||
/**
|
||||
* The ID of the template mode admin pointer.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const TEMPLATE_POINTER_ID = 'amp_template_mode_pointer_10';
|
||||
|
||||
/**
|
||||
* The slug of the script.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const SCRIPT_SLUG = 'amp-admin-pointer';
|
||||
|
||||
/**
|
||||
* The slug of the tooltip script.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const TOOLTIP_SLUG = 'amp-validation-tooltips';
|
||||
|
||||
/**
|
||||
* Initializes the class.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function init() {
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_pointer' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'register_tooltips' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues the pointer assets.
|
||||
*
|
||||
* If the pointer has not been dismissed, enqueues the style and script.
|
||||
* And outputs the pointer data for the script.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function enqueue_pointer() {
|
||||
if ( $this->is_pointer_dismissed() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_style( 'wp-pointer' );
|
||||
|
||||
wp_enqueue_script(
|
||||
self::SCRIPT_SLUG,
|
||||
amp_get_asset_url( 'js/' . self::SCRIPT_SLUG . '.js' ),
|
||||
array( 'jquery', 'wp-pointer' ),
|
||||
AMP__VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
wp_add_inline_script(
|
||||
self::SCRIPT_SLUG,
|
||||
sprintf( 'ampAdminPointer.load( %s );', wp_json_encode( $this->get_pointer_data() ) )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers style and script for tooltips.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function register_tooltips() {
|
||||
wp_register_style(
|
||||
self::TOOLTIP_SLUG,
|
||||
amp_get_asset_url( 'css/' . self::TOOLTIP_SLUG . '.css' ),
|
||||
array( 'wp-pointer' ),
|
||||
AMP__VERSION
|
||||
);
|
||||
|
||||
wp_register_script(
|
||||
self::TOOLTIP_SLUG,
|
||||
amp_get_asset_url( 'js/' . self::TOOLTIP_SLUG . '.js' ),
|
||||
array( 'jquery', 'wp-pointer' ),
|
||||
AMP__VERSION,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the AMP admin pointer has been dismissed.
|
||||
*
|
||||
* @since 1.0
|
||||
* @return boolean Is dismissed.
|
||||
*/
|
||||
protected function is_pointer_dismissed() {
|
||||
|
||||
// Consider dismissed in v1.1, since admin pointer is only to educate about the new modes in 1.0.
|
||||
if ( version_compare( strtok( AMP__VERSION, '-' ), '1.1', '>=' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$dismissed = get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true );
|
||||
if ( empty( $dismissed ) ) {
|
||||
return false;
|
||||
}
|
||||
$dismissed = explode( ',', strval( $dismissed ) );
|
||||
|
||||
return in_array( self::TEMPLATE_POINTER_ID, $dismissed, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the pointer data to pass to the script.
|
||||
*
|
||||
* @since 1.0
|
||||
* @return array Pointer data.
|
||||
*/
|
||||
public function get_pointer_data() {
|
||||
return array(
|
||||
'pointer' => array(
|
||||
'pointer_id' => self::TEMPLATE_POINTER_ID,
|
||||
'target' => '#toplevel_page_amp-options',
|
||||
'options' => array(
|
||||
'content' => sprintf(
|
||||
'<h3>%s</h3><p><strong>%s</strong></p><p>%s</p>',
|
||||
__( 'AMP', 'amp' ),
|
||||
__( 'New AMP Template Modes', 'amp' ),
|
||||
__( 'You can now reuse your theme\'s templates and styles in AMP responses, in both “Transitional” and “Native” modes.', 'amp' )
|
||||
),
|
||||
'position' => array(
|
||||
'edge' => 'left',
|
||||
'align' => 'middle',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,332 @@
|
||||
<?php
|
||||
/**
|
||||
* Class AMP_Template_Customizer
|
||||
*
|
||||
* @package AMP
|
||||
*/
|
||||
|
||||
/**
|
||||
* AMP class that implements a template style editor in the Customizer.
|
||||
*
|
||||
* A direct, formed link to the AMP editor in the Customizer is added via
|
||||
* {@see amp_customizer_editor_link()} as a submenu to the Appearance menu.
|
||||
*
|
||||
* @since 0.4
|
||||
*/
|
||||
class AMP_Template_Customizer {
|
||||
|
||||
/**
|
||||
* AMP template editor panel ID.
|
||||
*
|
||||
* @since 0.4
|
||||
* @var string
|
||||
*/
|
||||
const PANEL_ID = 'amp_panel';
|
||||
|
||||
/**
|
||||
* Customizer instance.
|
||||
*
|
||||
* @since 0.4
|
||||
* @access protected
|
||||
* @var WP_Customize_Manager $wp_customize
|
||||
*/
|
||||
protected $wp_customize;
|
||||
|
||||
/**
|
||||
* Initialize the template Customizer feature class.
|
||||
*
|
||||
* @static
|
||||
* @since 0.4
|
||||
* @access public
|
||||
*
|
||||
* @param WP_Customize_Manager $wp_customize Customizer instance.
|
||||
*/
|
||||
public static function init( $wp_customize ) {
|
||||
$self = new self();
|
||||
|
||||
$self->wp_customize = $wp_customize;
|
||||
|
||||
/**
|
||||
* Fires when the AMP Template Customizer initializes.
|
||||
*
|
||||
* In practice the `customize_register` hook should be used instead.
|
||||
*
|
||||
* @since 0.4
|
||||
* @param AMP_Template_Customizer $self Instance.
|
||||
*/
|
||||
do_action( 'amp_customizer_init', $self );
|
||||
|
||||
$self->register_settings();
|
||||
$self->register_ui();
|
||||
|
||||
add_action( 'customize_controls_enqueue_scripts', array( $self, 'add_customizer_scripts' ) );
|
||||
add_action( 'customize_controls_print_footer_scripts', array( $self, 'print_controls_templates' ) );
|
||||
add_action( 'customize_preview_init', array( $self, 'init_preview' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Init Customizer preview.
|
||||
*
|
||||
* @since 0.4
|
||||
* @global WP_Customize_Manager $wp_customize
|
||||
*/
|
||||
public function init_preview() {
|
||||
add_action( 'amp_post_template_head', 'wp_no_robots' );
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_preview_scripts' ) );
|
||||
add_action( 'amp_customizer_enqueue_preview_scripts', array( $this, 'enqueue_preview_scripts' ) );
|
||||
|
||||
// Output scripts and styles which will break AMP validation only when preview is opened with controls for manipulation.
|
||||
if ( $this->wp_customize->get_messenger_channel() ) {
|
||||
add_action( 'amp_post_template_head', array( $this->wp_customize, 'customize_preview_loading_style' ) );
|
||||
add_action( 'amp_post_template_css', array( $this, 'add_customize_preview_styles' ) );
|
||||
add_action( 'amp_post_template_head', array( $this->wp_customize, 'remove_frameless_preview_messenger_channel' ) );
|
||||
add_action( 'amp_post_template_footer', array( $this, 'add_preview_scripts' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the AMP Customizer preview.
|
||||
*/
|
||||
public function register_ui() {
|
||||
$this->wp_customize->add_panel(
|
||||
self::PANEL_ID,
|
||||
array(
|
||||
'type' => 'amp',
|
||||
'title' => __( 'AMP', 'amp' ),
|
||||
/* translators: placeholder is URL to AMP project. */
|
||||
'description' => sprintf( __( '<a href="%s" target="_blank">The AMP Project</a> is a Google-led initiative that dramatically improves loading speeds on phones and tablets. You can use the Customizer to preview changes to your AMP template before publishing them.', 'amp' ), 'https://ampproject.org' ),
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Fires after the AMP panel has been registered for plugins to add additional controls.
|
||||
*
|
||||
* In practice the `customize_register` hook should be used instead.
|
||||
*
|
||||
* @since 0.4
|
||||
* @param WP_Customize_Manager $manager Manager.
|
||||
*/
|
||||
do_action( 'amp_customizer_register_ui', $this->wp_customize );
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers settings for customizing AMP templates.
|
||||
*
|
||||
* @since 0.4
|
||||
*/
|
||||
public function register_settings() {
|
||||
|
||||
/**
|
||||
* Fires when plugins should register settings for AMP.
|
||||
*
|
||||
* In practice the `customize_register` hook should be used instead.
|
||||
*
|
||||
* @since 0.4
|
||||
* @param WP_Customize_Manager $manager Manager.
|
||||
*/
|
||||
do_action( 'amp_customizer_register_settings', $this->wp_customize );
|
||||
}
|
||||
|
||||
/**
|
||||
* Load up AMP scripts needed for Customizer integrations.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
public function add_customizer_scripts() {
|
||||
if ( ! amp_is_canonical() ) {
|
||||
wp_enqueue_script(
|
||||
'amp-customize-controls',
|
||||
amp_get_asset_url( 'js/amp-customize-controls.js' ),
|
||||
array( 'jquery', 'customize-controls' ),
|
||||
AMP__VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
wp_add_inline_script(
|
||||
'amp-customize-controls',
|
||||
sprintf(
|
||||
'ampCustomizeControls.boot( %s );',
|
||||
wp_json_encode(
|
||||
array(
|
||||
'queryVar' => amp_get_slug(),
|
||||
'panelId' => self::PANEL_ID,
|
||||
'ampUrl' => amp_admin_get_preview_permalink(),
|
||||
'l10n' => array(
|
||||
'unavailableMessage' => __( 'AMP is not available for the page currently being previewed.', 'amp' ),
|
||||
'unavailableLinkText' => __( 'Navigate to an AMP compatible page', 'amp' ),
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
||||
wp_enqueue_style(
|
||||
'amp-customizer',
|
||||
amp_get_asset_url( 'css/amp-customizer.css' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires when plugins should register settings for AMP.
|
||||
*
|
||||
* In practice the `customize_controls_enqueue_scripts` hook should be used instead.
|
||||
*
|
||||
* @since 0.4
|
||||
* @param WP_Customize_Manager $manager Manager.
|
||||
*/
|
||||
do_action( 'amp_customizer_enqueue_scripts', $this->wp_customize );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues scripts used in both the AMP and non-AMP Customizer preview.
|
||||
*
|
||||
* @since 0.6
|
||||
* @global WP_Query $wp_query
|
||||
*/
|
||||
public function enqueue_preview_scripts() {
|
||||
global $wp_query;
|
||||
|
||||
// Bail if user can't customize anyway.
|
||||
if ( ! current_user_can( 'customize' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script(
|
||||
'amp-customize-preview',
|
||||
amp_get_asset_url( 'js/amp-customize-preview.js' ),
|
||||
array( 'jquery', 'customize-preview' ),
|
||||
AMP__VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
if ( current_theme_supports( AMP_Theme_Support::SLUG ) ) {
|
||||
$availability = AMP_Theme_Support::get_template_availability();
|
||||
$available = $availability['supported'];
|
||||
} elseif ( is_singular() || $wp_query->is_posts_page ) {
|
||||
/**
|
||||
* Queried object.
|
||||
*
|
||||
* @var WP_Post $queried_object
|
||||
*/
|
||||
$queried_object = get_queried_object();
|
||||
$available = post_supports_amp( $queried_object );
|
||||
} else {
|
||||
$available = false;
|
||||
}
|
||||
|
||||
wp_add_inline_script(
|
||||
'amp-customize-preview',
|
||||
sprintf(
|
||||
'ampCustomizePreview.boot( %s );',
|
||||
wp_json_encode(
|
||||
array(
|
||||
'available' => $available,
|
||||
'enabled' => is_amp_endpoint(),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add AMP Customizer preview styles.
|
||||
*/
|
||||
public function add_customize_preview_styles() {
|
||||
?>
|
||||
/* Text meant only for screen readers; this is needed for wp.a11y.speak() */
|
||||
.screen-reader-text {
|
||||
border: 0;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
-webkit-clip-path: inset(50%);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
word-wrap: normal !important;
|
||||
}
|
||||
body.wp-customizer-unloading {
|
||||
opacity: 0.25 !important; /* Because AMP sets body to opacity:1 once layout complete. */
|
||||
}
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues scripts and does wp_print_footer_scripts() so we can output customizer scripts.
|
||||
*
|
||||
* This breaks AMP validation in the customizer but is necessary for the live preview.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
public function add_preview_scripts() {
|
||||
|
||||
// Bail if user can't customize anyway.
|
||||
if ( ! current_user_can( 'customize' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'customize-selective-refresh' );
|
||||
wp_enqueue_script( 'amp-customize-preview' );
|
||||
|
||||
/**
|
||||
* Fires when plugins should enqueue their own scripts for the AMP Customizer preview.
|
||||
*
|
||||
* @since 0.4
|
||||
* @param WP_Customize_Manager $wp_customize Manager.
|
||||
*/
|
||||
do_action( 'amp_customizer_enqueue_preview_scripts', $this->wp_customize );
|
||||
|
||||
$this->wp_customize->customize_preview_settings();
|
||||
$this->wp_customize->selective_refresh->export_preview_data();
|
||||
|
||||
wp_print_footer_scripts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print templates needed for AMP in Customizer.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
public function print_controls_templates() {
|
||||
?>
|
||||
<script type="text/html" id="tmpl-customize-amp-enabled-toggle">
|
||||
<div class="amp-toggle">
|
||||
<# var elementIdPrefix = _.uniqueId( 'customize-amp-enabled-toggle' ); #>
|
||||
<div id="{{ elementIdPrefix }}tooltip" aria-hidden="true" class="tooltip" role="tooltip">
|
||||
{{ data.message }}
|
||||
<# if ( data.url ) { #>
|
||||
<a href="{{ data.url }}">{{ data.linkText }}</a>
|
||||
<# } #>
|
||||
</div>
|
||||
<input id="{{ elementIdPrefix }}checkbox" type="checkbox" class="disabled" aria-describedby="{{ elementIdPrefix }}tooltip">
|
||||
<span class="slider"></span>
|
||||
<label for="{{ elementIdPrefix }}checkbox" class="screen-reader-text"><?php esc_html_e( 'AMP preview enabled', 'amp' ); ?></label>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="tmpl-customize-amp-unavailable-notification">
|
||||
<li class="notice notice-{{ data.type || 'info' }} {{ data.alt ? 'notice-alt' : '' }} {{ data.containerClasses || '' }}" data-code="{{ data.code }}" data-type="{{ data.type }}">
|
||||
<div class="notification-message">
|
||||
{{ data.message }}
|
||||
<# if ( data.url ) { #>
|
||||
<a href="{{ data.url }}">{{ data.linkText }}</a>
|
||||
<# } #>
|
||||
</div>
|
||||
</li>
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the Customizer is AMP. This is always true since the AMP Customizer has been merged with the main Customizer.
|
||||
*
|
||||
* @deprecated 0.6
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_amp_customizer() {
|
||||
_deprecated_function( __METHOD__, '0.6' );
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,210 @@
|
||||
<?php
|
||||
/**
|
||||
* AMP Editor Blocks extending.
|
||||
*
|
||||
* @package AMP
|
||||
* @since 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class AMP_Editor_Blocks
|
||||
*/
|
||||
class AMP_Editor_Blocks {
|
||||
|
||||
/**
|
||||
* List of AMP scripts that need to be printed when AMP components are used in non-AMP document context ("dirty AMP").
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $content_required_amp_scripts = array();
|
||||
|
||||
/**
|
||||
* AMP components that have blocks.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $amp_blocks = array(
|
||||
'amp-mathml',
|
||||
'amp-timeago',
|
||||
'amp-o2-player',
|
||||
'amp-ooyala-player',
|
||||
'amp-reach-player',
|
||||
'amp-springboard-player',
|
||||
'amp-jwplayer',
|
||||
'amp-brid-player',
|
||||
'amp-ima-video',
|
||||
'amp-fit-text',
|
||||
);
|
||||
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
public function init() {
|
||||
if ( function_exists( 'register_block_type' ) ) {
|
||||
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );
|
||||
add_filter( 'wp_kses_allowed_html', array( $this, 'whitelist_block_atts_in_wp_kses_allowed_html' ), 10, 2 );
|
||||
|
||||
/*
|
||||
* Dirty AMP is required when a site is in native mode but not all templates are being served
|
||||
* as AMP. In particular, if a single post is using AMP-specific Gutenberg Blocks which make
|
||||
* use of AMP components, and the singular template is served as AMP but the blog page is not,
|
||||
* then the non-AMP blog page need to load the AMP runtime scripts so that the AMP components
|
||||
* in the posts displayed there will be rendered properly. This is only relevant on native AMP
|
||||
* sites because the AMP Gutenberg blocks are only made available in that mode; they are not
|
||||
* presented in the Gutenberg inserter in transitional mode. In general, using AMP components in
|
||||
* non-AMP documents is still not officially supported, so it's occurrence is being minimized
|
||||
* as much as possible. For more, see <https://github.com/ampproject/amp-wp/issues/1192>.
|
||||
*/
|
||||
if ( amp_is_canonical() ) {
|
||||
add_filter( 'the_content', array( $this, 'tally_content_requiring_amp_scripts' ) );
|
||||
add_action( 'wp_print_footer_scripts', array( $this, 'print_dirty_amp_scripts' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whitelist elements and attributes used for AMP.
|
||||
*
|
||||
* This prevents AMP markup from being deleted in
|
||||
*
|
||||
* @param array $tags Array of allowed post tags.
|
||||
* @param string $context Context.
|
||||
* @return mixed Modified array.
|
||||
*/
|
||||
public function whitelist_block_atts_in_wp_kses_allowed_html( $tags, $context ) {
|
||||
if ( 'post' !== $context ) {
|
||||
return $tags;
|
||||
}
|
||||
|
||||
foreach ( $tags as &$tag ) {
|
||||
if ( ! is_array( $tag ) ) {
|
||||
continue;
|
||||
}
|
||||
$tag['data-amp-layout'] = true;
|
||||
$tag['data-amp-noloading'] = true;
|
||||
$tag['data-amp-lightbox'] = true;
|
||||
$tag['data-close-button-aria-label'] = true;
|
||||
}
|
||||
|
||||
foreach ( $this->amp_blocks as $amp_block ) {
|
||||
if ( ! isset( $tags[ $amp_block ] ) ) {
|
||||
$tags[ $amp_block ] = array();
|
||||
}
|
||||
|
||||
// @todo The global attributes included here should be matched up with what is actually used by each block.
|
||||
$tags[ $amp_block ] = array_merge(
|
||||
array_fill_keys(
|
||||
array(
|
||||
'layout',
|
||||
'width',
|
||||
'height',
|
||||
'class',
|
||||
),
|
||||
true
|
||||
),
|
||||
$tags[ $amp_block ]
|
||||
);
|
||||
|
||||
$amp_tag_specs = AMP_Allowed_Tags_Generated::get_allowed_tag( $amp_block );
|
||||
foreach ( $amp_tag_specs as $amp_tag_spec ) {
|
||||
if ( ! isset( $amp_tag_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] ) ) {
|
||||
continue;
|
||||
}
|
||||
$tags[ $amp_block ] = array_merge(
|
||||
$tags[ $amp_block ],
|
||||
array_fill_keys( array_keys( $amp_tag_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] ), true )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue filters for extending core blocks attributes.
|
||||
* Has to be loaded before registering the blocks in registerCoreBlocks.
|
||||
*/
|
||||
public function enqueue_block_editor_assets() {
|
||||
|
||||
// Enqueue script and style for AMP-specific blocks.
|
||||
if ( amp_is_canonical() ) {
|
||||
wp_enqueue_style(
|
||||
'amp-editor-blocks-style',
|
||||
amp_get_asset_url( 'css/amp-editor-blocks.css' ),
|
||||
array(),
|
||||
AMP__VERSION
|
||||
);
|
||||
|
||||
// phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
|
||||
wp_enqueue_script(
|
||||
'amp-editor-blocks-build',
|
||||
amp_get_asset_url( 'js/amp-blocks-compiled.js' ),
|
||||
array( 'wp-editor', 'wp-blocks', 'lodash', 'wp-i18n', 'wp-element', 'wp-components' ),
|
||||
AMP__VERSION
|
||||
);
|
||||
|
||||
if ( function_exists( 'wp_set_script_translations' ) ) {
|
||||
wp_set_script_translations( 'amp-editor-blocks-build', 'amp' );
|
||||
}
|
||||
}
|
||||
|
||||
wp_enqueue_script(
|
||||
'amp-editor-blocks',
|
||||
amp_get_asset_url( 'js/amp-editor-blocks.js' ),
|
||||
array( 'underscore', 'wp-hooks', 'wp-i18n', 'wp-components' ),
|
||||
AMP__VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
wp_add_inline_script(
|
||||
'amp-editor-blocks',
|
||||
sprintf(
|
||||
'ampEditorBlocks.boot( %s );',
|
||||
wp_json_encode(
|
||||
array(
|
||||
'hasThemeSupport' => current_theme_supports( AMP_Theme_Support::SLUG ),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ( function_exists( 'wp_set_script_translations' ) ) {
|
||||
wp_set_script_translations( 'amp-editor-blocks', 'amp' );
|
||||
} elseif ( function_exists( 'wp_get_jed_locale_data' ) || function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
||||
$locale_data = function_exists( 'wp_get_jed_locale_data' ) ? wp_get_jed_locale_data( 'amp' ) : gutenberg_get_jed_locale_data( 'amp' );
|
||||
wp_add_inline_script(
|
||||
'wp-i18n',
|
||||
'wp.i18n.setLocaleData( ' . wp_json_encode( $locale_data ) . ', "amp" );',
|
||||
'after'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tally the AMP component scripts that are needed in a dirty AMP document.
|
||||
*
|
||||
* @param string $content Content.
|
||||
* @return string Content (unmodified).
|
||||
*/
|
||||
public function tally_content_requiring_amp_scripts( $content ) {
|
||||
if ( ! is_amp_endpoint() ) {
|
||||
$pattern = sprintf( '/<(%s)\b.*?>/s', join( '|', $this->amp_blocks ) );
|
||||
if ( preg_match_all( $pattern, $content, $matches ) ) {
|
||||
$this->content_required_amp_scripts = array_merge(
|
||||
$this->content_required_amp_scripts,
|
||||
$matches[1]
|
||||
);
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print AMP scripts required for AMP components used in a non-AMP document (dirty AMP).
|
||||
*/
|
||||
public function print_dirty_amp_scripts() {
|
||||
if ( ! is_amp_endpoint() && ! empty( $this->content_required_amp_scripts ) ) {
|
||||
wp_scripts()->do_items( $this->content_required_amp_scripts );
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,394 @@
|
||||
<?php
|
||||
/**
|
||||
* AMP meta box settings.
|
||||
*
|
||||
* @package AMP
|
||||
* @since 0.6
|
||||
*/
|
||||
|
||||
/**
|
||||
* Post meta box class.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
class AMP_Post_Meta_Box {
|
||||
|
||||
/**
|
||||
* Assets handle.
|
||||
*
|
||||
* @since 0.6
|
||||
* @var string
|
||||
*/
|
||||
const ASSETS_HANDLE = 'amp-post-meta-box';
|
||||
|
||||
/**
|
||||
* Block asset handle.
|
||||
*
|
||||
* @since 1.0
|
||||
* @var string
|
||||
*/
|
||||
const BLOCK_ASSET_HANDLE = 'amp-block-editor-toggle-compiled';
|
||||
|
||||
/**
|
||||
* The enabled status post meta value.
|
||||
*
|
||||
* @since 0.6
|
||||
* @var string
|
||||
*/
|
||||
const ENABLED_STATUS = 'enabled';
|
||||
|
||||
/**
|
||||
* The disabled status post meta value.
|
||||
*
|
||||
* @since 0.6
|
||||
* @var string
|
||||
*/
|
||||
const DISABLED_STATUS = 'disabled';
|
||||
|
||||
/**
|
||||
* The status post meta key.
|
||||
*
|
||||
* @since 0.6
|
||||
* @var string
|
||||
*/
|
||||
const STATUS_POST_META_KEY = 'amp_status';
|
||||
|
||||
/**
|
||||
* The field name for the enabled/disabled radio buttons.
|
||||
*
|
||||
* @since 0.6
|
||||
* @var string
|
||||
*/
|
||||
const STATUS_INPUT_NAME = 'amp_status';
|
||||
|
||||
/**
|
||||
* The nonce name.
|
||||
*
|
||||
* @since 0.6
|
||||
* @var string
|
||||
*/
|
||||
const NONCE_NAME = 'amp-status-nonce';
|
||||
|
||||
/**
|
||||
* The nonce action.
|
||||
*
|
||||
* @since 0.6
|
||||
* @var string
|
||||
*/
|
||||
const NONCE_ACTION = 'amp-update-status';
|
||||
|
||||
/**
|
||||
* Initialize.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
public function init() {
|
||||
register_meta(
|
||||
'post',
|
||||
self::STATUS_POST_META_KEY,
|
||||
array(
|
||||
'sanitize_callback' => array( $this, 'sanitize_status' ),
|
||||
'type' => 'string',
|
||||
'description' => __( 'AMP status.', 'amp' ),
|
||||
'show_in_rest' => true,
|
||||
'single' => true,
|
||||
)
|
||||
);
|
||||
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
|
||||
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_assets' ) );
|
||||
add_action( 'post_submitbox_misc_actions', array( $this, 'render_status' ) );
|
||||
add_action( 'save_post', array( $this, 'save_amp_status' ) );
|
||||
add_filter( 'preview_post_link', array( $this, 'preview_post_link' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize status.
|
||||
*
|
||||
* @param string $status Status.
|
||||
* @return string Sanitized status. Empty string when invalid.
|
||||
*/
|
||||
public function sanitize_status( $status ) {
|
||||
$status = strtolower( trim( $status ) );
|
||||
if ( ! in_array( $status, array( self::ENABLED_STATUS, self::DISABLED_STATUS ), true ) ) {
|
||||
/*
|
||||
* In lieu of actual validation being available, clear the status entirely
|
||||
* so that the underlying default status will be used instead.
|
||||
* In the future it would be ideal if register_meta() accepted a
|
||||
* validate_callback as well which the REST API could leverage.
|
||||
*/
|
||||
$status = '';
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue admin assets.
|
||||
*
|
||||
* @since 0.6
|
||||
*/
|
||||
public function enqueue_admin_assets() {
|
||||
$post = get_post();
|
||||
$screen = get_current_screen();
|
||||
$validate = (
|
||||
isset( $screen->base )
|
||||
&&
|
||||
'post' === $screen->base
|
||||
&&
|
||||
is_post_type_viewable( $post->post_type )
|
||||
);
|
||||
if ( ! $validate ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_style(
|
||||
self::ASSETS_HANDLE,
|
||||
amp_get_asset_url( 'css/amp-post-meta-box.css' ),
|
||||
false,
|
||||
AMP__VERSION
|
||||
);
|
||||
|
||||
// phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
|
||||
wp_enqueue_script(
|
||||
self::ASSETS_HANDLE,
|
||||
amp_get_asset_url( 'js/amp-post-meta-box.js' ),
|
||||
array( 'jquery' ),
|
||||
AMP__VERSION
|
||||
);
|
||||
|
||||
if ( current_theme_supports( AMP_Theme_Support::SLUG ) ) {
|
||||
$availability = AMP_Theme_Support::get_template_availability( $post );
|
||||
$support_errors = $availability['errors'];
|
||||
} else {
|
||||
$support_errors = AMP_Post_Type_Support::get_support_errors( $post );
|
||||
}
|
||||
|
||||
wp_add_inline_script(
|
||||
self::ASSETS_HANDLE,
|
||||
sprintf(
|
||||
'ampPostMetaBox.boot( %s );',
|
||||
wp_json_encode(
|
||||
array(
|
||||
'previewLink' => esc_url_raw( add_query_arg( amp_get_slug(), '', get_preview_post_link( $post ) ) ),
|
||||
'canonical' => amp_is_canonical(),
|
||||
'enabled' => empty( $support_errors ),
|
||||
'canSupport' => 0 === count( array_diff( $support_errors, array( 'post-status-disabled' ) ) ),
|
||||
'statusInputName' => self::STATUS_INPUT_NAME,
|
||||
'l10n' => array(
|
||||
'ampPreviewBtnLabel' => __( 'Preview changes in AMP (opens in new window)', 'amp' ),
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues block assets.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
public function enqueue_block_assets() {
|
||||
$post = get_post();
|
||||
if ( ! is_post_type_viewable( $post->post_type ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script(
|
||||
self::BLOCK_ASSET_HANDLE,
|
||||
amp_get_asset_url( 'js/' . self::BLOCK_ASSET_HANDLE . '.js' ),
|
||||
array( 'wp-hooks', 'wp-i18n', 'wp-components' ),
|
||||
AMP__VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
$status_and_errors = $this->get_status_and_errors( $post );
|
||||
$enabled_status = $status_and_errors['status'];
|
||||
$error_messages = $this->get_error_messages( $status_and_errors['status'], $status_and_errors['errors'] );
|
||||
$script_data = array(
|
||||
'possibleStati' => array( self::ENABLED_STATUS, self::DISABLED_STATUS ),
|
||||
'defaultStatus' => $enabled_status,
|
||||
'errorMessages' => $error_messages,
|
||||
);
|
||||
|
||||
if ( function_exists( 'wp_set_script_translations' ) ) {
|
||||
wp_set_script_translations( self::BLOCK_ASSET_HANDLE, 'amp' );
|
||||
} elseif ( function_exists( 'wp_get_jed_locale_data' ) ) {
|
||||
$script_data['i18n'] = wp_get_jed_locale_data( 'amp' );
|
||||
} elseif ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
||||
$script_data['i18n'] = gutenberg_get_jed_locale_data( 'amp' );
|
||||
}
|
||||
|
||||
wp_add_inline_script(
|
||||
self::BLOCK_ASSET_HANDLE,
|
||||
sprintf( 'var wpAmpEditor = %s;', wp_json_encode( $script_data ) ),
|
||||
'before'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render AMP status.
|
||||
*
|
||||
* @since 0.6
|
||||
* @param WP_Post $post Post.
|
||||
*/
|
||||
public function render_status( $post ) {
|
||||
$verify = (
|
||||
isset( $post->ID )
|
||||
&&
|
||||
is_post_type_viewable( $post->post_type )
|
||||
&&
|
||||
current_user_can( 'edit_post', $post->ID )
|
||||
);
|
||||
|
||||
if ( true !== $verify ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$status_and_errors = $this->get_status_and_errors( $post );
|
||||
$status = $status_and_errors['status'];
|
||||
$errors = $status_and_errors['errors'];
|
||||
$error_messages = $this->get_error_messages( $status, $errors );
|
||||
|
||||
$labels = array(
|
||||
'enabled' => __( 'Enabled', 'amp' ),
|
||||
'disabled' => __( 'Disabled', 'amp' ),
|
||||
);
|
||||
|
||||
// The preceding variables are used inside the following amp-status.php template.
|
||||
include AMP__DIR__ . '/templates/admin/amp-status.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the AMP enabled status and errors.
|
||||
*
|
||||
* @since 1.0
|
||||
* @param WP_Post $post The post to check.
|
||||
* @return array {
|
||||
* The status and errors.
|
||||
*
|
||||
* @type string $status The AMP enabled status.
|
||||
* @type string[] $errors AMP errors.
|
||||
* }
|
||||
*/
|
||||
public function get_status_and_errors( $post ) {
|
||||
/*
|
||||
* When theme support is present then theme templates can be served in AMP and we check first if the template is available.
|
||||
* Checking for template availability will include a check for get_support_errors. Otherwise, if theme support is not present
|
||||
* then we just check get_support_errors.
|
||||
*/
|
||||
if ( current_theme_supports( AMP_Theme_Support::SLUG ) ) {
|
||||
$availability = AMP_Theme_Support::get_template_availability( $post );
|
||||
$status = $availability['supported'] ? self::ENABLED_STATUS : self::DISABLED_STATUS;
|
||||
$errors = array_diff( $availability['errors'], array( 'post-status-disabled' ) ); // Subtract the status which the metabox will allow to be toggled.
|
||||
if ( true === $availability['immutable'] ) {
|
||||
$errors[] = 'status_immutable';
|
||||
}
|
||||
} else {
|
||||
$errors = AMP_Post_Type_Support::get_support_errors( $post );
|
||||
$status = empty( $errors ) ? self::ENABLED_STATUS : self::DISABLED_STATUS;
|
||||
$errors = array_diff( $errors, array( 'post-status-disabled' ) ); // Subtract the status which the metabox will allow to be toggled.
|
||||
}
|
||||
|
||||
return compact( 'status', 'errors' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the AMP enabled error message(s).
|
||||
*
|
||||
* @since 1.0
|
||||
* @param string $status The AMP enabled status.
|
||||
* @param array $errors The AMP enabled errors.
|
||||
* @return array $error_messages The error messages, as an array of strings.
|
||||
*/
|
||||
public function get_error_messages( $status, $errors ) {
|
||||
$error_messages = array();
|
||||
if ( in_array( 'status_immutable', $errors, true ) ) {
|
||||
if ( self::ENABLED_STATUS === $status ) {
|
||||
$error_messages[] = __( 'Your site does not allow AMP to be disabled.', 'amp' );
|
||||
} else {
|
||||
$error_messages[] = __( 'Your site does not allow AMP to be enabled.', 'amp' );
|
||||
}
|
||||
}
|
||||
if ( in_array( 'template_unsupported', $errors, true ) || in_array( 'no_matching_template', $errors, true ) ) {
|
||||
$error_messages[] = sprintf(
|
||||
/* translators: %s is a link to the AMP settings screen */
|
||||
__( 'There are no <a href="%s">supported templates</a> to display this in AMP.', 'amp' ),
|
||||
esc_url( admin_url( 'admin.php?page=' . AMP_Options_Manager::OPTION_NAME ) )
|
||||
);
|
||||
}
|
||||
if ( in_array( 'password-protected', $errors, true ) ) {
|
||||
$error_messages[] = __( 'AMP cannot be enabled on password protected posts.', 'amp' );
|
||||
}
|
||||
if ( in_array( 'post-type-support', $errors, true ) ) {
|
||||
$error_messages[] = sprintf(
|
||||
/* translators: %s is a link to the AMP settings screen */
|
||||
__( 'AMP cannot be enabled because this <a href="%s">post type does not support it</a>.', 'amp' ),
|
||||
esc_url( admin_url( 'admin.php?page=' . AMP_Options_Manager::OPTION_NAME ) )
|
||||
);
|
||||
}
|
||||
if ( in_array( 'skip-post', $errors, true ) ) {
|
||||
$error_messages[] = __( 'A plugin or theme has disabled AMP support.', 'amp' );
|
||||
}
|
||||
if ( count( array_diff( $errors, array( 'status_immutable', 'page-on-front', 'page-for-posts', 'password-protected', 'post-type-support', 'skip-post', 'template_unsupported', 'no_matching_template' ) ) ) > 0 ) {
|
||||
$error_messages[] = __( 'Unavailable for an unknown reason.', 'amp' );
|
||||
}
|
||||
|
||||
return $error_messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save AMP Status.
|
||||
*
|
||||
* @since 0.6
|
||||
* @param int $post_id The Post ID.
|
||||
*/
|
||||
public function save_amp_status( $post_id ) {
|
||||
$verify = (
|
||||
isset( $_POST[ self::NONCE_NAME ] )
|
||||
&&
|
||||
isset( $_POST[ self::STATUS_INPUT_NAME ] )
|
||||
&&
|
||||
wp_verify_nonce( sanitize_key( wp_unslash( $_POST[ self::NONCE_NAME ] ) ), self::NONCE_ACTION )
|
||||
&&
|
||||
current_user_can( 'edit_post', $post_id )
|
||||
&&
|
||||
! wp_is_post_revision( $post_id )
|
||||
&&
|
||||
! wp_is_post_autosave( $post_id )
|
||||
);
|
||||
|
||||
if ( true === $verify ) {
|
||||
update_post_meta(
|
||||
$post_id,
|
||||
self::STATUS_POST_META_KEY,
|
||||
$_POST[ self::STATUS_INPUT_NAME ] // Note: The sanitize_callback has been supplied in the register_meta() call above.
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify post preview link.
|
||||
*
|
||||
* Add the AMP query var is the amp-preview flag is set.
|
||||
*
|
||||
* @since 0.6
|
||||
*
|
||||
* @param string $link The post preview link.
|
||||
* @return string Preview URL.
|
||||
*/
|
||||
public function preview_post_link( $link ) {
|
||||
$is_amp = (
|
||||
isset( $_POST['amp-preview'] ) // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
||||
&&
|
||||
'do-preview' === sanitize_key( wp_unslash( $_POST['amp-preview'] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
||||
);
|
||||
|
||||
if ( $is_amp ) {
|
||||
$link = add_query_arg( amp_get_slug(), true, $link );
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
}
|