'; $authors_list = get_users( 'who=authors' ); foreach ( $authors_list as $author_obj ) { if ( $author_obj !== false ) { if ( $author_obj->ID === $author ) { $selected = ' SELECTED'; } else { $selected = ''; } $html .= ''; } } $html .= ''; $html .= ' '; $html .= '
'; list( $daysToDisplay, $rangestart_utime, $rangeend_utime ) = wp_statistics_date_range_calculator( $daysToDisplay, $rangestart, $rangeend ); wp_statistics_date_range_selector( WP_Statistics::$page['authors'], $daysToDisplay, null, null, '&preauthor=' . $author, $html ); $args = array( 'author' => $author, ); $posts = get_posts( $args ); $visit_total = 0; $daysInThePast = (int) ( ( time() - $rangeend_utime ) / 86400 ); $posts_stats = array(); $visits = array(); // Setup the array, otherwise PHP may throw an error. foreach ( $posts as $post ) { $posts_stats[ $post->ID ] = 0; } for ( $i = $daysToDisplay; $i >= 0; $i -- ) { $date[] = "'" . $WP_Statistics->Real_Current_Date( 'M j', '-' . $i, $rangeend_utime ) . "'"; $stat = 0; foreach ( $posts as $post ) { $temp_stat = wp_statistics_pages( '-' . (int) ( $i + $daysInThePast ), null, $post->ID ); $posts_stats[ $post->ID ] += $temp_stat; $stat = $temp_stat; } $visits[] = $stat; $visit_total += $stat; } ?>

ID ); } echo number_format_i18n( $stat ); ?>

ID ] = $post; } foreach ( $posts_stats as $post_id => $post_stat ) { $post_obj = $posts_by_id[ $post_id ]; ?>
post_title ); ?>