A discussed in slack, it is equally important as pushing Core, Doc, Translation to also push our Contributor “recognition”
As stated here https://www.classicpress.net/contributors/:
We’re currently working on a system which will allow volunteers to create profiles, and once that system is in place we’ll share all the contributors on this page – unfortunately it’s reached a point where there are too many people helping out to keep this page up-to-date and accurate.
One Place we could use to show Core Contributors is the about.php page in CP
Currently, we say there ClassicPress is created by a worldwide team of passionate individuals.
We do not say who those individuals are…
I made a first attempt in correcting that, which looks like this:
The code requires some refurbishing but is completely functional. It does need some review in terms of how many times we hit that API, eventually we should cache that:
$repo = 'ClassicPress/ClassicPress';
$empty = false;
for ( $git_page = 1; true !== $empty; $git_page++ ) {
$response = wp_remote_get( 'https://api.github.com/repos/' . $repo . '/contributors?page=' . $git_page );
if ( wp_remote_retrieve_response_code( $response ) === 200 ) {
$response_body = wp_remote_retrieve_body( $response );
$decoded_response = json_decode( stripslashes( $response_body ) );
if ( ! empty( $decoded_response ) ) {
foreach ( $decoded_response as $object ) {
$contributors .= '<span style="display:inline-block;"><img width="28" height="28" style="border-radius:100%" src="' . esc_url( $object->avatar_url ) . '"> <a href="' . esc_url( $object->url ) . '">' . sanitize_key( $object->login ) . '</a>(' . absint( $object->contributions ) . ')</span>';
}
}
// String comparison is intended here.
if ( empty( $response_body ) || '[]' === $response_body ) {
$empty = true;
}
}
}
// This is safe to echo without further escaping.
echo $contributors;
What is the general consensus here, can I initiate a PR with this to refine, or is the general consensus that we do not want to show contributors there at all?
I can use that code to create a new contributors.cp.net site, or, a plugin that shows it on https://www.classicpress.net/contributors/, or whatever else, and then we can link to it, if desired.
I don’t care where we list the folks, but we need to list them.
On this same topic, I would like to ask @wadestriebel if it is (without a lot of effort) possible to add an endpoint to our API where we can add DOC, Translation and else contributors that are not gullible from any API.
Maintaining that API doesn’t require a lot of work (maybe a couple new users a month to add), what I fear requires a lot of work is setting it up, but, if it does not require a lot of work, that would basically resolve all other “contributors data” we may need and have no API to pull from.