I need to retrieve an array of every page_name registered in WordPress. I've got two issues, I can do a get_pages() and such, but it literally pulls every freakin thing about each page including their content. Totally unnecessary overhead when all I need is page_name for each.
The other is that I'd like to do it with a built in method if possible, as this is for an in-house plugin and we'd like to keep it compatible with the mainline. (worst case will just access the DB directly and get them) I know you can include/exclude in the get_pages() call, but I haven't figured out if it is possible to exclude retrieving everything but one, instead of the opposite.
It needs to be dynamic in that it cannot have any hard-coded strings i.e. know anything about the pages themselves or what they're called. Also no extra junk like it being in an unordered list or something. Straight up array, no levels needed. (sub-pages are listed same as primary)
Any ideas guys? I've searched and searched..but the documentation is retarded for these types of things as you guys probably know.
Thanks.
Example of what I'd like in the end or similar:
Array
(
[0] => stdClass Object
(
[page_name] => 'page1'
)
[1] => stdClass Object
(
[page_name] => 'page2'
)
[2] => stdClass Object
(
[page_name] => 'page3'
)
[3] => stdClass Object
(
[page_name] => 'page4'
)
)