Answer the question
In order to leave comments, you need to log in
Why is there a problem with the output through sprintf in Wordpress?
I am modifying (using existing code) the LearnPress plugin so that the certificate displays the grade instead of percentages.
By analogy with the function of displaying the results in percentages, I made the output function in points.
public function get_mark_result() {
$premark = $this->get_percent_result();
$mark = $premark * 1.2;
return apply_filters( 'learn-press/user/course-mark-result', wp_sprintf( '%s', $mark ) );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question