WordPress.org

Ready to get started?Download WordPress

Forums

WooSidebars
[resolved] Filter the register_sidebar args (5 posts)

  1. lemmonaid
    Member
    Posted 6 months ago #

    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/

  2. Matty Cohen
    Member
    Plugin Author

    Posted 6 months ago #

    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]

  3. lemmonaid
    Member
    Posted 6 months ago #

    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

  4. Matty Cohen
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Oliver,

    Great, thanks for the letting us know. :)

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

  5. esmi
    Forum Moderator
    Posted 6 months ago #

Reply

You must log in to post.

About this Plugin

About this Topic