sixtyseven on "[Plugin: Error Log Monitor] Display filter for the error log metabox"

ساخت وبلاگ

H from Germany,

i am using your plugin in every new WP installation of mine and still find it absolutely indispensable. Of course it works like a charm with the new WP 4.5.1 Besides the l18n feature I asked for about one year ago, I came up with another Idea: Could you probably wrap some sort of a display filter around the dashboard metabox output? I am thinking of a simple true/false condition, that one could use to show/hide the metabox.

Rough example (considering $show is a bool that's true):

function show_error_log_metabox($show){
$show = current_user_can('manage_options');
retu $show;
}
add_filter('yourfilterhook', 'show_error_log_metabox');

Could come in handy when streamline the WP dashboard for a customer.

https://wordpress.org/plugins/error-log-monitor/

All right, that sounds easy enough. I've implemented your idea in the development version. The filter name is elm_show_dashboard_widget. It works exactly as you suggested. Just make a callback that retus true to show the widget and false to hide it.

sixtyseven
Member
Posted 2 minutes ago #

Thank you for considering my suggestion. If you don't mind, may I ask about the localization again? As stated before, I think your plugin is a very good enhancement for all of my WP installations. Should make its way into the core someday ;-)

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 118 تاريخ : شنبه 11 ارديبهشت 1395 ساعت: 19:31