Description
This filter hook allows you to change the text that is displayed for the Terms of Service (TOS) link.
Parameters
$text
(string) (required) The text that is displayed for the Terms of Service link.
$tag
(string) (optional) Indicates the form that is being displayed (new|edit).
Usage
add_filter( 'wpmem_tos_link_txt', 'my_function' ); function my_function( $text ) { $text = 'Check to comply with the %s Terms of Service %s'; return $text; }
Notes
The link is applied to the text with the php function sprintf() which is a function to return a formatted string. Use the conversion specification “%s” to indicate the beginning and end of the link. For example, in the string “be sure to read %s the tos %s”, “the tos” would be the actual hyperlink.
The plugin does not ordinarily show this field to the user in their profile update view unless they have not been recorded as having checked the box. You don’t need to specify a “$tag” parameter in your filter unless you want to show different text in the profile view (“edit”) than a new registration (“new”) such as a situation where you might want it to say something like “Our terms have changed, please update.”
Changelog
- Introduced in version 2.7.5
- Added $tag in version 2.9.0
Source
wpmem_tos_link_txt is located in includes/class-wp-members-forms.php