WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/settings fields"

(Related: Settings tags)
m (Related)
 
Line 29: Line 29:
 
== Related ==
 
== Related ==
   
{{Settings Tags}}
+
{{Setting Tags}}
   
 
This function is part of the [[Settings_API]].
 
This function is part of the [[Settings_API]].

Latest revision as of 02:19, 15 December 2012

Description

Output nonce, action, and option_page fields for a settings page. Please note that this function must be called inside of the form tag for the options page.

Usage

<?php settings_fields$option_group ?>

Parameters

$option_group
(string) (required) A settings group name. This should match the group name used in register_setting().
Default: None

Return Values

(void) 
This function does not return a value.

Examples

<?php
	echo '<form method="post" action="options.php">';
	settings_fields( 'my-plugin-settings-group' );
	
?>

Notes

Change Log

Source File

settings_fields() is located in wp-admin/includes/plugin.php.

Related

Settings API: register_setting(), unregister_setting(), add_settings_field(), add_settings_section(), add_settings_error(), get_settings_errors(), settings_errors()

This function is part of the Settings_API.


See also index of Function Reference and index of Template Tags.