Support » Plugin: WooSidebars » 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_sidebar function. 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_sidebar args somewhere?

    Thanks!

    Oliver

    http://wordpress.org/plugins/woosidebars/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Matty Cohen

    (@mattyza)

    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 via register_sidebar action hook. So my problem is sorted (although I’ve chosen to hook onto dynamic_sidebar_params filter instead).

    Regards,

    Oliver

    Plugin Author Matty Cohen

    (@mattyza)

    Hi Oliver,

    Great, thanks for the letting us know. 🙂

    Thanks and regards,
    Matty.
    [sig moderated as per the Forum Rules]

    esmi

    (@esmi)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter the register_sidebar args’ is closed to new replies.