Last active
October 9, 2016 03:35
-
-
Save nmedia82/b7b3c765284ba3eede1ed063a54f5292 to your computer and use it in GitHub Desktop.
Adding Profile Tab in Ultimate Member Plugin to show Member Uploaded Files on Frontend
This file contains hidden or 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
// this will add tab heading | |
add_filter('um_profile_tabs', 'user_files', 1000 ); | |
function user_files($tabs) { | |
$tabs['userfiles'] = array( | |
'name' => 'My Files', // you can change this | |
'icon' => 'um-faicon-file', // you can change this | |
); | |
return $tabs; | |
} | |
// this will actually render the file uploader section | |
add_action('um_profile_content_userfiles_default', 'userfiles_content'); | |
function userfiles_content() { | |
// you should not change anything here unless you know | |
echo apply_filters( 'the_content',' [nm-wp-file-uploader] '); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please visit this link for more detail: