mycred_setup_banking

Codex / mycred/banking / Filters / mycred_setup_banking

Navigation:

  1. Description
  2. Used By
  3. Parameters
  4. Example

Description

This filter allows you to register your own banking services or remove/disable existing services.

 

Used By

  • Class: myCRED_Banking Method: get()

 

Parameters

  • services (array)
    Associative array of installed services.

 

Example

Example 1: Add a custom service.

<?php
add_filter( 'mycred_setup_banking', 'add_my_custom_bank_service' );
function add_my_custom_bank_service( $services )
{
	$services['my_custom_service'] = array(
		'title'       => __( 'My Custom Service' ), // Service title
		'description' => __( 'This is a custom service' ), // Description (optional)
		'callback'    => array( 'My_Custom_Service_Class' ) // Class name
	);

	return $services;
}
?>

Example 2: Remove the “Compound Interest” Service.

<?php
add_filter( 'mycred_setup_banking', 'remove_a_service' );
function remove_a_service( $services )
{
	unset( $services['interest'] );
	return $services;
}
?>

Last edited June 26, 2016