Make WordPress Core


Ignore:
Timestamp:
10/02/2008 01:03:26 AM (16 years ago)
Author:
ryan
Message:

phpdoc for wp-admin/includes from jacobsantos. see #7527

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/misc.php

    r8802 r9053  
    11<?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 */
    316function got_mod_rewrite() {
    417    $got_rewrite = apache_mod_loaded('mod_rewrite', true);
     
    619}
    720
    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 */
    1030function extract_from_markers( $filename, $marker ) {
    1131    $result = array ();
     
    3151}
    3252
    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 */
    3767function insert_with_markers( $filename, $marker, $insertion ) {
    3868    if (!file_exists( $filename ) || is_writeable( $filename ) ) {
     
    83113 * Updates the htaccess file with the current rules if it is writable.
    84114 *
    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 */
    88120function save_mod_rewrite_rules() {
    89121    global $wp_rewrite;
     
    104136}
    105137
     138/**
     139 * {@internal Missing Short Description}}
     140 *
     141 * @since unknown
     142 *
     143 * @param unknown_type $file
     144 */
    106145function update_recently_edited( $file ) {
    107146    $oldfiles = (array ) get_option( 'recently_edited' );
     
    119158}
    120159
    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 */
    122168function update_home_siteurl( $old_value, $value ) {
    123169    global $wp_rewrite;
     
    133179add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
    134180
     181/**
     182 * {@internal Missing Short Description}}
     183 *
     184 * @since unknown
     185 *
     186 * @param unknown_type $url
     187 * @return unknown
     188 */
    135189function url_shorten( $url ) {
    136190    $short_url = str_replace( 'http://', '', stripslashes( $url ));
     
    143197}
    144198
     199/**
     200 * {@internal Missing Short Description}}
     201 *
     202 * @since unknown
     203 *
     204 * @param unknown_type $vars
     205 */
    145206function wp_reset_vars( $vars ) {
    146207    for ( $i=0; $i<count( $vars ); $i += 1 ) {
     
    161222}
    162223
     224/**
     225 * {@internal Missing Short Description}}
     226 *
     227 * @since unknown
     228 *
     229 * @param unknown_type $message
     230 */
    163231function show_message($message) {
    164232    if( is_wp_error($message) ){
     
    172240
    173241/* 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 */
    174253function register_setting($option_group, $option_name, $sanitize_callback = '') {
    175254    return add_option_update_handler($option_group, $option_name, $sanitize_callback);
    176255}
    177256
     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 */
    178267function unregister_setting($option_group, $option_name, $sanitize_callback = '') {
    179268    return remove_option_update_handler($option_group, $option_name, $sanitize_callback);
    180269}
    181270
     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 */
    182280function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') {
    183281    global $new_whitelist_options;
     
    187285}
    188286
     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 */
    189296function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') {
    190297    global $new_whitelist_options;
     
    196303}
    197304
     305/**
     306 * {@internal Missing Short Description}}
     307 *
     308 * @since unknown
     309 *
     310 * @param unknown_type $options
     311 * @return unknown
     312 */
    198313function option_update_filter( $options ) {
    199314    global $new_whitelist_options;
     
    206321add_filter( 'whitelist_options', 'option_update_filter' );
    207322
     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 */
    208332function add_option_whitelist( $new_options, $options = '' ) {
    209333    if( $options == '' ) {
     
    222346}
    223347
     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 */
    224357function remove_option_whitelist( $del_options, $options = '' ) {
    225358    if( $options == '' ) {
Note: See TracChangeset for help on using the changeset viewer.