Skip to:
Content

BuddyPress.org

Ticket #3661: 3661.01.patch

File 3661.01.patch, 3.3 KB (added by DJPaul, 9 years ago)
  • bp-blogs/bp-blogs-functions.php

    function bp_blogs_transition_activity_status( $new_status, $old_status, $comment 
    497497        $comment_akismet_history = create_function( '$t', '$t[] = "new_blog_comment"; return $t;' );
    498498        add_filter( 'bp_akismet_get_activity_types', $comment_akismet_history );
    499499
     500        /**
     501         * If we're here, that means an activity item already existed for this comment. Make sure we don't
     502         * send a multiple @mention emails to the user.
     503         */
     504        remove_action( 'bp_activity_after_save', 'bp_activity_at_name_filter_updates' );
     505
    500506        // Save the updated activity
    501507        $activity->save();
    502508
  • bp-core/admin/bp-core-settings.php

    function bp_admin_setting_callback_account_deletion() { 
    4949<?php
    5050}
    5151
     52/**
     53 * If user has upgraded to 1.6 and chose to retain their BuddyBar, offer then a switch to change over
     54 * to the WP Toolbar.
     55 *
     56 * @since BuddyPress (1.6)
     57 */
     58function bp_admin_setting_callback_force_buddybar() {
     59?>
     60
     61        <input id="_bp_force_buddybar" name="_bp_force_buddybar" type="checkbox" value="1" <?php checked( ! bp_force_buddybar( false ) ); ?> />
     62        <label for="_bp_force_buddybar"><?php _e( 'Switch to WordPress Toolbar', 'buddypress' ); ?></label>
     63
     64<?php
     65}
     66
    5267/** Activity *******************************************************************/
    5368
    5469/**
  • bp-core/bp-core-admin.php

    class BP_Admin { 
    282282                // Add the main section
    283283                add_settings_section( 'bp_main',            __( 'Main Settings',    'buddypress' ), 'bp_admin_setting_callback_main_section',     'buddypress'            );
    284284
    285                 // Hide toolbar for logged out users setting
    286                 add_settings_field( 'hide-loggedout-adminbar',        __( 'Toolbar',        'buddypress' ), 'bp_admin_setting_callback_admin_bar',        'buddypress', 'bp_main' );
    287                 register_setting  ( 'buddypress',           'hide-loggedout-adminbar',        'intval'                                                                              );
    288 
    289                 // Allow favorites setting
     285                // Allow account deletion
    290286                add_settings_field( 'bp-disable-account-deletion', __( 'Account Deletion', 'buddypress' ), 'bp_admin_setting_callback_account_deletion', 'buddypress', 'bp_main' );
    291287                register_setting  ( 'buddypress',           'bp-disable-account-deletion', 'intval'                                                                              );
    292288
     289                // Only show 'switch to Toolbar' option if the user chose to retain the BuddyBar during the 1.6 upgrade
     290                if ( (bool) bp_get_option( '_bp_force_buddybar', true ) ) {
     291                        add_settings_field( '_bp_force_buddybar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_force_buddybar', 'buddypress', 'bp_main' );
     292                        register_setting( 'buddypress', '_bp_force_buddybar', 'intval' );
     293                }
     294
    293295                /** XProfile Section **************************************************/
    294296
    295297                if ( bp_is_active( 'xprofile' ) ) {