本文整理汇总了PHP中dropdown_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP dropdown_menu函数的具体用法?PHP dropdown_menu怎么用?PHP dropdown_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dropdown_menu函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _assign_class_list
protected function _assign_class_list()
{
$model = M("MaterialClass");
$list = $model->field("id,pid,name")->select();
$tree = list_to_tree($list);
$this->assign('class_list', dropdown_menu($tree));
}
示例2: _assign_folder_list
protected function _assign_folder_list()
{
if ($this->config['app_type'] == 'personal') {
$model = D("UserFolder");
} else {
$model = D("SystemFolder");
}
$list = $model->get_folder_list();
$tree = list_to_tree($list);
$this->assign('folder_list', dropdown_menu($tree));
}
示例3: _assign_mail_folder_list
public function _assign_mail_folder_list()
{
$model = D("UserFolder");
$user_folder = $model->get_folder_list("MailFolder");
$system_folder = array(array("id" => 1, "name" => "收件箱"), array("id" => 2, "name" => "已发送"));
if (!empty($user_folder)) {
$mail_folder = array_merge($system_folder, $user_folder);
} else {
$mail_folder = $system_folder;
}
$tree = list_to_tree($mail_folder);
$this->assign('folder_list', dropdown_menu($tree));
$temp = tree_to_list($tree);
return $temp;
}
示例4: dropdown_menu
$tpl->set("main_charset", $GLOBALS["charset"]);
$tpl->set("main_css", "{$style_css}");
require_once "{$THIS_BASEPATH}/include/blocks.php";
// no collapse for guests
if ($CURUSER["id"] == 1 or $btit_settings["colup"] == false) {
$tpl->set("guestt", false, TRUE);
} else {
$tpl->set("guestt", TRUE, false);
}
if ($CURUSER["id"] == 1 or $btit_settings["coldown"] == false) {
$tpl->set("guesttt", false, TRUE);
} else {
$tpl->set("guesttt", TRUE, false);
}
$logo .= "<div></div>";
$dropdown = dropdown_menu();
$extra = extra_menu();
/* for the header collapse */
$slideIt = "<span style=\"float:left; padding-left:20px; margin: 0px;\"><a href=\"#\" rel=\"toggle[header]\" data-closedimage=\"{$STYLEURL}/images/open.png\" data-openimage=\"{$STYLEURL}/images/close.png\"><img src=\"{$STYLEURL}/images/close.png\" border=\"0\" alt=\"click\" /></a></span>";
$header .= "<div>" . main_menu() . "</div>";
/* for the footer block collapse */
$slideIt2 = "<span style=\"float:left; padding-left:20px; margin: 0px;\"><a href=\"#\" rel=\"toggle[bottom_menu]\" data-closedimage=\"{$STYLEURL}/images/open.png\" data-openimage=\"{$STYLEURL}/images/close.png\"><img src=\"{$STYLEURL}/images/close.png\" border=\"0\" alt=\"click\" /></a></span>";
/*---*/
$left_col = side_menu();
$right_col = right_menu();
if ($left_col == "" && $right_col == "" || $btit_settings["site_offline"]) {
$no_columns = 1;
}
include 'include/jscss.php';
// dt blocks hide
if ($CURUSER["left_l"] == "nol" or $CURUSER["left_l"] == "no") {
示例5: dropdown_menu
function dropdown_menu($tree, $level = 0)
{
$level++;
$html = "";
if (is_array($tree)) {
foreach ($tree as $val) {
if (isset($val["name"])) {
$title = $val["name"];
$id = $val["id"];
if (empty($val["id"])) {
$id = $val["name"];
}
if (isset($val['_child'])) {
$html = $html . "<li id=\"{$id}\" class=\"level{$level}\"><a>{$title}</a>\r\n";
$html = $html . dropdown_menu($val['_child'], $level);
$html = $html . "</li>\r\n";
} else {
$html = $html . "<li id=\"{$id}\" class=\"level{$level}\">\r\n<a>{$title}</a>\r\n</li>\r\n";
}
}
}
}
return $html;
}
示例6: widget
function widget($args, $instance)
{
// Get menu
$nav_menu = wp_get_nav_menu_object($instance['nav_menu']);
if (!$nav_menu) {
return;
}
$instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
echo $args['before_widget'];
if (!empty($instance['title'])) {
echo $args['before_title'] . $instance['title'] . $args['after_title'];
}
dropdown_menu(array('fallback_cb' => '', 'menu' => $nav_menu));
echo $args['after_widget'];
}
示例7: _assign_mail_folder_list
public function _assign_mail_folder_list()
{
$model = D("Folder");
$list = $model->get_list("mail/mail_list", 2);
$system_folder = array(array("id" => 1, "name" => "收件箱"), array("id" => 2, "name" => "已发送"));
$list = array_merge($system_folder, $list);
$tree = list_to_tree($list);
$this->assign('folder_list', dropdown_menu($tree));
$temp = tree_to_list($tree);
return $temp;
}
示例8: dropdown_menu
echo '"><img src="' . $logo_attachment . '" alt="' . $alt_text . '"/></a>';
}
?>
</div>
<!-- Navigation -->
<div class="gdl-navigation-wrapper">
<?php
// responsive menu
if ($gdl_is_responsive && has_nav_menu('main_menu')) {
dropdown_menu(array('dropdown_title' => '-- Main Menu --', 'indent_string' => '- ', 'indent_after' => '', 'container' => 'div', 'container_class' => 'responsive-menu-wrapper', 'theme_location' => 'main_menu'));
echo '<div class="clear"></div>';
}
// main menu
$sliding_bar = get_option(THEME_SHORT_NAME . '_enable_sliding_bar', 'enable') == 'enable' ? 'sliding-bar' : '';
echo '<div class="navigation-wrapper ' . $sliding_bar . '">';
if (has_nav_menu('main_menu')) {
if (!empty($sliding_bar)) {
echo '<div class="gdl-current-menu" ></div>';
}
echo '<div class="main-superfish-wrapper" id="main-superfish-wrapper" >';
wp_nav_menu(array('container' => '', 'menu_class' => 'sf-menu', 'theme_location' => 'main_menu'));
echo '<div class="clear"></div>';
echo '</div>';
}
echo '<div class="clear"></div>';
示例9: _assign_folder_list
protected function _assign_folder_list($folder, $public)
{
$model = D("Folder");
$list = $model->get_list($folder, $public);
$tree = list_to_tree($list);
$this->assign('folder_list', dropdown_menu($tree));
}
示例10: bloginfo
?>
"/></a></h1>
<!--- <?php
bloginfo('description');
?>
-->
<!--- <?php
get_search_form();
?>
-->
<img id="header-image" src="<?php
echo get_stylesheet_directory_uri();
?>
/img/header-image.png" />
</div>
<div id="mobile-menu">
<?php
dropdown_menu(array('container' => 'div', 'container_id' => '', 'menu_id' => 'mobile-menu-primary', 'menu_class' => '', 'theme_location' => 'primary'));
?>
</div>
<?php
wp_nav_menu(array('container' => 'nav', 'container_id' => 'menu-container', 'menu_id' => 'main-menu', 'menu_class' => 'menu-inline', 'theme_location' => 'primary', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>'));
?>
</header>
<div role="main" id="main">
<div class="container">
<div class="grid">
示例11: array
<?php
} else {
?>
<!-- Standart Menu -->
<?php
//call the main menu
$menuVars = array('menu' => 'RT Theme Main Navigation Menu', 'menu_id' => "navigation", 'echo' => false, 'container' => '', 'container_class' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'container_id' => '', 'theme_location' => 'rt-theme-main-navigation');
$main_menu = wp_nav_menu($menuVars);
echo $main_menu;
?>
<!-- / Standart Menu -->
<!-- Mobile Menu -->
<?php
//call the main menu once again for mobile navigation
$MobilemenuVars = array('menu' => 'RT Theme Main Navigation Menu', 'menu_id' => "MobileMainNavigation", 'echo' => false, 'container' => 'div', 'container_class' => '', 'container_id' => 'MobileMainNavigation-Background', 'theme_location' => 'rt-theme-main-navigation', 'dropdown_title' => __('-- Main Menu --', "rt_theme"), 'indent_string' => '- ', 'indent_after' => '');
$mobile_menu = dropdown_menu($MobilemenuVars);
echo $mobile_menu;
?>
<!-- / Mobile Menu -->
<?php
}
?>
</div></nav>
<!-- / navigation -->
</header></div><!-- end div #header -->
</div><!-- / end div content-wrapper -->
示例12: wp_nav_menu
if (function_exists('wp_nav_menu')) {
wp_nav_menu(array('theme_location' => 'Main_Navigation', 'fallback_cb' => ''));
}
?>
<!-- CLOSE #main-navigation -->
</nav>
<!-- OPEN #mobile-navigation -->
<nav id="mobile-navigation">
<span class="selected-option"><?php
_e("- Menu -", "swiftframework");
?>
</span>
<?php
dropdown_menu(array('theme_location' => 'Main_Navigation', 'dropdown_title' => '-- Menu --', 'indent_string' => '- ', 'indent_after' => ''));
?>
<!-- CLOSE #mobile-navigation -->
</nav>
<div id="menubar-controls" class="four columns omega">
<?php
if ($show_subscribe) {
?>
<div class="control-item">
<a id="subscribe-activate" href="#"><i class="icon-envelope-alt"></i></a>
<span class="tooltip"><?php
_e("Subscribe", "swiftframework");
?>
<span class="arrow"></span></span>
</div>
示例13: mfn_wp_nav_menu
?>
" />
</a>
<?php
if (is_front_page()) {
echo '</h1>';
}
?>
<!-- main menu -->
<?php
mfn_wp_nav_menu();
?>
<?php
if (has_nav_menu('primary')) {
dropdown_menu(array('dropdown_title' => '- - Main menu - -', 'indent_string' => '- - ', 'indent_after' => '', 'container' => 'nav', 'container_id' => 'menu_responsive', 'theme_location' => 'primary'));
}
?>
</div>
</div>
</div>
<?php
if (!is_404()) {
$slider = false;
if (get_post_type() == 'page') {
$slider = get_post_meta(get_the_ID(), 'mfn-post-slider', true);
}
if ($slider) {