Advertisement
verygoodplugins

Untitled

Jul 3rd, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 );
  2. function my_custom_tab_in_um( $tabs ) {
  3.     $tabs[800]['mytab']['icon'] = 'um-faicon-pencil';
  4.     $tabs[800]['mytab']['title'] = 'My Custom Tab';
  5.     $tabs[800]['mytab']['custom'] = true;
  6.     return $tabs;
  7. }
  8.    
  9. /* make our new tab hookable */
  10.  
  11. add_action('um_account_tab__mytab', 'um_account_tab__mytab');
  12. function um_account_tab__mytab( $info ) {
  13.     global $ultimatemember;
  14.     extract( $info );
  15.  
  16.     $output = $ultimatemember->account->get_tab_output('mytab');
  17.     if ( $output ) { echo $output; }
  18. }
  19.  
  20. /* Finally we add some content in the tab */
  21.  
  22. add_filter('um_account_content_hook_mytab', 'um_account_content_hook_mytab');
  23. function um_account_content_hook_mytab( $output ){
  24.     ob_start();
  25.  
  26.     echo do_shortcode( '[infusionsoft_invoices]' );
  27.        
  28.     $output .= ob_get_contents();
  29.     ob_end_clean();
  30.     return $output;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement