Changeset 2527323
- Timestamp:
- 05/06/2021 02:56:01 PM (5 years ago)
- Location:
- twitchpress
- Files:
-
- 429 added
- 34 edited
-
tags/3.13.0 (added)
-
tags/3.13.0/assets (added)
-
tags/3.13.0/assets/css (added)
-
tags/3.13.0/assets/css/activation.css (added)
-
tags/3.13.0/assets/css/activation.scss (added)
-
tags/3.13.0/assets/css/admin.css (added)
-
tags/3.13.0/assets/css/admin.scss (added)
-
tags/3.13.0/assets/css/twitchpress-login-form.css (added)
-
tags/3.13.0/assets/css/twitchpress-login-shortcode.css (added)
-
tags/3.13.0/assets/css/twitchpress-setup.css (added)
-
tags/3.13.0/assets/css/twitchpress-setup.scss (added)
-
tags/3.13.0/assets/css/twitchpress-shortcodes.css (added)
-
tags/3.13.0/assets/css/twitchpress-splitscreen.css (added)
-
tags/3.13.0/assets/images (added)
-
tags/3.13.0/assets/images/twitchpress_logo.png (added)
-
tags/3.13.0/assets/js (added)
-
tags/3.13.0/assets/js/admin (added)
-
tags/3.13.0/assets/js/admin/twitchpress-enhanced-select.js (added)
-
tags/3.13.0/assets/js/admin/twitchpress-enhanced-select.min.js (added)
-
tags/3.13.0/assets/js/admin/twitchpress-faq.js (added)
-
tags/3.13.0/assets/js/admin/twitchpress-faq.min.js (added)
-
tags/3.13.0/assets/js/admin/twitchpress-setup.js (added)
-
tags/3.13.0/assets/js/admin/twitchpress-setup.min.js (added)
-
tags/3.13.0/assets/js/jquery-blockui (added)
-
tags/3.13.0/assets/js/jquery-blockui/jquery.blockUI.js (added)
-
tags/3.13.0/assets/js/jquery-blockui/jquery.blockUI.min.js (added)
-
tags/3.13.0/assets/js/select2 (added)
-
tags/3.13.0/assets/js/select2/select2.js (added)
-
tags/3.13.0/assets/js/select2/select2.min.js (added)
-
tags/3.13.0/deprecated.php (added)
-
tags/3.13.0/developer-notes.txt (added)
-
tags/3.13.0/functions.php (added)
-
tags/3.13.0/i18n (added)
-
tags/3.13.0/i18n/languages (added)
-
tags/3.13.0/i18n/languages/twitchpress-en_US.mo (added)
-
tags/3.13.0/i18n/languages/twitchpress-en_US.po (added)
-
tags/3.13.0/i18n/languages/twitchpress.pot (added)
-
tags/3.13.0/includes (added)
-
tags/3.13.0/includes/admin (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-assets.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-dashboard.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-data-views.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-deactivate.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-help.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-menus.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-notices.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-pointers.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-quicktools.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-roles.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-settings.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-setup-wizard-youtube.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-setup-wizard.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-tools-views.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin-users.php (added)
-
tags/3.13.0/includes/admin/class.twitchpress-admin.php (added)
-
tags/3.13.0/includes/admin/dashboard (added)
-
tags/3.13.0/includes/admin/dashboard/class.twitchpress-dashboard-mychannel.php (added)
-
tags/3.13.0/includes/admin/functions.twitchpress-admin.php (added)
-
tags/3.13.0/includes/admin/notices (added)
-
tags/3.13.0/includes/admin/notices/custom-dismiss.php (added)
-
tags/3.13.0/includes/admin/notices/custom.php (added)
-
tags/3.13.0/includes/admin/notices/install.php (added)
-
tags/3.13.0/includes/admin/notices/update.php (added)
-
tags/3.13.0/includes/admin/notices/updated.php (added)
-
tags/3.13.0/includes/admin/notices/updating.php (added)
-
tags/3.13.0/includes/admin/settings (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-bugnet.php (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-general.php (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-giveaways.php (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-otherapi.php (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-page.php (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-readonly.php (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-twitch.php (added)
-
tags/3.13.0/includes/admin/settings/class.twitchpress-settings-users.php (added)
-
tags/3.13.0/includes/admin/views (added)
-
tags/3.13.0/includes/admin/views/dataviews (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-all-actionhooks.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-all-apiactivity.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-all-apierrors.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-all-bugnet-issues.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-all-twitchsubs.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-allcachetraces-bugnet.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-apioutcomes.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-endpoints.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-last10cachetraces-bugnet.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-lasthourcachetraces-bugnet.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-listtable-actionhooks.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-listtable-apiactivity.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-listtable-apierrors.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-listtable-bugnet-issues.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-listtable-demo-bugnet.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-listtable-endpoints.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-listtable-twitchsubs.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-todayscachetraces-bugnet.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-twitch-apiactivity.php (added)
-
tags/3.13.0/includes/admin/views/dataviews/class.twitchpress-view-trace.php (added)
-
tags/3.13.0/includes/admin/views/html-admin-data.php (added)
-
tags/3.13.0/includes/admin/views/html-admin-page.php (added)
-
tags/3.13.0/includes/admin/views/html-admin-settings.php (added)
-
tags/3.13.0/includes/admin/views/toolsviews (added)
-
tags/3.13.0/includes/admin/views/toolsviews/class.twitchpress-listtable-accounts.php (added)
-
tags/3.13.0/includes/admin/views/toolsviews/class.twitchpress-listtable-tools.php (added)
-
tags/3.13.0/includes/admin/views/toolsviews/class.twitchpress-tools-all.php (added)
-
tags/3.13.0/includes/blocks (added)
-
tags/3.13.0/includes/blocks/class.twitchpress-blocks.php (added)
-
tags/3.13.0/includes/blocks/css (added)
-
tags/3.13.0/includes/blocks/css/style.css (added)
-
tags/3.13.0/includes/blocks/scripts (added)
-
tags/3.13.0/includes/blocks/scripts/embed-everything.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-bits-leaderboard.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-display-single-video.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-display-videos.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-giving-channel-chat.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-live-vid-interactive.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-live-vid-none-interactive.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-main-channel-chat.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-members-only.js (added)
-
tags/3.13.0/includes/blocks/scripts/twitch-top-games-list.js (added)
-
tags/3.13.0/includes/classes (added)
-
tags/3.13.0/includes/classes/class.twitchpress-admin-bot-auth.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-ajax.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-api-logging.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-autoloader.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-background-updater.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-curl.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-current-user.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-custom-login-notices.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-extend-wp-http-curl.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-extension-installer.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-frontend-scripts.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-listener-main-account-oauth.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-listener.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-login-by-shortcode.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-login.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-object-registry.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-options.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-posts-gate.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-public-preset-notices.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-set-app.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-set-bot-channel-auth.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-set-main-channel-auth.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-set-user-auth.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-subscriptions.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-tables-installation.php (added)
-
tags/3.13.0/includes/classes/class.twitchpress-twitch-button.php (added)
-
tags/3.13.0/includes/external (added)
-
tags/3.13.0/includes/external/class.twitchpress-wordpressorg.php (added)
-
tags/3.13.0/includes/functions (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-database.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-deprecated.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-formatting.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-frontend-notices.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-frontend.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-get.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-sanitize.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-twitch-users.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-validate.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-webhooksDELETE.php (added)
-
tags/3.13.0/includes/functions/functions.twitchpress-widgets.php (added)
-
tags/3.13.0/includes/integration (added)
-
tags/3.13.0/includes/integration/class.twitchpress-ultimate-member.php (added)
-
tags/3.13.0/includes/libraries (added)
-
tags/3.13.0/includes/libraries/allapi (added)
-
tags/3.13.0/includes/libraries/allapi/class.all-api.php (added)
-
tags/3.13.0/includes/libraries/allapi/discord (added)
-
tags/3.13.0/includes/libraries/allapi/discord/class.api-discord-listener.php (added)
-
tags/3.13.0/includes/libraries/allapi/discord/class.api-discord.php (added)
-
tags/3.13.0/includes/libraries/allapi/streamlabs (added)
-
tags/3.13.0/includes/libraries/allapi/streamlabs/class.api-streamlabs-listener.php (added)
-
tags/3.13.0/includes/libraries/allapi/streamlabs/class.api-streamlabs.php (added)
-
tags/3.13.0/includes/libraries/allapi/streamlabs/functions.api-streamlabs-endpoints.php (added)
-
tags/3.13.0/includes/libraries/allapi/streamlabs/functions.api-streamlabs.php (added)
-
tags/3.13.0/includes/libraries/allapi/twitter (added)
-
tags/3.13.0/includes/libraries/allapi/twitter/class.twitter-api.php (added)
-
tags/3.13.0/includes/libraries/allapi/twitter/class.twitter-calls.php (added)
-
tags/3.13.0/includes/libraries/allapi/twitter/class.twitter-endpoints.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/Abstract.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/AppIdentity.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/AssertionCredentials.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/ComputeEngine.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/Exception.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/LoginTicket.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/OAuth2.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Auth/Simple.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Cache (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Cache/Abstract.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Cache/Apc.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Cache/Exception.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Cache/File.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Cache/Memcache.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Cache/Null.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Client.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Collection.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Config.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Exception.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Http (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Http/Batch.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Http/CacheParser.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Http/MediaFileUpload.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Http/REST.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Http/Request.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/IO (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/IO/Abstract.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/IO/Curl.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/IO/Exception.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/IO/Stream.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/IO/cacerts.pem (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Logger (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Logger/Abstract.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Logger/Exception.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Logger/File.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Logger/Null.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Logger/Psr.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Model.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AdExchangeBuyer.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AdExchangeSeller.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AdSense.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AdSenseHost.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Admin.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Analytics.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AnalyticsReporting.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AndroidEnterprise.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AndroidPublisher.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/AppState.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Appengine.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Appsactivity.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Audit.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Autoscaler.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Bigquery.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Blogger.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Books.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Calendar.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/CivicInfo.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Classroom.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/CloudMonitoring.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/CloudUserAccounts.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Cloudbilling.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Cloudbuild.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Clouddebugger.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Cloudlatencytest.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Cloudresourcemanager.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Cloudsearch.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Cloudtrace.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Compute.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Computeaccounts.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Container.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Coordinate.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Customsearch.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/DataTransfer.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Dataflow.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Dataproc.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Datastore.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/DeploymentManager.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Dfareporting.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Directory.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Dns.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/DoubleClickBidManager.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Doubleclicksearch.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Drive.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Exception.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Fitness.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Freebase.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Fusiontables.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Games.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/GamesConfiguration.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/GamesManagement.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Genomics.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Gmail.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/GroupsMigration.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Groupssettings.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Iam.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/IdentityToolkit.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Kgsearch.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Licensing.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Logging.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Manager.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/MapsEngine.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Mirror.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Monitoring.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Oauth2.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Pagespeedonline.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Partners.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/People.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Playmoviespartner.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Plus.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/PlusDomains.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Prediction.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Proximitybeacon.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Pubsub.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/QPXExpress.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Replicapool.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Replicapoolupdater.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Reports.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Reseller.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Resource.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Resourceviews.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/SQLAdmin.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Script.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/ServiceRegistry.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Sheets.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/ShoppingContent.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/SiteVerification.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Spectrum.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Storage.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Storagetransfer.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/TagManager.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Taskqueue.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Tasks.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Translate.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Urlshortener.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Vision.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Webfonts.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/Webmasters.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/YouTube.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/YouTubeAnalytics.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Service/YouTubeReporting.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Signer (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Signer/Abstract.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Signer/P12.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Task (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Task/Exception.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Task/Retryable.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Task/Runner.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Utils (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Utils.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Utils/URITemplate.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Verifier (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Verifier/Abstract.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/Verifier/Pem.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/Google/autoload.php (added)
-
tags/3.13.0/includes/libraries/allapi/youtube/functions.api-youtube.php (added)
-
tags/3.13.0/includes/libraries/bugnet (added)
-
tags/3.13.0/includes/libraries/bugnet/bugnet.css (added)
-
tags/3.13.0/includes/libraries/bugnet/changes.txt (added)
-
tags/3.13.0/includes/libraries/bugnet/class.bugnet-apimonitoring.php (added)
-
tags/3.13.0/includes/libraries/bugnet/class.bugnet-configuration.php (added)
-
tags/3.13.0/includes/libraries/bugnet/class.bugnet-install-database.php (added)
-
tags/3.13.0/includes/libraries/bugnet/class.bugnet-install.php (added)
-
tags/3.13.0/includes/libraries/bugnet/class.bugnet-tracing.php (added)
-
tags/3.13.0/includes/libraries/bugnet/class.bugnet-uninstall.php (added)
-
tags/3.13.0/includes/libraries/bugnet/class.bugnet.php (added)
-
tags/3.13.0/includes/libraries/bugnet/functions.bugnet.php (added)
-
tags/3.13.0/includes/libraries/bugnet/notices (added)
-
tags/3.13.0/includes/libraries/bugnet/notices/class.bugnet-notices-administratorpermanent.php (added)
-
tags/3.13.0/includes/libraries/bugnet/readme.txt (added)
-
tags/3.13.0/includes/libraries/class.async-request.php (added)
-
tags/3.13.0/includes/libraries/class.background-process.php (added)
-
tags/3.13.0/includes/libraries/library.twitchbot.php (added)
-
tags/3.13.0/includes/libraries/twitch (added)
-
tags/3.13.0/includes/libraries/twitch/helix (added)
-
tags/3.13.0/includes/libraries/twitch/helix/class.twitch-api.php (added)
-
tags/3.13.0/includes/libraries/twitch/helix/function.twitch-webhooks.php (added)
-
tags/3.13.0/includes/libraries/twitch/helix/functions.twitch-api-endpoints.php (added)
-
tags/3.13.0/includes/libraries/twitch/helix/functions.twitch-api-statuses.php (added)
-
tags/3.13.0/includes/libraries/wpdialogue (added)
-
tags/3.13.0/includes/libraries/wpdialogue/functions.wpdialogue-templates.php (added)
-
tags/3.13.0/includes/libraries/wpdialogue/index.php (added)
-
tags/3.13.0/includes/posts (added)
-
tags/3.13.0/includes/posts/class.twitchpress-page-template-splitscreen.php (added)
-
tags/3.13.0/includes/posts/class.twitchpress-post-type-channels.php (added)
-
tags/3.13.0/includes/posts/class.twitchpress-post-type-giveaways.php (added)
-
tags/3.13.0/includes/posts/class.twitchpress-post-type-perks.php (added)
-
tags/3.13.0/includes/posts/class.twitchpress-post-type-webhooks.php (added)
-
tags/3.13.0/includes/posts/splitscreen-template.php (added)
-
tags/3.13.0/includes/requests (added)
-
tags/3.13.0/includes/requests/developer-toolbar-requests.php (added)
-
tags/3.13.0/includes/shortcodes (added)
-
tags/3.13.0/includes/shortcodes/shortcode-follower-only-content.php (added)
-
tags/3.13.0/includes/shortcodes/shortcode-sync-buttons-public.php (added)
-
tags/3.13.0/includes/shortcodes/shortcode-ultimate-member-updater.php (added)
-
tags/3.13.0/includes/shortcodes/teamroster (added)
-
tags/3.13.0/includes/shortcodes/teamroster/class.twitchpress-shortcode-team-roster.php (added)
-
tags/3.13.0/includes/shortcodes/teamroster/twitchpress-shortcode-teamroster-table.css (added)
-
tags/3.13.0/includes/toolbars (added)
-
tags/3.13.0/includes/toolbars/class.twitchpress-toolbar-developers.php (added)
-
tags/3.13.0/includes/toolbars/class.twitchpress-toolbars.php (added)
-
tags/3.13.0/install.php (added)
-
tags/3.13.0/integration.php (added)
-
tags/3.13.0/license.txt (added)
-
tags/3.13.0/loader.php (added)
-
tags/3.13.0/options.php (added)
-
tags/3.13.0/pro (added)
-
tags/3.13.0/pro/shortcodes (added)
-
tags/3.13.0/pro/shortcodes/channellist (added)
-
tags/3.13.0/pro/shortcodes/channellist/twitchpress-shortcode-channellist.css (added)
-
tags/3.13.0/pro/shortcodes/channellist/twitchpress-shortcode-channellist.js (added)
-
tags/3.13.0/pro/shortcodes/channellist/twitchpress-shortcode-channellist.php (added)
-
tags/3.13.0/pro/shortcodes/clipsgallery (added)
-
tags/3.13.0/pro/shortcodes/clipsgallery/twitchpress-shortcode-clipsgallery.php (added)
-
tags/3.13.0/pro/shortcodes/streamlabs (added)
-
tags/3.13.0/pro/shortcodes/streamlabs/twitchpress-shortcode-streamlabs.php (added)
-
tags/3.13.0/pro/shortcodes/subcontent (added)
-
tags/3.13.0/pro/shortcodes/subcontent/twitchpress-shortcode-subcontent.php (added)
-
tags/3.13.0/pro/twitchpress-pro-core-functions.php (added)
-
tags/3.13.0/pro/twitchpress-pro-loader.php (added)
-
tags/3.13.0/readme.txt (added)
-
tags/3.13.0/requests.php (added)
-
tags/3.13.0/shortcodes.php (added)
-
tags/3.13.0/systems (added)
-
tags/3.13.0/systems/giveaways (added)
-
tags/3.13.0/systems/giveaways/class.twitchpress-giveaways-config.php (added)
-
tags/3.13.0/systems/giveaways/class.twitchpress-giveaways-install-database.php (added)
-
tags/3.13.0/systems/giveaways/class.twitchpress-giveaways-install.php (added)
-
tags/3.13.0/systems/giveaways/class.twitchpress-giveaways.php (added)
-
tags/3.13.0/systems/giveaways/functions.twitchpress-giveaways.php (added)
-
tags/3.13.0/systems/giveaways/functions.twitchpress-raffles-shortcodes.php (added)
-
tags/3.13.0/systems/subscribers (added)
-
tags/3.13.0/systems/subscribers/shortcodes (added)
-
tags/3.13.0/systems/subscribers/shortcodes/functions.twitchpress-subman-shortcode-umrole-update.php (added)
-
tags/3.13.0/systems/webhooks (added)
-
tags/3.13.0/systems/webhooks/class.twitchpress-webhooks-cache.php (added)
-
tags/3.13.0/systems/webhooks/class.twitchpress-webhooks-event-processing.php (added)
-
tags/3.13.0/systems/webhooks/functions.twitchpress-webhooks.php (added)
-
tags/3.13.0/twitchpress-logs (added)
-
tags/3.13.0/twitchpress-logs/.htaccess (added)
-
tags/3.13.0/twitchpress-logs/index.html (added)
-
tags/3.13.0/twitchpress.php (added)
-
tags/3.13.0/uninstall.php (added)
-
trunk/functions.php (modified) (8 diffs)
-
trunk/includes/admin/class.twitchpress-admin-data-views.php (modified) (1 diff)
-
trunk/includes/admin/class.twitchpress-admin-help.php (modified) (5 diffs)
-
trunk/includes/admin/class.twitchpress-admin-menus.php (modified) (1 diff)
-
trunk/includes/admin/class.twitchpress-admin-notices.php (modified) (1 diff)
-
trunk/includes/admin/class.twitchpress-admin-quicktools.php (modified) (1 diff)
-
trunk/includes/admin/class.twitchpress-admin-settings.php (modified) (4 diffs)
-
trunk/includes/admin/class.twitchpress-admin-setup-wizard.php (modified) (1 diff)
-
trunk/includes/admin/class.twitchpress-admin.php (modified) (1 diff)
-
trunk/includes/admin/settings/class.twitchpress-settings-bugnet.php (modified) (5 diffs)
-
trunk/includes/admin/settings/class.twitchpress-settings-general.php (modified) (7 diffs)
-
trunk/includes/admin/settings/class.twitchpress-settings-otherapi.php (modified) (2 diffs)
-
trunk/includes/admin/settings/class.twitchpress-settings-twitch.php (modified) (6 diffs)
-
trunk/includes/admin/views/dataviews/class.twitchpress-listtable-apiactivity.php (modified) (2 diffs)
-
trunk/includes/classes/class.twitchpress-api-logging.php (modified) (3 diffs)
-
trunk/includes/classes/class.twitchpress-background-updater.php (modified) (1 diff)
-
trunk/includes/classes/class.twitchpress-curl.php (modified) (2 diffs)
-
trunk/includes/classes/class.twitchpress-posts-gate.php (modified) (1 diff)
-
trunk/includes/classes/class.twitchpress-subscriptions.php (modified) (1 diff)
-
trunk/includes/classes/class.twitchpress-tables-installation.php (modified) (2 diffs)
-
trunk/includes/functions/functions.twitchpress-database.php (modified) (1 diff)
-
trunk/includes/functions/functions.twitchpress-webhooksDELETE.php (added)
-
trunk/includes/integration/class.twitchpress-ultimate-member.php (modified) (2 diffs)
-
trunk/includes/libraries/bugnet/class.bugnet-install-database.php (modified) (1 diff)
-
trunk/includes/libraries/class.async-request.php (modified) (4 diffs)
-
trunk/includes/libraries/class.background-process.php (modified) (8 diffs)
-
trunk/includes/libraries/twitch/helix/class.twitch-api.php (modified) (8 diffs)
-
trunk/includes/posts/class.twitchpress-post-type-webhooks.php (added)
-
trunk/install.php (modified) (1 diff)
-
trunk/loader.php (modified) (10 diffs)
-
trunk/pro/shortcodes/channellist/twitchpress-shortcode-channellist.css (modified) (1 diff)
-
trunk/pro/shortcodes/channellist/twitchpress-shortcode-channellist.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/shortcodes.php (modified) (4 diffs)
-
trunk/systems/webhooks (added)
-
trunk/systems/webhooks/class.twitchpress-webhooks-cache.php (added)
-
trunk/systems/webhooks/class.twitchpress-webhooks-event-processing.php (added)
-
trunk/systems/webhooks/functions.twitchpress-webhooks.php (added)
-
trunk/twitchpress.php (modified) (2 diffs)
-
trunk/uninstall.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
twitchpress/trunk/functions.php
r2496316 r2527323 12 12 include_once( plugin_basename( 'includes/functions/functions.twitchpress-get.php' ) ); 13 13 include_once( plugin_basename( 'includes/functions/functions.twitchpress-database.php' ) ); 14 include_once( plugin_basename( 'systems/webhooks/functions.twitchpress-webhooks.php' ) ); 14 15 15 16 function twitchpress_is_backend_login(){ … … 839 840 return TwitchPress_Object_Registry::update_var( 'mainchannelauth', 'main_channels_postid', $expires_in ); 840 841 } 842 841 843 ###################################################################### 842 844 # # … … 1214 1216 return $url; 1215 1217 } 1216 1217 1218 1218 1219 1219 /** … … 1474 1474 */ 1475 1475 function twitchpress_validate_token( $token ) { 1476 if( strlen ( $token ) !== 30 ) { twitchpress_var_dump_safer();1476 if( strlen ( $token ) !== 30 ) { 1477 1477 return false; 1478 1478 } 1479 1479 1480 if( !ctype_alnum( $token ) ) { twitchpress_var_dump_safer();1480 if( !ctype_alnum( $token ) ) { 1481 1481 return false; 1482 1482 } … … 2523 2523 // Cancelled 2524 2524 if( $local_sub_array && !$twitch_sub_array ) { 2525 2525 2526 TwitchPress_Admin_Notices::add_wordpress_notice( 'usersubsyncnosubresponse', 'warning', false, 2526 2527 __( 'Subscription Ended', 'twitchpress' ), … … 2536 2537 2537 2538 // No recent subscription... 2538 if( !$local_sub_array && !$twitch_sub_array || !isset( $twitch_sub_array->tier ) ) { 2539 if( !$local_sub_array && !$twitch_sub_array || !isset( $twitch_sub_array->tier ) ) { 2539 2540 TwitchPress_Admin_Notices::add_wordpress_notice( 'usersubsyncnosubresponse', 'info', false, 2540 2541 __( 'Not Subscribing', 'twitchpress' ), … … 2548 2549 2549 2550 // First time subscription sync... 2550 if( !$local_sub_array && $twitch_sub_array && isset( $twitch_sub_array['tier'] ) ) { 2551 if( !$local_sub_array && $twitch_sub_array && isset( $twitch_sub_array['tier'] ) ) { 2551 2552 TwitchPress_Admin_Notices::add_wordpress_notice( 'usersubsyncnosubresponse', 'success', false, 2552 2553 __( 'New Subscriber', 'twitchpress' ), … … 2627 2628 var_dump( 'PEAK: ', memory_get_peak_usage(), '<br>' ); # DO NOT REMOVE # 2628 2629 } 2630 2631 function twitchpress_send_to_console( $debug_output ) { 2632 2633 $cleaned_string = ''; 2634 if (!is_string($debug_output)) 2635 $debug_output = print_r($debug_output,true); 2636 2637 $str_len = strlen($debug_output); 2638 for($i = 0; $i < $str_len; $i++) { 2639 $cleaned_string .= '\\x' . sprintf('%02x', ord(substr($debug_output, $i, 1))); 2640 } 2641 $javascript_ouput = "<script>console.log('Debug Info: " .$cleaned_string. "');</script>"; 2642 echo $javascript_ouput; 2643 } 2644 2645 2646 function twitchpress_get_main_channels_team_id() { 2647 return get_option( 'twitchpress_main_channel_team_id' ); 2648 } 2649 2650 function twitchpress_update_main_channels_team_id( $twitch_team_id ) { 2651 return update_option( 'twitchpress_main_channel_team_id', $twitch_team_id ); 2652 } -
twitchpress/trunk/includes/admin/class.twitchpress-admin-data-views.php
r2477212 r2527323 74 74 ),*/ 75 75 ) 76 ); 77 78 // API Results (Raw curl response) 79 $tabviews['apioutcomes_list_tables'] = array( 80 'title' => __( 'API Outcomes', 'twitchpress' ), 81 'datatabviews' => array( 82 "apioutcomes" => array( 83 'title' => __( 'All Data', 'twitchpress' ), 84 'description' => '', 85 'hide_title' => true, 86 'callback' => array( __CLASS__, 'get_maintabview' ) 87 ) 88 ) 89 ); 76 ); 90 77 91 78 // API Errors -
twitchpress/trunk/includes/admin/class.twitchpress-admin-help.php
r2494470 r2527323 176 176 'content' => '', 177 177 'callback' => array( $this, 'faq' ), 178 ) ); 179 180 $screen->add_help_tab( array( 181 'id' => 'twitchpress_bot_status_tab', 182 'title' => __( 'Twitch Bot Status', 'twitchpress' ), 183 'content' => '', 184 'callback' => array( $this, 'bot_status' ), 185 ) ); 178 ) ); 186 179 187 180 $screen->add_help_tab( array( … … 333 326 <?php 334 327 } 335 336 public function bot_status() { 337 $set_app_status = twitchpress_get_app_status(); 338 $output = ''; 339 340 // Ensure the Twitch API application has been setup... 341 if( $set_app_status[0] !== 1 ) { 342 echo '<h3>' . __( 'Welcome to TwitchPress', 'twitchpress' ) . '</h3>'; 343 echo $set_app_status[1]; 344 echo '<p><a href="' . admin_url( 'index.php?page=twitchpress-setup' ) . '" class="button button-primary">' . __( 'Setup wizard', 'twitchpress' ) . '</a></p>'; 345 return; 346 } 347 348 // Check cache... 349 $cache = get_transient( 'twitchpresshelptabbotstatus' ); 350 if( $cache ) 351 { 352 _e( '<p>You are viewing cached data that is up to 120 seconds old. Refresh again soon to get the latest data.</p>', 'twitchpress' ); 353 print $cache; 354 return; 355 } 356 else 357 { 358 // No existing cache found, so test Twitch API, generate output, cache output, output output! 359 _e( '<p>You are viewing real-time data on this request (not cached). The data will be cached for 120 seconds.</p>', 'twitchpress' ); 360 } 361 362 // Avoid making these requests for every admin page request. 363 set_transient( 'twitchpresshelptabappstatus', $output, 120 ); 364 365 print $output; 366 } 367 328 368 329 /** 369 330 * Displays Twitch application status. … … 517 478 518 479 ob_start(); 519 echo '<h3>Test ing Area</h3>';520 echo '<p>' . __( 'Do not test on live sites please. Some features are WIP.', 'twitchpress' ) . '</p>';480 echo '<h3>Test New Features</h3>'; 481 echo '<p>' . __( 'Do not test on live sites.', 'twitchpress' ) . '</p>'; 521 482 522 483 // New Test … … 547 508 ob_start(); 548 509 echo '<h3>Development Area</h3>'; 549 echo '<p>' . __( ' This tab helps everyone find exactly what is being worked on in the project. Developers should check the source-code in this tab550 and the testing tab for clues on what is coming soon. Please test shortcodes and links herebut do not feedback faults.', 'twitchpress' ) . '</p>';510 echo '<p>' . __( 'Do not use these features on live sites. Feel free to test features 511 but do not feedback faults.', 'twitchpress' ) . '</p>'; 551 512 552 513 // New Test … … 555 516 echo '<p>[twitchpress_raffle_entry_button]Gated content goes here.[/twitchpress_raffle_entry_button]</p>'; 556 517 557 ob_end_flush(); 558 559 ######################################################################## 560 # # 561 # WEBHOOKS # 562 # # 563 ######################################################################## 564 /* 565 $test1 = 1; 566 $test2 = 0; 567 $test3 = 0; 568 569 $callback = 'http://local # IGNORE # host/twitchpress/branches/beta/wp-admin/admin.php'; 570 $topic = 'https://api.twitch.tv/helix/streams?user_id=120841817'; 571 572 if( $test1 ) 573 { 574 $twitch_webhooks = new TwitchPress_Twitch_Webhooks(); 575 576 $twitch_webhooks->callback = $callback; 577 $twitch_webhooks->mode = 'subscribe'; 578 $twitch_webhooks->topic = $topic; 579 $twitch_webhooks->secret = null; 580 581 $result = $twitch_webhooks->users_follows( 0, 1, '120841817', null ); 582 583 } 584 585 if( $test2 ) 586 { 587 $curl = new WP_Http_Curl(); 588 $curl_version_object = curl_version(); 589 590 $result = $curl->request( 591 'https://api.twitch.tv/helix/webhooks/hub', 592 array( 593 'method' => 'POST', 594 'user-agent' => 'curl/' . $curl_version_object['version'], 595 'stream' => false, 596 'filename' => false, 597 'decompress' => false, 598 'headers' => array( 599 'content-type' => 'application/x-www-form-urlencoded', 600 'client_id' => twitchpress_get_app_id(), 601 ), 602 'body' => array ( 603 'hub.callback' => 'http://local # IGNORE # host/twitchpress/branches/beta/wp-admin/admin.php', 604 'hub.mode' => 'subscribe', 605 'hub.topic' => 'https://api.twitch.tv/helix/users/follows', 606 'hub.lease_seconds' => 0, 607 'hub.secret' => null, 608 'first' => 1, 609 'from_id' => 120841817, 610 'to_id' => null 611 ) 612 ) 613 ); 614 } 615 616 if( $test3 ) 617 { 618 $http = new WP_Http(); 619 $curl_version_object = curl_version(); 620 621 $body = json_encode( array ( 622 'hub.callback' => $callback, 623 'hub.mode' => 'subscribe', 624 'hub.topic' => $topic, 625 'hub.lease_seconds' => 0, 626 'hub.secret' => null, 627 'first' => 1, 628 'from_id' => 120841817, 629 'to_id' => null 630 ) 631 ); 632 633 634 $result = $http->request( 635 'https://api.twitch.tv/helix/webhooks/hub', 636 array( 637 'method' => 'POST', 638 'stream' => false, 639 'filename' => false, 640 'decompress' => false, 641 'headers' => array( 642 'Accept' => 'application/json', 643 'Content-Type' => 'application/json; charset=utf-8', 644 'Client-ID' => twitchpress_get_app_id(), 645 ), 646 'body' => $body 647 ) 648 ); 649 } 650 */ 518 ob_end_flush(); 651 519 } 652 520 } -
twitchpress/trunk/includes/admin/class.twitchpress-admin-menus.php
r2472434 r2527323 37 37 function secondary_menu_items() { 38 38 39 add_submenu_page( $this->slug, __('Channels', $this->slug), __('Channels', $this->slug), 'manage_options', 'edit.php?post_type=channels', '' );39 add_submenu_page( $this->slug, __('Channels', $this->slug), __('Channels', $this->slug), 'manage_options', 'edit.php?post_type=channels', '' ); 40 40 41 41 if( 'yes' == get_option( 'twitchpress_perks_switch' ) ) { 42 add_submenu_page( $this->slug, __('Perks', $this->slug), __('Perks', $this->slug), 'manage_options', 'edit.php?post_type=perks', '' );42 add_submenu_page( $this->slug, __('Perks', $this->slug), __('Perks', $this->slug), 'manage_options', 'edit.php?post_type=perks', '' ); 43 43 } 44 44 45 45 if( 'yes' == get_option( 'twitchpress_giveaways_switch' ) ) { 46 add_submenu_page( $this->slug, __('Giveaways', $this->slug), __('Giveaways',$this->slug), 'manage_options', 'edit.php?post_type=giveaways', '' );46 add_submenu_page( $this->slug, __('Giveaways', $this->slug), __('Giveaways', $this->slug), 'manage_options', 'edit.php?post_type=giveaways', '' ); 47 47 } 48 48 49 if( 'yes' == get_option( 'twitchpress_webhooks_switch' ) ) { 50 add_submenu_page( $this->slug, __('Webhooks', $this->slug), __('Webhooks', $this->slug), 'manage_options', 'edit.php?post_type=webhooks', '' ); 49 if( 'yes' == get_option( 'twitchpress_webhooks_switch' ) ) { 50 add_submenu_page( $this->slug, __('Webhooks', $this->slug), __('Webhooks', $this->slug), 'manage_options', 'edit.php?post_type=webhooks', '' ); 51 } 52 53 if( 'yes' == get_option( 'twitchpress_bot_switch' ) ) { 54 add_submenu_page( $this->slug, __('Bot', $this->slug), __('Bot', $this->slug), 'manage_options', 'twitchpress_bot', array( $this, 'bot_page' ) ); 51 55 } 52 56 53 if( 'yes' == get_option( 'twitchpress_bot_switch' ) ) { 54 add_submenu_page( $this->slug, __('Bot', $this->slug), __('Bot', $this->slug), 'manage_options', 'twitchpress_bot', array( $this, 'bot_page' ) ); 55 } 56 57 add_submenu_page( $this->slug, __('Tools', $this->slug), __('Tools', $this->slug), 'manage_options', 'twitchpress_tools', array( $this, 'tools_page' ) ); 58 add_submenu_page( $this->slug, __('Data', $this->slug), __('Data', $this->slug), 'manage_options', 'twitchpress_data', array( $this, 'data_page' ) ); 57 add_submenu_page( $this->slug, __('Tools', $this->slug), __('Tools', $this->slug), 'manage_options', 'twitchpress_tools', array( $this, 'tools_page' ) ); 58 add_submenu_page( $this->slug, __('Data', $this->slug), __('Data', $this->slug), 'manage_options', 'twitchpress_data', array( $this, 'data_page' ) ); 59 59 } 60 60 -
twitchpress/trunk/includes/admin/class.twitchpress-admin-notices.php
r2185787 r2527323 431 431 432 432 endif; 433 434 TwitchPress_Admin_Notices::init(); -
twitchpress/trunk/includes/admin/class.twitchpress-admin-quicktools.php
r2488173 r2527323 534 534 535 535 /** 536 * Install/update the current pro-extension.537 *538 * @version 1.0539 */540 public function tool_install_pro() {541 /**542 * Description of values.543 *544 * title - give the tool a name.545 * description - describe what the tool does.546 * version - tools must be versioned to give users warning547 * author - we have to know who to come to for help with a tool548 * url - link to a tutorial or other documentation549 * category - a way to group tools550 * capability - apply security using a core or custom capability551 * option - add option name if configuration required to use tool552 */553 $tool_info = array(554 'title' => __( 'Install Pro Edition', 'multitool' ),555 'description' => __( 'Run installation of Pro extension (use for updating also).', 'multitool' ),556 'version' => '1.1',557 'author' => 'Ryan Bayne',558 'url' => '',559 'category' => 'extensions',560 'capability' => 'activate_plugins',561 'option' => null,562 'function' => __FUNCTION__,563 'plugin' => 'TwitchPress',564 );565 566 if( $this->return_tool_info ){ return $tool_info; }567 568 if( !current_user_can( $tool_info['capability'] ) ) { return; }569 570 $notices = new TwitchPress_Admin_Notices();571 572 // Prepare Streamlabs Applications object...573 $example = new TwitchPress_EXAMPLE_API();574 575 // Check if Streamlabs Application is ready...576 if( !$example->streamlabs_app_ready ) {577 $notices->error( __( 'EXAMPLE Application Not Ready', 'twitchpress' ), __( 'A message here.', 'twitchpress' ) );578 return;579 }580 581 /*582 Your tools unique code goes here. Make it do something!583 */584 }585 586 /**587 536 * Discord Test Tool 588 537 * -
twitchpress/trunk/includes/admin/class.twitchpress-admin-settings.php
r2477212 r2527323 100 100 101 101 /** 102 * Add a message .102 * Add a message for display under the tabs on settings pages... 103 103 * @param string $text 104 104 */ … … 108 108 109 109 /** 110 * Add an error .110 * Add an error for display under the tabs on settings pages... 111 111 * @param string $text 112 112 */ … … 467 467 case 'checkbox' : 468 468 469 $option_value = self::get_option( $value['id'], $value['default'] );469 $option_value = self::get_option( $value['id'], $value['default'] ); 470 470 471 471 $visbility_class = array(); … … 711 711 if( !ctype_alnum( $value ) ) { 712 712 //add_settings_error( string $setting, string $code, string $message, string $type = 'error' ) 713 self::add_error( sprintf( __( "A formneeds your attention. The %s field must be alphabetical and numerical characters only.", "twitchpress" ), $option['title']) );713 self::add_error( sprintf( __( "An entry needs your attention. The %s field must be alphabetical and numerical characters only.", "twitchpress" ), $option['title']) ); 714 714 // Unset the option to prevent it being saved... 715 715 unset( $update_options[ $option['id'] ] ); -
twitchpress/trunk/includes/admin/class.twitchpress-admin-setup-wizard.php
r2488173 r2527323 968 968 <li><?php echo $wpdb->prefix; ?>_twitchpress_activity</li> 969 969 <li><?php echo $wpdb->prefix; ?>_twitchpress_errors</li> 970 <li><?php echo $wpdb->prefix; ?>_twitchpress_outcomes</li>971 970 <li><?php echo $wpdb->prefix; ?>_twitchpress_endpoints</li> 972 971 <li><?php echo $wpdb->prefix; ?>_twitchpress_meta</li> -
twitchpress/trunk/includes/admin/class.twitchpress-admin.php
r2472434 r2527323 59 59 // Class 60 60 include_once( dirname( __FILE__ ) . '/class.twitchpress-admin-menus.php' ); 61 include_once( dirname( __FILE__ ) . '/class.twitchpress-admin-notices.php' );62 61 include_once( dirname( __FILE__ ) . '/class.twitchpress-admin-assets.php' ); 63 62 include_once( dirname( __FILE__ ) . '/class.twitchpress-admin-help.php' ); -
twitchpress/trunk/includes/admin/settings/class.twitchpress-settings-bugnet.php
r2210753 r2527323 104 104 $result = $install->install(); 105 105 106 TwitchPress_Admin_Settings::add_message( __( 'BugNet has been installed ', 'twitchpress' ) );106 TwitchPress_Admin_Settings::add_message( __( 'BugNet has been installed.', 'twitchpress' ) ); 107 107 } 108 108 else … … 201 201 array( 202 202 'title' => __( 'Single User Error Dump', 'twitchpress-login' ), 203 'desc' => __( 'Enter a WP user ID to limit error dumping to that user.', 'twitchpress-login' ),203 'desc' => __( 'Enter a WP user ID to restrict error output to that user only.', 'twitchpress-login' ), 204 204 'id' => 'bugnet_error_dump_user_id', 205 205 'css' => 'width:75px;', … … 472 472 $bugnet_version = BUGNET_VERSION; 473 473 474 $settings = apply_filters( 'twitchpress_bugnet_ version_settings', array(474 $settings = apply_filters( 'twitchpress_bugnet_installation_settings', array( 475 475 476 476 array( … … 482 482 483 483 array( 484 'desc' => __( 'name: the Twitch username can change.', 'twitchpress' ),485 484 'id' => 'bugnet_version', 486 485 'default' => BUGNET_VERSION, … … 489 488 490 489 array( 491 'desc' => __( 'name: the Twitch username can change.', 'twitchpress' ),492 490 'id' => 'bugnet_first_installation_request', 493 491 'default' => BUGNET_VERSION, -
twitchpress/trunk/includes/admin/settings/class.twitchpress-settings-general.php
r2496316 r2527323 48 48 'removal' => __( 'Plugin Removal', 'twitchpress' ), 49 49 'advanced' => __( 'Advanced', 'twitchpress' ), 50 'systems' => __( 'System s', 'twitchpress' ),50 'systems' => __( 'System Switches', 'twitchpress' ), 51 51 //'livemenu' => __( 'Live Menu', 'twitchpress' ), 52 //'team' => __( 'Main Team', 'twitchpress' ),52 'team' => __( 'Main Team', 'twitchpress' ), 53 53 ); 54 54 … … 68 68 * Save settings method runs along with save() method in class.twitchpress-admin-settings.php 69 69 * 70 * @version 1.270 * @version 2.0 71 71 */ 72 72 public function save() { 73 73 global $current_section; 74 74 $settings = $this->get_settings( $current_section ); 75 TwitchPress_Admin_Settings::save_fields( $settings ); 75 TwitchPress_Admin_Settings::save_fields( $settings ); // Use the saved values where possible... 76 76 77 // React to team section being submitted, do not use $_POST values though use the saved values... 78 if( isset( $_POST['twitchpress_team_name'] ) ) { 79 $twitch = new TwitchPress_Twitch_API(); 80 $team = $twitch->get_team( get_option( 'twitchpress_team_name' ) ); 81 if( $team ) { 82 //var_dump( $team->ID ); 83 } 77 // React to team section being submitted... 78 if( !isset( $_POST['twitchpress_team_name'] ) ) { 79 TwitchPress_Admin_Settings::add_error( sprintf( __( 'Please enter your teams name as shown on Twitch.', 'twitchpress' ), $team_id ) ); 80 return; 84 81 } 82 83 $twitch_api = new TwitchPress_Twitch_API(); 84 $twitch_api->get_team( get_option( 'twitchpress_team_name' ) ); 85 86 if( $twitch_api->curl_object->response_code == 200 ) { 87 $team_id = $twitch_api->curl_object->curl_reply_body->data['0']->id; 88 twitchpress_update_main_channels_team_id( $team_id ); 89 TwitchPress_Admin_Settings::add_message( sprintf( __( 'Your main teams ID is %d and will be used to request team data from Twitch.', 'twitchpress' ), $team_id ) ); 90 } elseif( $twitch_api->curl_object->response_code == 404 ) { 91 TwitchPress_Admin_Settings::add_error( sprintf( __( 'Your team could not be found. Ensure the name is entered correctly and try again.', 'twitchpress' ), $team_id ) ); 92 } 85 93 } 86 94 … … 102 110 'title' => __( 'General Settings', 'twitchpress' ), 103 111 'type' => 'title', 104 'desc' => __( 'You can support development by opting into the improvement program. It does not send sensitive data. The plugin can also request feedback occasionally, this is rare to avoid harassing you or users. Data collected is sen d to Ryan Bayne.', 'twitchpress' ),112 'desc' => __( 'You can support development by opting into the improvement program. It does not send sensitive data. The plugin can also request feedback occasionally, this is rare to avoid harassing you or users. Data collected is sent to Ryan Bayne (Plugin Owner).', 'twitchpress' ), 105 113 'id' => 'generalsettings' 106 114 ), … … 258 266 'title' => __( 'System Switches', 'twitchpress' ), 259 267 'type' => 'title', 260 'desc' => __( ' You can enable/disable multiple systems at once here (with care). Please visit system specific Settings views that become available on activation and run first-time installation.', 'twitchpress' ),268 'desc' => __( 'Use these settings to quickly enable/disable systems.', 'twitchpress' ), 261 269 'id' => 'systemsettings', 262 270 ), … … 273 281 274 282 array( 275 'desc' => __( 'Giveaways and Raffle System', 'twitchpress' ),283 'desc' => __( 'Giveaways System (Alpha - test only)', 'twitchpress' ), 276 284 'id' => 'twitchpress_giveaways_switch', 277 285 'default' => 'no', … … 283 291 284 292 array( 285 'desc' => __( 'Perks System ', 'twitchpress' ),293 'desc' => __( 'Perks System (Alpha - test only)', 'twitchpress' ), 286 294 'id' => 'twitchpress_perks_switch', 295 'default' => 'no', 296 'type' => 'checkbox', 297 'checkboxgroup' => '', 298 'show_if_checked' => 'yes', 299 'autoload' => true, 300 ), 301 302 array( 303 'desc' => __( 'Webhooks System (Alpha - test only)', 'twitchpress' ), 304 'id' => 'twitchpress_webhooks_switch', 305 'default' => 'no', 306 'type' => 'checkbox', 307 'checkboxgroup' => '', 308 'show_if_checked' => 'yes', 309 'autoload' => true, 310 ), 311 312 array( 313 'desc' => __( 'Content Gate System', 'twitchpress' ), 314 'id' => 'twitchpress_gate_switch', 287 315 'default' => 'no', 288 316 'type' => 'checkbox', … … 374 402 'title' => __( 'Twitch Team ID', 'twitchpress' ), 375 403 'desc' => __( 'This will be found automatically.', 'twitchpress' ), 376 'id' => 'twitchpress_ team_id',404 'id' => 'twitchpress_main_channel_team_id', 377 405 'default' => '', 378 406 'type' => 'text', 379 'validation' => 'alphanumeric',380 407 'autoload' => true, 381 408 'readonly' => true -
twitchpress/trunk/includes/admin/settings/class.twitchpress-settings-otherapi.php
r2334500 r2527323 30 30 'patron' 31 31 ); 32 32 33 33 /** 34 34 * Constructor … … 182 182 183 183 default: 184 // Allow extensions to add_action() and run custom procedures for updating app credentials...184 // Allow third party plugins to add_action() and run custom procedures for updating app credentials... 185 185 do_action( 'twitchpress_allapi_application_update_' . $service, $service, $url, $key, $secret ); 186 186 break; -
twitchpress/trunk/includes/admin/settings/class.twitchpress-settings-twitch.php
r2488173 r2527323 18 18 */ 19 19 class TwitchPress_Settings_Twitch extends TwitchPress_Settings_Page { 20 21 public $webhooks_ready = null; 20 22 21 23 /** … … 23 25 */ 24 26 public function __construct() { 25 27 global $wpdb, $current_section; 28 26 29 $this->id = 'twitch'; 27 30 $this->label = __( 'Twitch API', 'twitchpress' ); 28 31 32 // Establish installation status... 33 if( twitchpress_webhooks_ready() && $current_section == 'webhooks' ) { 34 $this->webhooks_ready = false; 35 add_filter( 'twitchpress_settings_save_button_text', array( $this, 'custom_save_button_webhooks' ), 1 ); 36 } else { 37 $this->webhooks_ready = true; 38 } 39 29 40 add_filter( 'twitchpress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); 30 41 add_action( 'twitchpress_settings_' . $this->id, array( $this, 'output' ) ); 31 42 add_action( 'twitchpress_settings_save_' . $this->id, array( $this, 'save' ) ); 32 add_action( 'twitchpress_sections_' . $this->id, array( $this, 'output_sections' ) ); 43 add_action( 'twitchpress_sections_' . $this->id, array( $this, 'output_sections' ) ); 33 44 } 34 45 46 /** 47 * Filter the save button text when on the Webhooks tab and change it according 48 * to Webhooks installation state... 49 * 50 * @param mixed $text original button text i.e. "Save changes" 51 * 52 * @version 1.0 53 */ 54 public function custom_save_button_webhooks( $text ) { 55 if( !$this->webhooks_ready ) 56 { 57 return __( 'Install Webhooks System', 'twitchpress' ); 58 } 59 return $text; 60 } 61 35 62 /** 36 63 * Get sections. … … 45 72 'general' => __( 'General Options', 'twitchpress' ), 46 73 'syncvalues' => __( 'Sync Values', 'twitchpress' ), 74 'webhooks' => __( 'Webhooks', 'twitchpress' ), 47 75 ); 48 76 … … 54 82 */ 55 83 public function output() { 56 global $current_section; 57 $settings = $this->get_settings( $current_section ); 84 global $current_section, $wpdb; 85 86 if( !$this->webhooks_ready && $current_section == 'webhooks' ) 87 { 88 $settings = $this->get_settings( 'webhooksinstallation' ); 89 $message = __( 'Webhooks System has not been installed yet.', 'twitchpress' ); 90 echo '<div id="message" class="error inline"><p><strong>' . $message . '</strong></p></div>'; 91 } 92 else 93 { 94 $settings = $this->get_settings( $current_section ); 95 } 96 58 97 TwitchPress_Admin_Settings::output_fields( $settings ); 59 98 } … … 63 102 */ 64 103 public function save() { 65 global $current_section; 66 $settings = $this->get_settings( $current_section ); 104 105 // First time installation by admin is required... 106 if( isset( $_POST['webhooks_first_installation_request'] ) ) 107 { 108 $settings = $this->get_settings( 'installation' ); 109 110 twitchpress_webhooks_activate_service(); 111 112 TwitchPress_Admin_Settings::add_message( __( 'Webhooks system (alpha - test only) has been installed.', 'twitchpress' ) ); 113 } 114 else 115 { 116 global $current_section; 117 $settings = $this->get_settings( $current_section ); 118 } 119 67 120 TwitchPress_Admin_Settings::save_fields( $settings ); 68 121 } … … 895 948 896 949 )); 950 } elseif ( 'webhooksinstallation' == $current_section ) { 951 $settings = apply_filters( 'twitchpress_webhook_installation_settings', array( 952 953 array( 954 'title' => __( 'Webhooks Installation', 'twitchpress' ), 955 'type' => 'title', 956 'desc' => __( 'Webhook system requires an additional database table to be installed.', 'twitchpress' ), 957 'id' => 'webhooksinstallation' 958 ), 959 960 array( 961 'id' => 'webhooks_first_installation_request', 962 'default' => true, 963 'type' => 'hidden', 964 ), 965 966 array( 967 'id' => 'twitchpress_webhooks_switch', 968 'default' => 'yes', 969 'type' => 'hidden', 970 ), 971 972 array( 973 'type' => 'sectionend', 974 'id' => 'webhooksinstallation' 975 ) 976 977 )); 978 } elseif ( 'webhooks' == $current_section ) { 979 $settings = apply_filters( 'twitchpress_webhook_settings', array( 980 981 array( 982 'title' => __( 'Webhooks', 'twitchpress' ), 983 'type' => 'title', 984 'desc' => __( 'Webhooks are a method of allowing Twitch.tv to update your WordPress with changes/events on Twitch.', 'twitch' ), 985 'id' => 'webhookssettings' 986 ), 987 988 array( 989 'desc' => __( 'Webhooks System (Alpha - test only)', 'twitchpress' ), 990 'id' => 'twitchpress_webhooks_switch', 991 'default' => 'no', 992 'type' => 'checkbox', 993 'checkboxgroup' => '', 994 'show_if_checked' => 'yes', 995 'autoload' => true, 996 ), 997 998 array( 999 'type' => 'sectionend', 1000 'id' => 'webhookssettings' 1001 ) 1002 1003 )); 897 1004 } 898 1005 -
twitchpress/trunk/includes/admin/views/dataviews/class.twitchpress-listtable-apiactivity.php
r2472434 r2527323 49 49 * This is not required and was only implemented for demonstration purposes. 50 50 * 51 * @version 1. 251 * @version 1.3 52 52 */ 53 53 public function default_items() { … … 72 72 $this->items[$key]['callid'] = $row->callid; 73 73 $this->items[$key]['service'] = $row->service; 74 $this->items[$key]['api'] = $row->api;75 74 $this->items[$key]['type'] = $row->type; 76 75 $this->items[$key]['outcome'] = $row->outcome; 77 76 $this->items[$key]['timestamp'] = $row->timestamp; 78 $this->items[$key]['wpuserid'] = $row->wpuserid;77 $this->items[$key]['wpuserid'] = $row->wpuserid; 79 78 } 80 79 -
twitchpress/trunk/includes/classes/class.twitchpress-api-logging.php
r2494470 r2527323 115 115 116 116 /** 117 * Close an entry with a final outcome... 118 * 117 119 * Stores admin readable context of what took place, sometimes using 118 120 * data returned by Twitch to explain changes. … … 124 126 * @return WP_Error - this is the only return done 125 127 * 126 * @version 1.0128 * @version 2.0 127 129 */ 128 130 static function outcome( $entryid, $outcome, $life = 129600, $meta = array() ) { … … 135 137 } 136 138 137 twitchpress_db_insert( 138 $wpdb->twitchpress_ outcomes,139 twitchpress_db_insert( 140 $wpdb->twitchpress_activity, 139 141 array( 'entryid' => $entryid, 'outcome' => $outcome, 'life' => $life ) 140 142 ); -
twitchpress/trunk/includes/classes/class.twitchpress-background-updater.php
r2472434 r2527323 20 20 * TwitchPress_Background_Updater Class. 21 21 */ 22 class TwitchPress_Background_Updater extends TwitchPress_Background_Process {22 class TwitchPress_Background_Updater extends TwitchPress_Background_Processing { 23 23 24 24 /** -
twitchpress/trunk/includes/classes/class.twitchpress-curl.php
r2494470 r2527323 340 340 'headers' => $this->headers, 341 341 'method' => strtoupper( $this->type ), 342 'body' => $this->curl_request_body,342 'body' => json_encode( $this->curl_request_body ), 343 343 'user-agent' => 'curl/' . $this->curl_version['version'], 344 344 'stream' => false, … … 476 476 */ 477 477 public function call_execute() { 478 478 479 479 $this->logging_initiate(); 480 480 -
twitchpress/trunk/includes/classes/class.twitchpress-posts-gate.php
r2488173 r2527323 20 20 public function init() { 21 21 add_filter( 'the_content', array( __CLASS__, 'gate' ), 20 ); 22 add_action( 'add_meta_boxes', array( __CLASS__, 'add_custom_boxes' ) ); 22 add_action( 'add_meta_boxes_post', array( __CLASS__, 'add_custom_boxes' ) ); 23 add_action( 'add_meta_boxes_page', array( __CLASS__, 'add_custom_boxes' ) ); 23 24 add_action( 'save_post', array( __CLASS__, 'save_twitchpress_post_gate_options' ) ); 24 25 } -
twitchpress/trunk/includes/classes/class.twitchpress-subscriptions.php
r2494470 r2527323 320 320 */ 321 321 public function twitch_subscription_status_save( $user_id ) { 322 $this->sync_user( $user_id, false, true );322 twitchpress_user_sub_sync_single( $user_id, false ); 323 323 } 324 324 -
twitchpress/trunk/includes/classes/class.twitchpress-tables-installation.php
r2477212 r2527323 10 10 'twitchpress_activity', /* entryid, callid, service, function (__FUNCTION__), type (get,post,put,patch,delete), outcome (granted,rejected,failure), life */ 11 11 'twitchpress_errors', /* errorid, entryid, code (usually HTTP code but string allowed), error (message) */ 12 'twitchpress_outcomes', /* resultid, entryid, outcome, state (raw,modified,custom), life */13 12 'twitchpress_endpoints', /* endpointid, api, endpoint, firstuse, lastuse */ 14 13 'twitchpress_meta', /* metaid, entryid, metakey, metavalue */ … … 110 109 description longtext, 111 110 outcome longtext, 111 life bigint(20) NOT NULL DEFAULT '86400', 112 112 PRIMARY KEY (entryid) 113 113 ) $charset_collate; "; -
twitchpress/trunk/includes/functions/functions.twitchpress-database.php
r2472434 r2527323 365 365 * @global array $wpdb 366 366 * @param string $table_name 367 * 367 368 * @return boolean, true if table found, else if table does not exist 368 369 */ -
twitchpress/trunk/includes/integration/class.twitchpress-ultimate-member.php
r2488173 r2527323 90 90 91 91 if( !is_user_logged_in() ) { return false; } 92 93 if( !twitchpress_is_sync_due( __FILE__, __FUNCTION__, __LINE__, 120 ) ) { return; } 94 92 95 93 // Avoid processing the owner of the main channel (might not be admin with ID 1) 96 94 if( twitchpress_is_current_user_main_channel_owner() ) { return; } … … 111 109 */ 112 110 public function set_twitch_subscribers_um_role( $wp_user_id ) { 113 if( !twitchpress_is_sync_due( __FILE__, __FUNCTION__, __LINE__, 60 ) ) { return; }114 115 111 // Get the current filter to help us trace backwards from log entries. 116 112 $filter = current_filter(); -
twitchpress/trunk/includes/libraries/bugnet/class.bugnet-install-database.php
r2472434 r2527323 111 111 $wpdb->twitchpress_activity = "{$wpdb->prefix}twitchpress_activity"; 112 112 $wpdb->twitchpress_errors = "{$wpdb->prefix}twitchpress_errors"; 113 $wpdb->twitchpress_outcomes = "{$wpdb->prefix}twitchpress_outcomes";114 113 $wpdb->twitchpress_endpoints = "{$wpdb->prefix}twitchpress_endpoints"; 115 114 $wpdb->twitchpress_meta = "{$wpdb->prefix}twitchpress_meta"; -
twitchpress/trunk/includes/libraries/class.async-request.php
r2474554 r2527323 6 6 * @author A5hleyRich (Original) 7 7 * 8 * @package WP-Background-Processing9 *10 8 * @link https://github.com/A5hleyRich/wp-background-processing/ 11 9 */ … … 84 82 public function data( $data ) { 85 83 $this->data = $data; 86 87 84 return $this; 88 85 } 89 86 90 87 /** 91 * Dispatch the async request 88 * Dispatch the async request... 92 89 * 93 90 * @return array|WP_Error … … 101 98 102 99 /** 103 * Get query args 100 * Get query args... 104 101 * 105 102 * @return array … … 117 114 118 115 /** 119 * Get query URL 116 * Get query URL... 120 117 * 121 118 * @return string -
twitchpress/trunk/includes/libraries/class.background-process.php
r2474554 r2527323 14 14 defined( 'ABSPATH' ) || die( 'Direct script access is not allowed!' ); 15 15 16 if ( ! class_exists( 'TwitchPress_Background_Process ' ) ) {16 if ( ! class_exists( 'TwitchPress_Background_Processing' ) ) { 17 17 18 18 /** … … 26 26 * @link https://github.com/A5hleyRich/wp-background-processing/blob/master/classes/wp-background-process.php 27 27 */ 28 abstract class TwitchPress_Background_Process extends TwitchPress_Async_Request {28 abstract class TwitchPress_Background_Processing extends TwitchPress_Async_Request { 29 29 30 30 /** … … 78 78 79 79 /** 80 * Dispatch 80 * Dispatch by performing a HTTP POST... 81 81 * 82 82 * @access public … … 87 87 $this->schedule_event(); 88 88 89 // Perform remote post .89 // Perform remote post 90 90 return parent::dispatch(); 91 91 } … … 100 100 public function push_to_queue( $data ) { 101 101 $this->data[] = $data; 102 103 102 return $this; 104 103 } … … 193 192 194 193 /** 195 * Is queue empty 194 * Is queue empty... 196 195 * 197 196 * @return bool 197 * 198 * @version 1.0 198 199 */ 199 200 protected function is_queue_empty() { … … 267 268 * 268 269 * @return stdClass Return the first batch from the queue 270 * 271 * @version 1.0 269 272 */ 270 273 protected function get_batch() { … … 512 515 */ 513 516 abstract protected function task( $item ); 514 515 517 } 516 518 } -
twitchpress/trunk/includes/libraries/twitch/helix/class.twitch-api.php
r2494470 r2527323 327 327 $new_curl->final_prep(); 328 328 $new_curl->do_call(); 329 $new_curl->call_array['response']['body'] = json_decode( $new_curl->call_array['response']['body'] ); 330 329 $new_curl->call_array['response']['body'] = $new_curl->call_array['response']['body']; 330 //$new_curl->call_array['response']['body'] = json_decode( $new_curl->call_array['response']['body'] ); 331 //$new_curl->call_array['response']['body'] = http_build_query( $new_curl->call_array['response']['body'] ); 332 333 334 331 335 return $new_curl->call_array['response']; 332 336 } … … 341 345 * @return object entire TwitchPress_Curl() object for handling any way required. 342 346 * 343 * @version 2.0347 * @version 3.0 344 348 */ 345 349 public function request_app_access_token( $requesting_function = null ){ … … 349 353 $this->curl_object->originating_line = __LINE__; 350 354 $this->curl_object->type = 'POST'; 351 $this->curl_object->endpoint = 'https://id.twitch.tv/oauth2/token?client_id=' . twitchpress_get_app_id(); 355 //$this->curl_object->endpoint = 'https://id.twitch.tv/oauth2/token?client_id=' . twitchpress_get_app_id(); 356 $this->curl_object->endpoint = 'https://id.twitch.tv/oauth2/token'; 352 357 353 358 // Set none API related parameters i.e. cache and rate controls... … … 365 370 // Use app credentials from my own registry for sensitive data... 366 371 $twitch_app = TwitchPress_Object_Registry::get( 'twitchapp' ); 372 373 $this->curl_object->endpoint = add_query_arg( array( 374 'client_id' => $twitch_app->app_id, 375 'client_secret' => $twitch_app->app_secret, 376 'redirect_uri' => $twitch_app->app_redirect, 377 'grant_type' => 'client_credentials' 378 ), $this->curl_object->endpoint ); 379 380 /* 367 381 $this->curl_object->set_curl_body( array( 368 382 'client_id' => $twitch_app->app_id, … … 371 385 'grant_type' => 'client_credentials' 372 386 ) ); 387 */ 388 389 /* 390 $this->curl_object->body = array( 391 'client_id' => $twitch_app->app_id, 392 'client_secret' => $twitch_app->app_secret, 393 'redirect_uri' => $twitch_app->app_redirect, 394 'grant_type' => 'client_credentials' 395 ); 396 */ 397 398 /* 399 $this->curl_object->headers = array( 400 'client_id' => $twitch_app->app_id, 401 'client_secret' => $twitch_app->app_secret, 402 'redirect_uri' => $twitch_app->app_redirect, 403 'grant_type' => 'client_credentials' 404 ); 405 */ 406 373 407 unset($twitch_app); 374 408 … … 545 579 546 580 $result = $this->curl_object->curl_reply; 547 581 if( is_wp_error( $result ) ) { return false; } 582 548 583 $token = array(); 549 584 … … 1330 1365 $this->curl_object->scope = 'user:read:email'; 1331 1366 1332 $result =$this->call();1367 return $this->call(); 1333 1368 } 1334 1369 … … 1669 1704 return json_decode( $this->curl_object->curl_reply['body'] ); 1670 1705 } 1706 1707 /** 1708 * put your comment there... 1709 * 1710 * @param mixed $broadcaster_user_id 1711 */ 1712 public function eventsub_channel_update( $wp_post_id, $broadcaster_user_id ) { 1713 $scope = 'none'; 1714 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 1715 $method = 'POST'; 1716 $type = 'channel.update'; 1717 1718 $this->curl( __FILE__, __FUNCTION__, __LINE__, $method, $endpoint ); 1719 1720 $this->curl_object->add_headers( array( 1721 'Client-ID' => twitchpress_get_app_id(), 1722 'Authorization' => 'Bearer ' . twitchpress_get_app_token(), 1723 ) ); 1724 1725 $this->curl_object->curl_request_body = array( 1726 'type' => $type, 1727 'version' => '1', 1728 'condition' => array( 1729 'broadcaster_user_id' => twitchpress_get_main_channels_twitchid(), 1730 ), 1731 'transport' => array( 1732 'method' => 'webhook', 1733 'callback' => TWITCHPRESS_WEBHOOK_CALLBACK, 1734 'secret' => $wp_post_id . '_' . str_replace( '.', '_', $type ) . '_' . twitchpress_random14() 1735 ) 1736 ); 1737 1738 $this->call(); 1739 1740 return $this->curl_object->curl_reply_body; 1741 1742 # Channel Update Notification Example 1743 /* { 1744 "subscription": { 1745 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 1746 "type": "channel.update", 1747 "version": "1", 1748 "status": "enabled", 1749 "cost": 0, 1750 "condition": { 1751 "broadcaster_user_id": "1337" 1752 }, 1753 "transport": { 1754 "method": "webhook", 1755 "callback": "https://example.com/webhooks/callback" 1756 }, 1757 "created_at": "2019-11-16T10:11:12.123Z" 1758 }, 1759 "event": { 1760 "broadcaster_user_id": "1337", 1761 "broadcaster_user_login": "cool_user", 1762 "broadcaster_user_name": "Cool_User", 1763 "title": "Best Stream Ever", 1764 "language": "en", 1765 "category_id": "21779", 1766 "category_name": "Fortnite", 1767 "is_mature": false 1768 } 1769 } */ 1770 } 1771 1772 public function eventsub_channel_follow() { 1773 $call_authentication = 'none'; 1774 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 1775 $method = 'POST'; 1776 $type = 'channel.follow'; 1777 1778 /* 1779 Channel Follow Request Body 1780 Name Type Required? Description 1781 type string yes The subscription type name: channel.follow. 1782 version string yes The subscription type version: 1. 1783 condition condition yes Subscription-specific parameters. 1784 transport transport yes Transport-specific parameters. 1785 Channel Follow Webhook Example 1786 { 1787 "type": "channel.follow", 1788 "version": "1", 1789 "condition": { 1790 "broadcaster_user_id": "1337" 1791 }, 1792 "transport": { 1793 "method": "webhook", 1794 "callback": "https://example.com/webhooks/callback", 1795 "secret": "s3cRe7" 1796 } 1797 } 1798 Channel Follow Notification Payload 1799 Name Type Description 1800 subscription subscription Metadata about the subscription. 1801 event event The event information. Contains the user ID and user name of the follower and the broadcaster user ID and broadcaster user name. 1802 Channel Follow Webhook Notification Example 1803 { 1804 "subscription": { 1805 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 1806 "type": "channel.follow", 1807 "version": "1", 1808 "status": "enabled", 1809 "cost": 0, 1810 "condition": { 1811 "broadcaster_user_id": "1337" 1812 }, 1813 "transport": { 1814 "method": "webhook", 1815 "callback": "https://example.com/webhooks/callback" 1816 }, 1817 "created_at": "2019-11-16T10:11:12.123Z" 1818 }, 1819 "event": { 1820 "user_id": "1234", 1821 "user_login": "cool_user", 1822 "user_name": "Cool_User", 1823 "broadcaster_user_id": "1337", 1824 "broadcaster_user_login": "cooler_user", 1825 "broadcaster_user_name": "Cooler_User", 1826 "followed_at": "2020-07-15T18:16:11.17106713Z" 1827 } 1828 } */ 1829 } 1830 1831 public function eventsub_channel_subscribe() { 1832 $call_authentication = 'channel:read:subscriptions'; 1833 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 1834 $method = 'POST'; 1835 $type = 'channel.subscribe'; 1836 1837 1838 /* 1839 Channel Subscribe Request Body 1840 Name Type Required? Description 1841 type string yes The subscription type name: channel.subscribe. 1842 version string yes The subscription type version: 1. 1843 condition condition yes Subscription-specific parameters. 1844 transport transport yes Transport-specific parameters. 1845 Channel Subscribe Webhook Example 1846 { 1847 "type": "channel.subscribe", 1848 "version": "1", 1849 "condition": { 1850 "broadcaster_user_id": "1337" 1851 }, 1852 "transport": { 1853 "method": "webhook", 1854 "callback": "https://example.com/webhooks/callback", 1855 "secret": "s3cRe7" 1856 } 1857 } 1858 Channel Subscribe Notification Payload 1859 Name Type Description 1860 subscription subscription Metadata about the subscription. 1861 event event The event information. Contains the user ID and user name of the subscriber, the broadcaster user ID and broadcaster user name, and whether the subscription is a gift. 1862 Channel Subscribe Webhook Notification Example 1863 { 1864 "subscription": { 1865 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 1866 "type": "channel.subscribe", 1867 "version": "1", 1868 "status": "enabled", 1869 "cost": 0, 1870 "condition": { 1871 "broadcaster_user_id": "1337" 1872 }, 1873 "transport": { 1874 "method": "webhook", 1875 "callback": "https://example.com/webhooks/callback" 1876 }, 1877 "created_at": "2019-11-16T10:11:12.123Z" 1878 }, 1879 "event": { 1880 "user_id": "1234", 1881 "user_login": "cool_user", 1882 "user_name": "Cool_User", 1883 "broadcaster_user_id": "1337", 1884 "broadcaster_user_login": "cooler_user", 1885 "broadcaster_user_name": "Cooler_User", 1886 "tier": "1000", 1887 "is_gift": false 1888 } 1889 } 1890 1891 */ 1892 } 1893 1894 public function eventsub_channel_cheer() { 1895 $call_authentication = 'bits:read'; 1896 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 1897 $method = 'POST'; 1898 $type = 'channel.cheer'; 1899 1900 1901 1902 /* 1903 Channel Cheer Request Body 1904 Name Type Required? Description 1905 type string yes The subscription type name: channel.cheer. 1906 version string yes The subscription type version: 1. 1907 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive cheer notifications for. 1908 transport transport yes Transport-specific parameters. 1909 Channel Cheer Webhook Example 1910 { 1911 "type": "channel.cheer", 1912 "version": "1", 1913 "condition": { 1914 "broadcaster_user_id": "1337" 1915 }, 1916 "transport": { 1917 "method": "webhook", 1918 "callback": "https://example.com/webhooks/callback", 1919 "secret": "s3cRe7" 1920 } 1921 } 1922 Channel Cheer Notification Payload 1923 Name Type Description 1924 subscription subscription Metadata about the subscription. 1925 event event The event information. Contains the user ID and user name of the cheering user along with the broadcaster user id and broadcaster user name. 1926 Channel Cheer Notification Example 1927 { 1928 "subscription": { 1929 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 1930 "type": "channel.cheer", 1931 "version": "1", 1932 "status": "enabled", 1933 "cost": 0, 1934 "condition": { 1935 "broadcaster_user_id": "1337" 1936 }, 1937 "transport": { 1938 "method": "webhook", 1939 "callback": "https://example.com/webhooks/callback" 1940 }, 1941 "created_at": "2019-11-16T10:11:12.123Z" 1942 }, 1943 "event": { 1944 "is_anonymous": false, 1945 "user_id": "1234", // null if is_anonymous=true 1946 "user_login": "cool_user", // null if is_anonymous=true 1947 "user_name": "Cool_User", // null if is_anonymous=true 1948 "broadcaster_user_id": "1337", 1949 "broadcaster_user_login": "cooler_user", 1950 "broadcaster_user_name": "Cooler_User", 1951 "message": "pogchamp", 1952 "bits": 1000 1953 } 1954 } 1955 1956 1957 */ 1958 } 1959 1960 public function eventsub_channel_raid() { 1961 $call_authentication = 'none'; 1962 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 1963 $method = 'POST'; 1964 $type = 'channel.raid'; 1965 1966 1967 /* 1968 Channel Raid Request Body 1969 Name Type Required? Description 1970 type string yes The subscription type name: channel.raid. 1971 version string yes The subscription type version: 1. 1972 condition condition yes Subscription-specific parameters. Pass in either from_broadcaster_user_id or to_broadcaster_user_id. If you pass in both parameters you will receive an error. 1973 transport transport yes Transport-specific parameters. 1974 Channel Raid Webhook Example 1975 { 1976 "type": "channel.raid", 1977 "version": "1", 1978 "condition": { 1979 "to_broadcaster_user_id": "1337" // could provide from_broadcaster_user_id instead 1980 }, 1981 "transport": { 1982 "method": "webhook", 1983 "callback": "https://example.com/webhooks/callback", 1984 "secret": "s3cRe7" 1985 } 1986 } 1987 Channel Raid Notification Payload 1988 Name Type Description 1989 subscription subscription Metadata about the subscription. 1990 event event The event information. Contains the from and to broadcaster information along with the number of viewers in the raid. Will only notify for raids that appear in chat. 1991 Channel Raid Notification Example 1992 { 1993 "subscription": { 1994 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 1995 "type": "channel.raid", 1996 "version": "1", 1997 "status": "enabled", 1998 "cost": 0, 1999 "condition": { 2000 "to_broadcaster_user_id": "1337" 2001 }, 2002 "transport": { 2003 "method": "webhook", 2004 "callback": "https://example.com/webhooks/callback" 2005 }, 2006 "created_at": "2019-11-16T10:11:12.123Z" 2007 }, 2008 "event": { 2009 "from_broadcaster_user_id": "1234", 2010 "from_broadcaster_user_login": "cool_user", 2011 "from_broadcaster_user_name": "Cool_User", 2012 "to_broadcaster_user_id": "1337", 2013 "to_broadcaster_user_login": "cooler_user", 2014 "to_broadcaster_user_name": "Cooler_User", 2015 "viewers": 9001 2016 } 2017 }*/ 2018 } 2019 2020 public function eventsub_channel_ban() { 2021 $call_authentication = 'channel:moderate'; 2022 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2023 $method = 'POST'; 2024 $type = 'channel.ban'; 2025 /* 2026 Channel Ban Request Body 2027 Name Type Required? Description 2028 type string yes The subscription type name: channel.ban. 2029 version string yes The subscription type version: 1. 2030 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive ban notifications for. 2031 transport transport yes Transport-specific parameters. 2032 Channel Ban Webhook Example 2033 { 2034 "type": "channel.ban", 2035 "version": "1", 2036 "condition": { 2037 "broadcaster_user_id": "1337" 2038 }, 2039 "transport": { 2040 "method": "webhook", 2041 "callback": "https://example.com/webhooks/callback", 2042 "secret": "s3cRe7" 2043 } 2044 } 2045 Channel Ban Notification Payload 2046 Name Type Description 2047 subscription subscription Metadata about the subscription. 2048 event event The event information. Will notify on timeouts as well as bans. Contains the user ID and user name of the banned user, the broadcaster user ID and broadcaster user name, the user ID and user name of the moderator who issued the ban/timeout, the reason, and expiration time if it is a timeout. 2049 Channel Ban Notification Example 2050 { 2051 "subscription": { 2052 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2053 "type": "channel.ban", 2054 "version": "1", 2055 "status": "enabled", 2056 "cost": 0, 2057 "condition": { 2058 "broadcaster_user_id": "1337" 2059 }, 2060 "transport": { 2061 "method": "webhook", 2062 "callback": "https://example.com/webhooks/callback" 2063 }, 2064 "created_at": "2019-11-16T10:11:12.123Z" 2065 }, 2066 "event": { 2067 "user_id": "1234", 2068 "user_login": "cool_user", 2069 "user_name": "Cool_User", 2070 "broadcaster_user_id": "1337", 2071 "broadcaster_user_login": "cooler_user", 2072 "broadcaster_user_name": "Cooler_User", 2073 "moderator_user_id": "1339", 2074 "moderator_user_login": "mod_user", 2075 "moderator_user_name": "Mod_User", 2076 "reason": "Offensive language", 2077 "ends_at": "2020-07-15T18:16:11.17106713Z", 2078 "is_permanent": false 2079 } 2080 } */ 2081 } 2082 2083 public function eventsub_channel_unban() { 2084 $call_authentication = 'channel:moderate'; 2085 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2086 $method = 'POST'; 2087 $type = 'channel.unban'; 2088 2089 /* 2090 Channel Unban Request Body 2091 Name Type Required? Description 2092 type string yes The subscription type name: channel.unban. 2093 version string yes The subscription type version: 1. 2094 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive unban notifications for. 2095 transport transport yes Transport-specific parameters. 2096 Channel Unban Webhook Example 2097 { 2098 "type": "channel.unban", 2099 "version": "1", 2100 "condition": { 2101 "broadcaster_user_id": "1337" 2102 }, 2103 "transport": { 2104 "method": "webhook", 2105 "callback": "https://example.com/webhooks/callback", 2106 "secret": "s3cRe7" 2107 } 2108 } 2109 Channel Unban Notification Payload 2110 Name Type Description 2111 subscription subscription Metadata about the subscription. 2112 event event The event information. Contains the user ID and user name of the unbanned user, the broadcaster user id and broadcaster user name, as well as the user ID and user name of the moderator who issued the unban. 2113 Channel Unban Notification Example 2114 { 2115 "subscription": { 2116 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2117 "type": "channel.unban", 2118 "version": "1", 2119 "status": "enabled", 2120 "cost": 0, 2121 "condition": { 2122 "broadcaster_user_id": "1337" 2123 }, 2124 "transport": { 2125 "method": "webhook", 2126 "callback": "https://example.com/webhooks/callback" 2127 }, 2128 "created_at": "2019-11-16T10:11:12.123Z" 2129 }, 2130 "event": { 2131 "user_id": "1234", 2132 "user_login": "cool_user", 2133 "user_name": "Cool_User", 2134 "broadcaster_user_id": "1337", 2135 "broadcaster_user_login": "cooler_user", 2136 "broadcaster_user_name": "Cooler_User", 2137 "moderator_user_id": "1339", 2138 "moderator_user_login": "mod_user", 2139 "moderator_user_name": "Mod_User" 2140 } 2141 } */ 2142 } 2143 2144 public function eventsub_channel_moderator_add() { 2145 $call_authentication = 'moderation:read'; 2146 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2147 $method = 'POST'; 2148 $type = 'channel.moderator.add'; 2149 2150 /* 2151 Channel Moderator Add Request Body 2152 Name Type Required? Description 2153 type string yes The subscription type name: channel.moderator.add. 2154 version string yes The subscription type version: 1. 2155 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive moderator addition notifications for. 2156 transport transport yes Transport-specific parameters. 2157 Channel Moderator Add Example 2158 { 2159 "type": "channel.moderator.add", 2160 "version": "1", 2161 "condition": { 2162 "broadcaster_user_id": "1337" 2163 }, 2164 "transport": { 2165 "method": "webhook", 2166 "callback": "https://example.com/webhooks/callback", 2167 "secret": "s3cRe7" 2168 } 2169 } 2170 Channel Moderator Add Notification Payload 2171 Name Type Description 2172 subscription subscription Metadata about the subscription. 2173 event event The event information. Contains user information of the new moderator as well as broadcaster information of the channel the event occurred on. 2174 Channel Moderator Add Notification Example 2175 { 2176 "subscription": { 2177 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2178 "type": "channel.moderator.add", 2179 "version": "1", 2180 "status": "enabled", 2181 "cost": 0, 2182 "condition": { 2183 "broadcaster_user_id": "1337" 2184 }, 2185 "transport": { 2186 "method": "webhook", 2187 "callback": "https://example.com/webhooks/callback" 2188 }, 2189 "created_at": "2019-11-16T10:11:12.123Z" 2190 }, 2191 "event": { 2192 "user_id": "1234", 2193 "user_login": "mod_user", 2194 "user_name": "Mod_User", 2195 "broadcaster_user_id": "1337", 2196 "broadcaster_user_login": "cooler_user", 2197 "broadcaster_user_name": "Cooler_User" 2198 } 2199 } */ 2200 2201 } 2202 2203 public function eventsub_channel_moderator_remove() { 2204 $call_authentication = 'moderation:read'; 2205 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2206 $method = 'POST'; 2207 $type = 'channel.moderator.remove'; 2208 2209 /* 2210 Channel Moderator Remove Request Body 2211 Name Type Required? Description 2212 type string yes The subscription type name: channel.moderator.remove. 2213 version string yes The subscription type version: 1. 2214 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive moderator removal notifications for. 2215 transport transport yes Transport-specific parameters. 2216 Channel Moderator Remove Example 2217 { 2218 "type": "channel.moderator.remove", 2219 "version": "1", 2220 "condition": { 2221 "broadcaster_user_id": "1337" 2222 }, 2223 "transport": { 2224 "method": "webhook", 2225 "callback": "https://example.com/webhooks/callback", 2226 "secret": "s3cRe7" 2227 } 2228 } 2229 Channel Moderator Remove Notification Payload 2230 Name Type Description 2231 subscription subscription Metadata about the subscription. 2232 event event The event information. Contains user information of the old moderator as well as broadcaster information of the channel the event occurred on. 2233 Channel Moderator Remove Notification Example 2234 { 2235 "subscription": { 2236 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2237 "type": "channel.moderator.remove", 2238 "version": "1", 2239 "status": "enabled", 2240 "cost": 0, 2241 "condition": { 2242 "broadcaster_user_id": "1337" 2243 }, 2244 "transport": { 2245 "method": "webhook", 2246 "callback": "https://example.com/webhooks/callback" 2247 }, 2248 "created_at": "2019-11-16T10:11:12.123Z" 2249 }, 2250 "event": { 2251 "user_id": "1234", 2252 "user_login": "not_mod_user", 2253 "user_name": "Not_Mod_User", 2254 "broadcaster_user_id": "1337", 2255 "broadcaster_user_login": "cooler_user", 2256 "broadcaster_user_name": "Cooler_User" 2257 } 2258 } */ 2259 } 2260 2261 public function eventsub_channel_points_custom_reward_add() { 2262 $call_authentication = 'channel:read:redemptions'; // OR channel:manage:redemptions 2263 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2264 $method = 'POST'; 2265 $type = 'channel.channel_points_custom_reward.add'; 2266 2267 /* 2268 Channel Points Custom Reward Add Request Body 2269 Name Type Required? Description 2270 type string yes The subscription type name: channel.channel_points_custom_reward.add. 2271 version string yes The subscription type version: 1. 2272 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive channel points customer reward add notifications for. 2273 transport transport yes Transport-specific parameters. 2274 Channel Points Custom Reward Add Webhook Example 2275 { 2276 "type": "channel.channel_points_custom_reward.add", 2277 "version": "1", 2278 "condition": { 2279 "broadcaster_user_id": "1337" 2280 }, 2281 "transport": { 2282 "method": "webhook", 2283 "callback": "https://example.com/webhooks/callback", 2284 "secret": "s3cRe7" 2285 } 2286 } 2287 Channel Points Custom Reward Add Notification Payload 2288 Name Type Description 2289 subscription subscription Metadata about the subscription. 2290 event event The event information. Contains data about the custom reward added to the broadcasters channel. 2291 Channel Points Custom Reward Add Notification Example 2292 { 2293 "subscription": { 2294 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2295 "type": "channel.channel_points_custom_reward.add", 2296 "version": "1", 2297 "status": "enabled", 2298 "cost": 0, 2299 "condition": { 2300 "broadcaster_user_id": "1337" 2301 }, 2302 "transport": { 2303 "method": "webhook", 2304 "callback": "https://example.com/webhooks/callback" 2305 }, 2306 "created_at": "2019-11-16T10:11:12.123Z" 2307 }, 2308 "event": { 2309 "id": "9001", 2310 "broadcaster_user_id": "1337", 2311 "broadcaster_user_login": "cool_user", 2312 "broadcaster_user_name": "Cool_User", 2313 "is_enabled": true, 2314 "is_paused": false, 2315 "is_in_stock": true, 2316 "title": "Cool Reward", 2317 "cost": 100, 2318 "prompt": "reward prompt", 2319 "is_user_input_required": true, 2320 "should_redemptions_skip_request_queue": false, 2321 "cooldown_expires_at": null, 2322 "redemptions_redeemed_current_stream": null, 2323 "max_per_stream": { 2324 "is_enabled": true, 2325 "value": 1000 2326 }, 2327 "max_per_user_per_stream": { 2328 "is_enabled": true, 2329 "value": 1000 2330 }, 2331 "global_cooldown": { 2332 "is_enabled": true, 2333 "seconds": 1000 2334 }, 2335 "background_color": "#FA1ED2", 2336 "image": { 2337 "url_1x": "https://static-cdn.jtvnw.net/image-1.png", 2338 "url_2x": "https://static-cdn.jtvnw.net/image-2.png", 2339 "url_4x": "https://static-cdn.jtvnw.net/image-4.png" 2340 }, 2341 "default_image": { 2342 "url_1x": "https://static-cdn.jtvnw.net/default-1.png", 2343 "url_2x": "https://static-cdn.jtvnw.net/default-2.png", 2344 "url_4x": "https://static-cdn.jtvnw.net/default-4.png" 2345 } 2346 } 2347 } */ 2348 } 2349 2350 public function eventsub_channel_points_custom_reward_update() { 2351 $call_authentication = 'channel:read:redemptions'; // OR channel:manage:redemptions 2352 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2353 $method = 'POST'; 2354 $type = 'channel.channel_points_custom_reward.update'; 2355 2356 2357 /* 2358 Channel Points Custom Reward Update Request Body 2359 Name Type Required? Description 2360 type string yes The subscription type name: channel.channel_points_custom_reward.update. 2361 version string yes The subscription type version: 1. 2362 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive channel points custom reward update notifications for. You can optionally pass in a reward id to only receive notifications for a specific reward. 2363 transport transport yes Transport-specific parameters. 2364 Channel Points Custom Reward Update Webhook Example 2365 { 2366 "type": "channel.channel_points_custom_reward.update", 2367 "version": "1", 2368 "condition": { 2369 "broadcaster_user_id": "1337", 2370 "reward_id": "9001" // optional to only get notifications for a specific reward 2371 }, 2372 "transport": { 2373 "method": "webhook", 2374 "callback": "https://example.com/webhooks/callback", 2375 "secret": "s3cRe7" 2376 } 2377 } 2378 Channel Points Custom Reward Update Notification Payload 2379 Name Type Description 2380 subscription subscription Metadata about the subscription. 2381 event event The event information. Contains data about the custom reward updated on the broadcasters channel. 2382 Channel Points Custom Reward Update Notification Example 2383 { 2384 "subscription": { 2385 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2386 "type": "channel.channel_points_custom_reward.update", 2387 "version": "1", 2388 "status": "enabled", 2389 "cost": 0, 2390 "condition": { 2391 "broadcaster_user_id": "1337" 2392 2393 }, 2394 "transport": { 2395 "method": "webhook", 2396 "callback": "https://example.com/webhooks/callback" 2397 }, 2398 "created_at": "2019-11-16T10:11:12.123Z" 2399 }, 2400 "event": { 2401 "id": "9001", 2402 "broadcaster_user_id": "1337", 2403 "broadcaster_user_login": "cool_user", 2404 "broadcaster_user_name": "Cool_User", 2405 "is_enabled": true, 2406 "is_paused": false, 2407 "is_in_stock": true, 2408 "title": "Cool Reward", 2409 "cost": 100, 2410 "prompt": "reward prompt", 2411 "is_user_input_required": true, 2412 "should_redemptions_skip_request_queue": false, 2413 "cooldown_expires_at": "2019-11-16T10:11:12.123Z", 2414 "redemptions_redeemed_current_stream": 123, 2415 "max_per_stream": { 2416 "is_enabled": true, 2417 "value": 1000 2418 }, 2419 "max_per_user_per_stream": { 2420 "is_enabled": true, 2421 "value": 1000 2422 }, 2423 "global_cooldown": { 2424 "is_enabled": true, 2425 "seconds": 1000 2426 }, 2427 "background_color": "#FA1ED2", 2428 "image": { 2429 "url_1x": "https://static-cdn.jtvnw.net/image-1.png", 2430 "url_2x": "https://static-cdn.jtvnw.net/image-2.png", 2431 "url_4x": "https://static-cdn.jtvnw.net/image-4.png" 2432 }, 2433 "default_image": { 2434 "url_1x": "https://static-cdn.jtvnw.net/default-1.png", 2435 "url_2x": "https://static-cdn.jtvnw.net/default-2.png", 2436 "url_4x": "https://static-cdn.jtvnw.net/default-4.png" 2437 } 2438 } 2439 } */ 2440 2441 } 2442 2443 public function eventsub_channel_points_custom_reward_remove() { 2444 $call_authentication = 'channel:read:redemptions'; // OR channel:manage:redemptions 2445 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2446 $method = 'POST'; 2447 $type = 'channel.channel_points_custom_reward.remove'; 2448 2449 /* 2450 Channel Points Custom Reward Remove Request Body 2451 Name Type Required? Description 2452 type string yes The subscription type name: channel.channel_points_custom_reward.remove. 2453 version string yes The subscription type version: 1. 2454 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive channel points custom reward remove notifications for. You can optionally pass in a reward ID to only receive notifications for a specific reward. 2455 transport transport yes Transport-specific parameters. 2456 Channel Points Custom Reward Remove Webhook Example 2457 { 2458 "type": "channel.channel_points_custom_reward.remove", 2459 "version": "1", 2460 "condition": { 2461 "broadcaster_user_id": "1337", 2462 "reward_id": "9001" // optional to only get notifications for a specific reward 2463 }, 2464 "transport": { 2465 "method": "webhook", 2466 "callback": "https://example.com/webhooks/callback", 2467 "secret": "s3cRe7" 2468 } 2469 } 2470 Channel Points Custom Reward Remove Notification Payload 2471 Name Type Description 2472 subscription subscription Subscription information. 2473 event event The event information. Contains data about the custom reward removed from the broadcasters channel. 2474 Channel Points Custom Reward Remove Notification Example 2475 { 2476 "subscription": { 2477 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2478 "type": "channel.channel_points_custom_reward.remove", 2479 "version": "1", 2480 "status": "enabled", 2481 "cost": 0, 2482 "condition": { 2483 "broadcaster_user_id": "1337", 2484 "reward_id": 12345 2485 }, 2486 "transport": { 2487 "method": "webhook", 2488 "callback": "https://example.com/webhooks/callback" 2489 }, 2490 "created_at": "2019-11-16T10:11:12.123Z" 2491 }, 2492 "event": { 2493 "id": "9001", 2494 "broadcaster_user_id": "1337", 2495 "broadcaster_user_login": "cool_user", 2496 "broadcaster_user_name": "Cool_User", 2497 "is_enabled": true, 2498 "is_paused": false, 2499 "is_in_stock": true, 2500 "title": "Cool Reward", 2501 "cost": 100, 2502 "prompt": "reward prompt", 2503 "is_user_input_required": true, 2504 "should_redemptions_skip_request_queue": false, 2505 "cooldown_expires_at": "2019-11-16T10:11:12.123Z", 2506 "redemptions_redeemed_current_stream": 123, 2507 "max_per_stream": { 2508 "is_enabled": true, 2509 "value": 1000 2510 }, 2511 "max_per_user_per_stream": { 2512 "is_enabled": true, 2513 "value": 1000 2514 }, 2515 "global_cooldown": { 2516 "is_enabled": true, 2517 "seconds": 1000 2518 }, 2519 "background_color": "#FA1ED2", 2520 "image": { 2521 "url_1x": "https://static-cdn.jtvnw.net/image-1.png", 2522 "url_2x": "https://static-cdn.jtvnw.net/image-2.png", 2523 "url_4x": "https://static-cdn.jtvnw.net/image-4.png" 2524 }, 2525 "default_image": { 2526 "url_1x": "https://static-cdn.jtvnw.net/default-1.png", 2527 "url_2x": "https://static-cdn.jtvnw.net/default-2.png", 2528 "url_4x": "https://static-cdn.jtvnw.net/default-4.png" 2529 } 2530 } 2531 } */ 2532 2533 2534 } 2535 2536 public function eventsub_channel_points_custom_reward_redemption_add() { 2537 $call_authentication = 'channel:read:redemptions'; // OR channel:manage:redemptions 2538 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2539 $method = 'POST'; 2540 $type = 'channel.channel_points_custom_reward_redemption.add'; 2541 2542 /* 2543 Channel Points Custom Reward Redemption Add Request Body 2544 Name Type Required? Description 2545 type string yes The subscription type name: channel.channel_points_custom_reward_redemption.add. 2546 version string yes The subscription type version: 1. 2547 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive channel points custom reward redemption notifications for. You can optionally pass in a reward id to only receive notifications for a specific reward. 2548 transport transport yes Transport-specific parameters. 2549 Channel Points Custom Reward Redemption Add Webhook Example 2550 { 2551 "type": "channel.channel_points_custom_reward_redemption.add", 2552 "version": "1", 2553 "condition": { 2554 "broadcaster_user_id": "1337", 2555 "reward_id": "9001" // optional to only get notifications for a specific reward 2556 }, 2557 "transport": { 2558 "method": "webhook", 2559 "callback": "https://example.com/webhooks/callback", 2560 "secret": "s3cRe7" 2561 } 2562 } 2563 Channel Points Custom Reward Redemption Add Notification Payload 2564 Name Type Description 2565 subscription subscription Subscription information. 2566 event event The event information. Contains data about the redemption of the custom reward on the broadcasters channel. 2567 Channel Points Custom Reward Redemption Add Notification Example 2568 { 2569 "subscription": { 2570 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2571 "type": "channel.channel_points_custom_reward_redemption.add", 2572 "version": "1", 2573 "status": "enabled", 2574 "cost": 0, 2575 "condition": { 2576 "broadcaster_user_id": "1337" 2577 }, 2578 "transport": { 2579 "method": "webhook", 2580 "callback": "https://example.com/webhooks/callback" 2581 }, 2582 "created_at": "2019-11-16T10:11:12.123Z" 2583 }, 2584 "event": { 2585 "id": "1234", 2586 "broadcaster_user_id": "1337", 2587 "broadcaster_user_login": "cool_user", 2588 "broadcaster_user_name": "Cool_User", 2589 "user_id": "9001", 2590 "user_login": "cooler_user", 2591 "user_name": "Cooler_User", 2592 "user_input": "pogchamp", 2593 "status": "unfulfilled", 2594 "reward": { 2595 "id": "9001", 2596 "title": "title", 2597 "cost": 100, 2598 "prompt": "reward prompt" 2599 }, 2600 "redeemed_at": "2020-07-15T17:16:03.17106713Z" 2601 } 2602 } */ 2603 2604 } 2605 2606 public function eventsub_channel_points_custom_reward_redemption_update() { 2607 $call_authentication = 'channel:read:redemptions'; // OR channel:manage:redemptions 2608 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2609 $method = 'POST'; 2610 $type = 'channel.channel_points_custom_reward_redemption.update'; 2611 /* 2612 2613 Channel Points Custom Reward Redemption Update Request Body 2614 Name Type Required? Description 2615 type string yes The subscription type name: channel.channel_points_custom_reward_redemption.update. 2616 version string yes The subscription type version: 1. 2617 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive channel points custom reward redemption update notifications for. You can optionally pass in a reward id to only receive notifications for a specific reward. 2618 transport transport yes Transport-specific parameters. 2619 Channel Points Custom Reward Redemption Update Webhook Example 2620 { 2621 "type": "channel.channel_points_custom_reward_redemption.update", 2622 "version": "1", 2623 "condition": { 2624 "broadcaster_user_id": "1337", 2625 "reward_id": "9001" // optional to only get notifications for a specific reward 2626 }, 2627 "transport": { 2628 "method": "webhook", 2629 "callback": "https://example.com/webhooks/callback", 2630 "secret": "s3cRe7" 2631 } 2632 } 2633 Channel Points Custom Reward Redemption Update Notification Payload 2634 Name Type Description 2635 subscription subscription Subscription information. 2636 event event The event information. Contains data about the custom reward redemption update from the broadcasters channel. 2637 Channel Points Custom Reward Redemption Update Notification Example 2638 { 2639 "subscription": { 2640 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2641 "type": "channel.channel_points_custom_reward_redemption.update", 2642 "version": "1", 2643 "status": "enabled", 2644 "cost": 0, 2645 "condition": { 2646 "broadcaster_user_id": "1337" 2647 }, 2648 "transport": { 2649 "method": "webhook", 2650 "callback": "https://example.com/webhooks/callback" 2651 }, 2652 "created_at": "2019-11-16T10:11:12.123Z" 2653 }, 2654 "event": { 2655 "id": "1234", 2656 "broadcaster_user_id": "1337", 2657 "broadcaster_user_login": "cool_user", 2658 "broadcaster_user_name": "Cool_User", 2659 "user_id": "9001", 2660 "user_login": "cooler_user", 2661 "user_name": "Cooler_User", 2662 "user_input": "pogchamp", 2663 "status": "fulfilled", // Either fulfilled or cancelled 2664 "reward": { 2665 "id": "9001", 2666 "title": "title", 2667 "cost": 100, 2668 "prompt": "reward prompt" 2669 }, 2670 "redeemed_at": "2020-07-15T17:16:03.17106713Z" 2671 } 2672 } */ 2673 2674 } 2675 2676 public function eventsub_hype_train_begin() { 2677 $call_authentication = 'channel:read:hype_train'; 2678 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2679 $method = 'POST'; 2680 $type = 'channel.hype_train.begin'; 2681 2682 /* 2683 Channel Hype Train Begin Request Body 2684 Name Type Required? Description 2685 type string yes The subscription type name: channel.hype_train.begin. 2686 version string yes The subscription type version: 1. 2687 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to hype train begin notifications for. 2688 transport transport yes Transport-specific parameters. 2689 Channel Hype Train Begin Webhook Example 2690 { 2691 "type": "channel.hype_train.begin", 2692 "version": "1", 2693 "condition": { 2694 "broadcaster_user_id": "1337" 2695 }, 2696 "transport": { 2697 "method": "webhook", 2698 "callback": "https://example.com/webhooks/callback", 2699 "secret": "s3cRe7" 2700 } 2701 } 2702 Channel Hype Train Begin Notification Payload 2703 Name Type Description 2704 subscription subscription Subscription information. 2705 event event Event information. Contains hype train information like the level, goal, top contributors, start time, and expiration time. 2706 Channel Hype Train Notification Example 2707 { 2708 "subscription": { 2709 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2710 "type": "channel.hype_train.begin", 2711 "version": "1", 2712 "status": "enabled", 2713 "cost": 0, 2714 "condition": { 2715 "broadcaster_user_id": "1337" 2716 }, 2717 "transport": { 2718 "method": "webhook", 2719 "callback": "https://example.com/webhooks/callback" 2720 }, 2721 "created_at": "2019-11-16T10:11:12.123Z" 2722 }, 2723 "event": { 2724 "broadcaster_user_id": "1337", 2725 "broadcaster_user_login": "cool_user", 2726 "broadcaster_user_name": "Cool_User", 2727 "total": 137, 2728 "progress": 137, 2729 "goal": 500, 2730 "top_contributions": [ 2731 { "user_id": "123", "user_login": "pogchamp", "user_name": "PogChamp", "type": "bits", "total": 50 }, 2732 { "user_id": "456", "user_login": "kappa", "user_name": "Kappa", "type": "subscription", "total": 45 } 2733 ], 2734 "last_contribution": { "user_id": "123", "user_login": "pogchamp", "user_name": "PogChamp", "type": "bits", "total": 50 }, 2735 "started_at": "2020-07-15T17:16:03.17106713Z", 2736 "expires_at": "2020-07-15T17:16:11.17106713Z" 2737 } 2738 } */ 2739 } 2740 2741 public function eventsub_hype_train_progress() { 2742 $call_authentication = 'channel:read:hype_train'; 2743 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2744 $method = 'POST'; 2745 $type = 'channel.hype_train.progress'; 2746 2747 /* 2748 Channel Hype Train Progress Request Body 2749 Name Type Required? Description 2750 type string yes The subscription type name: channel.hype_train.progress. 2751 version string yes The subscription type version: 1. 2752 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to hype train progress notifications for. 2753 transport transport yes Transport-specific parameters. 2754 Channel Hype Train Progress Webhook Example 2755 { 2756 "type": "channel.hype_train.progress", 2757 "version": "1", 2758 "condition": { 2759 "broadcaster_user_id": "1337" 2760 }, 2761 "transport": { 2762 "method": "webhook", 2763 "callback": "https://example.com/webhooks/callback", 2764 "secret": "s3cRe7" 2765 } 2766 } 2767 Channel Hype Train Progress Notification Payload 2768 Name Type Description 2769 subscription subscription Subscription information. 2770 event event Event information. Contains hype train information like the level, goal, top contributors, last contribution, start time, and expiration time. 2771 Channel Hype Train Progress Notification Example 2772 { 2773 "subscription": { 2774 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2775 "type": "channel.hype_train.progress", 2776 "version": "1", 2777 "status": "enabled", 2778 "cost": 0, 2779 "condition": { 2780 "broadcaster_user_id": "1337" 2781 }, 2782 "transport": { 2783 "method": "webhook", 2784 "callback": "https://example.com/webhooks/callback" 2785 }, 2786 "created_at": "2019-11-16T10:11:12.123Z" 2787 }, 2788 "event": { 2789 "broadcaster_user_id": "1337", 2790 "broadcaster_user_login": "cool_user", 2791 "broadcaster_user_name": "Cool_User", 2792 "level": 2, 2793 "total": 700, 2794 "progress": 200, 2795 "goal": 1000, 2796 "top_contributions": [ 2797 { "user_id": "123", "user_login": "pogchamp", "user_name": "PogChamp", "type": "bits", "total": 50 }, 2798 { "user_id": "456", "user_login": "kappa", "user_name": "Kappa", "type": "subscription", "total": 45 } 2799 ], 2800 "last_contribution": { "user_id": "123", "user_login": "pogchamp", "user_name": "PogChamp", "type": "bits", "total": 50 }, 2801 "started_at": "2020-07-15T17:16:03.17106713Z", 2802 "expires_at": "2020-07-15T17:16:11.17106713Z" 2803 } 2804 } */ 2805 2806 } 2807 2808 public function eventsub_hype_train_end() { 2809 $call_authentication = 'channel:read:hype_train'; 2810 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2811 $method = 'POST'; 2812 $type = 'channel.hype_train.end'; 2813 2814 2815 /* 2816 Channel Hype Train End Request Body 2817 Name Type Required? Description 2818 type string yes The subscription type name: channel.hype_train.end. 2819 version string yes The subscription type version: 1. 2820 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to hype train end notifications for. 2821 transport transport yes Transport-specific parameters. 2822 Channel Hype Train End Webhook Example 2823 { 2824 "type": "channel.hype_train.end", 2825 "version": "1", 2826 "condition": { 2827 "broadcaster_user_id": "1337" 2828 }, 2829 "transport": { 2830 "method": "webhook", 2831 "callback": "https://example.com/webhooks/callback", 2832 "secret": "s3cRe7" 2833 } 2834 } 2835 Channel Hype Train End Notification Payload 2836 Name Type Description 2837 subscription subscription Subscription information. 2838 event event Event information. Contains hype train information like the level, top contributors, start time, end time, and cooldown end time. 2839 Channel Hype Train End Notification Example 2840 { 2841 "subscription": { 2842 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2843 "type": "channel.hype_train.end", 2844 "version": "1", 2845 "status": "enabled", 2846 "cost": 0, 2847 "condition": { 2848 "broadcaster_user_id": "1337" 2849 }, 2850 "transport": { 2851 "method": "webhook", 2852 "callback": "https://example.com/webhooks/callback" 2853 }, 2854 "created_at": "2019-11-16T10:11:12.123Z" 2855 }, 2856 "event": { 2857 "broadcaster_user_id": "1337", 2858 "broadcaster_user_login": "cool_user", 2859 "broadcaster_user_name": "Cool_User", 2860 "level": 2, 2861 "total": 137, 2862 "top_contributions": [ 2863 { "user_id": "123", "user_login": "pogchamp", "user_name": "PogChamp", "type": "bits", "total": 50 }, 2864 { "user_id": "456", "user_login": "kappa", "user_name": "Kappa", "type": "subscription", "total": 45 } 2865 ], 2866 "started_at": "2020-07-15T17:16:03.17106713Z", 2867 "ended_at": "2020-07-15T17:16:11.17106713Z", 2868 "cooldown_ends_at": "2020-07-15T18:16:11.17106713Z" 2869 } 2870 } */ 2871 2872 } 2873 2874 public function eventsub_stream_online() { 2875 $call_authentication = 'none'; 2876 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2877 $method = 'POST'; 2878 $type = 'stream.online'; 2879 2880 2881 /* 2882 Stream Online Request Body 2883 Name Type Required? Description 2884 type string yes The subscription type name: stream.online. 2885 version string yes The subscription type version: 1. 2886 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to get updates for. 2887 transport transport yes Transport-specific parameters. 2888 Stream Online Webhook Example 2889 { 2890 "type": "stream.online", 2891 "version": "1", 2892 "condition": { 2893 "broadcaster_user_id": "1337" 2894 }, 2895 "transport": { 2896 "method": "webhook", 2897 "callback": "https://example.com/webhooks/callback", 2898 "secret": "s3cRe7" 2899 } 2900 } 2901 Stream Online Notification Payload 2902 Name Type Description 2903 subscription subscription Subscription information. 2904 event event Event information. Contains the stream ID, broadcaster user ID, broadcaster user name, and the stream type. 2905 Stream Online Notification Example 2906 { 2907 "subscription": { 2908 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2909 "type": "stream.online", 2910 "version": "1", 2911 "status": "enabled", 2912 "cost": 0, 2913 "condition": { 2914 "broadcaster_user_id": "1337" 2915 }, 2916 "transport": { 2917 "method": "webhook", 2918 "callback": "https://example.com/webhooks/callback" 2919 }, 2920 "created_at": "2019-11-16T10:11:12.123Z" 2921 }, 2922 "event": { 2923 "id": "9001", 2924 "broadcaster_user_id": "1337", 2925 "broadcaster_user_login": "cool_user", 2926 "broadcaster_user_name": "Cool_User", 2927 "type": "live", 2928 "started_at": "2020-10-11T10:11:12.123Z" 2929 } 2930 } */ 2931 2932 2933 } 2934 2935 public function eventsub_stream_offline() { 2936 $call_authentication = 'none'; 2937 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2938 $method = 'POST'; 2939 $type = 'stream.offline'; 2940 2941 /* 2942 Stream Offline Request Body 2943 Name Type Required? Description 2944 type string yes The subscription type name: stream.offline. 2945 version string yes The subscription type version: 1. 2946 condition condition yes Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to get updates for. 2947 transport transport yes Transport-specific parameters. 2948 Stream Offline Webhook Example 2949 { 2950 "type": "stream.offline", 2951 "version": "1", 2952 "condition": { 2953 "broadcaster_user_id": "1337" 2954 }, 2955 "transport": { 2956 "method": "webhook", 2957 "callback": "https://example.com/webhooks/callback", 2958 "secret": "s3cRe7" 2959 } 2960 } 2961 Stream Offline Notification Payload 2962 Name Type Description 2963 subscription subscription Subscription information. 2964 event event Event information. Contains the broadcaster user ID and broadcaster user name. 2965 Stream Offline Notification Example 2966 { 2967 "subscription": { 2968 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 2969 "type": "stream.offline", 2970 "version": "1", 2971 "status": "enabled", 2972 "cost": 0, 2973 "condition": { 2974 "broadcaster_user_id": "1337" 2975 }, 2976 "created_at": "2019-11-16T10:11:12.123Z", 2977 "transport": { 2978 "method": "webhook", 2979 "callback": "https://example.com/webhooks/callback" 2980 } 2981 }, 2982 "event": { 2983 "broadcaster_user_id": "1337", 2984 "broadcaster_user_login": "cool_user", 2985 "broadcaster_user_name": "Cool_User" 2986 } 2987 } */ 2988 } 2989 2990 public function eventsub_user_authorization_revoke() { 2991 $call_authentication = 'none'; // Provided client_id must match the client id in the application access token. 2992 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 2993 $method = 'POST'; 2994 $type = 'user.authorization.revoke'; 2995 2996 2997 /* 2998 User Authorization Revoke Request Body 2999 Name Type Required? Description 3000 type string yes The subscription type name: user.authorization.revoke. 3001 version string yes The subscription type version: 1. 3002 condition condition yes Subscription-specific parameters. Pass in the client ID of the application you want to get user authorization revoke notifications for. 3003 transport transport yes Transport-specific parameters. 3004 User Authorization Revoke Webhook Example 3005 { 3006 "type": "user.authorization.revoke", 3007 "version": "1", 3008 "condition": { 3009 "client_id": "1337" 3010 }, 3011 "transport": { 3012 "method": "webhook", 3013 "callback": "https://example.com/webhooks/callback", 3014 "secret": "s3cRe7" 3015 } 3016 } 3017 User Authorization Revoke Notification Payload 3018 Name Type Description 3019 subscription subscription Subscription information. 3020 event event Event information. Contains your applications client ID and the user ID of the user who revoked authorization for your application. 3021 User Authorization Revoke Notification Example 3022 { 3023 "subscription": { 3024 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 3025 "type": "user.authorization.revoke", 3026 "version": "1", 3027 "status": "enabled", 3028 "cost": 0, 3029 "condition": { 3030 "client_id": "crq72vsaoijkc83xx42hz6i37" 3031 }, 3032 "transport": { 3033 "method": "webhook", 3034 "callback": "https://example.com/webhooks/callback" 3035 }, 3036 "created_at": "2019-11-16T10:11:12.123Z" 3037 }, 3038 "event": { 3039 "client_id": "crq72vsaoijkc83xx42hz6i37", 3040 "user_id": "1337", 3041 "user_login": "cool_user", // Null if the user no longer exists 3042 "user_name": "Cool_User" // Null if the user no longer exists 3043 } 3044 } */ 3045 } 3046 3047 public function eventsub_user_update() { 3048 $call_authentication = 'none'; // When using user:read:email scope, the notification will include email field. 3049 $endpoint = 'https://api.twitch.tv/helix/eventsub/subscriptions'; 3050 $method = 'POST'; 3051 $type = 'user.update'; 3052 3053 3054 3055 /* 3056 User Update Request Body 3057 Name Type Required? Description 3058 type string yes The subscription type name: user.update. 3059 version string yes The subscription type version: 1. 3060 condition condition yes Subscription-specific parameters. Pass in the user ID for the user you want update notifications for. 3061 transport transport yes Transport-specific parameters. 3062 User Update Webhook Example 3063 { 3064 "type": "user.update", 3065 "version": "1", 3066 "condition": { 3067 "user_id": "1337" 3068 }, 3069 "transport": { 3070 "method": "webhook", 3071 "callback": "https://example.com/webhooks/callback", 3072 "secret": "s3cRe7" 3073 } 3074 } 3075 User Update Notification Payload 3076 Name Type Description 3077 subscription subscription Subscription information. 3078 event event Event information. Contains the user ID, user name, and description. The users email is included if you have the user:read:emailscope for the user. 3079 User Update Notification Example 3080 { 3081 "subscription": { 3082 "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4", 3083 "type": "user.update", 3084 "version": "1", 3085 "status": "enabled", 3086 "cost": 0, 3087 "condition": { 3088 "user_id": "1337" 3089 }, 3090 "transport": { 3091 "method": "webhook", 3092 "callback": "https://example.com/webhooks/callback" 3093 }, 3094 "created_at": "2019-11-16T10:11:12.123Z" 3095 }, 3096 "event": { 3097 "user_id": "1337", 3098 "user_login": "cool_user", 3099 "user_name": "Cool_User", 3100 "email": "[email protected]", // Requires user:read:email scope 3101 "description": "cool description" 3102 } 3103 } 3104 */ 3105 } 1671 3106 } 1672 3107 -
twitchpress/trunk/install.php
r2488173 r2527323 58 58 $wpdb->twitchpress_activity = "{$wpdb->prefix}twitchpress_activity"; 59 59 $wpdb->twitchpress_errors = "{$wpdb->prefix}twitchpress_errors"; 60 $wpdb->twitchpress_outcomes = "{$wpdb->prefix}twitchpress_outcomes";61 60 $wpdb->twitchpress_endpoints = "{$wpdb->prefix}twitchpress_endpoints"; 62 61 $wpdb->twitchpress_meta = "{$wpdb->prefix}twitchpress_meta"; -
twitchpress/trunk/loader.php
r2494470 r2527323 169 169 */ 170 170 public function includes() { 171 171 172 172 do_action( 'before_twitchpress_includes' ); 173 173 … … 186 186 require_once( plugin_basename( 'includes/classes/class.twitchpress-set-main-channel-auth.php' ) ); 187 187 //require_once( plugin_basename( 'includes/classes/class.twitchpress-set-bot-channel-auth.php' ) ); 188 189 // Systems... 190 require_once( plugin_basename( 'systems/giveaways/class.twitchpress-giveaways.php' ) ); 191 //require_once( plugin_basename( 'systems/subscribers/class.twitchpress-subscribers.php' ) ); 192 188 193 189 // More classes... 190 require_once( plugin_basename( 'systems/giveaways/class.twitchpress-giveaways.php' ) ); 191 require_once( 'includes/admin/class.twitchpress-admin-notices.php' ); 194 192 require_once( 'includes/classes/class.twitchpress-current-user.php' ); 195 193 require_once( 'includes/classes/class.twitchpress-posts-gate.php' ); … … 211 209 require_once( plugin_basename( 'requests.php' ) ); 212 210 require_once( 'includes/classes/class.twitchpress-listener-main-account-oauth.php' ); 213 require_once( 'includes/libraries/twitch/helix/class.twitch-webhooks.php' );214 211 require_once( plugin_basename( 'includes/classes/class.twitchpress-public-preset-notices.php' ) ); 215 212 require_once( 'includes/classes/class.twitchpress-custom-login-notices.php' ); 216 213 require_once( 'includes/posts/class.twitchpress-page-template-splitscreen.php' ); 217 214 218 // Include main class...215 // Include main API (all-api) class... 219 216 include_once( 'includes/libraries/allapi/class.all-api.php' ); 220 217 221 // Discord 218 // Discord Integration 222 219 include_once( 'includes/libraries/allapi/discord/class.api-discord.php' ); 223 220 include_once( 'includes/libraries/allapi/discord/class.api-discord-listener.php' ); 224 221 225 // Streamlabs 222 // Streamlabs Integration 226 223 include_once( 'includes/libraries/allapi/streamlabs/functions.api-streamlabs.php' ); 227 224 include_once( 'includes/libraries/allapi/streamlabs/class.api-streamlabs.php' ); 228 225 include_once( 'includes/libraries/allapi/streamlabs/class.api-streamlabs-listener.php' ); 229 226 230 // YouTube 227 // YouTube Integration 231 228 include_once( 'includes/libraries/allapi/youtube/functions.api-youtube.php' ); 232 229 … … 251 248 * or at all times by extensions. 252 249 * 253 * @version 1.0250 * @version 2.0 254 251 */ 255 252 private function load_core_objects() { 256 253 // Objects not required... 257 254 TwitchPress_Current_User_Setter::init(); /*adds values to $current_user*/ 258 255 259 256 // Create objects core objects... 260 257 if( class_exists( 'BugNet' ) ){ $this->bugnet = new BugNet(); } … … 264 261 $this->login = new TwitchPress_Login(); 265 262 $this->login_sc = new TwitchPress_Login_by_Shortcode(); 266 $this->gate = new TwitchPress_Posts_Gate(); 267 // See init_system() after adding new line... 263 $this->gate = new TwitchPress_Posts_Gate(); 264 $this->admin_notices = new TwitchPress_Admin_Notices(); 265 266 # Hint: Go to function init_system() after adding new line here... 268 267 } 269 268 … … 346 345 public function init_system() { 347 346 348 // Before init action. 347 // Before init action... 349 348 do_action( 'before_twitchpress_init' ); 350 349 … … 358 357 $this->login_sc->init(); 359 358 $this->gate->init(); 359 $this->admin_notices->init(); 360 361 if( isset( $this->webhooks ) ) { $this->webhooks->init(); } 360 362 361 363 // Collect required scopes from extensions and establish system requirements. … … 380 382 add_filter( 'plugin_row_meta', 'twitchpress_plugin_row_meta', 10, 2 ); 381 383 382 $this->post_types(); 384 // Load the various systems, includes custom post types within those systems... 385 $this->load_systems(); 383 386 384 387 // Init action. … … 387 390 388 391 /** 389 * Register custom post types and their taxonomies...390 * 391 * @version 2. 0392 */ 393 public function post_types() {392 * Load systems, including registration of custom post types... 393 * 394 * @version 2.1 395 */ 396 public function load_systems() { 394 397 395 398 // Channels - Core … … 407 410 require_once( 'includes/posts/class.twitchpress-post-type-perks.php' ); 408 411 TwitchPress_Post_Type_Perks::init(); 412 } 413 414 // Webhooks System 415 if( get_option( 'twitchpress_webhooks_switch' ) == 'yes' ) { 416 417 // Set the callback URL sent to Twitch.tv when subscribing to a webhook... 418 $url = admin_url( 'admin-post.php?webhook=twitchpress_eventsub_notification' ); 419 if( !defined( 'TWITCHPRESS_WEBHOOK_CALLBACK' ) ) { define( 'TWITCHPRESS_WEBHOOK_CALLBACK', $url ); } 420 unset( $url ); 421 422 require_once( 'includes/posts/class.twitchpress-post-type-webhooks.php' ); 423 require_once( plugin_basename( 'systems/webhooks/class.twitchpress-webhooks-cache.php' ) ); 424 require_once( plugin_basename( 'systems/webhooks/class.twitchpress-webhooks-event-processing.php' ) ); 425 426 // Initiate the custom post-type... 427 TwitchPress_Post_Type_Webhooks::init(); 428 429 // Hook into init for single site, priority 0 = highest priority... 430 add_action( 'init', 'twitchpress_integrate_wpdb_webhooksmeta', 0); 431 432 // Hook in to switch blog to support multisite... 433 add_action( 'switch_blog', 'twitchpress_integrate_wpdb_webhooksmeta', 0 ); 434 435 // Listen for Twitch.tv EventSub webhook notifications and store them in cache for processing later... 436 add_action( 'admin_post_nopriv', 'twitchpress_webhooks_eventsub_listener', 1, 0 ); 437 438 // Background processing of webhook notifications that have been stored in cache... 439 add_action( 'init', array( new TwitchPress_Webhooks_Event_Processing(), 'process_handler' ) ); 409 440 } 410 441 } -
twitchpress/trunk/pro/shortcodes/channellist/twitchpress-shortcode-channellist.css
r2488173 r2527323 42 42 43 43 .col-lg { 44 width: calc(100% -80px);44 width: calc(100%-80px); 45 45 } 46 46 -
twitchpress/trunk/pro/shortcodes/channellist/twitchpress-shortcode-channellist.php
r2494470 r2527323 33 33 $twitch_api = new TwitchPress_Twitch_API(); 34 34 switch ( $this->atts['type'] ) { 35 case 'team': # HELIX DOES NOT SUPPORT A TEAM ENDPOINT - LAST CHECKED MARCH 202135 case 'team': 36 36 return false; 37 37 break; -
twitchpress/trunk/readme.txt
r2496316 r2527323 6 6 Tags: Twitch, Twitch.tv, Twitch Channel, Twitch Embed, Twitch Stream, Twitch API, TwitchPress 7 7 Requires at least: 5.4 8 Tested up to: 5. 69 Stable tag: 3.1 2.08 Tested up to: 5.7 9 Stable tag: 3.13.0 10 10 Requires PHP: 5.6 11 11 … … 102 102 == Changelog == 103 103 104 = 3.12.0 UPGRADE Released ??? = 104 = 3.13.0 UPGRADE Released 6th May 2021 = 105 * New Features 106 - Can now enter the main team name and the teams Twitch ID is obtained automatically 107 * Feature Changes 108 - Webhooks option added to System switches in General Settings 109 - Added a Content Gate checkbox for switching content gating on/off as a system 110 - New options added to Edit Webhooks view for webhook type and the desirned action in WordPress 111 * Faults Resolved 112 - PHP object as array error in function validate_user_token() avoided but the cause still to be determined. 113 - Uninstallation - fixed issue with removal of admin users meta data 114 * Technical Notes 115 - Removed Quick-Tool for installing Pro edition (pro was merged into the free download) 116 - Removed description values from hidden fields in installation setts for BugNet 117 - Created option twitchpress_gate_switch which now defines content gating as a system 118 - Now that Twitch API Helix (version 6) is in full use, error logging needs to be better integrated 119 - Removed API column from the Data view API Activity as the database table also had it removed 120 - Further improvements made to API logging 121 - File class.twitchpress-admin-notices.php is no longer loaded in class.twitchpress-admin.php because... 122 - ...the class is being used in function twitchpress_user_sub_sync_single() which is used during login 123 - ...it is now loaded in loader.php 124 - Removed twitchpress_is_sync_due() from UM functions because it's use is vague and potentially preventing UM roles to be set 125 - Added json_encode() for body value in class.twitchpress-curl.php (json_encode( $this->curl_request_body )) 126 - Contents of class.twitch-webhooks.php moved and the file deleted 127 * Configuration Advice 128 - Manually setup webhooks for Twitch subs to test the new webhooks system which includes a custom post type 129 * Database Changes 130 - Added log entry "life" column to API activity table 131 132 = 3.12.0 UPGRADE Released 15th March 2021 = 105 133 * New Features 106 134 - BuddyPress Avatar Over-ride 107 135 * Feature Changes 108 - None136 - Uninstallation removes BugNet options data 109 137 * Faults Resolved 110 138 - None … … 332 360 333 361 == Contributors == 334 Donators, GitHub contributors and developers who support me when working on TwitchPress will be listed here.362 List of developers and people who have supported development in a technical way... 335 363 336 364 * nookyyy - A popular Twitch.tv streamer who done half of the testing. -
twitchpress/trunk/shortcodes.php
r2494470 r2527323 27 27 function twitchpress_shortcode_init( $atts, $content = null ) { 28 28 global $post; 29 29 30 30 // Apply defaults to all shortcodes (a standard accross the entire site) 31 31 // Can trigger very different output if changed after page publication... … … 67 67 'scope' => '', 68 68 ), $atts, 'twitchpress_shortcodes_advanced_' . $atts['shortcode'] ); 69 69 70 70 // Caching will be disabled for $content wrapping shortcodes... 71 71 if( $content ) { $atts['cache'] = true; } 72 72 73 73 // Reduce cache time for admin to make site building easier... 74 74 if( current_user_can('administrator') ) { 75 75 $atts['cacheexpiry'] = 30; 76 76 } 77 77 78 78 // Complete the name of requested shortcode method... 79 79 $function_name = 'twitchpress_shortcode_' . $atts['shortcode']; 80 80 81 81 // Establish channel ID when only the channel name has been provided... 82 82 if( isset( $atts['channel_name'] ) && !isset( $atts['channel_id'] ) ) { … … 87 87 // Output buffer is required for this design... 88 88 ob_start(); 89 89 90 90 // Return if cached HTML found... 91 91 $cache_name = 'twitchpress_shortcode_' . $atts['shortcode'] . '_' . $post->ID; … … 923 923 * @version 1.0 924 924 */ 925 function twitchpress_shortcode_channel_list( $atts ) { 925 function twitchpress_shortcode_channel_list( $atts ) { 926 926 require_once( TWITCHPRESS_PRO_DIR_PATH . 'shortcodes/channellist/twitchpress-shortcode-channellist.php' ); 927 $shortcode_object = new TwitchPress_Shortcode_Channel_List(); 927 $shortcode_object = new TwitchPress_Shortcode_Channel_List(); 928 928 $shortcode_object->atts = $atts; 929 $shortcode_object->init(); 930 return $shortcode_object->output(); 929 $shortcode_object->init(); 930 return $shortcode_object->output(); 931 931 } 932 932 -
twitchpress/trunk/twitchpress.php
r2496316 r2527323 5 5 * Github URI: https://github.com/RyanBayne/TwitchPress 6 6 * Description: Add the power of Twitch.tv to WordPress 7 * Version: 3.1 2.07 * Version: 3.13.0 8 8 * Author: Ryan Bayne 9 9 * Author URI: https://ryanbayne.wordpress.com/ 10 10 * Requires at least: 5.4 11 * Tested up to: 5. 611 * Tested up to: 5.7 12 12 * License: GPL3 13 13 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 15 15 */ 16 16 17 const TWITCHPRESS_VERSION = '3.1 2.0';17 const TWITCHPRESS_VERSION = '3.13.0'; 18 18 19 19 // Exit if accessed directly. -
twitchpress/trunk/uninstall.php
r2496316 r2527323 32 32 * @version 2.0 33 33 */ 34 function twitchpress_remove_options() { 35 36 /* Add this approach when working on uninstallation and improving cleanup... 37 // Include settings so that we can run through defaults 38 include_once( TWITCHPRESS_PLUGIN_DIR_PATH . 'includes/admin/class.twitchpress-admin-settings.php' ); 39 $settings = TwitchPress_Admin_Settings::get_settings_pages(); 40 41 foreach ( $settings as $section ) { 42 if ( !method_exists( $section, 'get_settings' ) ) { 43 continue; 44 } 45 46 $subsections = array_unique( array_merge( array( '' ), array_keys( $section->get_sections() ) ) ); 47 48 foreach ( $subsections as $subsection ) { 49 foreach ( $section->get_settings( $subsection ) as $value ) { 50 if ( isset( $value['default'] ) && isset( $value['id'] ) ) { 51 $autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true; 52 add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) ); 53 } 54 } 55 } 56 } */ 57 34 function twitchpress_remove_options() { 58 35 delete_option( 'twitchpress_admin_notices' ); 59 36 delete_option( 'twitchpress_admin_notice_missingvaluesofferwizard' ); … … 130 107 delete_option( 'twitchpress_visitor_scope_viewing_activity_read' ); 131 108 delete_option( 'twitchpress_buddypress_avatars_override' ); 132 109 delete_option( 'twitchpress_twitchpress-embed-everything_settings' ); 110 delete_option( 'twitchpress_twitchpress-login-extension_settings' ); 111 delete_option( 'twitchpress_twitchpress-sync-extension_settings' ); 112 delete_option( 'twitchpress_twitchpress-um-extension_settings' ); 113 114 // BugNet 115 delete_option( 'bugnet_activate_events' ); 116 delete_option( 'bugnet_activate_log' ); 117 delete_option( 'bugnet_activate_tracing' ); 118 delete_option( 'bugnet_levelswitch_emergency' ); 119 delete_option( 'bugnet_levelswitch_alert' ); 120 delete_option( 'bugnet_levelswitch_critical' ); 121 delete_option( 'bugnet_levelswitch_error' ); 122 delete_option( 'bugnet_levelswitch_warning' ); 123 delete_option( 'bugnet_levelswitch_notice' ); 124 delete_option( 'bugnet_handlerswitch_email' ); 125 delete_option( 'bugnet_handlerswitch_logfiles' ); 126 delete_option( 'bugnet_handlerswitch_restapi' ); 127 delete_option( 'bugnet_handlerswitch_tracing' ); 128 delete_option( 'bugnet_handlerswitch_wpdb' ); 129 delete_option( 'bugnet_reportsswitch_dailysummary' ); 130 delete_option( 'bugnet_reportsswitch_eventsnapshot' ); 131 delete_option( 'bugnet_reportsswitch_tracecomplete' ); 132 delete_option( 'bugnet_systemlogging_switch' ); 133 delete_option( 'bugnet_error_dump_user_id' ); 134 133 135 // Deprecated 134 136 delete_option( 'twitchress_sandbox_mode_falsereturns_switch' ); … … 155 157 $activity = "{$wpdb->prefix}twitchpress_activity"; 156 158 $errors = "{$wpdb->prefix}twitchpress_errors"; 157 $outcomes = "{$wpdb->prefix}twitchpress_outcomes";158 159 $endpoints = "{$wpdb->prefix}twitchpress_endpoints"; 159 160 $meta = "{$wpdb->prefix}twitchpress_meta"; … … 161 162 $wpdb->query( "DROP TABLE IF EXISTS $activity" ); 162 163 $wpdb->query( "DROP TABLE IF EXISTS $errors" ); 163 $wpdb->query( "DROP TABLE IF EXISTS $outcomes" );164 164 $wpdb->query( "DROP TABLE IF EXISTS $endpoints" ); 165 165 $wpdb->query( "DROP TABLE IF EXISTS $meta" ); … … 186 186 */ 187 187 function twitchpress_remove_user_data() { 188 delete_user_meta( 'twitchpress_twitch_sub' );189 delete_user_meta( 'twitchpress_avatar_url' );190 delete_user_meta( 'twitchpress_twitch_logo_url' );191 delete_user_meta( 'twitchpress_twitch_logo_attachment_id' );192 delete_user_meta( 'twitchpress_code' );193 delete_user_meta( 'twitchpress_token' );194 delete_user_meta( 'twitchpress_twitch_id' );195 delete_user_meta( 'twitchpress_twitch_bot_id' );196 delete_user_meta( 'twitchpress_bot_code' );197 delete_user_meta( 'twitchpress_auth_time' );198 delete_user_meta( 'twitchpress_bot_token' );199 delete_user_meta( 'twitchpress_token_scope' );200 delete_user_meta( 'twitchpress_token_refresh' );201 delete_user_meta( 'twitchpress_bot_token_refresh' );202 delete_user_meta( 'twitchpress_twitch_expires_in' );203 delete_user_meta( 'twitchpress_sync_time' );204 delete_user_meta( 'twitchpress_twitch_bio' );205 delete_user_meta( 'twitchpress_twitch_email' );206 delete_user_meta( 'twitchpress_streamlabs_code' );207 delete_user_meta( 'twitchpress_streamlabs_access_token' );208 delete_user_meta( 'twitchpress_streamlabs_expires_in' );209 delete_user_meta( 'twitchpress_streamlabs_refresh_token' );210 delete_user_meta( 'twitchpress_streamlabs_scope' );188 delete_user_meta( 1, 'twitchpress_twitch_sub' ); 189 delete_user_meta( 1, 'twitchpress_avatar_url' ); 190 delete_user_meta( 1, 'twitchpress_twitch_logo_url' ); 191 delete_user_meta( 1, 'twitchpress_twitch_logo_attachment_id' ); 192 delete_user_meta( 1, 'twitchpress_code' ); 193 delete_user_meta( 1, 'twitchpress_token' ); 194 delete_user_meta( 1, 'twitchpress_twitch_id' ); 195 delete_user_meta( 1, 'twitchpress_twitch_bot_id' ); 196 delete_user_meta( 1, 'twitchpress_bot_code' ); 197 delete_user_meta( 1, 'twitchpress_auth_time' ); 198 delete_user_meta( 1, 'twitchpress_bot_token' ); 199 delete_user_meta( 1, 'twitchpress_token_scope' ); 200 delete_user_meta( 1, 'twitchpress_token_refresh' ); 201 delete_user_meta( 1, 'twitchpress_bot_token_refresh' ); 202 delete_user_meta( 1, 'twitchpress_twitch_expires_in' ); 203 delete_user_meta( 1, 'twitchpress_sync_time' ); 204 delete_user_meta( 1, 'twitchpress_twitch_bio' ); 205 delete_user_meta( 1, 'twitchpress_twitch_email' ); 206 delete_user_meta( 1, 'twitchpress_streamlabs_code' ); 207 delete_user_meta( 1, 'twitchpress_streamlabs_access_token' ); 208 delete_user_meta( 1, 'twitchpress_streamlabs_expires_in' ); 209 delete_user_meta( 1, 'twitchpress_streamlabs_refresh_token' ); 210 delete_user_meta( 1, 'twitchpress_streamlabs_scope' ); 211 211 } 212 212
Note: See TracChangeset
for help on using the changeset viewer.