all repos — wp-ffpc @ d0dc5cf6d7780d29cd8158f8544aa4c65b2eabba

Added errors filtering so plugin/theme authors can intercept error handling.
Anton Pelesˌev anton.peleshev@zeroturnaround.com
Tue, 13 Jan 2015 13:10:30 +0200
commit

d0dc5cf6d7780d29cd8158f8544aa4c65b2eabba

parent

e3c5b8a2cc5a7fb225e50a6b35fcfd73aa7df6da

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M wp-ffpc-class.phpwp-ffpc-class.php

@@ -251,8 +251,11 @@ }

} } - foreach ( $this->errors as $e => $msg ) { - $this->utils->alert ( $msg, LOG_WARNING, $this->network ); + $filtered_errors = apply_filters('wp_ffpc_post_init_errors_array', $this->errors); + if ($filtered_errors) { + foreach ( $this->errors as $e => $msg ) { + $this->utils->alert ( $msg, LOG_WARNING, $this->network ); + } } }