Skip to content

Feature Request: Add Filter to Allow Changing Needed Capabilities #70

@huubl

Description

@huubl

Hi,

Currently, the Facebook Pixel for WordPress plugin has hard-coded capabilities / role checks for determining who can manage plugin options. I propose adding a filter to make these capabilities configurable, allowing for greater flexibility in managing permissions.

For example:

add_filter('facebook_pixel_manage_options_capability', function() {
    return 'edit_posts'; // Change to the desired capability
});

Relevant code:
Search results for current_user_can
Search results for is_admin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions