lesterchan / wp-polls

Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
https://wordpress.org/plugins/wp-polls/
91 stars 78 forks source link

Add hooks for all templates rather than just voting form header, body & footer #138

Closed Jaska closed 4 years ago

Jaska commented 4 years ago

After looking at the source, creating new templates for forms with php is easy:

 add_filter( 'wp_polls_template_votebody_markup', 'mycallback', 10, 3 );

But there are only filters for wp_polls_template_voteheader_markup, wp_polls_template_votebody_markup and wp_polls_template_votefooter_markup.

How about all the other templates, mainly the result templates?

There is 'wp_polls_result_markup' filter for the entire result but would it be possible to have similar filters like the once I mentioned above?

Thanks!

lesterchan commented 4 years ago

Want to send a PR? The previous filters for markup were done by contributors.

Jaska commented 4 years ago

Ok, I'll look into it.

Jaska commented 4 years ago

Here you go :)

https://github.com/lesterchan/wp-polls/pull/139