Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Adjust Sell Content Button
- * @version 1.0
- */
- function mycred_pro_adjust_sell_content_button( $button, $post, $setup, $mycred ) {
- $user_id = get_current_user_id();
- $price = mycred_get_content_price( $post->ID, $mycred->cred_id, $user_id );
- $button_label = 'Download for %price% <i class="fa fa-download" aria-hidden="true"></i>';
- $button_label = str_replace( '%price%', $mycred->format_creds( $price ), $button_label );
- return '<a href="#" class="mycred-buy-this-content-button" data-pid="' . $post->ID . '" data-type="' . $mycred->cred_id . '">' . $button_label . '</a>';
- }
- add_filter( 'mycred_sell_this_button', 'mycred_pro_adjust_sell_content_button', 999, 4 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement