Last active
January 14, 2019 14:47
-
-
Save httpstersk/2fe434322f00154e104fe0e4c467e9a2 to your computer and use it in GitHub Desktop.
➑ Get the avatars of all the WordPress users (`admin` or `editor` roles only)
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
const { select } = wp.data; | |
const { getAuthors } = select( 'core' ); | |
const authors = getAuthors(); | |
const avatars = authors.map(a => a.avatar_urls[ '96' ]); // Available Sizes: 24/48/96 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment