You are here

function theme_commerce_wishlist_user_wishlist_page_title in Commerce Wishlist 7.3

Same name and namespace in other branches
  1. 7.2 commerce_wishlist.module \theme_commerce_wishlist_user_wishlist_page_title()

Theme callback for page title on user's wishlist page.

The reason this is created as a separate themeable function is that depending on the site configuration and the way user profiles are set, it would make more sense to use user's first or first + last names, or even full name saved in commerce customer profile. This way even themes can override the output.

1 theme call to theme_commerce_wishlist_user_wishlist_page_title()
commerce_wishlist_views_pre_render in ./commerce_wishlist.module
Implements hook_views_pre_render().

File

./commerce_wishlist.module, line 570
Provides a wish list for use in Drupal Commerce.

Code

function theme_commerce_wishlist_user_wishlist_page_title(&$variables) {
  global $user;
  if ($user->uid == $variables['account']->uid) {
    return t('My Wish list');
  }
  return t("@name's Wish list", array(
    '@name' => $variables['account']->name,
  ));
}