Account page – current menu item
-
Hello,
I didn’t find your Github repository so I post my suggestion here.
In order to cutomize the customer account menu page, would it is possible to add the possibility to add css class into the account nav to know whait element on the list is the current ?
Suggestion :
# wp-content/plugins/motopress-hotel-booking-lite/includes/shortcodes/account-shortcode.php (line 221) protected function renderMenu( $userId ) { if( $userId ) { ?> <nav class="mphb-account-menu"> <ul> <li class="<?php echo ( 'dashboard' === $this->tab ) ? 'current-nav-item' : '' ; ?>"><a href="<?php echo esc_url( mphb_create_url( 'dashboard' ) ); ?>"><?php echo esc_html__( 'Dashboard', 'motopress-hotel-booking' ); ?></a></li> <li class="<?php echo ( 'bookings' === $this->tab ) ? 'current-nav-item' : '' ; ?>"><a href="<?php echo esc_url( mphb_create_url( 'bookings' ) ); ?>"><?php echo esc_html__( 'Bookings', 'motopress-hotel-booking' ); ?></a></li> <li class="<?php echo ( 'account-details' === $this->tab ) ? 'current-nav-item' : '' ; ?>"><a href="<?php echo esc_url( mphb_create_url( 'account-details' ) ); ?>"><?php echo esc_html__( 'Account', 'motopress-hotel-booking' ); ?></a></li> <li><a href="<?php echo esc_url( wp_logout_url() ); ?>"><?php echo esc_html__( 'Logout', 'motopress-hotel-booking' ); ?></a></li> </ul> </nav> <?php } }
Thank you.
Best regards.
Joffrey
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Account page – current menu item’ is closed to new replies.