Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/27/2012 02:38:36 AM (14 years ago)
Author:
johnjamesjacoby
Message:

First pass at creating forum content on first installation.

  • Move bbp_activation and bbp_deactivation action hooks into admin actions so they are not run by site visitors
  • Introduce bbp_create_initial_content() function to handle insertion of initial forum, topic, and reply
  • Fixes #1701
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-admin/bbp-admin.php

    r3766 r3768  
    107107                add_action( 'bbp_register_admin_settings', array( $this, 'register_admin_settings' ) );
    108108
     109                // Add menu item to settings menu
     110                add_action( 'bbp_activation',              array( $this, 'new_install'             ) );
     111
    109112                // Forums 'Right now' Dashboard widget
    110113                add_action( 'wp_dashboard_setup',  array( $this, 'dashboard_widget_right_now' ) );
     
    204207                        array( $this, 'network_update_screen' )
    205208                );
     209        }
     210
     211        /**
     212         * If this is a new installation, create some initial forum content.
     213         *
     214         * @since bbPress (r3767)
     215         * @return type
     216         */
     217        public function new_install() {
     218                if ( !bbp_is_install() )
     219                        return;
     220
     221                bbp_create_initial_content();
    206222        }
    207223
Note: See TracChangeset for help on using the changeset viewer.