diff --git a/includes/actions.inc b/includes/actions.inc index 9318591..1726ab5 100644 --- a/includes/actions.inc +++ b/includes/actions.inc @@ -178,10 +178,10 @@ function actions_list($reset = FALSE) { * function and the actions returned by actions_list() are partially * synchronized. Non-configurable actions from hook_action_info() * implementations are put into the database when actions_synchronize() is - * called, which happens when admin/config/system/actions is visited. - * Configurable actions are not added to the database until they are - * configured in the user interface, in which case a database row is created - * for each configuration of each action. + * called, which happens when admin/config/system/actions is visited. Configurable + * actions are not added to the database until they are configured in the + * user interface, in which case a database row is created for each + * configuration of each action. * * @return * Associative array keyed by numeric action ID. Each value is an associative @@ -228,14 +228,12 @@ function actions_actions_map($actions) { /** * Given a hash of an action array key, returns the key (function or ID). * - * Faster than actions_actions_map() when you only need the function name or - * ID. + * Faster than actions_actions_map() when you only need the function name or ID. * * @param $hash * Hash of a function name or action ID array key. The array key * is a key into the return value of actions_list() (array key is the action * function name) or actions_get_all_actions() (array key is the action ID). - * * @return * The corresponding array key, or FALSE if no match is found. */ diff --git a/includes/ajax.inc b/includes/ajax.inc index d6b85ab..58cddee 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -24,8 +24,7 @@ * ajax_form_callback() and a defined #ajax['callback'] function. * However, you may optionally specify a different path to request or a * different callback function to invoke, which can return updated HTML or can - * also return a richer set of - * @link ajax_commands Ajax framework commands @endlink. + * also return a richer set of @link ajax_commands Ajax framework commands @endlink. * * Standard form handling is as follows: * - A form element has a #ajax property that includes #ajax['callback'] and @@ -47,8 +46,8 @@ * function named by #ajax['callback'], which returns the form element that * has been updated and needs to be returned to the browser, or * alternatively, an array of custom Ajax commands. - * - The page delivery callback for 'system/ajax', ajax_deliver(), renders - * the element returned by #ajax['callback'], and returns the JSON string + * - The page delivery callback for 'system/ajax', ajax_deliver(), renders the + * element returned by #ajax['callback'], and returns the JSON string * created by ajax_render() to the browser. * - The browser unserializes the returned JSON string into an array of * command objects and executes each command, resulting in the old page @@ -127,8 +126,8 @@ * to a menu page callback that returns data using ajax_render(). Defaults to * 'system/ajax', which invokes ajax_form_callback(), eventually calling * the function named in #ajax['callback']. If you use a custom - * path, you must set up the menu entry and handle the entire callback in - * your own code. + * path, you must set up the menu entry and handle the entire callback in your + * own code. * - #ajax['wrapper']: The CSS ID of the area to be replaced by the content * returned by the #ajax['callback'] function. The content returned from * the callback will replace the entire element named by #ajax['wrapper']. @@ -148,18 +147,17 @@ * Defaults to 'click' for #ajax on #type 'submit', 'button', and * 'image_button'. Multiple events may be specified separated by spaces. * For example, when binding #ajax behaviors to form buttons, pressing the - * ENTER key within a textfield triggers the 'click' event of the form's - * first *submit button. Triggering Ajax in this situation leads to - * problems, like breaking autocomplete textfields. Because of that, Ajax - * behaviors are bound to the 'mousedown' event on form buttons by default. - * However, binding to 'mousedown' rather than 'click' means that it is - * possible to trigger a click by pressing the mouse, holding the mouse - * button down until the Ajax request is complete and the button is - * re-enabled, and then releasing the mouse button. For this case, 'prevent' - * can be set to 'click', so an additional event handler is bound to - * prevent such a click from triggering a non-Ajax form submission. This - * also prevents a textfield's ENTER press triggering a button's non-Ajax - * form submission behavior. + * ENTER key within a textfield triggers the 'click' event of the form's first + * submit button. Triggering Ajax in this situation leads to problems, like + * breaking autocomplete textfields. Because of that, Ajax behaviors are bound + * to the 'mousedown' event on form buttons by default. However, binding to + * 'mousedown' rather than 'click' means that it is possible to trigger a + * click by pressing the mouse, holding the mouse button down until the Ajax + * request is complete and the button is re-enabled, and then releasing the + * mouse button. For this case, 'prevent' can be set to 'click', so an + * additional event handler is bound to prevent such a click from triggering a + * non-Ajax form submission. This also prevents a textfield's ENTER press + * triggering a button's non-Ajax form submission behavior. * - #ajax['method']: The jQuery method to use to place the new HTML. * Defaults to 'replaceWith'. May be: 'replaceWith', 'append', 'prepend', * 'before', 'after', or 'html'. See the @@ -190,12 +188,11 @@ * be converted to a JSON object and returned to the client, which will then * iterate over the array and process it like a macro language. * - * Each command item is an associative array which will be converted to a - * command object on the JavaScript side. $command_item['command'] is the type - * of command, e.g. 'alert' or 'replace', and will correspond to a method in - * the Drupal.ajax[command] space. The command array may contain any other - * data that the command needs to process, e.g. 'method', 'selector', - * 'settings', etc. + * Each command item is an associative array which will be converted to a command + * object on the JavaScript side. $command_item['command'] is the type of + * command, e.g. 'alert' or 'replace', and will correspond to a method in the + * Drupal.ajax[command] space. The command array may contain any other data + * that the command needs to process, e.g. 'method', 'selector', 'settings', etc. * * Commands are usually created with a couple of helper functions, so they * look like this: @@ -356,8 +353,8 @@ function ajax_get_form() { * Path: system/ajax * * This rebuilds the form from cache and invokes the defined #ajax['callback'] - * to return an Ajax command structure for JavaScript. In case no 'callback' - * has been defined, nothing will happen. + * to return an Ajax command structure for JavaScript. In case no 'callback' has + * been defined, nothing will happen. * * The Form API #ajax property can be set both for buttons and other input * elements. @@ -397,20 +394,19 @@ function ajax_form_callback() { * * Many different pages can invoke an Ajax request to system/ajax or another * generic Ajax path. It is almost always desired for an Ajax response to be - * rendered using the same theme as the base page, because most themes are - * built with the assumption that they control the entire page, so if the CSS - * for two themes are both loaded for a given page, they may conflict with - * each other. For example, Bartik is Drupal's default theme, and Seven is - * Drupal's default administration theme. Depending on whether the "Use the - * administration theme when editing or creating content" checkbox is checked, - * the node edit form may be displayed in either theme, but the Ajax response - * to the Field module's "Add another item" button should be rendered using - * the same theme as the rest of the page. Therefore, system_menu() sets the - * 'theme callback' for 'system/ajax' to this function, and it is recommended - * that modules implementing other generic Ajax paths do the same. - * * @see system_menu() * @see file_menu() + * rendered using the same theme as the base page, because most themes are built + * with the assumption that they control the entire page, so if the CSS for two + * themes are both loaded for a given page, they may conflict with each other. + * For example, Bartik is Drupal's default theme, and Seven is Drupal's default + * administration theme. Depending on whether the "Use the administration theme + * when editing or creating content" checkbox is checked, the node edit form may + * be displayed in either theme, but the Ajax response to the Field module's + * "Add another item" button should be rendered using the same theme as the rest + * of the page. Therefore, system_menu() sets the 'theme callback' for + * 'system/ajax' to this function, and it is recommended that modules + * implementing other generic Ajax paths do the same. */ function ajax_base_page_theme() { if (!empty($_POST['ajax_page_state']['theme']) && !empty($_POST['ajax_page_state']['theme_token'])) { @@ -927,8 +923,8 @@ function ajax_command_prepend($selector, $html, $settings = NULL) { * Creates a Drupal Ajax 'insert/append' command. * * The 'insert/append' command instructs the client to use jQuery's append() - * method to append the given HTML content to the inside of each element - * matched by the given selector. + * method to append the given HTML content to the inside of each element matched + * by the given selector. * * This command is implemented by Drupal.ajax.prototype.commands.insert() * defined in misc/ajax.js. @@ -1051,8 +1047,8 @@ function ajax_command_remove($selector) { /** * Creates a Drupal Ajax 'changed' command. * - * This command instructs the client to mark each of the elements matched by - * the given selector as 'ajax-changed'. + * This command instructs the client to mark each of the elements matched by the + * given selector as 'ajax-changed'. * * This command is implemented by Drupal.ajax.prototype.commands.changed() * defined in misc/ajax.js. diff --git a/includes/batch.inc b/includes/batch.inc index 3e41a7f..15129a4 100644 --- a/includes/batch.inc +++ b/includes/batch.inc @@ -230,10 +230,10 @@ function _batch_progress_page_nojs() { /** * Processes sets in a batch. * - * If the batch was marked for progressive execution (default), this executes - * as many operations in batch sets until an execution time of 1 second has - * been exceeded. It will continue with the next operation of the same batch - * set in the next request. + * If the batch was marked for progressive execution (default), this executes as + * many operations in batch sets until an execution time of 1 second has been + * exceeded. It will continue with the next operation of the same batch set in + * the next request. * * @return * An array containing a completion value (in percent) and a status message. diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 48fd241..149c9f1 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -42,12 +42,12 @@ define('CACHE_TEMPORARY', -1); * @{ * Logging severity levels as defined in RFC 3164. * - * The WATCHDOG_* constant definitions correspond to the logging severity - * levels defined in RFC 3164, section 4.1.1. PHP supplies predefined LOG_* - * constants for use in the syslog() function, but their values on Windows - * builds do not correspond to RFC 3164. The associated PHP bug report was - * closed with the comment, "And it's also not a bug, as Windows just have - * less log levels," and "So the behavior you're seeing is perfectly normal." + * The WATCHDOG_* constant definitions correspond to the logging severity levels + * defined in RFC 3164, section 4.1.1. PHP supplies predefined LOG_* constants + * for use in the syslog() function, but their values on Windows builds do not + * correspond to RFC 3164. The associated PHP bug report was closed with the + * comment, "And it's also not a bug, as Windows just have less log levels," + * and "So the behavior you're seeing is perfectly normal." * * @see http://www.faqs.org/rfcs/rfc3164.html * @see http://bugs.php.net/bug.php?id=18090 @@ -502,9 +502,8 @@ function timer_stop($name) { * * Finds a matching configuration directory by stripping the website's * hostname from left to right and pathname from right to left. The first - * configuration file found will be used and the remaining ones will be - * ignored. If no configuration file is found, return a default value - * '$confdir/default'. + * configuration file found will be used and the remaining ones will be ignored. + * If no configuration file is found, return a default value '$confdir/default'. * * With a site located at http://www.example.com:8080/mysite/test/, the file, * settings.php, is searched for in the following directories: @@ -1285,9 +1284,9 @@ function drupal_send_headers($default_headers = array(), $only_default = FALSE) * header, the request only contains an If-Modified-Since header. The date will * be recent, because with authenticated users the Last-Modified header always * refers to the time of the request. If the user accesses Drupal via a proxy - * server, and the proxy already has a cached copy of the anonymous page with - * an older Last-Modified date, the proxy may respond with 304 Not Modified, - * making the client think that the anonymous and authenticated pageviews are + * server, and the proxy already has a cached copy of the anonymous page with an + * older Last-Modified date, the proxy may respond with 304 Not Modified, making + * the client think that the anonymous and authenticated pageviews are * identical. * * @see drupal_page_set_cache() @@ -1923,8 +1922,7 @@ function drupal_block_denied($ip) { * * This function is better than simply calling mt_rand() or any other built-in * PHP function because it can return a long string of bytes (compared to < 4 - * bytes normally from mt_rand()) and uses the best available pseudo-random - * source. + * bytes normally from mt_rand()) and uses the best available pseudo-random source. * * @param $count * The number of characters (bytes) to return in the string. @@ -2520,10 +2518,9 @@ function drupal_maintenance_theme() { * simple 404 page and exit. * * This function is called from drupal_deliver_html_page() at the time when a - * a normal 404 page is generated, but it can also optionally be called - * directly from settings.php to prevent a Drupal bootstrap on these pages. - * See documentation in settings.php for the benefits and drawbacks of using - * this. + * a normal 404 page is generated, but it can also optionally be called directly + * from settings.php to prevent a Drupal bootstrap on these pages. See + * documentation in settings.php for the benefits and drawbacks of using this. * * Paths to dynamically-generated content, such as image styles, should also be * accounted for in this function. @@ -2736,8 +2733,7 @@ function language_default() { * base_path() returns "/drupalfolder/". * - http://example.com/path/alias (which is a path alias for node/306) returns * "path/alias" as opposed to the internal path. - * - http://example.com/index.php returns an empty string (meaning: the front - * page). + * - http://example.com/index.php returns an empty string (meaning: front page). * - http://example.com/index.php?page=1 returns an empty string. * * @return @@ -2793,11 +2789,11 @@ function request_path() { * When viewing a page at the path "admin/structure/types", for example, arg(0) * returns "admin", arg(1) returns "structure", and arg(2) returns "types". * - * Avoid use of this function where possible, as resulting code is hard to - * read. In menu callback functions, attempt to use named arguments. See the - * explanation in menu.inc for how to construct callbacks that take arguments. - * When attempting to use this function to load an element from the current - * path, e.g. loading the node on a node page, use menu_get_object() instead. + * Avoid use of this function where possible, as resulting code is hard to read. + * In menu callback functions, attempt to use named arguments. See the explanation + * in menu.inc for how to construct callbacks that take arguments. When attempting + * to use this function to load an element from the current path, e.g. loading the + * node on a node page, please use menu_get_object() instead. * * @param $index * The index of the component, where each component is separated by a '/' @@ -3230,8 +3226,8 @@ function registry_update() { * counts. These functions can use a more cumbersome, but faster variant of * calling drupal_static(). It works by storing the reference returned by * drupal_static() in the calling function's own static variable, thereby - * removing the need to call drupal_static() for each iteration of the - * function. Conceptually, it replaces: + * removing the need to call drupal_static() for each iteration of the function. + * Conceptually, it replaces: * @code * $foo = &drupal_static(__FUNCTION__); * @endcode @@ -3240,9 +3236,9 @@ function registry_update() { * // Unfortunately, this does not work. * static $foo = &drupal_static(__FUNCTION__); * @endcode - * However, the above line of code does not work, because PHP only allows - * static variables to be initializied by literal values, and does not allow - * static variables to be assigned to references. + * However, the above line of code does not work, because PHP only allows static + * variables to be initializied by literal values, and does not allow static + * variables to be assigned to references. * - http://php.net/manual/en/language.variables.scope.php#language.variables.scope.static * - http://php.net/manual/en/language.variables.scope.php#language.variables.scope.references * The example below shows the syntax needed to work around both limitations. @@ -3262,16 +3258,16 @@ function registry_update() { * @endcode * * @param $name - * Globally unique name for the variable. For a function with only one - * static variable, the function name (e.g. via the PHP magic __FUNCTION__ - * constant) is recommended. For a function with multiple static variables, - * add a distinguishing suffix to the function name for each one. + * Globally unique name for the variable. For a function with only one static, + * variable, the function name (e.g. via the PHP magic __FUNCTION__ constant) + * is recommended. For a function with multiple static variables add a + * distinguishing suffix to the function name for each one. * @param $default_value * Optional default value. * @param $reset - * TRUE to reset a specific named variable, or all variables if $name is - * NULL. Resetting every variable should only be used, for example, for - * running unit tests with a clean environment. Should be used only via + * TRUE to reset a specific named variable, or all variables if $name is NULL. + * Resetting every variable should only be used, for example, for running + * unit tests with a clean environment. Should be used only though via * function drupal_static_reset() and the return value should not be used in * this case. * diff --git a/includes/cache.inc b/includes/cache.inc index 0bd074c..67e55a9 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -183,8 +183,8 @@ function cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE) { /** * Checks if a cache bin is empty. * - * A cache bin is considered empty if it does not contain any valid data for - * any cache ID. + * A cache bin is considered empty if it does not contain any valid data for any + * cache ID. * * @param $bin * The cache bin to check. @@ -280,12 +280,12 @@ interface DrupalCacheInterface { * Strings will be stored as plain text and not serialized. * @param $expire * One of the following values: - * - CACHE_PERMANENT: Indicates that the item should never be removed - * unless explicitly told to using cache_clear_all() with a cache ID. + * - CACHE_PERMANENT: Indicates that the item should never be removed unless + * explicitly told to using cache_clear_all() with a cache ID. * - CACHE_TEMPORARY: Indicates that the item should be removed at the next * general cache wipe. - * - A Unix timestamp: Indicates that the item should be kept at least - * until the given time, after which it behaves like CACHE_TEMPORARY. + * - A Unix timestamp: Indicates that the item should be kept at least until + * the given time, after which it behaves like CACHE_TEMPORARY. */ function set($cid, $data, $expire = CACHE_PERMANENT); diff --git a/includes/common.inc b/includes/common.inc index 8d9debc..2b82860 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -19,10 +19,10 @@ * For example, for improved or more secure UTF8-handling, or RFC-compliant * handling of URLs in Drupal. * - * For ease of use and memorizing, all these wrapper functions use the same - * name as the original PHP function, but prefixed with "drupal_". Beware, - * however, that not all wrapper functions support the same arguments as the - * original functions. + * For ease of use and memorizing, all these wrapper functions use the same name + * as the original PHP function, but prefixed with "drupal_". Beware, however, + * that not all wrapper functions support the same arguments as the original + * functions. * * You should always use these wrapper functions in your code. * @@ -206,8 +206,8 @@ function drupal_get_region_content($region = NULL, $delimiter = ' ') { * When this function is called during Drupal's initial installation process, * the name of the profile that's about to be installed is stored in the global * installation state. At all other times, the standard Drupal systems variable - * table contains the name of the current profile, and we can call - * variable_get() to determine what one is active. + * table contains the name of the current profile, and we can call variable_get() + * to determine what one is active. * * @return $profile * The name of the install profile. @@ -230,8 +230,8 @@ function drupal_get_profile() { * Sets the breadcrumb trail for the current page. * * @param $breadcrumb - * Array of links, starting with "home" and proceeding up to but not - * including the current page. + * Array of links, starting with "home" and proceeding up to but not including + * the current page. */ function drupal_set_breadcrumb($breadcrumb = NULL) { $stored_breadcrumb = &drupal_static(__FUNCTION__); @@ -460,8 +460,8 @@ function drupal_get_query_array($query) { /** * Parses an array into a valid, rawurlencoded query string. * - * This differs from http_build_query() as we need to rawurlencode() - * (instead of urlencode()) all query parameters. + * This differs from http_build_query() as we need to rawurlencode() (instead of + * urlencode()) all query parameters. * * @param $query * The query parameter array to be processed, e.g. $_GET. @@ -554,8 +554,8 @@ function drupal_get_destination() { * * @return * An associative array containing the keys: - * - 'path': The path of the URL. If the given $url is external, this - * includes the scheme and host. + * - 'path': The path of the URL. If the given $url is external, this includes + * the scheme and host. * - 'query': An array of query parameters of $url, if existent. * - 'fragment': The fragment of $url, if existent. * @@ -616,8 +616,8 @@ function drupal_parse_url($url) { * * For aesthetic reasons slashes are not escaped. * - * Note that url() takes care of calling this function, so a path passed to - * that function should not be encoded in advance. + * Note that url() takes care of calling this function, so a path passed to that + * function should not be encoded in advance. * * @param $path * The Drupal path to encode. @@ -698,8 +698,7 @@ function drupal_goto($path = '', array $options = array(), $http_response_code = * Page callback functions wanting to report a "site offline" message should * return MENU_SITE_OFFLINE instead of calling drupal_site_offline(). However, * functions that are invoked in contexts where that return value might not - * bubble up to menu_execute_active_handler() should call - * drupal_site_offline(). + * bubble up to menu_execute_active_handler() should call drupal_site_offline(). */ function drupal_site_offline() { drupal_deliver_page(MENU_SITE_OFFLINE); @@ -721,10 +720,9 @@ function drupal_not_found() { * Delivers a "access denied" error to the browser. * * Page callback functions wanting to report an "access denied" message should - * return MENU_ACCESS_DENIED instead of calling drupal_access_denied(). - * However, functions that are invoked in contexts where that return value - * might not bubble up to menu_execute_active_handler() should call - * drupal_access_denied(). + * return MENU_ACCESS_DENIED instead of calling drupal_access_denied(). However, + * functions that are invoked in contexts where that return value might not + * bubble up to menu_execute_active_handler() should call drupal_access_denied(). */ function drupal_access_denied() { drupal_deliver_page(MENU_ACCESS_DENIED); @@ -740,8 +738,7 @@ function drupal_access_denied() { * A string containing a fully qualified URI. * @param array $options * (optional) An array that can have one or more of the following elements: - * - headers: An array containing request headers to send as name/value - * pairs. + * - headers: An array containing request headers to send as name/value pairs. * - method: A string containing the request method. Defaults to 'GET'. * - data: A string containing the request body, formatted as * 'param=value¶m=value&...'. Defaults to NULL. @@ -1161,8 +1158,8 @@ function valid_url($url, $absolute = FALSE) { * @param $window * Optional number of seconds before this event expires. Defaults to 3600 (1 * hour). Typically uses the same value as the flood_is_allowed() $window - * parameter. Expired events are purged on cron run to prevent the flood - * table from growing indefinitely. + * parameter. Expired events are purged on cron run to prevent the flood table + * from growing indefinitely. * @param $identifier * Optional identifier (defaults to the current user's IP address). */ @@ -1246,8 +1243,8 @@ function flood_is_allowed($name, $threshold, $window = 3600, $identifier = NULL) * This function must be called for all URIs within user-entered input prior * to being output to an HTML attribute value. It is often called as part of * check_url() or filter_xss(), but those functions return an HTML-encoded - * string, so this function can be called independently when the output needs - * to be a plain-text string for passing to t(), l(), drupal_attributes(), or + * string, so this function can be called independently when the output needs to + * be a plain-text string for passing to t(), l(), drupal_attributes(), or * another function that will call check_plain() separately. * * @param $uri @@ -1393,8 +1390,7 @@ function filter_xss($string, $allowed_tags = array('a', 'em', 'strong', 'cite', * @param $m * An array with various meaning depending on the value of $store. * If $store is TRUE then the array contains the allowed tags. - * If $store is FALSE then the array has one element, the HTML tag to - * process. + * If $store is FALSE then the array has one element, the HTML tag to process. * @param $store * Whether to store $m. * @@ -1570,12 +1566,10 @@ function _filter_xss_attributes($attr) { * @param $string * The string with the attribute value. * @param $decode - * (Deprecated) Whether to decode entities in the $string. Set to FALSE if - * the $string is in plain text, TRUE otherwise. Defaults to TRUE. This - * parameter is deprecated and will be removed in Drupal 8. To process - * a plain-text URI, call drupal_strip_dangerous_protocols() or check_url() - * instead. - * + * (Deprecated) Whether to decode entities in the $string. Set to FALSE if the + * $string is in plain text, TRUE otherwise. Defaults to TRUE. This parameter + * is deprecated and will be removed in Drupal 8. To process a plain-text URI, + * call drupal_strip_dangerous_protocols() or check_url() instead. * @return * Cleaned up and HTML-escaped version of $string. */ @@ -1707,17 +1701,16 @@ function format_xml_elements($array) { * The item count to display. * @param $singular * The string for the singular case. Please make sure it is clear this is - * singular, to ease translation (e.g. use "1 new comment" instead of - * "1 new"). Do not use @count in the singular string. + * singular, to ease translation (e.g. use "1 new comment" instead of "1 new"). + * Do not use @count in the singular string. * @param $plural - * The string for the plural case. Please make sure it is clear this is - * plural, to ease translation. Use @count in place of the item count, as - * in "@count new comments". + * The string for the plural case. Please make sure it is clear this is plural, + * to ease translation. Use @count in place of the item count, as in "@count + * new comments". * @param $args - * An associative array of replacements to make after translation. Instances + * An associative array of replacements to make after translation. Incidences * of any key in this array are replaced with the corresponding value. - * Based on the first character of the key, the value is escaped and/or - * themed: + * Based on the first character of the key, the value is escaped and/or themed: * - !variable: inserted as is * - @variable: escape plain text to HTML (check_plain) * - %variable: escape text and theme as a placeholder for user-submitted @@ -2054,9 +2047,9 @@ function format_username($account) { * and it will be replaced with the alias, if one exists. Additional query * arguments for internal paths must be supplied in $options['query'], not * included in $path. - * - If you provide an internal path and $options['alias'] is set to TRUE, - * the path is assumed already to be the correct path alias, and the alias - * is not looked up. + * - If you provide an internal path and $options['alias'] is set to TRUE, the + * path is assumed already to be the correct path alias, and the alias is + * not looked up. * - The special string '' generates a link to the site's base URL. * - If your external URL contains a query (e.g. http://example.com/foo?a=b), * then you can either URL encode the query keys and values yourself and @@ -2076,8 +2069,8 @@ function format_username($account) { * - 'external': Whether the given path is an external URL. * - 'language': An optional language object. If the path being linked to is * internal to the site, $options['language'] is used to look up the alias - * for the URL. If $options['language'] is omitted, the global - * $language_url will be used. + * for the URL. If $options['language'] is omitted, the global $language_url + * will be used. * - 'https': Whether this URL should point to a secure location. If not * defined, the current scheme is used, so the user stays on http or https * respectively. TRUE enforces HTTPS and FALSE enforces HTTP, but HTTPS can @@ -2094,8 +2087,8 @@ function format_username($account) { * Drupal on a web server that cannot be configured to automatically find * index.php, then hook_url_outbound_alter() can be implemented to force * this value to 'index.php'. - * - 'entity_type': The entity type of the object that called url(). Only - * set if url() is invoked by entity_uri(). + * - 'entity_type': The entity type of the object that called url(). Only set if + * url() is invoked by entity_uri(). * - 'entity': The entity object (such as a node) for which the URL is being * generated. Only set if url() is invoked by entity_uri(). * @@ -2266,14 +2259,13 @@ function drupal_http_header_attributes(array $attributes = array()) { * Converts an associative array to an XML/HTML tag attribute string. * * Each array key and its value will be formatted into an attribute string. - * If a value is itself an array, then its elements are concatenated to a - * single space-delimited string (for example, a class attribute with multiple - * values). + * If a value is itself an array, then its elements are concatenated to a single + * space-delimited string (for example, a class attribute with multiple values). * * Attribute values are sanitized by running them through check_plain(). * Attribute names are not automatically sanitized. When using user-supplied - * attribute names, it is strongly recommended to allow only white-listed - * names, since certain attributes carry security risks and can be abused. + * attribute names, it is strongly recommended to allow only white-listed names, + * since certain attributes carry security risks and can be abused. * * Examples of security aspects when using drupal_attributes: * @code @@ -2422,11 +2414,11 @@ function l($text, $path, array $options = array()) { * this function is to determine the most appropriate 'delivery callback' * function to route the content to. The delivery callback function then * sends the content to the browser in the needed format. The default delivery - * callback is drupal_deliver_html_page(), which delivers the content as an - * HTML page, complete with blocks in addition to the content. This default - * can be overridden on a per menu router item basis by setting 'delivery - * callback' in hook_menu() or hook_menu_alter(), and can also be overridden - * on a per-request basis in hook_page_delivery_callback_alter(). + * callback is drupal_deliver_html_page(), which delivers the content as an HTML + * page, complete with blocks in addition to the content. This default can be + * overridden on a per menu router item basis by setting 'delivery callback' in + * hook_menu() or hook_menu_alter(), and can also be overridden on a per request + * basis in hook_page_delivery_callback_alter(). * * For example, the same page callback function can be used for an HTML * version of the page and an Ajax version of the page. The page callback @@ -2619,9 +2611,9 @@ function drupal_page_footer() { /** * Performs end-of-request tasks. * - * In some cases page requests need to end without calling - * drupal_page_footer(). In these cases, call drupal_exit() instead. There - * should rarely be a reason to call exit instead of drupal_exit(); + * In some cases page requests need to end without calling drupal_page_footer(). + * In these cases, call drupal_exit() instead. There should rarely be a reason + * to call exit instead of drupal_exit(); * * @param $destination * If this function is called from drupal_goto(), then this argument @@ -2767,17 +2759,17 @@ function drupal_add_html_head_link($attributes, $header = FALSE) { * If CSS aggregation/compression is enabled, all cascading style sheets added * with $options['preprocess'] set to TRUE will be merged into one aggregate * file and compressed by removing all extraneous white space. - * Preprocessed inline stylesheets will not be aggregated into this single - * file; instead, they are just compressed upon output on the page. Externally - * hosted stylesheets are never aggregated or compressed. + * Preprocessed inline stylesheets will not be aggregated into this single file; + * instead, they are just compressed upon output on the page. Externally hosted + * stylesheets are never aggregated or compressed. * * The reason for aggregating the files is outlined quite thoroughly here: * http://www.die.net/musings/page_load_time/ "Load fewer external objects. Due * to request overhead, one bigger file just loads faster than two smaller ones * half its size." * - * $options['preprocess'] should be only set to TRUE when a file is required - * for all typical visitors and most pages of a site. It is critical that all + * $options['preprocess'] should be only set to TRUE when a file is required for + * all typical visitors and most pages of a site. It is critical that all * preprocessed files are added unconditionally on every page, even if the * files do not happen to be needed on a page. This is normally done by calling * drupal_add_css() in a hook_init() implementation. @@ -2813,8 +2805,8 @@ function drupal_add_html_head_link($attributes, $header = FALSE) { * (optional) A string defining the 'type' of CSS that is being added in the * $data parameter ('file', 'inline', or 'external'), or an array which can * have any or all of the following keys: - * - 'type': The type of stylesheet being added. Available options are - * 'file', 'inline' or 'external'. Defaults to 'file'. + * - 'type': The type of stylesheet being added. Available options are 'file', + * 'inline' or 'external'. Defaults to 'file'. * - 'basename': Force a basename for the file being added. Modules are * expected to use stylesheets with unique filenames, but integration of * external libraries may make this impossible. The basename of @@ -2831,26 +2823,26 @@ function drupal_add_html_head_link($attributes, $header = FALSE) { * loading a stylesheet within a higher weight group, so CSS within higher * weight groups take precendence over CSS within lower weight groups. * - 'every_page': For optimal front-end performance when aggregation is - * enabled, this should be set to TRUE if the stylesheet is present on - * every page of the website for users for whom it is present at all. This - * defaults to FALSE. It is set to TRUE for stylesheets added via module - * and theme .info files. Modules that add stylesheets within hook_init() + * enabled, this should be set to TRUE if the stylesheet is present on every + * page of the website for users for whom it is present at all. This + * defaults to FALSE. It is set to TRUE for stylesheets added via module and + * theme .info files. Modules that add stylesheets within hook_init() * implementations, or from other code that ensures that the stylesheet is * added to all website pages, should also set this flag to TRUE. All * stylesheets within the same group that have the 'every_page' flag set to * TRUE and do not have 'preprocess' set to FALSE are aggregated together * into a single aggregate file, and that aggregate file can be reused * across a user's entire site visit, leading to faster navigation between - * pages. However, stylesheets that are only needed on pages less - * frequently visited, can be added by code that only runs for those - * particular pages, and that code should not set the 'every_page' flag. - * This minimizes the size of the aggregate file that the user needs to - * download when first visiting the website. Stylesheets without the - * 'every_page' flag are aggregated into a separate aggregate file. This - * other aggregate file is likely to change from page to page, and each - * new aggregate file needs to be downloaded when first encountered, so it - * should be kept relatively small by ensuring that most commonly needed - * stylesheets are added to every page. + * pages. However, stylesheets that are only needed on pages less frequently + * visited, can be added by code that only runs for those particular pages, + * and that code should not set the 'every_page' flag. This minimizes the + * size of the aggregate file that the user needs to download when first + * visiting the website. Stylesheets without the 'every_page' flag are + * aggregated into a separate aggregate file. This other aggregate file is + * likely to change from page to page, and each new aggregate file needs to + * be downloaded when first encountered, so it should be kept relatively + * small by ensuring that most commonly needed stylesheets are added to + * every page. * - 'weight': The weight of the stylesheet specifies the order in which the * CSS will appear relative to other stylesheets with the same group and * 'every_page' flag. The exact ordering of stylesheets is as follows: @@ -2859,8 +2851,8 @@ function drupal_add_html_head_link($attributes, $header = FALSE) { * - Then by weight. * - Then by the order in which the CSS was added. For example, all else * being the same, a stylesheet added by a call to drupal_add_css() that - * happened later in the page request gets added to the page after one - * for which drupal_add_css() happened earlier in the page request. + * happened later in the page request gets added to the page after one for + * which drupal_add_css() happened earlier in the page request. * - 'media': The media type for the stylesheet, e.g., all, print, screen. * Defaults to 'all'. * - 'preprocess': If TRUE and CSS aggregation/compression is enabled, the @@ -2951,8 +2943,8 @@ function drupal_add_css($data = NULL, $options = NULL) { * stylesheets array is used instead. * @param $skip_alter * (optional) If set to TRUE, this function skips calling drupal_alter() on - * $css, useful when the calling function passes a $css array that has - * already been altered. + * $css, useful when the calling function passes a $css array that has already + * been altered. * * @return * A string of XHTML CSS tags. @@ -3062,13 +3054,13 @@ function drupal_sort_css_js($a, $b) { * 31 CSS inclusion tag limit: http://drupal.org/node/228818. * * This function puts multiple items into the same group if they are groupable - * and if they are for the same 'media' and 'browsers'. Items of the 'file' - * type are groupable if their 'preprocess' flag is TRUE, items of the 'inline' - * type are always groupable, and items of the 'external' type are never - * groupable. This function also ensures that the process of grouping items - * does not change their relative order. This requirement may result in - * multiple groups for the same type, media, and browsers, if needed to - * accommodate other items in between. + * and if they are for the same 'media' and 'browsers'. Items of the 'file' type + * are groupable if their 'preprocess' flag is TRUE, items of the 'inline' type + * are always groupable, and items of the 'external' type are never groupable. + * This function also ensures that the process of grouping items does not change + * their relative order. This requirement may result in multiple groups for the + * same type, media, and browsers, if needed to accommodate other items in + * between. * * @param $css * An array of CSS items, as returned by drupal_add_css(), but after @@ -3213,28 +3205,28 @@ function drupal_aggregate_css(&$css_groups) { * (http://drupal.org/node/228818) and LINK tags are limited to one file per * tag, whereas STYLE tags can contain multiple @import statements allowing * multiple files to be loaded per tag. When CSS aggregation is disabled, a - * Drupal site can easily have more than 31 CSS files that need to be loaded, - * so using LINK tags exclusively would result in a site that would display + * Drupal site can easily have more than 31 CSS files that need to be loaded, so + * using LINK tags exclusively would result in a site that would display * incorrectly in IE. Depending on different needs, different strategies can be * employed to decide when to use LINK tags and when to use STYLE tags. * * The strategy employed by this function is to use LINK tags for all aggregate * files and for all files that cannot be aggregated (e.g., if 'preprocess' is * set to FALSE or the type is 'external'), and to use STYLE tags for groups - * of files that could be aggregated together but aren't (e.g., if the - * site-wide aggregation setting is disabled). This results in all LINK tags - * when aggregation is enabled, a guarantee that as many or only slightly more - * tags are used with aggregation disabled than enabled (so that if the limit - * were to be crossed with aggregation enabled, the site developer would also - * notice the problem while aggregation is disabled), and an easy way for a - * developer to view HTML source while aggregation is disabled and know what - * files will be aggregated together when aggregation becomes enabled. - * - * This function evaluates the aggregation enabled/disabled condition on a - * group-by-group basis by testing whether an aggregate file has been made for - * the group rather than by testing the site-wide aggregation setting. This - * allows this function to work correctly even if modules have implemented - * custom logic for grouping and aggregating files. + * of files that could be aggregated together but aren't (e.g., if the site-wide + * aggregation setting is disabled). This results in all LINK tags when + * aggregation is enabled, a guarantee that as many or only slightly more tags + * are used with aggregation disabled than enabled (so that if the limit were to + * be crossed with aggregation enabled, the site developer would also notice the + * problem while aggregation is disabled), and an easy way for a developer to + * view HTML source while aggregation is disabled and know what files will be + * aggregated together when aggregation becomes enabled. + * + * This function evaluates the aggregation enabled/disabled condition on a group + * by group basis by testing whether an aggregate file has been made for the + * group rather than by testing the site-wide aggregation setting. This allows + * this function to work correctly even if modules have implemented custom + * logic for grouping and aggregating files. * * @param $element * A render array containing: @@ -3681,15 +3673,13 @@ function drupal_delete_file_if_stale($uri) { /** * Prepares a string for use as a CSS identifier (element, class, or ID name). * - * http://www.w3.org/TR/CSS21/syndata.html#characters shows the syntax for - * valid CSS identifiers (including element names, classes, and IDs in - * selectors.) + * http://www.w3.org/TR/CSS21/syndata.html#characters shows the syntax for valid + * CSS identifiers (including element names, classes, and IDs in selectors.) * * @param $identifier * The identifier to clean. * @param $filter * An array of string replacements to use on the identifier. - * * @return * The cleaned identifier. */ @@ -3850,15 +3840,15 @@ function drupal_region_class($region) { * * The behavior of this function depends on the parameters it is called with. * Generally, it handles the addition of JavaScript to the page, either as - * reference to an existing file or as inline code. The following actions can - * be performed using this function: + * reference to an existing file or as inline code. The following actions can be + * performed using this function: * - Add a file ('file'): Adds a reference to a JavaScript file to the page. * - Add inline JavaScript code ('inline'): Executes a piece of JavaScript code * on the current page by placing the code directly in the page (for example, * to tell the user that a new message arrived, by opening a pop up, alert - * box, etc.). This should only be used for JavaScript that cannot be - * executed from a file. When adding inline code, make sure that you are not - * relying on $() being the jQuery function. Wrap your code in + * box, etc.). This should only be used for JavaScript that cannot be executed + * from a file. When adding inline code, make sure that you are not relying on + * $() being the jQuery function. Wrap your code in * @code (function ($) {... })(jQuery); @endcode * or use jQuery() instead of $(). * - Add external JavaScript ('external'): Allows the inclusion of external @@ -3894,8 +3884,8 @@ function drupal_region_class($region) { * to request overhead, one bigger file just loads faster than two smaller ones * half its size." * - * $options['preprocess'] should be only set to TRUE when a file is required - * for all typical visitors and most pages of a site. It is critical that all + * $options['preprocess'] should be only set to TRUE when a file is required for + * all typical visitors and most pages of a site. It is critical that all * preprocessed files are added unconditionally on every page, even if the * files are not needed on a page. This is normally done by calling * drupal_add_js() in a hook_init() implementation. @@ -3912,10 +3902,10 @@ function drupal_region_class($region) { * JavaScript aggregation is enabled. * - 'setting': An associative array with configuration options. The array is * merged directly into Drupal.settings. All modules should wrap their - * actual configuration settings in another variable to prevent conflicts - * in the Drupal.settings namespace. Items added with a string key will - * replace existing settings with that key; items with numeric array keys - * will be added to the existing settings array. + * actual configuration settings in another variable to prevent conflicts in + * the Drupal.settings namespace. Items added with a string key will replace + * existing settings with that key; items with numeric array keys will be + * added to the existing settings array. * @param $options * (optional) A string defining the type of JavaScript that is being added in * the $data parameter ('file'/'setting'/'inline'/'external'), or an @@ -3936,8 +3926,8 @@ function drupal_region_class($region) { * group is presented on the page before JavaScript within a higher weight * group. * - every_page: For optimal front-end performance when aggregation is - * enabled, this should be set to TRUE if the JavaScript is present on - * every page of the website for users for whom it is present at all. This + * enabled, this should be set to TRUE if the JavaScript is present on every + * page of the website for users for whom it is present at all. This * defaults to FALSE. It is set to TRUE for JavaScript files that are added * via module and theme .info files. Modules that add JavaScript within * hook_init() implementations, or from other code that ensures that the @@ -3961,12 +3951,12 @@ function drupal_region_class($region) { * and 'every_page' value. In some cases, the order in which the JavaScript * is presented on the page is very important. jQuery, for example, must be * added to the page before any jQuery code is run, so jquery.js uses the - * JS_LIBRARY group and a weight of -20, jquery.once.js (a library - * drupal.js depends on) uses the JS_LIBRARY group and a weight of -19, - * drupal.js uses the JS_LIBRARY group and a weight of -1, other libraries - * use the JS_LIBRARY group and a weight of 0 or higher, and all other - * scripts use one of the other group constants. The exact ordering of - * JavaScript is as follows: + * JS_LIBRARY group and a weight of -20, jquery.once.js (a library drupal.js + * depends on) uses the JS_LIBRARY group and a weight of -19, drupal.js uses + * the JS_LIBRARY group and a weight of -1, other libraries use the + * JS_LIBRARY group and a weight of 0 or higher, and all other scripts use + * one of the other group constants. The exact ordering of JavaScript is as + * follows: * - First by scope, with 'header' first, 'footer' last, and any other * scopes provided by a custom theme coming in between, as determined by * the theme. @@ -3974,9 +3964,9 @@ function drupal_region_class($region) { * - Then by the 'every_page' flag, with TRUE coming before FALSE. * - Then by weight. * - Then by the order in which the JavaScript was added. For example, all - * else being the same, JavaScript added by a call to drupal_add_js() - * that happened later in the page request gets added to the page after - * one for which drupal_add_js() happened earlier in the page request. + * else being the same, JavaScript added by a call to drupal_add_js() that + * happened later in the page request gets added to the page after one for + * which drupal_add_js() happened earlier in the page request. * - defer: If set to TRUE, the defer attribute is set on the <script> * tag. Defaults to FALSE. * - cache: If set to FALSE, the JavaScript file is loaded anew on every page @@ -4285,8 +4275,8 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS * * Libraries, JavaScript, CSS and other types of custom structures are attached * to elements using the #attached property. The #attached property is an - * associative array, where the keys are the the attachment types and the - * values are the attached data. For example: + * associative array, where the keys are the the attachment types and the values + * are the attached data. For example: * @code * $build['#attached'] = array( * 'js' => array(drupal_get_path('module', 'taxonomy') . '/taxonomy.js'), @@ -4323,9 +4313,9 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS * set to FALSE, will continue to add the libraries, even though one or more * dependencies are missing. Defaults to FALSE. * @param $every_page - * Set to TRUE to indicate that the attachments are added to every page on - * the site. Only attachments with the every_page flag set to TRUE can - * participate in JavaScript/CSS aggregation. + * Set to TRUE to indicate that the attachments are added to every page on the + * site. Only attachments with the every_page flag set to TRUE can participate + * in JavaScript/CSS aggregation. * * @return * FALSE if there were any missing library dependencies; TRUE if all library @@ -4406,8 +4396,8 @@ function drupal_process_attached($elements, $group = JS_DEFAULT, $dependency_che * * A "state" means a certain property on a DOM element, such as "visible" or * "checked". A state can be applied to an element, depending on the state of - * another element on the page. In general, states depend on HTML attributes - * and DOM element properties, which change due to user interaction. + * another element on the page. In general, states depend on HTML attributes and + * DOM element properties, which change due to user interaction. * * Since states are driven by JavaScript only, it is important to understand * that all states are applied on presentation only, none of the states force @@ -4586,9 +4576,9 @@ function drupal_add_library($module, $name, $every_page = NULL) { * * Library information is statically cached. Libraries are keyed by module for * several reasons: - * - Libraries are not unique. Multiple modules might ship with the same - * library in a different version or variant. This registry cannot (and does - * not attempt to) prevent library conflicts. + * - Libraries are not unique. Multiple modules might ship with the same library + * in a different version or variant. This registry cannot (and does not + * attempt to) prevent library conflicts. * - Modules implementing and thereby depending on a library that is registered * by another module can only rely on that module's library. * - Two (or more) modules can still register the same library and use it @@ -4601,10 +4591,9 @@ function drupal_add_library($module, $name, $every_page = NULL) { * libraries registered by $module are returned. * * @return - * The definition of the requested library, if $name was passed and it - * exists, or FALSE if it does not exist. If no $name was passed, an - * associative array of libraries registered by $module is returned (which - * may be empty). + * The definition of the requested library, if $name was passed and it exists, + * or FALSE if it does not exist. If no $name was passed, an associative array + * of libraries registered by $module is returned (which may be empty). * * @see drupal_add_library() * @see hook_library_info() @@ -4648,10 +4637,9 @@ function drupal_get_library($module, $name = NULL) { /** * Assists in adding the tableDrag JavaScript behavior to a themed table. * - * Draggable tables should be used wherever an outline or list of sortable - * items needs to be arranged by an end-user. Draggable tables are very - * flexible and can manipulate the value of form elements placed within - * individual columns. + * Draggable tables should be used wherever an outline or list of sortable items + * needs to be arranged by an end-user. Draggable tables are very flexible and + * can manipulate the value of form elements placed within individual columns. * * To set up a table to use drag and drop in place of weight select-lists or * in place of a form that contains parent relationships, the form must be @@ -4665,14 +4653,14 @@ function drupal_get_library($module, $name = NULL) { * In the theme function for the form, a special class must be added to each * form element within the same column, "grouping" them together. * - * In a situation where a single weight column is being sorted in the table, - * the classes could be added like this (in the theme function): + * In a situation where a single weight column is being sorted in the table, the + * classes could be added like this (in the theme function): * @code * $form['my_elements'][$delta]['weight']['#attributes']['class'] = array('my-elements-weight'); * @endcode * - * Each row of the table must also have a class of "draggable" in order to - * enable the drag handles: + * Each row of the table must also have a class of "draggable" in order to enable the + * drag handles: * @code * $row = array(...); * $rows[] = array( @@ -4692,8 +4680,8 @@ function drupal_get_library($module, $name = NULL) { * @endcode * * In a more complex case where there are several groups in one column (such as - * the block regions on the admin/structure/block page), a separate subgroup - * class must also be added to differentiate the groups. + * the block regions on the admin/structure/block page), a separate subgroup class + * must also be added to differentiate the groups. * @code * $form['my_elements'][$region][$delta]['weight']['#attributes']['class'] = array('my-elements-weight', 'my-elements-weight-' . $region); * @endcode @@ -4714,12 +4702,12 @@ function drupal_get_library($module, $name = NULL) { * See theme_menu_overview_form() for an example creating a table containing * parent relationships. * - * Please note that this function should be called from the theme layer, such - * as in a .tpl.php file, theme_ function, or in a template_preprocess - * function, not in a form declaration. Though the same JavaScript could be - * added to the page using drupal_add_js() directly, this function helps keep - * template files clean and readable. It also prevents tabledrag.js from - * being added twice accidentally. + * Please note that this function should be called from the theme layer, such as + * in a .tpl.php file, theme_ function, or in a template_preprocess function, + * not in a form declaration. Though the same JavaScript could be added to the + * page using drupal_add_js() directly, this function helps keep template files + * clean and readable. It also prevents tabledrag.js from being added twice + * accidentally. * * @param $table_id * String containing the target table's id attribute. If the table does not @@ -4727,8 +4715,8 @@ function drupal_get_library($module, $name = NULL) { * @param $action * String describing the action to be done on the form item. Either 'match' * 'depth', or 'order'. Match is typically used for parent relationships. - * Order is typically used to set weights on other form elements with the - * same group. Depth updates the target element with the current indentation. + * Order is typically used to set weights on other form elements with the same + * group. Depth updates the target element with the current indentation. * @param $relationship * String describing where the $action variable should be performed. Either * 'parent', 'sibling', 'group', or 'self'. Parent will only look for fields @@ -4738,8 +4726,8 @@ function drupal_get_library($module, $name = NULL) { * @param $group * A class name applied on all related form elements for this action. * @param $subgroup - * (optional) If the group has several subgroups within it, this string - * should contain the class name identifying fields in the same subgroup. + * (optional) If the group has several subgroups within it, this string should + * contain the class name identifying fields in the same subgroup. * @param $source * (optional) If the $action is 'match', this string should contain the class * name identifying what field will be used as the source value when matching @@ -4750,7 +4738,6 @@ function drupal_get_library($module, $name = NULL) { * column should not be hidden. * @param $limit * (optional) Limit the maximum amount of parenting in this table. - * * @see block-admin-display-form.tpl.php * @see theme_menu_overview_form() */ @@ -5190,17 +5177,16 @@ function drupal_cron_cleanup() { * @param string $key * The key to be used for the associative array returned. Possible values are * 'uri', for the file's URI; 'filename', for the basename of the file; and - * 'name' for the name of the file without the extension. If you choose - * 'name' or 'filename', only the highest-precedence file will be returned. + * 'name' for the name of the file without the extension. If you choose 'name' + * or 'filename', only the highest-precedence file will be returned. * @param int $min_depth * Minimum depth of directories to return files from, relative to each * directory searched. For instance, a minimum depth of 2 would find modules * inside /modules/node/tests, but not modules directly in /modules/node. * * @return array - * An associative array of file objects, keyed on the chosen key. Each - * element in the array is an object containing file information, with - * properties: + * An associative array of file objects, keyed on the chosen key. Each element + * in the array is an object containing file information, with properties: * - 'uri': Full URI of the file. * - 'filename': File name. * - 'name': Name of file without the extension. @@ -5540,12 +5526,10 @@ function drupal_pre_render_markup($elements) { * Renders the page, including all theming. * * @param $page - * A string or array representing the content of a page. The array consists - * of the following keys: - * - #type: Value is always 'page'. This pushes the theming through - * page.tpl.php. Required. - * - #show_messages: (optional) Suppress drupal_get_message() items. Used by - * Batch API. + * A string or array representing the content of a page. The array consists of + * the following keys: + * - #type: Value is always 'page'. This pushes the theming through page.tpl.php (required). + * - #show_messages: Suppress drupal_get_message() items. Used by Batch API (optional). * * @see hook_page_alter() * @see element_info() @@ -5620,23 +5604,22 @@ function drupal_render_page($page) { * the form markup itself. * * drupal_render() can optionally cache the rendered output of elements to - * improve performance. To use drupal_render() caching, set the element's - * #cache property to an associative array with one or several of the - * following keys: - * - 'keys': An array of one or more keys that identify the element. If 'keys' - * is set, the cache ID is created automatically from these keys. See - * drupal_render_cid_create(). - * - 'granularity' (optional): Define the cache granularity using binary - * combinations of the cache granularity constants, e.g. - * DRUPAL_CACHE_PER_USER to cache for each user separately or - * DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to cache separately for each - * page and role. If not specified the element is cached globally for each - * theme and language. - * - 'cid': Specify the cache ID directly. Either 'keys' or 'cid' is required. - * If 'cid' is set, 'keys' and 'granularity' are ignored. Use only if you - * have special requirements. - * - 'expire': Set to one of the cache lifetime constants. - * - 'bin': Specify a cache bin to cache the element in. Defaults to 'cache'. + * improve performance. To use drupal_render() caching, set the element's #cache + * property to an associative array with one or several of the following keys: + * - 'keys': An array of one or more keys that identify the element. If 'keys' + * is set, the cache ID is created automatically from these keys. See + * drupal_render_cid_create(). + * - 'granularity' (optional): Define the cache granularity using binary + * combinations of the cache granularity constants, e.g. DRUPAL_CACHE_PER_USER + * to cache for each user separately or + * DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to cache separately for each + * page and role. If not specified the element is cached globally for each + * theme and language. + * - 'cid': Specify the cache ID directly. Either 'keys' or 'cid' is required. + * If 'cid' is set, 'keys' and 'granularity' are ignored. Use only if you + * have special requirements. + * - 'expire': Set to one of the cache lifetime constants. + * - 'bin': Specify a cache bin to cache the element in. Defaults to 'cache'. * * This function is usually called from within another function, like * drupal_get_form() or a theme function. Elements are sorted internally @@ -5775,8 +5758,8 @@ function drupal_render(&$elements) { * @param $element * The structured array whose children shall be rendered. * @param $children_keys - * If the keys of the element's children are already known, they can be - * passed in to save another run of element_children(). + * If the keys of the element's children are already known, they can be passed + * in to save another run of element_children(). */ function drupal_render_children(&$element, $children_keys = NULL) { if ($children_keys === NULL) { @@ -6030,10 +6013,9 @@ function drupal_render_cache_by_query($query, $function, $expire = CACHE_TEMPORA * Returns cache ID parts for building a cache ID. * * @param $granularity - * One or more cache granularity constants, e.g. DRUPAL_CACHE_PER_USER to - * cache for each user separately or - * DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to cache separately for - * each page and role. + * One or more cache granularity constants, e.g. DRUPAL_CACHE_PER_USER to cache + * for each user separately or DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE to + * cache separately for each page and role. * * @return * An array of cache ID parts, always containing the active theme. If the @@ -6329,11 +6311,11 @@ function element_get_visible_children(array $elements) { * @param $element * The renderable element to process. * @param $map - * An associative array whose keys are element property names and whose - * values are the HTML attribute names to set for corresponding the property; - * e.g., array('#propertyname' => 'attributename'). If both names are - * identical except for the leading '#', then an attribute name value is - * sufficient and no property name needs to be specified. + * An associative array whose keys are element property names and whose values + * are the HTML attribute names to set for corresponding the property; e.g., + * array('#propertyname' => 'attributename'). If both names are identical + * except for the leading '#', then an attribute name value is sufficient and + * no property name needs to be specified. */ function element_set_attributes(array &$element, array $map) { foreach ($map as $property => $attribute) { @@ -6372,11 +6354,11 @@ function element_set_attributes(array &$element, array $map) { * To deal with the situation, the code needs to figure out the route to the * element, given an array of parents that is either * @code array('signature_settings', 'signature') @endcode in the first case or - * @code array('signature_settings', 'user', 'signature') @endcode in the - * second case. + * @code array('signature_settings', 'user', 'signature') @endcode in the second + * case. * - * Without this helper function the only way to set the signature element in - * one line would be using eval(), which should be avoided: + * Without this helper function the only way to set the signature element in one + * line would be using eval(), which should be avoided: * @code * // Do not do this! Avoid eval(). * eval('$form[\'' . implode("']['", $parents) . '\'] = $element;'); @@ -6387,9 +6369,9 @@ function element_set_attributes(array &$element, array $map) { * drupal_array_set_nested_value($form, $parents, $element); * @endcode * - * However if the number of array parent keys is static, the value should - * always be set directly rather than calling this function. For instance, for - * the first example we could just do: + * However if the number of array parent keys is static, the value should always + * be set directly rather than calling this function. For instance, for the + * first example we could just do: * @code * $form['signature_settings']['signature'] = $element; * @endcode @@ -6424,9 +6406,9 @@ function drupal_array_set_nested_value(array &$array, array $parents, $value, $f /** * Retrieves a value from a nested array with variable depth. * - * This helper function should be used when the depth of the array element - * being retrieved may vary (that is, the number of parent keys is variable). - * It is primarily used for form structures and renderable arrays. + * This helper function should be used when the depth of the array element being + * retrieved may vary (that is, the number of parent keys is variable). It is + * primarily used for form structures and renderable arrays. * * Without this helper function the only way to get a nested array value with * variable depth in one line would be using eval(), which should be avoided: @@ -6441,8 +6423,8 @@ function drupal_array_set_nested_value(array &$array, array $parents, $value, $f * $value = drupal_array_get_nested_value($form, $parents); * @endcode * - * The return value will be NULL, regardless of whether the actual value is - * NULL or whether the requested key does not exist. If it is required to know + * The return value will be NULL, regardless of whether the actual value is NULL + * or whether the requested key does not exist. If it is required to know * whether the nested array key actually exists, pass a third argument that is * altered by reference: * @code @@ -6453,9 +6435,8 @@ function drupal_array_set_nested_value(array &$array, array $parents, $value, $f * } * @endcode * - * However if the number of array parent keys is static, the value should - * always be retrieved directly rather than calling this function. For - * instance: + * However if the number of array parent keys is static, the value should always + * be retrieved directly rather than calling this function. For instance: * @code * $value = $form['signature_settings']['signature']; * @endcode @@ -6472,8 +6453,8 @@ function drupal_array_set_nested_value(array &$array, array $parents, $value, $f * The requested nested value. Possibly NULL if the value is NULL or not all * nested parent keys exist. $key_exists is altered by reference and is a * Boolean that indicates whether all nested parent keys exist (TRUE) or not - * (FALSE). This allows to distinguish between the two possibilities when - * NULL is returned. + * (FALSE). This allows to distinguish between the two possibilities when NULL + * is returned. * * @see drupal_array_set_nested_value() */ @@ -6495,8 +6476,8 @@ function drupal_array_get_nested_value(array &$array, array $parents, &$key_exis /** * Determines whether a nested array contains the requested keys. * - * This helper function should be used when the depth of the array element to - * be checked may vary (that is, the number of parent keys is variable). See + * This helper function should be used when the depth of the array element to be + * checked may vary (that is, the number of parent keys is variable). See * drupal_array_set_nested_value() for details. It is primarily used for form * structures and renderable arrays. * @@ -6890,9 +6871,9 @@ function drupal_schema_fields_sql($table, $prefix = NULL) { * An object or array representing the record to write, passed in by * reference. If inserting a new record, values not provided in $record will * be populated in $record and in the database with the default values from - * the schema, as well as a single serial (auto-increment) field (if - * present). If updating an existing record, only provided values are - * updated in the database, and $record is not modified. + * the schema, as well as a single serial (auto-increment) field (if present). + * If updating an existing record, only provided values are updated in the + * database, and $record is not modified. * @param $primary_keys * To indicate that this is a new record to be inserted, omit this argument. * If this is an update, this argument specifies the primary keys' field @@ -7050,8 +7031,7 @@ function drupal_write_record($table, &$record, $primary_keys = array()) { * Information stored in a module .info file: * - name: The real name of the module for display purposes. * - description: A brief description of the module. - * - dependencies: An array of shortnames of other modules this module - * requires. + * - dependencies: An array of shortnames of other modules this module requires. * - package: The name of the package of modules this module belongs to. * * See forum.info for an example of a module .info file.