wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_get_plugin_error › WordPress Function

Since5.2.0
已弃用n/a
wp_get_plugin_error ( $plugin )
参数:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Required: Yes
返回:
  • (array|false) Array of error information as returned by `error_get_last()`, or false if none was recorded.
定义在:
文档:

Gets the error that was recorded for a paused plugin.



源码

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