Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
6511f56e
Commit
6511f56e
authored
Sep 02, 2008
by
Dries
Browse files
- Patch
#232345
by flobruit: theme_get_registry docs and code conflict.
parent
32981b11
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/theme.inc
View file @
6511f56e
...
...
@@ -196,26 +196,29 @@ function _init_theme($theme, $base_theme = array(), $registry_callback = '_theme
}
/**
* Retrieve the stored theme registry. If the theme registry is already
* in memory it will be returned; otherwise it will attempt to load the
* registry from cache. If this fails, it will construct the registry and
* cache it.
* Get the theme registry.
* @return
* The theme registry array if it has been stored in memory, NULL otherwise.
*/
function
theme_get_registry
(
$registry
=
NULL
)
{
static
$theme_registry
=
NULL
;
if
(
isset
(
$registry
))
{
$theme_registry
=
$registry
;
}
return
$theme_registry
;
function
theme_get_registry
()
{
return
_theme_set_registry
();
}
/**
* Store the theme registry in memory.
* @param $registry
* A registry array as returned by _theme_build_registry()
* @return
* The theme registry array stored in memory
*/
function
_theme_set_registry
(
$registry
)
{
// Pass through for setting of static variable.
return
theme_get_registry
(
$registry
);
function
_theme_set_registry
(
$registry
=
NULL
)
{
static
$theme_registry
=
NULL
;
if
(
isset
(
$registry
))
{
$theme_registry
=
$registry
;
}
return
$theme_registry
;
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment