Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BUG REPORT menu_data() returns incorrect data
#1
Hi all,
this is my first post on this forum and I want to thank you all for this great CMS.


I was creating my own menu on my site and I found that menu_data() adds pages even if they aren't added to menu.
Looking at data returned, I see that there are "menu_*" array keys which are empty. Is this the right behaviour or is it a bug? I mean, if I don't add a page to the menu, it shouldn't be returned from menu_data(). Of course, I can skip those entries, just want to know if this behaviour is a feature or a bug.

Code:
Array
(
   [0] => Array
       (
           [slug] => test
           [url] => http://www.foo.bar/test/
           [parent_slug] =>
           [title] => test
           [menu_priority] => 0
           [menu_text] =>
           [menu_status] =>
           [private] =>
           [pub_date] => Tue, 06 Oct 2015 00:59:59 +0200
       )

   [1] => Array
       (
           [slug] => index
           [url] => http://www.foo.bar/
           [parent_slug] =>
           [title] => Home
           [menu_priority] => 1
           [menu_text] => Home
           [menu_status] => Y
           [private] =>
           [pub_date] => Tue, 06 Oct 2015 00:59:18 +0200
       )
Reply
#2
you have to filter it on your own
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)