diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index b304439971..bb672fc8c4 100644 --- a/wp-includes/media-template.php +++ b/wp-includes/media-template.php @@ -136,6 +136,8 @@ function wp_underscore_video_template() { * Prints the templates used in the media manager. * * @since 3.5.0 + * + * @global bool $is_IE */ function wp_print_media_templates() { global $is_IE; diff --git a/wp-includes/media.php b/wp-includes/media.php index b69b328d13..352c7b2f6f 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -26,6 +26,9 @@ * * @since 2.5.0 * + * @global int $content_width + * @global array $_wp_additional_image_sizes + * * @param int $width Width of the image in pixels. * @param int $height Height of the image in pixels. * @param string|array $size Optional. Size or array of sizes of what the result image @@ -145,7 +148,7 @@ function image_hwstring( $width, $height ) { * @param int $id Attachment ID for image. * @param array|string $size Optional. Image size to scale to. Accepts a registered image size * or flat array of height and width values. Default 'medium'. - * @return bool|array False on failure, array on success. + * @return false|array False on failure, array on success. */ function image_downsize( $id, $size = 'medium' ) { @@ -242,6 +245,8 @@ function add_image_size( $name, $width = 0, $height = 0, $crop = false ) { * * @since 3.9.0 * + * @global array $_wp_additional_image_sizes + * * @param string $name The image size to check. * @return bool True if the image size exists, false if not. */ @@ -256,6 +261,8 @@ function has_image_size( $name ) { * * @since 3.9.0 * + * @global array $_wp_additional_image_sizes + * * @param string $name The image size to remove. * @return bool True if the image size was successfully removed, false on failure. */ @@ -343,9 +350,7 @@ function get_image_tag( $id, $alt, $title, $align, $size = 'medium' ) { * @param string $align Part of the class name for aligning the image. * @param string $size Optional. Default is 'medium'. */ - $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size ); - - return $html; + return apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size ); } /** @@ -445,7 +450,7 @@ function wp_constrain_dimensions( $current_width, $current_height, $max_width = * @param int $dest_h New height in pixels. * @param bool|array $crop Optional. Whether to crop image to specified height and width or resize. * An array can specify positioning of the crop area. Default false. - * @return bool|array False on failure. Returned array matches parameters for `imagecopyresampled()`. + * @return false|array False on failure. Returned array matches parameters for `imagecopyresampled()`. */ function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) { @@ -551,7 +556,7 @@ function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = fal * @param int $height Image height. * @param bool $crop Optional. Whether to crop image to specified height and width or resize. * Default false. - * @return bool|array False, if no image was created. Metadata array on success. + * @return false|array False, if no image was created. Metadata array on success. */ function image_make_intermediate_size( $file, $width, $height, $crop = false ) { if ( $width || $height ) { @@ -594,7 +599,7 @@ function image_make_intermediate_size( $file, $width, $height, $crop = false ) { * @param int $post_id Attachment ID. * @param array|string $size Optional. Registered image size to retrieve or flat array of height * and width dimensions. Default 'thumbnail'. - * @return bool|array False on failure or array of file path, width, and height on success. + * @return false|array False on failure or array of file path, width, and height on success. */ function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) { if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) ) @@ -685,7 +690,7 @@ function get_intermediate_image_sizes() { * @param string|array $size Optional. Registered image size to retrieve the source for or a flat * array of height and width dimensions. Default 'thumbnail'. * @param bool $icon Optional. Whether the image should be treated as an icon. Default false. - * @return bool|array Returns an array (url, width, height), or false, if no image is available. + * @return false|array Returns an array (url, width, height), or false, if no image is available. */ function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) { @@ -725,7 +730,6 @@ function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon * @return string HTML img element or empty string on failure. */ function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false, $attr = '') { - $html = ''; $image = wp_get_attachment_image_src($attachment_id, $size, $icon); if ( $image ) { @@ -926,6 +930,8 @@ add_shortcode('gallery', 'gallery_shortcode'); * * @since 2.5.0 * + * @staticvar int $instance + * * @param array $attr { * Attributes of the gallery shortcode. * @@ -1199,6 +1205,9 @@ function wp_playlist_scripts( $type ) { * * @since 3.9.0 * + * @global int $content_width + * @staticvar int $instance + * * @param array $attr { * Array of default playlist attributes. * @@ -1519,6 +1528,8 @@ function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) { * * @since 3.6.0 * + * @staticvar int $instance + * * @param array $attr { * Attributes of the audio shortcode. * @@ -1531,7 +1542,7 @@ function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) { * @type string $style The 'style' attribute for the `