Blue Presley
asked 8 years ago

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)

1 Answers
answered 8 years ago

Hi Blue Presley, 
Thank you for note me about that,  i rewrite your code abit like this:

    $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 

Blue Presley
replied 8 years ago

@BigHug Great! I’m happy to contribute. Do you have a master TODO list you’re working on?

Dominic Staff
replied 8 years ago

Thanks, we have a roadmap and development version at this link, you can join and submit your code here.

Powered by DW Question & Answer Pro