Changeset 2148127
- Timestamp:
- 08/30/2019 12:26:35 AM (7 years ago)
- Location:
- simple-youtube-gdpr
- Files:
-
- 218 added
- 1 deleted
- 12 edited
-
tags/1.0 (added)
-
tags/1.0/LICENSE.txt (added)
-
tags/1.0/README.txt (added)
-
tags/1.0/freemius (added)
-
tags/1.0/freemius/LICENSE.txt (added)
-
tags/1.0/freemius/assets (added)
-
tags/1.0/freemius/assets/css (added)
-
tags/1.0/freemius/assets/css/admin (added)
-
tags/1.0/freemius/assets/css/admin/account.css (added)
-
tags/1.0/freemius/assets/css/admin/add-ons.css (added)
-
tags/1.0/freemius/assets/css/admin/affiliation.css (added)
-
tags/1.0/freemius/assets/css/admin/checkout.css (added)
-
tags/1.0/freemius/assets/css/admin/common.css (added)
-
tags/1.0/freemius/assets/css/admin/connect.css (added)
-
tags/1.0/freemius/assets/css/admin/debug.css (added)
-
tags/1.0/freemius/assets/css/admin/dialog-boxes.css (added)
-
tags/1.0/freemius/assets/css/admin/gdpr-optin-notice.css (added)
-
tags/1.0/freemius/assets/css/admin/index.php (added)
-
tags/1.0/freemius/assets/css/customizer.css (added)
-
tags/1.0/freemius/assets/css/index.php (added)
-
tags/1.0/freemius/assets/img (added)
-
tags/1.0/freemius/assets/img/index.php (added)
-
tags/1.0/freemius/assets/img/plugin-icon.png (added)
-
tags/1.0/freemius/assets/img/simple-youtube-gdpr.png (added)
-
tags/1.0/freemius/assets/img/theme-icon.png (added)
-
tags/1.0/freemius/assets/index.php (added)
-
tags/1.0/freemius/assets/js (added)
-
tags/1.0/freemius/assets/js/index.php (added)
-
tags/1.0/freemius/assets/js/nojquery.ba-postmessage.js (added)
-
tags/1.0/freemius/assets/js/nojquery.ba-postmessage.min.js (added)
-
tags/1.0/freemius/assets/js/postmessage.js (added)
-
tags/1.0/freemius/config.php (added)
-
tags/1.0/freemius/includes (added)
-
tags/1.0/freemius/includes/class-freemius-abstract.php (added)
-
tags/1.0/freemius/includes/class-freemius.php (added)
-
tags/1.0/freemius/includes/class-fs-admin-notices.php (added)
-
tags/1.0/freemius/includes/class-fs-api.php (added)
-
tags/1.0/freemius/includes/class-fs-logger.php (added)
-
tags/1.0/freemius/includes/class-fs-options.php (added)
-
tags/1.0/freemius/includes/class-fs-plugin-updater.php (added)
-
tags/1.0/freemius/includes/class-fs-security.php (added)
-
tags/1.0/freemius/includes/class-fs-storage.php (added)
-
tags/1.0/freemius/includes/class-fs-user-lock.php (added)
-
tags/1.0/freemius/includes/customizer (added)
-
tags/1.0/freemius/includes/customizer/class-fs-customizer-support-section.php (added)
-
tags/1.0/freemius/includes/customizer/class-fs-customizer-upsell-control.php (added)
-
tags/1.0/freemius/includes/customizer/index.php (added)
-
tags/1.0/freemius/includes/debug (added)
-
tags/1.0/freemius/includes/debug/class-fs-debug-bar-panel.php (added)
-
tags/1.0/freemius/includes/debug/debug-bar-start.php (added)
-
tags/1.0/freemius/includes/debug/index.php (added)
-
tags/1.0/freemius/includes/entities (added)
-
tags/1.0/freemius/includes/entities/class-fs-affiliate-terms.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-affiliate.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-billing.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-entity.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-payment.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-plugin-info.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-plugin-license.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-plugin-plan.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-plugin-tag.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-plugin.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-pricing.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-scope-entity.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-site.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-subscription.php (added)
-
tags/1.0/freemius/includes/entities/class-fs-user.php (added)
-
tags/1.0/freemius/includes/entities/index.php (added)
-
tags/1.0/freemius/includes/fs-core-functions.php (added)
-
tags/1.0/freemius/includes/fs-essential-functions.php (added)
-
tags/1.0/freemius/includes/fs-plugin-info-dialog.php (added)
-
tags/1.0/freemius/includes/i18n.php (added)
-
tags/1.0/freemius/includes/index.php (added)
-
tags/1.0/freemius/includes/l10n.php (added)
-
tags/1.0/freemius/includes/managers (added)
-
tags/1.0/freemius/includes/managers/class-fs-admin-menu-manager.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-admin-notice-manager.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-cache-manager.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-gdpr-manager.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-key-value-storage.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-license-manager.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-option-manager.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-plan-manager.php (added)
-
tags/1.0/freemius/includes/managers/class-fs-plugin-manager.php (added)
-
tags/1.0/freemius/includes/managers/index.php (added)
-
tags/1.0/freemius/includes/sdk (added)
-
tags/1.0/freemius/includes/sdk/Exceptions (added)
-
tags/1.0/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php (added)
-
tags/1.0/freemius/includes/sdk/Exceptions/EmptyArgumentException.php (added)
-
tags/1.0/freemius/includes/sdk/Exceptions/Exception.php (added)
-
tags/1.0/freemius/includes/sdk/Exceptions/InvalidArgumentException.php (added)
-
tags/1.0/freemius/includes/sdk/Exceptions/OAuthException.php (added)
-
tags/1.0/freemius/includes/sdk/Exceptions/index.php (added)
-
tags/1.0/freemius/includes/sdk/FreemiusBase.php (added)
-
tags/1.0/freemius/includes/sdk/FreemiusWordPress.php (added)
-
tags/1.0/freemius/includes/sdk/LICENSE.txt (added)
-
tags/1.0/freemius/includes/sdk/index.php (added)
-
tags/1.0/freemius/includes/supplements (added)
-
tags/1.0/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php (added)
-
tags/1.0/freemius/includes/supplements/fs-essential-functions-2.2.1.php (added)
-
tags/1.0/freemius/includes/supplements/index.php (added)
-
tags/1.0/freemius/index.php (added)
-
tags/1.0/freemius/languages (added)
-
tags/1.0/freemius/languages/freemius-da_DK.mo (added)
-
tags/1.0/freemius/languages/freemius-da_DK.po (added)
-
tags/1.0/freemius/languages/freemius-en.mo (added)
-
tags/1.0/freemius/languages/freemius-en.po (added)
-
tags/1.0/freemius/languages/freemius-es_ES.mo (added)
-
tags/1.0/freemius/languages/freemius-es_ES.po (added)
-
tags/1.0/freemius/languages/freemius-fr_FR.mo (added)
-
tags/1.0/freemius/languages/freemius-fr_FR.po (added)
-
tags/1.0/freemius/languages/freemius-he_IL.mo (added)
-
tags/1.0/freemius/languages/freemius-he_IL.po (added)
-
tags/1.0/freemius/languages/freemius-hu_HU.mo (added)
-
tags/1.0/freemius/languages/freemius-hu_HU.po (added)
-
tags/1.0/freemius/languages/freemius-it_IT.mo (added)
-
tags/1.0/freemius/languages/freemius-it_IT.po (added)
-
tags/1.0/freemius/languages/freemius-ja_JP.mo (added)
-
tags/1.0/freemius/languages/freemius-ja_JP.po (added)
-
tags/1.0/freemius/languages/freemius-nl_NL.mo (added)
-
tags/1.0/freemius/languages/freemius-nl_NL.po (added)
-
tags/1.0/freemius/languages/freemius-ru_RU.mo (added)
-
tags/1.0/freemius/languages/freemius-ru_RU.po (added)
-
tags/1.0/freemius/languages/freemius.pot (added)
-
tags/1.0/freemius/languages/index.php (added)
-
tags/1.0/freemius/require.php (added)
-
tags/1.0/freemius/start.php (added)
-
tags/1.0/freemius/templates (added)
-
tags/1.0/freemius/templates/account (added)
-
tags/1.0/freemius/templates/account.php (added)
-
tags/1.0/freemius/templates/account/billing.php (added)
-
tags/1.0/freemius/templates/account/index.php (added)
-
tags/1.0/freemius/templates/account/partials (added)
-
tags/1.0/freemius/templates/account/partials/activate-license-button.php (added)
-
tags/1.0/freemius/templates/account/partials/addon.php (added)
-
tags/1.0/freemius/templates/account/partials/deactivate-license-button.php (added)
-
tags/1.0/freemius/templates/account/partials/index.php (added)
-
tags/1.0/freemius/templates/account/partials/site.php (added)
-
tags/1.0/freemius/templates/account/payments.php (added)
-
tags/1.0/freemius/templates/add-ons.php (added)
-
tags/1.0/freemius/templates/add-trial-to-pricing.php (added)
-
tags/1.0/freemius/templates/admin-notice.php (added)
-
tags/1.0/freemius/templates/ajax-loader.php (added)
-
tags/1.0/freemius/templates/auto-installation.php (added)
-
tags/1.0/freemius/templates/checkout.php (added)
-
tags/1.0/freemius/templates/connect.php (added)
-
tags/1.0/freemius/templates/contact.php (added)
-
tags/1.0/freemius/templates/debug (added)
-
tags/1.0/freemius/templates/debug.php (added)
-
tags/1.0/freemius/templates/debug/api-calls.php (added)
-
tags/1.0/freemius/templates/debug/index.php (added)
-
tags/1.0/freemius/templates/debug/logger.php (added)
-
tags/1.0/freemius/templates/debug/plugins-themes-sync.php (added)
-
tags/1.0/freemius/templates/debug/scheduled-crons.php (added)
-
tags/1.0/freemius/templates/email.php (added)
-
tags/1.0/freemius/templates/firewall-issues-js.php (added)
-
tags/1.0/freemius/templates/forms (added)
-
tags/1.0/freemius/templates/forms/affiliation.php (added)
-
tags/1.0/freemius/templates/forms/deactivation (added)
-
tags/1.0/freemius/templates/forms/deactivation/contact.php (added)
-
tags/1.0/freemius/templates/forms/deactivation/form.php (added)
-
tags/1.0/freemius/templates/forms/deactivation/index.php (added)
-
tags/1.0/freemius/templates/forms/deactivation/retry-skip.php (added)
-
tags/1.0/freemius/templates/forms/index.php (added)
-
tags/1.0/freemius/templates/forms/license-activation.php (added)
-
tags/1.0/freemius/templates/forms/optout.php (added)
-
tags/1.0/freemius/templates/forms/premium-versions-upgrade-handler.php (added)
-
tags/1.0/freemius/templates/forms/premium-versions-upgrade-metadata.php (added)
-
tags/1.0/freemius/templates/forms/resend-key.php (added)
-
tags/1.0/freemius/templates/forms/subscription-cancellation.php (added)
-
tags/1.0/freemius/templates/forms/trial-start.php (added)
-
tags/1.0/freemius/templates/gdpr-optin-js.php (added)
-
tags/1.0/freemius/templates/index.php (added)
-
tags/1.0/freemius/templates/js (added)
-
tags/1.0/freemius/templates/js/index.php (added)
-
tags/1.0/freemius/templates/js/jquery.content-change.php (added)
-
tags/1.0/freemius/templates/js/open-license-activation.php (added)
-
tags/1.0/freemius/templates/js/style-premium-theme.php (added)
-
tags/1.0/freemius/templates/partials (added)
-
tags/1.0/freemius/templates/partials/network-activation.php (added)
-
tags/1.0/freemius/templates/plugin-icon.php (added)
-
tags/1.0/freemius/templates/plugin-info (added)
-
tags/1.0/freemius/templates/plugin-info/description.php (added)
-
tags/1.0/freemius/templates/plugin-info/features.php (added)
-
tags/1.0/freemius/templates/plugin-info/index.php (added)
-
tags/1.0/freemius/templates/plugin-info/screenshots.php (added)
-
tags/1.0/freemius/templates/powered-by.php (added)
-
tags/1.0/freemius/templates/pricing.php (added)
-
tags/1.0/freemius/templates/secure-https-header.php (added)
-
tags/1.0/freemius/templates/sticky-admin-notice-js.php (added)
-
tags/1.0/freemius/templates/tabs-capture-js.php (added)
-
tags/1.0/freemius/templates/tabs.php (added)
-
tags/1.0/includes (added)
-
tags/1.0/includes/class-simple-youtube-gdpr-activator.php (added)
-
tags/1.0/includes/class-simple-youtube-gdpr-deactivator.php (added)
-
tags/1.0/includes/class-simple-youtube-gdpr-i18n.php (added)
-
tags/1.0/includes/class-simple-youtube-gdpr-loader.php (added)
-
tags/1.0/includes/class-simple-youtube-gdpr.php (added)
-
tags/1.0/includes/index.php (added)
-
tags/1.0/index.php (added)
-
tags/1.0/languages (added)
-
tags/1.0/languages/simple-youtube-gdpr-de_DE.mo (added)
-
tags/1.0/languages/simple-youtube-gdpr-de_DE.po (added)
-
tags/1.0/languages/simple-youtube-gdpr-fr_FR.mo (added)
-
tags/1.0/languages/simple-youtube-gdpr-fr_FR.po (added)
-
tags/1.0/languages/simple-youtube-gdpr-ru_RU.mo (added)
-
tags/1.0/languages/simple-youtube-gdpr-ru_RU.po (added)
-
tags/1.0/languages/simple-youtube-gdpr.pot (added)
-
tags/1.0/public (added)
-
tags/1.0/public/class-simple-youtube-gdpr-public.php (added)
-
tags/1.0/public/css (added)
-
tags/1.0/public/css/simple-youtube-gdpr-public.css (added)
-
tags/1.0/public/index.php (added)
-
tags/1.0/public/js (added)
-
tags/1.0/public/js/simple-youtube-gdpr-public.js (added)
-
tags/1.0/public/partials (added)
-
tags/1.0/public/partials/simple-youtube-gdpr-public-display.php (added)
-
tags/1.0/simple-youtube-gdpr.php (added)
-
trunk/README.txt (modified) (7 diffs)
-
trunk/includes/class-simple-youtube-gdpr.php (modified) (5 diffs)
-
trunk/includes/simple_html_dom.php (deleted)
-
trunk/languages/simple-youtube-gdpr-de_DE.mo (modified) (previous)
-
trunk/languages/simple-youtube-gdpr-de_DE.po (modified) (3 diffs)
-
trunk/languages/simple-youtube-gdpr-fr_FR.mo (modified) (previous)
-
trunk/languages/simple-youtube-gdpr-fr_FR.po (modified) (5 diffs)
-
trunk/languages/simple-youtube-gdpr-ru_RU.mo (modified) (previous)
-
trunk/languages/simple-youtube-gdpr-ru_RU.po (modified) (3 diffs)
-
trunk/public/class-simple-youtube-gdpr-public.php (modified) (1 diff)
-
trunk/public/css/simple-youtube-gdpr-public.css (modified) (5 diffs)
-
trunk/public/js/simple-youtube-gdpr-public.js (modified) (1 diff)
-
trunk/simple-youtube-gdpr.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-youtube-gdpr/trunk/README.txt
r2144933 r2148127 2 2 Contributors: 2plus2is4 3 3 Donate link: https://money.yandex.ru/to/41001417963743 4 Tags: iframe, YouTube, GDPR, Vimeo, Flickr, Issuu, thumbnails, Consent, Compliance4 Tags: iframe, YouTube, GDPR, Vimeo, Flickr, Issuu, Instagram, TED, thumbnails, Consent, Compliance 5 5 Requires at least: 5.0.1 6 6 Tested up to: 5.2.2 7 Stable tag: 0.87 Stable tag: 1.0 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later … … 24 24 * Google gets NO cookies 25 25 * No content changes required 26 * Allows you to keep YouTube , Vimeo [premium] and more elements under GDPR law26 * Allows you to keep YouTube videos under GDPR law 27 27 28 28 == Want more? == 29 If you enjoy blocking YouTube videos and you want your other content (Vimeo, Flickr, Issuu ) to be safe, consider purchasing the [premium version](https://checkout.freemius.com/mode/dialog/plugin/4426/plan/7118/).29 If you enjoy blocking YouTube videos and you want your other content (Vimeo, Flickr, Issuu and more) to be safe, consider purchasing the [premium version](https://checkout.freemius.com/mode/dialog/plugin/4426/plan/7118/). 30 30 31 31 = Premium features = … … 34 34 * Integrate Issuu content securely! 35 35 * Integrate Flickr photos securely! 36 * Integrate Instagram securely! 37 * Integrate TED securely! 36 38 37 39 == Installation == … … 46 48 = Does 'Local' mean my server downloads all the images? = 47 49 48 Yes. Usually you can find a folder `/wp-content/uploads/simple-youtube-gdpr-thumbnails` with all the images inside 50 Yes. Usually you can find a folder `/wp-content/uploads/simple-youtube-gdpr-thumbnails` with all the images inside. 49 51 50 = Does youtube send cookies? =52 = What about no cookie youtube? = 51 53 52 No. Plugin replaces the source of iframe with youtube-nocookie.com 54 Please replace `youtube.com` with `youtube-nocookie.com` when inserting a youtube link. 53 55 54 56 = Why there are black line above and below? = … … 63 65 64 66 Yes. Class: 65 * `syg__box` - main wrapping `<div>` (`syg__box-%SERVICE%` where `%SERVICE%` can be youtube, vimeo, issuu, flickr)67 * `syg__box` - main wrapping `<div>` (`syg__box-%SERVICE%` where `%SERVICE%` can be youtube, vimeo, issuu, ...) 66 68 * `syg__box__img` - the thumbnail 67 69 * `syg__box__text__btn` - thumbnail play button 68 * `syg__box -youtube-iframe` - video `<iframe>` (where `%SERVICE%` can be youtube, vimeo, issuu)70 * `syg__box__text` - Privacy Policy text 69 71 70 = What are s tandard width and height of iframe? =72 = What are sizes of preview image? = 71 73 72 560 x 315 74 It is trying to reach 100% of your content. (imitates WP iframe styles) 73 75 74 76 = How does this plugin work? = … … 87 89 == Changelog == 88 90 91 = 1.0 = 92 * HTML code passed via <template> 93 * `embed_oembed_html` filer used 94 89 95 = 0.8 = 90 96 * Issuu Blocker Integrated 97 * Flickr Blocker Integrated 91 98 * CSS classes changed 92 99 93 100 = 0.7 = 94 101 * Plans are added (Vimeo) 95 102 * CSS classes were changed 96 103 … … 101 108 102 109 == Upgrade Notice == 110 111 = 1.0 = 112 * Instagram Blocker Integrated [premium] 113 * TED Blocker Integrated [premium] 114 * Stability enhanced 115 * Size of plugin reduced 103 116 104 117 = 0.8 = -
simple-youtube-gdpr/trunk/includes/class-simple-youtube-gdpr.php
r2143715 r2148127 123 123 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-simple-youtube-gdpr-public.php'; 124 124 125 /**126 * The file responsible for DOM search.127 */128 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/simple_html_dom.php';129 130 125 $this->loader = new Simple_Youtube_Gdpr_Loader(); 131 126 … … 179 174 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); 180 175 181 $this->loader->add_action( 'the_content', $plugin_public, 'filter_content' ); 182 } 176 $this->loader->add_filter( 'embed_oembed_html', $plugin_public, 'syg_embed_oembed_html', PHP_INT_MAX, 4 ); 177 } 178 183 179 184 180 /** … … 195 191 * WordPress and to define internationalization functionality. 196 192 * 193 * @return string The name of the plugin. 197 194 * @since 0.6 198 * @return string The name of the plugin.199 195 */ 200 196 public function get_plugin_name() { … … 205 201 * The reference to the class that orchestrates the hooks with the plugin. 206 202 * 203 * @return Simple_Youtube_Gdpr_Loader Orchestrates the hooks of the plugin. 207 204 * @since 0.6 208 * @return Simple_Youtube_Gdpr_Loader Orchestrates the hooks of the plugin.209 205 */ 210 206 public function get_loader() { … … 215 211 * Retrieve the version number of the plugin. 216 212 * 213 * @return string The version number of the plugin. 217 214 * @since 0.6 218 * @return string The version number of the plugin.219 215 */ 220 216 public function get_version() { -
simple-youtube-gdpr/trunk/languages/simple-youtube-gdpr-de_DE.po
r2144933 r2148127 2 2 msgstr "" 3 3 "Project-Id-Version: Simple YouTube GDPR\n" 4 "POT-Creation-Date: 2019-08- 24 21:35+0300\n"5 "PO-Revision-Date: 2019-08- 24 21:37+0300\n"4 "POT-Creation-Date: 2019-08-30 03:11+0300\n" 5 "PO-Revision-Date: 2019-08-30 03:13+0300\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 17 17 "X-Poedit-SourceCharset: UTF-8\n" 18 18 "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" 19 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c; "20 "_n _noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"19 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" 20 "_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 21 21 "X-Poedit-SearchPath-0: .\n" 22 22 "X-Poedit-SearchPathExcluded-0: *.js\n" 23 23 24 #: public/class-simple-youtube-gdpr-public.php:284 25 msgid "Click to Play Video" 26 msgstr "Anklicken um abzuspielen" 27 28 #: public/class-simple-youtube-gdpr-public.php:285 29 msgid "YouTube Video Thumbnail" 30 msgstr "YouTube Video Miniaturansicht" 31 32 #: public/class-simple-youtube-gdpr-public.php:288 33 msgid "By loading the video, you agree to YouTube's privacy policy." 34 msgstr "" 35 "Durch das Laden des Videos stimmst du den Datenschutzbestimmungen von " 36 "YouTube zu." 37 38 #: public/class-simple-youtube-gdpr-public.php:290 39 #, fuzzy 40 #| msgid "https://policies.google.com/privacy?hl=en&gl=en" 24 #: public/class-simple-youtube-gdpr-public.php:206 25 #: public/class-simple-youtube-gdpr-public.php:215 41 26 msgid "https://policies.google.com/privacy?hl=en" 42 27 msgstr "https://policies.google.com/privacy?hl=de" 43 28 44 #: public/class-simple-youtube-gdpr-public.php:291 45 #: public/class-simple-youtube-gdpr-public.php:319 46 #: public/class-simple-youtube-gdpr-public.php:371 47 msgid "Read policy" 48 msgstr "Richtlinie lesen" 49 50 #: public/class-simple-youtube-gdpr-public.php:294 51 #: public/class-simple-youtube-gdpr-public.php:322 52 msgid "Play video" 53 msgstr "Video abspielen" 54 55 #: public/class-simple-youtube-gdpr-public.php:316 56 msgid "By loading the video, you agree to Vimeo's privacy policy." 57 msgstr "" 58 "Durch das Laden des Videos stimmen Sie den Datenschutzbestimmungen von " 59 "Vimeo zu." 60 61 #: public/class-simple-youtube-gdpr-public.php:318 29 #: public/class-simple-youtube-gdpr-public.php:217 62 30 msgid "https://vimeo.com/privacy" 63 31 msgstr "https://vimeo.com/privacy" 64 32 65 #: public/class-simple-youtube-gdpr-public.php:368 66 msgid "By loading the issuu element, you agree to its privacy policy." 33 #: public/class-simple-youtube-gdpr-public.php:219 34 msgid "https://www.flickr.com/help/privacy" 35 msgstr "https://www.flickr.com/help/privacy" 36 37 #: public/class-simple-youtube-gdpr-public.php:221 38 msgid "https://issuu.com/legal/privacy" 39 msgstr "https://issuu.com/legal/privacy" 40 41 #: public/class-simple-youtube-gdpr-public.php:223 42 msgid "https://www.instagram.com/legal/privacy/" 43 msgstr "https://www.instagram.com/legal/privacy/" 44 45 #: public/class-simple-youtube-gdpr-public.php:225 46 msgid "" 47 "https://www.ted.com/about/our-organization/our-policies-terms/privacy-policy" 67 48 msgstr "" 68 "Durch das Laden des issuu-Elements stimmen Sie dessen " 69 "Datenschutzbestimmungen zu." 49 "https://www.ted.com/about/our-organization/our-policies-terms/privacy-policy" 70 50 71 #: public/class-simple-youtube-gdpr-public.php:370 72 #, fuzzy 73 #| msgid "https://policies.google.com/privacy?hl=en&gl=en" 74 msgid "https://issuu.com/legal/privacy" 75 msgstr "https://policies.google.com/privacy?hl=de" 51 #: public/class-simple-youtube-gdpr-public.php:231 52 msgid "Load element" 53 msgstr "Element anzeigen" 76 54 77 #: public/class-simple-youtube-gdpr-public.php:374 78 msgid "Show element" 79 msgstr "Element anzeigen" 55 #: public/class-simple-youtube-gdpr-public.php:234 56 #, php-format 57 msgid "" 58 "By loading this element, you agree to <a href=\"%s\" target=\"_blank\" rel=" 59 "\"nofollow noreferrer noopener\" referrerpolicy=\"no-referrer\" title=\"%s\">" 60 "%s's privacy policy</a>." 61 msgstr "" 62 "Durch das Laden dieses Elements stimmen Sie <a href=\"%s\" target=\"_blank\" " 63 "rel=\"nofollow noreferrer noopener\" referrerpolicy=\"no-referrer\" title=" 64 "\"%s\">den Datenschutzbestimmungen von %s zu</a>." 65 66 #: public/class-simple-youtube-gdpr-public.php:236 67 msgid "Read Privacy Policy" 68 msgstr "Lesen die Datenschutzbestimmungen" 80 69 81 70 #: simple-youtube-gdpr.php:101 … … 115 104 msgstr "https://alexeyvolkov.com/" 116 105 106 #~ msgid "Click to Play Video" 107 #~ msgstr "Anklicken um abzuspielen" 108 109 #~ msgid "YouTube Video Thumbnail" 110 #~ msgstr "YouTube Video Miniaturansicht" 111 112 #~ msgid "By loading the video, you agree to YouTube's privacy policy." 113 #~ msgstr "" 114 #~ "Durch das Laden des Videos stimmst du den Datenschutzbestimmungen von " 115 #~ "YouTube zu." 116 117 #~ msgid "Play video" 118 #~ msgstr "Video abspielen" 119 120 #~ msgid "By loading the video, you agree to Vimeo's privacy policy." 121 #~ msgstr "" 122 #~ "Durch das Laden des Videos stimmen Sie den Datenschutzbestimmungen von " 123 #~ "Vimeo zu." 124 125 #~ msgid "By loading the issuu element, you agree to its privacy policy." 126 #~ msgstr "" 127 #~ "Durch das Laden des issuu-Elements stimmen Sie dessen " 128 #~ "Datenschutzbestimmungen zu." 129 117 130 #~ msgid "Learn more" 118 131 #~ msgstr "Google-Datenschutzerklärung" -
simple-youtube-gdpr/trunk/languages/simple-youtube-gdpr-fr_FR.po
r2144933 r2148127 2 2 msgstr "" 3 3 "Project-Id-Version: Simple YouTube GDPR\n" 4 "POT-Creation-Date: 2019-08- 24 21:32+0300\n"5 "PO-Revision-Date: 2019-08- 24 21:34+0300\n"4 "POT-Creation-Date: 2019-08-30 03:13+0300\n" 5 "PO-Revision-Date: 2019-08-30 03:15+0300\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 17 17 "X-Poedit-SourceCharset: UTF-8\n" 18 18 "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" 19 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c; "20 "_n _noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"19 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" 20 "_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 21 21 "X-Poedit-SearchPath-0: .\n" 22 22 "X-Poedit-SearchPathExcluded-0: *.js\n" 23 23 24 #: public/class-simple-youtube-gdpr-public.php:284 25 msgid "Click to Play Video" 26 msgstr "Cliquez pour lire la vidéo" 27 28 #: public/class-simple-youtube-gdpr-public.php:285 29 msgid "YouTube Video Thumbnail" 30 msgstr "Vignette de la vidéo YouTube" 31 32 #: public/class-simple-youtube-gdpr-public.php:288 33 msgid "By loading the video, you agree to YouTube's privacy policy." 34 msgstr "" 35 "En chargeant la vidéo, vous acceptez la politique de confidentialité de " 36 "YouTube." 37 38 #: public/class-simple-youtube-gdpr-public.php:290 24 #: public/class-simple-youtube-gdpr-public.php:206 25 #: public/class-simple-youtube-gdpr-public.php:215 39 26 msgid "https://policies.google.com/privacy?hl=en" 40 27 msgstr "https://policies.google.com/privacy?hl=fr" 41 28 42 #: public/class-simple-youtube-gdpr-public.php:291 43 #: public/class-simple-youtube-gdpr-public.php:319 44 #: public/class-simple-youtube-gdpr-public.php:371 45 msgid "Read policy" 46 msgstr "Lire la politique" 47 48 #: public/class-simple-youtube-gdpr-public.php:294 49 #: public/class-simple-youtube-gdpr-public.php:322 50 msgid "Play video" 51 msgstr "Lire la vidéo" 52 53 #: public/class-simple-youtube-gdpr-public.php:316 54 msgid "By loading the video, you agree to Vimeo's privacy policy." 55 msgstr "" 56 "En chargeant la vidéo, vous acceptez la politique de confidentialité de " 57 "Vimeo." 58 59 #: public/class-simple-youtube-gdpr-public.php:318 29 #: public/class-simple-youtube-gdpr-public.php:217 60 30 msgid "https://vimeo.com/privacy" 61 31 msgstr "https://vimeo.com/privacy" 62 32 63 #: public/class-simple-youtube-gdpr-public.php:368 64 msgid "By loading the issuu element, you agree to its privacy policy." 65 msgstr "" 66 "En chargeant l'élément issuu, vous acceptez sa politique de " 67 "confidentialité." 33 #: public/class-simple-youtube-gdpr-public.php:219 34 msgid "https://www.flickr.com/help/privacy" 35 msgstr "https://www.flickr.com/help/privacy" 68 36 69 #: public/class-simple-youtube-gdpr-public.php: 37037 #: public/class-simple-youtube-gdpr-public.php:221 70 38 msgid "https://issuu.com/legal/privacy" 71 39 msgstr "https://issuu.com/legal/privacy" 72 40 73 #: public/class-simple-youtube-gdpr-public.php:374 74 msgid "Show element" 75 msgstr "Afficher l'élément" 41 #: public/class-simple-youtube-gdpr-public.php:223 42 msgid "https://www.instagram.com/legal/privacy/" 43 msgstr "https://www.instagram.com/legal/privacy/" 44 45 #: public/class-simple-youtube-gdpr-public.php:225 46 msgid "" 47 "https://www.ted.com/about/our-organization/our-policies-terms/privacy-policy" 48 msgstr "" 49 "https://www.ted.com/about/our-organization/our-policies-terms/privacy-policy" 50 51 #: public/class-simple-youtube-gdpr-public.php:231 52 msgid "Load element" 53 msgstr "Élément de charge" 54 55 #: public/class-simple-youtube-gdpr-public.php:234 56 #, php-format 57 msgid "" 58 "By loading this element, you agree to <a href=\"%s\" target=\"_blank\" rel=" 59 "\"nofollow noreferrer noopener\" referrerpolicy=\"no-referrer\" title=\"%s\">" 60 "%s's privacy policy</a>." 61 msgstr "" 62 "En chargeant cet élément, vous acceptez <a href=\"%s\" target=\"_blank\" rel=" 63 "\"nofollow noreferrer noopener\" referrerpolicy=\"no-referrer\" title=\"%s" 64 "\">la politique de confidentialité de %s</a>." 65 66 #: public/class-simple-youtube-gdpr-public.php:236 67 msgid "Read Privacy Policy" 68 msgstr "Lire la politique de confidentialité" 76 69 77 70 #: simple-youtube-gdpr.php:101 … … 79 72 msgstr "Cliquez pour mettre à niveau votre plan" 80 73 81 #: simple-youtube-gdpr.php:10 174 #: simple-youtube-gdpr.php:102 82 75 msgid "Block Vimeo and more!" 83 76 msgstr "Bloquer Vimeo et plus!" 84 77 85 #: simple-youtube-gdpr.php:11 378 #: simple-youtube-gdpr.php:114 86 79 msgid "Payment in RUB - Russian Rubles" 87 80 msgstr "Paiement en roubles russes" 88 81 89 #: simple-youtube-gdpr.php:11 382 #: simple-youtube-gdpr.php:115 90 83 msgid "Donate" 91 84 msgstr "Faire un don" … … 93 86 #. Plugin Name of the plugin/theme 94 87 msgid "Simple YouTube GDPR" 95 msgstr "" 96 "WordPress YouTube, Vimeo et plusieurs autres plugin de sécurité (GDPR)" 88 msgstr "WordPress YouTube, Vimeo et plusieurs autres plugin de sécurité (GDPR)" 97 89 98 90 #. Plugin URI of the plugin/theme … … 112 104 msgstr "https://alexeyvolkov.com/" 113 105 106 #~ msgid "Click to Play Video" 107 #~ msgstr "Cliquez pour lire la vidéo" 108 109 #~ msgid "YouTube Video Thumbnail" 110 #~ msgstr "Vignette de la vidéo YouTube" 111 112 #~ msgid "By loading the video, you agree to YouTube's privacy policy." 113 #~ msgstr "" 114 #~ "En chargeant la vidéo, vous acceptez la politique de confidentialité de " 115 #~ "YouTube." 116 117 #~ msgid "Play video" 118 #~ msgstr "Lire la vidéo" 119 120 #~ msgid "By loading the video, you agree to Vimeo's privacy policy." 121 #~ msgstr "" 122 #~ "En chargeant la vidéo, vous acceptez la politique de confidentialité de " 123 #~ "Vimeo." 124 125 #~ msgid "By loading the issuu element, you agree to its privacy policy." 126 #~ msgstr "" 127 #~ "En chargeant l'élément issuu, vous acceptez sa politique de " 128 #~ "confidentialité." 129 114 130 #~ msgid "Learn more" 115 131 #~ msgstr "Apprendre encore plus" -
simple-youtube-gdpr/trunk/languages/simple-youtube-gdpr-ru_RU.po
r2144933 r2148127 2 2 msgstr "" 3 3 "Project-Id-Version: Simple YouTube GDPR\n" 4 "POT-Creation-Date: 2019-08- 24 21:37+0300\n"5 "PO-Revision-Date: 2019-08- 24 21:40+0300\n"4 "POT-Creation-Date: 2019-08-30 03:08+0300\n" 5 "PO-Revision-Date: 2019-08-30 03:10+0300\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 18 18 "X-Poedit-SourceCharset: UTF-8\n" 19 19 "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" 20 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c; "21 "_n _noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"20 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" 21 "_nx_noop:3c,1,2;__ngettext_noop:1,2\n" 22 22 "X-Poedit-SearchPath-0: .\n" 23 23 "X-Poedit-SearchPathExcluded-0: *.js\n" 24 24 25 #: public/class-simple-youtube-gdpr-public.php:284 26 msgid "Click to Play Video" 27 msgstr "Нажмите для запуска видео" 28 29 #: public/class-simple-youtube-gdpr-public.php:285 30 msgid "YouTube Video Thumbnail" 31 msgstr "Миниатюра YouTube видео" 32 33 #: public/class-simple-youtube-gdpr-public.php:288 34 msgid "By loading the video, you agree to YouTube's privacy policy." 35 msgstr "" 36 "Загружая видео, вы соглашаетесь с политикой конфиденциальности YouTube." 37 38 #: public/class-simple-youtube-gdpr-public.php:290 39 #, fuzzy 40 #| msgid "https://policies.google.com/privacy?hl=en&gl=en" 25 #: public/class-simple-youtube-gdpr-public.php:206 26 #: public/class-simple-youtube-gdpr-public.php:215 41 27 msgid "https://policies.google.com/privacy?hl=en" 42 28 msgstr "https://policies.google.com/privacy?hl=ru" 43 29 44 #: public/class-simple-youtube-gdpr-public.php:291 45 #: public/class-simple-youtube-gdpr-public.php:319 46 #: public/class-simple-youtube-gdpr-public.php:371 47 msgid "Read policy" 48 msgstr "Прочитать политику конфиденциальности" 30 #: public/class-simple-youtube-gdpr-public.php:217 31 msgid "https://vimeo.com/privacy" 32 msgstr "https://vimeo.com/privacy" 49 33 50 #: public/class-simple-youtube-gdpr-public.php:294 51 #: public/class-simple-youtube-gdpr-public.php:322 52 #, fuzzy 53 #| msgid "Load video" 54 msgid "Play video" 55 msgstr "Запустить видео" 34 #: public/class-simple-youtube-gdpr-public.php:219 35 msgid "https://www.flickr.com/help/privacy" 36 msgstr "https://www.flickr.com/help/privacy" 56 37 57 #: public/class-simple-youtube-gdpr-public.php:316 58 msgid "By loading the video, you agree to Vimeo's privacy policy." 59 msgstr "" 60 "Загружая видео, вы соглашаетесь с политикой конфиденциальности Vimeo." 61 62 #: public/class-simple-youtube-gdpr-public.php:318 63 #, fuzzy 64 #| msgid "https://policies.google.com/privacy?hl=en&gl=en" 65 msgid "https://vimeo.com/privacy" 66 msgstr "https://policies.google.com/privacy?hl=ru" 67 68 #: public/class-simple-youtube-gdpr-public.php:368 69 msgid "By loading the issuu element, you agree to its privacy policy." 70 msgstr "" 71 "Загружая элемент Issue, вы соглашаетесь с его политикой конфиденциальности." 72 73 #: public/class-simple-youtube-gdpr-public.php:370 38 #: public/class-simple-youtube-gdpr-public.php:221 74 39 msgid "https://issuu.com/legal/privacy" 75 40 msgstr "https://issuu.com/legal/privacy" 76 41 77 #: public/class-simple-youtube-gdpr-public.php:374 78 msgid "Show element" 42 #: public/class-simple-youtube-gdpr-public.php:223 43 msgid "https://www.instagram.com/legal/privacy/" 44 msgstr "https://www.instagram.com/legal/privacy/" 45 46 #: public/class-simple-youtube-gdpr-public.php:225 47 msgid "" 48 "https://www.ted.com/about/our-organization/our-policies-terms/privacy-policy" 49 msgstr "" 50 "https://www.ted.com/about/our-organization/our-policies-terms/privacy-policy" 51 52 #: public/class-simple-youtube-gdpr-public.php:231 53 msgid "Load element" 79 54 msgstr "Показать элемент" 55 56 #: public/class-simple-youtube-gdpr-public.php:234 57 #, php-format 58 msgid "" 59 "By loading this element, you agree to <a href=\"%s\" target=\"_blank\" rel=" 60 "\"nofollow noreferrer noopener\" referrerpolicy=\"no-referrer\" title=\"%s\">" 61 "%s's privacy policy</a>." 62 msgstr "" 63 "Загружая этот элемент, вы соглашаетесь с <a href=\"%s\" target=\"_blank\" " 64 "rel=\"nofollow noreferrer noopener\" referrerpolicy=\"no-referrer\" title=" 65 "\"%s\">политикой конфиденциальности %s</a>." 66 67 #: public/class-simple-youtube-gdpr-public.php:236 68 msgid "Read Privacy Policy" 69 msgstr "Прочитать политику конфиденциальности" 80 70 81 71 #: simple-youtube-gdpr.php:101 … … 115 105 msgstr "https://alexeyvolkov.com/" 116 106 107 #~ msgid "Click to Play Video" 108 #~ msgstr "Нажмите для запуска видео" 109 110 #~ msgid "YouTube Video Thumbnail" 111 #~ msgstr "Миниатюра YouTube видео" 112 113 #~ msgid "By loading the video, you agree to YouTube's privacy policy." 114 #~ msgstr "" 115 #~ "Загружая видео, вы соглашаетесь с политикой конфиденциальности YouTube." 116 117 #, fuzzy 118 #~| msgid "Load video" 119 #~ msgid "Play video" 120 #~ msgstr "Запустить видео" 121 122 #~ msgid "By loading the video, you agree to Vimeo's privacy policy." 123 #~ msgstr "" 124 #~ "Загружая видео, вы соглашаетесь с политикой конфиденциальности Vimeo." 125 126 #~ msgid "By loading the issuu element, you agree to its privacy policy." 127 #~ msgstr "" 128 #~ "Загружая элемент Issue, вы соглашаетесь с его политикой " 129 #~ "конфиденциальности." 130 117 131 #~ msgid "Learn more" 118 132 #~ msgstr "Политика конфиденциальности Google" -
simple-youtube-gdpr/trunk/public/class-simple-youtube-gdpr-public.php
r2144933 r2148127 98 98 * class. 99 99 */ 100 wp_enqueue_script( 101 $this->plugin_name, 102 plugin_dir_url( __FILE__ ) . 'js/simple-youtube-gdpr-public.js', 103 array( 'jquery' ), 104 $this->version, 105 false 100 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/simple-youtube-gdpr-public.js' ); 101 } 102 103 /** 104 * @param $cache 105 * @param $url 106 * @param $attr 107 * @param $post_ID 108 * 109 * @return string 110 */ 111 public function syg_embed_oembed_html( 112 $cache, 113 $url, 114 $attr, 115 $post_ID 116 ) 117 { 118 $type = 'nothing'; 119 if ( false !== strpos( $url, "youtube.com" ) || false !== strpos( $url, "://youtu.be" ) ) { 120 $type = 'youtube'; 121 } 122 123 if ( $type == 'nothing' ) { 124 // nothing found 125 return $cache; 126 } else { 127 return $this->getHtml( $cache, $url, $type ); 128 } 129 130 } 131 132 /** 133 * Return HTML code of preview block 134 * 135 * @param $url (required) The URL to retrieve embedding information for. 136 * @param string $type (optional) Provider code 137 * 138 * @return string 139 */ 140 private function getHtml( $cache, $url, $type = 'youtube' ) 141 { 142 // vars 143 $type = filter_var( $type, FILTER_SANITIZE_STRING ); 144 $url = filter_var( $url, FILTER_SANITIZE_URL ); 145 $cache = str_replace( 'src', 'srcblockloading', $cache ); 146 // dont load scripts! You are <template>!!!! 147 $api_endpoint = array( 148 'youtube' => 'http://www.youtube.com/oembed?url=', 106 149 ); 107 } 108 109 /** 110 * Filter the Content of pages and posts 111 * LazyLoad youtube videos 112 * 113 * @param string $content Original HTML. 114 * 115 * @return string $content 116 */ 117 public function filter_content( $content ) 118 { 119 $content = $this->lazyloadIframes( $content ); 120 return $content; 121 } 122 123 /** 124 * Finds iframes in the HTML provided and call the methods to lazyload them 125 * 126 * @param string $html Original HTML. 127 * 128 * @return string 129 */ 130 private function lazyloadIframes( $html, $container = 'figure.wp-block-embed-youtube' ) 131 { 132 $html = str_get_html( $html ); 133 // get html dom from string 150 // Download JSON 151 $json_content = file_get_contents( filter_var( $api_endpoint[$type] . $url, FILTER_SANITIZE_URL ) ); 152 if ( !$json_content ) { 153 return ''; 154 } 155 // Decode JSON 156 $json_content = json_decode( $json_content, true ); 157 /** 158 * Response parameters 159 * 160 * @var $title (optional) A text title, describing the resource. 161 * @var $provider_name (optional) The url of the resource provider. 162 * @var $thumbnail_url (optional) A URL to a thumbnail image representing the resource. 163 * @var $provider_privacy_url (required) A URL to a privacy policy. 164 */ 165 $title = filter_var( $json_content['title'], FILTER_SANITIZE_STRING ); 166 $provider_name = filter_var( $json_content['provider_name'], FILTER_SANITIZE_STRING ); 167 $thumbnail_url = $this->get_thumbnail_url( filter_var( $json_content['thumbnail_url'], FILTER_SANITIZE_URL ) ); 168 $provider_privacy_url = array( 169 'youtube' => __( 'https://policies.google.com/privacy?hl=en', 'simple-youtube-gdpr' ), 170 ); 171 $template = '<div class="syg__box syg__box-' . $type . '" style="background-image: url(\'' . $thumbnail_url . '\');" data-syg-url="' . $api_endpoint[$type] . $url . '">' . '<button class="syg__box__text__btn" type="button" title="' . $title . '">' . esc_html( __( 'Load element', 'simple-youtube-gdpr' ) ) . '</button>' . '<div class="syg__box__text">' . '<p>' . sprintf( 172 __( 'By loading this element, you agree to <a href="%s" target="_blank" rel="nofollow noreferrer noopener" referrerpolicy="no-referrer" title="%s">%s\'s privacy policy</a>.', 'simple-youtube-gdpr' ), 173 $provider_privacy_url[$type], 174 esc_html( __( 'Read Privacy Policy', 'simple-youtube-gdpr' ) ), 175 $provider_name 176 ) . '</p>' . '</div > '; 177 //.syg__box__text 178 $template .= '<template class="syg__box__html" data-type="' . $type . '">' . $cache . '</template>'; 179 $template .= '</div > '; 180 // .syg__box 181 return $template; 182 } 183 184 /** 185 * Get URL of local image 186 * 187 * @param $url string Image form Web 188 * 189 * @return string URL of local Image 190 */ 191 private function get_thumbnail_url( $url ) 192 { 193 if ( '' === trim( $url ) ) { 194 return false; 195 } 196 $url = filter_var( $url, FILTER_SANITIZE_URL ); 197 // https://live.stkr.com/3898/1c26_c.jpg?sfsf=sdfsdf -> 1c26_c.jpg 198 $image_name = md5( $url ) . '.jpg'; 199 // Make it MD5 -> so all (_!@#$%^)(*&) symbols are sanitized and each one is unique 200 $upload_dir = wp_upload_dir(); 201 // wp_upload_dir()[baseurl] => http://example.com/content/uploads 134 202 135 if ( empty($html) ) { 136 return false; 137 // there are no elements 138 } 139 140 /** 141 * YouTube 142 */ 143 foreach ( $html->find( $container ) as $figure ) { 144 // find youtube embed blocks 145 if ( '' === trim( $figure->innertext ) ) { 146 // if empty -> next item 147 continue; 203 if ( !file_exists( $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/' . $image_name ) ) { 204 $image_data = file_get_contents( $url ); 205 // download image from URL 206 $upload_dir['path'] = $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/'; 207 // Set upload folder 208 // Check folder permission and define file location 209 210 if ( wp_mkdir_p( $upload_dir['path'] ) ) { 211 $file = $upload_dir['path'] . '/' . $image_name; 212 } else { 213 $file = $upload_dir['basedir'] . '/' . $image_name; 148 214 } 149 215 150 if ( $figure->find( 'iframe' )[0] ) { 151 $iframe = $figure->find( 'iframe' )[0]; 152 if ( '' === trim( $iframe->src ) ) { 153 // if empty -> next item 154 continue; 155 } 156 try { 157 $imgHTML = $this->getThumbnail( $iframe->outertext ); 158 // send <iframe> and get <div.syg__box> <img> </div> 159 $imgDiv = str_get_html( $imgHTML ); 160 // from raw HTML to Node Object 161 $imgDiv = $imgDiv->find( 'div.syg__box' )[0]; 162 // Find the only one(first) div.syg__box 163 } catch ( Exception $e ) { 164 continue; 165 } 166 // // Replace <figure> with <img> 167 168 if ( $figure->find( 'div.wp-block-embed__wrapper' )[0] ) { 169 $imgDiv->class .= ' ' . $figure->find( 'div.wp-block-embed__wrapper' )[0]->class; 170 $figure->find( 'div.wp-block-embed__wrapper' )[0]->outertext = $imgDiv->outertext; 171 } 172 216 // Create the image file on the server 217 if ( !file_put_contents( $file, $image_data ) ) { 218 return false; 173 219 } 220 } 174 221 175 } 176 // is__premium_only 177 return $html->outertext; 178 } 179 180 /** 181 * Replaces the iframe provided by the Youtube thumbnail 182 * 183 * @param array $iframe Array of matched elements. 184 * 185 * @return bool|string 186 */ 187 private function getThumbnail( $contentHTML, $type = 'youtube' ) 188 { 189 $contentHTML = str_get_html( $contentHTML ); 190 191 if ( $contentHTML->find( 'iframe' ) && $contentHTML->find( 'iframe' )[0] ) { 192 $iframe = $contentHTML->find( 'iframe' )[0]; 193 // Find the only one(first) iframe 194 } 195 196 $upload_dir = wp_upload_dir(); 197 // wp_upload_dir()[baseurl] => http://example.com/content/uploads 198 switch ( $type ) { 199 case 'youtube': 200 $youtube_id = esc_html( $this->getIDFromURL( $iframe->src ) ); 201 // get YouTube ID (fM6JWeQFnNk) 202 if ( !$youtube_id ) { 203 return false; 204 } 205 if ( !$this->isThumbnailExists( $youtube_id ) ) { 206 $this->save_local_thumbnail( $youtube_id ); 207 } 208 $youtube_lazyload = '<div class="syg__box syg__box-youtube">' . '<img src="' . $upload_dir['baseurl'] . '/simple-youtube-gdpr-thumbnails/' . md5( $youtube_id ) . '.jpg" title="' . esc_html( __( 'Click to Play Video', 'simple-youtube-gdpr' ) ) . '" class="syg__box__img" id="' . $youtube_id . '" alt="' . esc_html( __( 'YouTube Video Thumbnail', 'simple-youtube-gdpr' ) ) . '" decoding="async" referrerpolicy="no-referrer">' . '<div class="syg__box__text">' . '<p> ' . esc_html( __( 'By loading the video, you agree to YouTube\'s privacy policy.', 'simple-youtube-gdpr' ) ) . '<br > ' . '<a href = "' . esc_html( __( 'https://policies.google.com/privacy?hl=en', 'simple-youtube-gdpr' ) ) . '" target="_blank" rel="noopener" > ' . esc_html( __( 'Read policy', 'simple-youtube-gdpr' ) ) . '</a > ' . '</p > ' . '<p ><a class="syg__box__text__btn" role = "button" > ' . esc_html( __( 'Play video', 'simple-youtube-gdpr' ) ) . '</a ></p > ' . '</div > ' . '</div > '; 209 // .syg__box 210 return $youtube_lazyload; 211 break; 212 case 'vimeo': 213 break; 214 case 'flickr': 215 break; 216 case 'issuu': 217 break; 218 } 219 return false; 220 } 221 222 /** 223 * Gets the Video ID from the URL provided 224 * 225 * @param string $url URL to search. 226 * 227 * @return bool|string 228 */ 229 private function getIDFromURL( $url, $type = 'youtube' ) 230 { 231 switch ( $type ) { 232 case 'vimeo': 233 break; 234 case 'flickr': 235 break; 236 default: 237 $pattern = '#^(?:https?:)?(?://)?(?:www\\.)?(?:youtu\\.be|youtube\\.com|youtube-nocookie\\.com)/(?:embed/|v/|watch/?\\?v=)?([\\w-]{11})#iU'; 238 break; 239 } 240 $result = preg_match( $pattern, $url, $matches ); 241 if ( !$result ) { 242 return false; 243 } 244 switch ( $type ) { 245 case 'vimeo': 246 break; 247 default: 248 // exclude YouTube playlist. 249 if ( 'youtube' == $type && 'videoseries' === $matches[1] ) { 250 return false; 251 } 252 return $matches[1]; 253 break; 254 } 255 return ''; 256 // never reach this point 257 } 258 259 /** 260 * Checks if youtube video thumbnail already exists 261 * 262 * @param int $video_id Video ID. 263 * 264 * @return bool 265 */ 266 private function isThumbnailExists( $content_id, $type = 'video' ) 267 { 268 $content_id = esc_html( $content_id ); 269 $upload_dir = wp_upload_dir(); 270 switch ( $type ) { 271 case 'video': 272 return file_exists( $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/' . md5( $content_id ) . '.jpg' ); 273 break; 274 case 'flickr': 275 return file_exists( $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/' . $content_id ); 276 break; 277 } 278 } 279 280 /** 281 * Loads youtube video thumbnail from img.youtube.com 282 * 283 * First it tries to upload a SD quality -> HQ -> Default one 284 * 285 * @param int $video_id YouTube ID. 286 * 287 * @return void 288 */ 289 private function save_local_thumbnail( $video_id, $type = 'youtube' ) 290 { 291 switch ( $type ) { 292 case 'vimeo': 293 break; 294 case 'flickr': 295 break; 296 default: 297 $video_id = esc_html( $video_id ); 298 $image_url_sddefault = 'https://img.youtube.com/vi/' . $video_id . '/sddefault.jpg'; 299 $image_url_hqdefault = 'https://img.youtube.com/vi/' . $video_id . '/hqdefault.jpg'; 300 $image_url_default = 'https://img.youtube.com/vi/' . $video_id . '/default.jpg'; 301 if ( !($image_data = file_get_contents( $image_url_sddefault )) ) { 302 if ( !($image_data = file_get_contents( $image_url_hqdefault )) ) { 303 $image_data = file_get_contents( $image_url_default ); 304 } 305 } 306 break; 307 } 308 $upload_dir = wp_upload_dir(); 309 // wp_upload_dir()[baseurl] => http://example.com/content/uploads 310 $upload_dir['path'] = $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/'; 311 // Set upload folder 312 switch ( $type ) { 313 case 'flickr': 314 break; 315 default: 316 $image_name = md5( $video_id ) . '.jpg'; 317 // Make it MD5 -> so all (_!@#$%^)(*&) symbols are sanitized 318 break; 319 } 320 $unique_file_name = wp_unique_filename( $upload_dir['path'], $image_name ); 321 // Generate unique name 322 $filename = basename( $unique_file_name ); 323 // Create image file name. 324 // Check folder permission and define file location 325 326 if ( wp_mkdir_p( $upload_dir['path'] ) ) { 327 $file = $upload_dir['path'] . '/' . $filename; 328 } else { 329 $file = $upload_dir['basedir'] . '/' . $filename; 330 } 331 332 // Create the image file on the server 333 file_put_contents( $file, $image_data ); 222 return $upload_dir['baseurl'] . '/simple-youtube-gdpr-thumbnails/' . $image_name; 223 // return local url 334 224 } 335 225 -
simple-youtube-gdpr/trunk/public/css/simple-youtube-gdpr-public.css
r2144933 r2148127 1 .syg__box, .syg__box * { 2 box-sizing: border-box; 3 margin: 0; 4 padding: 0; 5 } 6 1 7 .syg__box { 2 8 display: inline-block; … … 8 14 min-height: 12em; 9 15 background-color: #eaeaea; 16 17 background-size: cover; 18 background-position: center center; 19 background-repeat: no-repeat; 20 background-clip: border-box; 10 21 } 11 22 12 .syg__box::before, .syg__box::after { 13 display: none; 14 padding: 0 !important; 15 } 16 17 .syg__box__img { 18 display: block; 19 margin: auto; 20 max-width: 100%; 21 border: none; 22 -webkit-transition: .4s all; 23 -moz-transition: .4s all; 24 -o-transition: .4s all; 25 transition: .4s all 26 } 27 28 .syg__box:hover .syg__box__img { 29 -webkit-filter: brightness(75%); 30 filter: brightness(75%); 31 } 32 33 .syg__box-flickr:hover .syg__box__img { 34 -webkit-filter: brightness(100%); 35 filter: brightness(100%); 23 .syg__box-youtube, .syg__box-vimeo, .syg__box-ted { 24 position: absolute; 25 top: 0; 26 right: 0; 27 bottom: 0; 28 left: 0; 29 width: 100%; 30 height: 100%; 36 31 } 37 32 … … 41 36 width: 100%; 42 37 left: 0; 43 top: 50%;38 bottom: 0; 44 39 text-align: center; 45 -webkit-transform: translateY(-50%);46 -ms-transform: translateY(-50%);47 transform: translateY(-50%);48 40 49 background-color: rgba(0, 0, 0, 0.8); 50 color: white; 41 background-color: rgba(255, 255, 255, 0.9); 42 color: black; 43 font-size: small; 51 44 } 52 45 53 46 .syg__box__text p { 54 margin: 2em 0;47 margin: .5em 0; 55 48 } 56 49 57 50 .syg__box__text__btn { 58 background: red; 59 color: #fff; 60 display: inline-flex; 61 -webkit-box-align: center; 62 -ms-flex-align: center; 63 align-items: center; 64 -webkit-box-pack: center; 65 -ms-flex-pack: center; 66 justify-content: center; 67 border-radius: .1em; 68 padding: .5em 1em; 69 text-decoration: none !important; 70 -webkit-transition: background-color .125s linear; 71 -o-transition: background-color .125s linear; 72 transition: background-color .125s linear; 51 position: absolute; 52 left: 50%; 53 top: 50%; 54 padding: .8em .5em; 55 transform: translate(-50%, -50%); 56 57 background-color: rgba(255, 0, 0, .8); 58 color: #ffffff; 59 font-family: unset; 60 line-height: 1.1; 61 letter-spacing: 0.06em; 62 font-weight: lighter; 63 font-style: normal; 64 } 65 66 .syg__box__html { 67 display: none; 73 68 } 74 69 … … 76 71 /* Premium Code Stripped by Freemius */ 77 72 78 .syg__box__text__btn::before {79 background: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0' y='0' width='78' height='78' viewBox='0, 0, 78, 78'%3E%3Cg id='Layer_1'%3E%3Cg%3E%3Cpath d='M7.5,71.5 L7.5,7.5 L55.5,37.828 L7.5,71.5' fill='%23ffffff'/%3E%3Cpath d='M7.5,71.5 L7.5,7.5 L55.5,37.828 L7.5,71.5' fill-opacity='0' stroke='%23ffffff' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") no-repeat center;80 background-size: auto;81 background-size: contain;82 content: " ";83 display: inline-block;84 margin-right: 4px;85 height: 1.1em;86 width: .8em;87 }88 73 89 74 .syg__box__text__btn:hover { … … 95 80 96 81 /* Premium Code Stripped by Freemius */ 97 98 .syg__box__text__btn:hover::before {99 background: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0' y='0' width='78' height='78' viewBox='0, 0, 78, 78'%3E%3Cg id='Layer_1'%3E%3Cg%3E%3Cpath d='M7.5,71.5 L7.5,7.5 L55.5,37.828 L7.5,71.5' fill='%23ff0000'/%3E%3Cpath d='M7.5,71.5 L7.5,7.5 L55.5,37.828 L7.5,71.5' fill-opacity='0' stroke='%23ff0000' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") no-repeat center;100 background-size: contain;101 content: " ";102 }103 104 105 /* Premium Code Stripped by Freemius */ -
simple-youtube-gdpr/trunk/public/js/simple-youtube-gdpr-public.js
r2144933 r2148127 1 (function ($) { 2 'use strict'; 1 /** 2 * Loops in all ```.syg__box``` 3 * Assign onClick for each item`s button 4 */ 5 function element_lazyload() { 6 var elements = document.querySelectorAll(".syg__box"); 3 7 4 5 $(window).load(function () { 6 video_lazyload(); 7 }); 8 9 /** 10 * Loops in all ```.syg__box``` 11 * Assign onClick for each item`s button 12 */ 13 function video_lazyload() { 14 var videos = document.querySelectorAll(".syg__box"); 15 16 // if we don't have videos -> return 17 if (typeof (videos) === 'undefined' || videos === null || !videos) { 18 console.warn('No Videos found'); 19 return; 20 } 21 22 for (var i = 0; i < videos.length; i++) {// loop in all videos boxes 23 // Get Play Button 24 var syg__box__text__btn = videos[i].getElementsByClassName('syg__box__text__btn')[0]; 25 // if we don't have videos play button -> return 26 if (typeof (syg__box__text__btn) === 'undefined' || syg__box__text__btn === null || !syg__box__text__btn) { 27 console.warn('No YouTube Play Button found'); 28 console.debug(videos[i]); 29 continue; 30 } 31 // Put click events on Play buttons 32 syg__box__text__btn.addEventListener("click", function () { 33 var videoContainer__local = this.parentNode.parentNode.parentNode; 34 // Get Text 35 var syg__box__text = videoContainer__local.getElementsByClassName('syg__box__text')[0]; 36 // if we don't have video text -> return 37 if (typeof (syg__box__text) === 'undefined' || syg__box__text === null || !syg__box__text) { 38 console.warn('No YouTube Text found'); 39 return; 40 } 41 // Get Background Image - Preview Thumbnail 42 var videoImage = videoContainer__local.getElementsByClassName('syg__box__img')[0]; 43 // if we don't have video image -> return 44 if (typeof (videoImage) != 'undefined' && videoImage != null && videoImage) { 45 // Change - Replace 46 if (videoContainer__local.classList.contains('syg__box-youtube')) { 47 videoContainer__local.classList.remove('syg__box'); 48 videoContainer__local.replaceChild(getYouTubeIFrame(videoImage), videoImage); 49 } 50 51 /* Premium Code Stripped by Freemius */ 52 53 } 54 55 /* Premium Code Stripped by Freemius */ 56 57 // Remove 58 if (videoContainer__local.getElementsByClassName('syg__box__text') && videoContainer__local.getElementsByClassName('syg__box__text')[0] && syg__box__text) { 59 videoContainer__local.removeChild(syg__box__text); 60 } 61 }); 62 }// for youtube 8 // if we don't have elements -> return 9 if (typeof (elements) === 'undefined' || elements === null || !elements) { 10 console.warn('No elements found'); 11 return; 63 12 } 64 13 65 /** 66 * Creates an iframe element 67 * 68 * @param element youtubeImg. 69 * 70 * @return element iframe 71 */ 72 function getYouTubeIFrame(youtubeImg) { 73 // if we don't have youtube image -> return 74 if (typeof (youtubeImg) === 'undefined' || youtubeImg === null || !youtubeImg) { 75 console.warn('No YouTube Image found'); 76 return; 14 for (var i = 0; i < elements.length; i++) {// loop in all elements boxes 15 // Get Play Button 16 var syg__box__text__btn = elements[i].getElementsByClassName('syg__box__text__btn')[0]; 17 // if we don't have elements play button -> return 18 if (typeof (syg__box__text__btn) === 'undefined' || syg__box__text__btn === null || !syg__box__text__btn) { 19 console.warn('No Load Element Button found'); 20 continue; 77 21 } 22 // Put click events on Play buttons 23 syg__box__text__btn.addEventListener("click", function () { 24 var syg__box = this.parentNode; 25 var embed__wrapper = this.parentNode.parentNode; 26 // Get Text 27 var syg__box__text = syg__box.getElementsByClassName('syg__box__text')[0]; 28 // if we don't have video text -> return 29 if (typeof (syg__box__text) === 'undefined' || syg__box__text === null || !syg__box__text) { 30 console.warn('No Text found'); 31 return; 32 } 33 // Find HTML in hidden <template> 34 var template = syg__box.querySelector('.syg__box__html'); 35 template.innerHTML = template.innerHTML.replace('srcblockloading', 'src');// now load scripts! You WERE <template>!!!! 78 36 79 var iframe = document.createElement("iframe"); 80 iframe.setAttribute("frameborder", "0"); 81 iframe.setAttribute("allowfullscreen", ""); 82 iframe.setAttribute('allow', 'autoplay; encrypted-media'); 83 // set video source without any cookies 84 iframe.setAttribute("src", "https://www.youtube-nocookie.com/embed/" + youtubeImg.getAttribute('id') + "?rel=0&showinfo=0&autoplay=1&modestbranding=1"); 85 // set width if an image had it 86 iframe.setAttribute('width', (youtubeImg.getAttribute('width') > 0) ? (youtubeImg.getAttribute('width')) : '560'); 87 // set height if an image had it 88 iframe.setAttribute('height', (youtubeImg.getAttribute('height') > 0) ? (youtubeImg.getAttribute('height')) : '315'); 89 iframe.setAttribute('class', 'syg__box-youtube-iframe'); 90 // The Referer header will not be sent. 91 iframe.setAttribute('referrerpolicy', 'no-referrer'); 37 // Test to see if the browser supports the HTML template element by checking 38 // for the presence of the template element's content attribute. 39 if (template.content) { 40 var clone = document.importNode(template.content, true); 41 embed__wrapper.appendChild(clone); 42 } else { 43 // Find another way to add the rows to the table because 44 // the HTML template element is not supported. 45 var cloneDiv = document.createElement('div'); 46 cloneDiv.innerHTML = template.innerHTML.trim(); 47 embed__wrapper.appendChild(cloneDiv); 48 } 49 // Get element Type 50 var type = template.getAttribute('data-type'); 92 51 93 return iframe; 94 }// getIFrame 95 96 52 97 53 /* Premium Code Stripped by Freemius */ 98 54 99 55 100 })(jQuery); 56 // Remove .syg__box 57 embed__wrapper.removeChild(syg__box); 58 59 }); 60 }// for youtube 61 } 62 63 /** 64 * Running code when the document is ready 65 * 66 * @author https://plainjs.com/javascript/events/running-code-when-the-document-is-ready-15/ 67 * @param callback 68 */ 69 function ready(callback) { 70 // in case the document is already rendered 71 if (document.readyState != 'loading') callback(); 72 // modern browsers 73 else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback); 74 // IE <= 8 75 else document.attachEvent('onreadystatechange', function () { 76 if (document.readyState == 'complete') callback(); 77 }); 78 } 79 80 // Running code when the document is ready 81 ready(function () { 82 // do something 83 element_lazyload(); 84 }); -
simple-youtube-gdpr/trunk/simple-youtube-gdpr.php
r2144933 r2148127 17 17 * Plugin URI: https://alexeyvolkov.com/blog/simple-youtube-gdpr 18 18 * Description: Integrate YouTube and Vimeo videos securely! 19 * Version: 0.819 * Version: 1.0 20 20 * Author: Alexey Volkov 21 21 * Author URI: https://alexeyvolkov.com/ … … 119 119 * Rename this for your plugin and update it as you release new versions. 120 120 */ 121 define( 'SIMPLE_YOUTUBE_GDPR_VERSION', ' 0.8' );121 define( 'SIMPLE_YOUTUBE_GDPR_VERSION', '1.0' ); 122 122 /** 123 123 * The code that runs during plugin activation.
Note: See TracChangeset
for help on using the changeset viewer.