Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_get_plugin_error ›

Da5.2.0
Deprecaton/a
wp_get_plugin_error ( $plugin )
Parametri:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Richiesto:
Ritorna:
  • (array|false) Array of error information as it was returned by `error_get_last()`, or false if none was recorded.
Definito a:
Codex:

Gets the error that was recorded for a paused plugin.



Sorgenti

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