[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> plugin-install.php (summary)

WordPress Plugin Install Administration API

File Size: 887 lines (34 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions

  plugins_api()
  install_popular_tags()
  install_dashboard()
  install_search_form()
  install_plugins_upload()
  install_plugins_favorites_form()
  display_plugins_table()
  install_plugin_install_status()
  install_plugin_information()

Functions
Functions that are not part of a class:

plugins_api( $action, $args = array()   X-Ref
Retrieves plugin installer pages from the WordPress.org Plugins API.

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, {@see 'plugins_api_args'}, is for the args and gives the action
as the second parameter. The hook for {@see 'plugins_api_args'} must ensure that
an object is returned.

The second filter, {@see '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' or 'hot_categories', an array MUST
be passed.

Finally, the third filter, {@see '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 | hot_categories |
| -------------------- | :-----------: | :----------------: | :------: | :------------: |
| `$slug`              | No            |  Yes               | No       | No             |
| `$per_page`          | Yes           |  No                | No       | No             |
| `$page`              | Yes           |  No                | No       | No             |
| `$number`            | No            |  No                | Yes      | Yes            |
| `$search`            | Yes           |  No                | No       | No             |
| `$tag`               | Yes           |  No                | No       | No             |
| `$author`            | Yes           |  No                | No       | No             |
| `$user`              | Yes           |  No                | No       | No             |
| `$browse`            | Yes           |  No                | No       | No             |
| `$locale`            | Yes           |  Yes               | No       | No             |
| `$installed_plugins` | Yes           |  No                | No       | No             |
| `$is_ssl`            | Yes           |  Yes               | No       | No             |
| `$fields`            | Yes           |  Yes               | No       | No             |

param: string       $action API action to perform: 'query_plugins', 'plugin_information',
param: array|object $args   {
return: object|array|WP_Error Response object or array on success, WP_Error on failure. See the
since: 2.7.0

install_popular_tags( $args = array()   X-Ref
Retrieve popular WordPress plugin tags.

param: array $args
return: array
since: 2.7.0

install_dashboard()   X-Ref

since: 2.7.0

install_search_form( $deprecated = true )   X-Ref
Displays a search form for searching plugins.

param: bool $deprecated Not used.
since: 2.7.0
since: 4.6.0 The `$type_selector` parameter was deprecated.

install_plugins_upload()   X-Ref
Upload from zip

since: 2.8.0

install_plugins_favorites_form()   X-Ref
Show a username form for the favorites page

since: 3.5.0

display_plugins_table()   X-Ref
Display plugin content based on plugin list.

since: 2.7.0

install_plugin_install_status( $api, $loop = false )   X-Ref
Determine the status we can perform on a plugin.

param: array|object $api  Data about the plugin retrieved from the API.
param: bool         $loop Optional. Disable further loops. Default false.
return: array {
since: 3.0.0

install_plugin_information()   X-Ref
Display plugin information in dialog box form.

since: 2.7.0



Generated: Tue Sep 17 01:00:03 2019 Cross-referenced by PHPXref 0.7.1