mycred_get_badge_ids
Description
This function returns an array of published badge IDs.
This function is only available if the Badges add-on is enabled.
Available since version 1.5
Returns
(array) Array of post object IDs.
Parameters
Param | Type | Required | Description | |
---|---|---|---|---|
function mycred_get_badge_ids( |
||||
No params | ||||
) { ... } |
Examples
Example 1: Count the number of published badges that exists on our website.
$badge_ids = mycred_get_badge_ids(); printf( 'This website has %d badges you can earn.', count( $badge_ids ) );