2 suggestions
-
I hope you don’t mind, but I have two suggestions for your simple yet very useful plugin (how is this not already a feature in WP?!).
1. To include scheduled pages in the items to hide from the menu you could edit your code
fromIN ('pending', 'draft', 'trash')
toIN ('pending', 'draft', 'trash', 'future')
It worked for me with one page, but that’s not extensive testing.2. If a menu has sub items and the parent is draft etc then all the sub items should be hidden from the menu too, otherwise they are added to the bottom of the menu by WP which is not ideal.
To accomplish this you could maybe callget_children()
function for each page in your$unpublished_items
array. Recursively call the parent function to account for sub items n-levels deep.I hope you find this useful and find time to continue developing the plugin.
- The topic ‘2 suggestions’ is closed to new replies.