Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement Request: Filter Available Videos Based On User Capabilities #38

Open
cgrymala opened this issue May 18, 2016 · 0 comments
Open

Comments

@cgrymala
Copy link

I would love to see this plugin have some functionality that filters the list of available videos based on the current user's capabilities.

Essentially, if I'm a Subscriber (set with the default WP Subscriber capabilities), I shouldn't see most (if any) of the Video Tutorials. If I'm a default Editor, I shouldn't see "Changing the Theme", "Adding Widgets", etc.

I realize this use-case is not always going to be appropriate (for instance, if someone has a single Video Tutorials site set up for all of their clients to login and view the tutorials, rather than having the plugin installed on individual client sites), but I think it would be appropriate for most use-cases of the plugin.

Basically, what this would require, would be to tag each video with a specific capability that relates most closely to the content of the video (e.g. edit_theme_options for the "Adding Widgets" video, or upload_files for the "Add Photos and Images" video, etc.), then, in the get_help_topics_html() method (or possibly the get_help_topics() method), run each video through the current_user_can() test to see if they should be able to view the video or not.

I'll work on implementing this functionality for our purposes through the available filters, first, then I'll work on trying to put together a patch/pull request for this functionality. Thanks.

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

No branches or pull requests

1 participant