Same name and namespace in other branches
  1. 4.6.x includes/common.inc \validation
  2. 5.x includes/common.inc \validation
  3. 6.x includes/common.inc \validation
  4. 7.x includes/common.inc \validation
  5. 8.9.x core/includes/common.inc \validation

Functions to validate user input.

File

includes/common.inc, line 635
Common functions that many Drupal modules will need to reference.

Functions

Namesort descending Location Description
base_path includes/common.inc Returns the base URL path of the Drupal installation. At the very least, this will always default to /.
check_file includes/common.inc
check_url includes/common.inc Prepare a URL for use in an HTML attribute. Strips harmful protocols.
drupal_add_js includes/common.inc Add a JavaScript file to the output.
drupal_add_link includes/common.inc Add a <link> tag to the page's HEAD.
drupal_attributes includes/common.inc Format an attribute string to insert in a tag.
drupal_call_js includes/common.inc Generates a Javascript call, while importing the arguments as is. PHP arrays are turned into JS objects to preserve keys. This means the array keys must conform to JS's member naming rules.
drupal_clone includes/common.inc Provide a substitute clone() function for PHP4.
drupal_eval includes/common.inc Evaluate a string of PHP code.
drupal_get_path includes/common.inc Returns the path to a system item (module, theme, etc.).
drupal_get_private_key includes/common.inc Ensure the private key variable used to generate tokens is set.
drupal_get_token includes/common.inc Generate a token based on $value, the current user session and private key.
drupal_map_assoc includes/common.inc Form an associative array from a linear array.
drupal_page_footer includes/common.inc Perform end-of-request tasks.
drupal_to_js includes/common.inc Converts a PHP variable into its Javascript equivalent.
drupal_urlencode includes/common.inc Wrapper around urlencode() which avoids Apache quirks.
drupal_valid_token includes/common.inc Validate a token based on $value, the current user session and private key.
flood_is_allowed includes/common.inc Check if the current visitor (hostname/IP) is allowed to proceed with the specified event. The user is allowed to proceed if he did not trigger the specified event more than $threshold times per hour.
flood_register_event includes/common.inc Register an event for the current visitor (hostname/IP) to the flood control mechanism.
format_date includes/common.inc Format a date with the given configured format or a custom format string.
format_interval includes/common.inc Format a time interval with the requested granularity.
format_plural includes/common.inc Format a string containing a count of items.
format_rss_channel includes/common.inc Formats an RSS channel.
format_rss_item includes/common.inc Format a single RSS item.
format_size includes/common.inc Generate a string representation for the given byte count.
format_xml_elements includes/common.inc Format XML elements.
l includes/common.inc Format an internal Drupal link.
page_set_cache includes/common.inc Store the current page in the cache.
url includes/common.inc Generate a URL from a Drupal menu path. Will also pass-through existing URLs.
valid_email_address includes/common.inc Verify the syntax of the given e-mail address.
valid_url includes/common.inc Verify the syntax of the given URL.
xmlrpc includes/common.inc Performs one or more XML-RPC request(s).
_drupal_bootstrap_full includes/common.inc

Sub-Topics

Namesort descending Location Description
Formatting includes/common.inc Functions to format numbers, strings, dates, etc.