>
Download This Plugin | |
Download Elegant Themes | |
Name | Ostrichcize |
Version | 0.1 |
Author | Zack Tollman |
Rating | 0 |
Last updated | 2012-11-24 03:28:00 |
Downloads |
370
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Ostrichcize plugin added 16 bytes of resources to the Home page and 17 bytes of resources to the sample Post page.
Ostrichcize plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Ostrichcize plugin ads no tables to your Wordpress blog database.At the first sign of trouble, an ostrich buries its head in the sand. Ostrichcize allows a plugin or theme developer to bury his or her head in the sand by turning off error reporting for select plugins or the current theme.
If you have ever installed a plugin or worked on a site with a plugin that throws numerous of errors and notices, but do not have the time to fix the issue, you can turn off those notices with this plugin. By simply filtering the plugin, you can add to the list of plugins for which no notices will be shown.
To add to this list simply write something like:
function my_ostrichcized_plugins( $slugs ) {
$slugs[] = 'debug-bar-cron';
return $slugs;
}
function my_pre_my_ostrichcized_plugins() {
add_filter( 'ostrichcized_plugins', 'my_ostrichcized_plugins' );
}
add_action( 'plugins_loaded', 'my_pre_my_ostrichcized_plugins', 1 );
</pre>
Note that the filter must be added before any offending code is run in order to redefine the error reporting function before it is first called. The means that in most cases, this code will need to run from a plugin and not a theme.
To turn off PHP error reporting for a theme, run:
function my_ostrichcize_theme() {
add_filter( 'ostrichcize_theme', '__return_true' );
}
add_action( 'plugins_loaded', 'my_ostrichcize_theme', 1 );
</pre>
Thanks to Jeremy Felt (@jeremyfelt) for assistance naming the plugin!