Skip to:

How can I rewrite a bbpress plugin function?

  • jreeve


    I’m trying to make this checkbox checked by default: Create a Group -> 4. Forum -> Group Forum -> “Yes. I want this Group to have a forum.”

    I found the code that handles this at /plugins/bbpress/includes/extend/buddypress/group.php, a function called create_screen. I’d like to customize this function, so I copied the function to a plugin script. I figure I have to do something like

    remove_action(‘whereever_the_hook_for_the_group_creation_thing_is’, ‘create_screen’);
    add_action( ‘whereever_the_hook_for_the_group_creation_thing_is’, ‘create_screen’ );

    to get my custom version to replace the stock version, but I don’t know where the hook is or how to go about finding it.

Viewing 1 replies (of 1 total)

  • Lynqoid


    If you want to make the tickbox ticked by default you could use a small bit of jQuery

    jQuery("#checkbox").prop('checked', true);

    Then just include it in the admin or frontend – where ever you need it.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar