Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Allow Subscribers in User Profile Picture and Gutenberg
<?php
// For User Profile Picture
add_filter( 'mpp_gutenberg_user_role', function( $role ) {
return 'subscribers';
} );
// For Gutenberg
add_filter( 'rest_user_query', function( $args, $r ) {
if( isset( $args['who'] ) && 'authors' == $args['who'] ) {
$args['who'] = 'subscribers';
}
return $args;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment