# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\Users\Tim\Documents\Project K\site_dev\sites\all\modules\_modified\viewsphpfilter
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: viewsphpfilter.views.inc
--- viewsphpfilter.views.inc Base (BASE)
+++ viewsphpfilter.views.inc Locally Modified (Based On LOCAL)
@@ -6,20 +6,24 @@
  *
  */
 function viewsphpfilter_views_data_alter(&$data) {
-  $data['node']['nid_php'] = array (
-    'real field' => 'nid',
-    'title' => t('Node ID PHP handler'),
-    'title short' => t('PHP filter'),
+  foreach ($data as $table_name => $table) {
+    if ($myfield = $table['table']['base']['field']) { //check if this is a base table
+      $data[$table_name][$myfield . "_php"] = array (
+      'real field' => $myfield,
+      'title' => t("@field PHP filter", array('@field' => $myfield)),
+      'title short' => t("@field PHP filter", array('@field' => $myfield)),
     //'operator' => 'views_handler_operator_or',
     //'cacheable' => 'no',
-    'help' => t('This filter allows nodes to be filtered by Node ID.  PHP code should return an array with node IDs.  ID lists should be separated by commas.'),
+      'help' => t("This filter allows the @table table to be filtered by @field.  PHP code should return an array with @field (s).  ID lists should be separated by commas.", array('@table' => $table_name, '@field' => $myfield)),
     'filter' => array(
-      'field' => 'nid',
-      'name table' => 'node',
+        'field' => $myfield,
+        'name table' => $table_name,
       'handler' => 'views_handler_filter_node_nid_php',
     ),
   );
 }
+  }
+}
 
 function viewsphpfilter_views_handlers() {
   return array(
