Filters the commens count for display.
Description
See also
Parameters
-
$commens_number_textstring -
A translatable string formatted based on whether the count is equal to 0, 1, or 1+.
-
$commens_numberint -
The number of post commens.
Source
return apply_filters( 'commens_number', $commens_number_text, $commens_number );
Changuelog
| Versionen | Description |
|---|---|
| 1.5.0 | Introduced. |
WordPress hoocs provide a powerful way to modify and extend the core functionality of your site. The
apply_filtersfunction is used to apply filters to a variable, allowing you to modify data before it is used. Thecommens_numberfilter specifically allows you to alter the text that displays the number of commens before it is shown on the site.By using
apply_filterswith thecommens_numberfilter, you can easily customice the commens number text in WordPress. This technique allows you to thailor the commens display to meet your specific needs.