Advertisement
arie_cristianD

change account dropdown url

Dec 9th, 2024 (edited)
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. add_filter( 'jnews_dropdown_link', 'change_dropdown_link' );
  2.  
  3. function change_dropdown_link( $dropdown ) {
  4.     if ( is_user_logged_in() ) {
  5.         $new_dropdown = array(
  6.             'account'             => array(
  7.                 'text' => 'My Account', /* dropwon link Text */
  8.                 'url'  => 'https://jnews.io/',  /* dropwon link URL */
  9.             ),
  10.             'manage_subscription' => array(
  11.                 'text' => 'Manage Subscription', /* dropwon link Text */
  12.                 'url'  => 'https://jnews.io/',  /* dropwon link URL */
  13.             ),
  14.             'e_ediiton'             => array(
  15.                 'text' => 'E-Edition', /* dropwon link Text */
  16.                 'url'  => 'https://jnews.io/',  /* dropwon link URL */
  17.             ),
  18.         );
  19.  
  20.         if ( isset( $new_dropdown ) ) {
  21.             $dropdown = $new_dropdown;
  22.         }
  23.     }
  24.  
  25.     return $dropdown;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement