A WordPress-centric search engine for devs and theme authors



wp-includes/media.php ›

Functions65
WordPress API for media display.


Function Short description
add_image_sizeRegister a new image size.
adjacent_image_linkDisplays next or previous image link that has the same post parent.
attachment_url_to_postidTries to convert an attachment URL into a post ID.
gallery_shortcodeBuilds the Gallery shortcode output.
get_attached_mediaRetrieves media attached to the passed post.
get_attachment_taxonomiesRetrieves taxonomies attached to given the attachment.
get_image_tagGets an img tag for an image attachment, scaling it down if requested.
get_intermediate_image_sizesGets the available intermediate image sizes.
get_media_embedded_in_contentCheck the content blob for an audio, video, object, embed, or iframe tags.
get_post_galleriesRetrieves galleries from the passed post's content.
get_post_galleries_imagesRetrieve the image srcs from galleries from a post's content, if present
get_post_galleryCheck a specified post's content for gallery and, if present, return the first
get_post_gallery_imagesChecks a post's content for galleries and return the image srcs for the first found gallery
get_taxonomies_for_attachmentsRetrieves all of the taxonomies that are registered for attachments.
has_image_sizeCheck if an image size exists.
image_constrain_size_for_editorScale down the default size of an image.
image_downsizeScale an image to fit a particular size (such as 'thumb' or 'medium').
image_get_intermediate_sizeRetrieves the image's intermediate size (resized) path, width, and height.
image_hwstringRetrieve width and height attributes using given width and height values.
image_make_intermediate_sizeResizes an image to make a thumbnail or intermediate size.
image_resize_dimensionsRetrieves calculated resize dimensions for use in WP_Image_Editor.
img_caption_shortcodeBuilds the Caption shortcode output.
next_image_linkDisplays next image link that has the same post parent.
previous_image_linkDisplays previous image link that has the same post parent.
remove_image_sizeRemove a new image size.
set_post_thumbnail_sizeRegisters an image size for the post thumbnail.
wpview_media_sandbox_stylesReturns the URLs for CSS files used in an iframe-sandbox'd TinyMCE media view.
wp_audio_shortcodeBuilds the Audio shortcode output.
wp_calculate_image_sizesCreates a 'sizes' attribute value for an image.
wp_calculate_image_srcsetA helper function to calculate the image sources to include in a 'srcset' attribute.
wp_constrain_dimensionsCalculates the new dimensions for a down-sampled image.
wp_enqueue_mediaEnqueues all scripts, styles, settings, and templates necessary to use all media JS APIs.
wp_expand_dimensionsBased on a supplied width/height example, return the biggest possible dimensions based on the max width/height.
wp_get_additional_image_sizesRetrieve additional image sizes.
wp_get_attachment_id3_keysReturns useful keys to use to lookup data from an attachment's stored metadata.
wp_get_attachment_imageGet an HTML img element representing an image attachment
wp_get_attachment_image_sizesRetrieves the value for an image attachment's 'sizes' attribute.
wp_get_attachment_image_srcRetrieve an image to represent an attachment.
wp_get_attachment_image_srcsetRetrieves the value for an image attachment's 'srcset' attribute.
wp_get_attachment_image_urlGet the URL of an image attachment.
wp_get_audio_extensionsReturns a filtered list of WP-supported audio formats.
wp_get_image_editorReturns a WP_Image_Editor instance and loads file into it.
wp_get_video_extensionsReturns a filtered list of WP-supported video formats.
wp_imagecreatetruecolorCreate new GD image resource with transparency support
wp_image_add_srcset_and_sizesAdds 'srcset' and 'sizes' attributes to an existing 'img' element.
wp_image_editor_supportsTests whether there is an editor that supports a given mime type or methods.
wp_image_matches_ratioHelper function to test if aspect ratios for two images match.
wp_make_content_images_responsiveFilters 'img' elements in post content to add 'srcset' and 'sizes' attributes.
wp_max_upload_sizeDetermines the maximum upload size allowed in php.ini.
wp_maybe_generate_attachment_metadataMaybe attempts to generate attachment metadata, if missing.
wp_mediaelement_fallbackProvides a No-JS Flash fallback as a last resort for audio / video.
wp_media_personal_data_exporterFinds and exports attachments associated with an email address.
wp_playlist_scriptsOutputs and enqueue default scripts and styles for playlists.
wp_playlist_shortcodeBuilds the Playlist shortcode output.
wp_plupload_default_settingsPrints default Plupload arguments.
wp_prepare_attachment_for_jsPrepares an attachment post object for JS, where it is expected to be JSON-encoded and fit into an Attachment model.
wp_register_media_personal_data_exporterRegisters the personal data exporter for media
wp_underscore_playlist_templatesOutputs the templates used by playlists.
wp_video_shortcodeBuilds the Video shortcode output.
_wp_get_attachment_relative_pathGet the attachment path relative to the upload directory.
_wp_get_image_size_from_metaGet the image size as array from its meta data.
_wp_image_editor_chooseTests which editors are capable of supporting the request.
_wp_post_thumbnail_class_filterAdds a 'wp-post-image' class to post thumbnails. Internal use only.
_wp_post_thumbnail_class_filter_addAdds '_wp_post_thumbnail_class_filter' callback to the 'wp_get_attachment_image_attributes' filter hook. Internal use only.
_wp_post_thumbnail_class_filter_removeRemoves the '_wp_post_thumbnail_class_filter' callback from the 'wp_get_attachment_image_attributes' filter hook. Internal use only.