summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/bootstrap.inc2
-rw-r--r--includes/theme.inc5
-rw-r--r--modules/system/system.api.php7
3 files changed, 14 insertions, 0 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 90b5765d9..827ac7761 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1405,6 +1405,7 @@ function drupal_unpack($obj, $field = 'data') {
* 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
@@ -1424,6 +1425,7 @@ function drupal_unpack($obj, $field = 'data') {
* 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/includes/theme.inc b/includes/theme.inc
index d1864c836..9f93d2004 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -874,6 +874,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_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()
@@ -885,6 +886,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'.
*
+ * @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
@@ -897,6 +899,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_preprocess_templates Preprocessing for Template Files
* 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
@@ -945,12 +948,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_preprocess_theme_funcs Preprocessing for Theme 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_suggestions Suggesting Alternate Hooks
* 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/modules/system/system.api.php b/modules/system/system.api.php
index d8b7864e4..77d2b964c 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -956,6 +956,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
@@ -980,6 +981,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
@@ -1022,6 +1024,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_wildcards Wildcards in Paths
+ * @subsection sub_simple_wildcards Simple Wildcards
* Wildcards within paths also work with integer substitution. For example,
* your module could register path 'my-module/%/edit':
* @code
@@ -1034,6 +1038,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_autoload_wildcards Auto-Loader Wildcards
* 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
@@ -1065,6 +1070,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_argument_wildcards Argument Wildcards
* 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
@@ -1089,6 +1095,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