mycred_exchange

Codex / mycred/core / Shortcodes / mycred_exchange

Description

This shortcode allows your users to exchange one particular point type for another based on an exchange rate that you set for the shortcode. You can use the shortcode multiple times to allow exchanges between multiple types but exchanges can only be done in one direction per shortcode.

Available since version 1.5

Shortcode Attributes

Attribute Type Required Default Description
from string Yes - The point type to exchange from.
to string Yes - The point type to exchange to.
rate int or float Yes 1 The exchange rate between the two point types.
min int or float Yes 1 The minimum amount of points that must be exchanged.
button string No Exchange The form submit buttons label.

CSS Styling

// Wrapper
div.mycred-exchange { }

// The Table
div.mycred-exchange form table { }

Example

Example 1: Let users exchange the default point type to a custom point type at a rate of 1 for 1.

[mycred_exchange from="mycred_default" to="customkey"]
Exchange Shortcode

Last edited June 23, 2016