Suggested fix: Number formatting
-
Hello again! Still using this plugin, and still getting lots of useful data from it. ??
I have a suggestion to fix the number formatting throughout (but I was especially looking to fix it in the sidebar widget that everyone sees). I realized that only the “Total Spams” count was formatted properly. To reformat all of the numbers, I went through and changed the following lines in
functions.php
:
14 – Users online
76 – Visits per [x]
145 – Visitors per [x]
212 – Pages/posts per [x]
275 – Count per page
582 – Searches
643 – Number of posts
655 – Number of pages
665 – Number of comments
678 – Total users
706 & 710 – Average posts per day/days between posts
727 & 731 – Average comments per day/days between comments
748 & 752 – Average registrations per day/days between registrationsI basically changed all instances of
return $result;
to
return number_format_i18n($result);
…and…
return $wpdb->query("SELECT * FROM {$table_prefix}statistics_useronline");
to
return number_format_i18n($wpdb->query("SELECT * FROM {$table_prefix}statistics_useronline"));
…and…
return round( $days_spend / $get_total_post, 0 );
to
return number_format_i18n(round( $days_spend / $get_total_post, 0 ));
…etc. ??
- The topic ‘Suggested fix: Number formatting’ is closed to new replies.