WPDev.one
Core Function
View Source on Trac ↗

plugins_api()

plugins_api( mixed $action, mixed $args = array() )

Retrieves plugin installer pages from the WordPress.org Plugins API.

Parameters 2 required

Name / Type Description
string

$action API action to perform: 'query_plugins', 'plugin_information', or 'hot_tags'.

Required
mixed

(array | object) $args { Optional. Array or object of arguments to serialize for the Plugin Info API.

Required

Return Value

((object)
(object | array | WP_Error) Response object or array on success, WP_Error on failure. See the {@link 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`.

Function Information

Since Version
2.7.0
Source File
wp-admin/includes/plugin-install.php
Advertisement