You are here

function views_post_view_make_args in Views (for Drupal 7) 5

helper function -- this function builds a URL for a given feed. It defaults to the built in feed selector, but the 3rd arg can be used to set it up for custom selectors too.

1 call to views_post_view_make_args()
views_rss_views_feed_argument in ./views_rss.module
feed argument hook that will convert us to RSS or display an icon. the 4th argument isn't part of the hook, but we use it to differentiate when called as a hook or when called manually from views_rss_views_post_view

File

modules/views_node.inc, line 842

Code

function views_post_view_make_args($view, $feed_id, $arg) {

  // assemble the URL
  $args = array();
  foreach ($view->argument as $id => $argdata) {
    if (!empty($view->args[$id])) {
      $args[] = $view->args[$id];
    }
    else {
      if ($argdata['id'] == $feed_id) {
        $args[] = $arg;
      }
      else {
        if ($argdata['argdefault'] != 1) {
          $args[] = $argdata['wildcard'];
        }
      }
    }
  }
  return $args;
}