Skip to content

Commit

Permalink
Merge pull request #4 from JulianGroshaupt/dev
Browse files Browse the repository at this point in the history
version 1.0.3
  • Loading branch information
JulianGroshaupt authored Jun 16, 2021
2 parents b2fe5dc + fa6b27f commit 50b4af0
Show file tree
Hide file tree
Showing 25 changed files with 622 additions and 43 deletions.
Binary file modified .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,36 @@ Currently, embeddings of the following services are supported:
- Albums
- Tracks
- Podcast Episodes
- Twitter
- Single Tweet
- User Timeline
- Follow-Button
- Mention-Button
- Hashtag-Button

## installation & usage

1. Make sure that your WordPress installation meets the minimum requirements of this plugin.
2. Upload the plugin to the /wp-content/plugins/ directory or install it directly from the admin pages.
3. Use the shortcodes:
- Spotify\*:
- Spotify:
`[privacy-embed_spotify title="Title of embed" spotify_url="spotify:album:1DFixLWuPkv3KT3TnV35m3"]`
- YouTube:
`[privacy-embed_youtube title="Title of embed" youtube_link="https://www.youtube.com/watch?v=kV9sNmujCPk"]`
- Twitter:
`[privacy-embed_twitter title="Title of embed" twitter_type="timeline" twitter_link="https://twitter.com/WordPress"]`

\* You can get the Spotify URI by clicking \"Share\" on the Spotify page of any artist, album or track and then selecting \"Copy Spotify URI\". Getting the Spotify URL for a podcast episode requires a bit more steps: Click "Share" on the corresponding Spotify page and select "Copy episode link". From the copied link you now have to extract the part after ".../episode/" up to (excluding) the next question mark. Your Spotify URL is now composed of: `spotify:episode:extracted-part`. For podcasts (shows) you have to click "Share" on the corresponding Spotify page and select "Copy show link" nad extract the part after ".../show/" up to (excluding) the next question mark. Your Spotify URL is now composed of: `spotify:show:extracted-part`.
You can get the Spotify URI by clicking \"Share\" on the Spotify page of any artist, album or track and then selecting \"Copy Spotify URI\".

Getting the Spotify URL for a podcast episode requires a bit more steps: Click "Share" on the corresponding Spotify page and select "Copy episode link". From the copied link you now have to extract the part after ".../episode/" up to (excluding) the next question mark. Your Spotify URL is now composed of: `spotify:episode:extracted-part`.

For podcasts (shows) you have to click "Share" on the corresponding Spotify page and select "Copy show link" nad extract the part after ".../show/" up to (excluding) the next question mark. Your Spotify URL is now composed of: `spotify:show:extracted-part`.

The following examples can be values of the field `twitter_link`:

- single tweet: `https://twitter.com/WordPress/status/1402457431742074881`
- timeline, follow-button, mention-button: `https://twitter.com/WordPress`
- hashtag-button: `https://twitter.com/hashtag/WordPress`

## license

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/**
* Converts a link to a twitter hashtag into an hashtag.
*
* @param $twitter_link the link to the hashtag
*
* @return string the hashtag
*/

// exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}

