Frontend Uploader: Award Points For Uploading Files and Photos

Home / Code Snippets / Frontend Uploader: Award Points For Uploading Files and Photos

Reward your users for uploading files and photos, using Frontend Uploader. This awards the current logged in user 3 points upon the upload successfully completing. This action runs after form is uploaded.

add_action( 'fu_upload_result', 'my_fu_upload_result', 10, 2 );
function my_fu_upload_result( $layout, $result ) {
	// MyCRED award points for uploads Frontend Uploader
	echo do_shortcode( '[mycred_give amount="3" log="Upload Reward" ref="upload_reward"]' );	
}

Add this code snippet to your theme's functions.php file, or to a custom plugin.This awards the current logged in user 3 points upon the upload successfully completing. This action runs after form is uploaded.

Last edited October 14, 2015

Leave a Reply