@@ -26,7 +26,14 @@ I spent most of my free time creating, updating, maintaining and supporting thes
## Changelog
### Version 2.75.6
* NEW: New filter for template variables: wp_polls_template_resultheader_variables, wp_polls_template_resultbody_variables, wp_polls_template_resultfooter_variables. These can be used to register new variables on the admin side.
* NEW: New filter for template variables:
wp_polls_template_votebody_variables
wp_polls_template_votefooter
wp_polls_template_resultheader_variables
wp_polls_template_resultbody_variables
wp_polls_template_resultfooter_variables
These can be used to register new variables on the admin side.
Added readme documentation for the usage.
### Version 2.75.5
* NEW: New filter for templates: wp_polls_template_resultheader_markup, wp_polls_template_resultbody_markup, wp_polls_template_resultbody2_markup, wp_polls_template_resultfooter_markup, wp_polls_template_resultfooter2_markup. Props @Jaska.
...
...
@@ -244,3 +251,38 @@ I spent most of my free time creating, updating, maintaining and supporting thes
<?phpget_polltime($poll_id,$date_format);?>
<?phpendif;?>
```
### Translating the template
The plugin templates can be translated via template variables.
There are these filters for the custom template variables
```
wp_polls_template_votebody_variables
wp_polls_template_votefooter
wp_polls_template_resultheader_variables
wp_polls_template_resultbody_variables
wp_polls_template_resultfooter_variables
```
Add filter to your theme and register custom variable where you will add your translation.
Good practice is to name them for example with prefix `STR_` here `STR_TOTAL_VOTERS`.