本文整理汇总了PHP中i18n_menu_translated_tree函数的典型用法代码示例。如果您正苦于以下问题:PHP i18n_menu_translated_tree函数的具体用法?PHP i18n_menu_translated_tree怎么用?PHP i18n_menu_translated_tree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了i18n_menu_translated_tree函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: responsive_green_preprocess_page
/**
* Override or insert variables into the page template.
*/
function responsive_green_preprocess_page(&$vars)
{
if (isset($vars['main_menu'])) {
$vars['main_menu'] = theme('links__system_main_menu', array('links' => $vars['main_menu'], 'attributes' => array('class' => array('links', 'main-menu', 'clearfix')), 'heading' => array('text' => t('Main menu'), 'level' => 'h2', 'class' => array('element-invisible'))));
} else {
$vars['main_menu'] = FALSE;
}
if (isset($vars['secondary_menu'])) {
$vars['secondary_menu'] = theme('links__system_secondary_menu', array('links' => $vars['secondary_menu'], 'attributes' => array('class' => array('links', 'secondary-menu', 'clearfix')), 'heading' => array('text' => t('Secondary menu'), 'level' => 'h2', 'class' => array('element-invisible'))));
} else {
$vars['secondary_menu'] = FALSE;
}
if (module_exists('i18n_menu')) {
$vars['main_menu_tree'] = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));
} else {
$vars['main_menu_tree'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
}
$vars['twitter'] = theme_get_setting('twitter', 'responsive_green');
$vars['facebook'] = theme_get_setting('facebook', 'responsive_green');
$vars['googleplus'] = theme_get_setting('googleplus', 'responsive_green');
$vars['linkedin'] = theme_get_setting('linkedin', 'responsive_green');
$vars['theme_path_social'] = base_path() . drupal_get_path('theme', 'responsive_green');
$vars['display'] = theme_get_setting('display', 'responsive_green');
$vars['sdisplay'] = theme_get_setting('sdisplay', 'responsive_green');
$vars['img1'] = base_path() . drupal_get_path('theme', 'responsive_green') . '/images/slide-image-1.jpg';
$vars['img2'] = base_path() . drupal_get_path('theme', 'responsive_green') . '/images/slide-image-2.jpg';
$vars['img3'] = base_path() . drupal_get_path('theme', 'responsive_green') . '/images/slide-image-3.jpg';
}
示例2: stability_process_page
/**
* Implementation of hook_preprocess_page().
*/
function stability_process_page(&$variables)
{
global $user;
$variables['login_account_links'] = '';
if (theme_get_setting('login_account_links') || module_exists('uc_cart')) {
$output = '';
if (theme_get_setting('login_account_links')) {
$output .= '<span class="login">
<i class="fa fa-lock"></i> ' . l($user->uid ? t('My Account') : t('Login'), 'user') . '
</span>';
$output .= $user->uid ? '<span class="logout"><i class="fa fa-sign-out"></i> ' . l(t('Logout'), 'user/logout') . '</span>' : '';
$output .= !$user->uid ? '<span class="register"><i class="fa fa-pencil-square-o"></i>' . t('Not a Member?') . ' ' . l(t('Register'), 'user/register') . '</span>' : '';
}
if (module_exists('uc_cart')) {
$output .= '<span class="cart">
<i class="fa fa-shopping-cart"></i> ' . l(t('Shopping Cart'), 'cart') . '
</span>';
}
$variables['login_account_links'] = '
<div class="header-top-right">
' . $output . '
</div>';
}
$header_top_menu_tree = module_exists('i18n_menu') ? i18n_menu_translated_tree('menu-header-top-menu') : menu_tree('menu-header-top-menu');
$variables['header_top_menu_tree'] = drupal_render($header_top_menu_tree);
// Process Slideshow Sub Header
if (theme_get_setting('sub_header') == 5 || arg(2) == 'sub-header' && arg(3) == '5') {
drupal_add_js(drupal_get_path('theme', 'stability') . '/vendor/jquery.glide.min.js');
}
if (theme_get_setting('retina')) {
drupal_add_js(drupal_get_path('theme', 'stability') . '/vendor/jquery.retina.js');
}
drupal_add_js(array('stability' => array('flickr_id' => theme_get_setting('flickr_id'), 'logo_sticky' => theme_get_setting('logo_sticky'))), 'setting');
}
示例3: bluez_preprocess_page
/**
* Override or insert variables into the page template.
*/
function bluez_preprocess_page(&$vars)
{
$vars['twitter'] = theme_get_setting('twitter', 'bluez');
$vars['facebook'] = theme_get_setting('facebook', 'bluez');
$vars['linkedin'] = theme_get_setting('linkedin', 'bluez');
$vars['theme_path_social'] = base_path() . drupal_get_path('theme', 'bluez');
$vars['display'] = theme_get_setting('display', 'bluez');
$vars['footer_copyright'] = theme_get_setting('footer_copyright');
$vars['footer_developed'] = theme_get_setting('footer_developed');
$vars['footer_developedby_url'] = filter_xss_admin(theme_get_setting('footer_developedby_url', 'bluez'));
$vars['footer_developedby'] = filter_xss_admin(theme_get_setting('footer_developedby', 'bluez'));
$vars['searchblock'] = module_invoke('search', 'block_view', 'form');
if (module_exists('i18n_menu')) {
$vars['main_menu_tree'] = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));
} else {
$vars['main_menu_tree'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
}
// Frontpage variables.
$vars['slideshow_display'] = theme_get_setting('slideshow_display', 'bluez');
$vars['slide1_title'] = theme_get_setting('slide1_title', 'bluez');
$vars['slide2_title'] = theme_get_setting('slide2_title', 'bluez');
$vars['slide3_title'] = theme_get_setting('slide3_title', 'bluez');
$vars['slide1_desc'] = theme_get_setting('slide1_desc', 'bluez');
$vars['slide2_desc'] = theme_get_setting('slide2_desc', 'bluez');
$vars['slide3_desc'] = theme_get_setting('slide3_desc', 'bluez');
$vars['wtitle'] = filter_xss_admin(theme_get_setting('welcome_title', 'bluez'));
$vars['wtext'] = filter_xss_admin(theme_get_setting('welcome_text', 'bluez'));
$vars['col1'] = filter_xss_admin(theme_get_setting('colone', 'bluez'));
$vars['col1title'] = filter_xss_admin(theme_get_setting('colonetitle', 'bluez'));
$vars['col2'] = filter_xss_admin(theme_get_setting('coltwo', 'bluez'));
$vars['col2title'] = filter_xss_admin(theme_get_setting('coltwotitle', 'bluez'));
$vars['col3'] = filter_xss_admin(theme_get_setting('colthree', 'bluez'));
$vars['col3title'] = filter_xss_admin(theme_get_setting('colthreetitle', 'bluez'));
$vars['img1'] = base_path() . drupal_get_path('theme', 'bluez') . '/images/slideshow/slide-image-1.jpg';
$vars['img2'] = base_path() . drupal_get_path('theme', 'bluez') . '/images/slideshow/slide-image-2.jpg';
$vars['img3'] = base_path() . drupal_get_path('theme', 'bluez') . '/images/slideshow/slide-image-3.jpg';
$image1var = array('path' => $vars['img1'], 'alt' => $vars['slide1_title'], 'title' => $vars['slide1_title'], 'attributes' => array('class' => 'slide-img'));
$vars['slideimage1'] = theme('image', $image1var);
$image2var = array('path' => $vars['img2'], 'alt' => $vars['slide2_title'], 'title' => $vars['slide2_title'], 'attributes' => array('class' => 'slide-img'));
$vars['slideimage2'] = theme('image', $image2var);
$image3var = array('path' => $vars['img3'], 'alt' => $vars['slide3_title'], 'title' => $vars['slide3_title'], 'attributes' => array('class' => 'slide-img'));
$vars['slideimage3'] = theme('image', $image3var);
}
示例4: my_yellowed_subtheme_preprocess_page
/**
* Override or insert variables into the page template.
*/
function my_yellowed_subtheme_preprocess_page(&$vars)
{
if (isset($vars['main_menu'])) {
$vars['main_menu'] = theme('links__system_main_menu', array('links' => $vars['main_menu'], 'attributes' => array('class' => array('links', 'main-menu', 'clearfix')), 'heading' => array('text' => t('Main menu'), 'level' => 'h2', 'class' => array('element-invisible'))));
} else {
$vars['main_menu'] = FALSE;
}
if (isset($vars['secondary_menu'])) {
$vars['secondary_menu'] = theme('links__system_secondary_menu', array('links' => $vars['secondary_menu'], 'attributes' => array('class' => array('links', 'secondary-menu', 'clearfix')), 'heading' => array('text' => t('Secondary menu'), 'level' => 'h2', 'class' => array('element-invisible'))));
} else {
$vars['secondary_menu'] = FALSE;
}
if (module_exists('i18n_menu')) {
$vars['main_menu_tree'] = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));
} else {
$vars['main_menu_tree'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
}
$vars['display'] = theme_get_setting('display', 'my_yellowed_subtheme');
$vars['slideshow_display'] = theme_get_setting('slideshow_display', 'my_yellowed_subtheme');
$vars['slide1_des'] = theme_get_setting('slide1_des', 'my_yellowed_subtheme');
$vars['slide2_des'] = theme_get_setting('slide2_des', 'my_yellowed_subtheme');
$vars['slide3_des'] = theme_get_setting('slide3_des', 'my_yellowed_subtheme');
$vars['img1'] = base_path() . drupal_get_path('theme', 'my_yellowed_subtheme') . '/images/theater-seats-banner.jpg';
$vars['img2'] = base_path() . drupal_get_path('theme', 'my_yellowed_subtheme') . '/images/beer-me-bw.jpg';
$vars['img3'] = base_path() . drupal_get_path('theme', 'my_yellowed_subtheme') . '/images/duck-ramen.jpg';
$vars['twitter'] = theme_get_setting('twitter', 'my_yellowed_subtheme');
$vars['facebook'] = theme_get_setting('facebook', 'my_yellowed_subtheme');
// $vars['googleplus'] = theme_get_setting('googleplus', 'my_yellowed_subtheme');
$vars['linkedin'] = theme_get_setting('linkedin', 'my_yellowed_subtheme');
// $vars['pinterest'] = theme_get_setting('pinterest', 'my_yellowed_subtheme');
// $vars['vimeo'] = theme_get_setting('vimeo', 'my_yellowed_subtheme');
// $vars['youtube'] = theme_get_setting('youtube', 'my_yellowed_subtheme');
$vars['theme_path_social'] = base_path() . drupal_get_path('theme', 'my_yellowed_subtheme');
$vars['footer_copyright'] = theme_get_setting('footer_copyright');
$vars['footer_developed'] = theme_get_setting('footer_developed');
$vars['footer_developedby_url'] = filter_xss_admin(theme_get_setting('footer_developedby_url', 'my_yellowed_subtheme'));
$vars['footer_developedby'] = filter_xss_admin(theme_get_setting('footer_developedby', 'my_yellowed_subtheme'));
}
示例5: drupal_render
<div id="navigation-wrapper" class="clearfix">
<!-- #main-navigation -->
<nav id="main-navigation" class="main-menu clearfix" role="navigation">
<?php
if ($page['navigation']) {
?>
<?php
print drupal_render($page['navigation']);
?>
<?php
} else {
?>
<?php
if (module_exists('i18n_menu')) {
$main_menu_tree = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));
} else {
$main_menu_tree = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
}
print drupal_render($main_menu_tree);
?>
<?php
}
?>
</nav>
<!-- EOF: #main-navigation -->
</div>
<!-- EOF: #navigation-wrapper -->
</div>
示例6: base_path
?>
"><img src="<?php
print base_path() . path_to_theme();
?>
/images/banner.jpg" alt=""></a>
</div>
<!-- Banner / End -->
</div>
</div>
<!-- Navigation -->
<nav class="nav-main">
<div class="container">
<ul data-breakpoint="992" class="flexnav">
<?php
if (module_exists('tb_megamenu')) {
print theme('tb_megamenu', array('menu_name' => 'main-menu'));
} else {
$main_menu_tree = module_exists('i18n_menu') ? i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu')) : menu_tree(variable_get('menu_main_links_source', 'main-menu'));
print drupal_render($main_menu_tree);
}
?>
<li class="signin"><?php
print l('user', 'Sign In');
?>
</li>
</ul>
</div>
</nav>
<!-- Navigation / End -->
</header>
示例7: url
<a href="<?php
print url('<front>');
?>
" class="navbar-brand"><img src="<?php
print $logo;
?>
" alt=""/></a>
<?php
}
?>
</div>
<div id="navbar-collapse-grid" class="navbar-collapse collapse <?php
print $no_logo ? '' : 'pull-right';
?>
">
<?php
if (module_exists('tb_megamenu')) {
print theme('tb_megamenu', array('menu_name' => $menu));
} else {
$main_menu_tree = module_exists('i18n_menu') ? i18n_menu_translated_tree($menu) : menu_tree($menu);
print drupal_render($main_menu_tree);
}
print $button;
?>
</div>
</div>
</div>
</div>
<!--end menu-->
<div class="clearfix"></div>
示例8: module_invoke
</a>
</h1>
</div>
<div class="col-sm-6 mainmenu">
<div class="mobilenavi"></div>
<div class="searchbox">
<?php
$block = module_invoke('search', 'block_view', 'search');
print render($block);
?>
</div>
<nav id="navigation" role="navigation">
<div id="main-menu">
<?php
if (module_exists('i18n_menu')) {
$main_menu_tree = i18n_menu_translated_tree(variable_get('main-menu', 'main-menu'));
} else {
$main_menu_tree = menu_tree(variable_get('main-menu', 'main-menu'));
}
print drupal_render($main_menu_tree);
?>
</div>
</nav>
</div>
</div>
</header>
<?php
if ($is_front) {
?>
示例9: user_load
if ($logged_in) {
$account = user_load($user->uid);
if (module_exists('simsauth') && simsauth_get_authname($user->uid)) {
if ($account->userclass == 'student') {
$menu_id = theme_get_setting('student_menu', 'Accessibility');
} else {
$menu_id = theme_get_setting('teacher_menu', 'Accessibility');
}
} else {
$menu_id = variable_get('menu_main_links_source', 'main-menu');
}
} else {
$menu_id = theme_get_setting('anonymous_menu', 'Accessibility');
}
if (module_exists('i18n_menu')) {
$main_menu_tree = i18n_menu_translated_tree($menu_id);
} else {
$main_menu_tree = menu_tree($menu_id);
}
$access_key = theme_get_setting('access_second_menu', 'Accessibility');
if (theme_get_setting('access_brick', 'Accessibility') && $access_key) {
array_unshift($main_menu_tree, array('#theme' => 'menu_link__main_menu', '#attributes' => array('class' => array('first', 'leaf', 'brick')), '#title' => ':::', '#href' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '#localized_options' => array('attributes' => array('title' => '導覽列', 'accesskey' => $access_key)), '#below' => array()));
}
print drupal_render($main_menu_tree);
?>
</div>
</div>
</div><!-- EOF: #header-menu-inside -->
</div><!-- EOF: #header-menu -->