WordPress.org

Make WordPress Core

Ticket #22200: options.php.diff

File options.php.diff, 991 bytes (added by avreidy, 8 years ago)

Updated to notify users that omitting a site title is not necessary if they simply want to hide it

  • options.php

     
    159159        /**
    160160         * Handle settings errors and return to options page
    161161         */
    162         // If no settings errors were registered add a general 'updated' message.
    163         if ( !count( get_settings_errors() ) )
    164                 add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
     162       
     163        if ( !count( get_settings_errors() ) ) {
     164                if ( $_POST['blogname'] == '' )
     165                        add_settings_error('general', 'settings_updated', __("Settings saved. You should consider adding a site title, though. (You can always hide the site title in the Appearance section under Header.)"), 'updated');
     166                else // If no settings errors were registered, add a general 'updated' message.
     167                        add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
     168        }
     169               
    165170        set_transient('settings_errors', get_settings_errors(), 30);
    166171
    167172        /**