Filter
rpress_discount_labels
On this page
Filters the labels of the discount (rpress_discount) post type.
Runs when the post types are registered on init, before register_post_type() for 'rpress_discount'. The array holds the standard post type label keys such as 'name', 'singular_name', 'add_new_item' and 'menu_name'.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$discount_labels | array | Label key => translated string. |
Return value#
array. The labels array.
Example#
add_filter( 'rpress_discount_labels', 'my_discount_labels', 10, 1 );
function my_discount_labels( $discount_labels ) {
$discount_labels['menu_name'] = __( 'Promo Codes', 'my-plugin' );
return $discount_labels;
}
Source#
Applied in:
includes/post-types.php(line 108), inrpress_setup_rpress_post_types()
See also#
Was this page helpful?
