Version 1.1129 (checked in on 2010/03/18 at 19:15:02 by dries)
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 |
|---|---|
| CSS_DEFAULT | The default weight of CSS files added to the page. |
| CSS_SYSTEM | The default weight of system CSS files added to the page. |
| CSS_THEME | The default weight of theme CSS files added to the page. |
| DRUPAL_CACHE_CUSTOM | The block is handling its own caching in its hook_block_view(). From the perspective of the block cache system, this is equivalent to DRUPAL_NO_CACHE. Useful when time based expiration is needed or a site uses a node access which invalidates standard... |
| DRUPAL_CACHE_GLOBAL | The block or element is the same for every user on every page where it is visible. |
| DRUPAL_CACHE_PER_PAGE | The block or element can change depending on the page being viewed. |
| DRUPAL_CACHE_PER_ROLE | The block or element can change depending on the roles the user viewing the page belongs to. This is the default setting for blocks, used when the block does not specify anything. |
| DRUPAL_CACHE_PER_USER | The block or element can change depending on the user viewing the page. This setting can be resource-consuming for sites with large number of users, and thus should only be used when DRUPAL_CACHE_PER_ROLE is not sufficient. |
| DRUPAL_NO_CACHE | The block should not get cached. This setting should be used: |
| HTTP_REQUEST_TIMEOUT | Error code indicating that the request made by drupal_http_request() exceeded the specified timeout. |
| JS_DEFAULT | The default weight of JavaScript being added to the page. |
| JS_LIBRARY | The weight of JavaScript libraries, settings or jQuery plugins being added to the page. |
| JS_THEME | The weight of theme JavaScript code being added to the page. |
| 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 |
|---|---|
| archiver_get_archiver | Create the appropriate archiver for the specified file. |
| archiver_get_info | Retrieves a list of all available archivers. |
| base_path | Return the base URL path (i.e., directory) of the Drupal installation. |
| check_file | |
| check_url | Prepare a URL for use in an HTML attribute. Strips harmful protocols. |
| date_iso8601 | Returns an ISO8601 formatted date based on the given date. |
| debug | Debug function used for outputting debug information. |
| drupal_access_denied | Deliver a "access denied" error to the browser. |
| drupal_add_css | Adds a cascading stylesheet to the stylesheet queue. |
| drupal_add_feed | Add a feed URL for the current page. |
| drupal_add_html_head | Add output to the head tag of the HTML page. |
| drupal_add_html_head_link | Add a LINK tag with a distinct 'rel' attribute to the page's HEAD. |
| drupal_add_js | Add a JavaScript file, setting or inline code to the page. |
| drupal_add_library | Adds multiple JavaScript or CSS files at the same time. |
| drupal_add_region_content | Add content to a specified region. |
| drupal_add_tabledrag | Assist in adding the tableDrag JavaScript behavior to a themed table. |
| drupal_aggregate_css | Default callback to aggregate CSS files and inline content. |
| drupal_alter | Hands off alterable variables to type-specific *_alter implementations. |
| 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_check_incompatibility | Check whether a version is compatible with a given dependency. |
| drupal_clean_css_identifier | Prepare a string for use as a valid CSS identifier (element, class or ID name). |
| drupal_clear_css_cache | Delete all cached CSS files. |
| drupal_clear_js_cache | Delete all cached JS files. |
| 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_deliver_html_page | Package and send the result of a page callback to the browser as HTML. |
| drupal_deliver_page | Deliver a page callback result to the browser in the format appropriate. |
| drupal_encode_path | Encodes a Drupal path for use in a URL. |
| drupal_exit | Perform end-of-request tasks. |
| 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_css | Returns a themed representation of all stylesheets that should be attached to the page. |
| drupal_get_destination | Prepare a 'destination' URL query parameter for use in combination with drupal_goto(). |
| drupal_get_feeds | Get the feed URLs for the current page. |
| drupal_get_hash_salt | Get a salt useful for hardening against SQL injection. |
| 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_library | Retrieves information for a JavaScript/CSS library. |
| 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_profile | Get the name of the currently active install profile. |
| drupal_get_query_array | Split an URL-encoded query string into an array. |
| drupal_get_query_parameters | Process a URL query parameter array to remove unwanted elements. |
| drupal_get_rdf_namespaces | Return a string containing RDF namespace declarations for use in XML and XHTML output. |
| drupal_get_region_content | Get assigned content for a given region. |
| 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_get_updaters | Drupal Updater registry. |
| drupal_goto | Send the user to a different Drupal page. |
| drupal_group_css | Default callback to group CSS items. |
| drupal_html_class | Prepare a string for use as a valid class name. |
| drupal_html_id | Prepare a string for use as a valid HTML ID and guarantee uniqueness. |
| drupal_http_build_query | Parse an array into a valid, rawurlencoded query string. |
| drupal_http_header_attributes | Format an attribute string for a HTTP header. |
| drupal_http_request | Perform an HTTP request. |
| drupal_implode_tags | Implode an array of tags into a string. |
| drupal_install_schema | Creates all tables in a module's hook_schema() implementation. |
| drupal_json_decode | Converts an HTML-safe JSON string into its PHP equivalent. |
| drupal_json_encode | Converts a PHP variable into its Javascript equivalent. |
| drupal_json_output | Return data in JSON format. |
| drupal_js_defaults | Constructs an array of the defaults that are used for JavaScript items. |
| drupal_load_stylesheet | Loads the stylesheet and resolves all @import commands. |
| drupal_load_stylesheet_content | Process the contents of a stylesheet for aggregation. |
| drupal_map_assoc | Form an associative array from a linear array. |
| drupal_not_found | Deliver a "page not found" error to the browser. |
| drupal_page_footer | Perform end-of-request tasks. |
| drupal_page_set_cache | Store the current page in the cache. |
| drupal_parse_dependency | Parse a dependency for comparison by drupal_check_incompatibility(). |
| drupal_parse_info_file | Parse Drupal module and theme info file format. |
| drupal_parse_info_format | Parse data in Drupal's .info format. |
| drupal_parse_url | Wrapper around parse_url() to parse a system URL string into an associative array, suitable for url(). |
| drupal_pre_render_conditional_comments | #pre_render callback to render #browsers into #prefix and #suffix. |
| drupal_pre_render_link | #pre_render callback to render a link into #markup. |
| drupal_pre_render_markup | #pre_render callback to append contents in #markup to #children. |
| drupal_pre_render_styles | #pre_render callback to add the elements needed for CSS tags to be rendered. |
| drupal_process_attached | Add to the page all structures attached to a render() structure. |
| drupal_process_states | Adds JavaScript to the element to allow it to have different active states. |
| drupal_random_bytes | Returns a string of highly randomized bytes (over the full 8-bit range). |
| drupal_region_class | Provides a standard HTML class name that identifies a page region. |
| drupal_render | Renders HTML given a structured array tree. |
| drupal_render_cache_by_query | Prepare an element for caching based on a query. This smart caching strategy saves Drupal from querying and rendering to HTML when the underlying query is unchanged. |
| drupal_render_cache_get | Get the rendered output of a renderable element from cache. |
| drupal_render_cache_set | Cache the rendered output of a renderable element. |
| drupal_render_children | Render children of an element and concatenate them. |
| drupal_render_cid_create | Create the cache ID for a renderable element. |
| drupal_render_cid_parts | /** Helper function for building cache ids. |
| drupal_render_page | Renders the page, including all theming. |
| 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_page_content | Set the main page content value for later use. |
| drupal_set_time_limit | Attempts to set the PHP maximum execution time. |
| drupal_site_offline | Deliver a "site is under maintenance" message to the browser. |
| drupal_sort_weight | Function used by uasort to sort structured arrays by weight, without the property weight prefix. |
| drupal_system_listing | Return an array of system file objects. |
| drupal_uninstall_schema | Remove all tables that a module defines in its hook_schema(). |
| drupal_valid_token | Validate a token based on $value, the current user session and private key. |
| drupal_write_record | Saves a record to the database based upon the schema. |
| element_child | Check if the key is a child. |
| element_children | Return the children of an element, optionally sorted by weight. |
| element_get_visible_children | Return the visibile children of an element. |
| element_info | Retrieve the default properties for the defined element type. |
| 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. |
| entity_create_stub_entity | Helper function to assemble an object structure with initial ids. |
| entity_extract_ids | Helper function to extract id, vid, and bundle name from an entity. |
| entity_get_controller | Get the entity controller class for an entity type. |
| entity_get_info | Get the entity info array of an entity type. |
| entity_info_cache_clear | Resets the cached information about entity types. |
| entity_invoke | Invokes entity insert/update hooks. |
| entity_load | Load entities from the database. |
| entity_prepare_view | Invoke hook_entity_prepare_view(). |
| entity_uri | Returns the uri elements of an entity. |
| filter_xss | Filter XSS. |
| filter_xss_admin | Very permissive XSS/HTML filter for admin-only use. |
| filter_xss_bad_protocol | Processes an HTML attribute value and ensures it does not contain an URL with a disallowed protocol (e.g. javascript:). |
| fix_gpc_magic | Fix double-escaping problems caused by "magic quotes" in some PHP installations. |
| flood_clear_event | Make the flood control mechanism forget about an event for the current visitor. |
| flood_is_allowed | Checks whether user is allowed to proceed with the specified event. |
| flood_register_event | Register an event for the current visitor 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_username | Format a username. |
| format_xml_elements | Format XML elements. |
| hide | Hide an element from later rendering. |
| l | Format an internal Drupal link. |
| parse_size | Parse a given byte count. |
| render | Render and print an element. |
| show | Show a hidden or already printed element from later rendering. |
| url | Generate a URL. |
| url_is_external | Return TRUE if a path is external (e.g. http://example.com). |
| valid_email_address | Verify the syntax of the given e-mail address. |
| valid_url | Verify the syntax of the given URL. |
| watchdog_severity_levels | Severity levels, as defined in RFC 3164: http://www.ietf.org/rfc/rfc3164.txt. |
| xmlrpc | Performs one or more XML-RPC request(s). |
| _drupal_bootstrap_full | |
| _drupal_build_css_path | Helper function for drupal_build_css_cache(). |
| _drupal_default_html_head | Returns elements that are always displayed in the HEAD tag of the HTML page. |
| _drupal_flush_css_js | Helper function to change query-strings on css/js files. |
| _drupal_load_stylesheet | Loads stylesheets recursively and returns contents with corrected paths. |
| _drupal_schema_initialize | Fill in required default values for table definitions returned by hook_schema(). |
| _filter_xss_attributes | Processes a string of HTML attributes. |
| _filter_xss_split | Processes an HTML tag. |
| _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. |
| _format_date_callback | Callback function for preg_replace_callback(). |