Hello. I did not work with arrays at all and for me it is a dark forest, I can not understand how you can get data from this class
static function get_counts( $buckets ) { $counts = array(); $total = 0; foreach ( array( 'member', 'guest', 'bot' ) as $user_type ) { $count = isset( $buckets[$user_type] ) ? count( @$buckets[$user_type] ) : 0; $total += $counts[$user_type] = $count; } $counts['user'] = $total; return $counts; } For this template:
UserOnline_Template::get_counts('member'); When withdrawing:
print UserOnline_Template::get_counts( 'member' ); writes array, and error - Array to string conversion
Plugin: wp-useronline, from the template-tags.php file I killed a couple of evenings, got confused with this output, since I really need to get the number from this class