WordPress.org

Make WordPress Core

Changeset 21871


Ignore:
Timestamp:
09/16/2012 06:31:42 PM (7 years ago)
Author:
nacin
Message:

Basic phpdoc for admin includes media.php. props c3mdigital. fixes #21144.

File:
1 edited

Legend:

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

    r21597 r21871  
    88
    99/**
    10  * {@internal Missing Short Description}}
    11  *
    12  * @since 2.5.0
    13  *
    14  * @return unknown
     10 * Defines the default media upload tabs
     11 *
     12 * @since 2.5.0
     13 *
     14 * @return array default tabs
    1515 */
    1616function media_upload_tabs() {
     
    2626
    2727/**
    28  * {@internal Missing Short Description}}
    29  *
    30  * @since 2.5.0
    31  *
    32  * @param unknown_type $tabs
    33  * @return unknown
     28 * Adds the gallery tab back to the tabs array if post has image attachments
     29 *
     30 * @since 2.5.0
     31 *
     32 * @param array $tabs
     33 * @return array $tabs with gallery if post has image attachment
    3434 */
    3535function update_gallery_tab($tabs) {
     
    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 = '') {
     
    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 = '' ) {
     
    171173
    172174/**
    173  * {@internal Missing Short Description}}
    174  *
    175  * @since 2.5.0
    176  *
    177  * @param unknown_type $html
     175 * Adds image html to editor
     176 *
     177 * @since 2.5.0
     178 *
     179 * @param string $html
    178180 */
    179181function media_send_to_editor($html) {
     
    190192
    191193/**
    192  * {@internal Missing Short Description}}
    193  *
    194194 * This handles the file upload POST itself, creating the attachment post.
    195195 *
     
    313313
    314314/**
    315  * {@internal Missing Short Description}}
    316  *
    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  *
    320  * @since 2.5.0
    321  *
    322  * @param unknown_type $content_func
     315 * Adds the iframe to display content for the media upload page
     316 *
     317 * @since 2.5.0
     318 *
     319 * @param array $content_func
    323320 */
    324321function wp_iframe($content_func /* ... */) {
     
    374371
    375372/**
    376  * {@internal Missing Short Description}}
    377  *
    378  * @since 2.5.0
     373 * Adds the media button to the editor
     374 *
     375 * @since 2.5.0
     376 *
     377 * @param string $editor_id
    379378 */
    380379function media_buttons($editor_id = 'content') {
     
    411410 * @since 2.5.0
    412411 *
    413  * @return unknown
     412 * @return mixed void|object WP_Error on failure
    414413 */
    415414function media_upload_form_handler() {
     
    503502 * @since 2.5.0
    504503 *
    505  * @return unknown
     504 * @return mixed
    506505 */
    507506function wp_media_upload_handler() {
     
    674673 * @since 2.7.0
    675674 *
    676  * @param unknown_type $post
    677  * @param unknown_type $checked
    678  * @return unknown
     675 * @param object $post
     676 * @param string $checked
     677 * @return string
    679678 */
    680679function image_align_input_fields( $post, $checked = '' ) {
     
    702701 * @since 2.7.0
    703702 *
    704  * @param unknown_type $post
    705  * @param unknown_type $check
    706  * @return unknown
     703 * @param object $post
     704 * @param bool|string $check
     705 * @return array
    707706 */
    708707function image_size_input_fields( $post, $check = '' ) {
     
    757756 * @since 2.7.0
    758757 *
    759  * @param unknown_type $post
    760  * @param unknown_type $url_type
    761  * @return unknown
     758 * @param object $post
     759 * @param string $url_type
     760 * @return string
    762761 */
    763762function image_link_input_fields($post, $url_type = '') {
     
    795794 * @since 2.5.0
    796795 *
    797  * @param unknown_type $form_fields
    798  * @param unknown_type $post
    799  * @return unknown
     796 * @param array $form_fields
     797 * @param object $post
     798 * @return array
    800799 */
    801800function image_attachment_fields_to_edit($form_fields, $post) {
     
    834833 * @since 2.5.0
    835834 *
    836  * @param unknown_type $form_fields
    837  * @param unknown_type $post
    838  * @return unknown
     835 * @param array $form_fields
     836 * @param object $post {@internal $post not used}}
     837 * @return array
    839838 */
    840839function media_single_attachment_fields_to_edit( $form_fields, $post ) {
     
    848847 * @since 2.8.0
    849848 *
    850  * @param unknown_type $form_fields
    851  * @param unknown_type $post
    852  * @return unknown
     849 * @param array $form_fields
     850 * @param object $post {@internal $post not used}}
     851 * @return array
    853852 */
    854853function media_post_single_attachment_fields_to_edit( $form_fields, $post ) {
     
    866865 * @since 2.5.0
    867866 *
    868  * @param array $post
    869  * @param array $attachment
     867 * @param object $post
     868 * @param array $attachment {@internal $attachment not used}}
    870869 * @return array
    871870 */
     
    888887 * @since 2.5.0
    889888 *
    890  * @param unknown_type $html
    891  * @param unknown_type $attachment_id
    892  * @param unknown_type $attachment
    893  * @return unknown
     889 * @param string $html
     890 * @param integer $attachment_id
     891 * @param array $attachment
     892 * @return array
    894893 */
    895894function image_media_send_to_editor($html, $attachment_id, $attachment) {
     
    915914 * @since 2.5.0
    916915 *
    917  * @param unknown_type $post
    918  * @param unknown_type $errors
    919  * @return unknown
     916 * @param object $post
     917 * @param array $errors
     918 * @return array
    920919 */
    921920function get_attachment_fields_to_edit($post, $errors = null) {
     
    14131412 * @since 2.5.0
    14141413 *
    1415  * @param unknown_type $type
    1416  * @param unknown_type $errors
    1417  * @param unknown_type $id
     1414 * @param string $type
     1415 * @param object $errors
     1416 * @param integer $id
    14181417 */
    14191418function media_upload_type_form($type = 'file', $errors = null, $id = null) {
     
    14761475 * @since 2.7.0
    14771476 *
    1478  * @param unknown_type $type
    1479  * @param unknown_type $errors
    1480  * @param unknown_type $id
     1477 * @param string $type
     1478 * @param object $errors
     1479 * @param integer $id
    14811480 */
    14821481function media_upload_type_url_form($type = null, $errors = null, $id = null) {
     
    16091608
    16101609/**
    1611  * {@internal Missing Short Description}}
    1612  *
    1613  * @since 2.5.0
    1614  *
    1615  * @param unknown_type $errors
     1610 * Adds gallery form to upload iframe
     1611 *
     1612 * @since 2.5.0
     1613 *
     1614 * @param array $errors
    16161615 */
    16171616function media_upload_gallery_form($errors) {
     
    17591758 * @since 2.5.0
    17601759 *
    1761  * @param unknown_type $errors
     1760 * @param array $errors
    17621761 */
    17631762function media_upload_library_form($errors) {
     
    19221921
    19231922/**
    1924  * {@internal Missing Short Description}}
     1923 * Creates the form for external url
    19251924 *
    19261925 * @since 2.7.0
    19271926 *
    1928  * @return unknown
     1927 * @param string $default_view
     1928 * @return string the form html
    19291929 */
    19301930function wp_media_insert_url_form( $default_view = 'image' ) {
Note: See TracChangeset for help on using the changeset viewer.