Filter
rpress_button_colors
On this page
Filters the available button colors.
Runs in rpress_get_button_colors(). The value is an associative array keyed by color slug, with each entry holding a label and a hex value. The inherit entry has an empty hex.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$colors | array | Button colors keyed by slug, each with label and hex. |
Return value#
array. Button colors.
Example#
function my_button_colors( $colors ) {
$colors['brand'] = array(
'label' => __( 'Brand red', 'my-plugin' ),
'hex' => '#c0392b',
);
return $colors;
}
add_filter( 'rpress_button_colors', 'my_button_colors' );
Source#
Applied in:
includes/template-functions.php(line 489), inrpress_get_button_colors()
See also#
Was this page helpful?
