There are several theming-related functions that aren't on the current docs page: http://api.drupal.org/api/group/themeable/7 Very few of the preprocess/process functions are listed. None of tpls are listed; and I'm not sure if its possible to list the tpls, but I'll try.

Over in #563708: Improve theme_get_setting() and make custom theme settings a true form_alter, Dries requested that we create a theme.api.php file to hold that new theme hook. It would also make sense to move the main themable docs from theme.inc (where it gets parsed on every page load) into this new theme.api.php file.

Comments

johnalbin’s picture

Status: Active » Needs work
StatusFileSize
new12.23 KB

The attached patch is just my work to-date. It needs work.

johnalbin’s picture

See related #716496: Theme functions group needs some updates.

Hashing out the best way to tackle these two issue in #drupal-docs right now.

jhodgdon’s picture

From IRC: Make modules/system/theme.api.php, and put the @defgroup for themeable in that file is an OK change.

johnalbin’s picture

Title: Consolidate Theming API documentation » Create theme.api.php to help consolidate theme-related docs.

Ok. Let's just use this issue to create a new modules/system/theme.api.php file and move some docs over to it.

We can tackle the actual docs wording changes over in #716496: Theme functions group needs some updates. That will make the changes more transparent in CVS history.

johnalbin’s picture

Status: Needs work » Needs review
StatusFileSize
new10.23 KB

This patch:

  1. Removes the @ingroup themable from the @file docblock at the top of includes/theme.inc. All the functions currently showing on http://api.drupal.org/api/group/themeable/7 are inside the current @defgroup themeable block, so this @ingroup is not necessary.
  2. Moves the @defgroup themeable from includes/theme.inc to a new modules/system/theme.api.php file.
  3. Moves the hook_form_system_theme_settings_alter out of the @ingroup hooks section of system.api.php and into the new theme.api.php file.
  4. In place of the @defgroup themable definition in theme.inc, it adds a @addtogroup themeable block.

That's it! All the other changes we need will go in the follow-up issue: #716496: Theme functions group needs some updates

johnalbin’s picture

StatusFileSize
new10.22 KB

Replaced the addtogroup with a ingroup (#4 from comment 5). Otherwise, the same.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

This patch is fine for the "moving stuff around" piece of the puzzle. As noted above, once this patch is in, we'll fix up wording and which functions are listed on #716496: Theme functions group needs some updates.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.