Change how authors are retrieved for the author widget/block

This commit is contained in:
Robin Cornett
2019-06-24 10:12:46 -04:00
parent 97e3f84a12
commit ab86156af5
2 changed files with 26 additions and 23 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
$users = get_users(
array(
'who' => 'authors',
)
);
$options = array();
foreach ( $users as $user ) {
$options[ $user->ID ] = $user->data->display_name;
}
return array(
'id' => 'user',
'label' => __( 'Select a user. The email address for this account will be used to pull the Gravatar image.', 'display-featured-image-genesis' ),
'flex' => true,
'choices' => $options,
);