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 3551 to 3600 of 4125 functions (Page 72 of 83)
switch_to_locale()

Switches the translations according to the given locale.

$locale
switch_to_user_locale()

Switches the translations according to the given user's locale.

$user_id
restore_previous_locale()

Restores the translations according to the previous locale.

restore_current_locale()

Restores the translations according to the original locale.

is_locale_switched()

Determines whether switch_to_locale() is in effect.

translate_settings_using_i18n_schema()

Translates the provided settings value using its i18n schema.

$i18n_schema $settings $textdomain
wp_get_list_item_separator()

Retrieves the list item separator based on the locale.

wp_get_word_count_type()

Retrieves the word count type based on the locale.

has_translation()

Returns a boolean to indicate whether a translation exists for a given string with optional text domain and locale.

$singular $textdomain $locale
get_query_template()

Retrieves path to a template.

$type $templates
get_index_template()

Retrieves path of index template in current or parent template.

get_404_template()

Retrieves path of 404 template in current or parent template.

get_archive_template()

Retrieves path of archive template in current or parent template.

get_post_type_archive_template()

Retrieves path of post type archive template in current or parent template.

get_author_template()

Retrieves path of author template in current or parent template.

get_category_template()

Retrieves path of category template in current or parent template.

get_tag_template()

Retrieves path of tag template in current or parent template.

get_taxonomy_template()

Retrieves path of custom taxonomy term template in current or parent template.

get_date_template()

Retrieves path of date template in current or parent template.

get_home_template()

Retrieves path of home template in current or parent template.

get_front_page_template()

Retrieves path of front page template in current or parent template.

get_privacy_policy_template()

Retrieves path of Privacy Policy page template in current or parent template.

get_page_template()

Retrieves path of page template in current or parent template.

get_search_template()

Retrieves path of search template in current or parent template.

get_single_template()

Retrieves path of single template in current or parent template. Applies to single Posts,

get_embed_template()

Retrieves an embed template path in the current or parent template.

get_singular_template()

Retrieves the path of the singular template in current or parent template.

get_attachment_template()

Retrieves path of attachment template in current or parent template.

wp_set_template_globals()

Set up the globals used for template loading.

locate_template()

Retrieves the name of the highest priority template file that exists.

$template_names $load $load_once +1 more
load_template()

Requires the template file with WordPress environment.

$_template_file $load_once $args
readonly()

Outputs the HTML readonly attribute.

$readonly_value $current $display
wp_get_additional_image_sizes()

Retrieves additional image sizes.

image_constrain_size_for_editor()

Scales down the default size of an image.

$width $height $size +1 more
image_hwstring()

Retrieves width and height attributes using given width and height values.

$width $height
image_downsize()

Scales an image to fit a particular size (such as 'thumb' or 'medium').

$id $size
add_image_size()

Registers a new image size.

$name $width $height +1 more
has_image_size()

Checks if an image size exists.

$name
remove_image_size()

Removes a new image size.

$name
set_post_thumbnail_size()

Registers an image size for the post thumbnail.

$width $height $crop
get_image_tag()

Gets an img tag for an image attachment, scaling it down if requested.

$id $alt $title +2 more
wp_constrain_dimensions()

Calculates the new dimensions for a down-sampled image.

$current_width $current_height $max_width +1 more
image_resize_dimensions()

Retrieves calculated resize dimensions for use in WP_Image_Editor.

$orig_w $orig_h $dest_w +2 more
image_make_intermediate_size()

Resizes an image to make a thumbnail or intermediate size.

$file $width $height +1 more
wp_image_matches_ratio()

Helper function to test if aspect ratios for two images match.

$source_width $source_height $target_width +1 more
image_get_intermediate_size()

Retrieves the image's intermediate size (resized) path, width, and height.

$post_id $size
get_intermediate_image_sizes()

Gets the available intermediate image size names.

wp_get_registered_image_subsizes()

Returns a normalized list of all currently registered image sub-sizes.

wp_get_attachment_image_src()

Retrieves an image to represent an attachment.

$attachment_id $size $icon
wp_get_attachment_image()

Gets an HTML img element representing an image attachment.

$attachment_id $size $icon +1 more