Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
1.756.2.27 (checked in on 2008/10/08 at 20:12:17 by goba)
Common functions that many Drupal modules will need to reference.
The functions that are critical and need to be available even when serving a cached page are instead located in bootstrap.inc.
| Name | Description |
|---|---|
| SAVED_DELETED | Return status for saving which deleted an existing item. |
| SAVED_NEW | Return status for saving which involved creating a new item. |
| SAVED_UPDATED | Return status for saving which involved an update to an existing item. |
| Name | Description |
|---|---|
| base_path | Returns the base URL path of the Drupal installation. At the very least, this will always default to /. |
| check_file | |
| check_url | Prepare a URL for use in an HTML attribute. Strips harmful protocols. |
| drupal_access_denied | Generates a 403 error if the request is not allowed. |
| drupal_add_css | Adds a CSS file to the stylesheet queue. |
| drupal_add_feed | Add a feed URL for the current page. |
| drupal_add_js | Add a JavaScript file, setting or inline code to the page. |
| drupal_add_link | Add a <link> tag to the page's HEAD. |
| drupal_add_tabledrag | Assist in adding the tableDrag JavaScript behavior to a themed table. |
| drupal_alter | This dispatch function hands off structured Drupal arrays to type-specific *_alter implementations. It ensures a consistent interface for all altering operations. |
| drupal_attributes | Format an attribute string to insert in a tag. |
| drupal_build_css_cache | Aggregate and optimize CSS files, putting them in the files directory. |
| drupal_build_js_cache | Aggregate JS files, putting them in the files directory. |
| drupal_clear_css_cache | Delete all cached CSS files. |
| drupal_clear_js_cache | Delete all cached JS files. |
| drupal_clear_path_cache | Reset the static variable which holds the aliases mapped for this request. |
| drupal_clone | Provide a substitute clone() function for PHP4. |
| drupal_common_theme | Provide theme registration for themes across .inc files. |
| drupal_cron_cleanup | Shutdown function for cron cleanup. |
| drupal_cron_run | Executes a cron run when called |
| drupal_error_handler | Log errors as defined by administrator. |
| drupal_eval | Evaluate a string of PHP code. |
| drupal_explode_tags | Explode a string of given tags into an array. |
| drupal_flush_all_caches | Flush all cached data on the site. |
| drupal_get_breadcrumb | Get the breadcrumb trail for the current page. |
| drupal_get_content | Get assigned content. |
| drupal_get_css | Returns a themed representation of all stylesheets that should be attached to the page. |
| drupal_get_destination | Prepare a destination query string for use in combination with drupal_goto(). |
| drupal_get_feeds | Get the feed URLs for the current page. |
| drupal_get_headers | Get the HTTP response headers for the current page. |
| drupal_get_html_head | Retrieve output to be displayed in the head tag of the HTML page. |
| drupal_get_js | Returns a themed presentation of all JavaScript code for the current page. |
| drupal_get_path | Returns the path to a system item (module, theme, etc.). |
| drupal_get_private_key | Ensure the private key variable used to generate tokens is set. |
| drupal_get_schema | Get the schema definition of a table, or the whole database schema. |
| drupal_get_schema_unprocessed | Returns the unprocessed and unaltered version of a module's schema. |
| drupal_get_token | Generate a token based on $value, the current user session and private key. |
| drupal_goto | Send the user to a different Drupal page. |
| drupal_http_request | Perform an HTTP request. |
| drupal_implode_tags | Implode an array of tags into a string. |
| drupal_install_schema | Create all tables that a module defines in its hook_schema(). |
| drupal_json | Return data in JSON format. |
| drupal_load_stylesheet | Loads the stylesheet and resolves all @import commands. |
| drupal_map_assoc | Form an associative array from a linear array. |
| drupal_not_found | Generates a 404 error if the request can not be handled. |
| drupal_page_footer | Perform end-of-request tasks. |
| drupal_parse_info_file | Parse Drupal info file format. |
| drupal_query_string_encode | Parse an array into a valid urlencoded query string. |
| drupal_render | Renders HTML given a structured array tree. |
| drupal_schema_fields_sql | Retrieve a list of fields from a table schema. The list is suitable for use in a SQL query. |
| drupal_set_breadcrumb | Set the breadcrumb trail for the current page. |
| drupal_set_content | Set content for a specified region. |
| drupal_set_header | Set an HTTP response header for the current page. |
| drupal_set_html_head | Add output to the head tag of the HTML page. |
| drupal_site_offline | Generates a site off-line message. |
| drupal_system_listing | Return an array of system file objects. |
| drupal_to_js | Converts a PHP variable into its Javascript equivalent. |
| drupal_uninstall_schema | Remove all tables that a module defines in its hook_schema(). |
| drupal_urlencode | Wrapper around urlencode() which avoids Apache quirks. |
| drupal_valid_token | Validate a token based on $value, the current user session and private key. |
| drupal_write_record | Save a record to the database based upon the schema. |
| element_child | Check if the key is a child. |
| element_children | Get keys of a structured array tree element that are not properties (i.e., do not begin with '#'). |
| element_properties | Get properties of a structured array element. Properties begin with '#'. |
| element_property | Check if the key is a property. |
| element_sort | Function used by uasort to sort structured arrays by weight. |
| fix_gpc_magic | Fix double-escaping problems caused by "magic quotes" in some PHP installations. |
| flood_is_allowed | Check if the current visitor (hostname/IP) is allowed to proceed with the specified event. |
| flood_register_event | Register an event for the current visitor (hostname/IP) to the flood control mechanism. |
| format_date | Format a date with the given configured format or a custom format string. |
| format_interval | Format a time interval with the requested granularity. |
| format_plural | Format a string containing a count of items. |
| format_rss_channel | Formats an RSS channel. |
| format_rss_item | Format a single RSS item. |
| format_size | Generate a string representation for the given byte count. |
| format_xml_elements | Format XML elements. |
| l | Format an internal Drupal link. |
| page_set_cache | Store the current page in the cache. |
| parse_size | Parse a given byte count. |
| t | Translate strings to the page language or a given language. |
| url | Generate a URL from a Drupal menu path. Will also pass-through existing URLs. |
| valid_email_address | Verify the syntax of the given e-mail address. |
| valid_url | Verify the syntax of the given URL. |
| watchdog_severity_levels | @see watchdog |
| xmlrpc | Performs one or more XML-RPC request(s). |
| _drupal_bootstrap_full | |
| _drupal_build_css_path | Helper function for drupal_build_css_cache(). |
| _drupal_flush_css_js | Helper function to change query-strings on css/js files. |
| _drupal_initialize_schema | Fill in required default values for table definitions returned by hook_schema(). |
| _drupal_load_stylesheet | Loads stylesheets recursively and returns contents with corrected paths. |
| _fix_gpc_magic | |
| _fix_gpc_magic_files | Helper function to strip slashes from $_FILES skipping over the tmp_name keys since PHP generates single backslashes for file paths on Windows systems. |