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 1801 to 1850 of 4125 functions (Page 37 of 83)
wp_init_targeted_link_rel_filters()

Adds all filters modifying the rel attribute of targeted links.

wp_remove_targeted_link_rel_filters()

Removes all filters modifying the rel attribute of targeted links.

translate_smiley()

Converts one smiley code to the icon graphic file equivalent.

$matches
convert_smilies()

Converts text equivalent of smilies to images.

$text
is_email()

Verifies that an email is valid.

$email $deprecated
wp_iso_descrambler()

Converts to ASCII from email subjects.

$subject
_wp_iso_convert()

Helper function to convert hex encoded chars to ASCII.

$matches
get_gmt_from_date()

Given a date in the timezone of the site, returns that date in UTC.

$date_string $format
get_date_from_gmt()

Given a date in UTC or GMT timezone, returns that date in the timezone of the site.

$date_string $format
iso8601_timezone_to_offset()

Given an ISO 8601 timezone, returns its UTC offset in seconds.

$timezone
iso8601_to_datetime()

Given an ISO 8601 (Ymd\TH:i:sO) date, returns a MySQL DateTime (Y-m-d H:i:s) format used by post_date[_gmt].

$date_string $timezone
sanitize_email()

Strips out all characters that are not allowable in an email.

$email
human_time_diff()

Determines the difference between two timestamps.

$from $to
wp_trim_excerpt()

Generates an excerpt from the content, if needed.

$text $post
wp_trim_words()

Trims text to a certain number of words.

$text $num_words $more
ent2ncr()

Converts named entities into numbered entities.

$text
format_for_editor()

Formats text for the editor.

$text $default_editor
_deep_replace()

Performs a deep string replace operation to ensure the values in $search are no longer present.

$search $subject
esc_sql()

Escapes data for use in a MySQL query.

$data
esc_url()

Checks and cleans a URL.

$url $protocols $_context
esc_url_raw()

Sanitizes a URL for database or redirect usage.

$url $protocols
sanitize_url()

Sanitizes a URL for database or redirect usage.

$url $protocols
htmlentities2()

Converts entities, while preserving already-encoded entities.

$text
esc_js()

Escapes single quotes, `"`, `<`, `>`, `&`, and fixes line endings.

$text
esc_html()

Escaping for HTML blocks.

$text
esc_attr()

Escaping for HTML attributes.

$text
esc_textarea()

Escaping for textarea values.

$text
esc_xml()

Escaping for XML blocks.

$text
tag_escape()

Escapes an HTML tag name.

$tag_name
wp_make_link_relative()

Converts full URL paths to absolute paths.

$link
sanitize_option()

Sanitizes various option values based on the nature of the option.

$option $value
map_deep()

Maps a function to all non-iterable elements of an array or an object.

$value $callback
wp_parse_str()

Parses a string into variables to be stored in an array.

$input_string $result
wp_pre_kses_less_than()

Converts lone less than signs.

$content
wp_pre_kses_less_than_callback()

Callback function used by preg_replace.

$matches
wp_pre_kses_block_attributes()

Removes non-allowable HTML from parsed block attribute values when filtering

$content $allowed_html $allowed_protocols
wp_sprintf()

WordPress' implementation of PHP sprintf() with filters.

$pattern $args
wp_sprintf_l()

Localizes list items before the rest of the content.

$pattern $args
wp_html_excerpt()

Safely extracts not more than the first $count characters from HTML string.

$str $count $more
links_add_base_url()

Adds a base URL to relative links in passed content.

$content $base $attrs
_links_add_base()

Callback to add a base URL to relative links in passed content.

$m
links_add_target()

Adds a target attribute to all links in passed content.

$content $target $tags
_links_add_target()

Callback to add a target attribute to all links in passed content.

$m
normalize_whitespace()

Normalizes EOL characters and strips duplicate whitespace.

$str
wp_strip_all_tags()

Properly strips all HTML tags including 'script' and 'style'.

$text $remove_breaks
sanitize_text_field()

Sanitizes a string from user input or from the database.

$str
sanitize_textarea_field()

Sanitizes a multiline string from user input or from the database.

$str
_sanitize_text_fields()

Internal helper function to sanitize a string from user input or from the database.

$str $keep_newlines
wp_basename()

i18n-friendly version of basename().

$path $suffix
capital_P_dangit()

Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).

$text