Same name and namespace in other branches
  1. 5.x-1.x views.module \views_get_current_view()
  2. 6.x-3.x views.module \views_get_current_view()

Get current view.

Find out what, if any, current view is currently in use. Please note that this returns a reference, so be careful! You can unintentionally modify the $view object.

Return value

view The current view.

1 call to views_get_current_view()
view::pre_execute in includes/view.inc
Run attachments and let the display do what it needs to do prior to running.

File

./views.module, line 1238
Primarily Drupal hooks and global API functions to manipulate views.

Code

function &views_get_current_view() {
  return views_set_current_view();
}