Closed DavidWells closed 10 years ago
As we rewrite as classes we need to follow the correct coding standards
So this example https://github.com/inboundnow/leads/blob/master/modules/module.dashboard.php#L8-L48
Needs to follow coding standards:
This:
function remove_dashboard_widgets() { global $remove_defaults_widgets; foreach ($remove_defaults_widgets as $wigdet_id => $options) { remove_meta_box($wigdet_id, $options['page'], $options['context']); } }
Turns into
/* Removes standard wp widgets */ static function remove_dashboard_widgets() { global $remove_defaults_widgets; foreach ($remove_defaults_widgets as $wigdet_id => $options) { remove_meta_box($wigdet_id, $options['page'], $options['context']); } }
I'm rewriting leads now
You could use the WordPress PHP Code Sniffer, to be able to parse your code for you.
Ah very cool. Did you write this?
Nahh, this is maintained by X-Team.
As we rewrite as classes we need to follow the correct coding standards
So this example https://github.com/inboundnow/leads/blob/master/modules/module.dashboard.php#L8-L48
Needs to follow coding standards:
This:
Turns into
I'm rewriting leads now