WordPress.org

Make WordPress Core

Ticket #19377: settings-errors.3.diff

File settings-errors.3.diff, 1020 bytes (added by garyc40, 3 years ago)

What is wrong with me? The previous 2 patches were very very bad.

  • wp-admin/includes/template.php

    function get_settings_errors( $setting = '', $sanitize = FALSE ) { 
    13191319 */ 
    13201320function settings_errors( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) { 
    13211321 
    1322         if ($hide_on_update AND $_GET['settings-updated']) return; 
     1322        if ( $hide_on_update && ! empty( $_GET['settings-updated'] ) ) 
     1323                return; 
    13231324 
    13241325        $settings_errors = get_settings_errors( $setting, $sanitize ); 
    13251326 
  • wp-includes/formatting.php

    function wp_make_link_relative( $link ) { 
    24162416 * @return string Sanitized value. 
    24172417 */ 
    24182418function sanitize_option($option, $value) { 
    2419  
    24202419        switch ( $option ) { 
    24212420                case 'admin_email': 
    24222421                        $value = sanitize_email($value);