wpseek.com
A WordPress-centric search engine for devs and theme authors
wp-includes/media.php › WordPress File
Functions86
› WordPress API for media display.
Function | Short description |
---|---|
add_image_size | Registers a new image size. |
adjacent_image_link | Displays next or previous image link that has the same post parent. |
attachment_url_to_postid | Tries to convert an attachment URL into a post ID. |
gallery_shortcode | Builds the Gallery shortcode output. |
get_adjacent_image_link | Gets the next or previous image link that has the same post parent. |
get_attached_media | Retrieves media attached to the passed post. |
get_attachment_taxonomies | Retrieves taxonomies attached to given the attachment. |
get_image_tag | Gets an img tag for an image attachment, scaling it down if requested. |
get_intermediate_image_sizes | Gets the available intermediate image size names. |
get_media_embedded_in_content | Checks the HTML content for an audio, video, object, embed, or iframe tags. |
get_next_image_link | Gets the next image link that has the same post parent. |
get_post_galleries | Retrieves galleries from the passed post's content. |
get_post_galleries_images | Retrieves the image srcs from galleries from a post's content, if present. |
get_post_gallery | Checks a specified post's content for gallery and, if present, return the first |
get_post_gallery_images | Checks a post's content for galleries and return the image srcs for the first found gallery. |
get_previous_image_link | Gets the previous image link that has the same post parent. |
get_taxonomies_for_attachments | Retrieves all of the taxonomies that are registered for attachments. |
has_image_size | Checks if an image size exists. |
image_constrain_size_for_editor | Scales down the default size of an image. |
image_downsize | Scales an image to fit a particular size (such as 'thumb' or 'medium'). |
image_get_intermediate_size | Retrieves the image's intermediate size (resized) path, width, and height. |
image_hwstring | Retrieves width and height attributes using given width and height values. |
image_make_intermediate_size | Resizes an image to make a thumbnail or intermediate size. |
image_resize_dimensions | Retrieves calculated resize dimensions for use in WP_Image_Editor. |
img_caption_shortcode | Builds the Caption shortcode output. |
is_gd_image | Determines whether the value is an acceptable type for GD image functions. |
next_image_link | Displays next image link that has the same post parent. |
previous_image_link | Displays previous image link that has the same post parent. |
remove_image_size | Removes a new image size. |
set_post_thumbnail_size | Registers an image size for the post thumbnail. |
wpview_media_sandbox_styles | Returns the URLs for CSS files used in an iframe-sandbox'd TinyMCE media view. |
wp_audio_shortcode | Builds the Audio shortcode output. |
wp_calculate_image_sizes | Creates a 'sizes' attribute value for an image. |
wp_calculate_image_srcset | A helper function to calculate the image sources to include in a 'srcset' attribute. |
wp_constrain_dimensions | Calculates the new dimensions for a down-sampled image. |
wp_enqueue_media | Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs. |
wp_expand_dimensions | Based on a supplied width/height example, returns the biggest possible dimensions based on the max width/height. |
wp_filter_content_tags | Filters specific tags in post content and modifies their markup. |
wp_getimagesize | Allows PHP's getimagesize() to be debuggable when necessary. |
wp_get_additional_image_sizes | Retrieves additional image sizes. |
wp_get_attachment_id3_keys | Returns useful keys to use to lookup data from an attachment's stored metadata. |
wp_get_attachment_image | Gets an HTML img element representing an image attachment. |
wp_get_attachment_image_sizes | Retrieves the value for an image attachment's 'sizes' attribute. |
wp_get_attachment_image_src | Retrieves an image to represent an attachment. |
wp_get_attachment_image_srcset | Retrieves the value for an image attachment's 'srcset' attribute. |
wp_get_attachment_image_url | Gets the URL of an image attachment. |
wp_get_audio_extensions | Returns a filtered list of supported audio formats. |
wp_get_avif_info | Extracts meta information about an AVIF file: width, height, bit depth, and number of channels. |
wp_get_image_editor | Returns a WP_Image_Editor instance and loads file into it. |
wp_get_image_editor_output_format | Determines the output format for the image editor. |
wp_get_loading_optimization_attributes | Gets loading optimization attributes. |
wp_get_registered_image_subsizes | Returns a normalized list of all currently registered image sub-sizes. |
wp_get_video_extensions | Returns a filtered list of supported video formats. |
wp_get_webp_info | Extracts meta information about a WebP file: width, height, and type. |
wp_high_priority_element_flag | Accesses a flag that indicates if an element is a possible candidate for `fetchpriority='high'`. |
wp_iframe_tag_add_loading_attr | Adds `loading` attribute to an `iframe` HTML tag. |
wp_imagecreatetruecolor | Creates a new GD image resource with transparency support. |
wp_image_add_srcset_and_sizes | Adds 'srcset' and 'sizes' attributes to an existing 'img' element. |
wp_image_editor_supports | Tests whether there is an editor that supports a given mime type or methods. |
wp_image_file_matches_image_meta | Determines if the image meta data is for the image source file. |
wp_image_matches_ratio | Helper function to test if aspect ratios for two images match. |
wp_image_src_get_dimensions | Determines an image's width and height dimensions based on the source file. |
wp_img_tag_add_auto_sizes | Adds 'auto' to the sizes attribute to the image, if the image is lazy loaded and does not already include it. |
wp_img_tag_add_loading_optimization_attrs | Adds optimization attributes to an `img` HTML tag. |
wp_img_tag_add_srcset_and_sizes_attr | Adds `srcset` and `sizes` attributes to an existing `img` HTML tag. |
wp_img_tag_add_width_and_height_attr | Adds `width` and `height` attributes to an `img` HTML tag. |
wp_increase_content_media_count | Increases an internal content media count variable. |
wp_lazy_loading_enabled | Determines whether to add the `loading` attribute to the specified tag in the specified context. |
wp_max_upload_size | Determines the maximum upload size allowed in php.ini. |
wp_maybe_add_fetchpriority_high_attr | Determines whether to add `fetchpriority='high'` to loading attributes. |
wp_maybe_generate_attachment_metadata | Maybe attempts to generate attachment metadata, if missing. |
wp_mediaelement_fallback | Provides a No-JS Flash fallback as a last resort for audio / video. |
wp_media_personal_data_exporter | Finds and exports attachments associated with an email address. |
wp_omit_loading_attr_threshold | Gets the threshold for how many of the first content media elements to not lazy-load. |
wp_playlist_scripts | Outputs and enqueues default scripts and styles for playlists. |
wp_playlist_shortcode | Builds the Playlist shortcode output. |
wp_plupload_default_settings | Prints default Plupload arguments. |
wp_prepare_attachment_for_js | Prepares 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_exporter | Registers the personal data exporter for media. |
wp_show_heic_upload_error | Callback to enable showing of the user error when uploading .heic images. |
wp_sizes_attribute_includes_valid_auto | Checks whether the given 'sizes' attribute includes the 'auto' keyword as the first item in the list. |
wp_underscore_playlist_templates | Outputs the templates used by playlists. |
wp_video_shortcode | Builds the Video shortcode output. |
_wp_add_additional_image_sizes | Adds additional default image sub-sizes. |
_wp_get_attachment_relative_path | Gets the attachment path relative to the upload directory. |
_wp_get_image_size_from_meta | Gets the image size as array from its meta data. |