In the DWQA plugin, in ../inc/shortcodes.php around line 443, I made the following change:
if(count($followers) == 1){
echo count($followers) . ‘ ‘ . __(‘person is following following this question.’, ‘dwqa’);
} else {
echo count($followers) . ‘ ‘ . __(‘people are following this question.’, ‘dwqa’);
}
Now, when only 1 person is following a question, it says “1 person is following this question.” When more than 1 person is following the question it says “$count people are following…”
While this makes a lot more sense grammatically, I still have an issue. The code shows on the the list of questions and other pages. Still trying to figure out how to prevent that (currently, CSS will be my solution, but that less than desirable)
Hi Blue Presley,
Thank you for note me about that, i rewrite your code abit like this:
<?php
$count = count($followers);
printf( _n( '% person is following this question', '% people is following this question', $count, 'dwqa'), $count );
?>
The code will be short and clean. Thank again and hope you can become a contributor for DW Question Answer, you can submit any change here https://github.com/designwall/dw-question-answer
Regards.
@BigHug Great! I’m happy to contribute. Do you have a master TODO list you’re working on?
Thanks, we have a roadmap and development version at this link https://github.com/designwall/dw-question-answer/wiki/Roadmap, you can join and submit your code here.
Please login or Register to submit your answer