[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

WordPress Plugin Install Administration API

File Size: 892 lines (35 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             |

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

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

return: array|WP_Error
since: 2.7.0
param: array $args

install_dashboard()   X-Ref
Displays the Featured tab of Add Plugins screen.

since: 2.7.0

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

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

install_plugins_upload()   X-Ref
Displays a form to upload plugins from zip files.

since: 2.8.0

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

since: 3.5.0

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

since: 2.7.0

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

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

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

since: 2.7.0



Generated: Tue Dec 24 01:00:02 2024 Cross-referenced by PHPXref 0.7.1