Last active
August 29, 2015 14:07
-
-
Save timersys/8b9d6d133bf6a9964d85 to your computer and use it in GitHub Desktop.
Wordpress Social Invitations share custom url for logged user
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_filter( 'wsi/placeholders/custom_url', 'wsi_my_custom_link' ); | |
function wsi_my_custom_link() { | |
global $current_user; | |
get_currentuserinfo(); | |
//return home url with ref username | |
return site_url('?mref='.$current_user->user_login); | |
//return the same shortened with goo.gl | |
//return Wsi_Queue::shortenUrl(site_url('?mref='.$current_user->user_login)); | |
// you can also return ID $current_user->ID | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment