Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <?php
  2.  
  3. // Put this code in your theme or child theme functions.php
  4. // Rename the main dashboard tab labels
  5. function change_dashboard_labels( $dashboard_urls ){
  6.  
  7. // Products
  8. if ( array_key_exists('product', $dashboard_urls ) ) $dashboard_urls[ 'product' ][ 'label' ] = 'Mah Products';
  9. // Orders
  10. if ( array_key_exists('order', $dashboard_urls ) )$dashboard_urls[ 'order' ][ 'label' ] = 'Mah Orders';
  11. // Settings
  12. if ( array_key_exists('settings', $dashboard_urls ) )$dashboard_urls[ 'settings' ][ 'label' ] = 'Mah Settings';
  13. // Ratings
  14. if ( array_key_exists('rating', $dashboard_urls ) )$dashboard_urls[ 'rating' ][ 'label' ] = 'Mah Ratins';
  15. // Coupons
  16. if ( array_key_exists('shop_coupon', $dashboard_urls ) )$dashboard_urls[ 'shop_coupon' ][ 'label' ] = 'Mah Coupons';
  17.  
  18. return $dashboard_urls;
  19. }
  20.  
  21. add_filter( 'wcv_pro_dashboard_urls', 'change_dashboard_labels' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement