[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

WordPress Plugin Install Administration API

File Size: 1059 lines (40 kb)
Included or required: 7 times
Referenced: 0 times
Includes or requires: 0 files

Defines 10 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()
  wp_get_plugin_action_button()

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

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

param: array $args
return: array|WP_Error

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


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

param: bool $deprecated Not used.

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


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


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


install_plugin_install_status( $api, $loop = false )   X-Ref
Determines 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 {

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


wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible_wp )   X-Ref
Gets the markup for the plugin install action button.

param: string       $name           Plugin name.
param: array|object $data           {
param: bool         $compatible_php   The result of a PHP compatibility check.
param: bool         $compatible_wp    The result of a WP compatibility check.
return: string $button The markup for the dependency row button.



Generated : Tue Mar 19 08:20:01 2024 Cross-referenced by PHPXref