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 1751 to 1800 of 4125 functions (Page 36 of 83)
wp_html_split()

Separates HTML elements and comments from the text.

$input
get_html_split_regex()

Retrieves the regular expression for an HTML element.

_get_wptexturize_split_regex()

Retrieves the combined regular expression for HTML and shortcodes.

$shortcode_regex
_get_wptexturize_shortcode_regex()

Retrieves the regular expression for shortcodes.

$tagnames
wp_replace_in_html_tags()

Replaces characters or phrases within HTML elements only.

$haystack $replace_pairs
_autop_newline_preservation_helper()

Newline preservation help function for wpautop().

$matches
shortcode_unautop()

Don't auto-p wrap shortcodes that stand alone.

$text
seems_utf8()

Checks to see if a string is utf8 encoded.

$str
_wp_specialchars()

Converts a number of special characters into their HTML entities.

$text $quote_style $charset +1 more
wp_specialchars_decode()

Converts a number of HTML entities into their special characters.

$text $quote_style
wp_check_invalid_utf8()

Checks for invalid UTF8 in a string.

$text $strip
utf8_uri_encode()

Encodes the Unicode values to be used in the URI.

$utf8_string $length $encode_ascii_characters
remove_accents()

Converts all accent characters to ASCII characters.

$text $locale
sanitize_file_name()

Sanitizes a filename, replacing whitespace with dashes.

$filename
sanitize_user()

Sanitizes a username, stripping out unsafe characters.

$username $strict
sanitize_key()

Sanitizes a string key.

$key
sanitize_title()

Sanitizes a string into a slug, which can be used in URLs or HTML attributes.

$title $fallback_title $context
sanitize_title_for_query()

Sanitizes a title with the 'query' context.

$title
sanitize_title_with_dashes()

Sanitizes a title, replacing whitespace and a few other characters with dashes.

$title $raw_title $context
sanitize_sql_orderby()

Ensures a string is a valid SQL 'order by' clause.

$orderby
sanitize_html_class()

Sanitizes an HTML classname to ensure it only contains valid characters.

$classname $fallback
sanitize_locale_name()

Strips out all characters not allowed in a locale name.

$locale_name
convert_chars()

Converts lone & characters into `&` (a.k.a. `&`)

$content $deprecated
convert_invalid_entities()

Converts invalid Unicode references range to valid range.

$content
balanceTags()

Balances tags if forced to, or if the 'use_balanceTags' option is set to true.

$text $force
force_balance_tags()

Balances tags of string using a modified stack.

$text
format_to_edit()

Acts on text which is about to be edited.

$content $rich_text
zeroise()

Add leading zeros when necessary.

$number $threshold
backslashit()

Adds backslashes before letters and before a number at the start of a string.

$value
trailingslashit()

Appends a trailing slash.

$value
untrailingslashit()

Removes trailing forward slashes and backslashes if they exist.

$value
addslashes_gpc()

Adds slashes to a string or recursively adds slashes to strings within an array.

$gpc
stripslashes_deep()

Navigates through an array, object, or scalar, and removes slashes from the values.

$value
stripslashes_from_strings_only()

Callback function for `stripslashes_deep()` which strips slashes from strings.

$value
urlencode_deep()

Navigates through an array, object, or scalar, and encodes the values to be used in a URL.

$value
rawurlencode_deep()

Navigates through an array, object, or scalar, and raw-encodes the values to be used in a URL.

$value
urldecode_deep()

Navigates through an array, object, or scalar, and decodes URL-encoded values

$value
antispambot()

Converts email addresses characters to HTML entities to block spam bots.

$email_address $hex_encoding
_make_url_clickable_cb()

Callback to convert URI match to HTML A element.

$matches
_make_web_ftp_clickable_cb()

Callback to convert URL match to HTML A element.

$matches
_make_email_clickable_cb()

Callback to convert email address match to HTML A element.

$matches
_make_clickable_rel_attr()

Helper function used to build the "rel" attribute for a URL when creating an anchor using make_clickable().

$url
make_clickable()

Converts plaintext URI to HTML links.

$text
_split_str_by_whitespace()

Breaks a string into chunks by splitting at whitespace characters.

$text $goal
wp_rel_callback()

Callback to add a rel attribute to HTML A element.

$matches $rel
wp_rel_nofollow()

Adds `rel="nofollow"` string to all HTML A elements in content.

$text
wp_rel_nofollow_callback()

Callback to add `rel="nofollow"` string to HTML A element.

$matches
wp_rel_ugc()

Adds `rel="nofollow ugc"` string to all HTML A elements in content.

$text
wp_targeted_link_rel()

Adds `rel="noopener"` to all HTML A elements that have a target.

$text
wp_targeted_link_rel_callback()

Callback to add `rel="noopener"` string to HTML A element.

$matches