Ticket #21144: 21144.patch
File 21144.patch, 8.2 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/media.php
7 7 */ 8 8 9 9 /** 10 * {@internal Missing Short Description}}10 * Defines the default media upload tabs 11 11 * 12 12 * @since 2.5.0 13 13 * 14 * @return unknown14 * @return array default tabs 15 15 */ 16 16 function media_upload_tabs() { 17 17 $_default_tabs = array( … … 25 25 } 26 26 27 27 /** 28 * {@internal Missing Short Description}}28 * Adds the gallery tab back to the tabs array if post has image attachments 29 29 * 30 30 * @since 2.5.0 31 31 * 32 * @param unknown_type$tabs33 * @return unknown32 * @param array $tabs 33 * @return array $tabs with gallery if post has image attachment 34 34 */ 35 35 function update_gallery_tab($tabs) { 36 36 global $wpdb; … … 94 94 * 95 95 * @since 2.5.0 96 96 * 97 * @param unknown_type $id 98 * @param unknown_type $alt 99 * @param unknown_type $title 100 * @param unknown_type $align 101 * @param unknown_type $url 102 * @param unknown_type $rel 103 * @param unknown_type $size 104 * @return unknown 97 * @param integer $id image attachment id 98 * @param string $caption image caption 99 * @param string $alt image alt attribute 100 * @param string $title image title attribute 101 * @param string $align image css alignment property 102 * @param string $url image src url 103 * @param string|bool $rel image rel attribute 104 * @param string $size image size (thumbnail, medium, large, full or added with add_image_size() ) 105 * @return string the html to insert into editor 105 106 */ 106 107 function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') { 107 108 … … 118 119 } 119 120 120 121 /** 121 * {@internal Missing Short Description}}122 * Adds image shortcode with caption to editor 122 123 * 123 124 * @since 2.6.0 124 125 * 125 * @param unknown_type $html 126 * @param unknown_type $id 127 * @param unknown_type $alt 128 * @param unknown_type $title 129 * @param unknown_type $align 130 * @param unknown_type $url 131 * @param unknown_type $size 132 * @return unknown 126 * @param string $html 127 * @param integer $id 128 * @param string $caption image caption 129 * @param string $alt image alt attribute 130 * @param string $title image title attribute 131 * @param string $align image css alignment property 132 * @param string $url image src url 133 * @param string $size image size (thumbnail, medium, large, full or added with add_image_size() ) 134 * @return string 133 135 */ 134 136 function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) { 135 137 … … 170 172 } 171 173 172 174 /** 173 * {@internal Missing Short Description}}175 * Adds image html to editor 174 176 * 175 177 * @since 2.5.0 176 178 * 177 * @param unknown_type$html179 * @param string $html 178 180 */ 179 181 function media_send_to_editor($html) { 180 182 ?> … … 189 191 } 190 192 191 193 /** 192 * {@internal Missing Short Description}}193 *194 194 * This handles the file upload POST itself, creating the attachment post. 195 195 * 196 196 * @since 2.5.0 … … 312 312 } 313 313 314 314 /** 315 * {@internal Missing Short Description}}315 * Adds the iframe to display content for the media upload page 316 316 * 317 * Wrap iframe content (produced by $content_func) in a doctype, html head/body318 * etc any additional function args will be passed to content_func.319 *320 317 * @since 2.5.0 321 318 * 322 * @param unknown_type$content_func319 * @param array $content_func 323 320 */ 324 321 function wp_iframe($content_func /* ... */) { 325 322 _wp_admin_html_begin(); … … 373 370 } 374 371 375 372 /** 376 * {@internal Missing Short Description}}373 * Adds the media button to the editor 377 374 * 378 375 * @since 2.5.0 376 * 377 * @param string $editor_id 379 378 */ 380 379 function media_buttons($editor_id = 'content') { 381 380 $context = apply_filters('media_buttons_context', __('Upload/Insert %s')); … … 414 413 * 415 414 * @since 2.5.0 416 415 * 417 * @return unknown416 * @return mixed void|object WP_Error on failure 418 417 */ 419 418 function media_upload_form_handler() { 420 419 check_admin_referer('media-form'); … … 506 505 * 507 506 * @since 2.5.0 508 507 * 509 * @return unknown508 * @return mixed 510 509 */ 511 510 function wp_media_upload_handler() { 512 511 $errors = array(); … … 677 676 * 678 677 * @since 2.7.0 679 678 * 680 * @param unknown_type$post681 * @param unknown_type$checked682 * @return unknown679 * @param object $post 680 * @param string $checked 681 * @return string 683 682 */ 684 683 function image_align_input_fields( $post, $checked = '' ) { 685 684 … … 705 704 * 706 705 * @since 2.7.0 707 706 * 708 * @param unknown_type$post709 * @param unknown_type$check710 * @return unknown707 * @param object $post 708 * @param bool|string $check 709 * @return array 711 710 */ 712 711 function image_size_input_fields( $post, $check = '' ) { 713 712 … … 760 759 * 761 760 * @since 2.7.0 762 761 * 763 * @param unknown_type$post764 * @param unknown_type$url_type765 * @return unknown762 * @param object $post 763 * @param string $url_type 764 * @return string 766 765 */ 767 766 function image_link_input_fields($post, $url_type = '') { 768 767 … … 798 797 * 799 798 * @since 2.5.0 800 799 * 801 * @param unknown_type$form_fields802 * @param unknown_type$post803 * @return unknown800 * @param array $form_fields 801 * @param object $post 802 * @return array 804 803 */ 805 804 function image_attachment_fields_to_edit($form_fields, $post) { 806 805 if ( substr($post->post_mime_type, 0, 5) == 'image' ) { … … 837 836 * 838 837 * @since 2.5.0 839 838 * 840 * @param unknown_type$form_fields841 * @param unknown_type $post842 * @return unknown839 * @param array $form_fields 840 * @param object $post {@internal $post not used}} 841 * @return array 843 842 */ 844 843 function media_single_attachment_fields_to_edit( $form_fields, $post ) { 845 844 unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); … … 851 850 * 852 851 * @since 2.8.0 853 852 * 854 * @param unknown_type$form_fields855 * @param unknown_type $post856 * @return unknown853 * @param array $form_fields 854 * @param object $post {@internal $post not used}} 855 * @return array 857 856 */ 858 857 function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { 859 858 unset($form_fields['image_url']); … … 869 868 * 870 869 * @since 2.5.0 871 870 * 872 * @param array$post873 * @param array $attachment 871 * @param object $post 872 * @param array $attachment {@internal $attachment not used}} 874 873 * @return array 875 874 */ 876 875 function image_attachment_fields_to_save($post, $attachment) { … … 891 890 * 892 891 * @since 2.5.0 893 892 * 894 * @param unknown_type$html895 * @param unknown_type$attachment_id896 * @param unknown_type$attachment897 * @return unknown893 * @param string $html 894 * @param integer $attachment_id 895 * @param array $attachment 896 * @return array 898 897 */ 899 898 function image_media_send_to_editor($html, $attachment_id, $attachment) { 900 899 $post =& get_post($attachment_id); … … 918 917 * 919 918 * @since 2.5.0 920 919 * 921 * @param unknown_type$post922 * @param unknown_type$errors923 * @return unknown920 * @param object $post 921 * @param array $errors 922 * @return array 924 923 */ 925 924 function get_attachment_fields_to_edit($post, $errors = null) { 926 925 if ( is_int($post) ) … … 1417 1416 * 1418 1417 * @since 2.5.0 1419 1418 * 1420 * @param unknown_type$type1421 * @param unknown_type$errors1422 * @param unknown_type$id1419 * @param string $type 1420 * @param object $errors 1421 * @param integer $id 1423 1422 */ 1424 1423 function media_upload_type_form($type = 'file', $errors = null, $id = null) { 1425 1424 … … 1480 1479 * 1481 1480 * @since 2.7.0 1482 1481 * 1483 * @param unknown_type$type1484 * @param unknown_type$errors1485 * @param unknown_type$id1482 * @param string $type 1483 * @param object $errors 1484 * @param integer $id 1486 1485 */ 1487 1486 function media_upload_type_url_form($type = null, $errors = null, $id = null) { 1488 1487 if ( null === $type ) … … 1613 1612 } 1614 1613 1615 1614 /** 1616 * {@internal Missing Short Description}}1615 * Adds gallery form to upload iframe 1617 1616 * 1618 1617 * @since 2.5.0 1619 1618 * 1620 * @param unknown_type$errors1619 * @param array $errors 1621 1620 */ 1622 1621 function media_upload_gallery_form($errors) { 1623 1622 global $redir_tab, $type; … … 1763 1762 * 1764 1763 * @since 2.5.0 1765 1764 * 1766 * @param unknown_type$errors1765 * @param array $errors 1767 1766 */ 1768 1767 function media_upload_library_form($errors) { 1769 1768 global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; … … 1926 1925 } 1927 1926 1928 1927 /** 1929 * {@internal Missing Short Description}}1928 * Creates the form for external url 1930 1929 * 1931 1930 * @since 2.7.0 1932 1931 * 1933 * @return unknown 1932 * @param string $default_view 1933 * @return string the form html 1934 1934 */ 1935 1935 function wp_media_insert_url_form( $default_view = 'image' ) { 1936 1936 if ( !apply_filters( 'disable_captions', '' ) ) {