Skip to content
Docs
Get RestroPress

Filter

rpress_button_styles

Updated
On this page

Filters the available button styles.

Runs in rpress_get_button_styles(). The value is an associative array of style slug to label. Defaults are th-rectangle, th-rounded, th-border-radius and th-plain.

Parameters#

ParameterTypeDescription
$stylesarrayButton styles keyed by slug.

Return value#

array. Button styles.

Example#

function my_button_styles( $styles ) {
	$styles['th-outline'] = __( 'Outline', 'my-plugin' );
	return $styles;
}
add_filter( 'rpress_button_styles', 'my_button_styles' );

Source#

Applied in:

  • includes/template-functions.php (line 507), in rpress_get_button_styles()

See also#

Was this page helpful?