mycred_hook_table

Codex / mycred/core / Shortcodes / mycred_hook_table

Description

This shortcode will generate a table where all enabled hooks for a particular point type is listed. You can use this to show how your users can earn points based on how you setup your hooks.

Available since version 1.6

Shortcode Attributes

Attribute Type Required Default Description
type string No mycred_default Option to filter hooks by point type. Should not be used if you only have one point type installed.
gains int No 1 Select to show either: ways a user can earn points (1) or ways a user can lose points (0).
user string No -user- Text to show for user related template tags since they can not be rendered here
post string No -post- Text to show for post related template tags since they can not be rendered here.
comment string No -comment- Text to show for comment related template tags since they can not be rendered here.
amount string No - Text to show for amount related template tags since they can not be rendered here.
nothing int No - Message to show when no active hooks were found for your setup.

CSS Styling

// The table
.mycred-hook-table { }

// Table columns
.mycred-hook-table .column-instance { }
.mycred-hook-table .column-amount { }
.mycred-hook-table .column-limit { }

Example

Example 1: Default usage.

[mycred_hook_table]

Last edited June 23, 2016