The primary purpose of the theme registry patch is to make it possible for Drupal core and Drupal modules to provide their theme functions directly as .tpl.php files without impacting performance too badly.
This patch requires all theme functions used by Drupal to be registered by the owning module (system.module registers on behalf of the *.inc files). This registry can declare the themes to be traditional functions, or it can declare them as templates and can declare their arguments. If declaring them as functions it can declare them in an additional file that is loaded on demand (an example is the new theme.base.inc where theme_page, theme_node and theme_block are moved; these theme functions are almost never used).
The basic template rendering engine of phptemplate has been moved to core; phptemplate.engine now primarily does just two things:
1) Discover what templates a theme is using. This means that simply dropping an appropriately named .tpl.php file into the theme directory will (after the cache is cleared) automatically be used. _phptemplate_callback is therefore no longer needed and has been completely removed.
2) Provide default variables that are common to pages. Some of this may later be trimmed down or moved into the theme itself, but that is a patch for elsewhere.
_phptemplate_variables has been changed slightly. _phptemplate_variables is now the 'private' version meant to be used by the theme engine, and phptemplate_variables (as well as THEMENAME_variables) can be used by the theme's template.php.
Additionally, phptemplate_variables_HOOKNAME has been introduced, which drastically simplifies the syntax for modifying the variables for templates. Also, phptemplate_variables now takes a reference and does not return the variables requiring a lot of array_merges.
|theme_reg.patch||64.9 KB||Ignored: Check issue status.||None||None|