count_many_users_posts example

return $columns;
    }

    /** * Generates the list table rows. * * @since 3.1.0 */
    public function display_rows() {
        // Query the post counts for this page.         if ( ! $this->is_site_users ) {
            $post_counts = count_many_users_posts( array_keys( $this->items ) );
        }

        foreach ( $this->items as $userid => $user_object ) {
            echo "\n\t" . $this->single_row( $user_object, '', '', isset( $post_counts ) ? $post_counts[ $userid ] : 0 );
        }
    }

    /** * Generates HTML for a single row on the users.php admin panel. * * @since 3.1.0 * @since 4.2.0 The `$style` parameter was deprecated. * @since 4.4.0 The `$role` parameter was deprecated. * * @param WP_User $user_object The current user object. * @param string $style Deprecated. Not used. * @param string $role Deprecated. Not used. * @param int $numposts Optional. Post count to display for this user. Defaults * to zero, as in, a new user has made zero posts. * @return string Output for a single row. */
Home | Imprint | This part of the site doesn't use cookies.