wpveda book

  Edit This Page

Options API

The Options API focuses on managing data using a simple key\/value system.

The Options API, added in WordPress 1.0, allows creating, reading, updating and deleting of WordPress options. In combination with the Settings API it allows controlling of options defined in settings pages.

Where Options are Stored?

Options are stored in the {$wpdb->prefix}_options table. $wpdb->prefix is defined by the $table_prefix variable set in the wp-config.php file.

Function Reference

Add Option

add_option()

add_site_option()

Get Option

get_option()

get_site_option()

Update Option

update_option()

update_site_option()

Delete Option

delete_option()

delete_site_option()

References

https:\/\/developer.wordpress.org\/plugins\/settings\/

https:\/\/developer.wordpress.org\/plugins\/settings\/custom-settings-page\/