Description
With this filter you can add custom links to the user widget.
Return
(array) A multi-dimensional array with keys link and label
Usage
function b3_widget_links_example( $links ) {
$new_links = [
[
'link' => 'https://your-link.com',
'label' => 'Your Label',
],
];
if ( is_array( $links ) && ! empty( $links ) ) {
$links = array_merge( $links, $new_links );
} else {
$links = $new_links;
}
return $links;
}
add_filter( 'b3_widget_links', 'b3_widget_links_example' );
Used in
- includes/class-b3-sidebar-widget.php - line 36