Advertisement
fauzanjeg

fix code generate

May 5th, 2021
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. add_filter( 'jnews_dropdown_link', 'jnews_child_dropdown_link' );
  2.  
  3. function jnews_child_dropdown_link( $dropdown )
  4. {
  5.     //For add submenu
  6.     $item = array(
  7.         'new_submenu' => array(
  8.             'text' => esc_html__( 'New Submenu', 'jnews' ), //your menu name
  9.             'url'  => '#' //the url
  10.         ),
  11.     );
  12.  
  13.     if ( isset( $item ) )
  14.     {
  15.         $dropdown = array_merge( $item, $dropdown );
  16.     }
  17.  
  18.     //For remove submenu
  19.     //unset($dropdown['edit-account']);
  20.  
  21.     return $dropdown;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement