JSM's Block Filter Output – Monitor and Fix Incorrectly Coded Content Filters

Monitor and fix incorrectly coded content filter hooks that send data / text to the…

Author:JS Morisset (profile at wordpress.org)
WordPress version required:3.9
WordPress version tested:5.3
Plugin version:1.2.0
Added to WordPress repository:27-09-2017
Last updated:17-10-2019
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://surniaulula.com/extend/plugins/jsm-bl...
Total downloads:2 484
plugin download
Click to start download

Monitor the content filter and fix incorrectly coded filter hooks (that send text to the webpage instead of returning it, as all filter hooks must).

A notice is sent to the PHP error log when webpage output is detected:

[01-Oct-2017 01:48:28 UTC] Block Filter Output: The “ClassName::echoText” hook with priority 10 in the “the_content” filter has incorrectly sent output to the webpage. All WordPress filter hooks must return their text, not send it to the webpage output. Please contact the author of that filter hook and report this issue as a coding error. Incorrect webpage output:
—–BEGIN OUTPUT—–
<strong>Some output that should have been returned instead of echo’ed.</strong>
—–END OUTPUT—–

Power-users / Developers

If you haven’t enabled the WP_DEBUG constant yet, you should set the WP_DEBUG constant to true in your wp-config.php file to find out about these and any other PHP / WordPress coding errors.