• Hello,

    If anyone else finds they’re removing NextGen for some reason and want to cleanup their capabilities here’s a quick script to clean out ngg capabilities:

    // Remove Unwanted Capabilities (NextGen Gallery)
    add_action( ‘admin_init’, ‘clean_ngg_caps’ );
    function clean_ngg_caps(){
    $delete_caps = array(‘NextGEN Gallery overview’, ‘NextGEN Use TinyMCE’, ‘NextGEN Upload images’, ‘NextGEN Manage gallery’, ‘NextGEN Manage tags’, ‘NextGEN Manage others gallery’, ‘NextGEN Edit album’, ‘NextGEN Change style’, ‘NextGEN Change options’, ‘NextGEN Attach Interface’);
    global $wp_roles;
    foreach ($delete_caps as $cap) {
    foreach (array_keys($wp_roles->roles) as $role) {
    $wp_roles->remove_cap($role, $cap);
    }
    }
    }

    Hope someone finds that helpful,
    Cheers

    https://ww.wp.xz.cn/plugins/nextgen-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Removing NextGen Capabilities’ is closed to new replies.