Changeset 13177 for trunk/wp-admin/options.php
- Timestamp:
- 02/17/2010 05:50:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options.php
r12825 r13177 3 3 * Options Management Administration Panel. 4 4 * 5 * Just allows for displaying of options. 5 * If accessed directly in a browser this page shows a list of all saved options 6 * along with editable fields for their values. Serialized data is not supported 7 * and there is no way to remove options via this page. It is not linked to from 8 * anywhere else in the admin. 6 9 * 7 * This isn't referenced or linked to, but will show all of the options and8 * allow editing. The issue is that serialized data is not supported to be9 * modified. Options can not be removed.10 * This file is also the target of the forms in core and custom options pages 11 * that use the Settings API. In this case it saves the new option values 12 * and returns the user to their page of origin. 10 13 * 11 14 * @package WordPress … … 77 80 switch($action) { 78 81 82 /** 83 * If $_GET['action'] == 'update' we are saving settings sent from a settings page 84 */ 79 85 case 'update': 80 86 if ( isset($_POST[ 'option_page' ]) ) { … … 124 130 } 125 131 126 $goback = add_query_arg( 'updated', 'true', wp_get_referer() ); 132 /** 133 * Handle settings errors and return to options page 134 */ 135 // If no settings errors were registered add a general 'updated' message. 136 if ( !count( get_settings_errors() ) ) 137 add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated'); 138 set_transient('settings_errors', get_settings_errors(), 30); 139 140 /** 141 * Redirect back to the settings page that was submitted 142 */ 143 $goback = add_query_arg( 'updated', 'true', wp_get_referer() ); 127 144 wp_redirect( $goback ); 128 145 break;
Note: See TracChangeset
for help on using the changeset viewer.