Skip to content
Docs
Get RestroPress

Filter

rpress_add_button_styles

Updated
On this page

Filters the available add button styles.

Runs in rpress_get_add_button_styles(). The value maps a style slug to a label; the defaults are circle, rounded and rectangle. These are the options for the add_button_style setting used on menu item add buttons.

Parameters#

ParameterTypeDescription
$stylesarrayAdd button styles keyed by slug.

Return value#

array. Add button styles.

Example#

function my_add_button_styles( $styles ) {
	$styles['pill'] = __( 'Pill', 'my-plugin' );
	return $styles;
}
add_filter( 'rpress_add_button_styles', 'my_add_button_styles' );

Source#

Applied in:

  • includes/template-functions.php (line 525), in rpress_get_add_button_styles()

See also#

Was this page helpful?