Guest User

Untitled

a guest
Jun 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2. /**
  3.   * Generic preprocess that is still working on D7
  4.   */
  5. function MYTHEME_preprocess_views_view_fields(&$vars) {
  6.   if (isset($vars['view']->name)) {
  7.     $function = 'MYTHEME_preprocess_views_view_fields__' . $vars['view']->name . '__' . $vars['view']->current_display;
  8.    
  9.     if (function_exists($function)) {
  10.      $function($vars);
  11.     }
  12.   }
  13. }
  14.  
  15. /**
  16.   * Then the specific preprocess that worked without the above code for D6
  17.   */
  18. function MYTHEME_preprocess_views_view_fields__VIEWNAME__DISPLAY(&$vars) {
  19.   // my specific preprocess code
  20. }
  21. ?>
Add Comment
Please, Sign In to add comment