gdpol_poll_color_palette

Polls use a predefined list of colours to display poll choices results. List of colours is controlled can be controlled using the filter ‘gdpol_poll_color_palette‘. This filter returns a plain array of hexadecimal colours.

This filter provides 1 argument.

Arguments

  • $colors: array with a hexadecimal list of colours.

You can return any number of colours you want. Default list has 13 colours.

Example

add_filter('gdpol_poll_color_palette', 'custom__poll_color_palette');
function custom__poll_color_palette($colors) {
  $colors = array(
    '#8e44ad', '#2c3e50', '#d35400', '#16a085'
  );
  return $colors;
}
0
0
36
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply