frozzare/papi-property-color

Color picker property for Papi


Keywords
wordpress
License
MIT

Documentation

Property Color

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