GithubHelp home page GithubHelp logo

ramsesdelr / twitch-conditional Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thatmitchcanter/twitch-conditional

0.0 0.0 0.0 447 KB

A WordPress plugin that allows a user to conditionally load content based on whether or not a twitch streamer is broadcasting live.

PHP 100.00%

twitch-conditional's Introduction

Twitch Conditional

A WordPress plugin that allows a user to conditionally load content based on whether or not a Twitch streamer is broadcasting live.

About This Plugin

This plugin has a very simple task: to check Twitch to see if a streamer is broadcasting live (not hosting, actual broadcasting). Depending on whether or not the streamer is online, different parts of content can be displayed via shortcodes.

Shortcode Usage

[twitch_live user='username'] ... [/twitch_live]

This will show content if the streamer is live.

[twitch_offline user='username'] ... [/twitch_offline]

This will show content if the streamer is NOT live.

Client ID + Secret Key Update

Twitch now requires a Client ID AND Secret ID to be sent with all JSON requests through OAuth Authentication. That means everyone that tries to use this plugin needs to go to https://dev.twitch.tv/console/apps to generate a new 'Application'. Once you've done that and entered the keys (client and secret) into the plugin's options page, all of the requests will finally begin to work again.

Todo

  • Re-Do of template tag with more options.
  • Stream Details Available in Shortcodes or Template Tags (Title, Game, Viewers, Etc).
  • Default Content with designs (Cards, Banners, etc) to provide easier use of the plugin.

Changelog

1.0.0 - Initial Release

1.1.0 - Swapped file_get_contents for cURL, added API Key and Documentation.

1.2.0 - Swapped cURL calls for wp_remote_get. Added Shortcodes for [twitch_is_live] and [twitch_is_not_live]

2.0 - Updated for Twitch New Api. Renamed Shortcodes for [twitch_live] and [twitch_offline]. Removed Twitch Object Template Tag for revamping in future release.

twitch-conditional's People

Contributors

thatmitchcanter avatar sunkast avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.