wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_get_plugin_error › WordPress Function

Seit5.2.0
Veraltetn/v
wp_get_plugin_error ( $plugin )
Parameter:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Erforderlich: Ja
Gibt zurück:
  • (array|false) Array of error information as returned by `error_get_last()`, or false if none was recorded.
Definiert in:
Codex:

Gets the error that was recorded for a paused plugin.



Quellcode

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 ];
}