Title: wp_credits
Published: April 25, 2014
Last modified: August 20, 2026

---

# wp_credits( string $version = '', string $locale = '' ): array|false

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#wp--skip-link--target)

Retrieves the contributor credits.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#parameters)󠁿

 `$version`stringoptional

WordPress version. Defaults to the current version.

Default:`''`

`$locale`stringoptional

WordPress locale. Defaults to the current user’s locale.

Default:`''`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#return)󠁿

 array|false A list of all of the contributors, or false on error.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#source)󠁿

    ```php
    function wp_credits( $version = '', $locale = '' ) {
    	if ( ! $version ) {
    		$version = wp_get_wp_version();
    	}

    	if ( ! $locale ) {
    		$locale = get_user_locale();
    	}

    	$results = get_site_transient( 'wordpress_credits_' . $locale );

    	if ( ! is_array( $results )
    		|| str_contains( $version, '-' )
    		|| ( isset( $results['data']['version'] ) && ! str_starts_with( $version, $results['data']['version'] ) )
    	) {
    		$url     = "https://api.wordpress.org/core/credits/1.1/?version={$version}&locale={$locale}";
    		$options = array( 'user-agent' => 'WordPress/' . $version . '; ' . home_url( '/' ) );

    		if ( wp_http_supports( array( 'ssl' ) ) ) {
    			$url = set_url_scheme( $url, 'https' );
    		}

    		$response = wp_remote_get( $url, $options );

    		if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
    			return false;
    		}

    		$results = json_decode( wp_remote_retrieve_body( $response ), true );

    		if ( ! is_array( $results ) ) {
    			return false;
    		}

    		set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
    	}

    	return $results;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/credits.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/credits.php#L20)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/credits.php#L20-L58)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_get_wp_version()](https://developer.wordpress.org/reference/functions/wp_get_wp_version/)`wp-includes/functions.php` |

Returns the current WordPress version.

  | 
| [get_user_locale()](https://developer.wordpress.org/reference/functions/get_user_locale/)`wp-includes/l10n.php` |

Retrieves the locale of a user.

  | 
| [set_url_scheme()](https://developer.wordpress.org/reference/functions/set_url_scheme/)`wp-includes/link-template.php` |

Sets the scheme for a URL.

  | 
| [wp_http_supports()](https://developer.wordpress.org/reference/functions/wp_http_supports/)`wp-includes/http.php` |

Determines if there is an HTTP Transport that can process this request.

  | 
| [wp_remote_get()](https://developer.wordpress.org/reference/functions/wp_remote_get/)`wp-includes/http.php` |

Performs an HTTP request using the GET method and returns its response.

  | 
| [wp_remote_retrieve_response_code()](https://developer.wordpress.org/reference/functions/wp_remote_retrieve_response_code/)`wp-includes/http.php` |

Retrieves only the response code from the raw response.

  | 
| [wp_remote_retrieve_body()](https://developer.wordpress.org/reference/functions/wp_remote_retrieve_body/)`wp-includes/http.php` |

Retrieves only the body from the raw response.

  | 
| [set_site_transient()](https://developer.wordpress.org/reference/functions/set_site_transient/)`wp-includes/option.php` |

Sets/updates the value of a site transient.

  | 
| [home_url()](https://developer.wordpress.org/reference/functions/home_url/)`wp-includes/link-template.php` |

Retrieves the URL for the current site where the front end is accessible.

  | 
| [get_site_transient()](https://developer.wordpress.org/reference/functions/get_site_transient/)`wp-includes/option.php` |

Retrieves the value of a site transient.

  | 
| [is_wp_error()](https://developer.wordpress.org/reference/functions/is_wp_error/)`wp-includes/load.php` |

Checks whether the given variable is a WordPress Error.

  |

[Show 6 more](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_credits/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.6.0](https://developer.wordpress.org/reference/since/5.6.0/) | Added the `$version` and `$locale` parameters. | 
| [3.2.0](https://developer.wordpress.org/reference/since/3.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_credits%2F)
before being able to contribute a note or feedback.