Make WordPress Core

Changeset 9053


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

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

Location:
trunk/wp-admin/includes
Files:
15 edited

Legend:

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

    r8758 r9053  
    11<?php
    2 
     2/**
     3 * WordPress Bookmark 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 add_link() {
    417    return edit_link();
    518}
    619
     20/**
     21 * {@internal Missing Short Description}}
     22 *
     23 * @since unknown
     24 *
     25 * @param unknown_type $link_id
     26 * @return unknown
     27 */
    728function edit_link( $link_id = '' ) {
    829    if (!current_user_can( 'manage_links' ))
     
    2546}
    2647
     48/**
     49 * {@internal Missing Short Description}}
     50 *
     51 * @since unknown
     52 *
     53 * @return unknown
     54 */
    2755function get_default_link_to_edit() {
    2856    if ( isset( $_GET['linkurl'] ) )
     
    4169}
    4270
     71/**
     72 * {@internal Missing Short Description}}
     73 *
     74 * @since unknown
     75 *
     76 * @param unknown_type $link_id
     77 * @return unknown
     78 */
    4379function wp_delete_link($link_id) {
    4480    global $wpdb;
     
    5793}
    5894
     95/**
     96 * {@internal Missing Short Description}}
     97 *
     98 * @since unknown
     99 *
     100 * @param unknown_type $link_id
     101 * @return unknown
     102 */
    59103function wp_get_link_cats($link_id = 0) {
    60104
     
    64108}
    65109
     110/**
     111 * {@internal Missing Short Description}}
     112 *
     113 * @since unknown
     114 *
     115 * @param unknown_type $link_id
     116 * @return unknown
     117 */
    66118function get_link_to_edit( $link_id ) {
    67119    return get_bookmark( $link_id, OBJECT, 'edit' );
    68120}
    69121
     122/**
     123 * {@internal Missing Short Description}}
     124 *
     125 * @since unknown
     126 *
     127 * @param unknown_type $linkdata
     128 * @return unknown
     129 */
    70130function wp_insert_link($linkdata, $wp_error = false) {
    71131    global $wpdb, $current_user;
     
    155215}
    156216
     217/**
     218 * {@internal Missing Short Description}}
     219 *
     220 * @since unknown
     221 *
     222 * @param unknown_type $link_id
     223 * @param unknown_type $link_categories
     224 */
    157225function wp_set_link_cats($link_id = 0, $link_categories = array()) {
    158226    // If $link_categories isn't already an array, make it one:
     
    168236}   // wp_set_link_cats()
    169237
     238/**
     239 * {@internal Missing Short Description}}
     240 *
     241 * @since unknown
     242 *
     243 * @param unknown_type $linkdata
     244 * @return unknown
     245 */
    170246function wp_update_link($linkdata) {
    171247    $link_id = (int) $linkdata['link_id'];
  • 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);
  • trunk/wp-admin/includes/image.php

    r8912 r9053  
    222222
    223223/**
    224  * Get extended image metadata, exif or iptc as available
     224 * Get extended image metadata, exif or iptc as available.
    225225 *
    226226 * @since unknown
  • trunk/wp-admin/includes/import.php

    r6477 r9053  
    11<?php
     2/**
     3 * WordPress Administration Importer API.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
     9/**
     10 * {@internal Missing Short Description}}
     11 *
     12 * @since unknown
     13 *
     14 * @return unknown
     15 */
    316function get_importers() {
    417    global $wp_importers;
     
    821}
    922
     23/**
     24 * {@internal Missing Short Description}}
     25 *
     26 * @since unknown
     27 *
     28 * @param unknown_type $id
     29 * @param unknown_type $name
     30 * @param unknown_type $description
     31 * @param unknown_type $callback
     32 * @return unknown
     33 */
    1034function register_importer( $id, $name, $description, $callback ) {
    1135    global $wp_importers;
     
    1539}
    1640
     41/**
     42 * {@internal Missing Short Description}}
     43 *
     44 * @since unknown
     45 *
     46 * @param unknown_type $id
     47 */
    1748function wp_import_cleanup( $id ) {
    1849    wp_delete_attachment( $id );
    1950}
    2051
     52/**
     53 * {@internal Missing Short Description}}
     54 *
     55 * @since unknown
     56 *
     57 * @return unknown
     58 */
    2159function wp_import_handle_upload() {
    2260    $overrides = array( 'test_form' => false, 'test_type' => false );
  • trunk/wp-admin/includes/media.php

    r9014 r9053  
    11<?php
    2 
     2/**
     3 * WordPress Administration Media 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 media_upload_tabs() {
    417    $_default_tabs = array(
     
    1124}
    1225
     26/**
     27 * {@internal Missing Short Description}}
     28 *
     29 * @since unknown
     30 *
     31 * @param unknown_type $tabs
     32 * @return unknown
     33 */
    1334function update_gallery_tab($tabs) {
    1435    global $wpdb;
     
    2647add_filter('media_upload_tabs', 'update_gallery_tab');
    2748
     49/**
     50 * {@internal Missing Short Description}}
     51 *
     52 * @since unknown
     53 */
    2854function the_media_upload_tabs() {
    2955    global $redir_tab;
     
    5278}
    5379
     80/**
     81 * {@internal Missing Short Description}}
     82 *
     83 * @since unknown
     84 *
     85 * @param unknown_type $id
     86 * @param unknown_type $alt
     87 * @param unknown_type $title
     88 * @param unknown_type $align
     89 * @param unknown_type $url
     90 * @param unknown_type $rel
     91 * @param unknown_type $size
     92 * @return unknown
     93 */
    5494function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') {
    5595
     
    66106}
    67107
     108/**
     109 * {@internal Missing Short Description}}
     110 *
     111 * @since unknown
     112 *
     113 * @param unknown_type $html
     114 * @param unknown_type $id
     115 * @param unknown_type $alt
     116 * @param unknown_type $title
     117 * @param unknown_type $align
     118 * @param unknown_type $url
     119 * @param unknown_type $size
     120 * @return unknown
     121 */
    68122function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) {
    69123
     
    85139add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 );
    86140
     141/**
     142 * {@internal Missing Short Description}}
     143 *
     144 * @since unknown
     145 *
     146 * @param unknown_type $html
     147 */
    87148function media_send_to_editor($html) {
    88     ?>
     149?>
    89150<script type="text/javascript">
    90151/* <![CDATA[ */
     
    97158}
    98159
    99 // this handles the file upload POST itself, creating the attachment post
     160/**
     161 * {@internal Missing Short Description}}
     162 *
     163 * This handles the file upload POST itself, creating the attachment post.
     164 *
     165 * @since unknown
     166 *
     167 * @param unknown_type $file_id
     168 * @param unknown_type $post_id
     169 * @param unknown_type $post_data
     170 * @return unknown
     171 */
    100172function media_handle_upload($file_id, $post_id, $post_data = array()) {
    101173    $overrides = array('test_form'=>false);
     
    138210}
    139211
     212/**
     213 * {@internal Missing Short Description}}
     214 *
     215 * @since unknown
     216 *
     217 * @param unknown_type $file_array
     218 * @param unknown_type $post_id
     219 * @param unknown_type $desc
     220 * @param unknown_type $post_data
     221 * @return unknown
     222 */
    140223function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) {
    141224    $overrides = array('test_form'=>false);
     
    179262}
    180263
    181 
    182 // wrap iframe content (produced by $content_func) in a doctype, html head/body etc
    183 // any additional function args will be passed to content_func
     264/**
     265 * {@internal Missing Short Description}}
     266 *
     267 * Wrap iframe content (produced by $content_func) in a doctype, html head/body
     268 * etc any additional function args will be passed to content_func.
     269 *
     270 * @since unknown
     271 *
     272 * @param unknown_type $content_func
     273 */
    184274function wp_iframe($content_func /* ... */) {
    185275?>
     
    221311}
    222312
     313/**
     314 * {@internal Missing Short Description}}
     315 *
     316 * @since unknown
     317 */
    223318function media_buttons() {
    224319    global $post_ID, $temp_ID;
     
    246341add_action('media_upload_media', 'media_upload_handler');
    247342
     343/**
     344 * {@internal Missing Short Description}}
     345 *
     346 * @since unknown
     347 *
     348 * @return unknown
     349 */
    248350function media_upload_form_handler() {
    249351    check_admin_referer('media-form');
     
    295397}
    296398
     399/**
     400 * {@internal Missing Short Description}}
     401 *
     402 * @since unknown
     403 *
     404 * @return unknown
     405 */
    297406function media_upload_image() {
    298407    $errors = array();
     
    340449}
    341450
     451/**
     452 * {@internal Missing Short Description}}
     453 *
     454 * @since unknown
     455 *
     456 * @param unknown_type $file
     457 * @param unknown_type $post_id
     458 * @param unknown_type $desc
     459 * @return unknown
     460 */
    342461function media_sideload_image($file, $post_id, $desc = null) {
    343462    if (!empty($file) ) {
     
    368487}
    369488
     489/**
     490 * {@internal Missing Short Description}}
     491 *
     492 * @since unknown
     493 *
     494 * @return unknown
     495 */
    370496function media_upload_audio() {
    371497    $errors = array();
     
    411537}
    412538
     539/**
     540 * {@internal Missing Short Description}}
     541 *
     542 * @since unknown
     543 *
     544 * @return unknown
     545 */
    413546function media_upload_video() {
    414547    $errors = array();
     
    454587}
    455588
     589/**
     590 * {@internal Missing Short Description}}
     591 *
     592 * @since unknown
     593 *
     594 * @return unknown
     595 */
    456596function media_upload_file() {
    457597    $errors = array();
     
    497637}
    498638
     639/**
     640 * {@internal Missing Short Description}}
     641 *
     642 * @since unknown
     643 *
     644 * @return unknown
     645 */
    499646function media_upload_gallery() {
    500647    $errors = array();
     
    513660}
    514661
     662/**
     663 * {@internal Missing Short Description}}
     664 *
     665 * @since unknown
     666 *
     667 * @return unknown
     668 */
    515669function media_upload_library() {
    516670    $errors = array();
     
    528682
    529683// produce HTML for the image alignment radio buttons with the specified one checked
     684/**
     685 * {@internal Missing Short Description}}
     686 *
     687 * @since unknown
     688 *
     689 * @param unknown_type $post
     690 * @param unknown_type $checked
     691 * @return unknown
     692 */
    530693function image_align_input_fields($post, $checked='') {
    531694   
     
    545708
    546709// produce HTML for the size radio buttons with the specified one checked
     710/**
     711 * {@internal Missing Short Description}}
     712 *
     713 * @since unknown
     714 *
     715 * @param unknown_type $post
     716 * @param unknown_type $checked
     717 * @return unknown
     718 */
    547719function image_size_input_fields($post, $checked='') {
    548720       
     
    583755
    584756// produce HTML for the Link URL buttons with the default link type as specified
     757/**
     758 * {@internal Missing Short Description}}
     759 *
     760 * @since unknown
     761 *
     762 * @param unknown_type $post
     763 * @param unknown_type $url_type
     764 * @return unknown
     765 */
    585766function image_link_input_fields($post, $url_type='') {
    586767
     
    603784}
    604785
     786/**
     787 * {@internal Missing Short Description}}
     788 *
     789 * @since unknown
     790 *
     791 * @param unknown_type $form_fields
     792 * @param unknown_type $post
     793 * @return unknown
     794 */
    605795function image_attachment_fields_to_edit($form_fields, $post) {
    606796    if ( substr($post->post_mime_type, 0, 5) == 'image' ) {
     
    625815add_filter('attachment_fields_to_edit', 'image_attachment_fields_to_edit', 10, 2);
    626816
     817/**
     818 * {@internal Missing Short Description}}
     819 *
     820 * @since unknown
     821 *
     822 * @param unknown_type $form_fields
     823 * @param unknown_type $post
     824 * @return unknown
     825 */
    627826function media_single_attachment_fields_to_edit( $form_fields, $post ) {
    628827    unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']);
     
    630829}
    631830
     831/**
     832 * {@internal Missing Short Description}}
     833 *
     834 * @since unknown
     835 *
     836 * @param unknown_type $post
     837 * @param unknown_type $attachment
     838 * @return unknown
     839 */
    632840function image_attachment_fields_to_save($post, $attachment) {
    633841    if ( substr($post['post_mime_type'], 0, 5) == 'image' ) {
     
    643851add_filter('attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2);
    644852
     853/**
     854 * {@internal Missing Short Description}}
     855 *
     856 * @since unknown
     857 *
     858 * @param unknown_type $html
     859 * @param unknown_type $attachment_id
     860 * @param unknown_type $attachment
     861 * @return unknown
     862 */
    645863function image_media_send_to_editor($html, $attachment_id, $attachment) {
    646864    $post =& get_post($attachment_id);
     
    668886add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3);
    669887
     888/**
     889 * {@internal Missing Short Description}}
     890 *
     891 * @since unknown
     892 *
     893 * @param unknown_type $post
     894 * @param unknown_type $errors
     895 * @return unknown
     896 */
    670897function get_attachment_fields_to_edit($post, $errors = null) {
    671898    if ( is_int($post) )
     
    733960}
    734961
     962/**
     963 * {@internal Missing Short Description}}
     964 *
     965 * @since unknown
     966 *
     967 * @param unknown_type $post_id
     968 * @param unknown_type $errors
     969 * @return unknown
     970 */
    735971function get_media_items( $post_id, $errors ) {
    736972    if ( $post_id ) {
     
    756992}
    757993
     994/**
     995 * {@internal Missing Short Description}}
     996 *
     997 * @since unknown
     998 *
     999 * @param unknown_type $attachment_id
     1000 * @param unknown_type $args
     1001 * @return unknown
     1002 */
    7581003function get_media_item( $attachment_id, $args = null ) {
    7591004    global $redir_tab;
     
    9201165}
    9211166
     1167/**
     1168 * {@internal Missing Short Description}}
     1169 *
     1170 * @since unknown
     1171 */
    9221172function media_upload_header() {
    9231173    ?>
     
    9291179}
    9301180
     1181/**
     1182 * {@internal Missing Short Description}}
     1183 *
     1184 * @since unknown
     1185 *
     1186 * @param unknown_type $errors
     1187 */
    9311188function media_upload_form( $errors = null ) {
    9321189    global $type, $tab;
     
    10181275}
    10191276
     1277/**
     1278 * {@internal Missing Short Description}}
     1279 *
     1280 * @since unknown
     1281 *
     1282 * @param unknown_type $type
     1283 * @param unknown_type $errors
     1284 * @param unknown_type $id
     1285 */
    10201286function media_upload_type_form($type = 'file', $errors = null, $id = null) {
    10211287    media_upload_header();
     
    11451411}
    11461412
     1413/**
     1414 * {@internal Missing Short Description}}
     1415 *
     1416 * @since unknown
     1417 *
     1418 * @param unknown_type $errors
     1419 */
    11471420function media_upload_gallery_form($errors) {
    11481421    global $redir_tab;
     
    11901463}
    11911464
     1465/**
     1466 * {@internal Missing Short Description}}
     1467 *
     1468 * @since unknown
     1469 *
     1470 * @param unknown_type $errors
     1471 */
    11921472function media_upload_library_form($errors) {
    11931473    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
     
    13361616}
    13371617
     1618/**
     1619 * {@internal Missing Short Description}}
     1620 *
     1621 * @since unknown
     1622 *
     1623 * @return unknown
     1624 */
    13381625function type_form_image() {
    13391626
     
    14121699}
    14131700
     1701/**
     1702 * {@internal Missing Short Description}}
     1703 *
     1704 * @since unknown
     1705 *
     1706 * @return unknown
     1707 */
    14141708function type_form_audio() {
    14151709    return '
     
    14401734}
    14411735
     1736/**
     1737 * {@internal Missing Short Description}}
     1738 *
     1739 * @since unknown
     1740 *
     1741 * @return unknown
     1742 */
    14421743function type_form_video() {
    14431744    return '
     
    14681769}
    14691770
     1771/**
     1772 * {@internal Missing Short Description}}
     1773 *
     1774 * @since unknown
     1775 *
     1776 * @return unknown
     1777 */
    14701778function type_form_file() {
    14711779    return '
     
    14971805
    14981806// support a GET parameter for disabling the flash uploader
     1807/**
     1808 * {@internal Missing Short Description}}
     1809 *
     1810 * @since unknown
     1811 *
     1812 * @param unknown_type $flash
     1813 * @return unknown
     1814 */
    14991815function media_upload_use_flash($flash) {
    15001816    if ( array_key_exists('flash', $_REQUEST) )
     
    15051821add_filter('flash_uploader', 'media_upload_use_flash');
    15061822
     1823/**
     1824 * {@internal Missing Short Description}}
     1825 *
     1826 * @since unknown
     1827 */
    15071828function media_upload_flash_bypass() {
    15081829    echo '<p class="upload-flash-bypass">';
     
    15131834add_action('post-flash-upload-ui', 'media_upload_flash_bypass');
    15141835
     1836/**
     1837 * {@internal Missing Short Description}}
     1838 *
     1839 * @since unknown
     1840 */
    15151841function media_upload_html_bypass() {
    15161842    echo '<p class="upload-html-bypass">';
     
    15291855
    15301856// make sure the GET parameter sticks when we submit a form
     1857/**
     1858 * {@internal Missing Short Description}}
     1859 *
     1860 * @since unknown
     1861 *
     1862 * @param unknown_type $url
     1863 * @return unknown
     1864 */
    15311865function media_upload_bypass_url($url) {
    15321866    if ( array_key_exists('flash', $_REQUEST) )
  • 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 == '' ) {
  • trunk/wp-admin/includes/post.php

    r9036 r9053  
    11<?php
     2/**
     3 * WordPress Post Administration API.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
    39/**
     
    713 *
    814 * @package WordPress
    9  * @since 2.6
     15 * @since 2.6.0
    1016 *
    1117 * @param bool $update Are we updating a pre-existing post?
    12  * @param post_data array Array of post data. Defaults to the contents of $_POST
     18 * @param post_data array Array of post data. Defaults to the contents of $_POST.
    1319 * @return object|bool WP_Error on failure, true on success.
    1420 */
     
    111117}
    112118
    113 
    114 // Update an existing post with values provided in $_POST.
     119/**
     120 * Update an existing post with values provided in $_POST.
     121 *
     122 * @since unknown
     123 *
     124 * @param array $post_data Optional.
     125 * @return int Post ID.
     126 */
    115127function edit_post( $post_data = null ) {
    116128
     
    178190}
    179191
    180 // updates all bulk edited posts/pages, adding (but not removing) tags and categories. Skips pages when they would be their own parent or child.
     192/**
     193 * {@internal Missing Short Description}}
     194 *
     195 * Updates all bulk edited posts/pages, adding (but not removing) tags and
     196 * categories. Skips pages when they would be their own parent or child.
     197 *
     198 * @since unknown
     199 *
     200 * @return array
     201 */
    181202function bulk_edit_posts( $post_data = null ) {
    182203    global $wpdb;
     
    259280}
    260281
    261 // Default post information to use when populating the "Write Post" form.
     282/**
     283 * Default post information to use when populating the "Write Post" form.
     284 *
     285 * @since unknown
     286 *
     287 * @return unknown
     288 */
    262289function get_default_post_to_edit() {
    263290    if ( !empty( $_REQUEST['post_title'] ) )
     
    307334}
    308335
     336/**
     337 * {@internal Missing Short Description}}
     338 *
     339 * @since unknown
     340 *
     341 * @return unknown
     342 */
    309343function get_default_page_to_edit() {
    310344    $page = get_default_post_to_edit();
     
    313347}
    314348
    315 // Get an existing post and format it for editing.
     349/**
     350 * Get an existing post and format it for editing.
     351 *
     352 * @since unknown
     353 *
     354 * @param unknown_type $id
     355 * @return unknown
     356 */
    316357function get_post_to_edit( $id ) {
    317358
     
    324365}
    325366
     367/**
     368 * {@internal Missing Short Description}}
     369 *
     370 * @since unknown
     371 *
     372 * @param unknown_type $title
     373 * @param unknown_type $content
     374 * @param unknown_type $post_date
     375 * @return unknown
     376 */
    326377function post_exists($title, $content = '', $post_date = '') {
    327378    global $wpdb;
     
    339390}
    340391
    341 // Creates a new post from the "Write Post" form using $_POST information.
     392/**
     393 * Creates a new post from the "Write Post" form using $_POST information.
     394 *
     395 * @since unknown
     396 *
     397 * @return unknown
     398 */
    342399function wp_write_post() {
    343400    global $user_ID;
     
    406463}
    407464
     465/**
     466 * {@internal Missing Short Description}}
     467 *
     468 * @since unknown
     469 *
     470 * @return unknown
     471 */
    408472function write_post() {
    409473    $result = wp_write_post();
     
    418482//
    419483
     484/**
     485 * {@internal Missing Short Description}}
     486 *
     487 * @since unknown
     488 *
     489 * @param unknown_type $post_ID
     490 * @return unknown
     491 */
    420492function add_meta( $post_ID ) {
    421493    global $wpdb;
     
    452524} // add_meta
    453525
     526/**
     527 * {@internal Missing Short Description}}
     528 *
     529 * @since unknown
     530 *
     531 * @param unknown_type $mid
     532 * @return unknown
     533 */
    454534function delete_meta( $mid ) {
    455535    global $wpdb;
     
    462542}
    463543
    464 // Get a list of previously defined keys
     544/**
     545 * Get a list of previously defined keys.
     546 *
     547 * @since unknown
     548 *
     549 * @return unknown
     550 */
    465551function get_meta_keys() {
    466552    global $wpdb;
     
    475561}
    476562
     563/**
     564 * {@internal Missing Short Description}}
     565 *
     566 * @since unknown
     567 *
     568 * @param unknown_type $mid
     569 * @return unknown
     570 */
    477571function get_post_meta_by_id( $mid ) {
    478572    global $wpdb;
     
    485579}
    486580
    487 // Some postmeta stuff
     581/**
     582 * {@internal Missing Short Description}}
     583 *
     584 * Some postmeta stuff.
     585 *
     586 * @since unknown
     587 *
     588 * @param unknown_type $postid
     589 * @return unknown
     590 */
    488591function has_meta( $postid ) {
    489592    global $wpdb;
     
    495598}
    496599
     600/**
     601 * {@internal Missing Short Description}}
     602 *
     603 * @since unknown
     604 *
     605 * @param unknown_type $meta_id
     606 * @param unknown_type $meta_key
     607 * @param unknown_type $meta_value
     608 * @return unknown
     609 */
    497610function update_meta( $meta_id, $meta_key, $meta_value ) {
    498611    global $wpdb;
     
    519632//
    520633
    521 // Replace hrefs of attachment anchors with up-to-date permalinks.
     634/**
     635 * Replace hrefs of attachment anchors with up-to-date permalinks.
     636 *
     637 * @since unknown
     638 * @access private
     639 *
     640 * @param unknown_type $post_ID
     641 * @return unknown
     642 */
    522643function _fix_attachment_links( $post_ID ) {
    523644
     
    560681}
    561682
    562 // Move child posts to a new parent
     683/**
     684 * Move child posts to a new parent.
     685 *
     686 * @since unknown
     687 * @access private
     688 *
     689 * @param unknown_type $old_ID
     690 * @param unknown_type $new_ID
     691 * @return unknown
     692 */
    563693function _relocate_children( $old_ID, $new_ID ) {
    564694    global $wpdb;
     
    568698}
    569699
     700/**
     701 * {@internal Missing Short Description}}
     702 *
     703 * @since unknown
     704 *
     705 * @param unknown_type $type
     706 * @return unknown
     707 */
    570708function get_available_post_statuses($type = 'post') {
    571709    $stati = wp_count_posts($type);
     
    574712}
    575713
     714/**
     715 * {@internal Missing Short Description}}
     716 *
     717 * @since unknown
     718 *
     719 * @param unknown_type $q
     720 * @return unknown
     721 */
    576722function wp_edit_posts_query( $q = false ) {
    577723    global $wpdb;
     
    614760}
    615761
     762/**
     763 * {@internal Missing Short Description}}
     764 *
     765 * @since unknown
     766 *
     767 * @param unknown_type $type
     768 * @return unknown
     769 */
    616770function get_available_post_mime_types($type = 'attachment') {
    617771    global $wpdb;
     
    621775}
    622776
     777/**
     778 * {@internal Missing Short Description}}
     779 *
     780 * @since unknown
     781 *
     782 * @param unknown_type $q
     783 * @return unknown
     784 */
    623785function wp_edit_attachments_query( $q = false ) {
    624786    global $wpdb;
     
    648810}
    649811
     812/**
     813 * {@internal Missing Short Description}}
     814 *
     815 * @since unknown
     816 *
     817 * @param unknown_type $id
     818 * @param unknown_type $page
     819 * @return unknown
     820 */
    650821function postbox_classes( $id, $page ) {
    651822    $current_user = wp_get_current_user();
     
    659830}
    660831
     832/**
     833 * {@internal Missing Short Description}}
     834 *
     835 * @since unknown
     836 *
     837 * @param unknown_type $id
     838 * @param unknown_type $title
     839 * @param unknown_type $name
     840 * @return unknown
     841 */
    661842function get_sample_permalink($id, $title=null, $name = null) {
    662843    $post = &get_post($id);
     
    702883}
    703884
     885/**
     886 * {@internal Missing Short Description}}
     887 *
     888 * @since unknown
     889 *
     890 * @param unknown_type $id
     891 * @param unknown_type $new_title
     892 * @param unknown_type $new_slug
     893 * @return unknown
     894 */
    704895function get_sample_permalink_html($id, $new_title=null, $new_slug=null) {
    705896    $post = &get_post($id);
     
    721912}
    722913
    723 // false: not locked or locked by current user
    724 // int: user ID of user with lock
     914/**
     915 * {@internal Missing Short Description}}
     916 *
     917 * @since unknown
     918 *
     919 * @param unknown_type $post_id
     920 * @return bool|int False: not locked or locked by current user. Int: user ID of user with lock.
     921 */
    725922function wp_check_post_lock( $post_id ) {
    726923    global $current_user;
     
    739936}
    740937
     938/**
     939 * {@internal Missing Short Description}}
     940 *
     941 * @since unknown
     942 *
     943 * @param unknown_type $post_id
     944 * @return unknown
     945 */
    741946function wp_set_post_lock( $post_id ) {
    742947    global $current_user;
     
    755960
    756961/**
    757  * wp_create_post_autosave() - creates autosave data for the specified post from $_POST data
     962 * Creates autosave data for the specified post from $_POST data.
    758963 *
    759964 * @package WordPress
    760  * @subpackage Post Revisions
    761  * @since 2.6
     965 * @subpackage Post_Revisions
     966 * @since 2.6.0
    762967 *
    763968 * @uses _wp_translate_postdata()
     
    781986
    782987/**
    783  * wp_teeny_mce() - adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen.
     988 * Adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen.
    784989 *
    785990 * @package WordPress
    786  * @since 2.6
     991 * @since 2.6.0
    787992 */
    788993function wp_teeny_mce( $args = null ) {
  • trunk/wp-admin/includes/schema.php

    r8989 r9053  
    11<?php
    2 // Here we keep the DB structure and option values
    3 
     2/**
     3 * WordPress Schema for installation and upgrading.
     4 *
     5 * Here we keep the DB structure and option values.
     6 *
     7 * @package WordPress
     8 * @subpackage Administration
     9 */
     10
     11/** WordPress Database collate charset */
    412$charset_collate = '';
    513
     
    1422}
    1523
    16 $wp_queries="CREATE TABLE $wpdb->terms (
     24/** Create WordPress database tables SQL */
     25$wp_queries = "CREATE TABLE $wpdb->terms (
    1726 term_id bigint(20) NOT NULL auto_increment,
    1827 name varchar(200) NOT NULL default '',
     
    153162) $charset_collate;";
    154163
     164/**
     165 * Create WordPress options and set the default values.
     166 *
     167 * @since unknown
     168 * @uses $wpdb
     169 * @uses $wp_db_version
     170 */
    155171function populate_options() {
    156172    global $wpdb, $wp_db_version;
     
    281297}
    282298
     299/**
     300 * Execute WordPress role creation for the various WordPress versions.
     301 *
     302 * @since unknown (2.0.0)
     303 */
    283304function populate_roles() {
    284305    populate_roles_160();
     
    290311}
    291312
     313/**
     314 * Create the roles for WordPress 2.0
     315 *
     316 * @since 2.0.0
     317 */
    292318function populate_roles_160() {
    293319    // Add roles
     
    385411}
    386412
     413/**
     414 * Create and modify WordPress roles for WordPress 2.1.
     415 *
     416 * @since 2.1.0
     417 */
    387418function populate_roles_210() {
    388419    $roles = array('administrator', 'editor');
     
    427458}
    428459
     460/**
     461 * Create and modify WordPress roles for WordPress 2.3.
     462 *
     463 * @since 2.3.0
     464 */
    429465function populate_roles_230() {
    430466    $role = get_role( 'administrator' );
     
    435471}
    436472
     473/**
     474 * Create and modify WordPress roles for WordPress 2.5.
     475 *
     476 * @since 2.5.0
     477 */
    437478function populate_roles_250() {
    438479    $role = get_role( 'administrator' );
     
    443484}
    444485
     486/**
     487 * Create and modify WordPress roles for WordPress 2.6.
     488 *
     489 * @since 2.6.0
     490 */
    445491function populate_roles_260() {
    446492    $role = get_role( 'administrator' );
     
    452498}
    453499
     500/**
     501 * Create and modify WordPress roles for WordPress 2.7.
     502 *
     503 * @since 2.7.0
     504 */
    454505function populate_roles_270() {
    455506    $role = get_role( 'administrator' );
  • trunk/wp-admin/includes/taxonomy.php

    r8603 r9053  
    11<?php
     2/**
     3 * WordPress Taxonomy Administration API.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
    39//
     
    511//
    612
     13/**
     14 * {@internal Missing Short Description}}
     15 *
     16 * @since unknown
     17 *
     18 * @param unknown_type $cat_name
     19 * @return unknown
     20 */
    721function category_exists($cat_name) {
    822    $id = is_term($cat_name, 'category');
     
    1226}
    1327
     28/**
     29 * {@internal Missing Short Description}}
     30 *
     31 * @since unknown
     32 *
     33 * @param unknown_type $id
     34 * @return unknown
     35 */
    1436function get_category_to_edit( $id ) {
    1537    $category = get_category( $id, OBJECT, 'edit' );
     
    1739}
    1840
     41/**
     42 * {@internal Missing Short Description}}
     43 *
     44 * @since unknown
     45 *
     46 * @param unknown_type $cat_name
     47 * @param unknown_type $parent
     48 * @return unknown
     49 */
    1950function wp_create_category( $cat_name, $parent = 0 ) {
    2051    if ( $id = category_exists($cat_name) )
     
    2455}
    2556
     57/**
     58 * {@internal Missing Short Description}}
     59 *
     60 * @since unknown
     61 *
     62 * @param unknown_type $categories
     63 * @param unknown_type $post_id
     64 * @return unknown
     65 */
    2666function wp_create_categories($categories, $post_id = '') {
    2767    $cat_ids = array ();
     
    4080}
    4181
     82/**
     83 * {@internal Missing Short Description}}
     84 *
     85 * @since unknown
     86 *
     87 * @param unknown_type $cat_ID
     88 * @return unknown
     89 */
    4290function wp_delete_category($cat_ID) {
    4391    $cat_ID = (int) $cat_ID;
     
    5199}
    52100
     101/**
     102 * {@internal Missing Short Description}}
     103 *
     104 * @since unknown
     105 *
     106 * @param unknown_type $catarr
     107 * @param unknown_type $wp_error
     108 * @return unknown
     109 */
    53110function wp_insert_category($catarr, $wp_error = false) {
    54111    $cat_defaults = array('cat_ID' => 0, 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => '');
     
    100157}
    101158
     159/**
     160 * {@internal Missing Short Description}}
     161 *
     162 * @since unknown
     163 *
     164 * @param unknown_type $catarr
     165 * @return unknown
     166 */
    102167function wp_update_category($catarr) {
    103168    $cat_ID = (int) $catarr['cat_ID'];
     
    122187//
    123188
     189/**
     190 * {@internal Missing Short Description}}
     191 *
     192 * @since unknown
     193 *
     194 * @param unknown_type $post_id
     195 * @return unknown
     196 */
    124197function get_tags_to_edit( $post_id ) {
    125198    $post_id = (int) $post_id;
     
    140213}
    141214
     215/**
     216 * {@internal Missing Short Description}}
     217 *
     218 * @since unknown
     219 *
     220 * @param unknown_type $tag_name
     221 * @return unknown
     222 */
    142223function tag_exists($tag_name) {
    143224    return is_term($tag_name, 'post_tag');
    144225}
    145226
     227/**
     228 * {@internal Missing Short Description}}
     229 *
     230 * @since unknown
     231 *
     232 * @param unknown_type $tag_name
     233 * @return unknown
     234 */
    146235function wp_create_tag($tag_name) {
    147236    if ( $id = tag_exists($tag_name) )
  • trunk/wp-admin/includes/template.php

    r9046 r9053  
    11<?php
    2 
    3 //
    4 // Big Mess
    5 //
     2/**
     3 * Template WordPress Administration API.
     4 *
     5 * A Big Mess. Also some neat functions that are nicely written.
     6 *
     7 * @package WordPress
     8 * @subpackage Administration
     9 */
    610
    711// Ugly recursive category stuff.
     12/**
     13 * {@internal Missing Short Description}}
     14 *
     15 * @since unknown
     16 *
     17 * @param unknown_type $parent
     18 * @param unknown_type $level
     19 * @param unknown_type $categories
     20 * @param unknown_type $page
     21 * @param unknown_type $per_page
     22 */
    823function cat_rows( $parent = 0, $level = 0, $categories = 0, $page = 1, $per_page = 20 ) {
    924    $count = 0;
     
    1126}
    1227
     28/**
     29 * {@internal Missing Short Description}}
     30 *
     31 * @since unknown
     32 *
     33 * @param unknown_type $categories
     34 * @param unknown_type $count
     35 * @param unknown_type $parent
     36 * @param unknown_type $level
     37 * @param unknown_type $page
     38 * @param unknown_type $per_page
     39 * @return unknown
     40 */
    1341function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $per_page = 20 ) {
    1442    if ( empty($categories) ) {
     
    73101}
    74102
     103/**
     104 * {@internal Missing Short Description}}
     105 *
     106 * @since unknown
     107 *
     108 * @param unknown_type $category
     109 * @param unknown_type $level
     110 * @param unknown_type $name_override
     111 * @return unknown
     112 */
    75113function _cat_row( $category, $level, $name_override = false ) {
    76114    global $class;
     
    145183}
    146184
     185/**
     186 * {@internal Missing Short Description}}
     187 *
     188 * @since unknown
     189 *
     190 * @param unknown_type $category
     191 * @param unknown_type $name_override
     192 * @return unknown
     193 */
    147194function link_cat_row( $category, $name_override = false ) {
    148195    global $class;
     
    215262}
    216263
     264/**
     265 * {@internal Missing Short Description}}
     266 *
     267 * @since unknown
     268 *
     269 * @param unknown_type $checked
     270 * @param unknown_type $current
     271 */
    217272function checked( $checked, $current) {
    218273    if ( $checked == $current)
     
    220275}
    221276
     277/**
     278 * {@internal Missing Short Description}}
     279 *
     280 * @since unknown
     281 *
     282 * @param unknown_type $selected
     283 * @param unknown_type $current
     284 */
    222285function selected( $selected, $current) {
    223286    if ( $selected == $current)
     
    229292//
    230293
    231 // Deprecated. Use wp_link_category_checklist
     294/**
     295 * {@internal Missing Short Description}}
     296 *
     297 * @since unknown
     298 * @deprecated Use {@link wp_link_category_checklist()}
     299 * @see wp_link_category_checklist()
     300 *
     301 * @param unknown_type $default
     302 * @param unknown_type $parent
     303 * @param unknown_type $popular_ids
     304 */
    232305function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
    233306    global $post_ID;
     
    235308}
    236309
     310/**
     311 * {@internal Missing Short Description}}
     312 *
     313 * @since unknown
     314 */
    237315class Walker_Category_Checklist extends Walker {
    238316    var $tree_type = 'category';
     
    261339}
    262340
     341/**
     342 * {@internal Missing Short Description}}
     343 *
     344 * @since unknown
     345 *
     346 * @param unknown_type $post_id
     347 * @param unknown_type $descendants_and_self
     348 * @param unknown_type $selected_cats
     349 * @param unknown_type $popular_cats
     350 */
    263351function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false ) {
    264352    $walker = new Walker_Category_Checklist;
     
    302390}
    303391
     392/**
     393 * {@internal Missing Short Description}}
     394 *
     395 * @since unknown
     396 *
     397 * @param unknown_type $taxonomy
     398 * @param unknown_type $default
     399 * @param unknown_type $number
     400 * @param unknown_type $echo
     401 * @return unknown
     402 */
    304403function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
    305404    global $post_ID;
     
    330429}
    331430
    332 // Deprecated. Use wp_link_category_checklist
     431/**
     432 * {@internal Missing Short Description}}
     433 *
     434 * @since unknown
     435 * @deprecated Use {@link wp_link_category_checklist()}
     436 * @see wp_link_category_checklist()
     437 *
     438 * @param unknown_type $default
     439 */
    333440function dropdown_link_categories( $default = 0 ) {
    334441    global $link_id;
     
    337444}
    338445
     446/**
     447 * {@internal Missing Short Description}}
     448 *
     449 * @since unknown
     450 *
     451 * @param unknown_type $link_id
     452 */
    339453function wp_link_category_checklist( $link_id = 0 ) {
    340454    $default = 1;
     
    368482// Returns a single tag row (see tag_rows below)
    369483// Note: this is also used in admin-ajax.php!
     484/**
     485 * {@internal Missing Short Description}}
     486 *
     487 * @since unknown
     488 *
     489 * @param unknown_type $tag
     490 * @param unknown_type $class
     491 * @return unknown
     492 */
    370493function _tag_row( $tag, $class = '' ) {
    371494        $count = number_format_i18n( $tag->count );
     
    423546// assuming M tags displayed at a time on the page
    424547// Returns the number of tags displayed
     548/**
     549 * {@internal Missing Short Description}}
     550 *
     551 * @since unknown
     552 *
     553 * @param unknown_type $page
     554 * @param unknown_type $pagesize
     555 * @param unknown_type $searchterms
     556 * @return unknown
     557 */
    425558function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
    426559
     
    450583
    451584// define the columns to display, the syntax is 'internal name' => 'display name'
     585/**
     586 * {@internal Missing Short Description}}
     587 *
     588 * @since unknown
     589 *
     590 * @return unknown
     591 */
    452592function wp_manage_posts_columns() {
    453593    $posts_columns = array();
     
    472612
    473613// define the columns to display, the syntax is 'internal name' => 'display name'
     614/**
     615 * {@internal Missing Short Description}}
     616 *
     617 * @since unknown
     618 *
     619 * @return unknown
     620 */
    474621function wp_manage_media_columns() {
    475622    $posts_columns = array();
     
    489636}
    490637
     638/**
     639 * {@internal Missing Short Description}}
     640 *
     641 * @since unknown
     642 *
     643 * @return unknown
     644 */
    491645function wp_manage_pages_columns() {
    492646    $posts_columns = array();
     
    517671}
    518672
     673/**
     674 * {@internal Missing Short Description}}
     675 *
     676 * @since unknown
     677 *
     678 * @param unknown_type $page
     679 * @return unknown
     680 */
    519681function get_column_headers($page) {
    520682    switch ($page) {
     
    591753}
    592754
     755/**
     756 * {@internal Missing Short Description}}
     757 *
     758 * @since unknown
     759 *
     760 * @param unknown_type $type
     761 * @param unknown_type $id
     762 */
    593763function print_column_headers( $type, $id = true ) {
    594764    $columns = get_column_headers( $type );
     
    627797}
    628798
     799/**
     800 * {@internal Missing Short Description}}
     801 *
     802 * @since unknown
     803 *
     804 * @param unknown_type $type
     805 */
    629806function inline_edit_row( $type ) {
    630807    global $current_user, $mode;
     
    8691046}
    8701047
     1048/**
     1049 * {@internal Missing Short Description}}
     1050 *
     1051 * @since unknown
     1052 *
     1053 * @param unknown_type $data
     1054 */
    8711055function inline_save_row( $data ) {
    8721056    // get the original post content
     
    8971081
    8981082// adds hidden fields with the data for use in the inline editor
     1083/**
     1084 * {@internal Missing Short Description}}
     1085 *
     1086 * @since unknown
     1087 *
     1088 * @param unknown_type $post
     1089 */
    8991090function get_inline_data($post) {
    9001091
     
    9341125}
    9351126
     1127/**
     1128 * {@internal Missing Short Description}}
     1129 *
     1130 * @since unknown
     1131 *
     1132 * @param unknown_type $posts
     1133 */
    9361134function post_rows( $posts = array() ) {
    9371135    global $wp_query, $post, $mode;
     
    9601158}
    9611159
     1160/**
     1161 * {@internal Missing Short Description}}
     1162 *
     1163 * @since unknown
     1164 *
     1165 * @param unknown_type $a_post
     1166 * @param unknown_type $pending_comments
     1167 * @param unknown_type $mode
     1168 */
    9621169function _post_row($a_post, $pending_comments, $mode) {
    9631170    global $post;
     
    11741381 * display one row if the page doesn't have any children
    11751382 * otherwise, display the row and its children in subsequent rows
     1383 */
     1384/**
     1385 * {@internal Missing Short Description}}
     1386 *
     1387 * @since unknown
     1388 *
     1389 * @param unknown_type $page
     1390 * @param unknown_type $level
    11761391 */
    11771392function display_page_row( $page, $level = 0 ) {
     
    13301545 * displays pages in hierarchical order with paging support
    13311546 */
     1547/**
     1548 * {@internal Missing Short Description}}
     1549 *
     1550 * @since unknown
     1551 *
     1552 * @param unknown_type $pages
     1553 * @param unknown_type $pagenum
     1554 * @param unknown_type $per_page
     1555 * @return unknown
     1556 */
    13321557function page_rows($pages, $pagenum = 1, $per_page = 20) {
    13331558    global $wpdb;
     
    14061631 * Given a top level page ID, display the nested hierarchy of sub-pages
    14071632 * together with paging support
     1633 */
     1634/**
     1635 * {@internal Missing Short Description}}
     1636 *
     1637 * @since unknown
     1638 *
     1639 * @param unknown_type $children_pages
     1640 * @param unknown_type $count
     1641 * @param unknown_type $parent
     1642 * @param unknown_type $level
     1643 * @param unknown_type $pagenum
     1644 * @param unknown_type $per_page
    14081645 */
    14091646function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) {
     
    14491686}
    14501687
     1688/**
     1689 * {@internal Missing Short Description}}
     1690 *
     1691 * @since unknown
     1692 *
     1693 * @param unknown_type $user_object
     1694 * @param unknown_type $style
     1695 * @param unknown_type $role
     1696 * @return unknown
     1697 */
    14511698function user_row( $user_object, $style = '', $role = '' ) {
    14521699    global $wp_roles;
     
    15321779}
    15331780
     1781/**
     1782 * {@internal Missing Short Description}}
     1783 *
     1784 * @since unknown
     1785 *
     1786 * @param unknown_type $status
     1787 * @param unknown_type $s
     1788 * @param unknown_type $start
     1789 * @param unknown_type $num
     1790 * @param unknown_type $post
     1791 * @param unknown_type $type
     1792 * @return unknown
     1793 */
    15341794function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) {
    15351795    global $wpdb;
     
    15841844}
    15851845
     1846/**
     1847 * {@internal Missing Short Description}}
     1848 *
     1849 * @since unknown
     1850 *
     1851 * @param unknown_type $comment_id
     1852 * @param unknown_type $mode
     1853 * @param unknown_type $comment_status
     1854 * @param unknown_type $checkbox
     1855 */
    15861856function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true ) {
    15871857    global $comment, $post;
     
    17081978}
    17091979
     1980/**
     1981 * {@internal Missing Short Description}}
     1982 *
     1983 * @since unknown
     1984 *
     1985 * @param unknown_type $position
     1986 * @param unknown_type $checkbox
     1987 * @param unknown_type $mode
     1988 */
    17101989function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single') {
    17111990    global $current_user;
     
    17512030}
    17522031
     2032/**
     2033 * {@internal Missing Short Description}}
     2034 *
     2035 * @since unknown
     2036 *
     2037 * @param unknown_type $currentcat
     2038 * @param unknown_type $currentparent
     2039 * @param unknown_type $parent
     2040 * @param unknown_type $level
     2041 * @param unknown_type $categories
     2042 * @return unknown
     2043 */
    17532044function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
    17542045    if (!$categories )
     
    17722063}
    17732064
     2065/**
     2066 * {@internal Missing Short Description}}
     2067 *
     2068 * @since unknown
     2069 *
     2070 * @param unknown_type $meta
     2071 */
    17742072function list_meta( $meta ) {
    17752073    // Exit if no meta
     
    17942092}
    17952093
     2094/**
     2095 * {@internal Missing Short Description}}
     2096 *
     2097 * @since unknown
     2098 *
     2099 * @param unknown_type $entry
     2100 * @param unknown_type $count
     2101 * @return unknown
     2102 */
    17962103function _list_meta_row( $entry, &$count ) {
    17972104    static $update_nonce = false;
     
    18362143}
    18372144
     2145/**
     2146 * {@internal Missing Short Description}}
     2147 *
     2148 * @since unknown
     2149 */
    18382150function meta_form() {
    18392151    global $wpdb;
     
    18822194}
    18832195
     2196/**
     2197 * {@internal Missing Short Description}}
     2198 *
     2199 * @since unknown
     2200 *
     2201 * @param unknown_type $edit
     2202 * @param unknown_type $for_post
     2203 * @param unknown_type $tab_index
     2204 * @param unknown_type $multi
     2205 */
    18842206function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
    18852207    global $wp_locale, $post, $comment;
     
    19322254}
    19332255
     2256/**
     2257 * {@internal Missing Short Description}}
     2258 *
     2259 * @since unknown
     2260 *
     2261 * @param unknown_type $default
     2262 */
    19342263function page_template_dropdown( $default = '' ) {
    19352264    $templates = get_page_templates();
     
    19442273}
    19452274
     2275/**
     2276 * {@internal Missing Short Description}}
     2277 *
     2278 * @since unknown
     2279 *
     2280 * @param unknown_type $default
     2281 * @param unknown_type $parent
     2282 * @param unknown_type $level
     2283 * @return unknown
     2284 */
    19462285function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
    19472286    global $wpdb, $post_ID;
     
    19702309}
    19712310
     2311/**
     2312 * {@internal Missing Short Description}}
     2313 *
     2314 * @since unknown
     2315 */
    19722316function browse_happy() {
    19732317    $getit = __( 'WordPress recommends a better browser' );
     
    19802324    add_action( 'in_admin_footer', 'browse_happy' );
    19812325
     2326/**
     2327 * {@internal Missing Short Description}}
     2328 *
     2329 * @since unknown
     2330 *
     2331 * @param unknown_type $id
     2332 * @return unknown
     2333 */
    19822334function the_attachment_links( $id = false ) {
    19832335    $id = (int) $id;
     
    20232375}
    20242376
     2377/**
     2378 * {@internal Missing Short Description}}
     2379 *
     2380 * @since unknown
     2381 *
     2382 * @param unknown_type $default
     2383 */
    20252384function wp_dropdown_roles( $default = false ) {
    20262385    global $wp_roles;
     
    20372396}
    20382397
     2398/**
     2399 * {@internal Missing Short Description}}
     2400 *
     2401 * @since unknown
     2402 *
     2403 * @param unknown_type $size
     2404 * @return unknown
     2405 */
    20392406function wp_convert_hr_to_bytes( $size ) {
    20402407    $size = strtolower($size);
     
    20492416}
    20502417
     2418/**
     2419 * {@internal Missing Short Description}}
     2420 *
     2421 * @since unknown
     2422 *
     2423 * @param unknown_type $bytes
     2424 * @return unknown
     2425 */
    20512426function wp_convert_bytes_to_hr( $bytes ) {
    20522427    $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' );
     
    20572432}
    20582433
     2434/**
     2435 * {@internal Missing Short Description}}
     2436 *
     2437 * @since unknown
     2438 *
     2439 * @return unknown
     2440 */
    20592441function wp_max_upload_size() {
    20602442    $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
     
    20642446}
    20652447
     2448/**
     2449 * {@internal Missing Short Description}}
     2450 *
     2451 * @since unknown
     2452 *
     2453 * @param unknown_type $action
     2454 */
    20662455function wp_import_upload_form( $action ) {
    20672456    $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
     
    20832472}
    20842473
     2474/**
     2475 * {@internal Missing Short Description}}
     2476 *
     2477 * @since unknown
     2478 */
    20852479function wp_remember_old_slug() {
    20862480    global $post;
     
    20912485
    20922486/**
    2093  * add_meta_box() - Add a meta box to an edit form
    2094  *
    2095  * @since 2.5
     2487 * Add a meta box to an edit form.
     2488 *
     2489 * @since 2.5.0
    20962490 *
    20972491 * @param string $id String for use in the 'id' attribute of tags.
    2098  * @param string $title Title of the meta box
     2492 * @param string $title Title of the meta box.
    20992493 * @param string $callback Function that fills the box with the desired content. The function should echo its output.
    2100  * @param string $page The type of edit page on which to show the box (post, page, link)
    2101  * @param string $context The context within the page where the boxes should show ('normal', 'advanced')
    2102  * @param string $priority The priority within the context where the boxes should show ('high', 'low')
     2494 * @param string $page The type of edit page on which to show the box (post, page, link).
     2495 * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
     2496 * @param string $priority The priority within the context where the boxes should show ('high', 'low').
    21032497 */
    21042498function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default') {
     
    21522546}
    21532547
     2548/**
     2549 * {@internal Missing Short Description}}
     2550 *
     2551 * @since unknown
     2552 *
     2553 * @param unknown_type $page
     2554 * @param unknown_type $context
     2555 * @param unknown_type $object
     2556 * @return unknown
     2557 */
    21542558function do_meta_boxes($page, $context, $object) {
    21552559    global $wp_meta_boxes;
     
    22032607
    22042608/**
    2205  * remove_meta_box() - Remove a meta box from an edit form
    2206  *
    2207  * @since 2.6
     2609 * Remove a meta box from an edit form.
     2610 *
     2611 * @since 2.6.0
    22082612 *
    22092613 * @param string $id String for use in the 'id' attribute of tags.
    2210  * @param string $page The type of edit page on which to show the box (post, page, link)
    2211  * @param string $context The context within the page where the boxes should show ('normal', 'advanced')
     2614 * @param string $page The type of edit page on which to show the box (post, page, link).
     2615 * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
    22122616 */
    22132617function remove_meta_box($id, $page, $context) {
     
    22252629}
    22262630
     2631/**
     2632 * {@internal Missing Short Description}}
     2633 *
     2634 * @since unknown
     2635 *
     2636 * @param unknown_type $page
     2637 */
    22272638function meta_box_prefs($page) {
    22282639    global $wp_meta_boxes;
     
    22512662
    22522663/**
    2253  * Add a new section to a settings page
    2254  *
    2255  * @since 2.7
     2664 * Add a new section to a settings page.
     2665 *
     2666 * @since 2.7.0
    22562667 *
    22572668 * @param string $id String for use in the 'id' attribute of tags.
    2258  * @param string $title Title of the section
     2669 * @param string $title Title of the section.
    22592670 * @param string $callback Function that fills the section with the desired content. The function should echo its output.
    2260  * @param string $page The type of settings page on which to show the section (general, reading, writing, ...)
     2671 * @param string $page The type of settings page on which to show the section (general, reading, writing, ...).
    22612672 */
    22622673function add_settings_section($id, $title, $callback, $page) {
     
    22742685
    22752686/**
    2276  * Add a new field to a settings page
    2277  *
    2278  * @since 2.7
     2687 * Add a new field to a settings page.
     2688 *
     2689 * @since 2.7.0
    22792690 *
    22802691 * @param string $id String for use in the 'id' attribute of tags.
    2281  * @param string $title Title of the field
     2692 * @param string $title Title of the field.
    22822693 * @param string $callback Function that fills the field with the desired content. The function should echo its output.
    2283  * @param string $page The type of settings page on which to show the field (general, reading, writing, ...)
    2284  * @param string $section The section of the settingss page in which to show the box (default, ...)
     2694 * @param string $page The type of settings page on which to show the field (general, reading, writing, ...).
     2695 * @param string $section The section of the settingss page in which to show the box (default, ...).
    22852696 * @param array $args Additional arguments
    22862697 */
     
    22982709}
    22992710
     2711/**
     2712 * {@internal Missing Short Description}}
     2713 *
     2714 * @since unknown
     2715 *
     2716 * @param unknown_type $page
     2717 */
    23002718function do_settings_sections($page) {
    23012719    global $wp_settings_sections, $wp_settings_fields;
     
    23152733}
    23162734
     2735/**
     2736 * {@internal Missing Short Description}}
     2737 *
     2738 * @since unknown
     2739 *
     2740 * @param unknown_type $page
     2741 * @param unknown_type $section
     2742 */
    23172743function do_settings_fields($page, $section) {
    23182744    global $wp_settings_fields;
     
    23342760}
    23352761
     2762/**
     2763 * {@internal Missing Short Description}}
     2764 *
     2765 * @since unknown
     2766 *
     2767 * @param unknown_type $page
     2768 */
    23362769function manage_columns_prefs($page) {
    23372770    $columns = get_column_headers($page);
     
    23552788}
    23562789
     2790/**
     2791 * {@internal Missing Short Description}}
     2792 *
     2793 * @since unknown
     2794 *
     2795 * @param unknown_type $found_action
     2796 */
    23572797function find_posts_div($found_action = '') {
    23582798?>
     
    24852925 * Display the post password.
    24862926 *
    2487  * The password is passed through {@link attribute_escape()}
    2488  * to ensure that it is safe for placing in an html attribute.
     2927 * The password is passed through {@link attribute_escape()} to ensure that it
     2928 * is safe for placing in an html attribute.
    24892929 *
    24902930 * @uses attribute_escape
     
    24962936}
    24972937
     2938/**
     2939 * {@internal Missing Short Description}}
     2940 *
     2941 * @since unknown
     2942 */
    24982943function favorite_actions() {
    24992944    $actions = array(
     
    25132958    echo "</div></div>\n";
    25142959}
     2960
    25152961/**
    25162962 * Get the post title.
    25172963 *
    2518  * The post title is fetched and if it is blank then a default string is returned.
     2964 * The post title is fetched and if it is blank then a default string is
     2965 * returned.
    25192966 *
    25202967 * @since 2.7.0
    2521  * @param int $id The post id. If not supplied the global $post is used..
     2968 * @param int $id The post id. If not supplied the global $post is used.
    25222969 *
    25232970 */
     
    25292976    return $title;
    25302977}
     2978
    25312979?>
  • trunk/wp-admin/includes/theme.php

    r8657 r9053  
    11<?php
     2/**
     3 * WordPress Theme Administration API
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
     9/**
     10 * {@internal Missing Short Description}}
     11 *
     12 * @since unknown
     13 *
     14 * @return unknown
     15 */
    316function current_theme_info() {
    417    $themes = get_themes();
     
    1932}
    2033
     34/**
     35 * {@internal Missing Short Description}}
     36 *
     37 * @since unknown
     38 *
     39 * @return unknown
     40 */
    2141function get_broken_themes() {
    2242    global $wp_broken_themes;
     
    2646}
    2747
     48/**
     49 * {@internal Missing Short Description}}
     50 *
     51 * @since unknown
     52 *
     53 * @return unknown
     54 */
    2855function get_page_templates() {
    2956    $themes = get_themes();
  • trunk/wp-admin/includes/update-core.php

    r8759 r9053  
    55 * @package WordPress
    66 * @subpackage Administration
    7  * @since 2.7
     7 * @since 2.7.0
    88 */
    99
     
    1111 * Stores files to be deleted.
    1212 *
    13  * @since 2.7
     13 * @since 2.7.0
    1414 * @global array $_old_files
    1515 * @var array
     
    167167 * your changes remain.
    168168 *
     169 * @since 2.7.0
     170 *
    169171 * @param string $from New release unzipped path.
    170172 * @param string $to Path to old WordPress installation.
  • trunk/wp-admin/includes/upgrade.php

    r8989 r9053  
    11<?php
    2 
     2/**
     3 * WordPress Upgrade API
     4 *
     5 * Most of the functions are pluggable and can be overwritten
     6 *
     7 * @package WordPress
     8 * @subpackage Administration
     9 */
     10
     11/** Include user install customize script. */
    312if ( file_exists(WP_CONTENT_DIR . '/install.php') )
    413    require (WP_CONTENT_DIR . '/install.php');
     14
     15/** WordPress Administration API */
    516require_once(ABSPATH . 'wp-admin/includes/admin.php');
     17
     18/** WordPress Schema API */
    619require_once(ABSPATH . 'wp-admin/includes/schema.php');
    720
    821if ( !function_exists('wp_install') ) :
     22/**
     23 * {@internal Missing Short Description}}
     24 *
     25 * {@internal Missing Long Description}}
     26 *
     27 * @since unknown
     28 *
     29 * @param string $blog_title Blog title.
     30 * @param string $user_name User's username.
     31 * @param string $user_email User's email.
     32 * @param bool $public Whether blog is public.
     33 * @param null $deprecated Optional. Not used.
     34 * @return array Array keys 'url', 'user_id', 'password'.
     35 */
    936function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') {
    1037    global $wp_rewrite;
     
    5481
    5582if ( !function_exists('wp_install_defaults') ) :
     83/**
     84 * {@internal Missing Short Description}}
     85 *
     86 * {@internal Missing Long Description}}
     87 *
     88 * @since unknown
     89 *
     90 * @param int $user_id User ID.
     91 */
    5692function wp_install_defaults($user_id) {
    5793    global $wpdb;
     
    108144
    109145if ( !function_exists('wp_new_blog_notification') ) :
     146/**
     147 * {@internal Missing Short Description}}
     148 *
     149 * {@internal Missing Long Description}}
     150 *
     151 * @since unknown
     152 *
     153 * @param string $blog_title Blog title.
     154 * @param string $blog_url Blog url.
     155 * @param int $user_id User ID.
     156 * @param string $password User's Password.
     157 */
    110158function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) {
    111159    $user = new WP_User($user_id);
     
    133181
    134182if ( !function_exists('wp_upgrade') ) :
     183/**
     184 * Run WordPress Upgrade functions.
     185 *
     186 * {@internal Missing Long Description}}
     187 *
     188 * @since unknown
     189 *
     190 * @return null
     191 */
    135192function wp_upgrade() {
    136193    global $wp_current_db_version, $wp_db_version;
     
    142199        return;
    143200
    144     if(!is_blog_installed())
     201    if( ! is_blog_installed() )
    145202        return;
    146203
     
    153210endif;
    154211
    155 // Functions to be called in install and upgrade scripts
     212/**
     213 * Functions to be called in install and upgrade scripts.
     214 *
     215 * {@internal Missing Long Description}}
     216 *
     217 * @since unknown
     218 */
    156219function upgrade_all() {
    157220    global $wp_current_db_version, $wp_db_version, $wp_rewrite;
     
    221284}
    222285
     286/**
     287 * Execute changes made in WordPress 1.0.
     288 *
     289 * @since 1.0.0
     290 */
    223291function upgrade_100() {
    224292    global $wpdb;
     
    242310        }
    243311    }
    244 
    245312
    246313    $wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/')
     
    273340}
    274341
     342/**
     343 * Execute changes made in WordPress 1.0.1.
     344 *
     345 * @since 1.0.1
     346 */
    275347function upgrade_101() {
    276348    global $wpdb;
     
    286358}
    287359
    288 
     360/**
     361 * Execute changes made in WordPress 1.2.
     362 *
     363 * @since 1.2.0
     364 */
    289365function upgrade_110() {
    290366    global $wpdb;
     
    305381        }
    306382    }
    307 
    308383
    309384    // Get the GMT offset, we'll use that later on
     
    343418}
    344419
     420/**
     421 * Execute changes made in WordPress 1.5.
     422 *
     423 * @since 1.5.0
     424 */
    345425function upgrade_130() {
    346426    global $wpdb;
     
    420500}
    421501
     502/**
     503 * Execute changes made in WordPress 2.0.
     504 *
     505 * @since 2.0.0
     506 */
    422507function upgrade_160() {
    423508    global $wpdb, $wp_current_db_version;
     
    498583}
    499584
     585/**
     586 * Execute changes made in WordPress 2.1.
     587 *
     588 * @since 2.1.0
     589 */
    500590function upgrade_210() {
    501591    global $wpdb, $wp_current_db_version;
     
    537627}
    538628
     629/**
     630 * Execute changes made in WordPress 2.3.
     631 *
     632 * @since 2.3.0
     633 */
    539634function upgrade_230() {
    540635    global $wp_current_db_version, $wpdb;
     
    707802}
    708803
     804/**
     805 * Remove old options from the database.
     806 *
     807 * @since 2.3.0
     808 */
    709809function upgrade_230_options_table() {
    710810    global $wpdb;
     
    716816}
    717817
     818/**
     819 * Remove old categories, link2cat, and post2cat database tables.
     820 *
     821 * @since 2.3.0
     822 */
    718823function upgrade_230_old_tables() {
    719824    global $wpdb;
     
    723828}
    724829
     830/**
     831 * Upgrade old slugs made in version 2.2.
     832 *
     833 * @since 2.2.0
     834 */
    725835function upgrade_old_slugs() {
    726836    // upgrade people who were using the Redirect Old Slugs plugin
     
    729839}
    730840
    731 
     841/**
     842 * Execute changes made in WordPress 2.5.0.
     843 *
     844 * @since 2.5.0
     845 */
    732846function upgrade_250() {
    733847    global $wp_current_db_version;
     
    739853}
    740854
     855/**
     856 * Execute changes made in WordPress 2.5.1.
     857 *
     858 * @since 2.5.1
     859 */
    741860function upgrade_251() {
    742861    global $wp_current_db_version;
     
    746865}
    747866
     867/**
     868 * Execute changes made in WordPress 2.5.2.
     869 *
     870 * @since 2.5.2
     871 */
    748872function upgrade_252() {
    749873    global $wpdb;
     
    752876}
    753877
     878/**
     879 * Execute changes made in WordPress 2.6.
     880 *
     881 * @since 2.6.0
     882 */
    754883function upgrade_260() {
    755884    global $wp_current_db_version;
     
    764893}
    765894
     895/**
     896 * Execute changes made in WordPress 2.7.
     897 *
     898 * @since 2.7.0
     899 */
    766900function upgrade_270() {
    767901    global $wpdb, $wp_current_db_version;
     
    779913
    780914// General
     915
     916/**
     917 * {@internal Missing Short Description}}
     918 *
     919 * {@internal Missing Long Description}}
     920 *
     921 * @since unknown
     922 *
     923 * @param string $table_name Database table name to create.
     924 * @param string $create_ddl SQL statement to create table.
     925 * @return bool If table already exists or was created by function.
     926 */
    781927function maybe_create_table($table_name, $create_ddl) {
    782928    global $wpdb;
     
    797943}
    798944
     945/**
     946 * {@internal Missing Short Description}}
     947 *
     948 * {@internal Missing Long Description}}
     949 *
     950 * @since unknown
     951 *
     952 * @param string $table Database table name.
     953 * @param string $index Index name to drop.
     954 * @return bool True, when finished.
     955 */
    799956function drop_index($table, $index) {
    800957    global $wpdb;
     
    809966}
    810967
     968/**
     969 * {@internal Missing Short Description}}
     970 *
     971 * {@internal Missing Long Description}}
     972 *
     973 * @since unknown
     974 *
     975 * @param string $table Database table name.
     976 * @param string $index Database table index column.
     977 * @return bool True, when done with execution.
     978 */
    811979function add_clean_index($table, $index) {
    812980    global $wpdb;
     
    8411009}
    8421010
    843 
    844 // get_alloptions as it was for 1.2.
     1011/**
     1012 * Retrieve all options as it was for 1.2.
     1013 *
     1014 * @since 1.2.0
     1015 *
     1016 * @return array List of options.
     1017 */
    8451018function get_alloptions_110() {
    8461019    global $wpdb;
     
    8581031}
    8591032
    860 // Version of get_option that is private to install/upgrade.
     1033/**
     1034 * Version of get_option that is private to install/upgrade.
     1035 *
     1036 * @since unknown
     1037 * @access private
     1038 *
     1039 * @param string $setting Option name.
     1040 * @return mixed
     1041 */
    8611042function __get_option($setting) {
    8621043    global $wpdb;
     
    8851066}
    8861067
     1068/**
     1069 * {@internal Missing Short Description}}
     1070 *
     1071 * {@internal Missing Long Description}}
     1072 *
     1073 * @since unknown
     1074 *
     1075 * @param string $content
     1076 * @return string
     1077 */
    8871078function deslash($content) {
    8881079    // Note: \\\ inside a regex denotes a single backslash.
     
    9021093}
    9031094
     1095/**
     1096 * {@internal Missing Short Description}}
     1097 *
     1098 * {@internal Missing Long Description}}
     1099 *
     1100 * @since unknown
     1101 *
     1102 * @param unknown_type $queries
     1103 * @param unknown_type $execute
     1104 * @return unknown
     1105 */
    9041106function dbDelta($queries, $execute = true) {
    9051107    global $wpdb;
     
    11031305}
    11041306
     1307/**
     1308 * {@internal Missing Short Description}}
     1309 *
     1310 * {@internal Missing Long Description}}
     1311 *
     1312 * @since unknown
     1313 */
    11051314function make_db_current() {
    11061315    global $wp_queries;
     
    11121321}
    11131322
     1323/**
     1324 * {@internal Missing Short Description}}
     1325 *
     1326 * {@internal Missing Long Description}}
     1327 *
     1328 * @since unknown
     1329 */
    11141330function make_db_current_silent() {
    11151331    global $wp_queries;
     
    11181334}
    11191335
     1336/**
     1337 * {@internal Missing Short Description}}
     1338 *
     1339 * {@internal Missing Long Description}}
     1340 *
     1341 * @since unknown
     1342 *
     1343 * @param unknown_type $theme_name
     1344 * @param unknown_type $template
     1345 * @return unknown
     1346 */
    11201347function make_site_theme_from_oldschool($theme_name, $template) {
    11211348    $home_path = get_home_path();
     
    11861413}
    11871414
     1415/**
     1416 * {@internal Missing Short Description}}
     1417 *
     1418 * {@internal Missing Long Description}}
     1419 *
     1420 * @since unknown
     1421 *
     1422 * @param unknown_type $theme_name
     1423 * @param unknown_type $template
     1424 * @return unknown
     1425 */
    11881426function make_site_theme_from_default($theme_name, $template) {
    11891427    $site_dir = WP_CONTENT_DIR . "/themes/$template";
     
    12411479
    12421480// Create a site theme from the default theme.
     1481/**
     1482 * {@internal Missing Short Description}}
     1483 *
     1484 * {@internal Missing Long Description}}
     1485 *
     1486 * @since unknown
     1487 *
     1488 * @return unknown
     1489 */
    12431490function make_site_theme() {
    12441491    // Name the theme after the blog.
     
    12821529}
    12831530
     1531/**
     1532 * Translate user level to user role name.
     1533 *
     1534 * @since unknown
     1535 *
     1536 * @param int $level User level.
     1537 * @return string User role name.
     1538 */
    12841539function translate_level_to_role($level) {
    12851540    switch ($level) {
     
    13031558}
    13041559
     1560/**
     1561 * {@internal Missing Short Description}}
     1562 *
     1563 * {@internal Missing Long Description}}
     1564 *
     1565 * @since unknown
     1566 */
    13051567function wp_check_mysql_version() {
    13061568    global $wpdb;
     
    13101572}
    13111573
     1574/**
     1575 * {@internal Missing Short Description}}
     1576 *
     1577 * {@internal Missing Long Description}}
     1578 *
     1579 * @since unknown
     1580 */
    13121581function maybe_disable_automattic_widgets() {
    13131582    $plugins = __get_option( 'active_plugins' );
  • trunk/wp-admin/includes/user.php

    r8944 r9053  
    11<?php
    2 
    3 // Creates a new user from the "Users" form using $_POST information.
     2/**
     3 * WordPress user administration API.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
     8
     9/**
     10 * Creates a new user from the "Users" form using $_POST information.
     11 *
     12 * {@internal Missing Long Description}}
     13 *
     14 * @since unknown
     15 *
     16 * @param int $user_id Optional. User ID.
     17 * @return null|WP_Error|int Null when adding user, WP_Error or User ID integer when no parameters.
     18 */
    419function add_user() {
    520    if ( func_num_args() ) { // The hackiest hack that ever did hack
     
    1934}
    2035
     36/**
     37 * {@internal Missing Short Description}}
     38 *
     39 * {@internal Missing Long Description}}
     40 *
     41 * @since unknown
     42 *
     43 * @param int $user_id Optional. User ID.
     44 * @return unknown
     45 */
    2146function edit_user( $user_id = 0 ) {
    2247    global $current_user, $wp_roles, $wpdb;
     
    143168}
    144169
     170/**
     171 * {@internal Missing Short Description}}
     172 *
     173 * {@internal Missing Long Description}}
     174 *
     175 * @since unknown
     176 *
     177 * @return array List of user IDs.
     178 */
    145179function get_author_user_ids() {
    146180    global $wpdb;
     
    149183}
    150184
     185/**
     186 * {@internal Missing Short Description}}
     187 *
     188 * {@internal Missing Long Description}}
     189 *
     190 * @since unknown
     191 *
     192 * @param int $user_id User ID.
     193 * @return array|bool List of editable authors. False if no editable users.
     194 */
    151195function get_editable_authors( $user_id ) {
    152196    global $wpdb;
     
    164208}
    165209
     210/**
     211 * {@internal Missing Short Description}}
     212 *
     213 * {@internal Missing Long Description}}
     214 *
     215 * @since unknown
     216 *
     217 * @param int $user_id User ID.
     218 * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros.
     219 * @return unknown
     220 */
    166221function get_editable_user_ids( $user_id, $exclude_zeros = true ) {
    167222    global $wpdb;
     
    185240}
    186241
     242/**
     243 * {@internal Missing Short Description}}
     244 *
     245 * {@internal Missing Long Description}}
     246 *
     247 * @since unknown
     248 *
     249 * @return unknown
     250 */
    187251function get_nonauthor_user_ids() {
    188252    global $wpdb;
     
    192256}
    193257
     258/**
     259 * Retrieve editable posts from other users.
     260 *
     261 * @since unknown
     262 *
     263 * @param int $user_id User ID to not retrieve posts from.
     264 * @param string $type Optional, defaults to 'any'. Post type to retrieve, can be 'draft' or 'pending'.
     265 * @return array List of posts from others.
     266 */
    194267function get_others_unpublished_posts($user_id, $type='any') {
    195268    global $wpdb;
     
    214287}
    215288
     289/**
     290 * Retrieve drafts from other users.
     291 *
     292 * @since unknown
     293 *
     294 * @param int $user_id User ID.
     295 * @return array List of drafts from other users.
     296 */
    216297function get_others_drafts($user_id) {
    217298    return get_others_unpublished_posts($user_id, 'draft');
    218299}
    219300
     301/**
     302 * Retrieve pending review posts from other users.
     303 *
     304 * @since unknown
     305 *
     306 * @param int $user_id User ID.
     307 * @return array List of posts with pending review post type from other users.
     308 */
    220309function get_others_pending($user_id) {
    221310    return get_others_unpublished_posts($user_id, 'pending');
    222311}
    223312
     313/**
     314 * Retrieve user data and filter it.
     315 *
     316 * @since unknown
     317 *
     318 * @param int $user_id User ID.
     319 * @return object WP_User object with user data.
     320 */
    224321function get_user_to_edit( $user_id ) {
    225322    $user = new WP_User( $user_id );
     
    239336}
    240337
     338/**
     339 * Retrieve the user's drafts.
     340 *
     341 * @since unknown
     342 *
     343 * @param int $user_id User ID.
     344 * @return array
     345 */
    241346function get_users_drafts( $user_id ) {
    242347    global $wpdb;
     
    246351}
    247352
     353/**
     354 * Remove user and optionally reassign posts and links to another user.
     355 *
     356 * If the $reassign parameter is not assigned to an User ID, then all posts will
     357 * be deleted of that user. The action 'delete_user' that is passed the User ID
     358 * being deleted will be run after the posts are either reassigned or deleted.
     359 * The user meta will also be deleted that are for that User ID.
     360 *
     361 * @since unknown
     362 *
     363 * @param int $id User ID.
     364 * @param int $reassign Optional. Reassign posts and links to new User ID.
     365 * @return bool True when finished.
     366 */
    248367function wp_delete_user($id, $reassign = 'novalue') {
    249368    global $wpdb;
     
    280399}
    281400
     401/**
     402 * Remove all capabilities from user.
     403 *
     404 * @since unknown
     405 *
     406 * @param int $id User ID.
     407 */
    282408function wp_revoke_user($id) {
    283409    $id = (int) $id;
     
    287413}
    288414
    289 // WP_User_Search class
    290 // by Mark Jaquith
    291 
    292415if ( !class_exists('WP_User_Search') ) :
     416/**
     417 * WordPress User Search class.
     418 *
     419 * @since unknown
     420 * @author Mark Jaquith
     421 */
    293422class WP_User_Search {
     423
     424    /**
     425     * {@internal Missing Description}}
     426     *
     427     * @since unknown
     428     * @access private
     429     * @var unknown_type
     430     */
    294431    var $results;
     432
     433    /**
     434     * {@internal Missing Description}}
     435     *
     436     * @since unknown
     437     * @access private
     438     * @var unknown_type
     439     */
    295440    var $search_term;
     441
     442    /**
     443     * Page number.
     444     *
     445     * @since unknown
     446     * @access private
     447     * @var int
     448     */
    296449    var $page;
     450
     451    /**
     452     * Role name that users have.
     453     *
     454     * @since unknown
     455     * @access private
     456     * @var string
     457     */
    297458    var $role;
     459
     460    /**
     461     * Raw page number.
     462     *
     463     * @since unknown
     464     * @access private
     465     * @var int|bool
     466     */
    298467    var $raw_page;
     468
     469    /**
     470     * Amount of users to display per page.
     471     *
     472     * @since unknown
     473     * @access public
     474     * @var int
     475     */
    299476    var $users_per_page = 50;
     477
     478    /**
     479     * {@internal Missing Description}}
     480     *
     481     * @since unknown
     482     * @access private
     483     * @var unknown_type
     484     */
    300485    var $first_user;
     486
     487    /**
     488     * {@internal Missing Description}}
     489     *
     490     * @since unknown
     491     * @access private
     492     * @var int
     493     */
    301494    var $last_user;
     495
     496    /**
     497     * {@internal Missing Description}}
     498     *
     499     * @since unknown
     500     * @access private
     501     * @var unknown_type
     502     */
    302503    var $query_limit;
     504
     505    /**
     506     * {@internal Missing Description}}
     507     *
     508     * @since unknown
     509     * @access private
     510     * @var unknown_type
     511     */
    303512    var $query_sort;
     513
     514    /**
     515     * {@internal Missing Description}}
     516     *
     517     * @since unknown
     518     * @access private
     519     * @var unknown_type
     520     */
    304521    var $query_from_where;
     522
     523    /**
     524     * {@internal Missing Description}}
     525     *
     526     * @since unknown
     527     * @access private
     528     * @var int
     529     */
    305530    var $total_users_for_query = 0;
     531
     532    /**
     533     * {@internal Missing Description}}
     534     *
     535     * @since unknown
     536     * @access private
     537     * @var bool
     538     */
    306539    var $too_many_total_users = false;
     540
     541    /**
     542     * {@internal Missing Description}}
     543     *
     544     * @since unknown
     545     * @access private
     546     * @var unknown_type
     547     */
    307548    var $search_errors;
     549
     550    /**
     551     * {@internal Missing Description}}
     552     *
     553     * @since unknown
     554     * @access private
     555     * @var unknown_type
     556     */
    308557    var $paging_text;
    309558
    310     function WP_User_Search ($search_term = '', $page = '', $role = '') { // constructor
     559    /**
     560     * PHP4 Constructor - Sets up the object properties.
     561     *
     562     * @since unknown
     563     *
     564     * @param string $search_term Search terms string.
     565     * @param int $page Optional. Page ID.
     566     * @param string $role Role name.
     567     * @return WP_User_Search
     568     */
     569    function WP_User_Search ($search_term = '', $page = '', $role = '') {
    311570        $this->search_term = $search_term;
    312571        $this->raw_page = ( '' == $page ) ? false : (int) $page;
     
    320579    }
    321580
     581    /**
     582     * {@internal Missing Short Description}}
     583     *
     584     * {@internal Missing Long Description}}
     585     *
     586     * @since unknown
     587     * @access public
     588     */
    322589    function prepare_query() {
    323590        global $wpdb;
     
    344611    }
    345612
     613    /**
     614     * {@internal Missing Short Description}}
     615     *
     616     * {@internal Missing Long Description}}
     617     *
     618     * @since unknown
     619     * @access public
     620     */
    346621    function query() {
    347622        global $wpdb;
     
    354629    }
    355630
     631    /**
     632     * {@internal Missing Short Description}}
     633     *
     634     * {@internal Missing Long Description}}
     635     *
     636     * @since unknown
     637     * @access public
     638     */
    356639    function prepare_vars_for_template_usage() {
    357640        $this->search_term = stripslashes($this->search_term); // done with DB, from now on we want slashes gone
    358641    }
    359642
     643    /**
     644     * {@internal Missing Short Description}}
     645     *
     646     * {@internal Missing Long Description}}
     647     *
     648     * @since unknown
     649     * @access public
     650     */
    360651    function do_paging() {
    361652        if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
     
    376667    }
    377668
     669    /**
     670     * {@internal Missing Short Description}}
     671     *
     672     * {@internal Missing Long Description}}
     673     *
     674     * @since unknown
     675     * @access public
     676     *
     677     * @return unknown
     678     */
    378679    function get_results() {
    379680        return (array) $this->results;
    380681    }
    381682
     683    /**
     684     * Displaying paging text.
     685     *
     686     * @see do_paging() Builds paging text.
     687     *
     688     * @since unknown
     689     * @access public
     690     */
    382691    function page_links() {
    383692        echo $this->paging_text;
    384693    }
    385694
     695    /**
     696     * Whether paging is enabled.
     697     *
     698     * @see do_paging() Builds paging text.
     699     *
     700     * @since unknown
     701     * @access public
     702     *
     703     * @return bool
     704     */
    386705    function results_are_paged() {
    387706        if ( $this->paging_text )
     
    390709    }
    391710
     711    /**
     712     * Whether there are search terms.
     713     *
     714     * @since unknown
     715     * @access public
     716     *
     717     * @return bool
     718     */
    392719    function is_search() {
    393720        if ( $this->search_term )
  • trunk/wp-admin/includes/widgets.php

    r8945 r9053  
    1010 * Display list of widgets, either all or matching search.
    1111 *
    12  * @since unknown
    13  *
    14  * @param unknown_type $show
    15  * @param unknown_type $_search Optional. Search for widgets. Should be unsanitized.
     12 * The search parameter are search terms separated by spaces.
     13 *
     14 * @since unknown
     15 *
     16 * @param string $show Optional, default is all. What to display, can be 'all', 'unused', or 'used'.
     17 * @param string $_search Optional. Search for widgets. Should be unsanitized.
    1618 */
    1719function wp_list_widgets( $show = 'all', $_search = false ) {
     
    169171 * @since unknown
    170172 *
    171  * @param unknown_type $sidebar
     173 * @param string $sidebar
    172174 */
    173175function wp_list_widget_controls( $sidebar ) {
     
    189191 * @since unknown
    190192 *
    191  * @param unknown_type $params
    192  * @return unknown
     193 * @param array $params
     194 * @return array
    193195 */
    194196function wp_list_widget_controls_dynamic_sidebar( $params ) {
     
    217219 * @since unknown
    218220 *
    219  * @param unknown_type $sidebar_args
    220  * @return unknown
     221 * @param array $sidebar_args
     222 * @return array
    221223 */
    222224function wp_widget_control( $sidebar_args ) {
     
    323325 * @since unknown
    324326 *
    325  * @param unknown_type $string
    326  * @return unknown
     327 * @param string $string
     328 * @return string
    327329 */
    328330function wp_widget_control_ob_filter( $string ) {
Note: See TracChangeset for help on using the changeset viewer.