You are here

function photos_page_default in Album Photos 7.3

Same name and namespace in other branches
  1. 6.2 inc/photos.page.inc \photos_page_default()

Default page, list recent photos and galleries.

1 string reference to 'photos_page_default'
photos_menu in ./photos.module
Implements hook_menu().

File

inc/photos.page.inc, line 10
Handles default page view(s) and content.

Code

function photos_page_default() {
  global $user;
  $content = array();
  if ($user->uid && user_access('create photo')) {
    $val = _photos_block_image('user', 5, 'photos/user/' . $user->uid . '/image', $user->uid);
    $content['user']['image'] = $val[0];
    $val = _photos_block_album('user', 5, 'photos/user/' . $user->uid . '/album', $user->uid);
    $content['user']['album'] = $val[0];
  }
  $content['site']['image'] = _photos_block_image('latest', 5, 'photos/image');
  $content['site']['album'] = _photos_block_album('latest', 5, 'photos/album');
  return theme('photos_default', array(
    'content' => $content,
  ));
}