Giter VIP home page Giter VIP logo

wp-plugin-boilerplate's People

Contributors

zahardev avatar

Stargazers

 avatar  avatar

Watchers

 avatar

wp-plugin-boilerplate's Issues

custom plugin options/settings page visible only in custom role's dashboard

I'm building a plugin based on the boilerplate that contains analytics data on virtual events attended by logged in users. The entire system is restricted to a hierarchy of users from the top down as follows: Admins, Moderators, Presenters, Attendees. I've granted Moderators access to the WP dashboard where I want to display a 'settings/options' page where they can see the activity analytics data of the attendees for only the events that are under their moderation control. Admins should be able to see all event analytics for all events tied to all moderators.
Currently, I've constructed this page in my custom_plugin/admin/partials/custom_plugin-events.php file and it is displaying all the activity at an administrator level. Furthermore, I've constructed the custom post type for the events and the custom roles with access. The moderator can see the custom post type in their dashboard.
My question is threefold:

  1. How do I make the event analytics page at the wp-admin/admin.php?page=custom_plugin-events url visible in the moderator's dashboard?
  2. I'm presently using some conditional logic in this admin/partial page that basically says if user_can=admin show this data and if user_can=moderator show this other data. Is that the correct and recommended approach?
  3. If I'm requiring all these users to be logged in and applied to one custom role or another...is the custom_plugin/admin directory the correct place to implement this? or would it be better in custom_plugin/public?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.