Skip to content

Available Shortcodes

Yusuf Fauzan edited this page Dec 4, 2022 · 7 revisions

Global

authcred-login


Return the login link based on the given id parameter.

Arguments:

  • id = 0: login page ID

authcred-logout


Return the logout link.

Arguments:

  • goto = null: page ID or link redirect after being logout

authcred-user-icon


Return the user icon SVG.

Arguments:

  • size = 16: icon size

authcred-balance


Return the current logged-in points balance.

Arguments: None

Posts or Pages

authcred


Display form templates.

It has the following templates:

  • Register
  • Login
  • Forgot Password
  • Change Password

Arguments:

  • register_id = ''
  • login_id = ''
  • forgot_id = ''
  • type = '': accept register, login, forgot, and change
  • class = ''
  • goto = null: page ID or link redirect after form success

authcred-buy


A wrapper of the mycred_buy shortcode to display a single top up link button.

Arguments:

  • gateway = 'paypal-standard'
  • ctype = 'mycred_default'
  • amount = ''
  • cost = null
  • gift_to = ''
  • class = 'authcred-buy mycred-buy-link btn btn-primary btn-lg mt-4 no-underline text-black dark:text-white'
  • login = $mycredDefaultLoginMessage: show to non-logged-in user.
  • title = ''
  • btn_label => ''

authcred-buy-dynamic


Recreation of the mycred_buy_form shortcode to display a single top up dynamic amount input

Arguments:

  • gateway = 'paypal-standard'
  • ctype = 'mycred_default'
  • amount = ''
  • gift_to = ''
  • class = 'authcred-buy myCRED-buy-form mt-4 no-underline text-black dark:text-white'
  • login = $mycredDefaultLoginMessage: show to non-logged-in user.
  • title = ''
  • btn_label = ''
  • e_rate = ''

authcred-toc


Display a list of posts you want to do.

Arguments:

  • post_type = 'post'
  • post_status = array('publish', 'future')
  • category = 'uncategorized': Only use category or taxonomy, you can't use both.
  • taxonomy = null: Only use category or taxonomy, you can't use both.
  • term = null: Required if you're using taxonomy.
  • limit = -1: Limit how many posts to show in the list.
  • replace = array(): This can be a single word/string or array that will be removed.
  • replace_num = 0: Remove the first number of string characters.
  • prepend = '': Add something before the post title.
  • append = '': Add something after the post title.
  • lock = null: Display a locked text, accept plain for "(Locked)", icon for the lock icon, and you can put your own custom text.
  • unlock = null: Display an unlocked text, accept plain for "(Unlocked)", icon for the lock icon, and you can put your own custom text.
  • bullet = 'dot': Accept dot/disc, number/decimal, and none`.

Clone this wiki locally