[wp-trac] [WordPress Trac] #31000: Multiple calls to settings_errors() result in duplicate display of notices
WordPress Trac
noreply at wordpress.org
Tue Jun 23 15:38:57 UTC 2015
#31000: Multiple calls to settings_errors() result in duplicate display of notices
----------------------------+------------------------------
Reporter: jrf | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.9
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by jrf):
> I think the solution for this for now is to add in some documentation
cautioning against the use of settings_errors.
The thing is, quite a number of plugins have more than one settings page
and therefore add their own menu item with submenu to the WP admin menu.
Those admin pages use the Settings API and the Options API, but as they
are not under the "Settings" menu item, they - IMHO correctly - add the
`settings_errors()` call to their admin page to allow for displaying of
the settings errors.
So - again IMHO - cautioning against using it will have the undesirable
effect that plugins will each have to come up with their own solution to
display errors and to move away from using the Settings and Options APIs.
> One thing that this helps identify is that this entire api could really
use some love and direction.
+1 ;-)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31000#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list