Utility functions that make life just a little bit easier.
Run the given callback within a database transaction, rolling back the transaction if an error occurs.
Performs a very direct, simple query to the WordPress Options table that bypasses normal WP caching.
Performs a lookup for a post given a slug.
Perform a reverse lookup for a meta key based on a meta value.
Use this when you know an ACF field key and a post ID, but the field is within a group.
Check to see if ACF is loadable and if ACF_LITE is true.
Appends a counter to the given username which is incremented until there is no user with that username.
Returns the current URL.
Returns the current URL, but without query args.
Easily get the user display name by the user ID.
Helper function to check for an environmental variable in a variety of places: $_ENV (for setting via .env.php files), Constant (for setting via a define() call), Filter, utilizing a passed in filter
remove_filters_for_anonymous_class( $hook_name = '', $class_name = '', $method_name = '', $priority = 10 )
Remove a filter/action from an anonymous class
Checks if SVG file exists before grabbing its contents
Gets a DateTime object set to WordPress's local timezone
Get a DateTimeZone object that is set to the site's local timezone.
Checks for and returns a term by the slug. Initializes the term if it does not yet exist.
These must be initiated by creating the \Zeek\WP_Util\Behaviors()
class.
By default, disable file modifications (plugin adding, deleting, theme file editing, etc). Override with an env
constant: FILE_MOD_ALLOWED
.