function get_parent_titles($parent_id)
{
    $titles[] = get_menu_title($parent_id);
    if (is_parent($parent_id) != false) {
        $parent_titles = get_parent_titles(is_parent($parent_id));
        $titles = array_merge($titles, $parent_titles);
    }
    //is_parent( $parent_id ) != false
    return $titles;
}
Пример #2
0

<br />
<h2><?php 
echo $TEXT['MODIFY'] . ' / ' . $TEXT['DELETE'] . ' ' . $MOD_BAKERY['TXT_ITEM'];
?>
</h2>
<?php 
// Loop through existing items
$query_items = $database->query("SELECT * FROM " . TABLE_PREFIX . "mod_bakery_items WHERE section_id = '{$section_id}' ORDER BY position ASC");
if ($query_items->numRows() > 0) {
    $num_items = $query_items->numRows();
    ?>
	<table cellpadding="2" cellspacing="0" border="0" width="100%" class="mod_bakery_dragndrop_b">
	<caption><?php 
    echo get_menu_title($page_id);
    ?>
</caption>
		<thead>
		  <tr height="30" class="grouptr">
				<td></td>
				<td style="text-align: right;"><span title="<?php 
    echo $MOD_BAKERY['TXT_ITEM'];
    ?>
 ID">ID</span></td>
				<td></td>
				<td><?php 
    echo $TEXT['NAME'];
    ?>
</td>				
				<td><?php 
Пример #3
0
							<?php 
    $args = array('theme_location' => 'menu_footer_2', 'container' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true, 'fallback_cb' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="menu-main-menu" class="menu-main">%3$s</ul>', 'depth' => 0, 'walker' => '');
    wp_nav_menu($args);
    ?>
						</div>
					<?php 
}
?>

					<?php 
if (has_nav_menu('menu_footer_3')) {
    ?>

						<div class="lista">
							<h5><?php 
    echo get_menu_title('menu_footer_3');
    ?>
</h5>
							<?php 
    $args = array('theme_location' => 'menu_footer_3', 'container' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true, 'fallback_cb' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="menu-main-menu" class="menu-main">%3$s</ul>', 'depth' => 0, 'walker' => '');
    wp_nav_menu($args);
    ?>
						</div>

					<?php 
}
?>

                </div>

                <div class="clearfix"></div>