if (!function_exists('privacy_embed__twitter_hashtag_link_to_twitter_hashtag')) {
function privacy_embed__twitter_hashtag_link_to_twitter_hashtag($twitter_link)
{
$url_parts = explode('/', $twitter_link);
if (substr($twitter_link, -1) == '/') {
$url_parts = array_slice($url_parts, 0, -1);
}
return end($url_parts);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/**
* Converts a link to a twitter profile into an username.
*
* @param $twitter_link the link to the profile of a user
*
* @return string the username the profile belongs to
*/

// exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}

if (!function_exists('privacy_embed__twitter_profile_link_to_twitter_username')) {
function privacy_embed__twitter_profile_link_to_twitter_username($twitter_link)
{
$url_parts = explode('/', $twitter_link);
if (substr($twitter_link, -1) == '/') {
$url_parts = array_slice($url_parts, 0, -1);
}
return end($url_parts);
}
}
Binary file modified languages/privacy-embed-de_DE.mo
Binary file not shown.
131 changes: 115 additions & 16 deletions languages/privacy-embed-de_DE.po
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
msgid ""
msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Project-Id-Version: Privacy Embed\n"
"POT-Creation-Date: 2021-06-09 17:25+0200\n"
"PO-Revision-Date: 2021-06-09 17:31+0200\n"
"POT-Creation-Date: 2021-06-14 14:14+0200\n"
"PO-Revision-Date: 2021-06-14 14:15+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: de\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: Poedit 3.0\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: privacy-embed.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"Last-Translator: \n"
"Language: de\n"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.min.js\n"

Expand All @@ -41,7 +41,7 @@ msgstr "Privacy Embed Einstellungen"
msgid "YouTube"
msgstr "YouTube"

#: settings.php:20 settings.php:37
#: settings.php:20 settings.php:37 settings.php:54
msgid "Embed Notice Message"
msgstr "Einbettungs-Hinweis Nachricht"

Expand All @@ -61,10 +61,10 @@ msgstr ""
"Umfang deine personenbezogenen Daten von YouTube verarbeitet werden (oder "
"beispielsweise auch, ob sogenanntes Tracking stattfindet). Du könntest "
"weitere Informationen in den Datenschutzhinweisen von YouTube finden. "
"Solltest du den Inhalt dennoch laden wollen, gilt diese Entscheidung nur "
"für diesen einzelnen Inhalt und auch nur, bis zum neuladen der Seite."
"Solltest du den Inhalt dennoch laden wollen, gilt diese Entscheidung nur für "
"diesen einzelnen Inhalt und auch nur, bis zum neuladen der Seite."

#: settings.php:26 settings.php:43
#: settings.php:26 settings.php:43 settings.php:60
msgid "Embed Load Text"
msgstr "Einbettung-Laden Nachricht"

Expand Down Expand Up @@ -92,26 +92,81 @@ msgstr ""
"Umfang deine personenbezogenen Daten von Spotify verarbeitet werden (oder "
"beispielsweise auch, ob sogenanntes Tracking stattfindet). Du könntest "
"weitere Informationen in den Datenschutzhinweisen von Spotify finden. "
"Solltest du den Inhalt dennoch laden wollen, gilt diese Entscheidung nur "
"für diesen einzelnen Inhalt und auch nur, bis zum neuladen der Seite."
"Solltest du den Inhalt dennoch laden wollen, gilt diese Entscheidung nur für "
"diesen einzelnen Inhalt und auch nur, bis zum neuladen der Seite."

#: settings.php:46 shortcodes/spotify.php:51
msgid "Load content from Spotify anyway."
msgstr "Inhalte von Spotify dennoch laden."

#: settings.php:51
msgid "Twitter"
msgstr "Twitter"

#: settings.php:57 shortcodes/twitter.php:51
msgid ""
"There is external content hidden here that would have to be loaded by "
"Twitter. We have no influence on this external content and its provision. "
"This means that we cannot say whether and to what extent your personal data "
"is processed by Twitter (or, for example, whether so-called tracking takes "
"place). You could find more information in Twitter's privacy policy. If you "
"still want to load the content, this decision only applies until the page is "
"reloaded."
msgstr ""
"Hier verbirgt sich externer Inhalt, der von Twitter geladen werden müsste. "
"Auf diesen externen Inhalt, und dessen Bereitstellung, haben wir keinen "
"Einfluss. Das bedeutet, dass wir nicht sagen können, ob und in welchem "
"Umfang deine personenbezogenen Daten von Twitter verarbeitet werden (oder "
"beispielsweise auch, ob sogenanntes Tracking stattfindet). Du könntest "
"weitere Informationen in den Datenschutzhinweisen von Twitter finden. "
"Solltest du den Inhalt dennoch laden wollen, gilt diese Entscheidung nur bis "
"zum neuladen der Seite."

#: settings.php:63 shortcodes/twitter.php:55
msgid "Load content from Twitter anyway."
msgstr "Inhalte von Twitter dennoch laden."

#: settings.php:66
msgid "Follow Button Text (preview only)"
msgstr "Folgen-Button (nur Vorschau-Text)"

#: settings.php:69 shortcodes/twitter.php:59
msgid "Follow @"
msgstr "Folge @"

#: settings.php:72
msgid "Mention Button Text (preview only)"
msgstr "Erwähnen-Button (nur Vorschau-Text)"

#: settings.php:75 shortcodes/twitter.php:63
msgid "Tweet to @"
msgstr "Erwähne @"

#: settings.php:78
msgid "Hashtag Button Text (preview only)"
msgstr "Hashtag-Button (nur Vorschau-Text)"

#: settings.php:81 shortcodes/twitter.php:67
msgid "Tweet #"
msgstr "Tweete #"

#: shortcodes/twitter.php:40
msgid "error: no type for this twitter embed specified"
msgstr "Fehler: es wurde kein Typ für diese Twitter-Einbettung angegeben"

#: wpbakery/spotify.php:19
msgid "Spotify (Privacy Embed)"
msgstr "Spotify (Privacy Embed)"

#: wpbakery/spotify.php:21 wpbakery/youtube.php:21
#: wpbakery/spotify.php:21 wpbakery/twitter.php:21 wpbakery/youtube.php:21
msgid "Privacy Modules"
msgstr "Datenschutz-Module"

#: wpbakery/spotify.php:26 wpbakery/youtube.php:26
#: wpbakery/spotify.php:26 wpbakery/twitter.php:26 wpbakery/youtube.php:26
msgid "Title"
msgstr "Titel"

#: wpbakery/spotify.php:28 wpbakery/youtube.php:28
#: wpbakery/spotify.php:28 wpbakery/twitter.php:28 wpbakery/youtube.php:28
msgid "The title above the embed"
msgstr "Der Titel oberhalb der Einbettung"

Expand All @@ -123,6 +178,50 @@ msgstr "Spotify-Code (URL)"
msgid "Something like \"spotify:album:1DFixLWuPkv3KT3TnV35m3\""
msgstr "Etwas wie \"spotify:album:1DFixLWuPkv3KT3TnV35m3\""

#: wpbakery/twitter.php:19
msgid "Twitter (Privacy Embed)"
msgstr "Twitter (Privacy Embed)"

#: wpbakery/twitter.php:34
msgid "Twitter Link"
msgstr "Twitter Link"

#: wpbakery/twitter.php:36
msgid "A link to a user, a hastag or a single tweet"
msgstr "Ein Link zu einem Benutzer, einem Hashtag oder einem einzelnen Tweet"

#: wpbakery/twitter.php:42
msgid "Twitter Type"
msgstr "Twitter Typ"

#: wpbakery/twitter.php:45
msgid "choose value"
msgstr "Wert auswählen"

#: wpbakery/twitter.php:46
msgid "single tweet"
msgstr "einzelner Tweet"

#: wpbakery/twitter.php:47
msgid "timeline of an user"
msgstr "Timeline eines Benutzers"

#: wpbakery/twitter.php:48
msgid "follow button"
msgstr "Folgen-Button"

#: wpbakery/twitter.php:49
msgid "mention button"
msgstr "Erwähnen-Button"

#: wpbakery/twitter.php:50
msgid "hashtag button"
msgstr "Hashtag-Button"

#: wpbakery/twitter.php:52
msgid "The type of the embed"
msgstr "Der Typ der Einbettung"

#: wpbakery/youtube.php:19
msgid "YouTube (Privacy Embed)"
msgstr "YouTube (Privacy Embed)"
Expand Down
Loading

0 comments on commit 50b4af0

Please sign in to comment.