Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/20/2021 04:03:08 PM (5 years ago)
Author:
dcavins
Message:

BP_Optouts: Add WP Admin management screen.

Add a management screen for opt-out requests at the
single-site or network level. This screen is appended
to the BuddyPress Tools screen. Using this screen,
site admins can view opt-out requests, search for
opt-outs by specific email address, and monitor
opt-out requests for signs of abuse by a particular
email type or potentially malicious user.

Fixes #8448.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-admin.php

    r12893 r12899  
    124124                require( $this->admin_dir . 'bp-core-admin-slugs.php'      );
    125125                require( $this->admin_dir . 'bp-core-admin-tools.php'      );
     126                require( $this->admin_dir . 'bp-core-admin-optouts.php'    );
    126127        }
    127128
     
    302303                );
    303304
     305                $hooks[] = add_submenu_page(
     306                        $tools_parent,
     307                        __( 'Manage Opt-outs', 'buddypress' ),
     308                        __( 'Manage Opt-outs', 'buddypress' ),
     309                        $this->capability,
     310                        'bp-optouts',
     311                        'bp_core_optouts_admin'
     312                );
     313
    304314                // For network-wide configs, add a link to (the root site's) Emails screen.
    305315                if ( is_network_admin() && bp_is_network_activated() ) {
     
    524534                remove_submenu_page( 'index.php', 'bp-about'   );
    525535                remove_submenu_page( 'index.php', 'bp-credits' );
     536
     537                // Nonmembers Opt-outs page.
     538                if ( is_network_admin() ) {
     539                        remove_submenu_page( 'network-tools', 'bp-optouts' );
     540                } else {
     541                        remove_submenu_page( 'tools.php', 'bp-optouts' );
     542                }
    526543        }
    527544
Note: See TracChangeset for help on using the changeset viewer.