WordPress at a glance
Главная Functions Other Functions Helper Functions

Helper Functions (рубрика)

__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.

get_page_hierarchy()

Order the pages with children under parents in a flat list.

get_temp_dir()

Determine a writable directory for temporary files.

is_email()

Verifies that an email is valid.

is_serialized()

Check value to find if it was serialized.

is_serialized_string()

Check whether serialized data is of string type.

map_deep()

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

maybe_serialize()

Serialize data, if needed.

maybe_unserialize()

Unserialize value only if it was serialized.

path_join()

Join two filesystem paths together.

seems_utf8()

Checks to see if a string is utf8 encoded.

stripslashes_deep()

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

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_doing_ajax()

Determines whether the current request is a WordPress Ajax request.

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_generate_uuid4()

Generate a random UUID (version 4).

wp_is_numeric_array()

Determines if the variable is a numeric-indexed array.

wp_is_uuid()

Validates that a UUID is valid.

wp_json_encode()

Encode a variable into JSON, with some sanity checks. Checks strings and translates them to UTF-8.

wp_kses_array_lc()

Goes through an array and changes the keys to all lower case.

wp_kses_hair()

Builds an attribute list from string containing attributes.

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_mkdir_p()

Recursive directory creation based on full path.

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_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_rand()

Generates a random number between the specified min and max.

wp_reset_vars()

Resets global variables based on $_GET and $_POST

wp_send_json()

Send a JSON response back to an Ajax request.

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 success=true. die() php execution.

wp_slash()

Add slashes to a string or array of strings.

wp_spaces_regexp()

Returns the regexp for common whitespace characters.

wp_tempnam()

Returns a filename of a Temporary unique file. Please note that the calling function must unlink() this itself.

wp_unslash()

Remove slashes from a string or array of strings.

wp_validate_boolean()

Filter/validate a variable as a boolean.