Ticket #21144: 21144.patch

File 21144.patch, 8.2 KB (added by c3mdigital, 11 months ago)
  • wp-admin/includes/media.php

     
    77 */ 
    88 
    99/** 
    10  * {@internal Missing Short Description}} 
     10 * Defines the default media upload tabs 
    1111 * 
    1212 * @since 2.5.0 
    1313 * 
    14  * @return unknown 
     14 * @return array default tabs 
    1515 */ 
    1616function media_upload_tabs() { 
    1717        $_default_tabs = array( 
     
    2525} 
    2626 
    2727/** 
    28  * {@internal Missing Short Description}} 
     28 * Adds the gallery tab back to the tabs array if post has image attachments 
    2929 * 
    3030 * @since 2.5.0 
    3131 * 
    32  * @param unknown_type $tabs 
    33  * @return unknown 
     32 * @param array $tabs 
     33 * @return array $tabs with gallery if post has image attachment 
    3434 */ 
    3535function update_gallery_tab($tabs) { 
    3636        global $wpdb; 
     
    9494 * 
    9595 * @since 2.5.0 
    9696 * 
    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 
    105106 */ 
    106107function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') { 
    107108 
     
    118119} 
    119120 
    120121/** 
    121  * {@internal Missing Short Description}} 
     122 * Adds image shortcode with caption to editor 
    122123 * 
    123124 * @since 2.6.0 
    124125 * 
    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 
    133135 */ 
    134136function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) { 
    135137 
     
    170172} 
    171173 
    172174/** 
    173  * {@internal Missing Short Description}} 
     175 * Adds image html to editor 
    174176 * 
    175177 * @since 2.5.0 
    176178 * 
    177  * @param unknown_type $html 
     179 * @param string $html 
    178180 */ 
    179181function media_send_to_editor($html) { 
    180182?> 
     
    189191} 
    190192 
    191193/** 
    192  * {@internal Missing Short Description}} 
    193  * 
    194194 * This handles the file upload POST itself, creating the attachment post. 
    195195 * 
    196196 * @since 2.5.0 
     
    312312} 
    313313 
    314314/** 
    315  * {@internal Missing Short Description}} 
     315 * Adds the iframe to display content for the media upload page 
    316316 * 
    317  * Wrap iframe content (produced by $content_func) in a doctype, html head/body 
    318  * etc any additional function args will be passed to content_func. 
    319  * 
    320317 * @since 2.5.0 
    321318 * 
    322  * @param unknown_type $content_func 
     319 * @param array $content_func 
    323320 */ 
    324321function wp_iframe($content_func /* ... */) { 
    325322        _wp_admin_html_begin(); 
     
    373370} 
    374371 
    375372/** 
    376  * {@internal Missing Short Description}} 
     373 * Adds the media button to the editor 
    377374 * 
    378375 * @since 2.5.0 
     376 * 
     377 * @param string $editor_id 
    379378 */ 
    380379function media_buttons($editor_id = 'content') { 
    381380        $context = apply_filters('media_buttons_context', __('Upload/Insert %s')); 
     
    414413 * 
    415414 * @since 2.5.0 
    416415 * 
    417  * @return unknown 
     416 * @return mixed void|object WP_Error on failure 
    418417 */ 
    419418function media_upload_form_handler() { 
    420419        check_admin_referer('media-form'); 
     
    506505 * 
    507506 * @since 2.5.0 
    508507 * 
    509  * @return unknown 
     508 * @return mixed 
    510509 */ 
    511510function wp_media_upload_handler() { 
    512511        $errors = array(); 
     
    677676 * 
    678677 * @since 2.7.0 
    679678 * 
    680  * @param unknown_type $post 
    681  * @param unknown_type $checked 
    682  * @return unknown 
     679 * @param object $post 
     680 * @param string $checked 
     681 * @return string 
    683682 */ 
    684683function image_align_input_fields( $post, $checked = '' ) { 
    685684 
     
    705704 * 
    706705 * @since 2.7.0 
    707706 * 
    708  * @param unknown_type $post 
    709  * @param unknown_type $check 
    710  * @return unknown 
     707 * @param object $post 
     708 * @param bool|string $check 
     709 * @return array 
    711710 */ 
    712711function image_size_input_fields( $post, $check = '' ) { 
    713712 
     
    760759 * 
    761760 * @since 2.7.0 
    762761 * 
    763  * @param unknown_type $post 
    764  * @param unknown_type $url_type 
    765  * @return unknown 
     762 * @param object $post 
     763 * @param string $url_type 
     764 * @return string 
    766765 */ 
    767766function image_link_input_fields($post, $url_type = '') { 
    768767 
     
    798797 * 
    799798 * @since 2.5.0 
    800799 * 
    801  * @param unknown_type $form_fields 
    802  * @param unknown_type $post 
    803  * @return unknown 
     800 * @param array $form_fields 
     801 * @param object $post 
     802 * @return array 
    804803 */ 
    805804function image_attachment_fields_to_edit($form_fields, $post) { 
    806805        if ( substr($post->post_mime_type, 0, 5) == 'image' ) { 
     
    837836 * 
    838837 * @since 2.5.0 
    839838 * 
    840  * @param unknown_type $form_fields 
    841  * @param unknown_type $post 
    842  * @return unknown 
     839 * @param array $form_fields 
     840 * @param object $post {@internal $post not used}} 
     841 * @return array 
    843842 */ 
    844843function media_single_attachment_fields_to_edit( $form_fields, $post ) { 
    845844        unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); 
     
    851850 * 
    852851 * @since 2.8.0 
    853852 * 
    854  * @param unknown_type $form_fields 
    855  * @param unknown_type $post 
    856  * @return unknown 
     853 * @param array $form_fields 
     854 * @param object $post {@internal $post not used}} 
     855 * @return array 
    857856 */ 
    858857function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { 
    859858        unset($form_fields['image_url']); 
     
    869868 * 
    870869 * @since 2.5.0 
    871870 * 
    872  * @param array $post 
    873  * @param array $attachment 
     871 * @param object $post 
     872 * @param array $attachment {@internal $attachment not used}} 
    874873 * @return array 
    875874 */ 
    876875function image_attachment_fields_to_save($post, $attachment) { 
     
    891890 * 
    892891 * @since 2.5.0 
    893892 * 
    894  * @param unknown_type $html 
    895  * @param unknown_type $attachment_id 
    896  * @param unknown_type $attachment 
    897  * @return unknown 
     893 * @param string $html 
     894 * @param integer $attachment_id 
     895 * @param array $attachment 
     896 * @return array 
    898897 */ 
    899898function image_media_send_to_editor($html, $attachment_id, $attachment) { 
    900899        $post =& get_post($attachment_id); 
     
    918917 * 
    919918 * @since 2.5.0 
    920919 * 
    921  * @param unknown_type $post 
    922  * @param unknown_type $errors 
    923  * @return unknown 
     920 * @param object $post 
     921 * @param array $errors 
     922 * @return array 
    924923 */ 
    925924function get_attachment_fields_to_edit($post, $errors = null) { 
    926925        if ( is_int($post) ) 
     
    14171416 * 
    14181417 * @since 2.5.0 
    14191418 * 
    1420  * @param unknown_type $type 
    1421  * @param unknown_type $errors 
    1422  * @param unknown_type $id 
     1419 * @param string $type 
     1420 * @param object $errors 
     1421 * @param integer $id 
    14231422 */ 
    14241423function media_upload_type_form($type = 'file', $errors = null, $id = null) { 
    14251424 
     
    14801479 * 
    14811480 * @since 2.7.0 
    14821481 * 
    1483  * @param unknown_type $type 
    1484  * @param unknown_type $errors 
    1485  * @param unknown_type $id 
     1482 * @param string $type 
     1483 * @param object $errors 
     1484 * @param integer $id 
    14861485 */ 
    14871486function media_upload_type_url_form($type = null, $errors = null, $id = null) { 
    14881487        if ( null === $type ) 
     
    16131612} 
    16141613 
    16151614/** 
    1616  * {@internal Missing Short Description}} 
     1615 * Adds gallery form to upload iframe 
    16171616 * 
    16181617 * @since 2.5.0 
    16191618 * 
    1620  * @param unknown_type $errors 
     1619 * @param array $errors 
    16211620 */ 
    16221621function media_upload_gallery_form($errors) { 
    16231622        global $redir_tab, $type; 
     
    17631762 * 
    17641763 * @since 2.5.0 
    17651764 * 
    1766  * @param unknown_type $errors 
     1765 * @param array $errors 
    17671766 */ 
    17681767function media_upload_library_form($errors) { 
    17691768        global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; 
     
    19261925} 
    19271926 
    19281927/** 
    1929  * {@internal Missing Short Description}} 
     1928 * Creates the form for external url 
    19301929 * 
    19311930 * @since 2.7.0 
    19321931 * 
    1933  * @return unknown 
     1932 * @param string $default_view 
     1933 * @return string the form html 
    19341934 */ 
    19351935function wp_media_insert_url_form( $default_view = 'image' ) { 
    19361936        if ( !apply_filters( 'disable_captions', '' ) ) {