1

I'm writing a 'quote-me' plugin which provides the end-user with a quote based on data they submit through a front-end form. The quote is calculated according to a price list. The price list varies depending on the time of year so I need a way of letting the admin-user update the prices via the back-end dashboard.

My first thought was to use the Settings API but have since seen administration menus can be created.

Considering my objective above, should I create a new admin menu or should I use the Settings API? Which is more appropriate for my use case and why?

Hoping someone can explain. Thanks in advance.

UPDATE:

My confusion came from my assumption that the Settings API is to be used for just the Settings administration menu. But now I know the Settings API can be used across the whole set of administration menus, including new ones I create.

Thanks for your answers and comments!

3
  • 2
    Why not both? You can! Commented Jun 12, 2014 at 16:07
  • I'm trying to understand what the difference is? Commented Jun 12, 2014 at 16:15
  • 1
    Asking for "the difference" is the wrong question. You can use the Settings API in any admin menu. The two are not mutually exclusive. Commented Jun 12, 2014 at 17:34

1 Answer 1

2

The two are not the same thing at all, and likely you'll use both.

The Administration Menu stuff shows you how to create the menu item and page for your settings to live on. In other words, the menu item in the left hand bar, and the existence of the page itself.

The Settings API is what you use to actually build the contents of that page (the table of settings, form fields, and submit button), and to then process the data coming back from it.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.