Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Add custom user dashboard menu items
- * @param array $items
- * @icons https://streamtube.marstheme.com/icons/
- *
- **/
- function streamtube_child_my_dashboard_menu_items( $items ){
- $items['hello'] = array(
- 'title' => esc_html__( 'Hello', 'streamtube-child' ),
- 'desc' => esc_html__( 'Menu description', 'streamtube-child' ),
- 'icon' => 'icon-help-circled-1',
- 'callback' => function(){
- // Load template
- //load_template( dirname( __FILE__ ) . '/hello.php' );
- // OR write code directly, for instance
- ?>
- <p>
- <?php esc_html_e( 'Hello World', 'streamtube-child' );?>
- </p>
- <?php
- },
- 'parent' => 'dashboard',
- 'cap' => 'publish_posts',
- 'priority' => 50
- );
- $items['google'] = array(
- 'title' => esc_html__( 'Google', 'streamtube-child' ),
- 'desc' => esc_html__( 'Menu description', 'streamtube-child' ),
- 'icon' => 'icon-link',
- 'url' => 'https://google.com',
- 'parent' => 'dashboard',
- 'cap' => 'publish_posts',
- 'priority' => 60
- );
- return $items;
- }
- add_filter( 'streamtube/core/user/dashboard/menu/items', 'streamtube_child_my_dashboard_menu_items', 10, 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement