View mycred-scratch-card-templates-filter-example2
/**
* Add Custom Scratch Card Template
* @since 1.0
* @version 1.0
*/
function mycred_add_custom_scratch_card_template( $templates ) {
$templates['mytemplate'] = array(
'label' => 'My Custom Template',
'minimum_scratch' => 75,
View mycred-scratch-card-templates-filter-example1
/**
* Add Custom Scratch Card Template
* @since 1.0
* @version 1.0
*/
function mycred_add_custom_scratch_card_template( $templates ) {
$templates['mytemplate'] = array(
'label' => 'My Custom Template',
'minimum_scratch' => 75,
View mycred-notice-js-filter-example1
/**
* Disable Notifications Debug
* @version 1.0
*/
function mycred_pro_disable_notice_debug( $args ) {
$args['debug'] = 'no';
return $args;
View mycred-scratch-metabox-fix
/**
* Scratch Card Metabox Fix
* @version 1.0
*/
function mycred_scratch_metabox_fix( $post ) {
remove_meta_box( 'submitdiv', 'scratch_card_set', 'side' );
add_meta_box( 'submitdiv', __( 'Actions', 'mycred' ), 'mycred_scratch_card_submit_metabox', 'scratch_card_set', 'side', 'high' );
}
View buycred-checkout-page-action-hooks
/**
* Checkout Header
* @version 1.0
*/
function mycred_pro_buycred_checkout_header() {
echo '<link rel="stylesheet" href="http://yourwebsite.com/cssfile.css" type="text/css" media="all" />';
}
add_action( 'mycred_buycred_page_header', 'mycred_pro_buycred_checkout_header' );
View mycred-bp-leaderboard-member-column-filter-example1
/**
* Hide Leaderboard Names
* Hide everyone elses leaderboard names only showing our own
* @version 1.0
*/
function mycred_pro_hide_leaderboard_names( $content, $row ) {
if ( $row->user_id != get_current_user_id() ) return 'Member';
return $content;
View mycred-query-log-args-filter-example1
/**
* Adjust myCRED Query Args
* @version 1.0
*/
function mycred_pro_my_adjustments( $args ) {
if ( $args['ref'] == 'manual' && current_user_can( 'moderate_comments' ) )
$args['ref_id'] = get_current_user_id();
return $args;
View mycred-run-this-filter-example2
/**
* Duplicate Points
* @since 1.0
* @version 1.0
*/
function mycred_pro_duplicate_points( $request ) {
// If a user is to gain points, double the value
if ( $request['amount'] > 0 ) {
$request['amount'] = $request['amount'] * 2;
View mycred-bp-leaderboard-member-column-example1
/**
* Insert Avatar in Leaderboard Column
* @since 1.0
* @version 1.0
*/
function mycred_pro_bp_leaderboard_avatar_column( $content, $row, $group_id, $point_type ) {
return get_avatar( $row->user_id, 64 ) . $content;
}
View mycred-bp-leaderboard-column_id-column-filter-example1
/**
* Avatar Leaderboard Column
* @since 1.0
* @version 1.0
*/
function mycred_pro_bp_leaderboard_avatar_column( $content, $row, $group_id, $point_type ) {
return get_avatar( $row->user_id, 64 );
}