Changeset 9053 for trunk/wp-admin/includes/media.php
- Timestamp:
- 10/02/2008 01:03:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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) )
Note: See TracChangeset
for help on using the changeset viewer.