bp_profile_search_prevent_delete()

Remove capability to delete BuddyBoss Profile Search form post type.

Description

Source

File: bp-core/profile-search/bps-start.php

function bp_profile_search_prevent_delete () {
    global $wp_roles;
    $wp_roles->remove_cap( 'administrator', 'delete_bp_ps_forms' );
    $wp_roles->remove_cap( 'administrator', 'delete_published_bp_ps_forms' );
    $wp_roles->remove_cap( 'editor', 'delete_bp_ps_forms' );
    $wp_roles->remove_cap( 'editor', 'delete_published_bp_ps_forms' );
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 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.