guideplugin/button/label
Customize the labels of guide navigation buttons
guideplugin/button/label
Definition
With this filter you can edit the labels of the buttons in your guides.
This filter provides three separate hooks for different button types: previous, next, and finish buttons.
Parameters
Hook | Parameters | Description |
---|---|---|
guideplugin/button/label/previous | $label , $filter_id | Customize the "Previous" button label |
guideplugin/button/label/next | $label , $filter_id | Customize the "Next" button label |
guideplugin/button/label/finish | $label , $filter_id | Customize the "Finish" button label |
Parameter Details
$label
(string) - Label des Buttons$filter_id
(int) - Die ID des Filters
Example
The example shows you how to customize the label for the Next button:
<?php
function my_guide_button_label_next($label, $filter_id) {
// The filter you want to modify
if ($filter_id == 24) {
$label = __('Next Step', 'textdomain').'<i class="fa fa-chevron-right"></i>';
}
return $label;
}
add_filter('guideplugin/button/label/next', 'my_guide_button_label_next', 10, 2);
Usage Scenarios
Localization
Translate button labels for different languages
Custom Styling
Add HTML elements like icons to buttons
Context-Specific
Use different labels based on filter ID