mycred_get_users_fcred

Codex / mycred/balance / Functions / mycred_get_users_fcred

Navigation:

  1. Description
  2. Usage
  3. Parameters
  4. Example
  5. Return

Description

This function returns a given user’s current point balance formated with prefix and suffix (if used). Use mycred_get_users_cred() to return the same result but without formatting.

Usage

<?php echo mycred_get_users_fcred( $user_id, $type ); ?>

Parameters

  • user_id (int) required
    Required user id.
  • type (string)
    Optional point type to show.

Example

Example 1: Show the post authors balance (must be used inside the loop).

global $post;
echo 'This authors points balance is: ' . mycred_get_users_fcred( $post->post_author );

Return

Returns the users balance formated.

Last edited March 5, 2016