Skip to content

Instantly share code, notes, and snippets.

@helgatheviking
Created April 19, 2024 16:23
Show Gist options
  • Save helgatheviking/04d1c60e2ac51cfa79dec89e454dd1f8 to your computer and use it in GitHub Desktop.
Save helgatheviking/04d1c60e2ac51cfa79dec89e454dd1f8 to your computer and use it in GitHub Desktop.
Use Picsum.photos to generate some random random avatars.
<?php
/**
* Plugin Name: Simple User Listing - Demo Avatars
* Description: Use Picsum.photos to generate some random random avatars.
* Author: helgatheviking
* Version: 1.0.0
* Requires at least: 6.5
*/
defined( 'ABSPATH' ) || exit;
function simple_user_listing_random_avatars($args) {
$args['url'] = 'https://picsum.photos/120?random='. uniqid();
return $args;
}
add_filter('pre_get_avatar_data', 'simple_user_listing_random_avatars');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment