WPDev.one
Core PHP Functions

Functions Reference

4125+ PHP functions available in the WordPress global namespace. Complete documentation with parameters, return values, and usage examples.

Showing 3601 to 3650 of 4125 functions (Page 73 of 83)
wp_get_attachment_image_url()

Gets the URL of an image attachment.

$attachment_id $size $icon
_wp_get_attachment_relative_path()

Gets the attachment path relative to the upload directory.

$file
_wp_get_image_size_from_meta()

Gets the image size as array from its meta data.

$size_name $image_meta
wp_get_attachment_image_srcset()

Retrieves the value for an image attachment's 'srcset' attribute.

$attachment_id $size $image_meta
wp_calculate_image_srcset()

A helper function to calculate the image sources to include in a 'srcset' attribute.

$size_array $image_src $image_meta +1 more
wp_get_attachment_image_sizes()

Retrieves the value for an image attachment's 'sizes' attribute.

$attachment_id $size $image_meta
wp_calculate_image_sizes()

Creates a 'sizes' attribute value for an image.

$size $image_src $image_meta +1 more
wp_image_file_matches_image_meta()

Determines if the image meta data is for the image source file.

$image_location $image_meta $attachment_id
wp_image_src_get_dimensions()

Determines an image's width and height dimensions based on the source file.

$image_src $image_meta $attachment_id
wp_image_add_srcset_and_sizes()

Adds 'srcset' and 'sizes' attributes to an existing 'img' element.

$image $image_meta $attachment_id
wp_lazy_loading_enabled()

Determines whether to add the `loading` attribute to the specified tag in the specified context.

$tag_name $context
wp_filter_content_tags()

Filters specific tags in post content and modifies their markup.

$content $context
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.

$image
wp_sizes_attribute_includes_valid_auto()

Checks whether the given 'sizes' attribute includes the 'auto' keyword as the first item in the list.

$sizes_attr
wp_print_auto_sizes_contain_css_fix()

Prints a CSS rule to fix potential visual issues with images using `sizes=auto`.

wp_img_tag_add_loading_optimization_attrs()

Adds optimization attributes to an `img` HTML tag.

$image $context
wp_img_tag_add_width_and_height_attr()

Adds `width` and `height` attributes to an `img` HTML tag.

$image $context $attachment_id
wp_img_tag_add_srcset_and_sizes_attr()

Adds `srcset` and `sizes` attributes to an existing `img` HTML tag.

$image $context $attachment_id
wp_iframe_tag_add_loading_attr()

Adds `loading` attribute to an `iframe` HTML tag.

$iframe $context
_wp_post_thumbnail_class_filter()

Adds a 'wp-post-image' class to post thumbnails. Internal use only.

$attr
_wp_post_thumbnail_class_filter_add()

Adds '_wp_post_thumbnail_class_filter' callback to the 'wp_get_attachment_image_attributes'

$attr
_wp_post_thumbnail_class_filter_remove()

Removes the '_wp_post_thumbnail_class_filter' callback from the 'wp_get_attachment_image_attributes'

$attr
_wp_post_thumbnail_context_filter()

Overrides the context used in {@see wp_get_attachment_image()}. Internal use only.

$context
_wp_post_thumbnail_context_filter_add()

Adds the '_wp_post_thumbnail_context_filter' callback to the 'wp_get_attachment_image_context'

_wp_post_thumbnail_context_filter_remove()

Removes the '_wp_post_thumbnail_context_filter' callback from the 'wp_get_attachment_image_context'

img_caption_shortcode()

Builds the Caption shortcode output.

$attr $content
gallery_shortcode()

Builds the Gallery shortcode output.

$attr
wp_underscore_playlist_templates()

Outputs the templates used by playlists.

wp_playlist_scripts()

Outputs and enqueues default scripts and styles for playlists.

$type
wp_playlist_shortcode()

Builds the Playlist shortcode output.

$attr
wp_mediaelement_fallback()

Provides a No-JS Flash fallback as a last resort for audio / video.

$url
wp_get_audio_extensions()

Returns a filtered list of supported audio formats.

wp_get_attachment_id3_keys()

Returns useful keys to use to lookup data from an attachment's stored metadata.

$attachment $context
wp_audio_shortcode()

Builds the Audio shortcode output.

$attr $content
wp_get_video_extensions()

Returns a filtered list of supported video formats.

wp_video_shortcode()

Builds the Video shortcode output.

$attr $content
get_previous_image_link()

Gets the previous image link that has the same post parent.

$size $text
previous_image_link()

Displays previous image link that has the same post parent.

$size $text
get_next_image_link()

Gets the next image link that has the same post parent.

$size $text
next_image_link()

Displays next image link that has the same post parent.

$size $text
get_adjacent_image_link()

Gets the next or previous image link that has the same post parent.

$prev $size $text
adjacent_image_link()

Displays next or previous image link that has the same post parent.

$prev $size $text
get_attachment_taxonomies()

Retrieves taxonomies attached to given the attachment.

$attachment $output
get_taxonomies_for_attachments()

Retrieves all of the taxonomies that are registered for attachments.

$output
is_gd_image()

Determines whether the value is an acceptable type for GD image functions.

$image
wp_imagecreatetruecolor()

Creates a new GD image resource with transparency support.

$width $height
wp_expand_dimensions()

Based on a supplied width/height example, returns the biggest possible dimensions based on the max width/height.

$example_width $example_height $max_width +1 more
wp_max_upload_size()

Determines the maximum upload size allowed in php.ini.

wp_get_image_editor()

Returns a WP_Image_Editor instance and loads file into it.

$path $args
wp_image_editor_supports()

Tests whether there is an editor that supports a given mime type or methods.

$args