pods_url_variable

Return a GET, POST, COOKIE, SESSION, or URI string segment.

Description

(string) pods_url_variable( (string) $key = 'last', (string) $type = 'url' ); 

Returns (string)

The requested value, or null

Parameters (2)

0. $key — Optional. (string) => 'last'
The variable name or URI segment position
1. $type — Optional. (string) => 'url'
uri,, get, post, request, server, session, or cookie

Usage

  1. if ( !function_exists( 'pods_url_variable' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/deprecated/deprecated.php'; 
  3.  
  4. // The variable name or URI segment position 
  5. $key = 'last'; 
  6.  
  7. // (optional) "uri", "get", "post", "request", "server", "session", or "cookie" 
  8. $type = 'url'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = pods_url_variable($key, $type); 
  12.  

Defined (1)

The function is defined in the following location(s).

/deprecated/deprecated.php  
  1. function pods_url_variable ($key = 'last', $type = 'url') { 
  2. $output = apply_filters('pods_url_variable', pods_var($key, $type), $key, $type); 
  3. return $output;