Created
April 19, 2024 16:23
-
-
Save helgatheviking/04d1c60e2ac51cfa79dec89e454dd1f8 to your computer and use it in GitHub Desktop.
Use Picsum.photos to generate some random random avatars.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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