mycred_get_ranks

Codex / / Functions / mycred_get_ranks

Navigation:

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

Description

Returns an associative array of all published ranks in descending order.

 

Usage

$ranks = mycred_get_ranks( 'draft' );
echo 'There are ' . count( $ranks ) . ' Draft Ranks';

 

Parameters

  • status (string)
    Post Status to search for. Defaults to ‘published’.
  • number (int)
    Number of ranks to return. Defaults to all.
  • order (string)
    Option to select the order in which the ranks are returned. Defaults to Descending.

 

Return

  • Associative array with Rank ID as key and Rank Post object as value.
  • Empty if no ranks found.

Last edited July 2, 2014