kollapsminoriteten/wp-admin/options-head.php

24 lines
621 B
PHP
Raw Permalink Normal View History

2019-11-02 10:38:58 +01:00
<?php
/**
* WordPress Options Header.
*
* Displays updated message, if updated variable is part of the URL query.
*
* @package WordPress
* @subpackage Administration
*/
2025-04-25 12:30:07 +02:00
// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
2025-02-28 08:42:11 +01:00
$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
2019-11-02 10:38:58 +01:00
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.
2019-11-15 22:59:44 +01:00
add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' );
2019-11-02 10:38:58 +01:00
}
settings_errors();