Bitcoin and Altcoin Wallets: Exchange 2.3.3

shortcodes.php

Renders shortcodes for the trading UIs.

A wallets exchange shortcode begins with [wallets_exchange_ and can have a number of attributes.

The optional template attribute determines which template is rendered (the "specialized template part" in WordPress theme lingo). Therefore, [wallets_exchange_market] renders the template templates/wallets_exchange_market.php, while [wallets_exchange_market template="dropdown"] renders the template templates/market-dropdown.php`.

If an error occurs, such as insufficient capabilities, the UI may not render any templates, but instead only display an error message.

Error message strings are filterable via the wallets_ui_text_shortcode_error filter. e.g.

add_filter( 'wallets_ui_text_shortcode_error', function( $error_message ) { return '

UI cannot be shown!

'; }

Another attribute is user_id. The attributes user_id or user can be used to specify a user that's different than the current one. In such situations, the UI is "static", i.e. rendered once on the server side and not updated. On the other hand, if the UI displays data about the currently logged user, then the UI is "dynamic", i.e. it is rendered on the frontend after data is loaded via the WP-REST API.

Tags
since
2.0.0

Modernized to conform to wallets6. Templates now encapsulate associated CSS and JS code inline with the markup.

since
0.1.0-beta

Introduced

author

Alexandros Georgiou info@dashed-slug.net

Table of Contents

guard_exchange_user_shortcodes()  : mixed

Functions

guard_exchange_user_shortcodes()

guard_exchange_user_shortcodes([mixed $caps = ['has_wallets', 'trade_funds_in_wallet'] ]) : mixed
Parameters
$caps : mixed = ['has_wallets', 'trade_funds_in_wallet']
Return values
mixed

Search results