To create plugin custom settings page using wp Settings API wordpress suggests us to use something like this:
<form method="post" action="options.php">
<?php settings_fields( 'group_name' );
do_settings_sections( 'group_name' );
submit_button( 'Save Changes' ); ?>
When I add the settings page errors using the
add_settings_error() all the things work great. But I have noticed that if
action="" I'll get 2 copies of the same custom error.
get_settings_errors() returns an array with
2 keys (
1 is missed). In
2 lays the same custom errors (duplicates).
I am sure it is not an issue of my code due to with
action="options.php" I have not this issue.
It seems I do not know something. Can somebody explain me?