wp_get_plugin_error()
Gets the error that was recorded for a paused plugin.
No Hooks.
Return
Array|false
. Array of error information as returned by error_get_last(), or false if none was recorded.
Usage
wp_get_plugin_error( $plugin );
- $plugin(string) (required)
- Path to the plugin file relative to the plugins directory.
Notes
- Global. WP_Paused_Extensions_Storage. $_paused_plugins
Changelog
Since 5.2.0 | Introduced. |
wp_get_plugin_error() wp get plugin error code WP 6.8
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 ]; }