Make WordPress Core


Ignore:
Timestamp:
10/02/2008 01:03:26 AM (17 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/file.php

    r8880 r9053  
    11<?php
    2 
     2/**
     3 * File contains all the administration image manipulation functions.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/** The descriptions for theme files. */
    310$wp_file_descriptions = array (
    411    'index.php' => __( 'Main Index Template' ),
    512    'style.css' => __( 'Stylesheet' ),
    6     'rtl.css' => __( 'RTL Stylesheet' ), 
    7     'comments.php' => __( 'Comments' ), 
    8     'comments-popup.php' => __( 'Popup Comments' ), 
    9     'footer.php' => __( 'Footer' ), 
    10     'header.php' => __( 'Header' ), 
     13    'rtl.css' => __( 'RTL Stylesheet' ),
     14    'comments.php' => __( 'Comments' ),
     15    'comments-popup.php' => __( 'Popup Comments' ),
     16    'footer.php' => __( 'Footer' ),
     17    'header.php' => __( 'Header' ),
    1118    'sidebar.php' => __( 'Sidebar' ),
    1219    'archive.php' => __( 'Archives' ),
     
    2835    // Deprecated files
    2936    'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' ));
     37
     38/**
     39 * {@internal Missing Short Description}}
     40 *
     41 * @since unknown
     42 *
     43 * @param unknown_type $file
     44 * @return unknown
     45 */
    3046function get_file_description( $file ) {
    3147    global $wp_file_descriptions;
     
    4359}
    4460
     61/**
     62 * {@internal Missing Short Description}}
     63 *
     64 * @since unknown
     65 *
     66 * @return unknown
     67 */
    4568function get_home_path() {
    4669    $home = get_option( 'home' );
     
    5780}
    5881
     82/**
     83 * {@internal Missing Short Description}}
     84 *
     85 * @since unknown
     86 *
     87 * @param unknown_type $file
     88 * @return unknown
     89 */
    5990function get_real_file_to_edit( $file ) {
    6091    if ('index.php' == $file || '.htaccess' == $file ) {
     
    6697    return $real_file;
    6798}
    68 //$folder = Full path to folder
    69 //$levels = Levels of folders to follow, Default: 100 (PHP Loop limit)
     99
     100/**
     101 * {@internal Missing Short Description}}
     102 *
     103 * @since unknown
     104 *
     105 * @param string $folder Optional. Full path to folder
     106 * @param int $levels Optional. Levels of folders to follow, Default: 100 (PHP Loop limit).
     107 * @return bool|array
     108 */
    70109function list_files( $folder = '', $levels = 100 ) {
    71110    if( empty($folder) )
     
    95134}
    96135
     136/**
     137 * {@internal Missing Short Description}}
     138 *
     139 * @since unknown
     140 *
     141 * @return unknown
     142 */
    97143function get_temp_dir() {
    98144    if ( defined('WP_TEMP_DIR') )
     
    109155}
    110156
     157/**
     158 * {@internal Missing Short Description}}
     159 *
     160 * @since unknown
     161 *
     162 * @param unknown_type $filename
     163 * @param unknown_type $dir
     164 * @return unknown
     165 */
    111166function wp_tempnam($filename = '', $dir = ''){
    112167    if ( empty($dir) )
     
    121176}
    122177
     178/**
     179 * {@internal Missing Short Description}}
     180 *
     181 * @since unknown
     182 *
     183 * @param unknown_type $file
     184 * @param unknown_type $allowed_files
     185 * @return unknown
     186 */
    123187function validate_file_to_edit( $file, $allowed_files = '' ) {
    124188    $file = stripslashes( $file );
     
    141205}
    142206
    143 // array wp_handle_upload ( array &file [, array overrides] )
    144 // file: reference to a single element of $_FILES. Call the function once for each uploaded file.
    145 // overrides: an associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ).
    146 // On success, returns an associative array of file attributes.
    147 // On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).
     207/**
     208 * {@internal Missing Short Description}}
     209 *
     210 * @since unknown
     211 *
     212 * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file.
     213 * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ).
     214 * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).
     215 */
    148216function wp_handle_upload( &$file, $overrides = false ) {
    149217    // The default error handler.
     
    237305    return $return;
    238306}
    239 // Pass this function an array similar to that of a $_FILES POST array.
     307
     308/**
     309 * {@internal Missing Short Description}}
     310 *
     311 * Pass this function an array similar to that of a $_FILES POST array.
     312 *
     313 * @since unknown
     314 *
     315 * @param unknown_type $file
     316 * @param unknown_type $overrides
     317 * @return unknown
     318 */
    240319function wp_handle_sideload( &$file, $overrides = false ) {
    241320    // The default error handler.
     
    335414
    336415/**
    337 * Downloads a url to a local file using the Snoopy HTTP Class
    338 *
    339 * @param string $url the URL of the file to download
    340 * @return mixed WP_Error on failure, string Filename on success.
    341 */
     416 * Downloads a url to a local file using the Snoopy HTTP Class.
     417 *
     418 * @since unknown
     419 * @todo Transition over to using the new HTTP Request API (jacob).
     420 *
     421 * @param string $url the URL of the file to download
     422 * @return mixed WP_Error on failure, string Filename on success.
     423 */
    342424function download_url( $url ) {
    343425    //WARNING: The file is not automatically deleted, The script must unlink() the file.
     
    368450}
    369451
     452/**
     453 * {@internal Missing Short Description}}
     454 *
     455 * @since unknown
     456 *
     457 * @param unknown_type $file
     458 * @param unknown_type $to
     459 * @return unknown
     460 */
    370461function unzip_file($file, $to) {
    371462    global $wp_filesystem;
     
    428519}
    429520
     521/**
     522 * {@internal Missing Short Description}}
     523 *
     524 * @since unknown
     525 *
     526 * @param unknown_type $from
     527 * @param unknown_type $to
     528 * @return unknown
     529 */
    430530function copy_dir($from, $to) {
    431531    global $wp_filesystem;
     
    453553}
    454554
     555/**
     556 * {@internal Missing Short Description}}
     557 *
     558 * @since unknown
     559 *
     560 * @param unknown_type $args
     561 * @return unknown
     562 */
    455563function WP_Filesystem( $args = false ) {
    456564    global $wp_filesystem;
     
    481589}
    482590
     591/**
     592 * {@internal Missing Short Description}}
     593 *
     594 * @since unknown
     595 *
     596 * @param unknown_type $args
     597 * @return unknown
     598 */
    483599function get_filesystem_method($args = array()) {
    484600    $method = false;
     
    496612}
    497613
     614/**
     615 * {@internal Missing Short Description}}
     616 *
     617 * @since unknown
     618 *
     619 * @param unknown_type $form_post
     620 * @param unknown_type $type
     621 * @param unknown_type $error
     622 * @return unknown
     623 */
    498624function request_filesystem_credentials($form_post, $type = '', $error = false) {
    499625    $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error);
Note: See TracChangeset for help on using the changeset viewer.