plugins_api( string $action, array|object $args = array() ): object|array|WP_Error
- Since
- 2.7.0
- Source
wp-admin/includes/plugin-install.php:100
Description
It is possible for a plugin to override the Plugin API result with three filters. Assume this is for plugins, which can extend on the Plugin Info to offer more choices. This is very powerful and must be used with care when overriding the filters.
The first filter, 'plugins_api_args', is for the args and gives the action as the second parameter. The hook for 'plugins_api_args' must ensure that an object is returned.
The second filter, 'plugins_api', allows a plugin to override the WordPress.org Plugin Installation API entirely. If $action is 'query_plugins' or 'plugin_information', an object MUST be passed. If $action is 'hot_tags', an array MUST be passed.
Finally, the third filter, 'plugins_api_result', makes it possible to filter the response object or array, depending on the $action type.
Supported arguments per action:
| Argument Name | query_plugins | plugin_information | hot_tags |
|---|---|---|---|
$slug | No | Yes | No |
$per_page | Yes | No | No |
$page | Yes | No | No |
$number | No | No | Yes |
$search | Yes | No | No |
$tag | Yes | No | No |
$author | Yes | No | No |
$user | Yes | No | No |
$browse | Yes | No | No |
$locale | Yes | Yes | No |
$installed_plugins | Yes | No | No |
$is_ssl | Yes | Yes | No |
$fields | Yes | Yes | No |
Compatibility
- WordPress
- since 2.7.0
- PHP
- 7.4–8.6-dev
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.
Parameters
$actionstring- API action to perform: 'query_plugins', 'plugin_information', or 'hot_tags'.
$argsarray|objectoptional- Array or object of arguments to serialize for the Plugin Info API.Default:
array()$slugstringdefault: emptyThe plugin slug.$per_pageintdefault: 24Number of plugins per page.$pageintdefault: 1Number of current page.$numberintNumber of tags or categories to be queried.$searchstringdefault: emptyA search term.$tagstringdefault: emptyTag to filter plugins.$authorstringdefault: emptyUsername of an plugin author to filter plugins.$userstringdefault: emptyUsername to query for their favorites.$browsestringBrowse view: 'popular', 'new', 'beta', 'recommended'.$localestringdefault: is the value of get_locale()Locale to provide context-sensitive results.$installed_pluginsstringInstalled plugins to provide context-sensitive results.$is_sslbooldefault: falseWhether links should be returned with https or not.$fieldsarray{ Array of fields which should or should not be returned.$short_descriptionbooldefault: trueWhether to return the plugin short description.$descriptionbooldefault: falseWhether to return the plugin full description.$sectionsbooldefault: falseWhether to return the plugin readme sections: description, installation, FAQ, screenshots, other notes, and changelog.$testedbooldefault: trueWhether to return the 'Compatible up to' value.$requiresbooldefault: trueWhether to return the required WordPress version.$requires_phpbooldefault: trueWhether to return the required PHP version.$ratingbooldefault: trueWhether to return the rating in percent and total number of ratings.$ratingsbooldefault: trueWhether to return the number of rating for each star (1-5).$downloadedbooldefault: trueWhether to return the download count.$downloadlinkbooldefault: trueWhether to return the download link for the package.$last_updatedbooldefault: trueWhether to return the date of the last update.$addedbooldefault: trueWhether to return the date when the plugin was added to the wordpress.org repository.$tagsbooldefault: trueWhether to return the assigned tags.$compatibilitybooldefault: trueWhether to return the WordPress compatibility list.$homepagebooldefault: trueWhether to return the plugin homepage link.$versionsbooldefault: falseWhether to return the list of all available versions.$donate_linkbooldefault: trueWhether to return the donation link.$reviewsbooldefault: falseWhether to return the plugin reviews.$bannersbooldefault: falseWhether to return the banner images links.$iconsbooldefault: falseWhether to return the icon links.$active_installsbooldefault: falseWhether to return the number of active installations.$contributorsbooldefault: false. }Whether to return the list of contributors.
Return value
object|array|WP_Error- Response object or array on success, WP_Error on failure. See the https://developer.wordpress.org/reference/functions/plugins_api/ function reference article for more information on the make-up of possible return values depending on the value of
$action.
Performance profile
How much work a call to plugins_api() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.
- Cost class
- Expensive
- Scaling
- Constant
- Instructions
- 36–168
- Plugin surface
- 3 hooks
- Called by
- 8
Reaches an outbound HTTP request via wp_remote_get().
No loop in the body: the same number of instructions runs whatever you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 197.
Third-party callbacks on 'plugins_api_args', 'plugins_api', 'plugins_api_result' run inside this call, and their cost is not bounded by anything here.
8 places in core call this, so the cost is paid more often than your own code shows.
What it touches
- hookthird-party callbacks
apply_filters()called directly - httpoutbound HTTP request
wp_remote_get()called directly - serializeserialisation
json_decode()called directly - querycontent query
get_user_by()one call below plugins_api()
Further down the call graph this can also reach option, cache and transient. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.
What one call costs · 100 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost plugins_api() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
isset($args) && $res !== false | 36–44 | apply_filters(), apply_filters(), is_wp_error(), apply_filters() |
$res !== false | 40–48 | get_user_locale(), apply_filters(), apply_filters(), is_wp_error(), apply_filters() |
$res !== false | 42–50 | wp_get_wp_version(), apply_filters(), apply_filters(), is_wp_error(), apply_filters() |
!isset($args) && $res !== false | 46–54 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), is_wp_error(), apply_filters() |
isset($args) && $res === false && !is_wp_error() | 81–96 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && !is_wp_error() | 85–100 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && !is_wp_error() | 85–100 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && !is_wp_error() | 86–101 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && is_wp_error() | 86–92 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !is_wp_error() | 87–102 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && !is_wp_error() | 89–104 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && !is_wp_error() | 90–105 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
88 further outcomes, up to 168 instructions
$res === false && !is_wp_error() | 90–105 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false | 90–96 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && is_wp_error() | 90–96 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !is_wp_error() | 91–106 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() | 91–106 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && is_wp_error() | 91–97 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !is_wp_error() | 92–107 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && is_wp_error() | 92–98 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
isset($args) && $res === false && wp_is_json_request() | 93–108 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && !is_wp_error() | 94–109 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false | 94–100 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() | 95–110 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false | 95–101 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && is_wp_error() | 95–101 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !is_wp_error() | 96–111 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() | 96–111 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false | 96–102 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && is_wp_error() | 96–102 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && wp_is_json_request() | 97–112 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && is_wp_error() | 97–103 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
isset($args) && $res === false && wp_is_json_request() | 98–113 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && is_wp_error() && wp_is_json_request() | 98–104 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && wp_is_json_request() | 99–114 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false | 99–105 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() | 100–115 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 100–114 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false | 100–106 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false | 101–107 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && is_wp_error() | 101–107 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && wp_is_json_request() | 102–117 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && is_wp_error() && wp_is_json_request() | 102–108 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && wp_is_json_request() | 103–118 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && is_wp_error() && wp_is_json_request() | 103–109 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && wp_is_json_request() | 104–119 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 104–118 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 104–118 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && is_wp_error() && wp_is_json_request() | 104–110 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 105–119 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false | 105–111 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 106–120 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && is_wp_error() && wp_is_json_request() | 107–113 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && wp_is_json_request() | 108–123 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 108–122 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && is_wp_error() && wp_is_json_request() | 108–114 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 109–123 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 109–123 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && is_wp_error() && wp_is_json_request() | 109–115 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 110–124 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 110–124 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 111–125 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
isset($args) && $res === false && wp_is_json_request() && !is_array($res) && $res === null | 112–126 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 113–127 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && is_wp_error() && wp_is_json_request() | 113–119 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 114–128 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !is_wp_error() && !is_array($res) && $res === null | 115–129 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 115–129 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && wp_is_json_request() && !is_array($res) && $res === null | 116–130 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
isset($args) && $res === false && wp_is_json_request() && !is_array($res) && $res === null | 117–131 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
isset($args) && $res === false && !wp_is_json_request() | 118–135 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && wp_is_json_request() && !is_array($res) && $res === null | 118–132 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && !is_wp_error() && !is_array($res) && $res === null | 119–133 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && wp_is_json_request() && !is_array($res) && $res === null | 121–135 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !wp_is_json_request() | 122–139 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
!isset($args) && $res === false && wp_is_json_request() && !is_array($res) && $res === null | 122–136 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
isset($args) && $res === false && !wp_is_json_request() | 123–140 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && wp_is_json_request() && !is_array($res) && $res === null | 123–137 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
isset($args) && $res === false && is_wp_error() && !wp_is_json_request() | 123–131 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !wp_is_json_request() | 124–141 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && !wp_is_json_request() | 127–144 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
!isset($args) && $res === false && wp_is_json_request() && !is_array($res) && $res === null | 127–141 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && is_wp_error() && !wp_is_json_request() | 127–135 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && !wp_is_json_request() | 128–145 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
isset($args) && $res === false && is_wp_error() && !wp_is_json_request() | 128–136 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !wp_is_json_request() | 129–146 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
$res === false && is_wp_error() && !wp_is_json_request() | 129–137 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && is_wp_error() && !wp_is_json_request() | 132–140 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
!isset($args) && $res === false && !wp_is_json_request() | 133–150 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), apply_filters() |
!isset($args) && $res === false && is_wp_error() && !wp_is_json_request() | 133–141 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && is_wp_error() && !wp_is_json_request() | 134–142 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
isset($args) && $res === false && !wp_is_json_request() && !is_array($res) && $res === null | 137–153 | apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && is_wp_error() && !wp_is_json_request() | 138–146 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), __(), __(), sprintf(), ->get_error_message(), timeout(), apply_filters() |
$res === false && !wp_is_json_request() && !is_array($res) && $res === null | 141–157 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
isset($args) && $res === false && !wp_is_json_request() && !is_array($res) && $res === null | 142–158 | apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !wp_is_json_request() && !is_array($res) && $res === null | 143–159 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !wp_is_json_request() && !is_array($res) && $res === null | 146–162 | get_user_locale(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && !wp_is_json_request() && !is_array($res) && $res === null | 147–163 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
$res === false && !wp_is_json_request() && !is_array($res) && $res === null | 148–164 | wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
!isset($args) && $res === false && !wp_is_json_request() && !is_array($res) && $res === null | 152–168 | get_user_locale(), wp_get_wp_version(), apply_filters(), apply_filters(), action(), wp_http_supports(), set_url_scheme(), wp_get_wp_version(), home_url(), wp_remote_get(), is_wp_error(), wp_is_json_request(), __(), __(), sprintf(), __(), headers_sent(), wp_trigger_error(), wp_remote_get(), is_wp_error(), wp_remote_retrieve_body(), json_decode(), __(), __(), sprintf(), wp_remote_retrieve_body(), add_query_arg(), apply_filters() |
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 197 | 36–168 | 17 | |
| 8.5 | 197 | 36–168 | 17 | |
| 8.4 | 197 | 36–168 | 17 | 3 fewer instructions than PHP 8.3 |
| 8.3 | 200 | 36–171 | 17 | |
| 8.2 | 200 | 36–171 | 17 | |
| 8.1 | 200 | 36–171 | 17 | |
| 7.4 | 200 | 36–171 | 17 |
An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.
Hooks and filters fired · 3
3 hooks fire while plugins_api() runs, in this order:
- apply_filters( plugins_api_args )filterline 129 (+29 into the body)
Filters the WordPress.org Plugin Installation API arguments.
- apply_filters( plugins_api )filterline 145 (+45 into the body)
Filters the response for the current WordPress.org Plugin Installation API request.
- apply_filters( plugins_api_result )filterline 230 (+130 into the body)
Filters the Plugin Installation API response results.
Uses · 14
- get_user_locale()Retrieves the locale of a user.
- wp_get_wp_version()Returns the current WordPress version.
- apply_filters()Calls the callback functions that have been added to a filter hook.
- add_query_arg()Retrieves a modified URL query string.
- wp_http_supports()Determines if there is an HTTP Transport that can process this request.
- set_url_scheme()Sets the scheme for a URL.
- home_url()Retrieves the URL for the current site where the front end is accessible.
- wp_remote_get()Performs an HTTP request using the GET method and returns its response.
- is_wp_error()Checks whether the given variable is a WordPress Error.
- wp_is_json_request()Checks whether current request is a JSON request, or is expecting a JSON response.
- wp_trigger_error()Generates a user-level error/warning/notice/deprecation message.
- __()Retrieves the translation of $text.
Show all 14
- wp_remote_retrieve_body()Retrieves only the body from the raw response.
- WP_Error::__construct()Initializes the error.
Used by · 8
- WP_Plugin_Dependencies::get_dependency_api_data()Retrieves and stores dependency plugin data from the WordPress.org Plugin API.
- WP_Plugin_Install_List_Table::get_dependencies_notice()Returns a notice containing a list of dependencies required by the plugin.
- WP_Plugin_Install_List_Table::prepare_items()
- WP_REST_Block_Directory_Controller::get_items()Search and retrieve blocks metadata
- WP_REST_Plugins_Controller::create_item()Uploads a plugin and optionally activates it.
- install_plugin_information()Displays plugin information in dialog box form.
- install_popular_tags()Retrieves popular WordPress plugin tags.
- wp_ajax_install_plugin()Handles installing a plugin via AJAX.
Source code
function plugins_api( $action, $args = array() ) { if ( is_array( $args ) ) { $args = (object) $args; } if ( 'query_plugins' === $action ) { if ( ! isset( $args->per_page ) ) { $args->per_page = 24; } } if ( ! isset( $args->locale ) ) { $args->locale = get_user_locale(); } if ( ! isset( $args->wp_version ) ) { $args->wp_version = substr( wp_get_wp_version(), 0, 3 ); // x.y } /** * Filters the WordPress.org Plugin Installation API arguments. * * Important: An object MUST be returned to this filter. * * @since 2.7.0 * * @param object $args Plugin API arguments. * @param string $action The type of information being requested from the Plugin Installation API. */ $args = apply_filters( 'plugins_api_args', $args, $action ); /** * Filters the response for the current WordPress.org Plugin Installation API request. * * Returning a non-false value will effectively short-circuit the WordPress.org API request. * * If `$action` is 'query_plugins' or 'plugin_information', an object MUST be passed. * If `$action` is 'hot_tags', an array should be passed. * * @since 2.7.0 * * @param false|object|array $result The result object or array. Default false. * @param string $action The type of information being requested from the Plugin Installation API. * @param object $args Plugin API arguments. */ $res = apply_filters( 'plugins_api', false, $action, $args ); if ( false === $res ) { $url = 'http://api.wordpress.org/plugins/info/1.2/'; $url = add_query_arg( array( 'action' => $action, 'request' => $args, ), $url ); $http_url = $url; $ssl = wp_http_supports( array( 'ssl' ) ); if ( $ssl ) { $url = set_url_scheme( $url, 'https' ); } $http_args = array( 'timeout' => 15, 'user-agent' => 'WordPress/' . wp_get_wp_version() . '; ' . home_url( '/' ), ); $request = wp_remote_get( $url, $http_args ); if ( $ssl && is_wp_error( $request ) ) { if ( ! wp_is_json_request() ) { wp_trigger_error( __FUNCTION__, sprintf( /* translators: %s: Support forums URL. */ __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), __( 'https://wordpress.org/support/forums/' ) ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICEChangelog
Introduced in 2.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-admin/includes/plugin-install.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.