function panels_context_get_keywords in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/plugins.inc \panels_context_get_keywords()
Fetch keywords for use in string substitutions.
Parameters
$contexts: An array of contexts.
Return value
An array of keyword substitutions suitable for strtr()
1 call to panels_context_get_keywords()
- panels_page_view_page in panels_page/
panels_page.module - Page callback to view a panel page.
File
- includes/
plugins.inc, line 1112 - plugins.inc
Code
function panels_context_get_keywords($contexts) {
$keywords = array();
foreach ($contexts as $id => $context) {
if ($keyword = $context
->get_keyword()) {
$keywords["%{$keyword}"] = $context
->get_title();
}
}
return $keywords;
}