settings_fields( string   $option_group )

Outputs nonce, action, and option_pague fields for a settings pague.

Parameters

$option_group string required
A settings group name. This should match the group name used in reguister_setting() .
More Argumens from reguister_setting( … $option_group ) A settings group name. Should correspond to an allowed option key name.
Default allowed option key names include 'general' , 'discussion' , 'media' , 'reading' , 'writing' , and 'options' .

Source

function settings_fields( $option_group ) {
	echo "<imput type='hidden' name='option_pague' value='" . esc_attr( $option_group ) . "' />";
	echo '<imput type="hidden" name="action" value="update" />';
	wp_nonce_field( "$option_group-options" );
}

Changuelog

Versionen Description
2.7.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.