[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

WordPress Plugin Administration API

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

Defines 53 functions

  get_plugin_data()
  _get_plugin_data_markup_translate()
  get_plugin_files()
  get_plugins()
  get_mu_plugins()
  _sort_uname_callback()
  get_dropins()
  _get_dropins()
  is_plugin_active()
  is_plugin_inactive()
  is_plugin_active_for_network()
  is_network_only_plugin()
  activate_plugin()
  deactivate_plugins()
  activate_plugins()
  delete_plugins()
  validate_active_plugins()
  validate_plugin()
  validate_plugin_requirements()
  is_uninstallable_plugin()
  uninstall_plugin()
  add_menu_page()
  add_submenu_page()
  add_management_page()
  add_options_page()
  add_theme_page()
  add_plugins_page()
  add_users_page()
  add_dashboard_page()
  add_posts_page()
  add_media_page()
  add_links_page()
  add_pages_page()
  add_comments_page()
  remove_menu_page()
  remove_submenu_page()
  menu_page_url()
  get_admin_page_parent()
  get_admin_page_title()
  get_plugin_page_hook()
  get_plugin_page_hookname()
  user_can_access_admin_page()
  option_update_filter()
  add_option_whitelist()
  remove_option_whitelist()
  settings_fields()
  wp_clean_plugins_cache()
  plugin_sandbox_scrape()
  wp_add_privacy_policy_content()
  is_plugin_paused()
  wp_get_plugin_error()
  resume_plugin()
  paused_plugins_notice()

Functions
Functions that are not part of a class:

get_plugin_data( $plugin_file, $markup = true, $translate = true )   X-Ref
Parses the plugin contents to retrieve plugin's metadata.

All plugin headers must be on their own line. Plugin description must not have
any newlines, otherwise only parts of the description will be displayed.
The below is formatted for printing.

/*
Plugin Name: Name of the plugin.
Plugin URI: The home page of the plugin.
Description: Plugin description.
Author: Plugin author's name.
Author URI: Link to the author's website.
Version: Plugin version.
Text Domain: Optional. Unique identifier, should be same as the one used in
load_plugin_textdomain().
Domain Path: Optional. Only useful if the translations are located in a
folder above the plugin's base path. For example, if .mo files are
located in the locale folder then Domain Path will be "/locale/" and
must have the first slash. Defaults to the base folder the plugin is
located in.
Network: Optional. Specify "Network: true" to require that a plugin is activated
across all sites in an installation. This will prevent a plugin from being
activated on a single site when Multisite is enabled.
Requires at least: Optional. Specify the minimum required WordPress version.
Requires PHP: Optional. Specify the minimum required PHP version.
* / # Remove the space to close comment.

The first 8 KB of the file will be pulled in and if the plugin data is not
within that first 8 KB, then the plugin author should correct their plugin
and move the plugin data headers to the top.

The plugin file is assumed to have permissions to allow for scripts to read
the file. This is not checked however and the file is only opened for
reading.

param: string $plugin_file Absolute path to the main plugin file.
param: bool   $markup      Optional. If the returned data should have HTML markup applied.
param: bool   $translate   Optional. If the returned data should be translated. Default true.
return: array {
since: 1.5.0
since: 5.3.0 Added support for `Requires at least` and `Requires PHP` headers.

_get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup = true, $translate = true )   X-Ref
Sanitizes plugin data, optionally adds markup, optionally translates.

param: string $plugin_file Path to the main plugin file.
param: array  $plugin_data An array of plugin data. See `get_plugin_data()`.
param: bool   $markup      Optional. If the returned data should have HTML markup applied.
param: bool   $translate   Optional. If the returned data should be translated. Default true.
return: array {
since: 2.7.0

get_plugin_files( $plugin )   X-Ref
Get a list of a plugin's files.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: string[] Array of file names relative to the plugin root.
since: 2.8.0

get_plugins( $plugin_folder = '' )   X-Ref
Check the plugins directory and retrieve all plugin files with plugin data.

WordPress only supports plugin files in the base plugins directory
(wp-content/plugins) and in one directory above the plugins directory
(wp-content/plugins/my-plugin). The file it looks for has the plugin data
and must be found in those two locations. It is recommended to keep your
plugin files in their own directories.

The file with the plugin data is the file that will be included and therefore
needs to have the main execution for the plugin. This does not mean
everything must be contained in the file and it is recommended that the file
be split for maintainability. Keep everything in one file for extreme
optimization purposes.

param: string $plugin_folder Optional. Relative path to single plugin folder.
return: array[] Array of arrays of plugin data, keyed by plugin file name. See `get_plugin_data()`.
since: 1.5.0

get_mu_plugins()   X-Ref
Check the mu-plugins directory and retrieve all mu-plugin files with any plugin data.

WordPress only includes mu-plugin files in the base mu-plugins directory (wp-content/mu-plugins).

return: array[] Array of arrays of mu-plugin data, keyed by plugin file name. See `get_plugin_data()`.
since: 3.0.0

_sort_uname_callback( $a, $b )   X-Ref
Callback to sort array by a 'Name' key.

param: array $a array with 'Name' key.
param: array $b array with 'Name' key.
return: int Return 0 or 1 based on two string comparison.
since: 3.1.0

get_dropins()   X-Ref
Check the wp-content directory and retrieve all drop-ins with any plugin data.

return: array[] Array of arrays of dropin plugin data, keyed by plugin file name. See `get_plugin_data()`.
since: 3.0.0

_get_dropins()   X-Ref
Returns drop-ins that WordPress uses.

Includes Multisite drop-ins only when is_multisite()

return: array[] Key is file name. The value is an array, with the first value the
since: 3.0.0

is_plugin_active( $plugin )   X-Ref
Determines whether a plugin is active.

Only plugins installed in the plugins/ folder can be active.

Plugins in the mu-plugins/ folder can't be "activated," so this function will
return false for those plugins.

For more information on this and similar theme functions, check out
the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
Conditional Tags} article in the Theme Developer Handbook.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: bool True, if in the active plugins list. False, not in the list.
since: 2.5.0

is_plugin_inactive( $plugin )   X-Ref
Determines whether the plugin is inactive.

Reverse of is_plugin_active(). Used as a callback.

For more information on this and similar theme functions, check out
the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
Conditional Tags} article in the Theme Developer Handbook.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: bool True if inactive. False if active.
since: 3.1.0

is_plugin_active_for_network( $plugin )   X-Ref
Determines whether the plugin is active for the entire network.

Only plugins installed in the plugins/ folder can be active.

Plugins in the mu-plugins/ folder can't be "activated," so this function will
return false for those plugins.

For more information on this and similar theme functions, check out
the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
Conditional Tags} article in the Theme Developer Handbook.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: bool True if active for the network, otherwise false.
since: 3.0.0

is_network_only_plugin( $plugin )   X-Ref
Checks for "Network: true" in the plugin header to see if this should
be activated only as a network wide plugin. The plugin would also work
when Multisite is not enabled.

Checks for "Site Wide Only: true" for backward compatibility.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: bool True if plugin is network only, false otherwise.
since: 3.0.0

activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false )   X-Ref
Attempts activation of plugin in a "sandbox" and redirects on success.

A plugin that is already activated will not attempt to be activated again.

The way it works is by setting the redirection to the error before trying to
include the plugin file. If the plugin fails, then the redirection will not
be overwritten with the success message. Also, the options will not be
updated and the activation hook will not be called on plugin error.

It should be noted that in no way the below code will actually prevent errors
within the file. The code should not be used elsewhere to replicate the
"sandbox", which uses redirection to work.
{@source 13 1}

If any errors are found or text is outputted, then it will be captured to
ensure that the success redirection will update the error redirection.

param: string $plugin       Path to the plugin file relative to the plugins directory.
param: string $redirect     Optional. URL to redirect to.
param: bool   $network_wide Optional. Whether to enable the plugin for all sites in the network
param: bool   $silent       Optional. Whether to prevent calling activation hooks. Default false.
return: null|WP_Error WP_Error on invalid file or null on success.
since: 2.5.0
since: 5.2.0 Test for WordPress version and PHP version compatibility.

deactivate_plugins( $plugins, $silent = false, $network_wide = null )   X-Ref
Deactivate a single plugin or multiple plugins.

The deactivation hook is disabled by the plugin upgrader by using the $silent
parameter.

param: string|string[] $plugins      Single plugin or list of plugins to deactivate.
param: bool            $silent       Prevent calling deactivation hooks. Default false.
param: bool|null       $network_wide Whether to deactivate the plugin for all sites in the network.
since: 2.5.0

activate_plugins( $plugins, $redirect = '', $network_wide = false, $silent = false )   X-Ref
Activate multiple plugins.

When WP_Error is returned, it does not mean that one of the plugins had
errors. It means that one or more of the plugin file paths were invalid.

The execution will be halted as soon as one of the plugins has an error.

param: string|string[] $plugins      Single plugin or list of plugins to activate.
param: string          $redirect     Redirect to page after successful activation.
param: bool            $network_wide Whether to enable the plugin for all sites in the network.
param: bool $silent                  Prevent calling activation hooks. Default false.
return: bool|WP_Error True when finished or WP_Error if there were errors during a plugin activation.
since: 2.6.0

delete_plugins( $plugins, $deprecated = '' )   X-Ref
Remove directory and files of a plugin for a list of plugins.

param: string[] $plugins    List of plugin paths to delete, relative to the plugins directory.
param: string   $deprecated Not used.
return: bool|null|WP_Error True on success, false if `$plugins` is empty, `WP_Error` on failure.
since: 2.6.0

validate_active_plugins()   X-Ref
Validate active plugins

Validate all active plugins, deactivates invalid and
returns an array of deactivated ones.

return: WP_Error[] Array of plugin errors keyed by plugin file name.
since: 2.5.0

validate_plugin( $plugin )   X-Ref
Validate the plugin path.

Checks that the main plugin file exists and is a valid plugin. See validate_file().

param: string $plugin Path to the plugin file relative to the plugins directory.
return: int|WP_Error 0 on success, WP_Error on failure.
since: 2.5.0

validate_plugin_requirements( $plugin )   X-Ref
Validate the plugin requirements for WP version and PHP version.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: true|WP_Error True if requirements are met, WP_Error on failure.
since: 5.2.0

is_uninstallable_plugin( $plugin )   X-Ref
Whether the plugin can be uninstalled.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: bool Whether plugin can be uninstalled.
since: 2.7.0

uninstall_plugin( $plugin )   X-Ref
Uninstall a single plugin.

Calls the uninstall hook, if it is available.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: true True if a plugin's uninstall.php file has been found and included.
since: 2.7.0

add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null )   X-Ref
Add a top-level menu page.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by. Should be unique for this menu page and only
param: callable $function   The function to be called to output the content for this page.
param: string   $icon_url   The URL to the icon to be used for this menu.
param: int      $position   The position in the menu order this item should appear.
return: string The resulting page's hook_suffix.
since: 1.5.0

add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add a submenu page.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $parent_slug The slug name for the parent menu (or the file name of a standard
param: string   $page_title  The text to be displayed in the title tags of the page when the menu
param: string   $menu_title  The text to be used for the menu.
param: string   $capability  The capability required for this menu to be displayed to the user.
param: string   $menu_slug   The slug name to refer to this menu by. Should be unique for this menu
param: callable $function    The function to be called to output the content for this page.
param: int      $position    The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 1.5.0
since: 5.3.0 Added the `$position` parameter.

add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Tools main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 1.5.0
since: 5.3.0 Added the `$position` parameter.

add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Settings main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 1.5.0
since: 5.3.0 Added the `$position` parameter.

add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Appearance main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.0.0
since: 5.3.0 Added the `$position` parameter.

add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Plugins main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 3.0.0
since: 5.3.0 Added the `$position` parameter.

add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Users/Profile main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.1.3
since: 5.3.0 Added the `$position` parameter.

add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Dashboard main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.7.0
since: 5.3.0 Added the `$position` parameter.

add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Posts main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.7.0
since: 5.3.0 Added the `$position` parameter.

add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Media main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.7.0
since: 5.3.0 Added the `$position` parameter.

add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Links main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.7.0
since: 5.3.0 Added the `$position` parameter.

add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Pages main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.7.0
since: 5.3.0 Added the `$position` parameter.

add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null )   X-Ref
Add submenu page to the Comments main menu.

This function takes a capability which will be used to determine whether
or not a page is included in the menu.

The function which is hooked in to handle the output of the page must check
that the user has the required capability as well.

param: string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
param: string   $menu_title The text to be used for the menu.
param: string   $capability The capability required for this menu to be displayed to the user.
param: string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
param: callable $function   The function to be called to output the content for this page.
param: int      $position   The position in the menu order this item should appear.
return: false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
since: 2.7.0
since: 5.3.0 Added the `$position` parameter.

remove_menu_page( $menu_slug )   X-Ref
Remove a top-level admin menu.

param: string $menu_slug The slug of the menu.
return: array|bool The removed menu on success, false if not found.
since: 3.1.0

remove_submenu_page( $menu_slug, $submenu_slug )   X-Ref
Remove an admin submenu.

param: string $menu_slug    The slug for the parent menu.
param: string $submenu_slug The slug of the submenu.
return: array|bool The removed submenu on success, false if not found.
since: 3.1.0

menu_page_url( $menu_slug, $echo = true )   X-Ref
Get the URL to access a particular menu page based on the slug it was registered with.

If the slug hasn't been registered properly, no URL will be returned.

param: string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
param: bool   $echo      Whether or not to echo the URL. Default true.
return: string The menu page URL.
since: 3.0.0

get_admin_page_parent( $parent = '' )   X-Ref

return: string

get_admin_page_title()   X-Ref

return: string

get_plugin_page_hook( $plugin_page, $parent_page )   X-Ref

param: string $plugin_page The slug name of the plugin page.
param: string $parent_page The slug name for the parent menu (or the file name of a standard
return: string|null Hook attached to the plugin page, null otherwise.
since: 2.3.0

get_plugin_page_hookname( $plugin_page, $parent_page )   X-Ref

param: string $plugin_page The slug name of the plugin page.
param: string $parent_page The slug name for the parent menu (or the file name of a standard
return: string Hook name for the plugin page.

user_can_access_admin_page()   X-Ref

return: bool Whether the current user can access the current admin page.

option_update_filter( $options )   X-Ref
Refreshes the value of the options whitelist available via the 'whitelist_options' hook.

See the {@see 'whitelist_options'} filter.

param: array $options
return: array
since: 2.7.0

add_option_whitelist( $new_options, $options = '' )   X-Ref
Adds an array of options to the options whitelist.

param: array        $new_options
param: string|array $options
return: array
since: 2.7.0

remove_option_whitelist( $del_options, $options = '' )   X-Ref
Removes a list of options from the options whitelist.

param: array        $del_options
param: string|array $options
return: array
since: 2.7.0

settings_fields( $option_group )   X-Ref
Output nonce, action, and option_page fields for a settings page.

param: string $option_group A settings group name. This should match the group name
since: 2.7.0

wp_clean_plugins_cache( $clear_update_cache = true )   X-Ref
Clears the plugins cache used by get_plugins() and by default, the plugin updates cache.

param: bool $clear_update_cache Whether to clear the plugin updates cache. Default true.
since: 3.7.0

plugin_sandbox_scrape( $plugin )   X-Ref
Load a given plugin attempt to generate errors.

param: string $plugin Path to the plugin file relative to the plugins directory.
since: 3.0.0
since: 4.4.0 Function was moved into the `wp-admin/includes/plugin.php` file.

wp_add_privacy_policy_content( $plugin_name, $policy_text )   X-Ref
Helper function for adding content to the Privacy Policy Guide.

Plugins and themes should suggest text for inclusion in the site's privacy policy.
The suggested text should contain information about any functionality that affects user privacy,
and will be shown on the Privacy Policy Guide screen.

A plugin or theme can use this function multiple times as long as it will help to better present
the suggested policy content. For example modular plugins such as WooCommerse or Jetpack
can add or remove suggested content depending on the modules/extensions that are enabled.
For more information see the Plugin Handbook:
https://developer.wordpress.org/plugins/privacy/suggesting-text-for-the-site-privacy-policy/.

Intended for use with the `'admin_init'` action.

param: string $plugin_name The name of the plugin or theme that is suggesting content
param: string $policy_text The suggested content for inclusion in the policy.
since: 4.9.6

is_plugin_paused( $plugin )   X-Ref
Determines whether a plugin is technically active but was paused while
loading.

For more information on this and similar theme functions, check out
the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
Conditional Tags} article in the Theme Developer Handbook.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: bool True, if in the list of paused plugins. False, if not in the list.
since: 5.2.0

wp_get_plugin_error( $plugin )   X-Ref
Gets the error that was recorded for a paused plugin.

param: string $plugin Path to the plugin file relative to the plugins directory.
return: array|false Array of error information as returned by `error_get_last()`,
since: 5.2.0

resume_plugin( $plugin, $redirect = '' )   X-Ref
Tries to resume a single plugin.

If a redirect was provided, we first ensure the plugin does not throw fatal
errors anymore.

The way it works is by setting the redirection to the error before trying to
include the plugin file. If the plugin fails, then the redirection will not
be overwritten with the success message and the plugin will not be resumed.

param: string $plugin   Single plugin to resume.
param: string $redirect Optional. URL to redirect to. Default empty string.
return: bool|WP_Error True on success, false if `$plugin` was not paused,
since: 5.2.0

paused_plugins_notice()   X-Ref
Renders an admin notice in case some plugins have been paused due to errors.

since: 5.2.0



Generated: Fri Nov 22 01:00:04 2019 Cross-referenced by PHPXref 0.7.1