mycred_get_remote

Codex / mycred/core / Functions / mycred_get_remote

Navigation:

  1. Description
  2. Usage
  3. Default Values
  4. Example
  5. Return

Description

Returns the current settings for the myCRED Remote API.

 

Usage

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

 

Default Values

  • enabled (int)
    Zero for disabled, one (1) for enabled.
  • key (string)
    The API Key.
  • uri (string)
    The incoming call address that the API checks for to execute.
  • debug (int)
    Zero for disabled, one (1) for enabled.

 

Example

Example 1: Check if the API is enabled.

// Get API Settings
$remote = mycred_get_remote();
// Check
if ( $remote['enabled'] ) {
	// enabled ...
}
else {
	// disabled ...
}

 

Return

Returns an associative array of values.

Last edited March 5, 2016