Example #1
0
    function PricerrTheme_get_users_links()
    {
        global $wpdb, $post, $wp_rewrite, $wp_query, $current_user;
        $current_page = $wp_query->query_vars['my_second_page'];
        get_currentuserinfo();
        $my_pid = $post->ID;
        $payments_id = get_option('PricerrTheme_my_account_payments_page_id');
        $account_id = get_option('PricerrTheme_my_account_page_id');
        $shopping_id = get_option('PricerrTheme_my_account_shopping_page_id');
        $sales_id = get_option('PricerrTheme_my_account_sales_page_id');
        $priv_mess_id = get_option('PricerrTheme_my_account_priv_mess_page_id');
        $pers_id = get_option('PricerrTheme_my_account_personal_info_page_id');
        $rev_id = get_option('PricerrTheme_my_account_reviews_page_id');
        if (empty($current_page)) {
            $current_page = 'home';
        }
        $uid = $current_user->ID;
        $pricerrTheme_get_unread_number_messages = pricerrTheme_get_unread_number_messages($uid);
        if ($pricerrTheme_get_unread_number_messages > 0) {
            $sk = ' <span class="the_one_mess">' . $pricerrTheme_get_unread_number_messages . '</span>';
        } else {
            $sk = '';
        }
        ?>
	
    	<div id="right-sidebar">
		<ul class="xoxo">
		<li class="widget-container widget_text" id="my-account-menu">
        			
          
          <ul id="my-account-admin-menu">
         
              <li><a href="<?php 
        echo get_permalink($account_id);
        ?>
" <?php 
        if ($account_id == $my_pid) {
            echo "class='active_link'";
        }
        ?>
><?php 
        _e("My Listings", 'PricerrTheme');
        ?>
</a></li>
              <li><a href="<?php 
        echo get_permalink($payments_id);
        ?>
" <?php 
        if ($payments_id == $my_pid) {
            echo "class='active_link'";
        }
        ?>
><?php 
        _e("Payments", 'PricerrTheme');
        ?>
</a></li>                    
              <li><a href="<?php 
        echo get_permalink($shopping_id);
        ?>
" <?php 
        if ($shopping_id == $my_pid) {
            echo "class='active_link'";
        }
        ?>
><?php 
        _e("Shopping", 'PricerrTheme');
        ?>
</a></li>
              <li><a href="<?php 
        echo get_permalink($sales_id);
        ?>
" <?php 
        if ($sales_id == $my_pid) {
            echo "class='active_link'";
        }
        ?>
><?php 
        _e("Manage Sales", 'PricerrTheme');
        ?>
</a></li>                  
              <li><a href="<?php 
        echo get_permalink($priv_mess_id);
        ?>
" <?php 
        if ($priv_mess_id == $my_pid) {
            echo "class='active_link'";
        }
        ?>
><?php 
        printf(__("Private Messages %s", 'PricerrTheme'), $sk);
        ?>
</a></li>          
              <li><a href="<?php 
        echo get_permalink($pers_id);
        ?>
" <?php 
        if ($pers_id == $my_pid) {
            echo "class='active_link'";
        }
        ?>
><?php 
        _e("Personal Info", 'PricerrTheme');
        ?>
</a></li>
              <li><a href="<?php 
        echo get_permalink($rev_id);
        ?>
" <?php 
        if ($rev_id == $my_pid) {
            echo "class='active_link'";
        }
        ?>
><?php 
        _e("Reviews/Feedback", 'PricerrTheme');
        ?>
</a></li>
          	  <?php 
        do_action('PricerrTheme_my_account_main_menu');
        ?>
             
          </ul>
           
		
        </li>
            
     <?php 
        dynamic_sidebar('other-page-area');
        ?>
            
        </ul>
		</div>
		

<?php 
    }
Example #2
0
    $menu = wp_get_nav_menu_object($locations[$menu_name]);
    $menu_items = wp_get_nav_menu_items($menu->term_id);
    foreach ((array) $menu_items as $key => $menu_item) {
        $title = $menu_item->title;
        $url = $menu_item->url;
        if (!empty($title)) {
            echo '<li><a href="' . $url . '">' . $title . '</a> </li>';
        }
    }
}
?>

                                    <?php 
if (is_user_logged_in()) {
    $uid = $current_user->ID;
    $pricerrTheme_get_unread_number_messages = pricerrTheme_get_unread_number_messages($uid);
    if ($pricerrTheme_get_unread_number_messages > 0) {
        $sk = '  <span class="the_one_mess">' . $pricerrTheme_get_unread_number_messages . '</span>';
    } else {
        $sk = '';
    }
    ?>

                                        <li><a href="<?php 
    echo PricerrTheme_my_account_link();
    ?>
"><?php 
    echo $current_user->user_login . " " . $sk;
    ?>
</a></li>
                                        <li><a href="<?php