Returns true if the value provided is considered "empty". Allows numbers such as 0.
- @date 6/7/16
- @since ACF 5.4.0
- @param mixed $var The value to check.
- @return boolean
Returns true if the value provided is considered "not empty". Allows numbers such as 0.
- @date 15/7/19
- @since ACF 5.8.1
- @param mixed $var The value to check.
- @return boolean
Returns a unique numeric based id.
- @date 9/1/19
- @since ACF 5.7.10
- @param string $prefix The id prefix. Defaults to 'acf'.
- @return string
Merges together two arrays but with extra functionality to append class names.
- @date 22/1/19
- @since ACF 5.7.10
- @param array $array1 An array of attributes.
- @param array $array2 An array of attributes.
- @return array
acf_cache_key
- Returns a filtered cache key.
- @date 25/1/19
- @since ACF 5.7.11
- @param string $key The cache key.
- @return string
acf_request_args
- Returns an array of $_REQUEST values using the provided defaults.
- @date 28/2/19
- @since ACF 5.7.13
- @param array $args An array of args.
- @return array
Returns a single $_REQUEST arg with fallback.
- @date 23/10/20
- @since ACF 5.9.2
- @param string $key The property name.
- @param mixed $default The default value to fallback to.
- @return mixed
acf_enable_filter
- Enables a filter with the given name.
- @date 14/7/16
- @since ACF 5.4.0
- @param string $name The modifier name.
- @return void
acf_disable_filter
- Disables a filter with the given name.
- @date 14/7/16
- @since ACF 5.4.0
- @param string $name The modifier name.
- @return void
acf_is_filter_enabled
- Returns the state of a filter for the given name.
- @date 14/7/16
- @since ACF 5.4.0
- @param string $name The modifier name.
- @return array
acf_get_filters
- Returns an array of filters in their current state.
- @date 14/7/16
- @since ACF 5.4.0
- @return array
acf_set_filters
- Sets an array of filter states.
- @date 14/7/16
- @since ACF 5.4.0
- @param array $filters An Array of modifiers.
- @return array
acf_disable_filters
- Disables all filters and returns the previous state.
- @date 14/7/16
- @since ACF 5.4.0
- @return array
acf_enable_filters
- Enables all or an array of specific filters and returns the previous state.
- @date 14/7/16
- @since ACF 5.4.0
- @param array $filters An Array of modifiers.
- @return array
acf_idval
- Parses the provided value for an ID.
- @date 29/3/19
- @since ACF 5.7.14
- @param mixed $value A value to parse.
- @return integer
acf_maybe_idval
- Checks value for potential id value.
- @date 6/4/19
- @since ACF 5.7.14
- @param mixed $value A value to parse.
- @return mixed
Convert any numeric strings into their equivalent numeric type. This function will work with both single values and arrays.
- @param mixed $value Either a single value or an array of values.
- @return mixed
acf_numval
- Casts the provided value as eiter an int or float using a simple hack.
- @date 11/4/19
- @since ACF 5.7.14
- @param mixed $value A value to parse.
- @return (int|float)
acf_idify
- Returns an id attribute friendly string.
- @date 24/12/17
- @since ACF 5.6.5
- @param string $str The string to convert.
- @return string
Returns a slug friendly string.
- @date 24/12/17
- @since ACF 5.6.5
- @param string $str The string to convert.
- @param string $glue The glue between each slug piece.
- @return string
Returns a string with correct full stop punctuation.
- @date 12/7/19
- @since ACF 5.8.2
- @param string $str The string to format.
- @return string
acf_did
- Returns true if ACF already did an event.
- @date 30/8/19
- @since ACF 5.8.1
- @param string $name The name of the event.
- @return boolean
Returns the length of a string that has been submitted via $_POST.
- Uses the following process:
- Unslash the string because posted values will be slashed.
- Decode special characters because wp_kses() will normalize entities.
- Treat line-breaks as a single character instead of two.
- Use mb_strlen() to accommodate special characters.
- @date 04/06/2020
- @since ACF 5.9.0
- @param string $str The string to review.
- @return integer
Returns a value with default fallback.
- @date 6/4/20
- @since ACF 5.9.0
- @param mixed $value The value.
- @param mixed $default_value The default value.
- @return mixed
Returns the current priority of a running action.
- @date 14/07/2020
- @since ACF 5.9.0
- @param string $action The action name.
- @return integer|boolean
Returns the current URL.
- @date 23/01/2015
- @since ACF 5.1.5
- @return string
Sanitizes request arguments.
- @param mixed $args The data to sanitize.
- @return array|boolean|float|integer|mixed|string
Sanitizes file upload arrays.
- @since ACF 6.0.4
- @param array $args The file array.
- @return array
Sanitizes file upload values within the array.
- This addresses nested file fields within repeaters and groups.
- @since ACF 6.0.5
- @param array $array The file upload array.
- @param string $sanitize_function Callback used to sanitize array value.
- @return array
Maybe unserialize, but don't allow any classes.
- @since ACF 6.1
- @param string $data String to be unserialized, if serialized.
- @return mixed The unserialized, or original data.
Check if ACF is a beta-like release.
- @since ACF 6.3
- @return boolean True if the current install version contains a dash, indicating a alpha, beta or RC release.
Returns the version of ACF when it was first activated. However, if ACF was first activated prior to the introduction of the acf_first_activated_version option, this function returns false (boolean) to indicate that the version could not be determined.
- @since ACF 6.3
- @return string|boolean The (string) version of ACF when it was first activated, or false (boolean) if the version could not be determined.