WordPress.org

Make WordPress Core

Changeset 32609


Ignore:
Timestamp:
05/26/2015 07:22:12 PM (6 years ago)
Author:
wonderboymusic
Message:

Fix doc blocks for media*.php

See #32444.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r32506 r32609  
    137137 *
    138138 * @since 3.5.0
     139 *
     140 * @global bool $is_IE
    139141 */
    140142function wp_print_media_templates() {
  • trunk/src/wp-includes/media.php

    r32113 r32609  
    2626 *
    2727 * @since 2.5.0
     28 *
     29 * @global int   $content_width
     30 * @global array $_wp_additional_image_sizes
    2831 *
    2932 * @param int          $width   Width of the image in pixels.
     
    146149 * @param array|string $size Optional. Image size to scale to. Accepts a registered image size
    147150 *                           or flat array of height and width values. Default 'medium'.
    148  * @return bool|array False on failure, array on success.
     151 * @return false|array False on failure, array on success.
    149152 */
    150153function image_downsize( $id, $size = 'medium' ) {
     
    243246 * @since 3.9.0
    244247 *
     248 * @global array $_wp_additional_image_sizes
     249 *
    245250 * @param string $name The image size to check.
    246251 * @return bool True if the image size exists, false if not.
     
    256261 *
    257262 * @since 3.9.0
     263 *
     264 * @global array $_wp_additional_image_sizes
    258265 *
    259266 * @param string $name The image size to remove.
     
    344351     * @param string $size  Optional. Default is 'medium'.
    345352     */
    346     $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );
    347 
    348     return $html;
     353    return apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );
    349354}
    350355
     
    446451 * @param bool|array $crop   Optional. Whether to crop image to specified height and width or resize.
    447452 *                           An array can specify positioning of the crop area. Default false.
    448  * @return bool|array False on failure. Returned array matches parameters for `imagecopyresampled()`.
     453 * @return false|array False on failure. Returned array matches parameters for `imagecopyresampled()`.
    449454 */
    450455function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) {
     
    552557 * @param bool   $crop   Optional. Whether to crop image to specified height and width or resize.
    553558 *                       Default false.
    554  * @return bool|array False, if no image was created. Metadata array on success.
     559 * @return false|array False, if no image was created. Metadata array on success.
    555560 */
    556561function image_make_intermediate_size( $file, $width, $height, $crop = false ) {
     
    595600 * @param array|string $size    Optional. Registered image size to retrieve or flat array of height
    596601 *                              and width dimensions. Default 'thumbnail'.
    597  * @return bool|array False on failure or array of file path, width, and height on success.
     602 * @return false|array False on failure or array of file path, width, and height on success.
    598603 */
    599604function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
     
    686691 *                                    array of height and width dimensions. Default 'thumbnail'.
    687692 * @param bool         $icon          Optional. Whether the image should be treated as an icon. Default false.
    688  * @return bool|array Returns an array (url, width, height), or false, if no image is available.
     693 * @return false|array Returns an array (url, width, height), or false, if no image is available.
    689694 */
    690695function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) {
     
    726731 */
    727732function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false, $attr = '') {
    728 
    729733    $html = '';
    730734    $image = wp_get_attachment_image_src($attachment_id, $size, $icon);
     
    926930 *
    927931 * @since 2.5.0
     932 *
     933 * @staticvar int $instance
    928934 *
    929935 * @param array $attr {
     
    12001206 * @since 3.9.0
    12011207 *
     1208 * @global int $content_width
     1209 * @staticvar int $instance
     1210 *
    12021211 * @param array $attr {
    12031212 *     Array of default playlist attributes.
     
    15201529 * @since 3.6.0
    15211530 *
     1531 * @staticvar int $instance
     1532 *
    15221533 * @param array  $attr {
    15231534 *     Attributes of the audio shortcode.
     
    15321543 * }
    15331544 * @param string $content Shortcode content.
    1534  * @return string HTML content to display audio.
     1545 * @return string|void HTML content to display audio.
    15351546 */
    15361547function wp_audio_shortcode( $attr, $content = '' ) {
     
    17121723 *
    17131724 * @since 3.6.0
     1725 *
     1726 * @global int $content_width
     1727 * @staticvar int $instance
    17141728 *
    17151729 * @param array  $attr {
     
    17301744 * }
    17311745 * @param string $content Shortcode content.
    1732  * @return string HTML content to display video.
     1746 * @return string|void HTML content to display video.
    17331747 */
    17341748function wp_video_shortcode( $attr, $content = '' ) {
     
    19501964 *                           0 or 'none' will default to 'post_title' or `$text`. Default 'thumbnail'.
    19511965 * @param string       $text Optional. Link text. Default false.
    1952  * @return string HTML output for the previous image link.
    19531966 */
    19541967function previous_image_link( $size = 'thumbnail', $text = false ) {
     
    19661979 *                           0 or 'none' will default to 'post_title' or `$text`. Default 'thumbnail'.
    19671980 * @param string       $text Optional. Link text. Default false.
    1968  * @return string HTML output for the next image link.
    19691981 */
    19701982function next_image_link($size = 'thumbnail', $text = false) {
     
    19831995 *                                     Default 'thumbnail'.
    19841996 * @param bool         $text Optional. Link text. Default false.
    1985  * @return string The adjacent image link.
    19861997 */
    19871998function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
     
    21212132 * @since 2.9.0
    21222133 *
    2123  * @see WP_Embed::register_handler()
     2134 * @global WP_Embed $wp_embed
    21242135 *
    21252136 * @param string   $id       An internal ID/name for the handler. Needs to be unique.
     
    21392150 * @since 2.9.0
    21402151 *
    2141  * @see WP_Embed::unregister_handler()
     2152 * @global WP_Embed $wp_embed
    21422153 *
    21432154 * @param string $id       The handler ID that should be removed.
     
    21602171 *
    21612172 * @since 2.9.0
     2173 *
     2174 * @global int $content_width
    21622175 *
    21632176 * @param string $url Optional. The URL that should be embedded. Default empty.
     
    23672380 * @since 4.0.0
    23682381 *
     2382 * @global WP_Embed $wp_embed
     2383 *
    23692384 * @param array  $matches The RegEx matches from the provided regex when calling
    23702385 *                        wp_embed_register_handler().
     
    23982413 * @since 3.6.0
    23992414 *
    2400  * @param array $matches The RegEx matches from the provided regex when calling wp_embed_register_handler().
    2401  * @param array $attr Embed attributes.
     2415 * @param array  $matches The RegEx matches from the provided regex when calling wp_embed_register_handler().
     2416 * @param array  $attr Embed attributes.
    24022417 * @param string $url The original URL that was matched by the regex.
    2403  * @param array $rawattr The original unmodified attributes.
     2418 * @param array  $rawattr The original unmodified attributes.
    24042419 * @return string The embed HTML.
    24052420 */
     
    25532568 *
    25542569 * @param array $args Optional. Array of arguments for choosing a capable editor. Default empty array.
    2555  * @return string|bool Class name for the first editor that claims to support the request. False if no
     2570 * @return string|false Class name for the first editor that claims to support the request. False if no
    25562571 *                     editor claims to support the request.
    25572572 */
     
    25992614 */
    26002615function wp_plupload_default_settings() {
    2601     global $wp_scripts;
     2616    $wp_scripts = wp_scripts();
    26022617
    26032618    $data = $wp_scripts->get_data( 'wp-plupload', 'data' );
     
    26742689 *
    26752690 * @param mixed $attachment Attachment ID or object.
    2676  * @return array Array of attachment details.
     2691 * @return array|void Array of attachment details.
    26772692 */
    26782693function wp_prepare_attachment_for_js( $attachment ) {
     
    28672882 * @since 3.5.0
    28682883 *
     2884 * @global int       $content_width
     2885 * @global wpdb      $wpdb
     2886 * @global WP_Locale $wp_locale
     2887 *
    28692888 * @param array $args {
    28702889 *     Arguments for enqueuing media scripts.
     
    28722891 *     @type int|WP_Post A post object or ID.
    28732892 * }
    2874  * @return array List of media view settings.
    28752893 */
    28762894function wp_enqueue_media( $args = array() ) {
    2877 
    28782895    // Enqueue me just once per page, please.
    28792896    if ( did_action( 'wp_enqueue_media' ) )
     
    34283445 * @since 4.0.0
    34293446 *
    3430  * @global $wp_version
     3447 * @global string $wp_version
    34313448 *
    34323449 * @return array The relevant CSS file URLs.
Note: See TracChangeset for help on using the changeset viewer.