all repos — wp-ffpc @ a3a032df8cf72e35a00cbb79161316445917a555

Merge pull request #31 from plescheff/master

Added plugin error messages filter
Peter Molnar hello@petermolnar.eu
Tue, 13 Jan 2015 11:47:55 +0000
commit

a3a032df8cf72e35a00cbb79161316445917a555

parent

4275199cf29717d2b6e35ec98fcec070e83a0d12

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 ); + } } }