Filter
rpress_storefront_rail_title
On this page
Filters the heading of a storefront rail.
Core headings are Popular, Order again and Deals; a rail key without a core heading starts as an empty string. The heading is escaped when printed.
Available since RestroPress 3.5.1.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$title | string | Heading text. |
$rail | string | Rail key. |
Return value#
string. Heading text.
Example#
add_filter( 'rpress_storefront_rail_title', 'my_rail_title', 10, 2 );
function my_rail_title( $title, $rail ) {
return 'popular' === $rail ? __( 'Customer favourites', 'my-plugin' ) : $title;
}
Source#
Applied in:
includes/features/storefront-layout/functions.php(line 441), inrpress_storefront_rail_title()
See also#
Was this page helpful?
