A free points management plugin for WordPress.
myCRED Logo
myCRED Logo
  • Membership New
  • Chapters
    • Chapter I – Introduction
    • Chapter II – Getting Started
    • Chapter III – Add-ons
    • Chapter IV – Premium Add-ons
    • Chapter V – For Developers
    • Chapter VI – Reference Guides
  • Categories
    • Actions
    • Classes
    • Constants
    • Filters
    • Functions
    • Objects
    • Shortcodes
    • Hooks
    • Template Tags
  • Packages
    • mycred/api
    • mycred/badge
    • mycred/balance
    • mycred/banking
    • mycred/content
    • mycred/core
    • mycred/coupon
    • mycred/email
    • mycred/game
    • mycred/log
    • mycred/notice
    • mycred/payment
    • mycred/purchase
    • mycred/rank
    • mycred/transfer
  • Store
  • Download
    Packages
    Filter by package
    1. mycred/api
    2. mycred/badge
    3. mycred/balance
    4. mycred/banking
    5. mycred/buddypress
    6. mycred/content
    7. mycred/core
    8. mycred/coupon
    9. mycred/email
    10. mycred/game
    11. mycred/hook
    12. mycred/log
    13. mycred/notice
    14. mycred/payment
    15. mycred/purchase
    16. mycred/rank
    17. mycred/stats
    18. mycred/transfer
    19. mycred/twilio
    Categories
    Filter by category
    1. Actions
    2. Classes
    3. Filters
    4. Functions
    5. Hooks
    6. Objects
    7. Shortcodes
    8. Template Tags
    Chapters
    Documentation
    1. Chapter I - Introduction
    2. Chapter II - Getting Started
    3. Chapter III - Add-ons
    4. Chapter IV - Premium Add-ons
    5. Chapter V - For Developers
    6. Chapter VI - Reference Guides
Package: mycred/core
A compilation of core plugin functions.

Codex / mycred/core

mycredFunction

Constructs and returns the myCRED_Settings object based on a given point type.

myCRED_AccountObject

The myCRED_Account object is an “umbrella” object for a particular user, consisting primarily of their balance and history.

mycred_add_menuAction

This action indicates the instance where myCRED has finished registering all the wp-admin screens.

mycred_add_user_metaFunction

A wrapper function for add_user_meta, it assures that point related data is saved under the correct meta key structure.

mycred_admin_enqueueAction

This action indicates the instance where myCRED has enqueued all scripts and styling in the admin area.

mycred_admin_initAction

This action indicates the instance where myCRED has finished running tasks when the wp-admin area is initiated.

mycred_affiliate_cookieFilter

This filter allows you to change the lifespan of the cookies your users receive from the “Points for referrals” hook.

mycred_affiliate_idShortcode

Used by the Point for referrals hook, this shortcode will return the current logged in users referral ID.

mycred_affiliate_keyFilter

This filter allows you to adjust the referral key that the myCRED hook uses.

mycred_affiliate_linkShortcode

Used by the Point for referrals hook, this shortcode will append the current users referral link to a given URL. If no URL is given, the current page’s URL is used.

mycred_after_deletionAction

This action indicates the instance when the myCRED plugin has been deleted.

mycred_apply_exchange_rateFilter

This filter allows you to change the results of the apply_exchange() class method in the myCRED_Settings object.

mycred_before_deletionAction

This action indicates the instance when the myCRED plugin is about to be deleted.

mycred_centralize_logFunction

This function checks if the central log feature is enabled on a Multisite installation.

mycred_date_to_gmt_timestampFunction

This function will convert a well formatted date to a GMT unix timestamp.

mycred_deactivationAction

This action indicates the instance when the myCRED plugin has been disabled.

mycred_delete_user_metaFunction

A wrapper function for delete_user_meta, it assures that point related data is deleted under the correct meta key structure.

mycred_exchangeShortcode

This shortcode allows your users to exchange one point type for another based on an exchange rate that you set.

mycred_exclude_userFunction

Checks if a given user is excluded from using a particular point type.

mycred_exclude_userFilter

This filter allows you to exclude users from using myCRED via script.

mycred_export_headersFilter

This filter allows you to adjust what columns should be included when myCRED log entries are exported.

mycred_flush_widget_cacheFunction

Wrapper function for wp_cache_delete for deleting widget caches. Used when myCRED widget settings are saved.

mycred_force_singular_sessionFunction

This function is used throughout myCRED to prevent users from attempting to submit AJAX forms multiple times.

mycred_front_enqueueAction

This action indicates the instance when scripts and styles needs to be enqueued for the front end of your website.

mycred_get_accountFunction

Retrieves a given users myCRED_Account object.

mycred_get_moduleFunction

This function will return a specific myCRED Module object.

mycred_get_point_type_nameFunction

This function returns a specific point type’s given name in singular or plural form.

mycred_get_remoteFunction

This function returns the Remove API (version 1.0) settings.

mycred_get_settings_networkFunction

This function returns the network settings on a Multisite installation.

mycred_get_user_idFunction

This function will attempt to return a user ID based on either an identifying piece of information (email, login or slug) or based on keywords.

mycred_get_users_profile_urlFunction

This function will return a given users profile URL based on your websites setup.

