Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 512573

Please, add hooks to function validate_vote()

$
0
0

Replies: 0

As a site owner, sometimes would be valuable being able to do extend the default validation rules applied by methods/stars-rating/load.php:public function validate_vote()

I was thinking on something like this:


        $_calc_vote_limit = $this->get_rule('vote_limit');

        +do_action('gdrts_before_velidate_vote', $meta, $item, $user, $render, $errors);

	    if ($max != $_calc_stars) {
        ...
        ...

	    +do_action('gdrts_after_velidate_vote', $meta, $item, $user, $render, $errors);

	    if (empty($errors->errors)) {

What do you think?
If needed, I would be glad to send you a related Pull Request.


Viewing all articles
Browse latest Browse all 512573

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>