Changeset 9053
- Timestamp:
- 10/02/2008 01:03:26 AM (16 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/bookmark.php
r8758 r9053 1 1 <?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 */ 3 16 function add_link() { 4 17 return edit_link(); 5 18 } 6 19 20 /** 21 * {@internal Missing Short Description}} 22 * 23 * @since unknown 24 * 25 * @param unknown_type $link_id 26 * @return unknown 27 */ 7 28 function edit_link( $link_id = '' ) { 8 29 if (!current_user_can( 'manage_links' )) … … 25 46 } 26 47 48 /** 49 * {@internal Missing Short Description}} 50 * 51 * @since unknown 52 * 53 * @return unknown 54 */ 27 55 function get_default_link_to_edit() { 28 56 if ( isset( $_GET['linkurl'] ) ) … … 41 69 } 42 70 71 /** 72 * {@internal Missing Short Description}} 73 * 74 * @since unknown 75 * 76 * @param unknown_type $link_id 77 * @return unknown 78 */ 43 79 function wp_delete_link($link_id) { 44 80 global $wpdb; … … 57 93 } 58 94 95 /** 96 * {@internal Missing Short Description}} 97 * 98 * @since unknown 99 * 100 * @param unknown_type $link_id 101 * @return unknown 102 */ 59 103 function wp_get_link_cats($link_id = 0) { 60 104 … … 64 108 } 65 109 110 /** 111 * {@internal Missing Short Description}} 112 * 113 * @since unknown 114 * 115 * @param unknown_type $link_id 116 * @return unknown 117 */ 66 118 function get_link_to_edit( $link_id ) { 67 119 return get_bookmark( $link_id, OBJECT, 'edit' ); 68 120 } 69 121 122 /** 123 * {@internal Missing Short Description}} 124 * 125 * @since unknown 126 * 127 * @param unknown_type $linkdata 128 * @return unknown 129 */ 70 130 function wp_insert_link($linkdata, $wp_error = false) { 71 131 global $wpdb, $current_user; … … 155 215 } 156 216 217 /** 218 * {@internal Missing Short Description}} 219 * 220 * @since unknown 221 * 222 * @param unknown_type $link_id 223 * @param unknown_type $link_categories 224 */ 157 225 function wp_set_link_cats($link_id = 0, $link_categories = array()) { 158 226 // If $link_categories isn't already an array, make it one: … … 168 236 } // wp_set_link_cats() 169 237 238 /** 239 * {@internal Missing Short Description}} 240 * 241 * @since unknown 242 * 243 * @param unknown_type $linkdata 244 * @return unknown 245 */ 170 246 function wp_update_link($linkdata) { 171 247 $link_id = (int) $linkdata['link_id']; -
trunk/wp-admin/includes/file.php
r8880 r9053 1 1 <?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. */ 3 10 $wp_file_descriptions = array ( 4 11 'index.php' => __( 'Main Index Template' ), 5 12 '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' ), 11 18 'sidebar.php' => __( 'Sidebar' ), 12 19 'archive.php' => __( 'Archives' ), … … 28 35 // Deprecated files 29 36 '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 */ 30 46 function get_file_description( $file ) { 31 47 global $wp_file_descriptions; … … 43 59 } 44 60 61 /** 62 * {@internal Missing Short Description}} 63 * 64 * @since unknown 65 * 66 * @return unknown 67 */ 45 68 function get_home_path() { 46 69 $home = get_option( 'home' ); … … 57 80 } 58 81 82 /** 83 * {@internal Missing Short Description}} 84 * 85 * @since unknown 86 * 87 * @param unknown_type $file 88 * @return unknown 89 */ 59 90 function get_real_file_to_edit( $file ) { 60 91 if ('index.php' == $file || '.htaccess' == $file ) { … … 66 97 return $real_file; 67 98 } 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 */ 70 109 function list_files( $folder = '', $levels = 100 ) { 71 110 if( empty($folder) ) … … 95 134 } 96 135 136 /** 137 * {@internal Missing Short Description}} 138 * 139 * @since unknown 140 * 141 * @return unknown 142 */ 97 143 function get_temp_dir() { 98 144 if ( defined('WP_TEMP_DIR') ) … … 109 155 } 110 156 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 */ 111 166 function wp_tempnam($filename = '', $dir = ''){ 112 167 if ( empty($dir) ) … … 121 176 } 122 177 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 */ 123 187 function validate_file_to_edit( $file, $allowed_files = '' ) { 124 188 $file = stripslashes( $file ); … … 141 205 } 142 206 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 */ 148 216 function wp_handle_upload( &$file, $overrides = false ) { 149 217 // The default error handler. … … 237 305 return $return; 238 306 } 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 */ 240 319 function wp_handle_sideload( &$file, $overrides = false ) { 241 320 // The default error handler. … … 335 414 336 415 /** 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 */ 342 424 function download_url( $url ) { 343 425 //WARNING: The file is not automatically deleted, The script must unlink() the file. … … 368 450 } 369 451 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 */ 370 461 function unzip_file($file, $to) { 371 462 global $wp_filesystem; … … 428 519 } 429 520 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 */ 430 530 function copy_dir($from, $to) { 431 531 global $wp_filesystem; … … 453 553 } 454 554 555 /** 556 * {@internal Missing Short Description}} 557 * 558 * @since unknown 559 * 560 * @param unknown_type $args 561 * @return unknown 562 */ 455 563 function WP_Filesystem( $args = false ) { 456 564 global $wp_filesystem; … … 481 589 } 482 590 591 /** 592 * {@internal Missing Short Description}} 593 * 594 * @since unknown 595 * 596 * @param unknown_type $args 597 * @return unknown 598 */ 483 599 function get_filesystem_method($args = array()) { 484 600 $method = false; … … 496 612 } 497 613 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 */ 498 624 function request_filesystem_credentials($form_post, $type = '', $error = false) { 499 625 $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error); -
trunk/wp-admin/includes/image.php
r8912 r9053 222 222 223 223 /** 224 * Get extended image metadata, exif or iptc as available 224 * Get extended image metadata, exif or iptc as available. 225 225 * 226 226 * @since unknown -
trunk/wp-admin/includes/import.php
r6477 r9053 1 1 <?php 2 /** 3 * WordPress Administration Importer API. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** 10 * {@internal Missing Short Description}} 11 * 12 * @since unknown 13 * 14 * @return unknown 15 */ 3 16 function get_importers() { 4 17 global $wp_importers; … … 8 21 } 9 22 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 */ 10 34 function register_importer( $id, $name, $description, $callback ) { 11 35 global $wp_importers; … … 15 39 } 16 40 41 /** 42 * {@internal Missing Short Description}} 43 * 44 * @since unknown 45 * 46 * @param unknown_type $id 47 */ 17 48 function wp_import_cleanup( $id ) { 18 49 wp_delete_attachment( $id ); 19 50 } 20 51 52 /** 53 * {@internal Missing Short Description}} 54 * 55 * @since unknown 56 * 57 * @return unknown 58 */ 21 59 function wp_import_handle_upload() { 22 60 $overrides = array( 'test_form' => false, 'test_type' => false ); -
trunk/wp-admin/includes/media.php
r9014 r9053 1 1 <?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 */ 3 16 function media_upload_tabs() { 4 17 $_default_tabs = array( … … 11 24 } 12 25 26 /** 27 * {@internal Missing Short Description}} 28 * 29 * @since unknown 30 * 31 * @param unknown_type $tabs 32 * @return unknown 33 */ 13 34 function update_gallery_tab($tabs) { 14 35 global $wpdb; … … 26 47 add_filter('media_upload_tabs', 'update_gallery_tab'); 27 48 49 /** 50 * {@internal Missing Short Description}} 51 * 52 * @since unknown 53 */ 28 54 function the_media_upload_tabs() { 29 55 global $redir_tab; … … 52 78 } 53 79 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 */ 54 94 function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') { 55 95 … … 66 106 } 67 107 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 */ 68 122 function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { 69 123 … … 85 139 add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 ); 86 140 141 /** 142 * {@internal Missing Short Description}} 143 * 144 * @since unknown 145 * 146 * @param unknown_type $html 147 */ 87 148 function media_send_to_editor($html) { 88 149 ?> 89 150 <script type="text/javascript"> 90 151 /* <![CDATA[ */ … … 97 158 } 98 159 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 */ 100 172 function media_handle_upload($file_id, $post_id, $post_data = array()) { 101 173 $overrides = array('test_form'=>false); … … 138 210 } 139 211 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 */ 140 223 function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) { 141 224 $overrides = array('test_form'=>false); … … 179 262 } 180 263 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 */ 184 274 function wp_iframe($content_func /* ... */) { 185 275 ?> … … 221 311 } 222 312 313 /** 314 * {@internal Missing Short Description}} 315 * 316 * @since unknown 317 */ 223 318 function media_buttons() { 224 319 global $post_ID, $temp_ID; … … 246 341 add_action('media_upload_media', 'media_upload_handler'); 247 342 343 /** 344 * {@internal Missing Short Description}} 345 * 346 * @since unknown 347 * 348 * @return unknown 349 */ 248 350 function media_upload_form_handler() { 249 351 check_admin_referer('media-form'); … … 295 397 } 296 398 399 /** 400 * {@internal Missing Short Description}} 401 * 402 * @since unknown 403 * 404 * @return unknown 405 */ 297 406 function media_upload_image() { 298 407 $errors = array(); … … 340 449 } 341 450 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 */ 342 461 function media_sideload_image($file, $post_id, $desc = null) { 343 462 if (!empty($file) ) { … … 368 487 } 369 488 489 /** 490 * {@internal Missing Short Description}} 491 * 492 * @since unknown 493 * 494 * @return unknown 495 */ 370 496 function media_upload_audio() { 371 497 $errors = array(); … … 411 537 } 412 538 539 /** 540 * {@internal Missing Short Description}} 541 * 542 * @since unknown 543 * 544 * @return unknown 545 */ 413 546 function media_upload_video() { 414 547 $errors = array(); … … 454 587 } 455 588 589 /** 590 * {@internal Missing Short Description}} 591 * 592 * @since unknown 593 * 594 * @return unknown 595 */ 456 596 function media_upload_file() { 457 597 $errors = array(); … … 497 637 } 498 638 639 /** 640 * {@internal Missing Short Description}} 641 * 642 * @since unknown 643 * 644 * @return unknown 645 */ 499 646 function media_upload_gallery() { 500 647 $errors = array(); … … 513 660 } 514 661 662 /** 663 * {@internal Missing Short Description}} 664 * 665 * @since unknown 666 * 667 * @return unknown 668 */ 515 669 function media_upload_library() { 516 670 $errors = array(); … … 528 682 529 683 // 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 */ 530 693 function image_align_input_fields($post, $checked='') { 531 694 … … 545 708 546 709 // 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 */ 547 719 function image_size_input_fields($post, $checked='') { 548 720 … … 583 755 584 756 // 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 */ 585 766 function image_link_input_fields($post, $url_type='') { 586 767 … … 603 784 } 604 785 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 */ 605 795 function image_attachment_fields_to_edit($form_fields, $post) { 606 796 if ( substr($post->post_mime_type, 0, 5) == 'image' ) { … … 625 815 add_filter('attachment_fields_to_edit', 'image_attachment_fields_to_edit', 10, 2); 626 816 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 */ 627 826 function media_single_attachment_fields_to_edit( $form_fields, $post ) { 628 827 unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); … … 630 829 } 631 830 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 */ 632 840 function image_attachment_fields_to_save($post, $attachment) { 633 841 if ( substr($post['post_mime_type'], 0, 5) == 'image' ) { … … 643 851 add_filter('attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2); 644 852 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 */ 645 863 function image_media_send_to_editor($html, $attachment_id, $attachment) { 646 864 $post =& get_post($attachment_id); … … 668 886 add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3); 669 887 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 */ 670 897 function get_attachment_fields_to_edit($post, $errors = null) { 671 898 if ( is_int($post) ) … … 733 960 } 734 961 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 */ 735 971 function get_media_items( $post_id, $errors ) { 736 972 if ( $post_id ) { … … 756 992 } 757 993 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 */ 758 1003 function get_media_item( $attachment_id, $args = null ) { 759 1004 global $redir_tab; … … 920 1165 } 921 1166 1167 /** 1168 * {@internal Missing Short Description}} 1169 * 1170 * @since unknown 1171 */ 922 1172 function media_upload_header() { 923 1173 ?> … … 929 1179 } 930 1180 1181 /** 1182 * {@internal Missing Short Description}} 1183 * 1184 * @since unknown 1185 * 1186 * @param unknown_type $errors 1187 */ 931 1188 function media_upload_form( $errors = null ) { 932 1189 global $type, $tab; … … 1018 1275 } 1019 1276 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 */ 1020 1286 function media_upload_type_form($type = 'file', $errors = null, $id = null) { 1021 1287 media_upload_header(); … … 1145 1411 } 1146 1412 1413 /** 1414 * {@internal Missing Short Description}} 1415 * 1416 * @since unknown 1417 * 1418 * @param unknown_type $errors 1419 */ 1147 1420 function media_upload_gallery_form($errors) { 1148 1421 global $redir_tab; … … 1190 1463 } 1191 1464 1465 /** 1466 * {@internal Missing Short Description}} 1467 * 1468 * @since unknown 1469 * 1470 * @param unknown_type $errors 1471 */ 1192 1472 function media_upload_library_form($errors) { 1193 1473 global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; … … 1336 1616 } 1337 1617 1618 /** 1619 * {@internal Missing Short Description}} 1620 * 1621 * @since unknown 1622 * 1623 * @return unknown 1624 */ 1338 1625 function type_form_image() { 1339 1626 … … 1412 1699 } 1413 1700 1701 /** 1702 * {@internal Missing Short Description}} 1703 * 1704 * @since unknown 1705 * 1706 * @return unknown 1707 */ 1414 1708 function type_form_audio() { 1415 1709 return ' … … 1440 1734 } 1441 1735 1736 /** 1737 * {@internal Missing Short Description}} 1738 * 1739 * @since unknown 1740 * 1741 * @return unknown 1742 */ 1442 1743 function type_form_video() { 1443 1744 return ' … … 1468 1769 } 1469 1770 1771 /** 1772 * {@internal Missing Short Description}} 1773 * 1774 * @since unknown 1775 * 1776 * @return unknown 1777 */ 1470 1778 function type_form_file() { 1471 1779 return ' … … 1497 1805 1498 1806 // 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 */ 1499 1815 function media_upload_use_flash($flash) { 1500 1816 if ( array_key_exists('flash', $_REQUEST) ) … … 1505 1821 add_filter('flash_uploader', 'media_upload_use_flash'); 1506 1822 1823 /** 1824 * {@internal Missing Short Description}} 1825 * 1826 * @since unknown 1827 */ 1507 1828 function media_upload_flash_bypass() { 1508 1829 echo '<p class="upload-flash-bypass">'; … … 1513 1834 add_action('post-flash-upload-ui', 'media_upload_flash_bypass'); 1514 1835 1836 /** 1837 * {@internal Missing Short Description}} 1838 * 1839 * @since unknown 1840 */ 1515 1841 function media_upload_html_bypass() { 1516 1842 echo '<p class="upload-html-bypass">'; … … 1529 1855 1530 1856 // 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 */ 1531 1865 function media_upload_bypass_url($url) { 1532 1866 if ( array_key_exists('flash', $_REQUEST) ) -
trunk/wp-admin/includes/misc.php
r8802 r9053 1 1 <?php 2 2 /** 3 * Misc WordPress Administration API. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** 10 * {@internal Missing Short Description}} 11 * 12 * @since unknown 13 * 14 * @return unknown 15 */ 3 16 function got_mod_rewrite() { 4 17 $got_rewrite = apache_mod_loaded('mod_rewrite', true); … … 6 19 } 7 20 8 // Returns an array of strings from a file (.htaccess ) from between BEGIN 9 // and END markers. 21 /** 22 * {@internal Missing Short Description}} 23 * 24 * @since unknown 25 * 26 * @param unknown_type $filename 27 * @param unknown_type $marker 28 * @return array An array of strings from a file (.htaccess ) from between BEGIN and END markers. 29 */ 10 30 function extract_from_markers( $filename, $marker ) { 11 31 $result = array (); … … 31 51 } 32 52 33 // Inserts an array of strings into a file (.htaccess ), placing it between 34 // BEGIN and END markers. Replaces existing marked info. Retains surrounding 35 // data. Creates file if none exists. 36 // Returns true on write success, false on failure. 53 /** 54 * {@internal Missing Short Description}} 55 * 56 * Inserts an array of strings into a file (.htaccess ), placing it between 57 * BEGIN and END markers. Replaces existing marked info. Retains surrounding 58 * data. Creates file if none exists. 59 * 60 * @since unknown 61 * 62 * @param unknown_type $filename 63 * @param unknown_type $marker 64 * @param unknown_type $insertion 65 * @return bool True on write success, false on failure. 66 */ 37 67 function insert_with_markers( $filename, $marker, $insertion ) { 38 68 if (!file_exists( $filename ) || is_writeable( $filename ) ) { … … 83 113 * Updates the htaccess file with the current rules if it is writable. 84 114 * 85 * Always writes to the file if it exists and is writable to ensure that we blank out old rules. 86 */ 87 115 * Always writes to the file if it exists and is writable to ensure that we 116 * blank out old rules. 117 * 118 * @since unknown 119 */ 88 120 function save_mod_rewrite_rules() { 89 121 global $wp_rewrite; … … 104 136 } 105 137 138 /** 139 * {@internal Missing Short Description}} 140 * 141 * @since unknown 142 * 143 * @param unknown_type $file 144 */ 106 145 function update_recently_edited( $file ) { 107 146 $oldfiles = (array ) get_option( 'recently_edited' ); … … 119 158 } 120 159 121 // If siteurl or home changed, flush rewrite rules. 160 /** 161 * If siteurl or home changed, flush rewrite rules. 162 * 163 * @since unknown 164 * 165 * @param unknown_type $old_value 166 * @param unknown_type $value 167 */ 122 168 function update_home_siteurl( $old_value, $value ) { 123 169 global $wp_rewrite; … … 133 179 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); 134 180 181 /** 182 * {@internal Missing Short Description}} 183 * 184 * @since unknown 185 * 186 * @param unknown_type $url 187 * @return unknown 188 */ 135 189 function url_shorten( $url ) { 136 190 $short_url = str_replace( 'http://', '', stripslashes( $url )); … … 143 197 } 144 198 199 /** 200 * {@internal Missing Short Description}} 201 * 202 * @since unknown 203 * 204 * @param unknown_type $vars 205 */ 145 206 function wp_reset_vars( $vars ) { 146 207 for ( $i=0; $i<count( $vars ); $i += 1 ) { … … 161 222 } 162 223 224 /** 225 * {@internal Missing Short Description}} 226 * 227 * @since unknown 228 * 229 * @param unknown_type $message 230 */ 163 231 function show_message($message) { 164 232 if( is_wp_error($message) ){ … … 172 240 173 241 /* Whitelist functions */ 242 243 /** 244 * {@internal Missing Short Description}} 245 * 246 * @since unknown 247 * 248 * @param unknown_type $option_group 249 * @param unknown_type $option_name 250 * @param unknown_type $sanitize_callback 251 * @return unknown 252 */ 174 253 function register_setting($option_group, $option_name, $sanitize_callback = '') { 175 254 return add_option_update_handler($option_group, $option_name, $sanitize_callback); 176 255 } 177 256 257 /** 258 * {@internal Missing Short Description}} 259 * 260 * @since unknown 261 * 262 * @param unknown_type $option_group 263 * @param unknown_type $option_name 264 * @param unknown_type $sanitize_callback 265 * @return unknown 266 */ 178 267 function unregister_setting($option_group, $option_name, $sanitize_callback = '') { 179 268 return remove_option_update_handler($option_group, $option_name, $sanitize_callback); 180 269 } 181 270 271 /** 272 * {@internal Missing Short Description}} 273 * 274 * @since unknown 275 * 276 * @param unknown_type $option_group 277 * @param unknown_type $option_name 278 * @param unknown_type $sanitize_callback 279 */ 182 280 function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') { 183 281 global $new_whitelist_options; … … 187 285 } 188 286 287 /** 288 * {@internal Missing Short Description}} 289 * 290 * @since unknown 291 * 292 * @param unknown_type $option_group 293 * @param unknown_type $option_name 294 * @param unknown_type $sanitize_callback 295 */ 189 296 function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') { 190 297 global $new_whitelist_options; … … 196 303 } 197 304 305 /** 306 * {@internal Missing Short Description}} 307 * 308 * @since unknown 309 * 310 * @param unknown_type $options 311 * @return unknown 312 */ 198 313 function option_update_filter( $options ) { 199 314 global $new_whitelist_options; … … 206 321 add_filter( 'whitelist_options', 'option_update_filter' ); 207 322 323 /** 324 * {@internal Missing Short Description}} 325 * 326 * @since unknown 327 * 328 * @param unknown_type $new_options 329 * @param unknown_type $options 330 * @return unknown 331 */ 208 332 function add_option_whitelist( $new_options, $options = '' ) { 209 333 if( $options == '' ) { … … 222 346 } 223 347 348 /** 349 * {@internal Missing Short Description}} 350 * 351 * @since unknown 352 * 353 * @param unknown_type $del_options 354 * @param unknown_type $options 355 * @return unknown 356 */ 224 357 function remove_option_whitelist( $del_options, $options = '' ) { 225 358 if( $options == '' ) { -
trunk/wp-admin/includes/post.php
r9036 r9053 1 1 <?php 2 /** 3 * WordPress Post Administration API. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 3 9 /** … … 7 13 * 8 14 * @package WordPress 9 * @since 2.6 15 * @since 2.6.0 10 16 * 11 17 * @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. 13 19 * @return object|bool WP_Error on failure, true on success. 14 20 */ … … 111 117 } 112 118 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 */ 115 127 function edit_post( $post_data = null ) { 116 128 … … 178 190 } 179 191 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 */ 181 202 function bulk_edit_posts( $post_data = null ) { 182 203 global $wpdb; … … 259 280 } 260 281 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 */ 262 289 function get_default_post_to_edit() { 263 290 if ( !empty( $_REQUEST['post_title'] ) ) … … 307 334 } 308 335 336 /** 337 * {@internal Missing Short Description}} 338 * 339 * @since unknown 340 * 341 * @return unknown 342 */ 309 343 function get_default_page_to_edit() { 310 344 $page = get_default_post_to_edit(); … … 313 347 } 314 348 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 */ 316 357 function get_post_to_edit( $id ) { 317 358 … … 324 365 } 325 366 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 */ 326 377 function post_exists($title, $content = '', $post_date = '') { 327 378 global $wpdb; … … 339 390 } 340 391 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 */ 342 399 function wp_write_post() { 343 400 global $user_ID; … … 406 463 } 407 464 465 /** 466 * {@internal Missing Short Description}} 467 * 468 * @since unknown 469 * 470 * @return unknown 471 */ 408 472 function write_post() { 409 473 $result = wp_write_post(); … … 418 482 // 419 483 484 /** 485 * {@internal Missing Short Description}} 486 * 487 * @since unknown 488 * 489 * @param unknown_type $post_ID 490 * @return unknown 491 */ 420 492 function add_meta( $post_ID ) { 421 493 global $wpdb; … … 452 524 } // add_meta 453 525 526 /** 527 * {@internal Missing Short Description}} 528 * 529 * @since unknown 530 * 531 * @param unknown_type $mid 532 * @return unknown 533 */ 454 534 function delete_meta( $mid ) { 455 535 global $wpdb; … … 462 542 } 463 543 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 */ 465 551 function get_meta_keys() { 466 552 global $wpdb; … … 475 561 } 476 562 563 /** 564 * {@internal Missing Short Description}} 565 * 566 * @since unknown 567 * 568 * @param unknown_type $mid 569 * @return unknown 570 */ 477 571 function get_post_meta_by_id( $mid ) { 478 572 global $wpdb; … … 485 579 } 486 580 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 */ 488 591 function has_meta( $postid ) { 489 592 global $wpdb; … … 495 598 } 496 599 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 */ 497 610 function update_meta( $meta_id, $meta_key, $meta_value ) { 498 611 global $wpdb; … … 519 632 // 520 633 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 */ 522 643 function _fix_attachment_links( $post_ID ) { 523 644 … … 560 681 } 561 682 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 */ 563 693 function _relocate_children( $old_ID, $new_ID ) { 564 694 global $wpdb; … … 568 698 } 569 699 700 /** 701 * {@internal Missing Short Description}} 702 * 703 * @since unknown 704 * 705 * @param unknown_type $type 706 * @return unknown 707 */ 570 708 function get_available_post_statuses($type = 'post') { 571 709 $stati = wp_count_posts($type); … … 574 712 } 575 713 714 /** 715 * {@internal Missing Short Description}} 716 * 717 * @since unknown 718 * 719 * @param unknown_type $q 720 * @return unknown 721 */ 576 722 function wp_edit_posts_query( $q = false ) { 577 723 global $wpdb; … … 614 760 } 615 761 762 /** 763 * {@internal Missing Short Description}} 764 * 765 * @since unknown 766 * 767 * @param unknown_type $type 768 * @return unknown 769 */ 616 770 function get_available_post_mime_types($type = 'attachment') { 617 771 global $wpdb; … … 621 775 } 622 776 777 /** 778 * {@internal Missing Short Description}} 779 * 780 * @since unknown 781 * 782 * @param unknown_type $q 783 * @return unknown 784 */ 623 785 function wp_edit_attachments_query( $q = false ) { 624 786 global $wpdb; … … 648 810 } 649 811 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 */ 650 821 function postbox_classes( $id, $page ) { 651 822 $current_user = wp_get_current_user(); … … 659 830 } 660 831 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 */ 661 842 function get_sample_permalink($id, $title=null, $name = null) { 662 843 $post = &get_post($id); … … 702 883 } 703 884 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 */ 704 895 function get_sample_permalink_html($id, $new_title=null, $new_slug=null) { 705 896 $post = &get_post($id); … … 721 912 } 722 913 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 */ 725 922 function wp_check_post_lock( $post_id ) { 726 923 global $current_user; … … 739 936 } 740 937 938 /** 939 * {@internal Missing Short Description}} 940 * 941 * @since unknown 942 * 943 * @param unknown_type $post_id 944 * @return unknown 945 */ 741 946 function wp_set_post_lock( $post_id ) { 742 947 global $current_user; … … 755 960 756 961 /** 757 * wp_create_post_autosave() - creates autosave data for the specified post from $_POST data962 * Creates autosave data for the specified post from $_POST data. 758 963 * 759 964 * @package WordPress 760 * @subpackage Post 761 * @since 2.6 965 * @subpackage Post_Revisions 966 * @since 2.6.0 762 967 * 763 968 * @uses _wp_translate_postdata() … … 781 986 782 987 /** 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. 784 989 * 785 990 * @package WordPress 786 * @since 2.6 991 * @since 2.6.0 787 992 */ 788 993 function wp_teeny_mce( $args = null ) { -
trunk/wp-admin/includes/schema.php
r8989 r9053 1 1 <?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 */ 4 12 $charset_collate = ''; 5 13 … … 14 22 } 15 23 16 $wp_queries="CREATE TABLE $wpdb->terms ( 24 /** Create WordPress database tables SQL */ 25 $wp_queries = "CREATE TABLE $wpdb->terms ( 17 26 term_id bigint(20) NOT NULL auto_increment, 18 27 name varchar(200) NOT NULL default '', … … 153 162 ) $charset_collate;"; 154 163 164 /** 165 * Create WordPress options and set the default values. 166 * 167 * @since unknown 168 * @uses $wpdb 169 * @uses $wp_db_version 170 */ 155 171 function populate_options() { 156 172 global $wpdb, $wp_db_version; … … 281 297 } 282 298 299 /** 300 * Execute WordPress role creation for the various WordPress versions. 301 * 302 * @since unknown (2.0.0) 303 */ 283 304 function populate_roles() { 284 305 populate_roles_160(); … … 290 311 } 291 312 313 /** 314 * Create the roles for WordPress 2.0 315 * 316 * @since 2.0.0 317 */ 292 318 function populate_roles_160() { 293 319 // Add roles … … 385 411 } 386 412 413 /** 414 * Create and modify WordPress roles for WordPress 2.1. 415 * 416 * @since 2.1.0 417 */ 387 418 function populate_roles_210() { 388 419 $roles = array('administrator', 'editor'); … … 427 458 } 428 459 460 /** 461 * Create and modify WordPress roles for WordPress 2.3. 462 * 463 * @since 2.3.0 464 */ 429 465 function populate_roles_230() { 430 466 $role = get_role( 'administrator' ); … … 435 471 } 436 472 473 /** 474 * Create and modify WordPress roles for WordPress 2.5. 475 * 476 * @since 2.5.0 477 */ 437 478 function populate_roles_250() { 438 479 $role = get_role( 'administrator' ); … … 443 484 } 444 485 486 /** 487 * Create and modify WordPress roles for WordPress 2.6. 488 * 489 * @since 2.6.0 490 */ 445 491 function populate_roles_260() { 446 492 $role = get_role( 'administrator' ); … … 452 498 } 453 499 500 /** 501 * Create and modify WordPress roles for WordPress 2.7. 502 * 503 * @since 2.7.0 504 */ 454 505 function populate_roles_270() { 455 506 $role = get_role( 'administrator' ); -
trunk/wp-admin/includes/taxonomy.php
r8603 r9053 1 1 <?php 2 /** 3 * WordPress Taxonomy Administration API. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 3 9 // … … 5 11 // 6 12 13 /** 14 * {@internal Missing Short Description}} 15 * 16 * @since unknown 17 * 18 * @param unknown_type $cat_name 19 * @return unknown 20 */ 7 21 function category_exists($cat_name) { 8 22 $id = is_term($cat_name, 'category'); … … 12 26 } 13 27 28 /** 29 * {@internal Missing Short Description}} 30 * 31 * @since unknown 32 * 33 * @param unknown_type $id 34 * @return unknown 35 */ 14 36 function get_category_to_edit( $id ) { 15 37 $category = get_category( $id, OBJECT, 'edit' ); … … 17 39 } 18 40 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 */ 19 50 function wp_create_category( $cat_name, $parent = 0 ) { 20 51 if ( $id = category_exists($cat_name) ) … … 24 55 } 25 56 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 */ 26 66 function wp_create_categories($categories, $post_id = '') { 27 67 $cat_ids = array (); … … 40 80 } 41 81 82 /** 83 * {@internal Missing Short Description}} 84 * 85 * @since unknown 86 * 87 * @param unknown_type $cat_ID 88 * @return unknown 89 */ 42 90 function wp_delete_category($cat_ID) { 43 91 $cat_ID = (int) $cat_ID; … … 51 99 } 52 100 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 */ 53 110 function wp_insert_category($catarr, $wp_error = false) { 54 111 $cat_defaults = array('cat_ID' => 0, 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => ''); … … 100 157 } 101 158 159 /** 160 * {@internal Missing Short Description}} 161 * 162 * @since unknown 163 * 164 * @param unknown_type $catarr 165 * @return unknown 166 */ 102 167 function wp_update_category($catarr) { 103 168 $cat_ID = (int) $catarr['cat_ID']; … … 122 187 // 123 188 189 /** 190 * {@internal Missing Short Description}} 191 * 192 * @since unknown 193 * 194 * @param unknown_type $post_id 195 * @return unknown 196 */ 124 197 function get_tags_to_edit( $post_id ) { 125 198 $post_id = (int) $post_id; … … 140 213 } 141 214 215 /** 216 * {@internal Missing Short Description}} 217 * 218 * @since unknown 219 * 220 * @param unknown_type $tag_name 221 * @return unknown 222 */ 142 223 function tag_exists($tag_name) { 143 224 return is_term($tag_name, 'post_tag'); 144 225 } 145 226 227 /** 228 * {@internal Missing Short Description}} 229 * 230 * @since unknown 231 * 232 * @param unknown_type $tag_name 233 * @return unknown 234 */ 146 235 function wp_create_tag($tag_name) { 147 236 if ( $id = tag_exists($tag_name) ) -
trunk/wp-admin/includes/template.php
r9046 r9053 1 1 <?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 */ 6 10 7 11 // 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 */ 8 23 function cat_rows( $parent = 0, $level = 0, $categories = 0, $page = 1, $per_page = 20 ) { 9 24 $count = 0; … … 11 26 } 12 27 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 */ 13 41 function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $per_page = 20 ) { 14 42 if ( empty($categories) ) { … … 73 101 } 74 102 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 */ 75 113 function _cat_row( $category, $level, $name_override = false ) { 76 114 global $class; … … 145 183 } 146 184 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 */ 147 194 function link_cat_row( $category, $name_override = false ) { 148 195 global $class; … … 215 262 } 216 263 264 /** 265 * {@internal Missing Short Description}} 266 * 267 * @since unknown 268 * 269 * @param unknown_type $checked 270 * @param unknown_type $current 271 */ 217 272 function checked( $checked, $current) { 218 273 if ( $checked == $current) … … 220 275 } 221 276 277 /** 278 * {@internal Missing Short Description}} 279 * 280 * @since unknown 281 * 282 * @param unknown_type $selected 283 * @param unknown_type $current 284 */ 222 285 function selected( $selected, $current) { 223 286 if ( $selected == $current) … … 229 292 // 230 293 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 */ 232 305 function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) { 233 306 global $post_ID; … … 235 308 } 236 309 310 /** 311 * {@internal Missing Short Description}} 312 * 313 * @since unknown 314 */ 237 315 class Walker_Category_Checklist extends Walker { 238 316 var $tree_type = 'category'; … … 261 339 } 262 340 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 */ 263 351 function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false ) { 264 352 $walker = new Walker_Category_Checklist; … … 302 390 } 303 391 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 */ 304 403 function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) { 305 404 global $post_ID; … … 330 429 } 331 430 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 */ 333 440 function dropdown_link_categories( $default = 0 ) { 334 441 global $link_id; … … 337 444 } 338 445 446 /** 447 * {@internal Missing Short Description}} 448 * 449 * @since unknown 450 * 451 * @param unknown_type $link_id 452 */ 339 453 function wp_link_category_checklist( $link_id = 0 ) { 340 454 $default = 1; … … 368 482 // Returns a single tag row (see tag_rows below) 369 483 // 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 */ 370 493 function _tag_row( $tag, $class = '' ) { 371 494 $count = number_format_i18n( $tag->count ); … … 423 546 // assuming M tags displayed at a time on the page 424 547 // 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 */ 425 558 function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) { 426 559 … … 450 583 451 584 // 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 */ 452 592 function wp_manage_posts_columns() { 453 593 $posts_columns = array(); … … 472 612 473 613 // 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 */ 474 621 function wp_manage_media_columns() { 475 622 $posts_columns = array(); … … 489 636 } 490 637 638 /** 639 * {@internal Missing Short Description}} 640 * 641 * @since unknown 642 * 643 * @return unknown 644 */ 491 645 function wp_manage_pages_columns() { 492 646 $posts_columns = array(); … … 517 671 } 518 672 673 /** 674 * {@internal Missing Short Description}} 675 * 676 * @since unknown 677 * 678 * @param unknown_type $page 679 * @return unknown 680 */ 519 681 function get_column_headers($page) { 520 682 switch ($page) { … … 591 753 } 592 754 755 /** 756 * {@internal Missing Short Description}} 757 * 758 * @since unknown 759 * 760 * @param unknown_type $type 761 * @param unknown_type $id 762 */ 593 763 function print_column_headers( $type, $id = true ) { 594 764 $columns = get_column_headers( $type ); … … 627 797 } 628 798 799 /** 800 * {@internal Missing Short Description}} 801 * 802 * @since unknown 803 * 804 * @param unknown_type $type 805 */ 629 806 function inline_edit_row( $type ) { 630 807 global $current_user, $mode; … … 869 1046 } 870 1047 1048 /** 1049 * {@internal Missing Short Description}} 1050 * 1051 * @since unknown 1052 * 1053 * @param unknown_type $data 1054 */ 871 1055 function inline_save_row( $data ) { 872 1056 // get the original post content … … 897 1081 898 1082 // 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 */ 899 1090 function get_inline_data($post) { 900 1091 … … 934 1125 } 935 1126 1127 /** 1128 * {@internal Missing Short Description}} 1129 * 1130 * @since unknown 1131 * 1132 * @param unknown_type $posts 1133 */ 936 1134 function post_rows( $posts = array() ) { 937 1135 global $wp_query, $post, $mode; … … 960 1158 } 961 1159 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 */ 962 1169 function _post_row($a_post, $pending_comments, $mode) { 963 1170 global $post; … … 1174 1381 * display one row if the page doesn't have any children 1175 1382 * 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 1176 1391 */ 1177 1392 function display_page_row( $page, $level = 0 ) { … … 1330 1545 * displays pages in hierarchical order with paging support 1331 1546 */ 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 */ 1332 1557 function page_rows($pages, $pagenum = 1, $per_page = 20) { 1333 1558 global $wpdb; … … 1406 1631 * Given a top level page ID, display the nested hierarchy of sub-pages 1407 1632 * 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 1408 1645 */ 1409 1646 function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) { … … 1449 1686 } 1450 1687 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 */ 1451 1698 function user_row( $user_object, $style = '', $role = '' ) { 1452 1699 global $wp_roles; … … 1532 1779 } 1533 1780 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 */ 1534 1794 function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) { 1535 1795 global $wpdb; … … 1584 1844 } 1585 1845 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 */ 1586 1856 function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true ) { 1587 1857 global $comment, $post; … … 1708 1978 } 1709 1979 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 */ 1710 1989 function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single') { 1711 1990 global $current_user; … … 1751 2030 } 1752 2031 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 */ 1753 2044 function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) { 1754 2045 if (!$categories ) … … 1772 2063 } 1773 2064 2065 /** 2066 * {@internal Missing Short Description}} 2067 * 2068 * @since unknown 2069 * 2070 * @param unknown_type $meta 2071 */ 1774 2072 function list_meta( $meta ) { 1775 2073 // Exit if no meta … … 1794 2092 } 1795 2093 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 */ 1796 2103 function _list_meta_row( $entry, &$count ) { 1797 2104 static $update_nonce = false; … … 1836 2143 } 1837 2144 2145 /** 2146 * {@internal Missing Short Description}} 2147 * 2148 * @since unknown 2149 */ 1838 2150 function meta_form() { 1839 2151 global $wpdb; … … 1882 2194 } 1883 2195 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 */ 1884 2206 function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { 1885 2207 global $wp_locale, $post, $comment; … … 1932 2254 } 1933 2255 2256 /** 2257 * {@internal Missing Short Description}} 2258 * 2259 * @since unknown 2260 * 2261 * @param unknown_type $default 2262 */ 1934 2263 function page_template_dropdown( $default = '' ) { 1935 2264 $templates = get_page_templates(); … … 1944 2273 } 1945 2274 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 */ 1946 2285 function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) { 1947 2286 global $wpdb, $post_ID; … … 1970 2309 } 1971 2310 2311 /** 2312 * {@internal Missing Short Description}} 2313 * 2314 * @since unknown 2315 */ 1972 2316 function browse_happy() { 1973 2317 $getit = __( 'WordPress recommends a better browser' ); … … 1980 2324 add_action( 'in_admin_footer', 'browse_happy' ); 1981 2325 2326 /** 2327 * {@internal Missing Short Description}} 2328 * 2329 * @since unknown 2330 * 2331 * @param unknown_type $id 2332 * @return unknown 2333 */ 1982 2334 function the_attachment_links( $id = false ) { 1983 2335 $id = (int) $id; … … 2023 2375 } 2024 2376 2377 /** 2378 * {@internal Missing Short Description}} 2379 * 2380 * @since unknown 2381 * 2382 * @param unknown_type $default 2383 */ 2025 2384 function wp_dropdown_roles( $default = false ) { 2026 2385 global $wp_roles; … … 2037 2396 } 2038 2397 2398 /** 2399 * {@internal Missing Short Description}} 2400 * 2401 * @since unknown 2402 * 2403 * @param unknown_type $size 2404 * @return unknown 2405 */ 2039 2406 function wp_convert_hr_to_bytes( $size ) { 2040 2407 $size = strtolower($size); … … 2049 2416 } 2050 2417 2418 /** 2419 * {@internal Missing Short Description}} 2420 * 2421 * @since unknown 2422 * 2423 * @param unknown_type $bytes 2424 * @return unknown 2425 */ 2051 2426 function wp_convert_bytes_to_hr( $bytes ) { 2052 2427 $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' ); … … 2057 2432 } 2058 2433 2434 /** 2435 * {@internal Missing Short Description}} 2436 * 2437 * @since unknown 2438 * 2439 * @return unknown 2440 */ 2059 2441 function wp_max_upload_size() { 2060 2442 $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) ); … … 2064 2446 } 2065 2447 2448 /** 2449 * {@internal Missing Short Description}} 2450 * 2451 * @since unknown 2452 * 2453 * @param unknown_type $action 2454 */ 2066 2455 function wp_import_upload_form( $action ) { 2067 2456 $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); … … 2083 2472 } 2084 2473 2474 /** 2475 * {@internal Missing Short Description}} 2476 * 2477 * @since unknown 2478 */ 2085 2479 function wp_remember_old_slug() { 2086 2480 global $post; … … 2091 2485 2092 2486 /** 2093 * add_meta_box() - Add a meta box to an edit form2094 * 2095 * @since 2.5 2487 * Add a meta box to an edit form. 2488 * 2489 * @since 2.5.0 2096 2490 * 2097 2491 * @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. 2099 2493 * @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'). 2103 2497 */ 2104 2498 function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default') { … … 2152 2546 } 2153 2547 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 */ 2154 2558 function do_meta_boxes($page, $context, $object) { 2155 2559 global $wp_meta_boxes; … … 2203 2607 2204 2608 /** 2205 * remove_meta_box() - Remove a meta box from an edit form2206 * 2207 * @since 2.6 2609 * Remove a meta box from an edit form. 2610 * 2611 * @since 2.6.0 2208 2612 * 2209 2613 * @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'). 2212 2616 */ 2213 2617 function remove_meta_box($id, $page, $context) { … … 2225 2629 } 2226 2630 2631 /** 2632 * {@internal Missing Short Description}} 2633 * 2634 * @since unknown 2635 * 2636 * @param unknown_type $page 2637 */ 2227 2638 function meta_box_prefs($page) { 2228 2639 global $wp_meta_boxes; … … 2251 2662 2252 2663 /** 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 2256 2667 * 2257 2668 * @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. 2259 2670 * @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, ...). 2261 2672 */ 2262 2673 function add_settings_section($id, $title, $callback, $page) { … … 2274 2685 2275 2686 /** 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 2279 2690 * 2280 2691 * @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. 2282 2693 * @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, ...). 2285 2696 * @param array $args Additional arguments 2286 2697 */ … … 2298 2709 } 2299 2710 2711 /** 2712 * {@internal Missing Short Description}} 2713 * 2714 * @since unknown 2715 * 2716 * @param unknown_type $page 2717 */ 2300 2718 function do_settings_sections($page) { 2301 2719 global $wp_settings_sections, $wp_settings_fields; … … 2315 2733 } 2316 2734 2735 /** 2736 * {@internal Missing Short Description}} 2737 * 2738 * @since unknown 2739 * 2740 * @param unknown_type $page 2741 * @param unknown_type $section 2742 */ 2317 2743 function do_settings_fields($page, $section) { 2318 2744 global $wp_settings_fields; … … 2334 2760 } 2335 2761 2762 /** 2763 * {@internal Missing Short Description}} 2764 * 2765 * @since unknown 2766 * 2767 * @param unknown_type $page 2768 */ 2336 2769 function manage_columns_prefs($page) { 2337 2770 $columns = get_column_headers($page); … … 2355 2788 } 2356 2789 2790 /** 2791 * {@internal Missing Short Description}} 2792 * 2793 * @since unknown 2794 * 2795 * @param unknown_type $found_action 2796 */ 2357 2797 function find_posts_div($found_action = '') { 2358 2798 ?> … … 2485 2925 * Display the post password. 2486 2926 * 2487 * The password is passed through {@link attribute_escape()} 2488 * to ensure that itis 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. 2489 2929 * 2490 2930 * @uses attribute_escape … … 2496 2936 } 2497 2937 2938 /** 2939 * {@internal Missing Short Description}} 2940 * 2941 * @since unknown 2942 */ 2498 2943 function favorite_actions() { 2499 2944 $actions = array( … … 2513 2958 echo "</div></div>\n"; 2514 2959 } 2960 2515 2961 /** 2516 2962 * Get the post title. 2517 2963 * 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. 2519 2966 * 2520 2967 * @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. 2522 2969 * 2523 2970 */ … … 2529 2976 return $title; 2530 2977 } 2978 2531 2979 ?> -
trunk/wp-admin/includes/theme.php
r8657 r9053 1 1 <?php 2 /** 3 * WordPress Theme Administration API 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 9 /** 10 * {@internal Missing Short Description}} 11 * 12 * @since unknown 13 * 14 * @return unknown 15 */ 3 16 function current_theme_info() { 4 17 $themes = get_themes(); … … 19 32 } 20 33 34 /** 35 * {@internal Missing Short Description}} 36 * 37 * @since unknown 38 * 39 * @return unknown 40 */ 21 41 function get_broken_themes() { 22 42 global $wp_broken_themes; … … 26 46 } 27 47 48 /** 49 * {@internal Missing Short Description}} 50 * 51 * @since unknown 52 * 53 * @return unknown 54 */ 28 55 function get_page_templates() { 29 56 $themes = get_themes(); -
trunk/wp-admin/includes/update-core.php
r8759 r9053 5 5 * @package WordPress 6 6 * @subpackage Administration 7 * @since 2.7 7 * @since 2.7.0 8 8 */ 9 9 … … 11 11 * Stores files to be deleted. 12 12 * 13 * @since 2.7 13 * @since 2.7.0 14 14 * @global array $_old_files 15 15 * @var array … … 167 167 * your changes remain. 168 168 * 169 * @since 2.7.0 170 * 169 171 * @param string $from New release unzipped path. 170 172 * @param string $to Path to old WordPress installation. -
trunk/wp-admin/includes/upgrade.php
r8989 r9053 1 1 <?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. */ 3 12 if ( file_exists(WP_CONTENT_DIR . '/install.php') ) 4 13 require (WP_CONTENT_DIR . '/install.php'); 14 15 /** WordPress Administration API */ 5 16 require_once(ABSPATH . 'wp-admin/includes/admin.php'); 17 18 /** WordPress Schema API */ 6 19 require_once(ABSPATH . 'wp-admin/includes/schema.php'); 7 20 8 21 if ( !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 */ 9 36 function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') { 10 37 global $wp_rewrite; … … 54 81 55 82 if ( !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 */ 56 92 function wp_install_defaults($user_id) { 57 93 global $wpdb; … … 108 144 109 145 if ( !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 */ 110 158 function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) { 111 159 $user = new WP_User($user_id); … … 133 181 134 182 if ( !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 */ 135 192 function wp_upgrade() { 136 193 global $wp_current_db_version, $wp_db_version; … … 142 199 return; 143 200 144 if( !is_blog_installed())201 if( ! is_blog_installed() ) 145 202 return; 146 203 … … 153 210 endif; 154 211 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 */ 156 219 function upgrade_all() { 157 220 global $wp_current_db_version, $wp_db_version, $wp_rewrite; … … 221 284 } 222 285 286 /** 287 * Execute changes made in WordPress 1.0. 288 * 289 * @since 1.0.0 290 */ 223 291 function upgrade_100() { 224 292 global $wpdb; … … 242 310 } 243 311 } 244 245 312 246 313 $wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/') … … 273 340 } 274 341 342 /** 343 * Execute changes made in WordPress 1.0.1. 344 * 345 * @since 1.0.1 346 */ 275 347 function upgrade_101() { 276 348 global $wpdb; … … 286 358 } 287 359 288 360 /** 361 * Execute changes made in WordPress 1.2. 362 * 363 * @since 1.2.0 364 */ 289 365 function upgrade_110() { 290 366 global $wpdb; … … 305 381 } 306 382 } 307 308 383 309 384 // Get the GMT offset, we'll use that later on … … 343 418 } 344 419 420 /** 421 * Execute changes made in WordPress 1.5. 422 * 423 * @since 1.5.0 424 */ 345 425 function upgrade_130() { 346 426 global $wpdb; … … 420 500 } 421 501 502 /** 503 * Execute changes made in WordPress 2.0. 504 * 505 * @since 2.0.0 506 */ 422 507 function upgrade_160() { 423 508 global $wpdb, $wp_current_db_version; … … 498 583 } 499 584 585 /** 586 * Execute changes made in WordPress 2.1. 587 * 588 * @since 2.1.0 589 */ 500 590 function upgrade_210() { 501 591 global $wpdb, $wp_current_db_version; … … 537 627 } 538 628 629 /** 630 * Execute changes made in WordPress 2.3. 631 * 632 * @since 2.3.0 633 */ 539 634 function upgrade_230() { 540 635 global $wp_current_db_version, $wpdb; … … 707 802 } 708 803 804 /** 805 * Remove old options from the database. 806 * 807 * @since 2.3.0 808 */ 709 809 function upgrade_230_options_table() { 710 810 global $wpdb; … … 716 816 } 717 817 818 /** 819 * Remove old categories, link2cat, and post2cat database tables. 820 * 821 * @since 2.3.0 822 */ 718 823 function upgrade_230_old_tables() { 719 824 global $wpdb; … … 723 828 } 724 829 830 /** 831 * Upgrade old slugs made in version 2.2. 832 * 833 * @since 2.2.0 834 */ 725 835 function upgrade_old_slugs() { 726 836 // upgrade people who were using the Redirect Old Slugs plugin … … 729 839 } 730 840 731 841 /** 842 * Execute changes made in WordPress 2.5.0. 843 * 844 * @since 2.5.0 845 */ 732 846 function upgrade_250() { 733 847 global $wp_current_db_version; … … 739 853 } 740 854 855 /** 856 * Execute changes made in WordPress 2.5.1. 857 * 858 * @since 2.5.1 859 */ 741 860 function upgrade_251() { 742 861 global $wp_current_db_version; … … 746 865 } 747 866 867 /** 868 * Execute changes made in WordPress 2.5.2. 869 * 870 * @since 2.5.2 871 */ 748 872 function upgrade_252() { 749 873 global $wpdb; … … 752 876 } 753 877 878 /** 879 * Execute changes made in WordPress 2.6. 880 * 881 * @since 2.6.0 882 */ 754 883 function upgrade_260() { 755 884 global $wp_current_db_version; … … 764 893 } 765 894 895 /** 896 * Execute changes made in WordPress 2.7. 897 * 898 * @since 2.7.0 899 */ 766 900 function upgrade_270() { 767 901 global $wpdb, $wp_current_db_version; … … 779 913 780 914 // 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 */ 781 927 function maybe_create_table($table_name, $create_ddl) { 782 928 global $wpdb; … … 797 943 } 798 944 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 */ 799 956 function drop_index($table, $index) { 800 957 global $wpdb; … … 809 966 } 810 967 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 */ 811 979 function add_clean_index($table, $index) { 812 980 global $wpdb; … … 841 1009 } 842 1010 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 */ 845 1018 function get_alloptions_110() { 846 1019 global $wpdb; … … 858 1031 } 859 1032 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 */ 861 1042 function __get_option($setting) { 862 1043 global $wpdb; … … 885 1066 } 886 1067 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 */ 887 1078 function deslash($content) { 888 1079 // Note: \\\ inside a regex denotes a single backslash. … … 902 1093 } 903 1094 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 */ 904 1106 function dbDelta($queries, $execute = true) { 905 1107 global $wpdb; … … 1103 1305 } 1104 1306 1307 /** 1308 * {@internal Missing Short Description}} 1309 * 1310 * {@internal Missing Long Description}} 1311 * 1312 * @since unknown 1313 */ 1105 1314 function make_db_current() { 1106 1315 global $wp_queries; … … 1112 1321 } 1113 1322 1323 /** 1324 * {@internal Missing Short Description}} 1325 * 1326 * {@internal Missing Long Description}} 1327 * 1328 * @since unknown 1329 */ 1114 1330 function make_db_current_silent() { 1115 1331 global $wp_queries; … … 1118 1334 } 1119 1335 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 */ 1120 1347 function make_site_theme_from_oldschool($theme_name, $template) { 1121 1348 $home_path = get_home_path(); … … 1186 1413 } 1187 1414 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 */ 1188 1426 function make_site_theme_from_default($theme_name, $template) { 1189 1427 $site_dir = WP_CONTENT_DIR . "/themes/$template"; … … 1241 1479 1242 1480 // 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 */ 1243 1490 function make_site_theme() { 1244 1491 // Name the theme after the blog. … … 1282 1529 } 1283 1530 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 */ 1284 1539 function translate_level_to_role($level) { 1285 1540 switch ($level) { … … 1303 1558 } 1304 1559 1560 /** 1561 * {@internal Missing Short Description}} 1562 * 1563 * {@internal Missing Long Description}} 1564 * 1565 * @since unknown 1566 */ 1305 1567 function wp_check_mysql_version() { 1306 1568 global $wpdb; … … 1310 1572 } 1311 1573 1574 /** 1575 * {@internal Missing Short Description}} 1576 * 1577 * {@internal Missing Long Description}} 1578 * 1579 * @since unknown 1580 */ 1312 1581 function maybe_disable_automattic_widgets() { 1313 1582 $plugins = __get_option( 'active_plugins' ); -
trunk/wp-admin/includes/user.php
r8944 r9053 1 1 <?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 */ 4 19 function add_user() { 5 20 if ( func_num_args() ) { // The hackiest hack that ever did hack … … 19 34 } 20 35 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 */ 21 46 function edit_user( $user_id = 0 ) { 22 47 global $current_user, $wp_roles, $wpdb; … … 143 168 } 144 169 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 */ 145 179 function get_author_user_ids() { 146 180 global $wpdb; … … 149 183 } 150 184 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 */ 151 195 function get_editable_authors( $user_id ) { 152 196 global $wpdb; … … 164 208 } 165 209 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 */ 166 221 function get_editable_user_ids( $user_id, $exclude_zeros = true ) { 167 222 global $wpdb; … … 185 240 } 186 241 242 /** 243 * {@internal Missing Short Description}} 244 * 245 * {@internal Missing Long Description}} 246 * 247 * @since unknown 248 * 249 * @return unknown 250 */ 187 251 function get_nonauthor_user_ids() { 188 252 global $wpdb; … … 192 256 } 193 257 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 */ 194 267 function get_others_unpublished_posts($user_id, $type='any') { 195 268 global $wpdb; … … 214 287 } 215 288 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 */ 216 297 function get_others_drafts($user_id) { 217 298 return get_others_unpublished_posts($user_id, 'draft'); 218 299 } 219 300 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 */ 220 309 function get_others_pending($user_id) { 221 310 return get_others_unpublished_posts($user_id, 'pending'); 222 311 } 223 312 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 */ 224 321 function get_user_to_edit( $user_id ) { 225 322 $user = new WP_User( $user_id ); … … 239 336 } 240 337 338 /** 339 * Retrieve the user's drafts. 340 * 341 * @since unknown 342 * 343 * @param int $user_id User ID. 344 * @return array 345 */ 241 346 function get_users_drafts( $user_id ) { 242 347 global $wpdb; … … 246 351 } 247 352 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 */ 248 367 function wp_delete_user($id, $reassign = 'novalue') { 249 368 global $wpdb; … … 280 399 } 281 400 401 /** 402 * Remove all capabilities from user. 403 * 404 * @since unknown 405 * 406 * @param int $id User ID. 407 */ 282 408 function wp_revoke_user($id) { 283 409 $id = (int) $id; … … 287 413 } 288 414 289 // WP_User_Search class290 // by Mark Jaquith291 292 415 if ( !class_exists('WP_User_Search') ) : 416 /** 417 * WordPress User Search class. 418 * 419 * @since unknown 420 * @author Mark Jaquith 421 */ 293 422 class WP_User_Search { 423 424 /** 425 * {@internal Missing Description}} 426 * 427 * @since unknown 428 * @access private 429 * @var unknown_type 430 */ 294 431 var $results; 432 433 /** 434 * {@internal Missing Description}} 435 * 436 * @since unknown 437 * @access private 438 * @var unknown_type 439 */ 295 440 var $search_term; 441 442 /** 443 * Page number. 444 * 445 * @since unknown 446 * @access private 447 * @var int 448 */ 296 449 var $page; 450 451 /** 452 * Role name that users have. 453 * 454 * @since unknown 455 * @access private 456 * @var string 457 */ 297 458 var $role; 459 460 /** 461 * Raw page number. 462 * 463 * @since unknown 464 * @access private 465 * @var int|bool 466 */ 298 467 var $raw_page; 468 469 /** 470 * Amount of users to display per page. 471 * 472 * @since unknown 473 * @access public 474 * @var int 475 */ 299 476 var $users_per_page = 50; 477 478 /** 479 * {@internal Missing Description}} 480 * 481 * @since unknown 482 * @access private 483 * @var unknown_type 484 */ 300 485 var $first_user; 486 487 /** 488 * {@internal Missing Description}} 489 * 490 * @since unknown 491 * @access private 492 * @var int 493 */ 301 494 var $last_user; 495 496 /** 497 * {@internal Missing Description}} 498 * 499 * @since unknown 500 * @access private 501 * @var unknown_type 502 */ 302 503 var $query_limit; 504 505 /** 506 * {@internal Missing Description}} 507 * 508 * @since unknown 509 * @access private 510 * @var unknown_type 511 */ 303 512 var $query_sort; 513 514 /** 515 * {@internal Missing Description}} 516 * 517 * @since unknown 518 * @access private 519 * @var unknown_type 520 */ 304 521 var $query_from_where; 522 523 /** 524 * {@internal Missing Description}} 525 * 526 * @since unknown 527 * @access private 528 * @var int 529 */ 305 530 var $total_users_for_query = 0; 531 532 /** 533 * {@internal Missing Description}} 534 * 535 * @since unknown 536 * @access private 537 * @var bool 538 */ 306 539 var $too_many_total_users = false; 540 541 /** 542 * {@internal Missing Description}} 543 * 544 * @since unknown 545 * @access private 546 * @var unknown_type 547 */ 307 548 var $search_errors; 549 550 /** 551 * {@internal Missing Description}} 552 * 553 * @since unknown 554 * @access private 555 * @var unknown_type 556 */ 308 557 var $paging_text; 309 558 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 = '') { 311 570 $this->search_term = $search_term; 312 571 $this->raw_page = ( '' == $page ) ? false : (int) $page; … … 320 579 } 321 580 581 /** 582 * {@internal Missing Short Description}} 583 * 584 * {@internal Missing Long Description}} 585 * 586 * @since unknown 587 * @access public 588 */ 322 589 function prepare_query() { 323 590 global $wpdb; … … 344 611 } 345 612 613 /** 614 * {@internal Missing Short Description}} 615 * 616 * {@internal Missing Long Description}} 617 * 618 * @since unknown 619 * @access public 620 */ 346 621 function query() { 347 622 global $wpdb; … … 354 629 } 355 630 631 /** 632 * {@internal Missing Short Description}} 633 * 634 * {@internal Missing Long Description}} 635 * 636 * @since unknown 637 * @access public 638 */ 356 639 function prepare_vars_for_template_usage() { 357 640 $this->search_term = stripslashes($this->search_term); // done with DB, from now on we want slashes gone 358 641 } 359 642 643 /** 644 * {@internal Missing Short Description}} 645 * 646 * {@internal Missing Long Description}} 647 * 648 * @since unknown 649 * @access public 650 */ 360 651 function do_paging() { 361 652 if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results … … 376 667 } 377 668 669 /** 670 * {@internal Missing Short Description}} 671 * 672 * {@internal Missing Long Description}} 673 * 674 * @since unknown 675 * @access public 676 * 677 * @return unknown 678 */ 378 679 function get_results() { 379 680 return (array) $this->results; 380 681 } 381 682 683 /** 684 * Displaying paging text. 685 * 686 * @see do_paging() Builds paging text. 687 * 688 * @since unknown 689 * @access public 690 */ 382 691 function page_links() { 383 692 echo $this->paging_text; 384 693 } 385 694 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 */ 386 705 function results_are_paged() { 387 706 if ( $this->paging_text ) … … 390 709 } 391 710 711 /** 712 * Whether there are search terms. 713 * 714 * @since unknown 715 * @access public 716 * 717 * @return bool 718 */ 392 719 function is_search() { 393 720 if ( $this->search_term ) -
trunk/wp-admin/includes/widgets.php
r8945 r9053 10 10 * Display list of widgets, either all or matching search. 11 11 * 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. 16 18 */ 17 19 function wp_list_widgets( $show = 'all', $_search = false ) { … … 169 171 * @since unknown 170 172 * 171 * @param unknown_type$sidebar173 * @param string $sidebar 172 174 */ 173 175 function wp_list_widget_controls( $sidebar ) { … … 189 191 * @since unknown 190 192 * 191 * @param unknown_type$params192 * @return unknown193 * @param array $params 194 * @return array 193 195 */ 194 196 function wp_list_widget_controls_dynamic_sidebar( $params ) { … … 217 219 * @since unknown 218 220 * 219 * @param unknown_type$sidebar_args220 * @return unknown221 * @param array $sidebar_args 222 * @return array 221 223 */ 222 224 function wp_widget_control( $sidebar_args ) { … … 323 325 * @since unknown 324 326 * 325 * @param unknown_type$string326 * @return unknown327 * @param string $string 328 * @return string 327 329 */ 328 330 function wp_widget_control_ob_filter( $string ) {
Note: See TracChangeset
for help on using the changeset viewer.