Skip to content

Layout

AmazonBlackIcon

URL pointing to a black amazon icon (in ASA 2 plugin directory).

Black amazon icon

AmazonLogoSmallUrl

URL pointing to a small version of an Amazon logo image (in ASA 2 plugin directory). Set option "Localized shop logos" to load Amazon logos with top level domains according to the product's country code.

Amazon logo small

AmazonLogoSmallWidth

The width of the small Amazon logo in pixels (80).

AmazonLogoSmallHeight

The height of the small Amazon logo in pixels (26).

AmazonLogoLargeUrl

URL pointing to a large version of an Amazon logo image (in ASA 2 plugin directory). Set option "Localized shop logos" to load Amazon logos with top level domains according to the product's country code.

Amazon logo

AmazonLogoLargeWidth

The width of the large Amazon logo in pixels (140).

AmazonLogoLargeHeight

The height of the large Amazon logo in pixels (48).

AmazonLogoSmall

A complete HTML img tag using {{ AmazonLogoSmallUrl }} as source.

AmazonLogoLarge

A complete HTML img tag using {{ AmazonLogoLargeUrl }} as source.

ContentUrl

Retrieves the URL to the content area for the current site with the appropriate protocol ('https' or 'http').

Uses WordPress function content_url.

is_mobile

True on all mobile devices, including smartphones and tablets.

text
{% if is_mobile %}
    // mobile layout goes here
{% else %}
    // desktop layout goes here
{% endif %}

is_mobile_not_tablet

True only on smartphones devices.

text
{% if is_mobile_not_tablet %}
    // smartphone layout goes here
{% else %}
    // all the other layout goes here
{% endif %}

is_tablet

True only on tablet devices.

text
{% if is_tablet %}
    // tablet layout goes here
{% else %}
    // desktop layout goes here
{% endif %}

The permalink of the current page, if applicable.

PluginsUrl

Retrieves the absolute URL to the plugins or mu-plugins directory (without the trailing slash).

Uses WordPress function plugins_url.

PrimePicUrl

URL pointing to a Amazon Prime icon image within the ASA 2 plugin directory.

PrimePic

A complete HTML img tag using {{ PrimePicUrl }} as source.

SiteUrl

Retrieves the site URL for the current site as defined in general settings.

Uses WordPress function  site_url.

StylesheetDirectoryUri

Retrieves the stylesheet directory URI for the current theme/child theme. Checks for SSL. Does not have trailing slash.

Uses WordPress function get_stylesheet_directory_uri.

text
<img src="{{ StylesheetDirectoryUri }}/subdir/of/my/theme/image.jpg">

TemplateDirectoryUri

Retrieves the template directory URI for the current theme (not the child theme!). Checks for SSL. Does not have trailing slash.

Uses WordPress function get_template_directory_uri.

text
<img src="{{ TemplateDirectoryUri }}/subdir/theme/image.jpg">

ThemeRootUri

Retrieves the URI for themes directory. Does not have trailing slash.

Uses WordPress function get_theme_root_uri.

ASA2 - The Amazon Affiliate Plugin for WordPress