On this page
wp_get_plugin_error( string $plugin ): array|false
Gets the error that was recorded for a paused plugin.
Parameters
$pluginstring Required-
Path to the plugin file relative to the plugins directory.
Return
array|false Array of error information as returned by error_get_last(), or false if none was recorded.
Source
File: wp-admin/includes/plugin.php. View all references
function wp_get_plugin_error( $plugin ) {
if ( ! isset( $GLOBALS['_paused_plugins'] ) ) {
return false;
}
list( $plugin ) = explode( '/', $plugin );
if ( ! array_key_exists( $plugin, $GLOBALS['_paused_plugins'] ) ) {
return false;
}
return $GLOBALS['_paused_plugins'][ $plugin ];
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Plugins_List_Table::single_row() wp-admin/includes/class-wp-plugins-list-table.php |
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_plugin_error