WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/02/08 01:03:26 (9 years ago)
Author:
ryan
Message:

phpdoc for wp-admin/includes from jacobsantos. see #7527

File:
1 edited

Legend:

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

    r9014 r9053  
    11<?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 */ 
    316function media_upload_tabs() { 
    417    $_default_tabs = array( 
     
    1124} 
    1225 
     26/** 
     27 * {@internal Missing Short Description}} 
     28 * 
     29 * @since unknown 
     30 * 
     31 * @param unknown_type $tabs 
     32 * @return unknown 
     33 */ 
    1334function update_gallery_tab($tabs) { 
    1435    global $wpdb; 
     
    2647add_filter('media_upload_tabs', 'update_gallery_tab'); 
    2748 
     49/** 
     50 * {@internal Missing Short Description}} 
     51 * 
     52 * @since unknown 
     53 */ 
    2854function the_media_upload_tabs() { 
    2955    global $redir_tab; 
     
    5278} 
    5379 
     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 */ 
    5494function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') { 
    5595 
     
    66106} 
    67107 
     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 */ 
    68122function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { 
    69123 
     
    85139add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 ); 
    86140 
     141/** 
     142 * {@internal Missing Short Description}} 
     143 * 
     144 * @since unknown 
     145 * 
     146 * @param unknown_type $html 
     147 */ 
    87148function media_send_to_editor($html) { 
    88     ?> 
     149?> 
    89150<script type="text/javascript"> 
    90151/* <![CDATA[ */ 
     
    97158} 
    98159 
    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 */ 
    100172function media_handle_upload($file_id, $post_id, $post_data = array()) { 
    101173    $overrides = array('test_form'=>false); 
     
    138210} 
    139211 
     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 */ 
    140223function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) { 
    141224    $overrides = array('test_form'=>false); 
     
    179262} 
    180263 
    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 */ 
    184274function wp_iframe($content_func /* ... */) { 
    185275?> 
     
    221311} 
    222312 
     313/** 
     314 * {@internal Missing Short Description}} 
     315 * 
     316 * @since unknown 
     317 */ 
    223318function media_buttons() { 
    224319    global $post_ID, $temp_ID; 
     
    246341add_action('media_upload_media', 'media_upload_handler'); 
    247342 
     343/** 
     344 * {@internal Missing Short Description}} 
     345 * 
     346 * @since unknown 
     347 * 
     348 * @return unknown 
     349 */ 
    248350function media_upload_form_handler() { 
    249351    check_admin_referer('media-form'); 
     
    295397} 
    296398 
     399/** 
     400 * {@internal Missing Short Description}} 
     401 * 
     402 * @since unknown 
     403 * 
     404 * @return unknown 
     405 */ 
    297406function media_upload_image() { 
    298407    $errors = array(); 
     
    340449} 
    341450 
     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 */ 
    342461function media_sideload_image($file, $post_id, $desc = null) { 
    343462    if (!empty($file) ) { 
     
    368487} 
    369488 
     489/** 
     490 * {@internal Missing Short Description}} 
     491 * 
     492 * @since unknown 
     493 * 
     494 * @return unknown 
     495 */ 
    370496function media_upload_audio() { 
    371497    $errors = array(); 
     
    411537} 
    412538 
     539/** 
     540 * {@internal Missing Short Description}} 
     541 * 
     542 * @since unknown 
     543 * 
     544 * @return unknown 
     545 */ 
    413546function media_upload_video() { 
    414547    $errors = array(); 
     
    454587} 
    455588 
     589/** 
     590 * {@internal Missing Short Description}} 
     591 * 
     592 * @since unknown 
     593 * 
     594 * @return unknown 
     595 */ 
    456596function media_upload_file() { 
    457597    $errors = array(); 
     
    497637} 
    498638 
     639/** 
     640 * {@internal Missing Short Description}} 
     641 * 
     642 * @since unknown 
     643 * 
     644 * @return unknown 
     645 */ 
    499646function media_upload_gallery() { 
    500647    $errors = array(); 
     
    513660} 
    514661 
     662/** 
     663 * {@internal Missing Short Description}} 
     664 * 
     665 * @since unknown 
     666 * 
     667 * @return unknown 
     668 */ 
    515669function media_upload_library() { 
    516670    $errors = array(); 
     
    528682 
    529683// 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 */ 
    530693function image_align_input_fields($post, $checked='') { 
    531694     
     
    545708 
    546709// 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 */ 
    547719function image_size_input_fields($post, $checked='') { 
    548720         
     
    583755 
    584756// 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 */ 
    585766function image_link_input_fields($post, $url_type='') { 
    586767 
     
    603784} 
    604785 
     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 */ 
    605795function image_attachment_fields_to_edit($form_fields, $post) { 
    606796    if ( substr($post->post_mime_type, 0, 5) == 'image' ) { 
     
    625815add_filter('attachment_fields_to_edit', 'image_attachment_fields_to_edit', 10, 2); 
    626816 
     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 */ 
    627826function media_single_attachment_fields_to_edit( $form_fields, $post ) { 
    628827    unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); 
     
    630829} 
    631830 
     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 */ 
    632840function image_attachment_fields_to_save($post, $attachment) { 
    633841    if ( substr($post['post_mime_type'], 0, 5) == 'image' ) { 
     
    643851add_filter('attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2); 
    644852 
     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 */ 
    645863function image_media_send_to_editor($html, $attachment_id, $attachment) { 
    646864    $post =& get_post($attachment_id); 
     
    668886add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3); 
    669887 
     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 */ 
    670897function get_attachment_fields_to_edit($post, $errors = null) { 
    671898    if ( is_int($post) ) 
     
    733960} 
    734961 
     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 */ 
    735971function get_media_items( $post_id, $errors ) { 
    736972    if ( $post_id ) { 
     
    756992} 
    757993 
     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 */ 
    7581003function get_media_item( $attachment_id, $args = null ) { 
    7591004    global $redir_tab; 
     
    9201165} 
    9211166 
     1167/** 
     1168 * {@internal Missing Short Description}} 
     1169 * 
     1170 * @since unknown 
     1171 */ 
    9221172function media_upload_header() { 
    9231173    ?> 
     
    9291179} 
    9301180 
     1181/** 
     1182 * {@internal Missing Short Description}} 
     1183 * 
     1184 * @since unknown 
     1185 * 
     1186 * @param unknown_type $errors 
     1187 */ 
    9311188function media_upload_form( $errors = null ) { 
    9321189    global $type, $tab; 
     
    10181275} 
    10191276 
     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 */ 
    10201286function media_upload_type_form($type = 'file', $errors = null, $id = null) { 
    10211287    media_upload_header(); 
     
    11451411} 
    11461412 
     1413/** 
     1414 * {@internal Missing Short Description}} 
     1415 * 
     1416 * @since unknown 
     1417 * 
     1418 * @param unknown_type $errors 
     1419 */ 
    11471420function media_upload_gallery_form($errors) { 
    11481421    global $redir_tab; 
     
    11901463} 
    11911464 
     1465/** 
     1466 * {@internal Missing Short Description}} 
     1467 * 
     1468 * @since unknown 
     1469 * 
     1470 * @param unknown_type $errors 
     1471 */ 
    11921472function media_upload_library_form($errors) { 
    11931473    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; 
     
    13361616} 
    13371617 
     1618/** 
     1619 * {@internal Missing Short Description}} 
     1620 * 
     1621 * @since unknown 
     1622 * 
     1623 * @return unknown 
     1624 */ 
    13381625function type_form_image() { 
    13391626 
     
    14121699} 
    14131700 
     1701/** 
     1702 * {@internal Missing Short Description}} 
     1703 * 
     1704 * @since unknown 
     1705 * 
     1706 * @return unknown 
     1707 */ 
    14141708function type_form_audio() { 
    14151709    return ' 
     
    14401734} 
    14411735 
     1736/** 
     1737 * {@internal Missing Short Description}} 
     1738 * 
     1739 * @since unknown 
     1740 * 
     1741 * @return unknown 
     1742 */ 
    14421743function type_form_video() { 
    14431744    return ' 
     
    14681769} 
    14691770 
     1771/** 
     1772 * {@internal Missing Short Description}} 
     1773 * 
     1774 * @since unknown 
     1775 * 
     1776 * @return unknown 
     1777 */ 
    14701778function type_form_file() { 
    14711779    return ' 
     
    14971805 
    14981806// 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 */ 
    14991815function media_upload_use_flash($flash) { 
    15001816    if ( array_key_exists('flash', $_REQUEST) ) 
     
    15051821add_filter('flash_uploader', 'media_upload_use_flash'); 
    15061822 
     1823/** 
     1824 * {@internal Missing Short Description}} 
     1825 * 
     1826 * @since unknown 
     1827 */ 
    15071828function media_upload_flash_bypass() { 
    15081829    echo '<p class="upload-flash-bypass">'; 
     
    15131834add_action('post-flash-upload-ui', 'media_upload_flash_bypass'); 
    15141835 
     1836/** 
     1837 * {@internal Missing Short Description}} 
     1838 * 
     1839 * @since unknown 
     1840 */ 
    15151841function media_upload_html_bypass() { 
    15161842    echo '<p class="upload-html-bypass">'; 
     
    15291855 
    15301856// 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 */ 
    15311865function media_upload_bypass_url($url) { 
    15321866    if ( array_key_exists('flash', $_REQUEST) ) 
Note: See TracChangeset for help on using the changeset viewer.