This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register Custom myCRED Hook | |
* @since 1.0 | |
* @version 1.0 | |
*/ | |
add_filter( 'mycred_setup_hooks', 'Learndash_myCRED_Hook' ); | |
function Learndash_myCRED_Hook( $installed ) { | |
$installed['hook_learndash'] = array( | |
'title' => __( 'LearnDash', 'mycred' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add links to the top of the list | |
function my_pmpro_member_links_top() | |
{ | |
//Add the level IDs here | |
if(pmpro_hasMembershipLevel(array(1,2,3))) | |
{ | |
//Add the links in <li> format here | |
?> | |
<li><a href="/top/">My Member Link Top</a></li> | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get user's rank progress | |
function get_mycred_users_rank_progress( $user_id, $show_rank ) { | |
global $wpdb; | |
if ( ! function_exists( 'mycred' ) ) return ''; | |
// Change rank data to displayed user when on a user's profile | |
if ( function_exists( 'bp_is_user' ) && bp_is_user() && empty( $user_id ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Prevent overwriting existing lifetime affiliate | |
if ( get_user_meta( $user_id, 'affwp_lc_affiliate_id', true ) ) { | |
if( ! (bool) apply_filters( 'affwp_lc_update_affiliate', false, $affiliate_id, $user_id, $referral, $this->context ) ) { | |
return true; // Allow extensions to update lifetime affiliates | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package nmbs | |
*/ | |
$col = empty($shortcode_atts["col"])? 3:intval($shortcode_atts["col"]); | |
$smcol = $col/1.5; | |
$col = empty($col)? 1:($col >= 12)? 12:$col; | |
$smcol = empty($smcol)? 1:($smcol >= 12)? 12:$smcol; | |
$col = intVal(12/$col); | |
$smcol = intVal(12/$smcol); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run if AffiliateWP MLM is Active | |
if ( class_exists( 'AffiliateWP_Multi_Level_Marketing' ) ) { | |
/** | |
* Removes Specific MLM Affiliate Data from the Sub Affiliates Tooltip (Upline Only) | |
* | |
* @since 1.1.1 | |
* @return array | |
*/ | |
function affwp_mlm_remove_upline_aff_data( $aff_data = array(), $affiliate_id = 0 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run if AffiliateWP is active | |
if ( class_exists( 'Affiliate_WP' ) ) { | |
/** | |
* Removes the Website URL field from the list of required affiliate registration form fields | |
* | |
* @return array | |
*/ | |
function affwp_remove_url_field( $required_fields = array() ) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Driver Status column to the exported affiliates CSV file | |
* | |
* @since 1.0 | |
*/ | |
function affwp_mobbyd_export_affiliates_csv_cols( $cols ) { | |
$cols['driver_status'] = 'Driver Status'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$affiliate_id = affwp_get_affiliate_id(); | |
?> | |
<div id="affwp-affiliate-dashboard-referrals" class="affwp-tab-content"> | |
<h4><?php _e( 'Referrals', 'affiliate-wp' ); ?></h4> | |
<?php | |
$per_page = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function sync_member_type( $user_id = 0 ) { | |
if ( empty( $user_id ) ) | |
$user_id = get_current_user_id(); | |
$memb_types = bp_get_member_type( $user_id, false ); | |
switch_to_blog( 3 ); |
OlderNewer