phpface

Add User Profile Menu Item

Jul 18th, 2022 (edited)
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. /**
  2.  *
  3.  * Add Test menu item to User Dropdown Menu
  4.  *
  5.  * @param array $menu_items
  6.  *
  7.  */
  8. add_filter( 'streamtube/core/user/profile/menu/items', function( $menu_items ){
  9.     $menu_items['test']  = array(
  10.         'title'         =>  esc_html__( 'Test', 'streamtube-core' ),
  11.         'icon'          =>  'icon-link',
  12.         'url'           =>  'http://google.com',
  13.         'priority'      =>  50,
  14.         'private'       =>  true
  15.     );
  16.  
  17.     return $menu_items;
  18. }, 10, 1 );
  19.  
Add Comment
Please, Sign In to add comment