https://github.com/omiyagames/itchio-button
Wordpress plugin that adds the shortcode, [itchio-button].
https://github.com/omiyagames/itchio-button
omiya-games shortcode wordpress wordpress-plugin
Last synced: 2 months ago
JSON representation
Wordpress plugin that adds the shortcode, [itchio-button].
- Host: GitHub
- URL: https://github.com/omiyagames/itchio-button
- Owner: OmiyaGames
- License: gpl-2.0
- Created: 2020-02-08T03:30:57.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2021-01-25T00:50:42.000Z (over 5 years ago)
- Last Synced: 2025-11-18T14:32:58.636Z (8 months ago)
- Topics: omiya-games, shortcode, wordpress, wordpress-plugin
- Language: PHP
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Itch.io Button Shortcode
Generates a button to prompt the user whether they want to purchase a game on [Itch.io](https://itch.io) or not.
# Usage
Create a download button for the game, [*Air Flip Drive* by Omiya Games](https://omiyagames.itch.io/airflipdrive).
```
[itchio-button game="airflipdrive" user="omiyagames"]
```
Create a buy button for the game, [*Air Flip Drive* by Omiya Games](https://omiyagames.itch.io/airflipdrive).
```
[itchio-button game="airflipdrive" user="omiyagames" text="Buy Now"]
```
Create a download button for the game, [*Air Flip Drive* by Omiya Games](https://omiyagames.itch.io/airflipdrive), that's 1280 pixels wide, and 720 pixels tall.
```
[itchio-button game="airflipdrive" user="omiyagames" width="1280" height="720"]
```
# Options
The following options are supported:
## `game`
(string) (required) The name (slug) of the game. For example, if the URL of the game is "[`https://omiyagames.itch.io/airflipdrive`](https://omiyagames.itch.io/airflipdrive)," then fill this field with the string that comes after "`itch.io/`," i.e. "`airflipdrive`."
## `user`
(string) (required) The username (slug) of who the game belongs to. For example, if the URL of the game is "[`https://omiyagames.itch.io/airflipdrive`](https://omiyagames.itch.io/airflipdrive)," then fill this field with the string that comes in between "`https://`" and "`.itch.io/`," i.e. "`omiyagames`."
## `text`
(string) (optional) The text that'll appear on the button.
Default: "Download"
## `width`
(integer) (optional) The width of the pop-up that appears after clicking the download button, in pixels.
Default: 650
## `height`
(integer) (optional) The height of the pop-up that appears after clicking the download button, in pixels.
Default: 400
# Known Issues
- Only one button can be created per webpage (so be careful about adding this to a widget). The shortcode does not create a unique ID for each button.
# References
- [`Itch.attachBuyButton()`](https://itch.io/docs/api/javascript#reference/itchattachbuybuttonelement-options)