This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

bbPress::setup_actions()

Setup the default hooks and actions

Description

Source

File: bp-forums/classes/class-bbpress.php

    private function setup_actions() {

        // Add actions to plugin activation and deactivation hooks
        add_action( 'activate_'   . $this->basename, 'bbp_activation'   );
        add_action( 'deactivate_' . $this->basename, 'bbp_deactivation' );

        // If Forums is being deactivated, do not add any actions
        if ( bbp_is_deactivation( $this->basename ) )
            return;

        // Array of Forums core actions
        $actions = array(
            'setup_theme',              // Setup the default theme compat
            'setup_current_user',       // Setup currently logged in user
            'register_post_types',      // Register post types (forum|topic|reply)
            'register_post_statuses',   // Register post statuses (closed|spam|orphan|hidden)
            'register_taxonomies',      // Register taxonomies (topic-tag)
            'register_shortcodes',      // Register shortcodes (bbp-login)
            'register_views',           // Register the views (no-replies)
            'register_theme_packages',  // Register bundled theme packages (bbp-theme-compat/bbp-themes)
            'add_rewrite_tags',         // Add rewrite tags (view|user|edit|search)
            'add_rewrite_rules',        // Generate rewrite rules (view|edit|paged|search)
            'add_permastructs'          // Add permalink structures (view|user|search)
        );

        // Add the actions
        foreach ( $actions as $class_action )
            add_action( 'bbp_' . $class_action, array( $this, $class_action ), 5 );

        // All Forums actions are setup (includes bbp-core-hooks.php)
        do_action_ref_array( 'bbp_after_setup_actions', array( &$this ) );
    }

Changelog

Changelog
Version Description
bbPress (r2644) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.