Creating custom user tab
-
I am using this code it create a new tab, but it isnt working:
/* add new tab called “Submit Blog” */ add_filter('um_account_page_default_tabs_hook', 'submit_tab_in_um', 100 ); function submit_tab_in_um( $tabs ) { $tabs[800]['submit']['icon'] = 'um-faicon-trash-o'; $tabs[800]['submit']['title'] = 'Cancel Subscription'; $tabs[800]['submit']['custom'] = true; return $tabs; } /* make our new tab hookable */ add_action('um_account_tab__submit', 'um_account_tab__submit'); function um_account_tab__cancel( $info ) { global $ultimatemember; extract( $info ); $output = $ultimatemember->account->get_tab_output('submit'); if ( $output ) { echo $output; } } /* Finally we add some content in the tab */ add_filter('um_account_content_hook_submit', 'um_account_content_hook_submit'); function um_account_content_hook_submit( $output ){ ob_start(); ?> <div class=”um-field”> Something here... </div> <?php $output .= ob_get_contents(); ob_end_clean(); return $output; }
this is a new installation of UM no other settings have been changed.
any ideas?
I was trying to post to the UM form but it woudnt let me.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Creating custom user tab’ is closed to new replies.