2016-01-07, 13:16:47
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.
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
)