mycred_giveShortcode

This shortcode allows you to award or deduct points from the current user when this shortcode is executed.

mycred_give_runFilter

This filter controls if the mycred_give shortcode should run or not. It can be used to either disable this shortcode or to limit when or by whom it can be used.

mycred_hide_ifShortcode

This shortcode allows you to hide parts of your content for those who fulfil the requirements you set.

myCRED_HookClass

myCRED_Hook is an abstract class used by all myCRED Hooks. It contains commonly used methods to help you build hooks without to much programming.

mycred_hook_tableShortcode

Show your users how they can earn points based on how you setup your hooks.

mycred_initAction

This action indicates the instance where myCRED is ready to run it’s initial actions.

mycred_is_adminFunction

This function checks if a specific user is to be considered an “administrator”.

mycred_labelFilter

This filter allows you to change the value of the MYCRED_DEFAULT_LABEL constant, re-naming the myCRED plugin.

mycred_labelFunction

This function returns the myCRED label.

mycred_linkShortcode

This shortcode allows you to award or deduct points from the current user when their click on the generated link. Outputs a anchor element and calls the mycred-click-link jQuery script.

mycred_linkFilter

This filter allows you to adjust the anchor element the mycred_link shortcode renders.

myCRED_ModuleClass

The myCRED_Module is an abstract class used by all myCRED add-ons and core modules. It contains commonly used methods to help you build modules without to much programming.

mycred_my_rankingShortcode
Shortcode Description This shortcode allows you to show a given users or the current users position in a particular leaderboard. Nothing will be returned if the user viewing the shortcode is not logged in. Requirements myCRED 1.4 or higher. NavigationmyCRED Home About Add-ons Support Store Showcase Usage in content [mycred_my_ranking] Usage in theme files echo [...]
mycred_override_settingsFunction

This function checks if the master template feature is enabled on a Multisite installation.

mycred_pre_initAction

This action fires once myCRED is ready after that modules have been loaded but before the init action.

mycred_sendShortcode

This shortcode allows the current user to send a pre-set amount of points to a pre-set user. A simpler version of the mycred_transfer shortcode.

mycred_send_languageFilter

This filter lets you change the language used for the button in the mycred_send shortcode.

mycred_set_user_balanceAction

This action allows you to execute custom actions when a users balance is changed to a specific amount.

myCRED_SettingsClass

This class is the most commonly used and essential class in myCRED. Besides retrieving our settings, this class contain a set of methods which presents, manages, processes actions based on these settings.

mycred_setup_addonsFilter

This filter allows you to register your own add-ons or remove/disable existing add-ons.

mycred_setup_hooksFilter

This filter allows you to add custom hooks or remove built-in ones.

mycred_show_ifShortcode

This shortcode allows you to show parts of your content for those who fulfil the requirements you set.

mycred_tool_barAction

This action fires directly after myCRED has setup the WordPress Toolbar items.

mycred_user_row_actionsFilter

This filter allows you to remove or add custom action links when viewing your users point balance on the Users page.

mycred_users_profile_urlFilter

This filter allows you to adjust what URL the %user_profile_url% and the %user_profile_link% template tags point to.

mycred_videoShortcode

With this shortcode you can embed YouTube videos in your content and award points to users who views them. Added in 1.2

mycred_video_outputFilter

This filter allows you to adjust the video embed that is generated by the mycred_video add-on.

mycred_video_query_youtubeFilter

This filter allows you to make changes to the youtube video query.

mycred_widgets_initAction

This action fires once myCRED has loaded and registered all widgets.

0

About myCred

myCred is a free, open-source and developer friendly points management tool for WordPress powered websites.

Download Rate Plugin

Documentation

  • Add-ons
  • Core Shortcodes
  • F.A.Q.
  • Tutorials
  • Third Party Plugins
  • Code Snippets

Support

  • Product Licenses
  • Customization
  • Support Forums
  • Plugin Changelog
  • Contact

Copyright 2013 - 2021 by WPExperts; All rights reserved. myCred is licensed under GPL 2.0

Terms & Conditions • Use of Cookies • Store Policy • Community Rules

Suggest Codex Example

You can submit suggestions for codex examples that you have available as a public gist. If you are a member on the mycred.me website, you can earn Tokens for each submission. To claim these Tokens, make sure you provide your mycred.me username.

Please make sure the example you submit is relevant and if you include documentation, it's provided in English.

logo
  • Membership New
  • Chapters
    • Chapter I – Introduction
    • Chapter II – Getting Started
    • Chapter III – Add-ons
    • Chapter IV – Premium Add-ons
    • Chapter V – For Developers
    • Chapter VI – Reference Guides
  • Categories
    • Actions
    • Classes
    • Constants
    • Filters
    • Functions
    • Objects
    • Shortcodes
    • Hooks
    • Template Tags
  • Packages
    • mycred/api
    • mycred/badge
    • mycred/balance
    • mycred/banking
    • mycred/content
    • mycred/core
    • mycred/coupon
    • mycred/email
    • mycred/game
    • mycred/log
    • mycred/notice
    • mycred/payment
    • mycred/purchase
    • mycred/rank
    • mycred/transfer
  • Store
  • Download