Skip to content

Commit 06f7c56

Browse files
committed
Add settings_errors rendering in Settings API plugin_settings method
Ensures add_settings_error messages from change_settings_on_save are displayed on the settings page for consistent admin notice visibility.
1 parent 82b7b7e commit 06f7c56

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

includes/admin/settings/class-settings-api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ public function plugin_settings() {
945945
<?php do_action( $this->prefix . '_settings_page_header_before' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound ?>
946946
<h1><?php echo esc_html( $this->translation_strings['page_header'] ); ?></h1>
947947
<?php do_action( $this->prefix . '_settings_page_header' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound ?>
948+
<?php settings_errors( $this->prefix . '-notices' ); ?>
948949

949950
<div id="poststuff">
950951
<div id="post-body" class="metabox-holder columns-2">

0 commit comments

Comments
 (0)