Added errors filtering so plugin/theme authors can intercept error handling.

This commit is contained in:
Anton Pelešev 2015-01-13 13:10:30 +02:00
parent e3c5b8a2cc
commit d0dc5cf6d7

View file

@ -251,8 +251,11 @@ class WP_FFPC extends PluginAbstract {
} }
} }
foreach ( $this->errors as $e => $msg ) { $filtered_errors = apply_filters('wp_ffpc_post_init_errors_array', $this->errors);
$this->utils->alert ( $msg, LOG_WARNING, $this->network ); if ($filtered_errors) {
foreach ( $this->errors as $e => $msg ) {
$this->utils->alert ( $msg, LOG_WARNING, $this->network );
}
} }
} }