Category: mycred/badge

A compilation of items related to Badges via the Badges add-on.

mycred_assign_badge

This function assigns a given badge to all users that meet the set requirements.

Continue Reading

mycred_assign_badge_to_user

This function assigns a given badge and badge level to a specific user. It is used by other badge assignment functions to connect a badge with a user.

Continue Reading

myCRED_Badge

This object holds all relevant information about a specific myCRED badge, along with a set of methods to manipulate the badge along with assigning it to users.

Continue Reading

mycred_badge_image

This filter allows you to adjust the badge image element before it is rendered.

Continue Reading

mycred_badge_level_reached

This function checks if a user has earned a particular badge and if they have, the level they have reached.

Continue Reading

mycred_badge_user_value

This filter allows you to adjust the value that badges add-on saves when a user earns a new badge / badge level.

Continue Reading

mycred_badges

This shortcode allows you to display all published badges. Note that this shortcode will show all badges and not just the badges a user has earned. To show a users earned badges, please use the mycred_my_badges shortcode instead.

Continue Reading

mycred_badges_list

This shortcode allows you to display all published badges that have ever existed on your website and define them under their respective achievement types.

Continue Reading

mycred_count_users_with_badge

This function counts the number of users that has a given badge with the option to count badge level.

Continue Reading

mycred_count_users_without_badge

This function counts the number of users that has not earned a given badge.

Continue Reading

mycred_display_badge_requirements

This function will return the requirements you set for a particular badge in readable format.

Continue Reading

mycred_display_users_badges

This function renders a list of all the badges a give user has earned.

Continue Reading

mycred_get_badge

This function returns the myCRED Badge Object for a given badge ID.

Continue Reading

mycred_get_badge_ids

This function returns an array of published badge IDs.

Continue Reading

mycred_get_badge_references

This function will return an associative array of references and badge IDs that exists on your website.

Continue Reading

mycred_get_users_badges

This function returns an array badge IDs that a given user has earned.

Continue Reading

mycred_my_badges

This shortcode will show the user who is viewing it their earned badges. This shortcode will not show all badges no matter if a user has earned them or not. To show all badges, please use the mycred_badges shortcode instead.

Continue Reading