mycred

Codex / mycred/core / Functions / mycred

This function replaces the mycred_get_settings function as of 1.4 to add support for multiple point types.

Navigation:

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

Description

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

Usage

<?php $mycred = mycred(); ?>

Parameters

  • type (string)
    Option to set the point type. Will default to the default point type.

Example

Example 1: Echo the plural name.

$mycred = mycred();
echo $mycred->plural();

Example 2: Echo the plural name for a custom point type called “mytype”.

$type = 'mytype';
$mycred = mycred( $type );
echo $mycred->plural();

Return

Returns the myCRED_Settings object constructed for the given point type.

Last edited September 2, 2016