Helper Functions (category)
__return_empty_array() | Simply returns an empty array: array(). Helper function of WordPress. |
__return_empty_string() | Simply returns an empty string:". Helper function of WordPress. |
__return_false() | Simply returns false. Helper function of WordPress. |
__return_null() | Simply returns null. Auxiliary function of WordPress. |
__return_true() | Simply returns true. Helper function of WordPress. |
__return_zero() | Simply returns 0. Helper function of WordPress. Useful for use in filters. |
array_key_first() | Get the first key of the given array without affecting the internal array pointer. |
array_key_last() | Get the last key of the given array without affecting the internal array pointer. |
block_core_social_link_services() | Returns the SVG for social link. |
build_query() | Build URL query based on an associative and, or indexed array. |
get_page_hierarchy() | Order the pages with children under parents in a flat list. |
get_self_link() | Returns the link for the currently displayed feed. |
human_readable_duration() | Convert a duration in format HH:ii:ss or ii:ss to human readable format. |
map_deep() | Applies the specified function to the values of the passed array/object/string/number. It's a recursive function. |
maybe_serialize() | Serialize data, if needed. |
maybe_unserialize() | Unserialize data only if it was serialized or returns the original value. |
path_join() | Join two filesystem paths together. If the second parameter is an absolute path (starts with a slash), then only it will be returned. |
str_contains() | Performs a case-sensitive check indicating if needle is contained in haystack. |
str_ends_with() | Performs a case-sensitive check indicating if the haystack ends with needle. |
str_starts_with() | Performs a case-sensitive check indicating if the haystack begins with needle. |
stripslashes_deep() | Navigates through an array, object, or scalar, and removes slashes from the values. |
timer_float() | Get the time elapsed so far during this PHP script. |
timer_stop() | Retrieve or display the time from the page start to when function is called. |
urlencode_deep() | Navigates through an array, object, or scalar, and encodes the values to be used in a URL. |
wp_array_slice_assoc() | Extract a slice of an array, given a list of keys. |
wp_basename() | i18n friendly version of basename() |
wp_debug_backtrace_summary() | Return a comma-separated string of functions that have been called to get to the current point in code. |
wp_extract_urls() | Use RegEx to extract URLs from arbitrary content. |
wp_filter_object_list() | Filters a list of objects, based on a set of key => value arguments. |
wp_get_list_item_separator() | Retrieves the list item separator based on the locale. |
wp_html_split() | Separate HTML elements and comments from the text. |
wp_is_jsonp_request() | Checks whether current request is a JSONP request, or is expecting a JSONP response. |
wp_json_encode() | Encode a variable into JSON, with some sanity checks. Checks strings and translates them to UTF-8. |
wp_json_file_decode() | Reads and decodes a JSON file. |
wp_kses_array_lc() | Translates all keys of the specified array to lowercase (ABC to abc). Keys of nested arrays are also processed. |
wp_kses_hair() | Builds an attribute list from string containing attributes. |
wp_kses_uri_attributes() | Helper function listing HTML attributes containing a URL. |
wp_list_filter() | Filters a list of objects, based on a set of key => value arguments. |
wp_list_pluck() | Pluck a certain field out of each object in a list. |
wp_list_sort() | Sorts a list of objects, based on one or more orderby arguments. |
wp_make_link_relative() | Convert full URL paths to absolute paths. |
wp_normalize_path() | Normalize a filesystem path. |
wp_parse_args() | Merge user defined arguments into defaults array. |
wp_parse_id_list() | Clean up an array, comma- or space-separated list of IDs. |
wp_parse_list() | Cleans up an array, comma- or space-separated list of scalar values. |
wp_parse_slug_list() | Clean up an array, comma- or space-separated list of slugs. |
wp_parse_str() | Parses a string into variables to be stored in an array. |
wp_parse_url() | Parses a URL and returns its components. A wrapper for PHP's parse_url() function that handles consistency in the return values across PHP versions. |
wp_rand() | Generates a random number between the specified min and max. |
wp_recursive_ksort() | Sorts the keys of an array alphabetically. The array is passed by reference so it doesn't get returned which mimics the behaviour of ksort. |
wp_reset_vars() | Resets global variables based on $_GET and $_POST |
wp_send_json() | Encodes the passed variable into JSON, prints the result to the screen and terminates the script (die). Used to return data for AJAX requests. |
wp_send_json_error() | Send a JSON response back to an Ajax request, indicating failure. |
wp_send_json_success() | Returns JSON data. Is used to return a success response to AJAX request. The response object always contains the element |
wp_slash() | Add slashes ( |
wp_spaces_regexp() | Returns the regexp for common whitespace characters. |
wp_sprintf() | WordPress implementation of PHP sprintf() with filters. |
wp_tempnam() | Returns a filename of a Temporary unique file. Please note that the calling function must unlink() this itself. |
wp_unique_id() | Gets unique ID. |
wp_unslash() | Removes slashes from a string or from strings of an array, or properties of an object. The array can be of any nesting level. |