Ticket #22200: options.php.diff

File options.php.diff, 991 bytes (added by avreidy, 4 months ago)

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

Line 
1Index: options.php
2===================================================================
3--- options.php (revision 23348)
4+++ options.php (working copy)
5@@ -159,9 +159,14 @@
6        /**
7         * Handle settings errors and return to options page
8         */
9-       // If no settings errors were registered add a general 'updated' message.
10-       if ( !count( get_settings_errors() ) )
11-               add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
12+       
13+       if ( !count( get_settings_errors() ) ) {
14+               if ( $_POST['blogname'] == '' )
15+                       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');
16+               else // If no settings errors were registered, add a general 'updated' message.
17+                       add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
18+       }
19+               
20        set_transient('settings_errors', get_settings_errors(), 30);
21 
22        /**