Download the PHP package nickford/acf-swatch without Composer

On this page you can find all versions of the php package nickford/acf-swatch. 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 acf-swatch

ACF - Color Swatch field add-on

License: GPLv2 or later

Description

This is a simple ACF Add-on field allowing the creation of color swatches that behave as radio buttons. This is particularly useful if you want to limit the color options available to the end users, instead of using a color picker field.

This is an add-on for the Advanced Custom Fields WordPress plugin and will not provide any functionality to WordPress unless Advanced Custom Fields is installed and activated.

The color swatch field is a radio button field, with a few modifications. The syntax for building the choices is the same as a radio button field, in that you may include a key : value pair, or just a single value, each option separated by a line break.

The field expects each line to be a color string, and can interpret all of the possible color formats.

For example, all of the following will produce a bright red swatch:

Additionally, if you are using rgb/rgba or hsl/hsla, you may use only the values, if desired. For instance:

This may be useful for defining CSS linear-gradients, or other situations where you may want to alter some of the values in the view.

Note that while the field can recognize these shortened syntaxes to display the color swatch in the Wordpress back end, it will still output only what you entered when using the_field() or get_field().

Screenshots

Installation

Wordpress Plugin Store


https://wordpress.org/plugins/acf-color-swatches

Composer


If using Composer (e.g. with Bedrock)

Manual


Suggested Usage

Assuming you select a swatch with value "rgba(255,0,0, 1)":

As inline CSS:

Inside a <style> tag:

One situation where you might want to take advantage of the shorthand syntax would be to control a CSS linear-gradient that fades a color from 100% opacity to 0%.

Assuming you select a swatch with value "255,0,0":

Including Within Theme

Take advantage of the acf/swatch_settings/path and acf/swatch_settings/url filters to modify where acf-swatch is located so that js and css are found correctly in the backend.

Changelog

4/25/18 - v1.0.7

10/23/17 - v1.0.6

10/23/17 - v1.0.5

2/13/17 - v1.0.4

10/21/16 - v1.0.3-rc.1

10/7/16 - v1.0.3

5/19/16 - v1.0.3-alpha

11/9/15 - v1.0.2

10/14/15 - v1.0.1

9/20/15 - v1.0.0


All versions of acf-swatch with dependencies

PHP Build Version
Package Version
No informations.
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 nickford/acf-swatch contains the following files

Loading the files please wait ....