class-capability-manager.php 813 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Capabilities
  6. */
  7. /**
  8. * Capability Manager interface.
  9. */
  10. interface WPSEO_Capability_Manager {
  11. /**
  12. * Registers a capability.
  13. *
  14. * @param string $capability Capability to register.
  15. * @param array $roles Roles to add the capability to.
  16. * @param bool $overwrite Optional. Use add or overwrite as registration method.
  17. */
  18. public function register( $capability, array $roles, $overwrite = false );
  19. /**
  20. * Adds the registerd capabilities to the system.
  21. */
  22. public function add();
  23. /**
  24. * Removes the registered capabilities from the system.
  25. */
  26. public function remove();
  27. /**
  28. * Returns the list of registered capabilities.
  29. *
  30. * @return string[] List of registered capabilities.
  31. */
  32. public function get_capabilities();
  33. }