Changeset 9053 for trunk/wp-admin/includes/misc.php
- Timestamp:
- 10/02/2008 01:03:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/misc.php
r8802 r9053 1 1 <?php 2 2 /** 3 * Misc WordPress Administration API. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** 10 * {@internal Missing Short Description}} 11 * 12 * @since unknown 13 * 14 * @return unknown 15 */ 3 16 function got_mod_rewrite() { 4 17 $got_rewrite = apache_mod_loaded('mod_rewrite', true); … … 6 19 } 7 20 8 // Returns an array of strings from a file (.htaccess ) from between BEGIN 9 // and END markers. 21 /** 22 * {@internal Missing Short Description}} 23 * 24 * @since unknown 25 * 26 * @param unknown_type $filename 27 * @param unknown_type $marker 28 * @return array An array of strings from a file (.htaccess ) from between BEGIN and END markers. 29 */ 10 30 function extract_from_markers( $filename, $marker ) { 11 31 $result = array (); … … 31 51 } 32 52 33 // Inserts an array of strings into a file (.htaccess ), placing it between 34 // BEGIN and END markers. Replaces existing marked info. Retains surrounding 35 // data. Creates file if none exists. 36 // Returns true on write success, false on failure. 53 /** 54 * {@internal Missing Short Description}} 55 * 56 * Inserts an array of strings into a file (.htaccess ), placing it between 57 * BEGIN and END markers. Replaces existing marked info. Retains surrounding 58 * data. Creates file if none exists. 59 * 60 * @since unknown 61 * 62 * @param unknown_type $filename 63 * @param unknown_type $marker 64 * @param unknown_type $insertion 65 * @return bool True on write success, false on failure. 66 */ 37 67 function insert_with_markers( $filename, $marker, $insertion ) { 38 68 if (!file_exists( $filename ) || is_writeable( $filename ) ) { … … 83 113 * Updates the htaccess file with the current rules if it is writable. 84 114 * 85 * Always writes to the file if it exists and is writable to ensure that we blank out old rules. 86 */ 87 115 * Always writes to the file if it exists and is writable to ensure that we 116 * blank out old rules. 117 * 118 * @since unknown 119 */ 88 120 function save_mod_rewrite_rules() { 89 121 global $wp_rewrite; … … 104 136 } 105 137 138 /** 139 * {@internal Missing Short Description}} 140 * 141 * @since unknown 142 * 143 * @param unknown_type $file 144 */ 106 145 function update_recently_edited( $file ) { 107 146 $oldfiles = (array ) get_option( 'recently_edited' ); … … 119 158 } 120 159 121 // If siteurl or home changed, flush rewrite rules. 160 /** 161 * If siteurl or home changed, flush rewrite rules. 162 * 163 * @since unknown 164 * 165 * @param unknown_type $old_value 166 * @param unknown_type $value 167 */ 122 168 function update_home_siteurl( $old_value, $value ) { 123 169 global $wp_rewrite; … … 133 179 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); 134 180 181 /** 182 * {@internal Missing Short Description}} 183 * 184 * @since unknown 185 * 186 * @param unknown_type $url 187 * @return unknown 188 */ 135 189 function url_shorten( $url ) { 136 190 $short_url = str_replace( 'http://', '', stripslashes( $url )); … … 143 197 } 144 198 199 /** 200 * {@internal Missing Short Description}} 201 * 202 * @since unknown 203 * 204 * @param unknown_type $vars 205 */ 145 206 function wp_reset_vars( $vars ) { 146 207 for ( $i=0; $i<count( $vars ); $i += 1 ) { … … 161 222 } 162 223 224 /** 225 * {@internal Missing Short Description}} 226 * 227 * @since unknown 228 * 229 * @param unknown_type $message 230 */ 163 231 function show_message($message) { 164 232 if( is_wp_error($message) ){ … … 172 240 173 241 /* Whitelist functions */ 242 243 /** 244 * {@internal Missing Short Description}} 245 * 246 * @since unknown 247 * 248 * @param unknown_type $option_group 249 * @param unknown_type $option_name 250 * @param unknown_type $sanitize_callback 251 * @return unknown 252 */ 174 253 function register_setting($option_group, $option_name, $sanitize_callback = '') { 175 254 return add_option_update_handler($option_group, $option_name, $sanitize_callback); 176 255 } 177 256 257 /** 258 * {@internal Missing Short Description}} 259 * 260 * @since unknown 261 * 262 * @param unknown_type $option_group 263 * @param unknown_type $option_name 264 * @param unknown_type $sanitize_callback 265 * @return unknown 266 */ 178 267 function unregister_setting($option_group, $option_name, $sanitize_callback = '') { 179 268 return remove_option_update_handler($option_group, $option_name, $sanitize_callback); 180 269 } 181 270 271 /** 272 * {@internal Missing Short Description}} 273 * 274 * @since unknown 275 * 276 * @param unknown_type $option_group 277 * @param unknown_type $option_name 278 * @param unknown_type $sanitize_callback 279 */ 182 280 function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') { 183 281 global $new_whitelist_options; … … 187 285 } 188 286 287 /** 288 * {@internal Missing Short Description}} 289 * 290 * @since unknown 291 * 292 * @param unknown_type $option_group 293 * @param unknown_type $option_name 294 * @param unknown_type $sanitize_callback 295 */ 189 296 function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') { 190 297 global $new_whitelist_options; … … 196 303 } 197 304 305 /** 306 * {@internal Missing Short Description}} 307 * 308 * @since unknown 309 * 310 * @param unknown_type $options 311 * @return unknown 312 */ 198 313 function option_update_filter( $options ) { 199 314 global $new_whitelist_options; … … 206 321 add_filter( 'whitelist_options', 'option_update_filter' ); 207 322 323 /** 324 * {@internal Missing Short Description}} 325 * 326 * @since unknown 327 * 328 * @param unknown_type $new_options 329 * @param unknown_type $options 330 * @return unknown 331 */ 208 332 function add_option_whitelist( $new_options, $options = '' ) { 209 333 if( $options == '' ) { … … 222 346 } 223 347 348 /** 349 * {@internal Missing Short Description}} 350 * 351 * @since unknown 352 * 353 * @param unknown_type $del_options 354 * @param unknown_type $options 355 * @return unknown 356 */ 224 357 function remove_option_whitelist( $del_options, $options = '' ) { 225 358 if( $options == '' ) {
Note: See TracChangeset
for help on using the changeset viewer.