title: Wordpress - how to show links to 'private' pages in wp_nav_menu?
body: <p>In my WordPress site I have a requirement to show <code>private</code> links in the main navigation (via <code>wp_nav_menu</code>) even if the user isn't logged in (I just need to show the link, not change who can view the actual content). </p>
  
  <p>I can do this elsewhere, using <code>wp_list_pages and</code> specifying the post_status(es) I want to display but I can't see how to apply that to <code>wp_nav_menu</code>. </p>
  
  <p>This works:</p>
  
  <pre class="lang-php prettyprint-override"><code>wp_list_pages(array(
      'title_li'      =&gt; '',
      'child_of'      =&gt; $page-&gt;ID,    
      'post_status'   =&gt; 'published,private'
  ));
  </code></pre>
  
  <p>Is there a way to do something similar with this?</p>
  
  <pre class="lang-php prettyprint-override"><code>wp_nav_menu(array(
      'menu'              =&gt; 'primary',
      'theme_location'    =&gt; 'primary',
      'container'         =&gt; FALSE,
      'walker'            =&gt; new MegaMenuWalker
      'depth'             =&gt; 2));
  </code></pre>
  
  <p>My searches so far show a bunch of ways to post-process the results to filter out private pages (or drafts) using the <code>wp_get_nav_menu_items</code> hook but I have yet to turn up something on doing the reverse. </p>
  
  <p>I suppose I could do a custom query to grab items that way but that wouldn't let me use my custom walker. </p>
  
  <p>Tantalisingly there's <code>wp_get_nav_menu_items( $menu, $args )</code> which does allow me to specify the post_status argument, however I'm left to apply my own render rather than being able to use the walker... unless there's some way to use the walker outside the context of <code>wp_nav_menu</code>?</p>