Filter the register_sidebar args
-
Hi guys!
First of all, thank you for this amazing plugin! I’m going to support it in all my themes and during the plugin implementation I’ve found out this little “issue”. It’s rather a request for a feature than an issue, actually.
You are registering sidebars in the plugin with:
register_sidebar( array( 'name' => $v->post_title, 'id' => $sidebar_id, 'description' => $v->post_excerpt ) );This is, of course, perfectly fine. The only downside to this I can see is that there is no option to set other args for the
register_sidebarfunction. Would it be possible to make the args array filterable? Something like:register_sidebar( apply_filters( 'woosidebars_register_sidebar_args', array( 'name' => $v->post_title, 'id' => $sidebar_id, 'description' => $v->post_excerpt ), $v ) );Or am I missing something and can I actually change the other
register_sidebarargs somewhere?Thanks!
Oliver
-
Hi Oliver,
Thanks for your kind words, and your suggestion.
Please submit a pull request, or log an issue, over at http://github.com/woothemes/woosidebars/ where we can discuss further. 🙂
Thanks and regards,
Matty.
[sig moderated as per the Forum Rules]Hi Matt,
Thanks for the suggestion. This have actually pushed me to investigate the WordPress core in more details as I presume there are more plugins registering sidebars than WooSidebars 😉
So, better solution would be to tweek the default
register_sidebar()args in the WordPress core, which is possible viaregister_sidebaraction hook. So my problem is sorted (although I’ve chosen to hook ontodynamic_sidebar_paramsfilter instead).Regards,
Oliver
Hi Oliver,
Great, thanks for the letting us know. 🙂
Thanks and regards,
Matty.
[sig moderated as per the Forum Rules]@matty: Please review http://codex.wordpress.org/Forum_Welcome#Signatures
The topic ‘Filter the register_sidebar args’ is closed to new replies.