In my plugin, I've created a textfield (ID: main_menu
) that allows the users to list the admin menu items by their menu slug (ex: index.php
= Dashboard, plugins.php
= Plugins, etc.):
It's important that the user enters each menu item in a new line so this can convert it to an array. Right now, when the user enters in their input on each line, the value for that textfield is treated as one item when I echo
the get_option()
for that field.
How do I convert each new line input that's entered into an array loop of multiple values?