Now that we have the basic functionality in place, you might realize that the success of this plugin depends on the uniqueness of your shortcode. If another plugin happened to use the same name for their shortcode, your plugin could break. It's not a likely scenario, but it's one we're going to address by creating an administration page to let the users control the name of the shortcode.
We've created a manager page before, but let's review the process now. In order to have a manager page for this plugin, we need three things: a function that defines the menu item, a function that generates the page when that menu item is clicked, and finally an add_action()
hook to ensure that the other two functions are executed.
Let's begin by creating the function that will add the menu item. We are going to do something new here by demonstrating how you can create a dedicated menu item. It's not at all necessary for this plugin, but we wanted to show you how to do it. Add the following...