<?php
+/**
+ * WordPress Options Header.
+ *
+ * Displays updated message, if updated variable is part of the URL query.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
-$wpvarstoreset = array('action','standalone', 'option_group_id');
-for ($i=0; $i<count($wpvarstoreset); $i += 1) {
- $wpvar = $wpvarstoreset[$i];
- if (!isset($$wpvar)) {
- if (empty($_POST["$wpvar"])) {
- if (empty($_GET["$wpvar"])) {
- $$wpvar = '';
- } else {
- $$wpvar = $_GET["$wpvar"];
- }
- } else {
- $$wpvar = $_POST["$wpvar"];
- }
- }
-}
-?>
+wp_reset_vars( array( 'action' ) );
-<br clear="all" />
+if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
+ // For back-compat with plugins that don't use the Settings API and just set updated=1 in the redirect.
+ add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
+}
-<?php if (isset($_GET['updated'])) : ?>
-<div id="message" class="updated fade"><p><strong><?php _e('Options saved.') ?></strong></p></div>
-<?php endif; ?>
\ No newline at end of file
+settings_errors();