hlashbrooke / WordPress-Plugin-Template

A robust code template for creating a standards-compliant WordPress plugin.
https://hughlashbrooke.com/
GNU General Public License v2.0
1.03k stars 329 forks source link

I not found the name of settings #6

Closed ghost closed 10 years ago

ghost commented 10 years ago

Dear Hugh I'm trying to use your plugin

Can you create a small template function where you get the options saved with setting page ? thanks in advance

hlashbrooke commented 10 years ago

The settings are saved as individual options using the $this->base variable and the field ID as the option name. In the default settings class, $this->base is set to wpt_ so, for example, the field with ID text_field could be called by using get_option( 'wpt_text_field' );.