Changeset 2143715
- Timestamp:
- 08/22/2019 12:28:17 PM (7 years ago)
- Location:
- simple-youtube-gdpr
- Files:
-
- 411 added
- 4 deleted
- 11 edited
-
assets/screenshot-1.png (added)
-
tags/0.7 (added)
-
tags/0.7/LICENSE.txt (added)
-
tags/0.7/README.txt (added)
-
tags/0.7/freemius (added)
-
tags/0.7/freemius/LICENSE.txt (added)
-
tags/0.7/freemius/assets (added)
-
tags/0.7/freemius/assets/css (added)
-
tags/0.7/freemius/assets/css/admin (added)
-
tags/0.7/freemius/assets/css/admin/account.css (added)
-
tags/0.7/freemius/assets/css/admin/add-ons.css (added)
-
tags/0.7/freemius/assets/css/admin/affiliation.css (added)
-
tags/0.7/freemius/assets/css/admin/checkout.css (added)
-
tags/0.7/freemius/assets/css/admin/common.css (added)
-
tags/0.7/freemius/assets/css/admin/connect.css (added)
-
tags/0.7/freemius/assets/css/admin/debug.css (added)
-
tags/0.7/freemius/assets/css/admin/dialog-boxes.css (added)
-
tags/0.7/freemius/assets/css/admin/gdpr-optin-notice.css (added)
-
tags/0.7/freemius/assets/css/admin/index.php (added)
-
tags/0.7/freemius/assets/css/customizer.css (added)
-
tags/0.7/freemius/assets/css/index.php (added)
-
tags/0.7/freemius/assets/img (added)
-
tags/0.7/freemius/assets/img/index.php (added)
-
tags/0.7/freemius/assets/img/plugin-icon.png (added)
-
tags/0.7/freemius/assets/img/simple-youtube-gdpr.png (added)
-
tags/0.7/freemius/assets/img/theme-icon.png (added)
-
tags/0.7/freemius/assets/index.php (added)
-
tags/0.7/freemius/assets/js (added)
-
tags/0.7/freemius/assets/js/index.php (added)
-
tags/0.7/freemius/assets/js/nojquery.ba-postmessage.js (added)
-
tags/0.7/freemius/assets/js/nojquery.ba-postmessage.min.js (added)
-
tags/0.7/freemius/assets/js/postmessage.js (added)
-
tags/0.7/freemius/config.php (added)
-
tags/0.7/freemius/includes (added)
-
tags/0.7/freemius/includes/class-freemius-abstract.php (added)
-
tags/0.7/freemius/includes/class-freemius.php (added)
-
tags/0.7/freemius/includes/class-fs-admin-notices.php (added)
-
tags/0.7/freemius/includes/class-fs-api.php (added)
-
tags/0.7/freemius/includes/class-fs-logger.php (added)
-
tags/0.7/freemius/includes/class-fs-options.php (added)
-
tags/0.7/freemius/includes/class-fs-plugin-updater.php (added)
-
tags/0.7/freemius/includes/class-fs-security.php (added)
-
tags/0.7/freemius/includes/class-fs-storage.php (added)
-
tags/0.7/freemius/includes/class-fs-user-lock.php (added)
-
tags/0.7/freemius/includes/customizer (added)
-
tags/0.7/freemius/includes/customizer/class-fs-customizer-support-section.php (added)
-
tags/0.7/freemius/includes/customizer/class-fs-customizer-upsell-control.php (added)
-
tags/0.7/freemius/includes/customizer/index.php (added)
-
tags/0.7/freemius/includes/debug (added)
-
tags/0.7/freemius/includes/debug/class-fs-debug-bar-panel.php (added)
-
tags/0.7/freemius/includes/debug/debug-bar-start.php (added)
-
tags/0.7/freemius/includes/debug/index.php (added)
-
tags/0.7/freemius/includes/entities (added)
-
tags/0.7/freemius/includes/entities/class-fs-affiliate-terms.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-affiliate.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-billing.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-entity.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-payment.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-plugin-info.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-plugin-license.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-plugin-plan.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-plugin-tag.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-plugin.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-pricing.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-scope-entity.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-site.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-subscription.php (added)
-
tags/0.7/freemius/includes/entities/class-fs-user.php (added)
-
tags/0.7/freemius/includes/entities/index.php (added)
-
tags/0.7/freemius/includes/fs-core-functions.php (added)
-
tags/0.7/freemius/includes/fs-essential-functions.php (added)
-
tags/0.7/freemius/includes/fs-plugin-info-dialog.php (added)
-
tags/0.7/freemius/includes/i18n.php (added)
-
tags/0.7/freemius/includes/index.php (added)
-
tags/0.7/freemius/includes/l10n.php (added)
-
tags/0.7/freemius/includes/managers (added)
-
tags/0.7/freemius/includes/managers/class-fs-admin-menu-manager.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-admin-notice-manager.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-cache-manager.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-gdpr-manager.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-key-value-storage.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-license-manager.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-option-manager.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-plan-manager.php (added)
-
tags/0.7/freemius/includes/managers/class-fs-plugin-manager.php (added)
-
tags/0.7/freemius/includes/managers/index.php (added)
-
tags/0.7/freemius/includes/sdk (added)
-
tags/0.7/freemius/includes/sdk/Exceptions (added)
-
tags/0.7/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php (added)
-
tags/0.7/freemius/includes/sdk/Exceptions/EmptyArgumentException.php (added)
-
tags/0.7/freemius/includes/sdk/Exceptions/Exception.php (added)
-
tags/0.7/freemius/includes/sdk/Exceptions/InvalidArgumentException.php (added)
-
tags/0.7/freemius/includes/sdk/Exceptions/OAuthException.php (added)
-
tags/0.7/freemius/includes/sdk/Exceptions/index.php (added)
-
tags/0.7/freemius/includes/sdk/FreemiusBase.php (added)
-
tags/0.7/freemius/includes/sdk/FreemiusWordPress.php (added)
-
tags/0.7/freemius/includes/sdk/LICENSE.txt (added)
-
tags/0.7/freemius/includes/sdk/index.php (added)
-
tags/0.7/freemius/includes/supplements (added)
-
tags/0.7/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php (added)
-
tags/0.7/freemius/includes/supplements/fs-essential-functions-2.2.1.php (added)
-
tags/0.7/freemius/includes/supplements/index.php (added)
-
tags/0.7/freemius/index.php (added)
-
tags/0.7/freemius/languages (added)
-
tags/0.7/freemius/languages/freemius-da_DK.mo (added)
-
tags/0.7/freemius/languages/freemius-da_DK.po (added)
-
tags/0.7/freemius/languages/freemius-en.mo (added)
-
tags/0.7/freemius/languages/freemius-en.po (added)
-
tags/0.7/freemius/languages/freemius-es_ES.mo (added)
-
tags/0.7/freemius/languages/freemius-es_ES.po (added)
-
tags/0.7/freemius/languages/freemius-fr_FR.mo (added)
-
tags/0.7/freemius/languages/freemius-fr_FR.po (added)
-
tags/0.7/freemius/languages/freemius-he_IL.mo (added)
-
tags/0.7/freemius/languages/freemius-he_IL.po (added)
-
tags/0.7/freemius/languages/freemius-hu_HU.mo (added)
-
tags/0.7/freemius/languages/freemius-hu_HU.po (added)
-
tags/0.7/freemius/languages/freemius-it_IT.mo (added)
-
tags/0.7/freemius/languages/freemius-it_IT.po (added)
-
tags/0.7/freemius/languages/freemius-ja_JP.mo (added)
-
tags/0.7/freemius/languages/freemius-ja_JP.po (added)
-
tags/0.7/freemius/languages/freemius-nl_NL.mo (added)
-
tags/0.7/freemius/languages/freemius-nl_NL.po (added)
-
tags/0.7/freemius/languages/freemius-ru_RU.mo (added)
-
tags/0.7/freemius/languages/freemius-ru_RU.po (added)
-
tags/0.7/freemius/languages/freemius.pot (added)
-
tags/0.7/freemius/languages/index.php (added)
-
tags/0.7/freemius/require.php (added)
-
tags/0.7/freemius/start.php (added)
-
tags/0.7/freemius/templates (added)
-
tags/0.7/freemius/templates/account (added)
-
tags/0.7/freemius/templates/account.php (added)
-
tags/0.7/freemius/templates/account/billing.php (added)
-
tags/0.7/freemius/templates/account/index.php (added)
-
tags/0.7/freemius/templates/account/partials (added)
-
tags/0.7/freemius/templates/account/partials/activate-license-button.php (added)
-
tags/0.7/freemius/templates/account/partials/addon.php (added)
-
tags/0.7/freemius/templates/account/partials/deactivate-license-button.php (added)
-
tags/0.7/freemius/templates/account/partials/index.php (added)
-
tags/0.7/freemius/templates/account/partials/site.php (added)
-
tags/0.7/freemius/templates/account/payments.php (added)
-
tags/0.7/freemius/templates/add-ons.php (added)
-
tags/0.7/freemius/templates/add-trial-to-pricing.php (added)
-
tags/0.7/freemius/templates/admin-notice.php (added)
-
tags/0.7/freemius/templates/ajax-loader.php (added)
-
tags/0.7/freemius/templates/auto-installation.php (added)
-
tags/0.7/freemius/templates/checkout.php (added)
-
tags/0.7/freemius/templates/connect.php (added)
-
tags/0.7/freemius/templates/contact.php (added)
-
tags/0.7/freemius/templates/debug (added)
-
tags/0.7/freemius/templates/debug.php (added)
-
tags/0.7/freemius/templates/debug/api-calls.php (added)
-
tags/0.7/freemius/templates/debug/index.php (added)
-
tags/0.7/freemius/templates/debug/logger.php (added)
-
tags/0.7/freemius/templates/debug/plugins-themes-sync.php (added)
-
tags/0.7/freemius/templates/debug/scheduled-crons.php (added)
-
tags/0.7/freemius/templates/email.php (added)
-
tags/0.7/freemius/templates/firewall-issues-js.php (added)
-
tags/0.7/freemius/templates/forms (added)
-
tags/0.7/freemius/templates/forms/affiliation.php (added)
-
tags/0.7/freemius/templates/forms/deactivation (added)
-
tags/0.7/freemius/templates/forms/deactivation/contact.php (added)
-
tags/0.7/freemius/templates/forms/deactivation/form.php (added)
-
tags/0.7/freemius/templates/forms/deactivation/index.php (added)
-
tags/0.7/freemius/templates/forms/deactivation/retry-skip.php (added)
-
tags/0.7/freemius/templates/forms/index.php (added)
-
tags/0.7/freemius/templates/forms/license-activation.php (added)
-
tags/0.7/freemius/templates/forms/optout.php (added)
-
tags/0.7/freemius/templates/forms/premium-versions-upgrade-handler.php (added)
-
tags/0.7/freemius/templates/forms/premium-versions-upgrade-metadata.php (added)
-
tags/0.7/freemius/templates/forms/resend-key.php (added)
-
tags/0.7/freemius/templates/forms/subscription-cancellation.php (added)
-
tags/0.7/freemius/templates/forms/trial-start.php (added)
-
tags/0.7/freemius/templates/gdpr-optin-js.php (added)
-
tags/0.7/freemius/templates/index.php (added)
-
tags/0.7/freemius/templates/js (added)
-
tags/0.7/freemius/templates/js/index.php (added)
-
tags/0.7/freemius/templates/js/jquery.content-change.php (added)
-
tags/0.7/freemius/templates/js/open-license-activation.php (added)
-
tags/0.7/freemius/templates/js/style-premium-theme.php (added)
-
tags/0.7/freemius/templates/partials (added)
-
tags/0.7/freemius/templates/partials/network-activation.php (added)
-
tags/0.7/freemius/templates/plugin-icon.php (added)
-
tags/0.7/freemius/templates/plugin-info (added)
-
tags/0.7/freemius/templates/plugin-info/description.php (added)
-
tags/0.7/freemius/templates/plugin-info/features.php (added)
-
tags/0.7/freemius/templates/plugin-info/index.php (added)
-
tags/0.7/freemius/templates/plugin-info/screenshots.php (added)
-
tags/0.7/freemius/templates/powered-by.php (added)
-
tags/0.7/freemius/templates/pricing.php (added)
-
tags/0.7/freemius/templates/secure-https-header.php (added)
-
tags/0.7/freemius/templates/sticky-admin-notice-js.php (added)
-
tags/0.7/freemius/templates/tabs-capture-js.php (added)
-
tags/0.7/freemius/templates/tabs.php (added)
-
tags/0.7/includes (added)
-
tags/0.7/includes/class-simple-youtube-gdpr-activator.php (added)
-
tags/0.7/includes/class-simple-youtube-gdpr-deactivator.php (added)
-
tags/0.7/includes/class-simple-youtube-gdpr-i18n.php (added)
-
tags/0.7/includes/class-simple-youtube-gdpr-loader.php (added)
-
tags/0.7/includes/class-simple-youtube-gdpr.php (added)
-
tags/0.7/includes/index.php (added)
-
tags/0.7/includes/simple_html_dom.php (added)
-
tags/0.7/index.php (added)
-
tags/0.7/languages (added)
-
tags/0.7/languages/simple-youtube-gdpr-de_DE.mo (added)
-
tags/0.7/languages/simple-youtube-gdpr-de_DE.po (added)
-
tags/0.7/languages/simple-youtube-gdpr-fr_FR.mo (added)
-
tags/0.7/languages/simple-youtube-gdpr-fr_FR.po (added)
-
tags/0.7/languages/simple-youtube-gdpr-ru_RU.mo (added)
-
tags/0.7/languages/simple-youtube-gdpr-ru_RU.po (added)
-
tags/0.7/languages/simple-youtube-gdpr.pot (added)
-
tags/0.7/public (added)
-
tags/0.7/public/class-simple-youtube-gdpr-public.php (added)
-
tags/0.7/public/css (added)
-
tags/0.7/public/css/simple-youtube-gdpr-public.css (added)
-
tags/0.7/public/index.php (added)
-
tags/0.7/public/js (added)
-
tags/0.7/public/js/simple-youtube-gdpr-public.js (added)
-
tags/0.7/public/partials (added)
-
tags/0.7/public/partials/simple-youtube-gdpr-public-display.php (added)
-
tags/0.7/simple-youtube-gdpr.php (added)
-
trunk/README.txt (modified) (5 diffs)
-
trunk/freemius (added)
-
trunk/freemius/LICENSE.txt (added)
-
trunk/freemius/assets (added)
-
trunk/freemius/assets/css (added)
-
trunk/freemius/assets/css/admin (added)
-
trunk/freemius/assets/css/admin/account.css (added)
-
trunk/freemius/assets/css/admin/add-ons.css (added)
-
trunk/freemius/assets/css/admin/affiliation.css (added)
-
trunk/freemius/assets/css/admin/checkout.css (added)
-
trunk/freemius/assets/css/admin/common.css (added)
-
trunk/freemius/assets/css/admin/connect.css (added)
-
trunk/freemius/assets/css/admin/debug.css (added)
-
trunk/freemius/assets/css/admin/dialog-boxes.css (added)
-
trunk/freemius/assets/css/admin/gdpr-optin-notice.css (added)
-
trunk/freemius/assets/css/admin/index.php (added)
-
trunk/freemius/assets/css/customizer.css (added)
-
trunk/freemius/assets/css/index.php (added)
-
trunk/freemius/assets/img (added)
-
trunk/freemius/assets/img/index.php (added)
-
trunk/freemius/assets/img/plugin-icon.png (added)
-
trunk/freemius/assets/img/simple-youtube-gdpr.png (added)
-
trunk/freemius/assets/img/theme-icon.png (added)
-
trunk/freemius/assets/index.php (added)
-
trunk/freemius/assets/js (added)
-
trunk/freemius/assets/js/index.php (added)
-
trunk/freemius/assets/js/nojquery.ba-postmessage.js (added)
-
trunk/freemius/assets/js/nojquery.ba-postmessage.min.js (added)
-
trunk/freemius/assets/js/postmessage.js (added)
-
trunk/freemius/config.php (added)
-
trunk/freemius/includes (added)
-
trunk/freemius/includes/class-freemius-abstract.php (added)
-
trunk/freemius/includes/class-freemius.php (added)
-
trunk/freemius/includes/class-fs-admin-notices.php (added)
-
trunk/freemius/includes/class-fs-api.php (added)
-
trunk/freemius/includes/class-fs-logger.php (added)
-
trunk/freemius/includes/class-fs-options.php (added)
-
trunk/freemius/includes/class-fs-plugin-updater.php (added)
-
trunk/freemius/includes/class-fs-security.php (added)
-
trunk/freemius/includes/class-fs-storage.php (added)
-
trunk/freemius/includes/class-fs-user-lock.php (added)
-
trunk/freemius/includes/customizer (added)
-
trunk/freemius/includes/customizer/class-fs-customizer-support-section.php (added)
-
trunk/freemius/includes/customizer/class-fs-customizer-upsell-control.php (added)
-
trunk/freemius/includes/customizer/index.php (added)
-
trunk/freemius/includes/debug (added)
-
trunk/freemius/includes/debug/class-fs-debug-bar-panel.php (added)
-
trunk/freemius/includes/debug/debug-bar-start.php (added)
-
trunk/freemius/includes/debug/index.php (added)
-
trunk/freemius/includes/entities (added)
-
trunk/freemius/includes/entities/class-fs-affiliate-terms.php (added)
-
trunk/freemius/includes/entities/class-fs-affiliate.php (added)
-
trunk/freemius/includes/entities/class-fs-billing.php (added)
-
trunk/freemius/includes/entities/class-fs-entity.php (added)
-
trunk/freemius/includes/entities/class-fs-payment.php (added)
-
trunk/freemius/includes/entities/class-fs-plugin-info.php (added)
-
trunk/freemius/includes/entities/class-fs-plugin-license.php (added)
-
trunk/freemius/includes/entities/class-fs-plugin-plan.php (added)
-
trunk/freemius/includes/entities/class-fs-plugin-tag.php (added)
-
trunk/freemius/includes/entities/class-fs-plugin.php (added)
-
trunk/freemius/includes/entities/class-fs-pricing.php (added)
-
trunk/freemius/includes/entities/class-fs-scope-entity.php (added)
-
trunk/freemius/includes/entities/class-fs-site.php (added)
-
trunk/freemius/includes/entities/class-fs-subscription.php (added)
-
trunk/freemius/includes/entities/class-fs-user.php (added)
-
trunk/freemius/includes/entities/index.php (added)
-
trunk/freemius/includes/fs-core-functions.php (added)
-
trunk/freemius/includes/fs-essential-functions.php (added)
-
trunk/freemius/includes/fs-plugin-info-dialog.php (added)
-
trunk/freemius/includes/i18n.php (added)
-
trunk/freemius/includes/index.php (added)
-
trunk/freemius/includes/l10n.php (added)
-
trunk/freemius/includes/managers (added)
-
trunk/freemius/includes/managers/class-fs-admin-menu-manager.php (added)
-
trunk/freemius/includes/managers/class-fs-admin-notice-manager.php (added)
-
trunk/freemius/includes/managers/class-fs-cache-manager.php (added)
-
trunk/freemius/includes/managers/class-fs-gdpr-manager.php (added)
-
trunk/freemius/includes/managers/class-fs-key-value-storage.php (added)
-
trunk/freemius/includes/managers/class-fs-license-manager.php (added)
-
trunk/freemius/includes/managers/class-fs-option-manager.php (added)
-
trunk/freemius/includes/managers/class-fs-plan-manager.php (added)
-
trunk/freemius/includes/managers/class-fs-plugin-manager.php (added)
-
trunk/freemius/includes/managers/index.php (added)
-
trunk/freemius/includes/sdk (added)
-
trunk/freemius/includes/sdk/Exceptions (added)
-
trunk/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php (added)
-
trunk/freemius/includes/sdk/Exceptions/EmptyArgumentException.php (added)
-
trunk/freemius/includes/sdk/Exceptions/Exception.php (added)
-
trunk/freemius/includes/sdk/Exceptions/InvalidArgumentException.php (added)
-
trunk/freemius/includes/sdk/Exceptions/OAuthException.php (added)
-
trunk/freemius/includes/sdk/Exceptions/index.php (added)
-
trunk/freemius/includes/sdk/FreemiusBase.php (added)
-
trunk/freemius/includes/sdk/FreemiusWordPress.php (added)
-
trunk/freemius/includes/sdk/LICENSE.txt (added)
-
trunk/freemius/includes/sdk/index.php (added)
-
trunk/freemius/includes/supplements (added)
-
trunk/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php (added)
-
trunk/freemius/includes/supplements/fs-essential-functions-2.2.1.php (added)
-
trunk/freemius/includes/supplements/index.php (added)
-
trunk/freemius/index.php (added)
-
trunk/freemius/languages (added)
-
trunk/freemius/languages/freemius-da_DK.mo (added)
-
trunk/freemius/languages/freemius-da_DK.po (added)
-
trunk/freemius/languages/freemius-en.mo (added)
-
trunk/freemius/languages/freemius-en.po (added)
-
trunk/freemius/languages/freemius-es_ES.mo (added)
-
trunk/freemius/languages/freemius-es_ES.po (added)
-
trunk/freemius/languages/freemius-fr_FR.mo (added)
-
trunk/freemius/languages/freemius-fr_FR.po (added)
-
trunk/freemius/languages/freemius-he_IL.mo (added)
-
trunk/freemius/languages/freemius-he_IL.po (added)
-
trunk/freemius/languages/freemius-hu_HU.mo (added)
-
trunk/freemius/languages/freemius-hu_HU.po (added)
-
trunk/freemius/languages/freemius-it_IT.mo (added)
-
trunk/freemius/languages/freemius-it_IT.po (added)
-
trunk/freemius/languages/freemius-ja_JP.mo (added)
-
trunk/freemius/languages/freemius-ja_JP.po (added)
-
trunk/freemius/languages/freemius-nl_NL.mo (added)
-
trunk/freemius/languages/freemius-nl_NL.po (added)
-
trunk/freemius/languages/freemius-ru_RU.mo (added)
-
trunk/freemius/languages/freemius-ru_RU.po (added)
-
trunk/freemius/languages/freemius.pot (added)
-
trunk/freemius/languages/index.php (added)
-
trunk/freemius/require.php (added)
-
trunk/freemius/start.php (added)
-
trunk/freemius/templates (added)
-
trunk/freemius/templates/account (added)
-
trunk/freemius/templates/account.php (added)
-
trunk/freemius/templates/account/billing.php (added)
-
trunk/freemius/templates/account/index.php (added)
-
trunk/freemius/templates/account/partials (added)
-
trunk/freemius/templates/account/partials/activate-license-button.php (added)
-
trunk/freemius/templates/account/partials/addon.php (added)
-
trunk/freemius/templates/account/partials/deactivate-license-button.php (added)
-
trunk/freemius/templates/account/partials/index.php (added)
-
trunk/freemius/templates/account/partials/site.php (added)
-
trunk/freemius/templates/account/payments.php (added)
-
trunk/freemius/templates/add-ons.php (added)
-
trunk/freemius/templates/add-trial-to-pricing.php (added)
-
trunk/freemius/templates/admin-notice.php (added)
-
trunk/freemius/templates/ajax-loader.php (added)
-
trunk/freemius/templates/auto-installation.php (added)
-
trunk/freemius/templates/checkout.php (added)
-
trunk/freemius/templates/connect.php (added)
-
trunk/freemius/templates/contact.php (added)
-
trunk/freemius/templates/debug (added)
-
trunk/freemius/templates/debug.php (added)
-
trunk/freemius/templates/debug/api-calls.php (added)
-
trunk/freemius/templates/debug/index.php (added)
-
trunk/freemius/templates/debug/logger.php (added)
-
trunk/freemius/templates/debug/plugins-themes-sync.php (added)
-
trunk/freemius/templates/debug/scheduled-crons.php (added)
-
trunk/freemius/templates/email.php (added)
-
trunk/freemius/templates/firewall-issues-js.php (added)
-
trunk/freemius/templates/forms (added)
-
trunk/freemius/templates/forms/affiliation.php (added)
-
trunk/freemius/templates/forms/deactivation (added)
-
trunk/freemius/templates/forms/deactivation/contact.php (added)
-
trunk/freemius/templates/forms/deactivation/form.php (added)
-
trunk/freemius/templates/forms/deactivation/index.php (added)
-
trunk/freemius/templates/forms/deactivation/retry-skip.php (added)
-
trunk/freemius/templates/forms/index.php (added)
-
trunk/freemius/templates/forms/license-activation.php (added)
-
trunk/freemius/templates/forms/optout.php (added)
-
trunk/freemius/templates/forms/premium-versions-upgrade-handler.php (added)
-
trunk/freemius/templates/forms/premium-versions-upgrade-metadata.php (added)
-
trunk/freemius/templates/forms/resend-key.php (added)
-
trunk/freemius/templates/forms/subscription-cancellation.php (added)
-
trunk/freemius/templates/forms/trial-start.php (added)
-
trunk/freemius/templates/gdpr-optin-js.php (added)
-
trunk/freemius/templates/index.php (added)
-
trunk/freemius/templates/js (added)
-
trunk/freemius/templates/js/index.php (added)
-
trunk/freemius/templates/js/jquery.content-change.php (added)
-
trunk/freemius/templates/js/open-license-activation.php (added)
-
trunk/freemius/templates/js/style-premium-theme.php (added)
-
trunk/freemius/templates/partials (added)
-
trunk/freemius/templates/partials/network-activation.php (added)
-
trunk/freemius/templates/plugin-icon.php (added)
-
trunk/freemius/templates/plugin-info (added)
-
trunk/freemius/templates/plugin-info/description.php (added)
-
trunk/freemius/templates/plugin-info/features.php (added)
-
trunk/freemius/templates/plugin-info/index.php (added)
-
trunk/freemius/templates/plugin-info/screenshots.php (added)
-
trunk/freemius/templates/powered-by.php (added)
-
trunk/freemius/templates/pricing.php (added)
-
trunk/freemius/templates/secure-https-header.php (added)
-
trunk/freemius/templates/sticky-admin-notice-js.php (added)
-
trunk/freemius/templates/tabs-capture-js.php (added)
-
trunk/freemius/templates/tabs.php (added)
-
trunk/includes/class-simple-youtube-gdpr.php (modified) (1 diff)
-
trunk/languages/simple-youtube-gdpr-de_DE.mo (modified) (previous)
-
trunk/languages/simple-youtube-gdpr-de_DE.po (modified) (1 diff)
-
trunk/languages/simple-youtube-gdpr-en_US.mo (deleted)
-
trunk/languages/simple-youtube-gdpr-en_US.po (deleted)
-
trunk/languages/simple-youtube-gdpr-fr_FR.mo (added)
-
trunk/languages/simple-youtube-gdpr-fr_FR.po (added)
-
trunk/languages/simple-youtube-gdpr-ru_RU.mo (modified) (previous)
-
trunk/languages/simple-youtube-gdpr-ru_RU.po (modified) (1 diff)
-
trunk/languages/simple-youtube-gdpr.pot (modified) (1 diff)
-
trunk/public/class-simple-youtube-gdpr-public.php (modified) (2 diffs)
-
trunk/public/css/simple-youtube-gdpr-public.css (modified) (3 diffs)
-
trunk/public/img/youtube.png (deleted)
-
trunk/public/js/simple-youtube-gdpr-public.js (modified) (4 diffs)
-
trunk/simple-youtube-gdpr.php (modified) (2 diffs)
-
trunk/uninstall.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
simple-youtube-gdpr/trunk/README.txt
r2084315 r2143715 1 === Simple YouTube GDPR===1 === WordPress YouTube and Vimeo videos security Plugin (GDPR) === 2 2 Contributors: 2plus2is4 3 3 Donate link: https://money.yandex.ru/to/41001417963743 4 Tags: iframe, youtube, gdpr4 Tags: iframe, YouTube, GDPR, Vimeo, thumbnails, Consent, Compliance 5 5 Requires at least: 5.0.1 6 Tested up to: 5.2 7 Stable tag: 0. 66 Tested up to: 5.2.2 7 Stable tag: 0.7 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Replaces all YouTube video iframes with a local image and loads a no cookie version of video. 12 Integrate YouTube and Vimeo videos securely! 13 13 14 14 == Description == 15 15 16 Finds all YouTube videos in Posts and Pages and replaces them with a local static image (video thumbnail) 16 Simple YouTube GDPR automatically detects and blocks Iframes from YouTube and Vimeo. Only with a click by the visitor the content is loaded. 17 18 Simple YouTube GDPR automatically saves YouTube and Vimeo thumbnails locally without the visitor's IP address being transmitted to the video platform. 19 20  17 21 18 22 Features: 19 23 20 * No YouTube Cookies24 * Google gets NO cookies 21 25 * No content changes required 22 26 * Allows you to keep YouTube videos under GDPR law 23 27 28 == Want more? == 29 If you enjoy this plugin and you want your other content to be safe, consider purchasing the [premium version](https://checkout.freemius.com/mode/dialog/plugin/4426/plan/7118/). 30 31 = Premium features = 32 * Integrate Vimeo videos securely! 33 24 34 == Installation == 35 1. Go to “plugins” in your Wordpress Dashboard, and click “add new”. 36 1. Click “upload”, and select the downloaded zip file. 25 37 26 1. Upload the plugin files to the `/wp-content/plugins/simple-youtube-gdpr` directory, or install the plugin through the WordPress plugins screen directly. 27 1. Activate the plugin through the 'Plugins' menu in WordPress 38 1. Activate. 28 39 1. Enjoy! 29 40 … … 32 43 = Does 'Local' mean my server downloads all the images? = 33 44 34 Yes. Probably you can find a folder `/wp-content/uploads/simple-youtube-gdpr-thumbnails` with all the images inside45 Yes. Usually you can find a folder `/wp-content/uploads/simple-youtube-gdpr-thumbnails` with all the images inside 35 46 36 47 = Does youtube send cookies? = … … 49 60 50 61 Yes. Class: 51 * ` youtube_lazyload` - main wrapping `<div>`52 * ` youtube_lazyload__img` - the thumbnail53 * ` youtube_lazyload__play` - thumbnail play button54 * ` youtube_lazyload__iframe` - youtube `<iframe>`62 * `syg__box` - main wrapping `<div>` (`syg__box-%SERVICE%` where `%SERVICE%` can be youtube or vimeo) 63 * `syg__box__img` - the thumbnail 64 * `syg__box__text__btn` - thumbnail play button 65 * `syg__box-youtube-iframe` - video `<iframe>` (where `%SERVICE%` can be youtube or vimeo) 55 66 56 67 = What are standard width and height of iframe? = … … 65 76 1. Apply scripts so that if user clicks iframe appears 66 77 78 == Screenshots == 79 80 Integrate YouTube and Vimeo videos securely! 81 82 1. YouTube video is replaced with a static preview image and a play button. 83 67 84 == Changelog == 85 86 = 0.7 = 87 88 * CSS classes were changed 68 89 69 90 = 0.6 = … … 74 95 == Upgrade Notice == 75 96 97 = 0.7 = 98 * No content on the page bug is fixed. 99 * New design of play button 100 * Consent Text is added 76 101 = 0.6 = 77 Twenty Nineteen theme bug fixed. It replacethe whole WordPress <figure> tag with an image.102 Twenty Nineteen theme bug is fixed. It replaces the whole WordPress <figure> tag with an image. -
simple-youtube-gdpr/trunk/includes/class-simple-youtube-gdpr.php
r2080878 r2143715 71 71 $this->version = SIMPLE_YOUTUBE_GDPR_VERSION; 72 72 } else { 73 $this->version = '0. 6';73 $this->version = '0.7'; 74 74 } 75 75 $this->plugin_name = 'simple-youtube-gdpr'; -
simple-youtube-gdpr/trunk/languages/simple-youtube-gdpr-de_DE.po
r2072368 r2143715 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: \n" 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: \n" 3 "Project-Id-Version: Simple YouTube GDPR\n" 4 "POT-Creation-Date: 2019-08-22 15:02+0300\n" 5 "PO-Revision-Date: 2019-08-22 15:03+0300\n" 6 "Last-Translator: \n" 6 7 "Language-Team: \n" 8 "Language: de_DE\n" 7 9 "MIME-Version: 1.0\n" 8 10 "Content-Type: text/plain; charset=UTF-8\n" 9 11 "Content-Transfer-Encoding: 8bit\n" 10 "X-Generator: Poedit 2. 2.1\n"11 " Last-Translator: Alexey Volkov <[email protected]>\n"12 "X-Generator: Poedit 2.0.7\n" 13 "X-Poedit-Basepath: ..\n" 12 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "Language: de\n" 15 "X-Poedit-Flags-xgettext: --add-comments=translators:\n" 16 "X-Poedit-WPHeader: simple-youtube-gdpr.php\n" 17 "X-Poedit-SourceCharset: UTF-8\n" 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" 21 "X-Poedit-SearchPath-0: .\n" 22 "X-Poedit-SearchPathExcluded-0: *.js\n" 14 23 15 #: /public/class-simple-youtube-gdpr-public.php:20024 #: public/class-simple-youtube-gdpr-public.php:221 16 25 msgid "Click to Play Video" 17 26 msgstr "Anklicken um abzuspielen" 18 27 19 #: /public/class-simple-youtube-gdpr-public.php:20128 #: public/class-simple-youtube-gdpr-public.php:222 20 29 msgid "YouTube Video Thumbnail" 21 30 msgstr "YouTube Video Miniaturansicht" 31 32 #: public/class-simple-youtube-gdpr-public.php:225 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:227 39 #, fuzzy 40 #| msgid "https://policies.google.com/privacy?hl=en&gl=en" 41 msgid "https://policies.google.com/privacy?hl=en" 42 msgstr "https://policies.google.com/privacy?hl=de" 43 44 #: public/class-simple-youtube-gdpr-public.php:228 45 #: public/class-simple-youtube-gdpr-public.php:257 46 msgid "Learn more" 47 msgstr "Google-Datenschutzerklärung" 48 49 #: public/class-simple-youtube-gdpr-public.php:231 50 #: public/class-simple-youtube-gdpr-public.php:260 51 msgid "Load video" 52 msgstr "Video laden" 53 54 #: public/class-simple-youtube-gdpr-public.php:254 55 #, fuzzy 56 #| msgid "By loading the video, you agree to YouTube's privacy policy." 57 msgid "By loading the video, you agree to Vimeo's privacy policy." 58 msgstr "" 59 "Durch das Laden des Videos stimmst du den Datenschutzbestimmungen von " 60 "YouTube zu." 61 62 #: public/class-simple-youtube-gdpr-public.php:256 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=de" 67 68 #: simple-youtube-gdpr.php:101 69 msgid "Click to Upgrade your plan" 70 msgstr "Klicken Sie hier, um Ihren Plan zu aktualisieren" 71 72 #: simple-youtube-gdpr.php:101 73 msgid "Get Vimeo Blocker!" 74 msgstr "Holen Sie sich Vimeo Blocker!" 75 76 #. Plugin Name of the plugin/theme 77 msgid "Simple YouTube GDPR" 78 msgstr "Simple YouTube GDPR" 79 80 #. Plugin URI of the plugin/theme 81 msgid "https://alexeyvolkov.com/blog/simple-youtube-gdpr" 82 msgstr "https://alexeyvolkov.com/blog/simple-youtube-gdpr" 83 84 #. Description of the plugin/theme 85 msgid "Integrate YouTube and Vimeo videos securely!" 86 msgstr "Integrieren Sie YouTube- und Vimeo-Videos sicher!" 87 88 #. Author of the plugin/theme 89 msgid "Alexey Volkov" 90 msgstr "Alexey Volkov" 91 92 #. Author URI of the plugin/theme 93 msgid "https://alexeyvolkov.com/" 94 msgstr "https://alexeyvolkov.com/" 95 96 #~ msgid "" 97 #~ "Replaces all YouTube video iframes with a local image and loads a no " 98 #~ "cookie version of video." 99 #~ msgstr "" 100 #~ "Ersetzt alle YouTube-Video-Iframes durch ein lokales Bild und lädt eine " 101 #~ "No-Cookie-Version des Videos." -
simple-youtube-gdpr/trunk/languages/simple-youtube-gdpr-ru_RU.po
r2072368 r2143715 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: \n" 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: \n" 3 "Project-Id-Version: Simple YouTube GDPR\n" 4 "POT-Creation-Date: 2019-08-22 15:03+0300\n" 5 "PO-Revision-Date: 2019-08-22 15:05+0300\n" 6 "Last-Translator: \n" 6 7 "Language-Team: \n" 8 "Language: ru_RU\n" 7 9 "MIME-Version: 1.0\n" 8 10 "Content-Type: text/plain; charset=UTF-8\n" 9 11 "Content-Transfer-Encoding: 8bit\n" 10 "X-Generator: Poedit 2.2.1\n" 11 "Last-Translator: Alexey Volkov <[email protected]>\n" 12 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" 13 "Language: ru\n" 12 "X-Generator: Poedit 2.0.7\n" 13 "X-Poedit-Basepath: ..\n" 14 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 15 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 16 "X-Poedit-Flags-xgettext: --add-comments=translators:\n" 17 "X-Poedit-WPHeader: simple-youtube-gdpr.php\n" 18 "X-Poedit-SourceCharset: UTF-8\n" 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" 22 "X-Poedit-SearchPath-0: .\n" 23 "X-Poedit-SearchPathExcluded-0: *.js\n" 14 24 15 #: /public/class-simple-youtube-gdpr-public.php:20025 #: public/class-simple-youtube-gdpr-public.php:221 16 26 msgid "Click to Play Video" 17 27 msgstr "Нажмите для запуска видео" 18 28 19 #: /public/class-simple-youtube-gdpr-public.php:20129 #: public/class-simple-youtube-gdpr-public.php:222 20 30 msgid "YouTube Video Thumbnail" 21 31 msgstr "Миниатюра YouTube видео" 32 33 #: public/class-simple-youtube-gdpr-public.php:225 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:227 39 #, fuzzy 40 #| msgid "https://policies.google.com/privacy?hl=en&gl=en" 41 msgid "https://policies.google.com/privacy?hl=en" 42 msgstr "https://policies.google.com/privacy?hl=ru" 43 44 #: public/class-simple-youtube-gdpr-public.php:228 45 #: public/class-simple-youtube-gdpr-public.php:257 46 msgid "Learn more" 47 msgstr "Политика конфиденциальности Google" 48 49 #: public/class-simple-youtube-gdpr-public.php:231 50 #: public/class-simple-youtube-gdpr-public.php:260 51 msgid "Load video" 52 msgstr "Запустить видео" 53 54 #: public/class-simple-youtube-gdpr-public.php:254 55 #, fuzzy 56 #| msgid "By loading the video, you agree to YouTube's privacy policy." 57 msgid "By loading the video, you agree to Vimeo's privacy policy." 58 msgstr "" 59 "Загружая видео, вы соглашаетесь с политикой конфиденциальности YouTube." 60 61 #: public/class-simple-youtube-gdpr-public.php:256 62 #, fuzzy 63 #| msgid "https://policies.google.com/privacy?hl=en&gl=en" 64 msgid "https://vimeo.com/privacy" 65 msgstr "https://policies.google.com/privacy?hl=ru" 66 67 #: simple-youtube-gdpr.php:101 68 msgid "Click to Upgrade your plan" 69 msgstr "Нажмите, чтобы обновить план" 70 71 #: simple-youtube-gdpr.php:101 72 msgid "Get Vimeo Blocker!" 73 msgstr "Vimeo блокировщик!" 74 75 #. Plugin Name of the plugin/theme 76 msgid "Simple YouTube GDPR" 77 msgstr "Блокировщик YouTube видео" 78 79 #. Plugin URI of the plugin/theme 80 msgid "https://alexeyvolkov.com/blog/simple-youtube-gdpr" 81 msgstr "https://alexeyvolkov.com/blog/simple-youtube-gdpr" 82 83 #. Description of the plugin/theme 84 msgid "Integrate YouTube and Vimeo videos securely!" 85 msgstr "Вставляйте YouTube и Vimeo видео абсолютно безопасно!" 86 87 #. Author of the plugin/theme 88 msgid "Alexey Volkov" 89 msgstr "Алексей Волков" 90 91 #. Author URI of the plugin/theme 92 msgid "https://alexeyvolkov.com/" 93 msgstr "https://alexeyvolkov.com/" 94 95 #~ msgid "" 96 #~ "Replaces all YouTube video iframes with a local image and loads a no " 97 #~ "cookie version of video." 98 #~ msgstr "" 99 #~ "Заменяет YouTube iframe локальным изображением и загружает версию видео " 100 #~ "без файлов cookie." -
simple-youtube-gdpr/trunk/languages/simple-youtube-gdpr.pot
r2072368 r2143715 6 6 msgid "YouTube Video Thumbnail" 7 7 msgstr "" 8 9 #: /public/class-simple-youtube-gdpr-public.php:202 10 msgid "By loading the video, you agree to YouTube's privacy policy." 11 msgstr "" 12 13 #: /public/class-simple-youtube-gdpr-public.php:203 14 msgid "https://policies.google.com/privacy?hl=en&gl=en" 15 msgstr "" 16 17 #: /public/class-simple-youtube-gdpr-public.php:203 18 msgid "Learn more" 19 msgstr "" 20 21 #: /public/class-simple-youtube-gdpr-public.php:204 22 msgid "Load video" 23 msgstr "" -
simple-youtube-gdpr/trunk/public/class-simple-youtube-gdpr-public.php
r2080878 r2143715 10 10 * @subpackage Simple_Youtube_Gdpr/public 11 11 */ 12 13 12 /** 14 13 * The public-facing functionality of the plugin. … … 21 20 * @author Alexey Volkov <[email protected]> 22 21 */ 23 class Simple_Youtube_Gdpr_Public { 22 class Simple_Youtube_Gdpr_Public 23 { 24 /** 25 * The ID of this plugin. 26 * 27 * @since 0.6 28 * @access private 29 * @var string $plugin_name The ID of this plugin. 30 */ 31 private $plugin_name ; 32 /** 33 * The version of this plugin. 34 * 35 * @since 0.6 36 * @access private 37 * @var string $version The current version of this plugin. 38 */ 39 private $version ; 40 /** 41 * Initialize the class and set its properties. 42 * 43 * @param string $plugin_name The name of the plugin. 44 * @param string $version The version of this plugin. 45 * 46 * @since 0.6 47 * 48 */ 49 public function __construct( $plugin_name, $version ) 50 { 51 $this->plugin_name = $plugin_name; 52 $this->version = $version; 53 } 54 55 /** 56 * Register the stylesheets for the public-facing side of the site. 57 * 58 * @since 0.6 59 */ 60 public function enqueue_styles() 61 { 62 /** 63 * This function is provided for demonstration purposes only. 64 * 65 * An instance of this class should be passed to the run() function 66 * defined in Simple_Youtube_Gdpr_Loader as all of the hooks are defined 67 * in that particular class. 68 * 69 * The Simple_Youtube_Gdpr_Loader will then create the relationship 70 * between the defined hooks and the functions defined in this 71 * class. 72 */ 73 wp_enqueue_style( 74 $this->plugin_name, 75 plugin_dir_url( __FILE__ ) . 'css/simple-youtube-gdpr-public.css', 76 array(), 77 $this->version, 78 'all' 79 ); 80 } 81 82 /** 83 * Register the JavaScript for the public-facing side of the site. 84 * 85 * @since 0.6 86 */ 87 public function enqueue_scripts() 88 { 89 /** 90 * This function is provided for demonstration purposes only. 91 * 92 * An instance of this class should be passed to the run() function 93 * defined in Simple_Youtube_Gdpr_Loader as all of the hooks are defined 94 * in that particular class. 95 * 96 * The Simple_Youtube_Gdpr_Loader will then create the relationship 97 * between the defined hooks and the functions defined in this 98 * class. 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 106 ); 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 134 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; 148 } 149 foreach ( $figure->find( 'iframe' ) as $iframe ) { 150 if ( '' === trim( $iframe->src ) ) { 151 // if empty -> next item 152 continue; 153 } 154 try { 155 $imgHTML = $this->getThumbnail( $iframe->outertext ); 156 // send <iframe> and get <div.syg__box> <img> </div> 157 $imgDiv = str_get_html( $imgHTML ); 158 // from raw HTML to Node Object 159 $iframe = $imgDiv->find( 'div.syg__box' )[0]; 160 // Find the only one(first) div.syg__box 161 } catch ( Exception $e ) { 162 continue; 163 } 164 } 165 // Replace <figure> with <img> 166 if ( !$iframe->class ) { 167 // if no class -> create 168 $iframe->class = ''; 169 } 170 $iframe->class = $iframe->class . ' ' . $figure->class; 171 // syg__box wp-block-embed-youtube 172 $figure->outertext = $iframe->outertext; 173 } 174 // is__premium_only 175 return $html->outertext; 176 } 177 178 /** 179 * Replaces the iframe provided by the Youtube thumbnail 180 * 181 * @param array $iframe Array of matched elements. 182 * 183 * @return bool|string 184 */ 185 private function getThumbnail( $iframeHTML, $type = 'youtube' ) 186 { 187 $iframeHTML = str_get_html( $iframeHTML ); 188 $iframe = $iframeHTML->find( 'iframe' )[0]; 189 // Find the only one(first) iframe 190 $upload_dir = wp_upload_dir(); 191 // wp_upload_dir()[baseurl] => http://example.com/content/uploads 192 switch ( $type ) { 193 case 'youtube': 194 $youtube_id = esc_html( $this->getIDFromURL( $iframe->src ) ); 195 // get YouTube ID (fM6JWeQFnNk) 196 if ( !$youtube_id ) { 197 return false; 198 } 199 if ( !$this->isThumbnailExists( $youtube_id ) ) { 200 $this->save_local_thumbnail( $youtube_id ); 201 } 202 $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( __( 'Learn more', 'simple-youtube-gdpr' ) ) . '</a > ' . '</p > ' . '<p ><a class="syg__box__text__btn" role = "button" > ' . esc_html( __( 'Load video', 'simple-youtube-gdpr' ) ) . '</a ></p > ' . '</div > ' . '</div > '; 203 // .syg__box 204 return $youtube_lazyload; 205 break; 206 case 'vimeo': 207 break; 208 } 209 return false; 210 } 211 212 /** 213 * Gets the Video ID from the URL provided 214 * 215 * @param string $url URL to search. 216 * 217 * @return bool|string 218 */ 219 private function getIDFromURL( $url, $type = 'youtube' ) 220 { 221 switch ( $type ) { 222 case 'vimeo': 223 break; 224 default: 225 $pattern = '#^(?:https?:)?(?://)?(?:www\\.)?(?:youtu\\.be|youtube\\.com|youtube-nocookie\\.com)/(?:embed/|v/|watch/?\\?v=)?([\\w-]{11})#iU'; 226 break; 227 } 228 $result = preg_match( $pattern, $url, $matches ); 229 if ( !$result ) { 230 return false; 231 } 232 switch ( $type ) { 233 case 'vimeo': 234 break; 235 default: 236 // exclude YouTube playlist. 237 if ( 'youtube' == $type && 'videoseries' === $matches[1] ) { 238 return false; 239 } 240 return $matches[1]; 241 break; 242 } 243 return ''; 244 // never reach this point 245 } 246 247 /** 248 * Checks if youtube video thumbnail already exists 249 * 250 * @param int $video_id Video ID. 251 * 252 * @return bool 253 */ 254 private function isThumbnailExists( $video_id ) 255 { 256 $youtube_id = esc_html( $video_id ); 257 $upload_dir = wp_upload_dir(); 258 return file_exists( $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/' . md5( $video_id ) . '.jpg' ); 259 } 260 261 /** 262 * Loads youtube video thumbnail from img.youtube.com 263 * 264 * First it tries to upload a SD quality -> HQ -> Default one 265 * 266 * @param int $video_id YouTube ID. 267 * 268 * @return void 269 */ 270 private function save_local_thumbnail( $video_id, $type = 'youtube' ) 271 { 272 switch ( $type ) { 273 case 'vimeo': 274 break; 275 default: 276 $video_id = esc_html( $video_id ); 277 $image_url_sddefault = 'https://img.youtube.com/vi/' . $video_id . '/sddefault.jpg'; 278 $image_url_hqdefault = 'https://img.youtube.com/vi/' . $video_id . '/hqdefault.jpg'; 279 $image_url_default = 'https://img.youtube.com/vi/' . $video_id . '/default.jpg'; 280 if ( !($image_data = file_get_contents( $image_url_sddefault )) ) { 281 if ( !($image_data = file_get_contents( $image_url_hqdefault )) ) { 282 $image_data = file_get_contents( $image_url_default ); 283 } 284 } 285 break; 286 } 287 $upload_dir = wp_upload_dir(); 288 // wp_upload_dir()[baseurl] => http://example.com/content/uploads 289 $upload_dir['path'] = $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/'; 290 // Set upload folder 291 $image_name = md5( $video_id ) . '.jpg'; 292 // Make it MD5 -> so all (_!@#$%^)(*&) symbols are sanitized 293 $unique_file_name = wp_unique_filename( $upload_dir['path'], $image_name ); 294 // Generate unique name 295 $filename = basename( $unique_file_name ); 296 // Create image file name. 297 // Check folder permission and define file location 298 299 if ( wp_mkdir_p( $upload_dir['path'] ) ) { 300 $file = $upload_dir['path'] . '/' . $filename; 301 } else { 302 $file = $upload_dir['basedir'] . '/' . $filename; 303 } 304 305 // Create the image file on the server 306 file_put_contents( $file, $image_data ); 307 } 24 308 25 /**26 * The ID of this plugin.27 *28 * @since 0.629 * @access private30 * @var string $plugin_name The ID of this plugin.31 */32 private $plugin_name;33 34 /**35 * The version of this plugin.36 *37 * @since 0.638 * @access private39 * @var string $version The current version of this plugin.40 */41 private $version;42 43 /**44 * Initialize the class and set its properties.45 *46 * @since 0.647 *48 * @param string $plugin_name The name of the plugin.49 * @param string $version The version of this plugin.50 */51 public function __construct( $plugin_name, $version ) {52 53 $this->plugin_name = $plugin_name;54 $this->version = $version;55 56 }57 58 /**59 * Register the stylesheets for the public-facing side of the site.60 *61 * @since 0.662 */63 public function enqueue_styles() {64 65 /**66 * This function is provided for demonstration purposes only.67 *68 * An instance of this class should be passed to the run() function69 * defined in Simple_Youtube_Gdpr_Loader as all of the hooks are defined70 * in that particular class.71 *72 * The Simple_Youtube_Gdpr_Loader will then create the relationship73 * between the defined hooks and the functions defined in this74 * class.75 */76 77 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/simple-youtube-gdpr-public.css',78 array(), $this->version, 'all' );79 80 // Adds custom CSS81 $custom_css = "82 .youtube_lazyload__play{83 background: url('" . plugin_dir_url( __FILE__ ) . "img/youtube.png') no-repeat;84 }";85 wp_add_inline_style( $this->plugin_name, $custom_css );86 }87 88 /**89 * Register the JavaScript for the public-facing side of the site.90 *91 * @since 0.692 */93 public function enqueue_scripts() {94 95 /**96 * This function is provided for demonstration purposes only.97 *98 * An instance of this class should be passed to the run() function99 * defined in Simple_Youtube_Gdpr_Loader as all of the hooks are defined100 * in that particular class.101 *102 * The Simple_Youtube_Gdpr_Loader will then create the relationship103 * between the defined hooks and the functions defined in this104 * class.105 */106 107 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/simple-youtube-gdpr-public.js',108 array( 'jquery' ), $this->version, false );109 110 }111 112 /**113 * Filter the Content of pages and posts114 * LazyLoad youtube videos115 *116 * @param string $content Original HTML.117 *118 * @return string $content119 */120 public function filter_content( $content ) {121 if ( is_single() || is_page() ) {122 $content = $this->lazyloadIframes( $content );123 }124 125 return $content;126 }127 128 /**129 * Finds iframes in the HTML provided and call the methods to lazyload them130 *131 * @param string $html Original HTML.132 *133 * @return string134 */135 private function lazyloadIframes( $html, $container = 'figure.wp-block-embed-youtube' ) {136 $html = str_get_html( $html );137 foreach ( $html->find( $container ) as $figure ) {138 if ( '' === trim( $figure->innertext ) ) {// if empty -> next item139 continue;140 }141 142 foreach ( $figure->find( 'iframe' ) as $iframe ) {143 if ( '' === trim( $iframe->src ) ) {// if empty -> next item144 continue;145 }146 $imgHTML = $this->getThumbnail( $iframe->outertext );// send <iframe> and get <div.youtube_lazyload> <img> </div>147 $imgDiv = str_get_html( $imgHTML );// from raw HTML to Node Object148 $iframe = $imgDiv->find( 'div.youtube_lazyload' )[0];// Find the only one(first) div.youtube_lazyload149 }150 151 // Replace <figure> with <img>152 if ( ! $iframe->class ) {// if no class -> create153 $iframe->class = '';154 }155 $iframe->class = $iframe->class . ' ' . $figure->class;156 $figure->outertext = $iframe->outertext;157 }158 159 return $html->outertext;160 }161 162 /**163 * Replaces the iframe provided by the Youtube thumbnail164 *165 * @param array $iframe Array of matched elements.166 *167 * @return bool|string168 */169 private function getThumbnail( $iframeHTML ) {170 $iframeHTML = str_get_html( $iframeHTML );171 $iframe = $iframeHTML->find( 'iframe' )[0];// Find the only one(first) iframe172 $youtube_id = esc_html( $this->getYoutubeIDFromURL( $iframe->src ) );// get YouTube ID (fM6JWeQFnNk)173 174 if ( ! $youtube_id ) {175 return false;176 }177 if ( ! $this->isThumbnailExists( $youtube_id ) ) {178 $this->save_local_thumbnail( $youtube_id );179 }180 181 /**182 * Array183 * (184 * [path] => C:\development\xampp\htdocs\example.com/content/uploads/2012/04185 * [url] => http://example.com/content/uploads/2012/04186 * [subdir] => /2012/04187 * [basedir] => C:\~\example.com/content/uploads188 * [baseurl] => http://example.com/content/uploads189 * [error] =>190 * )191 */192 $upload_dir = wp_upload_dir();193 $youtube_lazyload = '<div class="youtube_lazyload"><img src="' . $upload_dir['baseurl'] . '/simple-youtube-gdpr-thumbnails/' . md5( $youtube_id ) . '.jpg" title="' . __( 'Click to Play Video',194 'simple-youtube-gdpr' ) . '" class="youtube_lazyload__img" id="' . $youtube_id . '" alt="' . __( 'YouTube Video Thumbnail',195 'simple-youtube-gdpr' ) . '" decoding="async" referrerpolicy="no-referrer"><div class="youtube_lazyload__play"></div></div>';196 197 return $youtube_lazyload;198 }199 200 /**201 * Gets the Youtube ID from the URL provided202 *203 * @param string $url URL to search.204 *205 * @return bool|string206 */207 private function getYoutubeIDFromURL( $url ) {208 $pattern = '#^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be|youtube\.com|youtube-nocookie\.com)/(?:embed/|v/|watch/?\?v=)?([\w-]{11})#iU';209 $result = preg_match( $pattern, $url, $matches );210 211 if ( ! $result ) {212 return false;213 }214 215 // exclude playlist.216 if ( 'videoseries' === $matches[1] ) {217 return false;218 }219 220 return $matches[1];221 }222 223 /**224 * Checks if youtube video thumbnail already exists225 *226 * @param int $youtube_id YouTube ID.227 *228 * @return bool229 */230 private function isThumbnailExists( $youtube_id ) {231 $youtube_id = esc_html( $youtube_id );232 $upload_dir = wp_upload_dir();233 234 return file_exists( $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/' . md5( $youtube_id ) . '.jpg' );235 }236 237 /**238 * Loads youtube video thumbnail from img.youtube.com239 *240 * First it tries to upload a SD quality -> HQ -> Default one241 *242 * @param int $youtube_id YouTube ID.243 *244 * @return void245 */246 private function save_local_thumbnail( $youtube_id ) {247 $youtube_id = esc_html( $youtube_id );248 $image_url_sddefault = 'https://img.youtube.com/vi/' . $youtube_id . '/sddefault.jpg';249 $image_url_hqdefault = 'https://img.youtube.com/vi/' . $youtube_id . '/hqdefault.jpg';250 $image_url_default = 'https://img.youtube.com/vi/' . $youtube_id . '/default.jpg';251 $image_name = md5( $youtube_id ) . '.jpg';// Make it MD5 -> so all (_!@#$%^)(*&) symbols are sanitized252 $upload_dir = wp_upload_dir();253 $upload_dir['path'] = $upload_dir['basedir'] . '/simple-youtube-gdpr-thumbnails/';// Set upload folder254 if ( ! $image_data = file_get_contents( $image_url_sddefault ) ) {255 if ( ! $image_data = file_get_contents( $image_url_hqdefault ) ) {256 $image_data = file_get_contents( $image_url_default );257 }258 }259 $unique_file_name = wp_unique_filename( $upload_dir['path'], $image_name ); // Generate unique name260 $filename = basename( $unique_file_name ); // Create image file name.261 262 // Check folder permission and define file location263 if ( wp_mkdir_p( $upload_dir['path'] ) ) {264 $file = $upload_dir['path'] . '/' . $filename;265 } else {266 $file = $upload_dir['basedir'] . '/' . $filename;267 }268 269 // Create the image file on the server270 file_put_contents( $file, $image_data );271 }272 309 } -
simple-youtube-gdpr/trunk/public/css/simple-youtube-gdpr-public.css
r2072368 r2143715 1 .youtube_lazyload { 1 .syg__box { 2 display: inline-block; 2 3 position: relative; 3 4 overflow: hidden; … … 5 6 } 6 7 7 . youtube_lazyload__img {8 .syg__box__img { 8 9 display: block; 9 10 margin: auto; 10 11 max-width: 100%; 11 12 border: none; 12 cursor: pointer;13 13 -webkit-transition: .4s all; 14 14 -moz-transition: .4s all; … … 17 17 } 18 18 19 . youtube_lazyload__img:hover{19 .syg__box:hover .syg__box__img { 20 20 -webkit-filter: brightness(75%); 21 21 filter: brightness(75%); 22 22 } 23 23 24 .youtube_lazyload__play { 25 height: 72px; 26 width: 72px; 27 left: 50%; 24 .syg__box__text { 25 position: absolute; 26 height: auto; 27 width: 100%; 28 left: 0; 28 29 top: 50%; 29 margin-left: -36px; 30 margin-top: -36px; 31 position: absolute; 30 text-align: center; 31 -webkit-transform: translateY(-50%); 32 -ms-transform: translateY(-50%); 33 transform: translateY(-50%); 34 35 background-color: rgba(0, 0, 0, 0.8); 36 color: white; 37 } 38 39 .syg__box__text p { 40 margin: 2em 0; 41 } 42 43 .syg__box__text__btn { 44 background: red; 45 color: #fff; 46 display: inline-flex; 47 -webkit-box-align: center; 48 -ms-flex-align: center; 49 align-items: center; 50 -webkit-box-pack: center; 51 -ms-flex-pack: center; 52 justify-content: center; 53 border-radius: .1em; 54 padding: .5em 1em; 55 text-decoration: none !important; 56 -webkit-transition: background-color .125s linear; 57 -o-transition: background-color .125s linear; 58 transition: background-color .125s linear; 59 } 60 61 62 /* Premium Code Stripped by Freemius */ 63 64 .syg__box__text__btn::before { 65 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; 66 background-size: auto; 67 background-size: contain; 68 content: " "; 69 display: inline-block; 70 margin-right: 4px; 71 height: 1.1em; 72 width: .8em; 73 } 74 75 .syg__box__text__btn:hover { 76 background: #fff; 77 color: red; 32 78 cursor: pointer 33 79 } 80 81 82 /* Premium Code Stripped by Freemius */ 83 84 .syg__box__text__btn:hover::before { 85 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; 86 background-size: contain; 87 content: " "; 88 } 89 90 91 /* Premium Code Stripped by Freemius */ -
simple-youtube-gdpr/trunk/public/js/simple-youtube-gdpr-public.js
r2072368 r2143715 4 4 5 5 $(window).load(function () { 6 youtube_lazyload();6 video_lazyload(); 7 7 }); 8 8 9 9 /** 10 * Loops in all ```. youtube_lazyload```11 * Assign onClick for each item 10 * Loops in all ```.syg__box``` 11 * Assign onClick for each item`s button 12 12 */ 13 function youtube_lazyload() {14 var youtube = document.querySelectorAll(".youtube_lazyload");13 function video_lazyload() { 14 var videos = document.querySelectorAll(".syg__box"); 15 15 16 // if we don't have youtubevideos -> return17 if (typeof (youtube) === 'undefined' || youtube === null || !youtube) {18 console.warn('No YouTubeVideos found');16 // if we don't have videos -> return 17 if (typeof (videos) === 'undefined' || videos === null || !videos) { 18 console.warn('No Videos found'); 19 19 return; 20 20 } 21 21 22 for (var i = 0; i < youtube.length; i++) {22 for (var i = 0; i < videos.length; i++) {// loop in all videos boxes 23 23 24 youtube[i].addEventListener("click", function () {25 24 26 var youtubeImage = this.getElementsByClassName('youtube_lazyload__img')[0]; 27 // if we don't have youtube image -> return 28 if (typeof(youtubeImage) === 'undefined' || youtubeImage === null || !youtubeImage) { 25 // Get Play Button 26 var syg__box__text__btn = videos[i].getElementsByClassName('syg__box__text__btn')[0]; 27 // if we don't have videos play button -> return 28 if (typeof (syg__box__text__btn) === 'undefined' || syg__box__text__btn === null || !syg__box__text__btn) { 29 console.warn('No YouTube Play Button found'); 30 return; 31 } 32 // Put click events on Play buttons 33 syg__box__text__btn.addEventListener("click", function () { 34 var videoContainer__local = this.parentNode.parentNode.parentNode; 35 // Get Text 36 var syg__box__text = videoContainer__local.getElementsByClassName('syg__box__text')[0]; 37 // if we don't have video text -> return 38 if (typeof (syg__box__text) === 'undefined' || syg__box__text === null || !syg__box__text) { 39 console.warn('No YouTube Text found'); 40 return; 41 } 42 // Get Background Image - Preview Thumbnail 43 var videoImage = videoContainer__local.getElementsByClassName('syg__box__img')[0]; 44 // if we don't have video image -> return 45 if (typeof (videoImage) === 'undefined' || videoImage === null || !videoImage) { 29 46 console.warn('No YouTube Image found'); 30 47 return; 31 48 } 49 // Change - Replace 50 if (videoContainer__local.classList.contains('syg__box-youtube')) { 51 videoContainer__local.replaceChild(getYouTubeIFrame(videoImage), videoImage); 52 } 53 54 /* Premium Code Stripped by Freemius */ 32 55 33 var playButton = this.getElementsByClassName('youtube_lazyload__play')[0]; 34 // if we don't have youtube play button -> return 35 if (typeof(playButton) === 'undefined' || playButton === null || !playButton) { 36 console.warn('No YouTube Play Button found'); 37 return; 38 } 39 // remove play button 40 this.removeChild(playButton); 41 // replace an image with an iframe 42 this.replaceChild(getIFrame(youtubeImage), youtubeImage); 43 });// addEventListener 56 // Remove 57 videoContainer__local.removeChild(syg__box__text); 58 }); 44 59 }// for youtube 45 60 } … … 52 67 * @return element iframe 53 68 */ 54 function get IFrame(youtubeImg) {69 function getYouTubeIFrame(youtubeImg) { 55 70 // if we don't have youtube image -> return 56 if (typeof (youtubeImg) === 'undefined' || youtubeImg === null || !youtubeImg) {71 if (typeof (youtubeImg) === 'undefined' || youtubeImg === null || !youtubeImg) { 57 72 console.warn('No YouTube Image found'); 58 73 return; … … 69 84 // set height if an image had it 70 85 iframe.setAttribute('height', (youtubeImg.getAttribute('height') > 0) ? (youtubeImg.getAttribute('height')) : '315'); 71 iframe.setAttribute('class', ' youtube_lazyload__iframe');86 iframe.setAttribute('class', 'syg__box-youtube-iframe'); 72 87 // The Referer header will not be sent. 73 88 iframe.setAttribute('referrerpolicy', 'no-referrer'); … … 76 91 }// getIFrame 77 92 93 94 /* Premium Code Stripped by Freemius */ 95 96 78 97 })(jQuery); -
simple-youtube-gdpr/trunk/simple-youtube-gdpr.php
r2080878 r2143715 16 16 * Plugin Name: Simple YouTube GDPR 17 17 * Plugin URI: https://alexeyvolkov.com/blog/simple-youtube-gdpr 18 * Description: Replaces all YouTube video iframes with a local image and loads a no cookie verion of video.19 * Version: 0. 618 * Description: Integrate YouTube and Vimeo videos securely! 19 * Version: 0.7 20 20 * Author: Alexey Volkov 21 21 * Author URI: https://alexeyvolkov.com/ … … 25 25 * Domain Path: /languages 26 26 */ 27 28 // If this file is called directly, abort. 29 if ( ! defined( 'WPINC' ) ) { 30 die; 27 /** 28 * Freemius 29 */ 30 if ( !defined( 'ABSPATH' ) ) { 31 exit; 31 32 } 32 33 33 /** 34 * Currently plugin version. 35 * Start at version 0.6 and use SemVer - https://semver.org 36 * Rename this for your plugin and update it as you release new versions. 37 */ 38 define( 'SIMPLE_YOUTUBE_GDPR_VERSION', '0.6' ); 39 40 /** 41 * The code that runs during plugin activation. 42 * This action is documented in includes/class-simple-youtube-gdpr-activator.php 43 */ 44 function activate_simple_youtube_gdpr() { 45 require_once plugin_dir_path( __FILE__ ) . 'includes/class-simple-youtube-gdpr-activator.php'; 46 Simple_Youtube_Gdpr_Activator::activate(); 34 if ( function_exists( 'syg_fs' ) ) { 35 syg_fs()->set_basename( false, __FILE__ ); 36 } else { 37 if ( !function_exists( 'syg_fs' ) ) { 38 // ... Freemius integration snippet ... 39 40 if ( !function_exists( 'syg_fs' ) ) { 41 // Create a helper function for easy SDK access. 42 function syg_fs() 43 { 44 global $syg_fs ; 45 46 if ( !isset( $syg_fs ) ) { 47 // Include Freemius SDK. 48 require_once dirname( __FILE__ ) . '/freemius/start.php'; 49 $syg_fs = fs_dynamic_init( array( 50 'id' => '4426', 51 'slug' => 'simple-youtube-gdpr', 52 'premium_slug' => 'simple-youtube-gdpr-gold', 53 'type' => 'plugin', 54 'public_key' => 'pk_72bcdfa58a1ac164e91d2916748e0', 55 'is_premium' => false, 56 'premium_suffix' => 'premium', 57 'has_addons' => false, 58 'has_paid_plans' => true, 59 'menu' => array( 60 'first-path' => 'plugins.php', 61 'contact' => false, 62 'support' => false, 63 ), 64 'is_live' => true, 65 ) ); 66 } 67 68 return $syg_fs; 69 } 70 71 // Init Freemius. 72 syg_fs(); 73 // Signal that SDK was initiated. 74 do_action( 'syg_fs_loaded' ); 75 } 76 77 } 78 // ... Your plugin's main file logic ... 79 // If this file is called directly, abort. 80 if ( !defined( 'WPINC' ) ) { 81 die; 82 } 83 /** 84 * Plugin Action links 85 * 86 * @param $links 87 * 88 * @return array 89 */ 90 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'add_action_links' ); 91 function add_action_links( $links ) 92 { 93 $mylinks = array( '<a href="' . syg_fs()->get_upgrade_url() . '" title="' . esc_html( __( 'Click to Upgrade your plan' ) ) . '"><strong style="display: inline;">' . esc_html( __( 'Get Vimeo Blocker!', 'simple-youtube-gdpr' ) ) . '</strong></a>' ); 94 return array_merge( $mylinks, $links ); 95 } 96 97 add_filter( 98 'plugin_row_meta', 99 'add_plugin_row_meta', 100 10, 101 2 102 ); 103 function add_plugin_row_meta( $links, $file ) 104 { 105 106 if ( strpos( $file, 'simple-youtube-gdpr.php' ) !== false ) { 107 $new_links = array( 108 'donate' => '<a href="https://money.yandex.ru/to/41001417963743" target="_blank" title="Payment in RUB - Russian Rubles">♥ Donate</a>', 109 ); 110 $links = array_merge( $links, $new_links ); 111 } 112 113 return $links; 114 } 115 116 /** 117 * Currently plugin version. 118 * Start at version 0.6 and use SemVer - https://semver.org 119 * Rename this for your plugin and update it as you release new versions. 120 */ 121 define( 'SIMPLE_YOUTUBE_GDPR_VERSION', '0.7' ); 122 /** 123 * The code that runs during plugin activation. 124 * This action is documented in includes/class-simple-youtube-gdpr-activator.php 125 */ 126 function activate_simple_youtube_gdpr() 127 { 128 require_once plugin_dir_path( __FILE__ ) . 'includes/class-simple-youtube-gdpr-activator.php'; 129 Simple_Youtube_Gdpr_Activator::activate(); 130 } 131 132 /** 133 * The code that runs during plugin deactivation. 134 * This action is documented in includes/class-simple-youtube-gdpr-deactivator.php 135 */ 136 function deactivate_simple_youtube_gdpr() 137 { 138 require_once plugin_dir_path( __FILE__ ) . 'includes/class-simple-youtube-gdpr-deactivator.php'; 139 Simple_Youtube_Gdpr_Deactivator::deactivate(); 140 } 141 142 register_activation_hook( __FILE__, 'activate_simple_youtube_gdpr' ); 143 register_deactivation_hook( __FILE__, 'deactivate_simple_youtube_gdpr' ); 144 /** 145 * The core plugin class that is used to define internationalization, 146 * admin-specific hooks, and public-facing site hooks. 147 */ 148 require plugin_dir_path( __FILE__ ) . 'includes/class-simple-youtube-gdpr.php'; 149 /** 150 * Begins execution of the plugin. 151 * 152 * Since everything within the plugin is registered via hooks, 153 * then kicking off the plugin from this point in the file does 154 * not affect the page life cycle. 155 * 156 * @since 0.6 157 */ 158 function run_simple_youtube_gdpr() 159 { 160 $plugin = new Simple_Youtube_Gdpr(); 161 $plugin->run(); 162 } 163 164 run_simple_youtube_gdpr(); 47 165 } 48 49 /**50 * The code that runs during plugin deactivation.51 * This action is documented in includes/class-simple-youtube-gdpr-deactivator.php52 */53 function deactivate_simple_youtube_gdpr() {54 require_once plugin_dir_path( __FILE__ ) . 'includes/class-simple-youtube-gdpr-deactivator.php';55 Simple_Youtube_Gdpr_Deactivator::deactivate();56 }57 58 register_activation_hook( __FILE__, 'activate_simple_youtube_gdpr' );59 register_deactivation_hook( __FILE__, 'deactivate_simple_youtube_gdpr' );60 61 /**62 * The core plugin class that is used to define internationalization,63 * admin-specific hooks, and public-facing site hooks.64 */65 require plugin_dir_path( __FILE__ ) . 'includes/class-simple-youtube-gdpr.php';66 67 /**68 * Begins execution of the plugin.69 *70 * Since everything within the plugin is registered via hooks,71 * then kicking off the plugin from this point in the file does72 * not affect the page life cycle.73 *74 * @since 0.675 */76 function run_simple_youtube_gdpr() {77 78 $plugin = new Simple_Youtube_Gdpr();79 $plugin->run();80 81 }82 run_simple_youtube_gdpr();
Note: See TracChangeset
for help on using the changeset viewer.