frozzare/papi-property-color

Color picker property for Papi

v1.0.0 2015-01-05 14:42 UTC

This package is auto-updated.

Last update: 2024-04-26 00:42:53 UTC


README

Do not use this anymore. It exists in Papi core.

Color picker property for Papi that use the Color Picker API in WordPress. Will not work for WordPress versions lower then 3.5, read more about the color picker here.

Settings

WordPress color picker support custom palettes so you can change them with the palettes option. Read more about palettes here.

Example property with palettes setting:

$this->property([
  'type'        => 'color',
  'title'       => 'Background color',
  'slug'        => 'background_color',
  'settings'    => [
    'palettes' => ['#000', '#fff', '#000fff']
  ]
])

Installation

This property requires Papi plugin.

If you're using Composer to manage WordPress, add Papi to your project's dependencies. Run:

composer require frozzare/papi-property-color

License

MIT © Fredrik Forsmo