Bitcoin and Altcoin Wallets 6.2.4

shortcodes.php

Renders shortcodes.

A wallets shortcode begins with [wallets_ 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_balance] renders the template templates/wallets_balance.php, while [wallets_balance template="list"] renders the template templates/wallets_balance-list.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

Templates now encapsulate associated CSS and JS code inline with the markup.

author

Alexandros Georgiou info@dashed-slug.net

phan-suppress

PhanTypePossiblyInvalidDimOffset

Table of Contents

DONOTCACHEPAGE  = true
TRANSACTIONS_COLS  = ['type', 'tags', 'time', 'currency', 'amount', 'fee', 'address', 'txid', 'comment', 'status', 'user_confirm']
The possible values for the `columns` attribute for the `wallets_transactions` shortcode.
do_not_cache_page()  : mixed
Force caching plugins to not cache the current page.

Constants

DONOTCACHEPAGE

public mixed DONOTCACHEPAGE = true

TRANSACTIONS_COLS

The possible values for the `columns` attribute for the `wallets_transactions` shortcode.

public mixed TRANSACTIONS_COLS = ['type', 'tags', 'time', 'currency', 'amount', 'fee', 'address', 'txid', 'comment', 'status', 'user_confirm']
Tags
see
shortcode_wallets_transactions()

Functions

do_not_cache_page()

Force caching plugins to not cache the current page.

do_not_cache_page() : mixed

This works by setting the DONOTCACHEPAGE constant. The constant is respected by W3 Total Cache, WP Super Cache, and possibly other plugins.

Tags
throws
Exception

If the DONOTCACHEPAGE constant is already set to a falsy value.

Return values
mixed

Search results