Make WordPress Core


Ignore:
Timestamp:
02/07/2026 06:05:09 AM (4 months ago)
Author:
westonruter
Message:

Docs: Add descriptions and improved typing to @return tags in various admin and includes files.

Developed in https://github.com/WordPress/wordpress-develop/pull/10863

Props huzaifaalmesbah, westonruter, noruzzaman, mukesh27.
See #64224.

File:
1 edited

Legend:

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

    r61532 r61594  
    869869 * @since 2.5.0
    870870 *
    871  * @return null|string
     871 * @return null|string The form handler result or null.
    872872 */
    873873function wp_media_upload_handler() {
     
    10971097 * @since 2.5.0
    10981098 *
    1099  * @return string|null
     1099 * @return string|null The form handler result or null.
    11001100 */
    11011101function media_upload_gallery() {
     
    11231123 * @since 2.5.0
    11241124 *
    1125  * @return string|null
     1125 * @return string|null The form handler result or null.
    11261126 */
    11271127function media_upload_library() {
     
    11491149 * @param WP_Post $post
    11501150 * @param string  $checked
    1151  * @return string
     1151 * @return string HTML for the image alignment radio buttons.
    11521152 */
    11531153function image_align_input_fields( $post, $checked = '' ) {
     
    11871187 * @param WP_Post     $post
    11881188 * @param bool|string $check
    1189  * @return array
     1189 * @return array<string, string> An array of data for the image size input fields.
    11901190 */
    11911191function image_size_input_fields( $post, $check = '' ) {
     
    12651265 * @param WP_Post $post
    12661266 * @param string  $url_type
    1267  * @return string
     1267 * @return string HTML markup for the link URL buttons.
    12681268 */
    12691269function image_link_input_fields( $post, $url_type = '' ) {
     
    13141314 * @param array  $form_fields
    13151315 * @param object $post
    1316  * @return array
     1316 * @return array<string, array<string, mixed>> The attachment form fields.
    13171317 */
    13181318function image_attachment_fields_to_edit( $form_fields, $post ) {
     
    13561356 * @param int     $attachment_id
    13571357 * @param array   $attachment
    1358  * @return string
     1358 * @return string HTML markup for the media element.
    13591359 */
    13601360function image_media_send_to_editor( $html, $attachment_id, $attachment ) {
     
    13811381 * @param WP_Post $post
    13821382 * @param array   $errors
    1383  * @return array
     1383 * @return array<string, array<string, mixed>> The attachment fields.
    13841384 */
    13851385function get_attachment_fields_to_edit( $post, $errors = null ) {
     
    18661866
    18671867/**
     1868 * Retrieves the media markup for an attachment.
     1869 *
    18681870 * @since 3.5.0
    18691871 *
    18701872 * @param int   $attachment_id
    18711873 * @param array $args
    1872  * @return array
     1874 * @return array<string, string> An array containing the media item and its metadata.
    18731875 */
    18741876function get_compat_media_markup( $attachment_id, $args = null ) {
Note: See TracChangeset for help on using the changeset viewer.