diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 7dc75f5..8cca48c 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -1416,6 +1416,7 @@ function bootstrap_hooks() { * more information, including recommendations on how to break up or not * break up strings for translation. * + * @section sec_translating_vars Translating Variables * You should never use t() to translate variables, such as calling * @code t($text); @endcode, unless the text that the variable holds has been * passed through t() elsewhere (e.g., $text is one of several translated @@ -1435,6 +1436,7 @@ function bootstrap_hooks() { * Translators can then rearrange the string as necessary for the language * (e.g., in Spanish, it might be "blog de @name"). * + * @section sec_alt_funcs_install Use During Installation Phase * During the Drupal installation phase, some resources used by t() wil not be * available to code that needs localization. See st() and get_t() for * alternatives. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index d79ba17..2b1f7b1 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -839,7 +839,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * @link themeable theme function or template @endlink, by checking the theme * registry. * - * @section sec_a Function Arguments + * @section sec_theme_hooks Theme Hooks * Most commonly, the first argument to this function is the name of the theme * hook. For instance, to theme a taxonomy term, the theme hook name is * 'taxonomy_term'. Modules register theme hooks within a hook_theme() @@ -851,7 +851,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * underscores changed to hyphens, so for the 'taxonomy_term' theme hook, the * default template is 'taxonomy-term.tpl.php'. * - * @section sec_b Implementing Theme Hooks + * @subsection sub_overriding_theme_hooks Overriding Theme Hooks * Themes may also register new theme hooks within a hook_theme() * implementation, but it is more common for themes to override default * implementations provided by modules than to register entirely new theme @@ -864,7 +864,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * rendering engine, it overrides the default implementation of the 'page' theme * hook by containing a 'page.tpl.php' file within its folder structure). * - * @subsection sub_a Template Files + * @subsection sub_hook_order Hook Execution Order * If the implementation is a template file, several functions are called * before the template file is invoked, to modify the $variables array. These * fall into the "preprocessing" phase and the "processing" phase, and are @@ -913,12 +913,14 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * - THEME_process_HOOK(&$variables): Allows the theme to process the * variables specific to the theme hook. * - * @subsection sub_b Template Callbacks + * @subsection sub_restriction_function Restrictions on Functions * If the implementation is a function, only the theme-hook-specific preprocess * and process functions (the ones ending in _HOOK) are called from the * list above. This is because theme hooks with function implementations * need to be fast, and calling the non-theme-hook-specific preprocess and * process functions for them would incur a noticeable performance penalty. + * + * @subsection sub_alternate_suggestion Suggesting Alternate Functions * There are two special variables that these preprocess and process functions * can set: 'theme_hook_suggestion' and 'theme_hook_suggestions'. These will be * merged together to form a list of 'suggested' alternate theme hooks to use, diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index aa79df9..1deec52 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -554,6 +554,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * paths and whose values are an associative array of properties for each * path. (The complete list of properties is in the return value section below.) * + * @section sec_callback_funcs Callback Functions * The definition for each path may include a page callback function, which is * invoked when the registered path is requested. If there is no other * registered path that fits the requested path better, any further path @@ -578,6 +579,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * $jkl will be 'foo'. Note that this automatic passing of optional path * arguments applies only to page and theme callback functions. * + * @subsection sub_callback_arguments Callback Arguments * In addition to optional path arguments, the page callback and other callback * functions may specify argument lists as arrays. These argument lists may * contain both fixed/hard-coded argument values and integers that correspond @@ -620,6 +622,8 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * @endcode * See @link form_api Form API documentation @endlink for details. * + * @section sec_path_opers Operators in Path + * @subsection sub_wildcard_sub Wildcards and Substitution * Wildcards within paths also work with integer substitution. For example, * your module could register path 'my-module/%/edit': * @code @@ -632,6 +636,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * with 'foo' and passed to the callback function. Note that wildcards may not * be used as the first component. * + * @subsection sub_load_funcs _load() Functions * Registered paths may also contain special "auto-loader" wildcard components * in the form of '%mymodule_abc', where the '%' part means that this path * component is a wildcard, and the 'mymodule_abc' part defines the prefix for a @@ -663,6 +668,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * return FALSE for the path 'node/999/edit' if a node with a node ID of 999 * does not exist. The menu routing system will return a 404 error in this case. * + * @subsection sub_to_arg_funcs _to_arg() Functions * You can also define a %wildcard_to_arg() function (for the example menu * entry above this would be 'mymodule_abc_to_arg()'). The _to_arg() function * is invoked to retrieve a value that is used in the path in place of the @@ -687,6 +693,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * are called when the menu system is generating links to related paths, such * as the tabs for a set of MENU_LOCAL_TASK items. * + * @section sec_render_tabs Rendering Menu Items As Tabs * You can also make groups of menu items to be rendered (by default) as tabs * on a page. To do that, first create one menu item of type MENU_NORMAL_ITEM, * with your chosen path, such as 'foo'. Then duplicate that menu item, using a