Skip to content

Use capability filter for settings#33

Open
todeveni wants to merge 1 commit into
ableplayer:mainfrom
todeveni:patch-1
Open

Use capability filter for settings#33
todeveni wants to merge 1 commit into
ableplayer:mainfrom
todeveni:patch-1

Conversation

@todeveni
Copy link
Copy Markdown

Description

Add a filter, so you can allow eg. editors to Able Player settings.

How Has This Been Tested?

By modifying current plugin source locally and with a filter in place. Settings show and are editable for editors.

add_filter(
  'ableplayer_capability',
  static function (): string {
    return 'edit_others_posts';
  }
);

Types of changes

Adds a capability filter

Checklist:

  • My code is tested.
  • My code is backward-compatible with WordPress 4.9 and PHP 7.0.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant