t bbPress to the about page on activation * * @uses is_network_admin() To bail if being network activated * @uses set_transient() To drop the activation transient for 30 seconds * * @return If network admin or bulk activation */ function bbp_add_activation_redirect() { // Bail if activating from network, or bulk if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) return; // Add the transient to redirect set_transient( '_bbp_activation_redirect', true, 30 ); } /** * Hooked to the 'bbp_activate' action, this helper function automatically makes * the current user a Key Master in the forums if they just activated bbPress, * regardless of the bbp_allow_global_access() setting. * * @since bbPress (r4910) * * @internal Used to internally make the current user a keymaster on activation * * @uses current_user_can() to bail if user cannot activate plugins * @uses get_current_user_id() to get the current user ID * @uses get_current_blog_id() to get the current blog ID * @uses is_user_member_of_blog() to bail if the current user does not have a role * @uses bbp_is_user_keymaster() to bail if the user is already a keymaster * @uses bbp_set_user_role() to make the current user a keymaster * * @return If user can't activate plugins or is already a keymaster */ function bbp_make_current_user_keymaster() { // Bail if the current user can't activate plugins since previous pageload if ( ! current_user_can( 'activate_plugins' ) ) { return; } // Get the current user ID $user_id = get_current_user_id(); $blog_id = get_current_blog_id(); // Bail if user is not actually a member of this site if ( ! is_user_member_of_blog( $user_id, $blog_id ) ) { return; } // Bail if the current user already has a forum role to prevent // unexpected role and capability escalation. if ( bbp_get_user_role( $user_id ) ) { return; } // Make the current user a keymaster bbp_set_user_role( $user_id, bbp_get_keymaster_role() ); // Reload the current user so caps apply immediately wp_get_current_user(); }
Fatal error: Call to undefined function bbp_is_deactivation() in /home/airbnbbe/public_html/nl/wp-content/plugins/bbpress/bbpress.php on line 362