myCRED Constants

myCRED Constants control some of the core features / settings in myCRED. You can override these constants by defining the constant in your wp-config.php file. To override a constant you need to use the define function.

Constants that uses lowercase “myCRED” in the beginning can be replaced but shouldn’t, unless you know exactly what you are doing! Changing these type of constants are not supported!

Core Constants

Constant Since Default Description
myCRED_VERSION 1.0 - Defines the current version of the myCRED plugin.
MYCRED_SLUG 1.0 mycred As of version 1.7, this constant is used for URLs in your wp-admin area. You can use this to whitelabel admin URLs.
MYCRED_DEFAULT_LABEL 1.3 myCRED Defines the default label of myCRED. Can be used to whitelabel myCRED.
MYCRED_DEFAULT_TYPE_KEY 1.7 mycred_default Defines the default point type's meta key.
MYCRED_FOR_OLDER_WP 1.6 false If set to true, the myCRED activation script will allow the plugin to be activated on older WordPress versions.
MYCRED_MIN_TIME_LIMIT 1.6 3 Defines the minimum amount of time that must pass between ajax requests in seconds.
MYCRED_ENABLE_LOGGING 1.7 true Defines if myCRED should use logging. Should remain true unless you know what you are doing. Disabling logging will disable: Logging, Hook limits, Badges, Email Notifications, Notifications etc.
MYCRED_UNINSTALL_LOG 1.7 true Defines if myCRED should uninstall the log and log entries when myCRED is deleted.
MYCRED_UNINSTALL_CREDS 1.7 true Defines if myCRED should delete users balances when myCRED is deleted.
MYCRED_DISABLE_PROTECTION 1.5 false Defines if myCRED should use the mcrypt PHP library.
myCRED_THIS 1.0 __FILE__ Defines the myCRED plugins main files location.
myCRED_ROOT_DIR 1.0 - Defines the root directory path for the plugin.
myCRED_ABSTRACTS_DIR 1.0 - Defines the abstract folder path.
myCRED_ADDONS_DIR 1.0 - Defines the add-ons folder path.
myCRED_ASSETS_DIR 1.0 - Defines the assets folder path.
myCRED_INCLUDES_DIR 1.0 - Defines the includes folder path.
myCRED_LANG_DIR 1.1 - Defines the language folder path.
myCRED_MODULES_DIR 1.4 - Defines the modules folder path.
myCRED_PLUGINS_DIR 1.4 - Defines the plugins folder path. This is the plugins folder inside the myCRED folder and not your WordPress plugin folder!
myCRED_CLASSES_DIR 1.6 - Defines the class folder path.
myCRED_IMPORTERS_DIR 1.6 - Defines the importer folder path.
myCRED_SHORTCODES_DIR 1.7 - Defines the shortcodes folder path.

Add-on Constants

Constant Since Default Description
MYCRED_BADGE_WIDTH 1.6 100 Defines the default badge image width in pixels. Must be an integer without "px".
MYCRED_BADGE_HEIGHT 1.6 100 Defines the default badge image height in pixels. Must be an integer without "px".
MYCRED_BUYCRED_PENDING_COMMENTS 1.7 true Defines if the buyCRED add-ons should use comments to log events for pending payments.
MYCRED_RANK_WIDTH 1.6 250 Defines the width of rank logos in pixels. Must be an integer without "px".
MYCRED_RANK_HEIGHT 1.6 250 Defines the width of rank logos in pixels. Must be an integer without "px".

Last edited August 4, 2016