Download the PHP package zeek/wp-utils without Composer

On this page you can find all versions of the php package zeek/wp-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-utils

WordPress Utils

Build Status Codacy Badge Codacy Badge

Utility functions that make life just a little bit easier.

Database

db_transaction( $callable, $args = [] )

Run the given callback within a database transaction, rolling back the transaction if an error occurs.

get_raw_option_value( $key )

Performs a very direct, simple query to the WordPress Options table that bypasses normal WP caching.

get_id_from_slug( $slug, $post_type = 'post', $force = false )

Performs a lookup for a post given a slug.

get_meta_key_from_meta_value()

Perform a reverse lookup for a meta key based on a meta value.

ACF

get_acf_meta_value_by_acf_key()

Use this when you know an ACF field key and a post ID, but the field is within a group.

is_acf_loadable() (Deprecated)

Check to see if ACF is loadable and if ACF_LITE is true.

Users

generate_unique_username( $username )

Appends a counter to the given username which is incremented until there is no user with that username.

Misc

get_current_url()

Returns the current URL.

get_current_url_clean()

Returns the current URL, but without query args.

get_user_display_name( $user_id )

Easily get the user display name by the user ID.

get_env_value( $key, $filter = null )

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

add_inline_svg()

Checks if SVG file exists before grabbing its contents

get_current_datetime()

Gets a DateTime object set to WordPress's local timezone

get_site_timezone()

Get a DateTimeZone object that is set to the site's local timezone.

init_term( $slug, $taxonomy )

Checks for and returns a term by the slug. Initializes the term if it does not yet exist.

Behaviors / Filters

These must be initiated by creating the \Zeek\WP_Util\Behaviors() class.

file_mod_allowed

By default, disable file modifications (plugin adding, deleting, theme file editing, etc). Override with an env constant: FILE_MOD_ALLOWED.


All versions of wp-utils with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
arrilot/dotenv-php Version ^1.0
a7/autoload Version ^2
zeek/php-utils Version ^2
zeek/wp-sentry Version ^1.2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zeek/wp-utils contains the following files

Loading the files please wait ....